[cairo-commit] util/cairo-script
Bryce Harrington
bryce at kemper.freedesktop.org
Mon Apr 2 18:58:24 UTC 2018
util/cairo-script/csi-trace.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 33a348d69809637ba7c48cc31a9f236a5b246ae0
Author: suzuki toshiya <mpsuzuki at hiroshima-u.ac.jp>
Date: Sat Mar 31 21:28:46 2018 +0900
csi-trace does not show help
csi-trace does not show help string correctly, due to a bug in its
command line argument parsing. strcmp returns 0 when there is an exact
match, which means it requires an inverted test.
Reviewed-by: Bryce Harrington <bryce at osg.samsung.com>
diff --git a/util/cairo-script/csi-trace.c b/util/cairo-script/csi-trace.c
index 52eeadef4..e93b28cf0 100644
--- a/util/cairo-script/csi-trace.c
+++ b/util/cairo-script/csi-trace.c
@@ -64,10 +64,10 @@ main (int argc, char **argv)
csi = cairo_script_interpreter_create ();
for (i = 1; i < argc; i++) {
- if (strcmp (argv[i], "--version")) {
+ if (strcmp (argv[i], "--version") == 0) {
printf ("%s: version %s\n", argv[0], __DATE__);
exit (0);
- } else if (strcmp (argv[i], "--help")) {
+ } else if (strcmp (argv[i], "--help") == 0) {
printf ("usage: %s < in > out\n", argv[0]);
exit (0);
}
More information about the cairo-commit
mailing list