home *** CD-ROM | disk | FTP | other *** search
/ PC Online 1997 July / PCO_07_97.ISO / filesbbs / OS2 / LYNX271.ARJ / LYNX271.ZIP / patches.os2 < prev    next >
Encoding:
Text File  |  1997-05-22  |  33.1 KB  |  1,130 lines

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