home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / database / softc2.zip / SOFTC.H < prev   
C/C++ Source or Header  |  1990-07-22  |  5KB  |  126 lines

  1. /*************************************************
  2.  **                                             **
  3.  **   softc.h                                   **
  4.  **                                             **
  5.  **       SoftC common library header           **
  6.  **                                             **
  7.  **         Copyright (C) 1988, 1989 by         **
  8.  **               SoftC, Ltd.                   **
  9.  **               16820 3rd St NE               **
  10.  **               Ham Lake, MN 55304            **
  11.  **               (612) 434-6968                **
  12.  **                                             **
  13.  **             All rights reserved.            **
  14.  *************************************************/
  15.  
  16.  
  17.  
  18. /**********
  19.  *
  20.  *  Function Return Codes
  21.  *
  22.  **********/
  23.  
  24.  
  25.  
  26.  
  27. #define SC_MEMWRN     9     /* WARNING - partial memory allocation */
  28. #define SC_NOTBFRD    8     /* WARNING - file I/O not buffered */
  29. #define SC_FILENGTH   7     /* WARNING - file length is incorrect */
  30. #define SC_FLDROUND   6     /* WARNING - numeric field rounded */
  31. #define SC_FLDTRUNC   5     /* WARNING - data field truncated */
  32. #define SC_NOFIND     4     /* WARNING - could not find key in index file */
  33. #define SC_END        3     /* WARNING - no more keys */
  34. #define SC_EMPTY      2     /* WARNING - file is empty */
  35. #define SC_DELREC     1     /* WARNING - record read is marked deleted */
  36. #define SC_SUCCESS    0     /* successful function return code */
  37. #define SC_WRTFAIL    -1    /* ERROR - file write failure */
  38. #define SC_RDFAIL     -2    /* ERROR - file read failure */
  39. #define SC_MEMERR     -3    /* ERROR - memory allocation error */
  40. #define SC_SKFAIL     -4    /* ERROR - file pointer reposition failed */
  41. #define SC_NOFILE     -5    /* ERROR - file not found */
  42. #define SC_FILBAD     -6    /* ERROR - file corrupted */
  43. #define SC_BADEXPR    -7    /* ERROR - bad user specified key expression */
  44. #define SC_NOHNDL     -8    /* ERROR - no handles available */
  45. #define SC_NOPGS      -9    /* ERROR - no index pages loaded */
  46. #define SC_BADPG      -10   /* ERROR - index page was not loaded */
  47. #define SC_CLOSFAIL   -11   /* ERROR - file close failure */
  48. #define SC_BADCMD     -12   /* ERROR - invalid command */
  49. #define SC_BADHNDL    -13   /* ERROR - invalid handle number */
  50. #define SC_BADFNAME   -14   /* ERROR - invalid filename */
  51. #define SC_BADDATE    -15   /* ERROR - invalid date */
  52. #define SC_BADTIME    -16   /* ERROR - invalid time */
  53. #define SC_NODBT      -17   /* ERROR - file not in .DBT format */
  54. #define SC_DBFVERS    -18   /* ERROR - invalid dBaseIII version */
  55. #define SC_DBFHLEN    -19   /* ERROR - file header length error */
  56. #define SC_DBFDATE    -20   /* ERROR - last file change date in error */
  57. #define SC_NULLPARM   -21   /* ERROR - parameter address NULL */
  58. #define SC_BADKEYT    -22   /* ERROR - invalid key type */
  59. #define SC_KEYLEN     -23   /* ERROR - invalid key length */
  60. #define SC_ITEMLEN    -24   /* ERROR - item length incorrect */
  61. #define SC_BADROOT    -25   /* ERROR - invalid root page */
  62. #define SC_MAXKEYS    -26   /* ERROR - bad maximum number of keys per page */
  63. #define SC_FLDCNT     -27   /* ERROR - invalid number of fields */
  64. #define SC_BADFLDN    -28   /* ERROR - field name invalid */
  65. #define SC_FLDLEN     -29   /* ERROR - bad field length */
  66. #define SC_DECPL      -30   /* ERROR - decimal places parameter invalid */
  67. #define SC_BADFLDT    -31   /* ERROR - invalid field type */
  68. #define SC_RECLEN     -32   /* ERROR - invalid record length */
  69. #define SC_BADDATA    -33   /* ERROR - bad data */
  70. #define SC_LINELEN    -34   /* ERROR - memo soft line length invalid */
  71. #define SC_MDXFLAG    -35   /* ERROR - MDX flag in DBF file invalid */
  72. #define SC_READOLY    -36   /* ERROR - file open for reading only */
  73. #define SC_LCKVIOL    -37   /* ERROR - file locking violation */
  74. #define SC_LCKBOVR    -38   /* ERROR - sharing buffer overflow */
  75. #define SC_NOPATH     -39   /* ERROR - path not found */
  76. #define SC_ACCDEN     -40   /* ERROR - access to file denied */
  77. #define SC_BADACC     -41   /* ERROR - invalid access code */
  78. #define SC_NOTLCKD    -42   /* ERROR - file must be locked first */
  79. #define SC_NEWDEV     -43   /* ERROR - diskette changed */
  80. #define SC_MINKEYS    -44   /* ERROR - bad minimum number of keys per page */
  81. #define SC_FILSOPEN   -45   /* ERROR - some files remain open */
  82.  
  83.  
  84.  
  85.  
  86. /**********
  87.  *
  88.  *  Common Defines
  89.  *
  90.  **********/
  91.  
  92.  
  93.  
  94. #define SC_TRUE 1
  95. #define SC_FALSE 0
  96.  
  97.  
  98.  
  99.  
  100. /**********
  101.  *
  102.  *  Error Handling Prototypes
  103.  *
  104.  **********/
  105.  
  106.  
  107.  
  108. #define sceclr() (sc_code = SC_SUCCESS)
  109. signed char *scemsg( void );
  110.  
  111.  
  112.  
  113. /**********
  114.  *
  115.  *  External Variables
  116.  *
  117.  **********/
  118.  
  119.  
  120.  
  121. extern const char sc_version[];       /* Library Revision */
  122. extern signed int sc_code;      /* function result code */
  123.  
  124.  
  125.  
  126.