=================================================================== RCS file: /cvs/mandoc/Attic/private.h,v retrieving revision 1.67 retrieving revision 1.71 diff -u -p -r1.67 -r1.71 --- mandoc/Attic/private.h 2009/01/17 16:15:27 1.67 +++ mandoc/Attic/private.h 2009/01/20 13:05:28 1.71 @@ -1,4 +1,4 @@ -/* $Id: private.h,v 1.67 2009/01/17 16:15:27 kristaps Exp $ */ +/* $Id: private.h,v 1.71 2009/01/20 13:05:28 kristaps Exp $ */ /* * Copyright (c) 2008 Kristaps Dzonsons * @@ -30,8 +30,10 @@ struct mdoc { void *data; struct mdoc_cb cb; void *htab; + int linetok; int flags; #define MDOC_HALT (1 << 0) +#define MDOC_BODYPARSE (1 << 1) enum mdoc_next next; struct mdoc_node *last; struct mdoc_node *first; @@ -41,10 +43,14 @@ struct mdoc { }; -/* FIXME: it's 9 (this isn't used properly). */ +/* Hard-limit of macro arguments. */ -#define MDOC_LINEARG_MAX 12 +#define MDOC_LINEARG_MAX 9 +/* Suggested limit of macro arguments. */ + +#define MDOC_LINEARG_SOFTMAX 9 + #define MACRO_PROT_ARGS struct mdoc *mdoc, int tok, int line, \ int ppos, int *pos, char *buf @@ -115,6 +121,7 @@ int mdoc_head_alloc(struct mdoc *, int, int, int); int mdoc_tail_alloc(struct mdoc *, int, int, int); int mdoc_body_alloc(struct mdoc *, int, int, int); void mdoc_node_free(struct mdoc_node *); +void mdoc_node_freelist(struct mdoc_node *); void mdoc_sibling(struct mdoc *, int, struct mdoc_node **, struct mdoc_node **, struct mdoc_node *); void *mdoc_tokhash_alloc(void); @@ -130,6 +137,7 @@ enum mdoc_att mdoc_atoatt(const char *); time_t mdoc_atotime(const char *); char *mdoc_type2a(enum mdoc_type); +char *mdoc_node2a(struct mdoc_node *); int mdoc_valid_pre(struct mdoc *, struct mdoc_node *); int mdoc_valid_post(struct mdoc *); @@ -149,6 +157,7 @@ int mdoc_args(struct mdoc *, int, #define ARGS_EOLN (0) #define ARGS_WORD (1) #define ARGS_PUNCT (2) +#define ARGS_QWORD (3) #define ARGS_QUOTED (1 << 0) #define ARGS_DELIM (1 << 1)