Skip to content

Commit 4e1ed3d

Browse files
author
Michael Meskes
committed
- Added more compatibility functions.
- Accept CPP defines for type definitions. - Do not parse system include files automatically for Informix mode
1 parent 78b0858 commit 4e1ed3d

File tree

12 files changed

+225
-191
lines changed

12 files changed

+225
-191
lines changed

src/interfaces/ecpg/ChangeLog

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1408,6 +1408,12 @@ Tue May 6 11:51:33 CEST 2003
14081408
Tue May 13 13:34:12 CEST 2003
14091409

14101410
- Fixed order of include search path.
1411+
1412+
Wed May 14 13:05:49 CEST 2003
1413+
1414+
- Added more compatibility functions.
1415+
- Accept CPP defines for type definitions.
1416+
- Do not parse system include files automatically for Informix mode
14111417
- Set ecpg version to 2.12.0.
14121418
- Set ecpg library to 3.4.2.
14131419
- Set pgtypes library to 1.0.0

src/interfaces/ecpg/compatlib/informix.c

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -609,6 +609,28 @@ rfmtlong(long lng_val, char *fmt, char *outbuf)
609609
return 0;
610610
}
611611

612+
void
613+
rupshift(char *str)
614+
{
615+
for (; *str != '\0'; str++)
616+
if (islower(*str)) *str = toupper(*str);
617+
return;
618+
}
619+
620+
int
621+
byleng(char *str, int len)
622+
{
623+
for (len--; str[len] && str[len] == ' '; len--);
624+
return (len+1);
625+
}
626+
627+
void
628+
ldchar(char *src, int len, char *dest)
629+
{
630+
memmove(dest, src, len);
631+
dest[len]=0;
632+
}
633+
612634
int
613635
rgetmsg(int msgnum, char *s, int maxsize)
614636
{
@@ -639,13 +661,15 @@ rtypmsize(int type, int len)
639661
return 0;
640662
}
641663

642-
void
643-
rupshift(char *str)
664+
int
665+
rtypwidth(int sqltype, int sqllen)
644666
{
645-
for (; *str != '\0'; str++)
646-
if (islower(*str)) *str = toupper(*str);
647-
return;
667+
return 0;
648668
}
649669

650-
670+
int
671+
dtcvfmtasc (char *inbuf, char *fmtstr, dtime_t *dtvalue)
672+
{
673+
return 0;
674+
}
651675

src/interfaces/ecpg/include/datetime.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ extern int dtsub (dtime_t *, dtime_t *, intrvl_t *);
1515
extern int dttoasc (dtime_t *, char *);
1616
extern int dttofmtasc (dtime_t *, char *, int, char *);
1717
extern int intoasc(intrvl_t *, char *);
18-
18+
extern int dtcvfmtasc(char *, char *, dtime_t *);

src/interfaces/ecpg/include/ecpg_informix.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ extern int risnull(int, char *);
2626
extern int rsetnull(int, char *);
2727
extern int rtypalign(int, int);
2828
extern int rtypmsize(int, int);
29+
extern int rtypwidth(int, int);
2930
extern void rupshift(char *);
3031

31-
32+
extern int byleng(char *, int);
33+
extern void ldchar(char *, int, char *);
34+

src/interfaces/ecpg/preproc/descriptor.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ output_get_descr(char *desc_name, char *index)
192192
break;
193193
}
194194
fprintf(yyout, "%s,", get_dtype(results->value));
195-
ECPGdump_a_type(yyout, v->name, v->type, NULL, NULL, NULL, NULL, 0L, NULL, NULL);
195+
ECPGdump_a_type(yyout, v->name, v->type, NULL, NULL, NULL, NULL, make_str("0"), NULL, NULL);
196196
}
197197
drop_assignments();
198198
fputs("ECPGd_EODT);\n", yyout);

src/interfaces/ecpg/preproc/ecpg.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/ecpg.c,v 1.69 2003/05/13 11:29:14 meskes Exp $ */
1+
/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/ecpg.c,v 1.70 2003/05/14 14:37:35 meskes Exp $ */
22

33
/* New main for ecpg, the PostgreSQL embedded SQL precompiler. */
44
/* (C) Michael Meskes <meskes@postgresql.org> Feb 5th, 1998 */
@@ -162,7 +162,7 @@ main(int argc, char *const argv[])
162162
if (strcmp(optarg, "INFORMIX") == 0)
163163
{
164164
compat = ECPG_COMPAT_INFORMIX;
165-
system_includes = true;
165+
/* system_includes = true; */
166166
add_preprocessor_define("dec_t=Numeric");
167167
add_preprocessor_define("intrvl_t=Interval");
168168
}

src/interfaces/ecpg/preproc/extern.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ extern void add_variable(struct arguments **, struct variable *, struct variable
7777
extern void append_variable(struct arguments **, struct variable *, struct variable *);
7878
extern void dump_variables(struct arguments *, int);
7979
extern struct typedefs *get_typedef(char *);
80-
extern void adjust_array(enum ECPGttype, int *, int *, int, int, int);
80+
extern void adjust_array(enum ECPGttype, char **, char **, char *, char *, int);
8181
extern void reset_variables(void);
8282
extern void check_indicator(struct ECPGtype *);
8383
extern void remove_variables(int);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy