# HG changeset patch # User ali # Date 1369521828 -3600 # Node ID 1b646720d4a7151af7974962ab8635928412e7cb # Parent 8a53979c0d657d2bfee66f56d763709fdb8b8886 Break check_for_mta_from() out diff -r 8a53979c0d65 -r 1b646720d4a7 bookloupe/bookloupe.c --- a/bookloupe/bookloupe.c Sat May 25 20:47:50 2013 +0100 +++ b/bookloupe/bookloupe.c Sat May 25 23:43:48 2013 +0100 @@ -1346,6 +1346,28 @@ } /* + * check_for_mta_from: + * + * Special case - angled bracket in front of "From" placed there by an + * MTA when sending an e-mail. + */ +void check_for_mta_from(const char *aline) +{ + const char *s; + s=strstr(aline,">From"); + if (s) + { + if (pswit[ECHO_SWITCH]) + printf("\n%s\n",aline); + if (!pswit[OVERVIEW_SWITCH]) + printf(" Line %ld column %d - Query angled bracket with From\n", + linecnt,(int)(s-aline)+1); + else + cnt_punct++; + } +} + +/* * procfile: * * Process one file. @@ -1593,21 +1615,7 @@ } check_for_unmarked_paragraphs(aline); check_for_jeebies(aline); - /* - * Special case - angled bracket in front of "From" placed there by an - * MTA when sending an e-mail. - */ - if (strstr(aline,">From")) - { - if (pswit[ECHO_SWITCH]) - printf("\n%s\n",aline); - if (!pswit[OVERVIEW_SWITCH]) - printf(" Line %ld column %d - " - "Query angled bracket with From\n", - linecnt,(int)(strstr(aline,">From")-aline)+1); - else - cnt_punct++; - } + check_for_mta_from(aline); /* * Check for a single character line - * often an overflow from bad wrapping.