OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
usrmac.h File Reference
#include "config.h"
#include "wifs_conf.h"
Include dependency graph for usrmac.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define PRIVATE   static
 
#define bool   int
 
#define TRUE   (1)
 
#define FALSE   (0)
 
#define S_FILE_FOUND   -3
 
#define S_FILE_NOT_FOUND   -2
 
#define S_ERROR   -1
 
#define S_SUCCESS   0
 
#define S_END_OF_FILE   1
 
#define NOPRINT   1
 
#define PRINTF   if (!NOPRINT) printf
 
#define FPRINTF   if (!NOPRINT) fprintf
 
#define CHKPRT1(FMT, ARG)   PRINTF("%s="FMT,"ARG",ARG)
 
#define CHKPRT2(FMT, ARG1, ARG2)   PRINTF("%s="FMT,"ARG1,ARG2",ARG1,ARG2)
 
#define CHKIPRT(EX)   PRINTF("%s=%d\n","EX",EX)
 
#define CHKFPRT(EX)   PRINTF("%s=%f\n","EX",EX)
 
#define CHKSPRT(EX)   PRINTF("%s=%s\n","EX",EX)
 
#define MAXV(a, b)   (((a) > (b)) ? (a) : (b))
 
#define MINV(a, b)   (((a) > (b)) ? (b) : (a))
 
#define MODV(a, b)   ((a) - ((a)/(b))*(b))
 
#define AX_PLUS_B(X, A, B)   (A) * (X) + (B)
 
#define R_AX_PLUS_B(Y, A, B)   ((Y) - (B)) / (A)
 
#define INRANGE(v, lo, hi)   (((v - lo) >= 0) && ((hi - v) >= 0))
 
#define ON_TIME()
 
#define OFF_TIME()
 
#define TRACE   trace
 
#define PROTO(x)   ()
 
#define byte   unsigned char
 
#define SC   sizeof(char)
 
#define SB   sizeof(byte)
 
#define SS   sizeof(short int)
 
#define SI   sizeof(int)
 
#define SL   sizeof(int32_t int)
 
#define SF   sizeof(float)
 
#define SD   sizeof(double)
 
#define NODATA
 
#define FAKEDATA
 
#define FAKEDEF
 
#define ISSUE
 
#define OPTIONS_ON   1
 
#define OPTIONS_OFF   0
 
#define OPTIONS   OPTIONS_OFF
 
#define OPTIONS_START()   ; if (OPTIONS) {
 
#define OPTIONS_STOP()   ; }
 
#define MSEC2SEC(x)   ((x + 500)/1000)
 
#define SEC2MSEC(x)   (x * 1000)
 

Macro Definition Documentation

◆ AX_PLUS_B

#define AX_PLUS_B (   X,
  A,
 
)    (A) * (X) + (B)

Definition at line 137 of file usrmac.h.

◆ bool

#define bool   int

Definition at line 88 of file usrmac.h.

◆ byte

#define byte   unsigned char

Definition at line 184 of file usrmac.h.

◆ CHKFPRT

#define CHKFPRT (   EX)    PRINTF("%s=%f\n","EX",EX)

Definition at line 129 of file usrmac.h.

◆ CHKIPRT

#define CHKIPRT (   EX)    PRINTF("%s=%d\n","EX",EX)

Definition at line 128 of file usrmac.h.

◆ CHKPRT1

#define CHKPRT1 (   FMT,
  ARG 
)    PRINTF("%s="FMT,"ARG",ARG)

Definition at line 126 of file usrmac.h.

◆ CHKPRT2

#define CHKPRT2 (   FMT,
  ARG1,
  ARG2 
)    PRINTF("%s="FMT,"ARG1,ARG2",ARG1,ARG2)

Definition at line 127 of file usrmac.h.

◆ CHKSPRT

#define CHKSPRT (   EX)    PRINTF("%s=%s\n","EX",EX)

Definition at line 130 of file usrmac.h.

◆ FAKEDATA

#define FAKEDATA

Definition at line 206 of file usrmac.h.

◆ FAKEDEF

#define FAKEDEF

Definition at line 207 of file usrmac.h.

◆ FALSE

#define FALSE   (0)

Definition at line 94 of file usrmac.h.

◆ FPRINTF

#define FPRINTF   if (!NOPRINT) fprintf

Definition at line 111 of file usrmac.h.

◆ INRANGE

#define INRANGE (   v,
  lo,
  hi 
)    (((v - lo) >= 0) && ((hi - v) >= 0))

Definition at line 139 of file usrmac.h.

◆ ISSUE

#define ISSUE

Definition at line 212 of file usrmac.h.

◆ MAXV

#define MAXV (   a,
  b 
)    (((a) > (b)) ? (a) : (b))

Definition at line 133 of file usrmac.h.

◆ MINV

#define MINV (   a,
  b 
)    (((a) > (b)) ? (b) : (a))

Definition at line 134 of file usrmac.h.

◆ MODV

#define MODV (   a,
  b 
)    ((a) - ((a)/(b))*(b))

Definition at line 135 of file usrmac.h.

◆ MSEC2SEC

#define MSEC2SEC (   x)    ((x + 500)/1000)

Definition at line 233 of file usrmac.h.

◆ NODATA

#define NODATA

Definition at line 205 of file usrmac.h.

◆ NOPRINT

#define NOPRINT   1

Definition at line 109 of file usrmac.h.

◆ OFF_TIME

#define OFF_TIME ( )

Definition at line 163 of file usrmac.h.

◆ ON_TIME

#define ON_TIME ( )

Definition at line 162 of file usrmac.h.

◆ OPTIONS

#define OPTIONS   OPTIONS_OFF

Definition at line 228 of file usrmac.h.

◆ OPTIONS_OFF

#define OPTIONS_OFF   0

Definition at line 226 of file usrmac.h.

◆ OPTIONS_ON

#define OPTIONS_ON   1

Definition at line 225 of file usrmac.h.

◆ OPTIONS_START

#define OPTIONS_START ( )    ; if (OPTIONS) {

Definition at line 230 of file usrmac.h.

◆ OPTIONS_STOP

#define OPTIONS_STOP ( )    ; }

Definition at line 231 of file usrmac.h.

◆ PRINTF

#define PRINTF   if (!NOPRINT) printf

Definition at line 110 of file usrmac.h.

◆ PRIVATE

#define PRIVATE   static

Definition at line 85 of file usrmac.h.

◆ PROTO

#define PROTO (   x)    ()

Definition at line 180 of file usrmac.h.

◆ R_AX_PLUS_B

#define R_AX_PLUS_B (   Y,
  A,
 
)    ((Y) - (B)) / (A)

Definition at line 138 of file usrmac.h.

◆ S_END_OF_FILE

#define S_END_OF_FILE   1

Definition at line 101 of file usrmac.h.

◆ S_ERROR

#define S_ERROR   -1

Definition at line 99 of file usrmac.h.

◆ S_FILE_FOUND

#define S_FILE_FOUND   -3

Definition at line 97 of file usrmac.h.

◆ S_FILE_NOT_FOUND

#define S_FILE_NOT_FOUND   -2

Definition at line 98 of file usrmac.h.

◆ S_SUCCESS

#define S_SUCCESS   0

Definition at line 100 of file usrmac.h.

◆ SB

#define SB   sizeof(byte)

Definition at line 191 of file usrmac.h.

◆ SC

#define SC   sizeof(char)

Definition at line 190 of file usrmac.h.

◆ SD

#define SD   sizeof(double)

Definition at line 196 of file usrmac.h.

◆ SEC2MSEC

#define SEC2MSEC (   x)    (x * 1000)

Definition at line 234 of file usrmac.h.

◆ SF

#define SF   sizeof(float)

Definition at line 195 of file usrmac.h.

◆ SI

#define SI   sizeof(int)

Definition at line 193 of file usrmac.h.

◆ SL

#define SL   sizeof(int32_t int)

Definition at line 194 of file usrmac.h.

◆ SS

#define SS   sizeof(short int)

Definition at line 192 of file usrmac.h.

◆ TRACE

#define TRACE   trace

Definition at line 166 of file usrmac.h.

◆ TRUE

#define TRUE   (1)

Definition at line 91 of file usrmac.h.