From b1ec19f96ca66e5b1936136794a430a7e061dc21 Mon Sep 17 00:00:00 2001 From: Russ Allbery Date: Sun, 28 Mar 2004 00:57:34 +0000 Subject: Fix the last change to really work properly. Update the copyright date. --- bin/spin | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'bin') diff --git a/bin/spin b/bin/spin index b5b7a97..f3553bc 100755 --- a/bin/spin +++ b/bin/spin @@ -3,7 +3,8 @@ $ID = q$Id$; # # spin -- Translate thread (an HTML macro language) into HTML. # -# Copyright 1999, 2000, 2001, 2002, 2003 by Russ Allbery +# Copyright 1999, 2000, 2001, 2002, 2003, 2004 +# by Russ Allbery # # This program is free software; you may redistribute it and/or modify it # under the same terms as Perl itself. @@ -402,7 +403,7 @@ sub sitelinks { my @links = @{ $SITELINKS{$file} }; my @descs = map { defined ($_) ? $SITEDESCS{$_} : '' } @links; @descs = map { s/\"/"/g; $_ } map { escape $_ } @descs; - @descs = map { $_ eq 'the main page' ? () : $_ } @descs; + @descs = map { $_ eq 'the main page' ? '' : $_ } @descs; @links = map { defined ($_) ? relative ($file, $_) : undef } @links; # Make the HTML for the footer. @@ -410,10 +411,14 @@ sub sitelinks { for my $i (0..2) { next unless defined $links[$i]; my $link = qq( 78) { - $link .= "\n "; + if ($descs[$i] ne '') { + if (length ($link) + length ($descs[$i]) + 9 > 78) { + $link .= "\n "; + } + $link .= qq( title="$descs[$i]">\n); + } else { + $link .= ">\n"; } - $link .= qq( title="$descs[$i]">\n); $output .= $link; } my $href = relative ($file, '/'); @@ -1611,7 +1616,8 @@ Russ Allbery =head1 COPYRIGHT AND LICENSE -Copyright 1999, 2000, 2001, 2002, 2003 by Russ Allbery . +Copyright 1999, 2000, 2001, 2002, 2003, 2004 +by Russ Allbery . This program is free software; you may redistribute it and/or modify it under the same terms as Perl itself. -- cgit v1.2.3