#include <grass/gis.h>
#include <string.h>

Go to the source code of this file.
Functions | |
| int | G_update_key_value_file (const char *file, const char *key, const char *value) |
| Update file, set up value for given key. | |
| int | G_lookup_key_value_from_file (const char *file, const char *key, char value[], int n) |
| Look up for key in file. | |
(C) 2001-2008 by the GRASS Development Team
This program is free software under the GNU General Public License (>=v2). Read the file COPYING that comes with GRASS for details.
Definition in file key_value4.c.
| int G_lookup_key_value_from_file | ( | const char * | file, | |
| const char * | key, | |||
| char | value[], | |||
| int | n | |||
| ) |
Look up for key in file.
| [in] | file | filename |
| [in] | key | key to be found in file |
| [out] | value | value for key |
| [in] | n | number of characters to be copied |
0 not found
1 ok
Definition at line 64 of file key_value4.c.
References G_find_key_value(), G_free_key_value(), and G_read_key_value_file().
| int G_update_key_value_file | ( | const char * | file, | |
| const char * | key, | |||
| const char * | value | |||
| ) |
Update file, set up value for given key.
| [in] | file | filename to be updated |
| [in] | key | key value |
| [in] | value | value to be updated |
-2 no memory for key,value info, file not modified
-3 can't open file for re-write
-4 error writing the file (might be damaged)
Definition at line 31 of file key_value4.c.
References G_free_key_value(), G_read_key_value_file(), G_set_key_value(), and G_write_key_value_file().
1.5.6