# HG changeset patch # User ali # Date 1369522288 -3600 # Node ID 0d08cd5055d5f29d7e8b769ad33412dca408f551 # Parent 1b646720d4a7151af7974962ab8635928412e7cb Break check_for_orphan_character() out diff -r 1b646720d4a7 -r 0d08cd5055d5 bookloupe/bookloupe.c --- a/bookloupe/bookloupe.c Sat May 25 23:43:48 2013 +0100 +++ b/bookloupe/bookloupe.c Sat May 25 23:51:28 2013 +0100 @@ -1368,6 +1368,32 @@ } /* + * check_for_orphan_character: + * + * Check for a single character line - + * often an overflow from bad wrapping. + */ +void check_for_orphan_character(const char *aline) +{ + if (*aline && !aline[1]) + { + if (*aline=='I' || *aline=='V' || *aline=='X' || *aline=='L' || + gcisdigit(*aline)) + ; /* Nothing - ignore numerals alone on a line. */ + else + { + if (pswit[ECHO_SWITCH]) + printf("\n%s\n",aline); + if (!pswit[OVERVIEW_SWITCH]) + printf(" Line %ld column 1 - Query single character line\n", + linecnt); + else + cnt_punct++; + } + } +} + +/* * procfile: * * Process one file. @@ -1616,26 +1642,7 @@ check_for_unmarked_paragraphs(aline); check_for_jeebies(aline); check_for_mta_from(aline); - /* - * Check for a single character line - - * often an overflow from bad wrapping. - */ - if (*aline && !aline[1]) - { - if (*aline=='I' || *aline=='V' || *aline=='X' || *aline=='L' || - gcisdigit(*aline)) - ; /* Nothing - ignore numerals alone on a line. */ - else - { - if (pswit[ECHO_SWITCH]) - printf("\n%s\n",aline); - if (!pswit[OVERVIEW_SWITCH]) - printf(" Line %ld column 1 - " - "Query single character line\n",linecnt); - else - cnt_punct++; - } - } + check_for_orphan_character(aline); /* Check for I" - often should be ! */ if (strstr(aline," I\"")) {