aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@ximian.com>2002-01-11 06:33:42 +0800
committerChris Lahey <clahey@src.gnome.org>2002-01-11 06:33:42 +0800
commit7ea986d8c4c528165c092ef305cbfcdda513cd6f (patch)
tree899a7a5bc6799907ba741a2b26e3f4a5c8516b76
parent36563616f7ef544bc1d9569b66046da794359cff (diff)
downloadgsoc2013-evolution-7ea986d8c4c528165c092ef305cbfcdda513cd6f.tar.gz
gsoc2013-evolution-7ea986d8c4c528165c092ef305cbfcdda513cd6f.tar.zst
gsoc2013-evolution-7ea986d8c4c528165c092ef305cbfcdda513cd6f.zip
Allow for a period after suffixes. Fixes Ximian bug #17012.
2002-01-10 Christopher James Lahey <clahey@ximian.com> * 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
-rw-r--r--e-util/ChangeLog5
-rw-r--r--e-util/ename/e-name-western.c10
2 files changed, 11 insertions, 4 deletions
diff --git a/e-util/ChangeLog b/e-util/ChangeLog
index 5de15f534f..69f0b37bff 100644
--- a/e-util/ChangeLog
+++ b/e-util/ChangeLog
@@ -1,3 +1,8 @@
+2002-01-10 Christopher James Lahey <clahey@ximian.com>
+
+ * ename/e-name-western.c (e_name_western_word_is_suffix): Allow
+ for a period after suffixes. Fixes Ximian bug #17012.
+
2002-01-04 Jeffrey Stedfast <fejj@ximian.com>
* e-memory.c (e_memchunk_clean): Prune free'd nodes from our free
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;