From 70130905d10162075d7bb3b8cc0441affee77a05 Mon Sep 17 00:00:00 2001 From: Michael Meskes Date: Fri, 25 Feb 2000 11:11:15 +0000 Subject: [PATCH] *** empty log message *** --- src/interfaces/ecpg/include/ecpglib.h | 2 ++ src/interfaces/ecpg/include/ecpgtype.h | 30 ++++++++++++++++++++++++-- src/interfaces/ecpg/lib/Makefile.in | 4 ++-- src/interfaces/ecpg/lib/prepare.c | 3 ++- 4 files changed, 34 insertions(+), 5 deletions(-) diff --git a/src/interfaces/ecpg/include/ecpglib.h b/src/interfaces/ecpg/include/ecpglib.h index 14e06bf42de..43dd8bf1c4f 100644 --- a/src/interfaces/ecpg/include/ecpglib.h +++ b/src/interfaces/ecpg/include/ecpglib.h @@ -35,6 +35,8 @@ extern "C" enum ECPGttype, void *, void *, long, long); char *ecpg_alloc(long, int); char *ecpg_strdup(const char *, int); + const char *ECPGtype_name(enum ECPGttype); + /* and some vars */ extern struct auto_mem *auto_allocs; diff --git a/src/interfaces/ecpg/include/ecpgtype.h b/src/interfaces/ecpg/include/ecpgtype.h index f766d374f1b..69c0e77a4e7 100644 --- a/src/interfaces/ecpg/include/ecpgtype.h +++ b/src/interfaces/ecpg/include/ecpgtype.h @@ -49,7 +49,8 @@ extern "C" ECPGt_EORT, /* End of result types. */ ECPGt_NO_INDICATOR /* no indicator */ }; - + + /* descriptor items */ enum ECPGdtype { ECPGd_count, @@ -72,7 +73,32 @@ extern "C" #define IS_SIMPLE_TYPE(type) ((type) >= ECPGt_char && (type) <= ECPGt_varchar2) - const char *ECPGtype_name(enum ECPGttype); + /* A generic varchar type. */ + struct ECPGgeneric_varchar + { + int len; + char arr[1]; + }; + +/* keep a list of memory we allocated for the user */ + struct auto_mem + { + void *pointer; + struct auto_mem *next; + }; + +/* structure to store one statement */ + struct statement + { + int lineno; + char *command; + struct connection *connection; + struct variable *inlist; + struct variable *outlist; + }; + + +/* define this for simplicity as well as compatibility */ #ifdef __cplusplus } diff --git a/src/interfaces/ecpg/lib/Makefile.in b/src/interfaces/ecpg/lib/Makefile.in index 7bd94259ab1..1640d970633 100644 --- a/src/interfaces/ecpg/lib/Makefile.in +++ b/src/interfaces/ecpg/lib/Makefile.in @@ -6,7 +6,7 @@ # Copyright (c) 1994, Regents of the University of California # # IDENTIFICATION -# $Header: /cvsroot/pgsql/src/interfaces/ecpg/lib/Attic/Makefile.in,v 1.60 2000/02/23 19:25:42 meskes Exp $ +# $Header: /cvsroot/pgsql/src/interfaces/ecpg/lib/Attic/Makefile.in,v 1.61 2000/02/25 11:11:15 meskes Exp $ # #------------------------------------------------------------------------- @@ -36,7 +36,7 @@ include $(SRCDIR)/Makefile.shlib install: install-lib $(install-shlib-dep) # Handmade dependencies in case make depend not done -ecpglib.o : ecpglib.c ../include/ecpglib.h ../include/ecpgtype.h dynamic.c +ecpglib.o : ecpglib.c ../include/ecpglib.h ../include/ecpgtype.h typename.o : typename.c ../include/ecpgtype.h diff --git a/src/interfaces/ecpg/lib/prepare.c b/src/interfaces/ecpg/lib/prepare.c index 409d289027f..1b78aef6039 100644 --- a/src/interfaces/ecpg/lib/prepare.c +++ b/src/interfaces/ecpg/lib/prepare.c @@ -135,7 +135,8 @@ ECPGdeallocate_all(int lineno) if (!b) return false; } - + + return true; } /* return the prepared statement */