- /* Perform transformations on `blank' case. */
- for (i = 0; i < f_trns; )
- {
- int code;
-
- if (t_trns[i].proc == end_case_trns_proc)
- {
- cases_written++;
- if (!write_case (wc_data))
- return false;
- clear_case (inp, c);
- i++;
- continue;
- }
-
- code = t_trns[i].proc (t_trns[i].private, c, cases_written + 1);
- switch (code)
- {
- case TRNS_CONTINUE:
- i++;
- break;
-
- case TRNS_DROP_CASE:
- abort ();
-
- case TRNS_ERROR:
- return false;
-
- case TRNS_NEXT_CASE:
- goto next_case;
-
- case TRNS_END_FILE:
- return true;
-
- default:
- i = code;
- break;
- }
- }
-
- /* Write the case if appropriate. */
- if (!end_case)
- {
- cases_written++;
- if (!write_case (wc_data))
- return false;
- }
+ enum trns_result result = trns_chain_execute (inp->trns_chain, c,
+ &inp->case_nr);
+ if (result == TRNS_ERROR)
+ return false;
+ else if (result == TRNS_END_FILE)
+ return true;
+ }
+}