X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=edit.c;h=893732e23569c03f6b84e7c3f6d0bc09ecaec17d;hp=e1bc6dfa29cc5dcc0770529f7157b8c375c1aefe;hb=238b70e39b78f585c586bd51aef41988b3cc73d1;hpb=7f7a0be369840b290248e5b0302beb447fa1b3cd diff --git a/edit.c b/edit.c index e1bc6df..893732e 100644 --- a/edit.c +++ b/edit.c @@ -14,11 +14,12 @@ #endif #include +#include #include #include +#include #include "mutt.h" -#include "ascii.h" #include "enter.h" #include "mutt_curses.h" #include "mutt_idna.h" @@ -65,7 +66,7 @@ static char **be_snarf_data (FILE * f, char **buf, int *bufmax, int *buflen, tmp[sizeof (tmp) - 1] = 0; if (prefix) { - strfcpy (tmp, NONULL (Prefix), sizeof (tmp)); + m_strcpy(tmp, sizeof(tmp), NONULL(Prefix)); tmplen = m_strlen(tmp); p = tmp + tmplen; tmplen = sizeof (tmp) - tmplen; @@ -246,7 +247,7 @@ static void be_edit_header (ENVELOPE * e, int force) if (!e->subject || force) { addstr ("Subject: "); - strfcpy (tmp, e->subject ? e->subject : "", sizeof (tmp)); + m_strcpy(tmp, sizeof(tmp), NONULL(e->subject)); if (mutt_enter_string (tmp, sizeof (tmp), LINES - 1, 9, 0) == 0) str_replace (&e->subject, tmp); addch ('\n'); @@ -374,7 +375,7 @@ int mutt_builtin_editor (const char *path, HEADER * msg, HEADER * cur) break; case 'r': if (*p) { - strncpy (tmp, p, sizeof (tmp)); + m_strcpy(tmp, sizeof(tmp), p); mutt_expand_path (tmp, sizeof (tmp)); buf = be_snarf_file (tmp, buf, &bufmax, &buflen, 1); } @@ -391,7 +392,7 @@ int mutt_builtin_editor (const char *path, HEADER * msg, HEADER * cur) case 'u': if (buflen) { buflen--; - strfcpy (tmp, buf[buflen], sizeof (tmp)); + m_strcpy(tmp, sizeof(tmp), buf[buflen]); tmp[m_strlen(tmp) - 1] = 0; p_delete(&buf[buflen]); buf[buflen] = NULL; @@ -436,10 +437,10 @@ int mutt_builtin_editor (const char *path, HEADER * msg, HEADER * cur) break; } } - else if (str_cmp (".", tmp) == 0) + else if (m_strcmp(".", tmp) == 0) done = 1; else { - str_cat (tmp, sizeof (tmp), "\n"); + m_strcat(tmp, sizeof(tmp), "\n"); if (buflen == bufmax) p_realloc(&buf, bufmax += 25); buf[buflen++] = m_strdup(tmp[1] == '~' ? tmp + 1 : tmp);