home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 22 gnu / 22-gnu.zip / xfm131.zip / XFree86 / src / diffs / xfm-1.3.1
Text File  |  1996-03-22  |  5KB  |  195 lines

  1. *** 1.1    1996/03/22 20:24:21
  2. --- xfm-1.3.1/Imakefile    1996/03/22 20:42:52
  3. ***************
  4. *** 26,35 ****
  5.   InstallSubdirs(Subdirs)
  6.   InstallManSubdirs(Subdirs)
  7.   
  8. ! XFMLIBDIR = $(LIBDIR)/xfm
  9.   
  10.   CppScriptTarget(xfm.install.script,xfm.install.cpp,-DLIBDIR=$(XFMLIBDIR),)
  11.   InstallScript(xfm.install,$(BINDIR))
  12.   
  13.   /* CppFileTarget will not work under SunOS 4.1, you might wish to replace
  14.      it by CppScriptTarget or install the appdefaults file by hand. */
  15. --- 26,37 ----
  16.   InstallSubdirs(Subdirs)
  17.   InstallManSubdirs(Subdirs)
  18.   
  19. ! XFMLIBDIR = $(DESTDIR)$(LIBDIR)/xfm
  20.   
  21. + #ifndef OS2Architecture
  22.   CppScriptTarget(xfm.install.script,xfm.install.cpp,-DLIBDIR=$(XFMLIBDIR),)
  23.   InstallScript(xfm.install,$(BINDIR))
  24. + #endif
  25.   
  26.   /* CppFileTarget will not work under SunOS 4.1, you might wish to replace
  27.      it by CppScriptTarget or install the appdefaults file by hand. */
  28. *** 1.1    1996/03/22 19:59:46
  29. --- xfm-1.3.1/xfm/Fm.h    1996/03/22 20:12:06
  30. ***************
  31. *** 42,47 ****
  32. --- 42,60 ----
  33.   #define S_ISSOCK(mode) (mode & S_IFMT) == S_IFSOCK
  34.   #endif
  35.   
  36. + /* OS/2 also does not have everything */
  37. + #ifdef __EMX__
  38. + #define lstat stat
  39. + #define getwd(s) _getcwd2(s,MAXPATHLEN)
  40. + #define chdir(s) _chdir2(s)
  41. + #define S_ISLNK(mode) (0)
  42. + #define S_ISBLK(mode) (0)
  43. + #define symlink(t,s) (0)
  44. + #define readlink(s,t,l) (strcpy(t,s),strlen(t))
  45. + #define mkfifo(p,m) (0)
  46. + #define mknod(p,m,d) (0)
  47. + #endif
  48.   /* for compatibility with BSDI */
  49.   #define fnmatch xfnmatch
  50.   
  51. *** 1.1    1996/03/22 20:18:41
  52. --- xfm-1.3.1/xfm/FmBitmaps.c    1996/03/22 20:22:44
  53. ***************
  54. *** 208,217 ****
  55. --- 208,226 ----
  56.     xpm_attr.numsymbols = 1;
  57.     XtVaGetValues(aw.shell, XtNbackground, &none_color.pixel, NULL);
  58.   
  59. + #ifndef __EMX__
  60.     if (XpmReadFileToPixmap(dpy, win,
  61.                 searchPath(fullname, resources.pixmap_path, name),
  62.                 &icon_bm, NULL, &xpm_attr) == XpmSuccess)
  63.       return icon_bm;
  64. + #else
  65. +   { char *c = (char*)__XOS2RedirRoot(resources.pixmap_path);
  66. +     if (XpmReadFileToPixmap(dpy, win,
  67. +               searchPath(fullname, c, name),
  68. +               &icon_bm, NULL, &xpm_attr) == XpmSuccess)
  69. +       return icon_bm;
  70. +   }
  71. + #endif
  72.   #endif
  73.   
  74.     /* now search bitmap in standard locations (*bitmapFilePath): */
  75. ***************
  76. *** 223,232 ****
  77. --- 232,250 ----
  78.   
  79.     /* finally search along *bitmapPath: */
  80.   
  81. + #ifndef __EMX__
  82.     if (XReadBitmapFile(dpy, win,
  83.                 searchPath(fullname, resources.bitmap_path, name),
  84.                 &w, &h, &icon_bm, &x, &y) == BitmapSuccess)
  85.       return icon_bm;
  86. + #else
  87. +   { char *c = (char*)__XOS2RedirRoot(resources.bitmap_path);
  88. +     if (XReadBitmapFile(dpy, win,
  89. +               searchPath(fullname, c, name),
  90. +               &w, &h, &icon_bm, &x, &y) == BitmapSuccess)
  91. +       return icon_bm;
  92. +   }
  93. + #endif
  94.     return None;
  95.   }
  96.   
  97. *** 1.1    1996/03/22 19:56:41
  98. --- xfm-1.3.1/xfm/FmDirs.c    1996/03/22 21:55:04
  99. ***************
  100. *** 87,94 ****
  101. --- 87,102 ----
  102.       fl = (FileRec **) XTREALLOC(fl, (i+1)*sizeof(FileRec *));
  103.       fl[i] = (FileRec *) XtMalloc(sizeof(FileRec));
  104.       strcpy(fl[i]->name, entry->d_name);
  105.       if (lstat(entry->d_name, &(fl[i]->stats)))
  106. + #ifndef __EMX__
  107.         goto error1;
  108. + #else
  109. +     { 
  110. +       if (strlen(fw->directory)==3 && !strcmp(entry->d_name,".."))
  111. +         fl[i]->stats.st_mode = S_IFDIR;
  112. +     }
  113. + #endif
  114.       if (S_ISLNK(fl[i]->stats.st_mode)) {
  115.         fl[i]->sym_link = True;
  116.         stat(entry->d_name, &(fl[i]->stats));
  117. ***************
  118. *** 123,128 ****
  119. --- 131,139 ----
  120.   {
  121.     FileList fl = NULL, oldfl = fw->files;
  122.     int n = 0, m = 0;
  123. + #ifdef __EMX__
  124. +   struct stat statbuf;
  125. + #endif
  126.   
  127.   #ifdef DEBUG_MALLOC
  128.     fprintf(stderr,"entering filterDirectory: %lu\n",malloc_inuse(NULL));
  129. ***************
  130. *** 137,143 ****
  131. --- 148,156 ----
  132.        (
  133.         !strcmp(oldfl[m]->name,"..") ||
  134.         (
  135. + #ifndef __EMX__
  136.          (fw->show_hidden || (oldfl[m]->name[0] != '.')) &&
  137. + #endif
  138.          (
  139.           (S_ISDIR(oldfl[m]->stats.st_mode) && (type != Files)) ||
  140.           (!S_ISDIR(oldfl[m]->stats.st_mode) && type != Directories)
  141. *** 1.1    1996/03/22 19:54:07
  142. --- xfm-1.3.1/xfm/FmErrors.c    1996/03/22 19:54:34
  143. ***************
  144. *** 22,28 ****
  145.   #define LABEL_WIDTH 300
  146.   
  147.   /* Uggh ...... */
  148. ! #ifndef linux
  149.   extern char *sys_errlist[];
  150.   #endif
  151.   
  152. --- 22,28 ----
  153.   #define LABEL_WIDTH 300
  154.   
  155.   /* Uggh ...... */
  156. ! #if !defined(linux) && !defined(__EMX__)
  157.   extern char *sys_errlist[];
  158.   #endif
  159.   
  160. *** 1.1    1996/03/22 19:56:49
  161. --- xfm-1.3.1/xfm/FmFw.c    1996/03/22 21:44:40
  162. ***************
  163. *** 1368,1377 ****
  164. --- 1368,1379 ----
  165.       }
  166.     }
  167.   
  168. + #ifndef __EMX
  169.     if (fw->show_hidden)
  170.       tick(fw->view_items[10]);
  171.     else
  172.       noTick(fw->view_items[10]);
  173. + #endif
  174.   
  175.     noTick(fw->view_items[0]);
  176.     noTick(fw->view_items[1]);
  177. *** 1.1    1996/03/22 19:57:27
  178. --- xfm-1.3.1/xfm/FmOps.c    1996/03/22 22:04:06
  179. ***************
  180. *** 186,192 ****
  181. --- 186,196 ----
  182.       return (strcpy(s1, s2));
  183.     for (s = p; *s; s = t) {
  184.       int l;
  185. + #ifndef __EMX__
  186.       if (!(t = strchr(s, ':')))
  187. + #else
  188. +     if (!(t = strchr(s, ';')))
  189. + #endif
  190.         t = strchr(s, 0);
  191.       if (s == t) goto next;
  192.       if (s[0] == '.')
  193.