[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
lynx-dev 2.8.3dev.2 patch 2 - misc.
From: |
Klaus Weide |
Subject: |
lynx-dev 2.8.3dev.2 patch 2 - misc. |
Date: |
Tue, 22 Jun 1999 01:19:34 -0500 (CDT) |
* Entify strings when adding them to LYNXMESSAGES: stack.
* Save HTAlwaysAlert messages for LYNXMESSAGES: page.
* Generate TRACE output for prompts that use HTConfirm() or
HTConfirmDefault.
* Make sure force_old_UCLYhndl_on_reload is initialized and reset
properly.
* Minor tweaks (LYCharUtils.c, LYMain.c, LYPrint.c)
* Flush Lynx.leaks file after writing each memory leak record but
before freeing the memory block, to ensure the info is on disk
if something goes seriously wrong (i.e. FREE causes a signal).
* More general checking in postoptions - `lynx LYNXOPTIONS:foo'
now doesn't crash.
Index: lynx2-8-3/WWW/Library/Implementation/HTFormat.c
--- lynx2-8-3.old/WWW/Library/Implementation/HTFormat.c Mon, 21 Jun 1999
00:31:29 -0500
+++ lynx2-8-3/WWW/Library/Implementation/HTFormat.c Mon, 21 Jun 1999 22:53:50
-0500
@@ -490,7 +490,7 @@
#ifdef DISP_PARTIAL
if (display_partial) {
/*
- ** HText_getNumOfLines() = "current" number of lines received
+ ** HText_getNumOfLines() = "current" number of complete lines received
** NumOfLines_partial = number of lines at the moment of last repaint.
**
** We update NumOfLines_partial only when we repaint the display.
Index: lynx2-8-3/src/LYCharUtils.c
--- lynx2-8-3.old/src/LYCharUtils.c Fri, 04 Jun 1999 20:57:16 -0500
+++ lynx2-8-3/src/LYCharUtils.c Mon, 21 Jun 1999 22:54:01 -0500
@@ -133,8 +133,8 @@
*q++ = *p;
}
}
- StrAllocCopy(*str, cp);
- FREE(cp);
+ FREE(*str);
+ *str = cp;
}
/*
@@ -367,7 +367,8 @@
char curdir[LY_MAXPATH];
temp2 = wwwName(Current_Dir(curdir));
#endif /* VMS */
- LYAddHtmlSep(href);
+ if (!LYIsHtmlSep(*temp2))
+ LYAddHtmlSep(href);
/*
* Check for pathological cases - current dir has chars which
* MUST BE URL-escaped - kw
Index: lynx2-8-3/src/HTAlert.c
--- lynx2-8-3.old/src/HTAlert.c Mon, 21 Jun 1999 00:31:29 -0500
+++ lynx2-8-3/src/HTAlert.c Mon, 21 Jun 1999 22:54:35 -0500
@@ -48,12 +48,14 @@
"%s %s!\n",
extra_prefix, Msg);
fflush(stdout);
+ LYstore_message2(ALERT_FORMAT, Msg);
sleep(AlertSecs);
} else {
fprintf(((TRACE) ? stdout : stderr),
ALERT_FORMAT,
(Msg == 0) ? "" : Msg);
fflush(stdout);
+ LYstore_message2(ALERT_FORMAT, Msg);
sleep(AlertSecs);
fprintf(((TRACE) ? stdout : stderr), "\n");
}
@@ -211,6 +213,12 @@
conf_cancelled = NO;
if (dump_output_immediately) { /* Non-interactive, can't respond */
+ if (Dft == DFT_CONFIRM) {
+ CTRACE(tfp, "Confirm: %s (%c/%c) ", Msg, *msg_yes, *msg_no);
+ } else {
+ CTRACE(tfp, "Confirm: %s (%c) ", Msg, (Dft == YES) ? *msg_yes :
*msg_no);
+ }
+ CTRACE(tfp, "- NO, not interactive.\n");
result = NO;
} else {
char *msg = NULL;
@@ -219,6 +227,9 @@
HTSprintf0(&msg, "%s (%c/%c) ", Msg, *msg_yes, *msg_no);
else
HTSprintf0(&msg, "%s (%c) ", Msg, (Dft == YES) ? *msg_yes :
*msg_no);
+ if (LYTraceLogFP) {
+ CTRACE(tfp, "Confirm: %s", msg);
+ }
_statusline(msg);
FREE(msg);
@@ -236,11 +247,15 @@
} else if (TOUPPER(c) == TOUPPER(*msg_yes)) {
result = YES;
} else if (TOUPPER(c) == TOUPPER(*msg_no)) {
- return(NO);
+ result = NO;
} else if (Dft != DFT_CONFIRM) {
- return(Dft);
+ result = Dft;
+ break;
}
}
+ CTRACE(tfp, "- %s%s.\n",
+ (result != NO) ? "YES" : "NO",
+ conf_cancelled ? ", cancelled" : "");
}
return (result);
}
Index: lynx2-8-3/src/LYMail.c
--- lynx2-8-3.old/src/LYMail.c Tue, 08 Jun 1999 10:55:11 -0500
+++ lynx2-8-3/src/LYMail.c Mon, 21 Jun 1999 22:54:41 -0500
@@ -1852,7 +1852,7 @@
sleep(AlertSecs);
start_curses();
goto cleandown;
-#else /* Unix: */
+#else /* not VMS: */
/*
* Send the tmpfile into sendmail.
*/
Index: lynx2-8-3/src/LYMainLoop.c
--- lynx2-8-3.old/src/LYMainLoop.c Mon, 21 Jun 1999 03:52:35 -0500
+++ lynx2-8-3/src/LYMainLoop.c Mon, 21 Jun 1999 22:54:58 -0500
@@ -743,6 +743,7 @@
LYCancelledFetch = FALSE;
ForcePush = FALSE;
LYforce_HTML_mode = FALSE;
+ force_old_UCLYhndl_on_reload = FALSE;
if (traversal) {
crawl_ok = FALSE;
if (traversal_link_to_add) {
@@ -1121,6 +1122,7 @@
LYPermitURL = FALSE; /* only for LYValidate or check_realm */
ForcePush = FALSE; /* only set for some PRINT requests. */
LYforce_HTML_mode = FALSE;
+ force_old_UCLYhndl_on_reload = FALSE;
popped_doc = FALSE;
} /* end if (LYforce_no_cache || force_load || are_different(...)) */
@@ -1761,6 +1763,7 @@
* back through the getch() loop.
*/
+ force_old_UCLYhndl_on_reload = FALSE;
CTRACE_FLUSH(tfp);
switch(cmd) {
Index: lynx2-8-3/src/LYOptions.c
--- lynx2-8-3.old/src/LYOptions.c Mon, 21 Jun 1999 00:31:29 -0500
+++ lynx2-8-3/src/LYOptions.c Mon, 21 Jun 1999 22:55:36 -0500
@@ -3553,17 +3553,22 @@
return(NULLFILE);
}
+ data = break_data(newdoc->post_data);
+
+ if (!data) {
+ int status;
+ HTAlwaysAlert("Unexpected way of accessing", newdoc->address);
/*-------------------------------------------------
* kludge gen_options() call:
*--------------------------------------------------*/
+ status = gen_options(&newdoc->address);
+ if (status != NORMAL) {
+ FREE(newdoc->address);
+ return(status);
+ }
- if (strstr(newdoc->address, "LYNXOPTIONS:/") && !newdoc->post_data) {
- int status = gen_options(&newdoc->address);
- if (status == NOT_FOUND)
- return(NOT_FOUND);
-
- /* exit to getfile() cyrcle */
+ /* exit to getfile() cycle */
WWWDoc.address = newdoc->address;
WWWDoc.post_data = newdoc->post_data;
WWWDoc.post_content_type = newdoc->post_content_type;
@@ -3575,9 +3580,6 @@
return(NOT_FOUND);
return(NORMAL);
}
-
-
- data = break_data(newdoc->post_data);
for (i = 0; data[i].tag != NULL; i++) {
/*
Index: lynx2-8-3/src/LYPrint.c
--- lynx2-8-3.old/src/LYPrint.c Tue, 08 Jun 1999 10:55:11 -0500
+++ lynx2-8-3/src/LYPrint.c Mon, 21 Jun 1999 22:55:47 -0500
@@ -986,6 +986,7 @@
if (Lpansi) {
printf("\n\014"); /* Form feed */
printf("\033[4i");
+ fflush(stdout); /* refresh to screen */
Lpansi = FALSE;
} else {
fprintf(stdout,"\n\n%s", PRESS_RETURN_TO_FINISH);
@@ -995,7 +996,6 @@
HadVMSInterrupt = FALSE;
#endif /* VMS */
}
- fflush(stdout); /* refresh to screen */
start_curses();
done:
Index: lynx2-8-3/src/LYKeymap.c
--- lynx2-8-3.old/src/LYKeymap.c Sat, 12 Jun 1999 17:10:16 -0500
+++ lynx2-8-3/src/LYKeymap.c Mon, 21 Jun 1999 22:55:55 -0500
@@ -893,7 +893,7 @@
#ifndef USE_SLANG
if (c >= 0) {
if ((c&LKC_MASK) > 255 && !(c & LKC_ISLKC))
- return (-1); /* Don't accept untranslatable curses KEY_* */
+ return (-1); /* Don't accept untranslated curses KEY_* */
else
c &= ~LKC_ISLKC;
}
Index: lynx2-8-3/src/LYHistory.c
--- lynx2-8-3.old/src/LYHistory.c Tue, 08 Jun 1999 13:19:59 -0500
+++ lynx2-8-3/src/LYHistory.c Mon, 21 Jun 1999 22:56:03 -0500
@@ -772,6 +772,7 @@
if (message != NULL) {
char *temp = NULL;
HTSprintf(&temp, message, (argument == 0) ? "" : argument);
+ LYEntify(&temp, TRUE);
to_stack(temp);
}
}
@@ -782,6 +783,7 @@
if (message != NULL) {
char *temp = NULL;
StrAllocCopy(temp, message);
+ LYEntify(&temp, TRUE);
to_stack(temp);
}
}
Index: lynx2-8-3/src/LYCharSets.c
--- lynx2-8-3.old/src/LYCharSets.c Fri, 04 Jun 1999 20:57:16 -0500
+++ lynx2-8-3/src/LYCharSets.c Mon, 21 Jun 1999 22:56:09 -0500
@@ -21,7 +21,7 @@
PUBLIC HTkcode kanji_code = NOKANJI;
PUBLIC BOOLEAN LYHaveCJKCharacterSet = FALSE;
PUBLIC BOOLEAN DisplayCharsetMatchLocale = TRUE;
-PUBLIC BOOL force_old_UCLYhndl_on_reload;
+PUBLIC BOOL force_old_UCLYhndl_on_reload = FALSE;
PUBLIC int forced_UCLYhdnl;
extern void UCInit NOARGS;
extern int UCInitialized;
Index: lynx2-8-3/src/LYLeaks.c
--- lynx2-8-3.old/src/LYLeaks.c Mon, 21 Jun 1999 00:31:29 -0500
+++ lynx2-8-3/src/LYLeaks.c Mon, 21 Jun 1999 22:56:27 -0500
@@ -129,7 +129,6 @@
}
}
fprintf(Fp_leakagesink, "\n");
- FREE(ALp_head->vp_Alloced);
fprintf(Fp_leakagesink, "%s\t%d\n",
gettext("ByteSize:"),
(int)(ALp_head->st_Bytes));
@@ -151,6 +150,8 @@
gettext("LineCount:"),
ALp_head->SL_realloc.ssi_LineNumber);
}
+ fflush(Fp_leakagesink);
+ FREE(ALp_head->vp_Alloced);
}
/*
Index: lynx2-8-3/src/LYMain.c
--- lynx2-8-3.old/src/LYMain.c Mon, 21 Jun 1999 00:31:29 -0500
+++ lynx2-8-3/src/LYMain.c Mon, 21 Jun 1999 22:56:42 -0500
@@ -2561,6 +2561,7 @@
#ifndef NO_CONFIG_INFO
," lynxcfg_xinfo disable extended lynx.cfg viewing and reloading"
#endif
+," mail disallow mail"
," multibook disallow multiple bookmark files"
," news_post disallow USENET News posting."
," option_save disallow saving options in .lynxrc"
Index: lynx2-8-3/CHANGES
--- lynx2-8-3.old/CHANGES Mon, 21 Jun 1999 00:31:29 -0500
+++ lynx2-8-3/CHANGES Tue, 22 Jun 1999 01:11:18 -0500
@@ -152,7 +152,7 @@
always edit document file, not textarea content. DWIMEDIT acts like
EDITTEXTAREA if the current link is a form textarea or input field and
AUTOEXTEDIT was defined, and like EDIT otherwise. Also added slightly
- different statusline message if form field external editiong cannot be done
+ different statusline message if form field external editing cannot be done
because editing is disabled: it shouldn't refer to "The 'e'dit command".
- Summary of reasonable ways to invoke external texarea editing (assuming
that it is desired to keep the action of 'e' to edit files at least outside
@@ -397,6 +397,13 @@
* Various doc tweaks.
* Updated README.defines. Other contributors should please add their stuff
there, too.
+* Additional non-option args (before the last one), i.e. URLs or filenames,
+ are made available for 'g'oto recall. If unwanted, this can be disabled
+ by changing EXTENDED_STARTFILE_RECALL in LYMain.c.
+* In UCChangeTerminalCodepage() used for --enable-font-switch with linux:
+ use LYOpenTemp() etc. instead of tempnam(), this avoids "Invalid pointer"
+ with LY_FIND_LEAKS and avoids leaving old temporary files hanging
+ around in some situations. Also added some error checking.
1999-06-01 (2.8.2rel.1)
-----------------------
- lynx-dev 2.8.3dev.2 patch 2 - misc.,
Klaus Weide <=