337404757c42e5cdd00e9b64afe44c9203488e4b
[pspp-builds.git] / src / data / sys-file-reader.h
1 /* PSPP - computes sample statistics.
2    Copyright (C) 1997-9, 2000 Free Software Foundation, Inc.
3
4    This program is free software; you can redistribute it and/or
5    modify it under the terms of the GNU General Public License as
6    published by the Free Software Foundation; either version 2 of the
7    License, or (at your option) any later version.
8
9    This program is distributed in the hope that it will be useful, but
10    WITHOUT ANY WARRANTY; without even the implied warranty of
11    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12    General Public License for more details.
13
14    You should have received a copy of the GNU General Public License
15    along with this program; if not, write to the Free Software
16    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17    02110-1301, USA. */
18
19 #ifndef SFM_READ_H
20 #define SFM_READ_H 1
21
22 #include <stdbool.h>
23 #include <stdio.h>
24
25 #include <libpspp/float-format.h>
26 #include <libpspp/integer-format.h>
27
28 /* Reading system files. */
29
30 /* System file info that doesn't fit in struct dictionary. */
31 struct sfm_read_info
32   {
33     char creation_date[10];     /* `dd mmm yy' plus a null. */
34     char creation_time[9];      /* `hh:mm:ss' plus a null. */
35     enum integer_format integer_format;
36     enum float_format float_format;
37     bool compressed;            /* 0=no, 1=yes. */
38     int case_cnt;               /* -1 if unknown. */
39     char product[61];           /* Product name plus a null. */
40   };
41
42 struct dictionary;
43 struct file_handle;
44 struct ccase;
45 struct casereader *sfm_open_reader (struct file_handle *,
46                                     struct dictionary **,
47                                     struct sfm_read_info *);
48 bool sfm_detect (FILE *);
49
50 #endif /* sys-file-reader.h */