home *** CD-ROM | disk | FTP | other *** search
/ C!T ROM 2 / ctrom_ii_b.zip / ctrom_ii_b / PROGRAM / C / SMALL_C / CLIB.DEF < prev    next >
Text File  |  1987-10-04  |  2KB  |  56 lines

  1. /* CLIB.DEF -- Definitions for Small-C library functions
  2. ** Modified for MS-DOS 2 and up.
  3. **
  4. ** Credits:
  5. **    Based on the CP/M version by L.E. Payne and J.E.Hendrix
  6. **
  7. ** Notes:
  8. ** What was Ubdos() is now Umsdos().
  9. **
  10. ** Note that the Function calls are all shifted up by 8 bits
  11. ** since they go into the AH register and we need them
  12. ** that way to begin with.
  13. */
  14.  
  15. /* MAXIMUM files open simultaneously */
  16. #define MAXFILES 10
  17.  
  18. /* EOF character */
  19. #define FILEOF  26
  20.  
  21. /*  MS-DOS function calls */
  22.  
  23. #define MAKFIL  15360  /* Create file */
  24. #define OPNFIL 15616  /* Open file */
  25. #define CLOFIL 15872  /* Close file */
  26. #define RDFIL  16128  /* Read file */
  27. #define WRFIL  16384  /* Write file */
  28. #define POSFIL 16896  /* Position file */
  29. #define DELFIL 16640  /* Delete file */
  30. #define PRTOUT 1280   /* Printer output */
  31.  
  32. #define RDONLY  0     /* Read only file */
  33. #define WRONLY  1     /* Write only file */
  34. #define RACCESS 0     /* READ ACCESS */
  35. #define WACCESS 1     /* WRITE ACCESS */
  36. #define RWACCESS 2    /* READ AND WRITE ACCESS */
  37.  
  38. /* Device codes */
  39. #define CONSOL  1    /* System console */
  40. #define PRINTR  2    /* System printer -- list device */
  41. #define AUXDEV  3    /* Aux. device -- usually serial */
  42.  
  43. /* File status bits */
  44. #define    RDBIT    1    /* Open for read */
  45. #define WRTBIT    2    /* Open for write */
  46. #define EOFBIT    4    /* Eof condition */
  47. #define ERRBIT    8    /* Error condition */
  48.  
  49. /* ASCII characters */
  50. #define    ABORT    3
  51. #define    RUB    8
  52. #define    PAUSE    19
  53. #define    WIPE    24
  54. #define    DEL    127
  55.  
  56.