GRASS 8 Programmer's Manual 8.6.0dev(2026)-d2adb3a889
Loading...
Searching...
No Matches
key_value4.c File Reference

Key_Value management. More...

#include <grass/gis.h>
#include <string.h>
Include dependency graph for key_value4.c:

Go to the source code of this file.

Functions

void 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.
 

Detailed Description

Key_Value management.

SPDX-FileCopyrightText: 2001-2014 GRASS Development Team SPDX-License-Identifier: GPL-2.0-or-later

Author
CERL

Definition in file key_value4.c.

Function Documentation

◆ G_lookup_key_value_from_file()

int G_lookup_key_value_from_file ( const char file,
const char key,
char  value[],
int  n 
)

Look up for key in file.

Parameters
[in]filefilename
[in]keykey to be found in file
[out]valuevalue for key
[in]nnumber of characters to be copied
Returns
0 not found
1 ok

Definition at line 44 of file key_value4.c.

References file, G_find_key_value(), G_free_key_value(), G_read_key_value_file(), Key_Value::key, and Key_Value::value.

Referenced by GPJ_osr_to_grass().

◆ G_update_key_value_file()

void G_update_key_value_file ( const char file,
const char key,
const char value 
)

Update file, set up value for given key.

Parameters
[in]filefilename to be updated
[in]keykey value
[in]valuevalue to be updated

Definition at line 22 of file key_value4.c.

References file, G_free_key_value(), G_read_key_value_file(), G_set_key_value(), G_write_key_value_file(), Key_Value::key, and Key_Value::value.