LINES - 1 is the status bar, living on stdscr.
authorPierre Habouzit <madcoder@debian.org>
Wed, 7 Nov 2007 23:07:02 +0000 (00:07 +0100)
committerPierre Habouzit <madcoder@debian.org>
Wed, 7 Nov 2007 23:07:02 +0000 (00:07 +0100)
s/main_w/stdscr/ for thoseā€¦ that's probably why I don't see some errors doh

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
commands.c
compose.c
flags.c
init.c
lib-ui/curs_main.c
lib-ui/layout.c
lib-ui/menu.c
muttlib.c
recvattach.c
recvcmd.c

index 7f64816..7dcb21b 100644 (file)
@@ -220,12 +220,12 @@ void ci_bounce_message (HEADER * h, int *redraw)
 
   if (query_quadoption (OPT_BOUNCE, prompt) != M_YES) {
     address_list_wipe(&adr);
 
   if (query_quadoption (OPT_BOUNCE, prompt) != M_YES) {
     address_list_wipe(&adr);
-    CLEARLINE(main_w, LINES - 1);
+    CLEARLINE(stdscr, LINES - 1);
     mutt_message (h ? _("Message not bounced.") : _("Messages not bounced."));
     return;
   }
 
     mutt_message (h ? _("Message not bounced.") : _("Messages not bounced."));
     return;
   }
 
-  CLEARLINE(main_w, LINES - 1);
+  CLEARLINE(stdscr, LINES - 1);
 
   rc = mutt_bounce_message (NULL, h, adr);
   address_list_wipe(&adr);
 
   rc = mutt_bounce_message (NULL, h, adr);
   address_list_wipe(&adr);
@@ -454,7 +454,7 @@ void mutt_shell_escape (void)
     if (!buf[0])
       m_strcpy(buf, sizeof(buf), mod_core.shell);
     if (buf[0]) {
     if (!buf[0])
       m_strcpy(buf, sizeof(buf), mod_core.shell);
     if (buf[0]) {
-      CLEARLINE(main_w, LINES - 1);
+      CLEARLINE(stdscr, LINES - 1);
       mutt_endwin (NULL);
       fflush (stdout);
       if (mutt_system (buf) != 0 || option (OPTWAITKEY))
       mutt_endwin (NULL);
       fflush (stdout);
       if (mutt_system (buf) != 0 || option (OPTWAITKEY))
index 70738d5..cb245dc 100644 (file)
--- a/compose.c
+++ b/compose.c
@@ -846,7 +846,7 @@ int mutt_compose_menu (HEADER * msg,    /* structure for new message */
         int itype;
         FILE *fp;
 
         int itype;
         FILE *fp;
 
-        CLEARLINE(main_w, LINES - 1);
+        CLEARLINE(stdscr, LINES - 1);
         fname[0] = 0;
         if (mutt_get_field (_("New file: "), fname, sizeof (fname), M_FILE)
             != 0 || !fname[0])
         fname[0] = 0;
         if (mutt_get_field (_("New file: "), fname, sizeof (fname), M_FILE)
             != 0 || !fname[0])
diff --git a/flags.c b/flags.c
index aca2dcf..137c789 100644 (file)
--- a/flags.c
+++ b/flags.c
@@ -331,17 +331,17 @@ int mutt_change_flag(HEADER * h, int bf)
 
     int c;
 
 
     int c;
 
-    mvwprintw(main_w, LINES - 1, 0, "%s? (D/N/O/r/*/!): ",
+    mvwprintw(stdscr, LINES - 1, 0, "%s? (D/N/O/r/*/!): ",
              bf ? _("Set flag") : _("Clear flag"));
              bf ? _("Set flag") : _("Clear flag"));
-    wclrtoeol(main_w);
+    wclrtoeol(stdscr);
 
     c = mutt_getch().ch;
     if (c == -1) {
 
     c = mutt_getch().ch;
     if (c == -1) {
-        CLEARLINE(main_w, LINES - 1);
+        CLEARLINE(stdscr, LINES - 1);
         return (-1);
     }
 
         return (-1);
     }
 
-    CLEARLINE(main_w, LINES - 1);
+    CLEARLINE(stdscr, LINES - 1);
 
     if (c < 0 || c > countof(actions) || !actions[c]) {
         BEEP();
 
     if (c < 0 || c > countof(actions) || !actions[c]) {
         BEEP();
diff --git a/init.c b/init.c
index aac359d..ce05070 100644 (file)
--- a/init.c
+++ b/init.c
@@ -434,7 +434,7 @@ int query_quadoption2(int v, const char *prompt)
 
   default:
     v = mutt_yesorno(prompt, (v == M_ASKYES));
 
   default:
     v = mutt_yesorno(prompt, (v == M_ASKYES));
-    CLEARLINE(main_w, LINES - 1);
+    CLEARLINE(stdscr, LINES - 1);
     return (v);
   }
 }
     return (v);
   }
 }
@@ -450,7 +450,7 @@ int query_quadoption (int opt, const char *prompt)
 
   default:
     v = mutt_yesorno (prompt, (v == M_ASKYES));
 
   default:
     v = mutt_yesorno (prompt, (v == M_ASKYES));
-    CLEARLINE(main_w, LINES - 1);
+    CLEARLINE(stdscr, LINES - 1);
     return (v);
   }
 
     return (v);
   }
 
index 6fdbc16..e80d302 100644 (file)
@@ -549,13 +549,13 @@ int mutt_index_menu (void)
         tag = 1;
 
         /* give visual indication that the next command is a tag- command */
         tag = 1;
 
         /* give visual indication that the next command is a tag- command */
-        mvwaddstr (main_w, LINES - 1, 0, "tag-");
-        wclrtoeol (main_w);
+        mvwaddstr (stdscr, LINES - 1, 0, "tag-");
+        wclrtoeol (stdscr);
 
         /* get the real command */
         if ((op = km_dokey (MENU_MAIN)) == OP_TAG_PREFIX) {
           /* abort tag sequence */
 
         /* get the real command */
         if ((op = km_dokey (MENU_MAIN)) == OP_TAG_PREFIX) {
           /* abort tag sequence */
-          CLEARLINE(main_w, LINES - 1);
+          CLEARLINE(stdscr, LINES - 1);
           continue;
         }
       }
           continue;
         }
       }
@@ -584,13 +584,13 @@ int mutt_index_menu (void)
         tag = 1;
 
         /* give visual indication that the next command is a tag- command */
         tag = 1;
 
         /* give visual indication that the next command is a tag- command */
-        mvwaddstr (main_w, LINES - 1, 0, "tag-");
-        wclrtoeol (main_w);
+        mvwaddstr (stdscr, LINES - 1, 0, "tag-");
+        wclrtoeol (stdscr);
 
         /* get the real command */
         if ((op = km_dokey (MENU_MAIN)) == OP_TAG_PREFIX) {
           /* abort tag sequence */
 
         /* get the real command */
         if ((op = km_dokey (MENU_MAIN)) == OP_TAG_PREFIX) {
           /* abort tag sequence */
-          CLEARLINE(main_w, LINES - 1);
+          CLEARLINE(stdscr, LINES - 1);
           continue;
         }
       }
           continue;
         }
       }
index d8e09a4..5dfdb62 100644 (file)
@@ -59,7 +59,7 @@ void mutt_refresh(void)
 void mutt_endwin(const char *msg)
 {
     if (!option(OPTNOCURSES)) {
 void mutt_endwin(const char *msg)
 {
     if (!option(OPTNOCURSES)) {
-        CLEARLINE(main_w, LINES - 1);
+        CLEARLINE(stdscr, LINES - 1);
 
         if (sidebar_w) {
             delwin(sidebar_w);
 
         if (sidebar_w) {
             delwin(sidebar_w);
index 4c2bf1e..7015ca1 100644 (file)
@@ -239,9 +239,9 @@ static void menu_redraw_prompt (MUTTMENU * menu)
     if (*Errorbuf)
       mutt_clear_error ();
 
     if (*Errorbuf)
       mutt_clear_error ();
 
-    SETCOLOR(main_w, MT_COLOR_NORMAL);
-    mvwaddstr (main_w, LINES - 1, 0, menu->prompt);
-    wclrtoeol (main_w);
+    SETCOLOR(stdscr, MT_COLOR_NORMAL);
+    mvwaddstr(stdscr, LINES - 1, 0, menu->prompt);
+    wclrtoeol(stdscr);
   }
 }
 
   }
 }
 
@@ -682,11 +682,11 @@ int mutt_menuLoop (MUTTMENU * menu)
     i = km_dokey (menu->menu);
     if (i == OP_TAG_PREFIX || i == OP_TAG_PREFIX_COND) {
       if (menu->tagged) {
     i = km_dokey (menu->menu);
     if (i == OP_TAG_PREFIX || i == OP_TAG_PREFIX_COND) {
       if (menu->tagged) {
-        mvwaddstr (main_w, LINES - 1, 0, "Tag-");
-        wclrtoeol (main_w);
+        mvwaddstr(stdscr, LINES - 1, 0, "Tag-");
+        wclrtoeol(stdscr);
         i = km_dokey (menu->menu);
         menu->tagprefix = 1;
         i = km_dokey (menu->menu);
         menu->tagprefix = 1;
-        CLEARLINE(main_w, LINES - 1);
+        CLEARLINE(stdscr, LINES - 1);
       }
       else if (i == OP_TAG_PREFIX) {
         mutt_error _("No tagged entries.");
       }
       else if (i == OP_TAG_PREFIX) {
         mutt_error _("No tagged entries.");
index 338cb01..79fc2c5 100644 (file)
--- a/muttlib.c
+++ b/muttlib.c
@@ -350,7 +350,7 @@ int mutt_save_confirm (const char *s, struct stat *st)
     }
   }
 
     }
   }
 
-  CLEARLINE(main_w, LINES - 1);
+  CLEARLINE(stdscr, LINES - 1);
   return (ret);
 }
 
   return (ret);
 }
 
index ac2861d..518cb59 100644 (file)
@@ -484,7 +484,7 @@ mutt_query_pipe_attachment(char *command, FILE * fp, BODY * body, int afilter)
              _("WARNING!  You are about to overwrite %s, continue?"),
              body->filename);
     if (mutt_yesorno (warning, M_NO) != M_YES) {
              _("WARNING!  You are about to overwrite %s, continue?"),
              body->filename);
     if (mutt_yesorno (warning, M_NO) != M_YES) {
-      CLEARLINE(main_w, LINES - 1);
+      CLEARLINE(stdscr, LINES - 1);
       return;
     }
     tempfd = m_tempfd(tfile, sizeof(tfile), NONULL(mod_core.tmpdir), NULL);
       return;
     }
     tempfd = m_tempfd(tfile, sizeof(tfile), NONULL(mod_core.tmpdir), NULL);
index 15858e2..b31fa8a 100644 (file)
--- a/recvcmd.c
+++ b/recvcmd.c
@@ -161,12 +161,12 @@ void mutt_attach_bounce (FILE * fp, HEADER * hdr __attribute__ ((unused)),
 
   if (query_quadoption (OPT_BOUNCE, prompt) != M_YES) {
     address_list_wipe(&adr);
 
   if (query_quadoption (OPT_BOUNCE, prompt) != M_YES) {
     address_list_wipe(&adr);
-    CLEARLINE(main_w, LINES - 1);
+    CLEARLINE(stdscr, LINES - 1);
     mutt_message (p ? _("Message not bounced.") : _("Messages not bounced."));
     return;
   }
 
     mutt_message (p ? _("Message not bounced.") : _("Messages not bounced."));
     return;
   }
 
-  CLEARLINE(main_w, LINES - 1);
+  CLEARLINE(stdscr, LINES - 1);
 
   if (cur)
     ret = mutt_bounce_message (fp, cur->hdr, adr);
 
   if (cur)
     ret = mutt_bounce_message (fp, cur->hdr, adr);