X-Git-Url: https://code.th-h.de/?p=usenet%2Fyapfaq.git;a=blobdiff_plain;f=yapfaq.pl;h=c9a8098c13ac98f0ee31dc7cf5025dd13cfc7ef6;hp=23f7e5ae7f3e8e2b2596036d9f86507844edc3be;hb=86c0a10044727dae98e0ccbd9aee475e8154c15f;hpb=6f235aca38e8e566af33ee06a0cd95a13313582b diff --git a/yapfaq.pl b/yapfaq.pl index 23f7e5a..c9a8098 100644 --- a/yapfaq.pl +++ b/yapfaq.pl @@ -62,7 +62,7 @@ my ($TDY, $TDM, $TDD) = Today(); #TD: Today's date # read commandline options my %Options; -getopts('Vhvpdt:f:s:', \%Options); +getopts('Vhvpdt:f:c:s:', \%Options); # -V: print version / copyright information if ($Options{'V'}) { print "$0 v $Version\nCopyright (c) 2003 Marc Brockschmidt \nCopyright (c) 2010 Thomas Hochstein \n"; @@ -78,7 +78,12 @@ if ($Options{'h'}) { my ($Faq) = $Options{'f'} if ($Options{'f'}); # read runtime configuration (configuration variables) -readrc (\$RCFile,\%Config) if -f $RCFile; +$RCFile = $Options{'c'} if ($Options{'c'}); +if (-f $RCFile) { + readrc (\$RCFile,\%Config); +} else { + warn "$0: W: .rc file $RCFile does not exist!\n"; +} # read configuration (configured FAQs) my @Config;