#include <ctype.h>#include <string.h>#include <stdio.h>#include <stdlib.h>#include <errno.h>#include "gis.h"#include "site.h"Include dependency graph for sites.c:

Go to the source code of this file.
Defines | |
| #define | DQUOTE '"' |
| #define | SPACE ' ' |
| #define | BSLASH 92 |
| #define | PIPE '|' |
| #define | ispipe(c) (c==PIPE) |
| #define | isnull(c) (c==(char)NULL) |
| #define | isquote(c) (c==DQUOTE) |
| #define | isbslash(c) (c==BSLASH) |
| #define | FOUND_ALL(s, n, dim, c, d) |
Functions | |
| char * | next_att (char *) |
| void | G_site_free_struct (Site *s) |
| Site * | G_site_new_struct (RASTER_MAP_TYPE cattype, int n_dim, int n_s_att, int n_d_att) |
| int | G_oldsite_get (FILE *fptr, Site *s) |
| int | G__oldsite_get (FILE *ptr, Site *s, int fmt) |
| int | G_oldsite_describe (FILE *ptr, int *dims, int *cat, int *strs, int *dbls) |
| int | G_site_in_region (Site *site, struct Cell_head *region) |
| int | cleanse_string (char *buf) |
| int | G_site_c_cmp (const void *a, const void *b) |
| int | G_site_d_cmp (const void *a, const void *b) |
| int | G_oldsite_s_cmp (const void *a, const void *b) |
| FILE * | G_oldsites_open_old (char *name, char *mapset) |
| FILE * | G_oldsites_open_new (char *name) |
| char * | G_site_format (Site *s, char *fs, int id) |
| #define BSLASH 92 |
| #define DQUOTE '"' |
| #define FOUND_ALL | ( | s, | |||
| n, | |||||
| dim, | |||||
| c, | |||||
| d | ) |
Value:
(((s->cattype != -1 && !n) || \
(dim < s->dim_alloc) || \
(c < s->str_alloc) || \
(d < s->dbl_alloc))?0:1)
Definition at line 115 of file sites.c.
Referenced by G__oldsite_get().
| #define isnull | ( | c | ) | (c==(char)NULL) |
Definition at line 28 of file sites.c.
Referenced by G__oldsite_get(), G_oldsite_describe(), and next_att().
| #define ispipe | ( | c | ) | (c==PIPE) |
| #define PIPE '|' |
| int cleanse_string | ( | char * | buf | ) |
Definition at line 462 of file sites.c.
References BSLASH, DQUOTE, G_index(), NULL, and SPACE.
Referenced by G__oldsite_get(), and G_oldsite_describe().
| int G__oldsite_get | ( | FILE * | ptr, | |
| Site * | s, | |||
| int | fmt | |||
| ) |
Definition at line 127 of file sites.c.
References cleanse_string(), DQUOTE, FOUND_ALL, fprintf(), G_index(), G_scan_easting(), G_scan_northing(), G_strncpy(), isnull, next_att(), NULL, and PIPE.
Referenced by G_oldsite_get().
| int G_oldsite_describe | ( | FILE * | ptr, | |
| int * | dims, | |||
| int * | cat, | |||
| int * | strs, | |||
| int * | dbls | |||
| ) |
Definition at line 274 of file sites.c.
References cleanse_string(), fprintf(), G_index(), G_strstr(), isnull, ispipe, NULL, and PIPE.
| int G_oldsite_get | ( | FILE * | fptr, | |
| Site * | s | |||
| ) |
| FILE* G_oldsites_open_new | ( | char * | name | ) |
| FILE* G_oldsites_open_old | ( | char * | name, | |
| char * | mapset | |||
| ) |
| char* G_site_format | ( | Site * | s, | |
| char * | fs, | |||
| int | id | |||
| ) |
Definition at line 607 of file sites.c.
References G_format_easting(), G_format_northing(), G_index(), G_malloc(), G_projection(), G_strcat(), G_strcpy(), if(), NULL, and SPACE.
| void G_site_free_struct | ( | Site * | s | ) |
| int G_site_in_region | ( | Site * | site, | |
| struct Cell_head * | region | |||
| ) |
Definition at line 438 of file sites.c.
References G_adjust_easting().
Referenced by G_readsites_xyz().
| Site* G_site_new_struct | ( | RASTER_MAP_TYPE | cattype, | |
| int | n_dim, | |||
| int | n_s_att, | |||
| int | n_d_att | |||
| ) |
Definition at line 49 of file sites.c.
References G_fatal_error(), G_free(), G_malloc(), if(), and NULL.
Referenced by G_readsites(), and G_readsites_xyz().
| char * next_att | ( | char * | ) |
1.4.7