diff options
author | Thomas E. Dickey <dickey@invisible-island.net> | 2005-12-18 23:07:04 -0500 |
---|---|---|
committer | Thomas E. Dickey <dickey@invisible-island.net> | 2005-12-18 23:07:04 -0500 |
commit | 01876e39ab4775cc04d1fdc8e491fe2e7de9c1a3 (patch) | |
tree | 2a16e6763cddd84bec1fe32d69607ecc72284b51 /WWW | |
parent | c64d302821eb22d2c3d1269715a0892ddb2bb342 (diff) | |
download | lynx-snapshots-01876e39ab4775cc04d1fdc8e491fe2e7de9c1a3.tar.gz |
snapshot of project "lynx", label v2-8-6dev_16
Diffstat (limited to 'WWW')
-rw-r--r-- | WWW/Library/Implementation/HTFile.c | 5 | ||||
-rw-r--r-- | WWW/Library/Implementation/HTFile.h | 1 | ||||
-rw-r--r-- | WWW/Library/Implementation/HTMLDTD.c | 4 | ||||
-rw-r--r-- | WWW/Library/Implementation/HTTCP.c | 27 |
4 files changed, 33 insertions, 4 deletions
diff --git a/WWW/Library/Implementation/HTFile.c b/WWW/Library/Implementation/HTFile.c index a0064f53..7a647b24 100644 --- a/WWW/Library/Implementation/HTFile.c +++ b/WWW/Library/Implementation/HTFile.c @@ -2929,6 +2929,11 @@ void HTInitProgramPaths(void) path = RMDIR_PATH; break; #endif +#ifdef SETFONT_PATH + case ppSETFONT: + path = SETFONT_PATH; + break; +#endif #ifdef TAR_PATH case ppTAR: path = TAR_PATH; diff --git a/WWW/Library/Implementation/HTFile.h b/WWW/Library/Implementation/HTFile.h index 4541fb49..146857ff 100644 --- a/WWW/Library/Implementation/HTFile.h +++ b/WWW/Library/Implementation/HTFile.h @@ -301,6 +301,7 @@ extern "C" { ,ppRLOGIN ,ppRM ,ppRMDIR + ,ppSETFONT ,ppTAR ,ppTELNET ,ppTN3270 diff --git a/WWW/Library/Implementation/HTMLDTD.c b/WWW/Library/Implementation/HTMLDTD.c index 2cd6bc69..b46d8a05 100644 --- a/WWW/Library/Implementation/HTMLDTD.c +++ b/WWW/Library/Implementation/HTMLDTD.c @@ -1736,11 +1736,11 @@ void HTStartAnchor5(HTStructured * obj, const char *name, present[HTML_A_NAME] = YES; value[HTML_A_NAME] = name; } - if (href) { + if (href && *href) { present[HTML_A_HREF] = YES; value[HTML_A_HREF] = href; } - if (linktype) { + if (linktype && *linktype) { present[HTML_A_TYPE] = YES; value[HTML_A_TYPE] = linktype; } diff --git a/WWW/Library/Implementation/HTTCP.c b/WWW/Library/Implementation/HTTCP.c index 3b02528d..25cdb170 100644 --- a/WWW/Library/Implementation/HTTCP.c +++ b/WWW/Library/Implementation/HTTCP.c @@ -608,6 +608,28 @@ extern int h_errno; #endif #endif +/* + * Even though it is a small amount, we cannot count on reading the whole + * struct via a pipe in one read -TD + */ +static unsigned readit(int fd, char *buffer, unsigned length) +{ + unsigned result = 0; + + while (length != 0) { + unsigned got = read(fd, buffer, length); + + if (got != 0) { + result += got; + buffer += got; + length -= got; + } else { + break; + } + } + return result; +} + /* Resolve an internet hostname, like gethostbyname * ------------------------------------------------ * @@ -883,6 +905,7 @@ LYNX_HOSTENT *LYGetHostByName(char *str) * Return our resulting rehostent through pipe... */ write(pfd[1], rehostent, rehostentlen); + close(pfd[1]); _exit(0); } else { /* @@ -952,7 +975,7 @@ LYNX_HOSTENT *LYGetHostByName(char *str) /* * First get status, including length of address. -BL, kw */ - readret = read(pfd[0], &statuses, sizeof(statuses)); + readret = readit(pfd[0], (char *) &statuses, sizeof(statuses)); if (readret == sizeof(statuses)) { h_errno = statuses.child_h_errno; set_errno(statuses.child_errno); @@ -997,7 +1020,7 @@ LYNX_HOSTENT *LYGetHostByName(char *str) /* * Then get the full reorganized hostent. -BL, kw */ - readret = read(pfd[0], rehostent, statuses.rehostentlen); + readret = readit(pfd[0], rehostent, statuses.rehostentlen); #ifdef DEBUG_HOSTENT dump_hostent("Read from pipe", (LYNX_HOSTENT *) rehostent); #endif |