make.allocd 304 B

12345678
  1. sed -e '
  2. s:^.*[ ]ALLOCDEF[ ].*"\(.*\)"[ ]*\([0-9][0-9]*\).*$:\
  3. /* allocation definitions of struct \1 */\
  4. extern char *st_alloc();\
  5. extern struct \1 *h_\1;\
  6. #define new_\1() ((struct \1 *) st_alloc((char **)\&h_\1, sizeof(struct \1), \2))\
  7. #define free_\1(p) st_free(p, \&h_\1, sizeof(struct \1))\
  8. :'