Changeset 303 in openpam for trunk


Ignore:
Timestamp:
Feb 2, 2005, 3:07:11 PM (14 years ago)
Author:
Dag-Erling Smørgrav
Message:

Sort cross-references in dictionary order.

Requested by: ru@

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/misc/gendoc.pl

    r283 r303  
    3333# SUCH DAMAGE.
    3434#
    35 # $P4: //depot/projects/openpam/misc/gendoc.pl#29 $
     35# $P4: //depot/projects/openpam/misc/gendoc.pl#30 $
    3636#
    3737
     
    342342}
    343343
     344sub dictionary_order($$) {
     345    my ($a, $b) = @_;
     346
     347    $a =~ s/[^[:alpha:]]//g;
     348    $b =~ s/[^[:alpha:]]//g;
     349    $a cmp $b;
     350}
     351
    344352sub genxref($) {
    345353    my $xref = shift;           # References
     
    348356    my @refs = ();
    349357    foreach my $sect (sort(keys(%{$xref}))) {
    350         foreach my $page (sort(keys(%{$xref->{$sect}}))) {
     358        foreach my $page (sort(dictionary_order keys(%{$xref->{$sect}}))) {
    351359            push(@refs, "$page $sect");
    352360        }
Note: See TracChangeset for help on using the changeset viewer.