home *** CD-ROM | disk | FTP | other *** search
/ Oakland CPM Archive / oakcpm.iso / sigm / vol118 / junk.c < prev    next >
Encoding:
C/C++ Source or Header  |  1984-04-29  |  350 b   |  27 lines

  1. #include "a:stdio.h"
  2. #include "xlisp.h"
  3.  
  4. int getch(fp)
  5.   FILE *fp;
  6. {
  7.     int ch;
  8.  
  9.     if ((ch = agetc(fp)) == '\032')
  10.         return (EOF);
  11.     else
  12.         return (ch);
  13. }
  14.  
  15. char *calloc(n,size)
  16.   unsigned n,size;
  17. {
  18.     char *str;
  19.     unsigned nsize,i;
  20.  
  21.     if ((str = malloc(nsize = n * size)) == NULL)
  22.         return (NULL);
  23.     for (i = 0; i < nsize; i++)
  24.         str[i] = 0;
  25.     return (str);
  26. }
  27.