GRASS GIS 7 Programmer's Manual  7.5.svn(2018)-r72721
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
gis/color_rules.c File Reference

GIS Library - Color tables management subroutines. More...

#include <stdlib.h>
#include <string.h>
#include <grass/gis.h>
#include <grass/glocale.h>
Include dependency graph for gis/color_rules.c:

Go to the source code of this file.

Functions

char * G_color_rules_options (void)
 Get list of color rules for Option->options. More...
 
char * G_color_rules_descriptions (void)
 Get color rules description for Option->descriptions. More...
 
void G_list_color_rules (FILE *out)
 Print color rules. More...
 
int G_find_color_rule (const char *name)
 Check if color rule is defined. More...
 

Detailed Description

GIS Library - Color tables management subroutines.

Taken from r.colors module.

(C) 2001-2011 by the GRASS Development Team

Definition in file gis/color_rules.c.

Function Documentation

char* G_color_rules_descriptions ( void  )

Get color rules description for Option->descriptions.

Returns
allocated buffer with descriptions

Definition at line 63 of file gis/color_rules.c.

References _, G_find_key_value(), G_free(), G_free_key_value(), G_gisbase(), G_read_key_value_file(), G_snprintf(), GPATH_MAX, name, and NULL.

Referenced by G_define_standard_option().

char* G_color_rules_options ( void  )

Get list of color rules for Option->options.

Returns
allocated string buffer with options

Definition at line 25 of file gis/color_rules.c.

References G_free(), list, name, and NULL.

Referenced by G_define_standard_option().

int G_find_color_rule ( const char *  name)

Check if color rule is defined.

Parameters
namecolor rule name
Returns
1 found
0 not found

Definition at line 160 of file gis/color_rules.c.

void G_list_color_rules ( FILE *  out)

Print color rules.

Parameters
outfile where to print

Definition at line 141 of file gis/color_rules.c.