suitcase

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

typeallocdefs.h (920B)


      1 #ifndef TypeAlloc_DEFS_H
      2 #define TypeAlloc_DEFS_H
      3 /* de https://github.com/notqmail/notqmail */
      4 
      5 //#include "alloc.h"
      6 //#include "error.h"
      7 // needed from qmail
      8 
      9 #include "oflops.h"
     10 // unclear
     11 
     12 #define TypeAlloc_readyplus(ta,type,field,len,a,base,ta_rplus) \
     13 int ta_rplus(ta *x, size_t n);
     14 
     15 /* this needs a TypeAlloc_readyplus call before as it reuses the internal helper
     16  * function. */
     17 #define TypeAlloc_ready(ta,type,field,len,a,base,ta_ready) \
     18 int ta_ready(ta *x, size_t n);
     19 
     20 #define TypeAlloc_append(ta,type,field,len,a,base,ta_rplus,ta_append) \
     21 int ta_append(ta *x, type i);
     22 
     23 #define TypeAlloc_appendentries(ta,type,field,len,a,base,ta_rplus,ta_cat) \
     24 int ta_cat(ta *x, type *i, size_t n);
     25 
     26 // example usage -> ta_copy(saa, saa);
     27 #define TypeAlloc_copy(ta,type,field,len,a,base,ta_ready,ta_copy) \
     28 int ta_copy(ta *x, ta *y);
     29 
     30 #define TypeAlloc_free(ta,type,field,len,a,base,ta_free) \
     31 int ta_free(ta *x);
     32 
     33 #endif