home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / x / volume5 / xdir / patch4 < prev    next >
Encoding:
Internet Message Format  |  1993-04-28  |  11.2 KB

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