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.

32 lines
480 B

  1. $Header = shift(@ARGV);
  2. $Source = shift(@ARGV);
  3. if (!open(SOURCE, "<$Source"))
  4. {
  5. die "Can't open $Source\n";
  6. }
  7. if (!open(HEADER, ">$Header"))
  8. {
  9. die "Can't open $Header\n";
  10. }
  11. while (<SOURCE>)
  12. {
  13. if (/^FUNC /)
  14. {
  15. s/^FUNC //;
  16. for (;;)
  17. {
  18. print HEADER $_;
  19. if (/\)$/)
  20. {
  21. last;
  22. }
  23. $_ = <SOURCE>;
  24. }
  25. print HEADER ";\n";
  26. }
  27. }
  28. close(SOURCE);
  29. close(HEADER);