Thu, 13 Mar 2003 11:42:23 +0000
added rules to build binary release tarballs for Red Hat Linux.
1 /*
2 * tumble: build a PDF file from image files
3 *
4 * Semantic routines for spec file parser
5 * $Id: semantics.h,v 1.13 2003/03/13 00:57:05 eric Exp $
6 * Copyright 2001, 2002, 2003 Eric Smith <eric@brouhaha.com>
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation. Note that permission is
11 * not granted to redistribute this program under the terms of any
12 * other version of the General Public License.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA
22 */
25 typedef struct
26 {
27 double width;
28 double height;
29 } page_size_t;
31 typedef struct
32 {
33 int first;
34 int last;
35 } range_t;
37 typedef struct
38 {
39 double left;
40 double right;
41 double top;
42 double bottom;
43 } crop_t;
45 typedef struct
46 {
47 char *prefix;
48 char style;
49 } page_label_t;
52 typedef enum
53 {
54 INPUT_MODIFIER_ALL,
55 INPUT_MODIFIER_ODD,
56 INPUT_MODIFIER_EVEN,
57 INPUT_MODIFIER_TYPE_COUNT /* must be last */
58 } input_modifier_type_t;
61 typedef struct bookmark_t
62 {
63 struct bookmark_t *next;
64 int level; /* 1 is outermost */
65 char *name;
66 } bookmark_t;
69 extern int line; /* line number in spec file */
70 extern int bookmark_level;
73 /* semantic routines for input statements */
74 void input_push_context (void);
75 void input_pop_context (void);
76 void input_set_modifier_context (input_modifier_type_t type);
77 void input_set_file (char *name);
78 void input_set_rotation (int rotation);
79 void input_set_page_size (page_size_t size);
80 void input_images (range_t range);
82 /* semantic routines for output statements */
83 void output_push_context (void);
84 void output_pop_context (void);
86 void output_set_file (char *name);
87 void output_set_author (char *author);
88 void output_set_creator (char *creator);
89 void output_set_title (char *title);
90 void output_set_subject (char *subject);
91 void output_set_keywords (char *keywords);
93 void output_set_bookmark (char *name);
94 void output_set_page_label (page_label_t label);
95 void output_pages (range_t range);
98 /* functions to be called from main program: */
99 bool parse_spec_file (char *fn);
100 bool process_specs (void);