W3C home > Mailing lists > Public > html-tidy@w3.org > January to March 2000

[ENH] Report configuration filename used

From: J. David Bryan <jdbryan@acm.org>
Date: Wed, 9 Feb 2000 13:10:33 -0500
Message-Id: <200002091810.NAA03569@mail.bcpl.net>
To: HTML Tidy List <html-tidy@w3.org>
This report is for the Tidy version of 13th January 2000.

Tidy's default behavior may be altered by a combination of command-line 
options and options stored in a configuration file.  The use of command-
line options clearly shows what defaults have been altered.  The implicit 
use of a configuration file does not.  A user of Tidy may have no idea that 
an implicit configuration file (e.g., built-in to the Tidy code or set via 
the environment variable) may be affecting Tidy's defaults.

Therefore, I recommend displaying a line to stderr whenever a default 
configuration file is in use, for example:

  Reading configuration file "xxx"

This may be done by inserting the following code in localize.c:

  void ReportConfigFile(FILE *errout, const char *filename)
      tidy_out(errout, "Reading configuration from \"%s\"\n\n", filename);

...and the following code after line 421 of config.c:

  ReportConfigFile(stderr, fname);

Additionally, and in light of this change, it may be desirable to enhance 
ParseConfigFile (defined in config.c) to take an additional parameter so 
that only implicit and not command-line-specified configuration files are 

                                      -- Dave
Received on Wednesday, 9 February 2000 13:10:38 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:38:47 UTC