It does not seem worth maintaining this abstraction for a single usage.
Especially when the surrounding code directly calls numerous other ctype.h
functions.
#define AGCLOS(g,d) ((g)->clos->state.d)
#define AGNEW(g,t) ((t*)(agalloc(g,sizeof(t))))
-#define ISALNUM(c) ((isalnum(c)) || ((c) == '_') || (!isascii(c)))
-
/* functional definitions */
typedef Agobj_t *(*agobjsearchfn_t) (Agraph_t * g, Agobj_t * obj);
CGHDR_API int agapply(Agraph_t * g, Agobj_t * obj, agobjfn_t fn, void *arg,
needs_quotes = true;
}
}
- else if (!ISALNUM(uc))
+ else if (!(isalnum(uc) || uc == '_' || !isascii(uc)))
needs_quotes = true;
*p++ = uc;
uc = *s++;