]> granicus.if.org Git - graphviz/commitdiff
add support for "yes" and "no" as boolean values
authorellson <devnull@localhost>
Tue, 15 Sep 2009 18:59:50 +0000 (18:59 +0000)
committerellson <devnull@localhost>
Tue, 15 Sep 2009 18:59:50 +0000 (18:59 +0000)
doc/infosrc/attrs.1
lib/common/utils.c

index 4be5d3003c1d00978bc90ab39d0a3cce872be324..b4ea56b6f4044fb4f62e95454599723c6b32ccd2 100644 (file)
@@ -60,8 +60,8 @@ or <A HREF=#d:arrowhead>arrowhead</A> attributes.
 The tools accept standard C representations for <EM>int</EM> and
 <EM>double</EM> types.
 For the <A NAME=k:bool><EM>bool</EM></A> type, TRUE values are
-represented by "true" (case-insensitive)
-and any non-zero integer, and FALSE values by "false" (case-insensitive)
+represented by "true" or "yes" (case-insensitive)
+and any non-zero integer, and FALSE values by "false" or "no" (case-insensitive)
 and zero.
 In addition, there are a variety of specialized types such as
 <EM>arrowType</EM>, <EM>color</EM>,
index ac1abb2f26f4dd3036ed4d3b3ea2f70f093401dd..175e9843dcf0868dd4fa1dbd910afaeac7d656ce 100644 (file)
@@ -435,8 +435,12 @@ boolean mapbool(char *p)
        return FALSE;
     if (!strcasecmp(p, "false"))
        return FALSE;
+    if (!strcasecmp(p, "no"))
+       return FALSE;
     if (!strcasecmp(p, "true"))
        return TRUE;
+    if (!strcasecmp(p, "yes"))
+       return TRUE;
     return atoi(p);
 }