#include <grass/config.h>
#include <string.h>
#include <grass/gis.h>
#include <unistd.h>
#include <fcntl.h>
Go to the source code of this file.
Functions | |
int | G__open (char *element, char *name, char *mapset, int mode) |
int | G_open_new (char *element, char *name) |
open a new database file | |
int | G_open_old (char *element, char *name, char *mapset) |
open a database file for reading | |
int | G_open_update (char *element, char *name) |
open a database file for update | |
FILE * | G_fopen_new (char *element, char *name) |
open a new database file | |
FILE * | G_fopen_old (char *element, char *name, char *mapset) |
open a database file for reading | |
FILE * | G_fopen_append (char *element, char *name) |
FILE * | G_fopen_modify (char *element, char *name) |
int G__open | ( | char * | element, | |
char * | name, | |||
char * | mapset, | |||
int | mode | |||
) |
Definition at line 93 of file open.c.
References G__check_gisinit(), G__file_name(), G__make_mapset_element(), G__name_is_fully_qualified(), G_find_file(), G_free(), G_legal_filename(), G_mapset(), and NULL.
Referenced by G_fopen_append(), G_fopen_modify(), G_fopen_new(), G_fopen_old(), G_open_new(), G_open_old(), and G_open_update().
FILE* G_fopen_append | ( | char * | element, | |
char * | name | |||
) |
FILE* G_fopen_modify | ( | char * | element, | |
char * | name | |||
) |
FILE* G_fopen_new | ( | char * | element, | |
char * | name | |||
) |
open a new database file
The database file name under the element in the current mapset is created and opened for writing (but not reading). The UNIX fopen( ) routine, with "w" write mode, is used to open the file. If the file does not exist, the NULL pointer is returned. Otherwise the file is positioned at the end of the file and the file descriptor from the fopen( ) is returned.
element | ||
name |
Definition at line 233 of file open.c.
References G__open(), and G_mapset().
Referenced by G__put_window(), G__quant_export(), G__write_cats(), G_put_3dview(), G_put_cell_title(), G_put_cellhd(), G_write_colors(), G_write_history(), and G_write_range().
FILE* G_fopen_old | ( | char * | element, | |
char * | name, | |||
char * | mapset | |||
) |
open a database file for reading
The database file name under the element in the specified mapset is opened for reading (but not for writing). The UNIX fopen( ) routine, with "r" read mode, is used to open the file. If the file does not exist, the NULL pointer is returned. Otherwise the file descriptor from the fopen( ) is returned.
element | ||
name | ||
mapset |
Definition at line 262 of file open.c.
References G__open().
Referenced by G__get_window(), G__quant_import(), G__read_cats(), G_get_3dview(), G_get_cell_title(), G_get_cellhd(), G_get_dig_title(), G_put_cell_title(), G_read_histogram(), G_read_history(), and G_read_range().
int G_open_new | ( | char * | element, | |
char * | name | |||
) |
open a new database file
The database file name under the element in the current mapset is created and opened for writing (but not reading). The UNIX open( ) routine is used to open the file. If the file does not exist, -1 is returned. Otherwise the file is positioned at the end of the file and the file descriptor from the open( ) is returned.
element | ||
name |
Definition at line 167 of file open.c.
References G__open(), and G_mapset().
Referenced by G_write_fp_range().
int G_open_old | ( | char * | element, | |
char * | name, | |||
char * | mapset | |||
) |
open a database file for reading
The database file name under the element in the specified mapset is opened for reading (but not for writing). The UNIX open( ) routine is used to open the file. If the file does not exist, -1 is returned. Otherwise the file descriptor from the open( ) is returned.
element | ||
name | ||
mapset |
Definition at line 188 of file open.c.
References G__open().
Referenced by G__open_cell_old(), and G_read_fp_range().
int G_open_update | ( | char * | element, | |
char * | name | |||
) |
open a database file for update
The database file name under the element in the current mapset is opened for reading and writing. The UNIX open( ) routine is used to open the file. If the file does not exist, -1 is returned. Otherwise the file is positioned at the end of the file and the file descriptor from the open( ) is returned.
element | ||
name |
Definition at line 208 of file open.c.
References G__open(), and G_mapset().