#include <string.h>
#include "gis.h"
#include "glocale.h"
Include dependency graph for history.c:
Go to the source code of this file.
Functions | |
int | G_read_history (char *name, char *mapset, struct History *hist) |
read raster history file | |
int | G_write_history (char *name, struct History *hist) |
write raster history file | |
int | G_short_history (char *name, char *type, struct History *hist) |
initialize history structure |
int G_read_history | ( | char * | name, | |
char * | mapset, | |||
struct History * | hist | |||
) |
read raster history file
This routine reads the history file for the raster file name in mapset into the history structure. A diagnostic message is printed and -1 is returned if there is an error reading the history file. Otherwise, 0 is returned.
name | ||
mapset | ||
history |
Definition at line 60 of file history.c.
References G_ascii_check(), G_fopen_old(), G_getl(), G_warning(), G_zero(), and NULL.
int G_short_history | ( | char * | name, | |
char * | type, | |||
struct History * | hist | |||
) |
initialize history structure
This routine initializes the history structure, recording the date, user, module name and the raster file name structure. The type is an anachronism from earlier versions of GRASS and should be specified as "raster". Note. This routine only initializes the data structure. It does not write the history file.
name | ||
type | ||
history |
Definition at line 192 of file history.c.
References G_date(), G_mapset(), G_program_name(), and G_whoami().
int G_write_history | ( | char * | name, | |
struct History * | hist | |||
) |
write raster history file
This routine writes the history file for the raster file name in the current mapset from the history structure. A diagnostic message is printed and -1 is returned if there is an error writing the history file. Otherwise, 0 is returned. Note. The history structure should first be initialized using G_short_history.
name | ||
history |
Definition at line 141 of file history.c.
References fprintf(), G_fopen_new(), and G_warning().