aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-ops.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2002-12-18 04:38:25 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2002-12-18 04:38:25 +0800
commitf37b0a1ab7d9dd437905d10d85410992ad9abc0a (patch)
treec8d13292527ab275073420046acb7f786b4a4008 /mail/mail-ops.c
parente446a3dd9f6f82ef7152a98740092cb1c94af65c (diff)
downloadgsoc2013-evolution-f37b0a1ab7d9dd437905d10d85410992ad9abc0a.tar.gz
gsoc2013-evolution-f37b0a1ab7d9dd437905d10d85410992ad9abc0a.tar.zst
gsoc2013-evolution-f37b0a1ab7d9dd437905d10d85410992ad9abc0a.zip
...And a whole bunch more build fixes.
2002-12-17 Jeffrey Stedfast <fejj@ximian.com> ...And a whole bunch more build fixes. * mail-vfolder.c (mail_vfolder_delete_uri): Don't use g_string_sprintfa() anymore since it is apparently deprecated. * mail-session.c (main_get_filter_driver): Don't use g_string_sprintfa() anymore since it is apparently deprecated. * mail-ops.c (build_from): Don't use g_string_sprintfa() anymore since it is apparently deprecated. * mail-callbacks.c (ask_confirm_for_unwanted_html_mail): Don't use g_string_sprintfa() anymore since it is apparently deprecated. * mail-autofilter.c: Don't use g_string_sprintfa() anymore since it is apparently deprecated. * folder-browser.c: Don't use g_string_sprintfa() anymore since it is apparently deprecated. * mail-search.c (mail_search_set_subject): Remove the unnecessary g_strdup()'age as well as fix a possible buffer overrun. * mail-local.c (mail_local_folder_construct): Use g_path_get_basename(). * mail-config-druid.c (make_account): Don't use e_utf8_* functions. svn path=/trunk/; revision=19152
Diffstat (limited to 'mail/mail-ops.c')
-rw-r--r--mail/mail-ops.c44
1 files changed, 23 insertions, 21 deletions
diff --git a/mail/mail-ops.c b/mail/mail-ops.c
index 81c5447f5d..c9de994aaa 100644
--- a/mail/mail-ops.c
+++ b/mail/mail-ops.c
@@ -33,7 +33,6 @@
#include <errno.h>
#include <libgnome/gnome-exec.h>
#include <gal/util/e-util.h>
-#include <gal/widgets/e-unicode.h>
#include <camel/camel-mime-filter-from.h>
#include <camel/camel-operation.h>
#include <camel/camel-vtrash-folder.h>
@@ -1823,46 +1822,49 @@ build_from(struct _header_raw *header)
time_t thetime;
int offset;
struct tm tm;
-
- tmp = header_raw_find(&header, "Sender", NULL);
+
+ tmp = header_raw_find (&header, "Sender", NULL);
if (tmp == NULL)
- tmp = header_raw_find(&header, "From", NULL);
+ tmp = header_raw_find (&header, "From", NULL);
if (tmp != NULL) {
- struct _header_address *addr = header_address_decode(tmp);
-
+ struct _header_address *addr = header_address_decode (tmp);
+
tmp = NULL;
if (addr) {
if (addr->type == HEADER_ADDRESS_NAME) {
- g_string_append(out, addr->v.addr);
+ g_string_append (out, addr->v.addr);
tmp = "";
}
- header_address_unref(addr);
+ header_address_unref (addr);
}
}
+
if (tmp == NULL)
- g_string_append(out, "unknown@nodomain.now.au");
-
+ g_string_append (out, "unknown@nodomain.now.au");
+
/* try use the received header to get the date */
- tmp = header_raw_find(&header, "Received", NULL);
+ tmp = header_raw_find (&header, "Received", NULL);
if (tmp) {
tmp = strrchr(tmp, ';');
if (tmp)
tmp++;
}
-
+
/* if there isn't one, try the Date field */
if (tmp == NULL)
- tmp = header_raw_find(&header, "Date", NULL);
-
- thetime = header_decode_date(tmp, &offset);
+ tmp = header_raw_find (&header, "Date", NULL);
+
+ thetime = header_decode_date (tmp, &offset);
thetime += ((offset / 100) * (60 * 60)) + (offset % 100) * 60;
- gmtime_r(&thetime, &tm);
- g_string_sprintfa(out, " %s %s %d %02d:%02d:%02d %4d\n",
- tz_days[tm.tm_wday],
- tz_months[tm.tm_mon], tm.tm_mday, tm.tm_hour, tm.tm_min, tm.tm_sec, tm.tm_year + 1900);
-
+ gmtime_r (&thetime, &tm);
+ g_string_append_printf (out, " %s %s %d %02d:%02d:%02d %4d\n",
+ tz_days[tm.tm_wday], tz_months[tm.tm_mon],
+ tm.tm_mday, tm.tm_hour, tm.tm_min, tm.tm_sec,
+ tm.tm_year + 1900);
+
ret = out->str;
- g_string_free(out, FALSE);
+ g_string_free (out, FALSE);
+
return ret;
}