1.1 --- a/bookloupe/bookloupe.c Sat May 25 23:43:48 2013 +0100
1.2 +++ b/bookloupe/bookloupe.c Sat May 25 23:51:28 2013 +0100
1.3 @@ -1368,6 +1368,32 @@
1.4 }
1.5
1.6 /*
1.7 + * check_for_orphan_character:
1.8 + *
1.9 + * Check for a single character line -
1.10 + * often an overflow from bad wrapping.
1.11 + */
1.12 +void check_for_orphan_character(const char *aline)
1.13 +{
1.14 + if (*aline && !aline[1])
1.15 + {
1.16 + if (*aline=='I' || *aline=='V' || *aline=='X' || *aline=='L' ||
1.17 + gcisdigit(*aline))
1.18 + ; /* Nothing - ignore numerals alone on a line. */
1.19 + else
1.20 + {
1.21 + if (pswit[ECHO_SWITCH])
1.22 + printf("\n%s\n",aline);
1.23 + if (!pswit[OVERVIEW_SWITCH])
1.24 + printf(" Line %ld column 1 - Query single character line\n",
1.25 + linecnt);
1.26 + else
1.27 + cnt_punct++;
1.28 + }
1.29 + }
1.30 +}
1.31 +
1.32 +/*
1.33 * procfile:
1.34 *
1.35 * Process one file.
1.36 @@ -1616,26 +1642,7 @@
1.37 check_for_unmarked_paragraphs(aline);
1.38 check_for_jeebies(aline);
1.39 check_for_mta_from(aline);
1.40 - /*
1.41 - * Check for a single character line -
1.42 - * often an overflow from bad wrapping.
1.43 - */
1.44 - if (*aline && !aline[1])
1.45 - {
1.46 - if (*aline=='I' || *aline=='V' || *aline=='X' || *aline=='L' ||
1.47 - gcisdigit(*aline))
1.48 - ; /* Nothing - ignore numerals alone on a line. */
1.49 - else
1.50 - {
1.51 - if (pswit[ECHO_SWITCH])
1.52 - printf("\n%s\n",aline);
1.53 - if (!pswit[OVERVIEW_SWITCH])
1.54 - printf(" Line %ld column 1 - "
1.55 - "Query single character line\n",linecnt);
1.56 - else
1.57 - cnt_punct++;
1.58 - }
1.59 - }
1.60 + check_for_orphan_character(aline);
1.61 /* Check for I" - often should be ! */
1.62 if (strstr(aline," I\""))
1.63 {