ING_DB
This commit is contained in:
parent
455d0943ce
commit
e5fed06d43
|
|
@ -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);
|
||||||
|
}
|
||||||
|
|
@ -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);
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue