1 | /* |
2 | * This file contains stuff needed to be as compatible to Informix as possible. |
3 | * src/interfaces/ecpg/include/ecpg_informix.h |
4 | */ |
5 | #ifndef _ECPG_INFORMIX_H |
6 | #define _ECPG_INFORMIX_H |
7 | |
8 | #include <ecpglib.h> |
9 | #include <pgtypes_date.h> |
10 | #include <pgtypes_interval.h> |
11 | #include <pgtypes_numeric.h> |
12 | #include <pgtypes_timestamp.h> |
13 | |
14 | #define SQLNOTFOUND 100 |
15 | |
16 | #define ECPG_INFORMIX_NUM_OVERFLOW -1200 |
17 | #define ECPG_INFORMIX_NUM_UNDERFLOW -1201 |
18 | #define ECPG_INFORMIX_DIVIDE_ZERO -1202 |
19 | #define ECPG_INFORMIX_BAD_YEAR -1204 |
20 | #define ECPG_INFORMIX_BAD_MONTH -1205 |
21 | #define ECPG_INFORMIX_BAD_DAY -1206 |
22 | #define ECPG_INFORMIX_ENOSHORTDATE -1209 |
23 | #define ECPG_INFORMIX_DATE_CONVERT -1210 |
24 | #define ECPG_INFORMIX_OUT_OF_MEMORY -1211 |
25 | #define ECPG_INFORMIX_ENOTDMY -1212 |
26 | #define ECPG_INFORMIX_BAD_NUMERIC -1213 |
27 | #define ECPG_INFORMIX_BAD_EXPONENT -1216 |
28 | #define ECPG_INFORMIX_BAD_DATE -1218 |
29 | #define -1264 |
30 | |
31 | #ifdef __cplusplus |
32 | extern "C" |
33 | { |
34 | #endif |
35 | |
36 | extern int rdatestr(date, char *); |
37 | extern void rtoday(date *); |
38 | extern int rjulmdy(date, short *); |
39 | extern int rdefmtdate(date *, const char *, const char *); |
40 | extern int rfmtdate(date, const char *, char *); |
41 | extern int rmdyjul(short *, date *); |
42 | extern int rstrdate(const char *, date *); |
43 | extern int rdayofweek(date); |
44 | |
45 | extern int rfmtlong(long, const char *, char *); |
46 | extern int rgetmsg(int, char *, int); |
47 | extern int risnull(int, const char *); |
48 | extern int rsetnull(int, char *); |
49 | extern int rtypalign(int, int); |
50 | extern int rtypmsize(int, int); |
51 | extern int rtypwidth(int, int); |
52 | extern void rupshift(char *); |
53 | |
54 | extern int byleng(char *, int); |
55 | extern void ldchar(char *, int, char *); |
56 | |
57 | extern void ECPG_informix_set_var(int, void *, int); |
58 | extern void *ECPG_informix_get_var(int); |
59 | extern void ECPG_informix_reset_sqlca(void); |
60 | |
61 | /* Informix defines these in decimal.h */ |
62 | int decadd(decimal *, decimal *, decimal *); |
63 | int deccmp(decimal *, decimal *); |
64 | void deccopy(decimal *, decimal *); |
65 | int deccvasc(const char *, int, decimal *); |
66 | int deccvdbl(double, decimal *); |
67 | int deccvint(int, decimal *); |
68 | int deccvlong(long, decimal *); |
69 | int decdiv(decimal *, decimal *, decimal *); |
70 | int decmul(decimal *, decimal *, decimal *); |
71 | int decsub(decimal *, decimal *, decimal *); |
72 | int dectoasc(decimal *, char *, int, int); |
73 | int dectodbl(decimal *, double *); |
74 | int dectoint(decimal *, int *); |
75 | int dectolong(decimal *, long *); |
76 | |
77 | /* Informix defines these in datetime.h */ |
78 | extern void dtcurrent(timestamp *); |
79 | extern int dtcvasc(char *, timestamp *); |
80 | extern int dtsub(timestamp *, timestamp *, interval *); |
81 | extern int dttoasc(timestamp *, char *); |
82 | extern int dttofmtasc(timestamp *, char *, int, char *); |
83 | extern int intoasc(interval *, char *); |
84 | extern int dtcvfmtasc(char *, char *, timestamp *); |
85 | |
86 | #ifdef __cplusplus |
87 | } |
88 | #endif |
89 | |
90 | #endif /* ndef _ECPG_INFORMIX_H */ |
91 | |