]> git.cameronkatri.com Git - mandoc.git/blobdiff - private.h
Backed out PUNCT changes (again).
[mandoc.git] / private.h
index 4fa8b645cd9a5740e7e6ab111272ee33879454a6..1bae0c7264c414dafa292884328ac7df13a29bd5 100644 (file)
--- a/private.h
+++ b/private.h
@@ -1,4 +1,4 @@
-/* $Id: private.h,v 1.9 2008/11/26 21:42:59 kristaps Exp $ */
+/* $Id: private.h,v 1.17 2008/11/29 16:11:42 kristaps Exp $ */
 /*
  * Copyright (c) 2008 Kristaps Dzonsons <kristaps@kth.se>
  *
@@ -137,7 +137,9 @@ struct      md_mbuf {
 #define        ROFF_Fc          97
 #define        ROFF_Oo          98
 #define        ROFF_Oc          99
-#define        ROFF_MAX         100
+#define        ROFF_Bk          100
+#define        ROFF_Ek          101
+#define        ROFF_MAX         102
 
 #define        ROFF_Split       0
 #define        ROFF_Nosplit     1
@@ -197,40 +199,44 @@ struct    md_mbuf {
 #define ROFF_susv2      55
 #define ROFF_susv3      56
 #define ROFF_svid4      57
-#define        ROFF_ARGMAX      58
+#define        ROFF_Filled      58
+#define        ROFF_Words       59
+#define        ROFF_ARGMAX      60
 
 extern const char *const *toknames;
 extern const char *const *tokargnames;
 
-/* FIXME: have a md_roff with all necessary parameters. */
-
-/* FIXME: have roffbegin and roffend for doc head/foot. */
+enum   roffmsg { ROFF_WARN, ROFF_ERROR };
 
 struct roffcb {
-       int     (*roffhead)(void);
-       int     (*rofftail)(void);
-       int     (*roffin)(int, int *, char **);
-       int     (*roffout)(int);
-       int     (*roffblkin)(int);
-       int     (*roffblkout)(int);
+       void    (*roffmsg)(void *, enum roffmsg, 
+                       const char *, const char *, char *);
+       int     (*roffhead)(void *);
+       int     (*rofftail)(void *);
+       int     (*roffin)(void *, int, int *, char **);
+       int     (*roffdata)(void *, char *);
+       int     (*roffout)(void *, int);
+       int     (*roffblkin)(void *, int, int *, char **);
+       int     (*roffblkout)(void *, int);
+       int     (*roffspecial)(void *, int);
 };
 
 __BEGIN_DECLS
 
 typedef        void  (*(*md_init)(const struct md_args *, 
                        struct md_mbuf *, const struct md_rbuf *));
-typedef        int     (*md_line)(void *, char *, size_t);
+typedef        int     (*md_line)(void *, char *);
 typedef        int     (*md_exit)(void *, int);
 
 void            *md_init_html4_strict(const struct md_args *,
                        struct md_mbuf *, const struct md_rbuf *);
-int              md_line_html4_strict(void *, char *, size_t);
+int              md_line_html4_strict(void *, char *);
 int              md_exit_html4_strict(void *, int);
 
-void            *md_init_dummy(const struct md_args *,
+void            *md_init_valid(const struct md_args *,
                        struct md_mbuf *, const struct md_rbuf *);
-int              md_line_dummy(void *, char *, size_t);
-int              md_exit_dummy(void *, int);
+int              md_line_valid(void *, char *);
+int              md_exit_valid(void *, int);
 
 int              md_buf_puts(struct md_mbuf *, const char *, size_t);
 int              md_buf_putchar(struct md_mbuf *, char);
@@ -238,10 +244,8 @@ int                  md_buf_putstring(struct md_mbuf *, const char *);
 
 struct rofftree;
 
-struct rofftree *roff_alloc(const struct md_args *, 
-                       struct md_mbuf *, const struct md_rbuf *,
-                       const struct roffcb *);
-int              roff_engine(struct rofftree *, char *, size_t);
+struct rofftree *roff_alloc(const struct roffcb *, void *);
+int              roff_engine(struct rofftree *, char *);
 int              roff_free(struct rofftree *, int);
 
 __END_DECLS