]> git.ipfire.org Git - thirdparty/cups.git/blob - pstoraster/sstring.h
Import cups.org releases
[thirdparty/cups.git] / pstoraster / sstring.h
1 /* Copyright (C) 1996, 1998 Aladdin Enterprises. All rights reserved.
2
3 This file is part of GNU Ghostscript.
4
5 GNU Ghostscript is distributed in the hope that it will be useful, but
6 WITHOUT ANY WARRANTY. No author or distributor accepts responsibility
7 to anyone for the consequences of using it or for whether it serves any
8 particular purpose or works at all, unless he says so in writing. Refer
9 to the GNU General Public License for full details.
10
11 Everyone is granted permission to copy, modify and redistribute GNU
12 Ghostscript, but only under the conditions described in the GNU General
13 Public License. A copy of this license is supposed to have been given
14 to you along with GNU Ghostscript so you can know your rights and
15 responsibilities. It should be in a file named COPYING. Among other
16 things, the copyright notice and this notice must be preserved on all
17 copies.
18
19 Aladdin Enterprises supports the work of the GNU Project, but is not
20 affiliated with the Free Software Foundation or the GNU Project. GNU
21 Ghostscript, as distributed by Aladdin Enterprises, does not require any
22 GNU software to build or run it.
23 */
24
25 /*$Id$ */
26 /* are referenced, but some compilers always require strimpl.h. */
27
28 #ifndef sstring_INCLUDED
29 # define sstring_INCLUDED
30
31 /* ASCIIHexEncode */
32 typedef struct stream_AXE_state_s {
33 stream_state_common;
34 int count; /* # of digits since last EOL */
35 } stream_AXE_state;
36
37 #define private_st_AXE_state() /* in sstring.c */\
38 gs_private_st_simple(st_AXE_state, stream_AXE_state,\
39 "ASCIIHexEncode state")
40 #define s_AXE_init_inline(ss)\
41 ((ss)->count = 0)
42 extern const stream_template s_AXE_template;
43
44 /* ASCIIHexDecode */
45 typedef struct stream_AXD_state_s {
46 stream_state_common;
47 int odd; /* odd digit */
48 } stream_AXD_state;
49
50 #define private_st_AXD_state() /* in sstring.c */\
51 gs_private_st_simple(st_AXD_state, stream_AXD_state,\
52 "ASCIIHexDecode state")
53 #define s_AXD_init_inline(ss)\
54 ((ss)->odd = -1, 0)
55 extern const stream_template s_AXD_template;
56
57 /* PSStringDecode */
58 typedef struct stream_PSSD_state_s {
59 stream_state_common;
60 /* The following are set by the client. */
61 bool from_string; /* true if using Level 1 \ convention */
62 /* The following change dynamically. */
63 int depth;
64 } stream_PSSD_state;
65
66 #define private_st_PSSD_state() /* in sstring.c */\
67 gs_private_st_simple(st_PSSD_state, stream_PSSD_state,\
68 "PSStringDecode state")
69 /* We define the initialization procedure here, so that the scanner */
70 /* can avoid a procedure call. */
71 #define s_PSSD_init_inline(ss)\
72 ((ss)->depth = 0)
73 extern const stream_template s_PSSD_template;
74
75 /* PSStringEncode */
76 /* (no state) */
77 extern const stream_template s_PSSE_template;
78
79 #endif /* sstring_INCLUDED */