home *** CD-ROM | disk | FTP | other *** search
/ ftp.barnyard.co.uk / 2015.02.ftp.barnyard.co.uk.tar / ftp.barnyard.co.uk / cpm / walnut-creek-CDROM / CPM / LANGUAGS / XLISP / XLISP11.ARK / JUNK.C < prev    next >
Text File  |  1986-10-12  |  384b  |  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.  ((str