diff -c libwww-2.09a/htfile.c libwww-2.new/htfile.c
*** libwww-2.09a/htfile.c Fri Oct 22 16:00:02 1993
--- libwww-2.new/htfile.c Thu Oct 21 14:32:10 1993
***************
*** 670,675 ****
--- 670,678 ----
#ifdef PCNFS
#define NO_GROUPS
#endif
+ #ifdef DESQ /* POHC */
+ #define NO_GROUPS
+ #endif
PUBLIC BOOL HTEditable ARGS1 (CONST char *,filename)
{
***************
*** 919,926 ****
--- 922,931 ----
while (dirbuf = readdir(dp)) {
/* while there are directory entries to be read */
+ #ifndef MSDOS /* POHC: I have not seen any DOS dirent with d_fileno or d_ino */
if (dirbuf->d_ino == 0) continue;
/* if the entry is not being used, skip it */
+ #endif /* MSDOS */
if (!strncmp(dirbuf->d_name, base, baselen)) {
HTFormat rep = HTFileFormat(dirbuf->d_name, &encoding,
***************
*** 1097,1104 ****
if(strcmp(dataptr,".") == 0) continue;
/* If its .. *and* the current directory is / dont show anything, otherwise
! /* print out a nice Parent Directory entry.
! /* */
if(strcmp(dataptr,"..") == 0)
{
--- 1102,1109 ----
if(strcmp(dataptr,".") == 0) continue;
/* If its .. *and* the current directory is / dont show anything, otherwise
! * print out a nice Parent Directory entry.
! * */
if(strcmp(dataptr,"..") == 0)
{
***************
*** 1170,1178 ****
--- 1175,1187 ----
if(cmpr == 0)
{
HText_appendText(HT, "
fp);
+ #ifndef USE_REMOVE /* POHC */
sprintf (cmd, "/bin/rm -f %s &", me->fnam);
system (cmd);
free (cmd);
+ #else
+ remove(me->fnam);
+ #endif
me->interrupted = 1;
***************
*** 261,266 ****
--- 265,282 ----
me->fnam = (char *)malloc (L_tmpnam + 16 + strlen(suffix));
tmpnam (me->fnam);
+
+ #ifdef DOSNAMES /* POHC */
+ { char *tmp;
+ for(tmp=me->fnam ; *tmp; tmp++) if (*tmp == '/') *tmp = '\\';
+ }
+ #endif
+ #ifdef __HIGHC__ /* POHC */
+ { char *dottmp = strrchr(me->fnam,'.') ;
+ if (dottmp) *dottmp = '0'; /* Remove the suffice (DOS can only have one). */
+ }
+ #endif
+
if (suffix) strcat(me->fnam, suffix);
}
else
***************
*** 268,274 ****
me->fnam = strdup (force_dump_filename);
}
! me->fp = fopen (me->fnam, "w");
if (!me->fp)
{
HTProgress("Can't open temporary file -- serious problem.");
--- 284,290 ----
me->fnam = strdup (force_dump_filename);
}
! me->fp = fopen (me->fnam, "wb"); /* POHC: It should'nt always be binary, but I'm tired. */
if (!me->fp)
{
HTProgress("Can't open temporary file -- serious problem.");
***************
*** 298,305 ****
--- 314,326 ----
me->end_command = (char *)malloc
((strlen (command) + 32 + strlen(me->fnam)) * sizeof (char));
+ #ifdef DESQ /* POHC */
+ sprintf (me->end_command, "runthese ( %s ; rm %s ) &",
+ command, me->fnam);
+ #else
sprintf (me->end_command, "(%s ; /bin/rm -f %s) &",
command, me->fnam);
+ #endif
#if 0
fprintf (stderr, "[HTFWriter] generated '%s'\n",
diff -c libwww-2.09a/httcp.c libwww-2.new/httcp.c
*** libwww-2.09a/httcp.c Fri Oct 22 16:00:06 1993
--- libwww-2.new/httcp.c Thu Oct 21 06:52:38 1993
***************
*** 28,33 ****
--- 28,38 ----
#define FD_SETSIZE 256
#endif
+ /* DESQview/X does not have EALREADY */
+ #ifndef EALREADY /* POHC */
+ #define EALREADY EINPROGRESS
+ #endif
+
/* Module-Wide variables
*/
***************
*** 54,61 ****
--- 59,68 ----
extern int errno;
#endif /* errno */
+ #ifndef __WATCOMC__ /* POHC */
extern char *sys_errlist[]; /* see man perror on cernvax */
extern int sys_nerr;
+ #endif /* __WATCOMC__ */
/* Report Internet Error
** ---------------------
***************
*** 254,259 ****
--- 261,274 ----
#endif
{
get_host_details();
+ #ifdef DESQ /* POHC */
+ /* gethostname() is assumed never to fail. DESQview/X standalone
+ supports AF_UNIX but not AF_INET, gethostname() is a type of
+ AF_INET call. Fixes coredumps - strcmp(host, HTHostName()) -
+ in HTFile.c. */
+ if (!hostname) return("localhost");
+ else
+ #endif
return hostname;
}
***************
*** 298,304 ****
*/
{
int ret;
! int val = 1;
char line[256];
ret = ioctl(*s, FIONBIO, &val);
--- 313,319 ----
*/
{
int ret;
! long val = 1; /* POHC was int */
char line[256];
ret = ioctl(*s, FIONBIO, &val);
***************
*** 370,376 ****
if (status >= 0)
{
int ret;
! int val = 0;
char line[256];
ret = ioctl(*s, FIONBIO, &val);
--- 385,391 ----
if (status >= 0)
{
int ret;
! long val = 0; /* POHC Was int */
char line[256];
ret = ioctl(*s, FIONBIO, &val);
diff -c libwww-2.09a/httelnet.c libwww-2.new/httelnet.c
*** libwww-2.09a/httelnet.c Fri Oct 22 16:00:12 1993
--- libwww-2.new/httelnet.c Thu Oct 21 06:52:58 1993
***************
*** 77,83 ****
if (login_protocol == rlogin)
{
/* For rlogin, we should use -l user. */
! sprintf(command, "%s -e %s %s %s %s %s &", xterm_str, access,
hostname,
port ? port : "",
user ? "-l" : "",
--- 77,83 ----
if (login_protocol == rlogin)
{
/* For rlogin, we should use -l user. */
! sprintf(command, XTERM_FORMAT_STR1, xterm_str, access, /* POHC */
hostname,
port ? port : "",
user ? "-l" : "",
***************
*** 87,93 ****
{
/* For telnet, -l isn't safe to use at all -- most platforms
don't understand it. */
! sprintf(command, "%s -e %s %s %s &", xterm_str, access,
hostname,
port ? port : "");
}
--- 87,93 ----
{
/* For telnet, -l isn't safe to use at all -- most platforms
don't understand it. */
! sprintf(command, XTERM_FORMAT_STR2, xterm_str, access, /* POHC */
hostname,
port ? port : "");
}
diff -c libwww-2.09a/httelnet.h libwww-2.new/httelnet.h
*** libwww-2.09a/httelnet.h Fri Oct 22 16:00:12 1993
--- libwww-2.new/httelnet.h Thu Oct 21 06:52:58 1993
***************
*** 12,17 ****
--- 12,25 ----
extern HTProtocol HTRlogin;
extern HTProtocol HTTn3270;
+ #ifndef DESQ /* POHC */
+ #define XTERM_FORMAT_STR1 "%s -e %s %s %s %s %s &"
+ #define XTERM_FORMAT_STR2 "%s -e %s %s %s &"
+ #else
+ #define XTERM_FORMAT_STR1 "%s %s %s %s %s %s &"
+ #define XTERM_FORMAT_STR2 "%s %s %s %s &"
+ #endif
+
#endif
Only in libwww-2.new: libwww.a
diff -c libwww-2.09a/tcp.h libwww-2.new/tcp.h
*** libwww-2.09a/tcp.h Fri Oct 22 16:00:16 1993
--- libwww-2.new/tcp.h Thu Oct 21 06:53:34 1993
***************
*** 208,214 ****
--- 208,234 ----
extern int errno;
#endif
+ /* DESQview/X version:
+ ** -------------------
+ **
+ ** Ported by Peter Crowley
+ */
+
+ #ifdef DESQ /* POHC */
+
+ #define USE_DIRENT
+
+ #undef NETCLOSE
+ #undef NETREAD
+ #undef NETWRITE
+ #define NETCLOSE(a) (issock(a)?so_close(a):close(a))
+ #define NETREAD(a,b,c) (issock(a)?recv((a),(b),(c),0):read((a),(b),(c)))
+ #define NETWRITE(a,b,c) (issock(a)?send((a),(b),(c),0):write((a),(b),(c)))
+
+ #include /* for u_long */
+ #endif /* DESQ */
+
/*
Regular BSD unix versions
***************
*** 221,231 ****
--- 241,257 ----
/* #include not ultrix */
#include
+ #ifdef DESQ /* POHC */
+ #include /* for ENOTCONN & ECONNRESET */
+ #else
#include /* independent */
+ #endif
#include /* independent */
#include
#include
+ #if !defined(__HIGHC__) && !defined(__WATCOMC__) /* POHC. It's probably not ANSI */
#include /* For open() etc */
+ #endif
#define INCLUDES_DONE
#endif /* Normal includes */
***************
*** 279,281 ****
--- 305,308 ----
#endif /* SELECT */
#endif /* TCP_H */
+
Only in libwww-2.new: ~httelne.c
Only in libwww-2.new: ~httelne.h
.