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

  1. Newsgroups: comp.sources.x
  2. From: ferguson@cs.rochester.edu (George Ferguson)
  3. Subject: v20i045:  xarchie - An X browser interface to Archie, v2.0.6, Part17/24
  4. Message-ID: <1993Jun15.223442.1315@sparky.imd.sterling.com>
  5. X-Md4-Signature: f644b161eac3f830089c1c134161c138
  6. Sender: chris@sparky.imd.sterling.com (Chris Olson)
  7. Organization: Sterling Software
  8. Date: Tue, 15 Jun 1993 22:34:42 GMT
  9. Approved: chris@sparky.imd.sterling.com
  10.  
  11. Submitted-by: ferguson@cs.rochester.edu (George Ferguson)
  12. Posting-number: Volume 20, Issue 45
  13. Archive-name: xarchie/part17
  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/part17
  19.  
  20. #!/bin/sh
  21. # this is Part.17 (part 17 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.c 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" != 17; 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.c'
  39. else
  40. echo 'x - continuing file xarchie-2.0.6/xarchie.c'
  41. sed 's/^X//' << 'SHAR_EOF' >> 'xarchie-2.0.6/xarchie.c' &&
  42. X */
  43. static String fallbackResources[] = {
  44. #include "Xarchie.ad.h"
  45. X    NULL
  46. };
  47. X
  48. /*    -    -    -    -    -    -    -    -    */
  49. X
  50. main(argc,argv)
  51. int argc;
  52. char **argv;
  53. {
  54. X    program = argv[0];
  55. X    /* Init display and application context, other globals, parse args */
  56. X    initGraphics(&argc,argv);
  57. X    if (argc > 1) {
  58. X    syntax(argc,argv);
  59. X    bye(1);
  60. X    }
  61. X    /* Init other non-widget stuff */
  62. X    initErrorHandlers();
  63. X    initColors();
  64. X    initActions();
  65. X    initHostWeights();
  66. X    /* Then init the menus so they can be found for other widgets */
  67. X    initMenus();
  68. X    /* Then the main panel widgets */
  69. X    initWidgets();
  70. X    /* Now we realize so the toplevel window is available */
  71. X    XtRealizeWidget(realToplevel);
  72. X    /* Other initializations that need to go now */
  73. X    initSettings();
  74. #ifdef HELP
  75. X    initHelpPanel();
  76. #endif
  77. X    initMisc();
  78. X    /* Enable WM_DELETE_WINDOW processing */
  79. X    (void)XSetWMProtocols(display,XtWindow(realToplevel),&WM_DELETE_WINDOW,1);
  80. X    status0("Ready");
  81. X    /* Init the data structure for responses */
  82. X    db = newEntry();
  83. X    resetBrowser();
  84. X    setBrowserState(BROWSER_READY);
  85. X    /* Do it */
  86. X    XtAppMainLoop(appContext);
  87. X    /*NOTREACHED*/
  88. }
  89. X
  90. void
  91. bye(ret)
  92. int ret;
  93. {
  94. X    XtDestroyApplicationContext(appContext);
  95. #ifdef CUTCP
  96. X    netshut();
  97. #endif
  98. X    exit(ret);
  99. }
  100. X
  101. /*    -    -    -    -    -    -    -    -    */
  102. /* Initialization routines */
  103. X
  104. static void
  105. initGraphics(argcp,argv)
  106. int *argcp;
  107. char **argv;
  108. {
  109. X    /* Some systems want (Cardinal*), others want (int*) for argcp. */
  110. X    realToplevel = toplevel =
  111. X    XtAppInitialize(&appContext,"Xarchie",options,XtNumber(options),
  112. X            (Cardinal *)argcp,argv,fallbackResources,NULL,ZERO);
  113. X    /*
  114. X     * Set graphics globals
  115. X     */
  116. X    display = XtDisplay(realToplevel);
  117. X    screen = XtScreen(realToplevel);
  118. X    root = RootWindowOfScreen(screen);
  119. X    busyCursor = XCreateFontCursor(display,XC_watch);
  120. X    WM_PROTOCOLS = XInternAtom(display,"WM_PROTOCOLS",False);
  121. X    WM_DELETE_WINDOW = XInternAtom(display,"WM_DELETE_WINDOW",False);
  122. X    WM_STATE = XInternAtom(display,"WM_STATE",False);
  123. X    /*
  124. X     * Set up the resource converters (needs globals)
  125. X     */
  126. X    initConverters(appContext);
  127. X    /*
  128. X     * Get non-widget resources
  129. X     */
  130. X    XtGetApplicationResources(realToplevel,(XtPointer)&appResources,
  131. X                  resources,XtNumber(resources),NULL,ZERO);
  132. X    /*
  133. X     * Realloc these right away so we can free/realloc them later
  134. X     */
  135. X    appResources.archieHost = XtNewString(appResources.archieHost);
  136. X    appResources.ftpLocalDir = XtNewString(appResources.ftpLocalDir);
  137. X    appResources.ftpType = XtNewString(appResources.ftpType);
  138. X    appResources.hostWeights = XtNewString(appResources.hostWeights);
  139. X    /*
  140. X     * Catch iconify/deiconify so we can do children also
  141. X     */
  142. X    XtAddEventHandler(realToplevel,PropertyChangeMask,False,
  143. X              iconifyEventHandler,NULL);
  144. #ifdef DEBUG
  145. X    XSetErrorHandler(xerror);
  146. X    XSynchronize(display,True);
  147. #endif
  148. }
  149. X
  150. /*
  151. X * initColors: To allow resources to be specfied separately for color
  152. X *    and mono displays, we add a dummy Form widget below realToplevel
  153. X *    in appropriate circumstances.
  154. X *      This means that:
  155. X *      - realToplevel gets realized
  156. X *      - toplevel gets used as parent of children
  157. X */
  158. #define ADDTOPLEVEL(NAME) \
  159. X    toplevel = XtCreateManagedWidget(NAME,formWidgetClass, \
  160. X                     realToplevel,NULL,0);
  161. static void
  162. initColors()
  163. {
  164. X    Visual *visual;
  165. X
  166. X    /* The default is no extra widget (ie. mono) */
  167. X    toplevel = realToplevel;
  168. X    /* See if the user specified a type */
  169. X    if (strcmp(appResources.visualType,"mono") == 0) {
  170. X    return;
  171. X    } else if (strcmp(appResources.visualType,"color") == 0) {
  172. X    ADDTOPLEVEL("color");
  173. X    return;
  174. X    } else if (strcmp(appResources.visualType,"gray") == 0) {
  175. X    ADDTOPLEVEL("gray");
  176. X    return;
  177. X    }
  178. X    /* Otherwise we try to figure it out */
  179. X    if ((visual=XDefaultVisualOfScreen(screen)) == NULL) {
  180. X    fprintf(stderr,"%s: can't get info about visual!\n",program);
  181. X    return;
  182. X    }
  183. X    if (visual->map_entries > 2) {
  184. X    switch (visual->class) {
  185. X      case StaticColor:
  186. X      case PseudoColor:
  187. X      case TrueColor:
  188. X      case DirectColor:
  189. X        ADDTOPLEVEL("color");
  190. X        break;
  191. X      case StaticGray:
  192. X      case GrayScale:
  193. X        ADDTOPLEVEL("gray");
  194. X        break;
  195. X      default:
  196. X        toplevel = realToplevel;
  197. X    }
  198. X    } else {
  199. X    toplevel = realToplevel;
  200. X    }
  201. }
  202. X
  203. /*
  204. X * initMenus: Call all the menu initialization routines
  205. X */
  206. static void
  207. initMenus()
  208. {
  209. X    initMenuCreator();        /* must be first */
  210. X    initFileMenu();
  211. X    initQueryMenu();
  212. X    initSettingsMenu();
  213. X    initFilePanelMenu();
  214. }
  215. X
  216. /*
  217. X * initWidgets: Initialize the widgets and set globals variables.
  218. X */
  219. static void
  220. initWidgets()
  221. {
  222. X    Widget outerPaned,buttonForm,browserPaned;
  223. X    Widget stringForm;
  224. X    char name[32];
  225. X    int i;
  226. X
  227. X    outerPaned = XtCreateManagedWidget("outerPaned",panedWidgetClass,
  228. X                       toplevel,NULL,0);
  229. X    /* Button Form */
  230. X    buttonForm = XtCreateManagedWidget("buttonForm",formWidgetClass,
  231. X                       outerPaned,NULL,0);
  232. X    fileButton = XtCreateManagedWidget("fileButton",menuButtonWidgetClass,
  233. X                       buttonForm,NULL,0);
  234. X    settingsButton = XtCreateManagedWidget("settingsButton",
  235. X                       menuButtonWidgetClass,
  236. X                       buttonForm,NULL,0);
  237. X    queryButton = XtCreateManagedWidget("queryButton",
  238. X                    menuButtonWidgetClass,
  239. X                    buttonForm,NULL,0);
  240. X    abortButton = XtCreateManagedWidget("abortButton",
  241. X                    commandWidgetClass,
  242. X                    buttonForm,NULL,0);
  243. X    XtSetSensitive(abortButton,False);
  244. #ifdef HELP
  245. X    helpButton = XtCreateManagedWidget("helpButton",commandWidgetClass,
  246. X                       buttonForm,NULL,0);
  247. #endif
  248. X    (void)XtCreateManagedWidget("statusLabel",labelWidgetClass,
  249. X                buttonForm,NULL,0);
  250. X    statusText = XtCreateManagedWidget("statusText",asciiTextWidgetClass,
  251. X                       buttonForm,NULL,0);
  252. X    /* Browser */
  253. X    browserForm = XtCreateManagedWidget("browserForm",formWidgetClass,
  254. X                    outerPaned,NULL,0);
  255. X    browserUpButton = XtCreateManagedWidget("browserUpButton",
  256. X                        commandWidgetClass,
  257. X                        browserForm,NULL,0);
  258. X    browserDownButton = XtCreateManagedWidget("browserDownButton",
  259. X                          commandWidgetClass,
  260. X                          browserForm,NULL,0);
  261. X    browserPaned = XtCreateManagedWidget("browserPaned",panedWidgetClass,
  262. X                     browserForm,NULL,0);
  263. X    for (i=0; i < NUM_BROWSER_PANES; i++) {
  264. X    sprintf(name,"browserViewport%d",i);
  265. X    browserViewports[i] = XtCreateManagedWidget(name,viewportWidgetClass,
  266. X                            browserPaned,NULL,0);
  267. X    browserScrollbars[i] = XtNameToWidget(browserViewports[i],"vertical");
  268. X    sprintf(name,"browserList%d",i);
  269. #ifdef MULTILIST
  270. X    browserLists[i] = XtCreateManagedWidget(name,xfwfMultiListWidgetClass,
  271. X                        browserViewports[i],NULL,0);
  272. #else
  273. X    browserLists[i] = XtCreateManagedWidget(name,listWidgetClass,
  274. X                        browserViewports[i],NULL,0);
  275. #endif
  276. X    clearBrowserPane(i);
  277. X    XtAddCallback(browserLists[i],XtNcallback,
  278. X              browserCallback,(XtPointer)i);
  279. X    }
  280. X    /* String Form */
  281. X    stringForm = XtCreateManagedWidget("stringForm",formWidgetClass,
  282. X                       outerPaned,NULL,0);
  283. X    (void)XtCreateManagedWidget("searchLabel",labelWidgetClass,
  284. X                stringForm,NULL,0);
  285. X    searchText = XtCreateManagedWidget("searchText",asciiTextWidgetClass,
  286. X                       stringForm,NULL,0);
  287. X    (void)XtCreateManagedWidget("hostLabel",labelWidgetClass,
  288. X                stringForm,NULL,0);
  289. X    hostText = XtCreateManagedWidget("hostText",asciiTextWidgetClass,
  290. X                     stringForm,NULL,0);
  291. X    (void)XtCreateManagedWidget("locationLabel",labelWidgetClass,
  292. X                stringForm,NULL,0);
  293. X    locationText = XtCreateManagedWidget("locationText",asciiTextWidgetClass,
  294. X                     stringForm,NULL,0);
  295. X    (void)XtCreateManagedWidget("fileLabel",labelWidgetClass,
  296. X                stringForm,NULL,0);
  297. X    fileText = XtCreateManagedWidget("fileText",asciiTextWidgetClass,
  298. X                     stringForm,NULL,0);
  299. X    (void)XtCreateManagedWidget("sizeLabel",labelWidgetClass,
  300. X                stringForm,NULL,0);
  301. X    sizeText = XtCreateManagedWidget("sizeText",asciiTextWidgetClass,
  302. X                     stringForm,NULL,0);
  303. X    (void)XtCreateManagedWidget("modesLabel",labelWidgetClass,
  304. X                stringForm,NULL,0);
  305. X    modesText = XtCreateManagedWidget("modesText",asciiTextWidgetClass,
  306. X                      stringForm,NULL,0);
  307. X    (void)XtCreateManagedWidget("dateLabel",labelWidgetClass,
  308. X                stringForm,NULL,0);
  309. X    dateText = XtCreateManagedWidget("dateText",asciiTextWidgetClass,
  310. X                     stringForm,NULL,0);
  311. }
  312. X
  313. static void
  314. initMisc()
  315. {
  316. X    char *user,*host,*addr;
  317. X
  318. X    if ((tmpDirectory=getenv("TMPDIR")) == NULL) {
  319. X    tmpDirectory = "/tmp";
  320. X    }
  321. X    user = GetUsername();
  322. X    host = GetHostname();
  323. X    addr = XtMalloc(strlen(user)+
  324. X            strlen(host)+strlen(appResources.ftpMailAddress));
  325. X    sprintf(addr,appResources.ftpMailAddress,user,host);
  326. X    appResources.ftpMailAddress = addr;
  327. X    /* Do initial tilde expansion if needed */
  328. X    if (appResources.ftpLocalDir && *(appResources.ftpLocalDir) == '~') {
  329. X    appResources.ftpLocalDir =
  330. X        XtNewString(tildeExpand(appResources.ftpLocalDir));
  331. X    }
  332. X    /* Use the default icons unless overridden */
  333. X    if (appResources.defaultIcon == None) {
  334. X    appResources.defaultIcon =
  335. X        XCreateBitmapFromData(display,root,xarchie_bits,
  336. X                  xarchie_width,xarchie_height);
  337. X    }
  338. X    if (appResources.busyIcon == None) {
  339. X    appResources.busyIcon =
  340. X        XCreateBitmapFromData(display,root,busy_bits,
  341. X                  busy_width,busy_height);
  342. X    }
  343. X    /* Tell the world about the initial icons */
  344. X    setIconStatus(0);
  345. }
  346. X
  347. /*    -    -    -    -    -    -    -    -    */
  348. /* The following functions attempt to provide information in the event of
  349. X * a crash. If you have trouble compiling them because of UNIX-isms in
  350. X * the signal handlers, then add -DDONT_CATCH_ERRORS to the definition
  351. X * of DEFINES in the Imakefile and re-make (or just #define it here).
  352. X */
  353. #ifndef DONT_CATCH_ERRORS
  354. #include <signal.h>
  355. static void crashHandler();
  356. #endif /* DONT_CATCH_ERRORS */
  357. X
  358. static void
  359. initErrorHandlers()
  360. {
  361. #ifndef DONT_CATCH_ERRORS
  362. X    signal(SIGBUS,crashHandler);
  363. X    signal(SIGSEGV,crashHandler);
  364. #endif /* DONT_CATCH_ERRORS */
  365. }
  366. X
  367. #ifndef DONT_CATCH_ERRORS
  368. static void
  369. crashHandler(sig)
  370. int sig;
  371. {
  372. X    char *s;
  373. X
  374. X    switch (sig) {
  375. X    case SIGBUS: s = "SIGBUS"; break;
  376. X    case SIGSEGV: s = "SIGSEGV"; break;
  377. X    default: s = "UNKNOWN";
  378. X    }
  379. X    fprintf(stderr,"%s: caught a %s signal!\n",program,s);
  380. X    fprintf(stderr,"If you want to report an error, please indicate your hardware type,\n");
  381. X    fprintf(stderr,"operating system, compiler, and your version of X and include a\n");
  382. X    fprintf(stderr,"backtrace. Thanks.\n");
  383. X    abort();
  384. }
  385. X
  386. #endif /* DONT_CATCH_ERRORS */
  387. X
  388. #ifdef DEBUG
  389. /*
  390. X * Override default X error handler to force an abort to debugger
  391. X */
  392. static void
  393. xerror(display,event)
  394. Display *display;
  395. XXErrorEvent *event;
  396. {
  397. X    char buf[256];
  398. X
  399. X    XGetErrorText(display,event->error_code,buf,256);
  400. X    printf("XERROR: %d: %s\n",event->error_code,buf);
  401. X    abort();
  402. }
  403. #endif
  404. X
  405. /*    -    -    -    -    -    -    -    -    */
  406. /* Callback procedures */
  407. X
  408. /*ARGSUSED*/
  409. static void
  410. browserCallback(w,client_data,call_data)
  411. Widget w;
  412. XXtPointer client_data;    /* pane */
  413. XXtPointer call_data;    /* returnStruct */
  414. {
  415. X    int pane = (int)client_data;
  416. #ifdef MULTILIST
  417. #ifdef DEBUG
  418. X    static char *actions[] = { "NOTHING","HIGHLIGHT","UNHIGHLIGHT","STATUS" };
  419. X    int i;
  420. #endif
  421. X    XfwfMultiListReturnStruct *ret = (XfwfMultiListReturnStruct*)call_data;
  422. X
  423. #ifdef DEBUG
  424. X    printf("Callback: %s, item %d\n",actions[ret->action],ret->item);
  425. X    printf("  num_selected = %d\n",ret->num_selected);
  426. X    printf("  selected_items[] = ");
  427. X    for (i = 0; i < ret->num_selected; i++) {
  428. X    printf("%d ",ret->selected_items[i]);
  429. X    }
  430. X    if (ret->num_selected == 0) printf("None");
  431. X    printf("\n");
  432. #endif /* DEBUG */
  433. X    switch (ret->action) {
  434. X      case XfwfMultiListActionHighlight:
  435. X    /* Anything selected? */
  436. X    if (ret->item != -1) {
  437. X        /* If just one thing selected, then we came here from Select() */
  438. X        if (ret->num_selected == 1)
  439. X        resetSelectionsForPane(pane);
  440. X        selectBrowserItem(pane,ret->item);
  441. X    }
  442. X    break;
  443. X      case XfwfMultiListActionUnhighlight:
  444. X    if (ret->item == -1)
  445. X        resetSelectionsForPane(pane);
  446. X    else
  447. X        unselectBrowserItem(pane,ret->item);
  448. X    break;
  449. X    }
  450. #else /* !MULTILIST */
  451. X    XawListReturnStruct *ret = (XawListReturnStruct*)call_data;
  452. X
  453. X    resetSelectionsForPane(pane);
  454. X    selectBrowserItem(pane,ret->list_index);
  455. #endif /* !MULTILIST */
  456. }
  457. X
  458. /*    -    -    -    -    -    -    -    -    */
  459. /* Misc. routines */
  460. X
  461. void
  462. setBusyStatus(state)
  463. Boolean state;
  464. {
  465. X    setWindowBusyStatus(XtWindow(realToplevel),state);
  466. }
  467. X
  468. static void
  469. setWindowBusyStatus(window,state)
  470. Window window;
  471. Boolean state;
  472. {
  473. X    Window root,parent,*children;
  474. X    unsigned int numChildren;
  475. X    int i;
  476. X
  477. X    /* Do the window */
  478. X    if (state)
  479. X    XDefineCursor(display,window,busyCursor);
  480. X    else
  481. X    XUndefineCursor(display,window);
  482. X    /* And all the children... */
  483. X    if (XQueryTree(display,window,&root,&parent,&children,&numChildren) != 0) {
  484. X    for (i=0; i < numChildren; i++) {
  485. X        setWindowBusyStatus(*(children+i),state);
  486. X    }
  487. X    if (numChildren > 0)
  488. X        XFree((char *)children);
  489. X    }
  490. }
  491. X        
  492. /*    -    -    -    -    -    -    -    -    */
  493. X
  494. /*ARGSUSED*/
  495. static void
  496. iconifyEventHandler(w,client_data,event,cont)
  497. Widget w;
  498. XXtPointer client_data;
  499. XXEvent *event;
  500. Boolean *cont;
  501. {
  502. X    int state;
  503. X
  504. X    if (event->xproperty.state == PropertyNewValue &&
  505. X    event->xproperty.atom == WM_STATE) {
  506. X    Atom actual_type;
  507. X    int actual_format;
  508. X    unsigned long nitems = 0, bytes_after = 0;
  509. X    unsigned char* data = NULL;
  510. X
  511. X    if (XGetWindowProperty(display,XtWindow(realToplevel),
  512. X                   WM_STATE,0,2,False,AnyPropertyType,
  513. X                   &actual_type,&actual_format,
  514. X                   &nitems,&bytes_after,&data) == Success) {
  515. X        state = *(int *)data;
  516. X        setSettingsShellState(state);
  517. X        setFileShellState(state);
  518. #ifdef HELP
  519. X        setHelpShellState(state);
  520. #endif
  521. X        setAboutShellState(state);
  522. X        setFtpTraceShellState(state);
  523. X        XFree((char *)data);
  524. X    }
  525. X    }
  526. }
  527. X
  528. void
  529. setIconStatus(state)
  530. Boolean state;
  531. {
  532. X    Pixmap pixmap;
  533. X    char *name;
  534. X    Arg args[2];
  535. X
  536. X    if (state == True) {
  537. X    pixmap = appResources.busyIcon;
  538. X    name = "xarchie:busy";
  539. X    } else {
  540. X    pixmap = appResources.defaultIcon;
  541. X    name = "xarchie";
  542. X    }
  543. X    XtSetArg(args[0],XtNiconName,name);
  544. X    XtSetArg(args[1],XtNiconPixmap,pixmap);
  545. X    XtSetValues(realToplevel,args,2);
  546. }
  547. SHAR_EOF
  548. echo 'File xarchie-2.0.6/xarchie.c is complete' &&
  549. chmod 0644 xarchie-2.0.6/xarchie.c ||
  550. echo 'restore of xarchie-2.0.6/xarchie.c failed'
  551. Wc_c="`wc -c < 'xarchie-2.0.6/xarchie.c'`"
  552. test 21932 -eq "$Wc_c" ||
  553.     echo 'xarchie-2.0.6/xarchie.c: original size 21932, current size' "$Wc_c"
  554. rm -f _shar_wnt_.tmp
  555. fi
  556. # ============= xarchie-2.0.6/xarchie.h ==============
  557. if test -f 'xarchie-2.0.6/xarchie.h' -a X"$1" != X"-c"; then
  558.     echo 'x - skipping xarchie-2.0.6/xarchie.h (File already exists)'
  559.     rm -f _shar_wnt_.tmp
  560. else
  561. > _shar_wnt_.tmp
  562. echo 'x - extracting xarchie-2.0.6/xarchie.h (Text)'
  563. sed 's/^X//' << 'SHAR_EOF' > 'xarchie-2.0.6/xarchie.h' &&
  564. /*
  565. X * xarchie.h : Definitions of the X globals and misc. functions
  566. X *
  567. X * George Ferguson, ferguson@cs.rochester.edu, 2 Nov 1991.
  568. X * Version 2.0: 23 Apr 1993.
  569. X */
  570. X
  571. #ifndef XARCHIE_H
  572. #define XARCHIE_H
  573. X
  574. extern Display *display;
  575. extern Screen *screen;
  576. extern Window root;
  577. extern Atom WM_DELETE_WINDOW,WM_PROTOCOLS;
  578. X
  579. extern XtAppContext appContext;
  580. extern Widget toplevel;
  581. extern Widget queryButton,abortButton;
  582. extern Widget statusText;
  583. extern Widget browserForm;
  584. extern Widget browserUpButton,browserDownButton;
  585. extern Widget browserViewports[],browserScrollbars[],browserLists[];
  586. extern Widget searchText;
  587. extern Widget hostText,locationText,fileText,sizeText,modesText,dateText;
  588. X
  589. extern char *program;
  590. extern char *tmpDirectory;
  591. X
  592. extern void bye();
  593. extern void setBusyStatus(),setIconStatus();
  594. X
  595. #endif /* XARCHIE_H */
  596. SHAR_EOF
  597. chmod 0644 xarchie-2.0.6/xarchie.h ||
  598. echo 'restore of xarchie-2.0.6/xarchie.h failed'
  599. Wc_c="`wc -c < 'xarchie-2.0.6/xarchie.h'`"
  600. test 817 -eq "$Wc_c" ||
  601.     echo 'xarchie-2.0.6/xarchie.h: original size 817, current size' "$Wc_c"
  602. rm -f _shar_wnt_.tmp
  603. fi
  604. # ============= xarchie-2.0.6/xarchie.man ==============
  605. if test -f 'xarchie-2.0.6/xarchie.man' -a X"$1" != X"-c"; then
  606.     echo 'x - skipping xarchie-2.0.6/xarchie.man (File already exists)'
  607.     rm -f _shar_wnt_.tmp
  608. else
  609. > _shar_wnt_.tmp
  610. echo 'x - extracting xarchie-2.0.6/xarchie.man (Text)'
  611. sed 's/^X//' << 'SHAR_EOF' > 'xarchie-2.0.6/xarchie.man' &&
  612. .\"
  613. .\" xarchie : X11 browser interface to archie
  614. .\"
  615. .\" This manpage is designed to be used either as a normal manpage
  616. .\" processed by nroff, or processed specially for use in the Help
  617. .\" browser. The large number of section headings (.SH) commands are
  618. .\" to provide topics for the browser. The leading spaces in these
  619. .\" headings are used to make a hierarchy of topics.
  620. .\"
  621. .\" If the XX number register is set > 0, then this text is formatted
  622. .\" for use in the Help browser. By default it is formatted like a
  623. .\" normal manpage.
  624. .\"
  625. .\" George Ferguson, ferguson@cs.rochester.edu, 12 Nov 1991.
  626. .\" Version 2.0: 23 Apr 1993
  627. .\" 28 Apr 1993: Changed default host to "archie.sura.net(1526)".
  628. .\" 13 May 1993: Added stuff about how hostMenu labels are parsed.
  629. .\"
  630. .\" -----------------------------------------------------------------------
  631. .\" If formatting for Help, kill the header and footer before .TH
  632. .if \n(XX \{\
  633. .de }H
  634. ..
  635. .de }F
  636. .. \}
  637. .TH XARCHIE 1 "7 Jun 1993" "U of Rochester"
  638. .\" If formatting for Help, set line length and tabs after .TH
  639. .if \n(XX \{\
  640. .nr LL 40n
  641. .ll 40n
  642. .ta 2,4,6,8,10,12,14,16,18,20 \}
  643. .el .ta 4,8,12,16,20,24,28,32,36,40
  644. .\" Real manpage begins here
  645. .SH NAME
  646. xarchie \- X11 browser interface to archie, version 2.0.6
  647. .SH SYNOPSIS
  648. .na
  649. .in +8n
  650. .ti -8n
  651. xarchie
  652. [X\ Toolkit\ options]
  653. [\-host\ host]
  654. [\-search\ type|\-e|\-c|\-s|\-r|\-ec|\-es|\-er]
  655. [\-sort\ type|\-t|\-w]
  656. [\-maxhits\ num]
  657. [\-offset\ num]
  658. [\-nice lev|\-N\ lev]
  659. [\-noscroll]
  660. [\-mono|\-gray|\-color]
  661. [\-debug\ num|\-D\ num]
  662. [\-help|-?]
  663. .in -8n
  664. .ad
  665. .SH DESCRIPTION
  666. .PP
  667. XXarchie is an X11 browser interface to the Archie Internet information
  668. system using the Prospero virtual filesystem protocol.  Archie
  669. provides information about files available for ftp anywhere on the
  670. Internet; Xarchie displays this information using an easy-to-use,
  671. point-and-click interface.  Xarchie allows you to further explore ftp
  672. sites by examining directories returned as query matches, and allows
  673. you to retrieve files located this way.  Xarchie is designed (like
  674. most X applications) to be highly customizable, allowing you to tailor
  675. the look-and-feel of the tool to your own preferences.
  676. .PP
  677. This document is broken into two parts. First, the USER'S GUIDE
  678. describes Archie and Xarchie, and covers both Basic and Advanced
  679. XXarchie usage. Second, the REFERENCE MANUAL provides all the
  680. information needed to customize Xarchie. You can also browse this
  681. document using the Xarchie Help facility.
  682. .PP
  683. To report problems or bugs, please see the section "Reporting Bugs" in
  684. the REFERENCE MANUAL section.
  685. .\"===========================================================
  686. .SH "USER'S GUIDE"
  687. .PP
  688. The User's Guide section of this manual describes the Archie service,
  689. the Xarchie client, and how to use Xarchie to access resources
  690. available for FTP on the Internet.
  691. .SH " What is Archie?"
  692. .PP
  693. The Archie information system is a network-based information tool
  694. offering proactive data retrieval and indexing for widely distributed
  695. collections of data.
  696. .PP
  697. Perhaps the best known application of the Archie system is to maintain
  698. the Internet Archives database. This database, already available from a
  699. number of service providers across the Internet, currently contains the
  700. names of over 2,100,000 files at over 1,000 anonymous FTP archive sites.
  701. Using this database, users can rapidly locate needed files without the
  702. need to log onto dozens or even hundreds of machines. Archie servers
  703. offering this database currently receive over 50,000 queries per day.
  704. It is this database that the Xarchie client accesses, as described in
  705. the next section, using one of the many independently owned and
  706. operated Archie servers around the world.
  707. .PP
  708. The Archie system is much more than the Internet Archives database.
  709. For more information contact Bunyip Information Systems at (514)
  710. 398-3709 or (514) 398-811 or email "info@bunyip.com".
  711. .\"-----------------------------------------------------------
  712. .SH " What is Xarchie?"
  713. .PP
  714. XXarchie is an X11 browser interface to the Archie Internet Archives
  715. database using the Prospero virtual filesystem protocol.  Archie
  716. provides information about files available for ftp anywhere on the
  717. Internet; Xarchie displays this information using an easy-to-use,
  718. point-and-click interface.  Xarchie allows you to further explore ftp
  719. sites by examining directories returned as query matches, and allows
  720. you to retrieve files located this way.
  721. .PP
  722. XXarchie is designed (like most X applications) to be highly
  723. customizable, allowing you to tailor the look-and-feel of the tool to
  724. your own preferences. See the REFERENCE MANUAL for details.
  725. .PP
  726. Users should be aware that the Xarchie client accesses a server that
  727. is shared with users on other hosts.  As such, submitting long or
  728. large numbers of queries during peak periods not only increases the
  729. time that you have to wait for a response, but it increases the time
  730. that others have to wait too. Please read about the
  731. .I -nice
  732. option, the
  733. .B niceLevel
  734. resource, and the "Nice Level" setting before making large queries.
  735. Also, you should use the closest possible host to save long-distance
  736. network traffic. Abusers of the service may find their access revoked
  737. without notice.
  738. .\"-----------------------------------------------------------
  739. .SH " The Xarchie Display"
  740. .PP
  741. XXarchie uses several conventions regarding menus and button names:
  742. .IP \-
  743. Clicking on a button whose name ends with a ">" will pop up a menu
  744. from which you should select the desired action.
  745. .IP \-
  746. Clicking on or selecting an item whose name ends in "..." will pop up
  747. a panel that will let you perform the desired operation.
  748. .PP
  749. A label with neither of these suffixes indicates that the action will
  750. be taken without subsequent interaction.
  751. .PP
  752. XXarchie's
  753. display is divided into three horizontal areas. The top pane is a
  754. control panel providing the following buttons:
  755. .IP File:
  756. Clicking on this button presents the File Menu, from which you can
  757. select a variety of file-related operations to be described later. The
  758. File Menu operations can also be invoked by holding down the Meta key
  759. and typing the first letter of the operation's name (e.g., Meta-Q to
  760. quit).
  761. .IP Settings:
  762. Clicking on this button presents the Settings Menu, whose operations
  763. will be described in the "Advanced Usage" section.
  764. .IP Query:
  765. This button presents the Query Menu, used to send queries to Archie.
  766. Its operation will be described shortly.
  767. .IP Abort:
  768. When active during a query or retrieval, this button allows you to
  769. abort the operation.
  770. .IP Help:
  771. Clicking on this button pops up the Help Panel, which allows you to
  772. browse this document on-line.
  773. .LP
  774. Finally, the area labelled "Status" is used to provide information
  775. about the progress of a query or other informative messages.
  776. .PP
  777. The middle pane of the Xarchie display functions as a
  778. host-location-file browser. That is, the leftmost pane displays
  779. hostnames, the middle pane locations (directories), and the rightmost
  780. pane files or directories returned by a query. The browser's use is
  781. described in the section "Browsing", below. You can adjust the
  782. relative size of the browser panes using the Grips on their borders.
  783. .PP
  784. Finally, the bottom pane of the Xarchie display provides a set of Text
  785. items where you can enter information and where information is
  786. displayed as query results are browsed. Not all Text items can be
  787. typed in; some are used for display only. These text items provide
  788. Emacs-like editing controls (see
  789. .IR xedit (1)
  790. for a complete description). Typing Return in some Text items invokes
  791. an action as a shortcut for selecting it from a menu or button.
  792. .\"-----------------------------------------------------------
  793. .SH " Basic Xarchie Usage"
  794. .PP
  795. This section provides information on basic querying, browsing, and
  796. file operations. The "Advanced Xarchie Usage" section describes how to
  797. use the Settings Panel and how to perform other, more complicated,
  798. queries.
  799. .\"    -    -    -    -    -    -    -    -
  800. .SH "  Querying"
  801. .PP
  802. The primary function provided by Xarchie is that of querying the
  803. Archie server for a "search term" (the string or expression for which
  804. you want to search). By default, your query uses
  805. .I exact
  806. search mode. That is, the search term must literally match an entry in
  807. the database for the entry to be returned. Other search modes are
  808. available, and are described in the "Advanced Usage" section.
  809. .PP
  810. You enter your search term in the appropriately
  811. labelled Text item in the bottom pane of the Xarchie display.  Hitting
  812. Return in the text item or selecting "Query Item" from the Query Menu
  813. will send your request to Archie.
  814. .PP
  815. The Status area will be updated as the query progresses. First the
  816. Archie server's Internet address is looked up, then the server is
  817. contacted, the search term is sent over, and, after reaching the front
  818. of the server's request queue, matches are returned to Xarchie. The
  819. matches, if any, are displayed in the browser and the Status area
  820. indicates how many matches were returned.
  821. .PP
  822. If your window manager and version of X support it, you can iconify
  823. the Xarchie application and the icon will change to reflect the
  824. progress of your query. That is, it will change when a query is in
  825. progress and when it finishes.
  826. .\"    -    -    -    -    -    -    -    -
  827. .SH "  Aborting"
  828. .PP
  829. If you find that your query is taking too long, you can abort it by
  830. clicking on the "Abort" button when it is active. Your query will
  831. be aborted as soon as possible. You should note that while aborting a
  832. query will allow you to enter a new query, it does not remove the
  833. query from the server's queue (this may be changed in the future).
  834. Thus aborting queries does not reduce the load on the server -- just
  835. the opposite probably. Use it with discretion, like the rest of the
  836. service.
  837. .\"    -    -    -    -    -    -    -    -
  838. .SH "  Browsing"
  839. .PP
  840. As described in the section "The Xarchie Display", the middle pane of
  841. the Xarchie display functions as a host-location-file browser.  The
  842. leftmost pane of the browser contains the names of hosts that have a
  843. file matching your search term. Clicking the Left mouse button on a
  844. hostname will highlight it and cause the middle browser pane to be
  845. filled with a list of locations on that host where files matching your
  846. search term can be found. The selected hostname will also be displayed
  847. in the Text item labelled "Host" in the bottom pane of the Xarchie
  848. display.
  849. .PP
  850. Similarly, selecting a location from the middle browser pane will
  851. cause the right browser pane to be filled with a list of the files
  852. available from the selected host in the selected location, and the
  853. location will be displayed in the bottom pane item labelled
  854. "Location".
  855. .PP
  856. Finally, selecting a file from the right browser pane causes its name,
  857. size, permission modes and last-modification date to be displayed in
  858. the correspondingly-labelled bottom pane items.
  859. .PP
  860. Note that if a browser pane has only one item, then that item will be
  861. automatically selected and its "lesser" panes and information items filled
  862. in. This saves time and effort in the common case where there is only one
  863. host, location, or file that matches your query. Also, note that, by
  864. default, Xarchie scrolls the browser pane when you select an item.
  865. This makes it easy to click through a long list of matches, but can be
  866. annoying. If you don't like it, it can be changed on the Settings
  867. Panel (described below), and see the description of the
  868. .B \-noscroll
  869. command-line option in the REFERENCE MANUAL.
  870. .PP
  871. The browser allows you to select multiple items simultaneously,
  872. although of course only the last-selected item will have it's
  873. information displayed in the bottom pane. You add to a selection by
  874. clicking the Left button with Shift depressed. If the clicked-on item
  875. is already selected, it will be unselected. Currently, only the bottom
  876. level of the browser can have multiple selections, since a selection
  877. at a higher level clears the selections for all lower levels (this may
  878. be changed in the future). Thus you can select multiple files from a
  879. single host, but not multiple files from separate hosts.
  880. .\"    -    -    -    -    -    -    -    -
  881. .SH "  Expanding the Browser"
  882. .PP
  883. The browser can be expanded, allowing you to investigate, say, a
  884. directory that matched your query. To select and expand an directory,
  885. double-click on it (double-click with Shift to avoid unselecting any
  886. other items). You can also select "Open" from the File Menu to expand
  887. directories (although this will also open selected files, as described
  888. later). All selected directories will be expanded by querying an
  889. appropriate Archie server, and the Status area will keep you informed.
  890. Expansion requests can be aborted just like queries using the "Abort"
  891. button.
  892. .PP
  893. If only a single item was expanded, and if the expansion was
  894. successful, then the browser will scroll to display the results. The
  895. arrow buttons across the top of the browser can be used to scroll the
  896. browser left or right when they are active. The Middle and Right mouse
  897. buttons or the Left and Right arrow keys will do the same thing, when
  898. the pointer is in the browser panes.
  899. .\"    -    -    -    -    -    -    -    -
  900. .SH "  Viewing Files"
  901. .PP
  902. You can view a file that is selected in the browser by selecting
  903. "Open" from the File Menu (or by typing Meta\-O).  Xarchie retrieves
  904. all selected files in ASCII mode into a temporary directory.  The
  905. Status area, like usual, will keep you posted on the progress of the
  906. operation and, once the FTP connection is established, the Abort
  907. button can be used to abort the Open operation.  If you abort and
  908. there are files remaining to retrieve, you will be prompted as to
  909. whether to continue with the next file. Note that partially-retrieved
  910. files are not removed.  There is currently no way to abort the
  911. transfer until the connection is established. The connection will
  912. eventually timeout and control will return to Xarchie if connection is
  913. impossible.
  914. .PP
  915. Each file is displayed in a popup Text window after being retrieved.
  916. Use the "Down" and "Up" buttons or the scrollbars to view the text.
  917. Click on the "Dismiss" button to destroy the window and delete the
  918. file. To save the file before dismissing, use the "Save" button. This
  919. pops up a panel with which you can choose the name of the file to
  920. which to save.
  921. .PP
  922. Note that because the Archie database is only updated periodically,
  923. some files returned by Archie may not exist when you attempt to
  924. retrieve them. This and any other FTP errors are signalled with alert
  925. boxes.
  926. .\"    -    -    -    -    -    -    -    -
  927. .SH "  Retrieving Files"
  928. .PP
  929. The "Open" action should be used to view short files, such as "README"
  930. files, that you don't need to save. For more permanent files, and for
  931. non-ASCII files like tar or compressed files, Xarchie allows you to
  932. retrieve the selected browser items using the "Get" item of the File
  933. Menu (or typing Meta\-G). The selected files are retrieved via FTP and
  934. stored in the current directory (see the section "FTP Parameters" in
  935. the "Advanced Usage" section for how to change this).  The "Status"
  936. area is updated to reflect the progress of the transfer. As for
  937. "Open", you can abort the retrieval using the "Abort" button once the
  938. FTP connection is established.
  939. .PP
  940. It is currently not possible to retrieve a directory, although of
  941. course the directory can be opened and the entire contents selected
  942. for transfer.
  943. .PP
  944. Note that because the Archie database is only updated periodically,
  945. some files returned by Archie may not exist when you attempt to
  946. retrieve them. This and any other FTP errors are signalled with alert
  947. boxes.
  948. .PP
  949. As with querying, if your window manager and version of X support it,
  950. XXarchie's icon will be changed to reflect the progress of a transfer.
  951. .\"    -    -    -    -    -    -    -    -
  952. .SH "  Saving, Loading, and Writing"
  953. .PP
  954. XXarchie allows you to save and reload the contents of the browser, or
  955. write it in human-readable format using the items on the File menu.
  956. Selecting either of "Save", "Load", or "Write" (or typing Meta\-S,
  957. Meta\-L, or Meta\-W, respectively) will pop up the File Panel with
  958. which you can specify the appropriate filename.  Clicking on the "Ok"
  959. button will invoke the appropriate action; clicking "Cancel" will
  960. abort the operation and pop down the panel.
  961. .PP
  962. Saving the database creates a file containing sufficient information
  963. for the browser to be reloaded using "Load". The output is not
  964. intended for human consumption. The current Settings are also written
  965. to the file by "Save" and are restored by "Load".
  966. .PP
  967. Users should note that a reloaded database will be "flattened", that
  968. is, directories will be added to the middle pane as needed to fit
  969. everything in three browser panes.  (This may be changed in the future
  970. to preserve the original hierarchy.)
  971. .PP
  972. Writing the database is intended to create files that are more or less
  973. human-readable (compared to "Save", anyway). There are two possible
  974. formats, selectable from the "Write Format" menu on the panel. If "One
  975. entry per line" is selected, then the output will have one line per
  976. entry, in the format
  977. X
  978. .ce
  979. mode size date host:location/file
  980. X
  981. If "Pretty-printed" is selected, then the file format has hostnames
  982. starting at the beginning of the line, location names indented one
  983. tab, and file entries indented two tabs, all on separate lines.
  984. Hostnames and locations are only printed once, as in:
  985. X
  986. .na
  987. .nf
  988. X        host
  989. X                location
  990. X                        mode size date file
  991. X                        mode size date file
  992. .fi
  993. .ad
  994. X
  995. The latter is more readable, the former may be more useful if the
  996. output is to be used by a program.
  997. .\"    -    -    -    -    -    -    -    -
  998. .SH "  Quitting Xarchie"
  999. .PP
  1000. You can exit Xarchie by selecting "Quit" from the File Menu (or typing
  1001. Meta\-Q).
  1002. .\"-----------------------------------------------------------
  1003. .SH " Advanced Xarchie Usage"
  1004. .PP
  1005. This section describes how various aspects of Xarchie's functionality
  1006. can be modified to perform different queries and other operations.
  1007. Further customization information is found in the REFERENCE MANUAL
  1008. section.
  1009. .\"    -    -    -    -    -    -    -    -
  1010. .SH "  The Settings Panel"
  1011. .PP
  1012. The panel popped up by selecting "Other" on the Settings Menu in the
  1013. top Xarchie pane allows you to change the parameters of your queries
  1014. Archie. Each of the parameters is described in the following sections.
  1015. .PP
  1016. After you're done with the Settings Panel, clicking on the "Apply"
  1017. button will make Xarchie use the settings as set on the panel.
  1018. Clicking on "Default" will reset the settings to the values they had
  1019. when Xarchie started (but note that you will still have to apply them
  1020. to have them take effect). Clicking on "Done" closes the Settings
  1021. panel. A popup confirmer will appear if you did not apply your
  1022. changes, allowing you to discard the changes or go back and apply
  1023. them. Note that the "Apply" button is inactive until a change is made.
  1024. .PP
  1025. The menus available from the "Search\ Type", "Sort\ Type", "Nice\ 
  1026. Level" and "Archie\ Host" submenus of the Settings Menu on the
  1027. XXarchie top pane have effects corresponding to those of the buttons on
  1028. the Settings Panel. However, they do not require that the "Apply"
  1029. button be clicked on to take effect, and do not affect the behaviour
  1030. of the "Done" button confirmer.
  1031. .\"    -    -    -    -    -    -    -    -
  1032. .SH "  Archie host"
  1033. .PP
  1034. The item labelled "Host" provides a menu of known Archie hosts. You
  1035. should choose one appropriate to your site (i.e., one that minimizes
  1036. long-distance transmission).  In addition however, you can enter an
  1037. arbitrary hostname in the Text item next to the "Host" button.  Note
  1038. that the Archie host is only used for queries; expansion requests use
  1039. information stored with the items to determine which host to contact.
  1040. That is, changing the Archie host does not "take effect" until the
  1041. next query is issued.
  1042. .PP
  1043. If you have the
  1044. .IR ping (1)
  1045. program, you can try to use it with the its "\-s" option to locate a
  1046. "nearby" host.
  1047. .PP
  1048. You can specify hostnames using either the symbolic name or by giving
  1049. its numeric IP address (four octets separated by periods). In either
  1050. case, you can specify the port at which the Prospero server should be
  1051. contacted by giving it in parentheses immediately following the
  1052. hostname (no spaces).
  1053. .\"    -    -    -    -    -    -    -    -
  1054. .SH "  Search mode"
  1055. .PP
  1056. The "Search Mode" item allow you to change how Archie interprets your
  1057. search term.  Holding a mouse button down while the mouse cursor is on
  1058. the button displays a menu from which you can choose the desired
  1059. search type.  The label to the right of the item is updated to reflect
  1060. the choice.
  1061. .PP
  1062. The
  1063. .I exact
  1064. mode is fastest and returns files exactly matching your search term.
  1065. The
  1066. .I substr
  1067. and
  1068. .I subcase
  1069. modes return substring and case-sensitive substring matches
  1070. respectively (i.e.,
  1071. .I substr
  1072. means case-insensitive). The
  1073. .I regexp
  1074. mode allows you to specify a regular expression to select files (see
  1075. .IR ed (1)
  1076. for a description of regular expression syntax).
  1077. The
  1078. .I exact*
  1079. forms of these last three try an exact match first and then fall back
  1080. on the more costly search type if the exact match fails.
  1081. .PP
  1082. .\"    -    -    -    -    -    -    -    -
  1083. .SH "  Sort mode"
  1084. .PP
  1085. The "Sort Mode" item allows you to specify how Xarchie displays the
  1086. results from Archie.  Holding a mouse button down while the mouse
  1087. cursor is in this item displays a menu from which you can choose the
  1088. desired sort type.  The label to the right of the item is updated to
  1089. reflect the choice.  Applying the settings (see above) will cause the
  1090. data to be resorted according to the new sort mode.
  1091. .PP
  1092. The type can be one of
  1093. .IR name ,
  1094. .IR date ,
  1095. or
  1096. .IR weight .
  1097. Sorting by
  1098. .I name
  1099. is simple lexicographic ordering.
  1100. .PP
  1101. If sorting by
  1102. .I date
  1103. is selected, then hosts are ordered according to the most recent file
  1104. among those returned for them, and similarly for locations. Files
  1105. themselves are ordered by last-modification date, naturally.
  1106. .PP
  1107. If sorting by
  1108. .I weight
  1109. is selected, then hosts are ordered by a user-definable set of
  1110. "weights". In this way, hosts that are "close" (in some sense) are
  1111. displayed first. The weights can be set using the Text item that
  1112. appears on the Settings Panel when this sort mode is selected.
  1113. .PP
  1114. Hopefully, an appropriate weight list for the geographic location of
  1115. your site will have been installed as the default. In any case, the
  1116. the weight list is a set of lines, where each line specifies a weight
  1117. and the set of domains for that weight. A
  1118. host's weight is determined by finding the first line for which the
  1119. end of the host's name matches one of the suffixes. A host that
  1120. belongs in none of the classes is assigned the weight 99. For example,
  1121. the default for the USA is:
  1122. X
  1123. .nf
  1124. .na
  1125. X      1 edu com net gov mil us\en\e
  1126. X      2 ca\en\e
  1127. X      3 uk de nl fi fr eu.net\en\e
  1128. X    100 au nz jp
  1129. .ad
  1130. .fi
  1131. X
  1132. This means that all the US domains are ordered first, then Canada,
  1133. then several European countries. Hosts in Australia, New Zealand, and
  1134. Japan are ordered
  1135. .I after
  1136. any unknown (i.e. non-matching) hosts.
  1137. .PP
  1138. For more details, see the description of the
  1139. .B hostWeights
  1140. non-widget resource in the REFERENCE MANUAL section.
  1141. .\"    -    -    -    -    -    -    -    -
  1142. .SH "  Nice level"
  1143. .PP
  1144. The "Nice Level" item deserves special mention. As mentioned in the
  1145. "About Archie" section, Archie servers run on machines that must be
  1146. shared between other
  1147. Archie
  1148. users and even other "real" users. This item allows you to voluntarily
  1149. lower the priority of your request, just like the
  1150. .IR nice (1)
  1151. command does for Unix. The menu provides some recommended values and
  1152. you can enter arbitrary values in the text item. If you are searching
  1153. with a large number of matches requested, please increase your nice
  1154. level.
  1155. .PP
  1156. Note that, like
  1157. .IR nice (1),
  1158. nicing a job does not mean your job won't affect others.  In
  1159. particular, once your job begins it is not pre-empted, thus you should
  1160. still avoid long jobs during peak periods. You should especially avoid
  1161. queries for items of only personal interest (you know what we mean)
  1162. during these periods. As stated above, abusers of the service may find
  1163. their access revoked without notice.
  1164. .\"    -    -    -    -    -    -    -    -
  1165. .SH "  Other Query Settings"
  1166. .PP
  1167. The following items set parameters of your query to the Archie server.
  1168. .IP "Max Hits:"
  1169. the limit on the number of successful matches that will be
  1170. returned.
  1171. .IP "Initial Timeout:"
  1172. the length of the first timeout interval in seconds.
  1173. .IP "Retries:"
  1174. the number of times to retry a query if it times out, doubling the
  1175. timeout each retry.
  1176. .PP
  1177. These items are Text items that allow you to edit their values.
  1178. .PP
  1179. The item labelled "Auto-Scroll Browser" controls whether the browser
  1180. scrolls after an item is selected. Setting this to "yes" is useful
  1181. when browsing a long list of matches. It can be annoying if you're
  1182. doing more selective browsing, so set it to "no" in those cases.
  1183. .\"    -    -    -    -    -    -    -    -
  1184. .SH "  FTP settings"
  1185. .PP
  1186. The following items allow you to set parameters of file retrieval. You
  1187. should be sure they are appropriately set before retrieving files
  1188. using either "Open" or "Get".
  1189. .IP "FTP Email Address:"
  1190. Specifies the password used for anonymous FTP login. By convention,
  1191. users logging in as "anonymous" send their email address as the
  1192. password. Some servers enforce this by checking the address. The
  1193. default may not be appropriate depending on what information Xarchie
  1194. could glean from your system about its address. You can set the
  1195. environment variables
  1196. .B USER
  1197. and
  1198. .B HOSTNAME
  1199. to override the system's
  1200. information, or see the description of the
  1201. .B ftpMailAddress
  1202. non-widget resource in the REFERENCE MANUAL.
  1203. .IP "FTP Local Directory:"
  1204. Specifies the directory into which files will be retrieved using
  1205. "Get".
  1206. .IP "FTP Transfer Type:"
  1207. Provides a menu from which you can select "ascii" or "binary" mode
  1208. transfer for files retrieved with "Get". Files retrieved with "Open"
  1209. are always retrieved in ascii mode.
  1210. .IP "FTP Prompt:"
  1211. Provides a menu allowing you to enable or disable prompting during
  1212. multi-file transfers.
  1213. .IP "Trace FTP Transfers:"
  1214. Since FTP transfers are susceptible to timeouts and other confusions,
  1215. this item allows you to monitor any FTP interactions. If tracing is
  1216. enabled, then invoking "Open" or "Get" on a file will popup a trace
  1217. window that displays a running log of the FTP session as it happens.
  1218. Using this successfully requires that you understand something about
  1219. how FTP works, which is beyond the scope of this document.
  1220. .IP "Strip CR"
  1221. If this option is enabled, then carriage returns are removed from
  1222. ASCII-mode files. This is usually desirable when transferring to a
  1223. Unix machine.
  1224. .\"    -    -    -    -    -    -    -    -
  1225. .SH "  Querying Hosts and Locations"
  1226. .PP
  1227. The Query Menu provides two other types of queries besides the "Query
  1228. Item" described in the "Basic Usage" section for querying the Archie
  1229. database.
  1230. .PP
  1231. Selecting "Query Host" will use the hostname in the "Host" Text item
  1232. on the bottom pane and will fill the browser with the contents of the
  1233. root of its FTP directory. From then on, interaction is as previously
  1234. described. The host to query can be in the "Host" item as a result of
  1235. selecting a host in the browser, or you can type directly into the
  1236. item the name of the host that you wish to open. Typing Return in the
  1237. "Host" item is equivalent to selecting "Query Host" from the Query
  1238. Menu.
  1239. .PP
  1240. Querying locations by selecting "Query Location" is similar: the
  1241. Archie server is queried for the contents of the directory given by
  1242. the "Location" item on the host given by the "Host" item. The browser
  1243. is filled in with the results of the query (i.e., the contents of the
  1244. directory). As before, you can type the name of the location into the
  1245. "Location" item if you wish, and typing Return there is the same as
  1246. invoking "Query Location".
  1247. .PP
  1248. Note that because the Archie database is only updated periodically,
  1249. some files returned by Archie may not exist when you attempt to
  1250. retrieve them. Similarly, recently added files may exist on the host
  1251. but not in the Archie database.
  1252. .\"===========================================================
  1253. .SH "REFERENCE MANUAL"
  1254. .PP
  1255. This section provides all the information you should need to customize
  1256. XXarchie. Command-line options, non-widget resources, widget
  1257. hierarchies, translations actions, and other information are all
  1258. provided. It is assumed that you understand enough about X
  1259. applications to understand this.
  1260. .\"----------------------------------------------------------
  1261. .SH " Command-line Options"
  1262. .PP
  1263. The following non-widget resources can be set from the command-line or
  1264. in a resource file. As usual, when given on the command line they can
  1265. be abbreviated to their shortest unique prefix, often the first
  1266. letter.  Furthermore Xarchie accepts all the standard X Toolkit
  1267. options (see
  1268. .IR X (1)).
  1269. .\"    -    -    -    -    -    -    -    -
  1270. .IP "\fB-host\fP host"
  1271. Sets the host to which Archie queries will be sent. Please be careful
  1272. to use the nearest possible host.  You can specify hostnames using
  1273. either the symbolic name or by giving its numeric IP address (four
  1274. octets separated by periods). In either case, you can specify the port
  1275. at which the Prospero server should be contacted by giving it in
  1276. parentheses immediately following the hostname (no spaces).
  1277. .IP
  1278. The default is "archie.sura.net(1526)". This option corresponds to
  1279. the
  1280. .B archieHost
  1281. resource.
  1282. .\"    -    -    -    -    -    -    -    -
  1283. .IP "\fB-search\fP type"
  1284. Sets the search mode for Archie queries. The type can be one of
  1285. .IR exact ,
  1286. .IR substr ,
  1287. .IR subcase ,
  1288. .IR regexp ,
  1289. .IR exactSubstr ,
  1290. .IR exactSubcase ,
  1291. or
  1292. .IR exactRegexp .
  1293. See the section describing the Settings Panel in the USER'S GUIDE for
  1294. a description of the various search types.  The default search mode is
  1295. .IR exact .
  1296. This option corresponds to the
  1297. .B searchType
  1298. resource.
  1299. .\"    -    -    -    -    -    -    -    -
  1300. .IP "\fB-e\fP"
  1301. Equivalent to "\fB-search\ exact\fP".
  1302. .IP "\fB-s\fP"
  1303. Equivalent to "\fB-search\ substr\fP".
  1304. .IP "\fB-c\fP"
  1305. Equivalent to "\fB-search\ subcase\fP".
  1306. .IP "\fB-r\fP"
  1307. Equivalent to "\fB-search\ regexp\fP".
  1308. .IP "\fB-es\fP"
  1309. Equivalent to "\fB-search\ exactSubstr\fP".
  1310. .IP "\fB-ec\fP"
  1311. Equivalent to "\fB-search\ exactSsubcase\fP".
  1312. .IP "\fB-er\fP"
  1313. Equivalent to "\fB-search\ exactRegexp\fP".
  1314. .\"    -    -    -    -    -    -    -    -
  1315. .IP "\fB-sort\fP type"
  1316. Sets the sort mode for displaying Archie responses. The type can be
  1317. one of
  1318. .IR name ,
  1319. .IR date ,
  1320. or
  1321. .IR weight .
  1322. See the section describing the Settings Panel in the USER'S GUIDE for a
  1323. description of the various sort types.  This option corresponds to the
  1324. .B sortType
  1325. resource.
  1326. .\"    -    -    -    -    -    -    -    -
  1327. .IP "\fB-t\fP"
  1328. Equivalent to "\fB-sort\ date\fP".
  1329. .IP "\fB-w\fP"
  1330. Equivalent to "\fB-sort\ weight\fP".
  1331. .\"    -    -    -    -    -    -    -    -
  1332. .IP "\fB-maxHits\fP num"
  1333. Sets the maximum number of matches allowed per query. This option
  1334. corresponds to the
  1335. .B maxHits
  1336. resource.
  1337. .\"    -    -    -    -    -    -    -    -
  1338. .IP "\fB-offset\fP num"
  1339. Sets the offset of the Prospero query. This option corresponds to the
  1340. .B offset
  1341. resource.
  1342. .\"    -    -    -    -    -    -    -    -
  1343. .IP "\fB-nice\fP level or \fB-N\fP level"
  1344. Sets the query niceness level. Higher numbers are nicer, up to a
  1345. maximum niceness of 32765. The default niceness is 0. This option
  1346. corresponds to the
  1347. .B niceLevel
  1348. resource.
  1349. .\"    -    -    -    -    -    -    -    -
  1350. .IP "\fB-noscroll\fP"
  1351. By default, Xarchie scrolls the browser lists automatically when you
  1352. select items. This usually makes it easier to scan through the results
  1353. of queries but can be annoying. This option turns off the automatic
  1354. scrolling. It corresponds to the
  1355. .B autoScroll
  1356. resource.
  1357. .IP "\fB\-mono\fP or \fB\-gray\fP or \fB\-color\fP"
  1358. By default, Xarchie will determine the visual type of your display and
  1359. use the proper color resources. If it gets it wrong, you can override
  1360. the default by specifying one of these options. They correspond to the
  1361. .B visualType
  1362. resource.
  1363. .\"    -    -    -    -    -    -    -    -
  1364. .IP "\fB-debug\fP level or \fB-D\fP level"
  1365. Sets the Prospero debugging level. Higher numbers mean more verbose
  1366. messages.
  1367. This option corresponds to the
  1368. .B debugLevel
  1369. resource.
  1370. .I Xarchie
  1371. must be specially compiled for this option to have any effect (see the
  1372. Imakefile or your local installer).
  1373. .\"    -    -    -    -    -    -    -    -
  1374. .IP "\fB-help\fP or \fB-?\fP"
  1375. Prints the usage message summarizing Xarchie options.
  1376. .\"----------------------------------------------------------
  1377. .SH " Non-widget Resources"
  1378. .PP
  1379. .I Xarchie
  1380. has a default set of resources built in. If you wish to customize the
  1381. tool, take a copy of the default application defaults file (see the
  1382. section "Files", below) and modify it. Then, before invoking Xarchie,
  1383. set the environment variable
  1384. .B XAPPLRESDIR
  1385. to the directory containing your private copy. Alternatively, you can place
  1386. entries in your .Xdefaults file or provide them with the
  1387. .B -xrm
  1388. toolkit option (see
  1389. .IR X (1)).
  1390. Most of the following resources can also be set using the command-line
  1391. options described in the previous section.
  1392. .\"    -    -    -    -    -    -    -    -
  1393. .SH "  Query Resources"
  1394. .IP "\fBarchieHost\fP"
  1395. Sets the host to which Archie queries will be sent. Please be careful
  1396. to use the nearest possible host. The default is "archie.sura.net".
  1397. This resource can be set with the
  1398. .B \-host
  1399. option or on the Settings Panel.
  1400. .IP
  1401. You can specify hostnames using either the symbolic name or by giving
  1402. its numeric IP address (four octets separated by periods). In either
  1403. case, you can specify the port at which the Prospero server should be
  1404. contacted by giving it in parentheses immediately following the
  1405. hostname (no spaces).
  1406. .\"    -    -    -    -    -    -    -    -
  1407. .IP "\fBsearchType\fP"
  1408. Sets the search mode for Archie queries. This can be one of
  1409. .IR exact ,
  1410. .IR substr ,
  1411. .IR subcase ,
  1412. .IR regexp ,
  1413. .IR exactSubstr ,
  1414. .IR exactSubcase ,
  1415. or
  1416. .IR exactRegexp .
  1417. See the section describing the Settings Panel in the USER'S GUIDE for
  1418. a description of the various search types.  The default search mode is
  1419. .IR exact .
  1420. SHAR_EOF
  1421. true || echo 'restore of xarchie-2.0.6/xarchie.man failed'
  1422. fi
  1423. echo 'End of xarchie-2.0.6 part 17'
  1424. echo 'File xarchie-2.0.6/xarchie.man is continued in part 18'
  1425. echo 18 > _shar_seq_.tmp
  1426. exit 0
  1427.  
  1428. exit 0 # Just in case...
  1429. -- 
  1430.   // chris@IMD.Sterling.COM       | Send comp.sources.x submissions to:
  1431. \X/  Amiga - The only way to fly! |    sources-x@imd.sterling.com
  1432.  "It's intuitively obvious to the |
  1433.   most casual observer..."        | GCS d+/-- p+ c++ l+ m+ s++/+ g+ w+ t+ r+ x+
  1434.