Instead of making system or portable file readers responsible for
[pspp-builds.git] / src / pfm-read.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 #ifndef PFM_READ_H
21 #define PFM_READ_H
22
23 /* Portable file reading. */
24
25 /* Portable file types. */
26 enum pfm_type
27   {
28     PFM_COMM,   /* Formatted for communication. */
29     PFM_TAPE    /* Formatted for tape. */
30   };
31
32 /* Information produced by pfm_read_dictionary() that doesn't fit into
33    a dictionary struct. */
34 struct pfm_read_info
35   {
36     char creation_date[11];     /* `dd mm yyyy' plus a null. */
37     char creation_time[9];      /* `hh:mm:ss' plus a null. */
38     char product[61];           /* Product name plus a null. */
39     char subproduct[61];        /* Subproduct name plus a null. */
40   };
41
42 struct dictionary;
43 struct file_handle;
44 struct ccase;
45 struct pfm_reader *pfm_open_reader (struct file_handle *,
46                                     struct dictionary **,
47                                     struct pfm_read_info *);
48 int pfm_read_case (struct pfm_reader *, struct ccase *);
49 void pfm_close_reader (struct pfm_reader *);
50
51 #endif /* pfm-read.h */