[libxml2] Don't ignore xmllint options after "-"
- From: Nick Wellnhofer <nwellnhof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libxml2] Don't ignore xmllint options after "-"
- Date: Fri, 4 Feb 2022 13:50:39 +0000 (UTC)
commit d12be00da8b67bea013524cabad82cee62423a1a
Author: Nick Wellnhofer <wellnhofer aevum de>
Date: Fri Feb 4 14:13:59 2022 +0100
Don't ignore xmllint options after "-"
There's no reason to ignore options after "-". This was probably
confused with the "--" mechanism which xmllint doesn't implement.
Fixes #290.
xmllint.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
---
diff --git a/xmllint.c b/xmllint.c
index 24768bc9..4d541d9b 100644
--- a/xmllint.c
+++ b/xmllint.c
@@ -3181,8 +3181,6 @@ main(int argc, char **argv) {
/* xmlMemSetup must be called before initializing the parser. */
for (i = 1; i < argc ; i++) {
- if (!strcmp(argv[i], "-"))
- break;
if (argv[i][0] != '-')
continue;
@@ -3200,11 +3198,9 @@ main(int argc, char **argv) {
LIBXML_TEST_VERSION
for (i = 1; i < argc ; i++) {
- if (!strcmp(argv[i], "-"))
- break;
-
if (argv[i][0] != '-')
continue;
+
if ((!strcmp(argv[i], "-debug")) || (!strcmp(argv[i], "--debug")))
debug++;
else
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]