-bool is_space(char c) {
- return (c == ' ') || (c == '\t');
-}
-
-bool is_number(char c) {
- return ('0' <= c) && (c <= '9');
-}
-
-bool is_alpha(char c) {
- return (c == '_') || (('a' <= c) && (c <= 'z')) || (('A' <= c) && (c <= 'Z'));
-}
-
-bool is_alpha_num(c) {
- return is_number(c) || is_alpha(c);
-}
-
-bool DLList_variable_find(DLList* l, Variable* var) {
- Variable* v;
- for (v = DLList_begin(l); DLList_have_more(l); v = DLList_next(l)) {
- if (!strcmp(v->variable, var->variable)) {
- return TRUE;
- }
- }
- return FALSE;
-}
-
-size_t DLList_variable_print(DLList* l, FILE* fp) {
- size_t cant = 0;
- Variable* v;
- for (v = DLList_begin(l); DLList_have_more(l); v = DLList_next(l)) {
- cant += Variable_print(v, fp);
- }
- return cant;
-}
-
-void DLList_variable_delete(DLList* l) {
- if (l) {
- while (!DLList_empty(l)) {
- Variable_delete((Variable*)DLList_pop(l));
- }
- }
- DLList_delete(l);
-}