Main Page   Modules   Data Structures   File List   Data Fields   Globals  

incl/macro.h File Reference

General definitions for usual functions. More...

#include <math.h>
#include <strings.h>

Go to the source code of this file.

Defines

#define CRAD   (M_PI/180.)
#define MAX(x, y)   ((x) >= (y) ? (x) : (y))
#define MIN(x, y)   ((x) <= (y) ? (x) : (y))
#define ABS(x)   ((x) < 0 ? (-(x)) : (x))
#define NINT(x)   ((x) < 0 ? ((long)(x-0.5)) : ((long)(x+0.5)))
#define SQ(x)   ((x) * (x))
#define is_num(car)   (('0' <= car && car <= '9') ? 1 : 0)
#define is_alphanum(car)   (('0' >= car || car >= '9') ? 1 : 0)
#define is_true(val)   (strcmp(val,"true") == 0 ? 1 : 0)
#define is_false(val)   (strcmp(val,"false") == 0 ? 1 : 0)
#define is_set(val)   ((strcmp(val,"NULL") != 0) && (strcmp(val,"null") != 0) ? 1 : 0)
#define is_unset(val)   ((strcmp(val,"NULL") == 0) || (strcmp(val,"null") == 0) ? 1 : 0)
#define RD_varlist(strg, nbargs)


Detailed Description

General definitions for usual functions.

Author:
various
Version:
4.0 1992-Month-Day : Creation
Copyright:
(c) 1992 Observatoire de Lyon - St Genis Laval (FRANCE)

Definition in file macro.h.


Define Documentation

#define CRAD   (M_PI/180.)
 

Definition at line 14 of file macro.h.

#define MAX x,
 )     ((x) >= (y) ? (x) : (y))
 

Definition at line 16 of file macro.h.

Referenced by create_table(), and inter_spec().

#define MIN x,
 )     ((x) <= (y) ? (x) : (y))
 

Definition at line 17 of file macro.h.

Referenced by delete_desc(), get_descr_type(), inter_spec(), and Read_one_desc().

#define ABS  )     ((x) < 0 ? (-(x)) : (x))
 

Definition at line 18 of file macro.h.

#define NINT  )     ((x) < 0 ? ((long)(x-0.5)) : ((long)(x+0.5)))
 

Definition at line 20 of file macro.h.

Referenced by trunc_double().

#define SQ  )     ((x) * (x))
 

Definition at line 21 of file macro.h.

#define is_num car   )     (('0' <= car && car <= '9') ? 1 : 0)
 

Definition at line 23 of file macro.h.

Referenced by set_arglist().

#define is_alphanum car   )     (('0' >= car || car >= '9') ? 1 : 0)
 

Definition at line 24 of file macro.h.

#define is_true val   )     (strcmp(val,"true") == 0 ? 1 : 0)
 

Definition at line 26 of file macro.h.

#define is_false val   )     (strcmp(val,"false") == 0 ? 1 : 0)
 

Definition at line 27 of file macro.h.

#define is_set val   )     ((strcmp(val,"NULL") != 0) && (strcmp(val,"null") != 0) ? 1 : 0)
 

Definition at line 28 of file macro.h.

#define is_unset val   )     ((strcmp(val,"NULL") == 0) || (strcmp(val,"null") == 0) ? 1 : 0)
 

Definition at line 29 of file macro.h.

#define RD_varlist strg,
nbargs   ) 
 

Value:

va_list vlist; va_start(vlist); \
nbargs = 0; strg[nbargs] = (char *)va_arg(vlist,char *); \
while (strg[nbargs] != (char *)NULL) { nbargs++; \
strg[nbargs] = (char *)va_arg(vlist, char *);} \
va_end(vlist);

Definition at line 31 of file macro.h.


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