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: Fri, 24 Mar 2000 11:45:43 -0600
To: HTML Tidy List <html-tidy@w3.org>
Message-ID: <OF97CE9141.E0878995-ON86256880.006403A8@rfdinc.com>

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 Friday, 24 March 2000 12:46:57 UTC

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