]> granicus.if.org Git - neomutt/commitdiff
sort out mkstemp error messages
authorRichard Russon <rich@flatcap.org>
Thu, 19 Jul 2018 09:40:55 +0000 (10:40 +0100)
committerRichard Russon <rich@flatcap.org>
Thu, 19 Jul 2018 09:56:47 +0000 (10:56 +0100)
imap/message.c
mutt/history.c
ncrypt/crypt_gpgme.c
ncrypt/pgp.c
ncrypt/pgpmicalg.c
ncrypt/smime.c
nntp/nntp.c
pattern.c
pop/pop.c

index 41898e21a0d03c12148080277f2fa378546fb4da..730a275a1948b4c6db36b84f5839ed8f03ad23de 100644 (file)
@@ -654,7 +654,7 @@ int imap_read_headers(struct ImapData *idata, unsigned int msn_begin, unsigned i
   FILE *fp = mutt_file_mkstemp();
   if (!fp)
   {
-    mutt_perror("mutt_file_mkstemp() failed!");
+    mutt_perror(_("Can't create temporary file"));
     goto error_out_0;
   }
 
index 49a89328ebb6dd1f259306889514ff39a664a954..04728be70d359186ab8707b63a1a50b681b0d0ae 100644 (file)
@@ -258,7 +258,7 @@ static void shrink_histfile(void)
     tmpfp = mutt_file_mkstemp();
     if (!tmpfp)
     {
-      mutt_perror("mutt_file_mkstemp() failed!");
+      mutt_perror(_("Can't create temporary file"));
       goto cleanup;
     }
     rewind(f);
index d46506fae3dde71b1432f2f409416f91689cf38a..30794741fec097483e130899c8d2aa716c2e2038 100644 (file)
@@ -1999,7 +1999,7 @@ int pgp_gpgme_decrypt_mime(FILE *fpin, FILE **fpout, struct Body *b, struct Body
     decoded_fp = mutt_file_mkstemp();
     if (!decoded_fp)
     {
-      mutt_perror("mutt_file_mkstemp() failed!");
+      mutt_perror(_("Can't create temporary file"));
       return -1;
     }
 
@@ -2019,7 +2019,7 @@ int pgp_gpgme_decrypt_mime(FILE *fpin, FILE **fpout, struct Body *b, struct Body
   *fpout = mutt_file_mkstemp();
   if (!*fpout)
   {
-    mutt_perror("mutt_file_mkstemp() failed!");
+    mutt_perror(_("Can't create temporary file"));
     rc = -1;
     goto bail;
   }
@@ -2072,7 +2072,7 @@ int smime_gpgme_decrypt_mime(FILE *fpin, FILE **fpout, struct Body *b, struct Bo
   FILE *tmpfp = mutt_file_mkstemp();
   if (!tmpfp)
   {
-    mutt_perror("mutt_file_mkstemp() failed!");
+    mutt_perror(_("Can't create temporary file"));
     return -1;
   }
 
@@ -2089,7 +2089,7 @@ int smime_gpgme_decrypt_mime(FILE *fpin, FILE **fpout, struct Body *b, struct Bo
   *fpout = mutt_file_mkstemp();
   if (!*fpout)
   {
-    mutt_perror("mutt_file_mkstemp() failed!");
+    mutt_perror(_("Can't create temporary file"));
     return -1;
   }
 
@@ -2124,7 +2124,7 @@ int smime_gpgme_decrypt_mime(FILE *fpin, FILE **fpout, struct Body *b, struct Bo
     FILE *tmpfp2 = mutt_file_mkstemp();
     if (!tmpfp2)
     {
-      mutt_perror("mutt_file_mkstemp() failed!");
+      mutt_perror(_("Can't create temporary file"));
       return -1;
     }
 
@@ -2142,7 +2142,7 @@ int smime_gpgme_decrypt_mime(FILE *fpin, FILE **fpout, struct Body *b, struct Bo
     *fpout = mutt_file_mkstemp();
     if (!*fpout)
     {
-      mutt_perror("mutt_file_mkstemp() failed!");
+      mutt_perror(_("Can't create temporary file"));
       return -1;
     }
 
@@ -2222,7 +2222,7 @@ static int pgp_gpgme_extract_keys(gpgme_data_t keydata, FILE **fp, int dryrun)
   *fp = mutt_file_mkstemp();
   if (!*fp)
   {
-    mutt_perror("mutt_file_mkstemp() failed!");
+    mutt_perror(_("Can't create temporary file"));
     goto err_tmpdir;
   }
 
@@ -2742,7 +2742,7 @@ int pgp_gpgme_encrypted_handler(struct Body *a, struct State *s)
   FILE *fpout = mutt_file_mkstemp();
   if (!fpout)
   {
-    mutt_perror("mutt_file_mkstemp() failed!");
+    mutt_perror(_("Can't create temporary file"));
     if (s->flags & MUTT_DISPLAY)
     {
       state_attach_puts(_("[-- Error: could not create temporary file! "
@@ -2818,7 +2818,7 @@ int smime_gpgme_application_handler(struct Body *a, struct State *s)
   FILE *fpout = mutt_file_mkstemp();
   if (!fpout)
   {
-    mutt_perror("mutt_file_mkstemp() failed!");
+    mutt_perror(_("Can't create temporary file"));
     if (s->flags & MUTT_DISPLAY)
     {
       state_attach_puts(_("[-- Error: could not create temporary file! "
index 7613abf7ecc6a62ce9a359e1c753adb21fa9078d..375beeb977f8dbde7b6f8324ce55f85a3e46a8a5 100644 (file)
@@ -536,7 +536,7 @@ int pgp_class_application_handler(struct Body *m, struct State *s)
         pgpout = mutt_file_mkstemp();
         if (!pgpout)
         {
-          mutt_perror("mutt_file_mkstemp() failed!");
+          mutt_perror(_("Can't create temporary file"));
           rc = -1;
           goto out;
         }
@@ -544,7 +544,7 @@ int pgp_class_application_handler(struct Body *m, struct State *s)
         pgperr = mutt_file_mkstemp();
         if (!pgperr)
         {
-          mutt_perror("mutt_file_mkstemp() failed!");
+          mutt_perror(_("Can't create temporary file"));
           rc = -1;
           goto out;
         }
@@ -840,7 +840,7 @@ int pgp_class_verify_one(struct Body *sigbdy, struct State *s, const char *tempf
   FILE *pgperr = mutt_file_mkstemp();
   if (!pgperr)
   {
-    mutt_perror("mutt_file_mkstemp() failed!");
+    mutt_perror(_("Can't create temporary file"));
     unlink(sigfile);
     return -1;
   }
@@ -944,7 +944,7 @@ static struct Body *pgp_decrypt_part(struct Body *a, struct State *s,
   FILE *pgperr = mutt_file_mkstemp();
   if (!pgperr)
   {
-    mutt_perror("mutt_file_mkstemp() failed!");
+    mutt_perror(_("Can't create temporary file"));
     return NULL;
   }
 
@@ -1086,7 +1086,7 @@ int pgp_class_decrypt_mime(FILE *fpin, FILE **fpout, struct Body *b, struct Body
     decoded_fp = mutt_file_mkstemp();
     if (!decoded_fp)
     {
-      mutt_perror("mutt_file_mkstemp() failed!");
+      mutt_perror(_("Can't create temporary file"));
       return -1;
     }
 
@@ -1106,7 +1106,7 @@ int pgp_class_decrypt_mime(FILE *fpin, FILE **fpout, struct Body *b, struct Body
   *fpout = mutt_file_mkstemp();
   if (!*fpout)
   {
-    mutt_perror("mutt_file_mkstemp() failed!");
+    mutt_perror(_("Can't create temporary file"));
     rc = -1;
     goto bail;
   }
@@ -1140,7 +1140,7 @@ int pgp_class_encrypted_handler(struct Body *a, struct State *s)
   FILE *fpout = mutt_file_mkstemp();
   if (!fpout)
   {
-    mutt_perror("mutt_file_mkstemp() failed!");
+    mutt_perror(_("Can't create temporary file"));
     if (s->flags & MUTT_DISPLAY)
       state_attach_puts(_("[-- Error: could not create temporary file! --]\n"), s);
     return -1;
@@ -1470,7 +1470,7 @@ struct Body *pgp_class_encrypt_message(struct Body *a, char *keylist, bool sign)
   FILE *pgperr = mutt_file_mkstemp();
   if (!pgperr)
   {
-    mutt_perror("mutt_file_mkstemp() failed!");
+    mutt_perror(_("Can't create temporary file"));
     unlink(tempfile);
     mutt_file_fclose(&fpout);
     return NULL;
@@ -1660,7 +1660,7 @@ struct Body *pgp_class_traditional_encryptsign(struct Body *a, int flags, char *
   FILE *pgperr = mutt_file_mkstemp();
   if (!pgpout || !pgperr)
   {
-    mutt_perror(pgpout ? "mutt_file_mkstemp() failed!" : pgpoutfile);
+    mutt_perror(pgpout ? "Can't create temporary file" : pgpoutfile);
     unlink(pgpinfile);
     if (pgpout)
     {
index 28244979845fd7a12f3158fb5613ea4c9e60779b..57d5abd79882d2f84750504d7ee0ab3a7964cb19 100644 (file)
@@ -161,7 +161,7 @@ static short pgp_find_hash(const char *fname)
   FILE *out = mutt_file_mkstemp();
   if (!out)
   {
-    mutt_perror("mutt_file_mkstemp() failed!");
+    mutt_perror(_("Can't create temporary file"));
     goto bye;
   }
 
index 12668a70020455bc2db51c56a0adb001fa91fa0a..7f50fde217ae926bc0615379610ce91d33597ef8 100644 (file)
@@ -1020,7 +1020,7 @@ static int smime_handle_cert_email(char *certificate, char *mailbox, int copy,
   FILE *fperr = mutt_file_mkstemp();
   if (!fperr)
   {
-    mutt_perror("mutt_file_mkstemp() failed!");
+    mutt_perror(_("Can't create temporary file"));
     return 1;
   }
 
@@ -1028,7 +1028,7 @@ static int smime_handle_cert_email(char *certificate, char *mailbox, int copy,
   if (!fpout)
   {
     mutt_file_fclose(&fperr);
-    mutt_perror("mutt_file_mkstemp() failed!");
+    mutt_perror(_("Can't create temporary file"));
     return 1;
   }
 
@@ -1108,7 +1108,7 @@ static char *smime_extract_certificate(char *infile)
   FILE *fperr = mutt_file_mkstemp();
   if (!fperr)
   {
-    mutt_perror("mutt_file_mkstemp() failed");
+    mutt_perror(_("Can't create temporary file"));
     return NULL;
   }
 
@@ -1210,7 +1210,7 @@ static char *smime_extract_signer_certificate(char *infile)
   FILE *fperr = mutt_file_mkstemp();
   if (!fperr)
   {
-    mutt_perror("mutt_file_mkstemp() failed!");
+    mutt_perror(_("Can't create temporary file"));
     return NULL;
   }
 
@@ -1271,7 +1271,7 @@ void smime_class_invoke_import(char *infile, char *mailbox)
   FILE *fperr = mutt_file_mkstemp();
   if (!fperr)
   {
-    mutt_perror("mutt_file_mkstemp() failed!");
+    mutt_perror(_("Can't create temporary file"));
     return;
   }
 
@@ -1279,7 +1279,7 @@ void smime_class_invoke_import(char *infile, char *mailbox)
   if (!fpout)
   {
     mutt_file_fclose(&fperr);
-    mutt_perror("mutt_file_mkstemp() failed!");
+    mutt_perror(_("Can't create temporary file"));
     return;
   }
 
@@ -1440,7 +1440,7 @@ struct Body *smime_class_build_smime_entity(struct Body *a, char *certlist)
   FILE *smimeerr = mutt_file_mkstemp();
   if (!smimeerr)
   {
-    mutt_perror("mutt_file_mkstemp() failed!");
+    mutt_perror(_("Can't create temporary file"));
     mutt_file_unlink(tempfile);
     mutt_file_fclose(&fpout);
     return NULL;
@@ -1784,7 +1784,7 @@ int smime_class_verify_one(struct Body *sigbdy, struct State *s, const char *tem
   FILE *smimeerr = mutt_file_mkstemp();
   if (!smimeerr)
   {
-    mutt_perror("mutt_file_mkstemp() failed!");
+    mutt_perror(_("Can't create temporary file"));
     mutt_file_unlink(signedfile);
     return -1;
   }
@@ -1860,14 +1860,14 @@ static struct Body *smime_handle_entity(struct Body *m, struct State *s, FILE *o
   FILE *smimeout = mutt_file_mkstemp();
   if (!smimeout)
   {
-    mutt_perror("mutt_file_mkstemp() failed!");
+    mutt_perror(_("Can't create temporary file"));
     return NULL;
   }
 
   FILE *smimeerr = mutt_file_mkstemp();
   if (!smimeerr)
   {
-    mutt_perror("mutt_file_mkstemp() failed!");
+    mutt_perror(_("Can't create temporary file"));
     mutt_file_fclose(&smimeout);
     return NULL;
   }
@@ -1969,7 +1969,7 @@ static struct Body *smime_handle_entity(struct Body *m, struct State *s, FILE *o
       fpout = mutt_file_mkstemp();
       if (!fpout)
       {
-        mutt_perror("mutt_file_mkstemp() failed!");
+        mutt_perror(_("Can't create temporary file"));
         mutt_file_fclose(&smimeout);
         mutt_file_fclose(&smimeerr);
         return NULL;
@@ -2069,7 +2069,7 @@ int smime_class_decrypt_mime(FILE *fpin, FILE **fpout, struct Body *b, struct Bo
   FILE *tmpfp = mutt_file_mkstemp();
   if (!tmpfp)
   {
-    mutt_perror("mutt_file_mkstemp() failed!");
+    mutt_perror(_("Can't create temporary file"));
     return -1;
   }
 
@@ -2085,7 +2085,7 @@ int smime_class_decrypt_mime(FILE *fpin, FILE **fpout, struct Body *b, struct Bo
   *fpout = mutt_file_mkstemp();
   if (!*fpout)
   {
-    mutt_perror("mutt_file_mkstemp() failed!");
+    mutt_perror(_("Can't create temporary file"));
     rc = -1;
     goto bail;
   }
index f8e744d926f78d7f18a421f213ea61f40ba86a7d..a9425c081304f84180fec0cb4b3eec2c28935d1c 100644 (file)
@@ -1417,7 +1417,7 @@ static int nntp_fetch_headers(struct Context *ctx, void *hc, anum_t first,
       FILE *fp = mutt_file_mkstemp();
       if (!fp)
       {
-        mutt_perror("mutt_file_mkstemp() failed!");
+        mutt_perror(_("Can't create temporary file"));
         rc = -1;
         break;
       }
@@ -2452,7 +2452,7 @@ int nntp_check_msgid(struct Context *ctx, const char *msgid)
   FILE *fp = mutt_file_mkstemp();
   if (!fp)
   {
-    mutt_perror("mutt_file_mkstemp() failed!");
+    mutt_perror(_("Can't create temporary file"));
     return -1;
   }
 
index 8dff75d42b548878ece55026fc4a792b801d160a..a9c044a3f956a075d74775d89f73394885dd70aa 100644 (file)
--- a/pattern.c
+++ b/pattern.c
@@ -998,7 +998,7 @@ static int msg_search(struct Context *ctx, struct Pattern *pat, int msgno)
     s.fpout = mutt_file_mkstemp();
     if (!s.fpout)
     {
-      mutt_perror("mutt_file_mkstemp() failed");
+      mutt_perror(_("Can't create temporary file"));
       return 0;
     }
 #endif
index 25d435aeb7cfee03d3203ab8df003060f8d2656b..ad9d4822df20753ceb709d5ea5fb4d4d0910b5a8 100644 (file)
--- a/pop/pop.c
+++ b/pop/pop.c
@@ -127,7 +127,7 @@ static int pop_read_header(struct PopData *pop_data, struct Header *h)
   FILE *f = mutt_file_mkstemp();
   if (!f)
   {
-    mutt_perror("mutt_file_mkstemp failed!");
+    mutt_perror(_("Can't create temporary file"));
     return -3;
   }