home *** CD-ROM | disk | FTP | other *** search
- % Copyright (C) 1991, 1992, 1998 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 General Public License for full details.
- %
- % Everyone is granted permission to copy, modify and redistribute GNU
- % Ghostscript, but only under the conditions described in the GNU General
- % Public License. A copy of this license is supposed to have been given
- % to you along with GNU Ghostscript so you can know your rights and
- % responsibilities. It should be in a file named COPYING. Among other
- % things, the copyright notice and this notice must be preserved on all
- % copies.
-
- % $RCSfile: unprot.ps,v $ $Revision: 1.2.2.1 $
- % Disable all access checks. This is useful for printing out
- % eexec-encrypted Type 1 fonts, and similar purposes.
-
- systemdict wcheck
- { /protdict systemdict def
- }
- { (Please restart Ghostscript with the -dWRITESYSTEMDICT switch.\n) print
- (Some access checks will remain active if you do not do this.\n) print
- flush
- /protdict userdict def
- }
- ifelse
-
- % The procedures we're about to define will go in systemdict,
- % so they must be allocated in global VM.
-
- .currentglobal true .setglobal
-
- protdict begin
- /readonly. /readonly load def
- /executeonly. /executeonly load def
- /noaccess. /noaccess load def
- /readonly { } odef
- /readonly.. /readonly load def
- /executeonly { } odef
- /executeonly.. /executeonly load def
- /noaccess { } odef
- /noaccess.. /noaccess load def
- end
-
- % Disable the access checks.
-
- /unprot
- { protdict begin
- /readonly /readonly.. load def
- /executeonly /executeonly.. load def
- /noaccess /noaccess.. load def
- end
- } bind def
-
- % Re-enable the access checks.
-
- /reprot
- { protdict begin
- /readonly /readonly. load def
- /executeonly /executeonly. load def
- /noaccess /noaccess. load def
- end
- } bind def
-
- .setglobal
-