# HG changeset patch # User ali # Date 1369594511 -3600 # Node ID 11c6d93eebd9193d680928a8943b339e15407b53 # Parent b3385bfb28ac40ea7b841f4d98b1d3c7e303bcf2 Break check_for_miscased_genative() out diff -r b3385bfb28ac -r 11c6d93eebd9 bookloupe/bookloupe.c --- a/bookloupe/bookloupe.c Sun May 26 19:32:40 2013 +0100 +++ b/bookloupe/bookloupe.c Sun May 26 19:55:11 2013 +0100 @@ -2136,6 +2136,31 @@ } /* + * check_for_miscased_genative: + * + * Check special case of 'S instead of 's at end of word. + */ +void check_for_miscased_genative(const char *aline) +{ + const char *s; + s=aline+1; + while (*s) + { + if (*s==CHAR_SQUOTE && s[1]=='S' && s[-1]>='a' && s[-1]<='z') + { + if (pswit[ECHO_SWITCH]) + printf("\n%s\n",aline); + if (!pswit[OVERVIEW_SWITCH]) + printf(" Line %ld column %d - Capital \"S\"?\n", + linecnt,(int)(s-aline+2)); + else + cnt_punct++; + } + s++; + } +} + +/* * procfile: * * Process one file. @@ -2378,22 +2403,7 @@ check_for_misspaced_punctuation(aline,&parities,isemptyline); check_for_double_punctuation(aline,warnings); check_for_spaced_quotes(aline); - /* check special case of 'S instead of 's at end of word */ - s=aline+1; - while (*s) - { - if (*s==CHAR_SQUOTE && s[1]=='S' && s[-1]>='a' && s[-1]<='z') - { - if (pswit[ECHO_SWITCH]) - printf("\n%s\n",aline); - if (!pswit[OVERVIEW_SWITCH]) - printf(" Line %ld column %d - Capital \"S\"?\n", - linecnt,(int)(s-aline+2)); - else - cnt_punct++; - } - s++; - } + check_for_miscased_genative(aline); /* * Now check special cases - start and end of line - * for single and double quotes. Start is sometimes [sic]