home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Spezial / SPEZIAL2_97.zip / SPEZIAL2_97.iso / ANWEND / ONLINE / OS2LYN_1 / OS2LYN_1.ZIP / patches.os2 < prev    next >
Text File  |  1997-07-12  |  37KB  |  1,227 lines

  1. diff -cr -X exclude old/Makefile new/Makefile
  2. *** old/Makefile    Thu Apr  3 07:55:28 1997
  3. --- new/Makefile    Sat Jul 12 10:02:52 1997
  4. ***************
  5. *** 1,9 ****
  6.   ##makefile for lynx
  7.   
  8. ! SHELL = /bin/sh
  9.   
  10.   ##uncomment the next line if your make fails to set $(MAKE)
  11. ! #MAKE= make
  12.   
  13.   ##this is the name of the directory the lynx source code is in.
  14.   ##(e.g. lynx2-7-1, not the full path)
  15. --- 1,9 ----
  16.   ##makefile for lynx
  17.   
  18. ! SHELL = sh.exe
  19.   
  20.   ##uncomment the next line if your make fails to set $(MAKE)
  21. ! MAKE= d:/gnu/bin/make
  22.   
  23.   ##this is the name of the directory the lynx source code is in.
  24.   ##(e.g. lynx2-7-1, not the full path)
  25. ***************
  26. *** 111,117 ****
  27.   # or modified at run time via DIRED_MENU symbols in lynx.cfg.
  28.   #
  29.   # To disable DirEd completely, prepend "#" to this line:
  30. ! DIRED_SUPPORT     =   -DDIRED_SUPPORT
  31.   #(If you have disabled DirEd completely, you can ignore all the
  32.   #other DirEd stuff here.)
  33.   #
  34. --- 111,117 ----
  35.   # or modified at run time via DIRED_MENU symbols in lynx.cfg.
  36.   #
  37.   # To disable DirEd completely, prepend "#" to this line:
  38. ! #DIRED_SUPPORT     =   -DDIRED_SUPPORT
  39.   #(If you have disabled DirEd completely, you can ignore all the
  40.   #other DirEd stuff here.)
  41.   #
  42. ***************
  43. *** 731,736 ****
  44. --- 731,745 ----
  45.           SLANGLIB="$(SLANGLIB) $(SLANGRRLIB) -lslang -lm" \
  46.           SLANGINC="$(SLANGINC)"
  47.     
  48. + os2:
  49. +     cd WWW/Library/unix; $(MAKE) CC="gcc" LYFLAGS="-DOS2 $(SITE_LYDEFS)"
  50. +     cd src; $(MAKE) os2 CC="gcc" MCFLAGS="-O -DOS2 -DNCURSES \
  51. +         -DFANCY_CURSES -DNO_TTYTYPE \
  52. +         -I/emx/include/ncurses -I../$(WWWINC) $(SITE_DEFS)" \
  53. +         LIBS=" -lform -lmenu -lpanel -lncurses -lsocket \
  54. +         $(WAISLIB) $(SOCKSLIB) $(SITE_LIBS)" \
  55. +         WWWLIB="../WWW/Library/unix/libwww.a"
  56.   osf:
  57.       cd WWW/Library/osf; $(MAKE) LYFLAGS="-Olimit 2000 $(SITE_LYDEFS)"
  58.       cd src; $(MAKE) all CC="cc" MCFLAGS="-O -Olimit 4000 -DUNIX \
  59. *** old/src/HTFWriter.c    Wed Mar 26 11:56:28 1997
  60. --- new/src/HTFWriter.c    Wed May 21 20:25:40 1997
  61. ***************
  62. *** 200,206 ****
  63. --- 200,210 ----
  64.                *  for the uncompressed file and invoke
  65.                *  HTLoadFile() to handle it. - FM
  66.                */
  67. + #ifdef OS2
  68. +           StrAllocCopy (addr, "file://localhost/");
  69. + #else
  70.               StrAllocCopy(addr, "file://localhost");
  71. + #endif /* OS2 */
  72.   #ifdef VMS
  73.               StrAllocCat(addr, HTVMS_wwwName(path));
  74.   #else
  75. diff -cr -X exclude old/src/LYBookmark.c new/src/LYBookmark.c
  76. *** old/src/LYBookmark.c    Thu Feb  6 16:32:08 1997
  77. --- new/src/LYBookmark.c    Mon May 19 17:27:26 1997
  78. ***************
  79. *** 119,125 ****
  80. --- 119,129 ----
  81.       sprintf(URL_buffer,"file://localhost%s",
  82.           HTVMS_wwwName((char *)newname));
  83.   #else
  84. + #ifdef OS2
  85. +     sprintf(URL_buffer,"file://localhost/%s",newname);
  86. + #else
  87.       sprintf(URL_buffer,"file://localhost%s", newname);
  88. + #endif /* OS2 */
  89.   #endif /* VMS */
  90.       } else {
  91.       fclose(fp);
  92. ***************
  93. *** 128,134 ****
  94. --- 132,142 ----
  95.       sprintf(URL_buffer,"file://localhost%s",
  96.               HTVMS_wwwName((char *)filename_buffer));
  97.   #else
  98. + #ifdef OS2
  99. +     sprintf(URL_buffer,"file://localhost/%s",filename_buffer);
  100. + #else
  101.       sprintf(URL_buffer,"file://localhost%s", filename_buffer);
  102. + #endif /* OS2 */
  103.   #endif /* VMS */
  104.       }
  105.   
  106. diff -cr -X exclude old/src/LYCgi.c new/src/LYCgi.c
  107. *** old/src/LYCgi.c    Sat Dec  7 16:49:54 1996
  108. --- new/src/LYCgi.c    Thu May 22 14:16:48 1997
  109. ***************
  110. *** 162,167 ****
  111. --- 162,170 ----
  112.   
  113.       StrAllocCopy(temp, pgm);
  114.       StrAllocCopy(new_arg, "file://localhost");
  115. + #ifdef OS2
  116. +     StrAllocCat(new_arg, "/");
  117. + #endif /* OS2 */
  118.       StrAllocCat(new_arg, temp);
  119.   
  120.       if (TRACE) {
  121. diff -cr -X exclude old/src/LYDownload.c new/src/LYDownload.c
  122. *** old/src/LYDownload.c    Sun Sep  1 20:24:10 1996
  123. --- new/src/LYDownload.c    Mon May 19 18:16:46 1997
  124. ***************
  125. *** 218,223 ****
  126. --- 218,230 ----
  127.           strcpy(buffer, command);
  128.       }
  129.   #else
  130. + #ifdef OS2
  131. +     cp = NULL;
  132. +     if (cp) {
  133. +       sprintf(command, "%s/%s", cp, buffer);
  134. +       strcpy(buffer, command);
  135. +     }
  136. + #else    
  137.           if (*buffer != '/')
  138.           cp = getenv("PWD");
  139.       else
  140. ***************
  141. *** 226,231 ****
  142. --- 233,239 ----
  143.               sprintf(command,"%s/%s", cp, buffer);
  144.           strcpy(buffer, command);
  145.       }
  146. + #endif /* OS2 */
  147.   #endif /* VMS */
  148.   
  149.       /* see if it already exists */
  150. ***************
  151. *** 297,302 ****
  152. --- 305,317 ----
  153.            */
  154.           LYDidRename = TRUE;
  155.       }
  156. + #else
  157. + #ifdef OS2
  158. +     sprintf(command, "%s %s %s", COPY_PATH, file, buffer);
  159. +     if (TRACE)
  160. +       fprintf(stderr, "FAILED!\ncommand: %s\n", command);
  161. +     system(command);
  162. +     
  163.   #else /* Unix: */
  164.       /*
  165.        *  Prevent spoofing of the shell.
  166. ***************
  167. *** 307,312 ****
  168. --- 322,328 ----
  169.       if (TRACE)
  170.           fprintf(stderr,"command: %s\n",command);
  171.       system(command);
  172. + #endif /* OS2 */
  173.   #endif /* VMS */
  174.   
  175.       } else {
  176. ***************
  177. *** 535,541 ****
  178. --- 551,561 ----
  179.   #ifdef VMS
  180.       sprintf(download_filename,"file://localhost/%s",tempfile);
  181.   #else
  182. + #ifdef OS2
  183. +     sprintf(download_filename,"file://localhost/%s",tempfile);
  184. + #else
  185.       sprintf(download_filename,"file://localhost%s",tempfile);
  186. + #endif /* OS2 */
  187.   #endif /* VMS */
  188.       StrAllocCopy(*newfile, download_filename);
  189.       LYforce_no_cache = TRUE;  /* don't cache this doc */
  190. diff -cr -X exclude old/src/LYEdit.c new/src/LYEdit.c
  191. *** old/src/LYEdit.c    Thu Feb  6 16:32:50 1997
  192. --- new/src/LYEdit.c    Mon May 19 18:46:26 1997
  193. ***************
  194. *** 66,74 ****
  195.   #ifdef VMS
  196.           if ((fp = fopen(HTVMS_name("",filename),"r")) == NULL) {
  197.   #else
  198.           if ((fp = fopen(filename,"r")) == NULL) {
  199. -             
  200.   #endif /* VMS */
  201.               HTAlert(COULD_NOT_ACCESS_FILE);
  202.           FREE(filename);
  203.           goto failure;
  204. --- 66,80 ----
  205.   #ifdef VMS
  206.           if ((fp = fopen(HTVMS_name("",filename),"r")) == NULL) {
  207.   #else
  208. + #ifdef OS2
  209. +         sscanf(filename, "/%s", filename); /* Drop any leading slash */
  210. + #endif /* OS2 */
  211.           if ((fp = fopen(filename,"r")) == NULL) {
  212.   #endif /* VMS */
  213. + #ifdef OS2
  214. +           if (TRACE)
  215. +         fprintf(stderr, "Bogus filename: %s\n", filename);        
  216. + #endif /* OS2 */
  217.               HTAlert(COULD_NOT_ACCESS_FILE);
  218.           FREE(filename);
  219.           goto failure;
  220. diff -cr -X exclude old/src/LYGlobalDefs.h new/src/LYGlobalDefs.h
  221. *** old/src/LYGlobalDefs.h    Sun Feb  9 04:38:14 1997
  222. --- new/src/LYGlobalDefs.h    Wed May 14 17:38:56 1997
  223. ***************
  224. *** 15,20 ****
  225. --- 15,25 ----
  226.   #include "LYStructs.h"
  227.   #endif /* LYSTRUCTS_H */
  228.   
  229. + #ifdef OS2 /* Drive letter support for OS/2 */
  230. + #define getcwd _getcwd2
  231. + #define chdir _chdir2
  232. + #endif /* OS2 */
  233.   #ifdef SOCKS
  234.   extern BOOLEAN socks_flag;
  235.   #endif /* SOCKS */
  236. diff -cr -X exclude old/src/LYHistory.c new/src/LYHistory.c
  237. *** old/src/LYHistory.c    Fri Apr  4 07:10:58 1997
  238. --- new/src/LYHistory.c    Wed May 21 20:11:24 1997
  239. ***************
  240. *** 314,320 ****
  241. --- 314,324 ----
  242.   #ifdef VMS
  243.       sprintf(hist_filename,"file://localhost/%s", tempfile);
  244.   #else
  245. + #ifdef OS2
  246. +     sprintf(hist_filename,"file://localhost/%s",tempfile);
  247. + #else
  248.       sprintf(hist_filename,"file://localhost%s", tempfile);
  249. + #endif /* OS2 */
  250.   #endif /* VMS */
  251.       StrAllocCopy(*newfile, hist_filename);
  252.       LYforce_HTML_mode = TRUE;    /* force this file to be HTML */
  253. ***************
  254. *** 456,462 ****
  255. --- 460,470 ----
  256.   #ifdef VMS
  257.       sprintf(vl_filename,"file://localhost/%s", tempfile);
  258.   #else
  259. + #ifdef OS2
  260. +     sprintf(vl_filename,"file://localhost/%s", tempfile);
  261. + #else
  262.       sprintf(vl_filename,"file://localhost%s", tempfile);
  263. + #endif /* OS2 */
  264.   #endif /* VMS */
  265.       StrAllocCopy(*newfile, vl_filename);
  266.       LYforce_HTML_mode = TRUE;    /* force this file to be HTML */
  267. diff -cr -X exclude old/src/LYList.c new/src/LYList.c
  268. *** old/src/LYList.c    Wed Aug 28 16:44:42 1996
  269. --- new/src/LYList.c    Mon May 19 17:56:08 1997
  270. ***************
  271. *** 72,78 ****
  272. --- 72,82 ----
  273.   #ifdef VMS
  274.       sprintf(list_filename, "file://localhost/%s", tempfile);
  275.   #else
  276. + #ifdef OS2
  277. +     sprintf(list_filename, "file://localhost/%s",tempfile);
  278. + #else
  279.       sprintf(list_filename, "file://localhost%s", tempfile);
  280. + #endif /* OS2 */
  281.   #endif /* VMS */
  282.       StrAllocCopy(*newfile, list_filename);
  283.       LYforce_HTML_mode=TRUE; /* force this file to be HTML */
  284. diff -cr -X exclude old/src/LYLocal.c new/src/LYLocal.c
  285. *** old/src/LYLocal.c    Fri Mar 21 11:06:16 1997
  286. --- new/src/LYLocal.c    Thu May 22 14:56:20 1997
  287. ***************
  288. *** 39,44 ****
  289. --- 39,48 ----
  290.   
  291.   #include "LYLeaks.h"
  292.   
  293. + #ifdef OS2
  294. + #define lstat(x, y) fstat(x, y)
  295. + #endif /* OS2 */
  296.   #define FREE(x) if (x) {free(x); x = NULL;}
  297.   
  298.   PRIVATE int my_spawn PARAMS((char *path, char **argv, char *msg));
  299. ***************
  300. *** 877,888 ****
  301.       sprintf(tmpbuf,"Remove file %s (y or n): ",cp);
  302.         else 
  303.       sprintf(tmpbuf,"Remove file (y or n): ");
  304. !    } else if ((dir_info.st_mode & S_IFMT) == S_IFLNK) {
  305. !       if(strlen(cp) < 50)
  306. !     sprintf(tmpbuf,"Remove symbolic link %s (y or n): ",cp);
  307.         else 
  308.       sprintf(tmpbuf,"Remove symbolic link (y or n): ");
  309. !    } else {
  310.         sprintf(tmpbuf,"Unable to determine status of %s. ",testpath);
  311.         _statusline(tmpbuf);
  312.         sleep(AlertSecs);
  313. --- 881,896 ----
  314.       sprintf(tmpbuf,"Remove file %s (y or n): ",cp);
  315.         else 
  316.       sprintf(tmpbuf,"Remove file (y or n): ");
  317. !    }
  318. ! #ifndef OS2
  319. !    else if ((dir_info.st_mode & S_IFMT) == S_IFLNK) {
  320. !      if(strlen(cp) < 50)
  321. !        sprintf(tmpbuf,"Remove symbolic link %s (y or n): ",cp);
  322.         else 
  323.       sprintf(tmpbuf,"Remove symbolic link (y or n): ");
  324. !    }
  325. ! #endif /*! OS2 */
  326. !    else {
  327.         sprintf(tmpbuf,"Unable to determine status of %s. ",testpath);
  328.         _statusline(tmpbuf);
  329.         sleep(AlertSecs);
  330. diff -cr -X exclude old/src/LYMain.c new/src/LYMain.c
  331. *** old/src/LYMain.c    Fri Apr  4 07:11:22 1997
  332. --- new/src/LYMain.c    Thu May 15 10:20:56 1997
  333. ***************
  334. *** 691,697 ****
  335.           (cp=getenv("lynx_cfg")) != NULL)
  336.           StrAllocCopy(lynx_cfg_file, cp);
  337.       }
  338.       /*
  339.        *  If we still don't have a configuration file,
  340.        *  use the userdefs.h definition.
  341. --- 691,710 ----
  342.           (cp=getenv("lynx_cfg")) != NULL)
  343.           StrAllocCopy(lynx_cfg_file, cp);
  344.       }
  345. ! #ifdef OS2
  346. !     /* On OS/2, look for the configuration file in $ETC, usually
  347. !        c:\mptn\etc, but who knows?  This doesn't work so well, and
  348. !        conflicts with djd's lynx port, so I'm going to leave it out.
  349. !        JFM
  350. !        */
  351. !     
  352. ! /*     if ((cp=getenv("ETC")) !=NULL) { */
  353. ! /*       sprintf(cp,"%s/lynx.cfg", cp); */
  354. ! /*       StrAllocCopy(lynx_cfg_file, cp); */
  355. ! /*     } */
  356. !     
  357. ! #endif /*OS2*/
  358. !     
  359.       /*
  360.        *  If we still don't have a configuration file,
  361.        *  use the userdefs.h definition.
  362. diff -cr -X exclude old/src/LYMainLoop.c new/src/LYMainLoop.c
  363. *** old/src/LYMainLoop.c    Fri Mar 28 08:14:16 1997
  364. --- new/src/LYMainLoop.c    Wed May 14 16:45:28 1997
  365. ***************
  366. *** 3600,3609 ****
  367. --- 3600,3613 ----
  368.               stop_curses();
  369.           printf(SPAWNING_MSG);
  370.               fflush(stdout);
  371. + #ifdef OS2
  372. +         system(getenv("COMSPEC"));
  373. + #else
  374.   #ifdef VMS
  375.           system("");
  376.   #else
  377.               system("exec $SHELL");
  378. + #endif /* OS2 */
  379.   #endif /* VMS */
  380.               start_curses();
  381.               refresh_screen=TRUE;  /* for a showpage */
  382. diff -cr -X exclude old/src/LYPrint.c new/src/LYPrint.c
  383. *** old/src/LYPrint.c    Fri Mar 21 11:06:36 1997
  384. --- new/src/LYPrint.c    Mon May 19 20:00:28 1997
  385. ***************
  386. *** 934,940 ****
  387. --- 934,944 ----
  388.   #ifdef VMS
  389.       StrAllocCopy(print_filename, "file://localhost/");
  390.   #else
  391. + #ifdef OS2
  392. +     StrAllocCopy(print_filename, "file://localhost/");
  393. + #else
  394.       StrAllocCopy(print_filename, "file://localhost");
  395. + #endif /* OS2 */
  396.   #endif /* VMS */
  397.       StrAllocCat(print_filename, tempfile);
  398.   
  399. diff -cr -X exclude old/src/LYShowInfo.c new/src/LYShowInfo.c
  400. *** old/src/LYShowInfo.c    Sun Mar  2 12:45:22 1997
  401. --- new/src/LYShowInfo.c    Wed May 21 20:11:00 1997
  402. ***************
  403. *** 22,27 ****
  404. --- 22,31 ----
  405.   #include "LYLocal.h"
  406.   #endif /* DIRED_SUPPORT */
  407.   
  408. + #ifdef OS2
  409. + #define lstat(x, y) fstat(x, y)
  410. + #endif /* OS2 */
  411.   #define FREE(x) if (x) {free(x); x = NULL;}
  412.   
  413.   /* 
  414. ***************
  415. *** 65,71 ****
  416. --- 69,79 ----
  417.   #ifdef VMS
  418.       StrAllocCopy(info_url,"file://localhost/");
  419.   #else
  420. + #ifdef OS2
  421. +     StrAllocCopy(info_url, "file://localhost/");
  422. + #else
  423.       StrAllocCopy(info_url,"file://localhost");
  424. + #endif  /* OS2 */
  425.   #endif /* VMS */
  426.       StrAllocCat(info_url,tempfile);
  427.   
  428. ***************
  429. *** 131,144 ****
  430.           } else if (((dir_info.st_mode) & S_IFMT) == S_IFREG) {
  431.           fprintf(fp0, 
  432.                 "\nFile that you have currently selected\n\n");
  433. !         } else if (((dir_info.st_mode) & S_IFMT) == S_IFLNK) {
  434. !         fprintf(fp0,
  435. !          "\nSymbolic link that you have currently selected\n\n");
  436. !         } else {
  437.           fprintf(fp0,
  438.                 "\nItem that you have currently selected\n\n");
  439.           }
  440.           fprintf(fp0,"       <em>Full name:</em>  %s\n", temp);
  441.           if (((dir_info.st_mode) & S_IFMT) == S_IFLNK) {
  442.           char buf[1025];
  443.           int buf_size;
  444. --- 139,157 ----
  445.           } else if (((dir_info.st_mode) & S_IFMT) == S_IFREG) {
  446.           fprintf(fp0, 
  447.                 "\nFile that you have currently selected\n\n");
  448. !         }
  449. ! #ifndef OS2
  450. !         else if (((dir_info.st_mode) & S_IFMT) == S_IFLNK) {
  451. !           fprintf(fp0,
  452. !               "\nSymbolic link that you have currently selected\n\n");
  453. !         }
  454. ! #endif /* !OS2 */
  455. !         else {
  456.           fprintf(fp0,
  457.                 "\nItem that you have currently selected\n\n");
  458.           }
  459.           fprintf(fp0,"       <em>Full name:</em>  %s\n", temp);
  460. + #ifndef OS2
  461.           if (((dir_info.st_mode) & S_IFMT) == S_IFLNK) {
  462.           char buf[1025];
  463.           int buf_size;
  464. ***************
  465. *** 150,155 ****
  466. --- 163,169 ----
  467.           }
  468.           fprintf(fp0, "  <em>Points to file:</em>  %s\n", buf);
  469.           }
  470. + #endif /* !OS2 */
  471.           pw = getpwuid(dir_info.st_uid);
  472.           if (pw)
  473.               fprintf(fp0, "   <em>Name of owner:</em>  %s\n", pw->pw_name);
  474. ***************
  475. *** 225,232 ****
  476. --- 239,248 ----
  477.               strcat(modes, ", search");
  478.               else {
  479.               strcat(modes, ", execute");
  480. + #ifndef OS2
  481.               if ((dir_info.st_mode & S_ISVTX))
  482.                   strcat(modes, ", sticky");
  483. + #endif /* !OS2 */
  484.               }
  485.           }
  486.           fprintf(fp0, "%s\n", (char *)&modes[2]);  /* Skip leading ', ' */
  487. diff -cr -X exclude old/src/LYUpload.c new/src/LYUpload.c
  488. *** old/src/LYUpload.c    Tue Jul 16 17:22:30 1996
  489. --- new/src/LYUpload.c    Mon May 19 18:07:04 1997
  490. ***************
  491. *** 160,166 ****
  492.       }
  493.   
  494.       /* see if we can write to it */
  495.       if((fp = fopen(buffer,"w")) != NULL) {
  496.           fclose(fp);
  497.           remove(buffer);
  498. --- 160,165 ----
  499. ***************
  500. *** 258,264 ****
  501. --- 257,267 ----
  502.   #ifdef VMS
  503.       sprintf(upload_filename,"file://localhost/%s",tempfile);
  504.   #else
  505. + #ifdef OS2
  506. +     sprintf(upload_filename,"file://localhost/%s",tempfile);
  507. + #else
  508.       sprintf(upload_filename,"file://localhost%s",tempfile);
  509. + #endif /* OS2 */
  510.   #endif /* VMS */
  511.       StrAllocCopy(*newfile, upload_filename);
  512.   
  513. diff -cr -X exclude old/src/LYUtils.c new/src/LYUtils.c
  514. *** old/src/LYUtils.c    Mon Mar 31 09:28:36 1997
  515. --- new/src/LYUtils.c    Mon May 19 16:30:18 1997
  516. ***************
  517. *** 32,37 ****
  518. --- 32,41 ----
  519.   #endif /* UTMPX_FOR_UTMP */
  520.   #endif /* UNIX */
  521.   
  522. + #ifdef OS2
  523. + #define NO_UTMP
  524. + #endif /* OS2 */
  525.   #include "LYLeaks.h"
  526.   
  527.   #ifdef SVR4_BSDSELECT
  528. ***************
  529. *** 2011,2018 ****
  530.           return;
  531.   
  532.       *AllocatedString = NULL;  /* so StrAllocCopy doesn't free it */
  533.       StrAllocCopy(*AllocatedString,"file://localhost");
  534.       if (*old_string != '/') {
  535.       char *fragment = NULL;
  536.   #ifdef VMS
  537. --- 2015,2029 ----
  538.           return;
  539.   
  540.       *AllocatedString = NULL;  /* so StrAllocCopy doesn't free it */
  541. + #ifdef OS2
  542. +     StrAllocCopy(*AllocatedString,"file://localhost/"); /* Fully qualified path
  543. +                                names on OS/2 begin
  544. +                                with a drive letter,
  545. +                                not a slash (JFM) */
  546. + #else
  547.       StrAllocCopy(*AllocatedString,"file://localhost");
  548. ! #endif /* OS2 */
  549. !     
  550.       if (*old_string != '/') {
  551.       char *fragment = NULL;
  552.   #ifdef VMS
  553. ***************
  554. *** 2876,2887 ****
  555. --- 2887,2903 ----
  556.   
  557.       if (!homedir) {
  558.       if ((homedir = getenv("HOME")) == NULL) {
  559. + #ifdef OS2
  560. +       if ((homedir = getenv("TMP")) == NULL)
  561. +         homedir = ".";
  562. + #endif /* OS2 */
  563.   #ifdef VMS
  564.           if ((homedir = getenv("SYS$LOGIN")) == NULL) {
  565.               if ((homedir = getenv("SYS$SCRATCH")) == NULL)
  566.               homedir = "sys$scratch:";
  567.           }
  568.   #else
  569. + #ifndef OS2
  570.           /* One could use getlogin() and getpwnam() here instead */
  571.           struct passwd *pw = getpwuid(geteuid());
  572.           if (pw && pw->pw_dir) {
  573. ***************
  574. *** 2894,2899 ****
  575. --- 2910,2916 ----
  576.           /* Use /tmp; it should be writable. */
  577.           homedir = "/tmp";
  578.           }
  579. + #endif /* !OS2 */
  580.   #endif /* VMS */
  581.       }
  582.       }
  583. diff -cr -X exclude old/src/Makefile new/src/Makefile
  584. *** old/src/Makefile    Thu Jan 16 18:27:04 1997
  585. --- new/src/Makefile    Wed May 14 14:20:48 1997
  586. ***************
  587. *** 11,21 ****
  588. --- 11,29 ----
  589.   
  590.   all: lynx
  591.   
  592. + os2: lynx.exe
  593.   lynx:   message $(OBJS) $(WWWLIB)
  594.       @echo "Linking and creating Lynx executable"
  595.       $(CC) $(CFLAGS) -o lynx  $(OBJS) $(WWWLIB) $(SLANGLIB) $(LIBS)
  596.       @echo "Copying Lynx executable into this directory"
  597.       cp lynx ..
  598. +     @echo "Welcome to Lynx!"
  599. + lynx.exe:   message $(OBJS) $(WWWLIB)
  600. +     @echo "Linking and creating Lynx executable"
  601. +     $(CC) $(CFLAGS) -o lynx.exe  $(OBJS) $(WWWLIB) $(SLANGLIB) $(LIBS)
  602. +     @echo "Copying Lynx executable into this directory"
  603. +     cp lynx.exe ..
  604.       @echo "Welcome to Lynx!"
  605.   
  606.   message:
  607. diff -cr -X exclude old/userdefs.h new/userdefs.h
  608. *** old/userdefs.h    Thu Apr  3 07:04:12 1997
  609. --- new/userdefs.h    Tue May 20 17:17:46 1997
  610. ***************
  611. *** 216,222 ****
  612.    * mailcap files (see the examples in the samples directory).
  613.    */
  614.   #ifndef LYNX_CFG_FILE
  615. ! #define LYNX_CFG_FILE "/usr/local/lib/lynx.cfg"
  616.   #endif /* LYNX_CFG_FILE */
  617.   
  618.   /**************************
  619. --- 216,222 ----
  620.    * mailcap files (see the examples in the samples directory).
  621.    */
  622.   #ifndef LYNX_CFG_FILE
  623. ! #define LYNX_CFG_FILE "./lynx.cfg"
  624.   #endif /* LYNX_CFG_FILE */
  625.   
  626.   /**************************
  627. ***************
  628. *** 225,231 ****
  629.    * These global and personal files override anything in
  630.    * lynx.cfg or src/HTInit.c
  631.    */
  632. ! #define GLOBAL_EXTENSION_MAP "/usr/local/lib/mosaic/mime.types"
  633.   #define PERSONAL_EXTENSION_MAP ".mime.types"
  634.   
  635.   /**************************
  636. --- 225,231 ----
  637.    * These global and personal files override anything in
  638.    * lynx.cfg or src/HTInit.c
  639.    */
  640. ! #define GLOBAL_EXTENSION_MAP "/mptn/etc/mime.types"
  641.   #define PERSONAL_EXTENSION_MAP ".mime.types"
  642.   
  643.   /**************************
  644. ***************
  645. *** 234,240 ****
  646.    * These global and personal files override anything in
  647.    * lynx.cfg or src/HTInit.c
  648.    */
  649. ! #define GLOBAL_MAILCAP "/usr/local/lib/mosaic/mailcap"
  650.   #define PERSONAL_MAILCAP ".mailcap"
  651.   
  652.   /**************************
  653. --- 234,240 ----
  654.    * These global and personal files override anything in
  655.    * lynx.cfg or src/HTInit.c
  656.    */
  657. ! #define GLOBAL_MAILCAP "/mptn/etc/mailcap"
  658.   #define PERSONAL_MAILCAP ".mailcap"
  659.   
  660.   /**************************
  661. ***************
  662. *** 267,273 ****
  663.    * open is used as the default for NeXT, instead of the XLOADIMAGE_COMMAND
  664.    * definition.
  665.    */
  666. ! #define XLOADIMAGE_COMMAND "xli %s &"
  667.   
  668.   /**************************
  669.    * For UNIX systems this should be sendmail
  670. --- 267,273 ----
  671.    * open is used as the default for NeXT, instead of the XLOADIMAGE_COMMAND
  672.    * definition.
  673.    */
  674. ! #define XLOADIMAGE_COMMAND "cmd /c start ib %s"
  675.   
  676.   /**************************
  677.    * For UNIX systems this should be sendmail
  678. ***************
  679. *** 288,295 ****
  680. --- 288,299 ----
  681.   #else
  682.   #if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__bsdi__)
  683.   #define SYSTEM_MAIL "/usr/sbin/sendmail"
  684. + #else
  685. + #ifdef OS2
  686. + #define SYSTEM_MAIL "sendmail.exe"
  687.   #else /* everthing else: */
  688.   #define SYSTEM_MAIL "/usr/lib/sendmail" 
  689. + #endif /* OS2 */
  690.   #endif /* __FreeBSD || __NetBSD__ || __bsdi__ */
  691.   #endif /* MMDF */
  692.   
  693. ***************
  694. *** 299,305 ****
  695.    * This definition can be overridden at run time by setting a
  696.    * "LYNX_TEMP_SPACE" environment symbol.
  697.    */
  698. ! #define TEMP_SPACE "/tmp/"
  699.   
  700.   /********************************
  701.    * Don't let the user enter his/hers email address when sending a message.
  702. --- 303,309 ----
  703.    * This definition can be overridden at run time by setting a
  704.    * "LYNX_TEMP_SPACE" environment symbol.
  705.    */
  706. ! #define TEMP_SPACE (getenv("TMP"))
  707.   
  708.   /********************************
  709.    * Don't let the user enter his/hers email address when sending a message.
  710. ***************
  711. *** 370,377 ****
  712.    * http://www.crl.com/~subir/lynx/lynx_help/lynx_help_main.html
  713.    *   This should be changed here or in lynx.cfg to the local path.
  714.    */
  715. ! #define HELPFILE "http://www.crl.com/~subir/lynx/lynx_help/lynx_help_main.html"
  716.   /* #define HELPFILE "file://localhost/PATH_TO/lynx_help/lynx_help_main.html" */
  717.   
  718.   /*****************************
  719.    * DEFAULT_INDEX_FILE is the default file retrieved when the
  720. --- 374,382 ----
  721.    * http://www.crl.com/~subir/lynx/lynx_help/lynx_help_main.html
  722.    *   This should be changed here or in lynx.cfg to the local path.
  723.    */
  724. ! /* #define HELPFILE "http://www.crl.com/~subir/lynx/lynx_help/lynx_help_main.html" */
  725.   /* #define HELPFILE "file://localhost/PATH_TO/lynx_help/lynx_help_main.html" */
  726. + #define HELPFILE "file://localhost/./lynx_help/lynx_help_main.html"
  727.   
  728.   /*****************************
  729.    * DEFAULT_INDEX_FILE is the default file retrieved when the
  730. ***************
  731. *** 389,395 ****
  732.    * with the Up-Arrow or Down-Arrow keys after entering the 'g'oto
  733.    * command, whether or not a default is offered.
  734.    */
  735. ! #define GOTOBUFFER      FALSE
  736.   
  737.   /*****************************
  738.    * JUMPFILE is the default local file checked for shortcut URLs when
  739. --- 394,400 ----
  740.    * with the Up-Arrow or Down-Arrow keys after entering the 'g'oto
  741.    * command, whether or not a default is offered.
  742.    */
  743. ! #define GOTOBUFFER      TRUE
  744.   
  745.   /*****************************
  746.    * JUMPFILE is the default local file checked for shortcut URLs when
  747. ***************
  748. *** 460,466 ****
  749.    * if your system does not have utmp capabilities.  CHANGE THIS here
  750.    * or in lynx.cfg.
  751.    */
  752. ! #define LOCAL_DOMAIN "ukans.edu"
  753.   
  754.   /********************************
  755.   * The DEFAULT_CACHE_SIZE specifies the number of WWW documents to be
  756. --- 465,471 ----
  757.    * if your system does not have utmp capabilities.  CHANGE THIS here
  758.    * or in lynx.cfg.
  759.    */
  760. ! #define LOCAL_DOMAIN ""
  761.   
  762.   /********************************
  763.   * The DEFAULT_CACHE_SIZE specifies the number of WWW documents to be
  764. ***************
  765. *** 537,543 ****
  766.    *    Taipei (Big5)
  767.    *    7 bit approximations
  768.    */
  769. ! #define CHARACTER_SET "ISO Latin 1"
  770.   
  771.   /*****************************
  772.    * PREFERRED_LANGUAGE is the language in MIME notation (e.g., "en",
  773. --- 542,548 ----
  774.    *    Taipei (Big5)
  775.    *    7 bit approximations
  776.    */
  777. ! #define CHARACTER_SET "IBM PC codepage 850"
  778.   
  779.   /*****************************
  780.    * PREFERRED_LANGUAGE is the language in MIME notation (e.g., "en",
  781. ***************
  782. *** 751,767 ****
  783.    * curses supports line-drawing characters, set to '*' or any other character
  784.    * to not use line-drawing (e.g., '|' for vertical and '-' for horizontal).
  785.    */
  786. ! #define BOXVERT '*'
  787. ! /* #define BOXVERT 0 */
  788. ! #define BOXHORI '*'
  789. ! /* #define BOXHORI 0 */
  790.   
  791.   /******************************
  792.    * LY_UMLAUT controls the 7-bit expansion of characters with dieresis or
  793.    * umlaut.  If defined, a digraph is displayed, e.g., auml --> ae
  794.    * Otherwise, a single character is displayed,  e.g., auml --> a
  795.    */
  796. ! #define LY_UMLAUT
  797.   
  798.   /*******************************
  799.    * set to FALSE if you don't want users of your anonymous account
  800. --- 756,772 ----
  801.    * curses supports line-drawing characters, set to '*' or any other character
  802.    * to not use line-drawing (e.g., '|' for vertical and '-' for horizontal).
  803.    */
  804. ! /* #define BOXVERT '*' */
  805. ! #define BOXVERT 0
  806. ! /* #define BOXHORI '*' */
  807. ! #define BOXHORI 0
  808.   
  809.   /******************************
  810.    * LY_UMLAUT controls the 7-bit expansion of characters with dieresis or
  811.    * umlaut.  If defined, a digraph is displayed, e.g., auml --> ae
  812.    * Otherwise, a single character is displayed,  e.g., auml --> a
  813.    */
  814. ! /* #define LY_UMLAUT */
  815.   
  816.   /*******************************
  817.    * set to FALSE if you don't want users of your anonymous account
  818. ***************
  819. *** 930,936 ****
  820.    * also see src/HTInit.c to verify/change the execution
  821.    * script extensions and/or commands.
  822.    */
  823. ! /* #define EXEC_LINKS  */ 
  824.   /* #define EXEC_SCRIPTS  */ 
  825.   
  826.   /**********
  827. --- 935,941 ----
  828.    * also see src/HTInit.c to verify/change the execution
  829.    * script extensions and/or commands.
  830.    */
  831. ! #define EXEC_LINKS
  832.   /* #define EXEC_SCRIPTS  */ 
  833.   
  834.   /**********
  835. ***************
  836. *** 1049,1055 ****
  837.    * instead (e.g., in a public account which will be used by people who
  838.    * are ignorant about VMS).
  839.    */
  840. ! #define CHECKMAIL    FALSE    /* report unread and new mail messages */
  841.   
  842.   /*********************************
  843.    * VI_KEYS can be turned on by the user in the options
  844. --- 1054,1060 ----
  845.    * instead (e.g., in a public account which will be used by people who
  846.    * are ignorant about VMS).
  847.    */
  848. ! #define CHECKMAIL    TRUE    /* report unread and new mail messages */
  849.   
  850.   /*********************************
  851.    * VI_KEYS can be turned on by the user in the options
  852. ***************
  853. *** 1137,1143 ****
  854.    * you prefer the more conservative action of requiring an explicit
  855.    * Y or y to confirm.
  856.    */
  857. ! #define QUIT_DEFAULT_YES
  858.   
  859.   /********************************
  860.    * These definitions specify files created or used in conjunction
  861. --- 1142,1148 ----
  862.    * you prefer the more conservative action of requiring an explicit
  863.    * Y or y to confirm.
  864.    */
  865. ! /* #define QUIT_DEFAULT_YES */
  866.   
  867.   /********************************
  868.    * These definitions specify files created or used in conjunction
  869. ***************
  870. *** 1208,1233 ****
  871.   **  Other Unix:
  872.   **  ===========
  873.   */
  874. ! #define    COMPRESS_PATH    "/usr/ucb/compress"
  875. ! #define    UNCOMPRESS_PATH    "/usr/ucb/uncompress"
  876. ! #define UUDECODE_PATH   "/bin/uudecode"
  877. ! #define    ZCAT_PATH    "/usr/local/bin/zcat"
  878. ! #define    GZIP_PATH    "/usr/local/bin/gzip"
  879. ! #define    INSTALL_PATH    "/bin/install"
  880. ! #define    TAR_PATH    "/bin/tar"
  881. ! #define    TOUCH_PATH    "/bin/touch"
  882.   #endif /* __FreeBSD__ || __NetBSD__ || __bsdi__ || LINUX */
  883.   /*
  884.   **  All Unix:
  885.   **  =========
  886.   */
  887. ! #define    ZIP_PATH    "/usr/local/bin/zip"
  888. ! #define    UNZIP_PATH    "/usr/local/bin/unzip"
  889. ! #define    MKDIR_PATH    "/bin/mkdir"
  890. ! #define    MV_PATH        "/bin/mv"
  891. ! #define    RM_PATH        "/bin/rm"
  892. ! #define COPY_PATH    "/bin/cp"
  893. ! #define CHMOD_PATH    "/bin/chmod"
  894.   #endif /* VMS */
  895.   
  896.   #endif /* USERDEFS_H */
  897. --- 1213,1238 ----
  898.   **  Other Unix:
  899.   **  ===========
  900.   */
  901. ! #define    COMPRESS_PATH    "gzip"
  902. ! #define    UNCOMPRESS_PATH    "gzip -d"
  903. ! #define UUDECODE_PATH   "uudecode"
  904. ! #define    ZCAT_PATH    "gzip -dc"
  905. ! #define    GZIP_PATH    "gzip"
  906. ! #define    INSTALL_PATH    "install"
  907. ! #define    TAR_PATH    "tar"
  908. ! #define    TOUCH_PATH    "touch"
  909.   #endif /* __FreeBSD__ || __NetBSD__ || __bsdi__ || LINUX */
  910.   /*
  911.   **  All Unix:
  912.   **  =========
  913.   */
  914. ! #define    ZIP_PATH    "zip.exe"
  915. ! #define    UNZIP_PATH    "unzip.exe"
  916. ! #define    MKDIR_PATH    "mkdir.exe"
  917. ! #define    MV_PATH        "mv.exe"
  918. ! #define    RM_PATH        "rm.exe"
  919. ! #define COPY_PATH    "cp.exe"
  920. ! #define CHMOD_PATH    "chmod.exe"
  921.   #endif /* VMS */
  922.   
  923.   #endif /* USERDEFS_H */
  924. diff -cr -X exclude old/WWW/Library/Implementation/HTAAProt.c new/WWW/Library/Implementation/HTAAProt.c
  925. *** old/WWW/Library/Implementation/HTAAProt.c    Thu Jul 11 16:31:46 1996
  926. --- new/WWW/Library/Implementation/HTAAProt.c    Tue May 13 19:49:14 1997
  927. ***************
  928. *** 174,194 ****
  929. --- 174,200 ----
  930.       if (current_prot  &&  current_prot->gid_name) {
  931.       if (isNumber(current_prot->gid_name)) {
  932.           if (NULL != (gr = getgrgid(atoi(current_prot->gid_name)))) {
  933. + #ifndef OS2
  934.           if (TRACE) fprintf(stderr,
  935.                      "%s(%s) returned (%s:%s:%d:...)\n",
  936.                      "HTAA_getGid: getgrgid",
  937.                      current_prot->gid_name,
  938.                      gr->gr_name, gr->gr_passwd, gr->gr_gid);
  939. + #endif /* OS2 */
  940.           return gr->gr_gid;
  941.           }
  942.       }
  943.       else {    /* Group name (not number) */
  944.           if (NULL != (gr = getgrnam(current_prot->gid_name))) {
  945. + #ifndef OS2
  946.           if (TRACE) fprintf(stderr, 
  947.                      "%s(\"%s\") returned (%s:%s:%d:...)\n",
  948.                      "HTAA_getGid: getgrnam",
  949.                      current_prot->gid_name,
  950.                      gr->gr_name, gr->gr_passwd, gr->gr_gid);
  951. + #endif /* OS2 */
  952.           return gr->gr_gid;
  953.           }
  954.       }
  955. diff -cr -X exclude old/WWW/Library/Implementation/HTAccess.c new/WWW/Library/Implementation/HTAccess.c
  956. *** old/WWW/Library/Implementation/HTAccess.c    Sat Feb 22 11:48:14 1997
  957. --- new/WWW/Library/Implementation/HTAccess.c    Mon May 19 17:14:14 1997
  958. ***************
  959. *** 857,863 ****
  960.       HTLoadError(sink, 500, "Unable to access document.");
  961.       return NO;
  962.       }
  963. !  
  964.       /*
  965.       **  If you get this, then please find which routine is returning
  966.       **  a positive unrecognised error code!
  967. --- 857,863 ----
  968.       HTLoadError(sink, 500, "Unable to access document.");
  969.       return NO;
  970.       }
  971.       /*
  972.       **  If you get this, then please find which routine is returning
  973.       **  a positive unrecognised error code!
  974. diff -cr -X exclude old/WWW/Library/Implementation/HTFile.c new/WWW/Library/Implementation/HTFile.c
  975. *** old/WWW/Library/Implementation/HTFile.c    Fri Jan 10 15:55:30 1997
  976. --- new/WWW/Library/Implementation/HTFile.c    Mon May 19 15:55:16 1997
  977. ***************
  978. *** 44,49 ****
  979. --- 44,53 ----
  980.   
  981.   #define HT_EM_SPACE ((char)2)
  982.   
  983. + #ifdef OS2
  984. + #define lstat(x, y) fstat(x, y)
  985. + #endif /* OS2 */
  986.   #define FREE(x) if (x) {free(x); x = NULL;}
  987.   
  988.   #ifdef VMS
  989. ***************
  990. *** 215,226 ****
  991. --- 219,232 ----
  992.               sprintf(buf, fmt, entry);
  993.               PUTS(buf);
  994.               END(HTML_A);
  995. + #ifndef OS2
  996.               if (c != 'A' && (st.st_mode & S_IFMT) == S_IFLNK &&
  997.                   (len = readlink(file, buf, sizeof(buf))) >= 0) {
  998.                   PUTS(" -> ");
  999.                   buf[len] = '\0';
  1000.                   PUTS(buf);
  1001.               }
  1002. + #endif /* !OS2 */
  1003.               *buf = '\0';
  1004.               break;
  1005.   
  1006. ***************
  1007. *** 264,272 ****
  1008.               case S_IFIFO: type = 'p'; break;
  1009.               case S_IFCHR: type = 'c'; break;
  1010.               case S_IFDIR: type = 'd'; break;
  1011. -             case S_IFBLK: type = 'b'; break;
  1012.               case S_IFREG: type = '-'; break;
  1013.               case S_IFLNK: type = 'l'; break;
  1014.   #ifdef S_IFSOCK
  1015.               case S_IFSOCK: type = 's'; break;
  1016.   #endif /* S_IFSOCK */
  1017. --- 270,280 ----
  1018.               case S_IFIFO: type = 'p'; break;
  1019.               case S_IFCHR: type = 'c'; break;
  1020.               case S_IFDIR: type = 'd'; break;
  1021.               case S_IFREG: type = '-'; break;
  1022. + #ifndef OS2
  1023. +             case S_IFBLK: type = 'b'; break;
  1024.               case S_IFLNK: type = 'l'; break;
  1025. + #endif /* !OS2 */
  1026.   #ifdef S_IFSOCK
  1027.               case S_IFSOCK: type = 's'; break;
  1028.   #endif /* S_IFSOCK */
  1029. ***************
  1030. *** 532,537 ****
  1031. --- 540,549 ----
  1032.           FREE(access);    
  1033.       if ((0 == strcasecomp(host, HTHostName())) ||
  1034.           (0 == strcasecomp(host, "localhost")) || !*host) {
  1035. + #ifdef OS2
  1036. +       sscanf(path, "/%s", path); /* Get rid of leading slash
  1037. +                        since we have a drive letter */
  1038. + #endif /* OS2 */
  1039.           FREE(host);
  1040.           if (TRACE)
  1041.               fprintf(stderr, "Node `%s' means path `%s'\n", name, path);
  1042. ***************
  1043. *** 900,905 ****
  1044. --- 912,920 ----
  1045.   #ifdef VMS
  1046.   #define NO_GROUPS
  1047.   #endif /* VMS */
  1048. + #ifdef OS2
  1049. + #define NO_GROUPS
  1050. + #endif /* OS2 */
  1051.   #ifdef NO_UNIX_IO
  1052.   #define NO_GROUPS
  1053.   #endif /* NO_UNIX_IO */
  1054. ***************
  1055. *** 1162,1167 ****
  1056. --- 1177,1183 ----
  1057.           outofmem(__FILE__, "HTDirTitles");
  1058.       sprintf(relative, "%s/..", current);
  1059.   #ifndef VMS
  1060.       {
  1061.           /*
  1062.           **  On Unix, if it's not ftp and the directory cannot
  1063. ***************
  1064. *** 1171,1178 ****
  1065.           **  HTVMSBrowseDir().
  1066.           */
  1067.           extern BOOLEAN LYisLocalFile PARAMS((char *logical));
  1068.           DIR  * dp = NULL;
  1069.           if (LYisLocalFile(logical)) {
  1070.           /*
  1071.           **  We need an absolute file path for the opendir.
  1072. --- 1187,1198 ----
  1073.           **  HTVMSBrowseDir().
  1074.           */
  1075.           extern BOOLEAN LYisLocalFile PARAMS((char *logical));
  1076. + #ifndef OS2
  1077.           DIR  * dp = NULL;
  1078. ! #endif /* !OS2 */
  1079. ! #ifdef OS2
  1080. !         FILE * dp = NULL;
  1081. ! #endif /* OS2 */
  1082.           if (LYisLocalFile(logical)) {
  1083.           /*
  1084.           **  We need an absolute file path for the opendir.
  1085. diff -cr -X exclude old/WWW/Library/Implementation/HTFile.h new/WWW/Library/Implementation/HTFile.h
  1086. *** old/WWW/Library/Implementation/HTFile.h    Fri Jan 10 15:55:42 1997
  1087. --- new/WWW/Library/Implementation/HTFile.h    Mon May 19 15:31:06 1997
  1088. ***************
  1089. *** 14,19 ****
  1090. --- 14,25 ----
  1091.   #include "HTAccess.h"
  1092.   #include "HTML.h"               /* SCW */
  1093.   
  1094. + #ifdef OS2 /* Drive letter support for OS/2 (JFM) */
  1095. + #define getcwd _getcwd2
  1096. + #define chdir _chdir2
  1097. + #endif /* OS2 */
  1098.   /*
  1099.   **  Controlling globals
  1100.   **
  1101. diff -cr -X exclude old/WWW/Library/Implementation/HTParse.c new/WWW/Library/Implementation/HTParse.c
  1102. *** old/WWW/Library/Implementation/HTParse.c    Wed Feb 19 16:50:24 1997
  1103. --- new/WWW/Library/Implementation/HTParse.c    Mon May 19 16:50:38 1997
  1104. ***************
  1105. *** 371,377 ****
  1106. --- 371,379 ----
  1107.               ;                /* last / */
  1108.           p[1] = '\0';            /* Remove filename */
  1109.           strcat(result, given.relative);    /* Add given one */
  1110. + #ifndef OS2 /* Never simplify pathname on OS2 */
  1111.           HTSimplify (result);
  1112. + #endif /* OS2 */
  1113.           }
  1114.           if (TRACE)
  1115.               fprintf(stderr, "2\n");
  1116. diff -cr -X exclude old/WWW/Library/Implementation/HTTCP.c new/WWW/Library/Implementation/HTTCP.c
  1117. *** old/WWW/Library/Implementation/HTTCP.c    Wed Feb 26 12:44:28 1997
  1118. --- new/WWW/Library/Implementation/HTTCP.c    Tue May 13 19:44:34 1997
  1119. ***************
  1120. *** 26,32 ****
  1121.   #include <signal.h>
  1122.   #include <sys/wait.h>
  1123.   #endif /* NSL_FORK */
  1124. !  
  1125.   #define FREE(x) if (x) {free(x); x = NULL;}
  1126.   
  1127.   extern int HTCheckForInterrupt NOPARAMS;
  1128. --- 26,36 ----
  1129.   #include <signal.h>
  1130.   #include <sys/wait.h>
  1131.   #endif /* NSL_FORK */
  1132. ! #ifdef OS2
  1133. ! #include <sys/so_ioctl.h>
  1134. ! #endif /* OS2 */
  1135.   #define FREE(x) if (x) {free(x); x = NULL;}
  1136.   
  1137.   extern int HTCheckForInterrupt NOPARAMS;
  1138. ***************
  1139. *** 108,115 ****
  1140. --- 112,121 ----
  1141.   #ifndef __NetBSD__
  1142.   #ifndef __FreeBSD__
  1143.   #ifndef BSDI
  1144. + #ifndef OS2
  1145.   extern char *sys_errlist[];        /* see man perror on cernvax */
  1146.   extern int sys_nerr;
  1147. + #endif /* !OS2 */
  1148.   #endif /* BSDI */
  1149.   #endif /* !__FreeBSD__ */
  1150.   #endif /* !__NetBSD__ */
  1151. diff -cr -X exclude old/WWW/Library/Implementation/HTTelnet.c new/WWW/Library/Implementation/HTTelnet.c
  1152. *** old/WWW/Library/Implementation/HTTelnet.c    Wed Jun 26 11:17:00 1996
  1153. --- new/WWW/Library/Implementation/HTTelnet.c    Sat Jul 12 09:44:28 1997
  1154. ***************
  1155. *** 216,221 ****
  1156. --- 216,248 ----
  1157.   #define TELNET_DONE
  1158.   #endif /* MULTINET */
  1159.   
  1160. + #ifdef OS2
  1161. + #ifndef TELNET_DONE
  1162. +     if (login_protocol == rlogin) {
  1163. +         sprintf(command, "%s %s%s%s", RLOGIN_COMMAND,
  1164. +         hostname,
  1165. +         user ? " -l " : "",
  1166. +         user ? user : "");
  1167. +     } else if (login_protocol == tn3270) {
  1168. +         sprintf(command, "%s %s %s", TN3270_COMMAND,
  1169. +         hostname,
  1170. +         port ? port : "");
  1171. +     } else {  /* TELNET */
  1172. +         sprintf(command, "%s %s %s", TELNET_COMMAND,
  1173. +         hostname,
  1174. +         port ? port : "");
  1175. +     }
  1176. +     if (TRACE)
  1177. +         fprintf(stderr, "HTTelnet: Normal: Command is: %s\n\n", command);
  1178. +     system(command);
  1179. +     return HT_NO_DATA;        /* Ok - it was done but no data */
  1180. + #define TELNET_DONE
  1181. + #endif /* !TELNET_DONE */
  1182. + #endif /* OS2 */
  1183. +     
  1184.   #if defined(WIN_TCP)
  1185.           {
  1186.               char *cp;
  1187. diff -cr -X exclude old/WWW/Library/Implementation/HTUtils.h new/WWW/Library/Implementation/HTUtils.h
  1188. *** old/WWW/Library/Implementation/HTUtils.h    Thu Dec 19 13:00:52 1996
  1189. --- new/WWW/Library/Implementation/HTUtils.h    Mon May 19 16:04:32 1997
  1190. ***************
  1191. *** 106,111 ****
  1192. --- 106,117 ----
  1193.   
  1194.   #endif /* !VMS */
  1195.   
  1196. + #ifdef OS2 /* Drive letter support for OS/2 (JFM) */
  1197. + #define getcwd _getcwd2
  1198. + #define chdir _chdir2
  1199. + #endif /* OS2 */
  1200.   /*
  1201.   
  1202.   Macros for declarations
  1203.