-/* $Id: mdoc.c,v 1.273 2018/12/31 04:55:46 schwarze Exp $ */
+/* $Id: mdoc.c,v 1.274 2018/12/31 07:46:07 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010, 2012-2018 Ingo Schwarze <schwarze@openbsd.org>
* Strip trailing tabs in literal context only;
* outside, they affect the next line.
*/
- if (MDOC_LITERAL & mdoc->flags)
+ if (mdoc->flags & ROFF_NOFILL)
continue;
break;
case '\\':
* but add a single vertical space elsewhere.
*/
- if (buf[offs] == '\0' && ! (mdoc->flags & MDOC_LITERAL)) {
+ if (buf[offs] == '\0' && (mdoc->flags & ROFF_NOFILL) == 0) {
switch (mdoc->last->type) {
case ROFFT_TEXT:
sp = mdoc->last->string;
roff_word_alloc(mdoc, line, offs, buf+offs);
- if (mdoc->flags & MDOC_LITERAL)
+ if (mdoc->flags & ROFF_NOFILL)
return 1;
/*
-/* $Id: mdoc_state.c,v 1.13 2018/12/31 04:55:47 schwarze Exp $ */
+/* $Id: mdoc_state.c,v 1.14 2018/12/31 07:46:07 schwarze Exp $ */
/*
* Copyright (c) 2014, 2015, 2017 Ingo Schwarze <schwarze@openbsd.org>
*
switch (n->type) {
case ROFFT_HEAD:
- mdoc->flags |= MDOC_LITERAL;
+ mdoc->flags |= ROFF_NOFILL;
break;
case ROFFT_BODY:
- mdoc->flags &= ~MDOC_LITERAL;
+ mdoc->flags &= ~ROFF_NOFILL;
break;
default:
break;
-/* $Id: mdoc_validate.c,v 1.367 2018/12/31 04:55:47 schwarze Exp $ */
+/* $Id: mdoc_validate.c,v 1.368 2018/12/31 07:46:07 schwarze Exp $ */
/*
* Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010-2018 Ingo Schwarze <schwarze@openbsd.org>
check_text(mdoc, n->line, n->pos, n->string);
if (np->tok != MDOC_Ql && np->tok != MDOC_Dl &&
(np->tok != MDOC_Bd ||
- (mdoc->flags & MDOC_LITERAL) == 0) &&
+ (mdoc->flags & ROFF_NOFILL) == 0) &&
(np->tok != MDOC_It || np->type != ROFFT_HEAD ||
np->parent->parent->norm->Bl.type != LIST_diag))
check_text_em(mdoc, n->line, n->pos, n->string);
{
char *cp;
- if (MDOC_LITERAL & mdoc->flags)
+ if (mdoc->flags & ROFF_NOFILL)
return;
for (cp = p; NULL != (p = strchr(p, '\t')); p++)
-/* $Id: roff_int.h,v 1.14 2018/12/31 07:08:12 schwarze Exp $ */
+/* $Id: roff_int.h,v 1.15 2018/12/31 07:46:07 schwarze Exp $ */
/*
* Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2013,2014,2015,2017,2018 Ingo Schwarze <schwarze@openbsd.org>
#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 MAN_NEWLINE MDOC_NEWLINE
enum roff_sec lastsec; /* Last section seen. */
enum roff_sec lastnamed; /* Last standard section seen. */