From 7ea986d8c4c528165c092ef305cbfcdda513cd6f Mon Sep 17 00:00:00 2001 From: Christopher James Lahey Date: Thu, 10 Jan 2002 22:33:42 +0000 Subject: Allow for a period after suffixes. Fixes Ximian bug #17012. 2002-01-10 Christopher James Lahey * ename/e-name-western.c (e_name_western_word_is_suffix): Allow for a period after suffixes. Fixes Ximian bug #17012. svn path=/trunk/; revision=15289 --- e-util/ename/e-name-western.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'e-util/ename') diff --git a/e-util/ename/e-name-western.c b/e-util/ename/e-name-western.c index c016533d91..f8d717c403 100644 --- a/e-util/ename/e-name-western.c +++ b/e-util/ename/e-name-western.c @@ -128,10 +128,12 @@ e_name_western_word_is_suffix (char *word) int i; for (i = 0; e_name_western_sfx_table [i] != NULL; i ++) { - if (g_strcasecmp (word, e_name_western_sfx_table [i])) - continue; - - return TRUE; + int length = strlen (e_name_western_sfx_table [i]); + if (!g_strcasecmp (word, e_name_western_sfx_table [i]) || + ( !g_strncasecmp (word, e_name_western_sfx_table [i], length) && + strlen(word) == length + 1 && + word[length] == '.' )) + return TRUE; } return FALSE; -- cgit