Beginning of VFM cleanup.
[pspp-builds.git] / src / vfmP.h
1 /* PSPP - computes sample statistics.
2    Copyright (C) 1997-9, 2000 Free Software Foundation, Inc.
3    Written by Ben Pfaff <blp@gnu.org>.
4
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.
9
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.
14
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
18    02111-1307, USA. */
19
20 #if !vfmP_h
21 #define vfmP_h 1
22
23 #include "var.h"
24
25 /* Describes a data stream, either a source or a sink. */
26 struct stream_info
27   {
28     int case_size;              /* Size of one case in bytes. */
29     int ncases;                 /* Number of cases. */
30     int nval;                   /* Number of `value' elements per case. */
31   };
32
33 /* Information about the data source. */
34 extern struct stream_info vfm_source_info;
35
36 /* Information about the data sink. */
37 extern struct stream_info vfm_sink_info;
38
39 /* Nonzero if the case needs to have values deleted before being
40    stored, zero otherwise. */
41 extern int compaction_necessary;
42
43 /* Number of values after compaction, or the same as
44    vfm_sink_info.nval, if compaction is not necessary. */
45 extern int compaction_nval;
46
47 /* Temporary case buffer with enough room for `compaction_nval'
48    `value's. */
49 extern struct ccase *compaction_case;
50
51 void compact_case (struct ccase *dest, const struct ccase *src);
52
53 #endif /* !vfmP_h */