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.

37 lines
921 B

  1. BEGIN {
  2. opt=ARGV[1]
  3. ARGV[1]=""
  4. left=70
  5. right=70
  6. print "*%"
  7. print "*% Copyright (c) 1997 - 2000 Microsoft Corporation"
  8. print "*% All Rights Reserved."
  9. print "*%"
  10. }
  11. /\*ModelName/ { print "*CodePage: 1252" }
  12. /%%/ { gsub(/%%/, "<2525>") }
  13. /\*TopMargin/ {
  14. top=$2
  15. print " *CustCursorOriginX: %d{" left "}"
  16. print " *CustCursorOriginY: %d{" top "}"
  17. print " *CustPrintableOriginX: %d{" left "}"
  18. print " *CustPrintableOriginY: %d{" top "}"
  19. next
  20. }
  21. /\*BottomMargin/ {
  22. bottom=$2
  23. print " *CustPrintableSizeX: %d{PhysPaperWidth - (" left "+" right ")}"
  24. print " *CustPrintableSizeY: %d{PhysPaperLength - (" top "+" bottom ")}"
  25. next
  26. }
  27. /\*rcNameID.*TRACTOR/ {
  28. if (opt ~ /D/) {
  29. print " *rcNameID: 501"
  30. print " *OptionID: 501"
  31. next
  32. }
  33. }
  34. # /\*\% Warning/ { next }
  35. { print }