]> granicus.if.org Git - neomutt/commitdiff
Replace various instances of endwin() by mutt_endwin(). This should
authorThomas Roessler <roessler@does-not-exist.org>
Thu, 8 Feb 2001 15:50:51 +0000 (15:50 +0000)
committerThomas Roessler <roessler@does-not-exist.org>
Thu, 8 Feb 2001 15:50:51 +0000 (15:50 +0000)
help to avoid chaotic screen output on the "second" screen.

attach.c
commands.c
curs_lib.c
muttlib.c
pgp.c
recvattach.c
remailer.c

index 1939f45aa2a9bc0ec064ee45104219e5a27a4fe2..1a76cf001276229f04b76cc860f644f6194587d2 100644 (file)
--- a/attach.c
+++ b/attach.c
@@ -126,7 +126,7 @@ int mutt_compose_attachment (BODY *a)
       {
        int r;
 
-       endwin ();
+       mutt_endwin (NULL);
        if ((r = mutt_system (command)) == -1)
          mutt_error (_("Error running \"%s\"!"), command);
        
@@ -251,7 +251,7 @@ int mutt_edit_attachment (BODY *a)
       }
       else
       {
-       endwin ();
+       mutt_endwin (NULL);
        if (mutt_system (command) == -1)
          mutt_error (_("Error running \"%s\"!"), command);
       }
@@ -471,7 +471,7 @@ int mutt_view_attachment (FILE *fp, BODY *a, int flag, HEADER *hdr,
     int tempfd = -1, pagerfd = -1;
     
     if (!use_pager)
-      endwin ();
+      mutt_endwin (NULL);
 
     if (use_pager || use_pipe)
     {
@@ -608,7 +608,7 @@ int mutt_pipe_attachment (FILE *fp, BODY *b, const char *path, char *outfile)
       return 0;
     }
 
-  endwin ();
+  mutt_endwin (NULL);
 
   if (fp)
   {
@@ -905,7 +905,7 @@ int mutt_print_attachment (FILE *fp, BODY *a)
     strfcpy (command, entry->printcommand, sizeof (command));
     piped = rfc1524_expand_command (a, newfile, type, command, sizeof (command));
 
-    endwin ();
+    mutt_endwin (NULL);
 
     /* interactive program */
     if (piped)
@@ -955,7 +955,7 @@ int mutt_print_attachment (FILE *fp, BODY *a)
     {
       if ((ifp = fopen (newfile, "r")) != NULL)
       {
-       endwin ();
+       mutt_endwin (NULL);
        thepid = mutt_create_filter (NONULL(PrintCmd), &fpout, NULL, NULL);
        mutt_copy_stream (ifp, fpout);
        fclose (ifp);
index 1eaabd3607f2808e90837750626365d8b02d150e..f2ee3e4524a64285c1f3cc09036e624ec2b4c843 100644 (file)
@@ -118,7 +118,7 @@ int mutt_display_message (HEADER *cur)
   {
     fpfilterout = fpout;
     fpout = NULL;
-    /* endwin (); */
+    /* mutt_endwin (NULL); */
     filterpid = mutt_create_filter_fd (DisplayFilter, &fpout, NULL, NULL,
                                       -1, fileno(fpfilterout), -1);
     if (filterpid < 0)
@@ -179,7 +179,7 @@ int mutt_display_message (HEADER *cur)
   {
     int r;
 
-    endwin ();
+    mutt_endwin (NULL);
     snprintf (buf, sizeof (buf), "%s %s", NONULL(Pager), tempfile);
     if ((r = mutt_system (buf)) == -1)
       mutt_error (_("Error running \"%s\"!"), buf);
@@ -308,7 +308,7 @@ static int _mutt_pipe_message (HEADER *h, char *cmd,
   pid_t thepid;
   FILE *fpout;
   
-  endwin ();
+  mutt_endwin (NULL);
   if (h)
   {
 
@@ -321,7 +321,7 @@ static int _mutt_pipe_message (HEADER *h, char *cmd,
       if(h->pgp & PGPENCRYPT && !pgp_valid_passphrase())
        return 1;
     }
-    endwin ();
+    mutt_endwin (NULL);
 #endif
 
     thepid = mutt_create_filter (cmd, &fpout, NULL, NULL);
@@ -357,7 +357,7 @@ static int _mutt_pipe_message (HEADER *h, char *cmd,
         if (Context->hdrs[Context->v2r[i]]->tagged)
         {
          mutt_message_hook (Context, Context->hdrs[Context->v2r[i]], M_MESSAGEHOOK);
-         endwin ();
+         mutt_endwin (NULL);
          thepid = mutt_create_filter (cmd, &fpout, NULL, NULL);
           pipe_msg (Context->hdrs[Context->v2r[i]], fpout, decode);
           /* add the message separator */
@@ -370,7 +370,7 @@ static int _mutt_pipe_message (HEADER *h, char *cmd,
     }
     else
     {
-      endwin ();
+      mutt_endwin (NULL);
       thepid = mutt_create_filter (cmd, &fpout, NULL, NULL);
       for (i = 0; i < Context->vcount; i++)
       {
@@ -501,7 +501,7 @@ void mutt_shell_escape (void)
     if(buf[0])
     {
       CLEARLINE (LINES-1);
-      endwin ();
+      mutt_endwin (NULL);
       fflush (stdout);
       if (mutt_system (buf) != 0 || option (OPTWAITKEY))
        mutt_any_key_to_continue (NULL);
index ccbb084822cfcd5a58afc8ff8e88949968569e18..347570eb01ab5b3547d2d31e7c1d1e28b37b5241 100644 (file)
@@ -139,7 +139,7 @@ void mutt_edit_file (const char *editor, const char *data)
 {
   char cmd[LONG_STRING];
   
-  endwin ();
+  mutt_endwin (NULL);
   mutt_expand_file_fmt (cmd, sizeof (cmd), editor, data);
   if (mutt_system (cmd) == -1)
     mutt_error (_("Error running \"%s\"!"), cmd);
@@ -367,7 +367,7 @@ int mutt_do_pager (const char *banner,
   {
     char cmd[STRING];
     
-    endwin ();
+    mutt_endwin (NULL);
     mutt_expand_file_fmt (cmd, sizeof(cmd), Pager, tempfile);
     if (mutt_system (cmd) == -1)
     {
index 8ab0b4fe9f13a6355d3e09863a4b8dfbe40768cf..42f8415b2a746060362233ed57e76716d569ade3 100644 (file)
--- a/muttlib.c
+++ b/muttlib.c
@@ -1084,7 +1084,7 @@ FILE *mutt_open_read (const char *path, pid_t *thepid)
     char *s = safe_strdup (path);
 
     s[len - 1] = 0;
-    endwin ();
+    mutt_endwin (NULL);
     *thepid = mutt_create_filter (s, NULL, &f, NULL);
     safe_free ((void **) &s);
   }
diff --git a/pgp.c b/pgp.c
index dc5debdd7f87d95e327f5ca346869f1c40fd8d55..f45f1a6678379570c774de8dff72d6f077274c36 100644 (file)
--- a/pgp.c
+++ b/pgp.c
@@ -773,7 +773,7 @@ void pgp_extract_keys_from_messages (HEADER *h)
   }
       
   fclose (fpout);
-  endwin ();
+  mutt_endwin (NULL);
   pgp_invoke_import (tempfname);
   mutt_any_key_to_continue (NULL);
 
@@ -820,7 +820,7 @@ void pgp_extract_keys_from_attachment_list (FILE *fp, int tag, BODY *top)
     return;
   }
 
-  endwin();
+  mutt_endwin (NULL);
   set_option(OPTDONTHANDLEPGPKEYS);
   
   for(; top; top = top->next)
@@ -1566,7 +1566,7 @@ int pgp_protect (HEADER *msg, char *pgpkeylist)
   mutt_message _("Invoking PGP...");
 
   if (!isendwin ())
-    endwin ();
+    mutt_endwin (NULL);
 
   if (traditional)
   {
index a055d5af22ce2e73273f0ea33538427040281412..a1de0ddad585e7bfcb8a695e44a544563dd7a862 100644 (file)
@@ -577,7 +577,7 @@ void mutt_pipe_attachment_list (FILE *fp, int tag, BODY *top, int filter)
 
   if (!filter && !option (OPTATTACHSPLIT))
   {
-    endwin ();
+    mutt_endwin (NULL);
     thepid = mutt_create_filter (buf, &state.fpout, NULL, NULL);
     pipe_attachment_list (buf, fp, tag, top, filter, &state);
     fclose (state.fpout);
@@ -676,7 +676,7 @@ void mutt_print_attachment_list (FILE *fp, int tag, BODY *top)
   {
     if (!can_print (top, tag))
       return;
-    endwin ();
+    mutt_endwin (NULL);
     memset (&state, 0, sizeof (STATE));
     thepid = mutt_create_filter (NONULL (PrintCmd), &state.fpout, NULL, NULL);
     print_attachment_list (fp, tag, top, &state);
index 543b2d78f1d9a6bf60f5be221b89e369907f1a57..3077ea221f8783452fcf39e9cc5538b1487eaa69 100644 (file)
@@ -758,7 +758,7 @@ int mix_send_message (LIST *chain, const char *tempfile)
   }
   
   if (!option (OPTNOCURSES))
-    endwin ();
+    mutt_endwin (NULL);
   
   if ((i = mutt_system (cmd)))
   {