blob: 679e4f4fb934db018ac805e250a8df81133a6a13 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
|
/*
* "$Id: testpattern.h,v 1.2.6.1 2002/07/23 00:54:08 rlk Exp $"
*
* Test pattern generator for Gimp-Print
*
* Copyright 2001 Robert Krawitz <rlk@alum.mit.edu>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
typedef struct
{
enum {
E_PATTERN,
E_IMAGE
} t;
union {
struct {
double c_min;
double c;
double c_gamma;
double m_min;
double m;
double m_gamma;
double y_min;
double y;
double y_gamma;
double k_min;
double k;
double k_gamma;
double c_level;
double m_level;
double y_level;
double lower;
double upper;
} p;
struct {
int x;
int y;
int bits;
const char *data;
} i;
} d;
} testpattern_t;
/*
* At least with flex, this forbids the scanner from reading ahead.
* This is necessary for parsing images.
*/
#define YY_ALWAYS_INTERACTIVE 1
extern double global_c_level;
extern double global_c_gamma;
extern double global_m_level;
extern double global_m_gamma;
extern double global_y_level;
extern double global_y_gamma;
extern double global_k_gamma;
extern double global_gamma;
extern int levels;
extern double ink_limit;
extern char *printer;
extern char *ink_type;
extern char *resolution;
extern char *media_source;
extern char *media_type;
extern char *media_size;
extern char *dither_algorithm;
extern double density;
extern double xtop;
extern double xleft;
extern double hsize;
extern double vsize;
extern int noblackline;
extern char *c_strdup(const char *s);
extern testpattern_t *get_next_testpattern(void);
typedef union yylv {
int ival;
double dval;
char *sval;
} YYSTYPE;
extern YYSTYPE yylval;
#include "testpatterny.h"
|