This function does not modify its string argument, so it is more accurate to
qualify it as const. Related to #634.
/* strings */
CGRAPH_API char *agstrdup(Agraph_t *, const char *);
CGRAPH_API char *agstrdup_html(Agraph_t *, const char *);
-CGRAPH_API int aghtmlstr(char *);
+CGRAPH_API int aghtmlstr(const char *);
CGRAPH_API char *agstrbind(Agraph_t * g, char *);
CGRAPH_API int agstrfree(Agraph_t *, char *);
CGRAPH_API char *agcanon(char *, int);
* Return true if s is an HTML string.
* We assume s points to the datafield store[0] of a refstr.
*/
-int aghtmlstr(char *s)
+int aghtmlstr(const char *s)
{
- refstr_t *key;
+ const refstr_t *key;
if (s == NULL)
return 0;
- key = (refstr_t *) (s - offsetof(refstr_t, store[0]));
+ key = (const refstr_t *) (s - offsetof(refstr_t, store[0]));
return key->is_html;
}