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.

58 lines
1.7 KiB

  1. @rem = 'Perl from *.bat boilerplate
  2. @echo off
  3. perl -S %0.bat %1 %2 %3 %4 %5 %6 %7 %8 %9
  4. goto endofperl
  5. ';
  6. #==============================================================================
  7. # This script generates and grooms IcaCAP report output to make it more
  8. # readable. Any arguments on the command-line are passed to the 'report'
  9. # command (do "icreport -?" for a list of options). Output is directed to the
  10. # file "icapout.rpt".
  11. #==============================================================================
  12. $command = "report icapout.mea -delimited $ENV{ICREPORT} @ARGV";
  13. print "\n$command\n\n";
  14. system ($command) && die "Command failed.\n";
  15. open(IN, "<icapout.rpt") || die "Couldn't open \"icapout.rpt\".\n";
  16. open(OUT, ">icapout") || die "Couldn't open output file \"icapout\".\n";
  17. $infoshift = 0;
  18. print OUT "_\t_\t_\n";
  19. while (<IN>) {
  20. # Move runtime information from the second column to the first, to make
  21. # auto-size apply better to the function names column.
  22. if ($infoshift) {
  23. $infoshift=0 if /^$/;
  24. s/^\t/ /;
  25. }
  26. $infoshift=1 if /^File /;
  27. print OUT;
  28. last if /^All functions sorted/;
  29. }
  30. # If we're printing summary for a function (type code 0), then separate it from
  31. # the previous entry with a blank line.
  32. while (<IN>) {
  33. print OUT "\n" if /^0\t/;
  34. print OUT;
  35. }
  36. close (IN);
  37. close (OUT);
  38. unlink ('icapout.rpt') || die "Couldn't delete \"icapout.rpt\"\n";
  39. rename ('icapout', 'icapout.rpt')
  40. || die "Couldn't rename \"icapout\" to \"icapout.rpt\".\n";
  41. print "Complete report data in \"icapout.rpt\".\n";
  42. __END__
  43. #===============================================================================
  44. :endofperl