aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers/imap/camel-imap-utils.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@helixcode.com>2000-08-08 02:54:15 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2000-08-08 02:54:15 +0800
commitcdb87d2e0a3eaa3e18bfdfa8fdbdf6bac0ca987a (patch)
treec0b19032195f2616336812603bf3984ce7f92962 /camel/providers/imap/camel-imap-utils.c
parent0a9fdd88421c68d3ecdd88bb220c72b111f1fe55 (diff)
downloadgsoc2013-evolution-cdb87d2e0a3eaa3e18bfdfa8fdbdf6bac0ca987a.tar
gsoc2013-evolution-cdb87d2e0a3eaa3e18bfdfa8fdbdf6bac0ca987a.tar.gz
gsoc2013-evolution-cdb87d2e0a3eaa3e18bfdfa8fdbdf6bac0ca987a.tar.bz2
gsoc2013-evolution-cdb87d2e0a3eaa3e18bfdfa8fdbdf6bac0ca987a.tar.lz
gsoc2013-evolution-cdb87d2e0a3eaa3e18bfdfa8fdbdf6bac0ca987a.tar.xz
gsoc2013-evolution-cdb87d2e0a3eaa3e18bfdfa8fdbdf6bac0ca987a.tar.zst
gsoc2013-evolution-cdb87d2e0a3eaa3e18bfdfa8fdbdf6bac0ca987a.zip
Strip all \n's from the expression
2000-08-07 Jeffrey Stedfast <fejj@helixcode.com> * providers/imap/camel-imap-utils.c (imap_translate_sexp): Strip all \n's from the expression * string-utils.c (strip): New convenience function to strip occurences of a single char from a string svn path=/trunk/; revision=4576
Diffstat (limited to 'camel/providers/imap/camel-imap-utils.c')
-rw-r--r--camel/providers/imap/camel-imap-utils.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/camel/providers/imap/camel-imap-utils.c b/camel/providers/imap/camel-imap-utils.c
index c440d6c165..f1c4c17782 100644
--- a/camel/providers/imap/camel-imap-utils.c
+++ b/camel/providers/imap/camel-imap-utils.c
@@ -369,9 +369,12 @@ char *
imap_translate_sexp (const char *expression)
{
struct sexp_node *root;
- char *sexp;
+ char *sexp, *exp;
- root = get_sexp_node (expression);
+ exp = g_strdup (expression);
+ strip (exp, '\n');
+ root = get_sexp_node (exp);
+ g_free (exp);
d(print_node (root, 0));
d(fprintf (stderr, "\n"));
@@ -466,8 +469,8 @@ imap_translate_sexp (const char *expression)
char *sexp;
esexp = e_sexp_new ();
-
- e_sexp_input_text (esexp, expression, strlen (expression));
+
+ e_sexp_input_text (esexp, exp, strlen (exp));
e_sexp_parse (esexp);
sexp = stresexptree (esexp->tree);