From: Norbert S. <nsc...@us...> - 2008-06-28 22:45:34
|
Update of /cvsroot/ftm/ftm/ftmlib In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv25465/ftmlib Modified Files: ftmdump.c Log Message: added current scope to in loder stack (will be used to better check scopes in FTM 1.7 files and to implement FTM 2.3 scoping compatibility in Max 5) Index: ftmdump.c =================================================================== RCS file: /cvsroot/ftm/ftm/ftmlib/ftmdump.c,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** ftmdump.c 21 Feb 2008 15:14:57 -0000 1.8 --- ftmdump.c 28 Jun 2008 22:45:41 -0000 1.9 *************** *** 407,411 **** } loader_scope_t; - #define loader_scope_get_data(s) ((s)->data) #define loader_scope_set_data(s, d) ((s)->data = (d)) --- 407,410 ---- *************** *** 419,426 **** static void ! loader_scope_reset(loader_scope_t *loader_scope) { fts_hashtable_clear(&loader_scope->hash); ! loader_scope->scope = NULL; } --- 418,426 ---- static void ! loader_scope_reset(loader_scope_t *loader_scope, fts_patcher_t *scope) { fts_hashtable_clear(&loader_scope->hash); ! loader_scope->scope = scope; ! loader_scope->data = NULL; } *************** *** 511,516 **** void ! ftmext_loader_push_scope(ftmext_loader_t *loader) { loader->top++; --- 511,518 ---- void ! ftmext_loader_push_scope(ftmext_loader_t *loader, fts_patcher_t *scope) { + loader_scope_t *loader_scope = NULL; + loader->top++; *************** *** 518,531 **** loader_stack_grow(loader); ! loader_scope_reset(loader->stack + loader->top); } ! void ftmext_loader_pop_scope(ftmext_loader_t *loader) { loader_scope_t *loader_scope = loader_get_scope(loader); if(loader_scope != NULL) loader->top--; } --- 520,539 ---- loader_stack_grow(loader); ! loader_scope_reset(loader->stack + loader->top, scope); } ! fts_patcher_t * ftmext_loader_pop_scope(ftmext_loader_t *loader) { loader_scope_t *loader_scope = loader_get_scope(loader); + fts_patcher_t *scope = NULL; if(loader_scope != NULL) + { + scope = loader_scope->scope; loader->top--; + } + + return scope; } *************** *** 729,733 **** loader_scope_t *loader_scope = loader_get_scope(loader); ! return loader_scope_get_data(loader_scope); } --- 737,741 ---- loader_scope_t *loader_scope = loader_get_scope(loader); ! return loader_scope->data; } *************** *** 736,741 **** { loader_scope_t *loader_scope = loader_get_scope(loader); ! ! loader_scope_set_data(loader_scope, data); } --- 744,748 ---- { loader_scope_t *loader_scope = loader_get_scope(loader); ! loader_scope->data = data; } |