1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-02-04 01:47:02 +03:00

use XMLLING_INDENT environment variable to control indentation for the xmllint "--format" option

This commit is contained in:
Aleksey Sanin 2003-03-09 22:36:52 +00:00
parent 47ba1c799a
commit 693c9bc11f
3 changed files with 17 additions and 2 deletions

View File

@ -1,3 +1,9 @@
Sun Mar 9 13:53:16 2003 Aleksey Sanin <aleksey@aleksey.com>
* xmllint.c doc/xmllint.xml: use $XMLLINT_INDENT environment
variable to control the indentation for the xmllint "--format"
option
Sat Mar 8 14:27:43 CET 2003 Igor Zlatkovic <igor@zlatkovic.com>
* encoding.c: applied Gennady's patch against buffer overrun

View File

@ -330,7 +330,9 @@
<term><option>--format</option></term>
<listitem>
<simpara>
Reformat and reindent the output.
Reformat and reindent the output. The $XMLLINT_INDENT
environment variable controls the indentation (default
value is two spaces &quot;&nbsp;&nbsp;&quot;).
</simpara>
</listitem>
</varlistentry>

View File

@ -1247,7 +1247,8 @@ main(int argc, char **argv) {
int i, acount;
int files = 0;
int version = 0;
const char* indent;
if (argc <= 1) {
usage(argv[0]);
return(1);
@ -1452,6 +1453,12 @@ main(int argc, char **argv) {
xmlRegisterNodeDefault(registerNode);
xmlDeregisterNodeDefault(deregisterNode);
}
indent = getenv("XMLLINT_INDENT");
if(indent != NULL) {
xmlTreeIndentString = indent;
}
xmlLineNumbersDefault(1);
if (loaddtd != 0)