Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

114 lines
3.4 KiB

  1. @
  2. @Lerrordict begin /handleerror { $error begin newerror { /newerror false
  3. @Ldef showpage 72 72 scale /x .25 def /y 10 def /Helvetica findfont .2
  4. @Lscalefont setfont x y moveto (PostScript Error Handler)
  5. @Lshow /y y .2 sub .2 sub def x y moveto
  6. @L(Offending Command = ) show /command load { dup type /stringtype ne { (
  7. @Lmax err string ) cvs } if show } exec /y y .2 sub def x y moveto (Error
  8. @L= ) show errorname { dup type dup ( max err string ) cvs show ( : ) show
  9. @L/stringtype ne { ( max err string ) cvs } if show } exec /y y .2 sub def
  10. @Lx y moveto (Stack =) show ostack { /y y .2 sub def x 1 add y moveto dup
  11. @Ltype /stringtype ne { ( max err string ) cvs } if show } forall showpage
  12. @L} if end } def end
  13. @L% Pull off the job specific values:
  14. @L%----------------------------------
  15. @L/name (@N@L) def
  16. @L/jobid(@I@L) def
  17. @L/date (@D@L) def
  18. @L/time (@T@L) def
  19. @L% Get the page limits
  20. @L%--------------------
  21. @Lnewpath clippath closepath pathbbox
  22. @L/ymax exch def
  23. @L/xmax exch def
  24. @L/ymin exch def
  25. @L/xmin exch def
  26. @L/PrintWidth xmax xmin sub def
  27. @L/PrintHeight ymax ymin sub def
  28. @L% Define some handy procedures and values
  29. @L%----------------------------------------
  30. @L/inch {72 mul} def
  31. @L/White 1 def
  32. @L/Black 0 def
  33. @L/Gray .9 def
  34. @L/CenterString {
  35. @L /str exch def /width exch def
  36. @L width str stringwidth pop sub 2 div 0 rmoveto
  37. @L str
  38. @L} def
  39. @L% Select Japanese fonts if available
  40. @L%-----------------------------------
  41. @L/Fonts [
  42. @L { /Ryumin-Light-RKSJ-H findfont } stopped {
  43. @L /Times-Roman findfont } if
  44. @L { /GothicBBB-Medium-RKSJ-H findfont } stopped {
  45. @L /Helvetica findfont /Helvetica-Bold findfont }{ dup } ifelse
  46. @L] def
  47. @L% Print the printers logo (if any)
  48. @L%---------------------------------
  49. @L/SysPrint where
  50. @L{
  51. @L pop
  52. @L SysPrint
  53. @L}{
  54. @L Fonts 0 get .5 72 mul scalefont setfont
  55. @L PrintWidth 2 div 6 72 mul moveto
  56. @L (\\\\server\\name) dup stringwidth pop 2 div neg 0 rmoveto show
  57. @L PrintWidth 2 div 5 72 mul moveto
  58. @L (PSCRIPT Page Separator) dup stringwidth pop 2 div neg 0 rmoveto show
  59. @L}ifelse
  60. @L% Set some standard parameters
  61. @L%-----------------------------
  62. @L100 0 {dup mul exch dup mul add 1 exch sub} setscreen
  63. @L2 setlinewidth 2 setmiterlimit
  64. @L% Clear and outline the title area
  65. @L%---------------------------------
  66. @Lnewpath
  67. @Lxmin ymax moveto
  68. @Lxmax ymax lineto
  69. @Lxmax ymax 1.5 inch sub lineto
  70. @Lxmin ymax 1.5 inch sub lineto
  71. @Lclosepath
  72. @Lgsave
  73. @Lcurrentgray 1 setgray fill setgray
  74. @Lgrestore
  75. @Lcurrentlinewidth 1 setlinewidth stroke setlinewidth
  76. @L% Add the label header
  77. @L%---------------------
  78. @LFonts 1 get .2 inch scalefont setfont
  79. @L% Date --------------------------------------
  80. @Lxmin .25 inch add ymax .2 inch sub moveto
  81. @L(Date: ) show date show
  82. @L% Time
  83. @LPrintWidth ymax .2 inch sub moveto
  84. @L.25 inch
  85. @L(Time: ) stringwidth pop
  86. @Ltime stringwidth pop
  87. @Ladd add neg 0 rmoveto
  88. @L(Time: ) show time show
  89. @L% Job Number
  90. @LPrintWidth 2 div ymax .2 inch sub moveto
  91. @Ljobid stringwidth pop
  92. @L( : ) stringwidth pop
  93. @Lname stringwidth pop
  94. @Ladd add 2 div
  95. @Lneg 0 rmoveto
  96. @Ljobid show ( : ) show name show
  97. @L% Underline label header
  98. @Lnewpath
  99. @Lxmin ymax .3 inch sub moveto xmax ymax .3 inch sub lineto
  100. @Lclosepath
  101. @Lstroke
  102. @L% Add the username
  103. @L%-----------------
  104. @LFonts 2 get 1 inch scalefont setfont
  105. @Lnewpath
  106. @Lxmin ymax 1.25 inch sub moveto
  107. @LPrintWidth name CenterString true charpath
  108. @Lclosepath
  109. @Lgsave
  110. @LGray setgray fill
  111. @Lgrestore
  112. @Lstroke
  113. @Lshowpage
  114. @E