home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / ff_disks / 300-399 / ff319.lzh / CNewsSrc / cnews.orig.lzh / libcnews / nemalloc.c < prev    next >
C/C++ Source or Header  |  1989-06-27  |  261b  |  15 lines

  1. #include <stdio.h>
  2. #include <sys/types.h>
  3. #include "libc.h"
  4.  
  5. char *
  6. nemalloc(size)            /* news emalloc - calls errunlock on error */
  7. unsigned size;
  8. {
  9.     register char *result = malloc(size);
  10.  
  11.     if (result == NULL)
  12.         errunlock("out of memory", "");
  13.     return result;
  14. }
  15.