17#include <grass/glocale.h>
20#include "gis_local_proto.h"
24 struct Cell_head dbwindow;
27static struct state *st = &state;
52 *window = st->dbwindow;
57 regvar = getenv(
"GRASS_REGION");
66 char *wind = getenv(
"WIND_OVERRIDE");
74 *window = st->dbwindow;
111 const char *
name,
const char *mapset)
115 G_zero(window,
sizeof(
struct Cell_head));
120 G_fatal_error(_(
"Unable to open element file <%s> for <%s@%s>"),
void G_initialize_done(int *p)
int G_is_initialized(int *p)
void G_get_window(struct Cell_head *window)
Get the current region.
void G_get_element_window(struct Cell_head *window, const char *element, const char *name, const char *mapset)
Get region for selected element (raster, vector, window, etc.)
void G_unset_window(void)
Unset current region.
void G_get_default_window(struct Cell_head *window)
Get the default region.
void G_fatal_error(const char *msg,...)
Print a fatal error message to stderr.
FILE * G_fopen_old(const char *element, const char *name, const char *mapset)
Open a database file for reading.
void G_fseek(FILE *fp, off_t offset, int whence)
Change the file position of the stream.
off_t G_ftell(FILE *fp)
Get the current file position of the stream.
const char * G_mapset(void)
Get current mapset name.
void G__read_Cell_head_array(char **array, struct Cell_head *cellhd)
Read window from NULL terminated array of strings (for internal use only)
void G__read_Cell_head(FILE *fd, struct Cell_head *cellhd)
Read cell header (for internal use only)
void G_free_tokens(char **tokens)
Free memory allocated to tokens.
char ** G_tokenize(const char *buf, const char *delim)
Tokenize string.
void G_zero(void *buf, int i)
Zero out a buffer, buf, of length i.