GRASS GIS 8 Programmer's Manual 8.3.2(2024)-exported
|
GIS Library - Argument parsing functions (standard options) More...
#include <grass/gis.h>
#include <grass/glocale.h>
#include "parser_local_proto.h"
Go to the source code of this file.
Functions | |
struct Option * | G_define_standard_option (int opt) |
Create standardised Option structure. | |
struct Flag * | G_define_standard_flag (int flag) |
Create standardised Flag structure. | |
GIS Library - Argument parsing functions (standard options)
(C) 2001-2019 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.
Definition in file parser_standard_options.c.
struct Flag * G_define_standard_flag | ( | int | flag | ) |
Create standardised Flag structure.
This function will create a standardised Flag structure defined by parameter flag. A list of valid parameters below. It allocates memory for the Flag structure and returns a pointer to this memory.
If an invalid parameter was specified a empty Flag structure will be returned (not NULL).
flag | type of Flag struct to create specified by STD_FLG enum. |
Definition at line 969 of file parser_standard_options.c.
References G_define_flag().
struct Option * G_define_standard_option | ( | int | opt | ) |
Create standardised Option structure.
This function will create a standardised Option structure defined by parameter opt.
Valid parameters are defined by the STD_OPT enum in the file gis.h. A list of valid parameter values sorted to groups is below.
This function allocates memory for the Option structure and returns a pointer to this memory.
If an invalid parameter was specified a empty Option structure will be returned (not NULL).
Values also need to be added to general/g.parser/standard_option.c
opt | type of Option struct to create specified by STD_OPT enum |
Definition at line 139 of file parser_standard_options.c.
References G_asprintf(), G_color_rules_description_type(), G_color_rules_options(), G_define_option(), G_getenv_nofatal(), and G_store().