made search for accounts by email address not case sensitive

fixed memory leak in folder_item_get_identifier
fixed wrong strstr2 (should work like strstr)
This commit is contained in:
Christoph Hohmann 2001-10-26 19:39:20 +00:00
parent 7f1aed5ed2
commit 04ee67da30
6 changed files with 21 additions and 17 deletions

View file

@ -1,3 +1,14 @@
2001-10-26 [christoph] 0.6.4claws10
* src/account.c
made search for accounts by email address not case
sensitive
* src/folder.c
fixed memory leak in folder_item_get_identifier
* src/gtkspell.c
* src/utils.c
fixed wrong strstr2 (should work like strstr)
2001-10-26 [darko] 0.6.4claws9
* src/compose.c src/gtkstext.[ch]

View file

@ -8,7 +8,7 @@ MINOR_VERSION=6
MICRO_VERSION=4
INTERFACE_AGE=0
BINARY_AGE=0
EXTRA_VERSION=claws9
EXTRA_VERSION=claws10
VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
dnl

View file

@ -196,7 +196,7 @@ PrefsAccount *account_find_from_address(const gchar *address)
for (cur = account_list; cur != NULL; cur = cur->next) {
ac = (PrefsAccount *)cur->data;
if (ac->protocol != A_NNTP && !strstr2(address, ac->address))
if (ac->protocol != A_NNTP && strcasestr(address, ac->address))
return ac;
}

View file

@ -1424,18 +1424,14 @@ static gchar * folder_item_get_tree_identifier(FolderItem * item)
gchar * folder_item_get_identifier(FolderItem * item)
{
gchar * path;
gchar * id;
gchar * folder_str;
g_return_if_fail(item->path != NULL);
folder_str = folder_get_identifier(item->folder);
if (item->path == NULL) {
g_free(folder_str);
return NULL;
}
id = g_strconcat(folder_str, "/", item->path, NULL);
g_free(folder_str);
return id;
}

View file

@ -1418,8 +1418,8 @@ gchar *gtkpspell_get_dictionary_menu_active_item(GtkWidget *menu)
guchar *convert_to_pspell_encoding (const guchar *encoding)
{
guchar * pspell_encoding;
/* Beware, strstr2 returns 0 if string is found -1 if not */
if (!strstr2(encoding, "ISO-8859-")) {
if (strstr2(encoding, "ISO-8859-")) {
pspell_encoding = g_strdup_printf("iso8859%s", encoding+8);
}
else

View file

@ -158,15 +158,12 @@ gint strcmp2(const gchar *s1, const gchar *s2)
return strcmp(s1, s2);
}
/* strstr with NULL-checking */
gint strstr2(const gchar *s1, const gchar *s2)
gchar *strstr2(const gchar *s1, const gchar *s2)
{
if (s1 == NULL || s2 == NULL)
return -1;
return NULL;
else
if( strstr(s1, s2) !=NULL)
return 0;
else
return -1;
return strstr(s1, s2);
}
/* compare paths */
gint path_cmp(const gchar *s1, const gchar *s2)