Commit | Line | Data |
---|---|---|
a14dfc57 WJ |
1 | /* Copyright (C) 1991 Aladdin Enterprises. All rights reserved. |
2 | Distributed by Free Software Foundation, Inc. | |
3 | ||
4 | This file is part of Ghostscript. | |
5 | ||
6 | Ghostscript is distributed in the hope that it will be useful, but | |
7 | WITHOUT ANY WARRANTY. No author or distributor accepts responsibility | |
8 | to anyone for the consequences of using it or for whether it serves any | |
9 | particular purpose or works at all, unless he says so in writing. Refer | |
10 | to the Ghostscript General Public License for full details. | |
11 | ||
12 | Everyone is granted permission to copy, modify and redistribute | |
13 | Ghostscript, but only under the conditions described in the Ghostscript | |
14 | General Public License. A copy of this license is supposed to have been | |
15 | given to you along with Ghostscript so you can know your rights and | |
16 | responsibilities. It should be in a file named COPYING. Among other | |
17 | things, the copyright notice and this notice must be preserved on all | |
18 | copies. */ | |
19 | ||
20 | /* iutil.h */ | |
21 | /* Prototypes for procedures in iutil.c */ | |
22 | ||
23 | /* ------ Object utilities ------ */ | |
24 | ||
25 | /* Copy refs from one place to another. */ | |
26 | /* (If we are copying to the stack, we can just use memcpy.) */ | |
27 | extern void refcpy_to_new(P3(ref *to, const ref *from, uint size)); | |
28 | extern void refcpy_to_old(P4(ref *to, const ref *from, uint size, const char *client_name)); | |
29 | /* Fill an array with nulls. */ | |
30 | extern void refset_null(P2(ref *to, uint size)); | |
31 | ||
32 | /* Compare two objects for equality. Return 1 if equal, 0 if not. */ | |
33 | extern int obj_eq(P2(const ref *, const ref *)); | |
34 | ||
35 | /* Create a printable representation of an object, a la cvs. */ | |
36 | /* Return 0 if OK, <0 if the destination wasn't large enough. */ | |
37 | extern int obj_cvs(P4(const ref *, byte *, uint, uint *)); | |
38 | ||
39 | /* ------ String utilities ------ */ | |
40 | ||
41 | /* Convert a C string to a Ghostscript string */ | |
42 | extern int string_to_ref(P3(const char *, ref *, const char *)); | |
43 | ||
44 | /* Convert a Ghostscript string to a C string. */ | |
45 | /* Return 0 iff the buffer can't be allocated. */ | |
46 | extern char *ref_to_string(P2(const ref *, const char *)); | |
47 | ||
48 | /* ------ Operand utilities ------ */ | |
49 | ||
50 | /* Get N numeric operands from the stack. */ | |
51 | /* Note that the first argument must be ref * rather than os_ptr, */ | |
52 | /* because num_params is sometimes used elsewhere than */ | |
53 | /* on the operand stack. */ | |
54 | extern int num_params(P3(const ref *, int, float *)); | |
55 | ||
56 | /* Get a real parameter. */ | |
57 | extern int real_param(P2(const ref *, float *)); | |
58 | ||
59 | /* Check for a matrix operand with read access. */ | |
60 | struct gs_matrix_s; | |
61 | extern int read_matrix(P2(const ref *, struct gs_matrix_s *)); | |
62 | ||
63 | /* Check for a matrix operand with write access. */ | |
64 | extern int write_matrix(P1(ref *)); |