home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / x / volume20 / xarchie / part18 < prev    next >
Encoding:
Text File  |  1993-06-14  |  50.5 KB  |  1,636 lines

  1. Newsgroups: comp.sources.x
  2. From: ferguson@cs.rochester.edu (George Ferguson)
  3. Subject: v20i046:  xarchie - An X browser interface to Archie, v2.0.6, Part18/24
  4. Message-ID: <1993Jun15.223455.1477@sparky.imd.sterling.com>
  5. X-Md4-Signature: 413fbbfc5df703b7796d0a8ead6583fb
  6. Sender: chris@sparky.imd.sterling.com (Chris Olson)
  7. Organization: Sterling Software
  8. Date: Tue, 15 Jun 1993 22:34:55 GMT
  9. Approved: chris@sparky.imd.sterling.com
  10.  
  11. Submitted-by: ferguson@cs.rochester.edu (George Ferguson)
  12. Posting-number: Volume 20, Issue 46
  13. Archive-name: xarchie/part18
  14. Environment: X11
  15. Supersedes: xarchie: Volume 14, Issue 82-90
  16.  
  17. Submitted-by: ferguson@cs.rochester.edu
  18. Archive-name: xarchie-2.0.6/part18
  19.  
  20. #!/bin/sh
  21. # this is Part.18 (part 18 of xarchie-2.0.6)
  22. # do not concatenate these parts, unpack them in order with /bin/sh
  23. # file xarchie-2.0.6/xarchie.man continued
  24. #
  25. if test ! -r _shar_seq_.tmp; then
  26.     echo 'Please unpack part 1 first!'
  27.     exit 1
  28. fi
  29. (read Scheck
  30.  if test "$Scheck" != 18; then
  31.     echo Please unpack part "$Scheck" next!
  32.     exit 1
  33.  else
  34.     exit 0
  35.  fi
  36. ) < _shar_seq_.tmp || exit 1
  37. if test ! -f _shar_wnt_.tmp; then
  38.     echo 'x - still skipping xarchie-2.0.6/xarchie.man'
  39. else
  40. echo 'x - continuing file xarchie-2.0.6/xarchie.man'
  41. sed 's/^X//' << 'SHAR_EOF' >> 'xarchie-2.0.6/xarchie.man' &&
  42. This resource can be set with the
  43. .B \-search
  44. option, or its abbreviations
  45. .BR \-e ,
  46. .BR \-s ,
  47. .BR \-c ,
  48. .BR \-r ,
  49. .BR \-es ,
  50. .BR \-ec ,
  51. or
  52. .BR \-er ,
  53. or on the Settings Panel.
  54. .\"    -    -    -    -    -    -    -    -
  55. .IP "\fBsortType\fP"
  56. Sets the sort mode for displaying Archie responses. This can be one of
  57. .IR name ,
  58. .IR date ,
  59. or
  60. .IR weight .
  61. See the section of the Settings Panel, above, for a description of the
  62. various search types.  This resource can be set with the
  63. .B \-sort
  64. option, or its abbreviations
  65. .B \-t
  66. or
  67. .BR \-w ,
  68. or on the Settings Panel.
  69. .\"    -    -    -    -    -    -    -    -
  70. .IP "\fBhostWeights\fP"
  71. Specifies the weights used to order hosts when sorting by
  72. .I weight
  73. is selected. The format of this resource is a series of entries of the
  74. form:
  75. X
  76. .ce
  77. weight host [hosts...] {,|\en}
  78. X
  79. where parts of an entry are separated by spaces or tabs and entries
  80. are separated by a comma or newline.  Each entry specifies a weight
  81. and a series of possible suffixes (one or more trailing components). A
  82. host's weight is determined by finding the first class for which the
  83. end of the host's name matches one of the suffixes. A host that
  84. belongs in none of the classes is assigned the weight 99. For example,
  85. the default for the USA is:
  86. X
  87. .nf
  88. .na
  89. X      1 edu com net gov mil us\en\e
  90. X      2 ca\en\e
  91. X      3 uk de nl fi fr eu.net\en\e
  92. X    100 au nz jp
  93. .ad
  94. .fi
  95. X
  96. This means that all the US domains are ordered first, then Canada,
  97. then several European countries. Hosts in Australia, New Zealand, and
  98. Japan are ordered
  99. .I after
  100. any unknown (i.e. non-matching) hosts. This resource can be set on the
  101. Settings Panel.
  102. .IP
  103. If this resource is not defined, Xarchie will attempt to make an
  104. intelligent choice by comparing the system's idea of its hostname with
  105. a set of pre-compiled defaults. This may not work, but is usually
  106. better than nothing, and it can always be edited on the Settings Panel
  107. anyway.
  108. .\"    -    -    -    -    -    -    -    -
  109. .IP "\fBniceLevel\fP"
  110. Sets the query niceness level. Higher numbers are nicer, up to a
  111. maximum niceness of 32765. The default is 0. This resource can be set
  112. with the
  113. .B \-nice
  114. option or on the Settings Panel.
  115. .\"    -    -    -    -    -    -    -    -
  116. .IP "\fBmaxHits\fP"
  117. Sets the maximum number of matches allowed per query. The default is 99.
  118. This resource can be set with the
  119. .B \-maxHits
  120. option or on the Settings Panel.
  121. .\"    -    -    -    -    -    -    -    -
  122. .IP "\fBoffset\fP"
  123. Sets the Prospero offset. The default is 0.  This resource can be set
  124. with the
  125. .B \-offset
  126. option or on the Settings Panel.
  127. .\"    -    -    -    -    -    -    -    -
  128. .IP "\fBtimeout\fP"
  129. Sets the initial timeout value, in seconds. The default is 4. This
  130. resource can be set on the Settings Panel.
  131. .\"    -    -    -    -    -    -    -    -
  132. .IP "\fBretries\fP"
  133. Sets the number of retries, where the timeout doubles every retry.
  134. This resource can be set on the Settings Panel.
  135. .\"    -    -    -    -    -    -    -    -
  136. .IP "\fBdebugLevel\fP"
  137. Sets the Prospero debugging level. Higher numbers mean more verbose
  138. messages.  Xarchie must have been compiled specially for this option
  139. to have any effect (see the Imakefile or your local installer). This
  140. resource can be set with the
  141. .B \-debug
  142. or
  143. .B \-D
  144. options.
  145. .\"    -    -    -    -    -    -    -    -
  146. .SH "  Browser Resources"
  147. .IP "\fBautoScroll\fP"
  148. By default, Xarchie scrolls the browser lists automatically when you
  149. select items. This usually makes it easier to scan through the results
  150. of queries but can be annoying. This resource enables or disables
  151. automatic scrolling.  The default is True.  It can be set to False
  152. with the
  153. .B \-noscroll
  154. option and can be changed on the Settings Panel.
  155. .IP "\fBpasteBuffer\fP"
  156. If this resource is True (the default), browser selections are stored
  157. in the CUT_BUFFER_0 property of the root window of the Xarchie
  158. display in the format:
  159. X
  160. .ce
  161. \fIhost\fP:\fIlocation\fP/\fIfile\fP
  162. X
  163. This allows them to be used by other applications using
  164. XXFetchBytes(3X).  The Xarchie distribution includes a sample program
  165. (xcutbuf.c) that retrieves the contents of a cutbuffer property.
  166. .\"    -    -    -    -    -    -    -    -
  167. .SH "  FTP Resources"
  168. .IP "\fBftpMailAddress\fP"
  169. By convention, FTP users are expected to send their email address as
  170. the password during anonymous login.  The string specified by this
  171. resource is passed to sprintf(3) along with two parameters: the
  172. username and the hostname (as indicated by the system or by the
  173. .B USER
  174. and
  175. .B HOSTNAME
  176. environment variables), and the result is used as the password for
  177. anonymous FTP logins. The default is "%s@%s". You should change this
  178. resource if your system returns strange or incorrect values for either
  179. parameter. The password (after sprintf) can be edited on the Settings
  180. Panel.
  181. .\"    -    -    -    -    -    -    -    -
  182. .IP "\fBftpLocalDir\fP"
  183. Sets the local destination directory for ftp transfers. This will be
  184. used as the initial value of the "FTP Local Dir" item on the Settings
  185. Panel.
  186. .\"    -    -    -    -    -    -    -    -
  187. .IP "\fBftpType\fP"
  188. Sets the transfer type for ftp transfers. This will be used as the
  189. initial value of the "Ftp transfer type" item on the Settings Panel.
  190. It should be one of "ascii" or "binary".
  191. .\"    -    -    -    -    -    -    -    -
  192. .IP "\fBftpPrompt\fP"
  193. Specifies whether to prompt for verification during transfers
  194. involving multiple files. This will be used as the initial value of
  195. the "Prompt during transfers" item on the Settings Panel.
  196. .\"    -    -    -    -    -    -    -    -
  197. .IP "\fBftpTrace\fP"
  198. Specifies whether to pop up a window in which FTP transactions are
  199. monitored. This will be used as the initial value of the "Trace
  200. FTP transfers" item on the Settings Panel.
  201. .\"    -    -    -    -    -    -    -    -
  202. .IP "\fBftpStrip\fP"
  203. Specifies whether to strip carriage returns from files transferred in
  204. ASCII mode.  This will be used as the initial value of the "Strip CR"
  205. item on the Settings Panel.
  206. .\"    -    -    -    -    -    -    -    -
  207. .SH "  Database Writing Resources"
  208. .IP "\fBfileWriteOnePerLine\fP"
  209. Specifies the format of files written by "Write".  This will be used
  210. as the initial value of the "Write format" item on the File Panel.
  211. The meaning of this setting is described in the USER'S GUIDE section
  212. on "Saving, Loading, and Writing".
  213. .\"    -    -    -    -    -    -    -    -
  214. .SH "  Special Font Resources"
  215. XXarchie uses two fonts by default: one "normal" and one "bold".
  216. However, because of widget naming and resource lookup conventions,
  217. these fonts must be specified in many places in the resource file. To
  218. make it easier to find and change these fonts, the following two
  219. resources are defined:
  220. .IP "\fBxarchieFont\fP"
  221. The name of the default font used by Xarchie widgets. If any widget
  222. specifies a font resource as "xarchieFont", this font will be used.
  223. .IP "\fBxarchieBoldFont\fP"
  224. Like the above, but specifies the font used by any widget that
  225. specifies a font resource of "xarchieBoldFont".
  226. .PP
  227. The resource converter that looks up fontnames is modified so that the
  228. the two special strings "xarchieFont" and "xarchieBoldFont" result in
  229. the corresponding font being returned; other strings are looked up as
  230. normal fontnames.
  231. .\"    -    -    -    -    -    -    -    -
  232. .SH "  Other Resources"
  233. .IP "\fBvisualType\fP"
  234. This resource allows you to override Xarchie's builtin determination
  235. of the type of display, which it uses to specify appropriate color
  236. resources. You can specify "mon", "gray", or "color" as the value of
  237. this resource. It can also be set with the corresponding command-line
  238. options.
  239. .IP "\fBdefaultIcon\fP"
  240. If given, this resource specifies the name of an X bitmap file that
  241. will be used as Xarchie's icon when not querying (assuming you are
  242. using a window manager that supports icon pixmaps). The X resource
  243. conversion routines will look for the file in a variety of places,
  244. including directories given by the global resource
  245. .BR bitmapFilePath .
  246. .IP "\fBbusyIcon\fP"
  247. If given, this resource specifies the name of an X bitmap file that
  248. will be used as Xarchie's icon when querying (see the description of
  249. the
  250. .B defaultIcon
  251. resource, above). The icon is changed back to the default when the
  252. query completes, so you can watch for a change while Xarchie is
  253. iconified.
  254. .\"----------------------------------------------------------
  255. .SH " Widget Hierarchies"
  256. .PP
  257. XXarchie uses primarily Athena widgets, with some extra sub-classes as
  258. described below.
  259. .\"    -    -    -    -    -    -    -    -
  260. .SH "  Main Xarchie Widgets"
  261. The widget hierarchy for the main Xarchie display is as follows:
  262. X
  263. .na
  264. .nf
  265. XXarchie xarchie
  266. X  [Form color|gray] <-- Color or gray-scale displays only
  267. X    Paned outerPaned
  268. X        Form buttonForm
  269. X            MenuButton fileButton
  270. X            MenuButton settingsButton
  271. X            MenuButton queryButton
  272. X            Command abortButton
  273. X            Command helpButton
  274. X            Label,Text status{Label,Text}
  275. X        Form browserForm
  276. X            Command browserUpButton
  277. X            Command browserDownButton
  278. X            Paned browserPaned
  279. X                Viewport browserViewport0
  280. X                    XfwfMultiList browserList0
  281. X                Viewport browserViewport1
  282. X                    XfwfMultiList browserList1
  283. X                Viewport browserViewport2
  284. X                    XfwfMultiList browserList2
  285. X        Form stringForm
  286. X            Label,Text search{Label,Text}
  287. X            Label,Text host{Label,Text}
  288. X            Label,Text location{Label,Text}
  289. X            Label,Text file{Label,Text}
  290. X            Label,Text size{Label,Text}
  291. X            Label,Text modes{Label,Text}
  292. X            Label,Text date{Label,Text}
  293. .fi
  294. .ad
  295. X
  296. On color displays, there is an extra Form widget named "color" created
  297. as the only child of the toplevel shell, and all other widgets are
  298. children of it. This allows resources that are only applicable for
  299. color displays to use the prefix "Xarchie.color" while generally
  300. applicable resources should use the "Xarchie*" prefix. On gray-scale
  301. displays, the extra widget is named "gray". On monochrome displays, no
  302. extra widget is created.
  303. .PP
  304. The XfwfMultiList widget is a modification of the standard Athena List
  305. widget that allows multiple items to be selected. It was written by
  306. Brian Totty (totty@flute.cs.uiuc.edu) and is distributed by the Free
  307. Widget Foundation (contact free-widgets-request@kazoo.cs.uiuc.edu).
  308. .I Xarchie
  309. can be compiled to use standard Athena List widgets instead. See the
  310. Imakefile or your local installer.
  311. .PP
  312. To describe this widget hierarchy briefly,
  313. .I outerPaned
  314. controls the relative sizes of the three horizontal display areas while
  315. .I browserPaned
  316. allows the browser panels to be resized independently. Each browser
  317. panel consists of a Viewport to allow it to scroll and an
  318. XXfwfMultiList (or List) to display the entries.
  319. .PP
  320. The command buttons and status widgets are pretty straightforward. The
  321. .I fileButton
  322. pops up the
  323. .IR fileMenu ,
  324. whose items invoke the obvious actions (see below) when selected. The
  325. .I settingsButton
  326. pops up the
  327. .IR settingsMenu ,
  328. which uses some special translations and the
  329. .B settings\-submenu()
  330. action to permit the use of pullright submenus. The
  331. .I queryButton
  332. pops up the
  333. .IR queryMenu ,
  334. the
  335. .I abortButton
  336. (when active) invokes the
  337. .B abort()
  338. action,
  339. and the
  340. .I helpButton
  341. invokes the
  342. .B help()
  343. action to pop up the Help panel.
  344. .PP
  345. In the bottom pane, the
  346. .I searchText
  347. widget is used to enter the search term, and by default it binds Return
  348. to the
  349. .B query()
  350. action (see below) to send the query to Archie.  The
  351. .I hostText
  352. binds Return to
  353. .B query\-host()
  354. and the
  355. .I locationText
  356. binds Return to
  357. .BR query\-location() .
  358. All the other Text items in the
  359. .I stringForm
  360. cannot be edited and are used to display information about the current
  361. browser selection.
  362. .\"    -    -    -    -    -    -    -    -
  363. .SH "  Settings Panel Widgets"
  364. .PP
  365. The "Panel" item on the Settings menu
  366. pops up the Settings Panel, which has the following widget hierarchy:
  367. X
  368. .na
  369. .nf
  370. X    TopLevelShell settingsShell
  371. X        Form settingsForm
  372. X            Command setDoneButton
  373. X            Command setApplyButton
  374. X            Command setDefaultButton
  375. X            MenuButton,AsciiText setHost{Button,Text}
  376. X            MenuButton,Label setSearch{Button,Label}
  377. X            MenuButton,Label setSort{Button,Label}
  378. X            Label,AsciiText setHostWeights{Label,Text}
  379. X            MenuButton,AsciiText setNice{Button,Text}
  380. X            Label,AsciiText setMaxHits{Label,Text}
  381. X            Label,AsciiText setTimeout{Label,Text}
  382. X            Label,AsciiText setRetries{Label,Text}
  383. X            Label,AsciiText setAutoScroll{Button,Label}
  384. X            Label,AsciiText ftpMailAddress{Label,Text}
  385. X            Label,AsciiText ftpLocalDir{Label,Text}
  386. X            MenuButton,Label ftpType{Button,Label}
  387. X            MenuButton,Label ftpPrompt{Button,Label}
  388. X            MenuButton,Label ftpTrace{Button,Label}
  389. X            MenuButton,Label ftpStrip{Button,Label}
  390. .fi
  391. .ad
  392. X
  393. The
  394. .I setDoneButton
  395. invokes the
  396. .B settings\-done()
  397. action, the
  398. .I setApplyButton
  399. invokes
  400. .BR settings\-apply() ,
  401. and the
  402. .I setDefaultButton
  403. invokes
  404. .BR settings\-default() .
  405. The actions are described below.  The MenuButton widgets pop up menus
  406. described below under "Menus".  The AsciiText widgets are used to
  407. display and edit the corresponding parameters.
  408. .\"    -    -    -    -    -    -    -    -
  409. .SH "  File Panel Widgets"
  410. .PP
  411. The "Save", "Load", and "Write" items on the File menu pop up the
  412. File panel, which has the following widget hierarchy:
  413. X
  414. .na
  415. .nf
  416. TopLevelShell fileShell
  417. X    Form fileForm
  418. X        Label fileLabel
  419. X        XfwfFileChooser fileChooser
  420. X        Label,AsciiText filename{Label,Text}
  421. X        MenuButton,Label fileWriteMode{Button,Label}
  422. X        Command fileOkButton, fileCancelButton
  423. .fi
  424. .ad
  425. X
  426. .PP
  427. The XfwfFileChooser widget provides a browser for selecting files.
  428. .I Xarchie
  429. can be compiled without the FileChooser, if necessary.  See the
  430. Imakefile or your local installer.
  431. .PP
  432. In any event, the
  433. .I fileLabel
  434. indicates what operation is being performed, the fileChooser,
  435. fileText, and buttons are used to select a file, and the
  436. .I fileWriteModeButton
  437. pops up the
  438. .I fileWriteModeMenu
  439. (only enabled for Write). Typing Return in the
  440. .I filenameText
  441. is the same as clicking the
  442. .IR fileOkButton ,
  443. and sending the WM_DELETE_WINDOW message (typically from the window
  444. manager) is the same as clicking on the
  445. .IR fileCancelButton .
  446. .\"    -    -    -    -    -    -    -    -
  447. .SH "  View Window Widgets"
  448. Whenever a file is retrieved by "Open", it is displayed in a window
  449. with the following widget hierarchy:
  450. X
  451. .nf
  452. .na
  453. TopLevelShell viewShell
  454. X    Form viewForm
  455. X        Command viewDoneButton
  456. X        Command viewDownButton
  457. X        Command viewUpButton
  458. X        Command viewSaveButton
  459. X        Text viewText
  460. .ad
  461. .fi
  462. X
  463. The title of the TopLevel shell is set to the basename of the file
  464. being viewed in the
  465. .IR viewText .
  466. The operation of the buttons is all hard-coded.
  467. Clicking on the
  468. .I viewSaveButton
  469. results in the following panel being displayed to select the file to
  470. save to:
  471. X
  472. .na
  473. .nf
  474. TopLevelShell viewSaveShell
  475. X    Form viewSaveForm
  476. X        Label viewSaveLabel
  477. X        AsciiText viewSaveLabelText
  478. X        XfwfFileChooser fileChooser
  479. X        Label viewSaveTextLabel
  480. X        AsciiText viewSaveText
  481. X        Command viewSaveOkButton, viewSaveCancelButton
  482. .fi
  483. .ad
  484. X
  485. The
  486. .I viewSaveLabelText
  487. indicates the name of the temporary file from which the save should be
  488. made and connot be changed. The
  489. .I fileChooser
  490. and
  491. .I fileText
  492. allow you to select the file to save to.
  493. .\"    -    -    -    -    -    -    -    -
  494. .SH "  Help Panel Widgets"
  495. The "Help" button in Xarchie's top pane pops up the Help panel, which
  496. has the following widget hierarchy:
  497. X
  498. .na
  499. .nf
  500. TopLevelShell  helpShell
  501. X    Form  helpForm
  502. X        Label  helpLabel
  503. X        Viewport  helpViewport
  504. X        List  helpList
  505. X        Text  helpText
  506. X        Command  helpDoneButton
  507. X        Command  helpPrevButton
  508. X        Command  helpNextButton
  509. X        Command  helpDownButton
  510. X        Command  helpUpButton
  511. .fi
  512. .ad
  513. X
  514. The
  515. .I helpLabel
  516. identifies the version of Xarchie.  The
  517. .I helpList
  518. displays the help topics, and the corresponding text is displayed in
  519. the
  520. .IR helpText .
  521. The
  522. .I helpDoneButton
  523. invokes the
  524. .B help\-done()
  525. action, the
  526. .I helpPrevButton
  527. invokes the
  528. .B help\-prev()
  529. action, and the
  530. .I helpNextButton
  531. invokes the
  532. .B help\-next()
  533. action. The
  534. .I helpDownButton
  535. and
  536. .I helpUpButton
  537. invoke the
  538. .B help\-down()
  539. and
  540. .B help\-up()
  541. actions respectively.
  542. .\"    -    -    -    -    -    -    -    -
  543. .SH "  About Panel Widgets"
  544. .PP
  545. Selecting the "About" item on the File menu
  546. pops up the About panel, which has the following widget
  547. hierarchy:
  548. X
  549. .na
  550. .nf
  551. TopLevelShell aboutShell
  552. X    Form aboutForm
  553. X        Label aboutLabel{0,1,2,3,4,5}
  554. X        Command aboutDoneButton
  555. .fi
  556. .ad
  557. X
  558. The labels are set to display the version of Xarchie and other contact
  559. information. There is little you can or should do with these widgets.
  560. .SH "  Popup Widgets"
  561. .PP
  562. Finally, two types of popup windows can appear. An Alert box signals
  563. an error and blocks until clicked in; a Confirm box allows the user to
  564. make a Yes/No decision. These have the following widget hierarchies:
  565. X
  566. .na
  567. .nf
  568. TransientShell alertShell
  569. X    Dialog alertDialog
  570. X        Command okButton
  571. X
  572. TransientShell confirmShell
  573. X    Dialog confirmDialog
  574. X        Command yesButton,noButton
  575. .fi
  576. .ad
  577. X
  578. respectively. Several actions are defined (see below) for use in these
  579. popups.
  580. .\"    -    -    -    -    -    -    -    -
  581. .SH "  Menus"
  582. The MenuButton widgets on both the main Xarchie display and on the
  583. various panels use standard Athena SimpleMenu widgets. The following
  584. naming conventions are used to allow resources to be specified: if the
  585. parent SimpleMenu widget is named "\fIfoo\fPMenu", then the
  586. SmeBSBObjects making up the entries are named
  587. "\fIfoo\fPMenuItem\fIn\fP", where \fIn\fP starts at 0 for the first
  588. item in the menu. The menus are all children of the main Xarchie
  589. shell,
  590. .IR toplevel .
  591. For example, the File menu has widget hierarchy
  592. X
  593. .nf
  594. .na
  595. SimpleMenu  fileMenu
  596. X    SmeBSB  menuLabel
  597. X        SmeBSB  fileMenuItem{0,1,2,3,4,5,6}
  598. .ad
  599. .fi
  600. X
  601. .PP
  602. There are three things worth mentioning. First, as noted above, the
  603. .I settingsMenu
  604. uses special translations and the
  605. .B settings\-submenu()
  606. action to allow pullright submenus. Secondly, the submenus available
  607. from the Settings menu (\c
  608. .IR searchMenu ,
  609. .IR sortMenu ,
  610. .IR niceMenu ,
  611. and
  612. .IR hostMenu )
  613. and those available on the Settings Panel (\c
  614. .IR setSearchMenu ,
  615. .IR setSortMenu ,
  616. .IR setNiceMenu ,
  617. and
  618. .IR setHostMenu )
  619. have the same labels but are different widgets with different effects.
  620. The Settings Panel menus (the second group) only update the Settings
  621. panel, requiring the Done button to be clicked to take effect. The
  622. Settings menu submenus (the first group) take effect immediately, and
  623. also indicate the current item in the left margin of the menu.
  624. .PP
  625. Finally, the number, order, and effect of all menus are hardcoded,
  626. although the labels can, of course, be changed in the resource file.
  627. However, changing the labels will NOT change the effect of selecting
  628. the item, with the exception of the
  629. .I hostMenu
  630. and
  631. .IR setHostMenu .
  632. These menus use the
  633. .I numHosts
  634. non-widget resource to indicate how many items are on the menu. Thus
  635. you can add hosts to the menu by adding
  636. .I label
  637. resources for the new
  638. .IR hostMenuItem 's
  639. and increasing the value of
  640. .IR Xarchie.numHosts .
  641. XXarchie parses the labels to determine the hostname: anything up to
  642. whitespace constitutes the hostname (and optional port number),
  643. anything after is simply commentary.
  644. .\"----------------------------------------------------------
  645. .SH " Translation Actions"
  646. .PP
  647. The following action procedures are registered for Xarchie and can be
  648. bound to widget events using the
  649. .B translations
  650. resource (see the Xt manual, Appendix C). The actions of the browser
  651. widgets are hard-coded since they are so essential to correct behaviour.
  652. They can however be bound to different events using the
  653. .B notify()
  654. action (that is, you could notify on some other event than mouse
  655. clicks, if you know what you're doing).
  656. .\"    -    -    -    -    -    -    -    -
  657. .SH "  Main panel actions"
  658. .IP \fBquit()\fP
  659. Exit Xarchie.  By default this is invoked by selecting "Quit" from the
  660. File menu or by typing "Meta-Q" in any non-Text widget.
  661. .IP \fBquery()\fP
  662. Send the current contents of the "Search Term" text widget
  663. (\fIsearchText\fP) to
  664. .IR Archie .
  665. By default this is performed by hitting Return in \fIsearchText\fP or
  666. by selecting "Query Item" from the Query menu.
  667. .IP \fBquery-host()\fP
  668. Fills the browser with the contents of the root directory of the host
  669. given by the contents of the "Host" text widget (\fIhostText\fP).  By
  670. default this is performed by hitting Return in \fIhostText\fP or by
  671. by selecting "Query Host" from the Query menu.
  672. .IP \fBquery-location()\fP
  673. Fills the browser with the contents of the directory given by the
  674. "Location" text widget (\fIlocationText\fP) and the host
  675. given by the contents of the "Host" text widget (\fIhostText\fP).  By
  676. default this is performed by hitting Return in \fIlocationText\fP or
  677. by selecting "Query Location" from the Query menu.
  678. .IP \fBabort()\fP
  679. Aborts the current query at the soonest possible time. Has no effect
  680. is a query is not currently being processed. By default, this invoked
  681. by clicking on the Abort button when it is active.
  682. .IP \fBquery-or-abort()\fP
  683. Invokes either
  684. .B query()
  685. or
  686. .BR abort() ,
  687. depending on whether a query is in progress.
  688. .IP \fBabout()\fP
  689. Pops up the About panel.
  690. .IP \fBftp-get()\fP
  691. Begin retrieval of the currently-selected files. By default this is
  692. invoked by selecting "Get" from the "File" menu, or by typing "Meta-G"
  693. in any non-Text widget.
  694. .\"    -    -    -    -    -    -    -    -
  695. .SH "  Browser actions"
  696. .PP
  697. Items are selected in the browser using the Left mouse button, as
  698. usual.  Clicking with Shift does not clear other selections, allowing
  699. multiple selections. This is implemented using the XfwfMultiList
  700. translation actions
  701. .BR Notify() ,
  702. .BR Set() ,
  703. .BR Toggle() ,
  704. and
  705. .BR OpenMany() ,
  706. unless your version of Xarchie was compiled to not use the
  707. XXfwfMultiList widget (see the Imakefile or your local installer).
  708. Modify at your own risk!
  709. .PP
  710. The following actions are used for other browser operations.
  711. .IP \fBbrowser-up()\fP
  712. Shifts the browser left (i.e., up the file hierarchy) if possible.
  713. By default this is invoked by clicking on the "<<<" button
  714. (\fIbrowserUpButton\fP), or by clicking the Middle mouse button in the
  715. browser, or by hitting the "Left" key (often the left arrow on the
  716. cursor keypad).
  717. .IP \fBbrowser-down()\fP
  718. Shifts the browser right (ie., down the file hierarchy) if possible.
  719. By default this is invoked by clicking on the ">>>" button
  720. (\fIbrowserDownButton\fP), or by clicking the Right mouse button in
  721. the browser, or by hitting the "Right" key (often the right arrow
  722. on the cursor keypad).
  723. .IP \fBbrowser-top()\fP
  724. Shifts the browser to its leftmost position (i.e., the top of the file
  725. hierarchy).  By default this is invoked by clicking with Shift on the
  726. "<<<" button (\fIbrowserUpButton\fP) or by hitting the "Home" key.
  727. .IP \fBbrowser-open-directories()\fP
  728. Expands selected directories. If the browser was expanded uniquely and
  729. successfully, it will be shifted right to display the new information.
  730. By default, this is invoked by double-clicking in the browser.
  731. .IP \fBbrowser-open-files()\fP
  732. Retrieves selected files by FTP into a temporary file and displays
  733. them using View windows.
  734. .IP \fBbrowser-open-all()\fP
  735. Opens the selected items by expanding selected directories and
  736. retrieving selected files for viewing.  By default, this is invoked by
  737. selecting "Open" from the File menu, or by typing "Meta-O" in any
  738. non-text widget.
  739. .\"    -    -    -    -    -    -    -    -
  740. .SH "  Settings actions"
  741. The following actions control the Settings Panel and can be used to
  742. change some settings without using the panel.
  743. .IP \fBpopup-settings()\fP
  744. Pops up the Settings Panel, and resets its values to those currently
  745. in effect. Raises the Settings Panel if it is already popped up. By
  746. default this is performed by selecting "Other" on the Settings menu.
  747. .IP \fBsettings-apply()\fP
  748. Sets the current settings from the values on the Settings Panel.  By
  749. default this is performed by clicking the "Apply" button on the
  750. Settings Panel.
  751. .IP \fBsettings-default()\fP
  752. Resets the values on the Settings Panel to the default settings,
  753. but does not affect the current settings until the
  754. .B settings\-apply()
  755. action is invoked. By default, this is invoked by clicking on the
  756. "Default" button on the Settings Panel.
  757. .IP \fBsettings-done()\fP
  758. Pops down the Settings Panel. If there are changes that have not be
  759. applied, then a popup confirm box allows the user to discard the
  760. settings or go back and apply them.  By default, this is invoked by
  761. clicking on the "Done" button on the Settings Panel.
  762. .IP \fBset-host(\fRhostname\fB)\fR
  763. This action sets the
  764. .I Archie
  765. host as indicated on the Settings Panel, but does not affect the
  766. current settings until the
  767. .B settings\-apply()
  768. action is invoked.
  769. .IP \fBset-host-now(\fRhostname\fB)\fR
  770. Sets the
  771. .I Archie
  772. host immediately without waiting for
  773. .BR settings\-apply() .
  774. .IP \fBset-search-type(\fRtype\fB)\fR
  775. This action sets the searchType as indicated on the Settings Panel,
  776. but does not affect the current settings until the
  777. .B settings\-apply()
  778. action is invoked.
  779. .IP \fBset-search-type-now(\fRtype\fB)\fR
  780. Sets the searchType immediately without waiting for
  781. .BR settings\-apply() .
  782. .IP \fBset-sort-type(\fRtype\fB)\fR
  783. This action sets the sortType as indicated on the Settings Panel,
  784. but does not affect the current settings until the
  785. .B settings\-apply()
  786. action is invoked.
  787. .IP \fBset-sort-type-now(\fRtype\fB)\fR
  788. Sets the sortType immediately without waiting for
  789. .BR settings\-apply() .
  790. .IP \fBset-nice-level(\fRlevel\fB)\fR
  791. This action sets the niceLevel as indicated on the Settings Panel,
  792. but does not affect the current settings until the
  793. .B settings\-apply()
  794. action is invoked.
  795. .IP \fBset-nice-level-now(\fRlevel\fB)\fR
  796. Sets the niceLevel immediately without waiting for
  797. .BR settings\-apply() .
  798. .IP \fBsettings-submenu()\fP
  799. This action procedure is documented here only for completeness. It
  800. should only be used for BtnMotion events in the
  801. .I settingsMenu
  802. widget. It invokes the appropriate pullright menu for the Settings
  803. menu. Believe me, you don't want to deal with this.
  804. .\"    -    -    -    -    -    -    -    -
  805. .SH "  File actions"
  806. The operation of the File panel is hard-coded. The following actions
  807. are used to pop it up however:
  808. .IP \fBfile-save()\fP
  809. Pops up the File panel, and resets its values in preparation for
  810. saving the database. By default this is invoked by selecting "Save"
  811. from the "File" menu or by typing "Meta-S" in any non-Text widget.
  812. .IP \fBfile-load()\fP
  813. Pops up the File panel, and resets its values in preparation for
  814. reloading the database. By default this is invoked by selecting "Load"
  815. from the "File" menu or by typing "Meta-L" in any non-Text widget.
  816. .IP \fBfile-write()\fP
  817. Pops up the File panel, and resets its values in preparation for
  818. writing the database in a human-readable form. By default this is
  819. invoked by selecting "Write" from the "File" menu or by typing
  820. "Meta-W" in any non-Text widget.
  821. .\"    -    -    -    -    -    -    -    -
  822. .SH "  Help actions"
  823. .IP \fBhelp()\fP
  824. Pops up the Help panel.
  825. .IP \fBhelp-done()\fP
  826. Dismisses the Help panel.
  827. .sp
  828. .in -\n(INu
  829. \fBhelp-prev()\fP
  830. .br
  831. \fBhelp-next()\fP
  832. .in +\n(INu
  833. Selects the previous or next help topic, respectively.
  834. .in
  835. .sp
  836. \fBhelp-up()\fP
  837. .br
  838. \fBhelp-down()\fP
  839. .in +\n(INu
  840. Scrolls the text of the current help topic up or down one page,
  841. respectively.  This is an alternative to using the Text widget's
  842. scrollbar.
  843. .in
  844. .\"    -    -    -    -    -    -    -    -
  845. .SH "  Miscellaneous actions"
  846. .IP \fBftp-trace-done()\fP
  847. Dismisses the FTP Trace window. By default, this is invoked by
  848. clicking on the "Dismiss" button in the FTP Trace window.
  849. .\"----------------------------------------------------------
  850. .SH " Environment Variables"
  851. .PP
  852. The following environment variables are used by Xarchie if they are
  853. defined:
  854. .PP
  855. TMPDIR        - Directory for "Open"-ed files
  856. .br
  857. XXAPPLRESDIR    - Directory containing Xarchie resource file
  858. .br
  859. USER            - Username for FTP mail address
  860. .br
  861. HOSTNAME        - Hostname for FTP mail address
  862. .\"----------------------------------------------------------
  863. .SH " Files"
  864. .PP
  865. XXarchie        - default Xarchie resource file
  866. .\"----------------------------------------------------------
  867. .SH " Diagnostics"
  868. .PP
  869. XXarchie indicates X errors using the ever-popular default X error
  870. handler that prints a message and dies, possibly leaving a large core
  871. dump somewhere.
  872. .PP
  873. Errors due to incorrect resource specifications cause an error message
  874. on stderr, but do not kill Xarchie (usually).
  875. .PP
  876. Errors due to incorrect user commands or problems with the connection
  877. to Archie result in a popup alert box being displayed. Clicking on the
  878. indicated button in the alert box will make it go away and allow you
  879. to continue.
  880. .PP
  881. An incorrect value for the FTP mail address (as determined from the
  882. system information or from the USER and HOSTNAME variables) can result
  883. in access being denied by some anonymous FTP servers. See the
  884. description of the
  885. .B ftpMailAddress
  886. non-widget resource if your system has problems with this.
  887. .PP
  888. If you continually get "Can't resolve hostname" errors when you try to
  889. query, then Xarchie was not built properly. Contact your local
  890. maintainer and suggest that they read the PROBLEMS file concerning the
  891. "resolv" library.
  892. .PP
  893. If your queries always time out, then there are two possibilities.
  894. First, and by far the most likely, is that the server is simply busy.
  895. Try again later. The other possibility is that UDP traffic is disabled
  896. on your system. You should contact your local maintainer and ask them
  897. to read the PROBLEMS files concerning UDP traffic.
  898. .\"----------------------------------------------------------
  899. .SH " Known Bugs"
  900. .PP
  901. Crashes have been observed when the Help text is scrolled. There is no
  902. fix, but see the PROBLEMS file for some discussion.
  903. .PP
  904. The list of files in the FileChooser widgets don't seem to get
  905. displayed properly all the time. That is, sometimes items seem to be
  906. drawn on top of each other. Refreshing the window (eg.,
  907. iconify/deiconify or scrolling up/down) clears it up. This seems like
  908. an Xaw bug, but is difficult to repeat in isolation.
  909. .PP
  910. Your mileage may vary regarding the Xarchie icon changing to reflect
  911. search and transfer status. Your window manager may not support
  912. application-specified icons, or may not support them changing
  913. dynamically. See the PROBLEMS file for some discussion.
  914. .PP
  915. It is not currently possible to abort during nameserver lookup.
  916. Perhaps some day I'll get motivated to add asynchronous DNS code.
  917. .PP
  918. The browser has a hard-coded maximum depth, beyond which you cannot
  919. expand directories. I don't think it will be a major problem however.
  920. .\"----------------------------------------------------------
  921. .SH " Reporting Bugs"
  922. .PP
  923. If you have any questions about Archie itself, write to
  924. archie-l@cs.mcgill.ca. If you have questions about Prospero, write to
  925. info-prospero@isi.edu.
  926. .PP
  927. If you have a problem, please read the "Known Bugs" section first,
  928. then contact your local maintainer and/or refer to the PROBLEMS and
  929. INSTALL files in the Xarchie distribution.
  930. .PP
  931. When reporting bugs, problems, suggestions or contributions, please be
  932. sure to send them to the right place. Issues dealing with the X
  933. interface should be sent to George Ferguson
  934. (ferguson@cs.rochester.edu). Please be sure to include sufficient
  935. details, including hardware, OS, compiler, version of X, and the like.
  936. No amount of detail is too much.
  937. .PP
  938. Brendan Kehoe (brendan@cygnus.com) is in charge of the archie clients
  939. and most of the network stuff underlying Xarchie, Cliff Neuman
  940. (bcn@isi.edu) is in charge of Prospero, and Alan Emtage and Peter
  941. Deutsch ({bajan,peterd}@bunyip.com) are in charge of the Archie
  942. project itself.  Individual archie servers, however, are maintained
  943. locally at each server site.
  944. .\"===========================================================
  945. .SH AUTHOR
  946. .PP
  947. George Ferguson, University of Rochester,
  948. .br
  949. (ferguson@cs.rochester.edu)
  950. .PP
  951. Original standalone
  952. .I archie
  953. program by Brendan Kehoe,
  954. .br
  955. (brendan@cs.widener.edu).
  956. .PP
  957. Original Prospero
  958. .I archie
  959. program by Clifford Neuman,
  960. .br
  961. (bcn@isi.edu).
  962. .PP
  963. .na
  964. The
  965. .I archie
  966. service was conceived of and implemented by Alan Emtage
  967. (bajan@bunyip.com), Peter Deutsch (peterd@bunyip.com)
  968. and Bill Heelan (wheelan@bunyip.com).
  969. SHAR_EOF
  970. echo 'File xarchie-2.0.6/xarchie.man is complete' &&
  971. chmod 0644 xarchie-2.0.6/xarchie.man ||
  972. echo 'restore of xarchie-2.0.6/xarchie.man failed'
  973. Wc_c="`wc -c < 'xarchie-2.0.6/xarchie.man'`"
  974. test 64512 -eq "$Wc_c" ||
  975.     echo 'xarchie-2.0.6/xarchie.man: original size 64512, current size' "$Wc_c"
  976. rm -f _shar_wnt_.tmp
  977. fi
  978. # ============= xarchie-2.0.6/xarchie.xbm ==============
  979. if test -f 'xarchie-2.0.6/xarchie.xbm' -a X"$1" != X"-c"; then
  980.     echo 'x - skipping xarchie-2.0.6/xarchie.xbm (File already exists)'
  981.     rm -f _shar_wnt_.tmp
  982. else
  983. > _shar_wnt_.tmp
  984. echo 'x - extracting xarchie-2.0.6/xarchie.xbm (Text)'
  985. sed 's/^X//' << 'SHAR_EOF' > 'xarchie-2.0.6/xarchie.xbm' &&
  986. #define xarchie_width 32
  987. #define xarchie_height 32
  988. static unsigned char xarchie_bits[] = {
  989. X   0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x80, 0x29, 0x19, 0xab, 0x8e,
  990. X   0xa9, 0xaa, 0xa8, 0x82, 0x91, 0x9b, 0xb8, 0x86, 0xa9, 0xaa, 0xa8, 0x82,
  991. X   0xa9, 0x2a, 0xab, 0x8e, 0x01, 0x00, 0x00, 0x80, 0xff, 0xff, 0xff, 0xff,
  992. X   0x01, 0x04, 0x20, 0x80, 0xfb, 0xed, 0x6f, 0xbf, 0x01, 0x04, 0x20, 0x80,
  993. X   0xfb, 0xed, 0x6f, 0xbf, 0x01, 0x04, 0x20, 0x80, 0xfb, 0xed, 0x6f, 0x80,
  994. X   0x01, 0x04, 0x20, 0x80, 0xfb, 0x0d, 0x60, 0x80, 0x01, 0x04, 0x20, 0x80,
  995. X   0x03, 0x0c, 0x60, 0x80, 0x01, 0x04, 0x20, 0x80, 0x03, 0x0c, 0x60, 0x80,
  996. X   0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x80, 0x9d, 0x56, 0xae, 0xad,
  997. X   0x01, 0x00, 0x00, 0x80, 0xbd, 0xad, 0x95, 0xb5, 0x01, 0x00, 0x00, 0x80,
  998. X   0x9d, 0x6a, 0xd6, 0xb6, 0x01, 0x00, 0x00, 0x80, 0xdd, 0x71, 0x8f, 0xb7,
  999. X   0x01, 0x00, 0x00, 0x80, 0xff, 0xff, 0xff, 0xff};
  1000. SHAR_EOF
  1001. chmod 0644 xarchie-2.0.6/xarchie.xbm ||
  1002. echo 'restore of xarchie-2.0.6/xarchie.xbm failed'
  1003. Wc_c="`wc -c < 'xarchie-2.0.6/xarchie.xbm'`"
  1004. test 893 -eq "$Wc_c" ||
  1005.     echo 'xarchie-2.0.6/xarchie.xbm: original size 893, current size' "$Wc_c"
  1006. rm -f _shar_wnt_.tmp
  1007. fi
  1008. # ============= xarchie-2.0.6/xcutbuf.c ==============
  1009. if test -f 'xarchie-2.0.6/xcutbuf.c' -a X"$1" != X"-c"; then
  1010.     echo 'x - skipping xarchie-2.0.6/xcutbuf.c (File already exists)'
  1011.     rm -f _shar_wnt_.tmp
  1012. else
  1013. > _shar_wnt_.tmp
  1014. echo 'x - extracting xarchie-2.0.6/xcutbuf.c (Text)'
  1015. sed 's/^X//' << 'SHAR_EOF' > 'xarchie-2.0.6/xcutbuf.c' &&
  1016. /*
  1017. X * xcutbuf.c : Retrieve value of an X cut buffer
  1018. X *
  1019. X * George Ferguson, ferguson@cs.rochester.edu, 9 Feb 1993.
  1020. X *
  1021. X * Compile with local variant of:
  1022. X *    cc -o xcutbuf -I/usr/staff/include xcutbuf.c -L/usr/staff/lib -lX11
  1023. X *
  1024. X */
  1025. X
  1026. #include <stdio.h>
  1027. #include <X11/Xlib.h>
  1028. extern char *getenv();
  1029. X
  1030. char *program;
  1031. X
  1032. static void
  1033. usage()
  1034. {
  1035. X    fprintf(stderr,"usage: %s [-display display] [0-7]\n",program);
  1036. X    exit(1);
  1037. }
  1038. X
  1039. main(argc,argv)
  1040. int argc;
  1041. char *argv[];
  1042. {
  1043. X
  1044. X    Display *display;
  1045. X    char *dispname = NULL, *data;
  1046. X    int bufnum = 0, n;
  1047. X
  1048. X    program = argv[0];
  1049. X    argc -= 1;
  1050. X    argv += 1;
  1051. X    while (argc > 0) {
  1052. X    if (strncmp(argv[0],"-d",2) == 0) {
  1053. X        if (argc == 1) {
  1054. X        usage();
  1055. X        } else {
  1056. X        dispname = argv[1];
  1057. X        argc -= 1;
  1058. X        argv += 1;
  1059. X        }
  1060. X    } else if (*argv[0] < '0' || *argv[0] > '7') {
  1061. X        usage();
  1062. X    } else {
  1063. X        bufnum = *argv[0] - '0';
  1064. X    }
  1065. X    argc -= 1;
  1066. X    argv += 1;
  1067. X    }
  1068. X    if ((display=XOpenDisplay(dispname)) == NULL) {
  1069. X    if (dispname == NULL)
  1070. X        dispname = getenv("DISPLAY");
  1071. X    if (dispname == NULL)
  1072. X        dispname = "(null)";
  1073. X    fprintf(stderr,"%s: couldn't open display \"%s\"\n",program,dispname);
  1074. X    exit(2);
  1075. X    }
  1076. X    data = XFetchBuffer(display,&n,bufnum);
  1077. X    if (data != NULL) {
  1078. X    printf(data);
  1079. X    XFree(data);
  1080. X    }
  1081. X    XCloseDisplay(display);
  1082. X    exit(0);
  1083. }
  1084. SHAR_EOF
  1085. chmod 0644 xarchie-2.0.6/xcutbuf.c ||
  1086. echo 'restore of xarchie-2.0.6/xcutbuf.c failed'
  1087. Wc_c="`wc -c < 'xarchie-2.0.6/xcutbuf.c'`"
  1088. test 1283 -eq "$Wc_c" ||
  1089.     echo 'xarchie-2.0.6/xcutbuf.c: original size 1283, current size' "$Wc_c"
  1090. rm -f _shar_wnt_.tmp
  1091. fi
  1092. # ============= xarchie-2.0.6/xtypes.h ==============
  1093. if test -f 'xarchie-2.0.6/xtypes.h' -a X"$1" != X"-c"; then
  1094.     echo 'x - skipping xarchie-2.0.6/xtypes.h (File already exists)'
  1095.     rm -f _shar_wnt_.tmp
  1096. else
  1097. > _shar_wnt_.tmp
  1098. echo 'x - extracting xarchie-2.0.6/xtypes.h (Text)'
  1099. sed 's/^X//' << 'SHAR_EOF' > 'xarchie-2.0.6/xtypes.h' &&
  1100. /*
  1101. X * xtypes.h : A few types for files that don't include X11/Intrinsic.h
  1102. X *
  1103. X * George Ferguson, ferguson@cs.rochester.edu, 23 Apr 1993.
  1104. X */
  1105. X
  1106. #ifndef _XTYPES_H
  1107. #define _XTYPES_H
  1108. X
  1109. #include "config.h"
  1110. X
  1111. #ifdef CRAY
  1112. typedef long Boolean;
  1113. #else
  1114. typedef char Boolean;
  1115. #endif
  1116. X
  1117. #ifndef True
  1118. #define True 1
  1119. #endif
  1120. #ifndef False
  1121. #define False 0
  1122. #endif
  1123. #ifndef NULL
  1124. #define NULL 0
  1125. #endif
  1126. X
  1127. typedef char *String;
  1128. typedef char *XtPointer;
  1129. typedef char *XtInputId;
  1130. typedef char *XtIntervalId;
  1131. typedef char XFontStruct;
  1132. typedef char *Pixmap;
  1133. X
  1134. #ifdef HAVE_MEMORY_H
  1135. #include "memory.h"
  1136. #endif
  1137. X
  1138. #define XtMalloc(SIZE)        malloc(SIZE)
  1139. #define XtCalloc(NUM,SIZE)    calloc(NUM,SIZE)
  1140. #define XtFree(PTR)        if (PTR) free(PTR)
  1141. #define XtNew(TYPE)        ((TYPE *)malloc(sizeof(TYPE)))
  1142. #define XtNewString(STR)    (STR ? strcpy(malloc(strlen(STR)+1),STR) \
  1143. X                     : NULL)
  1144. #endif
  1145. SHAR_EOF
  1146. chmod 0644 xarchie-2.0.6/xtypes.h ||
  1147. echo 'restore of xarchie-2.0.6/xtypes.h failed'
  1148. Wc_c="`wc -c < 'xarchie-2.0.6/xtypes.h'`"
  1149. test 841 -eq "$Wc_c" ||
  1150.     echo 'xarchie-2.0.6/xtypes.h: original size 841, current size' "$Wc_c"
  1151. rm -f _shar_wnt_.tmp
  1152. fi
  1153. # ============= xarchie-2.0.6/xutil.c ==============
  1154. if test -f 'xarchie-2.0.6/xutil.c' -a X"$1" != X"-c"; then
  1155.     echo 'x - skipping xarchie-2.0.6/xutil.c (File already exists)'
  1156.     rm -f _shar_wnt_.tmp
  1157. else
  1158. > _shar_wnt_.tmp
  1159. echo 'x - extracting xarchie-2.0.6/xutil.c (Text)'
  1160. sed 's/^X//' << 'SHAR_EOF' > 'xarchie-2.0.6/xutil.c' &&
  1161. /*
  1162. X * xutil.c : Miscellaneous X functions
  1163. X *
  1164. X * George Ferguson, ferguson@cs.rochester.edu, 23 Apr 1993.
  1165. X */
  1166. X
  1167. #include <stdio.h>
  1168. #include <X11/Intrinsic.h>
  1169. #include <X11/Xaw/Text.h>
  1170. #include <X11/StringDefs.h>
  1171. X
  1172. /*
  1173. X * Functions defined here:
  1174. X */
  1175. void setWidgetString();
  1176. void setWidgetLabel();
  1177. char *getWidgetString();
  1178. void appendWidgetText();
  1179. X
  1180. /*    -    -    -    -    -    -    -    -    */
  1181. X
  1182. /*
  1183. X * setWidgetString() : Set the given Text item's value to the given string.
  1184. X */
  1185. void
  1186. setWidgetString(w,str)
  1187. Widget w;
  1188. char *str;
  1189. {
  1190. X    Arg args[1];
  1191. X
  1192. X    if (w != NULL && str != NULL) {
  1193. X    XtSetArg(args[0],XtNstring,str);
  1194. X    XtSetValues(w,args,1);
  1195. X    }
  1196. }
  1197. X
  1198. /*
  1199. X * setWidgetLabel() : Set the given Label item's label to the given string.
  1200. X */
  1201. void
  1202. setWidgetLabel(w,str)
  1203. Widget w;
  1204. char *str;
  1205. {
  1206. X    Arg args[1];
  1207. X
  1208. X    if (w != NULL && str != NULL) {
  1209. X    XtSetArg(args[0],XtNlabel,str);
  1210. X    XtSetValues(w,args,1);
  1211. X    }
  1212. }
  1213. X
  1214. /*    -    -    -    -    -    -    -    -    */
  1215. X
  1216. char *
  1217. getWidgetString(widget)
  1218. Widget widget;
  1219. {
  1220. X    Arg args[1];
  1221. X    char *s;
  1222. X
  1223. X    XtSetArg(args[0],XtNstring,&s);
  1224. X    XtGetValues(widget,args,1);
  1225. X    return(s);
  1226. }
  1227. X
  1228. char *
  1229. getWidgetLabel(widget)
  1230. Widget widget;
  1231. {
  1232. X    Arg args[1];
  1233. X    char *s;
  1234. X
  1235. X    XtSetArg(args[0],XtNlabel,&s);
  1236. X    XtGetValues(widget,args,1);
  1237. X    return(s);
  1238. }
  1239. X
  1240. /*    -    -    -    -    -    -    -    -    */
  1241. /* Improved by Tim Auckland <tda10@cus.cam.ac.uk> */
  1242. X
  1243. void
  1244. appendWidgetText(w,text)
  1245. Widget w;
  1246. char *text;
  1247. {
  1248. X    XawTextBlock block;
  1249. X    XawTextPosition pos;
  1250. X    XawTextEditType saved;
  1251. X    Arg args[1];
  1252. X
  1253. X    if ((block.length=strlen(text)) == 0)
  1254. X    return;
  1255. X    block.firstPos = 0;
  1256. X    block.format = FMT8BIT;
  1257. X    block.ptr = text;
  1258. X    XtCallActionProc(w,"end-of-file",NULL,NULL,0);
  1259. X    pos = XawTextGetInsertionPoint(w);
  1260. X    XtSetArg(args[0],XtNeditType,&saved);
  1261. X    XtGetValues(w,args,1);
  1262. X    XtSetArg(args[0],XtNeditType,XawtextAppend);
  1263. X    XtSetValues(w,args,1);
  1264. X    switch (XawTextReplace(w,pos,pos,&block)) {
  1265. X    case XawPositionError:
  1266. X        fprintf(stderr,"XawPositionError: `%s'\n",block.ptr);
  1267. X        break;
  1268. X    case XawEditError:
  1269. X        fprintf(stderr,"XawEditError: `%s'\n",block.ptr);
  1270. X        break;
  1271. X    }
  1272. X    XtSetArg(args[0],XtNeditType,saved);
  1273. X    XtSetValues(w,args,1);
  1274. X    XtCallActionProc(w,"end-of-file",NULL,NULL,0);
  1275. }
  1276. SHAR_EOF
  1277. chmod 0644 xarchie-2.0.6/xutil.c ||
  1278. echo 'restore of xarchie-2.0.6/xutil.c failed'
  1279. Wc_c="`wc -c < 'xarchie-2.0.6/xutil.c'`"
  1280. test 2166 -eq "$Wc_c" ||
  1281.     echo 'xarchie-2.0.6/xutil.c: original size 2166, current size' "$Wc_c"
  1282. rm -f _shar_wnt_.tmp
  1283. fi
  1284. # ============= xarchie-2.0.6/xutil.h ==============
  1285. if test -f 'xarchie-2.0.6/xutil.h' -a X"$1" != X"-c"; then
  1286.     echo 'x - skipping xarchie-2.0.6/xutil.h (File already exists)'
  1287.     rm -f _shar_wnt_.tmp
  1288. else
  1289. > _shar_wnt_.tmp
  1290. echo 'x - extracting xarchie-2.0.6/xutil.h (Text)'
  1291. sed 's/^X//' << 'SHAR_EOF' > 'xarchie-2.0.6/xutil.h' &&
  1292. /*
  1293. X * xutil.h : Miscellaneous X functions
  1294. X *
  1295. X * George Ferguson, ferguson@cs.rochester.edu, 23 Apr 1993.
  1296. X */
  1297. X
  1298. extern void setWidgetString(
  1299. #if NeedFunctionPrototypes
  1300. X    Widget w,
  1301. X    char *str
  1302. #endif
  1303. );
  1304. X
  1305. extern void setWidgetLabel(
  1306. #if NeedFunctionPrototypes
  1307. X    Widget w,
  1308. X    char *str
  1309. #endif
  1310. );
  1311. X
  1312. extern char *getWidgetString(
  1313. #if NeedFunctionPrototypes
  1314. X    Widget w
  1315. #endif
  1316. );
  1317. X
  1318. extern char *getWidgetLabel(
  1319. #if NeedFunctionPrototypes
  1320. X    Widget w
  1321. #endif
  1322. );
  1323. X
  1324. extern void appendWidgetText(
  1325. #if NeedFunctionPrototypes
  1326. X    Widget w,
  1327. X    char *text
  1328. #endif
  1329. );
  1330. X
  1331. SHAR_EOF
  1332. chmod 0644 xarchie-2.0.6/xutil.h ||
  1333. echo 'restore of xarchie-2.0.6/xutil.h failed'
  1334. Wc_c="`wc -c < 'xarchie-2.0.6/xutil.h'`"
  1335. test 557 -eq "$Wc_c" ||
  1336.     echo 'xarchie-2.0.6/xutil.h: original size 557, current size' "$Wc_c"
  1337. rm -f _shar_wnt_.tmp
  1338. fi
  1339. # ============= xarchie-2.0.6/Ad2c/README ==============
  1340. if test ! -d 'xarchie-2.0.6/Ad2c'; then
  1341.     echo 'x - creating directory xarchie-2.0.6/Ad2c'
  1342.     mkdir 'xarchie-2.0.6/Ad2c'
  1343. fi
  1344. if test -f 'xarchie-2.0.6/Ad2c/README' -a X"$1" != X"-c"; then
  1345.     echo 'x - skipping xarchie-2.0.6/Ad2c/README (File already exists)'
  1346.     rm -f _shar_wnt_.tmp
  1347. else
  1348. > _shar_wnt_.tmp
  1349. echo 'x - extracting xarchie-2.0.6/Ad2c/README (Text)'
  1350. sed 's/^X//' << 'SHAR_EOF' > 'xarchie-2.0.6/Ad2c/README' &&
  1351. X
  1352. X        README for AD2C - convert resource files to C decls
  1353. X
  1354. X         George Ferguson, ferguson@cs.rochester.edu
  1355. X
  1356. X                 12 Nov 1990
  1357. X            Updated 8 Jul 1992
  1358. X
  1359. DESCRIPTION:
  1360. X
  1361. X     Ad2c is a program which converts X resource files into C
  1362. X     declarations appropriate for inclusion as fallback resources.
  1363. X     The program is a sed script which is effectively a finite state
  1364. X     machine, escaping quotes and backslashes (and newlines where
  1365. X     necessary), and adding quotes and commas as needed for array
  1366. X     initialization.
  1367. X
  1368. DISCLAIMER:
  1369. X
  1370. X     This software is provided as is with no warranty expressed or implied.
  1371. X     I hope you find it useful, but I won't be held responsable for
  1372. X     any damage that may occur from reading, compiling, installing or
  1373. X     using it.
  1374. X
  1375. X     You are free to use any part of this code for other purposes. It
  1376. X     would be nice if you could keep my name on some part of whatever the
  1377. X     final product is.
  1378. X
  1379. INSTALLATION:
  1380. X
  1381. X     1. Edit the Imakefile to change the installation directories if
  1382. X    desired.
  1383. X
  1384. X     2. Execute "xmkmf" to make the Makefile.
  1385. X
  1386. X     3. Execute "make install" to install ad2c, and/or "make install.man"
  1387. X    to install the man page. Making ad2c itself is unnecessary.
  1388. X
  1389. HISTORY:
  1390. X
  1391. X     12 Nov 1990
  1392. X    - Written and released to alt.sources.
  1393. X
  1394. X     19 Mar 1991
  1395. X    From: ferguson@cs.rochester.edu
  1396. X        - Made it "self-contained" (ie. eliminated ad2c.sed)
  1397. X        - Added Imakefile
  1398. X    From: jerbil@ultra.com (Joseph Beckenbach)
  1399. X        - Wrote man page.
  1400. X
  1401. X     22 Jul 1991
  1402. X    From: ferguson@cs.rochester.edu
  1403. X        - Added USAGE section to man page and converted it to
  1404. X          use italic rather than bold font.
  1405. X
  1406. X     Version 1.4: 6 Jan 1992
  1407. X    From: tim@cs.wisc.edu (Tim Theisen)
  1408. X        - Fixed example in man page.
  1409. X    From: mycroft@gnu.ai.mit.edu (Charles Hannum)
  1410. X        - Changes to work with Gnu and IBM sed, instead of relying
  1411. X          or quirky SunOS "-n" behaviour.
  1412. X
  1413. X     Version 1.5: 7 Jan 1992
  1414. X    From: matthew@sunpix.East.Sun.COM (Matthew Stier)
  1415. X        - Escape quotes after escaping backslashes.
  1416. X
  1417. X     Version 1.6: 8 Jul 1992
  1418. X    From: davidw@vista.atmos.uiuc.edu (David Wojtowicz)
  1419. X        - Semicolon after close-paren in example in manpage.
  1420. X
  1421. X     Version 1.7: 19 Apr 1993
  1422. X    From: ferguson@cs.rochester.edu
  1423. X        - Remove comments inside sed command, and just put
  1424. X          them in the text.
  1425. SHAR_EOF
  1426. chmod 0644 xarchie-2.0.6/Ad2c/README ||
  1427. echo 'restore of xarchie-2.0.6/Ad2c/README failed'
  1428. Wc_c="`wc -c < 'xarchie-2.0.6/Ad2c/README'`"
  1429. test 2249 -eq "$Wc_c" ||
  1430.     echo 'xarchie-2.0.6/Ad2c/README: original size 2249, current size' "$Wc_c"
  1431. rm -f _shar_wnt_.tmp
  1432. fi
  1433. # ============= xarchie-2.0.6/Ad2c/Imakefile ==============
  1434. if test -f 'xarchie-2.0.6/Ad2c/Imakefile' -a X"$1" != X"-c"; then
  1435.     echo 'x - skipping xarchie-2.0.6/Ad2c/Imakefile (File already exists)'
  1436.     rm -f _shar_wnt_.tmp
  1437. else
  1438. > _shar_wnt_.tmp
  1439. echo 'x - extracting xarchie-2.0.6/Ad2c/Imakefile (Text)'
  1440. sed 's/^X//' << 'SHAR_EOF' > 'xarchie-2.0.6/Ad2c/Imakefile' &&
  1441. #
  1442. #    Imakefile for ad2c - Convert X resources to C decls
  1443. #
  1444. #    George Ferguson, ferguson@cs.rochester.edu, 19 Mar 1991.
  1445. #
  1446. X
  1447. # Where do you want this (if the default isn't okay)?
  1448. #BINDIR = bin
  1449. #MANDIR = man/man1
  1450. # Default suffix is "1", change if you change MANDIR I guess
  1451. ##undef ManSuffix
  1452. ##define ManSuffix l
  1453. X
  1454. # Why is this not the default?
  1455. INSTPGMFLAGS = -m 0755
  1456. X
  1457. AllTarget(ad2c)
  1458. depend:
  1459. X    @echo 'no need to depend for ad2c'
  1460. ad2c:
  1461. X    @echo 'ad2c is up to date'
  1462. X
  1463. InstallScript(ad2c,$(BINDIR))
  1464. InstallManPage(ad2c,$(MANDIR))
  1465. SHAR_EOF
  1466. chmod 0644 xarchie-2.0.6/Ad2c/Imakefile ||
  1467. echo 'restore of xarchie-2.0.6/Ad2c/Imakefile failed'
  1468. Wc_c="`wc -c < 'xarchie-2.0.6/Ad2c/Imakefile'`"
  1469. test 519 -eq "$Wc_c" ||
  1470.     echo 'xarchie-2.0.6/Ad2c/Imakefile: original size 519, current size' "$Wc_c"
  1471. rm -f _shar_wnt_.tmp
  1472. fi
  1473. # ============= xarchie-2.0.6/Ad2c/Makefile ==============
  1474. if test -f 'xarchie-2.0.6/Ad2c/Makefile' -a X"$1" != X"-c"; then
  1475.     echo 'x - skipping xarchie-2.0.6/Ad2c/Makefile (File already exists)'
  1476.     rm -f _shar_wnt_.tmp
  1477. else
  1478. > _shar_wnt_.tmp
  1479. echo 'x - extracting xarchie-2.0.6/Ad2c/Makefile (Text)'
  1480. sed 's/^X//' << 'SHAR_EOF' > 'xarchie-2.0.6/Ad2c/Makefile' &&
  1481. # Makefile generated by imake - do not edit!
  1482. # $XConsortium: imake.c,v 1.51 89/12/12 12:37:30 jim Exp $
  1483. #
  1484. # The cpp used on this machine replaces all newlines and multiple tabs and
  1485. # spaces in a macro expansion with a single space.  Imake tries to compensate
  1486. # for this, but is not always successful.
  1487. #
  1488. X
  1489. ###########################################################################
  1490. # Makefile generated from "Imake.tmpl" and </tmp/IIf.a00917>
  1491. # $XConsortium: Imake.tmpl,v 1.77 89/12/18 17:01:37 jim Exp $
  1492. #
  1493. # Platform-specific parameters may be set in the appropriate .cf
  1494. # configuration files.  Site-wide parameters may be set in the file
  1495. # site.def.  Full rebuilds are recommended if any parameters are changed.
  1496. #
  1497. # If your C preprocessor doesn't define any unique symbols, you'll need
  1498. # to set BOOTSTRAPCFLAGS when rebuilding imake (usually when doing
  1499. # "make Makefile", "make Makefiles", or "make World").
  1500. #
  1501. # If you absolutely can't get imake to work, you'll need to set the
  1502. # variables at the top of each Makefile as well as the dependencies at the
  1503. # bottom (makedepend will do this automatically).
  1504. #
  1505. X
  1506. ###########################################################################
  1507. # platform-specific configuration parameters - edit sun.cf to change
  1508. X
  1509. # platform:  $XConsortium: sun.cf,v 1.38 89/12/23 16:10:10 jim Exp $
  1510. # operating system:  SunOS 4.0.3
  1511. X
  1512. ###########################################################################
  1513. # site-specific configuration parameters - edit site.def to change
  1514. X
  1515. # site:  $XConsortium: site.def,v 1.21 89/12/06 11:46:50 jim Exp $
  1516. X
  1517. X            SHELL = /bin/sh
  1518. X
  1519. X              TOP = ../.
  1520. X      CURRENT_DIR = ./Ad2c
  1521. X
  1522. X               AR = ar cq
  1523. X  BOOTSTRAPCFLAGS =
  1524. X               CC = cc
  1525. X
  1526. X         COMPRESS = compress
  1527. X              CPP = /lib/cpp $(STD_CPP_DEFINES)
  1528. X    PREPROCESSCMD = cc -E $(STD_CPP_DEFINES)
  1529. X          INSTALL = install
  1530. X               LD = ld
  1531. X             LINT = lint
  1532. X      LINTLIBFLAG = -C
  1533. X         LINTOPTS = -axz
  1534. X               LN = ln -s
  1535. X             MAKE = make
  1536. X               MV = mv
  1537. X               CP = cp
  1538. X           RANLIB = ranlib
  1539. X  RANLIBINSTFLAGS =
  1540. X               RM = rm -f
  1541. X     STD_INCLUDES =
  1542. X  STD_CPP_DEFINES =
  1543. X      STD_DEFINES =
  1544. X EXTRA_LOAD_FLAGS =
  1545. X  EXTRA_LIBRARIES =
  1546. X             TAGS = ctags
  1547. X
  1548. X    SHAREDCODEDEF = -DSHAREDCODE
  1549. X         SHLIBDEF = -DSUNSHLIB
  1550. X
  1551. X    PROTO_DEFINES =
  1552. X
  1553. X     INSTPGMFLAGS =
  1554. X
  1555. X     INSTBINFLAGS = -m 0755
  1556. X     INSTUIDFLAGS = -m 4755
  1557. X     INSTLIBFLAGS = -m 0664
  1558. X     INSTINCFLAGS = -m 0444
  1559. X     INSTMANFLAGS = -m 0444
  1560. X     INSTDATFLAGS = -m 0444
  1561. X    INSTKMEMFLAGS = -g kmem -m 2755
  1562. X
  1563. X          DESTDIR =
  1564. X
  1565. X     TOP_INCLUDES = -I$(INCROOT)
  1566. X
  1567. X      CDEBUGFLAGS = -O
  1568. X        CCOPTIONS =
  1569. X      COMPATFLAGS =
  1570. X
  1571. X      ALLINCLUDES = $(STD_INCLUDES) $(TOP_INCLUDES) $(INCLUDES) $(EXTRA_INCLUDES)
  1572. X       ALLDEFINES = $(ALLINCLUDES) $(STD_DEFINES) $(PROTO_DEFINES) $(DEFINES) $(COMPATFLAGS)
  1573. X           CFLAGS = $(CDEBUGFLAGS) $(CCOPTIONS) $(ALLDEFINES)
  1574. X        LINTFLAGS = $(LINTOPTS) -DLINT $(ALLDEFINES)
  1575. X           LDLIBS = $(SYS_LIBRARIES) $(EXTRA_LIBRARIES)
  1576. X        LDOPTIONS = $(CDEBUGFLAGS) $(CCOPTIONS)
  1577. X   LDCOMBINEFLAGS = -X -r
  1578. X
  1579. X        MACROFILE = sun.cf
  1580. X           RM_CMD = $(RM) *.CKP *.ln *.BAK *.bak *.o core errs ,* *~ *.a .emacs_* tags TAGS make.log MakeOut
  1581. X
  1582. X    IMAKE_DEFINES =
  1583. X
  1584. X         IRULESRC = $(CONFIGDIR)
  1585. X        IMAKE_CMD = $(IMAKE) -DUseInstalled -I$(IRULESRC) $(IMAKE_DEFINES)
  1586. X
  1587. X     ICONFIGFILES = $(IRULESRC)/Imake.tmpl $(IRULESRC)/Imake.rules \
  1588. X            $(IRULESRC)/Project.tmpl $(IRULESRC)/site.def \
  1589. X            $(IRULESRC)/$(MACROFILE) $(EXTRA_ICONFIGFILES)
  1590. X
  1591. ###########################################################################
  1592. # X Window System Build Parameters
  1593. # $XConsortium: Project.tmpl,v 1.63 89/12/18 16:46:44 jim Exp $
  1594. X
  1595. ###########################################################################
  1596. # X Window System make variables; this need to be coordinated with rules
  1597. # $XConsortium: Project.tmpl,v 1.63 89/12/18 16:46:44 jim Exp $
  1598. X
  1599. X          PATHSEP = /
  1600. X        USRLIBDIR = /usr/staff/lib
  1601. X           BINDIR = /usr/staff/bin
  1602. X          INCROOT = /usr/staff/include
  1603. X     BUILDINCROOT = $(TOP)
  1604. X      BUILDINCDIR = $(BUILDINCROOT)/X11
  1605. X      BUILDINCTOP = ..
  1606. X           INCDIR = $(INCROOT)/X11
  1607. X           ADMDIR = /tmp
  1608. X           LIBDIR = $(USRLIBDIR)/X11
  1609. X        CONFIGDIR = $(LIBDIR)/config
  1610. X       LINTLIBDIR = $(USRLIBDIR)/lint
  1611. X
  1612. X          FONTDIR = $(LIBDIR)/fonts
  1613. X         XINITDIR = $(LIBDIR)/xinit
  1614. X           XDMDIR = $(LIBDIR)/xdm
  1615. X           AWMDIR = $(LIBDIR)/awm
  1616. X           TWMDIR = $(LIBDIR)/twm
  1617. X           GWMDIR = $(LIBDIR)/gwm
  1618. X          MANPATH = $(DESTDIR)/usr/staff/man
  1619. X    MANSOURCEPATH = $(MANPATH)/man
  1620. X           MANDIR = $(MANSOURCEPATH)1
  1621. X        LIBMANDIR = $(MANSOURCEPATH)3
  1622. SHAR_EOF
  1623. true || echo 'restore of xarchie-2.0.6/Ad2c/Makefile failed'
  1624. fi
  1625. echo 'End of xarchie-2.0.6 part 18'
  1626. echo 'File xarchie-2.0.6/Ad2c/Makefile is continued in part 19'
  1627. echo 19 > _shar_seq_.tmp
  1628. exit 0
  1629.  
  1630. exit 0 # Just in case...
  1631. -- 
  1632.   // chris@IMD.Sterling.COM       | Send comp.sources.x submissions to:
  1633. \X/  Amiga - The only way to fly! |    sources-x@imd.sterling.com
  1634.  "It's intuitively obvious to the |
  1635.   most casual observer..."        | GCS d+/-- p+ c++ l+ m+ s++/+ g+ w+ t+ r+ x+
  1636.