[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
lynx-dev fix for #16
From: |
Leonid Pauzner |
Subject: |
lynx-dev fix for #16 |
Date: |
Sat, 13 Jun 1998 06:08:44 +0400 (MSD) |
This is mostly cosmetic changes:
* One more fix for DISP_PARTIAL: to avoid bliking while reloading document
with Newline_partial > 1 (say, we press '*' but noproxy) we repaint the page
only when Newline_partial <= HText_getNumOfLines().
* add "-verbose" command-line switch.
* DOS fix: open stdout in TEXT mode for -help and startup error message.
Leonid.
diff -u old/htformat.c ./htformat.c
--- old/htformat.c Fri Jun 5 01:42:16 1998
+++ ./htformat.c Sat Jun 13 05:06:22 1998
@@ -581,8 +581,15 @@
#ifdef DISP_PARTIAL
if (display_partial &&
((Newline_partial + display_lines) > NumOfLines_partial)) {
- NumOfLines_partial = HText_getNumOfLines();
- HText_pageDisplay(Newline_partial, "");
+ /*
+ ** Repaint the page only if Newline_partial in our hands :-)
+ ** Update NumOfLines_partial only when we repaint the page,
+ ** so it corresponds to number of already displayed lines.
+ */
+ if (Newline_partial <= HText_getNumOfLines()) {
+ NumOfLines_partial = HText_getNumOfLines();
+ HText_pageDisplay(Newline_partial, "");
+ }
}
#endif /* DISP_PARTIAL */
@@ -649,8 +656,15 @@
#ifdef DISP_PARTIAL
if (display_partial &&
((Newline_partial + display_lines) > NumOfLines_partial)) {
- NumOfLines_partial = HText_getNumOfLines();
- HText_pageDisplay(Newline_partial, "");
+ /*
+ ** Repaint the page only if Newline_partial in our hands :-)
+ ** Update NumOfLines_partial only when we repaint the page,
+ ** so it corresponds to number of already displayed lines.
+ */
+ if (Newline_partial <= HText_getNumOfLines()) {
+ NumOfLines_partial = HText_getNumOfLines();
+ HText_pageDisplay(Newline_partial, "");
+ }
}
#endif /* DISP_PARTIAL */
@@ -746,8 +760,15 @@
#ifdef DISP_PARTIAL
if (display_partial &&
((Newline_partial + display_lines) > NumOfLines_partial)) {
- NumOfLines_partial = HText_getNumOfLines();
- HText_pageDisplay(Newline_partial, "");
+ /*
+ ** Repaint the page only if Newline_partial in our hands :-)
+ ** Update NumOfLines_partial only when we repaint the page,
+ ** so it corresponds to number of already displayed lines.
+ */
+ if (Newline_partial <= HText_getNumOfLines()) {
+ NumOfLines_partial = HText_getNumOfLines();
+ HText_pageDisplay(Newline_partial, "");
+ }
}
#endif /* DISP_PARTIAL */
diff -u old/lymain.c ./lymain.c
--- old/lymain.c Fri Jun 12 16:51:36 1998
+++ ./lymain.c Sat Jun 13 05:57:32 1998
@@ -2939,6 +2939,10 @@
"validate", IGNORE_ARG, 0,
"accept only http URLs (for validation)"
),
+ PARSE_SET(
+ "verbose", TOGGLE_ARG, &verbose_img,
+ "taggles [LINK], [IMAGE] and [INLINE] comments \nwith filenames of these
images"
+ ),
PARSE_FUN(
"version", FUNCTION_ARG, version_fun,
"print Lynx version information"
@@ -3008,6 +3012,10 @@
if (pgm == NULL) pgm = "lynx";
+#if defined(__DJGPP__) || defined(_WINDOWS)
+ setmode( fileno( stdout ), O_TEXT );
+#endif /* __DJGPP__ or _WINDOWS */
+
fprintf (stdout, "USAGE: %s [options] [file]\n", pgm);
fprintf (stdout, "Options are:\n");
print_help_strings("",
@@ -3016,6 +3024,10 @@
for (p = Arg_Table; p->name != 0; p++)
print_help_strings(p->name, p->help_string);
+
+#if defined(__DJGPP__) || defined(_WINDOWS)
+ setmode( fileno( stdout ), O_BINARY );
+#endif /* __DJGPP__ or _WINDOWS */
exit (exit_status);
}
diff -u old/lymainlo.c ./lymainlo.c--- old/lymainlo.c Fri Jun 12 16:51:36
1998
+++ ./lymainlo.c Sat Jun 13 05:58:34 1998
@@ -642,8 +642,16 @@
startfile);
else
#endif /* UNIX */
+
+#if defined(__DJGPP__) || defined(_WINDOWS)
+ setmode( fileno( stdout ), O_TEXT );
+#endif /* __DJGPP__ or _WINDOWS */
printf("\nlynx: Can't access startfile %s\n",
startfile);
+#if defined(__DJGPP__) || defined(_WINDOWS)
+ setmode( fileno( stdout ), O_BINARY );
+#endif /* __DJGPP__ or _WINDOWS */
+
if (!dump_output_immediately) {
#ifndef NOSIGHUP
(void) signal(SIGHUP, SIG_DFL);
@@ -740,9 +748,17 @@
} else
#endif /* UNIX */
{
+#if defined(__DJGPP__) || defined(_WINDOWS)
+ setmode( fileno( stdout ), O_TEXT );
+#endif /* __DJGPP__ or _WINDOWS */
+
printf(
"\nlynx: Start file could not be found or is not text/html or text/plain\n");
printf(" Exiting...\n");
+
+#if defined(__DJGPP__) || defined(_WINDOWS)
+ setmode( fileno( stdout ), O_BINARY );
+#endif /* __DJGPP__ or _WINDOWS */
}
if (!dump_output_immediately) {
#ifndef NOSIGHUP
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- lynx-dev fix for #16,
Leonid Pauzner <=