From e5fed06d43ee0473825785a10854a5ebe7b97b6b Mon Sep 17 00:00:00 2001 From: Oliver Lehmann Date: Tue, 27 Jun 1989 16:31:28 +0000 Subject: [PATCH] ING_DB --- WEGA/contrib/ingres/dbs/src/iutil/typeconv.c | 27 +++++++++++++++++++ .../contrib/ingres/dbs/src/iutil/typeunconv.c | 27 +++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 WEGA/contrib/ingres/dbs/src/iutil/typeconv.c create mode 100644 WEGA/contrib/ingres/dbs/src/iutil/typeunconv.c diff --git a/WEGA/contrib/ingres/dbs/src/iutil/typeconv.c b/WEGA/contrib/ingres/dbs/src/iutil/typeconv.c new file mode 100644 index 0000000..9c371b4 --- /dev/null +++ b/WEGA/contrib/ingres/dbs/src/iutil/typeconv.c @@ -0,0 +1,27 @@ +# include "gen.h" +# include "../h/dbs.h" + +/* +** CONVERT TYPES FROM EXTERNAL TO INTERNAL FORM +** +** Type codes in external form ('c', 'f', or 'i') are converted +** to internal form (CHAR, FLOAT, or INT) and returned. The +** return value is -1 if the parameter is bad. +*/ +typeconv(code) +register int code; +{ + switch (code) + { + case 'c': + return (CHAR); + + case 'f': + return (FLOAT); + + case 'i': + return (INT); + } + + return (-1); +} diff --git a/WEGA/contrib/ingres/dbs/src/iutil/typeunconv.c b/WEGA/contrib/ingres/dbs/src/iutil/typeunconv.c new file mode 100644 index 0000000..70ea48a --- /dev/null +++ b/WEGA/contrib/ingres/dbs/src/iutil/typeunconv.c @@ -0,0 +1,27 @@ +# include "gen.h" +# include "../h/dbs.h" + +/* +** CONVERT TYPES FROM INTERNAL TO EXTERNAL FORM +** +** Type codes in internal form (CHAR, FLOAT, or INT) are +** converted to external form ('c', 'f', or 'i') and returned. +** The return value is -1 if the parameter is bad. +*/ +typeunconv(type) +register int type; +{ + switch (type) + { + case CHAR: + return ('c'); + + case FLOAT: + return ('f'); + + case INT: + return ('i'); + } + + return (-1); +}