about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorThomas E. Dickey <dickey@invisible-island.net>2009-04-07 22:45:42 -0400
committerThomas E. Dickey <dickey@invisible-island.net>2009-04-07 22:45:42 -0400
commit7b0f5c3465fd2b45c4eeab192e09261f9569a930 (patch)
tree23a6933bd656877448d1e4aa7e5ca95da3e8758f /src
parentc8d562f7d42dcd247955a83cb8bdf1fd1b0a7f82 (diff)
downloadlynx-snapshots-7b0f5c3465fd2b45c4eeab192e09261f9569a930.tar.gz
snapshot of project "lynx", label v2-8-7pre_1a
Diffstat (limited to 'src')
-rw-r--r--src/HTAlert.c4
-rw-r--r--src/LYCurses.c4
-rw-r--r--src/LYCurses.h4
-rw-r--r--src/LYGlobalDefs.h3
-rw-r--r--src/LYJustify.h6
-rw-r--r--src/LYMain.c16
-rw-r--r--src/LYOptions.c52
-rw-r--r--src/LYReadCFG.c3
-rw-r--r--src/LYrcFile.c3
-rw-r--r--src/LYrcFile.h3
10 files changed, 54 insertions, 44 deletions
diff --git a/src/HTAlert.c b/src/HTAlert.c
index ee83f3af..aba28b9e 100644
--- a/src/HTAlert.c
+++ b/src/HTAlert.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: HTAlert.c,v 1.84 2009/03/10 15:22:07 tom Exp $
+ * $LynxId: HTAlert.c,v 1.85 2009/04/07 00:09:34 tom Exp $
  *
  *	Displaying messages and getting input for Lynx Browser
  *	==========================================================
@@ -1123,7 +1123,7 @@ int HTConfirmPostRedirect(const char *Redirecting_url, int server_status)
     return (result);
 }
 
-#define okToSleep() (!crawl && !traversal && LYCursesON)
+#define okToSleep() (!crawl && !traversal && LYCursesON && !no_pause)
 
 /*
  * Sleep for the given message class's time.
diff --git a/src/LYCurses.c b/src/LYCurses.c
index e272269e..258873ee 100644
--- a/src/LYCurses.c
+++ b/src/LYCurses.c
@@ -1,4 +1,4 @@
-/* $LynxId: LYCurses.c,v 1.140 2009/03/10 15:33:34 tom Exp $ */
+/* $LynxId: LYCurses.c,v 1.141 2009/04/07 00:00:40 tom Exp $ */
 #include <HTUtils.h>
 #include <HTAlert.h>
 
@@ -69,7 +69,7 @@ WINDOW *LYwin = 0;
 int LYshiftWin = 0;
 int LYwideLines = FALSE;
 int LYtableCols = 0;		/* in 1/12 of screen width */
-BOOL LYuseCursesPads = TRUE;	/* use pads for left/right shifting */
+BOOLEAN LYuseCursesPads = TRUE;	/* use pads for left/right shifting */
 #endif
 
 /*
diff --git a/src/LYCurses.h b/src/LYCurses.h
index 18a611fa..0753e7aa 100644
--- a/src/LYCurses.h
+++ b/src/LYCurses.h
@@ -1,4 +1,4 @@
-/* $LynxId: LYCurses.h,v 1.79 2009/01/03 16:55:08 tom Exp $ */
+/* $LynxId: LYCurses.h,v 1.80 2009/04/07 00:03:47 tom Exp $ */
 #ifndef LYCURSES_H
 #define LYCURSES_H
 
@@ -443,7 +443,7 @@ extern "C" {
     extern int LYshiftWin;
     extern int LYwideLines;
     extern int LYtableCols;
-    extern BOOL LYuseCursesPads;
+    extern BOOLEAN LYuseCursesPads;
 
 #else
 #define LYwin stdscr
diff --git a/src/LYGlobalDefs.h b/src/LYGlobalDefs.h
index b8d7fea3..1b5247d2 100644
--- a/src/LYGlobalDefs.h
+++ b/src/LYGlobalDefs.h
@@ -1,5 +1,5 @@
 /*
- * $LynxId: LYGlobalDefs.h,v 1.117 2009/03/11 00:29:55 tom Exp $
+ * $LynxId: LYGlobalDefs.h,v 1.118 2009/04/07 00:11:01 tom Exp $
  *
  * global variable definitions
  */
@@ -383,6 +383,7 @@ extern "C" {
     extern BOOLEAN use_underscore;
     extern BOOLEAN no_list;
     extern BOOLEAN no_margins;
+    extern BOOLEAN no_pause;
     extern BOOLEAN no_title;
     extern BOOLEAN historical_comments;
     extern BOOLEAN minimal_comments;
diff --git a/src/LYJustify.h b/src/LYJustify.h
index 43e22bd0..209d58a8 100644
--- a/src/LYJustify.h
+++ b/src/LYJustify.h
@@ -1,4 +1,7 @@
-/* Justification for lynx - implemented by Vlad Harchev <hvv@hippo.ru>
+/*
+ * $LynxId: LYJustify.h,v 1.7 2009/04/07 00:24:15 tom Exp $
+ *
+ * Justification for lynx - implemented by Vlad Harchev <hvv@hippo.ru>
  * 11 July 1999
  */
 
@@ -11,7 +14,6 @@
 extern "C" {
 #endif
 #ifdef EXP_JUSTIFY_ELTS
-    extern BOOL ok_justify;
     extern BOOL can_justify_here;
     extern BOOL can_justify_here_saved;
 
diff --git a/src/LYMain.c b/src/LYMain.c
index 83c879a4..40f1833c 100644
--- a/src/LYMain.c
+++ b/src/LYMain.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: LYMain.c,v 1.198 2009/03/11 00:29:55 tom Exp $
+ * $LynxId: LYMain.c,v 1.199 2009/04/07 00:10:20 tom Exp $
  */
 #include <HTUtils.h>
 #include <HTTP.h>
@@ -388,6 +388,7 @@ BOOLEAN more_text = FALSE;	/* is there more text to display? */
 BOOLEAN more_links = FALSE;	/* Links beyond a displayed page with no links? */
 BOOLEAN no_list = FALSE;
 BOOLEAN no_margins = FALSE;
+BOOLEAN no_pause = FALSE;
 BOOLEAN no_title = FALSE;
 BOOLEAN no_url_redirection = FALSE;	/* Don't follow URL redirections */
 BOOLEAN pseudo_inline_alts = MAKE_PSEUDO_ALTS_FOR_INLINES;
@@ -2360,19 +2361,10 @@ void reload_read_cfg(void)
 }
 #endif /* !NO_CONFIG_INFO */
 
-static void disable_pausing(void)
-{
-    AlertSecs = 0;
-    DebugSecs = 0;
-    InfoSecs = 0;
-    MessageSecs = 0;
-    ReplaySecs = 0;
-}
-
 static void force_dump_mode(void)
 {
     dump_output_immediately = TRUE;
-    disable_pausing();
+    no_pause = TRUE;
     LYcols = DFT_COLS;
 }
 
@@ -2823,7 +2815,7 @@ static int nocolor_fun(char *next_arg GCC_UNUSED)
 /* -nopause */
 static int nopause_fun(char *next_arg GCC_UNUSED)
 {
-    disable_pausing();
+    no_pause = TRUE;
     return 0;
 }
 
diff --git a/src/LYOptions.c b/src/LYOptions.c
index 5f1e386c..96402e87 100644
--- a/src/LYOptions.c
+++ b/src/LYOptions.c
@@ -1,4 +1,4 @@
-/* $LynxId: LYOptions.c,v 1.128 2009/01/19 23:32:01 tom Exp $ */
+/* $LynxId: LYOptions.c,v 1.129 2009/04/07 00:35:49 tom Exp $ */
 #include <HTUtils.h>
 #include <HTFTP.h>
 #include <HTTP.h>		/* 'reloading' flag */
@@ -396,7 +396,7 @@ void LYoptions(void)
     }
 
     old_use_assume_charset =
-	use_assume_charset = (BOOL) (user_mode == ADVANCED_MODE);
+	use_assume_charset = (BOOLEAN) (user_mode == ADVANCED_MODE);
 
   draw_options:
 
@@ -973,7 +973,7 @@ void LYoptions(void)
 				     LYCharSet_UC[UCLYhndl_for_unspec].MIMEname);
 		    }
 		    if (HTCJK != JAPANESE)
-			LYRawMode = (BOOL) (UCLYhndl_for_unspec == current_char_set);
+			LYRawMode = (BOOLEAN) (UCLYhndl_for_unspec == current_char_set);
 		    HTMLSetUseDefaultRawMode(current_char_set, LYRawMode);
 		    HTMLSetCharacterHandling(current_char_set);
 		    CurrentAssumeCharSet = UCLYhndl_for_unspec;
@@ -1248,7 +1248,7 @@ void LYoptions(void)
 					       choices, 4, FALSE, FALSE);
 		    }
 #if defined(COLOR_CURSES)
-		    again = (BOOL) (chosen == SHOW_COLOR_ON && !has_colors());
+		    again = (BOOLEAN) (chosen == SHOW_COLOR_ON && !has_colors());
 		    if (again) {
 			char *terminal = LYGetEnv("TERM");
 
@@ -1401,13 +1401,13 @@ void LYoptions(void)
 		user_mode = LYChooseEnum(user_mode,
 					 L_User_Mode, -1,
 					 userMode_choices);
-		use_assume_charset = (BOOL) (user_mode >= 2);
+		use_assume_charset = (BOOLEAN) (user_mode >= 2);
 	    } else {
 		user_mode = LYChoosePopup(user_mode,
 					  L_User_Mode, -1,
 					  userMode_choices,
 					  3, FALSE, FALSE);
-		use_assume_charset = (BOOL) (user_mode >= 2);
+		use_assume_charset = (BOOLEAN) (user_mode >= 2);
 #if defined(VMS) || defined(USE_SLANG)
 		if (use_assume_charset == old_use_assume_charset) {
 		    LYmove(L_User_Mode, COL_OPTION_VALUES);
@@ -2326,6 +2326,7 @@ static const char *locale_charset_string = RC_LOCALE_CHARSET;
  * File Management Options
  */
 static const char *show_dotfiles_string = RC_SHOW_DOTFILES;
+static const char *no_pause_string = RC_NO_PAUSE;
 
 #ifdef DIRED_SUPPORT
 static const char *dired_list_string = RC_DIR_LIST_STYLE;
@@ -2750,7 +2751,7 @@ int postoptions(DocInfo *newdoc)
 	/* Emacs keys: ON/OFF */
 	if (!strcmp(data[i].tag, emacs_keys_string)
 	    && GetOptValues(bool_values, data[i].value, &code)) {
-	    if ((emacs_keys = (BOOL) code) != FALSE) {
+	    if ((emacs_keys = (BOOLEAN) code) != FALSE) {
 		set_emacs_keys();
 	    } else {
 		reset_emacs_keys();
@@ -2826,7 +2827,7 @@ int postoptions(DocInfo *newdoc)
 	/* Search Type: SELECT */
 	if (!strcmp(data[i].tag, search_type_string)
 	    && GetOptValues(search_type_values, data[i].value, &code)) {
-	    case_sensitive = (BOOL) code;
+	    case_sensitive = (BOOLEAN) code;
 	}
 
 	/* HTML error tolerance: SELECT */
@@ -2842,7 +2843,7 @@ int postoptions(DocInfo *newdoc)
 	/* Select Popups: ON/OFF */
 	if (!strcmp(data[i].tag, select_popups_string)
 	    && GetOptValues(bool_values, data[i].value, &code)) {
-	    LYSelectPopups = (BOOL) code;
+	    LYSelectPopups = (BOOLEAN) code;
 	}
 #if defined(USE_SLANG) || defined(COLOR_CURSES)
 	/* Show Color: SELECT */
@@ -2864,19 +2865,19 @@ int postoptions(DocInfo *newdoc)
 	/* Show Cursor: ON/OFF */
 	if (!strcmp(data[i].tag, show_cursor_string)
 	    && GetOptValues(bool_values, data[i].value, &code)) {
-	    LYShowCursor = (BOOL) code;
+	    LYShowCursor = (BOOLEAN) code;
 	}
 
 	/* Underline links: ON/OFF */
 	if (!strcmp(data[i].tag, underline_links_string)
 	    && GetOptValues(bool_values, data[i].value, &code)) {
-	    LYUnderlineLinks = (BOOL) code;
+	    LYUnderlineLinks = (BOOLEAN) code;
 	}
 #ifdef USE_SCROLLBAR
 	/* Show Scrollbar: ON/OFF */
 	if (!strcmp(data[i].tag, show_scrollbar_string)
 	    && GetOptValues(bool_values, data[i].value, &code)) {
-	    LYShowScrollbar = (BOOL) code;
+	    LYShowScrollbar = (BOOLEAN) code;
 	    need_reload = TRUE;
 	}
 #endif
@@ -2924,7 +2925,7 @@ int postoptions(DocInfo *newdoc)
 	if (!strcmp(data[i].tag, verbose_images_string)
 	    && GetOptValues(verbose_images_type_values, data[i].value, &code)) {
 	    if (verbose_img != code) {
-		verbose_img = (BOOL) code;
+		verbose_img = (BOOLEAN) code;
 		need_reload = TRUE;
 	    }
 	}
@@ -2932,7 +2933,7 @@ int postoptions(DocInfo *newdoc)
 	/* VI Keys: ON/OFF */
 	if (!strcmp(data[i].tag, vi_keys_string)
 	    && GetOptValues(bool_values, data[i].value, &code)) {
-	    if ((vi_keys = (BOOL) code) != FALSE) {
+	    if ((vi_keys = (BOOLEAN) code) != FALSE) {
 		set_vi_keys();
 	    } else {
 		reset_vi_keys();
@@ -2955,7 +2956,7 @@ int postoptions(DocInfo *newdoc)
 	/* Auto Session: ON/OFF */
 	if (!strcmp(data[i].tag, auto_session_string)
 	    && GetOptValues(bool_values, data[i].value, &code)) {
-	    LYAutoSession = (BOOL) code;
+	    LYAutoSession = (BOOLEAN) code;
 	}
 
 	/* Default Session filename: INPUT */
@@ -2987,7 +2988,7 @@ int postoptions(DocInfo *newdoc)
 	/* Use locale-based character set: ON/OFF */
 	if (!strcmp(data[i].tag, locale_charset_string)
 	    && GetOptValues(bool_values, data[i].value, &code)) {
-	    LYLocaleCharset = (BOOL) code;
+	    LYLocaleCharset = (BOOLEAN) code;
 	}
 #endif
 
@@ -3006,14 +3007,14 @@ int postoptions(DocInfo *newdoc)
 	/* Raw Mode: ON/OFF */
 	if (!strcmp(data[i].tag, raw_mode_string)
 	    && GetOptValues(bool_values, data[i].value, &code)) {
-	    LYRawMode = (BOOL) code;
+	    LYRawMode = (BOOLEAN) code;
 	}
 #ifndef DISABLE_FTP
 	/*
 	 * passive ftp: ON/OFF
 	 */
 	if (!strcmp(data[i].tag, passive_ftp_string)) {
-	    ftp_passive = (BOOL) code;
+	    ftp_passive = (BOOLEAN) code;
 	}
 
 	/*
@@ -3040,7 +3041,13 @@ int postoptions(DocInfo *newdoc)
 	/* Show dot files: ON/OFF */
 	if (!strcmp(data[i].tag, show_dotfiles_string) && (!no_dotfiles)
 	    && GetOptValues(bool_values, data[i].value, &code)) {
-	    show_dotfiles = (BOOL) code;
+	    show_dotfiles = (BOOLEAN) code;
+	}
+
+	/* Pause when showing messages: ON/OFF */
+	if (!strcmp(data[i].tag, no_pause_string)
+	    && GetOptValues(bool_values, data[i].value, &code)) {
+	    no_pause = (BOOLEAN) !code;
 	}
 #ifdef USE_READPROGRESS
 	/* Show Transfer Rate: enumerated value */
@@ -3126,7 +3133,7 @@ int postoptions(DocInfo *newdoc)
 #endif
 	}
 	if (assume_char_set_changed && HTCJK != JAPANESE) {
-	    LYRawMode = (BOOL) (UCLYhndl_for_unspec == current_char_set);
+	    LYRawMode = (BOOLEAN) (UCLYhndl_for_unspec == current_char_set);
 	}
 	if (raw_mode_old != LYRawMode || assume_char_set_changed) {
 	    /*
@@ -3870,6 +3877,11 @@ static int gen_options(char **newfile)
     EndSelect(fp0);
 #endif /* ENABLE_OPTS_CHANGE_EXEC */
 
+    PutLabel(fp0, gettext("Pause when showing message"), no_pause_string);
+    BeginSelect(fp0, no_pause_string);
+    PutOptValues(fp0, !no_pause, bool_values);
+    EndSelect(fp0);
+
 #ifdef USE_READPROGRESS
     /* Show transfer rate: SELECT */
     PutLabel(fp0, gettext("Show transfer rate"), show_rate_string);
diff --git a/src/LYReadCFG.c b/src/LYReadCFG.c
index 67b66e52..0e7e43e2 100644
--- a/src/LYReadCFG.c
+++ b/src/LYReadCFG.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: LYReadCFG.c,v 1.137 2009/01/29 01:02:26 tom Exp $
+ * $LynxId: LYReadCFG.c,v 1.138 2009/04/07 00:13:11 tom Exp $
  */
 #ifndef NO_RULES
 #include <HTRules.h>
@@ -1484,6 +1484,7 @@ static Config_Type Config_Table [] =
      PARSE_SET(RC_NO_FROM_HEADER,       LYNoFromHeader),
      PARSE_SET(RC_NO_ISMAP_IF_USEMAP,   LYNoISMAPifUSEMAP),
      PARSE_SET(RC_NO_MARGINS,           no_margins),
+     PARSE_SET(RC_NO_PAUSE,             no_pause),
      PARSE_Env(RC_NO_PROXY,             0),
      PARSE_SET(RC_NO_REFERER_HEADER,    LYNoRefererHeader),
      PARSE_SET(RC_NO_TABLE_CENTER,      no_table_center),
diff --git a/src/LYrcFile.c b/src/LYrcFile.c
index 789d8305..7954c336 100644
--- a/src/LYrcFile.c
+++ b/src/LYrcFile.c
@@ -1,4 +1,4 @@
-/* $LynxId: LYrcFile.c,v 1.75 2009/01/01 23:10:59 tom Exp $ */
+/* $LynxId: LYrcFile.c,v 1.76 2009/04/07 00:20:14 tom Exp $ */
 #include <HTUtils.h>
 #include <HTFTP.h>
 #include <LYUtils.h>
@@ -603,6 +603,7 @@ in the Visited Links Page.\n\
     MAYBE_SET(RC_AUTO_SESSION,		LYAutoSession,	MSG_ENABLE_LYNXRC),
     MAYBE_STR(RC_SESSION_FILE,		LYSessionFile,	MSG_ENABLE_LYNXRC),
 #endif
+    MAYBE_SET(RC_NO_PAUSE,		no_pause,	MSG_ENABLE_LYNXRC),
 
     PARSE_NIL
 };
diff --git a/src/LYrcFile.h b/src/LYrcFile.h
index 5ad055c5..07506bba 100644
--- a/src/LYrcFile.h
+++ b/src/LYrcFile.h
@@ -1,5 +1,5 @@
 /*
- * $LynxId: LYrcFile.h,v 1.29 2008/12/26 18:34:05 tom Exp $
+ * $LynxId: LYrcFile.h,v 1.30 2009/04/06 23:07:40 tom Exp $
  */
 #ifndef LYRCFILE_H
 #define LYRCFILE_H
@@ -156,6 +156,7 @@
 #define RC_NO_FROM_HEADER               "no_from_header"
 #define RC_NO_ISMAP_IF_USEMAP           "no_ismap_if_usemap"
 #define RC_NO_MARGINS                   "no_margins"
+#define RC_NO_PAUSE                     "no_pause"
 #define RC_NO_PROXY                     "no_proxy"
 #define RC_NO_REFERER_HEADER            "no_referer_header"
 #define RC_NO_TABLE_CENTER              "no_table_center"