]>
Commit | Line | Data |
---|---|---|
ef416fc2 | 1 | /* |
c07d5b2d | 2 | * "$Id: textcommon.h 177 2006-06-21 00:20:03Z jlovell $" |
ef416fc2 | 3 | * |
4 | * Common text filter definitions for the Common UNIX Printing System (CUPS). | |
5 | * | |
6 | * Copyright 1997-2005 by Easy Software Products. | |
7 | * | |
8 | * These coded instructions, statements, and computer programs are the | |
9 | * property of Easy Software Products and are protected by Federal | |
10 | * copyright law. Distribution and use rights are outlined in the file | |
11 | * "LICENSE.txt" which should have been included with this file. If this | |
12 | * file is missing or damaged please contact Easy Software Products | |
13 | * at: | |
14 | * | |
15 | * Attn: CUPS Licensing Information | |
16 | * Easy Software Products | |
17 | * 44141 Airport View Drive, Suite 204 | |
18 | * Hollywood, Maryland 20636 USA | |
19 | * | |
20 | * Voice: (301) 373-9600 | |
21 | * EMail: cups-info@cups.org | |
22 | * WWW: http://www.cups.org | |
23 | * | |
24 | * This file is subject to the Apple OS-Developed Software exception. | |
25 | */ | |
26 | ||
27 | /* | |
28 | * Include necessary headers... | |
29 | */ | |
30 | ||
31 | #include "common.h" | |
32 | ||
33 | ||
34 | /* | |
35 | * C++ magic... | |
36 | */ | |
37 | ||
38 | #ifdef __cplusplus | |
39 | extern "C" { | |
40 | #endif /* __cplusplus */ | |
41 | ||
42 | ||
43 | /* | |
44 | * Constants... | |
45 | */ | |
46 | ||
47 | #define ATTR_NORMAL 0x00 | |
48 | #define ATTR_BOLD 0x01 | |
49 | #define ATTR_ITALIC 0x02 | |
50 | #define ATTR_BOLDITALIC 0x03 | |
51 | #define ATTR_FONT 0x03 | |
52 | ||
53 | #define ATTR_UNDERLINE 0x04 | |
54 | #define ATTR_RAISED 0x08 | |
55 | #define ATTR_LOWERED 0x10 | |
56 | #define ATTR_RED 0x20 | |
57 | #define ATTR_GREEN 0x40 | |
58 | #define ATTR_BLUE 0x80 | |
59 | ||
60 | #define PRETTY_OFF 0 | |
61 | #define PRETTY_PLAIN 1 | |
62 | #define PRETTY_CODE 2 | |
63 | #define PRETTY_SHELL 3 | |
64 | #define PRETTY_PERL 4 | |
65 | #define PRETTY_HTML 5 | |
66 | ||
67 | ||
68 | /* | |
69 | * Structures... | |
70 | */ | |
71 | ||
72 | typedef struct /**** Character/attribute structure... ****/ | |
73 | { | |
74 | unsigned short ch, /* Character */ | |
75 | attr; /* Any attributes */ | |
76 | } lchar_t; | |
77 | ||
78 | ||
79 | /* | |
80 | * Globals... | |
81 | */ | |
82 | ||
83 | extern int WrapLines, /* Wrap text in lines */ | |
84 | SizeLines, /* Number of lines on a page */ | |
85 | SizeColumns, /* Number of columns on a line */ | |
86 | PageColumns, /* Number of columns on a page */ | |
87 | ColumnGutter, /* Number of characters between text columns */ | |
88 | ColumnWidth, /* Width of each column */ | |
89 | PrettyPrint, /* Do pretty code formatting? */ | |
90 | Copies; /* Number of copies to produce */ | |
91 | extern lchar_t **Page; /* Page characters */ | |
92 | extern int NumPages; /* Number of pages in document */ | |
93 | extern float CharsPerInch, /* Number of character columns per inch */ | |
94 | LinesPerInch; /* Number of lines per inch */ | |
95 | extern int UTF8, /* Use UTF-8 encoding? */ | |
96 | NumKeywords; /* Number of known keywords */ | |
97 | extern char **Keywords; /* List of known keywords... */ | |
98 | ||
99 | ||
100 | /* | |
101 | * Required functions... | |
102 | */ | |
103 | ||
104 | extern int TextMain(const char *name, int argc, char *argv[]); | |
105 | extern void WriteEpilogue(void); | |
106 | extern void WritePage(void); | |
107 | extern void WriteProlog(const char *title, const char *user, | |
108 | const char *classification, const char *label, | |
109 | ppd_file_t *ppd); | |
110 | ||
111 | ||
112 | /* | |
113 | * C++ magic... | |
114 | */ | |
115 | ||
116 | #ifdef __cplusplus | |
117 | } | |
118 | #endif /* __cplusplus */ | |
119 | ||
120 | ||
121 | /* | |
c07d5b2d | 122 | * End of "$Id: textcommon.h 177 2006-06-21 00:20:03Z jlovell $". |
ef416fc2 | 123 | */ |