key_value3.c File Reference

Key_Value management. More...

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

Go to the source code of this file.

Functions

int G_write_key_value_file (const char *file, const struct Key_Value *kv, int *stat)
 Write key/value pairs to file.
struct Key_Value * G_read_key_value_file (const char *file, int *stat)
 Read key/values pairs from file.

Detailed Description

Key_Value management.

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

Author:
CERL

Definition in file key_value3.c.


Function Documentation

struct Key_Value* G_read_key_value_file ( const char *  file,
int *  stat 
) [read]

Read key/values pairs from file.

Allocated memory must be freed G_free_key_value().

Parameters:
[in] file filename for reading
[out] stat status (0 ok, -1 cannot open file, -2 error writing key/value)
Returns:
poiter to allocated Key_Value structure
NULL on error

Definition at line 54 of file key_value3.c.

References G_fread_key_value().

Referenced by G__check_fp_type(), G_ask_proj_name(), G_get_ellipsoid_parameters(), G_get_projinfo(), G_get_projunits(), G_lookup_key_value_from_file(), and G_update_key_value_file().

int G_write_key_value_file ( const char *  file,
const struct Key_Value *  kv,
int *  stat 
)

Write key/value pairs to file.

Parameters:
[in] file filename for writing
[in] kv Key_Value structure
[out] stat status (0 ok, -3 cannot open file, -4 error writing key/value)
Returns:
0 success
1 error writing

Definition at line 29 of file key_value3.c.

References G_fwrite_key_value().

Referenced by G__make_location(), G__write_fp_format(), and G_update_key_value_file().

Generated on Tue Apr 6 13:27:48 2010 for GRASS Programmer's Manual by  doxygen 1.6.3