Skip to content

Commit

Permalink
Merge more release 0.33 changes which were apparently missing in svn …
Browse files Browse the repository at this point in the history
…import.
  • Loading branch information
brouhaha committed Jun 24, 2016
1 parent 37fad81 commit a355304
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions tumble.c
Original file line number Diff line number Diff line change
Expand Up @@ -353,18 +353,22 @@ void main_args (char *out_fn,
}


#ifdef CTL_LANG
void main_control (char *control_fn)
{
if (! parse_control_file (control_fn))
fatal (2, "error parsing control file\n");
if (! process_controls ())
fatal (3, "error processing control file\n");
}
#endif


int main (int argc, char *argv[])
{
#ifdef CTL_LANG
char *control_fn = NULL;
#endif
char *out_fn = NULL;
char *bookmark_fmt = NULL;
int inf_count = 0;
Expand Down Expand Up @@ -429,19 +433,27 @@ int main (int argc, char *argv[])
argv++;
}

#ifdef CTL_LANG
if (! ((! out_fn) ^ (! control_fn)))
fatal (1, "either a control file or an output file (but not both) must be specified\n");
if (control_fn && inf_count)
fatal (1, "if control file is provided, input files can't be specified as arguments\n");
#else
if (! out_fn)
fatal (1, "an output file must be specified\n");
#endif

if (out_fn && ! inf_count)
fatal (1, "no input files specified\n");

if (control_fn && inf_count)
fatal (1, "if control file is provided, input files can't be specified as arguments\n");

#ifdef CTL_LANG
if (control_fn)
main_control (control_fn);
else
main_args (out_fn, inf_count, in_fn, bookmark_fmt);
#else
main_args (out_fn, inf_count, in_fn, bookmark_fmt);
#endif

close_input_file ();
close_pdf_output_files ();
Expand Down

0 comments on commit a355304

Please sign in to comment.