#include <gp.h> #include <uif.h> #include <typenames.h> int prmtype(param, help, deflag, defval, type, nreply) char *param; char *help; int deflag; int defval; int *type; int *nreply; int prmtypes(param, help, deflag, defval, least, most, type, nreply) char *param; char *help; int deflag; int defval; int least; int most; int type[]; int *nreply; int typecode(name) char *name; char *typename(code, name) int code; char *name;
The functions described here are utility functions for retrieving and manipulating TDF data type parameters (datasets).
prmtype and prmtypes query the user for TDF dataset types. Valid types are described in datasets. If these functions are used in conjunction with cmdform, the parameters can be entered on the command line.
Function arguments are defined as follows:
param - parameter name, length no greater than MAX_PARAM_NAME.
help - obsolete, use NULL
deflag -default flag, either NO_DEFAULT, HAS_DEFAULT or OPTIONAL. OPTIONAL parameters also have defaults.
defval - default value, e.g. GP_FLOAT.
least - the least number of types that are required
most - the most number of types that can be specified
type - returned value(s) in coded format, e.g. GP_FLOAT
nreply - 0 if user accepted default value 1 if user did not accept
typecode returns the typecode for a given type name, see include/typenames.h and include/gp.h.
typename returns the typename for a given type code, see include/typenames.h and include/gp.h.
prmtype, prmtypes and prmcode return 0 if successful. Otherwise they return -1 and set terrno to the appropriate error code.
prmname return a valid typename if successful. Otherwise it returns NULL and sets terrno to the appropriate error code.
The following error codes are defined in include/uif.h:
EUIF_SIGNAL - Signal occurred during input
EUIF_EOF - Unexpected end of input
EGP_BAD_DATATYPE - Invalid datatype
include/gp.h, include/uif.h, include/typenames.h, lib/libapp.a
gpatt, gpdim, gperr, gplink, gpname, gprel, gpset, gptype, gpvar, datasets
Last Update: $Date: 1999/05/10 20:57:08 $