return read(sffileno((Sfio_t *) chan), buf, bufsize);
}
-static int ioputstr(void *chan, char *str)
+static int ioputstr(void *chan, const char *str)
{
return sfputr((Sfio_t *) chan, str, -1);
}
{
Agraph_t* gs[2];
Agraph_t* g = agread (sfstdin, &gprDisc);
- int rv, i;
+ int rv;
gvpropts opts;
gs[0] = g;
static int eval(Agraph_t * g, int root)
{
Agraph_t *subg;
- int cl_count;
+ int cl_count = 0;
if (root && !(GTYPE(g) & gtype))
return 1;
aginit(g, AGNODE, "nodeinfo", sizeof(Agnodeinfo_t), TRUE);
}
- if ((flags & CL) && root) {
- cl_count = 0;
- agapply(g, (Agobj_t *) g, cntCluster, &cl_count, 0);
- }
+ if ((flags & CL) && root)
+ agapply(g, (Agobj_t *) g, cntCluster, &cl_count, 0);
emit(g, root, cl_count);
* Null-terminates buffer; resets and returns pointer to data;
* char* agxbuse(agxbuf* xb)
*/
-#define agxbuse(X) (agxbputc(X,'\0'),(char*)((X)->ptr = (X)->buf))
+#define agxbuse(X) ((void)agxbputc(X,'\0'),(char*)((X)->ptr = (X)->buf))
/* agxbstart:
* Return pointer to beginning of buffer.
pname = "<P0>";
if (BLOCK(n))
bname = agnameof(BLOCK(n)->sub_graph);
- else
+ else {
pname = "<B0>";
+ bname = "";
+ }
fprintf(stderr, "%s: %x %s %s ", agnameof(n), FLAGS(n), pname, bname);
switch (pass) {
case 0:
#endif
}
+/*
#ifdef DEBUG
static void printTok(int tok)
{
}
#endif
+*/
int htmllex()
{
fprintf(stderr, "[%d] %d items\n", i, txt->spans[i].nitems);
for (j = 0; j < txt->spans[i].nitems; j++) {
indent(ind + 2);
- fprintf(stderr, "[%d] (%f) \"%s\" ",
- j, txt->spans[i].items[j].size,
+ fprintf(stderr, "[%d] (%f,%f) \"%s\" ",
+ j, txt->spans[i].items[j].size.x,
+ txt->spans[i].items[j].size.y,
txt->spans[i].items[j].str);
if (txt->spans[i].items[j].font)
fprintf(stderr, "font %s color %s size %f\n",
Show_boxes[Show_cnt+1] = NULL;
}
-static void psprintpolypts(Ppoint_t * p, int sz)
-{
- int i;
-
- fprintf(stderr, "%%!\n");
- fprintf(stderr, "%% constraint poly\n");
- fprintf(stderr, "newpath\n");
- for (i = 0; i < sz; i++)
- fprintf(stderr, "%f %f %s\n", p[i].x, p[i].y,
- (i == 0 ? "moveto" : "lineto"));
- fprintf(stderr, "closepath stroke\n");
-}
-static void psprintpoint(point p)
-{
- fprintf(stderr, "gsave\n");
- fprintf(stderr,
- "newpath %d %d moveto %d %d 2 0 360 arc closepath fill stroke\n",
- p.x, p.y, p.x, p.y);
- fprintf(stderr, "/Times-Roman findfont 4 scalefont setfont\n");
- fprintf(stderr, "%d %d moveto (\\(%d,%d\\)) show\n", p.x + 5, p.y + 5,
- p.x, p.y);
- fprintf(stderr, "grestore\n");
-}
-static void psprintpointf(pointf p)
-{
- fprintf(stderr, "gsave\n");
- fprintf(stderr,
- "newpath %.5g %.5g moveto %.5g %.5g 2 0 360 arc closepath fill stroke\n",
- p.x, p.y, p.x, p.y);
- fprintf(stderr, "/Times-Roman findfont 4 scalefont setfont\n");
- fprintf(stderr, "%.5g %.5g moveto (\\(%.5g,%.5g\\)) show\n", p.x + 5, p.y + 5,
- p.x, p.y);
- fprintf(stderr, "grestore\n");
-}
-
static void psprintspline(Ppolyline_t spl)
{
char buf[BUFSIZ];
}
}
-#ifdef DEBUG
-static void indent(int l)
-{
- int i;
- for (i = 0; i < l; i++)
- fputs(" ", stderr);
-}
-
-static void prbox(boxf b)
-{
- fprintf(stderr, "((%.5g,%.5g),(%.5g,%.5g))\n", b.LL.x, b.LL.y, b.UR.x,
- b.UR.y);
-}
-
-static void dumpL(field_t * info, int level)
-{
- int i;
-
- indent(level);
- if (info->n_flds == 0) {
- fprintf(stderr, "Label \"%s\" ", info->lp->text);
- prbox(info->b);
- } else {
- fprintf(stderr, "Tbl ");
- prbox(info->b);
- for (i = 0; i < info->n_flds; i++) {
- dumpL(info->fld[i], level + 1);
- }
- }
-}
-#endif
-
/* syntax of labels: foo|bar|baz or foo|(recursive|label)|baz */
static void record_init(node_t * n)
{
arr->pts[arr->cnt++].lengthsofar = l;
}
+/*
#ifdef DEBUG
static void
printArr (vararr_t* arr, FILE* fp)
}
}
#endif
+*/
static void
fixArr (vararr_t* arr)
else
return NULL;
}
-Agraphinfo_t* GD_info(g) { return ((Agraphinfo_t*)AGDATA(g));}
-Agnodeinfo_t* ND_info(n) { return ((Agnodeinfo_t*)AGDATA(n));}
+Agraphinfo_t* GD_info(graph_t * g) { return ((Agraphinfo_t*)AGDATA(g));}
+Agnodeinfo_t* ND_info(node_t * n) { return ((Agnodeinfo_t*)AGDATA(n));}
#endif
#if !defined(MSWIN32) && !defined(WIN32)
return -1.0;
/* if 1 crossing and on the line x == xcoord (within 0.005 point) */
- if ((no_cross == 1) && (abs(pts[3].x - xcoord) <= 0.005)) {
+ if ((no_cross == 1) && (fabs(pts[3].x - xcoord) <= 0.005)) {
if ((ymin <= pts[3].y) && (pts[3].y <= ymax)) {
return tmax;
} else
return -1.0;
/* if 1 crossing and on the line y == ycoord (within 0.005 point) */
- if ((no_cross == 1) && (abs(pts[3].y - ycoord) <= 0.005)) {
+ if ((no_cross == 1) && (fabs(pts[3].y - ycoord) <= 0.005)) {
if ((xmin <= pts[3].x) && (pts[3].x <= xmax)) {
return tmax;
} else
for (u = GD_nlist(g); u; u = ND_next(u)) cnt++;
return cnt;
}
-
-static void
-dumpRanks (graph_t * g)
-{
- int i, j;
- node_t* u;
- rank_t *rank = GD_rank(g);
- int rcnt = 0;
- for (i = GD_minrank(g); i <= GD_maxrank(g); i++) {
- fprintf (stderr, "[%d] :", i);
- for (j = 0; j < rank[i].n; j++) {
- u = rank[i].v[j];
- rcnt++;
- if (streq(agnameof(u),"virtual"))
- fprintf (stderr, " %x", u);
- else
- fprintf (stderr, " %s", agnameof(u));
-
- }
- fprintf (stderr, "\n");
- }
- fprintf (stderr, "count %d rank count = %d\n", fastn(g), rcnt);
-}
#endif
static void free_matrix(adjmatrix_t * p);
static int ordercmpf(int *i0, int *i1);
#ifdef DEBUG
-static int gd_minrank(Agraph_t *g) {return GD_minrank(g);}
-static int gd_maxrank(Agraph_t *g) {return GD_maxrank(g);}
-static rank_t *gd_rank(Agraph_t *g, int r) {return &GD_rank(g)[r];}
-static int nd_order(Agnode_t *v) { return ND_order(v); }
-
void check_rs(graph_t * g, int null_ok);
void check_order(void);
void check_vlists(graph_t * g);
static int *TI_list;
static boolean ReMincross;
-#ifdef DEBUG
-static void indent(graph_t* g)
-{
- if (g->parent) {
- fprintf (stderr, " ");
- indent(g->parent);
- }
-}
-
-static char* nname(node_t* v)
-{
- static char buf[1000];
- if (ND_node_type(v)) {
- if (ND_ranktype(v) == CLUSTER)
- sprintf (buf, "v%s_%p", agnameof(ND_clust(v)), v);
- else
- sprintf (buf, "v_%p", v);
- } else
- sprintf (buf, "%s", agnameof(v));
- return buf;
-}
-static void dumpg (graph_t* g)
-{
- int j, i, r;
- node_t* v;
- edge_t* e;
-
- fprintf (stderr, "digraph A {\n");
- for (r = GD_minrank(g); r <= GD_maxrank(g); r++) {
- fprintf (stderr, " subgraph {rank=same ");
- for (i = 0; i < GD_rank(g)[r].n; i++) {
- v = GD_rank(g)[r].v[i];
- if (i > 0)
- fprintf (stderr, " -> %s", nname(v));
- else
- fprintf (stderr, "%s", nname(v));
- }
- if (i > 1) fprintf (stderr, " [style=invis]}\n");
- else fprintf (stderr, " }\n");
- }
- for (r = GD_minrank(g); r < GD_maxrank(g); r++) {
- for (i = 0; i < GD_rank(g)[r].n; i++) {
- v = GD_rank(g)[r].v[i];
- for (j = 0; (e = ND_out(v).list[j]); j++) {
- fprintf (stderr, "%s -> ", nname(v));
- fprintf (stderr, "%s\n", nname(aghead(e)));
- }
- }
- }
- fprintf (stderr, "}\n");
-}
-static void dumpr (graph_t* g, int edges)
-{
- int j, i, r;
- node_t* v;
- edge_t* e;
-
- for (r = GD_minrank(g); r <= GD_maxrank(g); r++) {
- fprintf (stderr, "[%d] ", r);
- for (i = 0; i < GD_rank(g)[r].n; i++) {
- v = GD_rank(g)[r].v[i];
- fprintf (stderr, "%s(%.02f,%d) ", nname(v), saveorder(v),ND_order(v));
- }
- fprintf (stderr, "\n");
- }
- if (edges == 0) return;
- for (r = GD_minrank(g); r < GD_maxrank(g); r++) {
- for (i = 0; i < GD_rank(g)[r].n; i++) {
- v = GD_rank(g)[r].v[i];
- for (j = 0; (e = ND_out(v).list[j]); j++) {
- fprintf (stderr, "%s -> ", nname(v));
- fprintf (stderr, "%s\n", nname(aghead(e)));
- }
- }
- }
-}
-#endif
-
typedef struct {
Agrec_t h;
int x, lo, hi;
if (null_ok == FALSE)
abort();
} else {
- fprintf(stderr, "%s(%d)\t", agnameof(v), ND_mval(v));
+ fprintf(stderr, "%s(%f)\t", agnameof(v), ND_mval(v));
assert(ND_rank(v) == r);
assert(v != prev);
prev = v;
static void contain_nodes(graph_t * g);
static boolean idealsize(graph_t * g, double);
-#ifdef DEBUG
-static void
-dumpNS (graph_t * g)
-{
- node_t* n = GD_nlist(g);
- elist el;
- edge_t* e;
- int i;
-
- while (n) {
- el = ND_out(n);
- for (i = 0; i < el.size; i++) {
- e = el.list[i];
- fprintf (stderr, "%s(%x) -> ", agnameof(agtail(e)),agtail(e));
- fprintf (stderr, "%s(%x) : %d\n", agnameof(aghead(e)), aghead(e),
- ED_minlen(e));
- }
- n = ND_next(n);
- }
-}
-#endif
-
static double
largeMinlen (double l)
{
*/
#define INIT_SZ 100
-#ifdef DEBUG
-static void dumpObj(Ppoly_t * p)
-{
- int j;
- Ppoint_t pt;
- for (j = 0; j < p->pn; j++) {
- pt = p->ps[j];
- fprintf(stderr, " %.5g %.5g", pt.x, pt.y);
- }
- fputs("\n", stderr);
-}
-
-static void dumpObjlist(objlist * l)
-{
- int i;
- for (i = 0; i < l->cnt; i++) {
- dumpObj(l->obs[i]);
- }
-}
-#endif
-
static void addObj(objlist * l, Ppoly_t * obj)
{
if (l->sz == l->cnt) {
#define ARROW_WIDTH 5
/* #define DEGREES(rad) ((rad)/M_PI * 180.0) */
-static char *plog = "%%!PS-Adobe-2.0\n\n\
+static char *plog = "%!PS-Adobe-2.0\n\n\
/Times-Roman findfont 14 scalefont setfont\n\
/lLabel {\n\
\tmoveto\n\
double arrow_w, arrow_l;
int portColor;
- fprintf(fp, plog);
+ fprintf(fp, "%s", plog);
/*
if (agisdirected (g) && DoArrow) {
}
}
- fprintf(fp, elog);
+ fprintf(fp, "%s", elog);
}
void outputGraph(Agraph_t * g, FILE * fp, int expMode)
}
-#ifdef DEBUG
-static char *symName(Expr_t * ex, int op)
-{
- if (op >= MINNAME && op <= MAXNAME)
- return gprnames[op];
- else {
- Sfio_t *sf = sfstropen();
- char *s;
-
- sfprintf(sf, "<unknown (%d)>", op);
- s = exstring(ex, sfstruse(sf));
- sfclose(sf);
- return s;
- }
-}
-#endif
-
/* xargs:
* Convert string argument to graph to type of graph desired.
* u => undirected
{
Agnode_t *n;
real *sizes = N_GNEW(2 * agnnodes(g), real);
- int i, nedge_nodes;
+ int i, nedge_nodes = 0;
int* elabs;
for (n = agfstnode(g); n; n = agnxtnode(g, n)) {
break;
case AM_PUSH:
/* scanAdjust (G, 1); */
+ ret = 0;
break;
case AM_PUSHPULL:
/* scanAdjust (G, 0); */
+ ret = 0;
break;
case AM_PORTHO_YX:
case AM_PORTHO:
case AM_ORTHOXY:
case AM_ORTHOYX:
cAdjust(G, am->mode);
+ ret = 0;
break;
case AM_COMPRESS:
ret = scAdjust(G, -1);
default: /* to silence warnings */
if ((am->mode != AM_VOR) && (am->mode != AM_SCALE))
agerr(AGWARN, "Unhandled adjust option %s\n", am->print);
+ ret = 0;
break;
}
/* fprintf (stderr, "%s %.4f sec\n", am->print, elapsed_sec()); */
}
}
-#ifdef DEBUG
-static int
-indegree (graph_t * g, node_t *n)
-{
- edge_t *e;
- int cnt = 0;
- for (e = agfstin(g,n); e; e = agnxtin(g,e)) cnt++;
- return cnt;
-}
-
-static int
-outdegree (graph_t * g, node_t *n)
-{
- edge_t *e;
- int cnt = 0;
- for (e = agfstout(g,n); e; e = agnxtout(g,e)) cnt++;
- return cnt;
-}
-
-static void
-validate(graph_t * g)
-{
- node_t *n;
- edge_t *e;
- int i, cnt;
-
- cnt = 0;
- for (n = GD_nlist(g);n; n = ND_next(n)) {
- assert(outdegree(g,n) == ND_out(n).size);
- for (i = 0; (e = ND_out(n).list[i]); i++) {
- assert(agtail(e) == n);
- assert( e == agfindedge(g, n, aghead(e)));
- }
- assert(indegree(g,n) == ND_in(n).size);
- for (i = 0; (e = ND_in(n).list[i]); i++) {
- assert(aghead(e) == n);
- assert( e == agfindedge(g, agtail(e), n));
- }
- cnt++;
- }
-
- assert (agnnodes(g) == cnt);
-}
-#endif
-
#ifdef OLD
static node_t *newNode(graph_t * g)
{
#endif
}
-#ifdef DEBUG
-
-static void
-PQprint (PQ* pq)
-{
- int i;
- PQTYPE n;
-
- fprintf (stderr, "Q: ");
- for (i = 1; i <= pq->PQcnt; i++) {
- n = pq->pq[i];
- fprintf (stderr, "(%d:%f) ", N_IDX(pq,n), N_VAL(pq,n));
- }
- fprintf (stderr, "\n");
-}
-#endif
#endif
vconfig_t *vconfig = 0;
path *P = NULL;
int useEdges = (Nop > 1);
- router_t* rtr = 0;
int legal = 0;
+#ifdef HAVE_GTS
+ router_t* rtr = 0;
+#endif
+
/* build configuration */
if (edgetype >= ET_PLINE) {
obs = N_NEW(agnnodes(g), Ppoly_t *);
int i, j, e;
float *Dij;
int shift = 0;
- double delta;
+ double delta = 0.0;
if (graph->ewgts == NULL)
return 0;
return Dij;
}
-#ifdef DEBUG
-static void dumpMatrix(float *Dij, int n)
-{
- int i, j, count = 0;
- for (i = 0; i < n; i++) {
- for (j = i; j < n; j++) {
- fprintf(stderr, "%.02f ", Dij[count++]);
- }
- fputs("\n", stderr);
- }
-}
-#endif
-
/* Accumulator type for diagonal of Laplacian. Needs to be as large
* as possible. Use long double; configure to double if necessary.
*/
ocp = onp->cells[0];
}
p = sidePt (onp, ocp);
- wt = abs(p.x - midp.x) + abs(p.y - midp.y);
+ wt = fabs(p.x - midp.x) + fabs(p.y - midp.y);
if (onTop)
createSEdge (sg, sp, onp, 0); /* FIX weight */
else
else
ocp = onp->cells[0];
p = sidePt (onp, ocp);
- wt = abs(p.x - midp.x) + abs(p.y - midp.y);
+ wt = fabs(p.x - midp.x) + fabs(p.y - midp.y);
createSEdge (sg, np, onp, 0); /* FIX weight */
}
sg->nnodes++;
size = traverse_polygon (visited, decomp, 0, seg, tr, 0, tr_start, tr[tr_start].u0, flip, TR_FROM_UP);
else if (tr[tr_start].d0 > 0)
size = traverse_polygon (visited, decomp, 0, seg, tr, 0, tr_start, tr[tr_start].d0, flip, TR_FROM_DN);
+ else
+ size = 0;
free (visited);
free (mchain);
return 1;
}
-#ifdef DEBUG
-static void
-dumpTrap (trap_t* tr, int n)
-{
- int i;
- for (i = 1; i <= n; i++) {
- tr++;
- fprintf (stderr, "%d : %d %d (%f,%f) (%f,%f) %d %d %d %d\n", i,
- tr->lseg, tr->rseg, tr->hi.x, tr->hi.y, tr->lo.x, tr->lo.y,
- tr->u0, tr->u1, tr->d0, tr->d1);
- fprintf (stderr, " %d %d %d %d\n", tr->sink, tr->usave,
- tr->uside, tr->state);
- }
- fprintf (stderr, "====\n");
-}
-
-static void
-dumpSegs (segment_t* sg, int n)
-{
- int i;
- for (i = 1; i <= n; i++) {
- sg++;
- fprintf (stderr, "%d : (%f,%f) (%f,%f) %d %d %d %d %d\n", i,
- sg->v0.x, sg->v0.y, sg->v1.x, sg->v1.y,
- sg->is_inserted, sg->root0, sg->root1, sg->next, sg->prev);
- }
- fprintf (stderr, "====\n");
-}
-#endif
-
boxf*
partition (cell* cells, int ncells, int* nrects, boxf bb)
{
}
#endif
+#ifdef GASP
+
static Ppoint_t Bezpt[1000];
static int Bezctr;
}
}
-#ifdef GASP
-
FILE *GASPout = stderr;
static void gasp_print_point(Ppoint_t p)
/* Check to see if a block is in the free tree */
#if __STD_C
-static vmintree(Block_t * node, Block_t * b)
+static int vmintree(Block_t * node, Block_t * b)
#else
-static vmintree(node, b)
+static int vmintree(node, b)
Block_t *node;
Block_t *b;
#endif
/* Check to see if a block is known to be free */
#if __STD_C
-static vmisfree(Vmdata_t * vd, Block_t * b)
+static int vmisfree(Vmdata_t * vd, Block_t * b)
#else
-static vmisfree(vd, b)
+static int vmisfree(vd, b)
Vmdata_t *vd;
Block_t *b;
#endif
/* check to see if the tree is in good shape */
#if __STD_C
-static vmchktree(Block_t * node)
+static int vmchktree(Block_t * node)
#else
-static vmchktree(node)
+static int vmchktree(node)
Block_t *node;
#endif
{
}
#if __STD_C
-static vmonlist(Block_t * list, Block_t * b)
+static int vmonlist(Block_t * list, Block_t * b)
#else
-static vmonlist(list, b)
+static int vmonlist(list, b)
Block_t *list;
Block_t *b;
#endif
}
#if __STD_C
-static vmcheck(Vmdata_t * vd, size_t size, int wild)
+static int vmcheck(Vmdata_t * vd, size_t size, int wild)
#else
-static vmcheck(vd, size, wild)
+static int vmcheck(vd, size, wild)
Vmdata_t *vd;
size_t size; /* if > 0, checking that no large free block >size */
int wild; /* if != 0, do above but allow wild to be >size */
#include "agxbuf.h"
#include "utils.h"
#include "color.h"
+#include "colorprocs.h"
#include "const.h"
typedef enum { FORMAT_PIC, } format_type;
-static int BezierSubdivision = 10;
static int onetime = TRUE;
static double Fontscale;
{
agerr(AGWARN, "%s%s unsupported\n", picgen_msghdr, s);
}
-static void warn(char *s)
-{
- agerr(AGWARN, "%s%s\n", picgen_msghdr, s);
-}
/* troff font mapping */
typedef struct {
return rv;
}
-static void pic_set_color(GVJ_t *job, char *name)
-{
- gvcolor_t color;
-
- colorxlate(name, &color, HSVA_DOUBLE);
- /* just v used to set grayscale value */
- gvprintf(job, "setfillval %f\n", color.u.HSVA[2]);
-}
-
-static void pic_set_style(GVJ_t *job, char **s)
-{
- const char *line, *p;
- char skip = 0;
- char buf[BUFSIZ];
-
- buf[0] = '\0';
- gvprintf(job, "define attrs%d %%", 0);
- while ((p = line = *s++)) {
- while (*p)
- p++;
- p++;
- while (*p) {
- if (!strcmp(line, "setlinewidth")) { /* a hack to handle the user-defined (PS) style spec in proc3d.gv */
- long n = atol(p);
-
- sprintf(buf,
- "oldlinethick = linethick;linethick = %ld * scalethickness / %.0f\n",
- n, Fontscale);
- skip = 1;
- } else
- gvprintf(job, " %s", p);
- while (*p)
- p++;
- p++;
- }
- if (!skip)
- gvprintf(job, " %s", line);
- skip = 0;
- }
- gvprintf(job, " %%\n");
- gvprintf(job, "%s", buf);
-}
-
static void picptarray(GVJ_t *job, pointf * A, int n, int close)
{
int i;
return buf;
}
-static int picColorResolve(int *new, int r, int g, int b)
-{
-#define maxColors 256
- static int top = 0;
- static short red[maxColors], green[maxColors], blue[maxColors];
- int c;
- int ct = -1;
- long rd, gd, bd, dist;
- long mindist = 3 * 255 * 255; /* init to max poss dist */
-
- *new = 0; /* in case it is not a new color */
- for (c = 0; c < top; c++) {
- rd = (long) (red[c] - r);
- gd = (long) (green[c] - g);
- bd = (long) (blue[c] - b);
- dist = rd * rd + gd * gd + bd * bd;
- if (dist < mindist) {
- if (dist == 0)
- return c; /* Return exact match color */
- mindist = dist;
- ct = c;
- }
- }
- /* no exact match. We now know closest, but first try to allocate exact */
- if (top++ == maxColors)
- return ct; /* Return closest available color */
- red[c] = r;
- green[c] = g;
- blue[c] = b;
- *new = 1; /* flag new color */
- return c; /* Return newly allocated color */
-}
-
static void pic_line_style(obj_state_t *obj, int *line_style, double *style_val)
{
switch (obj->pen) {
{
obj_state_t *obj = job->obj;
- int object_code = 3; /* always 3 for spline */
+// int object_code = 3; /* always 3 for spline */
int sub_type;
int line_style; /* solid, dotted, dashed */
- int thickness = obj->penwidth;
- int pen_color = obj->pencolor.u.index;
+// int thickness = obj->penwidth;
+// int pen_color = obj->pencolor.u.index;
int fill_color = obj->fillcolor.u.index;
- int pen_style = 0; /* not used */
+// int pen_style = 0; /* not used */
int area_fill;
double style_val;
- int cap_style = 0;
- int forward_arrow = 0;
- int backward_arrow = 0;
+// int cap_style = 0;
+// int forward_arrow = 0;
+// int backward_arrow = 0;
int npoints = n;
int i;
{
obj_state_t *obj = job->obj;
- int object_code = 2; /* always 2 for polyline */
- int sub_type = 3; /* always 3 for polygon */
+// int object_code = 2; /* always 2 for polyline */
+// int sub_type = 3; /* always 3 for polygon */
int line_style; /* solid, dotted, dashed */
- int thickness = obj->penwidth;
- int pen_color = obj->pencolor.u.index;
- int fill_color = obj->fillcolor.u.index;
- int pen_style = 0; /* not used */
- int area_fill = filled ? 20 : -1;
+// int thickness = obj->penwidth;
+// int pen_color = obj->pencolor.u.index;
+// int fill_color = obj->fillcolor.u.index;
+// int pen_style = 0; /* not used */
+// int area_fill = filled ? 20 : -1;
double style_val;
- int join_style = 0;
- int cap_style = 0;
- int radius = 0;
- int forward_arrow = 0;
- int backward_arrow = 0;
- int npoints = n + 1;
+// int join_style = 0;
+// int cap_style = 0;
+// int radius = 0;
+// int forward_arrow = 0;
+// int backward_arrow = 0;
+// int npoints = n + 1;
pic_line_style(obj, &line_style, &style_val);
{
obj_state_t *obj = job->obj;
- int object_code = 2; /* always 2 for polyline */
- int sub_type = 1; /* always 1 for polyline */
+// int object_code = 2; /* always 2 for polyline */
+// int sub_type = 1; /* always 1 for polyline */
int line_style; /* solid, dotted, dashed */
- int thickness = obj->penwidth;
- int pen_color = obj->pencolor.u.index;
- int fill_color = 0;
- int pen_style = 0; /* not used */
- int area_fill = 0;
+// int thickness = obj->penwidth;
+// int pen_color = obj->pencolor.u.index;
+// int fill_color = 0;
+// int pen_style = 0; /* not used */
+// int area_fill = 0;
double style_val;
- int join_style = 0;
- int cap_style = 0;
- int radius = 0;
- int forward_arrow = 0;
- int backward_arrow = 0;
- int npoints = n;
+// int join_style = 0;
+// int cap_style = 0;
+// int radius = 0;
+// int forward_arrow = 0;
+// int backward_arrow = 0;
+// int npoints = n;
pic_line_style(obj, &line_style, &style_val);
char *ObjType;
unsigned int ObjId;
obj_state_t *obj = job->obj;
- void *ObjFlag;
+ int ObjFlag;
switch (obj->emit_state) {
case EMIT_NDRAW:
ObjType = "node";
ObjFlag = 1;
- ObjId = obj->u.n;
+ ObjId = AGID(obj->u.n);
break;
case EMIT_NLABEL:
ObjType = "node";
ObjFlag = 0;
- ObjId = obj->u.n;
+ ObjId = AGID(obj->u.n);
break;
case EMIT_EDRAW:
case EMIT_TDRAW:
case EMIT_HDRAW:
ObjType = "edge";
ObjFlag = 1;
- ObjId = obj->u.e;
+ ObjId = AGID(obj->u.e);
break;
case EMIT_ELABEL:
case EMIT_TLABEL:
case EMIT_HLABEL:
ObjType = "edge";
ObjFlag = 0;
- ObjId = obj->u.e;
+ ObjId = AGID(obj->u.e);
break;
case EMIT_GDRAW:
ObjType = "graph";
ObjFlag = 1;
- ObjId = obj->u.g;
+ ObjId = AGID(obj->u.g);
break;
case EMIT_GLABEL:
ObjFlag = 0;
ObjType = "graph label";
- ObjId = obj->u.g;
+ ObjId = AGID(obj->u.g);
break;
case EMIT_CDRAW:
ObjType = "graph";
ObjFlag = 1;
- ObjId = obj->u.sg;
+ ObjId = AGID(obj->u.sg);
break;
case EMIT_CLABEL:
ObjType = "graph";
ObjFlag = 0;
- ObjId = obj->u.sg;
+ ObjId = AGID(obj->u.sg);
break;
default:
assert (0);