From: Pierre Habouzit Date: Sat, 2 Dec 2006 23:32:28 +0000 (+0100) Subject: optimizations, remove horrors. X-Git-Url: http://git.madism.org/?a=commitdiff_plain;h=6896715a0d62173a620b2377dba8e6d2058c1ee2;p=apps%2Fmadmutt.git optimizations, remove horrors. Signed-off-by: Pierre Habouzit --- diff --git a/alias.c b/alias.c index f566cec..ff4a310 100644 --- a/alias.c +++ b/alias.c @@ -490,7 +490,7 @@ alias_format_str(char *dest, ssize_t destlen, char op, const char *src, switch (op) { case 'f': - m_strcpy(dest, destlen, alias->del ? "D" : " "); + m_strputc(dest, destlen, alias->del ? 'D' : ' '); break; case 'a': mutt_format_s(dest, destlen, fmt, alias->name); @@ -506,7 +506,7 @@ alias_format_str(char *dest, ssize_t destlen, char op, const char *src, snprintf(dest, destlen, tmp, alias->num + 1); break; case 't': - m_strcpy(dest, destlen, alias->tagged ? "*" : " "); + m_strputc(dest, destlen, alias->tagged ? '*' : ' '); break; } diff --git a/compose.c b/compose.c index b11fc66..1b278f4 100644 --- a/compose.c +++ b/compose.c @@ -445,7 +445,7 @@ static const char *compose_format_str (char *buf, ssize_t buflen, char op, return (src); default: - snprintf (buf, buflen, "%%%s%c", prefix, op); + *buf = 0; break; } diff --git a/lib-ui/hdrline.c b/lib-ui/hdrline.c index ee03a15..cb5a5f4 100644 --- a/lib-ui/hdrline.c +++ b/lib-ui/hdrline.c @@ -702,7 +702,7 @@ static const char *hdr_format_str (char *dest, break; default: - snprintf (dest, destlen, "%%%s%c", prefix, op); + *dest = 0; break; } diff --git a/lib-ui/status.c b/lib-ui/status.c index ffbdaee..e3dd6e1 100644 --- a/lib-ui/status.c +++ b/lib-ui/status.c @@ -275,7 +275,7 @@ static const char *status_format_str (char *buf, ssize_t buflen, char op, return (src); default: - snprintf (buf, buflen, "%%%s%c", prefix, op); + *buf = 0; break; }