home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga GigaPD 3
/
Amiga_GigaPD_v3_3of3.iso
/
fred_fish
/
fish_601-700_lha
/
fish_648.lha
/
ADDASSIGN
/
ar_defs.h
< prev
next >
Wrap
C/C++ Source or Header
|
1993-06-02
|
1KB
|
40 lines
/*
written by Alexander Rawass
*/
#define IS_ODD(x) ((x%2==0) ? FALSE : TRUE)
#define IS_EVEN(x) ((x%2==0) ? TRUE : FALSE)
#define IS_IN(bitmask,var) (((bitmask & var)==bitmask) ? TRUE : FALSE)
#define EOS '\0'
#define NIL 0
#define LOOP while(TRUE)
#define REPEAT do
#define until(x) while(!(x))
#define STREQU(x,y) (!(strcmp(x,y)))
#define STRNEQU(x,y,z) (!(strncmp(x,y,z)))
#define ABS(x) (x>=0) ? x : (-x)
#define FCLOSEC(fp) { fclose(fp); fp=NULL; }
#define CLOSEC(fhan) { Close(fhan); fhan=NULL; }
#define CLOSELIBRARYC(lib) { CloseLibrary(lib); lib=NULL; }
#define FREEMEMC(mem,size) { FreeMem(mem,size); mem=NULL; }
#define UNLOCKC(lock) { UnLock(lock); lock=NULL; }
#define CLOSEWINDOWC(win) { CloseWindow(win); win=NULL; }
#define DELETEPORTC(port) { DeletePort(port); port=NULL; }
#define DELETESTDIOC(ioreq) { DeleteStdIO(ioreq); ioreq=NULL; }
#define REG register
#define MultiOn() Permit()
#define MultiOff() Forbid()
#define IntOn() Enable()
#define IntOff() Disable()
#define GADSELECTED(gadget) IS_IN(SELECTED,gadget.Flags)
#ifdef AR_USE_ARP
#define printf Printf
#define fprintf FPrintf
#define sprintf SPrintf
#define puts Puts
#define strcmp Strcmp
#define strncmp Strncmp
#endif