]> git.lizzy.rs Git - plan9front.git/blob - sys/lib/ghostscript/unprot.ps
[12kq]l: remove unix compat code for cputime()
[plan9front.git] / sys / lib / ghostscript / unprot.ps
1 %    Copyright (C) 1991, 1992, 1998 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 % $Id: unprot.ps,v 1.4 2002/02/21 21:49:28 giles Exp $
17 % Disable all access checks.  This is useful for printing out
18 % eexec-encrypted Type 1 fonts, and similar purposes.
19
20 systemdict wcheck
21  { /protdict systemdict def
22  }
23  { (Please restart Ghostscript with the -dWRITESYSTEMDICT switch.\n) print
24    (Some access checks will remain active if you do not do this.\n) print
25    flush
26    /protdict userdict def
27  }
28 ifelse
29
30 % The procedures we're about to define will go in systemdict,
31 % so they must be allocated in global VM.
32
33 .currentglobal true .setglobal
34
35 protdict begin
36    /readonly. /readonly load def
37    /executeonly. /executeonly load def
38    /noaccess. /noaccess load def
39    /readonly { } odef
40    /readonly.. /readonly load def
41    /executeonly { } odef
42    /executeonly.. /executeonly load def
43    /noaccess { } odef
44    /noaccess.. /noaccess load def
45 end
46
47 % Disable the access checks.
48
49 /unprot
50  { protdict begin
51    /readonly /readonly.. load def
52    /executeonly /executeonly.. load def
53    /noaccess /noaccess.. load def
54    end
55  } bind def
56
57 % Re-enable the access checks.
58
59 /reprot
60  { protdict begin
61    /readonly /readonly. load def
62    /executeonly /executeonly. load def
63    /noaccess /noaccess. load def
64    end
65  } bind def
66
67 .setglobal