aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorThomas E. Dickey <dickey@invisible-island.net>1998-09-30 21:18:18 -0400
committerThomas E. Dickey <dickey@invisible-island.net>1998-09-30 21:18:18 -0400
commit4fa34a534d3c5600a483a4a0b2f40939dee4ec14 (patch)
tree55d81c948ed2fb776ba5bd4941e6bcd758e39747 /src
parent6b6388d0c6a89daaa3c95fc3aa54e38e71c7cc15 (diff)
downloadlynx-snapshots-4fa34a534d3c5600a483a4a0b2f40939dee4ec14.tar.gz
snapshot of project "lynx", label v2-8-1pre_5
Diffstat (limited to 'src')
-rw-r--r--src/HTAlert.c14
-rw-r--r--src/LYCharUtils.c17
-rw-r--r--src/LYCurses.c4
-rw-r--r--src/LYGlobalDefs.h2
-rw-r--r--src/LYMain.c15
-rw-r--r--src/LYReadCFG.c12
-rw-r--r--src/LYUtils.c12
-rw-r--r--src/LYrcFile.c27
8 files changed, 78 insertions, 25 deletions
diff --git a/src/HTAlert.c b/src/HTAlert.c
index 85ba07a8..017354a4 100644
--- a/src/HTAlert.c
+++ b/src/HTAlert.c
@@ -42,7 +42,7 @@ PUBLIC void HTInfoMsg ARGS1(
{
_statusline(Msg);
if (Msg && *Msg) {
- CTRACE(tfp, "Info: %s\n", Msg);
+ CTRACE(tfp, "Info message: %s\n", Msg);
sleep(InfoSecs);
}
}
@@ -55,18 +55,20 @@ PUBLIC void HTUserMsg ARGS1(
{
_statusline(Msg);
if (Msg && *Msg) {
- CTRACE(tfp, "User: %s\n", Msg);
+ CTRACE(tfp, "User message: %s\n", Msg);
sleep(MessageSecs);
}
}
PUBLIC void HTUserMsg2 ARGS2(
- CONST char *, Msg,
+ CONST char *, Msg2,
CONST char *, Arg)
{
- _user_message(Msg, Arg);
- if (Msg && *Msg) {
- CTRACE(tfp, "User: %s (%s)\n", Msg, Arg);
+ _user_message(Msg2, Arg);
+ if (Msg2 && *Msg2) {
+ CTRACE(tfp, "User message: ");
+ CTRACE(tfp, Msg2, Arg);
+ CTRACE(tfp, "\n");
sleep(MessageSecs);
}
}
diff --git a/src/LYCharUtils.c b/src/LYCharUtils.c
index f372471e..5b962a93 100644
--- a/src/LYCharUtils.c
+++ b/src/LYCharUtils.c
@@ -340,6 +340,17 @@ PUBLIC void LYFillLocalFileURL ARGS2(
}
}
+#if defined(DOSPATH) || defined(__EMX__)
+ if (*(*href+1) == ':') {
+ /*
+ * If it's a local DOS path beginning with drive letter,
+ * add file://localhost/ prefix and go ahead.
+ */
+ StrAllocCopy(temp, *href);
+ LYLocalFileToURL (href, temp);
+ }
+#endif /* DOSPATH */
+
/*
* No path in a file://localhost URL means a
* directory listing for the current default. - FM
@@ -355,11 +366,7 @@ PUBLIC void LYFillLocalFileURL ARGS2(
#else
getwd (curdir);
#endif /* NO_GETCWD */
-#ifdef DOSPATH
- temp2 = HTDOS_wwwName(curdir);
-#else
- temp2 = curdir;
-#endif /* DOSPATH */
+ temp2 = wwwName(curdir);
#endif /* VMS */
LYAddHtmlSep(href);
/*
diff --git a/src/LYCurses.c b/src/LYCurses.c
index 0935182c..cea1ae42 100644
--- a/src/LYCurses.c
+++ b/src/LYCurses.c
@@ -1707,7 +1707,9 @@ PUBLIC void lynx_start_link_color ARGS2(
/* start_bold(); */
start_reverse();
#if defined(USE_SLANG)
+#ifndef __DJGPP__
if (SLtt_Use_Ansi_Colors)
+#endif /* !__DJGPP__ */
start_underline ();
#endif /* USE_SLANG */
#if defined(FANCY_CURSES) && defined(COLOR_CURSES)
@@ -1735,7 +1737,9 @@ PUBLIC void lynx_stop_link_color ARGS2(
if (flag) {
stop_reverse();
#if defined(USE_SLANG)
+#ifndef __DJGPP__
if (SLtt_Use_Ansi_Colors)
+#endif /* !__DJGPP__ */
stop_underline ();
#endif /* USE_SLANG */
#if defined(FANCY_CURSES) && defined(COLOR_CURSES)
diff --git a/src/LYGlobalDefs.h b/src/LYGlobalDefs.h
index 75a24be2..263ca075 100644
--- a/src/LYGlobalDefs.h
+++ b/src/LYGlobalDefs.h
@@ -261,9 +261,9 @@ extern BOOLEAN no_url_redirection; /* Don't follow URL redirections */
extern BOOLEAN display_partial; /* Display document during download */
extern int Newline_partial; /* -//- "current" newline position */
extern int NumOfLines_partial; /* -//- "current" number of lines */
+extern int partial_threshold;
extern BOOLEAN debug_display_partial; /* show with MessageSecs delay */
extern BOOLEAN detected_forms_input_partial; /* trimHightext temp fix */
-extern int min_lines_partial; /* incremental rendering minimum */
#endif
extern char *form_post_data; /* User data for post form */
extern char *form_get_data; /* User data for get form */
diff --git a/src/LYMain.c b/src/LYMain.c
index 9747cb11..e8c98418 100644
--- a/src/LYMain.c
+++ b/src/LYMain.c
@@ -48,6 +48,12 @@
#include <LYexit.h>
#include <LYLeaks.h>
+#ifdef FNAMES_8_3
+#define COOKIE_FILE "cookies"
+#else
+#define COOKIE_FILE ".lynx_cookies"
+#endif /* FNAMES_8_3 */
+
/* ahhhhhhhhhh!! Global variables :-< */
#ifdef SOCKS
PUBLIC BOOLEAN socks_flag=TRUE;
@@ -360,7 +366,7 @@ PUBLIC BOOLEAN LYQuitDefaultYes = QUIT_DEFAULT_YES;
PUBLIC BOOLEAN display_partial = TRUE; /* Display document during download */
PUBLIC BOOLEAN debug_display_partial = FALSE; /* Show with MessageSecs delay */
PUBLIC BOOLEAN detected_forms_input_partial = FALSE; /* trimHightext temp fix */
-PUBLIC int min_lines_partial = 0; /* default: wait for complete screen */
+PUBLIC int partial_threshold = -1; /* # of lines to be d/l'ed until we repaint */
#endif
/* These are declared in cutil.h for current freeWAIS libraries. - FM */
@@ -1478,7 +1484,7 @@ PUBLIC int main ARGS2(
* cookies file, probably. - RP
*/
if(LYCookieFile == NULL) {
- LYAddPathToHome(LYCookieFile = malloc(LY_MAXPATH), LY_MAXPATH, "cookies");
+ LYAddPathToHome(LYCookieFile = malloc(LY_MAXPATH), LY_MAXPATH, COOKIE_FILE);
} else {
if ((cp = strchr(LYCookieFile, '~'))) {
temp = NULL;
@@ -2771,6 +2777,11 @@ keys (may be incompatible with some curses packages)"
"partial", TOGGLE_ARG, &display_partial,
"display partial pages while downloading"
),
+ PARSE_INT(
+ "partial_thres", IGNORE_ARG|INT_ARG, partial_threshold,
+ "[=NUMBER]\nnumber of lines to render before repainting display\n\
+with partial-display logic"
+ ),
#endif
PARSE_FUN(
"pauth", NEED_FUNCTION_ARG, pauth_fun,
diff --git a/src/LYReadCFG.c b/src/LYReadCFG.c
index 23f9b5e6..d1a48146 100644
--- a/src/LYReadCFG.c
+++ b/src/LYReadCFG.c
@@ -903,7 +903,7 @@ static Config_Type Config_Table [] =
PARSE_FUN("outgoing_mail_charset", CONF_FUN, outgoing_mail_charset_fun),
#ifdef DISP_PARTIAL
PARSE_SET("partial", CONF_BOOL, display_partial),
- PARSE_SET("partial_min_lines", CONF_INT, min_lines_partial),
+ PARSE_INT("partial_thres", CONF_INT, partial_threshold),
#endif
PARSE_STR("personal_mailcap", CONF_STR, personal_type_map),
PARSE_STR("personal_extension_map", CONF_STR, personal_extension_map),
@@ -994,6 +994,7 @@ PUBLIC void read_cfg ARGS4(
FILE *, fp0)
{
FILE *fp;
+ char mypath[LY_MAXPATH];
char buffer[MAX_LINE_BUFFER_LEN];
CTRACE(tfp, "Loading cfg file '%s'.\n", cfg_filename);
@@ -1017,6 +1018,11 @@ PUBLIC void read_cfg ARGS4(
CTRACE(tfp,"No filename following -cfg switch!\n");
return;
}
+ if (!strncmp(cfg_filename, "~/", 2)) {
+ strcpy(mypath, Home_Dir());
+ strcat(mypath, cfg_filename+1);
+ cfg_filename = mypath;
+ }
if ((fp = fopen(cfg_filename,"r")) == 0) {
CTRACE(tfp,"lynx.cfg file not found as %s\n",cfg_filename);
return;
@@ -1130,9 +1136,9 @@ PUBLIC void read_cfg ARGS4(
case CONF_ENV2:
if (tbl->type == CONF_ENV)
- LYLowerCase(name);
+ LYLowerCase(name);
else
- LYUpperCase(name);
+ LYUpperCase(name);
if (getenv (name) == 0) {
#ifdef VMS
diff --git a/src/LYUtils.c b/src/LYUtils.c
index ac6055f6..d14b0b48 100644
--- a/src/LYUtils.c
+++ b/src/LYUtils.c
@@ -2997,11 +2997,7 @@ PUBLIC void change_sug_filename ARGS1(
* Rename any temporary files.
*/
temp = (char *)calloc(1, (strlen(lynx_temp_space) + 60));
-#if defined(FNAMES_8_3) && defined(DOSPATH)
- cp = HTDOS_wwwName(lynx_temp_space);
-#else
- cp = lynx_temp_space;
-#endif
+ cp = wwwName(lynx_temp_space);
if (LYIsHtmlSep(*cp)) {
sprintf(temp, "file://localhost%s%d", cp, (int)getpid());
} else {
@@ -3862,7 +3858,7 @@ have_VMS_URL:
*/
char curdir[DIRNAMESIZE];
getcwd (curdir, DIRNAMESIZE);
- StrAllocCopy(temp, HTDOS_wwwName(curdir));
+ StrAllocCopy(temp, wwwName(curdir));
StrAllocCat(*AllocatedString, temp);
FREE(temp);
CTRACE(tfp, "Converted '%s' to '%s'\n",
@@ -5561,7 +5557,7 @@ PUBLIC FILE *LYNewTxtFile ARGS1(char *, name)
#if defined(__DJGPP__) || defined(_WINDOWS)
_fmode = O_BINARY;
-#endif /* __DJGPP__ or _WINDOWS */
+#endif /* __DJGPP__ or _WINDOWS */
#endif
return fp;
@@ -5583,7 +5579,7 @@ PUBLIC FILE *LYAppendToTxtFile ARGS1(char *, name)
#if defined(__DJGPP__) || defined(_WINDOWS)
_fmode = O_BINARY;
-#endif /* __DJGPP__ or _WINDOWS */
+#endif /* __DJGPP__ or _WINDOWS */
#endif
return fp;
}
diff --git a/src/LYrcFile.c b/src/LYrcFile.c
index ef66d6dc..c3968a31 100644
--- a/src/LYrcFile.c
+++ b/src/LYrcFile.c
@@ -509,6 +509,20 @@ PUBLIC void read_rc NOPARAMS
else
local_exec = FALSE;
+#ifdef DISP_PARTIAL
+ /*
+ * Partial display logic--set the threshold # of lines before
+ * Lynx redraws the screen
+ */
+ } else if ((cp = LYstrstr(line_buffer, "partial_thres")) != NULL &&
+ cp-line_buffer < number_sign) {
+ if ((cp2 = (char *)strchr(cp, '=')) != NULL)
+ cp = cp2 + 1;
+ cp = LYSkipBlanks(cp);
+ if (atoi(cp) != 0)
+ partial_threshold = atoi(cp);
+#endif /* DISP_PARTIAL */
+
/*
* Local execution mode - only links in local files.
*/
@@ -836,6 +850,19 @@ PUBLIC int save_rc NOPARAMS
((keypad_mode == LINKS_ARE_NUMBERED) ? "LINKS_ARE_NUMBERED" :
"LINKS_AND_FORM_FIELDS_ARE_NUMBERED")));
+#ifdef DISP_PARTIAL
+ /*
+ * Partial display threshold
+ */
+ fprintf(fp, "\
+# partial_thres specifies the number of lines Lynx should download and render
+# before we redraw the screen in Partial Display logic
+# e.g. partial_thres=2
+# would have Lynx redraw every 2 lines that it renders
+# partial_thres=-1 would use the entire screensize\n");
+ fprintf(fp, "partial_thres=%d\n\n", partial_threshold);
+#endif /* DISP_PARTIAL */
+
/*
* Lineedit mode.
*/