From 09541b760e5d1f38f252e87dfec67801cd3dfaae Mon Sep 17 00:00:00 2001 From: Emanuele Giaquinta Date: Sun, 19 Oct 2008 15:14:14 +0200 Subject: [PATCH] Remove unused functions. --- pattern.c | 13 ------------- sendlib.c | 53 ----------------------------------------------------- 2 files changed, 66 deletions(-) diff --git a/pattern.c b/pattern.c index 89dd9744..928f333e 100644 --- a/pattern.c +++ b/pattern.c @@ -118,19 +118,6 @@ static char LastSearchExpn[LONG_STRING] = { 0 }; /* expanded version of #define M_PDR_ERRORDONE (M_PDR_ERROR | M_PDR_DONE) -int mutt_getvaluebychar (char ch, struct mapping_t *table) -{ - int i; - - for (i = 0; table[i].name; i++) - { - if (ch == table[i].name[0]) - return table[i].value; - } - - return (-1); -} - /* if no uppercase letters are given, do a case-insensitive search */ int mutt_which_case (const char *s) { diff --git a/sendlib.c b/sendlib.c index 7f9350cb..b84dccbe 100644 --- a/sendlib.c +++ b/sendlib.c @@ -2250,59 +2250,6 @@ mutt_invoke_sendmail (ADDRESS *from, /* the sender */ return (i); } -/* appends string 'b' to string 'a', and returns the pointer to the new - string. */ -char *mutt_append_string (char *a, const char *b) -{ - size_t la = mutt_strlen (a); - safe_realloc (&a, la + mutt_strlen (b) + 1); - strcpy (a + la, b); /* __STRCPY_CHECKED__ */ - return (a); -} - -/* returns 1 if char `c' needs to be quoted to protect from shell - interpretation when executing commands in a subshell */ -#define INVALID_CHAR(c) (!isalnum ((unsigned char)c) && !strchr ("@.+-_,:", c)) - -/* returns 1 if string `s' contains characters which could cause problems - when used on a command line to execute a command */ -int mutt_needs_quote (const char *s) -{ - while (*s) - { - if (INVALID_CHAR (*s)) - return 1; - s++; - } - return 0; -} - -/* Quote a string to prevent shell escapes when this string is used on the - command line to send mail. */ -char *mutt_quote_string (const char *s) -{ - char *r, *pr; - size_t rlen; - - rlen = mutt_strlen (s) + 3; - pr = r = (char *) safe_malloc (rlen); - *pr++ = '"'; - while (*s) - { - if (INVALID_CHAR (*s)) - { - size_t o = pr - r; - safe_realloc (&r, ++rlen); - pr = r + o; - *pr++ = '\\'; - } - *pr++ = *s++; - } - *pr++ = '"'; - *pr = 0; - return (r); -} - /* For postponing (!final) do the necessary encodings only */ void mutt_prepare_envelope (ENVELOPE *env, int final) { -- 2.40.0