This commit is contained in:
Oliver Lehmann 1989-06-27 16:31:28 +00:00
parent 455d0943ce
commit e5fed06d43
2 changed files with 54 additions and 0 deletions

View File

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

View File

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