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:
parent
47ba1c799a
commit
693c9bc11f
@ -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
|
||||
|
@ -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 " ").
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user