aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mandoc.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 /mandoc.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 'mandoc.c')
-rw-r--r--mandoc.c33
1 files changed, 1 insertions, 32 deletions
diff --git a/mandoc.c b/mandoc.c
index 5a7ffc7b..74a312e5 100644
--- a/mandoc.c
+++ b/mandoc.c
@@ -1,4 +1,4 @@
-/* $Id: mandoc.c,v 1.94 2015/10/06 18:32:19 schwarze Exp $ */
+/* $Id: mandoc.c,v 1.95 2015/10/12 00:08:15 schwarze Exp $ */
/*
* Copyright (c) 2008-2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2011-2015 Ingo Schwarze <schwarze@openbsd.org>
@@ -93,11 +93,8 @@ mandoc_escape(const char **end, const char **start, int *sz)
* Escapes taking no arguments at all.
*/
case 'd':
- /* FALLTHROUGH */
case 'u':
- /* FALLTHROUGH */
case ',':
- /* FALLTHROUGH */
case '/':
return ESCAPE_IGNORE;
@@ -115,19 +112,12 @@ mandoc_escape(const char **end, const char **start, int *sz)
* 'X' is the trigger. These have opaque sub-strings.
*/
case 'F':
- /* FALLTHROUGH */
case 'g':
- /* FALLTHROUGH */
case 'k':
- /* FALLTHROUGH */
case 'M':
- /* FALLTHROUGH */
case 'm':
- /* FALLTHROUGH */
case 'n':
- /* FALLTHROUGH */
case 'V':
- /* FALLTHROUGH */
case 'Y':
gly = ESCAPE_IGNORE;
/* FALLTHROUGH */
@@ -155,15 +145,10 @@ mandoc_escape(const char **end, const char **start, int *sz)
* The \B and \w escapes are handled in roff.c, roff_res().
*/
case 'A':
- /* FALLTHROUGH */
case 'b':
- /* FALLTHROUGH */
case 'D':
- /* FALLTHROUGH */
case 'R':
- /* FALLTHROUGH */
case 'X':
- /* FALLTHROUGH */
case 'Z':
gly = ESCAPE_IGNORE;
/* FALLTHROUGH */
@@ -181,17 +166,11 @@ mandoc_escape(const char **end, const char **start, int *sz)
* and 'N' resolves to a numerical expression.
*/
case 'h':
- /* FALLTHROUGH */
case 'H':
- /* FALLTHROUGH */
case 'L':
- /* FALLTHROUGH */
case 'l':
- /* FALLTHROUGH */
case 'S':
- /* FALLTHROUGH */
case 'v':
- /* FALLTHROUGH */
case 'x':
if (strchr(" %&()*+-./0123456789:<=>", **start)) {
if ('\0' != **start)
@@ -247,9 +226,7 @@ mandoc_escape(const char **end, const char **start, int *sz)
term = '\'';
break;
case '3':
- /* FALLTHROUGH */
case '2':
- /* FALLTHROUGH */
case '1':
*sz = (*end)[-1] == 's' &&
isdigit((unsigned char)(*end)[1]) ? 2 : 1;
@@ -325,12 +302,10 @@ mandoc_escape(const char **end, const char **start, int *sz)
switch (**start) {
case '3':
- /* FALLTHROUGH */
case 'B':
gly = ESCAPE_FONTBOLD;
break;
case '2':
- /* FALLTHROUGH */
case 'I':
gly = ESCAPE_FONTITALIC;
break;
@@ -338,7 +313,6 @@ mandoc_escape(const char **end, const char **start, int *sz)
gly = ESCAPE_FONTPREV;
break;
case '1':
- /* FALLTHROUGH */
case 'R':
gly = ESCAPE_FONTROMAN;
break;
@@ -563,19 +537,14 @@ mandoc_eos(const char *p, size_t sz)
for (q = p + (int)sz - 1; q >= p; q--) {
switch (*q) {
case '\"':
- /* FALLTHROUGH */
case '\'':
- /* FALLTHROUGH */
case ']':
- /* FALLTHROUGH */
case ')':
if (0 == found)
enclosed = 1;
break;
case '.':
- /* FALLTHROUGH */
case '!':
- /* FALLTHROUGH */
case '?':
found = 1;
break;