home *** CD-ROM | disk | FTP | other *** search
/ High Voltage Shareware / high1.zip / high1 / DIR8 / TDE32.ZIP / CRITERR.H < prev    next >
C/C++ Source or Header  |  1993-11-13  |  12KB  |  401 lines

  1. /*
  2.  * Most of this info is regurgitated stuff from IBM and Microsoft Technical
  3.  * Reference manuals and the Microsoft Knowledge Base.  The error messages
  4.  * are copyright by either Microsoft or IBM.
  5.  *
  6.  * See:
  7.  *
  8.  *   Microsoft Corporation, _Programmer's Reference Manual_, 1986,
  9.  *    Redmond, Washingtion, Document No. 410630014-320-003-1285,
  10.  *    pp. 1-20 thru 1-21, 1-37 thru 1-38, 1-216 thru 1-218.
  11.  *
  12.  *   IBM Corporation, _Disk Operating System: Technical Reference_, 1985,
  13.  *    Boca Raton, Florida, pp. 6-14 thru 6-21, 6-38 thru 6-44.
  14.  *
  15.  *   Microsoft Knowledge Base, "Extended Error Code Information",
  16.  *    Microsoft Corporation, Redmond, Wash., 1992, Document Number: Q74463,
  17.  *    Publication Date:  March 24, 1993.
  18.  *
  19.  *
  20.  * New editor name:  TDE, the Thomson-Davis Editor.
  21.  * Author:           Frank Davis
  22.  * Date:             April 1, 1992
  23.  *
  24.  * This program is released into the public domain, Frank Davis.
  25.  *   You may distribute it freely.
  26.  */
  27.  
  28.  
  29. #if defined( __UNIX__ )
  30.  
  31. /*
  32.  **********************************************************************
  33.  ******************************  PART 1  ******************************
  34.  **********************************************************************
  35.  *
  36.  * Let's try to make unix have the look and feel of a PC.
  37.  */
  38.  
  39. char *criterr_screen[] = {
  40. "┌───────────────────────────────────────────────────────────────────┐",
  41. "│                  tde critical error handler                       │",
  42. "│                                                                   │",
  43. "│        Signal:                                                    │",
  44. "│         info1:                                                    │",
  45. "│         info2:                                                    │",
  46. "│         info3:                                                    │",
  47. "│   Error Class:                                                    │",
  48. "│         Locus:                                                    │",
  49. "│   Device Type:                                                    │",
  50. "│   Device Name:                                                    │",
  51. "│                                                                   │",
  52. "│            Please enter action:  (Q)uit or (R)etry?               │",
  53. "│               (ONLY AS A LAST RESORT -- (A)bort)                  │",
  54. "└───────────────────────────────────────────────────────────────────┘",
  55. NULL
  56. };
  57.  
  58. char *sigabrt_1  = "SIGABRT";
  59. char *sigabrt_2  = "abort( ) generates this signal";
  60. char *sigabrt_3  = "possible error in TDE";
  61.  
  62.  
  63. char *sigalrm_1  = "SIGALRM";
  64. char *sigalrm_2  = "this signal is generated by a timer";
  65.  
  66.  
  67. char *sigchld_1  = "SIGCHLD";
  68. char *sigchld_2  = "child process died";
  69. char *sigchld_3  = "continue with editor";
  70. char *sigchld_4  = "job control signal";
  71.  
  72.  
  73. char *sigcont_1  = "SIGCONT";
  74. char *sigcont_2  = "continue a stopped process";
  75. char *sigcont_3  = "redraw the screen and continue";
  76. char *sigcont_4  = "job control signal";
  77.  
  78.  
  79. char *sigfpe_1   = "SIGFPE";
  80. char *sigfpe_2   = "arithmetic exception, divide by 0, domain error...";
  81. char *sigfpe_3   = "no floats are used in TDE.";
  82.  
  83.  
  84. char *sighup_1   = "SIGHUP";
  85. char *sighup_2   = "controlling terminal was disconnected";
  86. char *sighup_3   = "terminate TDE";
  87.  
  88.  
  89. char *sigill_1   = "SIGILL";
  90. char *sigill_2   = "illegal hardware instruction";
  91. char *sigill_3   = "possible error in TDE";
  92.  
  93.  
  94. char *sigint_1   = "SIGINT";
  95. char *sigint_2   = "interrupt character";
  96. char *sigint_3   = "halting editor functions in progress";
  97.  
  98.  
  99. char *sigio_1    = "SIGIO";
  100. char *sigio_2    = "terminal or network event";
  101. char *sigio_3    = "TDE is not sure how to handle this signal";
  102.  
  103.  
  104. char *sigiot_1   = "SIGIOT";
  105. char *sigiot_2   = "input/output Trap";
  106. char *sigiot_3   = "hardware error not the fault of TDE";
  107.  
  108.  
  109. char *sigkill_1  = "SIGKILL";
  110. char *sigkill_2  = "unknown process sent a kill signal to TDE";
  111. char *sigkill_3  = "response is unknown ";
  112.  
  113.  
  114. char *sigpipe_1  = "SIGPIPE";
  115. char *sigpipe_2  = "write to a pipe with no reader";
  116. char *sigpipe_3  = "need to stop the write";
  117.  
  118.  
  119. char *sigpoll_1  = "SIGPOLL";
  120. char *sigpoll_2  = "poll event caught";
  121.  
  122.  
  123. char *sigpwr_1   = "SIGPWR";
  124. char *sigpwr_2   = "power failure, save work before battery runs down";
  125. char *sigpwr_3   = "F2 saves, F3 Quits, and F4 saves and quits";
  126.  
  127.  
  128. char *sigquit_1  = "SIGQUIT";
  129. char *sigquit_2  = "terminal quit key pressed";
  130. char *sigquit_3  = "F3 is the TDE quit key";
  131.  
  132.  
  133. char *sigsegv_1  = "SIGSEGV";
  134. char *sigsegv_2  = "segment violation";
  135. char *sigsegv_3  = "invalid memory reference - call Frank Davis";
  136.  
  137.  
  138. char *sigstop_1  = "SIGSTOP";
  139. char *sigstop_2  = "job control signal";
  140. char *sigstop_3  = "TDE should not be able to catch SIGSTOP";
  141.  
  142.  
  143. char *sigterm_1  = "SIGTERM";
  144. char *sigterm_2  = "some process wants to terminate TDE";
  145. char *sigterm_3  = "F2 saves, F3 quits, and F4 quits and saves";
  146.  
  147.  
  148. char *sigtrap_1  = "SIGTRAP";
  149. char *sigtrap_2  = "hardware fault";
  150. char *sigtrap_3  = "not fault of TDE";
  151.  
  152.  
  153. char *sigtstp_1  = "SIGTSTP";
  154. char *sigtstp_2  = "terminal stop character, job control signal";
  155. char *sigtstp_3  = "F3 quits TDE";
  156.  
  157.  
  158. char *sigttin_1  = "SIGTTIN";
  159. char *sigttin_2  = "background process read";
  160. char *sigttin_3  = "F3 quits TDE";
  161.  
  162.  
  163. char *sigttou_1  = "SIGTTOU";
  164. char *sigttou_2  = "background process write";
  165. char *sigttou_3  = "F3 quits TDE";
  166.  
  167.  
  168. char *sigurg_1   = "SIGURG";
  169. char *sigurg_2   = "urgent condition";
  170. char *sigurg_3   = "network error";
  171.  
  172.  
  173. char *sigusr1_1  = "SIGUSR1";
  174. char *sigusr1_2  = "user signal 1 received";
  175. char *sigusr1_3  = "unknown origin or action";
  176.  
  177.  
  178. char *sigusr2_1  = "SIGUSR2";
  179. char *sigusr2_2  = "user signal 2 received";
  180. char *sigusr2_3  = "unknown origin or action";
  181.  
  182.  
  183. char *sigvtalrm_1 = "SIGVTALRM";
  184. char *sigvtalrm_2 = "virtual timer alarm";
  185.  
  186.  
  187. char *sigwinch_1 = "SIGWINCH";
  188. char *sigwinch_2 = "window size change detected";
  189. char *sigwinch_3 = "F3 quits TDE";
  190.  
  191.  
  192. char *sigxcpu_1  = "SIGXCPU";
  193. char *sigxcpu_2  = "process exceeded CPU time limit";
  194. char *sigxcpu_3  = "F3 quits TDE, F4 saves work";
  195.  
  196.  
  197. char *sigxfsz_1  = "SIGXFSZ";
  198. char *sigxfsz_2  = "process exceeded file size limit";
  199. char *sigxfsz_3  = "F3 quits TDE, F4 saves work";
  200.  
  201.  
  202.  
  203. #else
  204.  
  205. /*
  206.  **********************************************************************
  207.  ******************************  PART 2  ******************************
  208.  **********************************************************************
  209.  *
  210.  * DOS critical error handler.
  211.  */
  212.  
  213.  
  214. char *criterr_screen[] = {
  215. "┌───────────────────────────────────────────────────────────────────┐",
  216. "│                  tde critical error handler                       │",
  217. "│                                                                   │",
  218. "│    Error code:                                                    │",
  219. "│     Operation:                                                    │",
  220. "│         Drive:                                                    │",
  221. "│ Extended Code:                                                    │",
  222. "│   Error Class:                                                    │",
  223. "│         Locus:                                                    │",
  224. "│   Device Type:                                                    │",
  225. "│   Device Name:                                                    │",
  226. "│                                                                   │",
  227. "│            Please enter action:  (Q)uit or (R)etry?               │",
  228. "│               (ONLY AS A LAST RESORT -- (A)bort)                  │",
  229. "└───────────────────────────────────────────────────────────────────┘",
  230. NULL
  231. };
  232.  
  233. /*
  234.  * codes from register di
  235.  */
  236. char *error_code[] = {
  237.    "Attempt to write on write-protected disk",    /* 0 */
  238.    "Unknown unit",
  239.    "Drive not ready",
  240.    "Unknown command",
  241.    "Data error (CRC)",
  242.    "Bad drive request structure length",          /* 5 */
  243.    "Seek error",
  244.    "Unknown media type",
  245.    "Sector not found",
  246.    "Printer out of paper",
  247.    "Write fault",                                 /* 10 */
  248.    "Read fault",
  249.    "General failure"
  250. };
  251.  
  252.  
  253. /*
  254.  * from bit 0 of ah
  255.  */
  256. char *operation[] = {
  257.    "Read",
  258.    "Write"
  259. };
  260.  
  261.  
  262. /*
  263.  * extended error, error class, register bh.
  264.  */
  265. char *error_class[] = {
  266.    "Unknown",
  267.    "Out of Resource:  space, channels, etc...",         /* 1 */
  268.    "Temporary Situation:  expected to end",
  269.    "Authorization: permission problem",
  270.    "Internal: error in system software",
  271.    "Hardware Failure:  not the fault of tde",           /* 5 */
  272.    "System Failure:  system software",
  273.    "Application Program Error",
  274.    "Not Found:  file/item not found",
  275.    "Bad Format:  invalid format, type",
  276.    "Locked:  file/item locked",                         /* 10 */
  277.    "Media:  wrong disk, bad spot, etc...",
  278.    "Already Exists:  collision with existing",
  279.    "Unknown"
  280. };
  281.  
  282.  
  283. /*
  284.  * extended error, locus, register ch
  285.  */
  286. char *locus[] = {
  287.    "Unknown",
  288.    "Unknown",
  289.    "Block Device (disk or disk emulator)",
  290.    "Network",
  291.    "Serial Device:  keyboard, printer, plotter, modem",
  292.    "Memory:  random access memory"
  293. };
  294.  
  295.  
  296. /*
  297.  * bit 7 of ah and device header when needed.
  298.  */
  299. char *device_type[] = {
  300.    "Block",
  301.    "Character"
  302. };
  303.  
  304.  
  305. /*
  306.  * In int24.asm, check for errors greater than 88.  Set any extended error
  307.  *   code above 88 to 0.
  308.  */
  309. char *ext_err[] = {
  310.    "Frank has no idea what this error is",              /* 0 */
  311.    "Function number invalid",
  312.    "File not found",
  313.    "Path not found",
  314.    "Too many open files (no handles left)",
  315.    "Access denied",
  316.    "Handle invalid",
  317.    "Memory control blocks destroyed",
  318.    "Insufficient memory",
  319.    "Memory block address invalid",
  320.    "Environment invalid",                               /* 10 */
  321.    "Format invalid",
  322.    "Access code invalid",
  323.    "Data invalid",
  324.    "Unknown unit",
  325.    "Invalid drive was specified",
  326.    "Attempt to remove current directory",
  327.    "Not same device",
  328.    "No more files",
  329.    "Attempt to write on write-protected disk",
  330.    "Unknown unit",                                      /* 20 */
  331.    "Drive not ready",
  332.    "Unknown command",
  333.    "Data error (CRC)",
  334.    "Bad request structure length",
  335.    "Seek error",
  336.    "Unknown media type",
  337.    "Sector not found",
  338.    "Printer out of paper",
  339.    "Write fault",
  340.    "Read fault",                                        /* 30 */
  341.    "General failure",
  342.    "Sharing violation",
  343.    "File-lock voilation",
  344.    "Invalid disk change",
  345.    "FCB unavailable",
  346.    "Sharing buffer overflow",
  347.    "37",
  348.    "38",
  349.    "39",
  350.    "40",
  351.    "41",
  352.    "42",
  353.    "43",
  354.    "44",
  355.    "45",
  356.    "46",
  357.    "47",
  358.    "48",
  359.    "49",
  360.    "Unsupported network request",
  361.    "Remote machine not listening",
  362.    "Duplicate name on network",
  363.    "Network name not found",
  364.    "Network busy",
  365.    "Device no longer exists on network",
  366.    "NetBIOS command limit exceeded",
  367.    "Network adapter hardware failure",
  368.    "Incorrect response from network",
  369.    "Unexpected network error",
  370.    "Incompatible remote adapter",                       /* 60 */
  371.    "Print queue full",
  372.    "Not enough room for print file",
  373.    "Print file was deleted",
  374.    "Network name deleted",
  375.    "Network access denied",
  376.    "Incorrect network device type",
  377.    "Network name not found",
  378.    "Network name limit exceeded",
  379.    "Net BIOS session limit exceeded",
  380.    "Temporarily paused",                                /* 70 */
  381.    "Network request not accepted",
  382.    "Print or disk redirection is paused",
  383.    "73",
  384.    "74",
  385.    "75",
  386.    "76",
  387.    "77",
  388.    "78",
  389.    "79",
  390.    "File already exists",                               /* 80 */
  391.    "Reserved",
  392.    "Cannot make directory entry",
  393.    "Fail on INT 24",
  394.    "Too many redirections",
  395.    "Duplicate redirection",
  396.    "Invalid password",
  397.    "Invalid parameter",
  398.    "Network device fault"                               /* 88 */
  399. };
  400. #endif
  401.