Commit 8b5b25a6 8b5b25a60cbb5aa6931e798000f2c2f985097155 by Sergey Poznyakoff

(util_escape_percent): Delete

1 parent 1815987a
...@@ -350,7 +350,6 @@ extern void util_slist_destroy (mu_list_t *list); ...@@ -350,7 +350,6 @@ extern void util_slist_destroy (mu_list_t *list);
350 extern char *util_slist_to_string (mu_list_t list, const char *delim); 350 extern char *util_slist_to_string (mu_list_t list, const char *delim);
351 extern void util_strcat (char **dest, const char *str); 351 extern void util_strcat (char **dest, const char *str);
352 extern void util_strupper (char *str); 352 extern void util_strupper (char *str);
353 extern void util_escape_percent (char **str);
354 extern char *util_outfolder_name (char *str); 353 extern char *util_outfolder_name (char *str);
355 extern void util_save_outgoing (mu_message_t msg, char *savefile); 354 extern void util_save_outgoing (mu_message_t msg, char *savefile);
356 extern void util_error (const char *format, ...) MU_PRINTFLIKE(1,2); 355 extern void util_error (const char *format, ...) MU_PRINTFLIKE(1,2);
......
...@@ -821,9 +821,9 @@ util_get_sender (int msgno, int strip) ...@@ -821,9 +821,9 @@ util_get_sender (int msgno, int strip)
821 if (!addr) 821 if (!addr)
822 { 822 {
823 mu_envelope_t env = NULL; 823 mu_envelope_t env = NULL;
824 char buffer[512]; 824 const char *buffer;
825 mu_message_get_envelope (msg, &env); 825 mu_message_get_envelope (msg, &env);
826 if (mu_envelope_sender (env, buffer, sizeof (buffer), NULL) 826 if (mu_envelope_sget_sender (env, &buffer)
827 || mu_address_create (&addr, buffer)) 827 || mu_address_create (&addr, buffer))
828 { 828 {
829 util_error (_("Cannot determine sender name (msg %d)"), msgno); 829 util_error (_("Cannot determine sender name (msg %d)"), msgno);
...@@ -996,37 +996,6 @@ util_strupper (char *s) ...@@ -996,37 +996,6 @@ util_strupper (char *s)
996 } 996 }
997 997
998 998
999 void
1000 util_escape_percent (char **str)
1001 {
1002 int count;
1003 char *p, *q;
1004 char *newstr;
1005
1006 /* Count ocurrences of % in the string */
1007 count = 0;
1008 for (p = *str; *p; p++)
1009 if (*p == '%')
1010 count++;
1011
1012 if (!count)
1013 return; /* nothing to do */
1014
1015 /* expand the string */
1016 newstr = xmalloc (strlen (*str) + 1 + count);
1017
1018 /* and escape percent signs */
1019 p = newstr;
1020 q = *str;
1021 while ((*p = *q++))
1022 {
1023 if (*p == '%')
1024 *++p = '%';
1025 p++;
1026 }
1027 *str = newstr;
1028 }
1029
1030 char * 999 char *
1031 util_outfolder_name (char *str) 1000 util_outfolder_name (char *str)
1032 { 1001 {
......