This directory contains a port of Mosaic Version 2.5 to Desqview/X. The major steps involved in the port were: 1) Removing all implicit function and variable declarations. I compiled using the flags -O -DMSDOS -DMOTIF -Wimplicit. I was able to remove all compile warnings except for three or four complaints about "XtAddApp...". (This was a big hassle.) Also, it now complains about jpegread. 2) Changing unix file names that were too long to be DOS file names. The major offenders were src/ccibindings1.c and src/ccibindings2.c, which are both truncated to src/ccibindi.c. I changed these file names to ccibind1.c and ccibind2.c. Also, many of the bitmap and pixmap files in src/bitmaps were too long, and when truncated were ambiguous. To fix this, I changed "gopher" to "go" and "xmosaic" to "xm" in all of the file names in src/bitmaps. Also, the icon names in src/pixmaps had two periods in them (e.g., icon.1.xpm), so I changed the first period in each name to a dash, i.e., icon.1.xpm became icon-1.xpm. 3) Replacing calls to the unix function "system". Most of these were easy. Calls to rm and mv were replaced with calls to unlink and rename. Calls to external viewers were replaced by starting a doswin.dvp process, whose argument is the string that contains the call, The "xv" command doesn't understand the disk name "c:", so I strip this out of the file name before calling xv (or any other program). I.e., the call is: c: xv /tmp/007234.jpe del c:/tmp/007234.jpe exit Decompressing files was a bit difficult because Mosaic tries to create temporary files with two suffixes, e.g., 007234.ps.gz. I fixed this by removing the first suffix, decompressing the file, and then adding the suffix back. I first open a doswin.dvp process to do the decompression, then every 1/2 second (for up to 25 seconds) Before spawning and external viewer, I test to see if I have write access to the resulting file. As soon as write access is granted. 4) All files were opened in binary mode. (The default in djgpp is text mode, which fails for .gif files, etc.) (Change made in src/mosaic.h and libxmx/xmx.c.) 5) All "read", "write", and "close" operations on sockets were changed to "recv", "send", and "so_close". (change in libwww2/tcp.h) 6) The type of the third argument to ioctl was changed from int * to long *. 7) Unlike the port of Mosaic 2.0pre6, I did not attempt to change slashes (i.e., '/'s) in file names to backslashes (i.e., '\'), except in a few places where I issue DOS commands such as del and move. Since all file names in djgpp use slashes, and all of the viewers and compression utilities understand slashes, I didn't see any advantage to making the change. 8) In src/xresourc.h, changed ".mosaic-personal-annotations" to "persanno", ".mailcap" to "mailcap", ".mosaic-hotlist-default" to "hotlist", ".mime.types" to "mime.typ", and ".mosaic-global-history" to "globhist". (DOS doesn't allow file names that start with .) Also, in src/gui.c, changed ".mosaicpid" to "mosaic.pid" 9) defined MO_MACHINE_TYPE to be "PC/AT" defined USE_REMOVE (but I didn't use it anywhere) defined USE_DIRENT (not sure what this does) defined GOT_READ_DIR to be 1 (directory reading functions available) defined NO_GROUPS in libwww2/htfile.c (not sure what this does) 10) patched up call to _XmDrawShadows in libhtmlw/htmlw.c 11) created libhtmlw/htmlpars.h to hold some function prototypes 12) commented out a check for dirbuf->d_ino == 0 in libwww2/htfile.c. This field does not exist in dv/x. 13) in libwww2/htfile.c commented out check for: (statbuf.st_mode & S_IXUSR) || (statbuf.st_mode & S_IXGRP) || (statbuf.st_mode & S_IXOTH) instead, check for (statbuf.st_mode & S_IEXEC) 14) commented out line that set pres->command = 0 on libwww2/htformat.c 15) deleted a pair of lines that removed a file twice in a row in libwww2/htfwrite.c 16) mosaic thinks that a file whose name starts with c:/ belongs to a subdirectory of the current directory called "c:". Now all files are opened through a call to DOSOPEN (in src/support.c), which looks for a ':' in the filename and, if it finds one, throws away everything before the name of the disk. Also, in function mo_url_cononicalize_local, we have to add a / before any file name that starts with a disk letter, or before the current working directory, which always starts with a disk name. 17) added support for inline JPEG images -- no DOS specific changes! Small changes in file src/mosaic.h, src/mo-www.c, src/picread.c. Did NOT make the changes to src/pixmaps.c, src/pixmaps.h, or src/pixmaps that it wanted me to (all it did was replace the twirling globe with a twirling dog). 18) Printing calls "lpr". The dv/x lpr doesn't understand slashes (/), so in gui-dial.c I convert the backslashes (\) in the temporary file name before issuing the call to SYSTEM. Also, lpr doesn't like it when the file that it is supposed to print is unlinked, so for dv/x, I commented out the line in gui-dial.c that unlinks the file after issuing the command. (The file is still deleted using the del command.) 19) In src/hotfile.c/mo_write_hotlist, removed the attempts to get the user's passwd (call to getpwuid(getuid()) and then the attempt to access the passwd (pw->pw_gecos). (This was causing Mosaic to crash once I fixed the problem with the bad filename for hotlists.) [Removed all calls to getuid and getpwuid.] 20) Change uncompress command from "uncompress" to "decomp" (In src/xresourc.h) 21) tmpnam and tempnam in djgpp kept returning the same temporary name (e.g., 007684). This worked most of the time, since Mosaic typically unlinks a temporary file soon after using it, and in fact as far as I know, if 007684 already existed, it might have created 007685. The problem was that Mosaic adds suffixes to temporary file names. For example, when a gzip-compressed postscript file is downloaded, it might be put in a file 007684. Soon, 007684 might get renamed to 007684.ps and then to 007684.gz and then to 007684, and finally back to 007684.gz. In the middle of this, tmpnam or tempnam might decide that 007684 was a free name, and use it for some other purpose. I fixed this by adding my own 2-digit suffix to the beginning of each temporary file name created. 22) removed call to execlp (which tries to swap a process) in libwww2/htaabrow.c Bugs 1) printing doesn't work -- command is issued correctly, but can't find file (probably the file is getting deleted before the print job can get started)? Or maybe the slashes or back slashes are wrong? 2) mosaic hangs if rmgrdv.dvr is not loaded in file dvdriver.lst. Unfortunately, unless I remove this line, I can't send anything to my printer. 3) occasional crashes, usually while running lots of other programs at the same time.