-/* New variable names. */
-static struct varname *new_names_head, *new_names_tail;
-static int case_count;
+/* Represents a FLIP input program. */
+struct flip_pgm
+ {
+ struct variable **var; /* Variables to transpose. */
+ int var_cnt; /* Number of elements in `var'. */
+ int case_cnt; /* Pre-flip case count. */
+ size_t case_size; /* Post-flip bytes per case. */
+
+ struct variable *new_names; /* Variable containing new variable names. */
+ struct varname *new_names_head; /* First new variable. */
+ struct varname *new_names_tail; /* Last new variable. */
+
+ FILE *file; /* Temporary file containing data. */
+ };
+
+static void destroy_flip_pgm (struct flip_pgm *);
+static struct case_sink *flip_sink_create (struct flip_pgm *);
+static struct case_source *flip_source_create (struct flip_pgm *);
+static void flip_file (struct flip_pgm *);
+static int build_dictionary (struct flip_pgm *);