83c3a24739c7bcb9e592dd55aef746e307efb3cb
[pspp-builds.git] / src / data / por-file-reader.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., 51 Franklin Street, Fifth Floor, Boston, MA
18    02110-1301, USA. */
19
20 #ifndef PFM_READ_H
21 #define PFM_READ_H
22
23 /* Portable file reading. */
24
25 #include <stdbool.h>
26 #include <stdio.h>
27
28 /* Information produced by pfm_read_dictionary() that doesn't fit into
29    a dictionary struct. */
30 struct pfm_read_info
31   {
32     char creation_date[11];     /* `dd mm yyyy' plus a null. */
33     char creation_time[9];      /* `hh:mm:ss' plus a null. */
34     char product[61];           /* Product name plus a null. */
35     char subproduct[61];        /* Subproduct name plus a null. */
36   };
37
38 struct dictionary;
39 struct file_handle;
40 struct ccase;
41 struct pfm_reader *pfm_open_reader (struct file_handle *,
42                                     struct dictionary **,
43                                     struct pfm_read_info *);
44 bool pfm_read_case (struct pfm_reader *, struct ccase *);
45 bool pfm_read_error (const struct pfm_reader *);
46 void pfm_close_reader (struct pfm_reader *);
47 bool pfm_detect (FILE *);
48
49 #endif /* por-file-reader.h */