exit strfcpy, only use m_strcpy.
[apps/madmutt.git] / imap / imap.c
index 44d3eee..cb100ce 100644 (file)
@@ -1176,7 +1176,7 @@ int imap_mailbox_check (char *path, int new)
   p_delete(&mx.mbox);
 
   imap_munge_mbox_name (mbox, sizeof (mbox), buf);
-  strfcpy (mbox_unquoted, buf, sizeof (mbox_unquoted));
+  m_strcpy(mbox_unquoted, sizeof(mbox_unquoted), buf);
 
   /* The draft IMAP implementor's guide warns againts using the STATUS
    * command on a mailbox that you have selected 
@@ -1185,7 +1185,7 @@ int imap_mailbox_check (char *path, int new)
   if (m_strcmp(mbox_unquoted, idata->mailbox) == 0
       || (ascii_strcasecmp (mbox_unquoted, "INBOX") == 0
           && m_strcasecmp(mbox_unquoted, idata->mailbox) == 0)) {
-    strfcpy (buf, "NOOP", sizeof (buf));
+    m_strcpy(buf, sizeof(buf), "NOOP");
   }
   else if (mutt_bit_isset (idata->capabilities, IMAP4REV1) ||
            mutt_bit_isset (idata->capabilities, STATUS)) {
@@ -1516,7 +1516,7 @@ static int imap_complete_hosts (char *dest, size_t len) {
     mailbox = (BUFFY*) Incoming->data[i];
     if (!m_strncmp(dest, mailbox->path, matchlen)) {
       if (rc) {
-        strfcpy (dest, mailbox->path, len);
+        m_strcpy(dest, len, mailbox->path);
         rc = 0;
       } else
         longest_common_prefix (dest, mailbox->path, matchlen, len);
@@ -1537,7 +1537,7 @@ static int imap_complete_hosts (char *dest, size_t len) {
     url_ciss_tostring (&url, urlstr, sizeof (urlstr), 0);
     if (!m_strncmp(dest, urlstr, matchlen)) {
       if (rc) {
-        strfcpy (dest, urlstr, len);
+        m_strcpy(dest, len, urlstr);
         rc = 0;
       } else
         longest_common_prefix (dest, urlstr, matchlen, len);
@@ -1563,7 +1563,7 @@ int imap_complete (char *dest, size_t dlen, char *path) {
   IMAP_MBOX mx;
 
   if (imap_parse_path (path, &mx) || !mx.mbox) {
-    strfcpy (dest, path, dlen);
+    m_strcpy(dest, dlen, path);
     return imap_complete_hosts (dest, dlen);
   }
 
@@ -1571,7 +1571,7 @@ int imap_complete (char *dest, size_t dlen, char *path) {
    * known mailboxes/hooks/etc */
   if (!(idata = imap_conn_find (&(mx.account), M_IMAP_CONN_NONEW))) {
     p_delete(&mx.mbox);
-    strfcpy (dest, path, dlen);
+    m_strcpy(dest, dlen, path);
     return imap_complete_hosts (dest, dlen);
   }
   conn = idata->conn;
@@ -1590,7 +1590,7 @@ int imap_complete (char *dest, size_t dlen, char *path) {
   imap_cmd_start (idata, buf);
 
   /* and see what the results are */
-  strfcpy (completion, NONULL (mx.mbox), sizeof (completion));
+  m_strcpy(completion, sizeof(completion), NONULL(mx.mbox));
   do {
     if (imap_parse_list_response (idata, &list_word, &noselect, &noinferiors,
                                   &delim))
@@ -1609,7 +1609,7 @@ int imap_complete (char *dest, size_t dlen, char *path) {
       }
       /* copy in first word */
       if (!completions) {
-        strfcpy (completion, list_word, sizeof (completion));
+        m_strcpy(completion, sizeof(completion), list_word);
         matchlen = m_strlen(completion);
         completions++;
         continue;