=================================================================== RCS file: /cvs/mandoc/roff_int.h,v retrieving revision 1.14 retrieving revision 1.19 diff -u -p -r1.14 -r1.19 --- mandoc/roff_int.h 2018/12/31 07:08:12 1.14 +++ mandoc/roff_int.h 2022/05/19 15:37:47 1.19 @@ -1,7 +1,7 @@ -/* $Id: roff_int.h,v 1.14 2018/12/31 07:08:12 schwarze Exp $ */ +/* $OpenBSD: roff_int.h,v 1.19 2022/05/19 15:37:47 schwarze Exp $ */ /* + * Copyright (c) 2013-2015, 2017-2022 Ingo Schwarze * Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons - * 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 @@ -35,6 +35,7 @@ struct roff_man { struct ohash *mdocmac; /* Mdoc macro lookup table. */ struct ohash *manmac; /* Man macro lookup table. */ const char *os_s; /* Default operating system. */ + char *os_r; /* Operating system name at run time. */ struct roff_node *last; /* The last node parsed. */ struct roff_node *last_es; /* The most recent Es node. */ int quick; /* Abort parse early. */ @@ -54,11 +55,12 @@ struct roff_man { #define MDOC_PHRASEQF (1 << 13) /* Quote first word encountered. */ #define MDOC_PHRASEQL (1 << 14) /* Quote last word of this phrase. */ #define MDOC_PHRASEQN (1 << 15) /* Quote first word of the next phrase. */ -#define MDOC_LITERAL ROFF_NOFILL +#define ROFF_NONOFILL (1 << 16) /* Temporarily suspend no-fill mode. */ #define MAN_NEWLINE MDOC_NEWLINE enum roff_sec lastsec; /* Last section seen. */ enum roff_sec lastnamed; /* Last standard section seen. */ enum roff_next next; /* Where to put the next node. */ + char filesec; /* Section digit in the file name. */ }; @@ -80,6 +82,8 @@ struct ohash *roffhash_alloc(enum roff_tok, enum roff enum roff_tok roffhash_find(struct ohash *, const char *, size_t); void roffhash_free(struct ohash *); +enum mandoc_esc roff_escape(const char *, const int, const int, + int *, int *, int *, int *); void roff_state_reset(struct roff_man *); void roff_validate(struct roff_man *);