summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mailbox/url.c35
-rw-r--r--movemail/movemail.c8
2 files changed, 28 insertions, 15 deletions
diff --git a/mailbox/url.c b/mailbox/url.c
index 1b833bf3f..f46fbc14f 100644
--- a/mailbox/url.c
+++ b/mailbox/url.c
@@ -42,3 +42,3 @@
-static int url_parse0 (mu_url_t, char *, size_t *poff);
+static int url_parse0 (mu_url_t, char *, size_t *poff, int *decode);
@@ -288,3 +288,4 @@ mu_url_parse (mu_url_t url)
mu_secret_t newsec;
-
+ int want_decode;
+
if (!url || !url->name)
@@ -303,3 +304,3 @@ mu_url_parse (mu_url_t url)
- err = url_parse0 (&u, n, &pstart);
+ err = url_parse0 (&u, n, &pstart, &want_decode);
@@ -333,13 +334,14 @@ mu_url_parse (mu_url_t url)
-#define UALLOC(X) \
- if (u.X && u.X[0] && (url->X = mu_url_decode(u.X)) == 0) \
- { \
- err = ENOMEM; \
- goto CLEANUP; \
- } \
- else \
- { \
- /* Set zero-length strings to NULL. */ \
- u.X = NULL; \
- }
+#define UALLOC(X) \
+ if (u.X && u.X[0] && \
+ !(url->X = (want_decode ? mu_url_decode (u.X) : strdup (u.X)))) \
+ { \
+ err = ENOMEM; \
+ goto CLEANUP; \
+ } \
+ else \
+ { \
+ /* Set zero-length strings to NULL. */ \
+ u.X = NULL; \
+ }
@@ -422,3 +424,3 @@ Is this required to be % quoted, though? I hope so!
static int
-url_parse0 (mu_url_t u, char *name, size_t *poff)
+url_parse0 (mu_url_t u, char *name, size_t *poff, int *decode)
{
@@ -434,2 +436,3 @@ url_parse0 (mu_url_t u, char *name, size_t *poff)
u->scheme = "file";
+ *decode = 0;
}
@@ -439,2 +442,3 @@ url_parse0 (mu_url_t u, char *name, size_t *poff)
u->scheme = "prog";
+ *decode = 0;
rc = mu_argcv_get (name + 1, NULL, NULL, &u->qargc, &u->qargv);
@@ -450,2 +454,3 @@ url_parse0 (mu_url_t u, char *name, size_t *poff)
{
+ *decode = 1;
/* Parse out the SCHEME. */
diff --git a/movemail/movemail.c b/movemail/movemail.c
index afb83e8ae..4e7bdb986 100644
--- a/movemail/movemail.c
+++ b/movemail/movemail.c
@@ -762,2 +762,10 @@ main (int argc, char **argv)
+ if (emacs_mode)
+ {
+ /* Undo the effect of configuration options that may affect
+ the interaction with Emacs. */
+ mu_registrar_set_default_record (mu_mbox_record);
+ mu_debug_default_printer = mu_debug_stderr_printer;
+ }
+
atexit (close_mailboxes);

Return to:

Send suggestions and report system problems to the System administrator.