home *** CD-ROM | disk | FTP | other *** search
/ Vectronix 2 / VECTRONIX2.iso / FILES_07 / MARK_WC2.LZH / INCLUDE / ERRNO.H < prev    next >
C/C++ Source or Header  |  1988-04-27  |  3KB  |  75 lines

  1. /*
  2.  * errno.h -- manifest constants for error codes.
  3.  *
  4.  * Copyright (c) 1981-1987, Mark Williams Company, Chicago
  5.  * This file and its contents may not be copied or distributed
  6.  * without permission.
  7.  */
  8.  
  9. #ifndef ERRNO_H
  10. #define ERRNO_H
  11. /*
  12.  * Atari ST error code names begin "AE", to avoid conflict with
  13.  * draft ANSI standard.
  14.  * The names of the positive error codes all begin with 'E'.
  15.  */
  16. /*
  17.  * BIOS-level errors
  18.  */
  19. #define    AE_OK      0L    /* OK, no error */
  20. #define    AERROR     (-1L)    /* Basic, fundamental error */
  21. #define    AEDRVNR     (-2L)    /* Drive not ready */
  22. #define    AEUNCMD     (-3L)    /* Unknown command */
  23. #define    AE_CRC     (-4L)    /* CRC error */
  24. #define    AEBADRQ     (-5L)    /* Bad request */
  25. #define    AE_SEEK     (-6L)    /* Seek error */
  26. #define    AEMEDIA     (-7L)    /* Unknown medium */
  27. #define    AESECNF     (-8L)    /* Sector not found */
  28. #define    AEPAPER     (-9L)    /* No paper */
  29. #define    AEWRITF    (-10L)    /* Write fault */
  30. #define    AEREADF    (-11L)    /* Read fault */
  31. #define    AEGENRL    (-12L)    /* General error */
  32. #define    AEWRPRO    (-13L)    /* Write protect */
  33. #define    AE_CHNG    (-14L)    /* Medium change */
  34. #define    AEUNDEV    (-15L)    /* Unknown device */
  35. #define    AEBADSF    (-16L)    /* Bad sectors on format */
  36. #define    AEOTHER    (-17L)    /* Insert other disk */
  37. /*
  38.  * BDOS-level errors. The trailing number is the equivalent MS-DOS error.
  39.  */
  40. #define    AEINVFN    (-32L)    /* Invalid function number         1 */
  41. #define    AEFILNF    (-33L)    /* File not found             2 */
  42. #define    AEPTHNF    (-34L)    /* Path not found             3 */
  43. #define    AENHNDL    (-35L)    /* Too many open files (no handles left) 4 */
  44. #define    AEACCDN    (-36L)    /* Access denied             5 */
  45. #define    AEIHNDL    (-37L)    /* Invalid handle             6 */
  46. #define    AENSMEM    (-39L)    /* Insufficient memory             8 */
  47. #define AEIMBA    (-40L)    /* Invalid memory block address         9 */
  48. #define    AEDRIVE    (-46L)    /* Invalid drive was specified        15 */
  49. #define AEXDEV    (-48L)    /* Cross device rename (not documented)       */
  50. #define    AENMFIL    (-49L)    /* No more files            18 */
  51. #define    AERANGE    (-64L)    /* Range error, context unknown        33 */
  52. #define    AEINTRN    (-65L)    /* Internal error            34 */
  53. #define AEPLFMT (-66L)    /* Invalid program load format        35 */
  54. #define AEGSBF    (-67L)    /* Setblock failed: growth restrictions    36 */
  55. /*
  56.  * COHERENT system aliases for the negative bios/gemdos error
  57.  * stored in errno:
  58.  */
  59. #define    EMFILE    (-AENHNDL)    /* Too many files, a la COHERENT     */
  60. #define ENOEXEC    (-AEPLFMT)    /* bad exec format, a la COHERENT    */
  61. #define EIO    (-AESECNF)    /* Almost nothing but IO errors        */
  62. #define EINTR    (-AEINVFN)    /* An interrupted exec            */
  63. /*
  64.  * Some necessary error codes, sandwiched into unused space
  65.  */
  66. #define EDOM    31        /* Domain error in libm */
  67. #define ERANGE    30        /* Range error in libm */
  68.  
  69. extern int errno;
  70. extern int sys_nerr;
  71. extern char *sys_errlist[];
  72. #endif
  73.  
  74. /* End of errno.h */
  75.