home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_400 / 406_01 / disked25 / source / error.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-01-13  |  1.3 KB  |  46 lines

  1. /***
  2. *error.h - definitions/declarations for errno/perror() like error handling
  3. *
  4. *Copyright (c) 1991-1994, Gregg Jennings.  All wrongs reserved.
  5. *   P O Box 200, Falmouth, MA 02541-0200
  6. *
  7. *Purpose:
  8. *   MS(tm)-DOS Disk EDitor.
  9. *
  10. *Notice:
  11. *   This progam may be freely used and distributed.  Any distrubution
  12. *   with modifications must retain the above copyright statement and
  13. *   modifications noted.
  14. *   No pulp-publication, in whole or in part, permitted without
  15. *   permission (magazines or books).
  16. *******************************************************************************/
  17.  
  18. extern void printerror(int ext);
  19.  
  20. /* errno-like error information */
  21.  
  22. struct error_t {
  23.    const char *mod;                 /* module name */
  24.    const char *func;                /* function name */
  25.    const char *msg;                 /* error message */
  26.    const char *arg;                 /* error argument */
  27.    int  num;                        /* error number */
  28. };
  29.  
  30. extern struct error_t error;
  31. extern const char *err_msg[];       /* can change pointer but not object */
  32.  
  33. /* global (or shared) error conditions */
  34.  
  35. enum ERROR_MSG {
  36.    REQ_DOS_3,                       /* files.c */
  37.    NO_MEM,
  38.    FAT_PHASE,
  39.    INV_CLUS,
  40.    INV_ST_CLUS,
  41.    NUM_FILES,
  42.    ALLOC_ZERO,                      /* alloc.c */
  43.    FREE_NULL,
  44.    HEAP_ERROR,
  45. };
  46.