@@ -6718,7 +6718,7 @@ GMT_LOCAL int gmtinit_get_language (struct GMT_CTRL *GMT) {
6718
6718
}
6719
6719
6720
6720
/*! . */
6721
- GMT_LOCAL void gmtinit_conf_classic_US (struct GMT_CTRL *GMT) {
6721
+ EXTERN_MSC void gmtinit_conf_classic_US (struct GMT_CTRL *GMT) {
6722
6722
int i, case_val;
6723
6723
/* Update the settings to US where they differ from standard SI settings:
6724
6724
* Setting SI US
@@ -6759,7 +6759,7 @@ GMT_LOCAL void gmtinit_conf_classic_US (struct GMT_CTRL *GMT) {
6759
6759
}
6760
6760
6761
6761
/*! . */
6762
- GMT_LOCAL void gmtinit_conf_classic (struct GMT_CTRL *GMT) {
6762
+ EXTERN_MSC void gmtinit_conf_classic (struct GMT_CTRL *GMT) {
6763
6763
int i, error = 0;
6764
6764
char path[PATH_MAX] = {""};
6765
6765
double const pt = 1.0/72.0; /* points to inch */
@@ -7274,13 +7274,13 @@ GMT_LOCAL void gmtinit_conf_modern_override (struct GMT_CTRL *GMT) {
7274
7274
GMT_Report (GMT->parent, GMT_MSG_ERROR, "Unrecognized value during gmtdefaults modern initialization.\n");}
7275
7275
7276
7276
/*! . */
7277
- GMT_LOCAL void gmtinit_conf_modern_US (struct GMT_CTRL *GMT) {
7277
+ void gmtinit_conf_modern_US (struct GMT_CTRL *GMT) {
7278
7278
gmtinit_conf_classic_US (GMT); /* Override with US settings */
7279
7279
gmtinit_conf_modern_override (GMT);
7280
7280
}
7281
7281
7282
7282
/*! . */
7283
- GMT_LOCAL void gmtinit_conf_modern (struct GMT_CTRL *GMT) {
7283
+ void gmtinit_conf_modern (struct GMT_CTRL *GMT) {
7284
7284
/* REPLACE WITH gmtinit_conf_modern when ready */
7285
7285
gmtinit_conf_classic (GMT);
7286
7286
gmtinit_conf_modern_override (GMT);
@@ -10930,6 +10930,14 @@ unsigned int gmtlib_setparameter (struct GMT_CTRL *GMT, const char *keyword, cha
10930
10930
case_val = gmt_hash_lookup (GMT, keyword, keys_hashnode, GMT_N_KEYS, GMT_N_KEYS);
10931
10931
10932
10932
switch (case_val) {
10933
+ case GMTCASE_GMT_RUN_MODE: /* Allow changing to/from CLASSIC/MODERN mode */
10934
+ if (strcmp(value, "0") && strcmp(value, "1")) {
10935
+ error = true;
10936
+ GMT_Report (GMT->parent, GMT_MSG_ERROR, "Unrecognized value %s for SET_RUN_MODE\n", value);
10937
+ break;
10938
+ }
10939
+ GMT->current.setting.run_mode = atoi(value);
10940
+ break;
10933
10941
/* FORMAT GROUP */
10934
10942
case GMTCASE_INPUT_CLOCK_FORMAT:
10935
10943
gmt_M_compat_translate ("FORMAT_CLOCK_IN");
@@ -12641,6 +12649,9 @@ char *gmtlib_getparameter (struct GMT_CTRL *GMT, const char *keyword) {
12641
12649
case_val = gmt_hash_lookup (GMT, keyword, keys_hashnode, GMT_N_KEYS, GMT_N_KEYS);
12642
12650
12643
12651
switch (case_val) {
12652
+ case GMTCASE_GMT_RUN_MODE: /* Gat the current running mode CLASSIC or MODERN */
12653
+ sprintf (value, "%d", GMT->current.setting.run_mode);
12654
+ break;
12644
12655
/* FORMAT GROUP */
12645
12656
case GMTCASE_INPUT_CLOCK_FORMAT:
12646
12657
if (gmt_M_compat_check (GMT, 4)) /* GMT4: */
0 commit comments