summaryrefslogtreecommitdiff
path: root/support/word2x/interface.h
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /support/word2x/interface.h
Initial commit
Diffstat (limited to 'support/word2x/interface.h')
-rw-r--r--support/word2x/interface.h60
1 files changed, 60 insertions, 0 deletions
diff --git a/support/word2x/interface.h b/support/word2x/interface.h
new file mode 100644
index 0000000000..d549bf9bd3
--- /dev/null
+++ b/support/word2x/interface.h
@@ -0,0 +1,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__ */
+
+
+
+