1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
/* $Id: interface.h,v 1.10 1997/04/09 12:14:24 dps Exp $ */
/* Interface for output code */
#ifndef __w6cvt_iface_h__
#define __w6cvt_iface_h__
#include <stdio.h>
#include <time.h>
typedef enum
{
T_DOC=0, /* Document */
T_PARAGRAPH, /* Paragraph */
T_TABLE, T_FIELD, T_ROW, /* Tables */
T_SPEC, /* Embed messages */
T_LIST, T_ITEM, /* Lists */
T_CODE, /* One off codes, e.g. page breaks */
T_OTHER, /* Unknown stuff */
NFUNCS
} token;
typedef struct
{
unsigned char win;
const char *ascii;
} cmap;
#include "reader.h" /* Need token for this file.... */
#ifndef __EXCLUDE_READER_CLASSES
typedef struct
{
void (*start)(const tok_seq::tok *, const struct docfmt *, FILE *, void *);
void (*end)(const tok_seq::tok *, const struct docfmt *, FILE *, void *);
} funcs;
typedef struct docfmt
{
struct
{
unsigned new_pages :1;
} flags; /* Flags */
int maxline; /* Maximum line length */
const char *foldchar; /* Newline for folding line */
void *(*new_state)(void); /* Make new state */
void (*free_state)(void *); /* Free state */
funcs f[NFUNCS]; /* Document output fucntions */
char *(*date)(time_t); /* Set by front end */
} docfmt;
#endif /* __EXLCUDE_READER_CLASSES */
#ifndef N
#define N(a) (sizeof(a)/sizeof(a[0]))
#endif
#endif /* __w6cvt_iface_h__ */
|