Main Page   Modules   Data Structures   File List   Data Fields   Globals  

incl/macro.h

Go to the documentation of this file.
00001 /* === Doxygen File Comment ============================== */
00010 /* ======================================================= */
00011 #include <math.h>
00012 #include <strings.h>
00013 
00014 #define CRAD (M_PI/180.)
00015 
00016 #define MAX(x,y)   ((x) >= (y) ?  (x) : (y))    /* maximum of 2 values */
00017 #define MIN(x,y)   ((x) <= (y) ?  (x) : (y))    /* minimum of 2 values */
00018 #define ABS(x)     ((x) <   0  ? (-(x)) : (x))  /* absolute value */
00019                                                                                                 /* nearest integer of x */
00020 #define NINT(x)    ((x) <   0  ? ((long)(x-0.5)) : ((long)(x+0.5))) 
00021 #define SQ(x)      ((x) * (x))                                  /* square of x */
00022 
00023 #define is_num(car) (('0' <= car && car <= '9') ? 1 : 0)
00024 #define is_alphanum(car) (('0' >= car || car >= '9') ? 1 : 0)
00025 
00026 #define is_true(val) (strcmp(val,"true") == 0 ? 1 : 0)
00027 #define is_false(val) (strcmp(val,"false") == 0 ? 1 : 0)
00028 #define is_set(val) ((strcmp(val,"NULL") != 0) && (strcmp(val,"null") != 0) ? 1 : 0)
00029 #define is_unset(val) ((strcmp(val,"NULL") == 0) || (strcmp(val,"null") == 0) ? 1 : 0)
00030 
00031 #define RD_varlist(strg,nbargs) va_list vlist; va_start(vlist); \
00032 nbargs = 0; strg[nbargs] = (char *)va_arg(vlist,char *); \
00033 while (strg[nbargs] != (char *)NULL) { nbargs++; \
00034 strg[nbargs] = (char *)va_arg(vlist, char *);} \
00035 va_end(vlist);

Generated on Tue Jul 1 17:35:46 2003 for IFU_C_iolibs by doxygen1.3