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
|
/* $Id: interface.h,v 1.8 1997/03/24 01:44:28 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_OTHER, /* Stuff we can not cope with */
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
{
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__ */
|