home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / x / volume6 / xdir / patch4 < prev    next >
Internet Message Format  |  1990-02-27  |  12KB

  1. Path: uunet!aplcen!uakari.primate.wisc.edu!zaphod.mps.ohio-state.edu!swrinde!cs.utexas.edu!sun-barr!newstop!sun!turnpike!argv
  2. From: argv%turnpike@Sun.COM (Dan Heller)
  3. Newsgroups: comp.sources.x
  4. Subject: v06i004: xdir -- Directory Browser, Patch4
  5. Message-ID: <132318@sun.Eng.Sun.COM>
  6. Date: 28 Feb 90 09:47:35 GMT
  7. Sender: news@sun.Eng.Sun.COM
  8. Lines: 405
  9. Approved: argv@sun.com
  10.  
  11. Submitted-by: Erik M. van der Poel <uunet!kddlab!sran8.sra.co.jp!erik>
  12. Posting-number: Volume 6, Issue 4
  13. Archive-name: xdir/patch4
  14. Patch-To: xdir: Volume 4, Issue 14-15,97
  15. Patch-To: xdir: Volume 5, Issue 14,69
  16.  
  17. This is the fourth set of patches for the SelFile directory browser
  18. package.
  19.  
  20. These patches are for people with patchlevel 3, which is the version
  21. that appears in R4 (contrib/clients/selfile).
  22.  
  23.     * The R4 Athena Text widget now uses XtNuseStringInPlace.
  24.  
  25.     * In R4, the Athena Text widget does not set the insertion point
  26.       after replacing text.
  27.  
  28.     * XawScrollBarSetThumb -> XawScrollbarSetThumb
  29.  
  30.     * The name of the sample program has been changed from xdir to
  31.       selfile, to avoid conflict with Win Treese's xdir.
  32.  
  33.     * The patchlevel.h file has been updated to patch level four.
  34.  
  35. --
  36. Erik M. van der Poel                  erik@sra.co.jp             (Japan)
  37. SRA, 1-1-1 Hirakawa-cho, Chiyoda-ku   erik%sra.co.jp@uunet.uu.net  (USA)
  38. Tokyo 102 Japan. TEL +81-3-234-2692   erik%sra.co.jp@mcvax.uucp (Europe)
  39.  
  40. Prereq: 3
  41. *** ../old/patchlevel.h    Mon Jan 29 13:58:20 1990
  42. --- patchlevel.h    Mon Jan 29 14:08:12 1990
  43. ***************
  44. *** 1 ****
  45. ! #define PATCHLEVEL 3
  46. --- 1 ----
  47. ! #define PATCHLEVEL 4
  48. *** ../old/Draw.c    Mon Jan 29 13:58:18 1990
  49. --- Draw.c    Mon Jan 29 14:08:10 1990
  50. ***************
  51. *** 1,5 ****
  52.   #ifndef lint
  53. ! static char rcsid[] = "$Header: Draw.c,v 1.2 89/12/15 11:59:08 kit Exp $";
  54.   #endif
  55.   
  56.   /*
  57. --- 1,5 ----
  58.   #ifndef lint
  59. ! static char rcsid[] = "$Header: Draw.c,v 1.13 90/01/29 13:36:45 erik Exp $";
  60.   #endif
  61.   
  62.   /*
  63. ***************
  64. *** 235,241 ****
  65.   #ifdef SEL_FILE_PRE_R4_XAW_XMU
  66.               XtScrollBarSetThumb(
  67.   #else /* def SEL_FILE_PRE_R4_XAW_XMU */
  68. !             XawScrollBarSetThumb(
  69.   #endif /* def SEL_FILE_PRE_R4_XAW_XMU */
  70.   
  71.                   selFileVScrolls[n],
  72. --- 235,241 ----
  73.   #ifdef SEL_FILE_PRE_R4_XAW_XMU
  74.               XtScrollBarSetThumb(
  75.   #else /* def SEL_FILE_PRE_R4_XAW_XMU */
  76. !             XawScrollbarSetThumb(
  77.   #endif /* def SEL_FILE_PRE_R4_XAW_XMU */
  78.   
  79.                   selFileVScrolls[n],
  80. ***************
  81. *** 249,255 ****
  82.   #ifdef SEL_FILE_PRE_R4_XAW_XMU
  83.               XtScrollBarSetThumb(
  84.   #else /* def SEL_FILE_PRE_R4_XAW_XMU */
  85. !             XawScrollBarSetThumb(
  86.   #endif /* def SEL_FILE_PRE_R4_XAW_XMU */
  87.   
  88.                   selFileHScrolls[n],
  89. --- 249,255 ----
  90.   #ifdef SEL_FILE_PRE_R4_XAW_XMU
  91.               XtScrollBarSetThumb(
  92.   #else /* def SEL_FILE_PRE_R4_XAW_XMU */
  93. !             XawScrollbarSetThumb(
  94.   #endif /* def SEL_FILE_PRE_R4_XAW_XMU */
  95.   
  96.                   selFileHScrolls[n],
  97. ***************
  98. *** 266,274 ****
  99.               XtScrollBarSetThumb(selFileHScrolls[n], (float) 0.0,
  100.                   (float) 1.0);
  101.   #else /* def SEL_FILE_PRE_R4_XAW_XMU */
  102. !             XawScrollBarSetThumb(selFileVScrolls[n], (float) 0.0,
  103.                   (float) 1.0);
  104. !             XawScrollBarSetThumb(selFileHScrolls[n], (float) 0.0,
  105.                   (float) 1.0);
  106.   #endif /* def SEL_FILE_PRE_R4_XAW_XMU */
  107.   
  108. --- 266,274 ----
  109.               XtScrollBarSetThumb(selFileHScrolls[n], (float) 0.0,
  110.                   (float) 1.0);
  111.   #else /* def SEL_FILE_PRE_R4_XAW_XMU */
  112. !             XawScrollbarSetThumb(selFileVScrolls[n], (float) 0.0,
  113.                   (float) 1.0);
  114. !             XawScrollbarSetThumb(selFileHScrolls[n], (float) 0.0,
  115.                   (float) 1.0);
  116.   #endif /* def SEL_FILE_PRE_R4_XAW_XMU */
  117.   
  118. ***************
  119. *** 342,348 ****
  120.   #ifdef SEL_FILE_PRE_R4_XAW_XMU
  121.       XtScrollBarSetThumb(
  122.   #else /* def SEL_FILE_PRE_R4_XAW_XMU */
  123. !     XawScrollBarSetThumb(
  124.   #endif /* def SEL_FILE_PRE_R4_XAW_XMU */
  125.   
  126.           selFileVScrolls[n],
  127. --- 342,348 ----
  128.   #ifdef SEL_FILE_PRE_R4_XAW_XMU
  129.       XtScrollBarSetThumb(
  130.   #else /* def SEL_FILE_PRE_R4_XAW_XMU */
  131. !     XawScrollbarSetThumb(
  132.   #endif /* def SEL_FILE_PRE_R4_XAW_XMU */
  133.   
  134.           selFileVScrolls[n],
  135. ***************
  136. *** 648,654 ****
  137.   #ifdef SEL_FILE_PRE_R4_XAW_XMU
  138.               XtScrollBarSetThumb(
  139.   #else /* def SEL_FILE_PRE_R4_XAW_XMU */
  140. !             XawScrollBarSetThumb(
  141.   #endif /* def SEL_FILE_PRE_R4_XAW_XMU */
  142.   
  143.               selFileVScrolls[n],
  144. --- 648,654 ----
  145.   #ifdef SEL_FILE_PRE_R4_XAW_XMU
  146.               XtScrollBarSetThumb(
  147.   #else /* def SEL_FILE_PRE_R4_XAW_XMU */
  148. !             XawScrollbarSetThumb(
  149.   #endif /* def SEL_FILE_PRE_R4_XAW_XMU */
  150.   
  151.               selFileVScrolls[n],
  152. ***************
  153. *** 948,954 ****
  154.   #ifdef SEL_FILE_PRE_R4_XAW_XMU
  155.           XtScrollBarSetThumb(
  156.   #else /* def SEL_FILE_PRE_R4_XAW_XMU */
  157. !         XawScrollBarSetThumb(
  158.   #endif /* def SEL_FILE_PRE_R4_XAW_XMU */
  159.   
  160.               w,
  161. --- 948,954 ----
  162.   #ifdef SEL_FILE_PRE_R4_XAW_XMU
  163.           XtScrollBarSetThumb(
  164.   #else /* def SEL_FILE_PRE_R4_XAW_XMU */
  165. !         XawScrollbarSetThumb(
  166.   #endif /* def SEL_FILE_PRE_R4_XAW_XMU */
  167.   
  168.               w,
  169. ***************
  170. *** 1050,1056 ****
  171.   #ifdef SEL_FILE_PRE_R4_XAW_XMU
  172.           XtScrollBarSetThumb(
  173.   #else /* def SEL_FILE_PRE_R4_XAW_XMU */
  174. !         XawScrollBarSetThumb(
  175.   #endif /* def SEL_FILE_PRE_R4_XAW_XMU */
  176.   
  177.               w,
  178. --- 1050,1056 ----
  179.   #ifdef SEL_FILE_PRE_R4_XAW_XMU
  180.           XtScrollBarSetThumb(
  181.   #else /* def SEL_FILE_PRE_R4_XAW_XMU */
  182. !         XawScrollbarSetThumb(
  183.   #endif /* def SEL_FILE_PRE_R4_XAW_XMU */
  184.   
  185.               w,
  186. ***************
  187. *** 1194,1200 ****
  188.   #ifdef SEL_FILE_PRE_R4_XAW_XMU
  189.           XtScrollBarSetThumb(
  190.   #else /* def SEL_FILE_PRE_R4_XAW_XMU */
  191. !         XawScrollBarSetThumb(
  192.   #endif /* def SEL_FILE_PRE_R4_XAW_XMU */
  193.   
  194.               w,
  195. --- 1194,1200 ----
  196.   #ifdef SEL_FILE_PRE_R4_XAW_XMU
  197.           XtScrollBarSetThumb(
  198.   #else /* def SEL_FILE_PRE_R4_XAW_XMU */
  199. !         XawScrollbarSetThumb(
  200.   #endif /* def SEL_FILE_PRE_R4_XAW_XMU */
  201.   
  202.               w,
  203. *** ../old/Imakefile    Mon Jan 29 13:58:18 1990
  204. --- Imakefile    Mon Jan 29 14:08:11 1990
  205. ***************
  206. *** 1,5 ****
  207.   #
  208. ! # This file describes how to build xdir, a simple application that uses the
  209.   # XsraSelFile file selection dialog package.
  210.   #
  211.   # The program is linked with Athena widgets (Xaw) by default. It can be linked
  212. --- 1,5 ----
  213.   #
  214. ! # This file describes how to build selfile, a simple application that uses the
  215.   # XsraSelFile file selection dialog package.
  216.   #
  217.   # The program is linked with Athena widgets (Xaw) by default. It can be linked
  218. ***************
  219. *** 37,43 ****
  220.   #------------------------------------------------------------------------------
  221.   #
  222.   #        DEFINES = -DSEL_FILE_XW
  223. -         DEFINES = CompatibilityFlags
  224.   
  225.              SRCS = xdir.c SelFile.c Dir.c Path.c Draw.c
  226.              OBJS = xdir.o SelFile.o Dir.o Path.o Draw.o
  227. --- 37,42 ----
  228. ***************
  229. *** 46,51 ****
  230.   LOCAL_LIBRARIES = $(XAWLIB) $(XMULIB) $(XTOOLLIB) $(XLIB)
  231.   #LOCAL_LIBRARIES = $(XWLIB) $(XAWLIB) $(XMULIB) $(XTOOLLIB) $(XLIB)
  232.   
  233. ! ComplexProgramTarget(xdir)
  234.   
  235.   NormalLintTarget($(SRCS))
  236. --- 45,50 ----
  237.   LOCAL_LIBRARIES = $(XAWLIB) $(XMULIB) $(XTOOLLIB) $(XLIB)
  238.   #LOCAL_LIBRARIES = $(XWLIB) $(XAWLIB) $(XMULIB) $(XTOOLLIB) $(XLIB)
  239.   
  240. ! ComplexProgramTarget(selfile)
  241.   
  242.   NormalLintTarget($(SRCS))
  243. *** ../old/Makefile    Mon Jan 29 13:58:18 1990
  244. --- Makefile    Mon Jan 29 14:08:11 1990
  245. ***************
  246. *** 7,13 ****
  247.   SRCS = SelFile.c Dir.c Path.c Draw.c
  248.   OBJS = SelFile.o Dir.o Path.o Draw.o
  249.   
  250. ! xdir:            xdir.o $(OBJS)
  251.   #    $(CC) $(CFLAGS) xdir.o $(OBJS) -lXw -lXt -lX11 -o $@
  252.       $(CC) $(CFLAGS) xdir.o $(OBJS) -lXaw -lXmu -lXt -lX11 -o $@
  253.   
  254. --- 7,13 ----
  255.   SRCS = SelFile.c Dir.c Path.c Draw.c
  256.   OBJS = SelFile.o Dir.o Path.o Draw.o
  257.   
  258. ! selfile:        xdir.o $(OBJS)
  259.   #    $(CC) $(CFLAGS) xdir.o $(OBJS) -lXw -lXt -lX11 -o $@
  260.       $(CC) $(CFLAGS) xdir.o $(OBJS) -lXaw -lXmu -lXt -lX11 -o $@
  261.   
  262. ***************
  263. *** 15,18 ****
  264.       lint -auxz $(CFLAGS) xdir.c $(SRCS)
  265.   
  266.   clean:
  267. !     rm -f xdir *.o core a.out
  268. --- 15,18 ----
  269.       lint -auxz $(CFLAGS) xdir.c $(SRCS)
  270.   
  271.   clean:
  272. !     rm -f selfile *.o core a.out
  273. *** ../old/Path.c    Mon Jan 29 13:58:19 1990
  274. --- Path.c    Mon Jan 29 14:08:11 1990
  275. ***************
  276. *** 1,5 ****
  277.   #ifndef lint
  278. ! static char rcsid[] = "$Header: Path.c,v 1.2 89/12/15 11:59:24 kit Exp $";
  279.   #endif
  280.   
  281.   /*
  282. --- 1,5 ----
  283.   #ifndef lint
  284. ! static char rcsid[] = "$Header: Path.c,v 1.12 90/01/29 13:46:27 erik Exp $";
  285.   #endif
  286.   
  287.   /*
  288. ***************
  289. *** 696,702 ****
  290.   #ifdef SEL_FILE_PRE_R4_XAW_XMU
  291.           XtScrollBarSetThumb(
  292.   #else /* def SEL_FILE_PRE_R4_XAW_XMU */
  293. !         XawScrollBarSetThumb(
  294.   #endif /* def SEL_FILE_PRE_R4_XAW_XMU */
  295.   
  296.               selFileHScroll,
  297. --- 696,702 ----
  298.   #ifdef SEL_FILE_PRE_R4_XAW_XMU
  299.           XtScrollBarSetThumb(
  300.   #else /* def SEL_FILE_PRE_R4_XAW_XMU */
  301. !         XawScrollbarSetThumb(
  302.   #endif /* def SEL_FILE_PRE_R4_XAW_XMU */
  303.   
  304.               selFileHScroll,
  305. ***************
  306. *** 768,773 ****
  307. --- 768,774 ----
  308.           XtTextReplace(selFileField, 0, strlen(SFtextBuffer), &text);
  309.   #else /* def SEL_FILE_PRE_R4_XAW_XMU */
  310.           XawTextReplace(selFileField, 0, strlen(SFtextBuffer), &text);
  311. +         XawTextSetInsertionPoint(selFileField, strlen(SFtextBuffer));
  312.   #endif /* def SEL_FILE_PRE_R4_XAW_XMU */
  313.   
  314.       }
  315. *** ../old/SelFile.c    Mon Jan 29 13:58:19 1990
  316. --- SelFile.c    Mon Jan 29 14:08:11 1990
  317. ***************
  318. *** 1,5 ****
  319.   #ifndef lint
  320. ! static char rcsid[] = "$Header: SelFile.c,v 1.2 89/12/15 11:59:32 kit Exp $";
  321.   #endif
  322.   
  323.   /*
  324. --- 1,5 ----
  325.   #ifndef lint
  326. ! static char rcsid[] = "$Header: SelFile.c,v 1.15 90/01/29 13:48:28 erik Exp $";
  327.   #endif
  328.   
  329.   /*
  330. ***************
  331. *** 381,387 ****
  332.       u_char        cstr[256];
  333.   #endif /* def SEL_FILE_JAPANESE */
  334.   
  335. !     Arg        arglist[24];
  336.   
  337.   #if defined(SEL_FILE_XW) || defined(SEL_FILE_XWTEXTEDIT)
  338.       SFfieldData    *data;
  339. --- 381,387 ----
  340.       u_char        cstr[256];
  341.   #endif /* def SEL_FILE_JAPANESE */
  342.   
  343. !     Arg        arglist[20];
  344.   
  345.   #if defined(SEL_FILE_XW) || defined(SEL_FILE_XWTEXTEDIT)
  346.       SFfieldData    *data;
  347. ***************
  348. *** 536,554 ****
  349.                           resizeHeight    |
  350.                           wordBreak    |
  351.                           0);            i++;
  352.   #else /* def SEL_FILE_PRE_R4_XAW_XMU */
  353.       XtSetArg(arglist[i], XtNeditType, XawtextEdit);            i++;
  354.       XtSetArg(arglist[i], XtNwrap, XawtextWrapWord);            i++;
  355.       XtSetArg(arglist[i], XtNresize, XawtextResizeHeight);        i++;
  356. ! #endif /* def SEL_FILE_PRE_R4_XAW_XMU */
  357. ! #ifdef SEL_FILE_PRE_R4_XAW_XMU
  358.       selFileField = XtCreateManagedWidget("selFileField",
  359. -         asciiStringWidgetClass, selFileForm, arglist, i);
  360. - #else
  361. -     selFileField = XtCreateManagedWidget("selFileField",
  362.           asciiTextWidgetClass, selFileForm, arglist, i);
  363. ! #endif
  364.   
  365.   #endif /* defined(SEL_FILE_XW) || defined(SEL_FILE_XWTEXTEDIT) */
  366.   
  367. --- 536,551 ----
  368.                           resizeHeight    |
  369.                           wordBreak    |
  370.                           0);            i++;
  371. +     selFileField = XtCreateManagedWidget("selFileField",
  372. +         asciiStringWidgetClass, selFileForm, arglist, i);
  373.   #else /* def SEL_FILE_PRE_R4_XAW_XMU */
  374.       XtSetArg(arglist[i], XtNeditType, XawtextEdit);            i++;
  375.       XtSetArg(arglist[i], XtNwrap, XawtextWrapWord);            i++;
  376.       XtSetArg(arglist[i], XtNresize, XawtextResizeHeight);        i++;
  377. !     XtSetArg(arglist[i], XtNuseStringInPlace, True);        i++;
  378.       selFileField = XtCreateManagedWidget("selFileField",
  379.           asciiTextWidgetClass, selFileForm, arglist, i);
  380. ! #endif /* def SEL_FILE_PRE_R4_XAW_XMU */
  381.   
  382.   #endif /* defined(SEL_FILE_XW) || defined(SEL_FILE_XWTEXTEDIT) */
  383.   
  384. *** ../old/SFinternal.h    Mon Jan 29 13:58:19 1990
  385. --- SFinternal.h    Mon Jan 29 14:08:11 1990
  386. ***************
  387. *** 1,4 ****
  388. ! /* $Header: SFinternal.h,v 1.7 89/10/31 18:36:41 erik Exp $ */
  389.   
  390.   /*
  391.    * Copyright 1989 Software Research Associates, Inc., Tokyo, Japan
  392. --- 1,4 ----
  393. ! /* $Header: SFinternal.h,v 1.8 89/12/02 13:12:03 erik Exp $ */
  394.   
  395.   /*
  396.    * Copyright 1989 Software Research Associates, Inc., Tokyo, Japan
  397. ***************
  398. *** 27,32 ****
  399. --- 27,33 ----
  400.    */
  401.   
  402.   #include <X11/Intrinsic.h>
  403. + #include <X11/StringDefs.h>
  404.   #include <X11/Xos.h>
  405.   
  406.   #if defined(SEL_FILE_XW) || defined(SEL_FILE_XWTEXTEDIT)
  407.  
  408. dan
  409. -----------------------------------------------------------
  410.             O'Reilly && Associates
  411.         argv@sun.com / argv@ora.com
  412.        632 Petaluma Ave, Sebastopol, CA 95472 
  413.      800-338-NUTS, in CA: 800-533-NUTS, FAX 707-829-0104
  414.     Opinions expressed reflect those of the author only.
  415.