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.

39 lines
911 B

  1. #
  2. # wm.pl
  3. #
  4. # pick up the window massage definitions and normalize them.
  5. #
  6. use strict 'vars';
  7. my ($file, %done, $internal, @tf);
  8. @tf = ("TRUE", "FALSE");
  9. foreach $file (@ARGV) {
  10. next unless open(FILE, $file);
  11. while (<FILE>) {
  12. chop;
  13. if (/^#define/) {
  14. $internal = @tf[!/;internal/];
  15. $_ = (split ' ')[1];
  16. #
  17. # WM_, CB_, LB_, LBCB_, EM_, MN_
  18. #
  19. # but does not end with one of:
  20. # "FIRST", "LAST", "ERR", "ERRSPACE", "OKAY", "MSGMAX"
  21. #
  22. if (/^(WM|CB|LB|LBCB|EM|MM|MN)_/ &&
  23. !/(FIRST|LAST|ERR|ERRSPACE|OKAY|MSGMAX)$/){
  24. if (!exists($done{$_})) {
  25. $done{$_} = 1;
  26. print "#ifdef $_\n";
  27. print " WM_ITEM($_, $internal),\n";
  28. print "#endif\n";
  29. }
  30. }
  31. }
  32. }
  33. close(FILE);
  34. }