home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / C / Applications / Eudora 1.3.1 / source / Bits / makeindex < prev    next >
Encoding:
Text File  |  1993-03-16  |  514 b   |  23 lines  |  [TEXT/????]

  1. #!/usr/local/bin/perl
  2. while (<>)
  3. {
  4.     if (m=^/\*{30,}$=) {$takeit = 1;}    # separator line
  5.     elsif ($takeit)                                        # last was separator
  6.     {
  7.         chop;split(' ');
  8.         if ($_[0] eq "*")                                # yep, looks right
  9.         {
  10.             shift(@_);                                        # strip off *
  11.             $fn = shift(@_);                            # grab fn name
  12.             $ind{$fn} = sprintf("%4d %s",$.,"$ARGV " . join(" ",@_));
  13.         }
  14.         $takeit = 0;                                        # next line isn't special
  15.     }
  16.     if (eof) {close(ARGV);}    # reset $.
  17. }
  18.  
  19. # output
  20. foreach $k (sort keys ind)
  21. {
  22.     printf "%-24s %s\n",$k,$ind{$k};
  23. }