s/qmail  3.3.23
Next generation secure email transport
Macros
gen_allocdefs.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define GEN_ALLOC_ready(ta, type, field, len, a, i, n, x, base, ta_ready)
 
#define GEN_ALLOC_readyplus(ta, type, field, len, a, i, n, x, base, ta_rplus)
 
#define GEN_ALLOC_append(ta, type, field, len, a, i, n, x, base, ta_rplus, ta_append)
 

Macro Definition Documentation

◆ GEN_ALLOC_append

#define GEN_ALLOC_append (   ta,
  type,
  field,
  len,
  a,
  i,
  n,
  x,
  base,
  ta_rplus,
  ta_append 
)
Value:
int ta_append(x,i) register ta *x; register type *i; \
{ if (!ta_rplus(x,1)) return 0; x->field[x->len++] = *i; return 1; }
unsigned i
Definition: matchup.c:36
unsigned x
Definition: matchup.c:36

Definition at line 30 of file gen_allocdefs.h.

◆ GEN_ALLOC_ready

#define GEN_ALLOC_ready (   ta,
  type,
  field,
  len,
  a,
  i,
  n,
  x,
  base,
  ta_ready 
)
Value:
int ta_ready(x,n) register ta *x; register unsigned int n; \
{ register unsigned int i; \
if (x->field) { \
i = x->a; \
if (n > i) { \
x->a = base + n + (n >> 3); \
if (alloc_re(&x->field,i * sizeof(type),x->a * sizeof(type))) return 1; \
x->a = i; return 0; } \
return 1; } \
x->len = 0; \
return !!(x->field = (type *) alloc((x->a = n) * sizeof(type))); }
char * alloc(unsigned int n)
Definition: alloc.c:16
unsigned i
Definition: matchup.c:36
unsigned x
Definition: matchup.c:36
unsigned n
Definition: matchup.c:36
int alloc_re(char **, unsigned int, unsigned int)
Definition: alloc_re.c:4

Definition at line 4 of file gen_allocdefs.h.

◆ GEN_ALLOC_readyplus

#define GEN_ALLOC_readyplus (   ta,
  type,
  field,
  len,
  a,
  i,
  n,
  x,
  base,
  ta_rplus 
)
Value:
int ta_rplus(x,n) register ta *x; register unsigned int n; \
{ register unsigned int i; \
if (x->field) { \
i = x->a; n += x->len; \
if (n > i) { \
x->a = base + n + (n >> 3); \
if (alloc_re(&x->field,i * sizeof(type),x->a * sizeof(type))) return 1; \
x->a = i; return 0; } \
return 1; } \
x->len = 0; \
return !!(x->field = (type *) alloc((x->a = n) * sizeof(type))); }
char * alloc(unsigned int n)
Definition: alloc.c:16
unsigned i
Definition: matchup.c:36
unsigned x
Definition: matchup.c:36
unsigned n
Definition: matchup.c:36
int alloc_re(char **, unsigned int, unsigned int)
Definition: alloc_re.c:4

Definition at line 17 of file gen_allocdefs.h.