diff options
author | Thomas E. Dickey <dickey@invisible-island.net> | 2000-04-01 00:54:50 -0500 |
---|---|---|
committer | Thomas E. Dickey <dickey@invisible-island.net> | 2000-04-01 00:54:50 -0500 |
commit | 4c510de6f295a8d3377bdb81f18050190ee58a59 (patch) | |
tree | b6597ca1fcb050d1842044030a5daa8d934814fa /WWW/Library/Implementation | |
parent | c68ecb8b21bef3908cb17f8d1d4af694bf7e7137 (diff) | |
download | lynx-snapshots-4c510de6f295a8d3377bdb81f18050190ee58a59.tar.gz |
snapshot of project "lynx", label v2-8-3pre_1
Diffstat (limited to 'WWW/Library/Implementation')
-rw-r--r-- | WWW/Library/Implementation/HTFile.c | 4 | ||||
-rw-r--r-- | WWW/Library/Implementation/HTFile.h | 2 | ||||
-rw-r--r-- | WWW/Library/Implementation/HTFormat.c | 12 | ||||
-rw-r--r-- | WWW/Library/Implementation/HTFormat.h | 6 | ||||
-rw-r--r-- | WWW/Library/Implementation/HTRules.c | 6 | ||||
-rw-r--r-- | WWW/Library/Implementation/HTTCP.c | 26 | ||||
-rw-r--r-- | WWW/Library/Implementation/HTTCP.h | 5 | ||||
-rw-r--r-- | WWW/Library/Implementation/HTVMSUtils.c | 9 | ||||
-rw-r--r-- | WWW/Library/Implementation/www_tcp.h | 2 |
9 files changed, 37 insertions, 35 deletions
diff --git a/WWW/Library/Implementation/HTFile.c b/WWW/Library/Implementation/HTFile.c index 571968c9..8a1ad8cd 100644 --- a/WWW/Library/Implementation/HTFile.c +++ b/WWW/Library/Implementation/HTFile.c @@ -463,7 +463,7 @@ PUBLIC void HTSetSuffix5 ARGS5( CONST char *, representation, CONST char *, encoding, CONST char *, desc, - float, value) + double, value) { HTSuffix * suff; BOOL trivial_enc = (BOOL) IsUnityEncStr(encoding); @@ -516,7 +516,7 @@ PUBLIC void HTSetSuffix5 ARGS5( StrAllocCopy(suff->desc, desc); - suff->quality = value; + suff->quality = (float) value; } #ifdef LY_FIND_LEAKS diff --git a/WWW/Library/Implementation/HTFile.h b/WWW/Library/Implementation/HTFile.h index d2207645..2cb1d92a 100644 --- a/WWW/Library/Implementation/HTFile.h +++ b/WWW/Library/Implementation/HTFile.h @@ -127,7 +127,7 @@ extern void HTSetSuffix5 PARAMS(( CONST char * representation, CONST char * encoding, CONST char * desc, - float quality)); + double quality)); #define HTSetSuffix(suff,rep,enc,q) HTSetSuffix5(suff, rep, enc, NULL, q) diff --git a/WWW/Library/Implementation/HTFormat.c b/WWW/Library/Implementation/HTFormat.c index 37a3172e..68b5f7c3 100644 --- a/WWW/Library/Implementation/HTFormat.c +++ b/WWW/Library/Implementation/HTFormat.c @@ -90,9 +90,9 @@ PRIVATE void HTFreePresentations NOPARAMS; PUBLIC void HTSetPresentation ARGS6( CONST char *, representation, CONST char *, command, - float, quality, - float, secs, - float, secs_per_byte, + double, quality, + double, secs, + double, secs_per_byte, long int, maxbytes) { HTPresentation * pres = (HTPresentation *)malloc(sizeof(HTPresentation)); @@ -102,9 +102,9 @@ PUBLIC void HTSetPresentation ARGS6( pres->rep = HTAtom_for(representation); pres->rep_out = WWW_PRESENT; /* Fixed for now ... :-) */ pres->converter = HTSaveAndExecute; /* Fixed for now ... */ - pres->quality = quality; - pres->secs = secs; - pres->secs_per_byte = secs_per_byte; + pres->quality = (float) quality; + pres->secs = (float) secs; + pres->secs_per_byte = (float) secs_per_byte; pres->maxbytes = maxbytes; pres->command = NULL; StrAllocCopy(pres->command, command); diff --git a/WWW/Library/Implementation/HTFormat.h b/WWW/Library/Implementation/HTFormat.h index a60e44ac..b1fbf8b4 100644 --- a/WWW/Library/Implementation/HTFormat.h +++ b/WWW/Library/Implementation/HTFormat.h @@ -210,9 +210,9 @@ HTSetPresentation: Register a system command to present a format extern void HTSetPresentation PARAMS(( CONST char * representation, CONST char * command, - float quality, - float secs, - float secs_per_byte, + double quality, + double secs, + double secs_per_byte, long int maxbytes )); diff --git a/WWW/Library/Implementation/HTRules.c b/WWW/Library/Implementation/HTRules.c index e8177af1..def5f7dd 100644 --- a/WWW/Library/Implementation/HTRules.c +++ b/WWW/Library/Implementation/HTRules.c @@ -473,9 +473,9 @@ PUBLIC int HTSetConfiguration ARGS1( &quality, &secs, &secs_per_byte, &maxbytes); else status = 0; HTSetPresentation(word2, word3, - status >= 1 ? quality : (float) 1.0, - status >= 2 ? secs : (float) 0.0, - status >= 3 ? secs_per_byte : (float) 0.0, + status >= 1 ? quality : 1.0, + status >= 2 ? secs : 0.0, + status >= 3 ? secs_per_byte : 0.0, status >= 4 ? maxbytes : 0 ); } else if (0==strncasecomp(word1, "htbin", 5) || diff --git a/WWW/Library/Implementation/HTTCP.c b/WWW/Library/Implementation/HTTCP.c index 0f2c0a28..ac8f6096 100644 --- a/WWW/Library/Implementation/HTTCP.c +++ b/WWW/Library/Implementation/HTTCP.c @@ -330,10 +330,10 @@ PUBLIC CONST char * HTInetString ARGS1( ** returns 1 if valid, otherwise 0. */ PUBLIC BOOL valid_hostname ARGS1( - CONST char *, name) + char *, name) { int i=1, iseg = 0; - CONST char *cp = name; + char *cp = name; if (!(name && *name)) return NO; for (; (*cp && i <= 253); cp++, i++) { @@ -623,10 +623,10 @@ extern int h_errno; ** HT_INTERNAL Internal error */ PUBLIC struct hostent * LYGetHostByName ARGS1( - CONST char *, str) + char *, str) { #ifndef _WINDOWS_NSL - CONST char *host = str; + char *host = str; #endif #ifdef NSL_FORK /* for transfer of result between from child to parent: */ @@ -720,10 +720,10 @@ PUBLIC struct hostent * LYGetHostByName ARGS1( */ pid_t fpid, waitret; int pfd[2], selret, readret, waitstat = 0; - time_t start_time = time(NULL); + time_t start_time = time((time_t *)0); fd_set readfds; struct timeval timeout; - int dns_patience = 30; /* how many seconds will we wait for DNS? */ + long dns_patience = 30; /* how many seconds will we wait for DNS? */ int child_exited = 0; /* @@ -894,7 +894,7 @@ PUBLIC struct hostent * LYGetHostByName ARGS1( goto failed; } - while (child_exited || time(NULL) - start_time < dns_patience) { + while (child_exited || (long)(time((time_t *)0) - start_time) < dns_patience) { FD_ZERO(&readfds); /* @@ -1074,11 +1074,11 @@ PUBLIC struct hostent * LYGetHostByName ARGS1( if (!system_is_NT) { /* for Windows9x */ unsigned long t; - t = (unsigned long)inet_addr((char *)host); + t = (unsigned long)inet_addr(host); if ((int)t != -1) phost = gethostbyaddr((char *)&t, sizeof (t), AF_INET); else - phost = gethostbyname((char *)host); + phost = gethostbyname(host); } else { /* for Windows NT */ phost = (struct hostent *) NULL; hThread = CreateThread((void *)NULL, 4096UL, @@ -1114,7 +1114,7 @@ PUBLIC struct hostent * LYGetHostByName ARGS1( #else /* !NSL_FORK, !_WINDOWS_NSL: */ { struct hostent *phost; - phost = gethostbyname((char *)host); /* See netdb.h */ + phost = gethostbyname(host); /* See netdb.h */ #ifdef MVS CTRACE((tfp, "LYGetHostByName: gethostbyname() returned %d\n", phost)); #endif /* MVS */ @@ -1405,7 +1405,7 @@ PRIVATE void get_host_details NOARGS #ifndef DECNET /* Decnet ain't got no damn name server 8#OO */ #ifdef NEED_HOST_ADDRESS /* no -- needs name server! */ - phost = gethostbyname((CONST char *)name); /* See netdb.h */ + phost = gethostbyname(name); /* See netdb.h */ if (!OK_HOST(phost)) { CTRACE((tfp, "TCP: Can't find my own internet node address for `%s'!!\n", name)); @@ -1471,7 +1471,7 @@ PUBLIC int HTDoConnect ARGS4( } FREE(p1); - HTSprintf0 (&line, gettext("Looking up %s."), host); + HTSprintf0 (&line, "%s%s", WWW_FIND_MESSAGE, host); _HTProgress (line); status = HTParseInet(soc_in, host); if (status) { @@ -1494,7 +1494,7 @@ PUBLIC int HTDoConnect ARGS4( return status; } - HTSprintf0 (&line, gettext("Making %s connection to %s."), protocol, host); + HTSprintf0 (&line, gettext("Making %s connection to %s"), protocol, host); _HTProgress (line); FREE(host); FREE(line); diff --git a/WWW/Library/Implementation/HTTCP.h b/WWW/Library/Implementation/HTTCP.h index 8644b69d..56a0ee31 100644 --- a/WWW/Library/Implementation/HTTCP.h +++ b/WWW/Library/Implementation/HTTCP.h @@ -66,7 +66,7 @@ extern unsigned int HTCardinal PARAMS((int *pstatus, ** ------------------------------------------------- */ -extern BOOL valid_hostname PARAMS((CONST char * name)); +extern BOOL valid_hostname PARAMS((char * name)); /* Resolve an internet hostname, like gethostbyname ** ------------------------------------------------ @@ -87,8 +87,7 @@ extern int lynx_nsl_status; #if defined(__DJGPP__) && !defined(WATT32) #define LYGetHostByName(host) resolv(host) /* we'll use it the same way */ #else -extern struct hostent * LYGetHostByName PARAMS(( - CONST char * str)); +extern struct hostent * LYGetHostByName PARAMS((char * str)); #endif diff --git a/WWW/Library/Implementation/HTVMSUtils.c b/WWW/Library/Implementation/HTVMSUtils.c index 5ec51d5f..f4209ce2 100644 --- a/WWW/Library/Implementation/HTVMSUtils.c +++ b/WWW/Library/Implementation/HTVMSUtils.c @@ -35,8 +35,6 @@ #include <LYLeaks.h> #include <LYStrings.h> -#define INFINITY 512 /* File name length @@ FIXME */ - PUBLIC BOOL HTVMSFileVersions=FALSE; /* Include version numbers in listing? */ typedef struct { @@ -454,6 +452,7 @@ long status; struct dsc$descriptor_s entryname_desc; struct dsc$descriptor_s dirname_desc; static char *DirEntry; +char Actual[256]; char VMSentry[256]; char UnixEntry[256]; int index; @@ -502,12 +501,14 @@ char *dot; *dot = ']'; StrAllocCat(DirEntry,".dir"); } + /* lib$find_file needs a fixed-size buffer */ + LYstrncpy(Actual, DirEntry, sizeof(Actual)-1); dir.context = 0; - dirname_desc.dsc$w_length = strlen(DirEntry); + dirname_desc.dsc$w_length = strlen(Actual); dirname_desc.dsc$b_dtype = DSC$K_DTYPE_T; dirname_desc.dsc$b_class = DSC$K_CLASS_S; - dirname_desc.dsc$a_pointer = (char *)&(DirEntry); + dirname_desc.dsc$a_pointer = (char *)&(Actual); /* look for the directory */ entryname_desc.dsc$w_length = 255; diff --git a/WWW/Library/Implementation/www_tcp.h b/WWW/Library/Implementation/www_tcp.h index 81db0187..d1be848c 100644 --- a/WWW/Library/Implementation/www_tcp.h +++ b/WWW/Library/Implementation/www_tcp.h @@ -362,7 +362,9 @@ extern char *vms_errno_string(); #define __TIME 1 /* to avoid double definitions in in.h */ #endif /* __TIME_LOADED */ #include "multinet_root:[multinet.include.sys]time.h" +#define MULTINET_NO_PROTOTYPES /* DECC is compatible-but-different */ #include "multinet_root:[multinet.include.sys]socket.h" +#undef MULTINET_NO_PROTOTYPES #include "multinet_root:[multinet.include.netinet]in.h" #include "multinet_root:[multinet.include.arpa]inet.h" #include "multinet_root:[multinet.include]netdb.h" |