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