home *** CD-ROM | disk | FTP | other *** search
/ Magazyn Amiga Shareware Floppies / ma01.dms / ma01.adf / wasp / src / errors.h next >
C/C++ Source or Header  |  1991-12-29  |  4KB  |  174 lines

  1. /* wasp - Copyright 1991 by Steven Reiz
  2.  * see COPYING and wasp.c for further info
  3.  * errors.h, 1/6/91 - 2/6/91, 24/7/91, 8/12/91,
  4.  * 27/12/91 - 30/12/91
  5.  */
  6.  
  7. #ifndef MAIN
  8. extern struct { char *s1, *s2; } e0_s[];
  9. #else
  10. struct {
  11.     char *s1, *s2;
  12. } e0_s[]={
  13.     NULL, NULL,        /* 0 */
  14.     NULL, NULL,        /* 1 */
  15.     "fatal", "error",    /* 2 */
  16.     NULL, "error",        /* 3 */
  17.     NULL, "warning",    /* 4 */
  18.     NULL, NULL        /* 5 */
  19. };
  20. #endif
  21. #define E0_INTERNAL    1 /* should be the first */
  22. #define E0_FATAL    2
  23. #define E0_ERROR    3
  24. #define E0_WARNING    4
  25. #define E0_MESSAGE    5
  26. #define E0_NUM        6
  27.  
  28. #ifndef MAIN
  29. extern char *e1_s[];
  30. #else
  31. char *e1_s[]={
  32.     NULL,            /* 0 */
  33.     "I/O",            /* 1 */
  34.     "GIF",            /* 2 */
  35.     "out of memory",    /* 3 */
  36.     "IFF",            /* 4 */
  37.     "IFF RGB",        /* 5 */
  38.     "Sun RAS",        /* 6 */
  39.     "operation",        /* 7 */
  40. };
  41. #endif
  42. #define E1_IO        1 /* 1 arg: filename */
  43. #define E1_GIF        2
  44. #define E1_NOMEM    3
  45. #define E1_IFF        4
  46. #define E1_IFF_RGB    5
  47. #define E1_RAS        6
  48. #define E1_OPERATION    7
  49. #define E1_NUM        8
  50.  
  51. #ifndef MAIN
  52. extern char *e2_s[];
  53. #else
  54. char *e2_s[]={
  55.     NULL,            /* 0 */
  56.     NULL,            /* 1 */
  57.     "read",            /* 2 */
  58.     "write",        /* 3 */
  59.     "open",            /* 4 */
  60.     "create",        /* 5 */
  61.     "format",        /* 6 */
  62.     "BMHD",            /* 7 */
  63.     "CAMG",            /* 8 */
  64.     "SHAM",            /* 9 */
  65.     "CMAP",            /* 10 */
  66.     "compression",        /* 11 */
  67.     "HAM",            /* 12 */
  68.     "EHB",            /* 13 */
  69.     "BODY",            /* 14 */
  70.     "option",        /* 15 */
  71.     "seek",            /* 16 */
  72. };
  73. #endif
  74. #define E2_UNSPEC    1
  75. #define E2_READ        2
  76. #define E2_WRITE    3
  77. #define E2_OPEN        4
  78. #define E2_CREAT    5
  79. #define E2_FORMAT    6
  80. #define E2_BMHD        7
  81. #define E2_CAMG        8
  82. #define E2_SHAM        9
  83. #define E2_CMAP        10
  84. #define E2_COMPRESSION    11
  85. #define E2_HAM        12
  86. #define E2_EHB        13
  87. #define E2_BODY        14
  88. #define E2_OPTION    15
  89. #define E2_SEEK        16
  90. #define E2_NUM        17
  91.  
  92. #ifndef MAIN
  93. extern char *e3_s[];
  94. #else
  95. char *e3_s[]={
  96.     NULL,                            /* 0 */
  97.     NULL,                            /* 1 */
  98.     "unexpected end of %s",                    /* 2 */
  99.     NULL,                            /* 3 */
  100.     "missing '%c' separator",                /* 4 */
  101.     "only the first image has been processed",        /* 5 */
  102.     "%d instead of %d rows of data have been read",        /* 6 */
  103.     "potential code table overflow",            /* 7 */
  104.     "invalid clipping region",                /* 8 */
  105.     "chunk not found",                    /* 9 */
  106.     "negative group size",                    /* 10 */
  107.     "invalid id",                        /* 11 */
  108.     "parts of group larger than group itself",        /* 12 */
  109.     "wrong chunk size",                    /* 13 */
  110.     "more than one of EHB, HAM and HIRES specified",    /* 14 */
  111.     "unknown %s chunk of %ld bytes",            /* 15 */
  112.     "unknown version (%d)",                    /* 16 */
  113.     "ignoring ILBM masking",                /* 17 */
  114.     "%d entries in the colormap",                /* 18 */
  115.     "%d planes",                        /* 19 */
  116.     "chunk not expected",                    /* 20 */
  117.     "%d entries in colormap, %d planes",            /* 21 */
  118.     "can't handle sliced EHB",                /* 22 */
  119.     "contains %d entries, should contain %d",        /* 23 */
  120.     "crossed row bound while decompressing",        /* 24 */
  121.     "couldn't allocate %d bytes",                /* 25 */
  122.     "specify either asc or an output mode",            /* 26 */
  123.     "specify either nohires or an output mode",        /* 27 */
  124.     "only HAM can be produced with the iterative method",    /* 28 */
  125.     "%s is not an EHB distribution method",            /* 29 */
  126.     "too simple for my enormous intellect",            /* 30 */
  127.     "unknown counting method",                /* 31 */
  128.     "unknown distribution method",                /* 32 */
  129.     "depth larger than 1 not supported",            /* 33 */
  130.     "invalid code table",                    /* 34 */
  131.     "can't seek on stdout, retry to a file",        /* 35 */
  132.     "can't seek on stdin, retry from a file",        /* 36 */
  133.     "invalid enlarge size",                    /* 37 */
  134. };
  135. #endif
  136. #define E3_UNSPEC    1
  137. #define E3_UNEXPEND    2
  138. #define E3_ERRNO    3 /* implicit arg: errno */
  139. #define E3_MISS_SEP    4
  140. #define E3_MULTI_IMG    5
  141. #define E3_WRONG_NR_ROWS 6
  142. #define E3_POT_CODE_OVERFLOW 7
  143. #define E3_CLIP_REGION    8
  144. #define E3_MISS_CHUNK    9
  145. #define E3_NEGGROUPSIZE    10
  146. #define E3_INVALID_ID    11
  147. #define E3_GROUP2SMALL    12
  148. #define E3_WRONGCHUNKSZ    13
  149. #define E3_CAMGMODES    14
  150. #define E3_UNKNOWN_CHUNK 15
  151. #define E3_UNKNOWN_VERSION 16
  152. #define E3_MASKING    17
  153. #define E3_WRONG_NR_CREGS 18
  154. #define E3_WRONG_NR_PLANES 19
  155. #define E3_UNEXP_CHUNK    20
  156. #define E3_CREGS_PLANES    21
  157. #define E3_SLICED_EHB    22
  158. #define E3_NENTRIES    23
  159. #define E3_ROWBOUND    24
  160. #define E3_NOMEM    25
  161. #define E3_ASC        26
  162. #define E3_NOHIRES    27
  163. #define E3_ITMETH    28
  164. #define E3_EHB_METH    29
  165. #define E3_2SIMPLE    30
  166. #define E3_COUNTMETH    31
  167. #define E3_DISTRMETH    32
  168. #define E3_ONLYDEPTH1    33
  169. #define E3_INVALID_CODE_TABLE 34
  170. #define E3_SEEK_STDOUT    35
  171. #define E3_SEEK_STDIN    36
  172. #define E3_ENLARGE_SIZE    37
  173. #define E3_NUM        38
  174.