]> granicus.if.org Git - graphviz/commitdiff
Fix parsing of overlap to report known but unavailable modes.
authorerg <devnull@localhost>
Wed, 25 Aug 2010 21:23:30 +0000 (21:23 +0000)
committererg <devnull@localhost>
Wed, 25 Aug 2010 21:23:30 +0000 (21:23 +0000)
lib/neatogen/adjust.c

index a9d2fd0d64c17d2042cd17506475d3a0009eb678..e608f57a85617423ce15aab4ebeeca7695b7dbfb 100644 (file)
@@ -922,8 +922,10 @@ static lookup_t adjustMode[] = {
     ITEM(AM_COMPRESS, "compress", "compress"),
     ITEM(AM_VPSC, "vpsc", "vpsc"),
     ITEM(AM_IPSEP, "ipsep", "ipsep"),
-#if (HAVE_GTS || HAVE_TRIANGLE)
+#if ((defined(HAVE_GTS) || defined(HAVE_TRIANGLE)) && defined(SFDP))
     ITEM(AM_PRISM, "prism", "prism"),
+#else
+    ITEM(AM_PRISM, "prism", 0),
 #endif
     {AM_NONE, 0, 0, 0}
 };
@@ -958,6 +960,10 @@ static adjust_data *getAdjustMode(Agraph_t* g, char *s, adjust_data* dp)
     else {
        while (ap->attrib) {
            if (!strncasecmp(s, ap->attrib, ap->len)) {
+               if (ap->print == NULL) {
+                   agerr (AGWARN, "Overlap value \"%s\" unknown - ignored\n", ap->attrib);
+                   ap = &adjustMode[0];
+               }
                dp->mode = ap->mode;
                dp->print = ap->print;
                if (ap->mode == AM_PRISM)