home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / enterprs / cpm / utils / s / smc21lib.lzh / AVAIL.C < prev    next >
Encoding:
C/C++ Source or Header  |  1993-03-25  |  384 b   |  17 lines

  1.  
  2. #define NOCCARGC
  3. extern char *_memptr;
  4. /*
  5. ** Return the number of bytes of available memory and if abort,
  6. ** abort with S if there aren't any
  7. */
  8. avail(abort) int abort; {
  9.   char x;
  10.   if(&x < _memptr) {
  11.     if(abort) exit ('M');
  12.     return (0);
  13.     }
  14.   return (&x - _memptr);
  15.   }
  16.  
  17.