#ifdef ournix #include "ournix.h" #endif #include /* maybe #include "nroff.h" should be added here? jhs 89 08 21 */ char * mymalloc(size, clear) register int size; { register char *q, *p; char *malloc(); if(size & 1) size++; p = malloc(size); if(p == 0){ fprintf(stderr, "Out of memory\n"); exit(1); } if(clear) for(q = p ; size ; size--) *q++ = 0; return(p); } myfree(ptr) char *ptr; { if(ptr == 0){ fprintf(stderr, "Freeing null pointer\n"); exit(1); } free(ptr); }