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
23 /* System file manager (sfm).
25 This module is in charge of reading and writing system files. For
26 now, only ordinary system files are supported; in the future, PC+
27 compatible system files should be supported, too. sfm is an
28 fhuser, so see file-handle.h for the fhuser interface. */
30 /* Information produced by sfm_read_dictionary() that doesn't fit into
31 a dictionary struct. */
34 char creation_date[10]; /* `dd mmm yy' plus a null. */
35 char creation_time[9]; /* `hh:mm:ss' plus a null. */
36 int endianness; /* BIG or LITTLE. */
37 int compressed; /* 0=no, 1=yes. */
38 int ncases; /* -1 if unknown. */
39 char product[61]; /* Product name plus a null. */
46 struct dictionary *sfm_read_dictionary (struct file_handle *,
47 struct sfm_read_info *);
48 int sfm_read_case (struct file_handle *, union value *, struct dictionary *);
49 void sfm_maybe_close (struct file_handle *);
51 /* Information needed by sfm_write_dictionary(). */
54 /* Read by sfm_write_dictionary(). */
55 struct file_handle *h; /* File handle. */
56 struct dictionary *dict; /* Primary dictionary. */
57 int compress; /* 1=compress, 0=do not compress. */
59 /* Written by sfm_write_dictionary(). */
60 int case_size; /* Number of flt64 elements per case. */
63 int sfm_write_dictionary (struct sfm_write_info *);
64 int sfm_write_case (struct file_handle *, const flt64* elem, int n_elem);