Header And Logo

PostgreSQL
| The world's most advanced open source database.

ecpg_informix.h

Go to the documentation of this file.
00001 /*
00002  * This file contains stuff needed to be as compatible to Informix as possible.
00003  * src/interfaces/ecpg/include/ecpg_informix.h
00004  */
00005 #ifndef _ECPG_INFORMIX_H
00006 #define _ECPG_INFORMIX_H
00007 
00008 #include <ecpglib.h>
00009 #include <pgtypes_date.h>
00010 #include <pgtypes_interval.h>
00011 #include <pgtypes_numeric.h>
00012 #include <pgtypes_timestamp.h>
00013 
00014 #define SQLNOTFOUND 100
00015 
00016 #define ECPG_INFORMIX_NUM_OVERFLOW  -1200
00017 #define ECPG_INFORMIX_NUM_UNDERFLOW -1201
00018 #define ECPG_INFORMIX_DIVIDE_ZERO   -1202
00019 #define ECPG_INFORMIX_BAD_YEAR      -1204
00020 #define ECPG_INFORMIX_BAD_MONTH     -1205
00021 #define ECPG_INFORMIX_BAD_DAY       -1206
00022 #define ECPG_INFORMIX_ENOSHORTDATE  -1209
00023 #define ECPG_INFORMIX_DATE_CONVERT  -1210
00024 #define ECPG_INFORMIX_OUT_OF_MEMORY -1211
00025 #define ECPG_INFORMIX_ENOTDMY       -1212
00026 #define ECPG_INFORMIX_BAD_NUMERIC   -1213
00027 #define ECPG_INFORMIX_BAD_EXPONENT  -1216
00028 #define ECPG_INFORMIX_BAD_DATE      -1218
00029 #define ECPG_INFORMIX_EXTRA_CHARS   -1264
00030 
00031 #ifdef __cplusplus
00032 extern      "C"
00033 {
00034 #endif
00035 
00036 extern int  rdatestr(date, char *);
00037 extern void rtoday(date *);
00038 extern int  rjulmdy(date, short *);
00039 extern int  rdefmtdate(date *, char *, char *);
00040 extern int  rfmtdate(date, char *, char *);
00041 extern int  rmdyjul(short *, date *);
00042 extern int  rstrdate(char *, date *);
00043 extern int  rdayofweek(date);
00044 
00045 extern int  rfmtlong(long, char *, char *);
00046 extern int  rgetmsg(int, char *, int);
00047 extern int  risnull(int, char *);
00048 extern int  rsetnull(int, char *);
00049 extern int  rtypalign(int, int);
00050 extern int  rtypmsize(int, int);
00051 extern int  rtypwidth(int, int);
00052 extern void rupshift(char *);
00053 
00054 extern int  byleng(char *, int);
00055 extern void ldchar(char *, int, char *);
00056 
00057 extern void ECPG_informix_set_var(int, void *, int);
00058 extern void *ECPG_informix_get_var(int);
00059 extern void ECPG_informix_reset_sqlca(void);
00060 
00061 /* Informix defines these in decimal.h */
00062 int         decadd(decimal *, decimal *, decimal *);
00063 int         deccmp(decimal *, decimal *);
00064 void        deccopy(decimal *, decimal *);
00065 int         deccvasc(char *, int, decimal *);
00066 int         deccvdbl(double, decimal *);
00067 int         deccvint(int, decimal *);
00068 int         deccvlong(long, decimal *);
00069 int         decdiv(decimal *, decimal *, decimal *);
00070 int         decmul(decimal *, decimal *, decimal *);
00071 int         decsub(decimal *, decimal *, decimal *);
00072 int         dectoasc(decimal *, char *, int, int);
00073 int         dectodbl(decimal *, double *);
00074 int         dectoint(decimal *, int *);
00075 int         dectolong(decimal *, long *);
00076 
00077 /* Informix defines these in datetime.h */
00078 extern void dtcurrent(timestamp *);
00079 extern int  dtcvasc(char *, timestamp *);
00080 extern int  dtsub(timestamp *, timestamp *, interval *);
00081 extern int  dttoasc(timestamp *, char *);
00082 extern int  dttofmtasc(timestamp *, char *, int, char *);
00083 extern int  intoasc(interval *, char *);
00084 extern int  dtcvfmtasc(char *, char *, timestamp *);
00085 
00086 #ifdef __cplusplus
00087 }
00088 #endif
00089 
00090 #endif   /* ndef _ECPG_INFORMIX_H */