TwiceAsNice  2019-02-18
Macros
macros.h File Reference
#include <stdlib.h>
Include dependency graph for macros.h:
This graph shows which files directly or indirectly include this file:

Macros

#define SWAP(t, x, y)
 
#define NEW(p, type)
 
#define FREE(p)
 
#define ADD(head, p)
 
#define DELETE(head, p)
 

Macro Definition Documentation

◆ ADD

#define ADD (   head,
  p 
)
Value:
if (head) \
{ \
p->next = head; \
p->prev = head->prev; \
head->prev = p; \
p->prev->next = p; \
} \
else \
{ \
head = p; \
head->next = head->prev = p; \
}
float p[4]
Definition: PupilTestApp.cc:84

◆ DELETE

#define DELETE (   head,
  p 
)
Value:
if (head) \
{ \
if (head == head->next) \
head = NULL; \
else if (p == head) \
head = head->next; \
p->next->prev = p->prev; \
p->prev->next = p->next; \
FREE(p); \
}
#define NULL
Definition: PciTypes.h:160
float p[4]
Definition: PupilTestApp.cc:84

◆ FREE

#define FREE (   p)
Value:
if (p) \
{ \
free((char *)p); \
p = NULL; \
}
#define NULL
Definition: PciTypes.h:160
float p[4]
Definition: PupilTestApp.cc:84

◆ NEW

#define NEW (   p,
  type 
)
Value:
if ((p = (type *)malloc(sizeof(type))) == NULL) \
{ \
printf("Out of Memory!\n"); \
exit(0); \
}
#define NULL
Definition: PciTypes.h:160
float p[4]
Definition: PupilTestApp.cc:84
__le16 type
Definition: pwc-ioctl.h:253

◆ SWAP

#define SWAP (   t,
  x,
 
)
Value:
{ \
t = x; \
x = y; \
y = t; \
}
t
Definition: hs01.m:4
int y
Definition: lutinvert.py:13
x
Definition: meteoRRD_updater.py:125