mhonarc-users

Re: M2H_RCFILE envariable is not working

2001-04-18 16:38:10
On April 17, 2001 at 15:21, Sang-yong Suh wrote:

During the testing of MHonArc2.4.8, I found that the envariable
M2H_RCFILE is not working.  However, the command line option
"-rcfile" is working ok.  Interested in the bug, I debugged some
files, and found that lib/mhopt.pl is responsible.

Thanks for finding the bug.

I am appending the one line patch which will correct the bug.

The patch is not the best way to fix the bug since it includes
a behavior that is inconsistent with other resources.  I.e.  If
-rcfile is specified, the M2H_RCFILE envariable should not be
used.

What follows is probably better and applies to mhinit.pl
(patch untested):

*** mhinit.pl.org       Wed Apr 18 14:09:38 2001
--- mhinit.pl   Wed Apr 18 14:12:46 2001
***************
*** 384,390 ****
  $IDXSIZE   = $ENV{'M2H_IDXSIZE'}    || 0;
  $TIDXNAME  = "";      # Set in get_resources()
  $OUTDIR    = $ENV{'M2H_OUTDIR'}     || $CURDIR;
- $FMTFILE   = $ENV{'M2H_RCFILE'}     || "";
  $TTITLE    = $ENV{'M2H_TTITLE'}     || "Mail Thread Index";
  $TITLE     = $ENV{'M2H_TITLE'}      || "Mail Index";
  $MAILTOURL = $ENV{'M2H_MAILTOURL'}  || "";
--- 384,389 ----
***************
*** 462,467 ****
--- 461,468 ----
  $DoFolRefs   = defined($ENV{'M2H_FOLREFS'})     ? $ENV{'M2H_FOLREFS'}     : 1;
  $UsingLASTPG = defined($ENV{'M2H_USINGLASTPG'}) ? $ENV{'M2H_USINGLASTPG'} : 1;
  
+ @FMTFILE     = defined($ENV{'M2H_RCFILE'}) ?
+                   ($ENV{'M2H_RCFILE'}) : ();
  @OtherIdxs   = defined($ENV{'M2H_OTHERINDEXES'}) ?
                    split(/:/, $ENV{'M2H_OTHERINDEXES'}) : ();
  @PerlINC     = defined($ENV{'M2H_PERLINC'}) ?

<Prev in Thread] Current Thread [Next in Thread>