Browse Source

Removed a return from T_indexer, may have gotten there unintentionally.

master
freesource 23 years ago
parent
commit
765a51443b
  1. 336
      SWIM/Indexer.pm

336
SWIM/Indexer.pm

@ -39,6 +39,7 @@ sub T_indexer {
my %commands = %$commands; my %commands = %$commands;
foreach (@$alot) { foreach (@$alot) {
$argument = $_; $argument = $_;
if ($commands->{"scripts"} || if ($commands->{"scripts"} ||
@ -64,8 +65,8 @@ sub T_indexer {
file(\%commands); file(\%commands);
} }
print "\n"; print "\n";
return;
} }
} # end sub T_indexer } # end sub T_indexer
@ -171,155 +172,203 @@ sub c_indexer {
require SWIM::File; require SWIM::File;
SWIM::File->import(qw(file)); SWIM::File->import(qw(file));
foreach (@$alot) { foreach (@$alot) {
$argument = $_; $argument = $_;
if (conf(\%commands) ne 0) { if (conf(\%commands) ne 0) {
if ($commands->{"T"}) {
if ($commands->{"T"}) {
# covers first argument, but not the rest. # covers first argument, but not the rest.
if ($commands->{"scripts"} || $commands->{"preinst"} || if (
$commands->{"postinst"} || $commands->{"prerm"} || $commands->{"scripts"} ||
$commands->{"postrm"} || $commands->{"config"} || $commands->{"templates"}) { $commands->{"preinst"} ||
scripts(\%commands); $commands->{"postinst"} ||
$commands->{"prerm"} ||
$commands->{"postrm"} ||
$commands->{"config"} ||
$commands->{"templates"}) {
scripts(\%commands);
} }
menu(\%commands) if $commands->{"menu"} || $commands->{"m"}; menu(\%commands) if $commands->{"menu"} || $commands->{"m"};
copyright(\%commands) if $commands->{"copyright"}; copyright(\%commands) if $commands->{"copyright"};
changelog(\%commands) if $commands->{"changelog"}; changelog(\%commands) if $commands->{"changelog"};
print "$argument\n"; print "$argument\n";
character(\%commands); character(\%commands);
shlibs(\%commands) if $commands->{"shlibs"}; shlibs(\%commands) if $commands->{"shlibs"};
print conf(\%commands) if !$commands->{"md5sum"}; print conf(\%commands) if !$commands->{"md5sum"};
file(\%commands); file(\%commands);
#file(\%commands) if $commands->{"md5sum"}; #file(\%commands) if $commands->{"md5sum"};
if (($commands->{"c"} && (!$commands->{"d"} || !$commands->{"l"}))) {
print "\n"; if (
} ($commands->{"c"} &&
(!$commands->{"d"} ||
!$commands->{"l"}))
) {
print "\n";
}
$arg_save = $argument; $arg_save = $argument;
} # end "T" } # end "T"
elsif (which_character(\%commands)) { elsif (which_character(\%commands)) {
my %store_commands = %commands; my %store_commands = %commands;
$argument = $_; $argument = $_;
if ($commands->{"scripts"} || $commands->{"preinst"} || if (
$commands->{"postinst"} || $commands->{"prerm"} || $commands->{"scripts"} ||
$commands->{"postrm"} || $commands->{"config"} || $commands->{"templates"}) { $commands->{"preinst"} ||
scripts(\%commands); $commands->{"postinst"} ||
} $commands->{"prerm"} ||
menu(\%commands) if $commands->{"menu"} || $commands->{"m"}; $commands->{"postrm"} ||
copyright(\%commands) if $commands->{"copyright"}; $commands->{"config"} ||
changelog(\%commands) if $commands->{"changelog"}; $commands->{"templates"}
if (the_character(\%commands) ne "ok") { ) {
print "$argument\n"; scripts(\%commands);
} }
if (defined s_character(\%commands)) {} menu(\%commands) if $commands->{"menu"} || $commands->{"m"};
shlibs(\%commands) if $commands->{"shlibs"}; copyright(\%commands) if $commands->{"copyright"};
print conf(\%commands) if !$commands->{"md5sum"}; changelog(\%commands) if $commands->{"changelog"};
file(\%commands); if (the_character(\%commands) ne "ok") {
#file(\%commands) if $commands->{"md5sum"}; print "$argument\n";
if (($commands->{"c"} && (!$commands->{"d"} || !$commands->{"l"}))) { }
print "\n"; if (defined s_character(\%commands)) {}
} shlibs(\%commands) if $commands->{"shlibs"};
%commands = %store_commands; print conf(\%commands) if !$commands->{"md5sum"};
undef %store_commands; file(\%commands);
#file(\%commands) if $commands->{"md5sum"};
if (
($commands->{"c"} &&
(!$commands->{"d"} ||
!$commands->{"l"}))
) {
print "\n";
}
%commands = %store_commands;
undef %store_commands;
$arg_save = $argument; $arg_save = $argument;
} }
# no Ts. # no Ts.
else { else {
if ($commands->{"scripts"} || $commands->{"preinst"} || if (
$commands->{"postinst"} || $commands->{"config"} || $commands->{"templates"} || $commands->{"prerm"} || $commands->{"scripts"} ||
$commands->{"postrm"}) { $commands->{"preinst"} ||
scripts(\%commands); $commands->{"postinst"} ||
} $commands->{"config"} ||
menu(\%commands) if $commands->{"menu"} || $commands->{"m"}; $commands->{"templates"} ||
copyright(\%commands) if $commands->{"copyright"}; $commands->{"prerm"} ||
changelog(\%commands) if $commands->{"changelog"}; $commands->{"postrm"}) {
print "$argument\n"; scripts(\%commands);
shlibs(\%commands) if $commands->{"shlibs"}; }
print conf(\%commands) if !$commands->{"md5sum"}; menu(\%commands) if $commands->{"menu"} || $commands->{"m"};
file(\%commands); copyright(\%commands) if $commands->{"copyright"};
print "\n"; changelog(\%commands) if $commands->{"changelog"};
} print "$argument\n";
$arg_save = $argument; shlibs(\%commands) if $commands->{"shlibs"};
} # end if (conf(\%commands) print conf(\%commands) if !$commands->{"md5sum"};
file(\%commands);
# this spot here can determine whether or not -c overrides l&d print "\n";
# in packages which don't have conf files. it's nicer to view }
# everything. watch this..these are packages which don't have $arg_save = $argument;
# conf files } # end if (conf(\%commands)
if ($commands->{"d"} || $commands->{"l"}) {
if ($arg_save) { # this spot here can determine whether or not -c overrides l&d
if ($argument ne $arg_save) { # in packages which don't have conf files. it's nicer to view
#if (!$arg_save) { # everything. watch this..these are packages which don't have
if (conf(\%commands) ne 0) { # conf files
shlibs(\%commands) if $commands->{"shlibs"}; if ($commands->{"d"} || $commands->{"l"}) {
file(\%commands); if ($arg_save) {
print "\n"; if ($argument ne $arg_save) {
} #if (!$arg_save) {
if (conf(\%commands) ne 0) {
# no conf files shlibs(\%commands) if $commands->{"shlibs"};
elsif (conf(\%commands) eq 0) { file(\%commands);
if ($commands->{"T"}) { print "\n";
$argument = $_; }
if ($commands->{"scripts"} || $commands->{"preinst"} ||
$commands->{"postinst"} || $commands->{"prerm"} || # no conf files
$commands->{"postrm"} || $commands->{"config"} || $commands->{"templates"}) { elsif (conf(\%commands) eq 0) {
scripts(\%commands); if ($commands->{"T"}) {
} $argument = $_;
menu(\%commands) if $commands->{"menu"} || $commands->{"m"}; if (
copyright(\%commands) if $commands->{"copyright"}; $commands->{"scripts"} ||
changelog(\%commands) if $commands->{"changelog"}; $commands->{"preinst"} ||
print "$argument\n"; $commands->{"postinst"} ||
character(\%commands); $commands->{"prerm"} ||
shlibs(\%commands) if $commands->{"shlibs"}; $commands->{"postrm"} ||
file(\%commands) if $commands->{"md5sum"}; $commands->{"config"} ||
print "\n"; $commands->{"templates"}) {
} # end "T" scripts(\%commands);
}
elsif (which_character(\%commands)) { menu(\%commands) if $commands->{"menu"} ||
my %store_commands = %commands; $commands->{"m"};
$argument = $_; copyright(\%commands) if $commands->{"copyright"};
if ($commands->{"scripts"} || $commands->{"preinst"} || changelog(\%commands) if $commands->{"changelog"};
$commands->{"postinst"} || $commands->{"prerm"} || print "$argument\n";
$commands->{"postrm" || $commands->{"config"} || $commands->{"templates"}}) { character(\%commands);
scripts(\%commands); shlibs(\%commands) if $commands->{"shlibs"};
} file(\%commands) if $commands->{"md5sum"};
menu(\%commands) if $commands->{"menu"} || $commands->{"m"}; print "\n";
copyright(\%commands) if $commands->{"copyright"}; } # end "T"
changelog(\%commands) if $commands->{"changelog"};
if (the_character(\%commands) ne "ok") { elsif (which_character(\%commands)) {
print "$argument\n"; my %store_commands = %commands;
} $argument = $_;
if (defined s_character(\%commands)) {} if (
shlibs(\%commands) if $commands->{"shlibs"}; $commands->{"scripts"} ||
%commands = %store_commands; $commands->{"preinst"} ||
undef %store_commands; $commands->{"postinst"} ||
file(\%commands); $commands->{"prerm"} ||
print "\n"; $commands->{"postrm"} ||
} $commands->{"config"} ||
$commands->{"templates"}) {
# no Ts. scripts(\%commands);
else { }
if ($commands->{"scripts"} || $commands->{"preinst"} || menu(\%commands) if $commands->{"menu"} ||
$commands->{"postinst"} || $commands->{"prerm"} || $commands->{"m"};
$commands->{"postrm"} || $commands->{"config"} || $commands->{"templates"} ) { copyright(\%commands) if $commands->{"copyright"};
scripts(\%commands); changelog(\%commands) if $commands->{"changelog"};
} if (the_character(\%commands) ne "ok") {
menu(\%commands) if $commands->{"menu"} || $commands->{"m"}; print "$argument\n";
copyright(\%commands) if $commands->{"copyright"}; }
changelog(\%commands) if $commands->{"changelog"}; if (defined s_character(\%commands)) {}
singular(\%commands); shlibs(\%commands) if $commands->{"shlibs"};
if ($commands->{"scripts"}) { %commands = %store_commands;
print "\n"; undef %store_commands;
} file(\%commands);
shlibs(\%commands) if $commands->{"shlibs"}; print "\n";
file(\%commands); }
print "\n";
} # no Ts.
} else {
} if (
} $commands->{"scripts"} ||
} # end if ($commands->{"d"} || $commands->{"preinst"} ||
} # end foreach $commands->{"postinst"} ||
$commands->{"prerm"} ||
$commands->{"postrm"} ||
$commands->{"config"} ||
$commands->{"templates"} ) {
scripts(\%commands);
}
menu(\%commands) if $commands->{"menu"} ||
$commands->{"m"};
copyright(\%commands) if $commands->{"copyright"};
changelog(\%commands) if $commands->{"changelog"};
singular(\%commands);
if ($commands->{"scripts"}) {
print "\n";
}
shlibs(\%commands) if $commands->{"shlibs"};
file(\%commands);
print "\n";
}
}
}
}
} # end if ($commands->{"d"} ||
} # end foreach
} # end sub c_indexer } # end sub c_indexer
@ -396,6 +445,8 @@ sub indexer {
# -t BUT NOT -C,-D,-L # # -t BUT NOT -C,-D,-L #
####################### #######################
elsif (!$commands->{"c"} && (!$commands->{"d"} || !$commands->{"l"})) { elsif (!$commands->{"c"} && (!$commands->{"d"} || !$commands->{"l"})) {
if ($commands->{"T"}) { if ($commands->{"T"}) {
T_indexer(\@alot,\%commands); T_indexer(\@alot,\%commands);
} }
@ -422,7 +473,6 @@ sub indexer {
($commands->{"c"} && ($commands->{"c"} &&
($commands->{"d"} || ($commands->{"d"} ||
$commands->{"l"}))) { $commands->{"l"}))) {
c_indexer(\@alot,\%commands); c_indexer(\@alot,\%commands);
} # end elsif } # end elsif

Loading…
Cancel
Save