GRASS GIS 7 Programmer's Manual  7.9.dev(2021)-e5379bbd7
parse_ftcap.c File Reference

Display Driver - fontcaps. More...

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <grass/gis.h>
#include <grass/glocale.h>
#include <grass/fontcap.h>
#include "driverlib.h"
Include dependency graph for parse_ftcap.c:

Go to the source code of this file.

Functions

int font_exists (const char *name)
 Check if font exists. More...
 
int parse_fontcap_entry (struct GFONT_CAP *e, const char *str)
 Parse fontcap entry. More...
 
struct GFONT_CAPparse_fontcap (void)
 Parse fontcaps. More...
 
void free_fontcap (struct GFONT_CAP *ftcap)
 Free allocated GFONT_CAP structure. More...
 

Detailed Description

Display Driver - fontcaps.

(C) 2006-2011 by the GRASS Development Team

This program is free software under the GNU General Public License (>=v2). Read the file COPYING that comes with GRASS for details.

Author
Glynn Clements <glynn gclements.plus.com> (original contributor)
Huidae Cho <grass4u gmail.com>

Definition in file parse_ftcap.c.

Function Documentation

◆ font_exists()

int font_exists ( const char *  name)

Check if font exists.

Definition at line 27 of file parse_ftcap.c.

References R_OK.

Referenced by COM_Set_font().

◆ free_fontcap()

void free_fontcap ( struct GFONT_CAP ftcap)

Free allocated GFONT_CAP structure.

Parameters
ftcappointer to GFONT_CAP to be freed

Definition at line 124 of file parse_ftcap.c.

References G_free(), GFONT_CAP::longname, GFONT_CAP::name, name, and NULL.

◆ parse_fontcap()

struct GFONT_CAP* parse_fontcap ( void  )

Parse fontcaps.

Returns
pointer to GFONT_CAP structure

Definition at line 73 of file parse_ftcap.c.

References _, file, G_gisbase(), G_realloc, G_warning(), getenv(), GPATH_MAX, GFONT_CAP::name, NULL, parse_fontcap_entry(), and GFONT_CAP::path.

Referenced by LIB_init().

◆ parse_fontcap_entry()

int parse_fontcap_entry ( struct GFONT_CAP e,
const char *  str 
)

Parse fontcap entry.

Parameters
epointer to GFONT_CAP struct
str?
Returns
1 on success
0 on failure

Definition at line 41 of file parse_ftcap.c.

References GNAME_MAX, GPATH_MAX, and name.

Referenced by parse_fontcap().