From: Norbert S. <nsc...@us...> - 2008-06-28 22:42:43
|
Update of /cvsroot/ftm/ftm/ftmlib In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv25034/ftmlib Modified Files: ftmcontext.c Log Message: fixed issue in resoring globally named values depending on other named values Index: ftmcontext.c =================================================================== RCS file: /cvsroot/ftm/ftm/ftmlib/ftmcontext.c,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** ftmcontext.c 3 Feb 2008 19:22:47 -0000 1.9 --- ftmcontext.c 28 Jun 2008 22:42:50 -0000 1.10 *************** *** 484,493 **** else { - /* redefine with old name (could have been used in mean time) */ - int old_global = ftm_context_is_global(context); - /* update name */ context->definition = NULL; ! ftm_context_set_name(context, NULL, old_global); } } --- 484,490 ---- else { /* update name */ context->definition = NULL; ! ftm_context_set_name(context, NULL, -1); } } *************** *** 544,548 **** if(wanted_global == -1) ! wanted_global = context->global; /* for situations where empty string doesn't work */ --- 541,545 ---- if(wanted_global == -1) ! wanted_global = (context->global != 0); /* for situations where empty string doesn't work */ *************** *** 582,585 **** --- 579,584 ---- if(context->definition != NULL) { + int got_global; + if(wanted_global) fts_definition_set_global(context->definition); *************** *** 587,591 **** fts_definition_set_local(context->definition); ! context->global = fts_definition_is_global(context->definition); } else --- 586,595 ---- fts_definition_set_local(context->definition); ! got_global = fts_definition_is_global(context->definition); ! ! if(wanted_global == 1 && got_global == 0) ! context->global = -1; ! else ! context->global = got_global; } else *************** *** 635,639 **** ftm_context_is_global(ftm_context_t *context) { ! return context->global; } --- 639,643 ---- ftm_context_is_global(ftm_context_t *context) { ! return (context->global > 0); } *************** *** 642,648 **** { if(global != context->global) - { ftm_context_set_name(context, NULL, global); - } } --- 646,650 ---- |