Sun, 16 Mar 2003 13:58:26 +0000
spec files are now called control files.
semantics.c | file | annotate | diff | revisions | |
semantics.h | file | annotate | diff | revisions | |
tumble.c | file | annotate | diff | revisions |
1.1 --- a/semantics.c Fri Mar 14 08:57:40 2003 +0000 1.2 +++ b/semantics.c Sun Mar 16 13:58:26 2003 +0000 1.3 @@ -2,7 +2,7 @@ 1.4 * tumble: build a PDF file from image files 1.5 * 1.6 * Semantic routines for spec file parser 1.7 - * $Id: semantics.c,v 1.21 2003/03/14 00:24:37 eric Exp $ 1.8 + * $Id: semantics.c,v 1.22 2003/03/16 05:58:25 eric Exp $ 1.9 * Copyright 2001, 2002, 2003 Eric Smith <eric@brouhaha.com> 1.10 * 1.11 * This program is free software; you can redistribute it and/or modify 1.12 @@ -596,7 +596,7 @@ 1.13 } 1.14 1.15 1.16 -bool parse_spec_file (char *fn) 1.17 +bool parse_control_file (char *fn) 1.18 { 1.19 bool result = 0; 1.20 1.21 @@ -642,7 +642,7 @@ 1.22 } 1.23 1.24 1.25 -bool process_specs (void) 1.26 +bool process_controls (void) 1.27 { 1.28 input_image_t *image = NULL; 1.29 output_page_t *page = NULL;
2.1 --- a/semantics.h Fri Mar 14 08:57:40 2003 +0000 2.2 +++ b/semantics.h Sun Mar 16 13:58:26 2003 +0000 2.3 @@ -2,7 +2,7 @@ 2.4 * tumble: build a PDF file from image files 2.5 * 2.6 * Semantic routines for spec file parser 2.7 - * $Id: semantics.h,v 1.14 2003/03/14 00:24:37 eric Exp $ 2.8 + * $Id: semantics.h,v 1.15 2003/03/16 05:58:26 eric Exp $ 2.9 * Copyright 2001, 2002, 2003 Eric Smith <eric@brouhaha.com> 2.10 * 2.11 * This program is free software; you can redistribute it and/or modify 2.12 @@ -100,5 +100,5 @@ 2.13 2.14 2.15 /* functions to be called from main program: */ 2.16 -bool parse_spec_file (char *fn); 2.17 -bool process_specs (void); 2.18 +bool parse_control_file (char *fn); 2.19 +bool process_controls (void);
3.1 --- a/tumble.c Fri Mar 14 08:57:40 2003 +0000 3.2 +++ b/tumble.c Sun Mar 16 13:58:26 2003 +0000 3.3 @@ -2,7 +2,7 @@ 3.4 * tumble: build a PDF file from image files 3.5 * 3.6 * Main program 3.7 - * $Id: tumble.c,v 1.35 2003/03/14 00:57:40 eric Exp $ 3.8 + * $Id: tumble.c,v 1.36 2003/03/16 05:58:26 eric Exp $ 3.9 * Copyright 2001, 2002, 2003 Eric Smith <eric@brouhaha.com> 3.10 * 3.11 * This program is free software; you can redistribute it and/or modify 3.12 @@ -80,11 +80,11 @@ 3.13 fprintf (stderr, "http://tumble.brouhaha.com/\n"); 3.14 fprintf (stderr, "\n"); 3.15 fprintf (stderr, "usage:\n"); 3.16 - fprintf (stderr, " %s [options] -s spec\n", progname); 3.17 + fprintf (stderr, " %s [options] -c <control.tum>\n", progname); 3.18 fprintf (stderr, " %s [options] <input.tif>... -o <output.pdf>\n", progname); 3.19 fprintf (stderr, "options:\n"); 3.20 - fprintf (stderr, " -v verbose\n"); 3.21 - fprintf (stderr, " -b fmt create bookmarks\n"); 3.22 + fprintf (stderr, " -v verbose\n"); 3.23 + fprintf (stderr, " -b <fmt> create bookmarks\n"); 3.24 fprintf (stderr, "bookmark format:\n"); 3.25 fprintf (stderr, " %%F file name (sans suffix)\n"); 3.26 fprintf (stderr, " %%p page number\n"); 3.27 @@ -635,18 +635,18 @@ 3.28 } 3.29 3.30 3.31 -void main_spec (char *spec_fn) 3.32 +void main_control (char *control_fn) 3.33 { 3.34 - if (! parse_spec_file (spec_fn)) 3.35 - fatal (2, "error parsing spec file\n"); 3.36 - if (! process_specs ()) 3.37 - fatal (3, "error processing spec file\n"); 3.38 + if (! parse_control_file (control_fn)) 3.39 + fatal (2, "error parsing control file\n"); 3.40 + if (! process_controls ()) 3.41 + fatal (3, "error processing control file\n"); 3.42 } 3.43 3.44 3.45 int main (int argc, char *argv[]) 3.46 { 3.47 - char *spec_fn = NULL; 3.48 + char *control_fn = NULL; 3.49 char *out_fn = NULL; 3.50 char *bookmark_fmt = NULL; 3.51 int inf_count = 0; 3.52 @@ -673,13 +673,13 @@ 3.53 else 3.54 fatal (1, "missing filename after \"-o\" option\n"); 3.55 } 3.56 - else if (strcmp (argv [1], "-s") == 0) 3.57 + else if (strcmp (argv [1], "-c") == 0) 3.58 { 3.59 if (argc) 3.60 { 3.61 argc--; 3.62 argv++; 3.63 - spec_fn = argv [1]; 3.64 + control_fn = argv [1]; 3.65 } 3.66 else 3.67 fatal (1, "missing filename after \"-s\" option\n"); 3.68 @@ -705,17 +705,17 @@ 3.69 argv++; 3.70 } 3.71 3.72 - if (! ((! out_fn) ^ (! spec_fn))) 3.73 - fatal (1, "either a spec file or an output file (but not both) must be specified\n"); 3.74 + if (! ((! out_fn) ^ (! control_fn))) 3.75 + fatal (1, "either a control file or an output file (but not both) must be specified\n"); 3.76 3.77 if (out_fn && ! inf_count) 3.78 fatal (1, "no input files specified\n"); 3.79 3.80 - if (spec_fn && inf_count) 3.81 - fatal (1, "if spec file is provided, input files can't be specified as arguments\n"); 3.82 + if (control_fn && inf_count) 3.83 + fatal (1, "if control file is provided, input files can't be specified as arguments\n"); 3.84 3.85 - if (spec_fn) 3.86 - main_spec (spec_fn); 3.87 + if (control_fn) 3.88 + main_control (control_fn); 3.89 else 3.90 main_args (out_fn, inf_count, in_fn, bookmark_fmt); 3.91