Function Prototypes for ESQL/C
Posted in 1992
Dear Everybody, I have got fed up with seeing questions about function prototypes for ESQL/C, so I have put together the three include files in the following shell archive. FYI: the technique used to establish which function calls should be included was to run strings(1) on $INFORMIXDIR/lib/esqlc (for each of the versions 4.00, 4.10 and 5.00), and then look through this list for the function calls that can be generated. A couple of previous versions of this have been floating around, some of them created by me. The ones I created contain far too many function prototypes; the other lists I have seen are not actually complete. I would suggest that they are discarded. The lists for 4.00 and 4.10 are identical; the list for 5.00 is quite different. The files below for 4.00 and 4.10 are slightly different because in 4.00 and 5.00, the undocumented function sqgetdbs() links OK; in 4.10, it is included in the library, but some functions which it calls are not in the library (at least, on my Sun with 4.10.UC1). The missing source file is rfnmanip.o; it can be found in various other libraries (libfe.a, libsace.a, libsperf.a), but that requires either I4GL-RDS, I4GL-ID or ISQL on the machine as well as ESQL/C, and it requires an extra library specified on the command line. NB: none of these files includes the functions documented in the ESQL/C manual are included, except sqlbreak(), sqlstart() and sqlexit(). Things like the decimal, datetime, interval functions, nor things like egetmsg, ldchar, stchar, and so on. If someone else has typed in the function templates, I'd be pleased to receive copies by e-mail. NNB: beware of the comment in esql5_00.h about _iqlocate_cursor(); if you are using an ANSI C compiler, you cannot have both a prototype and a non-prototype declaration of a function in scope, and sqlhdr.h gives you a non-prototyped declaration. You either need to remove the prototype from esql5_00.h or you need to remove the declaration from sqlhdr.h! I am also preparing, in background mode, a list of FAQs (Frequently Asked Questions) about Informix products for comp.databases.informix. There are a number of issues to be resolved with it, such as frequency of posting or other availabilty, but questions, preferably with answers, are also going to be required. If you have any suggestions for this, please send me e-mail with "FAQ:" at the start of the subject. Thanks, Jonathan Leffler (johnl@obelix.informix.com) : "@(#)shar.sh 1.8" #! /bin/sh # # This is a shell archive. # Remove everything above this line and run sh on the resulting file. # If this archive is complete, you will see this message at the end: # "All files extracted" # # Created: Tue Apr 28 11:49:42 GMT 1992 by johnl at Informix Software Ltd. # Files archived in this archive: # esql4_00.h # esql4_10.h # esql5_00.h # #-------------------- if [ -f esql4_00.h -a "$1" != "-c" ] then echo shar: esql4_00.h already exists else echo 'x - esql4_00.h (6556 characters)' sed -e 's/^X//' >esql4_00.h <<'SHAR-EOF' X/* X@(#)File: esql4_00.h X@(#)Version: 1.1 X@(#)Last changed: 92/04/28 X@(#)Purpose: Function prototypes for ESQL/C Version 4.00 or Version 4.10 X@(#)Author: J Leffler X@(#)Copyright: (C) JLSS 1992 X@(#)Product: :PRODUCT: X*/ X X/*TABSTOP=4*/ X X/* X** Function prototypes for functions found in: X** Informix ESQL/C application-engine interface library Version 4.00. X** List of names derived from output of "strings $INFORMIXDIR/lib/esqlc" X** iec_stop() is called by WHENEVER ERROR STOP. X*/ X X#ifndef ESQL4_00_H X#define ESQL4_00_H X X#include <sqlhdr.h> X#include <sqlda.h> X X#ifdef MAIN_PROGRAM X#ifndef lint Xstatic char esql4_00_h[] = "@(#)esql4_00.h 1.1 92/04/28"; X#endif /*lint */ X#endif /*MAIN_PROGRAM */ X X#ifdef __STDC__ X Xextern int _iqbeginwork(void); Xextern int _iqclose(register _SQCURSOR *cursor); Xextern int _iqcommit(void); Xextern int _iqcopen(register _SQCURSOR *cursor, X int icnt, X struct sqlvar_struct *ibind, X struct sqlda *idesc, X struct value *ivalues, X int useflag); Xextern int _iqdatabase(char *db_name, X int exclusive, X int icnt, X struct sqlvar_struct *ibind); Xextern int _iqdbclose(void); Xextern int _iqdclcur(register _SQCURSOR *cursor, X register char *curname, X register char **cmdtxt, X register int icnt, X register struct sqlvar_struct *ibind, X register int ocnt, X register struct sqlvar_struct *obind, X register int flags); Xextern int _iqddclcur(register _SQCURSOR *cursor, X register char *curname, X register int flags); Xextern int _iqdscribe(register _SQCURSOR *cursor, struct sqlda **descp); Xextern int _iqeximm(char *stmt); Xextern int _iqflush(register _SQCURSOR *cursor); Xextern int _iqfree(register _SQCURSOR *cursor); Xextern int _iqftch(register _SQCURSOR *cursor, X int ocnt, X struct sqlvar_struct *obind, X struct sqlda *odescriptor, X int chkind); Xextern int _iqinsput(register _SQCURSOR *cursor, X int icnt, X struct sqlvar_struct *ibind, X struct sqlda *idesc, X struct value *ivalues); Xextern int _iqnftch(_SQCURSOR *cursor, X int ocnt, X struct sqlvar_struct *obind, X struct sqlda *odescriptor, X int fetch_type, X long val, X int icnt, X struct sqlvar_struct *ibind, X struct sqlda *idescriptor, X int chkind); Xextern int _iqpclose(_SQCURSOR *cursor); Xextern int _iqpdclcur(_SQCURSOR *cursor, X char *cursor_name, X int statement_type, X char *table_name, X char **select_list, X char **orderby_list, X char **where_text, X int icnt, X struct sqlvar_struct *ibind, X int ocnt, X struct sqlvar_struct *obind, X int for_update); Xextern int _iqpdelete(_SQCURSOR *cursor); Xextern int _iqpopen(_SQCURSOR *cursor, X int icnt, X struct sqlvar_struct *ibind, X