home *** CD-ROM | disk | FTP | other *** search
/ Internet Magazine 2002 February / INTERNET88.ISO / pc / software / windows / bits / pdf995 / data1.cab / Program_Executable_Files / res / unprot.ps < prev    next >
Encoding:
Text File  |  2001-12-08  |  2.2 KB  |  71 lines

  1. %    Copyright (C) 1991, 1992, 1998 Aladdin Enterprises.  All rights reserved.
  2. % This file is part of GNU Ghostscript.
  3. % GNU Ghostscript is distributed in the hope that it will be useful, but
  4. % WITHOUT ANY WARRANTY.  No author or distributor accepts responsibility
  5. % to anyone for the consequences of using it or for whether it serves any
  6. % particular purpose or works at all, unless he says so in writing.  Refer
  7. % to the GNU General Public License for full details.
  8. % Everyone is granted permission to copy, modify and redistribute GNU
  9. % Ghostscript, but only under the conditions described in the GNU General
  10. % Public License.  A copy of this license is supposed to have been given
  11. % to you along with GNU Ghostscript so you can know your rights and
  12. % responsibilities.  It should be in a file named COPYING.  Among other
  13. % things, the copyright notice and this notice must be preserved on all
  14. % copies.
  15.  
  16. % $RCSfile: unprot.ps,v $ $Revision: 1.2.2.1 $
  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
  68.