LLC2_API
Defines
local.h File Reference
#include <string.h>

Go to the source code of this file.

Defines

#define pgm_getchar   getchar
#define _LOCAL_H_
#define STREQ(s1, s2)   (strcmp( s1, s2 ) == 0)
#define STREQN(s1, s2, n)   (strncmp( s1, s2, n ) == 0)
#define STREQNL(s1, s2)   (strncmp( s1, s2, strlen(s2) ) == 0)
#define IN_RANGE(xx, ll, rr)   ((xx)>=(ll)&&(xx)<=(rr))
#define CLAMP(xx, ll, rr)   ((xx) = (xx)<(ll)? (ll): (xx)>(rr)? (rr): (xx))
#define SWAP(aa, bb, tt)   ( tt = aa, aa = bb, bb = tt )
#define MAX(aa, bb)   ((aa)>=(bb)?(aa):(bb))
#define MIN(aa, bb)   ((aa)<=(bb)?(aa):(bb))
#define ABS(aa)   ((aa)>=0?(aa):-(aa))
#define SQR(aa)   ((aa)*(aa))
#define SIGN(aa)   ((aa)>=0? 1: -1)
#define OK   0
#define ERR   -1
#define FALSE   0
#define TRUE   1
#define ON   1
#define OFF   0
#define PDEBUG(fmt, args...)   fprintf(stderr, fmt, ## args)
#define PDEBUGG(fmt, args...)
#define KB   0x400
#define MB   0x100000
#define ASSERT(cond)
#define WORKTODO   (-1)

Define Documentation

#define _LOCAL_H_

Definition at line 266 of file local.h.

#define ABS (   aa)    ((aa)>=0?(aa):-(aa))

Definition at line 319 of file local.h.

#define ASSERT (   cond)
Value:
if ( !(cond) ){ \
                fprintf( stderr, "ASSERTION: %s %d",__FILE__,__LINE__ );\
                exit( 1 );\
            }

Definition at line 394 of file local.h.

#define CLAMP (   xx,
  ll,
  rr 
)    ((xx) = (xx)<(ll)? (ll): (xx)>(rr)? (rr): (xx))

Definition at line 312 of file local.h.

#define ERR   -1

Definition at line 332 of file local.h.

#define FALSE   0
#define IN_RANGE (   xx,
  ll,
  rr 
)    ((xx)>=(ll)&&(xx)<=(rr))
#define KB   0x400

Definition at line 374 of file local.h.

#define MAX (   aa,
  bb 
)    ((aa)>=(bb)?(aa):(bb))

Definition at line 315 of file local.h.

#define MB   0x100000

Definition at line 375 of file local.h.

#define MIN (   aa,
  bb 
)    ((aa)<=(bb)?(aa):(bb))

Definition at line 316 of file local.h.

#define OFF   0

Definition at line 344 of file local.h.

#define OK   0

Definition at line 329 of file local.h.

#define ON   1

Definition at line 341 of file local.h.

#define PDEBUG (   fmt,
  args... 
)    fprintf(stderr, fmt, ## args)

Definition at line 360 of file local.h.

#define PDEBUGG (   fmt,
  args... 
)

Definition at line 367 of file local.h.

#define pgm_getchar   getchar

Definition at line 1 of file local.h.

#define SIGN (   aa)    ((aa)>=0? 1: -1)

Definition at line 321 of file local.h.

#define SQR (   aa)    ((aa)*(aa))

Definition at line 320 of file local.h.

#define STREQ (   s1,
  s2 
)    (strcmp( s1, s2 ) == 0)

Definition at line 302 of file local.h.

#define STREQN (   s1,
  s2,
 
)    (strncmp( s1, s2, n ) == 0)

Definition at line 303 of file local.h.

#define STREQNL (   s1,
  s2 
)    (strncmp( s1, s2, strlen(s2) ) == 0)

Definition at line 304 of file local.h.

#define SWAP (   aa,
  bb,
  tt 
)    ( tt = aa, aa = bb, bb = tt )

Definition at line 313 of file local.h.

#define TRUE   1
#define WORKTODO   (-1)

Definition at line 404 of file local.h.