"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "wml_backend/p2_mp4h/src/symtab.c" between
wml-2.28.0.tar.xz and wml-2.30.0.tar.xz

About: WML (Website META Language) is an extensible Webdesigner’s off-line HTML generation toolkit.

symtab.c  (wml-2.28.0.tar.xz):symtab.c  (wml-2.30.0.tar.xz)
skipping to change at line 111 skipping to change at line 111
caseless_ent = ((caseless & 4) == 4); caseless_ent = ((caseless & 4) == 4);
} }
/*--------------------------------------------. /*--------------------------------------------.
| Free all storage associated with a symbol. | | Free all storage associated with a symbol. |
`--------------------------------------------*/ `--------------------------------------------*/
static void static void
free_symbol (symbol *sym) free_symbol (symbol *sym)
{ {
xfree ((voidstar) SYMBOL_NAME (sym)); free ((voidstar) SYMBOL_NAME (sym));
xfree ((voidstar) SYMBOL_HOOK_BEGIN (sym)); free ((voidstar) SYMBOL_HOOK_BEGIN (sym));
xfree ((voidstar) SYMBOL_HOOK_END (sym)); free ((voidstar) SYMBOL_HOOK_END (sym));
if (SYMBOL_TYPE (sym) == TOKEN_TEXT) if (SYMBOL_TYPE (sym) == TOKEN_TEXT)
xfree ((voidstar) SYMBOL_TEXT (sym)); free ((voidstar) SYMBOL_TEXT (sym));
xfree ((voidstar) sym); free ((voidstar) sym);
} }
static void static void
hash_table_free (symbol **s) hash_table_free (symbol **s)
{ {
int h; int h;
symbol *sym, *next; symbol *sym, *next;
for (h = 0; h < hash_table_size; h++) for (h = 0; h < hash_table_size; h++)
{ {
for (sym = s[h]; sym != NULL; ) for (sym = s[h]; sym != NULL; )
{ {
next = SYMBOL_NEXT (sym); next = SYMBOL_NEXT (sym);
free_symbol (sym); free_symbol (sym);
sym = next; sym = next;
} }
} }
xfree ((voidstar) s); free ((voidstar) s);
} }
void void
symtab_deallocate (void) symtab_deallocate (void)
{ {
hash_table_free (var_tab); hash_table_free (var_tab);
hash_table_free (file_tab); hash_table_free (file_tab);
hash_table_free (entity_tab); hash_table_free (entity_tab);
hash_table_free (sym_tab); hash_table_free (sym_tab);
} }
skipping to change at line 212 skipping to change at line 212
{ {
cmp = strcmp (SYMBOL_NAME (sym), lcname); cmp = strcmp (SYMBOL_NAME (sym), lcname);
if (cmp >= 0) if (cmp >= 0)
break; break;
} }
/* If just searching, return status of search. */ /* If just searching, return status of search. */
if (mode == SYMBOL_LOOKUP) if (mode == SYMBOL_LOOKUP)
{ {
xfree ((voidstar) lcname); free ((voidstar) lcname);
return cmp == 0 ? sym : NULL; return cmp == 0 ? sym : NULL;
} }
/* Symbol not found. */ /* Symbol not found. */
spp = (prev != NULL) ? &prev->next : &symtab[h]; spp = (prev != NULL) ? &prev->next : &symtab[h];
switch (mode) switch (mode)
{ {
skipping to change at line 264 skipping to change at line 264
} }
while (sym != NULL && strcmp (lcname, SYMBOL_NAME (sym)) == 0); while (sym != NULL && strcmp (lcname, SYMBOL_NAME (sym)) == 0);
sym = NULL; sym = NULL;
break; break;
default: default:
MP4HERROR ((warning_status, 0, MP4HERROR ((warning_status, 0,
"INTERNAL ERROR: Illegal mode to symbol_lookup ()")); "INTERNAL ERROR: Illegal mode to symbol_lookup ()"));
exit (1); exit (1);
} }
xfree ((voidstar) lcname); free ((voidstar) lcname);
return sym; return sym;
} }
symbol * symbol *
lookup_symbol (const char *name, symbol_lookup mode) lookup_symbol (const char *name, symbol_lookup mode)
{ {
symtab = sym_tab; symtab = sym_tab;
return generic_lookup (name, mode, caseless_tag); return generic_lookup (name, mode, caseless_tag);
} }
 End of changes. 5 change blocks. 
8 lines changed or deleted 8 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)