1
0
mirror of https://github.com/fspc/dswim.git synced 2025-04-04 08:13:24 -04:00

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

This commit is contained in:
freesource 2001-10-24 18:47:08 +00:00
parent b59992bff6
commit 765a51443b

View File

@ -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);
print "\n";
}
$arg_save = $argument;
} # end if (conf(\%commands)
# this spot here can determine whether or not -c overrides l&d # this spot here can determine whether or not -c overrides l&d
# in packages which don't have conf files. it's nicer to view # in packages which don't have conf files. it's nicer to view
# everything. watch this..these are packages which don't have # everything. watch this..these are packages which don't have
# conf files # conf files
if ($commands->{"d"} || $commands->{"l"}) { if ($commands->{"d"} || $commands->{"l"}) {
if ($arg_save) { if ($arg_save) {
if ($argument ne $arg_save) { if ($argument ne $arg_save) {
#if (!$arg_save) { #if (!$arg_save) {
if (conf(\%commands) ne 0) { if (conf(\%commands) ne 0) {
shlibs(\%commands) if $commands->{"shlibs"}; shlibs(\%commands) if $commands->{"shlibs"};
file(\%commands); file(\%commands);
print "\n"; print "\n";
} }
# no conf files # no conf files
elsif (conf(\%commands) eq 0) { elsif (conf(\%commands) eq 0) {
if ($commands->{"T"}) { if ($commands->{"T"}) {
$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"}) {
print "$argument\n"; scripts(\%commands);
character(\%commands); }
shlibs(\%commands) if $commands->{"shlibs"}; menu(\%commands) if $commands->{"menu"} ||
file(\%commands) if $commands->{"md5sum"}; $commands->{"m"};
print "\n"; copyright(\%commands) if $commands->{"copyright"};
} # end "T" changelog(\%commands) if $commands->{"changelog"};
print "$argument\n";
character(\%commands);
shlibs(\%commands) if $commands->{"shlibs"};
file(\%commands) if $commands->{"md5sum"};
print "\n";
} # 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") { scripts(\%commands);
print "$argument\n"; }
} menu(\%commands) if $commands->{"menu"} ||
if (defined s_character(\%commands)) {} $commands->{"m"};
shlibs(\%commands) if $commands->{"shlibs"}; copyright(\%commands) if $commands->{"copyright"};
%commands = %store_commands; changelog(\%commands) if $commands->{"changelog"};
undef %store_commands; if (the_character(\%commands) ne "ok") {
file(\%commands); print "$argument\n";
print "\n"; }
} if (defined s_character(\%commands)) {}
shlibs(\%commands) if $commands->{"shlibs"};
%commands = %store_commands;
undef %store_commands;
file(\%commands);
print "\n";
}
# no Ts. # no Ts.
else { else {
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"} ) {
singular(\%commands); scripts(\%commands);
if ($commands->{"scripts"}) { }
print "\n"; menu(\%commands) if $commands->{"menu"} ||
} $commands->{"m"};
shlibs(\%commands) if $commands->{"shlibs"}; copyright(\%commands) if $commands->{"copyright"};
file(\%commands); changelog(\%commands) if $commands->{"changelog"};
print "\n"; singular(\%commands);
} if ($commands->{"scripts"}) {
} print "\n";
} }
} shlibs(\%commands) if $commands->{"shlibs"};
} # end if ($commands->{"d"} || file(\%commands);
} # end foreach 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