* please see the file GPL in the top level source directory.
*/
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <string.h>
-#include <stdlib.h>
-#include <ctype.h>
-#include <sys/stat.h>
-#include <unistd.h>
-#include <stdarg.h>
-
-#include <lib-lib/mem.h>
-#include <lib-lib/ascii.h>
-#include <lib-lib/str.h>
-#include <lib-lib/macros.h>
-#include <lib-lib/file.h>
-#include <lib-lib/buffer.h>
-#include <lib-lib/mapping.h>
+#include <lib-lib/lib-lib.h>
#include <lib-mime/mime.h>
-
#include <lib-ui/enter.h>
+#include <lib-ui/curses.h>
+#include <lib-mx/mx.h>
#include "mutt.h"
#include "alias.h"
#include "handler.h"
-#include "mx.h"
#include "keymap.h"
#include "copy.h"
#define M_PDR_ERROR 0x0100
#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)
{
p_clear(&s, 1);
s.fpin = msg->fp;
s.flags = M_CHARCONV;
- mutt_mktemp (tempfile);
- if ((s.fpout = safe_fopen (tempfile, "w+")) == NULL) {
- mutt_perror (tempfile);
+ s.fpout = m_tempfile(tempfile, sizeof(tempfile), NONULL(Tempdir), NULL);
+ if (!s.fpout) {
+ mutt_error(_("Could not create temporary file"));
return (0);
}
m_strcpy(s, len, "~U");
else {
quote_simple (tmp, sizeof (tmp), s);
- mutt_expand_fmt (s, len, simple, tmp);
+ m_file_fmt(s, len, simple, tmp);
}
}
}