aboutsummaryrefslogtreecommitdiffstats
path: root/make-authors-short.pl
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2004-10-17 23:03:11 +0000
committerGuy Harris <guy@alum.mit.edu>2004-10-17 23:03:11 +0000
commit7e1521119f792d256689320289b7926ac32b42c1 (patch)
tree0348f0dc3fa4ef3169ed2d77e35acd0558d92acf /make-authors-short.pl
parent94a7c806390c7fc25b020b8acf6879ac47cbc4ae (diff)
From Graeme Hewson: make AUTHORS-SHORT not include formatting codes,
with AUTHORS-SHORT-FORMAT containing the formatting codes. svn path=/trunk/; revision=12334
Diffstat (limited to 'make-authors-short.pl')
-rwxr-xr-xmake-authors-short.pl37
1 files changed, 25 insertions, 12 deletions
diff --git a/make-authors-short.pl b/make-authors-short.pl
index caa8b5bc90..ac96b0c264 100755
--- a/make-authors-short.pl
+++ b/make-authors-short.pl
@@ -1,18 +1,31 @@
-#!/usr/bin/perl -w
-
# $Id$
-use strict;
+# Remove tasks from individual author entries from AUTHORS file
+# for use in the about dialog.
+#
+# Must be called via perlnoutf.
-# Unset environment variables so perl doesn't
-# interpret bytes as UTF-8 characters
+use strict;
-delete $ENV{LANG};
-delete $ENV{LANGUAGE};
-delete $ENV{LC_ALL};
-delete $ENV{LC_CTYPE};
+my $subinfo=0;
+my $nextline;
-# Call make-authors-short2.pl in same directory, using same interpreter
+$_ = <>;
+s/\xef\xbb\xbf//; # Skip UTF-8 byte order mark
+print unless /^\n/;
-(my $prog2 = $0) =~ s/\.pl$/2.pl/;
-system($^X, "$prog2", @ARGV);
+while (<>) {
+ if (/(.*){/) {
+ $subinfo = 1;
+ print "$1\n";
+ } elsif (/}/) {
+ $subinfo = 0;
+ if (($nextline = <>) !~ /^[\s]*$/) {
+ print $nextline;
+ }
+ } elsif ($subinfo == 1) {
+ next;
+ } else {
+ print;
+ }
+}