home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-06-14 | 50.4 KB | 1,566 lines |
- Newsgroups: comp.sources.x
- From: ferguson@cs.rochester.edu (George Ferguson)
- Subject: v20i039: xarchie - An X browser interface to Archie, v2.0.6, Part11/24
- Message-ID: <1993Jun15.223330.651@sparky.imd.sterling.com>
- X-Md4-Signature: 71299c20d64e1e0dbfb354ac0c9886f3
- Sender: chris@sparky.imd.sterling.com (Chris Olson)
- Organization: Sterling Software
- Date: Tue, 15 Jun 1993 22:33:30 GMT
- Approved: chris@sparky.imd.sterling.com
-
- Submitted-by: ferguson@cs.rochester.edu (George Ferguson)
- Posting-number: Volume 20, Issue 39
- Archive-name: xarchie/part11
- Environment: X11
- Supersedes: xarchie: Volume 14, Issue 82-90
-
- Submitted-by: ferguson@cs.rochester.edu
- Archive-name: xarchie-2.0.6/part11
-
- #!/bin/sh
- # this is Part.11 (part 11 of xarchie-2.0.6)
- # do not concatenate these parts, unpack them in order with /bin/sh
- # file xarchie-2.0.6/help-text1.h continued
- #
- if test ! -r _shar_seq_.tmp; then
- echo 'Please unpack part 1 first!'
- exit 1
- fi
- (read Scheck
- if test "$Scheck" != 11; then
- echo Please unpack part "$Scheck" next!
- exit 1
- else
- exit 0
- fi
- ) < _shar_seq_.tmp || exit 1
- if test ! -f _shar_wnt_.tmp; then
- echo 'x - still skipping xarchie-2.0.6/help-text1.h'
- else
- echo 'x - continuing file xarchie-2.0.6/help-text1.h'
- sed 's/^X//' << 'SHAR_EOF' >> 'xarchie-2.0.6/help-text1.h' &&
- " tial value of the \"Strip CR\"\n",
- " item on the Settings Panel.\n",
- "\n",
- NULL,
- " Database Writing Resources\n",
- " fileWriteOnePerLine\n",
- " Specifies the format of files\n",
- " written by \"Write\". This will\n",
- " be used as the initial value\n",
- " of the \"Write format\" item on\n",
- " the File Panel. The meaning\n",
- " of this setting is described\n",
- " in the USER'S GUIDE section on\n",
- " \"Saving, Loading, and Writ-\n",
- " ing\".\n",
- "\n",
- NULL,
- " Special Font Resources\n",
- " Xarchie uses two fonts by default:\n",
- " one \"normal\" and one \"bold\". How-\n",
- " ever, because of widget naming and\n",
- " resource lookup conventions, these\n",
- " fonts must be specified in many\n",
- " places in the resource file. To\n",
- " make it easier to find and change\n",
- " these fonts, the following two\n",
- " resources are defined:\n",
- "\n",
- " xarchieFont\n",
- " The name of the default font\n",
- " used by Xarchie widgets. If\n",
- " any widget specifies a font\n",
- " resource as \"xarchieFont\",\n",
- " this font will be used.\n",
- "\n",
- " xarchieBoldFont\n",
- " Like the above, but specifies\n",
- " the font used by any widget\n",
- " that specifies a font resource\n",
- " of \"xarchieBoldFont\".\n",
- "\n",
- " The resource converter that looks\n",
- " up fontnames is modified so that\n",
- " the the two special strings \"xar-\n",
- " chieFont\" and \"xarchieBoldFont\"\n",
- " result in the corresponding font\n",
- " being returned; other strings are\n",
- " looked up as normal fontnames.\n",
- "\n",
- NULL,
- " Other Resources\n",
- " visualType\n",
- " This resource allows you to\n",
- " override Xarchie's builtin\n",
- " determination of the type of\n",
- " display, which it uses to\n",
- " specify appropriate color\n",
- " resources. You can specify\n",
- " \"mon\", \"gray\", or \"color\" as\n",
- " the value of this resource. It\n",
- " can also be set with the\n",
- " corresponding command-line\n",
- " options.\n",
- "\n",
- " defaultIcon\n",
- " If given, this resource speci-\n",
- " fies the name of an X bitmap\n",
- " file that will be used as\n",
- " Xarchie's icon when not query-\n",
- " ing (assuming you are using a\n",
- " window manager that supports\n",
- " icon pixmaps). The X resource\n",
- " conversion routines will look\n",
- " for the file in a variety of\n",
- " places, including directories\n",
- " given by the global resource\n",
- " bitmapFilePath.\n",
- "\n",
- " busyIcon\n",
- " If given, this resource speci-\n",
- " fies the name of an X bitmap\n",
- " file that will be used as\n",
- " Xarchie's icon when querying\n",
- " (see the description of the\n",
- " defaultIcon resource, above).\n",
- " The icon is changed back to\n",
- " the default when the query\n",
- " completes, so you can watch\n",
- " for a change while Xarchie is\n",
- " iconified.\n",
- "\n",
- NULL,
- " Widget Hierarchies\n",
- " Xarchie uses primarily Athena widg-\n",
- " ets, with some extra sub-classes as\n",
- " described below.\n",
- "\n",
- NULL,
- " Main Xarchie Widgets\n",
- " The widget hierarchy for the main\n",
- " Xarchie display is as follows:\n",
- "\n",
- " Xarchie xarchie\n",
- " [Form color|gray] <-- Color or gray-scale displays only\n",
- " Paned outerPaned\n",
- " Form buttonForm\n",
- " MenuButton fileButton\n",
- " MenuButton settingsButton\n",
- " MenuButton queryButton\n",
- " Command abortButton\n",
- " Command helpButton\n",
- " Label,Text status{Label,Text}\n",
- " Form browserForm\n",
- " Command browserUpButton\n",
- " Command browserDownButton\n",
- " Paned browserPaned\n",
- " Viewport browserViewport0\n",
- " XfwfMultiList browserList0\n",
- " Viewport browserViewport1\n",
- " XfwfMultiList browserList1\n",
- " Viewport browserViewport2\n",
- " XfwfMultiList browserList2\n",
- " Form stringForm\n",
- " Label,Text search{Label,Text}\n",
- " Label,Text host{Label,Text}\n",
- " Label,Text location{Label,Text}\n",
- " Label,Text file{Label,Text}\n",
- " Label,Text size{Label,Text}\n",
- " Label,Text modes{Label,Text}\n",
- " Label,Text date{Label,Text}\n",
- "\n",
- " On color displays, there is an\n",
- " extra Form widget named \"color\"\n",
- " created as the only child of the\n",
- " toplevel shell, and all other widg-\n",
- " ets are children of it. This allows\n",
- " resources that are only applicable\n",
- " for color displays to use the pre-\n",
- " fix \"Xarchie.color\" while generally\n",
- " applicable resources should use the\n",
- " \"Xarchie*\" prefix. On gray-scale\n",
- " displays, the extra widget is named\n",
- " \"gray\". On monochrome displays, no\n",
- " extra widget is created.\n",
- "\n",
- " The XfwfMultiList widget is a\n",
- " modification of the standard Athena\n",
- " List widget that allows multiple\n",
- " items to be selected. It was writ-\n",
- " ten by Brian Totty\n",
- " (totty@flute.cs.uiuc.edu) and is\n",
- " distributed by the Free Widget\n",
- " Foundation (contact free-widgets-\n",
- " request@kazoo.cs.uiuc.edu). Xar-\n",
- " chie can be compiled to use stan-\n",
- " dard Athena List widgets instead.\n",
- " See the Imakefile or your local\n",
- " installer.\n",
- "\n",
- " To describe this widget hierarchy\n",
- " briefly, outerPaned controls the\n",
- " relative sizes of the three hor-\n",
- " izontal display areas while\n",
- " browserPaned allows the browser\n",
- " panels to be resized independently.\n",
- " Each browser panel consists of a\n",
- " Viewport to allow it to scroll and\n",
- " an XfwfMultiList (or List) to\n",
- " display the entries.\n",
- "\n",
- " The command buttons and status\n",
- " widgets are pretty straightforward.\n",
- " The fileButton pops up the\n",
- " fileMenu, whose items invoke the\n",
- " obvious actions (see below) when\n",
- " selected. The settingsButton pops\n",
- " up the settingsMenu, which uses\n",
- " some special translations and the\n",
- " settings-submenu() action to permit\n",
- " the use of pullright submenus. The\n",
- " queryButton pops up the queryMenu,\n",
- " the abortButton (when active)\n",
- " invokes the abort() action, and the\n",
- " helpButton invokes the help()\n",
- " action to pop up the Help panel.\n",
- "\n",
- " In the bottom pane, the searchText\n",
- " widget is used to enter the search\n",
- " term, and by default it binds\n",
- " Return to the query() action (see\n",
- " below) to send the query to Archie.\n",
- " The hostText binds Return to\n",
- " query-host() and the locationText\n",
- " binds Return to query-location().\n",
- " All the other Text items in the\n",
- " stringForm cannot be edited and are\n",
- " used to display information about\n",
- " the current browser selection.\n",
- "\n",
- NULL,
- " Settings Panel Widgets\n",
- " The \"Panel\" item on the Settings\n",
- " menu pops up the Settings Panel,\n",
- " which has the following widget\n",
- " hierarchy:\n",
- "\n",
- " TopLevelShell settingsShell\n",
- " Form settingsForm\n",
- " Command setDoneButton\n",
- " Command setApplyButton\n",
- " Command setDefaultButton\n",
- " MenuButton,AsciiText setHost{Button,Text}\n",
- " MenuButton,Label setSearch{Button,Label}\n",
- " MenuButton,Label setSort{Button,Label}\n",
- " Label,AsciiText setHostWeights{Label,Text}\n",
- " MenuButton,AsciiText setNice{Button,Text}\n",
- " Label,AsciiText setMaxHits{Label,Text}\n",
- " Label,AsciiText setTimeout{Label,Text}\n",
- " Label,AsciiText setRetries{Label,Text}\n",
- " Label,AsciiText setAutoScroll{Button,Label}\n",
- " Label,AsciiText ftpMailAddress{Label,Text}\n",
- " Label,AsciiText ftpLocalDir{Label,Text}\n",
- " MenuButton,Label ftpType{Button,Label}\n",
- " MenuButton,Label ftpPrompt{Button,Label}\n",
- " MenuButton,Label ftpTrace{Button,Label}\n",
- " MenuButton,Label ftpStrip{Button,Label}\n",
- "\n",
- " The setDoneButton invokes the\n",
- " settings-done() action, the setAp-\n",
- " plyButton invokes settings-apply(),\n",
- " and the setDefaultButton invokes\n",
- " settings-default(). The actions\n",
- " are described below. The MenuBut-\n",
- " ton widgets pop up menus described\n",
- " below under \"Menus\". The AsciiText\n",
- " widgets are used to display and\n",
- " edit the corresponding parameters.\n",
- "\n",
- NULL,
- " File Panel Widgets\n",
- " The \"Save\", \"Load\", and \"Write\"\n",
- " items on the File menu pop up the\n",
- " File panel, which has the following\n",
- " widget hierarchy:\n",
- "\n",
- " TopLevelShell fileShell\n",
- " Form fileForm\n",
- " Label fileLabel\n",
- " XfwfFileChooser fileChooser\n",
- " Label,AsciiText filename{Label,Text}\n",
- " MenuButton,Label fileWriteMode{Button,Label}\n",
- " Command fileOkButton, fileCancelButton\n",
- "\n",
- " The XfwfFileChooser widget provides\n",
- " a browser for selecting files.\n",
- " Xarchie can be compiled without the\n",
- " FileChooser, if necessary. See the\n",
- " Imakefile or your local installer.\n",
- "\n",
- " In any event, the fileLabel indi-\n",
- " cates what operation is being per-\n",
- " formed, the fileChooser, fileText,\n",
- " and buttons are used to select a\n",
- " file, and the fileWriteModeButton\n",
- " pops up the fileWriteModeMenu (only\n",
- " enabled for Write). Typing Return\n",
- " in the filenameText is the same as\n",
- " clicking the fileOkButton, and\n",
- " sending the WM_DELETE_WINDOW mes-\n",
- " sage (typically from the window\n",
- " manager) is the same as clicking on\n",
- " the fileCancelButton.\n",
- "\n",
- NULL,
- " View Window Widgets\n",
- " Whenever a file is retrieved by\n",
- " \"Open\", it is displayed in a window\n",
- " with the following widget hierar-\n",
- " chy:\n",
- "\n",
- " TopLevelShell viewShell\n",
- " Form viewForm\n",
- " Command viewDoneButton\n",
- " Command viewDownButton\n",
- " Command viewUpButton\n",
- " Command viewSaveButton\n",
- " Text viewText\n",
- "\n",
- " The title of the TopLevel shell is\n",
- " set to the basename of the file\n",
- " being viewed in the viewText. The\n",
- " operation of the buttons is all\n",
- " hard-coded. Clicking on the\n",
- " viewSaveButton results in the fol-\n",
- " lowing panel being displayed to\n",
- " select the file to save to:\n",
- "\n",
- " TopLevelShell viewSaveShell\n",
- " Form viewSaveForm\n",
- " Label viewSaveLabel\n",
- " AsciiText viewSaveLabelText\n",
- " XfwfFileChooser fileChooser\n",
- " Label viewSaveTextLabel\n",
- " AsciiText viewSaveText\n",
- " Command viewSaveOkButton, viewSaveCancelButton\n",
- "\n",
- " The viewSaveLabelText indicates the\n",
- " name of the temporary file from\n",
- " which the save should be made and\n",
- " connot be changed. The fileChooser\n",
- " and fileText allow you to select\n",
- " the file to save to.\n",
- "\n",
- NULL,
- " Help Panel Widgets\n",
- " The \"Help\" button in Xarchie's top\n",
- " pane pops up the Help panel, which\n",
- " has the following widget hierarchy:\n",
- "\n",
- " TopLevelShell helpShell\n",
- " Form helpForm\n",
- " Label helpLabel\n",
- " Viewport helpViewport\n",
- " List helpList\n",
- " Text helpText\n",
- " Command helpDoneButton\n",
- " Command helpPrevButton\n",
- " Command helpNextButton\n",
- " Command helpDownButton\n",
- " Command helpUpButton\n",
- "\n",
- " The helpLabel identifies the ver-\n",
- " sion of Xarchie. The helpList\n",
- " displays the help topics, and the\n",
- " corresponding text is displayed in\n",
- " the helpText. The helpDoneButton\n",
- " invokes the help-done() action, the\n",
- " helpPrevButton invokes the\n",
- " help-prev() action, and the help-\n",
- " NextButton invokes the help-next()\n",
- " action. The helpDownButton and hel-\n",
- " pUpButton invoke the help-down()\n",
- " and help-up() actions respectively.\n",
- "\n",
- NULL,
- " About Panel Widgets\n",
- " Selecting the \"About\" item on the\n",
- " File menu pops up the About panel,\n",
- " which has the following widget\n",
- " hierarchy:\n",
- "\n",
- " TopLevelShell aboutShell\n",
- " Form aboutForm\n",
- " Label aboutLabel{0,1,2,3,4,5}\n",
- " Command aboutDoneButton\n",
- "\n",
- " The labels are set to display the\n",
- " version of Xarchie and other con-\n",
- " tact information. There is little\n",
- " you can or should do with these\n",
- " widgets.\n",
- "\n",
- NULL,
- " Popup Widgets\n",
- " Finally, two types of popup windows\n",
- " can appear. An Alert box signals an\n",
- " error and blocks until clicked in;\n",
- " a Confirm box allows the user to\n",
- " make a Yes/No decision. These have\n",
- " the following widget hierarchies:\n",
- "\n",
- " TransientShell alertShell\n",
- " Dialog alertDialog\n",
- " Command okButton\n",
- "\n",
- " TransientShell confirmShell\n",
- " Dialog confirmDialog\n",
- " Command yesButton,noButton\n",
- "\n",
- " respectively. Several actions are\n",
- " defined (see below) for use in\n",
- " these popups.\n",
- "\n",
- NULL,
- " Menus\n",
- " The MenuButton widgets on both the\n",
- " main Xarchie display and on the\n",
- " various panels use standard Athena\n",
- " SimpleMenu widgets. The following\n",
- " naming conventions are used to\n",
- " allow resources to be specified: if\n",
- " the parent SimpleMenu widget is\n",
- " named \"fooMenu\", then the SmeBSBOb-\n",
- " jects making up the entries are\n",
- " named \"fooMenuItemn\", where n\n",
- " starts at 0 for the first item in\n",
- " the menu. The menus are all chil-\n",
- " dren of the main Xarchie shell,\n",
- " toplevel. For example, the File\n",
- " menu has widget hierarchy\n",
- "\n",
- " SimpleMenu fileMenu\n",
- " SmeBSB menuLabel\n",
- " SmeBSB fileMenuItem{0,1,2,3,4,5,6}\n",
- "\n",
- " There are three things worth men-\n",
- " tioning. First, as noted above, the\n",
- " settingsMenu uses special transla-\n",
- " tions and the settings-submenu()\n",
- " action to allow pullright submenus.\n",
- " Secondly, the submenus available\n",
- " from the Settings menu (searchMenu,\n",
- " sortMenu, niceMenu, and hostMenu)\n",
- " and those available on the Settings\n",
- " Panel (setSearchMenu, setSortMenu,\n",
- " setNiceMenu, and setHostMenu) have\n",
- " the same labels but are different\n",
- " widgets with different effects.\n",
- " The Settings Panel menus (the\n",
- " second group) only update the Set-\n",
- " tings panel, requiring the Done\n",
- " button to be clicked to take\n",
- " effect. The Settings menu submenus\n",
- " (the first group) take effect\n",
- " immediately, and also indicate the\n",
- " current item in the left margin of\n",
- " the menu.\n",
- "\n",
- " Finally, the number, order, and\n",
- " effect of all menus are hardcoded,\n",
- " although the labels can, of course,\n",
- " be changed in the resource file.\n",
- " However, changing the labels will\n",
- " NOT change the effect of selecting\n",
- " the item, with the exception of the\n",
- " hostMenu and setHostMenu. These\n",
- " menus use the numHosts non-widget\n",
- " resource to indicate how many items\n",
- " are on the menu. Thus you can add\n",
- " hosts to the menu by adding label\n",
- " resources for the new\n",
- " hostMenuItem's and increasing the\n",
- " value of Xarchie.numHosts. Xarchie\n",
- " parses the labels to determine the\n",
- " hostname: anything up to whitespace\n",
- " constitutes the hostname (and\n",
- " optional port number), anything\n",
- " after is simply commentary.\n",
- "\n",
- NULL,
- " Translation Actions\n",
- " The following action procedures are\n",
- " registered for Xarchie and can be\n",
- " bound to widget events using the\n",
- " translations resource (see the Xt\n",
- " manual, Appendix C). The actions of\n",
- " the browser widgets are hard-coded\n",
- " since they are so essential to\n",
- " correct behaviour. They can how-\n",
- " ever be bound to different events\n",
- " using the notify() action (that is,\n",
- " you could notify on some other\n",
- " event than mouse clicks, if you\n",
- " know what you're doing).\n",
- "\n",
- NULL,
- " Main panel actions\n",
- " quit()\n",
- " Exit Xarchie. By default this\n",
- " is invoked by selecting \"Quit\"\n",
- " from the File menu or by typ-\n",
- " ing \"Meta-Q\" in any non-Text\n",
- " widget.\n",
- "\n",
- " query()\n",
- " Send the current contents of\n",
- " the \"Search Term\" text widget\n",
- " (searchText) to Archie. By\n",
- " default this is performed by\n",
- " hitting Return in searchText\n",
- " or by selecting \"Query Item\"\n",
- " from the Query menu.\n",
- "\n",
- " query-host()\n",
- " Fills the browser with the\n",
- " contents of the root directory\n",
- " of the host given by the con-\n",
- " tents of the \"Host\" text\n",
- " widget (hostText). By default\n",
- " this is performed by hitting\n",
- " Return in hostText or by by\n",
- " selecting \"Query Host\" from\n",
- " the Query menu.\n",
- "\n",
- " query-location()\n",
- " Fills the browser with the\n",
- " contents of the directory\n",
- " given by the \"Location\" text\n",
- " widget (locationText) and the\n",
- " host given by the contents of\n",
- " the \"Host\" text widget (host-\n",
- " Text). By default this is\n",
- " performed by hitting Return in\n",
- " locationText or by selecting\n",
- " \"Query Location\" from the\n",
- " Query menu.\n",
- "\n",
- " abort()\n",
- " Aborts the current query at\n",
- " the soonest possible time. Has\n",
- " no effect is a query is not\n",
- " currently being processed. By\n",
- " default, this invoked by\n",
- " clicking on the Abort button\n",
- " when it is active.\n",
- "\n",
- " query-or-abort()\n",
- " Invokes either query() or\n",
- " abort(), depending on whether\n",
- " a query is in progress.\n",
- "\n",
- " about()\n",
- " Pops up the About panel.\n",
- "\n",
- " ftp-get()\n",
- " Begin retrieval of the\n",
- " currently-selected files. By\n",
- " default this is invoked by\n",
- " selecting \"Get\" from the\n",
- " \"File\" menu, or by typing\n",
- " \"Meta-G\" in any non-Text\n",
- " widget.\n",
- "\n",
- NULL,
- " Browser actions\n",
- " Items are selected in the browser\n",
- " using the Left mouse button, as\n",
- " usual. Clicking with Shift does\n",
- " not clear other selections, allow-\n",
- " ing multiple selections. This is\n",
- " implemented using the XfwfMultiList\n",
- " translation actions Notify(),\n",
- " Set(), Toggle(), and OpenMany(),\n",
- " unless your version of Xarchie was\n",
- " compiled to not use the XfwfMultiL-\n",
- " ist widget (see the Imakefile or\n",
- " your local installer). Modify at\n",
- " your own risk!\n",
- "\n",
- " The following actions are used for\n",
- " other browser operations.\n",
- "\n",
- " browser-up()\n",
- " Shifts the browser left (i.e.,\n",
- " up the file hierarchy) if pos-\n",
- " sible. By default this is\n",
- " invoked by clicking on the\n",
- " \"<<<\" button (browserUpBut-\n",
- " ton), or by clicking the Mid-\n",
- " dle mouse button in the\n",
- " browser, or by hitting the\n",
- " \"Left\" key (often the left\n",
- " arrow on the cursor keypad).\n",
- "\n",
- " browser-down()\n",
- " Shifts the browser right (ie.,\n",
- " down the file hierarchy) if\n",
- " possible. By default this is\n",
- " invoked by clicking on the\n",
- " \">>>\" button (browserDownBut-\n",
- " ton), or by clicking the Right\n",
- " mouse button in the browser,\n",
- " or by hitting the \"Right\" key\n",
- " (often the right arrow on the\n",
- " cursor keypad).\n",
- "\n",
- " browser-top()\n",
- " Shifts the browser to its\n",
- " leftmost position (i.e., the\n",
- " top of the file hierarchy).\n",
- " By default this is invoked by\n",
- " clicking with Shift on the\n",
- " \"<<<\" button (browserUpButton)\n",
- " or by hitting the \"Home\" key.\n",
- " browser-open-directories()\n",
- " Expands selected directories.\n",
- " If the browser was expanded\n",
- " uniquely and successfully, it\n",
- " will be shifted right to\n",
- " display the new information.\n",
- " By default, this is invoked by\n",
- " double-clicking in the\n",
- " browser.\n",
- "\n",
- " browser-open-files()\n",
- " Retrieves selected files by\n",
- " FTP into a temporary file and\n",
- " displays them using View win-\n",
- " dows.\n",
- "\n",
- " browser-open-all()\n",
- " Opens the selected items by\n",
- " expanding selected directories\n",
- " and retrieving selected files\n",
- " for viewing. By default, this\n",
- " is invoked by selecting \"Open\"\n",
- " from the File menu, or by typ-\n",
- " ing \"Meta-O\" in any non-text\n",
- " widget.\n",
- "\n",
- NULL,
- " Settings actions\n",
- " The following actions control the\n",
- " Settings Panel and can be used to\n",
- " change some settings without using\n",
- " the panel.\n",
- "\n",
- " popup-settings()\n",
- " Pops up the Settings Panel,\n",
- " and resets its values to those\n",
- " currently in effect. Raises\n",
- " the Settings Panel if it is\n",
- " already popped up. By default\n",
- " this is performed by selecting\n",
- " \"Other\" on the Settings menu.\n",
- "\n",
- " settings-apply()\n",
- " Sets the current settings from\n",
- " the values on the Settings\n",
- " Panel. By default this is\n",
- " performed by clicking the\n",
- " \"Apply\" button on the Settings\n",
- " Panel.\n",
- "\n",
- " settings-default()\n",
- " Resets the values on the Set-\n",
- " tings Panel to the default\n",
- " settings, but does not affect\n",
- " the current settings until the\n",
- " settings-apply() action is\n",
- " invoked. By default, this is\n",
- " invoked by clicking on the\n",
- " \"Default\" button on the Set-\n",
- " tings Panel.\n",
- "\n",
- " settings-done()\n",
- " Pops down the Settings Panel.\n",
- " If there are changes that have\n",
- " not be applied, then a popup\n",
- " confirm box allows the user to\n",
- " discard the settings or go\n",
- " back and apply them. By\n",
- " default, this is invoked by\n",
- " clicking on the \"Done\" button\n",
- " on the Settings Panel.\n",
- "\n",
- " set-host(hostname)\n",
- " This action sets the Archie\n",
- " host as indicated on the Set-\n",
- " tings Panel, but does not\n",
- " affect the current settings\n",
- " until the settings-apply()\n",
- " action is invoked.\n",
- "\n",
- " set-host-now(hostname)\n",
- " Sets the Archie host immedi-\n",
- " ately without waiting for\n",
- " settings-apply().\n",
- "\n",
- " set-search-type(type)\n",
- " This action sets the sear-\n",
- " chType as indicated on the\n",
- " Settings Panel, but does not\n",
- " affect the current settings\n",
- " until the settings-apply()\n",
- " action is invoked.\n",
- "\n",
- " set-search-type-now(type)\n",
- " Sets the searchType immedi-\n",
- " ately without waiting for\n",
- " settings-apply().\n",
- "\n",
- " set-sort-type(type)\n",
- " This action sets the sortType\n",
- " as indicated on the Settings\n",
- " Panel, but does not affect the\n",
- " current settings until the\n",
- " settings-apply() action is\n",
- " invoked.\n",
- "\n",
- " set-sort-type-now(type)\n",
- " Sets the sortType immediately\n",
- " without waiting for\n",
- " settings-apply().\n",
- "\n",
- " set-nice-level(level)\n",
- " This action sets the niceLevel\n",
- " as indicated on the Settings\n",
- " Panel, but does not affect the\n",
- " current settings until the\n",
- " settings-apply() action is\n",
- " invoked.\n",
- "\n",
- " set-nice-level-now(level)\n",
- " Sets the niceLevel immediately\n",
- " without waiting for\n",
- " settings-apply().\n",
- "\n",
- " settings-submenu()\n",
- " This action procedure is docu-\n",
- " mented here only for complete-\n",
- " ness. It should only be used\n",
- " for BtnMotion events in the\n",
- " settingsMenu widget. It\n",
- " invokes the appropriate\n",
- " pullright menu for the Set-\n",
- " tings menu. Believe me, you\n",
- " don't want to deal with this.\n",
- "\n",
- NULL,
- " File actions\n",
- " The operation of the File panel is\n",
- " hard-coded. The following actions\n",
- " are used to pop it up however:\n",
- "\n",
- " file-save()\n",
- " Pops up the File panel, and\n",
- " resets its values in prepara-\n",
- " tion for saving the database.\n",
- " By default this is invoked by\n",
- " selecting \"Save\" from the\n",
- " \"File\" menu or by typing\n",
- " \"Meta-S\" in any non-Text\n",
- " widget.\n",
- "\n",
- " file-load()\n",
- " Pops up the File panel, and\n",
- " resets its values in prepara-\n",
- " tion for reloading the data-\n",
- " base. By default this is\n",
- " invoked by selecting \"Load\"\n",
- " from the \"File\" menu or by\n",
- " typing \"Meta-L\" in any non-\n",
- " Text widget.\n",
- "\n",
- " file-write()\n",
- " Pops up the File panel, and\n",
- " resets its values in prepara-\n",
- " tion for writing the database\n",
- " in a human-readable form. By\n",
- " default this is invoked by\n",
- " selecting \"Write\" from the\n",
- " \"File\" menu or by typing\n",
- " \"Meta-W\" in any non-Text\n",
- " widget.\n",
- "\n",
- NULL,
- " Help actions\n",
- " help()\n",
- " Pops up the Help panel.\n",
- "\n",
- " help-done()\n",
- " Dismisses the Help panel.\n",
- "\n",
- " help-prev()\n",
- " help-next()\n",
- " Selects the previous or next\n",
- " help topic, respectively.\n",
- "\n",
- " help-up()\n",
- " help-down()\n",
- " Scrolls the text of the\n",
- " current help topic up or down\n",
- " one page, respectively. This\n",
- " is an alternative to using the\n",
- " Text widget's scrollbar.\n",
- "\n",
- NULL,
- " Miscellaneous actions\n",
- " ftp-trace-done()\n",
- " Dismisses the FTP Trace win-\n",
- " dow. By default, this is\n",
- " invoked by clicking on the\n",
- " \"Dismiss\" button in the FTP\n",
- " Trace window.\n",
- "\n",
- NULL,
- " Environment Variables\n",
- " The following environment variables\n",
- " are used by Xarchie if they are\n",
- " defined:\n",
- "\n",
- " TMPDIR - Directory for \"Open\"-ed\n",
- " files\n",
- " XAPPLRESDIR - Directory containing\n",
- " Xarchie resource file\n",
- " USER - Username for FTP mail\n",
- " address\n",
- " HOSTNAME - Hostname for FTP mail\n",
- " address\n",
- "\n",
- NULL,
- " Files\n",
- " Xarchie - default Xarchie\n",
- " resource file\n",
- "\n",
- NULL,
- " Diagnostics\n",
- " Xarchie indicates X errors using\n",
- " the ever-popular default X error\n",
- " handler that prints a message and\n",
- " dies, possibly leaving a large core\n",
- " dump somewhere.\n",
- "\n",
- " Errors due to incorrect resource\n",
- " specifications cause an error mes-\n",
- " sage on stderr, but do not kill\n",
- " Xarchie (usually).\n",
- "\n",
- " Errors due to incorrect user com-\n",
- " mands or problems with the connec-\n",
- " tion to Archie result in a popup\n",
- " alert box being displayed. Clicking\n",
- " on the indicated button in the\n",
- " alert box will make it go away and\n",
- " allow you to continue.\n",
- "\n",
- " An incorrect value for the FTP mail\n",
- " address (as determined from the\n",
- " system information or from the USER\n",
- " and HOSTNAME variables) can result\n",
- " in access being denied by some\n",
- " anonymous FTP servers. See the\n",
- " description of the ftpMailAddress\n",
- " non-widget resource if your system\n",
- " has problems with this.\n",
- "\n",
- " If you continually get \"Can't\n",
- " resolve hostname\" errors when you\n",
- " try to query, then Xarchie was not\n",
- " built properly. Contact your local\n",
- " maintainer and suggest that they\n",
- " read the PROBLEMS file concerning\n",
- " the \"resolv\" library.\n",
- "\n",
- " If your queries always time out,\n",
- " then there are two possibilities.\n",
- " First, and by far the most likely,\n",
- " is that the server is simply busy.\n",
- " Try again later. The other possi-\n",
- " bility is that UDP traffic is dis-\n",
- " abled on your system. You should\n",
- " contact your local maintainer and\n",
- " ask them to read the PROBLEMS files\n",
- " concerning UDP traffic.\n",
- "\n",
- NULL,
- " Known Bugs\n",
- " Crashes have been observed when the\n",
- " Help text is scrolled. There is no\n",
- " fix, but see the PROBLEMS file for\n",
- " some discussion.\n",
- "\n",
- " The list of files in the\n",
- " FileChooser widgets don't seem to\n",
- " get displayed properly all the\n",
- " time. That is, sometimes items seem\n",
- " to be drawn on top of each other.\n",
- " Refreshing the window (eg.,\n",
- " iconify/deiconify or scrolling\n",
- " up/down) clears it up. This seems\n",
- " like an Xaw bug, but is difficult\n",
- " to repeat in isolation.\n",
- "\n",
- " Your mileage may vary regarding the\n",
- " Xarchie icon changing to reflect\n",
- " search and transfer status. Your\n",
- " window manager may not support\n",
- " application-specified icons, or may\n",
- " not support them changing dynami-\n",
- " cally. See the PROBLEMS file for\n",
- " some discussion.\n",
- "\n",
- " It is not currently possible to\n",
- " abort during nameserver lookup.\n",
- " Perhaps some day I'll get motivated\n",
- " to add asynchronous DNS code.\n",
- "\n",
- " The browser has a hard-coded max-\n",
- " imum depth, beyond which you cannot\n",
- " expand directories. I don't think\n",
- " it will be a major problem however.\n",
- "\n",
- NULL,
- " Reporting Bugs\n",
- " If you have any questions about\n",
- " Archie itself, write to archie-\n",
- " l@cs.mcgill.ca. If you have ques-\n",
- " tions about Prospero, write to\n",
- " info-prospero@isi.edu.\n",
- "\n",
- " If you have a problem, please read\n",
- " the \"Known Bugs\" section first,\n",
- " then contact your local maintainer\n",
- " and/or refer to the PROBLEMS and\n",
- " INSTALL files in the Xarchie dis-\n",
- " tribution.\n",
- "\n",
- " When reporting bugs, problems,\n",
- " suggestions or contributions,\n",
- " please be sure to send them to the\n",
- " right place. Issues dealing with\n",
- " the X interface should be sent to\n",
- " George Ferguson\n",
- " (ferguson@cs.rochester.edu). Please\n",
- " be sure to include sufficient\n",
- " details, including hardware, OS,\n",
- " compiler, version of X, and the\n",
- " like. No amount of detail is too\n",
- " much.\n",
- "\n",
- " Brendan Kehoe (brendan@cygnus.com)\n",
- " is in charge of the archie clients\n",
- " and most of the network stuff\n",
- " underlying Xarchie, Cliff Neuman\n",
- " (bcn@isi.edu) is in charge of Pros-\n",
- " pero, and Alan Emtage and Peter\n",
- " Deutsch ({bajan,peterd}@bunyip.com)\n",
- " are in charge of the Archie project\n",
- " itself. Individual archie servers,\n",
- " however, are maintained locally at\n",
- " each server site.\n",
- "\n",
- NULL,
- "AUTHOR\n",
- " George Ferguson, University of\n",
- " Rochester,\n",
- " (ferguson@cs.rochester.edu)\n",
- "\n",
- " Original standalone archie program\n",
- " by Brendan Kehoe,\n",
- " (brendan@cs.widener.edu).\n",
- "\n",
- " Original Prospero archie program by\n",
- " Clifford Neuman,\n",
- " (bcn@isi.edu).\n",
- "\n",
- " The archie service was conceived of\n",
- " and implemented by Alan Emtage\n",
- " (bajan@bunyip.com), Peter Deutsch\n",
- " (peterd@bunyip.com) and Bill Heelan\n",
- " (wheelan@bunyip.com).\n",
- "\n",
- SHAR_EOF
- echo 'File xarchie-2.0.6/help-text1.h is complete' &&
- chmod 0644 xarchie-2.0.6/help-text1.h ||
- echo 'restore of xarchie-2.0.6/help-text1.h failed'
- Wc_c="`wc -c < 'xarchie-2.0.6/help-text1.h'`"
- test 87771 -eq "$Wc_c" ||
- echo 'xarchie-2.0.6/help-text1.h: original size 87771, current size' "$Wc_c"
- rm -f _shar_wnt_.tmp
- fi
- # ============= xarchie-2.0.6/help-text1.sh ==============
- if test -f 'xarchie-2.0.6/help-text1.sh' -a X"$1" != X"-c"; then
- echo 'x - skipping xarchie-2.0.6/help-text1.sh (File already exists)'
- rm -f _shar_wnt_.tmp
- else
- > _shar_wnt_.tmp
- echo 'x - extracting xarchie-2.0.6/help-text1.sh (Text)'
- sed 's/^X//' << 'SHAR_EOF' > 'xarchie-2.0.6/help-text1.sh' &&
- #!/bin/sh
- #
- # help-text1.sh : Convert xarchie manpage into Help strings.
- #
- # To avoid long strings, the text is broken into one C string
- # per line of formatted text.
- #
- # George Ferguson, ferguson@cs.rochester.edu, 23 Apr 1993.
- #
- # The commands below perform the following steps:
- # - Indicate Help formatting
- # - Send manpage...
- # - ...through nroff
- # - Remove underlining (sed has no nice way of specifying backspace)
- # - Collapse blank lines
- # - Escape "real" quotes then add string quotes
- # - Put a NULL entry after each topic
- X
- echo '.nr XX 1' |\
- cat - xarchie.man |\
- nroff -man |\
- ul -t dumb |\
- uniq |\
- sed -e 's/"/\\"/g' -e 's/^\(.*\)$/"\1\\n",/' |\
- sed 's/^\("..[^ "]\)/NULL,\
- \1/'
- SHAR_EOF
- chmod 0755 xarchie-2.0.6/help-text1.sh ||
- echo 'restore of xarchie-2.0.6/help-text1.sh failed'
- Wc_c="`wc -c < 'xarchie-2.0.6/help-text1.sh'`"
- test 688 -eq "$Wc_c" ||
- echo 'xarchie-2.0.6/help-text1.sh: original size 688, current size' "$Wc_c"
- rm -f _shar_wnt_.tmp
- fi
- # ============= xarchie-2.0.6/help-text2.h ==============
- if test -f 'xarchie-2.0.6/help-text2.h' -a X"$1" != X"-c"; then
- echo 'x - skipping xarchie-2.0.6/help-text2.h (File already exists)'
- rm -f _shar_wnt_.tmp
- else
- > _shar_wnt_.tmp
- echo 'x - extracting xarchie-2.0.6/help-text2.h (Text)'
- sed 's/^X//' << 'SHAR_EOF' > 'xarchie-2.0.6/help-text2.h' &&
- {
- 2
- ,"NAME"},{
- 7
- ,"SYNOPSIS"},{
- 20
- ,"DESCRIPTION"},{
- 55
- ,"USER'S GUIDE"},{
- 63
- ," What is Archie?"},{
- 100
- ," What is Xarchie?"},{
- 143
- ," The Xarchie Display"},{
- 238
- ," Basic Xarchie Usage"},{
- 248
- ," Querying"},{
- 292
- ," Aborting"},{
- 310
- ," Browsing"},{
- 387
- ," Expanding the Browser"},{
- 420
- ," Viewing Files"},{
- 466
- ," Retrieving Files"},{
- 509
- ," Saving, Loading, and Writing"},{
- 572
- ," Quitting Xarchie"},{
- 578
- ," Advanced Xarchie Usage"},{
- 588
- ," The Settings Panel"},{
- 627
- ," Archie host"},{
- 660
- ," Search mode"},{
- 688
- ," Sort mode"},{
- 758
- ," Nice level"},{
- 790
- ," Other Query Settings"},{
- 822
- ," FTP settings"},{
- 893
- ," Querying Hosts and Locations"},{
- 940
- ,"REFERENCE MANUAL"},{
- 952
- ," Command-line Options"},{
- 1093
- ," Non-widget Resources"},{
- 1112
- ," Query Resources"},{
- 1267
- ," Browser Resources"},{
- 1301
- ," FTP Resources"},{
- 1366
- ," Database Writing Resources"},{
- 1379
- ," Special Font Resources"},{
- 1412
- ," Other Resources"},{
- 1454
- ," Widget Hierarchies"},{
- 1460
- ," Main Xarchie Widgets"},{
- 1562
- ," Settings Panel Widgets"},{
- 1601
- ," File Panel Widgets"},{
- 1636
- ," View Window Widgets"},{
- 1676
- ," Help Panel Widgets"},{
- 1707
- ," About Panel Widgets"},{
- 1725
- ," Popup Widgets"},{
- 1746
- ," Menus"},{
- 1812
- ," Translation Actions"},{
- 1828
- ," Main panel actions"},{
- 1896
- ," Browser actions"},{
- 1973
- ," Settings actions"},{
- 2082
- ," File actions"},{
- 2119
- ," Help actions"},{
- 2140
- ," Miscellaneous actions"},{
- 2149
- ," Environment Variables"},{
- 2164
- ," Files"},{
- 2169
- ," Diagnostics"},{
- 2219
- ," Known Bugs"},{
- 2256
- ," Reporting Bugs"},{
- 2296
- ,"AUTHOR"},{
- 000,NULL}
- SHAR_EOF
- chmod 0644 xarchie-2.0.6/help-text2.h ||
- echo 'restore of xarchie-2.0.6/help-text2.h failed'
- Wc_c="`wc -c < 'xarchie-2.0.6/help-text2.h'`"
- test 1595 -eq "$Wc_c" ||
- echo 'xarchie-2.0.6/help-text2.h: original size 1595, current size' "$Wc_c"
- rm -f _shar_wnt_.tmp
- fi
- # ============= xarchie-2.0.6/help-text2.sh ==============
- if test -f 'xarchie-2.0.6/help-text2.sh' -a X"$1" != X"-c"; then
- echo 'x - skipping xarchie-2.0.6/help-text2.sh (File already exists)'
- rm -f _shar_wnt_.tmp
- else
- > _shar_wnt_.tmp
- echo 'x - extracting xarchie-2.0.6/help-text2.sh (Text)'
- sed 's/^X//' << 'SHAR_EOF' > 'xarchie-2.0.6/help-text2.sh' &&
- #!/bin/sh
- #
- # help-text2.sh : Extract the headings by taking the non-indented initial
- # parts of the help text strings. The output is a set of initializers
- # for a { lineno,string } structure. Since we can only use the
- # sed = command to print the line number, and it prints it on a
- # line by itself, the output is kinda gross. Sorry.
- #
- # George Ferguson, ferguson@cs.rochester.edu, 23 Apr 1993.
- #
- X
- echo '{'
- sed -n -e '/^NULL,$/=' -e 's/^\("..[^ "].*\)\\n",$/,\1"},{/p'
- echo '000,NULL}'
- SHAR_EOF
- chmod 0755 xarchie-2.0.6/help-text2.sh ||
- echo 'restore of xarchie-2.0.6/help-text2.sh failed'
- Wc_c="`wc -c < 'xarchie-2.0.6/help-text2.sh'`"
- test 487 -eq "$Wc_c" ||
- echo 'xarchie-2.0.6/help-text2.sh: original size 487, current size' "$Wc_c"
- rm -f _shar_wnt_.tmp
- fi
- # ============= xarchie-2.0.6/help.c ==============
- if test -f 'xarchie-2.0.6/help.c' -a X"$1" != X"-c"; then
- echo 'x - skipping xarchie-2.0.6/help.c (File already exists)'
- rm -f _shar_wnt_.tmp
- else
- > _shar_wnt_.tmp
- echo 'x - extracting xarchie-2.0.6/help.c (Text)'
- sed 's/^X//' << 'SHAR_EOF' > 'xarchie-2.0.6/help.c' &&
- /*
- X * help.c : The Help browser
- X *
- X * George Ferguson, ferguson@cs.rochester.edu, 23 Apr 1993.
- X * 13 May 1993: Change the way the version number is printed.
- X */
- X
- #include <stdio.h>
- #include <X11/Intrinsic.h>
- #include <X11/Shell.h>
- #include <X11/StringDefs.h>
- #include <X11/Xaw/Form.h>
- #include <X11/Xaw/Label.h>
- #include <X11/Xaw/Viewport.h>
- #include <X11/Xaw/List.h>
- #include <X11/Xaw/AsciiText.h>
- #include <X11/Xaw/Command.h>
- #include <X11/Xaw/Cardinals.h>
- #include "xarchie.h"
- #include "xutil.h"
- #include "patchlevel.h"
- X
- /*
- X * Functions defined here
- X */
- void initHelpActions(),initHelpPanel();
- void setHelpShellState();
- X
- static void popupHelpPanel();
- static void initHelpWidgets();
- static void helpCallback();
- static void helpDoneAction(),helpPrevAction(),helpNextAction();
- static void helpDownAction(),helpUpAction();
- X
- /*
- X * Data defined here
- X */
- static Widget helpShell;
- static Widget helpLabel,helpViewport,helpList,helpText;
- static Widget helpScrollbar;
- static Widget helpPrevButton,helpNextButton;
- X
- static Boolean isPoppedUp;
- static int numHelpTopics;
- X
- static XtActionsRec actionTable[] = {
- X { "help", popupHelpPanel },
- X { "help-done", helpDoneAction },
- X { "help-prev", helpPrevAction },
- X { "help-next", helpNextAction },
- X { "help-down", helpDownAction },
- X { "help-up", helpUpAction },
- };
- X
- static char *helpStrings[] = {
- #include "help-text1.h"
- X NULL
- };
- X
- static struct {
- X int lineno;
- X char *string;
- } helpTopicInfo[] = {
- #include "help-text2.h"
- };
- X
- static char **helpTopics;
- X
- /* - - - - - - - - */
- X
- void
- initHelpActions()
- {
- X XtAppAddActions(appContext,actionTable,XtNumber(actionTable));
- }
- X
- void
- initHelpPanel()
- {
- X int i;
- X
- X /* Last entry in help-text2.h is bogus */
- X numHelpTopics = XtNumber(helpTopicInfo)-1;
- X /* Make an array with just the strings for the List widget */
- X helpTopics = (char **)XtCalloc(numHelpTopics,sizeof(char*));
- X for (i=0; i < numHelpTopics; i++)
- X *(helpTopics+i) = helpTopicInfo[i].string;
- }
- X
- static void
- popupHelpPanel()
- {
- X if (isPoppedUp) {
- X XRaiseWindow(display,XtWindow(helpShell));
- X return;
- X }
- X if (helpShell == NULL) {
- X initHelpWidgets();
- X }
- X isPoppedUp = True;
- X XtPopup(helpShell,XtGrabNone);
- }
- X
- static void
- initHelpWidgets()
- {
- X Widget form;
- X char buf[64];
- X
- X helpShell = XtCreatePopupShell("helpShell",topLevelShellWidgetClass,
- X toplevel,NULL,0);
- X form = XtCreateManagedWidget("helpForm",formWidgetClass,
- X helpShell,NULL,0);
- X helpLabel = XtCreateManagedWidget("helpLabel",labelWidgetClass,
- X form,NULL,0);
- #ifdef BETA
- X sprintf(buf,"This is help for Xarchie %.1fb%d",VERSION,PATCHLEVEL);
- #else
- X sprintf(buf,"This is help for Xarchie %.1f.%d",VERSION,PATCHLEVEL);
- #endif
- X setWidgetLabel(helpLabel,buf);
- X helpViewport = XtCreateManagedWidget("helpViewport",viewportWidgetClass,
- X form,NULL,0);
- X helpList = XtCreateManagedWidget("helpList",listWidgetClass,
- X helpViewport,NULL,0);
- X XawListChange(helpList,helpTopics,numHelpTopics,0,True);
- X XtAddCallback(helpList,XtNcallback,helpCallback,NULL);
- X helpText = XtCreateManagedWidget("helpText",asciiTextWidgetClass,
- X form,NULL,0);
- X (void)XtCreateManagedWidget("helpDoneButton",commandWidgetClass,
- X form,NULL,0);
- X helpPrevButton = XtCreateManagedWidget("helpPrevButton",commandWidgetClass,
- X form,NULL,0);
- X XtSetSensitive(helpPrevButton,False);
- X helpNextButton = XtCreateManagedWidget("helpNextButton",commandWidgetClass,
- X form,NULL,0);
- X XtSetSensitive(helpNextButton,False);
- X (void)XtCreateManagedWidget("helpDownButton",commandWidgetClass,
- X form,NULL,0);
- X (void)XtCreateManagedWidget("helpUpButton",commandWidgetClass,
- X form,NULL,0);
- X XtRealizeWidget(helpShell);
- X (void)XSetWMProtocols(XtDisplay(helpShell),XtWindow(helpShell),
- X &WM_DELETE_WINDOW,1);
- X helpScrollbar = XtNameToWidget(helpViewport,"vertical");
- }
- X
- void
- setHelpShellState(state)
- int state;
- {
- X if (!isPoppedUp)
- X return;
- X switch (state) {
- X case NormalState:
- X XtMapWidget(helpShell);
- X break;
- X case IconicState:
- X XtUnmapWidget(helpShell);
- X break;
- X }
- }
- X
- /* - - - - - - - - */
- /* Callback procedure */
- X
- /*ARGSUSED*/
- static void
- helpCallback(w,client_data,call_data)
- Widget w;
- XXtPointer client_data; /* not used */
- XXtPointer call_data; /* returnStruct */
- {
- X int topic = ((XawListReturnStruct*)call_data)->list_index;
- X XawTextPosition pos;
- X XawTextBlock block;
- X Arg args[2];
- X int i;
- X
- X block.firstPos = 0;
- X block.format = FMT8BIT;
- X /* Reset helpText */
- X XtSetArg(args[0],XtNstring,"");
- X XtSetArg(args[1],XtNeditType,XawtextEdit);
- X XtSetValues(helpText,args,2);
- X pos = (XawTextPosition)0;
- X XawTextDisableRedisplay(helpText);
- X for (i=helpTopicInfo[topic].lineno; helpStrings[i] != NULL; i++) {
- X /* Add helpStrings[i] to helpText */
- X block.ptr = helpStrings[i];
- X block.length = strlen(helpStrings[i]);
- X XawTextReplace(helpText,pos,pos,&block);
- X pos += block.length;
- X }
- X XawTextEnableRedisplay(helpText);
- X XtSetArg(args[0],XtNeditType,XawtextRead);
- X XtSetValues(helpText,args,1);
- X XtSetSensitive(helpPrevButton,(topic != 0));
- X XtSetSensitive(helpNextButton,(topic != numHelpTopics-1));
- }
- X
- X
- /* - - - - - - - - */
- /* Action procedures */
- X
- #define ACTION_PROC(NAME) void NAME(w,event,params,num_params) \
- X Widget w; \
- X XEvent *event; \
- X String *params; \
- X Cardinal *num_params;
- X
- /*ARGSUSED*/
- static
- ACTION_PROC(helpDoneAction)
- {
- X XtPopdown(helpShell);
- X isPoppedUp = False;
- }
- X
- /*ARGSUSED*/
- static
- ACTION_PROC(helpPrevAction)
- {
- X XawListReturnStruct *ret = XawListShowCurrent(helpList);
- X float percent;
- X
- X if (ret->list_index != XAW_LIST_NONE && ret->list_index != 0) {
- X ret->list_index -= 1;
- X /* Highlight the item */
- X XawListHighlight(helpList,ret->list_index);
- X /* Get the text displayed */
- X helpCallback(helpList,NULL,(XtPointer)ret);
- X /* Adjust the scrollbar so it's visible */
- X percent = (float)(ret->list_index-1) / (float)numHelpTopics;
- X XtCallCallbacks(helpScrollbar,"jumpProc",(XtPointer)&percent);
- X }
- }
- X
- /*ARGSUSED*/
- static
- ACTION_PROC(helpNextAction)
- {
- X XawListReturnStruct *ret = XawListShowCurrent(helpList);
- X float percent;
- X
- X if (ret->list_index != XAW_LIST_NONE &&
- X ret->list_index != numHelpTopics-1) {
- X ret->list_index += 1;
- X XawListHighlight(helpList,ret->list_index);
- X helpCallback(helpList,NULL,(XtPointer)ret);
- X percent = (float)(ret->list_index-1) / (float)numHelpTopics;
- X XtCallCallbacks(helpScrollbar,"jumpProc",(XtPointer)&percent);
- X }
- }
- X
- /*ARGSUSED*/
- static
- ACTION_PROC(helpDownAction)
- {
- X XtCallActionProc(helpText,"next-page",event,NULL,0);
- }
- X
- /*ARGSUSED*/
- static
- ACTION_PROC(helpUpAction)
- {
- X XtCallActionProc(helpText,"previous-page",event,NULL,0);
- }
- X
- SHAR_EOF
- chmod 0644 xarchie-2.0.6/help.c ||
- echo 'restore of xarchie-2.0.6/help.c failed'
- Wc_c="`wc -c < 'xarchie-2.0.6/help.c'`"
- test 6746 -eq "$Wc_c" ||
- echo 'xarchie-2.0.6/help.c: original size 6746, current size' "$Wc_c"
- rm -f _shar_wnt_.tmp
- fi
- # ============= xarchie-2.0.6/help.h ==============
- if test -f 'xarchie-2.0.6/help.h' -a X"$1" != X"-c"; then
- echo 'x - skipping xarchie-2.0.6/help.h (File already exists)'
- rm -f _shar_wnt_.tmp
- else
- > _shar_wnt_.tmp
- echo 'x - extracting xarchie-2.0.6/help.h (Text)'
- sed 's/^X//' << 'SHAR_EOF' > 'xarchie-2.0.6/help.h' &&
- /*
- X * help.h : Defs for the Help browser
- X *
- X * George Ferguson, ferguson@cs.rochester.edu, 23 Apr 1993.
- X */
- X
- extern void initHelpActions();
- extern void initHelpPanel();
- extern void setHelpShellState();
- SHAR_EOF
- chmod 0644 xarchie-2.0.6/help.h ||
- echo 'restore of xarchie-2.0.6/help.h failed'
- Wc_c="`wc -c < 'xarchie-2.0.6/help.h'`"
- test 202 -eq "$Wc_c" ||
- echo 'xarchie-2.0.6/help.h: original size 202, current size' "$Wc_c"
- rm -f _shar_wnt_.tmp
- fi
- # ============= xarchie-2.0.6/hostname.c ==============
- if test -f 'xarchie-2.0.6/hostname.c' -a X"$1" != X"-c"; then
- echo 'x - skipping xarchie-2.0.6/hostname.c (File already exists)'
- rm -f _shar_wnt_.tmp
- else
- > _shar_wnt_.tmp
- echo 'x - extracting xarchie-2.0.6/hostname.c (Text)'
- sed 's/^X//' << 'SHAR_EOF' > 'xarchie-2.0.6/hostname.c' &&
- /*
- X * hostname.c : Amamzing how hard it is to get this information...
- X *
- X * George Ferguson, ferguson@cs.rochester.edu, 23 Apr 1993.
- X *
- X * Many possibilities here. The current attempt is:
- X * (a) Use HOSTNAME if set, since SO many people have strange systems
- X * (b) else call gethostname(), complain if it fails
- X * (c) if it succeeded, call gethostbyname() to "canonicalize"
- X * the name (many systems don't return a fully-qualified name,
- X * and getdomainname() is a loss.
- X */
- #include <stdio.h>
- #include <netdb.h>
- #ifndef MAXHOSTNAMELEN
- #include <sys/param.h>
- #endif
- #include "sysdefs.h"
- #include "stringdefs.h"
- X
- char *
- GetHostname()
- {
- X static char hostname[MAXHOSTNAMELEN];
- X struct hostent *host;
- X
- X if (getenv("HOSTNAME") != NULL)
- X strcpy(hostname,getenv("HOSTNAME"));
- SHAR_EOF
- true || echo 'restore of xarchie-2.0.6/hostname.c failed'
- fi
- echo 'End of xarchie-2.0.6 part 11'
- echo 'File xarchie-2.0.6/hostname.c is continued in part 12'
- echo 12 > _shar_seq_.tmp
- exit 0
-
- exit 0 # Just in case...
- --
- // chris@IMD.Sterling.COM | Send comp.sources.x submissions to:
- \X/ Amiga - The only way to fly! | sources-x@imd.sterling.com
- "It's intuitively obvious to the |
- most casual observer..." | GCS d+/-- p+ c++ l+ m+ s++/+ g+ w+ t+ r+ x+
-