home *** CD-ROM | disk | FTP | other *** search
/ Power Programmierung 2 / Power-Programmierung CD 2 (Tewi)(1994).iso / c / library / dos / selfchec / blockade / blkade1.c < prev    next >
Encoding:
C/C++ Source or Header  |  1992-03-19  |  2.3 KB  |  47 lines

  1. /* ------------------------------------------------------------------- */
  2. /*              Copyright (C) 1990-91 Indusoft Corp.                   */
  3. /*                     All rights reserved                             */
  4. /*              PO Box  26747  Greenville, SC 29616                    */
  5. /*                                                                     */
  6. /*---------------------------------------------------------------------*/
  7. /*   Contains messages corresponding to the error codes returned       */
  8. /*   by blockade() & calc_crc_file().                                  */
  9. /*                                                                     */
  10. /*   Returns a read only pointer to the appropriate message.           */
  11. /*                                                                     */
  12. /*                                                                     */
  13. /*---------------------------------------------------------------------*/
  14.  
  15. char * get_blk_err_msg(int num)
  16. {
  17.   char *sp;
  18.   static char *blk_err_msgs[] = {
  19.     "No error",                          /*  0  */
  20.     "No memory for buffer",              /*  1  */
  21.     "Error opening file",                /*  2  */
  22.     "No memory for file buffering",
  23.     "File buffering failure",            /*  4  */
  24.     "Fseek error",
  25.     "Error reading data block",          /*  6  */
  26.     "Invalid data block info",
  27.     "Error reading file",                /*  8  */
  28.     "Error reading file",                /*  9  */
  29.     "Error reading file",                /* 10  */
  30.     "Check Value error",                 /* 11  */
  31.     "File size error",                   /* 12  */
  32.     "Invalid error number" };            /* 13  */
  33.  
  34.    if (num == -1) num = 11;
  35.    if (num == -2) num = 12;
  36.    if ((num < 0) || (num > 12))  num = 13;    /* out of range */
  37.    sp = blk_err_msgs[num];
  38.    return(sp);
  39.   }
  40.  
  41. /* ------------------------------------------------------------------- */
  42. /*              Copyright (C) 1990-91 Indusoft Corp.                   */
  43. /*                     All rights reserved                             */
  44. /*              PO Box  26747  Greenville, SC 29616                    */
  45. /*                                                                     */
  46. /*---------------------------------------------------------------------*/
  47.