MCPcopy Create free account
hub / github.com/GenericMappingTools/gmt / GMT_Find_Option

Function GMT_Find_Option

src/gmt_parse.c:974–982  ·  view source on GitHub ↗

! Search the list for the selected option and return the pointer to the item. Only the first occurrence will be found. */

Source from the content-addressed store, hash-verified

972
973/*! Search the list for the selected option and return the pointer to the item. Only the first occurrence will be found. */
974struct GMT_OPTION *GMT_Find_Option (void *V_API, char option, struct GMT_OPTION *head) {
975
976 struct GMT_OPTION *current = NULL;
977
978 if (V_API == NULL) return_null (V_API, GMT_NOT_A_SESSION); /* GMT_Create_Session has not been called */
979
980 for (current = head; current && current->option != option; current = current->next); /* Linearly search for the specified option */
981 return (current); /* NULL if not found */
982}
983
984/*! Replaces the argument of this option with new arg. */
985int GMT_Update_Option (void *V_API, struct GMT_OPTION *opt, const char *arg) {

Callers 15

gmt_plotinitFunction · 0.85
GMT_solarFunction · 0.85
parseFunction · 0.85
psternary_prep_optionsFunction · 0.85
GMT_insetFunction · 0.85
GMT_figureFunction · 0.85
gmtapi_process_keysFunction · 0.85
GMT_Encode_OptionsFunction · 0.85
GMT_textFunction · 0.85
GMT_coastFunction · 0.85
gmtinit_is_PS_moduleFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected