12 G3d_error(
"G3d_keyGetInt: cannot find field %s in key structure",
17 if (sscanf(str,
"%d", i) == 1)
20 G3d_error(
"G3d_keyGetInt: invalid value: field %s in key structure", key);
31 G3d_error(
"G3d_keyGetDouble: cannot find field %s in key structure",
36 if (sscanf(str,
"%lf", d) == 1)
39 G3d_error(
"G3d_keyGetDouble: invalid value: field %s in key structure",
52 G3d_error(
"G3d_keyGetString: cannot find field %s in key structure",
66 char *val2,
int result1,
int result2,
int *resultVar)
71 G3d_error(
"G3d_keyGetValue: cannot find field %s in key structure",
77 if (strcmp(str, val1) == 0) {
81 if (strcmp(str, val2) == 0) {
86 G3d_error(
"G3d_keyGetValue: invalid type: field %s in key structure",
93 int G3d_keySetInt(
struct Key_Value *keys,
const char *key,
const int *i)
97 sprintf(keyValStr,
"%d", *i);
107 sprintf(keyValStr,
"%.50f", *d);
115 char *
const *keyValStr)
124 const char *val2,
int keyval1,
int keyval2,
125 const int *keyvalVar)
127 if (*keyvalVar == keyval1)
129 if (*keyvalVar == keyval2)
132 G3d_error(
"G3d_keySetValue: wrong key value");