globals, the proportion each field should take in the scan lines.
(filter_mail): Use these new globals instead of instead of hard-coded
defaults, and move the loading of .minc before the use of these
globals so the user can change them.
our @FILTERS;
our (@start_hooks, @stop_hooks, @filter_hooks, @post_store_hooks);
our @FILTERS;
our (@start_hooks, @stop_hooks, @filter_hooks, @post_store_hooks);
+our $SCAN_P_FOLDER = 0.1;
+our $SCAN_P_MESSAGE = 0.0625;
+our $SCAN_P_FROM = 0.175;
- # XXX lame names and hard-coded proportions.
- my $nf = int($COLUMNS * 0.1);
- my $nm = int($COLUMNS * 0.0625);
- my $nF = int($COLUMNS * 0.175);
- my $ns = $COLUMNS - $nf - $nm - $nF - 3;
-
if (-f "$HOME/.minc") {
require "$HOME/.minc";
}
if (-f "$HOME/.minc") {
require "$HOME/.minc";
}
+ # XXX lame names
+ my $nf = int($COLUMNS * $SCAN_P_FOLDER);
+ my $nm = int($COLUMNS * $SCAN_P_MESSAGE);
+ my $nF = int($COLUMNS * $SCAN_P_FROM);
+ my $ns = $COLUMNS - $nf - $nm - $nF - 3;
+
my %batons;
for my $hook (@start_hooks) {
my ($handle, @baton) = $hook->();
my %batons;
for my $hook (@start_hooks) {
my ($handle, @baton) = $hook->();