From: schwarze@mandoc.bsd.lv
To: source@mandoc.bsd.lv
Subject: mandoc: Store the fill mode with a new flag NODE_NOFILL in every node,
Date: Mon, 31 Dec 2018 03:18:43 -0500 (EST) [thread overview]
Message-ID: <05f85cf8385459e1@fantadrom.bsd.lv> (raw)
Log Message:
-----------
Store the fill mode with a new flag NODE_NOFILL in every node,
like it is already done with NODE_SYNPRETTY, such that the fill
mode becomes more directly available to the formatters.
Not used yet, but will be used by upcoming commits.
Modified Files:
--------------
mandoc:
roff.c
roff.h
Revision Data
-------------
Index: roff.c
===================================================================
RCS file: /home/cvs/mandoc/mandoc/roff.c,v
retrieving revision 1.358
retrieving revision 1.359
diff -Lroff.c -Lroff.c -u -p -r1.358 -r1.359
--- roff.c
+++ roff.c
@@ -889,6 +889,10 @@ roff_node_alloc(struct roff_man *man, in
n->flags |= NODE_SYNPRETTY;
else
n->flags &= ~NODE_SYNPRETTY;
+ if (man->flags & ROFF_NOFILL)
+ n->flags |= NODE_NOFILL;
+ else
+ n->flags &= ~NODE_NOFILL;
if (man->flags & MDOC_NEWLINE)
n->flags |= NODE_LINE;
man->flags &= ~MDOC_NEWLINE;
Index: roff.h
===================================================================
RCS file: /home/cvs/mandoc/mandoc/roff.h,v
retrieving revision 1.67
retrieving revision 1.68
diff -Lroff.h -Lroff.h -u -p -r1.67 -r1.68
--- roff.h
+++ roff.h
@@ -512,14 +512,15 @@ struct roff_node {
int flags;
#define NODE_VALID (1 << 0) /* Has been validated. */
#define NODE_ENDED (1 << 1) /* Gone past body end mark. */
-#define NODE_EOS (1 << 2) /* At sentence boundary. */
+#define NODE_BROKEN (1 << 2) /* Must validate parent when ending. */
#define NODE_LINE (1 << 3) /* First macro/text on line. */
-#define NODE_SYNPRETTY (1 << 4) /* SYNOPSIS-style formatting. */
-#define NODE_BROKEN (1 << 5) /* Must validate parent when ending. */
-#define NODE_DELIMO (1 << 6)
-#define NODE_DELIMC (1 << 7)
-#define NODE_NOSRC (1 << 8) /* Generated node, not in input file. */
-#define NODE_NOPRT (1 << 9) /* Shall not print anything. */
+#define NODE_DELIMO (1 << 4)
+#define NODE_DELIMC (1 << 5)
+#define NODE_EOS (1 << 6) /* At sentence boundary. */
+#define NODE_SYNPRETTY (1 << 7) /* SYNOPSIS-style formatting. */
+#define NODE_NOFILL (1 << 8) /* Fill mode switched off. */
+#define NODE_NOSRC (1 << 9) /* Generated node, not in input file. */
+#define NODE_NOPRT (1 << 10) /* Shall not print anything. */
int prev_font; /* Before entering this node. */
int aux; /* Decoded node data, type-dependent. */
enum roff_tok tok; /* Request or macro ID. */
--
To unsubscribe send an email to source+unsubscribe@mandoc.bsd.lv
reply other threads:[~2018-12-31 8:18 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=05f85cf8385459e1@fantadrom.bsd.lv \
--to=schwarze@mandoc.bsd.lv \
--cc=source@mandoc.bsd.lv \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).