]> granicus.if.org Git - graphviz/commitdiff
Add necessary utility routines to support bfs
authorerg <devnull@localhost>
Wed, 1 Jun 2005 23:14:08 +0000 (23:14 +0000)
committererg <devnull@localhost>
Wed, 1 Jun 2005 23:14:08 +0000 (23:14 +0000)
cmd/gvpr/compile.c

index 419997ac9eaeb9a141ad4aced0a1b6100139b3b9..9a7b7ffd78c26f287a5cc5b3c286193a58f31628 100644 (file)
@@ -1148,6 +1148,9 @@ refval(Expr_t * pgm, Exnode_t * node, Exid_t * sym, Exref_t * ref,
        case C_dfs:
            v.integer = TV_dfs;
            break;
+       case C_bfs:
+           v.integer = TV_bfs;
+           break;
        case C_flat:
            v.integer = TV_flat;
            break;
@@ -1333,6 +1336,9 @@ int stringOf(Expr_t * prog, register Exnode_t * x, int arg)
        case TV_dfs:
            x->data.constant.value.string = "TV_dfs";
            break;
+       case TV_bfs:
+           x->data.constant.value.string = "TV_bfs";
+           break;
        case TV_fwd:
            x->data.constant.value.string = "TV_fwd";
            break;
@@ -1419,6 +1425,9 @@ convert(Expr_t * prog, register Exnode_t * x, int type,
                case TV_dfs:
                    x->data.constant.value.string = "TV_dfs";
                    break;
+               case TV_bfs:
+                   x->data.constant.value.string = "TV_bfs";
+                   break;
                case TV_fwd:
                    x->data.constant.value.string = "TV_fwd";
                    break;
@@ -1448,6 +1457,7 @@ convert(Expr_t * prog, register Exnode_t * x, int type,
            switch (x->data.constant.value.integer) {
            case TV_flat:
            case TV_dfs:
+           case TV_bfs:
            case TV_fwd:
            case TV_rev:
                break;
@@ -1474,6 +1484,9 @@ convert(Expr_t * prog, register Exnode_t * x, int type,
                    } else if (!strcmp(s + 3, "dfs")) {
                        x->data.constant.value.integer = TV_dfs;
                        ret = 0;
+                   } else if (!strcmp(s + 3, "bfs")) {
+                       x->data.constant.value.integer = TV_bfs;
+                       ret = 0;
                    } else if (!strcmp(s + 3, "fwd")) {
                        x->data.constant.value.integer = TV_fwd;
                        ret = 0;