00001 #ifndef __TEX_UTILS_H 00002 #define __TEX_UTILS_H 00003 /*------------------------------------------------------------------------- 00004 * Copyright (c) 2000-2002 Kenneth W. Sodemann (stuffle@charter.net) 00005 *------------------------------------------------------------------------- 00006 * $Id: tex_utils.h,v 1.4 2002/01/30 00:40:02 stuffle Exp $ 00007 * 00008 * This program is free software; you can redistribute it and/or modify 00009 * it under the terms of the GNU General Public License as published by 00010 * the Free Software Foundation; either version 2 of the License, or 00011 * (at your option) any later version. 00012 * 00013 * This program is distributed in the hope that it will be useful, 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00016 * GNU General Public License for more details. 00017 * 00018 * You should have received a copy of the GNU General Public License 00019 * along with this program; if not, write to 00020 * Free Software Foundation, Inc. 00021 * 59 Temple Place, Suite 330 00022 * Boston, MA 02111-1307 USA 00023 *------------------------------------------------------------------------- 00024 */ 00039 #include <glib.h> 00040 #include <libpq-fe.h> 00041 00042 /* 00043 * __BEGIN_DECLS should be used at the beginning of your declarations, 00044 * so that C++ compilers don't mangle their names. Use __END_DECLS at 00045 * the end of C declarations. 00046 */ 00047 #undef __BEGIN_DECLS 00048 #undef __END_DECLS 00049 #ifdef __cplusplus 00050 # define __BEGIN_DECLS extern "C" { 00051 # define __END_DECLS } 00052 #else 00053 # define __BEGIN_DECLS /* empty */ 00054 # define __END_DECLS /* empty */ 00055 #endif 00056 00057 /* 00058 * __P is a macro used to wrap function prototypes, so that compilers 00059 * that don't understand ANSI C prototypes still work, and ANSI C 00060 * compilers can issue warnings about type mismatches. 00061 */ 00062 #undef __P 00063 #if defined (__STDC__) || defined (_AIX) \ 00064 || (defined (__mips) && defined (_SYSTYPE_SVR4)) \ 00065 || defined(WIN32) || defined(__cplusplus) 00066 # define __P(protos) protos 00067 #else 00068 # define __P(protos) () 00069 #endif 00070 00071 __BEGIN_DECLS 00083 void fix_tex_string __P((GString *str)); 00084 00085 00106 GString *create_main_sql_str __P((GList *list)); 00107 00108 00130 gboolean write_tex_audit_trail __P((FILE *fp, PGconn *conn, gint pk_num)); 00131 00132 00169 gboolean write_tex_file __P((FILE *fp, PGconn *conn, PGresult *res)); 00170 __END_DECLS 00171 #endif