Skip to content

Commit

Permalink
Merge pull request #357 from DrylandEcology/bugfix_356_sxwdebug
Browse files Browse the repository at this point in the history
#356 added -sxwdebug.in flag back to the program
  • Loading branch information
chaukap committed Jul 19, 2019
2 parents 21fd1db + cf1cb63 commit cb44d5d
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions ST_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ static void init_args(int argc, char **argv) {
* 10/9/17 - BEB Added -i flag for writing SOILWAT output for every iteration
*/
char str[1024],
*opts[] = {"-d","-f","-q","-e", "-p", "-g", "-o", "-i", "-S"}; /* valid options */
*opts[] = {"-d","-f","-q","-e", "-p", "-g", "-o", "-i", "-s", "-S"}; /* valid options */
int valopts[] = { 1, 1, 0, -1, 0, 0, 0, 0, 0, 0}; /* indicates options with values */
/* 0=none, 1=required, -1=optional */
int i, /* looper through all cmdline arguments */
Expand Down Expand Up @@ -545,8 +545,15 @@ static void init_args(int argc, char **argv) {
printf("storing SOILWAT output for each iteration (-i flag)\n");
storeAllIterations = TRUE;
break;

case 8: // -s
if (strlen(argv[a]) > 1){
printf("Generating SXW debug file\n");
SXW.debugfile = Str_Dup(&argv[a][1]);
}
break;

case 8: // -S
case 9: // -S
if(!strncmp("-STdebug", argv[a], 8)){ // -STdebug
printf("Generating STdebug.sqlite database (-STdebug flag)\n");
STdebug_requested = TRUE;
Expand Down

0 comments on commit cb44d5d

Please sign in to comment.