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); +}