aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mdoc_term.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2015-10-12 00:08:15 +0000
committerIngo Schwarze <schwarze@openbsd.org>2015-10-12 00:08:15 +0000
commit95ec7b52881820b8d6d9d9497b358d00a856ca28 (patch)
treebc972436bf5b40600e26a4629ae008072ef788f7 /mdoc_term.c
parent511aaa109533ca3acc1464c1795ba3ac8dc4c732 (diff)
downloadmandoc-95ec7b52881820b8d6d9d9497b358d00a856ca28.tar.gz
mandoc-95ec7b52881820b8d6d9d9497b358d00a856ca28.tar.zst
mandoc-95ec7b52881820b8d6d9d9497b358d00a856ca28.zip
To make the code more readable, delete 283 /* FALLTHROUGH */ comments
that were right between two adjacent case statement. Keep only those 24 where the first case actually executes some code before falling through to the next case.
Diffstat (limited to 'mdoc_term.c')
-rw-r--r--mdoc_term.c59
1 files changed, 4 insertions, 55 deletions
diff --git a/mdoc_term.c b/mdoc_term.c
index a5254a90..944a2282 100644
--- a/mdoc_term.c
+++ b/mdoc_term.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_term.c,v 1.328 2015/10/06 18:32:19 schwarze Exp $ */
+/* $Id: mdoc_term.c,v 1.329 2015/10/12 00:08:16 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010, 2012-2015 Ingo Schwarze <schwarze@openbsd.org>
@@ -625,11 +625,8 @@ termp_it_pre(DECL_ARGS)
switch (type) {
case LIST_bullet:
- /* FALLTHROUGH */
case LIST_dash:
- /* FALLTHROUGH */
case LIST_hyphen:
- /* FALLTHROUGH */
case LIST_enum:
width = term_len(p, 2);
break;
@@ -637,7 +634,6 @@ termp_it_pre(DECL_ARGS)
width = term_len(p, 8);
break;
case LIST_column:
- /* FALLTHROUGH */
case LIST_tag:
width = term_len(p, 10);
break;
@@ -762,16 +758,13 @@ termp_it_pre(DECL_ARGS)
switch (type) {
case LIST_enum:
+ case LIST_bullet:
+ case LIST_dash:
+ case LIST_hyphen:
/*
* Weird special case.
* Some very narrow lists actually hang.
*/
- /* FALLTHROUGH */
- case LIST_bullet:
- /* FALLTHROUGH */
- case LIST_dash:
- /* FALLTHROUGH */
- case LIST_hyphen:
if (width <= (int)term_len(p, 2))
p->flags |= TERMP_HANG;
if (n->type != ROFFT_HEAD)
@@ -854,13 +847,9 @@ termp_it_pre(DECL_ARGS)
break;
/* FALLTHROUGH */
case LIST_bullet:
- /* FALLTHROUGH */
case LIST_dash:
- /* FALLTHROUGH */
case LIST_enum:
- /* FALLTHROUGH */
case LIST_hyphen:
- /* FALLTHROUGH */
case LIST_tag:
if (n->type == ROFFT_HEAD)
p->rmargin = p->offset + width;
@@ -896,7 +885,6 @@ termp_it_pre(DECL_ARGS)
term_fontpop(p);
break;
case LIST_dash:
- /* FALLTHROUGH */
case LIST_hyphen:
term_fontpush(p, TERMFONT_BOLD);
term_word(p, "\\(hy");
@@ -918,13 +906,9 @@ termp_it_pre(DECL_ARGS)
switch (type) {
case LIST_bullet:
- /* FALLTHROUGH */
case LIST_item:
- /* FALLTHROUGH */
case LIST_dash:
- /* FALLTHROUGH */
case LIST_hyphen:
- /* FALLTHROUGH */
case LIST_enum:
if (n->type == ROFFT_HEAD)
return 0;
@@ -952,9 +936,7 @@ termp_it_post(DECL_ARGS)
switch (type) {
case LIST_item:
- /* FALLTHROUGH */
case LIST_diag:
- /* FALLTHROUGH */
case LIST_inset:
if (n->type == ROFFT_BODY)
term_newln(p);
@@ -1293,13 +1275,9 @@ synopsis_pre(struct termp *p, const struct roff_node *n)
*/
switch (n->prev->tok) {
case MDOC_Fd:
- /* FALLTHROUGH */
case MDOC_Fn:
- /* FALLTHROUGH */
case MDOC_Fo:
- /* FALLTHROUGH */
case MDOC_In:
- /* FALLTHROUGH */
case MDOC_Vt:
term_vspace(p);
break;
@@ -1617,19 +1595,12 @@ termp_bd_pre(DECL_ARGS)
*/
switch (nn->tok) {
case MDOC_Sm:
- /* FALLTHROUGH */
case MDOC_br:
- /* FALLTHROUGH */
case MDOC_sp:
- /* FALLTHROUGH */
case MDOC_Bl:
- /* FALLTHROUGH */
case MDOC_D1:
- /* FALLTHROUGH */
case MDOC_Dl:
- /* FALLTHROUGH */
case MDOC_Lp:
- /* FALLTHROUGH */
case MDOC_Pp:
continue;
default:
@@ -1866,27 +1837,21 @@ termp_quote_pre(DECL_ARGS)
switch (n->tok) {
case MDOC_Ao:
- /* FALLTHROUGH */
case MDOC_Aq:
term_word(p, n->nchild == 1 &&
n->child->tok == MDOC_Mt ? "<" : "\\(la");
break;
case MDOC_Bro:
- /* FALLTHROUGH */
case MDOC_Brq:
term_word(p, "{");
break;
case MDOC_Oo:
- /* FALLTHROUGH */
case MDOC_Op:
- /* FALLTHROUGH */
case MDOC_Bo:
- /* FALLTHROUGH */
case MDOC_Bq:
term_word(p, "[");
break;
case MDOC_Do:
- /* FALLTHROUGH */
case MDOC_Dq:
term_word(p, "\\(Lq");
break;
@@ -1897,21 +1862,16 @@ termp_quote_pre(DECL_ARGS)
term_word(p, n->norm->Es->child->string);
break;
case MDOC_Po:
- /* FALLTHROUGH */
case MDOC_Pq:
term_word(p, "(");
break;
case MDOC__T:
- /* FALLTHROUGH */
case MDOC_Qo:
- /* FALLTHROUGH */
case MDOC_Qq:
term_word(p, "\"");
break;
case MDOC_Ql:
- /* FALLTHROUGH */
case MDOC_So:
- /* FALLTHROUGH */
case MDOC_Sq:
term_word(p, "\\(oq");
break;
@@ -1934,27 +1894,21 @@ termp_quote_post(DECL_ARGS)
switch (n->tok) {
case MDOC_Ao:
- /* FALLTHROUGH */
case MDOC_Aq:
term_word(p, n->nchild == 1 &&
n->child->tok == MDOC_Mt ? ">" : "\\(ra");
break;
case MDOC_Bro:
- /* FALLTHROUGH */
case MDOC_Brq:
term_word(p, "}");
break;
case MDOC_Oo:
- /* FALLTHROUGH */
case MDOC_Op:
- /* FALLTHROUGH */
case MDOC_Bo:
- /* FALLTHROUGH */
case MDOC_Bq:
term_word(p, "]");
break;
case MDOC_Do:
- /* FALLTHROUGH */
case MDOC_Dq:
term_word(p, "\\(Rq");
break;
@@ -1967,21 +1921,16 @@ termp_quote_post(DECL_ARGS)
term_word(p, n->norm->Es->child->next->string);
break;
case MDOC_Po:
- /* FALLTHROUGH */
case MDOC_Pq:
term_word(p, ")");
break;
case MDOC__T:
- /* FALLTHROUGH */
case MDOC_Qo:
- /* FALLTHROUGH */
case MDOC_Qq:
term_word(p, "\"");
break;
case MDOC_Ql:
- /* FALLTHROUGH */
case MDOC_So:
- /* FALLTHROUGH */
case MDOC_Sq:
term_word(p, "\\(cq");
break;