home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / x / volume13 / xdtm / part04 < prev    next >
Internet Message Format  |  1991-05-18  |  51KB

  1. Path: uunet!cs.utexas.edu!sun-barr!newstop!exodus!cogs.sussex.ac.uk
  2. From: eddyg@cogs.sussex.ac.uk (EdwardJ. Groenendaal)
  3. Newsgroups: comp.sources.x
  4. Subject: v13i009: xdtm - X Desktop Manager for the X Window System, Part04/11
  5. Message-ID: <13573@exodus.Eng.Sun.COM>
  6. Date: 19 May 91 00:02:58 GMT
  7. References: <csx-13i006:xdtm@uunet.UU.NET>
  8. Sender: news@exodus.Eng.Sun.COM
  9. Lines: 1437
  10. Approved: argv@sun.com
  11.  
  12. Submitted-by: Edward "J." Groenendaal <eddyg@cogs.sussex.ac.uk>
  13. Posting-number: Volume 13, Issue 9
  14. Archive-name: xdtm/part04
  15.  
  16. Submitted-by: eddyg@cste
  17. Archive-name: xdtm/part04
  18.  
  19. ---- Cut Here and feed the following to sh ----
  20. #!/bin/sh
  21. # This is part 04 of xdtm
  22. # ============= xdtm/Xedw/XedwListP.h ==============
  23. if test ! -d 'xdtm'; then
  24.     echo 'x - creating directory xdtm'
  25.     mkdir 'xdtm'
  26. fi
  27. if test ! -d 'xdtm/Xedw'; then
  28.     echo 'x - creating directory xdtm/Xedw'
  29.     mkdir 'xdtm/Xedw'
  30. fi
  31. if test -f 'xdtm/Xedw/XedwListP.h' -a X"$1" != X"-c"; then
  32.     echo 'x - skipping xdtm/Xedw/XedwListP.h (File already exists)'
  33. else
  34. echo 'x - extracting xdtm/Xedw/XedwListP.h (Text)'
  35. sed 's/^X//' << 'SHAR_EOF' > 'xdtm/Xedw/XedwListP.h' &&
  36. X/*
  37. X * $XConsortium: XedwListP.h,v 1.12 89/12/11 15:09:04 kit Exp $
  38. X *
  39. X * Copyright 1989 Massachusetts Institute of Technology
  40. X *
  41. X * Permission to use, copy, modify, distribute, and sell this software and its
  42. X * documentation for any purpose is hereby granted without fee, provided that
  43. X * the above copyright notice appear in all copies and that both that
  44. X * copyright notice and this permission notice appear in supporting
  45. X * documentation, and that the name of M.I.T. not be used in advertising or
  46. X * publicity pertaining to distribution of the software without specific,
  47. X * written prior permission.  M.I.T. makes no representations about the
  48. X * suitability of this software for any purpose.  It is provided "as is"
  49. X * without express or implied warranty.
  50. X *
  51. X * M.I.T. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
  52. X * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL M.I.T.
  53. X * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  54. X * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
  55. X * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN 
  56. X * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  57. X *
  58. X * Author:  Chris D. Peterson, MIT X Consortium
  59. X */
  60. X
  61. X
  62. X/* 
  63. X * XedwListP.h - Private definitions for XedwList widget
  64. X * 
  65. X * This is the XedwList widget, it is useful to display a xedwList, without the
  66. X * overhead of having a widget for each item in the xedwList.  It allows 
  67. X * the user to select an item in a xedwList and notifies the application through
  68. X * a callback function.
  69. X *
  70. X *    Created:     8/13/88
  71. X *    By:        Chris D. Peterson
  72. X *                      MIT - Project Athena
  73. X */
  74. X
  75. X#ifndef _XedwListP_h
  76. X#define _XedwListP_h
  77. X
  78. X/***********************************************************************
  79. X *
  80. X * XedwList Widget Private Data
  81. X *
  82. X ***********************************************************************/
  83. X
  84. X#include <X11/Xaw/SimpleP.h>
  85. X#include "XedwList.h"
  86. X
  87. X#define NO_HIGHLIGHT            XDTM_LIST_NONE
  88. X#define OUT_OF_RANGE            -1
  89. X#define OKAY                     0
  90. X#define XedwOff             0
  91. X#define XedwOn             1
  92. X
  93. X/* New fields for the XedwList widget class record */
  94. X
  95. Xtypedef struct {int foo;} XedwListClassPart;
  96. X
  97. X/* Full class record declaration */
  98. Xtypedef struct _XedwListClassRec {
  99. X    CoreClassPart          core_class;
  100. X    SimpleClassPart        simple_class;
  101. X    XedwListClassPart    xedwList_class;
  102. X} XedwListClassRec;
  103. X
  104. Xextern XedwListClassRec xedwListClassRec;
  105. X
  106. Xtypedef struct _LinkedList {
  107. X  int index;
  108. X  struct _LinkedList *next;
  109. X} LinkedList;
  110. X
  111. X/* New fields for the XedwList widget record */
  112. Xtypedef struct {
  113. X  /* resources */
  114. X  Pixel         foreground;
  115. X  Dimension     internal_width,
  116. X                internal_height,
  117. X                column_space,
  118. X                row_space,
  119. X                icon_width,
  120. X                icon_height;
  121. X  int           default_cols;
  122. X  Boolean       force_cols,
  123. X                paste,
  124. X                vertical_cols,
  125. X                show_icons,    /* Show icons with list */
  126. X          multiple;       /* Allow multiple selections */
  127. X  int           longest;
  128. X  int           nitems;        /* number of items in the xedwList. */
  129. X  XFontStruct    *font;
  130. X  XedwList  **xedwList;
  131. X  XtCallbackList  callback;
  132. X
  133. X  /* private state */
  134. X
  135. X  LinkedList  *is_highlighted;    /* set to the items currently highlighted. */
  136. X  int         highlight,    /* set to the item that should be highlighted.*/
  137. X              col_width,    /* width of each column. */
  138. X              row_height,    /* height of each row. */
  139. X              nrows,        /* number of rows in the xedwList. */
  140. X              ncols;        /* number of columns in the xedwList. */
  141. X  GC          normgc,        /* a couple o' GC's. */
  142. X              revgc,
  143. X              graygc;        /* used when inactive. */
  144. X  Pixmap      default_icon;
  145. X
  146. X} XedwListPart;
  147. X
  148. X
  149. X/****************************************************************
  150. X *
  151. X * Full instance record declaration
  152. X *
  153. X ****************************************************************/
  154. X
  155. Xtypedef struct _XedwListRec {
  156. X  CorePart    core;
  157. X  SimplePart    simple;
  158. X  XedwListPart    xedwList;
  159. X} XedwListRec;
  160. X
  161. X#endif /* _XedwListP_h */
  162. X
  163. X
  164. X
  165. SHAR_EOF
  166. chmod 0644 xdtm/Xedw/XedwListP.h ||
  167. echo 'restore of xdtm/Xedw/XedwListP.h failed'
  168. Wc_c="`wc -c < 'xdtm/Xedw/XedwListP.h'`"
  169. test 4117 -eq "$Wc_c" ||
  170.     echo 'xdtm/Xedw/XedwListP.h: original size 4117, current size' "$Wc_c"
  171. fi
  172. # ============= xdtm/appman.c ==============
  173. if test -f 'xdtm/appman.c' -a X"$1" != X"-c"; then
  174.     echo 'x - skipping xdtm/appman.c (File already exists)'
  175. else
  176. echo 'x - extracting xdtm/appman.c (Text)'
  177. sed 's/^X//' << 'SHAR_EOF' > 'xdtm/appman.c' &&
  178. X/*****************************************************************************
  179. X ** File          : appman.c                                                **
  180. X ** Purpose       : Application Manager                                     **
  181. X ** Author        : Edward Groenendaal                                      **
  182. X ** Date          : 19th Feb 1991                                           **
  183. X ** Documentation : Xedw Design Folder                                      **
  184. X ** Related Files : menus.c                                                 **
  185. X *****************************************************************************/
  186. X
  187. X#include "xdtm.h"
  188. X
  189. X#include <X11/Xaw/MenuButton.h> /* Needed for selection menu */
  190. X#include <X11/Xaw/SimpleMenu.h>
  191. X#include <X11/Xaw/Viewport.h>
  192. X#include <X11/Xaw/Command.h>
  193. X#include <X11/Xaw/Label.h>
  194. X#include <sys/types.h>        /* For opening and closing file descriptors */
  195. X#include <sys/stat.h>        /* For opening and closing file descriptors */
  196. X#include <sys/wait.h>
  197. X
  198. X#ifndef TRUE_SYSV
  199. X#include <sys/file.h>        /* For access(2) */
  200. X#endif
  201. X
  202. X#include <signal.h>
  203. X#include "menus.h"        /* For the use of Trash, Copy, and Move */
  204. X#include "parse.h"              /* For access to AppSelection */
  205. X#include "Xedw/XedwList.h"
  206. X#include "Xedw/XedwForm.h"
  207. X
  208. X/* Include button bitmaps */
  209. X#include "bitmaps/Trash.Button"
  210. X#include "bitmaps/Copy.Button"
  211. X#include "bitmaps/Move.Button"
  212. X
  213. X/* Include Cursor bitmaps */
  214. X#include "bitmaps/Copy.Cursor"
  215. X#include "bitmaps/Copy.Mask"
  216. X#include "bitmaps/Move.Cursor"
  217. X#include "bitmaps/Move.Mask"
  218. X
  219. Xpublic  Mode     mode;
  220. Xpublic  Boolean  buttonSensitive;
  221. Xpublic  Widget   trashButton, copyButton, moveButton;
  222. Xprivate XedwListReturnStruct *return_list;
  223. Xpublic  Widget   appManager;
  224. Xpublic  Widget   selectionMenu;
  225. Xprivate Widget   appManagerView;
  226. Xprivate Widget   appManagerButton;
  227. Xprivate Widget   buttonForm;
  228. Xprivate Cursor   copyCursor, moveCursor;
  229. Xpublic  Cardinal appman_selection;
  230. Xprivate String   srcdir, dstdir;
  231. Xprivate String  *patharray;
  232. Xprivate String   path;
  233. Xprivate Cardinal pathsize; 
  234. X
  235. X/* Thank Harald Vogt for persueding me to change my version of strstr
  236. X * to mystrstr, not that you would get a clash if compiled with the
  237. X * correct options.. but better safe than sorry.
  238. X */
  239. X
  240. X#ifdef HAS_STRSTR
  241. X#define mystrstr(cs, ct)    strstr(cs, ct)
  242. X#else
  243. Xextern char *mystrstr(char *, char *);
  244. X#endif
  245. X
  246. X/***************************************************************************** 
  247. X *             createAppManagerWidgets                              *
  248. X *****************************************************************************/
  249. Xvoid createAppManagerWidgets(Widget topForm)
  250. X{
  251. X  /* Create and initialise the widgets for the Application Manager and the
  252. X   * copy, move, and trash buttons below.
  253. X   *
  254. X   * - Takes a Widget which will be their parent.
  255. X   * + Returns nothing
  256. X   */
  257. X
  258. X  private void button_selected(Widget, Cardinal, caddr_t); 
  259. X  private void program_selected(Widget, caddr_t, caddr_t); 
  260. X  Arg arglist[8], *newlist;
  261. X  Pixmap trash, copy, move;
  262. X  Cardinal i, t;
  263. X  XtTranslations appManTranslations;
  264. X
  265. X  /* Translations for the Application Manager.. not quite what I wanted but
  266. X   * near enough that it doesn't matter.
  267. X   */
  268. X  static char defaultTranslations[] =
  269. X            "<Btn1Down>:    Set()\n\
  270. X         <Btn1Up>:      Unset()\n\
  271. X             <Btn1Up>(2):   Notify() Unset()";
  272. X  
  273. X  /* Create Application Manager Selector */
  274. X  i = 0;
  275. X  XtSetArg(arglist[i], XtNfromVert,         menuBar); i++;
  276. X  XtSetArg(arglist[i], XtNrubberWidth,        False); i++;
  277. X  XtSetArg(arglist[i], XtNrubberHeight,       False); i++;
  278. X  XtSetArg(arglist[i], XtNmenuName, "selectionMenu"); i++;
  279. X  newlist = XtMergeArgLists(arglist, i, chain_position, chain_size); 
  280. X  appManagerButton  =   XtCreateManagedWidget("appManagerButton",
  281. X                          menuButtonWidgetClass,
  282. X                          topForm,
  283. X                          newlist, i + chain_size);
  284. X  XtFree(newlist);
  285. X
  286. X  /* Create Menu for Application Manager Selector, the panes are added after 
  287. X   * parsing the config file.
  288. X   */
  289. X  selectionMenu    =   XtCreatePopupShell("selectionMenu",
  290. X                      simpleMenuWidgetClass,
  291. X                      appManagerButton,
  292. X                      NULL, 0);
  293. X
  294. X
  295. X  /* Create Application Manager Viewport*/
  296. X  i = 0;
  297. X  XtSetArg(arglist[i], XtNfromVert,      appManagerButton);   i++;
  298. X  XtSetArg(arglist[i], XtNforceBars,                 True);   i++;
  299. X  XtSetArg(arglist[i], XtNallowVert,                 True);   i++;
  300. X  XtSetArg(arglist[i], XtNrubberWidth,              False);   i++;
  301. X  XtSetArg(arglist[i], XtNwidthLinked,   appManagerButton);   i++;
  302. X  newlist = XtMergeArgLists(arglist, i, chain_position, chain_size);
  303. X  appManagerView      =   XtCreateManagedWidget("appManagerView",
  304. X                        viewportWidgetClass,
  305. X                        topForm,
  306. X                        newlist, i + chain_size);
  307. X  XtFree(newlist);
  308. X  
  309. X  /* Create Application Manager List */
  310. X  i = 0;
  311. X  XtSetArg(arglist[i], XtNdefaultColumns,  1); i++;
  312. X  XtSetArg(arglist[i], XtNforceColumns, True); i++;
  313. X  XtSetArg(arglist[i], XtNshowIcons,    True); i++;
  314. X  appManager          =   XtCreateManagedWidget("appManager",
  315. X                        xedwListWidgetClass,
  316. X                        appManagerView,
  317. X                        arglist, i);
  318. X
  319. X  /* Action Buttons */
  320. X
  321. X  buttonSensitive = False; /* Start off insensitive */
  322. X
  323. X  /* Create Form to hold buttons in place, and nicely spaced */
  324. X  i = 0;
  325. X  XtSetArg(arglist[i], XtNfromVert,    appManagerView);   i++;
  326. X  XtSetArg(arglist[i], XtNrubberWidth,          False);   i++;
  327. X  XtSetArg(arglist[i], XtNrubberHeight,         False);   i++;
  328. X  XtSetArg(arglist[i], XtNtop,          XtChainBottom);   i++;
  329. X  XtSetArg(arglist[i], XtNwidthLinked, appManagerView);   i++;
  330. X  XtSetArg(arglist[i], XtNborderWidth,              0);   i++;
  331. X  XtSetArg(arglist[i], XtNdefaultDistance,          0);   i++;
  332. X  buttonForm          =   XtCreateManagedWidget("buttonForm",
  333. X                        xedwFormWidgetClass,
  334. X                        topForm,
  335. X                        arglist, i);
  336. X
  337. X  /* Create the Pixmap for the trash button */
  338. X  trash = XCreateBitmapFromData(XtDisplay(topForm),
  339. X                RootWindowOfScreen(XtScreen(topForm)),
  340. X                trash_bits,
  341. X                trash_width, trash_height);
  342. X
  343. X  /* Create Trash Button */
  344. X  i = 0;
  345. X  XtSetArg(arglist[i], XtNhighlightThickness,       1);   i++;  
  346. X  XtSetArg(arglist[i], XtNsensitive,            False);   i++;
  347. X  XtSetArg(arglist[i], XtNbitmap,               trash);   i++;
  348. X  trashButton          =      XtCreateManagedWidget("trashButton",
  349. X                        commandWidgetClass,
  350. X                        buttonForm,
  351. X                        arglist, i);
  352. X
  353. X  /* Create the Pixmap for the move button */
  354. X  move = XCreateBitmapFromData(XtDisplay(topForm),
  355. X                RootWindowOfScreen(XtScreen(topForm)),
  356. X                move_bits,
  357. X                move_width, move_height);
  358. X
  359. X  /* Create the Move Button */
  360. X  i = t = i-1; /* Share resource settings with trash, and copy */
  361. X  XtSetArg(arglist[i], XtNfromHoriz,      trashButton);   i++;
  362. X  XtSetArg(arglist[i], XtNhorizDistance,            6);   i++;
  363. X  XtSetArg(arglist[i], XtNbitmap,                move);   i++;
  364. X  moveButton          =   XtCreateManagedWidget("moveButton",
  365. X                        commandWidgetClass,
  366. X                        buttonForm,
  367. X                        arglist, i);
  368. X
  369. X  /* Create Pixmap for the copy button */
  370. X  copy = XCreateBitmapFromData(XtDisplay(topForm),
  371. X                RootWindowOfScreen(XtScreen(topForm)),
  372. X                copy_bits,
  373. X                copy_width, copy_height);
  374. X
  375. X  /* Create the Copy Button */
  376. X  i = t;
  377. X  XtSetArg(arglist[i], XtNfromHoriz,        moveButton);   i++;
  378. X  XtSetArg(arglist[i], XtNhorizDistance,             6);   i++;
  379. X  XtSetArg(arglist[i], XtNbitmap,                 copy);   i++;
  380. X  copyButton          =   XtCreateManagedWidget("copyButton",
  381. X                        commandWidgetClass,
  382. X                        buttonForm,
  383. X                        arglist, i);
  384. X
  385. X  /* Add the Callbacks for the Buttons */
  386. X  XtAddCallback(trashButton, XtNcallback, button_selected, Trash);
  387. X  XtAddCallback(copyButton, XtNcallback, button_selected, Copy);
  388. X  XtAddCallback(moveButton, XtNcallback, button_selected, Move);
  389. X  
  390. X  /* Add Callback and translations for the Application Manager */
  391. X  XtAddCallback(appManager, XtNcallback, program_selected, 0);
  392. X  appManTranslations = XtParseTranslationTable(defaultTranslations);
  393. X  XtUninstallTranslations(appManager);
  394. X  XtOverrideTranslations(appManager, appManTranslations);
  395. X}
  396. X
  397. X/***************************************************************************** 
  398. X *                        initAppManager                              *
  399. X *****************************************************************************/
  400. Xpublic void initAppManager(Widget w)
  401. X{
  402. X  /* Get the cursors, setup the path and signal handler for catching the
  403. X   * death of children. (Thanks to Christos Zoulas, Cornell for suggesting
  404. X   * the use of the signal handler).
  405. X   *
  406. X   * - Takes a Widget (any old widget will do!)
  407. X   * + Returns nothing
  408. X   */
  409. X  extern int count_chr(String, char);
  410. X  public void selectionChange(Widget, Cardinal, caddr_t);
  411. X  private void child_died(int, int);
  412. X  Pixmap cursor, mask;
  413. X  XColor foreground, background;
  414. X  Colormap def_cmap;
  415. X  String pathptr;
  416. X  Cardinal n;
  417. X
  418. X  /* set selection in label */
  419. X  selectionChange(w, 0, NULL);
  420. X
  421. X  /* get the copy and move cursors */
  422. X  def_cmap = DefaultColormapOfScreen(XtScreen(w));
  423. X
  424. X  XParseColor(XtDisplay(w), def_cmap, "Black", &foreground);
  425. X  XParseColor(XtDisplay(w), def_cmap, "White", &background);
  426. X  XAllocColor(XtDisplay(w), def_cmap, &foreground);
  427. X  XAllocColor(XtDisplay(w), def_cmap, &background);
  428. X
  429. X  cursor = XCreateBitmapFromData(XtDisplay(w),
  430. X                 RootWindowOfScreen(XtScreen(w)),
  431. X                 CopyC_bits,
  432. X                 CopyC_width, CopyC_height);
  433. X
  434. X  mask   = XCreateBitmapFromData(XtDisplay(w),
  435. X                 RootWindowOfScreen(XtScreen(w)),
  436. X                 CopyM_bits,
  437. X                 CopyM_width, CopyM_height);
  438. X
  439. X  copyCursor = XCreatePixmapCursor(XtDisplay(w), 
  440. X                   cursor, mask,
  441. X                   &foreground, &background,
  442. X                   CopyC_x_hot, CopyC_y_hot);
  443. X
  444. X  XFreePixmap(XtDisplay(w), cursor);
  445. X  XFreePixmap(XtDisplay(w), mask);
  446. X
  447. X  cursor = XCreateBitmapFromData(XtDisplay(w),
  448. X                       RootWindowOfScreen(XtScreen(w)),
  449. X                       MoveC_bits,
  450. X                       MoveC_width, MoveC_height);
  451. X
  452. X  mask   = XCreateBitmapFromData(XtDisplay(w),
  453. X                       RootWindowOfScreen(XtScreen(w)),
  454. X                       MoveM_bits,
  455. X                       MoveM_width, MoveM_height);
  456. X
  457. X  moveCursor = XCreatePixmapCursor(XtDisplay(w), 
  458. X                   cursor, mask,
  459. X                   &foreground, &background,
  460. X                   MoveC_x_hot, MoveC_y_hot);
  461. X
  462. X  XFreePixmap(XtDisplay(w), cursor);
  463. X  XFreePixmap(XtDisplay(w), mask);
  464. X
  465. X  mode = NormalMode; /* Start in Normal Mode */
  466. X
  467. X  /* Get path and put it into patharray, for use by execute to find programs */
  468. X  if ((path = (String) getenv("PATH")) == NULL) {
  469. X    fprintf(stderr, "Warning: PATH environment variable not set\n");
  470. X  } else path = XtNewString(path);
  471. X  
  472. X  patharray = (String*) XtMalloc ((count_chr(path, ':')+1) * sizeof(String));
  473. X
  474. X  /* Extract the directories from the path into the path array,
  475. X   * after many complaints the warning about non-fully qualified directories
  476. X   * has been removed!
  477. X   */
  478. X  n = 0;
  479. X
  480. X  pathptr = strtok(path, ":");
  481. X  while (pathptr != NULL) {
  482. X    if (*pathptr == '/')
  483. X      patharray[n++] = pathptr;
  484. X    pathptr = strtok(NULL, ":");
  485. X  }
  486. X  
  487. X  pathsize = n;
  488. X
  489. X  /* setup the signal handler for catching the childrens deaths */
  490. X
  491. X#ifdef SIGCLD
  492. X  signal(SIGCLD, child_died);    /* Old */
  493. X#else
  494. X  signal(SIGCHLD, child_died);    /* New */
  495. X#endif
  496. X
  497. X}
  498. X
  499. X/*****************************************************************************
  500. X *                            button_selected                                *
  501. X *****************************************************************************/
  502. Xpublic void button_selected(Widget w, Cardinal type, caddr_t call_data)
  503. X{
  504. X  /* One of the copy, move or delete buttons has been pressed, if 
  505. X   * there are any files selected then do the stuff.
  506. X   *
  507. X   * - Takes a Widget, the Button type and call_data which is ignored 
  508. X   * + Returns nothing
  509. X   */
  510. X
  511. X  extern void button_dialog(Cardinal, XedwListReturnStruct *);
  512. X  extern void changestate(Boolean);
  513. X  extern void setCursor(Cursor);
  514. X  extern String getfilename(String);
  515. X  extern String cwd;
  516. X  extern Cursor left_ptr;
  517. X  extern Widget directoryManager;
  518. X  extern Boolean buttonSensitive;
  519. X  static Boolean copyfirst = True; /* first time button selected */
  520. X  static Boolean movefirst = True; /* first time button selected */
  521. X  XedwListReturnStruct *tmp;
  522. X
  523. X  /* Get list of currently highlighted items */
  524. X  if (movefirst == True && copyfirst == True) {
  525. X    return_list = XedwListShowCurrent(directoryManager);
  526. X    /* extract filenames from rest of data */
  527. X    tmp = return_list;
  528. X    while (tmp != NULL) {
  529. X      tmp->string = getfilename(tmp->string);
  530. X      tmp = tmp->next;
  531. X    }
  532. X  }
  533. X  
  534. X  /* if non empty call dialog */
  535. X  if (!(return_list->xedwList_index == XDTM_LIST_NONE &&
  536. X      movefirst == True && copyfirst == True)) {
  537. X    switch(type) {
  538. X    case Trash:
  539. X      changestate(False);
  540. X      button_dialog(type, return_list); /* The dialog does the rest */
  541. X      break;
  542. X    case Copy:
  543. X      if (copyfirst == True) {
  544. X    /* deselect all */
  545. X    XedwListUnhighlight(directoryManager, XedwAll);
  546. X    setCursor(copyCursor);
  547. X    mode = CopyMode;
  548. X    changestate(False);
  549. X    srcdir = XtNewString(cwd);     /* Remember src dir */
  550. X    copyfirst = False;
  551. X      } else {                /* Second press, copy files */
  552. X    setCursor(left_ptr);
  553. X    mode = NormalMode;
  554. X    buttonSensitive = True; /* hack to force buttons insensitive */
  555. X    changestate(False);
  556. X    dstdir = XtNewString(cwd);
  557. X    button_dialog(type, return_list);
  558. X    copyfirst = True;
  559. X      }
  560. X      break;
  561. X    case Move:
  562. X      if (movefirst == True) {
  563. X    /* deselect all */
  564. X    XedwListUnhighlight(directoryManager, XedwAll);
  565. X    setCursor(moveCursor);
  566. X    mode = MoveMode;
  567. X    changestate(False);
  568. X    srcdir = XtNewString(cwd);     /* Remember src dir */
  569. X    movefirst = False;        
  570. X      } else {
  571. X    setCursor(left_ptr);        /* Second press, move files */
  572. X    mode = NormalMode;
  573. X    buttonSensitive = True; /* hack to force buttons insensitive */
  574. X    changestate(False);
  575. X    dstdir = XtNewString(cwd);
  576. X    button_dialog(type, return_list);
  577. X    movefirst = True;
  578. X      }
  579. X      break;
  580. X    }
  581. X  }
  582. X  else
  583. X    XBell(XtDisplay(w), 100);    /* Nothing selected - ring bell */
  584. X
  585. X}
  586. X
  587. X/*****************************************************************************
  588. X *                           trashQueryResult                                *
  589. X *****************************************************************************/
  590. Xpublic void trashQueryResult(Widget w, Boolean delete, caddr_t call_data)
  591. X{
  592. X  /* The action routine called by the Trash dialog,
  593. X   *   if the person selected delete then try to delete those files,
  594. X   *   otherwise do nothing.
  595. X   *
  596. X   * - Takes a Widget, A Boolean saying whether to delete the files, and
  597. X   *   some call_data, ignored.
  598. X   * + Returns nothing
  599. X   */
  600. X  public int  execute(String, String, String, Boolean);
  601. X  extern void destroy_button_dialog(void);
  602. X  extern void changestate(Boolean);
  603. X  extern void setCursor(Cursor);
  604. X  extern Boolean directoryManagerNewDirectory(String);
  605. X  extern void query_dialog(String, Boolean);
  606. X  extern Cursor busy, left_ptr;
  607. X  extern String cwd;
  608. X  private void freeReturnStruct(void);
  609. X  String rmstring;
  610. X  int status;
  611. X  XedwListReturnStruct *tmp;
  612. X
  613. X  setCursor(busy);
  614. X
  615. X  /* destroy dialog */
  616. X  destroy_button_dialog();
  617. X
  618. X  if (delete == True) {
  619. X    /* delete files */
  620. X
  621. X    /* I can't be bothered writing my own remove routine so I'll call
  622. X     * 'rm(1)' via execute instead.
  623. X     */
  624. X    rmstring = XtNewString("rm -fr");
  625. X    tmp = return_list;
  626. X    while (tmp != NULL) {
  627. X      rmstring = (String) XtRealloc (rmstring, sizeof(char) * 
  628. X                     (strlen(rmstring) +
  629. X                      strlen(tmp->string) + 5));
  630. X      sprintf(rmstring, "%s '%s'", rmstring, tmp->string);
  631. X      tmp = tmp->next;
  632. X    }
  633. X    if ((status = execute(NULL, "rm", rmstring, True)) != 0) {
  634. X      XBell(XtDisplay(w), 100);
  635. X      query_dialog("Can't remove file", False); /* Remove failed */
  636. X    }
  637. X    XtFree(rmstring);
  638. X    /* Delay so that systems using 
  639. X     * NFS have time to update the directory table.
  640. X     */
  641. X    sleep(app_data.delay);
  642. X    /* refresh directory (clear highlights as a side effect) */
  643. X    directoryManagerNewDirectory(cwd);
  644. X  } else {
  645. X    /* leave list highlighted, make buttons sensitive again */
  646. X    changestate(True);
  647. X  }
  648. X
  649. X  setCursor(left_ptr);
  650. X
  651. X  /* free memory for list */
  652. X  freeReturnStruct();
  653. X
  654. X}
  655. X
  656. X/*****************************************************************************
  657. X *                         copyQueryResult                                   *
  658. X *****************************************************************************/
  659. Xpublic void copyQueryResult(Widget w, Boolean copy, caddr_t call_data)
  660. X{
  661. X  /* The action routine called by the copy dialog, 
  662. X   * if the user selected the copy button, copy the files,
  663. X   * otherwise do nothing.
  664. X   *
  665. X   * - Takes a widget, copy - whether to copy files, call_data - ignored
  666. X   * + Returns Nothing
  667. X   */
  668. X
  669. X  extern void destroy_button_dialog(void);
  670. X  extern void changestate(Boolean);
  671. X  extern void setCursor(Cursor);
  672. X  extern void query_dialog(String, Boolean);
  673. X  extern Boolean directoryManagerNewDirectory(String);
  674. X  extern Cursor busy, left_ptr;
  675. X  private void freeReturnStruct(void);
  676. X  public int execute(String, String, String, Boolean);
  677. X  extern String cwd;
  678. X  String copystring;
  679. X  int status;
  680. X  Cardinal srclen, dstlen;
  681. X  XedwListReturnStruct *tmp;
  682. X
  683. X  destroy_button_dialog();
  684. X
  685. X  setCursor(busy);
  686. X
  687. X  if (copy == True) {
  688. X    /* copy files */
  689. X    
  690. X    /* I can't be bothered writing my own copy routine so I'll call
  691. X     * 'cp(1)' via execute instead.
  692. X     */
  693. X    srclen = strlen(srcdir);
  694. X    dstlen = strlen(dstdir);
  695. X    copystring = XtNewString("cp -r");
  696. X    tmp = return_list;
  697. X    while (tmp != NULL) {
  698. X      copystring = (String) XtRealloc (copystring, sizeof(char) * 
  699. X                       (strlen(copystring) +
  700. X                    strlen(tmp->string) +
  701. X                    srclen + 6));
  702. X      sprintf(copystring, "%s '%s/%s'", copystring, srcdir, tmp->string);
  703. X      tmp = tmp->next;
  704. X    }
  705. X    copystring = (String) XtRealloc (copystring, sizeof(char) *
  706. X                     (strlen(copystring) +
  707. X                      dstlen + 5));
  708. X
  709. X    sprintf(copystring, "%s '%s'", copystring, dstdir);
  710. X    if ((status = execute(NULL, "cp", copystring, True)) != 0) {
  711. X      XBell(XtDisplay(w), 100);
  712. X      query_dialog("Can't copy file!", False);
  713. X    }
  714. X    XtFree(copystring);
  715. X    /* Delay so that systems using 
  716. X     * NFS have time to update the directory table.
  717. X     */
  718. X    sleep(app_data.delay);
  719. X    /* refresh directory (clear highlights as a side effect) */
  720. X    directoryManagerNewDirectory(cwd);
  721. X  } else {
  722. X    changestate(True);
  723. X  }
  724. X
  725. X    
  726. X  XtFree(srcdir);
  727. X  XtFree(dstdir);
  728. X  setCursor(left_ptr);
  729. X  freeReturnStruct();
  730. X}
  731. X/*****************************************************************************
  732. X *                           moveQueryResult                                 *
  733. X *****************************************************************************/
  734. Xpublic void moveQueryResult(Widget w, Boolean move, caddr_t call_data)
  735. X{
  736. X  /* Action called when option selected in move dialog, 
  737. X   * if move was selected move the file, otherwise do nothing.
  738. X   */
  739. X
  740. X  extern void destroy_button_dialog(void);
  741. X  extern void changestate(Boolean);
  742. X  extern void setCursor(Cursor);
  743. X  extern Boolean directoryManagerNewDirectory(String);
  744. X  extern void query_dialog(String, Boolean);
  745. X  extern Cursor busy, left_ptr;
  746. X  private void freeReturnStruct(void);
  747. X  public int execute(String, String, String, Boolean);
  748. X  extern String cwd;
  749. X  String movestring;
  750. X  Cardinal srclen, dstlen;
  751. X  int status;
  752. X  XedwListReturnStruct *tmp;
  753. X
  754. X  destroy_button_dialog(); /* Get rid of dialog */
  755. X
  756. X  setCursor(busy);
  757. X
  758. X  if (move == True) {
  759. X    /* move files */
  760. X    
  761. X    /* I can't be bothered writing my own move routine so I'll call
  762. X     * 'mv(1)' via execute instead.
  763. X     */
  764. X    srclen = strlen(srcdir);
  765. X    dstlen = strlen(dstdir);
  766. X    movestring = XtNewString("mv -f ");
  767. X    tmp = return_list;
  768. X    while (tmp != NULL) {
  769. X      movestring = (String) XtRealloc (movestring, sizeof(char) * 
  770. X                       (strlen(movestring) +
  771. X                    strlen(tmp->string) +
  772. X                    srclen + 7));
  773. X      sprintf(movestring, "%s '%s/%s'", movestring, srcdir, tmp->string);
  774. X      tmp = tmp->next;
  775. X    }
  776. X    movestring = (String) XtRealloc (movestring, sizeof(char) *
  777. X                     (strlen(movestring) +
  778. X                      dstlen + 5));
  779. X
  780. X    sprintf(movestring, "%s '%s'", movestring, dstdir);
  781. X    if ((status = execute(NULL, "mv", movestring, True)) != 0) {
  782. X      XBell(XtDisplay(w), 100);
  783. X      query_dialog("Can't move file!", False);
  784. X    }
  785. X    XtFree(movestring);
  786. X    /* Delay so that systems using 
  787. X     * NFS have time to update the directory table.
  788. X     */
  789. X    sleep(app_data.delay);
  790. X    /* refresh directory (clear highlights as a side effect) */
  791. X    directoryManagerNewDirectory(cwd);
  792. X  } else {
  793. X    changestate(True);
  794. X  }
  795. X    
  796. X  XtFree(srcdir);
  797. X  XtFree(dstdir);
  798. X  setCursor(left_ptr);
  799. X  freeReturnStruct();
  800. X}
  801. X
  802. X/*****************************************************************************
  803. X *                           freeReturnStruct                                *
  804. X *****************************************************************************/
  805. Xprivate void freeReturnStruct(void)
  806. X{
  807. X  /* Deallocate memory for the current list return structure.
  808. X   */
  809. X
  810. X  XedwListReturnStruct *tmp;
  811. X
  812. X  while(return_list != NULL) {
  813. X    tmp = return_list;
  814. X    return_list = return_list->next;
  815. X    XtFree(tmp->string);
  816. X    XtFree(tmp);
  817. X  }
  818. X}
  819. X  
  820. X/*****************************************************************************
  821. X *                           selectionChange                                 *
  822. X *****************************************************************************/
  823. Xpublic void selectionChange(Widget w, Cardinal selection, caddr_t crap)
  824. X{
  825. X  /* Action called when a selection menu pane is chosen
  826. X   * Change the current selection list to that of 'selection'
  827. X   */
  828. X
  829. X  extern AppSelection **appselections;
  830. X  extern Cardinal selectionindex;
  831. X  XedwList **list;
  832. X  Arg arglist[1];
  833. X  Cardinal i;
  834. X
  835. X  appman_selection = selection;
  836. X  i = 0;
  837. X  XtSetArg(arglist[i], XtNlabel, appselections[appman_selection]->name); i++;
  838. X  XtSetValues(appManagerButton, arglist, i);
  839. X
  840. X  /* Change contents of AppManager to that of the new selection */
  841. X  list = (XedwList**) appselections[appman_selection]->list;
  842. X
  843. X  XedwListChange(appManager, list, appselections[appman_selection]->number,
  844. X         0, True);
  845. X
  846. X  /* Reset scrollbar to top */
  847. X  setscroll(appManagerView, 0.0);
  848. X}
  849. X
  850. X/*****************************************************************************
  851. X *                              program_selected                             *
  852. X *****************************************************************************/
  853. Xprivate void program_selected(Widget w, caddr_t client, caddr_t call)
  854. X{
  855. X  /* Action called when an icon in the selection list is double clicked.
  856. X   * it executes the program.
  857. X   *
  858. X   * - All arguments ignored
  859. X   */
  860. X
  861. X  public int execute(String, String, String, Boolean);
  862. X  public String build_arguments(String, SelOptions);
  863. X  extern void setCursor(Cursor);
  864. X  extern Cursor busy;
  865. X  extern AppSelection **appselections;
  866. X  XedwListReturnStruct *list;
  867. X  AppProgram *node;
  868. X  String program, filename;
  869. X  Cardinal index;
  870. X
  871. X  setCursor(busy);
  872. X  /* Get the index of the program double clicked,
  873. X   * Thanks to David Byers for spotting a bug here in v1.0 
  874. X   */
  875. X  list = XedwListShowCurrent(w);
  876. X  if (list->xedwList_index == XDTM_LIST_NONE) {
  877. X    XBell(XtDisplay(w), 100);
  878. X  } else {
  879. X    index = list->xedwList_index;
  880. X    node = appselections[appman_selection]->list[index];
  881. X    program = XtNewString(node->program);
  882. X    
  883. X    /* extract filename from program */
  884. X    filename = XtNewString(program);
  885. X    filename = strtok(filename, " ");
  886. X    
  887. X    XtFree(list);
  888. X  
  889. X    /* check to see if there are any highlighted files to add as arguments, 
  890. X     * if so check to see where the insertion point is, if no insertion 
  891. X     * point then append arguments.
  892. X     */
  893. X    
  894. X    if ((program = build_arguments(program, node->options)) != NULL) {
  895. X      /* execute program */
  896. X      execute(NULL, filename, program, False);
  897. X    }
  898. X  }
  899. X  setCursor(NULL);
  900. X
  901. X}
  902. X
  903. X/*****************************************************************************
  904. X *                                execute                                    *
  905. X *****************************************************************************/
  906. Xpublic int execute(String fullname, String filename, 
  907. X            String args, Boolean cwait)
  908. X{
  909. X  /* This procedure executes a program. by specifying cwait to true
  910. X   * the parent will wait for the child to terminate, then return 
  911. X   * the return value of the child.
  912. X   *
  913. X   * - Takes the full path of the program to be executed, maybe NULL.
  914. X   *             filename of the program to be executed,
  915. X   *             program argument list, e.g. "emacs filename",
  916. X   *             whether to wait for the child to terminate.
  917. X   * + returns the return value from the child if cwait is set.
  918. X   */
  919. X
  920. X  typedef enum {ready, quote, normal, quoteready} QModes;
  921. X
  922. X  public Cardinal count_chr(String, char);
  923. X  private void child_died(void);
  924. X  QModes mode;
  925. X  Cardinal i, n, arglen;
  926. X  int result, pid, fd;
  927. X  int status = 0;
  928. X  String *newargs, strptr;
  929. X  int w_stat;
  930. X  
  931. X  if (fullname == NULL) {
  932. X    /* Find program */
  933. X    result = -1;
  934. X    for (i = 0; i < pathsize && result != 0; i++) {
  935. X      /* append filename to path */
  936. X      fullname = (String) XtRealloc (fullname, ((strlen(patharray[i])+
  937. X                         strlen(filename) + 5)
  938. X                        * sizeof(char)));
  939. X      strcpy(fullname, patharray[i]);
  940. X      strcat(fullname, "/");
  941. X      strcat(fullname, filename);
  942. X
  943. X      result = access(fullname, X_OK); /* Does file exist, Is file executable*/
  944. X    }
  945. X    
  946. X    if (result != 0) {
  947. X      fprintf(stderr, "Warning: Command '%s' not found in PATH\n", filename);
  948. X      return;
  949. X    }
  950. X  } 
  951. X
  952. X  /* split the args string into a NULL terminated array of strings. 
  953. X   * The number of arguments is always less than or equal to the number
  954. X   * of spaces in the args + one.
  955. X   * If a string of characters is enclosed within quotes, it is counted
  956. X   * as a single argument. 
  957. X   * Maybe not pretty - but fast.
  958. X   */
  959. X
  960. X  newargs = (char **) XtMalloc (sizeof(char*) * (count_chr(args, ' ') + 2));
  961. X
  962. X  n = 0;
  963. X  mode = ready;
  964. X  arglen = strlen(args);
  965. X  for (i = 0; i < arglen; i++) {
  966. X    switch (*(args+i)) {
  967. X    case '\'':
  968. X      if (mode == normal || mode == ready) {
  969. X    /* start a new arg on the next normal chr */
  970. X    mode = quoteready;
  971. X      } else if (mode == quote || mode == quoteready) {
  972. X    /* close current quote */
  973. X    *(args+i) = '\0';
  974. X    mode = ready;
  975. X      }
  976. X      break;
  977. X    case ' ':
  978. X    case '\t':
  979. X      if (mode == normal) {
  980. X    /* terminate current arg */
  981. X    *(args+i) = '\0';
  982. X    mode = ready;
  983. X      }
  984. X      break;
  985. X    default:
  986. X      if (mode == ready || mode == quoteready) {
  987. X    /* start a new arg */
  988. X    newargs[n++] = args+i;
  989. X    if (mode == ready)
  990. X      mode = normal;
  991. X    else
  992. X      mode = quote;
  993. X      }
  994. X      break;
  995. X    }
  996. X  }
  997. X  
  998. X  if (cwait)
  999. X#ifdef SIGCLD
  1000. X    signal(SIGCLD,  SIG_DFL);
  1001. X#else
  1002. X    signal(SIGCHLD, SIG_DFL);
  1003. X#endif
  1004. X
  1005. X
  1006. X  newargs[n] = NULL;
  1007. X
  1008. X  if ((pid = fork()) == -1) 
  1009. X    fprintf(stderr, "Warning: unable to fork\n");
  1010. X  else 
  1011. X    if (pid == 0) {
  1012. X      /* Child */
  1013. X
  1014. X      /* Take standard input from /dev/null. This presents any child process
  1015. X       * with an immediate end-of-file when read.
  1016. X       * Also redirect standard output to /dev/null, but leave standard error
  1017. X       * associated with xdtm so we can see error messages on the console.
  1018. X       * (unless cwait is set, in whiich case stderr is redirected as well)
  1019. X       */
  1020. X      
  1021. X      if (close(0) == -1) 
  1022. X    fprintf(stderr, "Warning: can't close childs file descriptors\n");
  1023. X      else 
  1024. X    if (open("/dev/null", O_RDONLY, 0) == -1)
  1025. X      fprintf(stderr, "Warning: can't open /dev/null as new input"
  1026. X          " for child\n");
  1027. X      
  1028. X      if (close(1) == -1) 
  1029. X    fprintf(stderr, "Warning: can't close childs file descriptors\n");
  1030. X      else 
  1031. X    if (open("/dev/null", O_WRONLY, 0) == -1)
  1032. X      fprintf(stderr, "Warning: can't open /dev/null as new output"
  1033. X          " for child\n");
  1034. X
  1035. X      if (cwait) 
  1036. X    if (close(2) == -1) 
  1037. X      fprintf(stderr, "Warning: can't close childs file descriptors\n");
  1038. X    else 
  1039. X      if (open("/dev/null", O_WRONLY, 0) == -1)
  1040. X        fprintf(stderr, "Warning: can't open /dev/null as new error output"
  1041. X            " for child\n");
  1042. X      
  1043. X
  1044. X      /* close all opened file descriptors (except stdin, stderr, stdout) */
  1045. X      for (fd = 3; fd < 20; fd++)
  1046. X    (void) close(fd); 
  1047. X
  1048. X      execv(fullname, newargs);
  1049. X
  1050. X      /* The exec failed, ring the bell then exit */
  1051. X
  1052. X      XBell(XtDisplay(appManager), 100);
  1053. X      exit(0);
  1054. X    } else {
  1055. X      /* Parent */
  1056. X      
  1057. X      /* If cwait is True then wait for the child to finish, then
  1058. X       * set status to it's return value.
  1059. X       */
  1060. X      if (cwait) {
  1061. X    wait(&w_stat);
  1062. X    if (WIFEXITED(w_stat))          /* jcc */
  1063. X      status = WEXITSTATUS(w_stat); /* ejg */
  1064. X    else
  1065. X      status = 1;
  1066. X    fprintf(stderr, "");
  1067. X#ifdef SIGCLD
  1068. X    signal(SIGCLD,  child_died);
  1069. X#else
  1070. X    signal(SIGCHLD, child_died);
  1071. X#endif
  1072. X      }
  1073. X    }
  1074. X
  1075. X  return(status);
  1076. X}
  1077. X
  1078. X/*****************************************************************************
  1079. X *                           build_arguments                                 *
  1080. X *****************************************************************************/
  1081. Xpublic String build_arguments(String program, SelOptions options)
  1082. X{
  1083. X  /* Given the program with it's previous arguments, this procedure
  1084. X   * will insert any highlighted files into the place specified by
  1085. X   * the !@ or on the end if none found.
  1086. X   *
  1087. X   * - Takes the program string, and whether the program is allowed to
  1088. X   *   take arguments, if so how many.
  1089. X   * + Returns the resultant command line.
  1090. X   */
  1091. X
  1092. X  extern void   changestate(Boolean);
  1093. X  extern String getfilename(String);
  1094. X  extern void   query_dialog(String, Boolean);
  1095. X  extern Widget directoryManager;
  1096. X  XedwListReturnStruct *list, *tmplist;
  1097. X  String ptr, tmpptr, arguments;
  1098. X  Cardinal number = 0;
  1099. X
  1100. X  /* Get the list */
  1101. X  list = XedwListShowCurrent(directoryManager);
  1102. X
  1103. X  arguments = XtNewString(" ");
  1104. X  if (options != N_SEL) {
  1105. X    if (list->xedwList_index == XDTM_LIST_NONE) {
  1106. X      query_dialog("No files selected!", False);
  1107. X    } else {
  1108. X      while (list != NULL) {
  1109. X    ptr = getfilename(list->string);
  1110. X    arguments = XtRealloc (arguments, sizeof(char) * 
  1111. X                   (((arguments == NULL) ? 0 : strlen(arguments)) +
  1112. X                strlen(ptr) + 10));
  1113. X    strcat(arguments, " ");
  1114. X    strcat(arguments, ptr);
  1115. X    tmplist = list;
  1116. X    list = list->next;
  1117. X    XtFree(tmplist);
  1118. X    number++;
  1119. X      }
  1120. X      if (options == O_SEL && number != 1) {
  1121. X    query_dialog("only ONE file!", False);
  1122. X    program = NULL;
  1123. X      } else {
  1124. X    /* insert the arguments into the program string */
  1125. X    program = XtRealloc (program, sizeof(char) * (strlen(program) + 
  1126. X                              strlen(arguments) + 10));
  1127. X    
  1128. X    if ((ptr = mystrstr(program, "!@")) != NULL) {
  1129. X      /* replace !@ with arguments */
  1130. X      tmpptr = XtNewString(ptr+2);
  1131. X      *ptr = '\0';
  1132. X      strcat(program, arguments);
  1133. X      strcat(program, tmpptr);
  1134. X      XtFree(tmpptr);
  1135. X    } else {
  1136. X      /* append arguments to program */
  1137. X      strcat(program, arguments);
  1138. X    }
  1139. X      }
  1140. X      XtFree(arguments);
  1141. X    }
  1142. X  } else {
  1143. X    if (list->xedwList_index != XDTM_LIST_NONE) {
  1144. X      query_dialog("No files allowed!", False);
  1145. X      program = NULL;
  1146. X    }
  1147. X    XtFree(list);
  1148. X  }
  1149. X
  1150. X  XedwListUnhighlight(directoryManager, XedwAll);
  1151. X  changestate(False); 
  1152. X
  1153. X  return(program);
  1154. X}
  1155. X
  1156. X/*****************************************************************************
  1157. X *                                 child_died                                *
  1158. X *****************************************************************************/
  1159. Xprivate void child_died(void)
  1160. X{
  1161. X  /* Signal handler for when a child dies. 
  1162. X   * waits for the child (stops zombies), rings the Bell, then
  1163. X   * Resets the signals.
  1164. X   */
  1165. X  extern Boolean directoryManagerNewDirectory(String);
  1166. X  extern String cwd;
  1167. X
  1168. X  unsigned int a;
  1169. X
  1170. X  wait(&a);
  1171. X
  1172. X  XBell(XtDisplay(appManager), 100);
  1173. X
  1174. X  XFlush(XtDisplay(appManager));
  1175. X
  1176. X#ifdef SIGCLD
  1177. X  signal(SIGCLD, child_died);
  1178. X#else
  1179. X  signal(SIGCHLD, child_died);
  1180. X#endif
  1181. X
  1182. X  if (app_data.dironexit == True) 
  1183. X    directoryManagerNewDirectory(cwd);
  1184. X
  1185. X}
  1186. SHAR_EOF
  1187. chmod 0644 xdtm/appman.c ||
  1188. echo 'restore of xdtm/appman.c failed'
  1189. Wc_c="`wc -c < 'xdtm/appman.c'`"
  1190. test 31645 -eq "$Wc_c" ||
  1191.     echo 'xdtm/appman.c: original size 31645, current size' "$Wc_c"
  1192. fi
  1193. # ============= xdtm/bitmaps/Copy.Button ==============
  1194. if test ! -d 'xdtm/bitmaps'; then
  1195.     echo 'x - creating directory xdtm/bitmaps'
  1196.     mkdir 'xdtm/bitmaps'
  1197. fi
  1198. if test -f 'xdtm/bitmaps/Copy.Button' -a X"$1" != X"-c"; then
  1199.     echo 'x - skipping xdtm/bitmaps/Copy.Button (File already exists)'
  1200. else
  1201. echo 'x - extracting xdtm/bitmaps/Copy.Button (Text)'
  1202. sed 's/^X//' << 'SHAR_EOF' > 'xdtm/bitmaps/Copy.Button' &&
  1203. X#define copy_width 30
  1204. X#define copy_height 40
  1205. Xstatic char copy_bits[] = {
  1206. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1207. X   0xfe, 0x01, 0xfe, 0x01, 0x02, 0x03, 0x02, 0x03, 0x02, 0x05, 0x02, 0x05,
  1208. X   0x02, 0x09, 0x02, 0x09, 0x02, 0x1f, 0x02, 0x1f, 0x02, 0x10, 0x02, 0x10,
  1209. X   0x02, 0x10, 0x02, 0x10, 0x02, 0x10, 0x02, 0x10, 0x02, 0x50, 0x02, 0x10,
  1210. X   0x02, 0xd0, 0x02, 0x10, 0x02, 0xf0, 0x03, 0x10, 0x02, 0xd0, 0x02, 0x10,
  1211. X   0x02, 0x50, 0x02, 0x10, 0x02, 0x10, 0x02, 0x10, 0x02, 0x10, 0x02, 0x10,
  1212. X   0x02, 0x10, 0x02, 0x10, 0x02, 0x10, 0x02, 0x10, 0x02, 0x10, 0x02, 0x10,
  1213. X   0x02, 0x10, 0x02, 0x10, 0x02, 0x10, 0x02, 0x10, 0x02, 0x10, 0x02, 0x10,
  1214. X   0x02, 0x10, 0x02, 0x10, 0xfe, 0x1f, 0xfe, 0x1f, 0x00, 0x00, 0x00, 0x00,
  1215. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1216. X   0x70, 0x9c, 0x67, 0x03, 0xf8, 0xbe, 0x6f, 0x03, 0xd8, 0xb6, 0x6d, 0x03,
  1217. X   0x18, 0xb6, 0x6d, 0x03, 0x18, 0xb6, 0xef, 0x03, 0x18, 0xb6, 0xc7, 0x03,
  1218. X   0xd8, 0xb6, 0x01, 0x03, 0xf8, 0xbe, 0xe1, 0x03, 0x70, 0x9c, 0xe1, 0x01,
  1219. X   0x00, 0x00, 0x00, 0x00};
  1220. SHAR_EOF
  1221. chmod 0644 xdtm/bitmaps/Copy.Button ||
  1222. echo 'restore of xdtm/bitmaps/Copy.Button failed'
  1223. Wc_c="`wc -c < 'xdtm/bitmaps/Copy.Button'`"
  1224. test 1076 -eq "$Wc_c" ||
  1225.     echo 'xdtm/bitmaps/Copy.Button: original size 1076, current size' "$Wc_c"
  1226. fi
  1227. # ============= xdtm/bitmaps/Copy.Cursor ==============
  1228. if test -f 'xdtm/bitmaps/Copy.Cursor' -a X"$1" != X"-c"; then
  1229.     echo 'x - skipping xdtm/bitmaps/Copy.Cursor (File already exists)'
  1230. else
  1231. echo 'x - extracting xdtm/bitmaps/Copy.Cursor (Text)'
  1232. sed 's/^X//' << 'SHAR_EOF' > 'xdtm/bitmaps/Copy.Cursor' &&
  1233. X#define CopyC_width 20
  1234. X#define CopyC_height 20
  1235. X#define CopyC_x_hot 9
  1236. X#define CopyC_y_hot 6
  1237. Xstatic char CopyC_bits[] = {
  1238. X   0x00, 0x00, 0x00, 0x3e, 0xf0, 0x01, 0x62, 0x10, 0x03, 0xe2, 0x10, 0x07,
  1239. X   0x82, 0x12, 0x04, 0x82, 0x16, 0x04, 0x82, 0x1f, 0x04, 0x82, 0x16, 0x04,
  1240. X   0x82, 0x12, 0x04, 0x82, 0x10, 0x04, 0x82, 0x10, 0x04, 0xfe, 0xf0, 0x07,
  1241. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8c, 0x39, 0x05, 0x52, 0x4a, 0x05,
  1242. X   0x42, 0x3a, 0x02, 0x52, 0x0a, 0x02, 0x8c, 0x09, 0x02, 0x00, 0x00, 0x00};
  1243. SHAR_EOF
  1244. chmod 0644 xdtm/bitmaps/Copy.Cursor ||
  1245. echo 'restore of xdtm/bitmaps/Copy.Cursor failed'
  1246. Wc_c="`wc -c < 'xdtm/bitmaps/Copy.Cursor'`"
  1247. test 496 -eq "$Wc_c" ||
  1248.     echo 'xdtm/bitmaps/Copy.Cursor: original size 496, current size' "$Wc_c"
  1249. fi
  1250. # ============= xdtm/bitmaps/Copy.Mask ==============
  1251. if test -f 'xdtm/bitmaps/Copy.Mask' -a X"$1" != X"-c"; then
  1252.     echo 'x - skipping xdtm/bitmaps/Copy.Mask (File already exists)'
  1253. else
  1254. echo 'x - extracting xdtm/bitmaps/Copy.Mask (Text)'
  1255. sed 's/^X//' << 'SHAR_EOF' > 'xdtm/bitmaps/Copy.Mask' &&
  1256. X#define CopyM_width 20
  1257. X#define CopyM_height 20
  1258. Xstatic char CopyM_bits[] = {
  1259. X   0x3f, 0xf8, 0x01, 0x7f, 0xf8, 0x03, 0xff, 0xf8, 0x07, 0xff, 0xfb, 0x0f,
  1260. X   0xff, 0xff, 0x0f, 0xff, 0xff, 0x0f, 0xff, 0xff, 0x0f, 0xff, 0xff, 0x0f,
  1261. X   0xff, 0xff, 0x0f, 0xff, 0xfb, 0x0f, 0xff, 0xf9, 0x0f, 0xff, 0xf9, 0x0f,
  1262. X   0xff, 0xf9, 0x0f, 0xde, 0xff, 0x0f, 0xfe, 0xff, 0x0f, 0xff, 0xff, 0x0f,
  1263. X   0xff, 0x7f, 0x07, 0xff, 0x7f, 0x07, 0xfe, 0x1f, 0x07, 0xde, 0x1f, 0x07};
  1264. SHAR_EOF
  1265. chmod 0644 xdtm/bitmaps/Copy.Mask ||
  1266. echo 'restore of xdtm/bitmaps/Copy.Mask failed'
  1267. Wc_c="`wc -c < 'xdtm/bitmaps/Copy.Mask'`"
  1268. test 452 -eq "$Wc_c" ||
  1269.     echo 'xdtm/bitmaps/Copy.Mask: original size 452, current size' "$Wc_c"
  1270. fi
  1271. # ============= xdtm/bitmaps/EmptyTick ==============
  1272. if test -f 'xdtm/bitmaps/EmptyTick' -a X"$1" != X"-c"; then
  1273.     echo 'x - skipping xdtm/bitmaps/EmptyTick (File already exists)'
  1274. else
  1275. echo 'x - extracting xdtm/bitmaps/EmptyTick (Text)'
  1276. sed 's/^X//' << 'SHAR_EOF' > 'xdtm/bitmaps/EmptyTick' &&
  1277. X#define EmptyTick_width 14
  1278. X#define EmptyTick_height 14
  1279. Xstatic char EmptyTick_bits[] = {
  1280. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1281. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1282. X   0x00, 0x00, 0x00, 0x00};
  1283. SHAR_EOF
  1284. chmod 0644 xdtm/bitmaps/EmptyTick ||
  1285. echo 'restore of xdtm/bitmaps/EmptyTick failed'
  1286. Wc_c="`wc -c < 'xdtm/bitmaps/EmptyTick'`"
  1287. test 266 -eq "$Wc_c" ||
  1288.     echo 'xdtm/bitmaps/EmptyTick: original size 266, current size' "$Wc_c"
  1289. fi
  1290. # ============= xdtm/bitmaps/Grey.Mask ==============
  1291. if test -f 'xdtm/bitmaps/Grey.Mask' -a X"$1" != X"-c"; then
  1292.     echo 'x - skipping xdtm/bitmaps/Grey.Mask (File already exists)'
  1293. else
  1294. echo 'x - extracting xdtm/bitmaps/Grey.Mask (Text)'
  1295. sed 's/^X//' << 'SHAR_EOF' > 'xdtm/bitmaps/Grey.Mask' &&
  1296. X#define Grey_width 32
  1297. X#define Grey_height 32
  1298. Xstatic char Grey_bits[] = {
  1299. X   0x55, 0x55, 0x55, 0x55, 0xaa, 0xaa, 0xaa, 0xaa, 0x55, 0x55, 0x55, 0x55,
  1300. X   0xaa, 0xaa, 0xaa, 0xaa, 0x55, 0x55, 0x55, 0x55, 0xaa, 0xaa, 0xaa, 0xaa,
  1301. X   0x55, 0x55, 0x55, 0x55, 0xaa, 0xaa, 0xaa, 0xaa, 0x55, 0x55, 0x55, 0x55,
  1302. X   0xaa, 0xaa, 0xaa, 0xaa, 0x55, 0x55, 0x55, 0x55, 0xaa, 0xaa, 0xaa, 0xaa,
  1303. X   0x55, 0x55, 0x55, 0x55, 0xaa, 0xaa, 0xaa, 0xaa, 0x55, 0x55, 0x55, 0x55,
  1304. X   0xaa, 0xaa, 0xaa, 0xaa, 0x55, 0x55, 0x55, 0x55, 0xaa, 0xaa, 0xaa, 0xaa,
  1305. X   0x55, 0x55, 0x55, 0x55, 0xaa, 0xaa, 0xaa, 0xaa, 0x55, 0x55, 0x55, 0x55,
  1306. X   0xaa, 0xaa, 0xaa, 0xaa, 0x55, 0x55, 0x55, 0x55, 0xaa, 0xaa, 0xaa, 0xaa,
  1307. X   0x55, 0x55, 0x55, 0x55, 0xaa, 0xaa, 0xaa, 0xaa, 0x55, 0x55, 0x55, 0x55,
  1308. X   0xaa, 0xaa, 0xaa, 0xaa, 0x55, 0x55, 0x55, 0x55, 0xaa, 0xaa, 0xaa, 0xaa,
  1309. X   0x55, 0x55, 0x55, 0x55, 0xaa, 0xaa, 0xaa, 0xaa};
  1310. SHAR_EOF
  1311. chmod 0644 xdtm/bitmaps/Grey.Mask ||
  1312. echo 'restore of xdtm/bitmaps/Grey.Mask failed'
  1313. Wc_c="`wc -c < 'xdtm/bitmaps/Grey.Mask'`"
  1314. test 875 -eq "$Wc_c" ||
  1315.     echo 'xdtm/bitmaps/Grey.Mask: original size 875, current size' "$Wc_c"
  1316. fi
  1317. # ============= xdtm/bitmaps/Move.Button ==============
  1318. if test -f 'xdtm/bitmaps/Move.Button' -a X"$1" != X"-c"; then
  1319.     echo 'x - skipping xdtm/bitmaps/Move.Button (File already exists)'
  1320. else
  1321. echo 'x - extracting xdtm/bitmaps/Move.Button (Text)'
  1322. sed 's/^X//' << 'SHAR_EOF' > 'xdtm/bitmaps/Move.Button' &&
  1323. X#define move_width 30
  1324. X#define move_height 40
  1325. Xstatic char move_bits[] = {
  1326. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1327. X   0xaa, 0x00, 0xfe, 0x01, 0x00, 0x01, 0x02, 0x03, 0x02, 0x04, 0x02, 0x05,
  1328. X   0x00, 0x01, 0x02, 0x09, 0x02, 0x0a, 0x02, 0x1f, 0x00, 0x10, 0x02, 0x10,
  1329. X   0x02, 0x00, 0x02, 0x10, 0x00, 0x10, 0x02, 0x10, 0x02, 0x40, 0x02, 0x10,
  1330. X   0x00, 0xd0, 0x02, 0x10, 0x02, 0xe0, 0x03, 0x10, 0x00, 0xd0, 0x02, 0x10,
  1331. X   0x02, 0x40, 0x02, 0x10, 0x00, 0x10, 0x02, 0x10, 0x02, 0x00, 0x02, 0x10,
  1332. X   0x00, 0x10, 0x02, 0x10, 0x02, 0x00, 0x02, 0x10, 0x00, 0x10, 0x02, 0x10,
  1333. X   0x02, 0x00, 0x02, 0x10, 0x00, 0x10, 0x02, 0x10, 0x02, 0x00, 0x02, 0x10,
  1334. X   0x00, 0x10, 0x02, 0x10, 0xaa, 0x0a, 0xfe, 0x1f, 0x00, 0x00, 0x00, 0x00,
  1335. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1336. X   0x18, 0x73, 0xb6, 0x0f, 0xb8, 0xfb, 0xb6, 0x0f, 0xf8, 0xdb, 0xb6, 0x01,
  1337. X   0x58, 0xdb, 0xb6, 0x07, 0x18, 0xdb, 0xb6, 0x07, 0x18, 0xdb, 0xb6, 0x01,
  1338. X   0x18, 0xdb, 0xbe, 0x01, 0x18, 0xfb, 0x9c, 0x0f, 0x18, 0x73, 0x88, 0x0f,
  1339. X   0x00, 0x00, 0x00, 0x00};
  1340. SHAR_EOF
  1341. chmod 0644 xdtm/bitmaps/Move.Button ||
  1342. echo 'restore of xdtm/bitmaps/Move.Button failed'
  1343. Wc_c="`wc -c < 'xdtm/bitmaps/Move.Button'`"
  1344. test 1076 -eq "$Wc_c" ||
  1345.     echo 'xdtm/bitmaps/Move.Button: original size 1076, current size' "$Wc_c"
  1346. fi
  1347. # ============= xdtm/bitmaps/Move.Cursor ==============
  1348. if test -f 'xdtm/bitmaps/Move.Cursor' -a X"$1" != X"-c"; then
  1349.     echo 'x - skipping xdtm/bitmaps/Move.Cursor (File already exists)'
  1350. else
  1351. echo 'x - extracting xdtm/bitmaps/Move.Cursor (Text)'
  1352. sed 's/^X//' << 'SHAR_EOF' > 'xdtm/bitmaps/Move.Cursor' &&
  1353. X#define MoveC_width 20
  1354. X#define MoveC_height 20
  1355. X#define MoveC_x_hot 9
  1356. X#define MoveC_y_hot 6
  1357. Xstatic char MoveC_bits[] = {
  1358. X   0x00, 0x00, 0x00, 0x2a, 0xf0, 0x01, 0x40, 0x10, 0x03, 0xa2, 0x10, 0x07,
  1359. X   0x00, 0x12, 0x04, 0x82, 0x16, 0x04, 0x00, 0x1f, 0x04, 0x82, 0x16, 0x04,
  1360. X   0x00, 0x12, 0x04, 0x82, 0x10, 0x04, 0x00, 0x10, 0x04, 0xaa, 0xf0, 0x07,
  1361. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x53, 0x07, 0xb6, 0x54, 0x01,
  1362. X   0xaa, 0x54, 0x03, 0xa2, 0x54, 0x01, 0x22, 0x23, 0x07, 0x00, 0x00, 0x00};
  1363. SHAR_EOF
  1364. chmod 0644 xdtm/bitmaps/Move.Cursor ||
  1365. echo 'restore of xdtm/bitmaps/Move.Cursor failed'
  1366. Wc_c="`wc -c < 'xdtm/bitmaps/Move.Cursor'`"
  1367. test 496 -eq "$Wc_c" ||
  1368.     echo 'xdtm/bitmaps/Move.Cursor: original size 496, current size' "$Wc_c"
  1369. fi
  1370. # ============= xdtm/bitmaps/Move.Mask ==============
  1371. if test -f 'xdtm/bitmaps/Move.Mask' -a X"$1" != X"-c"; then
  1372.     echo 'x - skipping xdtm/bitmaps/Move.Mask (File already exists)'
  1373. else
  1374. echo 'x - extracting xdtm/bitmaps/Move.Mask (Text)'
  1375. sed 's/^X//' << 'SHAR_EOF' > 'xdtm/bitmaps/Move.Mask' &&
  1376. X#define MoveM_width 20
  1377. X#define MoveM_height 20
  1378. Xstatic char MoveM_bits[] = {
  1379. X   0x3f, 0xf8, 0x01, 0x7f, 0xf8, 0x03, 0xff, 0xf8, 0x0f, 0xff, 0xff, 0x0f,
  1380. X   0xff, 0xff, 0x0f, 0xff, 0xff, 0x0f, 0xff, 0xff, 0x0f, 0xff, 0xff, 0x0f,
  1381. X   0xff, 0xff, 0x0f, 0xff, 0xff, 0x0f, 0xff, 0xf9, 0x0f, 0xff, 0xf9, 0x0f,
  1382. X   0xff, 0xf9, 0x0f, 0x77, 0xfb, 0x0f, 0xf7, 0xff, 0x0f, 0xff, 0xff, 0x0f,
  1383. X   0xff, 0xff, 0x07, 0xff, 0xff, 0x0f, 0xf7, 0xff, 0x0f, 0xf7, 0x77, 0x0f};
  1384. SHAR_EOF
  1385. chmod 0644 xdtm/bitmaps/Move.Mask ||
  1386. echo 'restore of xdtm/bitmaps/Move.Mask failed'
  1387. Wc_c="`wc -c < 'xdtm/bitmaps/Move.Mask'`"
  1388. test 452 -eq "$Wc_c" ||
  1389.     echo 'xdtm/bitmaps/Move.Mask: original size 452, current size' "$Wc_c"
  1390. fi
  1391. # ============= xdtm/bitmaps/Tick ==============
  1392. if test -f 'xdtm/bitmaps/Tick' -a X"$1" != X"-c"; then
  1393.     echo 'x - skipping xdtm/bitmaps/Tick (File already exists)'
  1394. else
  1395. echo 'x - extracting xdtm/bitmaps/Tick (Text)'
  1396. sed 's/^X//' << 'SHAR_EOF' > 'xdtm/bitmaps/Tick' &&
  1397. X#define tick_width 14
  1398. X#define tick_height 14
  1399. Xstatic char tick_bits[] = {
  1400. X   0x00, 0x00, 0x00, 0x20, 0x00, 0x18, 0x00, 0x0c, 0x00, 0x06, 0x00, 0x03,
  1401. X   0x8c, 0x03, 0xde, 0x01, 0xff, 0x01, 0xfe, 0x00, 0xfc, 0x00, 0x78, 0x00,
  1402. X   0x70, 0x00, 0x20, 0x00};
  1403. SHAR_EOF
  1404. chmod 0644 xdtm/bitmaps/Tick ||
  1405. echo 'restore of xdtm/bitmaps/Tick failed'
  1406. Wc_c="`wc -c < 'xdtm/bitmaps/Tick'`"
  1407. test 251 -eq "$Wc_c" ||
  1408.     echo 'xdtm/bitmaps/Tick: original size 251, current size' "$Wc_c"
  1409. fi
  1410. # ============= xdtm/bitmaps/Trash.Button ==============
  1411. if test -f 'xdtm/bitmaps/Trash.Button' -a X"$1" != X"-c"; then
  1412.     echo 'x - skipping xdtm/bitmaps/Trash.Button (File already exists)'
  1413. else
  1414. echo 'x - extracting xdtm/bitmaps/Trash.Button (Text)'
  1415. sed 's/^X//' << 'SHAR_EOF' > 'xdtm/bitmaps/Trash.Button' &&
  1416. X#define trash_width 30
  1417. X#define trash_height 40
  1418. Xstatic char trash_bits[] = {
  1419. X   0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x03, 0x00, 0x00, 0x10, 0x02, 0x00,
  1420. X   0xf0, 0xff, 0xff, 0x01, 0x10, 0x00, 0x00, 0x01, 0xf0, 0xff, 0xff, 0x01,
  1421. X   0x20, 0x00, 0x80, 0x00, 0xa0, 0x44, 0xa4, 0x00, 0xa0, 0x44, 0xa4, 0x00,
  1422. X   0xa0, 0x44, 0xa4, 0x00, 0xa0, 0x44, 0xa4, 0x00, 0xa0, 0x44, 0xa4, 0x00,
  1423. X   0xa0, 0x44, 0xa4, 0x00, 0xa0, 0x44, 0xa4, 0x00, 0xa0, 0x44, 0xa4, 0x00,
  1424. X   0xa0, 0x44, 0xa4, 0x00, 0xa0, 0x44, 0xa4, 0x00, 0xa0, 0x44, 0xa4, 0x00,
  1425. X   0xa0, 0x44, 0xa4, 0x00, 0xa0, 0x44, 0xa4, 0x00, 0xa0, 0x44, 0xa4, 0x00,
  1426. X   0xa0, 0x44, 0xa4, 0x00, 0xa0, 0x44, 0xa4, 0x00, 0xa0, 0x44, 0xa4, 0x00,
  1427. X   0xa0, 0x44, 0xa4, 0x00, 0xa0, 0x44, 0xa4, 0x00, 0xa0, 0x44, 0xa4, 0x00,
  1428. X   0x20, 0x00, 0x80, 0x00, 0xe0, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
  1429. X   0xde, 0xe3, 0x38, 0x1b, 0xde, 0xf7, 0x7d, 0x1b, 0xcc, 0xb6, 0x6d, 0x1b,
  1430. X   0xcc, 0xb6, 0x1d, 0x1f, 0xcc, 0xf3, 0x39, 0x1f, 0xcc, 0xf7, 0x71, 0x1b,
  1431. X   0xcc, 0xb6, 0x6d, 0x1b, 0xcc, 0xb6, 0x7d, 0x1b, 0xcc, 0xb6, 0x39, 0x1b,
  1432. X   0x00, 0x00, 0x00, 0x00};
  1433. SHAR_EOF
  1434. chmod 0644 xdtm/bitmaps/Trash.Button ||
  1435. echo 'restore of xdtm/bitmaps/Trash.Button failed'
  1436. Wc_c="`wc -c < 'xdtm/bitmaps/Trash.Button'`"
  1437. test 1079 -eq "$Wc_c" ||
  1438.     echo 'xdtm/bitmaps/Trash.Button: original size 1079, current size' "$Wc_c"
  1439. fi
  1440. true || echo 'restore of xdtm/bitmaps/file.icon failed'
  1441. echo End of part 4, continue with part 5
  1442. exit 0
  1443.  
  1444. --
  1445. Dan Heller
  1446. O'Reilly && Associates       Z-Code Software    Comp-sources-x:
  1447. Senior Writer                President          comp-sources-x@uunet.uu.net
  1448. argv@ora.com                 argv@zipcode.com
  1449.