xref: /plan9/sys/src/cmd/gs/src/sa85d.h (revision 593dc095aefb2a85c828727bbfa9da139a49bdf4)
1 /* Copyright (C) 1999 Aladdin Enterprises.  All rights reserved.
2 
3   This software is provided AS-IS with no warranty, either express or
4   implied.
5 
6   This software is distributed under license and may not be copied,
7   modified or distributed except as expressly authorized under the terms
8   of the license contained in the file LICENSE in this distribution.
9 
10   For more information about licensing, please refer to
11   http://www.ghostscript.com/licensing/. For information on
12   commercial licensing, go to http://www.artifex.com/licensing/ or
13   contact Artifex Software, Inc., 101 Lucas Valley Road #110,
14   San Rafael, CA  94903, U.S.A., +1(415)492-9861.
15 */
16 
17 /* $Id: sa85d.h,v 1.5 2002/02/21 22:24:53 giles Exp $ */
18 /* ASCII85Decode filter interface */
19 /* Requires scommon.h; strimpl.h if any templates are referenced */
20 
21 #ifndef sa85d_INCLUDED
22 #  define sa85d_INCLUDED
23 
24 /* ASCII85Decode */
25 typedef struct stream_A85D_state_s {
26     stream_state_common;
27     int odd;			/* # of odd digits */
28     ulong word;			/* word being accumulated */
29 } stream_A85D_state;
30 
31 #define private_st_A85D_state()	/* in sfilter2.c */\
32   gs_private_st_simple(st_A85D_state, stream_A85D_state,\
33     "ASCII85Decode state")
34 /* We define the initialization procedure here, so that the scanner */
35 /* can avoid a procedure call. */
36 #define s_A85D_init_inline(ss)\
37   ((ss)->min_left = 1, (ss)->word = 0, (ss)->odd = 0)
38 extern const stream_template s_A85D_template;
39 
40 #endif /* sa85d_INCLUDED */
41