} status_stack[FRIBIDI_BIDI_MAX_RESOLVED_LEVELS];
FriBidiRun temp_link;
FriBidiRun *run_per_isolate_level[FRIBIDI_BIDI_MAX_RESOLVED_LEVELS];
+ int prev_isolate_level = 0; /* When running over the isolate levels, remember the previous level */
memset(run_per_isolate_level, 0, sizeof(run_per_isolate_level[0])
* FRIBIDI_BIDI_MAX_RESOLVED_LEVELS);
}
/* Build the isolate_level connections */
+ prev_isolate_level = 0;
for_run_list (pp, main_run_list)
{
int isolate_level = RL_ISOLATE_LEVEL (pp);
+ int i;
+
+ /* When going from an upper to a lower level, zero out all higher levels
+ in order not erroneous connections! */
+ if (isolate_level<prev_isolate_level)
+ for (i=isolate_level+1; i<=prev_isolate_level; i++)
+ run_per_isolate_level[i]=0;
+ prev_isolate_level = isolate_level;
+
if (run_per_isolate_level[isolate_level])
{
run_per_isolate_level[isolate_level]->next_isolate = pp;
/* 4. Resolving weak types. Also calculate the maximum isolate level */
max_iso_level = 0;
- DBG ("resolving weak types");
+ DBG ("4a. resolving weak types");
{
int last_strong_stack[FRIBIDI_BIDI_MAX_RESOLVED_LEVELS];
FriBidiCharType prev_type_orig;
}
}
+# if DEBUG
+ if UNLIKELY
+ (fribidi_debug_status ())
+ {
+ print_resolved_levels (main_run_list);
+ print_resolved_types (main_run_list);
+ }
+# endif /* DEBUG */
+ /* The last iso level is used to invalidate the the last strong values when going from
+ a higher to a lower iso level. When this occur, all "last_strong" values are
+ set to the base_dir. */
last_strong_stack[0] = base_dir;
+ DBG ("4b. resolving weak types. W4 and W5");
+
/* Resolving dependency of loops for rules W4 and W5, W5 may
want to prevent W4 to take effect in the next turn, do this
through "w4". */
/* 5. Resolving Neutral Types */
- DBG ("resolving neutral types - N0");
+ DBG ("5. resolving neutral types - N0");
{
/* BD16 - Build list of all pairs*/
int num_iso_levels = max_iso_level + 1;