From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from localhost (fantadrom.bsd.lv [local]) by fantadrom.bsd.lv (OpenSMTPD) with ESMTPA id bb54bacd for ; Mon, 31 Dec 2018 02:46:38 -0500 (EST) Date: Mon, 31 Dec 2018 02:46:38 -0500 (EST) X-Mailinglist: mandoc-source Reply-To: source@mandoc.bsd.lv MIME-Version: 1.0 From: schwarze@mandoc.bsd.lv To: source@mandoc.bsd.lv Subject: mandoc: Cleanup, no functional change: Use the new parser flag X-Mailer: activitymail 1.26, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain; charset=utf-8 Message-ID: <05f85a39f06dac11@fantadrom.bsd.lv> Log Message: ----------- Cleanup, no functional change: Use the new parser flag ROFF_NOFILL in the mdoc(7) parser, too, instead of the old MDOC_LITERAL, which was an alias for the former MAN_LITERAL. Modified Files: -------------- mandoc: mdoc.c mdoc_state.c mdoc_validate.c roff_int.h Revision Data ------------- Index: roff_int.h =================================================================== RCS file: /home/cvs/mandoc/mandoc/roff_int.h,v retrieving revision 1.14 retrieving revision 1.15 diff -Lroff_int.h -Lroff_int.h -u -p -r1.14 -r1.15 --- roff_int.h +++ roff_int.h @@ -54,7 +54,6 @@ 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 MAN_NEWLINE MDOC_NEWLINE enum roff_sec lastsec; /* Last section seen. */ enum roff_sec lastnamed; /* Last standard section seen. */ Index: mdoc_validate.c =================================================================== RCS file: /home/cvs/mandoc/mandoc/mdoc_validate.c,v retrieving revision 1.367 retrieving revision 1.368 diff -Lmdoc_validate.c -Lmdoc_validate.c -u -p -r1.367 -r1.368 --- mdoc_validate.c +++ mdoc_validate.c @@ -338,7 +338,7 @@ mdoc_validate(struct roff_man *mdoc) 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); @@ -411,7 +411,7 @@ check_text(struct roff_man *mdoc, int ln { char *cp; - if (MDOC_LITERAL & mdoc->flags) + if (mdoc->flags & ROFF_NOFILL) return; for (cp = p; NULL != (p = strchr(p, '\t')); p++) Index: mdoc.c =================================================================== RCS file: /home/cvs/mandoc/mandoc/mdoc.c,v retrieving revision 1.273 retrieving revision 1.274 diff -Lmdoc.c -Lmdoc.c -u -p -r1.273 -r1.274 --- mdoc.c +++ mdoc.c @@ -210,7 +210,7 @@ mdoc_ptext(struct roff_man *mdoc, int li * 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 '\\': @@ -235,7 +235,7 @@ mdoc_ptext(struct roff_man *mdoc, int li * 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; @@ -260,7 +260,7 @@ mdoc_ptext(struct roff_man *mdoc, int li roff_word_alloc(mdoc, line, offs, buf+offs); - if (mdoc->flags & MDOC_LITERAL) + if (mdoc->flags & ROFF_NOFILL) return 1; /* Index: mdoc_state.c =================================================================== RCS file: /home/cvs/mandoc/mandoc/mdoc_state.c,v retrieving revision 1.13 retrieving revision 1.14 diff -Lmdoc_state.c -Lmdoc_state.c -u -p -r1.13 -r1.14 --- mdoc_state.c +++ mdoc_state.c @@ -228,10 +228,10 @@ state_dl(STATE_ARGS) 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; -- To unsubscribe send an email to source+unsubscribe@mandoc.bsd.lv