diff -r 37da646396b9 -r 783eff3047bc bookloupe/bookloupe.c --- a/bookloupe/bookloupe.c Tue Oct 15 07:57:45 2013 +0100 +++ b/bookloupe/bookloupe.c Sat Oct 05 21:37:31 2013 +0100 @@ -1478,7 +1478,7 @@ } s1=g_utf8_next_char(g_utf8_next_char(t)); while (*s1 && !g_unichar_isalpha(g_utf8_get_char(s1)) && - !isdigit(g_utf8_get_char(s1))) + !g_unichar_isdigit(g_utf8_get_char(s1))) s1=g_utf8_next_char(s1); if (g_unichar_islower(g_utf8_get_char(s1))) { @@ -2036,7 +2036,7 @@ if (!parity) { /* parity even */ - if (!g_utf8_strchr("_-.'`/,;:!?)]} ",-1,nc)) + if (!g_utf8_strchr("_-.'`‘’/,;:!?)]} ",-1,nc)) { if (pswit[ECHO_SWITCH]) g_print("\n%s\n",aline); @@ -2051,8 +2051,8 @@ else { /* parity odd */ - if (!g_unichar_isalpha(nc) && !isdigit(nc) && - !g_utf8_strchr("_-/.'`([{$",-1,nc) || !nc) + if (!g_unichar_isalpha(nc) && !g_unichar_isdigit(nc) && + !g_utf8_strchr("_-/.'`‘’([{$",-1,nc) || !nc) { if (pswit[ECHO_SWITCH]) g_print("\n%s\n",aline); @@ -2111,7 +2111,7 @@ else { /* parity odd */ - if (!g_unichar_isalpha(nc) && !isdigit(nc) && + if (!g_unichar_isalpha(nc) && !g_unichar_isdigit(nc) && !g_utf8_strchr("_-/\".'`",-1,nc) || !nc) { if (pswit[ECHO_SWITCH]) @@ -2777,9 +2777,27 @@ for (;;) { c=g_utf8_get_char(*etext); + if (!c) + { + if (*etext==theline) + return NULL; + else if (pswit[LINE_END_SWITCH]) + { + if (pswit[ECHO_SWITCH]) + { + s=g_strndup(theline,eos-theline); + g_print("\n%s\n",s); + g_free(s); + } + if (!pswit[OVERVIEW_SWITCH]) + /* There may, or may not, have been a CR */ + g_print(" Line %ld - No LF?\n",lcnt); + else + cnt_lineend++; + } + break; + } *etext=g_utf8_next_char(*etext); - if (!c) - return NULL; /* either way, it's end of line */ if (c=='\n') {