GRASS Programmer's Manual  6.4.2(2012)
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
g3dhistory.c File Reference
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <grass/glocale.h>
#include "G3d_intern.h"
Include dependency graph for g3dhistory.c:

Go to the source code of this file.

Functions

void SimpleErrorMessage (FILE *fd, const char *name, const char *mapset)
int G3d_readHistory (const char *name, const char *mapset, struct History *hist)
 read raster3d History file
int G3d_writeHistory (const char *name, struct History *hist)
 write raster3d History file

Function Documentation

int G3d_readHistory ( const char *  name,
const char *  mapset,
struct History *  hist 
)

read raster3d History file

This routine reads the History file for the raster3d 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. A warning message is printed if the file is incorrect.

Parameters
name
mapset
history
Returns
int

Definition at line 63 of file g3dhistory.c.

References G__name_is_fully_qualified(), G_ascii_check(), G_fopen_old(), G_getl(), G_zero(), and SimpleErrorMessage().

int G3d_writeHistory ( const char *  name,
struct History *  hist 
)

write raster3d History file

This routine writes the History file for the raster3d 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.

Parameters
name
history
Returns
int

Definition at line 162 of file g3dhistory.c.

References G__name_is_fully_qualified(), and G_fopen_new().

void SimpleErrorMessage ( FILE *  fd,
const char *  name,
const char *  mapset 
)

Definition at line 37 of file g3dhistory.c.

References G_warning(), and NULL.

Referenced by G3d_readHistory().