]> granicus.if.org Git - neomutt/commitdiff
Fix a bunch of cases where format parameters were missing from calls
authorThomas Roessler <roessler@does-not-exist.org>
Mon, 10 Jul 2000 10:34:56 +0000 (10:34 +0000)
committerThomas Roessler <roessler@does-not-exist.org>
Mon, 10 Jul 2000 10:34:56 +0000 (10:34 +0000)
to mutt_message and mutt_error.

browser.c
imap/command.c
imap/imap.c
imap/message.c
imap/socket.c
pgpkey.c
pop.c
query.c
remailer.c

index 9adee806afcc39705157093c64ee1663c6059a33..0e0c319cd924a5f471aef846fd3caeefc89f8d81 100644 (file)
--- a/browser.c
+++ b/browser.c
@@ -791,7 +791,7 @@ void _mutt_select_file (char *f, size_t flen, int buffy,
 
       case OP_BROWSER_TELL:
         if(state.entrylen)
-         mutt_message(state.entry[menu->current].name);
+         mutt_message("%s", state.entry[menu->current].name);
         break;
 
 #ifdef USE_IMAP
index 977636701b48e990c14ee36ff150d102858baadf..722b3973558be7a96dc6bda4bf20455b58dd804d 100644 (file)
@@ -150,7 +150,7 @@ int imap_exec (char* buf, size_t buflen, IMAP_DATA* idata, const char* cmd,
     pc = buf + SEQLEN;
     SKIPWS (pc);
     pc = imap_next_word (pc);
-    mutt_error (pc);
+    mutt_error ("%s", pc);
     sleep (1);
 
     return -1;
@@ -258,7 +258,7 @@ int imap_handle_untagged (IMAP_DATA *idata, char *s)
     /* server shut down our connection */
     s += 3;
     SKIPWS (s);
-    mutt_error (s);
+    mutt_error ("%s", s);
     idata->status = IMAP_BYE;
     if (idata->state == IMAP_SELECTED)
       mx_fastclose_mailbox (idata->selected_ctx);
@@ -270,7 +270,7 @@ int imap_handle_untagged (IMAP_DATA *idata, char *s)
   else if (option (OPTIMAPSERVERNOISE) && (mutt_strncasecmp ("NO", s, 2) == 0))
   {
     /* Display the warning message from the server */
-    mutt_error (s+3);
+    mutt_error ("%s", s+3);
     sleep (1);
   }
   else
index 7ca19053fd24a2f94e7fb55eed9a5d39d50772eb..b4015a1120a5a12c93ab9220567a09350b1257c3 100644 (file)
@@ -247,7 +247,7 @@ int imap_reopen_mailbox (CONTEXT *ctx, int *index_hint)
     char *s;
     s = imap_next_word (buf); /* skip seq */
     s = imap_next_word (s); /* Skip response */
-    mutt_error (s);
+    mutt_error ("%s", s);
     sleep (1);
     return -1;
   }
@@ -674,7 +674,7 @@ int imap_open_mailbox (CONTEXT *ctx)
     char *s;
     s = imap_next_word (buf); /* skip seq */
     s = imap_next_word (s); /* Skip response */
-    mutt_error (s);
+    mutt_error ("%s", s);
     idata->state = IMAP_AUTHENTICATED;
     sleep (1);
     return -1;
@@ -978,9 +978,7 @@ int imap_sync_mailbox (CONTEXT* ctx, int expunge, int *index_hint)
     /* if we have a message set, then let's delete */
     if (deleted)
     {
-      snprintf (tmp, sizeof (tmp), _("Marking %d messages deleted..."),
-        deleted);
-      mutt_message (tmp);
+      mutt_message (_("Marking %d messages deleted..."), deleted);
       snprintf (tmp, sizeof (tmp), "STORE %s +FLAGS.SILENT (\\Deleted)", buf);
       if (imap_exec (buf, sizeof (buf), CTX_DATA, tmp, 0) != 0)
         /* continue, let regular store try before giving up */
@@ -998,9 +996,7 @@ int imap_sync_mailbox (CONTEXT* ctx, int expunge, int *index_hint)
   {
     if (ctx->hdrs[n]->changed)
     {
-      snprintf (buf, sizeof (buf), _("Saving message status flags... [%d/%d]"),
-               n+1, ctx->msgcount);
-      mutt_message (buf);
+      mutt_message (_("Saving message status flags... [%d/%d]"), n+1, ctx->msgcount);
       
       flags[0] = '\0';
       
index c6b46b7f104be82264fecb7e5a23d7ae9bd3a856..bf332f7b5e9ae70e8f053dadc7311fca64a179be 100644 (file)
@@ -92,9 +92,8 @@ int imap_read_headers (CONTEXT *ctx, int msgbegin, int msgend)
   h0 = h;
   for (msgno = msgbegin; msgno <= msgend ; msgno++)
   {
-    snprintf (buf, sizeof (buf), _("Fetching message headers... [%d/%d]"), 
-      msgno + 1, msgend + 1);
-    mutt_message (buf);
+    mutt_message (_("Fetching message headers... [%d/%d]"), 
+                 msgno + 1, msgend + 1);
 
     if (msgno + 1 > fetchlast)
     {
@@ -525,7 +524,7 @@ int imap_append_message (CONTEXT *ctx, MESSAGE *msg)
     pc = buf + SEQLEN;
     SKIPWS (pc);
     pc = imap_next_word (pc);
-    mutt_error (pc);
+    mutt_error ("%s", pc);
     sleep (1);
     fclose (fp);
     return (-1);
@@ -568,7 +567,7 @@ int imap_append_message (CONTEXT *ctx, MESSAGE *msg)
     pc = buf + SEQLEN;
     SKIPWS (pc);
     pc = imap_next_word (pc);
-    mutt_error (pc);
+    mutt_error ("%s", pc);
     sleep (1);
     return (-1);
   }
index d06131565505ba3c2da1580833c7cadff2c34038..e752bcf13529073f97a3dd640a0894a6c8870e04 100644 (file)
@@ -160,10 +160,9 @@ void imap_logout_all (void)
   {
     if (conn->up)
     {
-      snprintf (buf, sizeof (buf), _("Closing connection to %s..."),
-        conn->mx.host);
-      mutt_message (buf);
-
+      mutt_message (_("Closing connection to %s..."),
+                   conn->mx.host);
+      
       imap_make_sequence (seq, sizeof (seq));
       snprintf (buf, sizeof (buf), "%s LOGOUT\r\n", seq);
 
index 7d769e3c4d6a8733fb184bd47e32bece29d897a5..df7a15c479d2a6b59bead2bab1302e6e359c4782 100644 (file)
--- a/pgpkey.c
+++ b/pgpkey.c
@@ -514,7 +514,7 @@ static pgp_key_t *pgp_select_key (pgp_key_t *keys,
 
     case OP_VIEW_ID:
 
-      mutt_message (KeyTable[menu->current]->addr);
+      mutt_message ("%s", KeyTable[menu->current]->addr);
       break;
 
     case OP_GENERIC_SELECT_ENTRY:
diff --git a/pop.c b/pop.c
index 6623fa86be9e7d3012c88234a61a8a9e303cc922..2dfe77dc2abc49fe8e1323a0e5c3e43e28509ef6 100644 (file)
--- a/pop.c
+++ b/pop.c
@@ -133,7 +133,7 @@ void mutt_fetchPopMail (void)
   if (mutt_strncmp (buffer, "+OK", 3) != 0)
   {
     mutt_remove_trailing_ws (buffer);
-    mutt_error (buffer);
+    mutt_error ("%s", buffer);
     goto finish;
   }
 
@@ -146,7 +146,7 @@ void mutt_fetchPopMail (void)
   if (mutt_strncmp (buffer, "+OK", 3) != 0)
   {
     mutt_remove_trailing_ws (buffer);
-    mutt_error (buffer);
+    mutt_error ("%s", buffer);
     goto finish;
   }
   
@@ -163,7 +163,7 @@ void mutt_fetchPopMail (void)
     
     safe_free((void **) &PopPass); /* void the given password */
     mutt_remove_trailing_ws (buffer);
-    mutt_error (buffer[0] ? buffer : _("Server closed connection!"));
+    mutt_error ("%s", buffer[0] ? buffer : _("Server closed connection!"));
     goto finish;
   }
   
@@ -176,7 +176,7 @@ void mutt_fetchPopMail (void)
   if (mutt_strncmp (buffer, "+OK", 3) != 0)
   {
     mutt_remove_trailing_ws (buffer);
-    mutt_error (buffer);
+    mutt_error ("%s", buffer);
     goto finish;
   }
   
@@ -208,10 +208,8 @@ void mutt_fetchPopMail (void)
   if (msgs - last)
     delanswer = query_quadoption(OPT_POPDELETE, _("Delete messages from server?"));
 
-  snprintf (msgbuf, sizeof (msgbuf),
-           msgs > 1 ? _("Reading new messages (%d bytes)...") :
+  mutt_message (msgs > 1 ? _("Reading new messages (%d bytes)...") :
                    _("Reading new message (%d bytes)..."), bytes);
-  mutt_message (msgbuf);
 
   for (i = last + 1 ; i <= msgs ; i++)
   {
@@ -227,7 +225,7 @@ void mutt_fetchPopMail (void)
     if (mutt_strncmp (buffer, "+OK", 3) != 0)
     {
       mutt_remove_trailing_ws (buffer);
-      mutt_error (buffer);
+      mutt_error ("%s", buffer);
       break;
     }
 
@@ -302,16 +300,16 @@ void mutt_fetchPopMail (void)
       {
        err = 1;
         mutt_remove_trailing_ws (buffer);
-       mutt_error (buffer);
+       mutt_error ("%s", buffer);
        break;
       }
     }
+    
+    if ( msgs > 1)
+      mutt_message (_("%s [%d of %d messages read]"), msgbuf, i, msgs);
+    else
+      mutt_message (_("%s [%d message read]"), msgbuf, msgs);
 
-       if ( msgs > 1)
-               mutt_message (_("%s [%d of %d messages read]"), msgbuf, i, msgs);
-       else
-               mutt_message (_("%s [%d message read]"), msgbuf, msgs);
-  
   }
 
   if (msg)
diff --git a/query.c b/query.c
index ad49746587b91dd828b27e3e8a254401e244add7..db8ce0fef6d0a4113c762c6dfa50d01830b2fed7 100644 (file)
--- a/query.c
+++ b/query.c
@@ -131,13 +131,12 @@ static QUERY *run_query (char *s, int quiet)
   if (mutt_wait_filter (thepid))
   {
     dprint (1, (debugfile, "Error: %s\n", msg));
-    if (!quiet)
-      mutt_error (msg);
+    if (!quiet)  mutt_error ("%s", msg);
   }
   else
   {
     if (!quiet)
-      mutt_message (msg);
+      mutt_message ("%s", msg);
   }
   
   return first;
index 657301660a413e8d42a6d9b7eab15ae09b9db415..c8f7176670c8f39518bc040cd21fb6752d7ba104 100644 (file)
@@ -595,11 +595,8 @@ void mix_make_chain (LIST **chainp, int *redraw)
        if (chain->cl && chain->ch[chain->cl - 1] && 
            (type2_list[chain->ch[chain->cl-1]]->caps & MIX_CAP_MIDDLEMAN))
        {
-         char buff[SHORT_STRING];
-         
-         snprintf (buff, sizeof (buff), _("Error: %s can't be used as the final remailer of a chain."),
+         mutt_error ( _("Error: %s can't be used as the final remailer of a chain."),
                    type2_list[chain->ch[chain->cl - 1]]->shortname);
-         mutt_error (buff);
        }
        else
        {
@@ -628,12 +625,8 @@ void mix_make_chain (LIST **chainp, int *redraw)
          c_redraw = 1;
        }
        else
-       {
-         char buff[SHORT_STRING];
-         snprintf (buff, sizeof (buff), _("Mixmaster chains are limited to %d elements."),
+         mutt_error ( _("Mixmaster chains are limited to %d elements."),
                    MAXMIXES);
-         mutt_error (buff);
-       }
        
        break;
       }