Leaked source code of windows server 2003
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.

193 lines
3.9 KiB

  1. /^\*Command: CmdEnableFE_RLE \{ \*Cmd : \"\" \}$/ {
  2. print "\
  3. *Command: CmdEnableFE_RLE { *CallbackID : 80 }\n\
  4. *Command: CmdDisableCompression { *CallbackID: 136 }"
  5. next
  6. }
  7. /^\*MinFontID: 0$/ {
  8. print "*%MinFontID: 0"
  9. next
  10. }
  11. /^\*MaxFontID: 100$/ {
  12. print "*%MaxFontID: 100"
  13. next
  14. }
  15. /^\*MaxNumDownFonts: 0$/ {
  16. print "*%MaxNumDownFonts: 0"
  17. next
  18. }
  19. /^\*MaxNumDownFonts: 1$/ {
  20. print "*%MaxNumDownFonts: 1"
  21. next
  22. }
  23. /^\*FontFormat: OEM_CALLBACK$/ {
  24. print "*%FontFormat: OEM_CALLBACK"
  25. next
  26. }
  27. /^\*Command: CmdSetRectWidth \{ \*CallbackID: 102 \}$/ {
  28. print "\
  29. *Command: CmdSetRectWidth {\n\
  30. *CallbackID: 102\n\
  31. *Params: LIST(RectXSize)\n\
  32. }"
  33. next
  34. }
  35. /^\*Command: CmdSetRectHeight \{ \*CallbackID: 103 \}$/ {
  36. print "\
  37. *Command: CmdSetRectHeight {\n\
  38. *CallbackID: 103\n\
  39. *Params: LIST(RectYSize)\n\
  40. }"
  41. next
  42. }
  43. /^ \*Command: CmdSendBlockData \{ \*CallbackID: 24 \}$/ {
  44. print "\
  45. *Command: CmdSendBlockData {\n\
  46. *CallbackID: 24\n\
  47. *Params: LIST(NumOfDataBytes, RasterDataHeightInPixels, RasterDataWidthInBytes)\n\
  48. }"
  49. next
  50. }
  51. /^ \*Command: CmdSendBlockData \{ \*CallbackID: 80 \}$/ {
  52. print "\
  53. *Command: CmdSendBlockData {\n\
  54. *CallbackID: 24\n\
  55. *Params: LIST(NumOfDataBytes, RasterDataHeightInPixels, RasterDataWidthInBytes)\n\
  56. }"
  57. next
  58. }
  59. /^\*Command: CmdXMoveAbsolute \{ \*CallbackID: 44 \}$/ {
  60. print "\
  61. *Command: CmdXMoveAbsolute {\n\
  62. *CallbackID: 44\n\
  63. *Params: LIST(DestX)\n\
  64. }"
  65. next
  66. }
  67. /^\*Command: CmdXMoveRelRight \{ \*CallbackID: 45 \}$/ {
  68. print "\
  69. *Command: CmdXMoveRelRight {\n\
  70. *CallbackID: 45\n\
  71. *Params: LIST(DestXRel)\n\
  72. }"
  73. next
  74. }
  75. /^\*Command: CmdXMoveRelLeft \{ \*CallbackID: 46 \}$/ {
  76. print "\
  77. *Command: CmdXMoveRelLeft {\n\
  78. *CallbackID: 46\n\
  79. *Params: LIST(DestXRel)\n\
  80. }"
  81. next
  82. }
  83. /^\*Command: CmdYMoveAbsolute \{ \*CallbackID: 47 \}$/ {
  84. print "\
  85. *Command: CmdYMoveAbsolute {\n\
  86. *CallbackID: 47\n\
  87. *Params: LIST(DestY)\n\
  88. }"
  89. next
  90. }
  91. /^\*Command: CmdYMoveRelDown \{ \*CallbackID: 48 \}$/ {
  92. print "\
  93. *Command: CmdYMoveRelDown {\n\
  94. *CallbackID: 48\n\
  95. *Params: LIST(DestYRel)\n\
  96. }"
  97. next
  98. }
  99. /^\*Command: CmdYMoveRelUp \{ \*CallbackID: 49 \}$/ {
  100. print "\
  101. *Command: CmdYMoveRelUp {\n\
  102. *CallbackID: 49\n\
  103. *Params: LIST(DestYRel)\n\
  104. }"
  105. next
  106. }
  107. /^\*Command: CmdSetFontID \{ \*CallbackID: 113 \}$/ {
  108. print "\
  109. *Command: CmdSetFontID {\n\
  110. *CallbackID: 113\n\
  111. *Params: LIST(NextFontID)\n\
  112. }"
  113. next
  114. }
  115. /^\*Command: CmdSelectFontID \{ \*CallbackID: 114 \}$/ {
  116. print "\
  117. *Command: CmdSelectFontID {\n\
  118. *CallbackID: 114\n\
  119. *Params: LIST(CurrentFontID)\n\
  120. }"
  121. next
  122. }
  123. /^ \*CallbackID: 31$/ {
  124. print "\
  125. *CallbackID: 31\n\
  126. *Params: LIST(NumOfCopies)"
  127. next
  128. }
  129. /^ \*CallbackID: 55$/ {
  130. print "\
  131. *CallbackID: 55\n\
  132. *Params: LIST(PhysPaperWidth, PhysPaperLength)"
  133. next
  134. }
  135. /^ \*TextDPI: PAIR\(240, 240\)$/ {
  136. print "\
  137. *TextDPI: PAIR(240, 240)\n\
  138. EXTERN_GLOBAL: *XMoveUnit: 240\n\
  139. EXTERN_GLOBAL: *YMoveUnit: 240"
  140. next
  141. }
  142. /^ \*TextDPI: PAIR\(400, 400\)$/ {
  143. print "\
  144. *TextDPI: PAIR(400, 400)\n\
  145. EXTERN_GLOBAL: *XMoveUnit: 400\n\
  146. EXTERN_GLOBAL: *YMoveUnit: 400"
  147. next
  148. }
  149. /^ \*TextDPI: PAIR\(600, 600\)$/ {
  150. print "\
  151. *TextDPI: PAIR(600, 600)\n\
  152. EXTERN_GLOBAL: *XMoveUnit: 600\n\
  153. EXTERN_GLOBAL: *YMoveUnit: 600"
  154. next
  155. }
  156. /^\*XMoveUnit: 1200$/ {
  157. print "\
  158. \*%XMoveUnit: 1200"
  159. next
  160. }
  161. /^\*YMoveUnit: 1200$/ {
  162. print "\
  163. \*%YMoveUnit: 1200"
  164. next
  165. }
  166. !/^*% Error: you must check if this command callback requires any parameters!$/ { print }