From Mark C. Brown:
[obnox/wireshark/wip.git] / make-authors-short.pl
index 51fd6fc0c980243892a11e47996f59a440bbc7d9..ac96b0c264e049942d5c7525dd437b08816577c5 100755 (executable)
@@ -1,22 +1,26 @@
-#!/usr/bin/perl -w
-
 # $Id$
 
 # Remove tasks from individual author entries from AUTHORS file
 # for use in the about dialog.
+#
+# Must be called via perlnoutf.
 
 use strict;
 
 my $subinfo=0;
 my $nextline;
 
+$_ = <>;
+s/\xef\xbb\xbf//;              # Skip UTF-8 byte order mark
+print unless /^\n/;
+
 while (<>) {
        if (/(.*){/) {
                $subinfo = 1;
                print "$1\n";
        } elsif (/}/) {
                $subinfo = 0;
-               if (($nextline = <>) !~ /^[\s\r]*$/) {
+               if (($nextline = <>) !~ /^[\s]*$/) {
                        print $nextline;
                }
        } elsif ($subinfo == 1) {