# tds_checks.h

    00001 /* FreeTDS - Library of routines accessing Sybase and Microsoft databases
    00002  * Copyright (C) 2004 Frediano Ziglio
    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 TDS_CHECKS_H
    00021 #define TDS_CHECKS_H
    00022
    00023 /* $Id: tds_checks.h,v 1.2 2004/12/02 12:37:54 freddy77 Exp $ */
    00024
    00025 #if ENABLE_EXTRA_CHECKS
    00026 #define CHECK_STRUCT_EXTRA(func,s) func(s)
    00027 #else
    00028 #define CHECK_STRUCT_EXTRA(func,s)
    00029 #endif
    00030
    00031 #define CHECK_TDS_EXTRA(tds)              CHECK_STRUCT_EXTRA(tds_check_tds_extra,tds)
    00032 #define CHECK_CONTEXT_EXTRA(ctx)          CHECK_STRUCT_EXTRA(tds_check_context_extra,ctx)
    00033 #define CHECK_TDSENV_EXTRA(env)           CHECK_STRUCT_EXTRA(tds_check_env_extra,env)
    00034 #define CHECK_COLUMN_EXTRA(column)        CHECK_STRUCT_EXTRA(tds_check_column_extra,column)
    00035 #define CHECK_RESULTINFO_EXTRA(res_info)  CHECK_STRUCT_EXTRA(tds_check_resultinfo_extra,res_info)
    00036 #define CHECK_PARAMINFO_EXTRA(res_info)   CHECK_STRUCT_EXTRA(tds_check_resultinfo_extra,res_info)
    00037 #define CHECK_CURSOR_EXTRA(cursor)        CHECK_STRUCT_EXTRA(tds_check_cursor_extra,cursor)
    00038 #define CHECK_DYNAMIC_EXTRA(dynamic)      CHECK_STRUCT_EXTRA(tds_check_dynamic_extra,dynamic)
    00039
    00040 #if ENABLE_EXTRA_CHECKS
    00041 void tds_check_tds_extra(const TDSSOCKET * tds);
    00042 void tds_check_context_extra(const TDSCONTEXT * ctx);
    00043 void tds_check_env_extra(const TDSENV * env);
    00044 void tds_check_column_extra(const TDSCOLUMN * column);
    00045 void tds_check_resultinfo_extra(const TDSRESULTINFO * res_info);
    00046 void tds_check_cursor_extra(const TDSCURSOR * cursor);
    00047 void tds_check_dynamic_extra(const TDSDYNAMIC * dynamic);
    00048
    00049 int tds_get_cardinal_type(int datatype);
    00050 int tds_get_varint_size(int datatype);
    00051 #endif
    00052
    00053 #endif /* TDS_CHECKS_H */