home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 11 Util / 11-Util.zip / TP1.ZIP / SQLFRONT.H < prev    next >
C/C++ Source or Header  |  1989-04-24  |  3KB  |  172 lines

  1.  
  2. /*
  3. **  Copyright (C) 1985-1988 Sybase, Inc.
  4. **  Copyright (C) 1988 Microsoft Corporation
  5. */
  6.  
  7. /*
  8. **    SQLfront.h:    34.1    5/10/88
  9. **
  10. **    FRONT.H
  11. **
  12. **    Your generic useful definitions file.
  13. **
  14. **    Requires:
  15. **        nothing
  16. **
  17. **    Sybase DB-LIBRARY Version 2.0
  18. **    Confidential Property of Sybase, Inc.
  19. **    (c) Copyright Sybase, Inc. 1985, 1986
  20. **    All rights reserved
  21. */
  22.  
  23. /*
  24. **    Version
  25. */
  26. #define    BSD42    0
  27. #define    VMS    0
  28. #define VOS    0
  29.  
  30. #define LINT_ARGS    1
  31.  
  32. /*
  33. **     Machine
  34. */
  35. #define SUN    0
  36. #define PYRAMID    0
  37. #define VAX    0
  38. /*    M_i86    1    */
  39. /*    M_i286    1    */
  40. /*    M_i386    1    */
  41.  
  42. /*
  43. **    Languages
  44. */
  45.  
  46. #define SQL_C        0
  47. #define SQL_FORTRAN    1
  48. #define SQL_COBOL    2
  49.  
  50. /*
  51. **    Return types
  52. */
  53.  
  54.  
  55. typedef int        RETCODE;    /* SUCCEED or FAIL */
  56. typedef    int        STATUS;        /* OK or condition code */
  57.  
  58. /*
  59. **    Defines
  60. */
  61.  
  62. #if    defined(BSD42) || defined(VOS) || defined(DBMSDOS) || defined(DBMSOS2) || defined(DBMSWIN)
  63. #define    STDEXIT        0
  64. #define    ERREXIT        -1
  65. #endif
  66.  
  67. #if    VMS
  68. #define    STDEXIT        1
  69. #define    ERREXIT
  70. #endif    /* VMS */
  71.  
  72. #ifndef    NULL
  73. #define NULL        0
  74. #endif    /* NULL */
  75.  
  76. #ifndef FALSE
  77. #define FALSE        0
  78. #endif
  79. #ifndef TRUE
  80. #define TRUE        1
  81. #endif
  82.  
  83. #define    SUCCEED        1
  84. #define    FAIL        0
  85.  
  86. #define    OK        0
  87.  
  88. /*
  89. **    SYBASE environment variable
  90. */
  91. #define ENV_SYBASE    "SYBASE"
  92.  
  93. /*
  94. **     Defines for the "answer" in interrupt pop-ups 
  95. */
  96.  
  97. #define INT_EXIT    0
  98. #define INT_CONTINUE    1
  99. #define INT_CANCEL    2
  100.  
  101. /* force structures to be word alligned */
  102. #pragma pack(2)
  103.  
  104. /* DataServer variable typedefs */
  105. typedef    unsigned char    DBTINYINT;    /* DataServer 1 byte integer */
  106. typedef    short        DBSMALLINT;    /* DataServer 2 byte integer */
  107. typedef    long        DBINT;        /* DataServer 4 byte integer */
  108. typedef    char        DBCHAR;        /* DataServer char type */
  109. typedef    char        DBTEXT;        /* DataServer text type */
  110. typedef    unsigned char    DBBINARY;    /* DataServer binary type */
  111. typedef    unsigned char    DBARRAY;    /* DataServer array type */
  112. typedef    unsigned char    DBBIT;        /* DataServer bit type */
  113. typedef struct datetime            /* DataServer datetime type */
  114. {
  115.     long    dtdays;            /* number of days since 1/1/1900 */
  116.     unsigned long    dttime;        /* number 300th second since mid */
  117. } DBDATETIME;
  118. typedef struct money            /* DataServer money type */
  119. {
  120.     long        mnyhigh;
  121.     unsigned long    mnylow;
  122. } DBMONEY;
  123. typedef    double        DBFLT8;        /* DataServer float type */
  124.  
  125. /*    
  126. **    Typedefs
  127. */
  128.  
  129. typedef unsigned char    BYTE;
  130. typedef unsigned char    DBBOOL;    /* Less likely to collide than "BOOL". */
  131. #if !defined(DBMSDOS) && !defined(DBMSOS2) && !defined(DBMSWIN)
  132.     typedef unsigned char    BOOL;    /* So older programs won't break yet.*/
  133. #endif
  134.  
  135. #if defined (DBMSOS2)
  136. typedef BYTE        far *POINTER;
  137. #else
  138. typedef BYTE        *POINTER;
  139. #endif
  140.  
  141. /*
  142. **    Pointers to functions returning ...
  143. */
  144.  
  145. #if defined (DBMSOS2)
  146. typedef int        (far *INTFUNCPTR)();
  147. typedef DBBOOL        (far *BOOLFUNCPTR)();
  148. #else
  149. typedef int        (*INTFUNCPTR)();
  150. typedef DBBOOL        (*BOOLFUNCPTR)();
  151. #endif
  152. /*
  153. **    REGION - Rectangular Area.
  154. */
  155.  
  156. typedef    struct    region
  157. {
  158.     short        rgx;        /* Starting (upper left) coordinates */
  159.     short        rgy;
  160.     short        rgwidth;    /* Width (horizontal extent) */
  161.     short        rgheight;    /* Height (vertical extent) */
  162. } REGION;
  163.  
  164. /* set packing to default */
  165. #pragma pack()
  166.  
  167. /* max length of sql statement buffer */
  168. #define SQLMAXLEN    3072
  169.  
  170. /* max len of a file pathname */
  171. #define FILENAME_LEN    255
  172.