From 1e6fcbf588c7d76042b94b98132d27ea97e39bfb Mon Sep 17 00:00:00 2001 From: ellson Date: Tue, 30 Sep 2008 03:14:48 +0000 Subject: [PATCH] baseline --- lib/inkpot/test/test.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/lib/inkpot/test/test.c b/lib/inkpot/test/test.c index 5ae89fcc6..ac59d8f5a 100644 --- a/lib/inkpot/test/test.c +++ b/lib/inkpot/test/test.c @@ -32,36 +32,37 @@ int main (int argc, char *argv[]) fprintf(stderr, "failure to initialize inkpot\n"); return 0; } - + + /* requested color */ if (argc < 2) color = NULL; else color = argv[1]; + /* requested schemes (comma-separated) */ if (argc < 3) { - rc = inkpot_translate(inkpot, "x11"); + rc = inkpot_schemes(inkpot, "x11"); assert(rc == INKPOT_SUCCESS); } else { - rc = inkpot_translate(inkpot, argv[2]); + rc = inkpot_schemes(inkpot, argv[2]); if (rc == INKPOT_SCHEME_UNKNOWN) inkpot_debug_error(inkpot); else assert(rc == INKPOT_SUCCESS); } + /* target scheme */ if (argc < 4) { - rc = inkpot_schemes(inkpot, "x11"); + rc = inkpot_translate(inkpot, "x11"); assert(rc == INKPOT_SUCCESS); } else { - for (i = 3; i < argc; i++) { - rc = inkpot_schemes(inkpot, argv[i]); - if (rc == INKPOT_SCHEME_UNKNOWN) - inkpot_debug_error(inkpot); - else - assert(rc == INKPOT_SUCCESS); - } + rc = inkpot_translate(inkpot, argv[3]); + if (rc == INKPOT_SCHEME_UNKNOWN) + inkpot_debug_error(inkpot); + else + assert(rc == INKPOT_SUCCESS); } inkpot_debug_schemes(inkpot); -- 2.40.0