GRASS GIS 8 Programmer's Manual  8.5.0dev(2024)-36359e2344
raster3d/history.c File Reference
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <grass/glocale.h>
#include "raster3d_intern.h"
#include <grass/raster.h>
Include dependency graph for raster3d/history.c:

Go to the source code of this file.

Functions

void SimpleErrorMessage (FILE *fd, const char *name, const char *mapset)
 
int Rast3d_read_history (const char *name, const char *mapset, struct History *hist)
 read raster3d History file More...
 
int Rast3d_write_history (const char *name, struct History *hist)
 write raster3d History file More...
 

Function Documentation

◆ Rast3d_read_history()

int Rast3d_read_history ( 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 raster3d/history.c.

References G_fopen_old_misc(), G_zero(), name, Rast__read_history(), RASTER3D_DIRECTORY, RASTER3D_HISTORY_ELEMENT, and SimpleErrorMessage().

◆ Rast3d_write_history()

int Rast3d_write_history ( 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 Rast_short_history.

Parameters
name
history
Returns
int

Definition at line 97 of file raster3d/history.c.

References G_fopen_new_misc(), name, Rast__write_history(), RASTER3D_DIRECTORY, and RASTER3D_HISTORY_ELEMENT.

◆ SimpleErrorMessage()

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

Definition at line 37 of file raster3d/history.c.

References _, G_warning(), name, and NULL.

Referenced by Rast3d_read_history().