patch.err.ps 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. %!PS-Adobe
  2. % lib/ehandler.ps -- Downloaded Error Break-page handler
  3. % Copyright (c) 1984, 1985, 1986 Adobe Systems Incorporated.
  4. % All Rights Reserved.
  5. 0000 % serverloop password
  6. /$brkpage where
  7. {pop pop(Error Handler in place - not loaded again\n)print flush stop}
  8. {dup serverdict begin statusdict begin checkpassword
  9. {(Error Handler downloaded.\n)print flush exitserver}
  10. {pop(Bad Password on loading error handler!!!\n)print flush stop}ifelse
  11. }ifelse
  12. /$brkpage 64 dict def $brkpage begin
  13. /prnt
  14. {dup type/stringtype ne{=string cvs}if dup length 6 mul/tx exch def/ty 10 def
  15. currentpoint/toy exch def/tox exch def 1 setgray newpath
  16. tox toy 2 sub moveto 0 ty rlineto tx 0 rlineto 0 ty neg rlineto
  17. closepath fill tox toy moveto 0 setgray show}bind def
  18. /nl{currentpoint exch pop lmargin exch moveto 0 -10 rmoveto}def
  19. /=={/cp 0 def typeprint nl}def
  20. /typeprint{dup type dup currentdict exch known
  21. {exec}{unknowntype}ifelse}readonly def
  22. /lmargin 72 def/rmargin 72 def
  23. /tprint{dup length cp add rmargin gt{nl/cp 0 def}if
  24. dup length cp add/cp exch def prnt}readonly def
  25. /cvsprint{=string cvs tprint( )tprint}readonly def
  26. /unknowntype{exch pop cvlit(??)tprint cvsprint}readonly def
  27. /integertype{cvsprint}readonly def
  28. /realtype{cvsprint}readonly def
  29. /booleantype{cvsprint}readonly def
  30. /operatortype{(//)tprint cvsprint}readonly def
  31. /marktype{pop(-mark- )tprint}readonly def
  32. /dicttype{pop(-dictionary- )tprint}readonly def
  33. /nulltype{pop(-null- )tprint}readonly def
  34. /filetype{pop(-filestream- )tprint}readonly def
  35. /savetype{pop(-savelevel- )tprint}readonly def
  36. /fonttype{pop(-fontid- )tprint}readonly def
  37. /nametype{dup xcheck not{(/)tprint}if cvsprint}readonly def
  38. /stringtype
  39. {dup rcheck{(\()tprint tprint(\))tprint}{pop(-string- )tprint}ifelse
  40. }readonly def
  41. /arraytype
  42. {dup rcheck{dup xcheck
  43. {({)tprint{typeprint}forall(})tprint}
  44. {([)tprint{typeprint}forall(])tprint}ifelse}{pop(-array- )tprint}ifelse
  45. }readonly def
  46. /packedarraytype
  47. {dup rcheck{dup xcheck
  48. {({)tprint{typeprint}forall(})tprint}
  49. {([)tprint{typeprint}forall(])tprint}ifelse}{pop(-packedarray- )tprint}ifelse
  50. }readonly def
  51. /courier/Courier findfont 10 scalefont def
  52. /OLDhandleerror errordict /handleerror get def
  53. end %$brkpage
  54. errordict/handleerror
  55. {<< /PageSize [612 792] /ImagingBBox null >> setpagedevice
  56. systemdict begin $error begin $brkpage begin newerror
  57. {/newerror false store
  58. vmstatus pop pop 0 ne{grestoreall}if initgraphics courier setfont
  59. lmargin 720 moveto(ERROR: )prnt errorname prnt
  60. nl(OFFENDING COMMAND: )prnt/command load prnt
  61. $error/ostack
  62. known{nl nl(STACK:)prnt nl nl $error/ostack get aload length{==}repeat}if
  63. systemdict/showpage get exec
  64. /newerror true store/OLDhandleerror load end end end exec}{end end end}
  65. ifelse}
  66. dup 0 systemdict put dup 4 $brkpage put bind readonly put