/* Module >> macros_1.h
*****************************************************************************
Macros and Types ALL Applications could use
*/
// -----------------------------------------------------------------------------
// M a c r o s
// -----------------------------------------------------------------------------
// Erweiterungen der Programmiersprache, die u.a. Basis fr GAZELLE sind, stehen
// in exec_ut.h und hier:
#define predeclare class
predeclare EStandardServices ;
#define isA_ public virtual
#define s_ sprintf
#define true 1
#define false 0
#define then
#define esif else if
#define sL strlen
#define ok errno = 0 ;
#define Alloc ( char * ) malloc
#define ReAlloc( p,L ) p = ( char * ) realloc( p,L );
#define Unlink( x )
{
unlink( x ); errno = 0 ;
}
#define for_X( wc ) _finddata_t X ; int h = _findfirst( wc, &X ); \
while ( ! errno )
#define next_X _findnext( h, &X );
/* Example:
{
for_X ( "*.cpp" )
{
compile( X.name ); next_X
}
ok
}
*/
#define ENZ_part goto Z ; \
e: sql_error( "ERROR" , db_errMess, __LF__ ); \
N: sql_error( "NOT FOUND", db_errMess, __LF__ ); \
Z: ;
// -----------------------------------------------------------------------------
// Erweiterungen der Programmiersprache, die einfach nur C++ Stenographie dar-
// stellen:
#define I ; //
#define RunTime (( 1.0 * clock() )/ CLOCKS_PER_SEC )
#define fPrintf fprintf
#define no_such_file_or_dir ( errno == EN_no_such_file || \
errno == EN_no_such_dir )
#ifdef MICROSOFT
#define stat _stat
#define write _write
#define read _read
#define lseek _lseek
#endif
#define memcp( x,y,z )
{
if (z) memcpy(x,y,z);
}
const int BL = 4096 ; // Buffer Length const char LF = 0x0A ; // Line Feed const char FF = 12 ; // Form Feed const char CR = 0x0D ; // Carriage Return const int raw_E = 4 ;
#define color( foreground, background, intensity, blinking ) \
(foreground) + 16*(background) + 8*(intensity) + 128*(blinking)
// foreground 0 .. 7 // background 0 .. 7 // intensity 0 .. 1
#define BR ; break;
#define Case break; case
#define Else break; default
#define R_OPEN O_RDONLY, S_IREAD | S_IWRITE
// # define R_OPENCR O_RDONLY | O_CREAT, S_IREAD | S_IWRITE
#define W_OPENCR O_RDWR | O_CREAT | O_TRUNC, S_IREAD | S_IWRITE
#define SEEK_SET 0
#define SEEK_END 2
#define SEEK_CUR 1
#define unlink_(x)
{
_ LP_( "unlink", x ) unlink( x );
}
#define not_is( x,y,n ) ( memcmp( x, y, n ) )
#define is( x,y,n ) ( memcmp( x, y, n ) == 0 )
#define sm( x,y,n ) ( memcmp( x, y, n ) < 0 )
#define sm_is( x,y,n ) ( memcmp( x, y, n ) <= 0 )
#define not_sm_( x,y ) ( strcmp( x, y ) >= 0 )
#define not_is_( x,y ) ( strcmp( x, y ) )
#define is_( x,y ) ( strcmp( x, y ) == 0 )
#define sm_( x,y ) ( strcmp( x, y ) < 0 )
#define sm_is_( x,y ) ( strcmp( x, y ) <= 0 )
#define digit(x) ( isdigit(x) )
#define not_digit(x) ( ! isdigit(x) )
#define ntdigit(x) ( ! isdigit(x) )
#define ntspace(x) ( ! isspace(x) )
#define not_space(x) ( ! isspace(x) )
#define space(x) ( isspace(x) )
#define exit_if_no_( x ) if ( ! path_exists(x) ) \
{
printf( "existiert nicht: %s\n", x ); exit(1);
}
#define __LF__ __LINE__,__FILE__
#define __FL__ __FILE__,__LINE__
#define fErr
{
printf( "\nfatal error at %i: %s", __LF__ ); exit(1);
}
#define Free( x )
{
if (x) free( x );
}
#define setNULL( x ) memset( &x, 0, sizeof( x ) );
#define _ printf( "\n-- %4i %s", __LF__ );
#define re_sto( p,L ) p = (char *) realloc( p,L )
// #define sto (char *) malloc
// sto is ok in WEBSERV.ic but not in code based on exec_ut, why
#define LB_(x)
{
printf( "\n -> %s", x );
#define LE_
}
#define LE_ret( x ) return( x );
#define ret( x ) return( x );
#define ret_ return ;
// -----------------------------------------------------------------------------
// Standard T y p e Declarations
// -----------------------------------------------------------------------------
typedef char   char_subset[ 256 ]
;
typedef long double   float80
;
typedef int   fildes
;
typedef int   BOOL
; #define L_path 500
typedef char   path[ L_path ]
;
typedef int   Date
;
typedef int   DateTime
;
typedef int   Time
;
typedef int   BOOL
;
typedef char   int1
;
typedef short   int2
;
typedef long   int4
;
typedef long double   float80
;
typedef unsigned char   uchar
;
typedef unsigned char   uint1
;
typedef unsigned short   uint2
;
typedef unsigned long   uint4
;
typedef unsigned int   uint
;
typedef char   char4 [ 4 ]
;
typedef char   char8 [ 8 ]
;
typedef char   char10 [ 10 ]
;
typedef char   char11 [ 11 ]
;
typedef char   char12 [ 12 ]
;
typedef char   char20 [ 20 ]
;
typedef char   char24 [ 24 ]
;
typedef char   char30 [ 30 ]
;
typedef char   char32 [ 32 ]
;
typedef char   char40 [ 40 ]
;
typedef char   char50 [ 50 ]
;
typedef char   char60 [ 60 ]
;
typedef char   char70 [ 70 ]
;
typedef char   char80 [ 80 ]
;
typedef char   char90 [ 90 ]
;
typedef char   char100 [ 100 ]
;
typedef char   char200 [ 200 ]
;
typedef char   char300 [ 300 ]
;
typedef char   char400 [ 400 ]
;
typedef char   char500 [ 500 ]
;
typedef char   char600 [ 600 ]
;
typedef char   char700 [ 700 ]
;
typedef char   char800 [ 800 ]
;
typedef char   char900 [ 900 ]
;
typedef char   char1000 [ 1000 ]
;
typedef char   char2000 [ 2000 ]
;
typedef char   char3000 [ 3000 ]
;
typedef char   char4000 [ 4000 ]
;
typedef char   char5000 [ 5000 ]
;
typedef char   char6000 [ 6000 ]
;
typedef char   char7000 [ 7000 ]
;
typedef char   char8000 [ 8000 ]
;
typedef char   char9000 [ 9000 ]
;
typedef char   char10000 [ 10000 ]
;
typedef char   char20000 [ 20000 ]
;
typedef char   char30000 [ 30000 ]
;
typedef char   char40000 [ 40000 ]
;
typedef char   char50000 [ 50000 ]
;
typedef char   char60000 [ 60000 ]
;
typedef char   char70000 [ 70000 ]
;
typedef char   char80000 [ 80000 ]
;
typedef char   char90000 [ 90000 ]
top . is_inc_for . C++
; #endif