diff options
author | jthorn <jthorn@f88db872-0e4f-0410-b76b-b9085cfa78c5> | 2002-07-08 14:00:20 +0000 |
---|---|---|
committer | jthorn <jthorn@f88db872-0e4f-0410-b76b-b9085cfa78c5> | 2002-07-08 14:00:20 +0000 |
commit | 746c0d7aff2b1a678564d39bfb1729eb45dbf45e (patch) | |
tree | 546a2790c482f8ecb935946d2348d8ecf05d6b2c /src/jtutil | |
parent | da012f98bce0faf3c7f8a00c59fe2a150569f588 (diff) |
move to ../include/
git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinAnalysis/AHFinderDirect/trunk@620 f88db872-0e4f-0410-b76b-b9085cfa78c5
Diffstat (limited to 'src/jtutil')
-rw-r--r-- | src/jtutil/stdc.h | 104 |
1 files changed, 0 insertions, 104 deletions
diff --git a/src/jtutil/stdc.h b/src/jtutil/stdc.h deleted file mode 100644 index ffb2e1b..0000000 --- a/src/jtutil/stdc.h +++ /dev/null @@ -1,104 +0,0 @@ -/* stdc.h -- JT standard C/C++ header file, cut-down for modern code only */ -/* $Id$ */ - -/* - * ***** THIS VERSION IS FOR ANSI/ISO C AND C++ ***** - */ - -/* this header file is idempotent */ -#ifndef STDC_H_SEEN -#define STDC_H_SEEN - -/******************************************************************************/ - -/* - * Fake "then" keyword for if statement, to make "then" and "else" - * symmetrical: - * - * usage: - * if (foo) - * then bar; - * else baz; - */ -#define then /* empty */ - -/******************************************************************************/ - -/* - * C/C++ compatability: - */ - -/* use this in prototypes like this: extern C_FUNCTION void foo(...) */ -#ifdef __cplusplus - #define C_FUNCTION "C" -#else - #define C_FUNCTION /* empty */ -#endif - -/******************************************************************************/ - -/* - * misc stuff - */ - -#ifdef M_PI /* usually defined in <math.h> */ - #define PI M_PI -#endif - -#define STRING_EQUAL(s_,t_) (strcmp(s_,t_) == 0) - -/* C library uses abs() for integer absolute value; I prefer iabs() */ -#define iabs(x_) abs(x_) - -#ifndef FILENAME_MAX - /* we must be on a wierd system with an ancient <stdio.h> */ - /* ==> try defining this ourselves, hope it works... */ - #define FILENAME_MAX 4095 -#endif - -/******************************************************************************/ - -#ifdef __cplusplus -namespace jtutil - { -#endif - -/* - * Standard error-handling function: print a message to stderr, then - * exit() or abort(). (Does *not* return to caller.) - * - * This function is declared to return an int in order that it may be - * easily used in conditional expressions like - * foo = bar_ok ? baz(bar) : error_exit(...); - */ -extern C_FUNCTION int error_exit(int exit_code, const char *format, ...) - #ifdef __GNUC__ - __attribute__ ((noreturn)) - __attribute__ ((format(printf,2,3))) - #endif -; - -/* - * error_exit() uses the following exit() codes: - * OK_EXIT ==> everything's under control - * ERROR_EXIT ==> something bad has happened - * PANIC_EXIT ==> diasaster ==> force (eg) core dump, stack trace - */ - -#ifdef VMS - #define OK_EXIT 1 - #define ERROR_EXIT 3 - #define PANIC_EXIT (-1) -#else - #define OK_EXIT 0 - #define ERROR_EXIT 1 - #define PANIC_EXIT (-1) -#endif - -#ifdef __cplusplus - }; /* namespace jtutil:: */ -#endif - -/******************************************************************************/ - -#endif /* STDC_H_SEEN */ |