FreeTDS API: include/cstypes.h Source File

- Main Page
- Related Pages
- Modules
- Classes
- Files

- File List
- File Members

# include/cstypes.h

    00001 /* FreeTDS - Library of routines accessing Sybase and Microsoft databases
    00002  * Copyright (C) 1998-1999  Brian Bruns
    00003  *
    00004  * This library is free software; you can redistribute it and/or
    00005  * modify it under the terms of the GNU Library General Public
    00006  * License as published by the Free Software Foundation; either
    00007  * version 2 of the License, or (at your option) any later version.
    00008  *
    00009  * This library is distributed in the hope that it will be useful,
    00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
    00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    00012  * Library General Public License for more details.
    00013  *
    00014  * You should have received a copy of the GNU Library General Public
    00015  * License along with this library; if not, write to the
    00016  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    00017  * Boston, MA 02111-1307, USA.
    00018  */
    00019
    00020 #ifndef _cstypes_h_
    00021 #define _cstypes_h_
    00022
    00023 #include "tds_sysdep_public.h"
    00024
    00025 #ifdef __cplusplus
    00026 extern "C"
    00027 {
    00028 #if 0
    00029 }
    00030 #endif
    00031 #endif
    00032
    00033 static const char rcsid_cstypes_h[] = "$Id: cstypes.h,v 1.7 2008-05-06 00:14:02 jklowden Exp $";
    00034 static const void *const no_unused_cstypes_h_warn[] = { rcsid_cstypes_h, no_unused_cstypes_h_warn };
    00035
    00036 typedef tds_sysdep_int32_type           CS_INT;
    00037 typedef unsigned tds_sysdep_int32_type  CS_UINT;
    00038 typedef tds_sysdep_int64_type           CS_BIGINT;
    00039 typedef unsigned tds_sysdep_int64_type  CS_UBIGINT;
    00040 typedef tds_sysdep_int16_type           CS_SMALLINT;
    00041 typedef unsigned tds_sysdep_int16_type  CS_USMALLINT;
    00042 typedef unsigned char                   CS_TINYINT;
    00043 typedef char                            CS_CHAR;
    00044 typedef unsigned char                   CS_BYTE;
    00045 typedef tds_sysdep_real32_type          CS_REAL;
    00046 typedef tds_sysdep_real64_type          CS_FLOAT;
    00047 typedef tds_sysdep_int32_type           CS_BOOL;
    00048 typedef void                            CS_VOID;
    00049 typedef unsigned char                   CS_IMAGE;
    00050 typedef unsigned char                   CS_TEXT;
    00051 typedef unsigned char                   CS_LONGBINARY;
    00052 typedef unsigned char                   CS_LONGCHAR;
    00053 typedef long                            CS_LONG;
    00054 typedef unsigned char                   CS_BINARY;
    00055 typedef unsigned tds_sysdep_int16_type  CS_USHORT;
    00056 typedef unsigned char                   CS_BIT;
    00057
    00058 typedef CS_INT CS_RETCODE;
    00059
    00060 #define CS_MAX_NAME 132
    00061 #define CS_MAX_SCALE 77
    00062 #define CS_MAX_PREC 77          /* used by php */
    00063 #define CS_MAX_NUMLEN 33        /* used by roguewave */
    00064 #define CS_MAX_MSG 1024
    00065 #define CS_SQLSTATE_SIZE 8
    00066 #define CS_OBJ_NAME 400
    00067 #define CS_TP_SIZE  16          /* text pointer */
    00068 #define CS_TS_SIZE  8           /* length of timestamp */
    00069
    00070
    00071 typedef struct _cs_numeric
    00072 {
    00073         unsigned char precision;
    00074         unsigned char scale;
    00075         unsigned char array[CS_MAX_NUMLEN];
    00076 } CS_NUMERIC;
    00077
    00078 typedef CS_NUMERIC CS_DECIMAL;
    00079
    00080 typedef struct _cs_varbinary
    00081 {
    00082         CS_SMALLINT len;
    00083         CS_CHAR array[256];
    00084 } CS_VARBINARY;
    00085
    00086 typedef struct _cs_varchar
    00087 {
    00088     CS_SMALLINT len;                /* length of the string */
    00089     CS_CHAR     str[256];   /* string, no NULL terminator */
    00090 } CS_VARCHAR;
    00091
    00092 typedef struct _cs_config CS_CONFIG;
    00093 typedef struct _cs_context CS_CONTEXT;
    00094 typedef struct _cs_connection CS_CONNECTION;
    00095 typedef struct _cs_locale CS_LOCALE;
    00096 typedef struct _cs_command CS_COMMAND;
    00097 typedef struct _cs_blk_row CS_BLK_ROW;
    00098
    00099 typedef struct _cs_iodesc
    00100 {
    00101         CS_INT iotype;
    00102         CS_INT datatype;
    00103         CS_LOCALE *locale;
    00104         CS_INT usertype;
    00105         CS_INT total_txtlen;
    00106         CS_INT offset;
    00107         CS_BOOL log_on_update;
    00108         CS_CHAR name[CS_OBJ_NAME];
    00109         CS_INT namelen;
    00110         CS_BYTE timestamp[CS_TS_SIZE];
    00111         CS_INT timestamplen;
    00112         CS_BYTE textptr[CS_TP_SIZE];
    00113         CS_INT textptrlen;
    00114 } CS_IODESC;
    00115
    00116 typedef struct _cs_datafmt
    00117 {
    00118         CS_CHAR name[CS_MAX_NAME];
    00119         CS_INT namelen;
    00120         CS_INT datatype;
    00121         CS_INT format;
    00122         CS_INT maxlength;
    00123         CS_INT scale;
    00124         CS_INT precision;
    00125         CS_INT status;
    00126         CS_INT count;
    00127         CS_INT usertype;
    00128         CS_LOCALE *locale;
    00129 } CS_DATAFMT;
    00130
    00131 typedef struct _cs_money
    00132 {
    00133         CS_INT mnyhigh;
    00134         CS_UINT mnylow;
    00135 } CS_MONEY;
    00136
    00137 typedef struct _cs_money4
    00138 {
    00139         CS_INT mny4;
    00140 } CS_MONEY4;
    00141
    00142 typedef CS_INT CS_DATE;
    00143
    00144 typedef CS_INT CS_TIME;
    00145
    00146 typedef struct _cs_datetime
    00147 {
    00148         CS_INT dtdays;
    00149         CS_INT dttime;
    00150 } CS_DATETIME;
    00151
    00152 typedef struct _cs_datetime4
    00153 {
    00154         CS_USHORT days;
    00155         CS_USHORT minutes;
    00156 } CS_DATETIME4;
    00157
    00158 typedef struct _cs_daterec
    00159 {
    00160         CS_INT dateyear;
    00161         CS_INT datemonth;
    00162         CS_INT datedmonth;
    00163         CS_INT datedyear;
    00164         CS_INT datedweek;
    00165         CS_INT datehour;
    00166         CS_INT dateminute;
    00167         CS_INT datesecond;
    00168         CS_INT datemsecond;
    00169         CS_INT datetzone;
    00170 } CS_DATEREC;
    00171
    00172 typedef CS_INT CS_MSGNUM;
    00173
    00174 typedef struct _cs_clientmsg
    00175 {
    00176         CS_INT severity;
    00177         CS_MSGNUM msgnumber;
    00178         CS_CHAR msgstring[CS_MAX_MSG];
    00179         CS_INT msgstringlen;
    00180         CS_INT osnumber;
    00181         CS_CHAR osstring[CS_MAX_MSG];
    00182         CS_INT osstringlen;
    00183         CS_INT status;
    00184         CS_BYTE sqlstate[CS_SQLSTATE_SIZE];
    00185         CS_INT sqlstatelen;
    00186 } CS_CLIENTMSG;
    00187
    00188 typedef struct _cs_servermsg
    00189 {
    00190         CS_MSGNUM msgnumber;
    00191         CS_INT state;
    00192         CS_INT severity;
    00193         CS_CHAR text[CS_MAX_MSG];
    00194         CS_INT textlen;
    00195         CS_CHAR svrname[CS_MAX_NAME];
    00196         CS_INT svrnlen;
    00197         CS_CHAR proc[CS_MAX_NAME];
    00198         CS_INT proclen;
    00199         CS_INT line;
    00200         CS_INT status;
    00201         CS_BYTE sqlstate[CS_SQLSTATE_SIZE];
    00202         CS_INT sqlstatelen;
    00203 } CS_SERVERMSG;
    00204
    00205 #ifdef __cplusplus
    00206 #if 0
    00207 {
    00208 #endif
    00209 }
    00210 #endif
    00211
    00212 #endif

All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines