1 /* PSPP - computes sample statistics.
2 Copyright (C) 1997-9, 2000 Free Software Foundation, Inc.
3 Written by Ben Pfaff <blp@gnu.org>.
5 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public License as
7 published by the Free Software Foundation; either version 2 of the
8 License, or (at your option) any later version.
10 This program is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
26 /* This is the time at which vfm was last invoked. */
27 extern time_t last_vfm_invocation;
29 /* This is the case that is to be filled in by input programs. */
30 extern struct ccase *temp_case;
32 /* `value' indexes to initialize to particular values for certain cases. */
33 extern struct long_vec reinit_sysmis; /* SYSMIS for every case. */
34 extern struct long_vec reinit_blanks; /* Blanks for every case. */
35 extern struct long_vec init_zero; /* Zero for first case only. */
36 extern struct long_vec init_blanks; /* Blanks for first case only. */
38 /* A case stream: either a source or a sink, depending on context. */
41 /* Initializes sink. */
44 /* Reads all the cases and passes them to WRITE_CASE. */
47 /* Writes a single case, temp_case. */
50 /* Switches mode from sink to source. */
53 /* Discards source's internal data. */
54 void (*destroy_source) (void);
56 /* Discards sink's internal data. */
57 void (*destroy_sink) (void);
59 /* Identifying name for the stream. */
63 /* This is used to read from the active file. */
64 extern struct case_stream *vfm_source;
66 /* This is used to write to the replacement active file. */
67 extern struct case_stream *vfm_sink;
69 /* General data streams. */
70 extern struct case_stream vfm_memory_stream;
71 extern struct case_stream vfm_disk_stream;
72 extern struct case_stream sort_stream;
73 extern struct case_stream flip_stream;
75 /* Streams that are only sources. */
76 extern struct case_stream data_list_source;
77 extern struct case_stream input_program_source;
78 extern struct case_stream file_type_source;
79 extern struct case_stream get_source;
80 extern struct case_stream import_source;
81 extern struct case_stream matrix_data_source;
83 /* Number of cases to lag. */
86 extern int (*write_case) (void);
88 void procedure (void (*beginfunc) (void),
89 int (*procfunc) (struct ccase *curcase),
90 void (*endfunc) (void));
91 struct ccase *lagged_case (int n_before);
92 void compact_case (struct ccase *dest, const struct ccase *src);
93 void page_to_disk (void);
95 void process_active_file (void (*beginfunc) (void),
96 int (*casefunc) (struct ccase *curcase),
97 void (*endfunc) (void));
98 void process_active_file_output_case (void);