GRASS GIS 8 Programmer's Manual  8.5.0dev(2024)-36359e2344
symbol/read.c File Reference
#include <stdlib.h>
#include <string.h>
#include <dirent.h>
#include <grass/gis.h>
#include <grass/symbol.h>
#include <grass/glocale.h>
Include dependency graph for symbol/read.c:

Go to the source code of this file.

Macros

#define OBJ_NONE   0
 
#define OBJ_STRING   1
 
#define OBJ_POLYGON   2
 
#define OBJ_RING   3
 

Functions

void get_key_data (char *buf)
 
SYMBOLnew_symbol (void)
 
void add_part (SYMBOL *s, SYMBPART *p)
 
SYMBPARTnew_part (int type)
 
void add_chain (SYMBPART *p, SYMBCHAIN *s)
 
SYMBCHAINnew_chain (void)
 
void add_element (SYMBCHAIN *s, SYMBEL *e)
 
SYMBELnew_line (void)
 
void add_point (SYMBEL *el, double x, double y)
 
SYMBELnew_arc (double x, double y, double r, double a1, double a2, int c)
 
void read_coor (FILE *fp, SYMBEL *e)
 
SYMBOLerr (FILE *fp, SYMBOL *s, char *msg)
 
SYMBOLS_read (const char *sname)
 

Macro Definition Documentation

◆ OBJ_NONE

#define OBJ_NONE   0

Definition at line 27 of file symbol/read.c.

◆ OBJ_POLYGON

#define OBJ_POLYGON   2

Definition at line 29 of file symbol/read.c.

◆ OBJ_RING

#define OBJ_RING   3

Definition at line 30 of file symbol/read.c.

◆ OBJ_STRING

#define OBJ_STRING   1

Definition at line 28 of file symbol/read.c.

Function Documentation

◆ add_chain()

void add_chain ( SYMBPART p,
SYMBCHAIN s 
)

Definition at line 99 of file symbol/read.c.

◆ add_element()

void add_element ( SYMBCHAIN s,
SYMBEL e 
)

Definition at line 128 of file symbol/read.c.

◆ add_part()

void add_part ( SYMBOL s,
SYMBPART p 
)

Definition at line 71 of file symbol/read.c.

◆ add_point()

void add_point ( SYMBEL el,
double  x,
double  y 
)

Definition at line 154 of file symbol/read.c.

References SYMBEL::coor, G_realloc, SYMBEL::line, and x.

◆ err()

◆ get_key_data()

void get_key_data ( char *  buf)

Definition at line 33 of file symbol/read.c.

References G_debug().

Referenced by read_coor().

◆ new_arc()

SYMBEL* new_arc ( double  x,
double  y,
double  r,
double  a1,
double  a2,
int  c 
)

Definition at line 169 of file symbol/read.c.

◆ new_chain()

◆ new_line()

SYMBEL* new_line ( void  )

Definition at line 140 of file symbol/read.c.

References SYMBEL::coor, G_malloc, SYMBEL::line, NULL, S_LINE, and SYMBEL::type.

◆ new_part()

SYMBPART* new_part ( int  type)

Definition at line 84 of file symbol/read.c.

◆ new_symbol()

SYMBOL* new_symbol ( void  )

Definition at line 58 of file symbol/read.c.

References SYMBOL::alloc, SYMBOL::count, G_malloc, NULL, SYMBOL::part, and SYMBOL::scale.

◆ read_coor()

void read_coor ( FILE *  fp,
SYMBEL e 
)

Definition at line 185 of file symbol/read.c.

References G_chop(), G_debug(), G_getl2(), get_key_data(), and x.

◆ S_read()

SYMBOL* S_read ( const char *  sname)

Definition at line 231 of file symbol/read.c.

References l, and name.