From: schwarze@mdocml.bsd.lv
To: source@mdocml.bsd.lv
Subject: mdocml: Drop trailing whitespace, adjust a few indentations, and update
Date: Fri, 10 Oct 2014 10:27:46 -0400 (EDT) [thread overview]
Message-ID: <201410101427.s9AERkR2020361@krisdoz.my.domain> (raw)
Log Message:
-----------
Drop trailing whitespace, adjust a few indentations,
and update Copyright year while here; no code change.
Modified Files:
--------------
mdocml:
eqn.c
eqn_html.c
Revision Data
-------------
Index: eqn.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/eqn.c,v
retrieving revision 1.50
retrieving revision 1.51
diff -Leqn.c -Leqn.c -u -p -r1.50 -r1.51
--- eqn.c
+++ eqn.c
@@ -1,6 +1,6 @@
/* $Id$ */
/*
- * Copyright (c) 2011 Kristaps Dzonsons <kristaps@bsd.lv>
+ * Copyright (c) 2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -554,7 +554,7 @@ eqn_box_alloc(struct eqn_node *ep, struc
* The new EQN_SUBEXPR will have a two-child limit.
*/
static struct eqn_box *
-eqn_box_makebinary(struct eqn_node *ep,
+eqn_box_makebinary(struct eqn_node *ep,
enum eqn_post pos, struct eqn_box *parent)
{
struct eqn_box *b, *newb;
@@ -666,7 +666,7 @@ eqn_parse(struct eqn_node *ep, struct eq
assert(NULL != parent);
again:
-
+
switch ((tok = eqn_tok_parse(ep, &p))) {
case (EQN_TOK_UNDEF):
if ((rc = eqn_undef(ep)) <= 0)
@@ -680,7 +680,7 @@ again:
case (EQN_TOK_TDEFINE):
if (NULL == eqn_nextrawtok(ep, NULL))
EQN_MSG(MANDOCERR_EQNEOF, ep);
- else if (NULL == eqn_next(ep,
+ else if (NULL == eqn_next(ep,
ep->data[(int)ep->cur], NULL, 0))
EQN_MSG(MANDOCERR_EQNEOF, ep);
break;
@@ -707,8 +707,7 @@ again:
EQN_MSG(MANDOCERR_EQNSYNT, ep);
return(-1);
}
- parent = eqn_box_makebinary
- (ep, EQNPOS_NONE, parent);
+ parent = eqn_box_makebinary(ep, EQNPOS_NONE, parent);
parent->type = EQN_LISTONE;
parent->expectargs = 1;
switch (tok) {
@@ -762,7 +761,7 @@ again:
case (EQN_TOK_BACK):
case (EQN_TOK_DOWN):
case (EQN_TOK_UP):
- tok = eqn_tok_parse(ep, NULL);
+ tok = eqn_tok_parse(ep, NULL);
if (EQN_TOK__MAX != tok) {
EQN_MSG(MANDOCERR_EQNSYNT, ep);
return(-1);
@@ -871,7 +870,7 @@ again:
EQN_MSG(MANDOCERR_EQNSYNT, ep);
return(-1);
}
- /*
+ /*
* Accept a left-right-associative set of arguments just
* like sub and sup and friends but without rebalancing
* under a pivot.
@@ -905,7 +904,7 @@ again:
* FIXME: this is a shitty sentinel: we should really
* have a native EQN_BRACE type or whatnot.
*/
- while (parent->type != EQN_LIST)
+ while (parent->type != EQN_LIST)
if (NULL == (parent = parent->parent)) {
EQN_MSG(MANDOCERR_EQNSYNT, ep);
return(-1);
@@ -926,20 +925,20 @@ again:
} else if (STRNEQ(start, sz, "floor", 5)) {
strlcpy(sym, "\\[rf]", sizeof(sym));
parent->right = mandoc_strdup(sym);
- } else
+ } else
parent->right = mandoc_strndup(start, sz);
}
if (NULL == (parent = parent->parent)) {
EQN_MSG(MANDOCERR_EQNSYNT, ep);
return(-1);
}
- if (EQN_TOK_BRACE_CLOSE == tok && parent &&
- (parent->type == EQN_PILE ||
- parent->type == EQN_MATRIX))
+ if (EQN_TOK_BRACE_CLOSE == tok && parent &&
+ (parent->type == EQN_PILE ||
+ parent->type == EQN_MATRIX))
parent = parent->parent;
/* Close out any "singleton" lists. */
- while (parent->type == EQN_LISTONE &&
- parent->args == parent->expectargs)
+ while (parent->type == EQN_LISTONE &&
+ parent->args == parent->expectargs)
if (NULL == (parent = parent->parent)) {
EQN_MSG(MANDOCERR_EQNSYNT, ep);
return(-1);
@@ -971,7 +970,7 @@ again:
} else if (STRNEQ(start, sz, "floor", 5)) {
strlcpy(sym, "\\[lf]", sizeof(sym));
parent->left = mandoc_strdup(sym);
- } else
+ } else
parent->left = mandoc_strndup(start, sz);
}
break;
@@ -997,7 +996,7 @@ again:
parent->type = EQN_LIST;
break;
case (EQN_TOK_ABOVE):
- while (parent->type != EQN_PILE)
+ while (parent->type != EQN_PILE)
if (NULL == (parent = parent->parent)) {
EQN_MSG(MANDOCERR_EQNSYNT, ep);
return(-1);
@@ -1022,7 +1021,7 @@ again:
break;
case (EQN_TOK_EOF):
/*
- * End of file!
+ * End of file!
* TODO: make sure we're not in an open subexpression.
*/
return(0);
@@ -1043,7 +1042,7 @@ again:
cur->type = EQN_TEXT;
for (i = 0; i < EQNSYM__MAX; i++)
if (0 == strcmp(eqnsyms[i].str, p)) {
- (void)snprintf(sym, sizeof(sym),
+ (void)snprintf(sym, sizeof(sym),
"\\[%s]", eqnsyms[i].sym);
cur->text = mandoc_strdup(sym);
free(p);
@@ -1055,7 +1054,7 @@ again:
/*
* Post-process list status.
*/
- while (parent->type == EQN_LISTONE &&
+ while (parent->type == EQN_LISTONE &&
parent->args == parent->expectargs)
if (NULL == (parent = parent->parent)) {
EQN_MSG(MANDOCERR_EQNSYNT, ep);
@@ -1067,7 +1066,7 @@ again:
}
enum rofferr
-eqn_end(struct eqn_node **epp)
+eqn_end(struct eqn_node **epp)
{
struct eqn_node *ep;
Index: eqn_html.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/eqn_html.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -Leqn_html.c -Leqn_html.c -u -p -r1.8 -r1.9
--- eqn_html.c
+++ eqn_html.c
@@ -1,6 +1,6 @@
/* $Id$ */
/*
- * Copyright (c) 2011 Kristaps Dzonsons <kristaps@bsd.lv>
+ * Copyright (c) 2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -54,7 +54,7 @@ eqn_box(struct html *p, const struct eqn
/* Estimate the number of rows, first. */
if (NULL == (child = parent->first))
goto out;
- for (rows = 0; NULL != child; rows++)
+ for (rows = 0; NULL != child; rows++)
child = child->next;
/* Print row-by-row. */
post = print_otag(p, TAG_MTABLE, 0, NULL);
@@ -70,12 +70,12 @@ eqn_box(struct html *p, const struct eqn
}
cell = print_otag
(p, TAG_MTD, 0, NULL);
- /*
+ /*
* If we have no data for this
* particular cell, then print a
* placeholder and continue--don't puke.
*/
- if (NULL != child)
+ if (NULL != child)
eqn_box(p, child->first);
print_tagq(p, cell);
parent = parent->next;
@@ -137,14 +137,14 @@ eqn_box(struct html *p, const struct eqn
assert(NULL == post);
post = print_otag(p, TAG_MI, 0, NULL);
print_text(p, bp->text);
- } else if (NULL == post) {
+ } else if (NULL == post) {
if (NULL != bp->left || NULL != bp->right) {
PAIR_INIT(&tag[0], ATTR_OPEN,
- NULL == bp->left ? "" : bp->left);
+ NULL == bp->left ? "" : bp->left);
PAIR_INIT(&tag[1], ATTR_CLOSE,
- NULL == bp->right ? "" : bp->right);
+ NULL == bp->right ? "" : bp->right);
post = print_otag(p, TAG_MFENCED, 2, tag);
- }
+ }
if (NULL == post)
post = print_otag(p, TAG_MROW, 0, NULL);
else
@@ -158,7 +158,7 @@ out:
t = print_otag(p, TAG_MO, 0, NULL);
print_text(p, bp->bottom);
print_tagq(p, t);
- }
+ }
if (NULL != bp->top) {
t = print_otag(p, TAG_MO, 0, NULL);
print_text(p, bp->top);
--
To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv
reply other threads:[~2014-10-10 14:27 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=201410101427.s9AERkR2020361@krisdoz.my.domain \
--to=schwarze@mdocml.bsd.lv \
--cc=source@mdocml.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).