<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> <title>FreeTDS API: /usr/local/users/home/jklowden/projects/releases/freetds/0.82/include/cstypes.h Source File</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.4.1 --> <div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="functions.html">Class Members</a> | <a class="qindex" href="globals.html">File Members</a> | <a class="qindex" href="pages.html">Related Pages</a></div> <div class="nav"> <a class="el" href="dir_000000.html">include</a></div> <h1>cstypes.h</h1><div class="fragment"><pre class="fragment">00001 <span class="comment">/* FreeTDS - Library of routines accessing Sybase and Microsoft databases</span> 00002 <span class="comment"> * Copyright (C) 1998-1999 Brian Bruns</span> 00003 <span class="comment"> *</span> 00004 <span class="comment"> * This library is free software; you can redistribute it and/or</span> 00005 <span class="comment"> * modify it under the terms of the GNU Library General Public</span> 00006 <span class="comment"> * License as published by the Free Software Foundation; either</span> 00007 <span class="comment"> * version 2 of the License, or (at your option) any later version.</span> 00008 <span class="comment"> *</span> 00009 <span class="comment"> * This library is distributed in the hope that it will be useful,</span> 00010 <span class="comment"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span> 00011 <span class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</span> 00012 <span class="comment"> * Library General Public License for more details.</span> 00013 <span class="comment"> *</span> 00014 <span class="comment"> * You should have received a copy of the GNU Library General Public</span> 00015 <span class="comment"> * License along with this library; if not, write to the</span> 00016 <span class="comment"> * Free Software Foundation, Inc., 59 Temple Place - Suite 330,</span> 00017 <span class="comment"> * Boston, MA 02111-1307, USA.</span> 00018 <span class="comment"> */</span> 00019 00020 <span class="preprocessor">#ifndef _cstypes_h_</span> 00021 <span class="preprocessor"></span><span class="preprocessor">#define _cstypes_h_</span> 00022 <span class="preprocessor"></span> 00023 <span class="preprocessor">#include "tds_sysdep_public.h"</span> 00024 00025 <span class="preprocessor">#ifdef __cplusplus</span> 00026 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="stringliteral">"C"</span> 00027 { 00028 <span class="preprocessor">#if 0</span> 00029 <span class="preprocessor"></span>} 00030 <span class="preprocessor">#endif</span> 00031 <span class="preprocessor"></span><span class="preprocessor">#endif</span> 00032 <span class="preprocessor"></span> 00033 <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">char</span> rcsid_cstypes_h[] = <span class="stringliteral">"$Id: cstypes.h,v 1.6.4.1 2008/05/06 03:23:45 jklowden Exp $"</span>; 00034 <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">void</span> *<span class="keyword">const</span> no_unused_cstypes_h_warn[] = { rcsid_cstypes_h, no_unused_cstypes_h_warn }; 00035 00036 <span class="keyword">typedef</span> tds_sysdep_int32_type CS_INT; 00037 <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> tds_sysdep_int32_type CS_UINT; 00038 <span class="keyword">typedef</span> tds_sysdep_int64_type CS_BIGINT; 00039 <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> tds_sysdep_int64_type CS_UBIGINT; 00040 <span class="keyword">typedef</span> tds_sysdep_int16_type CS_SMALLINT; 00041 <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> tds_sysdep_int16_type CS_USMALLINT; 00042 <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> CS_TINYINT; 00043 <span class="keyword">typedef</span> <span class="keywordtype">char</span> CS_CHAR; 00044 <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> CS_BYTE; 00045 <span class="keyword">typedef</span> tds_sysdep_real32_type CS_REAL; 00046 <span class="keyword">typedef</span> tds_sysdep_real64_type CS_FLOAT; 00047 <span class="keyword">typedef</span> tds_sysdep_int32_type CS_BOOL; 00048 <span class="keyword">typedef</span> <span class="keywordtype">void</span> CS_VOID; 00049 <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> CS_IMAGE; 00050 <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> CS_TEXT; 00051 <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> CS_LONGBINARY; 00052 <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> CS_LONGCHAR; 00053 <span class="keyword">typedef</span> <span class="keywordtype">long</span> CS_LONG; 00054 <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> CS_BINARY; 00055 <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> tds_sysdep_int16_type CS_USHORT; 00056 <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> CS_BIT; 00057 00058 <span class="keyword">typedef</span> CS_INT CS_RETCODE; 00059 00060 <span class="preprocessor">#define CS_MAX_NAME 132</span> 00061 <span class="preprocessor"></span><span class="preprocessor">#define CS_MAX_SCALE 77</span> 00062 <span class="preprocessor"></span><span class="preprocessor">#define CS_MAX_PREC 77 </span><span class="comment">/* used by php */</span> 00063 <span class="preprocessor">#define CS_MAX_NUMLEN 33 </span><span class="comment">/* used by roguewave */</span> 00064 <span class="preprocessor">#define CS_MAX_MSG 1024</span> 00065 <span class="preprocessor"></span><span class="preprocessor">#define CS_SQLSTATE_SIZE 8</span> 00066 <span class="preprocessor"></span><span class="preprocessor">#define CS_OBJ_NAME 400</span> 00067 <span class="preprocessor"></span><span class="preprocessor">#define CS_TP_SIZE 16 </span><span class="comment">/* text pointer */</span> 00068 <span class="preprocessor">#define CS_TS_SIZE 8 </span><span class="comment">/* length of timestamp */</span> 00069 00070 00071 <span class="keyword">typedef</span> <span class="keyword">struct </span>_cs_numeric 00072 { 00073 <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> precision; 00074 <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> scale; 00075 <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> array[CS_MAX_NUMLEN]; 00076 } CS_NUMERIC; 00077 00078 <span class="keyword">typedef</span> CS_NUMERIC CS_DECIMAL; 00079 00080 <span class="keyword">typedef</span> <span class="keyword">struct </span>_cs_varbinary 00081 { 00082 CS_SMALLINT len; 00083 CS_CHAR array[256]; 00084 } CS_VARBINARY; 00085 00086 <span class="keyword">typedef</span> <span class="keyword">struct </span>_cs_varchar 00087 { 00088 CS_SMALLINT len; <span class="comment">/* length of the string */</span> 00089 CS_CHAR str[256]; <span class="comment">/* string, no NULL terminator */</span> 00090 } CS_VARCHAR; 00091 00092 <span class="keyword">typedef</span> <span class="keyword">struct </span>_cs_config CS_CONFIG; 00093 <span class="keyword">typedef</span> <span class="keyword">struct </span>_cs_context CS_CONTEXT; 00094 <span class="keyword">typedef</span> <span class="keyword">struct </span>_cs_connection CS_CONNECTION; 00095 <span class="keyword">typedef</span> <span class="keyword">struct </span>_cs_locale CS_LOCALE; 00096 <span class="keyword">typedef</span> <span class="keyword">struct </span>_cs_command CS_COMMAND; 00097 <span class="keyword">typedef</span> <span class="keyword">struct </span>_cs_blk_row CS_BLK_ROW; 00098 00099 <span class="keyword">typedef</span> <span class="keyword">struct </span>_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 <span class="keyword">typedef</span> <span class="keyword">struct </span>_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 <span class="keyword">typedef</span> <span class="keyword">struct </span>_cs_money 00132 { 00133 CS_INT mnyhigh; 00134 CS_UINT mnylow; 00135 } CS_MONEY; 00136 00137 <span class="keyword">typedef</span> <span class="keyword">struct </span>_cs_money4 00138 { 00139 CS_INT mny4; 00140 } CS_MONEY4; 00141 00142 <span class="keyword">typedef</span> CS_INT CS_DATE; 00143 00144 <span class="keyword">typedef</span> CS_INT CS_TIME; 00145 00146 <span class="keyword">typedef</span> <span class="keyword">struct </span>_cs_datetime 00147 { 00148 CS_INT dtdays; 00149 CS_INT dttime; 00150 } CS_DATETIME; 00151 00152 <span class="keyword">typedef</span> <span class="keyword">struct </span>_cs_datetime4 00153 { 00154 CS_USHORT days; 00155 CS_USHORT minutes; 00156 } CS_DATETIME4; 00157 00158 <span class="keyword">typedef</span> <span class="keyword">struct </span>_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 <span class="keyword">typedef</span> CS_INT CS_MSGNUM; 00173 00174 <span class="keyword">typedef</span> <span class="keyword">struct </span>_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 <span class="keyword">typedef</span> <span class="keyword">struct </span>_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 <span class="preprocessor">#ifdef __cplusplus</span> 00206 <span class="preprocessor"></span><span class="preprocessor">#if 0</span> 00207 <span class="preprocessor"></span>{ 00208 <span class="preprocessor">#endif</span> 00209 <span class="preprocessor"></span>} 00210 <span class="preprocessor">#endif</span> 00211 <span class="preprocessor"></span> 00212 <span class="preprocessor">#endif</span> </pre></div><hr size="1"><address style="align: right;"><small>Generated on Wed May 7 19:22:08 2008 for FreeTDS API by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.1 </small></address> </body> </html>