diff options
Diffstat (limited to 'dfa.h')
-rw-r--r-- | dfa.h | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -26,6 +26,8 @@ #endif /* HAVE_STDBOOL_H */ #include <stddef.h> +#define _GL_ATTRIBUTE_MALLOC + /* Element of a list of strings, at least one of which is known to appear in any R.E. matching the DFA. */ struct dfamust @@ -34,7 +36,6 @@ struct dfamust bool begline; bool endline; char *must; - struct dfamust *next; }; /* The dfa structure. It is completely opaque. */ @@ -45,10 +46,13 @@ struct dfa; /* Allocate a struct dfa. The struct dfa is completely opaque. The returned pointer should be passed directly to free() after calling dfafree() on it. */ -extern struct dfa *dfaalloc (void); +extern struct dfa *dfaalloc (void) _GL_ATTRIBUTE_MALLOC; + +/* Build and return the struct dfamust from the given struct dfa. */ +extern struct dfamust *dfamust (struct dfa const *); -/* Return the dfamusts associated with a dfa. */ -extern struct dfamust *dfamusts (struct dfa const *); +/* Free the storage held by the components of a struct dfamust. */ +extern void dfamustfree (struct dfamust *); /* dfasyntax() takes three arguments; the first sets the syntax bits described earlier in this file, the second sets the case-folding flag, and the |