18 #include <sys/types.h>    30     G_debug(3, 
"dig_write_cidx_head()");
    63     for (i = 0; i < plus->
n_cidx; i++) {
    67         ci = &(plus->
cidx[i]);
    88         for (t = 0; t < ci->
n_types; t++) {
   124     unsigned char buf[5];
   139             "Cidx header: file version %d.%d , supported from GRASS version %d.%d",
   143     G_debug(3, 
"  byte order %d", byte_order);
   153             G_debug(1, 
"Category index format version %d.%d",
   156                 (
_(
"This version of GRASS (%d.%d) is too old to read this category index format."   157                  " Try to rebuild topology or upgrade GRASS to at least version %d."),
   163             (
"Your GRASS version does not fully support category index format %d.%d of the vector."   164              " Consider to rebuild topology or upgrade GRASS.",
   197     for (i = 0; i < plus->
n_cidx; i++) {
   201         ci = &(plus->
cidx[i]);
   222         for (t = 0; t < ci->
n_types; t++) {
   257     for (i = 0; i < plus->
n_cidx; i++) {
   261         ci = &(plus->
cidx[i]);
   265         for (j = 0; j < ci->
n_cats; j++)
   272         for (j = 0; j < ci->
n_cats; j++)
   302         G_debug(3, 
"Cannot read cidx head");
   314     for (i = 0; i < plus->
n_cidx; i++) {
   318         ci = &(plus->
cidx[i]);
   329         for (j = 0; j < ci->
n_cats; j++)
 
void void void void G_fatal_error(const char *,...) __attribute__((format(printf
off_t coor_size
Size of coor file. 
void dig_rewind(struct gvfile *file)
Rewind file position. 
int a_cidx
Allocated space for category indexes. 
struct Version_info cidx
Version info for category index file. 
void dig_init_portable(struct Port_info *, int)
Set Port_info structure to byte order of file. 
int dig__fwrite_port_I(const int *, size_t, struct gvfile *)
Write integers to the Portable Vector Format. 
int dig_type_to_store(int)
Convert type to store type. 
#define GV_CIDX_EARLIEST_MINOR
int n_types
Number of types in type. 
int back_major
Earliest version that can use this data format (major) 
int dig__fwrite_port_C(const char *, size_t, struct gvfile *)
Write chars to the Portable Vector Format. 
int dig__fread_port_I(int *, size_t, struct gvfile *)
Read integers from the Portable Vector Format. 
int dig__fread_port_C(char *, size_t, struct gvfile *)
Read chars from the Portable Vector Format. 
off_t offset
Offset of the beginning of this index in cidx file. 
long cidx_head_size
Category index header size. 
void dig_cidx_free(struct Plus_head *)
int dig__fread_port_L(long *, size_t, struct gvfile *)
Read longs from the Portable Vector Format. 
int field
Field (layer) number. 
#define GRASS_VERSION_MINOR
#define GV_CIDX_VER_MAJOR
off_t dig_ftell(struct gvfile *file)
Get struct gvfile position. 
int dig__fwrite_port_O(const off_t *, size_t, struct gvfile *, size_t)
Write off_ts to the Portable Vector Format. 
int dig_write_cidx(struct gvfile *fp, struct Plus_head *plus)
#define GRASS_VERSION_MAJOR
int n_ucats
Number of unique cats (not updated) 
int cidx_up_to_date
Category index to be updated. 
int off_t_size
Offset size. 
int dig_cidx_init(struct Plus_head *)
Initialize Plus_head structure (cidx) 
#define GV_CIDX_VER_MINOR
Basic topology-related info. 
int major
Current version (major) 
int n_cats
Number of items in cat array. 
int dig_read_cidx(struct gvfile *fp, struct Plus_head *plus, int head_only)
Read spatial index file. 
int dig_type_from_store(int)
Convert type from store type. 
int(* cat)[3]
Array of cats (cat, type, lines/area) 
int byte_order
File byte order. 
int type[7][2]
Number of elements for each type. 
int dig__fread_port_O(off_t *, size_t, struct gvfile *, size_t)
Read off_ts from the Portable Vector Format. 
int a_cats
Allocated space in cat array. 
int dig_write_cidx_head(struct gvfile *fp, struct Plus_head *plus)
void G_warning(const char *,...) __attribute__((format(printf
int minor
Current version (minor) 
int dig_set_cur_port(struct Port_info *)
Set current Port_info structure. 
int dig__fwrite_port_L(const long *, size_t, struct gvfile *)
Write longs to the Portable Vector Format. 
int back_minor
Earliest version that can use this data format (minor) 
struct Port_info cidx_port
Portability information for category index. 
int G_debug(int, const char *,...) __attribute__((format(printf
#define GV_CIDX_EARLIEST_MAJOR
int dig_fseek(struct gvfile *file, off_t offset, int whence)
Set struct gvfile position. 
int dig_read_cidx_head(struct gvfile *fp, struct Plus_head *plus)
Read header of cidx file. 
struct Plus_head::@9 version
Backward compatibility version info. 
int n_cidx
Number of category indexes (one for each field/layer)