Main Page | Class Hierarchy | Class List | Directories | File List | Class Members | File Members

macros.h File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define NOT(v)   (!(v))
#define FALSE   0
#define TRUE   NOT(FALSE)
#define NOTUSED(var)   (void) var
#define NEW(t)   (t*)zmalloc(sizeof(t))
#define N_NEW(n, t)   (t*)zmalloc((n)*sizeof(t))
#define GNEW(t)   (t*)gmalloc(sizeof(t))
#define N_GNEW(n, t)   (t*)gmalloc((n)*sizeof(t))
#define ALLOC(size, ptr, type)   (ptr? (type*)grealloc(ptr,(size)*sizeof(type)):(type*)gmalloc((size)*sizeof(type)))
#define RALLOC(size, ptr, type)   ((type*)grealloc(ptr,(size)*sizeof(type)))
#define ZALLOC(size, ptr, type, osize)   (ptr? (type*)zrealloc(ptr,size,sizeof(type),osize):(type*)zmalloc((size)*sizeof(type)))
#define MIN(a, b)   ((a)<(b)?(a):(b))
#define MAX(a, b)   ((a)>(b)?(a):(b))
#define ABS(a)   ((a) >= 0 ? (a) : -(a))
#define MAXINT   ((int)(~(unsigned)0 >> 1))
#define MAXSHORT   (0x7fff)
#define MAXDOUBLE   1.7976931348623157e+308
#define MAXFLOAT   ((float)3.40282347e+38)
#define BETWEEN(a, b, c)   (((a) <= (b)) && ((b) <= (c)))
#define INSIDE(p, b)   (BETWEEN(b.LL.x,p.x,b.UR.x) && BETWEEN(b.LL.y,p.y,b.UR.y))
#define ROUND(f)   ((f>=0)?(int)(f + .5):(int)(f - .5))
#define RADIANS(deg)   ((deg)/180.0 * PI)
#define DEGREES(rad)   ((rad)/PI * 180.0)
#define DIST(x1, y1, x2, y2)   (sqrt(((x1) - (x2))*((x1) - (x2)) + ((y1) - (y2))*((y1) - (y2))))
#define POINTS_PER_INCH   72.0
#define POINTS(f_inch)   (ROUND((f_inch)*POINTS_PER_INCH))
#define PS2INCH(ps)   ((ps)/POINTS_PER_INCH)
#define isPinned(n)   (ND_pinned(n) == P_PIN)
#define hasPos(n)   (ND_pinned(n) > 0)
#define isFixed(n)   (ND_pinned(n) > P_SET)
#define SET_CLUST_NODE(n)   (ND_clustnode(n) = TRUE)
#define IS_CLUST_NODE(n)   (ND_clustnode(n))
#define HAS_CLUST_EDGE(g)   (GD_flags(g) & 1)
#define SET_CLUST_EDGE(g)   (GD_flags(g) |= 1)
#define streq(a, b)   (*(a)==*(b)&&!strcmp(a,b))
#define P2PF(p, pf)   (pf.x = p.x, pf.y = p.y)
#define PF2P(pf, p)   (p.x = ROUND (pf.x), p.y = ROUND (pf.y))
#define XPAD(d)   ((d).x += 4*GAP)
#define YPAD(d)   ((d).y += 2*GAP)
#define PAD(d)   {XPAD(d); YPAD(d);}
#define OTHERDIR(dir)   ((dir == CCW) ? CW : CCW)
#define NEXTSIDE(side, dir)


Define Documentation

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

Definition at line 63 of file macros.h.

#define ALLOC size,
ptr,
type   )     (ptr? (type*)grealloc(ptr,(size)*sizeof(type)):(type*)gmalloc((size)*sizeof(type)))
 

Definition at line 45 of file macros.h.

#define BETWEEN a,
b,
c   )     (((a) <= (b)) && ((b) <= (c)))
 

Definition at line 81 of file macros.h.

#define DEGREES rad   )     ((rad)/PI * 180.0)
 

Definition at line 86 of file macros.h.

#define DIST x1,
y1,
x2,
y2   )     (sqrt(((x1) - (x2))*((x1) - (x2)) + ((y1) - (y2))*((y1) - (y2))))
 

Definition at line 87 of file macros.h.

#define FALSE   0
 

Definition at line 22 of file macros.h.

Referenced by AboutBox::AboutBox(), CommitForm::CommitForm(), Principal::Principal(), and SettingsForm::SettingsForm().

#define GNEW  )     (t*)gmalloc(sizeof(t))
 

Definition at line 43 of file macros.h.

#define HAS_CLUST_EDGE g   )     (GD_flags(g) & 1)
 

Definition at line 98 of file macros.h.

#define hasPos n   )     (ND_pinned(n) > 0)
 

Definition at line 93 of file macros.h.

#define INSIDE p,
b   )     (BETWEEN(b.LL.x,p.x,b.UR.x) && BETWEEN(b.LL.y,p.y,b.UR.y))
 

Definition at line 82 of file macros.h.

#define IS_CLUST_NODE n   )     (ND_clustnode(n))
 

Definition at line 97 of file macros.h.

#define isFixed n   )     (ND_pinned(n) > P_SET)
 

Definition at line 94 of file macros.h.

#define isPinned n   )     (ND_pinned(n) == P_PIN)
 

Definition at line 92 of file macros.h.

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

Definition at line 58 of file macros.h.

#define MAXDOUBLE   1.7976931348623157e+308
 

Definition at line 72 of file macros.h.

#define MAXFLOAT   ((float)3.40282347e+38)
 

Definition at line 75 of file macros.h.

#define MAXINT   ((int)(~(unsigned)0 >> 1))
 

Definition at line 66 of file macros.h.

#define MAXSHORT   (0x7fff)
 

Definition at line 69 of file macros.h.

#define MIN a,
b   )     ((a)<(b)?(a):(b))
 

Definition at line 53 of file macros.h.

#define N_GNEW n,
 )     (t*)gmalloc((n)*sizeof(t))
 

Definition at line 44 of file macros.h.

#define N_NEW n,
 )     (t*)zmalloc((n)*sizeof(t))
 

Definition at line 42 of file macros.h.

#define NEW  )     (t*)zmalloc(sizeof(t))
 

Definition at line 41 of file macros.h.

#define NEXTSIDE side,
dir   ) 
 

Value:

((dir == CCW) ? \
                ((side & 0x8) ? BOTTOM : (side << 1)) : \
                ((side & 0x1) ? LEFT : (side >> 1)))

Definition at line 114 of file macros.h.

#define NOT  )     (!(v))
 

Definition at line 20 of file macros.h.

#define NOTUSED var   )     (void) var
 

Definition at line 29 of file macros.h.

#define OTHERDIR dir   )     ((dir == CCW) ? CW : CCW)
 

Definition at line 112 of file macros.h.

#define P2PF p,
pf   )     (pf.x = p.x, pf.y = p.y)
 

Definition at line 105 of file macros.h.

#define PAD  )     {XPAD(d); YPAD(d);}
 

Definition at line 110 of file macros.h.

#define PF2P pf,
p   )     (p.x = ROUND (pf.x), p.y = ROUND (pf.y))
 

Definition at line 106 of file macros.h.

#define POINTS f_inch   )     (ROUND((f_inch)*POINTS_PER_INCH))
 

Definition at line 89 of file macros.h.

#define POINTS_PER_INCH   72.0
 

Definition at line 88 of file macros.h.

#define PS2INCH ps   )     ((ps)/POINTS_PER_INCH)
 

Definition at line 90 of file macros.h.

#define RADIANS deg   )     ((deg)/180.0 * PI)
 

Definition at line 85 of file macros.h.

#define RALLOC size,
ptr,
type   )     ((type*)grealloc(ptr,(size)*sizeof(type)))
 

Definition at line 46 of file macros.h.

#define ROUND f   )     ((f>=0)?(int)(f + .5):(int)(f - .5))
 

Definition at line 84 of file macros.h.

#define SET_CLUST_EDGE g   )     (GD_flags(g) |= 1)
 

Definition at line 99 of file macros.h.

#define SET_CLUST_NODE n   )     (ND_clustnode(n) = TRUE)
 

Definition at line 96 of file macros.h.

#define streq a,
b   )     (*(a)==*(b)&&!strcmp(a,b))
 

Definition at line 102 of file macros.h.

#define TRUE   NOT(FALSE)
 

Definition at line 25 of file macros.h.

Referenced by AboutBox::AboutBox(), Principal::Principal(), uic_findImage(), and Edge::updateMask().

#define XPAD  )     ((d).x += 4*GAP)
 

Definition at line 108 of file macros.h.

#define YPAD  )     ((d).y += 2*GAP)
 

Definition at line 109 of file macros.h.

#define ZALLOC size,
ptr,
type,
osize   )     (ptr? (type*)zrealloc(ptr,size,sizeof(type),osize):(type*)zmalloc((size)*sizeof(type)))
 

Definition at line 47 of file macros.h.

Untitled Document Pesquisa Psi SourceForge.net Logo