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.

82 lines
2.6 KiB

  1. #----------------------------------------------------------------------------
  2. #
  3. # Copyright (c) 1998 Microsoft Corporation
  4. #
  5. # Description:
  6. # This will map the osksetti.reg file into a osksetti.h file.
  7. # This is so that we add the defaults without adding this to the hives
  8. # or including the osksetti.reg file in the product. If the osksetti.reg
  9. # ever changes then osksetti.h will have to be regenerated.
  10. #
  11. # History:
  12. # kpeery - 02/04/1998 - wrote it.
  13. #
  14. #----------------------------------------------------------------------------
  15. #----------------------------------------------------------------------------
  16. #
  17. # Description:
  18. # First spit out the pre-header defintion. Then use commas to find the
  19. # first line with numbers in it. Once we have found that then remove the
  20. # extra 'junk' setting string.
  21. # We then use the commas to place in the first set of 0x prefixes to the
  22. # numbers. We then must remove the trailing 0x\.
  23. # Last we must prefix the lines that begin with a space.
  24. #
  25. #----------------------------------------------------------------------------
  26. ($sec,$min,$hour,$day,$month,$year)=localtime(time);
  27. $month++;
  28. print "//-----------------------------------------------------------------\n";
  29. print "//\n";
  30. print "// Copyright (c) 1998 Microsoft Corporation\n";
  31. print "//\n";
  32. print "// This H file was generated by the perl script regtoh.pl.\n";
  33. print "//\n";
  34. print "// This file was last generated on: $month/$day/$year at: ";
  35. print "$hour:$min:$sec.\n";
  36. print "//\n";
  37. print "// Be sure to bump up the CURRENT_STEPPING when the structure ";
  38. print "changes.\n";
  39. print "// Changing the stepping will force an update to the registry.\n";
  40. print "//\n";
  41. print "// Please do not edit this file directly.\n";
  42. print "//\n";
  43. print "//-----------------------------------------------------------------\n\n";
  44. print "#define CURRENT_STEPPING 3\n\n";
  45. print "BYTE g_DefaultSettings[] = {\n\n";
  46. while (<>)
  47. {
  48. if (/,/)
  49. {
  50. $_=~s/"Setting"=hex:/ /g; # replace junk line with space
  51. $_=~s/,/,0x/g;
  52. $_=~s/0x\\/ /g;
  53. $_=~s/ 0/ 0x0/g;
  54. $_=~s/ 1/ 0x1/g;
  55. $_=~s/ 2/ 0x2/g;
  56. $_=~s/ 3/ 0x3/g;
  57. $_=~s/ 4/ 0x4/g;
  58. $_=~s/ 5/ 0x5/g;
  59. $_=~s/ 6/ 0x6/g;
  60. $_=~s/ 7/ 0x7/g;
  61. $_=~s/ 8/ 0x8/g;
  62. $_=~s/ 9/ 0x9/g;
  63. $_=~s/ [aA]/ 0xa/g;
  64. $_=~s/ [bB]/ 0xb/g;
  65. $_=~s/ [cC]/ 0xc/g;
  66. $_=~s/ [dD]/ 0xd/g;
  67. $_=~s/ [eE]/ 0xe/g;
  68. $_=~s/ [fF]/ 0xf/g;
  69. print $_;
  70. }
  71. }
  72. print "};\n\n";