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

Function gmtlib_parse_B_option

src/gmt_init.c:5153–5175  ·  view source on GitHub ↗

! . */

Source from the content-addressed store, hash-verified

5151
5152/*! . */
5153int gmtlib_parse_B_option (struct GMT_CTRL *GMT, char *in) {
5154 int error = 0;
5155 if (GMT->common.B.mode == 0) {
5156 GMT_Report (GMT->parent, GMT_MSG_ERROR, "Internal error: Calling gmtlib_parse_B_option before gmt_check_b_options somehow\n");
5157 error = 1;
5158 }
5159 else if (GMT->common.B.mode == -1) {
5160 GMT_Report (GMT->parent, GMT_MSG_ERROR, "Option -B: Mixing of GMT 4 and 5 level syntax is not possible\n");
5161 error = 1;
5162 }
5163 else if (GMT->common.B.mode == 4) { /* Got GMT 4 syntax */
5164 if (gmt_M_compat_check (GMT, 4))
5165 error = gmtinit_parse4_B_option (GMT, in);
5166 else {
5167 GMT_Report (GMT->parent, GMT_MSG_ERROR, "Option -B: Cannot use GMT 4 syntax except in GMT classic with compatibility mode\n");
5168 error = 1;
5169 }
5170 }
5171 else /* Clean >= GMT5 syntax */
5172 error = gmtinit_parse5_B_option (GMT, in);
5173
5174 return (error);
5175}
5176
5177/*! . */
5178GMT_LOCAL int gmtinit_project_type (char *args, int *pos, bool *width_given) {

Callers 2

GMT_psscaleFunction · 0.85
gmt_parse_common_optionsFunction · 0.85

Calls 3

GMT_ReportFunction · 0.85
gmtinit_parse4_B_optionFunction · 0.85
gmtinit_parse5_B_optionFunction · 0.85

Tested by

no test coverage detected