diff options
author | Thomas E. Dickey <dickey@invisible-island.net> | 2024-01-14 11:56:35 +0000 |
---|---|---|
committer | Thomas E. Dickey <dickey@invisible-island.net> | 2024-01-14 12:01:25 +0000 |
commit | 3ee8300fec5d35be98863ab0101433d348c936cc (patch) | |
tree | 56f7caa494c21f0079a13d75af8ea907b08029ef /WWW/Library | |
parent | ee37e435f2a61bd7f067d8a68d29eb9dc1ec03e6 (diff) | |
download | lynx-snapshots-3ee8300fec5d35be98863ab0101433d348c936cc.tar.gz |
snapshot of project "lynx", label v2-9-0dev_12p
Diffstat (limited to 'WWW/Library')
-rw-r--r-- | WWW/Library/Implementation/HTAccess.c | 159 | ||||
-rw-r--r-- | WWW/Library/Implementation/HTAccess.h | 34 | ||||
-rw-r--r-- | WWW/Library/Implementation/HTTCP.c | 5 | ||||
-rw-r--r-- | WWW/Library/Implementation/HTVMSUtils.h | 2 |
4 files changed, 4 insertions, 196 deletions
diff --git a/WWW/Library/Implementation/HTAccess.c b/WWW/Library/Implementation/HTAccess.c index a79a8a24..ba81b839 100644 --- a/WWW/Library/Implementation/HTAccess.c +++ b/WWW/Library/Implementation/HTAccess.c @@ -1,5 +1,5 @@ /* - * $LynxId: HTAccess.c,v 1.85 2019/08/24 00:27:06 tom Exp $ + * $LynxId: HTAccess.c,v 1.87 2024/01/10 23:52:47 tom Exp $ * * Access Manager HTAccess.c * ============== @@ -1137,29 +1137,6 @@ BOOL HTLoadAbsolute(const DocAddress *docaddr) return result; } -#ifdef NOT_USED_CODE -/* Load a document from absolute name to stream. HTLoadToStream() - * --------------------------------------------- - * - * On Entry, - * addr The absolute address of the document to be accessed. - * sink if non-NULL, send data down this stream - * - * On Exit, - * returns YES Success in opening document - * NO Failure - */ -BOOL HTLoadToStream(const char *addr, - BOOL filter, - HTStream *sink) -{ - return HTLoadDocument(addr, - HTAnchor_findSimpleAddress(addr), - (HTOutputFormat ? HTOutputFormat : WWW_PRESENT), - sink); -} -#endif /* NOT_USED_CODE */ - /* Load a document from relative name. HTLoadRelative() * ----------------------------------- * @@ -1204,55 +1181,6 @@ BOOL HTLoadRelative(const char *relative_name, return result; } -/* Load if necessary, and select an anchor. HTLoadAnchor() - * ---------------------------------------- - * - * On Entry, - * destination The child or parent anchor to be loaded. - * - * On Exit, - * returns YES Success - * NO Failure - */ -BOOL HTLoadAnchor(HTAnchor * destination) -{ - HTParentAnchor *parent; - BOOL loaded = NO; - - if (!destination) - return NO; /* No link */ - - parent = HTAnchor_parent(destination); - - if (HTAnchor_document(parent) == NULL) { /* If not already loaded */ - /* TBL 921202 */ - BOOL result; - - result = HTLoadDocument(parent->address, - parent, - HTOutputFormat ? - HTOutputFormat : WWW_PRESENT, - HTOutputStream); - if (!result) - return NO; - loaded = YES; - } { - HText *text = (HText *) HTAnchor_document(parent); - - if ((destination != (HTAnchor *) parent) && - (destination != (HTAnchor *) (parent->parent))) { - /* If child anchor */ - HText_selectAnchor(text, /* Double display? @@ */ - (HTChildAnchor *) destination); - } else { - if (!loaded) - HText_select(text); - } - } - return YES; - -} /* HTLoadAnchor */ - /* Search. HTSearch() * ------- * @@ -1373,88 +1301,3 @@ BOOL HTSearchAbsolute(const char *keywords, anchor = HTAnchor_findAddress(&abs_doc); return HTSearch(keywords, anchor); } - -#ifdef NOT_USED_CODE -/* Generate the anchor for the home page. HTHomeAnchor() - * -------------------------------------- - * - * As it involves file access, this should only be done once - * when the program first runs. - * This is a default algorithm -- browser don't HAVE to use this. - * But consistency between browsers is STRONGLY recommended! - * - * Priority order is: - * 1 WWW_HOME environment variable (logical name, etc) - * 2 ~/WWW/default.html - * 3 /usr/local/bin/default.html - * 4 http://www.w3.org/default.html - */ -HTParentAnchor *HTHomeAnchor(void) -{ - char *my_home_document = NULL; - char *home = LYGetEnv(LOGICAL_DEFAULT); - char *ref; - HTParentAnchor *anchor; - - if (home) { - StrAllocCopy(my_home_document, home); -#define MAX_FILE_NAME 1024 /* @@@ */ - } else if (HTClientHost) { /* Telnet server */ - /* - * Someone telnets in, they get a special home. - */ - FILE *fp = fopen(REMOTE_POINTER, "r"); - char *status; - - if (fp) { - my_home_document = typecallocn(char, MAX_FILE_NAME); - - if (my_home_document == NULL) - outofmem(__FILE__, "HTHomeAnchor"); - status = fgets(my_home_document, MAX_FILE_NAME, fp); - if (!status) { - FREE(my_home_document); - } - fclose(fp); - } - if (my_home_document == NULL) - StrAllocCopy(my_home_document, REMOTE_ADDRESS); - } -#ifdef UNIX - if (my_home_document == NULL) { - FILE *fp = NULL; - char *home = LYGetEnv("HOME"); - - if (home != 0) { - HTSprintf0(&my_home_document, "%s/%s", home, PERSONAL_DEFAULT); - fp = fopen(my_home_document, "r"); - } - - if (!fp) { - StrAllocCopy(my_home_document, LOCAL_DEFAULT_FILE); - fp = fopen(my_home_document, "r"); - } - if (fp) { - fclose(fp); - } else { - CTRACE((tfp, "HTBrowse: No local home document ~/%s or %s\n", - PERSONAL_DEFAULT, LOCAL_DEFAULT_FILE)); - FREE(my_home_document); - } - } -#endif /* UNIX */ - ref = HTParse((my_home_document ? - my_home_document : (HTClientHost ? - REMOTE_ADDRESS : LAST_RESORT)), - STR_FILE_URL, - PARSE_ALL_WITHOUT_ANCHOR); - if (my_home_document) { - CTRACE((tfp, "HTAccess: Using custom home page %s i.e., address %s\n", - my_home_document, ref)); - FREE(my_home_document); - } - anchor = HTAnchor_findSimpleAddress(ref); - FREE(ref); - return anchor; -} -#endif /* NOT_USED_CODE */ diff --git a/WWW/Library/Implementation/HTAccess.h b/WWW/Library/Implementation/HTAccess.h index b898535c..5ee5ba91 100644 --- a/WWW/Library/Implementation/HTAccess.h +++ b/WWW/Library/Implementation/HTAccess.h @@ -1,5 +1,5 @@ /* - * $LynxId: HTAccess.h,v 1.21 2019/08/23 23:51:45 tom Exp $ + * $LynxId: HTAccess.h,v 1.22 2024/01/10 23:54:11 tom Exp $ * HTAccess: Access manager for libwww * ACCESS MANAGER * @@ -137,38 +137,6 @@ Load a document from absolute name /* -Load a document from absolute name to a stream - - ON ENTRY, - addr The absolute address of the document to be accessed. - filter_it if YES, treat document as HTML - - ON EXIT, - returns YES Success in opening document - NO Failure - - Note: This is equivalent to HTLoadDocument - - */ - extern BOOL HTLoadToStream(const char *addr, BOOL filter_it, - HTStream *sink); - -/* - -Load if necessary, and select an anchor - - ON ENTRY, - destination The child or parent anchor to be loaded. - - ON EXIT, - returns YES Success - returns NO Failure - - */ - extern BOOL HTLoadAnchor(HTAnchor * destination); - -/* - Make a stream for Saving object back ON ENTRY, diff --git a/WWW/Library/Implementation/HTTCP.c b/WWW/Library/Implementation/HTTCP.c index ae121680..de5551ef 100644 --- a/WWW/Library/Implementation/HTTCP.c +++ b/WWW/Library/Implementation/HTTCP.c @@ -1,5 +1,5 @@ /* - * $LynxId: HTTCP.c,v 1.167 2023/11/06 00:44:34 tom Exp $ + * $LynxId: HTTCP.c,v 1.168 2024/01/14 11:00:25 tom Exp $ * * Generic Communication Code HTTCP.c * ========================== @@ -2489,9 +2489,6 @@ int HTDoRead(int fildes, break; } else if (ret > 0) { ready = TRUE; - } else if (ret == 0 && (errno == EINPROGRESS || errno == EALREADY)) { - result = 0; - break; } else if (HTWasInterrupted(&result)) { break; } diff --git a/WWW/Library/Implementation/HTVMSUtils.h b/WWW/Library/Implementation/HTVMSUtils.h index d7efe8c4..10b9c97e 100644 --- a/WWW/Library/Implementation/HTVMSUtils.h +++ b/WWW/Library/Implementation/HTVMSUtils.h @@ -85,7 +85,7 @@ extern "C" { * * */ - const extern char *HTVMS_wwwName(const char *vmsname); + extern const char *HTVMS_wwwName(const char *vmsname); extern int HTVMSBrowseDir(const char *address, HTParentAnchor *anchor, |