# HG changeset patch # User ali # Date 1369510697 -3600 # Node ID 274aa1e09099a380d79de7f67f9cef453c8cbb73 # Parent 7522c36859d0bbff706d966be88fb62adeae69ad Break check_for_unmarked_paragraphs() out diff -r 7522c36859d0 -r 274aa1e09099 bookloupe/bookloupe.c --- a/bookloupe/bookloupe.c Sat May 25 20:29:36 2013 +0100 +++ b/bookloupe/bookloupe.c Sat May 25 20:38:17 2013 +0100 @@ -1236,6 +1236,33 @@ } /* + * check_for_unmarked_paragraphs: + * + * Check for unmarked paragraphs indicated by separate speakers. + * + * May well be false positive: + * "Bravo!" "Wonderful!" called the crowd. + * but useful all the same. + */ +void check_for_unmarked_paragraphs(const char *aline) +{ + const char *s; + s=strstr(aline,"\" \""); + if (!s) + s=strstr(aline,"\" \""); + if (s) + { + if (pswit[ECHO_SWITCH]) + printf("\n%s\n",aline); + if (!pswit[OVERVIEW_SWITCH]) + printf(" Line %ld column %d - Query missing paragraph break?\n", + linecnt,(int)(s-aline)+1); + else + cnt_punct++; + } +} + +/* * procfile: * * Process one file. @@ -1481,29 +1508,7 @@ check_for_spaced_emdash(aline); check_for_spaced_dash(aline); } - /* - * Check for unmarked paragraphs indicated by separate speakers. - * May well be false positive: - * "Bravo!" "Wonderful!" called the crowd. - * but useful all the same. - */ - s=wrk; - *s=0; - if (strstr(aline,"\" \"")) - s=strstr(aline,"\" \""); - if (strstr(aline,"\" \"")) - s=strstr(aline,"\" \""); - if (*s) - { - if (pswit[ECHO_SWITCH]) - printf("\n%s\n",aline); - if (!pswit[OVERVIEW_SWITCH]) - printf(" Line %ld column %d - " - "Query missing paragraph break?\n", - linecnt,(int)(s-aline)+1); - else - cnt_punct++; - } + check_for_unmarked_paragraphs(aline); /* * Check for "to he" and other easy he/be errors. * This is a very inadequate effort on the he/be problem,