File: bseq.h

package info (click to toggle)
gs 3.33-7
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 7,436 kB
  • ctags: 15,511
  • sloc: ansic: 92,150; asm: 684; sh: 486; makefile: 91
file content (55 lines) | stat: -rw-r--r-- 1,601 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/* Copyright (C) 1990, 1994 Aladdin Enterprises.  All rights reserved.
  
  This file is part of GNU Ghostscript.
  
  GNU Ghostscript is distributed in the hope that it will be useful, but
  WITHOUT ANY WARRANTY.  No author or distributor accepts responsibility to
  anyone for the consequences of using it or for whether it serves any
  particular purpose or works at all, unless he says so in writing.  Refer
  to the GNU Ghostscript General Public License for full details.
  
*/

/* bseq.h */
/* Definitions for Level 2 binary object sequences */

/* Binary object sequence element types */
typedef enum {
  bs_null = 0,
  bs_integer = 1,
  bs_real = 2,
  bs_name = 3,
  bs_boolean = 4,
  bs_string = 5,
  bs_eval_name = 6,
  bs_array = 9,
  bs_mark = 10,
	/*
	 * We extend the PostScript language definition by allowing
	 * dictionaries in binary object sequences.  The data for
	 * a dictionary is like that for an array, with the following
	 * changes:
	 *	- If the size is an even number, the value is the index of
	 * the first of a series of alternating keys and values.
	 *	- If the size is 1, the value is the index of another
	 * object (which must also be a dictionary, and must not have
	 * size = 1); this object represents the same object as that one.
	 */
  bs_dictionary = 15
} bin_seq_type;
#define bs_executable 128

/* Definition of an object in a binary object sequence. */
typedef struct {
  byte tx;			/* type and executable flag */
  byte unused;
  union {
    bits16 w;
    byte b[2];
  } size;
  union {
    bits32 w;
    float f;
    byte b[4];
  } value;
} bin_seq_obj;