20 |
#ifndef PFM_WRITE_H |
#ifndef PFM_WRITE_H |
21 |
#define PFM_WRITE_H |
#define PFM_WRITE_H |
22 |
|
|
23 |
|
#include <stdbool.h> |
24 |
|
|
25 |
/* Portable file writing. */ |
/* Portable file writing. */ |
26 |
|
|
27 |
|
/* Portable file types. */ |
28 |
|
enum pfm_type |
29 |
|
{ |
30 |
|
PFM_COMM, /* Formatted for communication. */ |
31 |
|
PFM_TAPE /* Formatted for tape. */ |
32 |
|
}; |
33 |
|
|
34 |
|
/* Portable file writing options. */ |
35 |
|
struct pfm_write_options |
36 |
|
{ |
37 |
|
bool create_writeable; /* File perms: writeable or read/only? */ |
38 |
|
enum pfm_type type; /* Type of portable file (TODO). */ |
39 |
|
int digits; /* Digits of precision. */ |
40 |
|
}; |
41 |
|
|
42 |
struct file_handle; |
struct file_handle; |
43 |
struct dictionary; |
struct dictionary; |
44 |
struct ccase; |
struct ccase; |
45 |
struct pfm_writer *pfm_open_writer (struct file_handle *, struct dictionary *); |
struct pfm_writer *pfm_open_writer (struct file_handle *, struct dictionary *, |
46 |
|
struct pfm_write_options); |
47 |
|
struct pfm_write_options pfm_writer_default_options (void); |
48 |
|
|
49 |
int pfm_write_case (struct pfm_writer *, struct ccase *); |
int pfm_write_case (struct pfm_writer *, struct ccase *); |
50 |
void pfm_close_writer (struct pfm_writer *); |
void pfm_close_writer (struct pfm_writer *); |
51 |
|
|