unused, drop
[apps/madmutt.git] / smime.c
diff --git a/smime.c b/smime.c
index 0498122..a5d2fbc 100644 (file)
--- a/smime.c
+++ b/smime.c
@@ -148,7 +148,7 @@ static const char *_mutt_fmt_smime_command (char *dest,
         char buf1[LONG_STRING], buf2[LONG_STRING];
         struct stat sb;
 
-        strfcpy (path, NONULL (SmimeCALocation), sizeof (path));
+        m_strcpy(path, sizeof(path), NONULL(SmimeCALocation));
         mutt_expand_path (path, sizeof (path));
         mutt_quote_filename (buf1, sizeof (buf1), path);
 
@@ -410,8 +410,8 @@ char *smime_ask_for_key (char *prompt, char *mailbox, short public)
 
       Table[cur].hash = hash;
       Table[cur].suffix = hash_suffix;
-      strncpy (Table[cur].email, fields[0], sizeof (Table[cur].email));
-      strncpy (Table[cur].nick, fields[2], sizeof (Table[cur].nick));
+      m_strcpy(Table[cur].email, sizeof(Table[cur].email), fields[0]);
+      m_strcpy(Table[cur].nick,  sizeof(Table[cur].nick),  fields[2]);
       Table[cur].trust = *fields[4];
       Table[cur].public = public;
 
@@ -513,7 +513,7 @@ char *smime_get_field_from_db (char *mailbox, char *query, short public,
     }
 
     while (fgets (buf, sizeof (buf) - 1, fp) != NULL)
-      if (mailbox && !(str_ncasecmp (mailbox, buf, addr_len))) {
+      if (mailbox && !(m_strncasecmp(mailbox, buf, addr_len))) {
         numFields = sscanf (buf,
                             MUTT_FORMAT (STRING) " " MUTT_FORMAT (STRING) " "
                             MUTT_FORMAT (STRING) " " MUTT_FORMAT (STRING) " "
@@ -553,7 +553,7 @@ char *smime_get_field_from_db (char *mailbox, char *query, short public,
             continue;
           }
           else if (choice == M_YES) {
-            strfcpy (key, fields[1], sizeof (key));
+            m_strcpy(key, sizeof(key), fields[1]);
             ask = 0;
             break;
           }
@@ -561,7 +561,7 @@ char *smime_get_field_from_db (char *mailbox, char *query, short public,
         else {
           if (public)
             key_trust_level = *fields[4];
-          strfcpy (key, fields[1], sizeof (key));
+          m_strcpy(key, sizeof(key), fields[1]);
         }
         found = 1;
       }
@@ -575,15 +575,15 @@ char *smime_get_field_from_db (char *mailbox, char *query, short public,
 
         /* query = label: return certificate. */
         if (numFields >= 3 &&
-            !(str_ncasecmp (query, fields[2], query_len))) {
+            !(m_strncasecmp(query, fields[2], query_len))) {
           ask = 0;
-          strfcpy (key, fields[1], sizeof (key));
+          m_strcpy(key, sizeof(key), fields[1]);
         }
         /* query = certificate: return intermediate certificate. */
         else if (numFields >= 4 &&
-                 !(str_ncasecmp (query, fields[1], query_len))) {
+                 !(m_strncasecmp(query, fields[1], query_len))) {
           ask = 0;
-          strfcpy (key, fields[3], sizeof (key));
+          m_strcpy(key, sizeof(key), fields[3]);
         }
       }
 
@@ -650,7 +650,7 @@ void _smime_getkeys (char *mailbox)
   if (k) {
     /* the key used last time. */
     if (*SmimeKeyToUse &&
-        !str_casecmp (k, SmimeKeyToUse + m_strlen(SmimeKeys) + 1)) {
+        !m_strcasecmp(k, SmimeKeyToUse + m_strlen(SmimeKeys) + 1)) {
       p_delete(&k);
       return;
     }
@@ -663,7 +663,7 @@ void _smime_getkeys (char *mailbox)
     snprintf (SmimeCertToUse, sizeof (SmimeCertToUse), "%s/%s",
               NONULL (SmimeCertificates), k);
 
-    if (str_casecmp (k, SmimeDefaultKey))
+    if (m_strcasecmp(k, SmimeDefaultKey))
       smime_void_passphrase ();
 
     p_delete(&k);
@@ -671,7 +671,7 @@ void _smime_getkeys (char *mailbox)
   }
 
   if (*SmimeKeyToUse) {
-    if (!str_casecmp (SmimeDefaultKey,
+    if (!m_strcasecmp(SmimeDefaultKey,
                           SmimeKeyToUse + m_strlen(SmimeKeys) + 1))
       return;
 
@@ -835,7 +835,7 @@ static int smime_handle_cert_email (char *certificate, char *mailbox,
 
   while ((fgets (email, sizeof (email), fpout))) {
     *(email + m_strlen(email) - 1) = '\0';
-    if (str_ncasecmp (email, mailbox, m_strlen(mailbox)) == 0)
+    if (m_strncasecmp(email, mailbox, m_strlen(mailbox)) == 0)
       ret = 1;
 
     ret = ret < 0 ? 0 : ret;
@@ -1565,7 +1565,7 @@ int smime_verify_one (BODY * sigbdy, STATE * s, const char *tempfile)
       rewind (smimeerr);
 
       line = mutt_read_line (line, &linelen, smimeerr, &lineno);
-      if (linelen && !str_casecmp (line, "verification successful"))
+      if (linelen && !m_strcasecmp(line, "verification successful"))
         badsig = 0;
 
       p_delete(&line);
@@ -1779,7 +1779,7 @@ static BODY *smime_handle_entity (BODY * m, STATE * s, FILE * outFile)
     rewind (smimeerr);
 
     line = mutt_read_line (line, &linelen, smimeerr, &lineno);
-    if (linelen && !str_casecmp (line, "verification successful"))
+    if (linelen && !m_strcasecmp(line, "verification successful"))
       m->goodsig = 1;
     p_delete(&line);
   }