-/* Executes each transformation in turn on a `blank' case.
- Returns true if successful, false if an I/O error occurred. */
+/* Returns true if STATE is valid given the transformations that
+ are allowed within INPUT PROGRAM. */
+static bool
+is_valid_state (enum trns_result state)
+{
+ return (state == TRNS_CONTINUE
+ || state == TRNS_ERROR
+ || state == TRNS_END_FILE
+ || state >= 0);
+}
+
+/* Reads one case into C.
+ Returns true if successful, false at end of file or if an
+ I/O error occurred. */