File: esql7_20.h

package info (click to toggle)
libdbd-informix-perl 2003.04-3
  • links: PTS
  • area: contrib
  • in suites: etch, etch-m68k, sarge
  • size: 1,232 kB
  • ctags: 467
  • sloc: perl: 7,349; ansic: 5,340; sh: 184; makefile: 58
file content (168 lines) | stat: -rw-r--r-- 8,456 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
/*
@(#)Purpose:         Function prototypes for ESQL/C Versions 7.20..7.24
@(#)Author:          J Leffler
@(#)Copyright:       1997,1999-2000 Jonathan Leffler (JLSS)
@(#)Copyright:       2002           IBM
@(#)Product:         IBM Informix Database Driver for Perl Version 2003.04 (2003-03-05)
*/

/*TABSTOP=4*/

#ifndef ESQL7_20_H
#define ESQL7_20_H

#ifdef MAIN_PROGRAM
#ifndef lint
static const char esql7_20_h[] = "@(#)$Id: esql7_20.h,v 100.2 2002/02/08 22:49:12 jleffler Exp $";
#endif	/* lint */
#endif	/* MAIN_PROGRAM */

/*
** JL 2000-06-29:
** Although struct hostvar_struct should have been declared because
** <sqlhdr.h> should have been included by now, there have been problem
** reports that encouraged a previous version of this code to write
** 'struct hostvar_struct;' inline to avoid complaints from GCC, but
** this in turn incited complaints from the HP ANSI C compiler.
*/
#include <sqlhdr.h>
#ifndef MAXADDR
#include <value.h>
#endif /* MAXADDR */

/*
** JL 1997-04-24:
** The 7.2x ESQL/C compiler can generate calls to the following functions
** but sqlhdr.h does not define prototypes for these functions.  Although
** byfill() is declared in esqllib.h, this is not normally needed by 7.x
** ESQL/C compilations (though if byfill() is missing, there is room to
** think that other functions may be missing too).
** JL 1999-06-29:
** The 7.24 ESQL/C header declares the iec_* functions, but not byfill.
** It has a conditionally defined macro for byfill which invokes memset.
*/

extern void  byfill(char *to, int len, char ch);

extern void  iec_dclcur(char *, char **, int, int, int);
extern void  iec_free(char *);
extern void  iec_hostbind(struct hostvar_struct *, int, int, int, int, char *);
extern void  iec_ibind(int, char *, int, int, char *, int);
extern void  iec_obind(int, char *, int, int, char *, int);
extern void *iec_alloc_isqlda(int);
extern void *iec_alloc_osqlda(int);

/*
** JL 2000-06-29:
** These function prototypes from sqlhdr.h for ESQL/C 7.24.UC1.
** These prototypes are not protected by __STDC__ and therefore
** should be visible to C++ compilers too.  This was a problem
** found by Lucent in June 1999.  It sometimes takes a while to
** get such fixes into this code.
*/

extern int ifx_checkAPI(int libver, int libid);

extern int bycmpr(char *st1, char *st2, int count);
extern void bycopy( char *s1, char *s2, int n);
extern int byleng( char *beg, int cnt);
extern void ldchar(char *from, int count, char *to);
extern void rdownshift(char *s);
extern void rupshift(char *s);
extern void stcat(char *src, char *dst);
extern void stchar(char *from, char *to, int count);
extern int stcmpr(char *s1, char *s2);
extern void stcopy(char *src, char *dst);
extern int stleng(char *src);

extern int rstoi(char *s, int *val);

extern int rdatestr(long jdate, char *str);
extern int rdayofweek(long date);
extern int rdefmtdate(long *pdate, char *fmtstring, char *input);
extern int rfmtdate(long date, char *fmtstring, char *result);
extern int rfmtdec(struct decimal *dec, char *format, char *outbuf);
extern int rfmtdouble(double dvalue, char *format, char *outbuf);
extern int rfmtlong(long lvalue, char *format, char *outbuf);
extern int rgetmsg(int msgnum, char *s, int maxsize);
extern int rgetlmsg(long msgnum, char *s, int maxsize, int *msg_length);
extern int risnull(int vtype, char *pcvar);
extern int rjulmdy(long jdate, short mdy[3]);
extern int rleapyear(int year);
extern int rmdyjul(short mdy[3], long *jdate);
extern int rsetnull(int vtype, char *pcvar);
extern int rstod(char *str, double *val);
extern int rstol(char *s, long *val);
extern int rstrdate(char *str, long *jdate);
extern void rtoday(long *today);
extern int rtypalign(int offset, int type);
extern int rtypmsize(int type, int len);
extern char *rtypname(int type);
extern int rtypwidth(int type, int len);

extern 	int sqlbreak(void);
extern 	char *ifx_getcur_conn_name(void);
extern 	int sqldetach(void);
extern 	int sqlexit(void);
extern 	int sqlstart(void);
extern void sqlsignal(int sigvalue, void (*ldv)(void), int mode);
extern int sqlbreakcallback(long timeout, void(*)(int));

extern 	int _iqalloc(char *descname, int occurrence);
extern 	int _iqbeginwork(void);
extern 	int _iqcdcl(struct _sqcursor *cursor,char *curname, char **cmdtxt, struct sqlda *idesc, struct sqlda *odesc, int flags);
extern 	int _iqcddcl(struct _sqcursor *cursor, char *curname, struct _sqcursor *stmt, int flags);
extern 	int _iqcftch(struct _sqcursor *cursor, struct sqlda *idesc, struct sqlda *odesc, char *odesc_name, _FetchSpec *fetchspec);
extern 	int _iqchkbuff(struct _sqcursor *cursor, int *direction, long *valptr);
extern  int _iqsetautofree(struct _sqcursor *cursor, int status);
extern 	int _iqsetdefprep(int status);
extern 	int _iqclose(struct _sqcursor *cursor);
extern 	int _iqcommit(void);
extern 	int _iqcopen(struct _sqcursor *cursor, int icnt, struct sqlvar_struct *ibind, struct sqlda *idesc, struct value *ivalues, int useflag);
extern 	int _iqcput(struct _sqcursor *cursor, struct sqlda *idesc, char *desc_name);
extern 	int _iqcrproc(char *fname);
extern 	int _iqdatabase(char *db_name, int exclusive, int icnt, struct sqlvar_struct *ibind);
extern 	int _iqdbase(char *db_name, int exclusive);
extern 	int _iqdbclose(void);
extern 	int _iqdclcur(struct _sqcursor *cursor, char *curname, char **cmdtxt, int icnt, struct sqlvar_struct *ibind, int ocnt, struct sqlvar_struct *obind, int flags);
#ifndef XA_5_0
extern 	int _iqdcopen(struct _sqcursor *cursor, struct sqlda *idesc, char *desc_name, struct value *ivalues, int useflag, int reoptflag);
#else /* !XA_5_0 */
extern 	int _iqdcopen(struct _sqcursor *cursor, struct sqlda *idesc, char *desc_name, struct value *ivalues, int useflag);
#endif /* !XA_5_0 */
extern 	int _iqddclcur(struct _sqcursor *cursor, char *curname, int flags);
extern 	int _iqdealloc(char *desc_name);
extern 	int _iqdescribe(struct _sqcursor *cursor, struct sqlda **descp, char *desc_name);
extern 	int _iqdscribe(struct _sqcursor *cursor, struct sqlda **descp);
extern 	int _iqexecute(struct _sqcursor *cursor, struct sqlda *idesc, char *idesc_name, struct value *ivalues, struct sqlda *odesc, char *odesc_name, struct value *ovalues, int chkind);
extern 	int _iqeximm(char *stmt);
extern 	int _iqexproc(struct _sqcursor *cursor, char **cmdtxt, int icnt, struct sqlvar_struct *ibind, int ocnt, struct sqlvar_struct *obind, int chkind, int freecursor);
extern 	int _iqflush(struct _sqcursor *cursor);
extern 	int _iqfree(struct _sqcursor *cursor);
extern 	int _iqftch(struct _sqcursor *cursor, struct sqlda *odesc, int sysdesc, int chkind, char *odesc_name);
extern 	int _iqgetdesc(char *desc_name, int sqlvar_num, struct hostvar_struct *hosttab, int xopen_flg);
extern	int _iqgetdiag(struct hostvar_struct *hosttab, int exception_num);
extern 	int _iqinsput( struct _sqcursor *cursor, int icnt, struct sqlvar_struct *ibind, struct sqlda *idesc, struct value *ivalues);
extern 	struct _sqcursor *_iqlocate_cursor(char *name, int type);
extern 	int _iqnftch(struct _sqcursor *cursor, int ocnt, struct sqlvar_struct *obind, struct sqlda *odesc, int fetch_type, long val, int icnt, struct sqlvar_struct *ibind, struct sqlda *idesc, int chkind );
extern 	struct _sqcursor *_iqnprep(char *name, char *stmt);
extern 	int _iqrollback(void);
extern 	int _iqsetdesc(char *desc_name, int sqlvar_num, struct hostvar_struct *hosttab, int xopen_flg);
extern 	void _iqseterr(int sys_errno);
extern 	int _iqsftch(struct _sqcursor *cursor, struct sqlda *idesc, struct sqlda *odesc, int sysdesc, _FetchSpec *fetchspec, char *odesc_name);
extern 	int _iqslct(struct _sqcursor *cursor, char **cmdtxt, int icnt, struct sqlvar_struct *ibind, int ocnt, struct sqlvar_struct *obind, int chkind);
extern int _iqstmnt(_SQSTMT *scb, char **cmdtxt, int icnt, struct sqlvar_struct *ibind, struct value *ivalues);
extern 	void _iqstop(void);
extern 	int _iqxecute(struct _sqcursor *cursor, int icnt, struct sqlvar_struct *ibind, struct sqlda *idesc, struct value *ivalues);

extern void _iqconnect(int conn_kw, char *dbenv, char *conn_name, char *username, char *passwd, int concur_tx);
extern void _iqdisconnect(int conn_kw, char *conn_name, int flag, int from_reassoc);
extern void _iqsetconnect(int conn_kw, char *conn_name, int dormant);

#ifdef _REENTRANT
extern long * ifx_sqlcode(void);
extern char * ifx_sqlstate(void);
extern struct sqlca_s * ifx_sqlca(void);
#endif /* _REENTRANT */

#endif	/* ESQL7_20_H */