=================================================================== RCS file: /cvs/mandoc/libmdoc.h,v retrieving revision 1.49 retrieving revision 1.53 diff -u -p -r1.49 -r1.53 --- mandoc/libmdoc.h 2010/05/17 23:57:06 1.49 +++ mandoc/libmdoc.h 2010/06/19 20:46:27 1.53 @@ -1,6 +1,6 @@ -/* $Id: libmdoc.h,v 1.49 2010/05/17 23:57:06 kristaps Exp $ */ +/* $Id: libmdoc.h,v 1.53 2010/06/19 20:46:27 kristaps Exp $ */ /* - * Copyright (c) 2008, 2009 Kristaps Dzonsons + * Copyright (c) 2008, 2009 Kristaps Dzonsons * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -34,6 +34,7 @@ struct mdoc { #define MDOC_NEWLINE (1 << 3) /* first macro/text in a line */ #define MDOC_PHRASELIT (1 << 4) /* literal within a partila phrase */ #define MDOC_PPHRASE (1 << 5) /* within a partial phrase */ +#define MDOC_FREECOL (1 << 6) /* `It' invocation should close */ int pflags; enum mdoc_next next; struct mdoc_node *last; @@ -43,62 +44,6 @@ struct mdoc { enum mdoc_sec lastsec; }; -enum merr { - ETAILWS = 0, - EQUOTPARM, - EQUOTTERM, - EARGVAL, - EBODYPROL, - EPROLBODY, - ETEXTPROL, - ENOBLANK, - ETOOLONG, - EESCAPE, - EPRINT, - ENODAT, - ENOPROLOGUE, - ELINE, - EATT, - ENAME, - ELISTTYPE, - EDISPTYPE, - EMULTIDISP, - EMULTILIST, - ESECNAME, - ENAMESECINC, - EARGREP, - EBOOL, - ECOLMIS, - ENESTDISP, - EMISSWIDTH, - EWRONGMSEC, - ESECOOO, - ESECREP, - EBADSTAND, - ENOMULTILINE, - EMULTILINE, - ENOLINE, - EPROLOOO, - EPROLREP, - EBADMSEC, - EFONT, - EBADDATE, - ENUMFMT, - ENOWIDTH, - EUTSNAME, - EOBS, - EIMPBRK, - EIGNE, - EOPEN, - EQUOTPHR, - ENOCTX, - ELIB, - EBADCHILD, - ENOTYPE, - EBADCOMMENT, - MERRMAX -}; - #define MACRO_PROT_ARGS struct mdoc *m, enum mdoct tok, \ int line, int ppos, int *pos, char *buf @@ -173,8 +118,7 @@ const char *mdoc_a2st(const char *); const char *mdoc_a2arch(const char *); const char *mdoc_a2vol(const char *); const char *mdoc_a2msec(const char *); -int mdoc_valid_pre(struct mdoc *, - const struct mdoc_node *); +int mdoc_valid_pre(struct mdoc *, struct mdoc_node *); int mdoc_valid_post(struct mdoc *); int mdoc_action_pre(struct mdoc *, struct mdoc_node *);