csi-trace does not show help?

suzuki toshiya <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <[email protected]>
Hi,

I'm afraid that csi-trace does not show help string correctly,
because there could be a bug in its command line argument parse.

Regards,
mpsuzuki

diff --git a/util/cairo-script/csi-trace.c b/util/cairo-script/csi-trace.c
index 52eeade..d64a644 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")) {
             printf ("%s: version %s\n", argv[0], __DATE__);
 	    exit (0);
-        } else if (strcmp (argv[i], "--help")) {
+        } else if (!strcmp (argv[i], "--help")) {
 	    printf ("usage: %s < in > out\n", argv[0]);
 	    exit (0);
         }

-- 
cairo mailing list
[email protected]
https://lists.cairographics.org/mailman/listinfo/cairo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.