diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2009-12-28 03:44:21 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2009-12-28 03:44:21 +0800 |
commit | 2db0cad78c8f91531897cc4fd857ecee7474f4df (patch) | |
tree | 8e1d0b61e276d171758088fd5b4d80ac1ab3717a | |
parent | 8080d58ec309459e295be770bc7763f109bdf94b (diff) | |
download | gsoc2013-evolution-2db0cad78c8f91531897cc4fd857ecee7474f4df.tar gsoc2013-evolution-2db0cad78c8f91531897cc4fd857ecee7474f4df.tar.gz gsoc2013-evolution-2db0cad78c8f91531897cc4fd857ecee7474f4df.tar.bz2 gsoc2013-evolution-2db0cad78c8f91531897cc4fd857ecee7474f4df.tar.lz gsoc2013-evolution-2db0cad78c8f91531897cc4fd857ecee7474f4df.tar.xz gsoc2013-evolution-2db0cad78c8f91531897cc4fd857ecee7474f4df.tar.zst gsoc2013-evolution-2db0cad78c8f91531897cc4fd857ecee7474f4df.zip |
Replace alloca() with g_alloca().
-rw-r--r-- | configure.ac | 5 | ||||
-rw-r--r-- | e-util/e-alert.c | 2 | ||||
-rw-r--r-- | e-util/e-unicode.c | 3 | ||||
-rw-r--r-- | em-format/em-format.c | 2 | ||||
-rw-r--r-- | filter/e-filter-part.c | 2 | ||||
-rw-r--r-- | mail/e-mail-migrate.c | 4 | ||||
-rw-r--r-- | mail/e-searching-tokenizer.c | 8 | ||||
-rw-r--r-- | mail/em-account-editor.c | 2 | ||||
-rw-r--r-- | mail/em-folder-tree-model.c | 2 | ||||
-rw-r--r-- | mail/em-format-html.c | 2 | ||||
-rw-r--r-- | mail/mail-mt.c | 2 | ||||
-rw-r--r-- | mail/message-list.c | 6 |
12 files changed, 16 insertions, 24 deletions
diff --git a/configure.ac b/configure.ac index 686cc3e71b..4ef6e461a9 100644 --- a/configure.ac +++ b/configure.ac @@ -387,11 +387,6 @@ AC_RUN_IFELSE([AC_LANG_SOURCE([[ CFLAGS="$save_CFLAGS" LIBS="$save_LIBS" -dnl *********** -dnl alloca() -dnl *********** -AC_FUNC_ALLOCA - dnl ************** dnl waitpid() etc dnl ************** diff --git a/e-util/e-alert.c b/e-util/e-alert.c index 01fade0e32..797ba33798 100644 --- a/e-util/e-alert.c +++ b/e-util/e-alert.c @@ -430,7 +430,7 @@ e_alert_constructed (GObject *obj) g_return_if_fail (alert_table); g_return_if_fail (alert->priv->tag); - domain = alloca(strlen(alert->priv->tag)+1); + domain = g_alloca(strlen(alert->priv->tag)+1); strcpy(domain, alert->priv->tag); id = strchr(domain, ':'); if (id) diff --git a/e-util/e-unicode.c b/e-util/e-unicode.c index cc9139d125..84c0a1d7b8 100644 --- a/e-util/e-unicode.c +++ b/e-util/e-unicode.c @@ -29,9 +29,6 @@ #include <stdio.h> #include <ctype.h> #include <iconv.h> -#ifdef HAVE_ALLOCA_H -#include <alloca.h> -#endif #include <gdk/gdkkeysyms.h> #include <gtk/gtk.h> diff --git a/em-format/em-format.c b/em-format/em-format.c index d3ab13b013..305feb9178 100644 --- a/em-format/em-format.c +++ b/em-format/em-format.c @@ -358,7 +358,7 @@ em_format_fallback_handler(EMFormat *emf, const gchar *mime_type) else { gsize len = (s-mime_type)+1; - mime = alloca(len+2); + mime = g_alloca(len+2); strncpy(mime, mime_type, len); strcpy(mime+len, "*"); } diff --git a/filter/e-filter-part.c b/filter/e-filter-part.c index e86d2fabbc..4e6b114c37 100644 --- a/filter/e-filter-part.c +++ b/filter/e-filter-part.c @@ -493,7 +493,7 @@ e_filter_part_expand_code (EFilterPart *part, GString *out) { const gchar *newstart, *start, *end; - gchar *name = alloca (32); + gchar *name = g_alloca (32); gint len, namelen = 32; g_return_if_fail (E_IS_FILTER_PART (part)); diff --git a/mail/e-mail-migrate.c b/mail/e-mail-migrate.c index 04805324b6..f67ea38c5b 100644 --- a/mail/e-mail-migrate.c +++ b/mail/e-mail-migrate.c @@ -1322,13 +1322,13 @@ get_local_store_uri (const gchar *dirname, gchar **namep, gint *indexp) if (node->name && !strcmp ((gchar *)node->name, "folder")) { tmp = (gchar *)xmlGetProp (node, (const guchar *)"type"); if (tmp) { - protocol = alloca(strlen(tmp)+1); + protocol = g_alloca(strlen(tmp)+1); strcpy(protocol, tmp); xmlFree(tmp); } tmp = (gchar *)xmlGetProp (node, (const guchar *)"name"); if (tmp) { - name = alloca(strlen(tmp)+1); + name = g_alloca(strlen(tmp)+1); strcpy(name, tmp); xmlFree(tmp); } diff --git a/mail/e-searching-tokenizer.c b/mail/e-searching-tokenizer.c index 4a3b6a9bac..8920a7dd21 100644 --- a/mail/e-searching-tokenizer.c +++ b/mail/e-searching-tokenizer.c @@ -98,7 +98,7 @@ static const gchar *ignored_tags[] = { static gint ignore_tag (const gchar *tag) { - gchar *t = alloca(strlen(tag)+1), c, *out; + gchar *t = g_alloca(strlen(tag)+1), c, *out; const gchar *in; gint i; @@ -163,7 +163,7 @@ struct _trie { static void dump_trie (struct _state *s, gint d) { - gchar *p = alloca(d*2+1); + gchar *p = g_alloca(d*2+1); struct _match *m; memset(p, ' ', d*2); @@ -890,9 +890,9 @@ search_info_to_searcher (struct _search_info *si) else col = si->color; - tags = alloca(20+strlen(col)); + tags = g_alloca(20+strlen(col)); sprintf(tags, "%c<font color=\"%s\">", TAG_ESCAPE, col); - tage = alloca(20); + tage = g_alloca(20); sprintf(tage, "%c</font>", TAG_ESCAPE); return searcher_new (si->flags, si->strv->len, (guchar **)si->strv->pdata, tags, tage); diff --git a/mail/em-account-editor.c b/mail/em-account-editor.c index 88912a4517..e3e9613e2e 100644 --- a/mail/em-account-editor.c +++ b/mail/em-account-editor.c @@ -3153,7 +3153,7 @@ emae_check_complete (EConfig *ec, const gchar *pageid, gpointer data) emae->priv->management_set = 1; tmp = e_account_get_string (account, E_ACCOUNT_ID_ADDRESS); len = strlen (tmp); - template = alloca (len + 14); + template = g_alloca (len + 14); strcpy (template, tmp); while (e_get_account_by_name (template)) sprintf (template + len, " (%d)", i++); diff --git a/mail/em-folder-tree-model.c b/mail/em-folder-tree-model.c index 545c934805..c0840434c1 100644 --- a/mail/em-folder-tree-model.c +++ b/mail/em-folder-tree-model.c @@ -778,7 +778,7 @@ folder_subscribed (CamelStore *store, goto done; /* get our parent folder's path */ - dirname = alloca(strlen(fi->full_name)+1); + dirname = g_alloca(strlen(fi->full_name)+1); strcpy(dirname, fi->full_name); p = strrchr(dirname, '/'); if (p == NULL) { diff --git a/mail/em-format-html.c b/mail/em-format-html.c index 86ad0a5701..b9db3d16e4 100644 --- a/mail/em-format-html.c +++ b/mail/em-format-html.c @@ -2376,7 +2376,7 @@ efh_format_header(EMFormat *emf, CamelStream *stream, CamelMedium *part, struct gchar *str_field = NULL; gint i; - name = alloca(strlen(header->name)+1); + name = g_alloca(strlen(header->name)+1); strcpy(name, header->name); canon_header_name (name); diff --git a/mail/mail-mt.c b/mail/mail-mt.c index 3695800bc7..4c7c049745 100644 --- a/mail/mail-mt.c +++ b/mail/mail-mt.c @@ -854,7 +854,7 @@ op_status_exec (struct _op_status_msg *m) data = msg->priv; - out = alloca (strlen (m->what) * 2 + 1); + out = g_alloca (strlen (m->what) * 2 + 1); o = out; p = m->what; while ((c = *p++)) { diff --git a/mail/message-list.c b/mail/message-list.c index 49a839a7ba..6a674bec82 100644 --- a/mail/message-list.c +++ b/mail/message-list.c @@ -4380,13 +4380,13 @@ regen_list_exec (struct _regen_list_msg *m) } else if (m->hidedel) { if (m->hidejunk) { if (m->search) { - expr = alloca(strlen(m->search) + 92); + expr = g_alloca(strlen(m->search) + 92); sprintf(expr, "(and (match-all (and (not (system-flag \"deleted\")) (not (system-flag \"junk\"))))\n %s)", m->search); } else expr = (gchar *) "(match-all (and (not (system-flag \"deleted\")) (not (system-flag \"junk\"))))"; } else { if (m->search) { - expr = alloca(strlen(m->search) + 64); + expr = g_alloca(strlen(m->search) + 64); sprintf(expr, "(and (match-all (not (system-flag \"deleted\")))\n %s)", m->search); } else expr = (gchar *) "(match-all (not (system-flag \"deleted\")))"; @@ -4394,7 +4394,7 @@ regen_list_exec (struct _regen_list_msg *m) } else { if (m->hidejunk) { if (m->search) { - expr = alloca(strlen(m->search) + 64); + expr = g_alloca(strlen(m->search) + 64); sprintf(expr, "(and (match-all (not (system-flag \"junk\")))\n %s)", m->search); } else expr = (gchar *) "(match-all (not (system-flag \"junk\")))"; |