diff -u -r1.6 -r1.8 --- mkindex 1996/04/02 07:06:21 1.6 +++ mkindex 1999/02/28 06:30:42 1.8 @@ -2,7 +2,7 @@ # # mkindex -# $Id: mkindex,v 1.6 1996/04/02 07:06:21 johnh Exp $ +# $Id: mkindex,v 1.8 1999/02/28 06:30:42 johnh Exp $ # # Copyright (C) 1994-1996 by John Heidemann. # Comments to . @@ -23,7 +23,10 @@ require 5.000; while (<>) { - ($date, $subject) = m@/(9\d{5})#\* (.*)$@; + chomp; + ($date, $subject) = m@/(\d{6})#\* (.*)$@; + warn("could not find date in rawindex line ``$_''.\n"), next if (!defined($date)); + warn("could not find subject in rawindex line ``$_''.\n"), next if (!defined($subject)); $lcsubject = lc($subject); $subject{$lcsubject} = $subject; $list{$lcsubject} = "" if (!defined($list{$lcsubject})); # for -w @@ -33,7 +36,6 @@ print "# -*- mode: notes-index -*-\n"; foreach (sort keys %list) { # Trim the trailing ", ". - chop $list{$_}; - chop $list{$_}; + $list{$_} =~ s/, $//; print "$subject{$_}: $list{$_}\n"; };