]> andersk Git - moira.git/blobdiff - clients/mailmaint/mailmaint.c
Switch from Imake-based build system to autoconf-based.
[moira.git] / clients / mailmaint / mailmaint.c
index 554b1a1c3a52bbc49e7de32504851b54635cdf58..5cbedefee1e2446fa7f3f448149a09b25386aa48 100644 (file)
@@ -14,7 +14,9 @@
 #include <moira_site.h>
 
 #include <ctype.h>
+#ifdef HAVE_CURSES
 #include <curses.h>
+#endif
 #include <pwd.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -167,33 +169,29 @@ int main(int argc, char *argv[])
       goto punt;
     }
 
-  if (use_menu)
+  initscr();
+  if ((LINES < 24) || (COLS < 60))
     {
-      initscr();
-      if ((LINES < 24) || (COLS < 60))
-       {
-         display_buff("Display window too small.\n\n");
-         sprintf(buf,
-                 "Current window parameters are (%d lines, %d columns)\n",
-                 LINES, COLS);
-         display_buff(buf);
-         display_buff("Please resize your window\n");
-         display_buff("to at least 24 lines and 60 columns.\n");
-         exit(0);
-       }
-      raw();
-      noecho();
-      old_hook = set_com_err_hook(menu_err_hook);
-      position[0] = oldpos[0] = 1;
-      level = 0;
-      pack_main_menu();
-      pack_help_menu();
-      display_menu(main_menu);
-      get_main_input();
-      cls();
-      endwin();
-      set_com_err_hook(old_hook);
+      display_buff("Display window too small.\n\n");
+      sprintf(buf, "Current window parameters are (%d lines, %d columns)\n",
+             LINES, COLS);
+      display_buff(buf);
+      display_buff("Please resize your window\n");
+      display_buff("to at least 24 lines and 60 columns.\n");
+      exit(0);
     }
+  raw();
+  noecho();
+  old_hook = set_com_err_hook(menu_err_hook);
+  position[0] = oldpos[0] = 1;
+  level = 0;
+  pack_main_menu();
+  pack_help_menu();
+  display_menu(main_menu);
+  get_main_input();
+  cls();
+  endwin();
+  set_com_err_hook(old_hook);
   exit(0);
 
 punt:
This page took 0.181902 seconds and 4 git commands to generate.