From: ellson Date: Fri, 22 Apr 2005 13:26:40 +0000 (+0000) Subject: rename "queue" to "nodequeue" to avoid conflict with definition in: X-Git-Tag: LAST_LIBGRAPH~32^2~7636 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=71c3d23a2e770d9744efec1e90963cf1276616bf;p=graphviz rename "queue" to "nodequeue" to avoid conflict with definition in: /usr/include/sys/stream.h (just on Suns?) --- diff --git a/lib/common/ns.c b/lib/common/ns.c index 596286508..aba858825 100644 --- a/lib/common/ns.c +++ b/lib/common/ns.c @@ -101,7 +101,7 @@ static void init_rank(void) { int i, ctr; - queue *Q; + nodequeue *Q; node_t *v; edge_t *e; diff --git a/lib/common/renderprocs.h b/lib/common/renderprocs.h index 159eaecbf..54068ed09 100644 --- a/lib/common/renderprocs.h +++ b/lib/common/renderprocs.h @@ -56,7 +56,7 @@ extern "C" { extern point coord(node_t * n); extern pointf cvt2ptf(point); extern point cvt2pt(pointf); - extern Agnode_t *dequeue(queue *); + extern Agnode_t *dequeue(nodequeue *); extern void do_graph_label(graph_t * sg); extern point dotneato_closest(splines * spl, point p); extern void graph_init(graph_t * g); @@ -68,8 +68,8 @@ extern "C" { extern void dotneato_write(GVC_t * gvc, graph_t *g); extern void dotneato_write_one(GVC_t * gvc, graph_t *g); extern double elapsed_sec(void); - extern void enqueue(queue *, Agnode_t *); - extern void enqueue_neighbors(queue *, Agnode_t *, int); + extern void enqueue(nodequeue *, Agnode_t *); + extern void enqueue_neighbors(nodequeue *, Agnode_t *, int); extern void emit_attachment(GVC_t * gvc, textlabel_t *, splines *); extern void emit_background(GVC_t * gvc, graph_t *g); extern void emit_clusters(GVC_t * gvc, Agraph_t * g, int flags); @@ -92,7 +92,7 @@ extern "C" { extern pointf flip_ptf(pointf p, int rankdir); extern void free_line(textline_t *); extern void free_label(textlabel_t *); - extern void free_queue(queue *); + extern void free_queue(nodequeue *); extern void free_ugraph(graph_t *); extern char *gd_alternate_fontlist(char *font); extern char *gd_textsize(textline_t * textline, char *fontname, @@ -138,7 +138,7 @@ extern "C" { extern boxf mkboxf(pointf, pointf); extern point neato_closest(splines * spl, point p); extern bezier *new_spline(edge_t * e, int sz); - extern queue *new_queue(int); + extern nodequeue *new_queue(int); extern Agraph_t *next_input_graph(void); extern void osize_label(textlabel_t *, int *, int *, int *, int *); extern char **parse_style(char *s); diff --git a/lib/common/types.h b/lib/common/types.h index e3082d10d..f2d56b397 100644 --- a/lib/common/types.h +++ b/lib/common/types.h @@ -253,9 +253,9 @@ extern "C" { #endif - typedef struct queue { + typedef struct nodequeue { node_t **store, **limit, **head, **tail; - } queue; + } nodequeue; typedef struct adjmatrix_t { int nrows, ncols; diff --git a/lib/common/utils.c b/lib/common/utils.c index 12639d4ad..b668261bb 100644 --- a/lib/common/utils.c +++ b/lib/common/utils.c @@ -75,9 +75,9 @@ void *grealloc(void *ptr, size_t size) /* * a queue of nodes */ -queue *new_queue(int sz) +nodequeue *new_queue(int sz) { - queue *q = NEW(queue); + nodequeue *q = NEW(nodequeue); if (sz <= 1) sz = 2; @@ -86,20 +86,20 @@ queue *new_queue(int sz) return q; } -void free_queue(queue * q) +void free_queue(nodequeue * q) { free(q->store); free(q); } -void enqueue(queue * q, node_t * n) +void enqueue(nodequeue * q, node_t * n) { *(q->tail++) = n; if (q->tail >= q->limit) q->tail = q->store; } -node_t *dequeue(queue * q) +node_t *dequeue(nodequeue * q) { node_t *n; if (q->head == q->tail) diff --git a/lib/dotgen/cluster.c b/lib/dotgen/cluster.c index 27a135acf..077318d25 100644 --- a/lib/dotgen/cluster.c +++ b/lib/dotgen/cluster.c @@ -372,7 +372,7 @@ void build_skeleton(graph_t * g, graph_t * subg) } } -void install_cluster(graph_t * g, node_t * n, int pass, queue * q) +void install_cluster(graph_t * g, node_t * n, int pass, nodequeue * q) { int r; graph_t *clust; diff --git a/lib/dotgen/dotprocs.h b/lib/dotgen/dotprocs.h index ec2a0efcc..0c1582a94 100644 --- a/lib/dotgen/dotprocs.h +++ b/lib/dotgen/dotprocs.h @@ -45,7 +45,7 @@ extern "C" { extern Agedge_t *find_flat_edge(Agnode_t *, Agnode_t *); extern void flat_edge(Agraph_t *, Agedge_t *); extern int flat_edges(Agraph_t *); - extern void install_cluster(Agraph_t *, Agnode_t *, int, queue *); + extern void install_cluster(Agraph_t *, Agnode_t *, int, nodequeue *); extern void install_in_rank(Agraph_t *, Agnode_t *); extern int is_cluster(Agraph_t *); extern void dot_compoundEdges(Agraph_t *); diff --git a/lib/dotgen/mincross.c b/lib/dotgen/mincross.c index dc93ff93d..0c51ed085 100644 --- a/lib/dotgen/mincross.c +++ b/lib/dotgen/mincross.c @@ -860,7 +860,7 @@ void build_ranks(graph_t * g, int pass) int i, j; node_t *n, *n0; edge_t **otheredges; - queue *q; + nodequeue *q; q = new_queue(GD_n_nodes(g)); for (n = GD_nlist(g); n; n = ND_next(n)) @@ -917,7 +917,7 @@ void build_ranks(graph_t * g, int pass) free_queue(q); } -void enqueue_neighbors(queue * q, node_t * n0, int pass) +void enqueue_neighbors(nodequeue * q, node_t * n0, int pass) { int i; edge_t *e;