/* when running in curses mode, the scroll bar in most
authorNathan Bryant <loanshark@uncensored.citadel.org>
Wed, 13 Mar 2002 03:34:38 +0000 (03:34 +0000)
committerNathan Bryant <loanshark@uncensored.citadel.org>
Wed, 13 Mar 2002 03:34:38 +0000 (03:34 +0000)
   xterm-style programs becomes useless, so it makes sense to
   pause after a screenful of pages if the user has been idle
   for a while. However, this is annoying to some of the users
   who aren't in curses mode and tend to leave their clients
   idle. keepalives become disabled, resulting in getting booted
   when coming back to the idle session. but they probably have
   a working scrollback in their terminal, so disable it in this
   case:
 */
if (!is_curses_enabled())
lines_printed = 0;

citadel/ChangeLog
citadel/commands.c
citadel/screen.c
citadel/screen.h

index 0e36ff807349cef88cde705cfbdf6a4670ca2688..68a68579ead66d6268dd59a7931fc61ce87156d7 100644 (file)
@@ -1,4 +1,18 @@
  $Log$
+ Revision 590.150  2002/03/13 03:34:38  nbryant
+ /* when running in curses mode, the scroll bar in most
+    xterm-style programs becomes useless, so it makes sense to
+    pause after a screenful of pages if the user has been idle
+    for a while. However, this is annoying to some of the users
+    who aren't in curses mode and tend to leave their clients
+    idle. keepalives become disabled, resulting in getting booted
+    when coming back to the idle session. but they probably have
+    a working scrollback in their terminal, so disable it in this
+    case:
+  */
+ if (!is_curses_enabled())
+       lines_printed = 0;
+
  Revision 590.149  2002/03/12 23:34:37  nbryant
  use ncurses in preference to curses if it's installed; it handles
  background colors properly on dtterm, has a larger color pair palette,
@@ -3482,3 +3496,4 @@ Sat Jul 11 00:20:48 EDT 1998 Nathan Bryant <bryant@cs.usm.maine.edu>
 
 Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
        * Initial CVS import 
+
index 5b8a097651ddf0a0ede7f8ea6927397b8f602d17..69a7340cf4338621983be4c2982ce8c19147f4fc 100644 (file)
@@ -312,6 +312,19 @@ void print_express(void)
                scr_printf(":\n");
                lines_printed++;
                fmout(screenwidth, NULL, NULL, 1, screenheight, -1, 0);
+
+               /* when running in curses mode, the scroll bar in most
+                  xterm-style programs becomes useless, so it makes sense to
+                  pause after a screenful of pages if the user has been idle
+                  for a while. However, this is annoying to some of the users
+                  who aren't in curses mode and tend to leave their clients
+                  idle. keepalives become disabled, resulting in getting booted
+                  when coming back to the idle session. but they probably have
+                  a working scrollback in their terminal, so disable it in this
+                  case:
+                */
+               if (!is_curses_enabled())
+                       lines_printed = 0;
        }
        scr_printf("\n---\n");
        color(BRIGHT_WHITE);
index 5690997417de5ff20fb51031b502a10a1dca2068..c8cb29603d226c3b9f9352fbb6c92bcb952ebce2 100644 (file)
@@ -45,6 +45,14 @@ extern void check_screen_dims(void);
 void do_keepalive(void);
 
 
+int is_curses_enabled(void) {
+#ifdef HAVE_CURSES_H
+       return mainwindow != NULL;
+#else
+       return 0;
+#endif
+}
+
 /*
  * status_line() is a convenience function for writing a "typical"
  * status line to the window.
index 2254b96cc817c8e2cdb9095f59c3b95b30ed145e..9e565a006a00df883bf3de53988f0b5e26fd8995 100644 (file)
@@ -21,3 +21,4 @@ int scr_set_windowsize(void);
 void windows_new(void);
 void windows_delete(void);
 int scr_blockread(void);
+int is_curses_enabled(void);