=================================================================== RCS file: /cvs/mandoc/libmandoc.h,v retrieving revision 1.71 retrieving revision 1.73 diff -u -p -r1.71 -r1.73 --- mandoc/libmandoc.h 2018/04/09 22:27:04 1.71 +++ mandoc/libmandoc.h 2018/08/23 19:33:27 1.73 @@ -1,7 +1,7 @@ -/* $Id: libmandoc.h,v 1.71 2018/04/09 22:27:04 schwarze Exp $ */ +/* $Id: libmandoc.h,v 1.73 2018/08/23 19:33:27 schwarze Exp $ */ /* * Copyright (c) 2009, 2010, 2011, 2012 Kristaps Dzonsons - * Copyright (c) 2013, 2014, 2015, 2017 Ingo Schwarze + * Copyright (c) 2013,2014,2015,2017,2018 Ingo Schwarze * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -21,13 +21,16 @@ enum rofferr { ROFF_RERUN, /* re-run roff interpreter with offset */ ROFF_APPEND, /* re-run main parser, appending next line */ ROFF_REPARSE, /* re-run main parser on the result */ + ROFF_USERCALL, /* dto., calling a user-defined macro */ + ROFF_USERRET, /* abort parsing of user-defined macro */ ROFF_SO, /* include another file */ ROFF_IGN, /* ignore current line */ }; struct buf { - char *buf; - size_t sz; + char *buf; + size_t sz; + struct buf *next; }; @@ -64,6 +67,7 @@ struct roff_man *roff_man_alloc(struct roff *, struct const char *, int); void roff_man_reset(struct roff_man *); enum rofferr roff_parseln(struct roff *, int, struct buf *, int *); +void roff_userret(struct roff *); void roff_endparse(struct roff *); void roff_setreg(struct roff *, const char *, int, char sign); int roff_getreg(struct roff *, const char *);