* mandoc: remove spacing after unary minus
@ 2017-08-23 20:49 schwarze
0 siblings, 0 replies; only message in thread
From: schwarze @ 2017-08-23 20:49 UTC (permalink / raw)
To: source
Log Message:
-----------
remove spacing after unary minus
Modified Files:
--------------
mandoc:
eqn_term.c
Revision Data
-------------
Index: eqn_term.c
===================================================================
RCS file: /home/cvs/mandoc/mandoc/eqn_term.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -Leqn_term.c -Leqn_term.c -u -p -r1.15 -r1.16
--- eqn_term.c
+++ eqn_term.c
@@ -52,6 +52,7 @@ static void
eqn_box(struct termp *p, const struct eqn_box *bp)
{
const struct eqn_box *child;
+ const char *cp;
int delim;
/* Delimiters around this box? */
@@ -94,8 +95,9 @@ eqn_box(struct termp *p, const struct eq
if (strchr("!\"'),.:;?]}", *bp->text) != NULL)
p->flags |= TERMP_NOSPACE;
term_word(p, bp->text);
- if (*bp->text != '\0' && strchr("\"'([{",
- bp->text[strlen(bp->text) - 1]) != NULL)
+ if ((cp = strchr(bp->text, '\0')) > bp->text &&
+ ((cp[-1] == '-' && bp->prev == NULL) ||
+ strchr("\"'([{", cp[-1]) != NULL))
p->flags |= TERMP_NOSPACE;
}
--
To unsubscribe send an email to source+unsubscribe@mandoc.bsd.lv
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-08-23 20:49 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-23 20:49 mandoc: remove spacing after unary minus schwarze
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).