386BSD 0.1 development
[unix-history] / usr / othersrc / public / ghostscript-2.4.1 / ostack.h
CommitLineData
28d4e807
WJ
1/* Copyright (C) 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/* ostack.h */
21/* Definitions for Ghostscript operand stack */
22
23/********************************
24 * NOTE: on MS-DOS systems, the operand stack is stored in the data segment.
25 * This leads to large performance gains, at the expense of having to swap
26 * the stack explicitly when switching contexts or handling segment under-
27 * or overflow (none of which are implemented yet!).
28 ********************************/
29typedef ref _ds *os_ptr;
30extern os_ptr osbot, osp, ostop;
31
32/* Macro to ensure enough room on the operand stack */
33#define check_ostack(n)\
34 if ( ostop - osp < (n) ) return e_stackoverflow