12 Rast3d_error(
"Rast3d_key_get_int: cannot find field %s in key structure",
17 if (sscanf(str,
"%d", i) == 1)
20 Rast3d_error(
"Rast3d_key_get_int: invalid value: field %s in key structure", key);
31 Rast3d_error(
"Rast3d_key_get_double: cannot find field %s in key structure",
36 if (sscanf(str,
"%lf", d) == 1)
39 Rast3d_error(
"Rast3d_key_get_double: invalid value: field %s in key structure",
52 Rast3d_error(
"Rast3d_key_get_string: cannot find field %s in key structure",
65 char *val2,
int result1,
int result2,
int *resultVar)
70 Rast3d_error(
"Rast3d_key_get_value: cannot find field %s in key structure",
75 if (strcmp(str, val1) == 0) {
79 if (strcmp(str, val2) == 0) {
84 Rast3d_error(
"Rast3d_key_get_value: invalid type: field %s in key structure",
95 sprintf(keyValStr,
"%d", *i);
106 sprintf(keyValStr,
"%.50f", *d);
115 char *
const *keyValStr)
125 const char *val2,
int keyval1,
int keyval2,
126 const int *keyvalVar)
128 if (*keyvalVar == keyval1) {
133 if (*keyvalVar == keyval2) {
int Rast3d_key_set_string(struct Key_Value *keys, const char *key, char *const *keyValStr)
int Rast3d_key_set_value(struct Key_Value *keys, const char *key, const char *val1, const char *val2, int keyval1, int keyval2, const int *keyvalVar)
int Rast3d_key_get_int(struct Key_Value *keys, const char *key, int *i)
int Rast3d_key_get_double(struct Key_Value *keys, const char *key, double *d)
void Rast3d_error(const char *,...) __attribute__((format(printf
int Rast3d_key_set_double(struct Key_Value *keys, const char *key, const double *d)
void G_set_key_value(const char *, const char *, struct Key_Value *)
Set value for given key.
int Rast3d_key_get_string(struct Key_Value *keys, const char *key, char **returnStr)
char * G_store(const char *)
Copy string to allocated memory.
int Rast3d_key_set_int(struct Key_Value *keys, const char *key, const int *i)
const char * G_find_key_value(const char *, const struct Key_Value *)
Find given key (case sensitive)
int Rast3d_key_get_value(struct Key_Value *keys, const char *key, char *val1, char *val2, int result1, int result2, int *resultVar)