# HG changeset patch # User ali # Date 1369522658 -3600 # Node ID a1fd8d3f09405b3e28045b776fc7ee302fa07514 # Parent 0d08cd5055d5f29d7e8b769ad33412dca408f551 Break check_for_pling_scanno() out diff -r 0d08cd5055d5 -r a1fd8d3f0940 bookloupe/bookloupe.c --- a/bookloupe/bookloupe.c Sat May 25 23:51:28 2013 +0100 +++ b/bookloupe/bookloupe.c Sat May 25 23:57:38 2013 +0100 @@ -1394,6 +1394,27 @@ } /* + * check_for_pling_scanno: + * + * Check for I" - often should be ! + */ +void check_for_pling_scanno(const char *aline) +{ + const char *s; + s=strstr(aline," I\""); + if (s) + { + if (pswit[ECHO_SWITCH]) + printf("\n%s\n",aline); + if (!pswit[OVERVIEW_SWITCH]) + printf(" Line %ld column %ld - Query I=exclamation mark?\n", + linecnt,s-aline); + else + cnt_punct++; + } +} + +/* * procfile: * * Process one file. @@ -1643,17 +1664,7 @@ check_for_jeebies(aline); check_for_mta_from(aline); check_for_orphan_character(aline); - /* Check for I" - often should be ! */ - if (strstr(aline," I\"")) - { - if (pswit[ECHO_SWITCH]) - printf("\n%s\n",aline); - if (!pswit[OVERVIEW_SWITCH]) - printf(" Line %ld column %ld - Query I=exclamation mark?\n", - linecnt,strstr(aline," I\"")-aline); - else - cnt_punct++; - } + check_for_pling_scanno(aline); /* * Check for period without a capital letter. Cut-down from gutspell. * Only works when it happens on a single line.