mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-09 01:04:06 +01:00
Move code and add comments:
- Declare all of the 'preview' helpers together in Chains.pm - Add some clarifying comments in the compiler. Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
4420eed8d7
commit
ae31a09e8b
@ -2854,20 +2854,6 @@ sub enter_cmd_mode() {
|
||||
$mode = CMD_MODE;
|
||||
}
|
||||
|
||||
#
|
||||
# These versions are used by 'preview'
|
||||
#
|
||||
sub enter_cat_mode1() {
|
||||
print "\n";
|
||||
emitstd "cat << __EOF__";
|
||||
$mode = CAT_MODE;
|
||||
}
|
||||
|
||||
sub enter_cmd_mode1() {
|
||||
print "__EOF__\n\n" if $mode == CAT_MODE;
|
||||
$mode = CMD_MODE;
|
||||
}
|
||||
|
||||
#
|
||||
# Emits the passed rule (input to iptables-restore) or command
|
||||
#
|
||||
@ -2889,6 +2875,20 @@ sub emitr( $ ) {
|
||||
}
|
||||
}
|
||||
|
||||
#
|
||||
# These versions are used by 'preview'
|
||||
#
|
||||
sub enter_cat_mode1() {
|
||||
print "\n";
|
||||
emitstd "cat << __EOF__";
|
||||
$mode = CAT_MODE;
|
||||
}
|
||||
|
||||
sub enter_cmd_mode1() {
|
||||
print "__EOF__\n\n" if $mode == CAT_MODE;
|
||||
$mode = CMD_MODE;
|
||||
}
|
||||
|
||||
sub emitr1( $ ) {
|
||||
if ( my $rule = $_[0] ) {
|
||||
if ( substr( $rule, 0, 2 ) eq '-A' ) {
|
||||
|
Loading…
Reference in New Issue
Block a user