exit strfcpy, only use m_strcpy.
[apps/madmutt.git] / pattern.c
index e4d7caa..a02e96e 100644 (file)
--- a/pattern.c
+++ b/pattern.c
@@ -540,7 +540,7 @@ static int eat_date (pattern_t * pat, BUFFER * s, BUFFER * err)
   p_clear(&buffer, 1);
   if (mutt_extract_token (&buffer, s, M_TOKEN_COMMENT | M_TOKEN_PATTERN) != 0
       || !buffer.data) {
-    strfcpy (err->data, _("error in expression"), err->dsize);
+    m_strcpy(err->data, err->dsize, _("error in expression"));
     return (-1);
   }
 
@@ -842,7 +842,7 @@ pattern_t *mutt_pattern_comp ( /* const */ char *s, int flags, BUFFER * err)
     }
   }
   if (!curlist) {
-    strfcpy (err->data, _("empty pattern"), err->dsize);
+    m_strcpy(err->data, err->dsize, _("empty pattern"));
     return NULL;
   }
   if (curlist->next) {
@@ -1172,23 +1172,23 @@ void mutt_check_simple (char *s, size_t len, const char *simple)
   if (!strchr (s, '~') && !strchr (s, '=')) {       /* yup, so spoof a real request */
     /* convert old tokens into the new format */
     if (ascii_strcasecmp ("all", s) == 0 || !m_strcmp("^", s) || !m_strcmp(".", s))     /* ~A is more efficient */
-      strfcpy (s, "~A", len);
+      m_strcpy(s, len, "~A");
     else if (ascii_strcasecmp ("del", s) == 0)
-      strfcpy (s, "~D", len);
+      m_strcpy(s, len, "~D");
     else if (ascii_strcasecmp ("flag", s) == 0)
-      strfcpy (s, "~F", len);
+      m_strcpy(s, len, "~F");
     else if (ascii_strcasecmp ("new", s) == 0)
-      strfcpy (s, "~N", len);
+      m_strcpy(s, len, "~N");
     else if (ascii_strcasecmp ("old", s) == 0)
-      strfcpy (s, "~O", len);
+      m_strcpy(s, len, "~O");
     else if (ascii_strcasecmp ("repl", s) == 0)
-      strfcpy (s, "~Q", len);
+      m_strcpy(s, len, "~Q");
     else if (ascii_strcasecmp ("read", s) == 0)
-      strfcpy (s, "~R", len);
+      m_strcpy(s, len, "~R");
     else if (ascii_strcasecmp ("tag", s) == 0)
-      strfcpy (s, "~T", len);
+      m_strcpy(s, len, "~T");
     else if (ascii_strcasecmp ("unread", s) == 0)
-      strfcpy (s, "~U", len);
+      m_strcpy(s, len, "~U");
     else {
       quote_simple (tmp, sizeof (tmp), s);
       mutt_expand_fmt (s, len, simple, tmp);
@@ -1203,7 +1203,7 @@ int mutt_pattern_func (int op, char *prompt)
   BUFFER err;
   int i;
 
-  strfcpy (buf, NONULL (Context->pattern), sizeof (buf));
+  m_strcpy(buf, sizeof(buf), NONULL(Context->pattern));
   if (prompt || op != M_LIMIT)
     if (mutt_get_field (prompt, buf, sizeof (buf), M_PATTERN | M_CLEAR) != 0 || !buf[0])
       return (-1);
@@ -1311,7 +1311,7 @@ int mutt_search_command (int cur, int op)
   HEADER *h;
 
   if (op != OP_SEARCH_NEXT && op != OP_SEARCH_OPPOSITE) {
-    strfcpy (buf, LastSearch, sizeof (buf));
+    m_strcpy(buf, sizeof(buf), LastSearch);
     if (mutt_get_field ((op == OP_SEARCH) ? _("Search for: ") :
                         _("Reverse search for: "), buf, sizeof (buf),
                         M_CLEAR | M_PATTERN) != 0 || !buf[0])
@@ -1324,12 +1324,12 @@ int mutt_search_command (int cur, int op)
 
     /* compare the *expanded* version of the search pattern in case 
        $simple_search has changed while we were searching */
-    strfcpy (temp, buf, sizeof (temp));
+    m_strcpy(temp, sizeof(temp), buf);
     mutt_check_simple (temp, sizeof (temp), NONULL (SimpleSearch));
 
     if (!SearchPattern || m_strcmp(temp, LastSearchExpn)) {
       set_option (OPTSEARCHINVALID);
-      strfcpy (LastSearch, buf, sizeof (LastSearch));
+      m_strcpy(LastSearch, sizeof(LastSearch), buf);
       mutt_message _("Compiling search pattern...");
 
       mutt_pattern_free (&SearchPattern);