40 first = d = hdr->
data;
52 if (mtf && (hdr->
data != d))
53 agerr(
AGERR,
"move to front lock inconsistency");
56 set_data(hdr, d, mtf);
70 newrec->
next = newrec;
72 if (firstrec->
next == firstrec) {
73 firstrec->
next = newrec;
74 newrec->
next = firstrec;
77 firstrec->
next = newrec;
81 set_data(obj, newrec,
FALSE);
86 void *
agbindrec(
void *arg_obj,
char *recname,
unsigned int recsize,
96 if ((rec ==
NIL(
Agrec_t *)) && (recsize > 0)) {
101 objputrec(g, obj, rec);
104 objputrec(g, obj, rec);
108 objputrec(g, obj, rec);
122 if (obj->
data == rec) {
123 if (rec->
next == rec)
127 set_data(obj, newrec,
FALSE);
137 while (prev->
next != rec) {
155 listdelrec(obj, rec);
158 objdelrec(g, obj, rec);
184 if (nodedata || edgedata) {
203 unsigned int rec_size;
206 if (arg_rec_size < 0)
214 rec_size = (
unsigned int) abs(arg_rec_size);
220 aginit(s,kind,rec_name,arg_rec_size,mtf);
269 if ((rec = obj->
data)) {
275 }
while (rec != obj->
data);
CGRAPH_API Agedge_t * agopp(Agedge_t *e)
CGRAPH_API void agclean(Agraph_t *g, int kind, char *rec_name)
void agrecclose(Agobj_t *obj)
int agerr(agerrlevel_t level, const char *fmt,...)
CGRAPH_API Agraph_t * agfstsubg(Agraph_t *g)
CGRAPH_API Agraph_t * agroot(void *obj)
CGRAPH_API Agedge_t * agfstout(Agraph_t *g, Agnode_t *n)
CGRAPH_API void agfree(Agraph_t *g, void *ptr)
CGRAPH_API Agraph_t * agraphof(void *obj)
CGRAPH_API Agraph_t * agnxtsubg(Agraph_t *subg)
CGRAPH_API Agnode_t * agnxtnode(Agraph_t *g, Agnode_t *n)
CGRAPH_API int agstrfree(Agraph_t *, char *)
CGRAPH_API char * agstrdup(Agraph_t *, char *)
CGRAPH_API Agnode_t * agfstnode(Agraph_t *g)
CGRAPH_API void aginit(Agraph_t *g, int kind, char *rec_name, int rec_size, int move_to_front)
CGRAPH_API Agrec_t * aggetrec(void *obj, char *name, int move_to_front)
CGRAPH_API int agdelrec(void *obj, char *name)
CGRAPH_API void * agalloc(Agraph_t *g, size_t size)
CGRAPH_API void * agbindrec(void *obj, char *name, unsigned int size, int move_to_front)
CGRAPH_API Agedge_t * agnxtout(Agraph_t *g, Agedge_t *e)
int agapply(Agraph_t *g, Agobj_t *obj, agobjfn_t fn, void *arg, int preorder)