diff options
author | Thomas E. Dickey <dickey@invisible-island.net> | 1999-05-13 02:10:32 -0400 |
---|---|---|
committer | Thomas E. Dickey <dickey@invisible-island.net> | 1999-05-13 02:10:32 -0400 |
commit | 0bafa3a38906a8ffc183d758baa774d8b23a9fa4 (patch) | |
tree | ae40c4a9fa3a9dc049538d288ca3a2bc2fcf14da /src | |
parent | 169e8098be76947e6e1aa002052d9536dc9aa273 (diff) | |
download | lynx-snapshots-0bafa3a38906a8ffc183d758baa774d8b23a9fa4.tar.gz |
snapshot of project "lynx", label v2-8-2pre_3
Diffstat (limited to 'src')
-rw-r--r-- | src/GridText.c | 5 | ||||
-rw-r--r-- | src/HTAlert.h | 2 | ||||
-rw-r--r-- | src/HTML.c | 12 | ||||
-rw-r--r-- | src/HTML.h | 1 | ||||
-rw-r--r-- | src/HTSaveToFile.h | 3 | ||||
-rw-r--r-- | src/LYCgi.h | 2 | ||||
-rw-r--r-- | src/LYCharSets.h | 3 | ||||
-rw-r--r-- | src/LYCharVals.h | 2 | ||||
-rw-r--r-- | src/LYClean.h | 2 | ||||
-rw-r--r-- | src/LYCookie.c | 5 | ||||
-rw-r--r-- | src/LYCookie.h | 3 | ||||
-rw-r--r-- | src/LYCurses.c | 2 | ||||
-rw-r--r-- | src/LYCurses.h | 10 | ||||
-rw-r--r-- | src/LYEdit.h | 2 | ||||
-rw-r--r-- | src/LYHash.h | 2 | ||||
-rw-r--r-- | src/LYKeymap.h | 2 | ||||
-rw-r--r-- | src/LYLocal.c | 7 | ||||
-rw-r--r-- | src/LYMainLoop.c | 6 | ||||
-rw-r--r-- | src/LYMainLoop.h | 2 | ||||
-rw-r--r-- | src/LYMap.h | 3 | ||||
-rw-r--r-- | src/LYTraversal.h | 2 | ||||
-rw-r--r-- | src/LYrcFile.c | 4 | ||||
-rw-r--r-- | src/UCdomap.h | 3 |
23 files changed, 74 insertions, 11 deletions
diff --git a/src/GridText.c b/src/GridText.c index 43cf525f..edaca017 100644 --- a/src/GridText.c +++ b/src/GridText.c @@ -6269,11 +6269,6 @@ PUBLIC BOOLEAN HTreparse_document NOARGS } } - /* - * I have no idea what this does, but it seems to be necessary... -dsb - */ - LYUCPopAssumed(); - CTRACE(tfp, "Reparse %s\n", (ok ? "succeeded" : "failed")); if (ok) { diff --git a/src/HTAlert.h b/src/HTAlert.h index 97026647..f9559036 100644 --- a/src/HTAlert.h +++ b/src/HTAlert.h @@ -8,7 +8,9 @@ #ifndef HTALERT_H #define HTALERT_H 1 +#ifndef HTUTILS_H #include <HTUtils.h> +#endif #define ALERT_PREFIX_LEN 5 diff --git a/src/HTML.c b/src/HTML.c index b78d5ac0..13e572e9 100644 --- a/src/HTML.c +++ b/src/HTML.c @@ -7734,19 +7734,25 @@ PRIVATE HTStream* CacheThru_new ARGS2( { char filename[LY_MAXPATH]; HTStream *stream = NULL; -/* HTProtocol *p = (HTProtocol *)anchor->protocol; */ + HTProtocol *p = (HTProtocol *)anchor->protocol; /* * Neatly and transparently vanish if source caching is disabled. */ if (LYCacheSource == SOURCE_CACHE_NONE) return target; -/* + +#ifndef DEBUG_SOURCE_CACHE + /* Only remote HTML documents may benefits from HTreparse_document(), */ + /* oh, assume http protocol: */ if (strcmp(p->name, "http") != 0) { CTRACE(tfp, "Protocol is \"%s\"; not caching\n", p->name); return target; } -*/ +#else + /* all HTStreams will be cached */ +#endif + stream = (HTStream *) malloc(sizeof(*stream)); if (!stream) outofmem(__FILE__, "CacheThru_new"); diff --git a/src/HTML.h b/src/HTML.h index 22caa7b7..69074324 100644 --- a/src/HTML.h +++ b/src/HTML.h @@ -10,6 +10,7 @@ #ifndef HTUTILS_H #include <HTUtils.h> #endif /* HTUTILS_H */ + #include <UCDefs.h> #include <UCAux.h> #include <HTAnchor.h> diff --git a/src/HTSaveToFile.h b/src/HTSaveToFile.h index 4374f7a4..995a01f3 100644 --- a/src/HTSaveToFile.h +++ b/src/HTSaveToFile.h @@ -1,7 +1,10 @@ #ifndef HTSAVETOFILE_H #define HTSAVETOFILE_H +#ifndef HTUTILS_H #include <HTUtils.h> +#endif + #include <HTStream.h> #include <HTFormat.h> diff --git a/src/LYCgi.h b/src/LYCgi.h index b0e1cd63..c800c4db 100644 --- a/src/LYCgi.h +++ b/src/LYCgi.h @@ -1,7 +1,9 @@ #ifndef LYCGI_H #define LYCGI_H +#ifndef HTUTILS_H #include <HTUtils.h> +#endif extern void add_lynxcgi_environment PARAMS((CONST char *variable_name)); diff --git a/src/LYCharSets.h b/src/LYCharSets.h index b5a889f7..5d35ee40 100644 --- a/src/LYCharSets.h +++ b/src/LYCharSets.h @@ -1,7 +1,10 @@ #ifndef LYCHARSETS_H #define LYCHARSETS_H +#ifndef HTUTILS_H #include <HTUtils.h> +#endif + #include <UCDefs.h> #ifndef UCMAP_H diff --git a/src/LYCharVals.h b/src/LYCharVals.h index 2b985cce..18da1245 100644 --- a/src/LYCharVals.h +++ b/src/LYCharVals.h @@ -1,7 +1,9 @@ #ifndef LYCHARVALS_H #define LYCHARVALS_H 1 +#ifndef HTUTILS_H #include <HTUtils.h> +#endif /* * Use integer values for character constants rather than '\octal' form, since diff --git a/src/LYClean.h b/src/LYClean.h index f19d08e3..08460408 100644 --- a/src/LYClean.h +++ b/src/LYClean.h @@ -1,7 +1,9 @@ #ifndef LYCLEAN_H #define LYCLEAN_H +#ifndef HTUTILS_H #include <HTUtils.h> +#endif #ifdef VMS extern BOOLEAN HadVMSInterrupt; diff --git a/src/LYCookie.c b/src/LYCookie.c index a4ede1d3..9792e533 100644 --- a/src/LYCookie.c +++ b/src/LYCookie.c @@ -338,6 +338,8 @@ PRIVATE void store_cookie ARGS3( co = NULL; FREE(msg); return; + } else { + FREE(msg); } } } @@ -2284,7 +2286,10 @@ PRIVATE int LYHandleCookies ARGS4 ( * Delete it if confirmed. - FM */ if (HTConfirm(DELETE_COOKIE_CONFIRMATION) == FALSE) + { + FREE(lynxID); return(HT_NO_DATA); + } HTList_removeObject(de->cookie_list, co); freeCookie(co); co = NULL; diff --git a/src/LYCookie.h b/src/LYCookie.h index 104e44cc..b811e371 100644 --- a/src/LYCookie.h +++ b/src/LYCookie.h @@ -1,7 +1,10 @@ #ifndef LYCOOKIES_H #define LYCOOKIES_H +#ifndef HTUTILS_H #include <HTUtils.h> +#endif + #include <HTList.h> typedef enum {ACCEPT_ALWAYS, REJECT_ALWAYS, QUERY_USER, FROM_FILE} behaviour; diff --git a/src/LYCurses.c b/src/LYCurses.c index df255d2d..a8a8c641 100644 --- a/src/LYCurses.c +++ b/src/LYCurses.c @@ -1058,7 +1058,7 @@ PUBLIC BOOLEAN setup ARGS1( PUBLIC BOOLEAN setup ARGS1( char *, terminal) { - char *term_putenv; + char *term_putenv = NULL; char *buffer = NULL; char *cp; #if defined(HAVE_SIZECHANGE) && !defined(USE_SLANG) && defined(NOTDEFINED) diff --git a/src/LYCurses.h b/src/LYCurses.h index 74b9688c..bf0dc014 100644 --- a/src/LYCurses.h +++ b/src/LYCurses.h @@ -1,7 +1,9 @@ #ifndef LYCURSES_H #define LYCURSES_H +#ifndef HTUTILS_H #include <HTUtils.h> +#endif /* * The simple color scheme maps the 8 combinations of bold/underline/reverse @@ -343,6 +345,14 @@ extern int lynx_chg_color PARAMS((int, int, int)); #else /* Not FANCY_CURSES: */ +#ifdef COLOR_CURSES +#undef COLOR_CURSES +Error FANCY_CURSES +There is a problem with the configuration. We expect to have FANCY_CURSES +defined when COLOR_CURSES is defined, since we build on the attributes used in +FANCY_CURSES. Check your config.log to see why the FANCY_CURSES test failed. +#endif + /* * We only have [w]standout() and [w]standin(), * so we'll use them synonymously for bold and diff --git a/src/LYEdit.h b/src/LYEdit.h index 3eaa0e73..84fec84a 100644 --- a/src/LYEdit.h +++ b/src/LYEdit.h @@ -1,7 +1,9 @@ #ifndef LYEDIT_H #define LYEDIT_H +#ifndef HTUTILS_H #include <HTUtils.h> +#endif extern int edit_current_file PARAMS((char *newfile, int cur, int lineno)); diff --git a/src/LYHash.h b/src/LYHash.h index 0d562cff..d12e4406 100644 --- a/src/LYHash.h +++ b/src/LYHash.h @@ -1,7 +1,9 @@ #if !defined(_LYHASH_H_) #define _LYHASH_H_ 1 +#ifndef HTUTILS_H #include <HTUtils.h> +#endif struct _hashbucket { char *name; /* name of this item */ diff --git a/src/LYKeymap.h b/src/LYKeymap.h index 774a9823..c7e3b634 100644 --- a/src/LYKeymap.h +++ b/src/LYKeymap.h @@ -1,7 +1,9 @@ #ifndef LYKEYMAP_H #define LYKEYMAP_H +#ifndef HTUTILS_H #include <HTUtils.h> +#endif extern BOOLEAN LYisNonAlnumKeyname PARAMS((int ch, int key_name)); extern char *key_for_func PARAMS((int func)); diff --git a/src/LYLocal.c b/src/LYLocal.c index 1b41f350..04a85fa2 100644 --- a/src/LYLocal.c +++ b/src/LYLocal.c @@ -1345,7 +1345,7 @@ PUBLIC int local_dired ARGS1( { char *line_url; /* will point to doc's address, which is a URL */ char *line = NULL; /* same as line_url, but HTUnEscaped, will be alloced */ - char *tp; + char *tp = NULL; char *tmpbuf = NULL; char *buffer = NULL; char *dirname = NULL; @@ -1360,7 +1360,6 @@ PUBLIC int local_dired ARGS1( HTUnEscape(line); /* _file_ (not URL) syntax, for those functions that need it. Don't forget to FREE it. */ - tp = NULL; if (!strncmp(line, "LYNXDIRED://NEW_FILE", 20)) { if (create_file(&line[20]) > 0) LYforce_no_cache = TRUE; @@ -1370,6 +1369,7 @@ PUBLIC int local_dired ARGS1( } else if (!strncmp(line, "LYNXDIRED://INSTALL_SRC", 23)) { local_install(NULL, &line[23], &tp); StrAllocCopy(doc->address, tp); + FREE(tp); FREE(line); return 0; } else if (!strncmp(line, "LYNXDIRED://INSTALL_DEST", 24)) { @@ -1393,6 +1393,7 @@ PUBLIC int local_dired ARGS1( */ StrAllocCopy(doc->address, tp); FREE(line); + FREE(tp); return 0; } else if (!strncmp(line, "LYNXDIRED://PERMIT_LOCATION", 27)) { permit_location(&line_url[27], NULL, &tp); @@ -1570,6 +1571,7 @@ PUBLIC int local_dired ARGS1( FREE(tmpbuf); FREE(buffer); FREE(line); + FREE(tp); LYpop(doc); return 0; } @@ -1609,6 +1611,7 @@ PUBLIC int dired_options ARGS2( cp = HTpartURL_toFile(doc->address); strcpy(dir, cp); LYTrimPathSep(dir); + FREE(cp); if (doc->link > -1 && doc->link < (nlinks+1)) { cp = HTfullURL_toFile(links[doc->link].lname); diff --git a/src/LYMainLoop.c b/src/LYMainLoop.c index 0997b953..685b82ab 100644 --- a/src/LYMainLoop.c +++ b/src/LYMainLoop.c @@ -1267,6 +1267,11 @@ try_again: * to Newline, so we get a redraw. */ curdoc.line = -1; + + /* + * I have no idea what this does, but it seems to be necessary... -dsb + */ + LYUCPopAssumed(); } #endif @@ -2778,6 +2783,7 @@ new_cmd: /* newdoc.isHEAD = FALSE; newdoc.safe = FALSE; newdoc.internal_link = FALSE; + newdoc.link = 1; /*@@@ bypass "recent statusline messages" link */ FREE(curdoc.address); /* so it doesn't get pushed */ refresh_screen = TRUE; diff --git a/src/LYMainLoop.h b/src/LYMainLoop.h index 33dd0bd7..4b9b562f 100644 --- a/src/LYMainLoop.h +++ b/src/LYMainLoop.h @@ -1,7 +1,9 @@ #ifndef LYMAINLOOP_H #define LYMAINLOOP_H +#ifndef HTUTILS_H #include <HTUtils.h> +#endif #define TEXTAREA_EXPAND_SIZE 5 #define AUTOGROW diff --git a/src/LYMap.h b/src/LYMap.h index 0ce31797..077347a8 100644 --- a/src/LYMap.h +++ b/src/LYMap.h @@ -1,7 +1,10 @@ #ifndef LYMAP_H #define LYMAP_H +#ifndef HTUTILS_H #include <HTUtils.h> +#endif + #include <HTList.h> #include <HTAnchor.h> diff --git a/src/LYTraversal.h b/src/LYTraversal.h index e6cb01bb..052570d3 100644 --- a/src/LYTraversal.h +++ b/src/LYTraversal.h @@ -3,7 +3,9 @@ #ifndef TRAVERSAL_H #define TRAVERSAL_H +#ifndef HTUTILS_H #include <HTUtils.h> /* BOOL, PARAMS, ARGS */ +#endif extern BOOLEAN lookup PARAMS((char * target)); extern void add_to_table PARAMS((char * target)); diff --git a/src/LYrcFile.c b/src/LYrcFile.c index 50c5409d..2a81edd6 100644 --- a/src/LYrcFile.c +++ b/src/LYrcFile.c @@ -467,6 +467,7 @@ PUBLIC void read_rc NOPARAMS user_mode = NOVICE_MODE; } +#ifdef NOTUSED #ifdef DISP_PARTIAL /* * Partial display logic--set the threshold # of lines before @@ -477,6 +478,7 @@ PUBLIC void read_rc NOPARAMS if (atoi(cp) != 0) partial_threshold = atoi(cp); #endif /* DISP_PARTIAL */ +#endif /* NOTUSED */ #ifdef ALLOW_USERS_TO_CHANGE_EXEC_WITHIN_OPTIONS /* @@ -854,6 +856,7 @@ enabled.\n\ ((keypad_mode == LINKS_ARE_NUMBERED) ? "LINKS_ARE_NUMBERED" : "LINKS_AND_FORM_FIELDS_ARE_NUMBERED"))); +#ifdef NOTUSED #ifdef DISP_PARTIAL /* * Partial display threshold @@ -867,6 +870,7 @@ partial_thres=-1 would use the entire screensize\n\ ")); fprintf(fp, "partial_thres=%d\n\n", partial_threshold); #endif /* DISP_PARTIAL */ +#endif /* NOTUSED */ /* * Line edit mode. diff --git a/src/UCdomap.h b/src/UCdomap.h index 0b501f42..76b56841 100644 --- a/src/UCdomap.h +++ b/src/UCdomap.h @@ -1,7 +1,10 @@ #ifndef UCDOMAP_H #define UCDOMAP_H +#ifndef HTUTILS_H #include <HTUtils.h> +#endif + #include <UCkd.h> /* |