386BSD 0.1 development
[unix-history] / usr / othersrc / public / ghostscript-2.4.1 / gstype1.h
CommitLineData
1ffd6e72
WJ
1/* Copyright (C) 1990, 1991 Aladdin Enterprises. All rights reserved.
2 Distributed by Free Software Foundation, Inc.
3
4This file is part of Ghostscript.
5
6Ghostscript is distributed in the hope that it will be useful, but
7WITHOUT ANY WARRANTY. No author or distributor accepts responsibility
8to anyone for the consequences of using it or for whether it serves any
9particular purpose or works at all, unless he says so in writing. Refer
10to the Ghostscript General Public License for full details.
11
12Everyone is granted permission to copy, modify and redistribute
13Ghostscript, but only under the conditions described in the Ghostscript
14General Public License. A copy of this license is supposed to have been
15given to you along with Ghostscript so you can know your rights and
16responsibilities. It should be in a file named COPYING. Among other
17things, the copyright notice and this notice must be preserved on all
18copies. */
19
20/* gstype1.h */
21/* Client interface to Adobe Type 1 font routines for Ghostscript library */
22
23/* Encrypt/decrypt procedures */
24typedef ushort crypt_state;
25#define crypt_charstring_seed 4330
26int gs_type1_encrypt(P4(byte *dest, byte *src, uint len, crypt_state *pstate));
27int gs_type1_decrypt(P4(byte *dest, byte *src, uint len, crypt_state *pstate));
28
29/* CharString interpreter */
30typedef struct gs_type1_state_s gs_type1_state;
31extern const uint gs_type1_state_sizeof;
32#ifndef gs_show_enum_s_DEFINED
33struct gs_show_enum_s;
34#endif
35#ifndef gs_type1_data_s_DEFINED
36struct gs_type1_data_s;
37#endif
38int gs_type1_init(P5(gs_type1_state *pis, struct gs_show_enum_s *penum,
39 int charpath_flag, int paint_type,
40 struct gs_type1_data_s *pdata));
41/* Continue interpreting a Type 1 CharString. */
42/* If str != 0, it is taken as the byte string to interpret. */
43/* Return 0 on successful completion, <0 on error, */
44/* or >0 when client intervention is required. */
45/* The int * argument is where the character is stored for seac, */
46/* or the othersubr # for callothersubr. */
47#define type1_result_seac 1
48#define type1_result_callothersubr 2
49int gs_type1_interpret(P3(gs_type1_state *, byte *, int *));
50/* Pop a (fixed) number off the internal stack */
51int gs_type1_pop(P2(gs_type1_state *, fixed *));