These pointers implicitly coerce.
Agsym_t *sym, *psym;
view = dtview(dict, NULL);
- for (sym = (Agsym_t *) dtfirst(dict); sym;
+ for (sym = dtfirst(dict); sym;
sym = (Agsym_t *) dtnext(dict, sym)) {
if (!isGxlGrammar(sym->name)) {
if (EMPTY(sym->defval)) { /* try to skip empty str (default) */
}
data = (Agattr_t *) agattrrec(obj);
if (data) {
- for (sym = (Agsym_t *) dtfirst(defdict); sym;
+ for (sym = dtfirst(defdict); sym;
sym = (Agsym_t *) dtnext(defdict, sym)) {
if (!isGxlGrammar(sym->name)) {
if ((AGTYPE(obj) == AGINEDGE)
Agsym_t *sym, *newsym;
assert(dtsize(dest) == 0);
- for (sym = (Agsym_t *) dtfirst(src); sym;
+ for (sym = dtfirst(src); sym;
sym = (Agsym_t *) dtnext(src, sym)) {
newsym = agnewsym(g, sym->name, sym->defval, sym->id, kind);
newsym->print = sym->print;
sz = MINATTR;
rec->str = agalloc(agraphof(obj), (size_t) sz * sizeof(char *));
/* doesn't call agxset() so no obj-modified callbacks occur */
- for (sym = (Agsym_t *) dtfirst(datadict); sym;
+ for (sym = dtfirst(datadict); sym;
sym = (Agsym_t *) dtnext(datadict, sym))
rec->str[sym->id] = agstrdup(agraphof(obj), sym->defval);
} else {
if (attr)
rv = (Agsym_t *) dtnext(d, attr);
else
- rv = (Agsym_t *) dtfirst(d);
+ rv = dtfirst(d);
} else
rv = 0;
return rv;
sn = agsubrep(g, n);
if (sn) {
dtrestore(g->e_seq, sn->out_seq);
- e = (Agedge_t *) dtfirst(g->e_seq);
+ e = dtfirst(g->e_seq);
sn->out_seq = dtextract(g->e_seq);
}
return e;
sn = agsubrep(g, n);
if (sn) {
dtrestore(g->e_seq, sn->in_seq);
- e = (Agedge_t *) dtfirst(g->e_seq);
+ e = dtfirst(g->e_seq);
sn->in_seq = dtextract(g->e_seq);
}
return e;
Agnode_t *agfstnode(Agraph_t * g)
{
Agsubnode_t *sn;
- sn = (Agsubnode_t *) dtfirst(g->n_seq);
+ sn = dtfirst(g->n_seq);
return sn ? sn->node : NULL;
}
Agcbstack_t *stack;
if (dict)
- while ((pcb = (pending_cb_t *) dtfirst(dict))) {
+ while ((pcb = dtfirst(dict))) {
g = pcb->g;
stack = g->clos->cb;
switch (callback_kind) {
Agraph_t *agfstsubg(Agraph_t * g)
{
- return (Agraph_t *) dtfirst(g->g_dict);
+ return dtfirst(g->g_dict);
}
Agraph_t *agnxtsubg(Agraph_t * subg)
view = dtview(dict, NULL);
else
view = 0;
- for (sym = (Agsym_t *) dtfirst(dict); sym;
+ for (sym = dtfirst(dict); sym;
sym = (Agsym_t *) dtnext(dict, sym)) {
if (EMPTY(sym->defval) && !sym->print) { /* try to skip empty str (default) */
if (view == NULL)
NOTUSED(g);
if ((data = agattrrec(n))) {
- for (sym = (Agsym_t *) dtfirst(data->dict); sym;
+ for (sym = dtfirst(data->dict); sym;
sym = (Agsym_t *) dtnext(data->dict, sym)) {
if (data->str[sym->id] != sym->defval)
return TRUE;
data = agattrrec(obj);
g = agraphof(obj);
if (data)
- for (sym = (Agsym_t *) dtfirst(defdict); sym;
+ for (sym = dtfirst(defdict); sym;
sym = (Agsym_t *) dtnext(defdict, sym)) {
if ((AGTYPE(obj) == AGINEDGE) || (AGTYPE(obj) == AGOUTEDGE)) {
if (Tailport && (sym->id == Tailport->id))
edgelistitem *eitem;
Agedge_t *ep;
- for (eitem = (edgelistitem *) dtfirst(openEdgeList); eitem;
+ for (eitem = dtfirst(openEdgeList); eitem;
eitem =
(edgelistitem *) dtnext(openEdgeList, eitem)) {
ep = eitem->edge;
degitem *ip;
Agnode_t *np;
- ip = (degitem *) dtfirst(list);
+ ip = dtfirst(list);
if (ip) {
np = ip->np;
ip->np = ND_next(np);
degitem *ip;
node_t *np;
fprintf(stderr, " dl:\n");
- for (ip = (degitem *) dtfirst(dl); ip; ip = (degitem *) dtnext(dl, ip)) {
+ for (ip = dtfirst(dl); ip; ip = (degitem *) dtnext(dl, ip)) {
np = ip->np;
if (np)
fprintf(stderr, " (%d)", ip->deg);
void printNodeset(nodeset_t * ns)
{
nsitem_t *ip;
- for (ip = (nsitem_t *) dtfirst(ns); ip;
+ for (ip = dtfirst(ns); ip;
ip = (nsitem_t *) dtnext(ns, ip)) {
fprintf(stderr, "%s", agnameof(ip->np));
}
if (cnt) {
int i = 0;
hft->spans = N_NEW(cnt,htextspan_t);
- for(fl=(fspan *)dtfirst(ispan); fl; fl=(fspan *)dtnext(ispan,fl)) {
+ for(fl=dtfirst(ispan); fl; fl=(fspan *)dtnext(ispan,fl)) {
hft->spans[i] = fl->lp;
i++;
}
if (node)
gen(cc, node);
else
- for (sym = (Exid_t*)dtfirst(expr->symbols); sym; sym = (Exid_t*)dtnext(expr->symbols, sym))
+ for (sym = dtfirst(expr->symbols); sym; sym = (Exid_t*)dtnext(expr->symbols, sym))
if (sym->lex == PROCEDURE && sym->value)
{
sfprintf(sp, "%s:\n", sym->name);
if (expr->data.generate.array->op == DYNAMIC)
{
n = expr->data.generate.index->type == STRING;
- for (assoc = (Exassoc_t*)dtfirst((Dt_t*)expr->data.generate.array->data.variable.symbol->local.pointer); assoc; assoc = (Exassoc_t*)dtnext((Dt_t*)expr->data.generate.array->data.variable.symbol->local.pointer, assoc))
+ for (assoc = dtfirst((Dt_t*)expr->data.generate.array->data.variable.symbol->local.pointer); assoc; assoc = (Exassoc_t*)dtnext((Dt_t*)expr->data.generate.array->data.variable.symbol->local.pointer, assoc))
{
v.integer++;
if (n)
p->eof = eof;
if (expr.statics)
{
- for (v = (Exid_t*)dtfirst(p->symbols); v; v = (Exid_t*)dtnext(p->symbols, v))
+ for (v = dtfirst(p->symbols); v; v = (Exid_t*)dtnext(p->symbols, v))
if (v->isstatic)
{
dtdelete(p->symbols, v);
if (dtsize(adj) == 0) continue;
putSeg (stderr, cp->seg_list[k]);
fputs (" ->\n", stderr);
- for (ip = (intitem*)dtfirst(adj); ip; ip = (intitem*)dtnext(adj, ip)) {
+ for (ip = dtfirst(adj); ip; ip = (intitem*)dtnext(adj, ip)) {
fputs (" ", stderr);
putSeg (stderr, cp->seg_list[ip->id]);
fputs ("\n", stderr);