]> granicus.if.org Git - graphviz/commitdiff
indicate default color in output from inkpot_print_names()
authorellson <devnull@localhost>
Thu, 25 Sep 2008 15:51:34 +0000 (15:51 +0000)
committerellson <devnull@localhost>
Thu, 25 Sep 2008 15:51:34 +0000 (15:51 +0000)
lib/inkpot/inkpot_scheme.c
lib/inkpot/inkpot_structs.h

index 67765eae89241e62c14ed3c4a2825b0b9139fa39..38e7d15e7c9540b525edf0d114db32613b8bfb48 100644 (file)
@@ -460,7 +460,7 @@ inkpot_status_t inkpot_print_schemes( inkpot_t *inkpot, FILE *out )
     for (i = 0; i < SZT_SCHEMES_NAME; i++) {
        found = 0;
         if ((1<<i) & inkpot->scheme_bits) {
-            fprintf (out, "%s", &TAB_STRINGS[TAB_SCHEMES_NAME[i].string_idx]);
+            fprintf (out, "%s (in)", &TAB_STRINGS[TAB_SCHEMES_NAME[i].string_idx]);
             if (i == inkpot->default_scheme_name_idx) 
                 fprintf (out, " (default)");
            found++;
@@ -477,7 +477,7 @@ inkpot_status_t inkpot_print_schemes( inkpot_t *inkpot, FILE *out )
     }
     found = 0;
     if (inkpot->scheme_index) {
-        fprintf (out, "%s (indexed)", &TAB_STRINGS[inkpot->scheme_index->string_idx]);
+        fprintf (out, "%s (indexed) (in)", &TAB_STRINGS[inkpot->scheme_index->string_idx]);
        found++;
     }
     if (inkpot->out_scheme_index) {
@@ -532,7 +532,7 @@ inkpot_status_t inkpot_print_names( inkpot_t *inkpot, FILE *out )
     IDX_IXVALUES k, first, last;
     IDX_VALUES v;
 
-    fprintf(out, "names:\n");
+    fprintf(out, "names (in):\n");
     inkpot_scheme_bits = inkpot->scheme_bits;
     if (inkpot_scheme_bits) {
         for (i = 0; i < SZT_NAMES; i++) {
@@ -543,6 +543,8 @@ inkpot_status_t inkpot_print_names( inkpot_t *inkpot, FILE *out )
                inkpot_print_scheme_names(inkpot, scheme_bits, out);
                fprintf(out, " ");
                inkpot_print_rgba(TAB_VALUES[name->value_idx].rgba, out);
+               if (name->value_idx == inkpot->default_value_idx)
+                   fprintf(out, " (default)");
                fprintf(out, "\n");
             }
         }
index 2fda491a5c66a198fbec656a798323d01e6a0255..48cfbdb5b4b6f36c1452e4752b34aec86850634f 100644 (file)
@@ -108,8 +108,7 @@ typedef struct inkpot_noname_value_s {      /* Numeric color values used by the remai
 
 struct inkpot_s {              /* The Ink Pot */
        BIT_SCHEMES_NAME
-           scheme_bits,        /* One bit per inkpot_scheme_name_t,
-                                *max 32 schemes */
+           scheme_bits,        /* One bit per inkpot_scheme_name_t */
            out_scheme_bit;     /* One scheme only for output. */
 
        IDX_SCHEMES_NAME
@@ -122,13 +121,12 @@ struct inkpot_s {         /* The Ink Pot */
            value_idx;          /* The current color value. */
 
        inkpot_scheme_index_t
-           *scheme_index,      /* Pointer to the indexed color scheme,
-                                  or NULL. (Only 1 at a time) */
+           *scheme_index,      /* Pointer to the indexed color scheme, or NULL. */
            *out_scheme_index;  /* Indexed output scheme, or NULL */
 
        inkpot_name_t
-           *name,              /* The most recently resolved color name. */
-           *out_name;          /* The most recently translated color name. */
+           *name,              /* The current color name, or NULL. */
+           *out_name;          /* The current translated color name, or NULL. */
 };
 
 #endif /* INKPOT_STRUCTS_H */