15 #include <grass/gis.h> 16 #include <grass/glocale.h> 30 const char *filename, *band_ref;
34 G_debug(1,
"No band reference detected");
40 if (!filename || !band_ref) {
41 G_debug(1,
"Invalid band reference identifier");
45 G_debug(1,
"Band reference <%s> (%s)", band_ref, filename);
61 const char *filename,
const char *band_reference)
70 G_debug(1,
"Error writing band reference file");
const char * G_find_key_value(const char *key, const struct Key_Value *kv)
Find given key (case sensitive)
struct Key_Value * G_fread_key_value(FILE *fd)
Read key/values pairs from file.
int G_fwrite_key_value(FILE *fd, const struct Key_Value *kv)
Write key/value pairs to file.
void G_free_key_value(struct Key_Value *kv)
Free allocated Key_Value structure.
int G__read_band_reference(FILE *fd, struct Key_Value **key_val)
Read band reference identifier from file (internal use only).
int G_debug(int level, const char *msg,...)
Print debugging message.
int G__write_band_reference(FILE *fd, const char *filename, const char *band_reference)
Write band reference identifier to file (internal use only).
void G_set_key_value(const char *key, const char *value, struct Key_Value *kv)
Set value for given key.
struct Key_Value * G_create_key_value(void)
Allocate and initialize Key_Value structure.