static int compaction_necessary;
/* Time at which vfm was last invoked. */
-time_t last_vfm_invocation;
+static time_t last_vfm_invocation;
/* Lag queue. */
int n_lag; /* Number of cases to lag. */
static void internal_procedure (int (*proc_func) (struct ccase *, void *),
void *aux);
+static void update_last_vfm_invocation (void);
static void create_trns_case (struct ccase *, struct dictionary *);
static void open_active_file (void);
static int write_case (struct write_case_data *wc_data);
\f
/* Public functions. */
+/* Returns the last time the data was read. */
+time_t
+vfm_last_invocation (void)
+{
+ if (last_vfm_invocation == 0)
+ update_last_vfm_invocation ();
+ return last_vfm_invocation;
+}
+
/* Reads the data from the input program and writes it to a new
active file. For each case we read from the input program, we
do the following
&& n_trns == 0)
{
/* Nothing to do. */
+ update_last_vfm_invocation ();
return;
}
case_create (&wc_data.sink_case, dict_get_next_value_idx (default_dict));
wc_data.cases_written = 0;
- last_vfm_invocation = time (NULL);
+ update_last_vfm_invocation ();
if (vfm_source != NULL)
vfm_source->class->read (vfm_source,
assert (--recursive_call == 0);
}
+/* Updates last_vfm_invocation. */
+static void
+update_last_vfm_invocation (void)
+{
+ last_vfm_invocation = time (NULL);
+}
+
/* Creates and returns a case, initializing it from the vectors
that say which `value's need to be initialized just once, and
which ones need to be re-initialized before every case. */