]> git.ipfire.org Git - thirdparty/HylaFAX.git/commitdiff
Add the Include: option to FaxConfig for all config parsing
authorAidan Van Dyk <aidan@ifax.com>
Mon, 8 Jan 2007 19:46:23 +0000 (19:46 +0000)
committerAidan Van Dyk <aidan@ifax.com>
Mon, 8 Jan 2007 19:46:23 +0000 (19:46 +0000)
CHANGES
man/hylafax-config.4f
util/FaxConfig.c++

diff --git a/CHANGES b/CHANGES
index 2ff993cc2a0d43001d41c39bf582743973e4c93b..4cc70ca3db82f2d3dacf4a902ca6b595ced0c615 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,7 @@
 
 Chandlog since HylaFAX 4.3.1
 
+* Add the Include: option for Config file options (8 Jan 2007)
 * Redirected unwanted output from pd2pdf while running notify (24 Dec 2006)
 * Use @SCRIPT_SH@ for bin/ scripts to allow configure selection (23 Dec 2006)
 * Updated pollrcvd to use templates (22 Dec 2006)
index 0ef090c67c784a5be82bd53fded72f959a88c5c4..6560cca81552744fb23cbc7cd7d7c7b35943d27b 100644 (file)
@@ -141,6 +141,7 @@ DynamicConfig       string  \-      script for dynamic receive configuration
 FAXNumber      string  \-      facsimile modem phone number
 FaxRcvdCmd     string  \s-1bin/faxrcvd\s+1     notification script for received facsimile
 GettyArgs      string  \-      arguments passed to getty program
+Include\(S2    string  \-      include another file 
 InternationalPrefix\(S2        string  \-      dialing prefix for international calls
 JobControlCmd\(S1      string  \-      job control command
 JobControlWait\(S1     boolean \s-1Yes\s+1     Wait for JobControlCmd to run synchronously
@@ -783,6 +784,9 @@ are used to generate the transmitted
 and
 .SM TSI.
 .TP
+.B Include\(S2
+Include the specified file and parse it as a config file
+.TP
 .B InternationalPrefix\(S2
 The string to use to place an international phone call.
 In the United States, this is ``011''.
index 9f8d606259c7f6d57bebd99d8af784db89704d99..b6fea38a6c0c0f15ab6ddd64aeb47449171f99f2 100644 (file)
@@ -208,6 +208,15 @@ FaxConfig::readConfigItem(const char* b)
            ;
        *cp = '\0';
     }
+
+    if (streq(tag, "include") ) {
+        u_int old_lineno = lineno;
+       configTrace("%s = %s (line %u)", tag, value, lineno);
+       lineno = 0;
+       readConfig(value);
+       lineno = old_lineno;
+       return (true);
+    }
     if (!setConfigItem(tag, value)) {
        configTrace("Unknown configuration parameter \"%s\" ignored at line %u",
             tag, lineno);