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

  1. Newsgroups: comp.sources.x
  2. From: ferguson@cs.rochester.edu (George Ferguson)
  3. Subject: v20i040:  xarchie - An X browser interface to Archie, v2.0.6, Part12/24
  4. Message-ID: <1993Jun15.223339.726@sparky.imd.sterling.com>
  5. X-Md4-Signature: 70cd40fc03f3f075291a975299592dec
  6. Sender: chris@sparky.imd.sterling.com (Chris Olson)
  7. Organization: Sterling Software
  8. Date: Tue, 15 Jun 1993 22:33:39 GMT
  9. Approved: chris@sparky.imd.sterling.com
  10.  
  11. Submitted-by: ferguson@cs.rochester.edu (George Ferguson)
  12. Posting-number: Volume 20, Issue 40
  13. Archive-name: xarchie/part12
  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/part12
  19.  
  20. #!/bin/sh
  21. # this is Part.12 (part 12 of xarchie-2.0.6)
  22. # do not concatenate these parts, unpack them in order with /bin/sh
  23. # file xarchie-2.0.6/hostname.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" != 12; 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/hostname.c'
  39. else
  40. echo 'x - continuing file xarchie-2.0.6/hostname.c'
  41. sed 's/^X//' << 'SHAR_EOF' >> 'xarchie-2.0.6/hostname.c' &&
  42. X    else if (gethostname(hostname,sizeof(hostname)) != 0) {
  43. X    fprintf(stderr,"gethostname failed -- you should set $HOSTNAME");
  44. X    strcpy(hostname,"unknown.host");
  45. X    } else if ((host=gethostbyname(hostname)) == NULL) {
  46. X    fprintf(stderr,"gethostbyname failed -- you should set $HOSTNAME");
  47. X    strcpy(hostname,"unknown.host");
  48. X    } else {
  49. X    strcpy(hostname,host->h_name);
  50. X    }
  51. X    return(hostname);
  52. }
  53. X
  54. #ifdef STANDALONE
  55. main()
  56. {
  57. X    printf("%s\n",GetHostname());
  58. X    exit(0);
  59. }
  60. #endif /* STANDALONE */
  61. X
  62. SHAR_EOF
  63. echo 'File xarchie-2.0.6/hostname.c is complete' &&
  64. chmod 0644 xarchie-2.0.6/hostname.c ||
  65. echo 'restore of xarchie-2.0.6/hostname.c failed'
  66. Wc_c="`wc -c < 'xarchie-2.0.6/hostname.c'`"
  67. test 1284 -eq "$Wc_c" ||
  68.     echo 'xarchie-2.0.6/hostname.c: original size 1284, current size' "$Wc_c"
  69. rm -f _shar_wnt_.tmp
  70. fi
  71. # ============= xarchie-2.0.6/hostname.h ==============
  72. if test -f 'xarchie-2.0.6/hostname.h' -a X"$1" != X"-c"; then
  73.     echo 'x - skipping xarchie-2.0.6/hostname.h (File already exists)'
  74.     rm -f _shar_wnt_.tmp
  75. else
  76. > _shar_wnt_.tmp
  77. echo 'x - extracting xarchie-2.0.6/hostname.h (Text)'
  78. sed 's/^X//' << 'SHAR_EOF' > 'xarchie-2.0.6/hostname.h' &&
  79. /*
  80. X * hostname.h : Definition of "portable" hostname function
  81. X *
  82. X * George Ferguson, ferguson@cs.rochester.edu, 23 Apr 1993.
  83. X */
  84. X
  85. extern char *GetHostname();
  86. SHAR_EOF
  87. chmod 0644 xarchie-2.0.6/hostname.h ||
  88. echo 'restore of xarchie-2.0.6/hostname.h failed'
  89. Wc_c="`wc -c < 'xarchie-2.0.6/hostname.h'`"
  90. test 158 -eq "$Wc_c" ||
  91.     echo 'xarchie-2.0.6/hostname.h: original size 158, current size' "$Wc_c"
  92. rm -f _shar_wnt_.tmp
  93. fi
  94. # ============= xarchie-2.0.6/inet_ntoa.c ==============
  95. if test -f 'xarchie-2.0.6/inet_ntoa.c' -a X"$1" != X"-c"; then
  96.     echo 'x - skipping xarchie-2.0.6/inet_ntoa.c (File already exists)'
  97.     rm -f _shar_wnt_.tmp
  98. else
  99. > _shar_wnt_.tmp
  100. echo 'x - extracting xarchie-2.0.6/inet_ntoa.c (Text)'
  101. sed 's/^X//' << 'SHAR_EOF' > 'xarchie-2.0.6/inet_ntoa.c' &&
  102. /* gf: Modified to use sprintf() rather than snprintf() */
  103. /*
  104. X * Copyright (c) 1983 Regents of the University of California.
  105. X * All rights reserved.
  106. X *
  107. X * Redistribution and use in source and binary forms, with or without
  108. X * modification, are permitted provided that the following conditions
  109. X * are met:
  110. X * 1. Redistributions of source code must retain the above copyright
  111. X *    notice, this list of conditions and the following disclaimer.
  112. X * 2. Redistributions in binary form must reproduce the above copyright
  113. X *    notice, this list of conditions and the following disclaimer in the
  114. X *    documentation and/or other materials provided with the distribution.
  115. X * 3. All advertising materials mentioning features or use of this software
  116. X *    must display the following acknowledgement:
  117. X *    This product includes software developed by the University of
  118. X *    California, Berkeley and its contributors.
  119. X * 4. Neither the name of the University nor the names of its contributors
  120. X *    may be used to endorse or promote products derived from this software
  121. X *    without specific prior written permission.
  122. X *
  123. X * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  124. X * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  125. X * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  126. X * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  127. X * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  128. X * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  129. X * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  130. X * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  131. X * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  132. X * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  133. X * SUCH DAMAGE.
  134. X */
  135. X
  136. #if defined(LIBC_SCCS) && !defined(lint)
  137. static char sccsid[] = "@(#)inet_ntoa.c    5.6 (Berkeley) 2/24/91";
  138. #endif /* LIBC_SCCS and not lint */
  139. X
  140. /*
  141. X * Convert network-format internet address
  142. X * to base 256 d.d.d.d representation.
  143. X */
  144. #include <sys/types.h>
  145. #include <netinet/in.h>
  146. #include <arpa/inet.h>
  147. #include <stdio.h>
  148. X
  149. char *
  150. inet_ntoa(in)
  151. X    struct in_addr in;
  152. {
  153. X    static char b[18];
  154. X    register char *p;
  155. X
  156. X    p = (char *)∈
  157. #define    UC(b)    (((int)b)&0xff)
  158. /* gf: Didn't want to use snprintf().
  159. X    (void)snprintf(b, sizeof(b),
  160. X        "%d.%d.%d.%d", UC(p[0]), UC(p[1]), UC(p[2]), UC(p[3]));
  161. X */
  162. X    (void)sprintf(b,
  163. X        "%d.%d.%d.%d", UC(p[0]), UC(p[1]), UC(p[2]), UC(p[3]));
  164. X    return (b);
  165. }
  166. SHAR_EOF
  167. chmod 0644 xarchie-2.0.6/inet_ntoa.c ||
  168. echo 'restore of xarchie-2.0.6/inet_ntoa.c failed'
  169. Wc_c="`wc -c < 'xarchie-2.0.6/inet_ntoa.c'`"
  170. test 2560 -eq "$Wc_c" ||
  171.     echo 'xarchie-2.0.6/inet_ntoa.c: original size 2560, current size' "$Wc_c"
  172. rm -f _shar_wnt_.tmp
  173. fi
  174. # ============= xarchie-2.0.6/m-defs.h ==============
  175. if test -f 'xarchie-2.0.6/m-defs.h' -a X"$1" != X"-c"; then
  176.     echo 'x - skipping xarchie-2.0.6/m-defs.h (File already exists)'
  177.     rm -f _shar_wnt_.tmp
  178. else
  179. > _shar_wnt_.tmp
  180. echo 'x - extracting xarchie-2.0.6/m-defs.h (Text)'
  181. sed 's/^X//' << 'SHAR_EOF' > 'xarchie-2.0.6/m-defs.h' &&
  182. /*
  183. X * menus.h : Defs for all the xarchie menus
  184. X *
  185. X * George Ferguson, ferguson@cs.rochester.edu, 23 Apr 1993.
  186. X */
  187. X
  188. extern void initFileMenu();
  189. X
  190. extern void initQueryMenu();
  191. X
  192. extern void initSettingsMenu();
  193. extern void updateSettingsMenuMarks();
  194. extern void setSearchMenuMark(),setSortMenuMark();
  195. extern void setNiceMenuMark(),setHostMenuMark();
  196. X
  197. extern void initFilePanelMenu();
  198. SHAR_EOF
  199. chmod 0644 xarchie-2.0.6/m-defs.h ||
  200. echo 'restore of xarchie-2.0.6/m-defs.h failed'
  201. Wc_c="`wc -c < 'xarchie-2.0.6/m-defs.h'`"
  202. test 379 -eq "$Wc_c" ||
  203.     echo 'xarchie-2.0.6/m-defs.h: original size 379, current size' "$Wc_c"
  204. rm -f _shar_wnt_.tmp
  205. fi
  206. # ============= xarchie-2.0.6/m-file-panel.c ==============
  207. if test -f 'xarchie-2.0.6/m-file-panel.c' -a X"$1" != X"-c"; then
  208.     echo 'x - skipping xarchie-2.0.6/m-file-panel.c (File already exists)'
  209.     rm -f _shar_wnt_.tmp
  210. else
  211. > _shar_wnt_.tmp
  212. echo 'x - extracting xarchie-2.0.6/m-file-panel.c (Text)'
  213. sed 's/^X//' << 'SHAR_EOF' > 'xarchie-2.0.6/m-file-panel.c' &&
  214. /*
  215. X * m-file-panel.c : Save-load-write menu routines
  216. X *
  217. X * George Ferguson, ferguson@cs.rochester.edu, 23 Apr 1993.
  218. X */
  219. X
  220. #include <X11/Intrinsic.h>
  221. #include <X11/Xaw/SimpleMenu.h>
  222. #include <X11/Xaw/SmeBSB.h>
  223. #include <X11/StringDefs.h>
  224. #include "menu.h"
  225. #include "appres.h"
  226. #include "file-panel.h"
  227. X
  228. /*
  229. X * Functions defined here:
  230. X */
  231. void initFilePanelMenu();
  232. static void fileWriteModeMenuCallback();
  233. X
  234. /*
  235. X * Data defined here:
  236. X */
  237. static Widget fileWriteModeMenu;
  238. static SmeBSBObject fileWriteModeMenuItems[2];
  239. X
  240. static Boolean fileWriteModeValues [] = {
  241. X    True, False
  242. };
  243. X
  244. /*    -    -    -    -    -    -    -    -    */
  245. X
  246. void
  247. initFilePanelMenu()
  248. {
  249. X    fileWriteModeMenu = createMenu("filePanelWriteModeMenu",
  250. X                   "filePanelWriteModeMenuItem",2,
  251. X                   fileWriteModeMenuItems,
  252. X                   fileWriteModeMenuCallback);
  253. }
  254. X
  255. /*    -    -    -    -    -    -    -    -    */
  256. /* Callback procedures */
  257. X
  258. /*ARGSUSED*/
  259. static void
  260. fileWriteModeMenuCallback(w,client_data,call_data)
  261. Widget w;
  262. XXtPointer client_data;    /* item */
  263. XXtPointer call_data;    /* ignored */
  264. {
  265. X    int item = (int)client_data;
  266. X
  267. X    setIthItemMark(fileWriteModeMenuItems,item,
  268. X           XtNumber(fileWriteModeMenuItems));
  269. X    appResources.fileWriteOnePerLine = fileWriteModeValues[item];
  270. X    updateFileWriteMode(appResources.fileWriteOnePerLine);
  271. }
  272. SHAR_EOF
  273. chmod 0644 xarchie-2.0.6/m-file-panel.c ||
  274. echo 'restore of xarchie-2.0.6/m-file-panel.c failed'
  275. Wc_c="`wc -c < 'xarchie-2.0.6/m-file-panel.c'`"
  276. test 1247 -eq "$Wc_c" ||
  277.     echo 'xarchie-2.0.6/m-file-panel.c: original size 1247, current size' "$Wc_c"
  278. rm -f _shar_wnt_.tmp
  279. fi
  280. # ============= xarchie-2.0.6/m-file.c ==============
  281. if test -f 'xarchie-2.0.6/m-file.c' -a X"$1" != X"-c"; then
  282.     echo 'x - skipping xarchie-2.0.6/m-file.c (File already exists)'
  283.     rm -f _shar_wnt_.tmp
  284. else
  285. > _shar_wnt_.tmp
  286. echo 'x - extracting xarchie-2.0.6/m-file.c (Text)'
  287. sed 's/^X//' << 'SHAR_EOF' > 'xarchie-2.0.6/m-file.c' &&
  288. /*
  289. X * m-file.c : File menu routines
  290. X *
  291. X * George Ferguson, ferguson@cs.rochester.edu, 23 Apr 1993.
  292. X */
  293. X
  294. #include <X11/Intrinsic.h>
  295. #include <X11/Xaw/SimpleMenu.h>
  296. #include <X11/Xaw/SmeBSB.h>
  297. #include <X11/StringDefs.h>
  298. #include "xarchie.h"
  299. #include "menu.h"
  300. X
  301. /*
  302. X * Functions defined here:
  303. X */
  304. void initFileMenu();
  305. static void fileMenuCallback();
  306. X
  307. /*
  308. X * Data defined here:
  309. X */
  310. static Widget fileMenu;
  311. X
  312. /*    -    -    -    -    -    -    -    -    */
  313. X
  314. void
  315. initFileMenu()
  316. {
  317. X    fileMenu = createMenu("fileMenu","fileMenuItem",7,NULL,
  318. X              fileMenuCallback);
  319. }
  320. X
  321. /* Callback procedure */
  322. X
  323. /*ARGSUSED*/
  324. static void
  325. fileMenuCallback(w,client_data,call_data)
  326. Widget w;
  327. XXtPointer client_data;    /* item */
  328. XXtPointer call_data;    /* ignored */
  329. {
  330. X    int item = (int)client_data;
  331. X
  332. X    switch (item) {
  333. X    case 0: /* About */
  334. X        XtCallActionProc(toplevel,"about",NULL,NULL,0);
  335. X        break;
  336. X    case 1: /* Open */
  337. X        XtCallActionProc(toplevel,"browser-open-all",NULL,NULL,0);
  338. X        break;
  339. X    case 2: /* Get */
  340. X        XtCallActionProc(toplevel,"ftp-get",NULL,NULL,0);
  341. X        break;
  342. X    case 3: /* Save */ 
  343. X        XtCallActionProc(toplevel,"file-save",NULL,NULL,0);
  344. X        break;
  345. X    case 4: /* Load */ 
  346. X        XtCallActionProc(toplevel,"file-load",NULL,NULL,0);
  347. X        break;
  348. X    case 5: /* Write */ 
  349. X        XtCallActionProc(toplevel,"file-write",NULL,NULL,0);
  350. X        break;
  351. X    case 6: /* Quit */
  352. X        XtCallActionProc(toplevel,"quit",NULL,NULL,0);
  353. X    }
  354. }
  355. SHAR_EOF
  356. chmod 0644 xarchie-2.0.6/m-file.c ||
  357. echo 'restore of xarchie-2.0.6/m-file.c failed'
  358. Wc_c="`wc -c < 'xarchie-2.0.6/m-file.c'`"
  359. test 1381 -eq "$Wc_c" ||
  360.     echo 'xarchie-2.0.6/m-file.c: original size 1381, current size' "$Wc_c"
  361. rm -f _shar_wnt_.tmp
  362. fi
  363. # ============= xarchie-2.0.6/m-query.c ==============
  364. if test -f 'xarchie-2.0.6/m-query.c' -a X"$1" != X"-c"; then
  365.     echo 'x - skipping xarchie-2.0.6/m-query.c (File already exists)'
  366.     rm -f _shar_wnt_.tmp
  367. else
  368. > _shar_wnt_.tmp
  369. echo 'x - extracting xarchie-2.0.6/m-query.c (Text)'
  370. sed 's/^X//' << 'SHAR_EOF' > 'xarchie-2.0.6/m-query.c' &&
  371. /*
  372. X * m-query.c : Query menu routines
  373. X *
  374. X * George Ferguson, ferguson@cs.rochester.edu, 23 Apr 1993.
  375. X */
  376. X
  377. #include <X11/Intrinsic.h>
  378. #include <X11/Xaw/SimpleMenu.h>
  379. #include <X11/Xaw/SmeBSB.h>
  380. #include <X11/StringDefs.h>
  381. #include "xarchie.h"
  382. #include "menu.h"
  383. X
  384. /*
  385. X * Functions defined here:
  386. X */
  387. void initQueryMenu();
  388. static void queryMenuCallback();
  389. X
  390. /*
  391. X * Data defined here:
  392. X */
  393. static Widget queryMenu;
  394. X
  395. /*    -    -    -    -    -    -    -    -    */
  396. X
  397. void
  398. initQueryMenu()
  399. {
  400. X    queryMenu = createMenu("queryMenu","queryMenuItem",3,NULL,
  401. X               queryMenuCallback);
  402. }
  403. X
  404. /* Callback procedure */
  405. X
  406. /*ARGSUSED*/
  407. static void
  408. queryMenuCallback(w,client_data,call_data)
  409. Widget w;
  410. XXtPointer client_data;    /* item */
  411. XXtPointer call_data;    /* ignored */
  412. {
  413. X    int item = (int)client_data;
  414. X
  415. X    switch (item) {
  416. X    case 0: /* Query term */
  417. X        XtCallActionProc(toplevel,"query",NULL,NULL,0);
  418. X        break;
  419. X    case 1: /* Query host */
  420. X        XtCallActionProc(toplevel,"query-host",NULL,NULL,0);
  421. X        break;
  422. X    case 2: /* Query location */
  423. X        XtCallActionProc(toplevel,"query-location",NULL,NULL,0);
  424. X        break;
  425. X    }
  426. }
  427. SHAR_EOF
  428. chmod 0644 xarchie-2.0.6/m-query.c ||
  429. echo 'restore of xarchie-2.0.6/m-query.c failed'
  430. Wc_c="`wc -c < 'xarchie-2.0.6/m-query.c'`"
  431. test 1072 -eq "$Wc_c" ||
  432.     echo 'xarchie-2.0.6/m-query.c: original size 1072, current size' "$Wc_c"
  433. rm -f _shar_wnt_.tmp
  434. fi
  435. # ============= xarchie-2.0.6/m-settings.c ==============
  436. if test -f 'xarchie-2.0.6/m-settings.c' -a X"$1" != X"-c"; then
  437.     echo 'x - skipping xarchie-2.0.6/m-settings.c (File already exists)'
  438.     rm -f _shar_wnt_.tmp
  439. else
  440. > _shar_wnt_.tmp
  441. echo 'x - extracting xarchie-2.0.6/m-settings.c (Text)'
  442. sed 's/^X//' << 'SHAR_EOF' > 'xarchie-2.0.6/m-settings.c' &&
  443. /*
  444. X * m-settings.c : Settings menu routines
  445. X *
  446. X * George Ferguson, ferguson@cs.rochester.edu, 23 Apr 1993.
  447. X */
  448. X
  449. #include <X11/Intrinsic.h>
  450. #include <X11/Xaw/SimpleMenu.h>
  451. #include <X11/Xaw/SmeBSB.h>
  452. #include <X11/StringDefs.h>
  453. #include <X11/IntrinsicP.h>    /* Need rectangle part of SmeBSBObject */
  454. #include <X11/Xaw/SmeBSBP.h>    /* See below, popupSubmenuAction()     */
  455. #include "stringdefs.h"
  456. #include "menu.h"
  457. #include "xarchie.h"
  458. #include "types.h"
  459. #include "appres.h"
  460. #include "browser.h"
  461. #include "settings.h"
  462. #include "status.h"
  463. X
  464. /*
  465. X * Functions defined here:
  466. X */
  467. void initSettingsMenu();
  468. void updateSettingsMenuMarks();
  469. void setHostMenuMark(),setSearchMenuMark(),setSortMenuMark(),setNiceMenuMark();
  470. X
  471. static void settingsSubmenuAction();
  472. static void settingsMenuCallback();
  473. static void hostMenuCallback(),searchMenuCallback();
  474. static void sortMenuCallback(),niceMenuCallback();
  475. static void setHostMenuCallback(),setSearchMenuCallback();
  476. static void setSortMenuCallback(),setNiceMenuCallback();
  477. static void setAutoScrollMenuCallback();
  478. static void ftpTypeMenuCallback(),ftpPromptMenuCallback();
  479. static void ftpTraceMenuCallback(),ftpStripMenuCallback();
  480. X
  481. /*
  482. X * Data defined here:
  483. X */
  484. static Widget settingsMenu;
  485. static Widget hostMenu,searchMenu,sortMenu,niceMenu;
  486. static Widget setHostMenu,setSearchMenu,setSortMenu,setNiceMenu;
  487. static Widget setAutoScrollMenu;
  488. static Widget ftpTypeMenu,ftpPromptMenu,ftpTraceMenu,ftpStripMenu;
  489. static SmeBSBObject settingsMenuItems[5];
  490. static SmeBSBObject *hostMenuItems,searchMenuItems[7];
  491. static SmeBSBObject sortMenuItems[3],niceMenuItems[6];
  492. X
  493. static SearchType searchValues[] = {
  494. X    GfExact, GfSubstr, GfSubcase, GfRegexp,
  495. X    GfExactSubstr, GfExactSubcase, GfExactRegexp
  496. };
  497. static SortType sortValues[] = {
  498. X    GfName, GfDate, GfWeight
  499. };
  500. static int niceValues[] = {
  501. X /* Default, Nice, Nicer, Very Nice, Extremely Nice, Nicest */
  502. X    0,       500,  1000,  5000,      10000,          32765
  503. };
  504. static Boolean autoScrollValues[] = {
  505. X    True, False
  506. };
  507. X
  508. static char *ftpTypeValues[] = {
  509. X    "binary", "ascii"
  510. };
  511. static Boolean ftpPromptValues[] = {
  512. X    True, False
  513. };
  514. static Boolean ftpTraceValues[] = {
  515. X    True, False
  516. };
  517. static Boolean ftpStripValues[] = {
  518. X    True, False
  519. };
  520. X
  521. static XtActionsRec actionTable[] = {
  522. X    { "settings-submenu",        settingsSubmenuAction },
  523. };
  524. X
  525. /*    -    -    -    -    -    -    -    -    */
  526. X
  527. void
  528. initSettingsMenu()
  529. {
  530. X    /* Add action for popup submenus */
  531. X    XtAppAddActions(appContext,actionTable,XtNumber(actionTable));
  532. X    /* This is the main Settings menu */
  533. X    settingsMenu = createMenu("settingsMenu","settingsMenuItem",5,
  534. X                  settingsMenuItems,settingsMenuCallback);
  535. X    /* Special case for hostMenu so it's easy to change */
  536. X    hostMenuItems = (SmeBSBObject *)XtCalloc(appResources.numHosts,
  537. X                         sizeof(SmeBSBObject));
  538. X    hostMenu = createMenu("hostMenu","hostMenuItem",
  539. X              appResources.numHosts,hostMenuItems,
  540. X              hostMenuCallback);
  541. X    setHostMenu = createMenu("setHostMenu","hostMenuItem",
  542. X                 appResources.numHosts,NULL,
  543. X                 setHostMenuCallback);
  544. X    /* These are submenus of the Settings menu */
  545. X    searchMenu = createMenu("searchMenu","searchMenuItem",7,searchMenuItems,
  546. X                searchMenuCallback);
  547. X    sortMenu = createMenu("sortMenu","sortMenuItem",3,sortMenuItems,
  548. X              sortMenuCallback);
  549. X    niceMenu = createMenu("niceMenu","niceMenuItem",6,niceMenuItems,
  550. X              niceMenuCallback);
  551. X    /* These are for the settings panel (same labels, different callbacks) */
  552. X    setSearchMenu = createMenu("setSearchMenu","searchMenuItem",7,NULL,
  553. X                   setSearchMenuCallback);
  554. X    setSortMenu = createMenu("setSortMenu","sortMenuItem",3,NULL,
  555. X                 setSortMenuCallback);
  556. X    setNiceMenu = createMenu("setNiceMenu","niceMenuItem",6,NULL,
  557. X                 setNiceMenuCallback);
  558. X    setAutoScrollMenu = createMenu("setAutoScrollMenu","setAutoScrollMenuItem",
  559. X                   2,NULL,setAutoScrollMenuCallback);
  560. X    ftpTypeMenu = createMenu("ftpTypeMenu","ftpTypeMenuItem",2,
  561. X                 NULL,ftpTypeMenuCallback);
  562. X    ftpPromptMenu = createMenu("ftpPromptMenu","ftpPromptMenuItem",2,
  563. X                   NULL,ftpPromptMenuCallback);
  564. X    ftpTraceMenu = createMenu("ftpTraceMenu","ftpTraceMenuItem",2,
  565. X                   NULL,ftpTraceMenuCallback);
  566. X    ftpStripMenu = createMenu("ftpStripMenu","ftpStripMenuItem",2,
  567. X                   NULL,ftpStripMenuCallback);
  568. X    /* Initialize the menu marks */
  569. X    updateSettingsMenuMarks();
  570. }
  571. X
  572. /*    -    -    -    -    -    -    -    -    */
  573. /* Action procedures */
  574. X
  575. /*
  576. X * This function expects to be called from a BtnMotion event in the
  577. X * settingsMenu ONLY. It looks after popping up the submenus, but only
  578. X * if we've pulled right at least a bit.
  579. X */
  580. /*ARGSUSED*/
  581. static void
  582. settingsSubmenuAction(widget,event,params,num_params)
  583. Widget widget;
  584. XXEvent *event;
  585. String *params;
  586. Cardinal *num_params;
  587. {
  588. X    Arg args[2];
  589. X    Widget parent,popup;
  590. X    Window root,child;
  591. X    int x,y,cx,cy,item,item_y;
  592. X    Dimension w,h,item_h;
  593. X    unsigned int buttons;
  594. X
  595. X    /* Where'd the event occur? */
  596. X    x = event->xmotion.x;
  597. X    y = event->xmotion.y;
  598. X    /* Check that it's in the menu */
  599. X    XtSetArg(args[0],XtNwidth,&w);
  600. X    XtSetArg(args[1],XtNheight,&h);
  601. X    XtGetValues(widget,args,2);
  602. X    if (x < 0 || x >= (int)w || y < 0 || y >= (int)h)
  603. X        return;
  604. X    /* Check that we've pulled right */
  605. X    if (x < (int)w/2)
  606. X    return;
  607. X    /* It is, figure out which item it's in */
  608. X    for (item=0; item < 4; item++) {
  609. X    /* Can't do GetValues on XtNy, for some reason. Oh well. */
  610. X    /* This is why we need those private header files above. */
  611. X    item_y = settingsMenuItems[item]->rectangle.y;
  612. X    item_h = settingsMenuItems[item]->rectangle.height;
  613. X    if (item_y < y && item_y + (int)item_h > y)
  614. X        break;
  615. X    }
  616. X    /* Some items have popups, some don't */
  617. X    switch (item) {
  618. X    case 0: popup = hostMenu;
  619. X        break;
  620. X    case 1: popup = searchMenu;
  621. X        break;
  622. X    case 2: popup = sortMenu;
  623. X        break;
  624. X    case 3: popup = niceMenu;
  625. X        break;
  626. X    default: return;
  627. X    }
  628. X    parent = XtParent(widget);
  629. X    XQueryPointer(display,XtWindow(parent),
  630. X          &root,&child,&x,&y,&cx,&cy,&buttons);
  631. X    /* Put the mouse solidly in the window */
  632. X    x -= 20;
  633. X    y -= 20;
  634. X    /* Position the menu */
  635. X    XtSetArg(args[0],XtNx,x);
  636. X    XtSetArg(args[1],XtNy,y);
  637. X    XtSetValues(popup,args,2);
  638. X    /* Pop it up */
  639. X    XtPopup(popup,XtGrabExclusive);
  640. }
  641. X
  642. /*    -    -    -    -    -    -    -    -    */
  643. /* Callback procedures */
  644. X
  645. /*ARGSUSED*/
  646. static void
  647. settingsMenuCallback(w,client_data,call_data)
  648. Widget w;
  649. XXtPointer client_data;    /* item */
  650. XXtPointer call_data;    /* ignored */
  651. {
  652. X    int item = (int)client_data;
  653. X
  654. X    switch (item) {
  655. X    case 0: /* Archie Host */
  656. X    case 1: /* Search Type */
  657. X    case 2: /* Sort Type */
  658. X    case 3: /* Nice Level */
  659. X        break;
  660. X    case 4: /* Other */
  661. X        item = 0;
  662. X        XtCallActionProc((Widget)w,"popup-settings",(XEvent*)NULL,
  663. X                 (String*)NULL,item);
  664. X        break;
  665. X    }
  666. }
  667. X
  668. /*ARGSUSED*/
  669. static void
  670. hostMenuCallback(w,client_data,call_data)
  671. Widget w;
  672. XXtPointer client_data;    /* item */
  673. XXtPointer call_data;    /* ignored */
  674. {
  675. X    int item = (int)client_data;
  676. X    Arg args[1];
  677. X    char *str,*blank,c;
  678. X
  679. X    setIthItemMark(hostMenuItems,item,appResources.numHosts);
  680. X    XtSetArg(args[0],XtNlabel,&str);
  681. X    XtGetValues((Widget)(hostMenuItems[item]),args,1);
  682. X    if ((blank=index(str,' ')) != NULL) {
  683. X    c = *blank;
  684. X    *blank = '\0';
  685. X    }
  686. X    XtFree(appResources.archieHost);
  687. X    appResources.archieHost = XtNewString(str);
  688. X    if (blank != NULL)
  689. X    *blank = c;
  690. X    updateSettingsHost(appResources.archieHost);
  691. X    status1("Set archie host to %s",appResources.archieHost);
  692. }
  693. X
  694. /*ARGSUSED*/
  695. static void
  696. searchMenuCallback(w,client_data,call_data)
  697. Widget w;
  698. XXtPointer client_data;    /* item */
  699. XXtPointer call_data;    /* ignored */
  700. {
  701. X    int item = (int)client_data;
  702. X
  703. X    setIthItemMark(searchMenuItems,item,XtNumber(searchMenuItems));
  704. X    appResources.searchType = searchValues[item];
  705. X    updateSettingsSearchType(appResources.searchType);
  706. X    status1("Set search type to %s",
  707. X        searchTypeToString(appResources.searchType));
  708. }
  709. X
  710. /*ARGSUSED*/
  711. static void
  712. sortMenuCallback(w,client_data,call_data)
  713. Widget w;
  714. XXtPointer client_data;    /* item */
  715. XXtPointer call_data;    /* ignored */
  716. {
  717. X    int item = (int)client_data;
  718. X
  719. X    setIthItemMark(sortMenuItems,item,XtNumber(sortMenuItems));
  720. X    appResources.sortType = sortValues[item];
  721. X    updateSettingsSortType(appResources.sortType);
  722. X    resortBrowser();
  723. X    status1("Set sort type to %s",sortTypeToString(appResources.sortType));
  724. }
  725. X
  726. /*ARGSUSED*/
  727. static void
  728. niceMenuCallback(w,client_data,call_data)
  729. Widget w;
  730. XXtPointer client_data;    /* item */
  731. XXtPointer call_data;    /* ignored */
  732. {
  733. X
  734. X    int item = (int)client_data;
  735. X
  736. X    setIthItemMark(niceMenuItems,item,XtNumber(niceMenuItems));
  737. X    appResources.niceLevel = niceValues[item];
  738. X    updateSettingsNiceLevel(appResources.niceLevel);
  739. X    status1("Set nice level to %d",(char *)appResources.niceLevel);
  740. }
  741. X
  742. /*ARGSUSED*/
  743. static void
  744. setHostMenuCallback(w,client_data,call_data)
  745. Widget w;
  746. XXtPointer client_data;    /* item */
  747. XXtPointer call_data;    /* ignored */
  748. {
  749. X    int item = (int)client_data;
  750. X    Arg args[1];
  751. X    char *str,*blank,c;
  752. X
  753. X    XtSetArg(args[0],XtNlabel,&str);
  754. X    XtGetValues((Widget)(hostMenuItems[item]),args,1);
  755. X    if ((blank=index(str,' ')) != NULL) {
  756. X    c = *blank;
  757. X    *blank = '\0';
  758. X    }
  759. X    updateSettingsHost(str);
  760. X    if (blank != NULL)
  761. X    *blank = c;
  762. X    setSettingsChangedFlag(True);
  763. }
  764. X
  765. /*ARGSUSED*/
  766. static void
  767. setSearchMenuCallback(w,client_data,call_data)
  768. Widget w;
  769. XXtPointer client_data;    /* item */
  770. XXtPointer call_data;    /* ignored */
  771. {
  772. X    int item = (int)client_data;
  773. X
  774. X    updateSettingsSearchType(searchValues[item]);
  775. X    setSettingsChangedFlag(True);
  776. }
  777. X
  778. /*ARGSUSED*/
  779. static void
  780. setSortMenuCallback(w,client_data,call_data)
  781. Widget w;
  782. XXtPointer client_data;    /* item */
  783. XXtPointer call_data;    /* ignored */
  784. {
  785. X    int item = (int)client_data;
  786. X
  787. X    updateSettingsSortType(sortValues[item]);
  788. X    setSettingsChangedFlag(True);
  789. }
  790. X
  791. /*ARGSUSED*/
  792. static void
  793. setNiceMenuCallback(w,client_data,call_data)
  794. Widget w;
  795. XXtPointer client_data;    /* item */
  796. XXtPointer call_data;    /* ignored */
  797. {
  798. X    int item = (int)client_data;
  799. X
  800. X    updateSettingsNiceLevel(niceValues[item]);
  801. X    setSettingsChangedFlag(True);
  802. }
  803. X
  804. /*ARGSUSED*/
  805. static void
  806. setAutoScrollMenuCallback(w,client_data,call_data)
  807. Widget w;
  808. XXtPointer client_data;    /* item */
  809. XXtPointer call_data;    /* ignored */
  810. {
  811. X    int item = (int)client_data;
  812. X
  813. X    updateSettingsAutoScroll(autoScrollValues[item]);
  814. X    setSettingsChangedFlag(True);
  815. }
  816. X
  817. /*ARGSUSED*/
  818. static void
  819. ftpTypeMenuCallback(w,client_data,call_data)
  820. Widget w;
  821. XXtPointer client_data;    /* item */
  822. XXtPointer call_data;    /* ignored */
  823. {
  824. X    int item = (int)client_data;
  825. X
  826. X    updateSettingsFtpType(ftpTypeValues[item]);
  827. X    setSettingsChangedFlag(True);
  828. }
  829. X
  830. /*ARGSUSED*/
  831. static void
  832. ftpPromptMenuCallback(w,client_data,call_data)
  833. Widget w;
  834. XXtPointer client_data;    /* item */
  835. XXtPointer call_data;    /* ignored */
  836. {
  837. X    int item = (int)client_data;
  838. X
  839. X    updateSettingsFtpPrompt(ftpPromptValues[item]);
  840. X    setSettingsChangedFlag(True);
  841. }
  842. X
  843. /*ARGSUSED*/
  844. static void
  845. ftpTraceMenuCallback(w,client_data,call_data)
  846. Widget w;
  847. XXtPointer client_data;    /* item */
  848. XXtPointer call_data;    /* ignored */
  849. {
  850. X    int item = (int)client_data;
  851. X
  852. X    updateSettingsFtpTrace(ftpTraceValues[item]);
  853. X    setSettingsChangedFlag(True);
  854. }
  855. X
  856. /*ARGSUSED*/
  857. static void
  858. ftpStripMenuCallback(w,client_data,call_data)
  859. Widget w;
  860. XXtPointer client_data;    /* item */
  861. XXtPointer call_data;    /* ignored */
  862. {
  863. X    int item = (int)client_data;
  864. X
  865. X    updateSettingsFtpStrip(ftpStripValues[item]);
  866. X    setSettingsChangedFlag(True);
  867. }
  868. X
  869. /*    -    -    -    -    -    -    -    -    */
  870. X
  871. void
  872. updateSettingsMenuMarks()
  873. {
  874. X    setHostMenuMark(appResources.archieHost);
  875. X    setSearchMenuMark(appResources.searchType);
  876. X    setSortMenuMark(appResources.sortType);
  877. X    setNiceMenuMark(appResources.niceLevel);
  878. }
  879. X
  880. void
  881. setHostMenuMark(host)
  882. char *host;
  883. {
  884. X    Arg args[1];
  885. X    char *str;
  886. X    int i;
  887. X
  888. X    for (i=0; i < appResources.numHosts; i++) {
  889. X    XtSetArg(args[0],XtNlabel,&str);
  890. X    XtGetValues((Widget)(hostMenuItems[i]),args,1);
  891. X    if (strncmp(str,host,strlen(host)) == 0)
  892. X        break;
  893. X    }
  894. X    if (i < appResources.numHosts)
  895. X    setIthItemMark(hostMenuItems,i,appResources.numHosts);
  896. X    else
  897. X    clearAllItemMarks(hostMenuItems,appResources.numHosts);
  898. }
  899. X
  900. void
  901. setSearchMenuMark(type)
  902. SearchType type;
  903. {
  904. X    int i;
  905. X
  906. X    for (i=0; i < XtNumber(searchValues) && searchValues[i] != type; i++)
  907. X    /*EMPTY*/;
  908. X    if (i < XtNumber(searchValues))
  909. X    setIthItemMark(searchMenuItems,i,XtNumber(searchMenuItems));
  910. }
  911. X
  912. void
  913. setSortMenuMark(type)
  914. SortType type;
  915. {
  916. X    int i;
  917. X
  918. X    for (i=0; i < XtNumber(sortValues) && sortValues[i] != type; i++)
  919. X    /*EMPTY*/;
  920. X    if (i < XtNumber(sortValues))
  921. X    setIthItemMark(sortMenuItems,i,XtNumber(sortMenuItems));
  922. }
  923. X
  924. void
  925. setNiceMenuMark(level)
  926. int level;
  927. {
  928. X    int i;
  929. X
  930. X    for (i=0; i < XtNumber(niceValues) && niceValues[i] != level; i++)
  931. X    /*EMPTY*/;
  932. X    if (i < XtNumber(niceValues))
  933. X    setIthItemMark(niceMenuItems,i,XtNumber(niceMenuItems));
  934. X    else
  935. X    clearAllItemMarks(niceMenuItems,XtNumber(niceMenuItems));
  936. }
  937. SHAR_EOF
  938. chmod 0644 xarchie-2.0.6/m-settings.c ||
  939. echo 'restore of xarchie-2.0.6/m-settings.c failed'
  940. Wc_c="`wc -c < 'xarchie-2.0.6/m-settings.c'`"
  941. test 12891 -eq "$Wc_c" ||
  942.     echo 'xarchie-2.0.6/m-settings.c: original size 12891, current size' "$Wc_c"
  943. rm -f _shar_wnt_.tmp
  944. fi
  945. # ============= xarchie-2.0.6/menu.c ==============
  946. if test -f 'xarchie-2.0.6/menu.c' -a X"$1" != X"-c"; then
  947.     echo 'x - skipping xarchie-2.0.6/menu.c (File already exists)'
  948.     rm -f _shar_wnt_.tmp
  949. else
  950. > _shar_wnt_.tmp
  951. echo 'x - extracting xarchie-2.0.6/menu.c (Text)'
  952. sed 's/^X//' << 'SHAR_EOF' > 'xarchie-2.0.6/menu.c' &&
  953. /*
  954. X * menu.c : Menu creation and manipulation routines
  955. X *
  956. X * George Ferguson, ferguson@cs.rochester.edu, 23 Apr 1993.
  957. X */
  958. X
  959. #include <stdio.h>
  960. #include <X11/Intrinsic.h>
  961. #include <X11/Xaw/SimpleMenu.h>
  962. #include <X11/Xaw/SmeBSB.h>
  963. #include <X11/StringDefs.h>
  964. #include <X11/bitmaps/xlogo11>
  965. extern Widget toplevel;
  966. X
  967. /*
  968. X * Functions defined here:
  969. X */
  970. void initMenuCreator();
  971. Widget createMenu();
  972. void clearAllItemMarks();
  973. void setIthItemMark();
  974. X
  975. /*
  976. X * Data defined here:
  977. X */
  978. static Pixmap checkmarkBitmap;
  979. X
  980. /*    -    -    -    -    -    -    -    -    */
  981. X
  982. void
  983. initMenuCreator()
  984. {
  985. X    checkmarkBitmap = XCreateBitmapFromData(XtDisplay(toplevel),
  986. X                XDefaultRootWindow(XtDisplay(toplevel)),
  987. X                xlogo11_bits,
  988. X                xlogo11_width,xlogo11_height);
  989. }
  990. X
  991. /*
  992. X * createMenu : Creates menu named "name" with "numItems", each of which
  993. X *    calls back to "callback". If "items" is non-NULL, then saves the
  994. X *    items in it.
  995. X */
  996. Widget
  997. createMenu(name,item_basename,numItems,items,callback)
  998. char *name,*item_basename;
  999. int numItems;
  1000. SmeBSBObject *items;
  1001. XXtCallbackProc callback;
  1002. {
  1003. X    Widget menu;
  1004. X    SmeBSBObject item;
  1005. X    char itemName[64];
  1006. X    int i;
  1007. X
  1008. X    menu = XtCreatePopupShell(name,simpleMenuWidgetClass,toplevel,NULL,0);
  1009. X    for (i=0; i < numItems; i++) {
  1010. X    sprintf(itemName,"%s%d",item_basename,i);
  1011. X    item = (SmeBSBObject)XtCreateManagedWidget(itemName,smeBSBObjectClass,
  1012. X                           menu,NULL,0);
  1013. X    if (items != NULL)
  1014. X        *(items+i) = item;
  1015. X    XtAddCallback((Widget)item,XtNcallback,callback,(XtPointer)i);
  1016. X    }
  1017. X    return(menu);
  1018. }
  1019. X
  1020. /*    -    -    -    -    -    -    -    -    */
  1021. X
  1022. void
  1023. clearAllItemMarks(items,numItems)
  1024. SmeBSBObject *items;
  1025. int numItems;
  1026. {
  1027. X    Arg args[1];
  1028. X    int i;
  1029. X
  1030. X    for (i=0; i < numItems; i++) {
  1031. X    XtSetArg(args[0],XtNleftBitmap,None);
  1032. X    XtSetValues((Widget)(*(items+i)),args,1);
  1033. X    }
  1034. }
  1035. X
  1036. void
  1037. setIthItemMark(items,i,numItems)
  1038. SmeBSBObject *items;
  1039. int i,numItems;
  1040. {
  1041. X    Arg args[1];
  1042. X
  1043. X    clearAllItemMarks(items,numItems);
  1044. X    XtSetArg(args[0],XtNleftBitmap,checkmarkBitmap);
  1045. X    XtSetValues((Widget)(*(items+i)),args,1);
  1046. }
  1047. SHAR_EOF
  1048. chmod 0644 xarchie-2.0.6/menu.c ||
  1049. echo 'restore of xarchie-2.0.6/menu.c failed'
  1050. Wc_c="`wc -c < 'xarchie-2.0.6/menu.c'`"
  1051. test 1979 -eq "$Wc_c" ||
  1052.     echo 'xarchie-2.0.6/menu.c: original size 1979, current size' "$Wc_c"
  1053. rm -f _shar_wnt_.tmp
  1054. fi
  1055. # ============= xarchie-2.0.6/menu.h ==============
  1056. if test -f 'xarchie-2.0.6/menu.h' -a X"$1" != X"-c"; then
  1057.     echo 'x - skipping xarchie-2.0.6/menu.h (File already exists)'
  1058.     rm -f _shar_wnt_.tmp
  1059. else
  1060. > _shar_wnt_.tmp
  1061. echo 'x - extracting xarchie-2.0.6/menu.h (Text)'
  1062. sed 's/^X//' << 'SHAR_EOF' > 'xarchie-2.0.6/menu.h' &&
  1063. /*
  1064. X * menu.h : Menu creation rotuines
  1065. X *
  1066. X * George Ferguson, ferguson@cs.rochester.edu, 23 Apr 1993.
  1067. X */
  1068. X
  1069. extern void initMenuCreator();
  1070. X
  1071. extern Widget createMenu(/* char *name, char *item_basename,
  1072. X                int numItems,
  1073. X                SmeBSBObject *items,
  1074. X                XtCallbackProc callback */);
  1075. X
  1076. extern void clearAllItemMarks(/* Object *items, int numItems */);
  1077. extern void setIthItemMark(/* Object *items, int i, int numItems */);
  1078. SHAR_EOF
  1079. chmod 0644 xarchie-2.0.6/menu.h ||
  1080. echo 'restore of xarchie-2.0.6/menu.h failed'
  1081. Wc_c="`wc -c < 'xarchie-2.0.6/menu.h'`"
  1082. test 421 -eq "$Wc_c" ||
  1083.     echo 'xarchie-2.0.6/menu.h: original size 421, current size' "$Wc_c"
  1084. rm -f _shar_wnt_.tmp
  1085. fi
  1086. # ============= xarchie-2.0.6/patchlevel.h ==============
  1087. if test -f 'xarchie-2.0.6/patchlevel.h' -a X"$1" != X"-c"; then
  1088.     echo 'x - skipping xarchie-2.0.6/patchlevel.h (File already exists)'
  1089.     rm -f _shar_wnt_.tmp
  1090. else
  1091. > _shar_wnt_.tmp
  1092. echo 'x - extracting xarchie-2.0.6/patchlevel.h (Text)'
  1093. sed 's/^X//' << 'SHAR_EOF' > 'xarchie-2.0.6/patchlevel.h' &&
  1094. /*
  1095. X * patchlevel.h : xarchie version control
  1096. X *
  1097. X * George Ferguson, ferguson@cs.rochester.edu, 19 Nov 1991.
  1098. X * Version 2.0 : 23 Apr 1993.
  1099. X * Version 2.0.1: 26 Apr 1993
  1100. X * Version 2.0.2: 28 Apr 1993
  1101. X * Version 2.0.3: 13 May 1993
  1102. X * Version 2.0.4: 14 May 1993
  1103. X * Version 2.0.5:  1 Jun 1993
  1104. X * Version 2.0.6:  7 Jun 1993
  1105. X */
  1106. X
  1107. #undef BETA
  1108. #define VERSION        2.0
  1109. #define PATCHLEVEL    6
  1110. SHAR_EOF
  1111. chmod 0644 xarchie-2.0.6/patchlevel.h ||
  1112. echo 'restore of xarchie-2.0.6/patchlevel.h failed'
  1113. Wc_c="`wc -c < 'xarchie-2.0.6/patchlevel.h'`"
  1114. test 377 -eq "$Wc_c" ||
  1115.     echo 'xarchie-2.0.6/patchlevel.h: original size 377, current size' "$Wc_c"
  1116. rm -f _shar_wnt_.tmp
  1117. fi
  1118. # ============= xarchie-2.0.6/pauthent.h ==============
  1119. if test -f 'xarchie-2.0.6/pauthent.h' -a X"$1" != X"-c"; then
  1120.     echo 'x - skipping xarchie-2.0.6/pauthent.h (File already exists)'
  1121.     rm -f _shar_wnt_.tmp
  1122. else
  1123. > _shar_wnt_.tmp
  1124. echo 'x - extracting xarchie-2.0.6/pauthent.h (Text)'
  1125. sed 's/^X//' << 'SHAR_EOF' > 'xarchie-2.0.6/pauthent.h' &&
  1126. /*
  1127. X * Copyright (c) 1989, 1990, 1991 by the University of Washington
  1128. X *
  1129. X * For copying and distribution information, please see the file
  1130. X * <copyright.h>.
  1131. X *
  1132. X * gf xarchie v2.0 - Sync with archie v1.4.1.
  1133. X */
  1134. X
  1135. #include <copyright.h>
  1136. X
  1137. #define PFSA_UNAUTHENTICATED        1
  1138. X
  1139. struct pfs_auth_info {
  1140. X    char            auth_type[100];
  1141. X    char            authenticator[250];
  1142. };
  1143. X
  1144. typedef struct pfs_auth_info *PAUTH;
  1145. typedef struct pfs_auth_info PAUTH_ST;
  1146. X
  1147. PAUTH get_pauth();
  1148. X
  1149. #ifndef VMS
  1150. # ifndef IN_H
  1151. #  ifdef PCNFS
  1152. #   include <tklib.h>
  1153. #  endif
  1154. #  ifndef _TYPES_
  1155. #   include <sys/types.h>
  1156. #  endif
  1157. #  include <netinet/in.h>
  1158. #  define IN_H
  1159. # endif
  1160. #else
  1161. # ifndef _ARCHIE_VMS
  1162. #  include <vms.h>
  1163. # endif
  1164. #endif
  1165. X
  1166. struct client_info {
  1167. X    int                ainfo_type;
  1168. X    char            *auth_type;
  1169. X    char            *authenticator;
  1170. X    char            *userid;
  1171. X    short            port;
  1172. X    struct in_addr        haddr;
  1173. X    struct pfs_auth_info    *previous;
  1174. X    struct pfs_auth_info    *next;
  1175. };
  1176. X
  1177. typedef struct client_info *CINFO;
  1178. typedef struct client_info CINFO_ST;
  1179. SHAR_EOF
  1180. chmod 0644 xarchie-2.0.6/pauthent.h ||
  1181. echo 'restore of xarchie-2.0.6/pauthent.h failed'
  1182. Wc_c="`wc -c < 'xarchie-2.0.6/pauthent.h'`"
  1183. test 987 -eq "$Wc_c" ||
  1184.     echo 'xarchie-2.0.6/pauthent.h: original size 987, current size' "$Wc_c"
  1185. rm -f _shar_wnt_.tmp
  1186. fi
  1187. # ============= xarchie-2.0.6/pcompat.h ==============
  1188. if test -f 'xarchie-2.0.6/pcompat.h' -a X"$1" != X"-c"; then
  1189.     echo 'x - skipping xarchie-2.0.6/pcompat.h (File already exists)'
  1190.     rm -f _shar_wnt_.tmp
  1191. else
  1192. > _shar_wnt_.tmp
  1193. echo 'x - extracting xarchie-2.0.6/pcompat.h (Text)'
  1194. sed 's/^X//' << 'SHAR_EOF' > 'xarchie-2.0.6/pcompat.h' &&
  1195. /*
  1196. X * Copyright (c) 1989, 1990 by the University of Washington
  1197. X *
  1198. X * For copying and distribution information, please see the file
  1199. X * <copyright.h>.
  1200. X */
  1201. X
  1202. #include <copyright.h>
  1203. X
  1204. /* 
  1205. X * pcompat.h - Definitions for compatability library
  1206. X *
  1207. X * This file contains the defintions used by the compatability
  1208. X * library.  Among the definitions are the possible values for
  1209. X * pfs_disable_flag.  This file also contains the external 
  1210. X * declaration of that variable.  Note, however that the 
  1211. X * the module pfs_disable_flag.o is included in libpfs.a
  1212. X * because some of the routines in that library set it.
  1213. X * The only place it is checked, however, is in pfs_access, 
  1214. X * found in libpcompat.a
  1215. X *
  1216. X */
  1217. X
  1218. extern    int        pfs_default;
  1219. extern    int        pfs_enable;
  1220. X
  1221. /* Definitions for values of pfs_enable */
  1222. #define PMAP_DISABLE      0
  1223. #define PMAP_ENABLE       1
  1224. #define PMAP_COLON      2
  1225. #define PMAP_ATSIGN_NF      3
  1226. #define PMAP_ATSIGN      4
  1227. X
  1228. #define DISABLE_PFS(stmt) do {int DpfStmp; DpfStmp = pfs_enable;\
  1229. X               pfs_enable = PMAP_DISABLE; \
  1230. X               stmt; \
  1231. X               pfs_enable = DpfStmp;} while (0)
  1232. X
  1233. /* Definitions for PFS_ACCESS */
  1234. #define PFA_MAP           0  /* Map the file name only                       */
  1235. #define PFA_CREATE        1  /* Create file if not found                     */
  1236. #define PFA_CRMAP         2  /* Map file name.  Map to new name if not found */
  1237. #define PFA_RO            4  /* Access to file is read only                  */
  1238. X
  1239. #define check_pfs_default() \
  1240. X    do { if (pfs_default == -1) get_pfs_default(); } while (0)
  1241. SHAR_EOF
  1242. chmod 0644 xarchie-2.0.6/pcompat.h ||
  1243. echo 'restore of xarchie-2.0.6/pcompat.h failed'
  1244. Wc_c="`wc -c < 'xarchie-2.0.6/pcompat.h'`"
  1245. test 1512 -eq "$Wc_c" ||
  1246.     echo 'xarchie-2.0.6/pcompat.h: original size 1512, current size' "$Wc_c"
  1247. rm -f _shar_wnt_.tmp
  1248. fi
  1249. # ============= xarchie-2.0.6/perrmesg.c ==============
  1250. if test -f 'xarchie-2.0.6/perrmesg.c' -a X"$1" != X"-c"; then
  1251.     echo 'x - skipping xarchie-2.0.6/perrmesg.c (File already exists)'
  1252.     rm -f _shar_wnt_.tmp
  1253. else
  1254. > _shar_wnt_.tmp
  1255. echo 'x - extracting xarchie-2.0.6/perrmesg.c (Text)'
  1256. sed 's/^X//' << 'SHAR_EOF' > 'xarchie-2.0.6/perrmesg.c' &&
  1257. /*
  1258. X * Copyright (c) 1989, 1990, 1991 by the University of Washington
  1259. X *
  1260. X * For copying and distribution information, please see the file
  1261. X * <copyright.h>.
  1262. X */
  1263. X
  1264. #include <copyright.h>
  1265. #include <perrno.h>
  1266. #include <stdio.h>
  1267. X
  1268. /* This file and perrno.h should always be updated simultaneously */
  1269. X
  1270. int    perrno = 0;
  1271. int    pwarn = 0;
  1272. char    p_err_string[P_ERR_STRING_SZ];
  1273. char    p_warn_string[P_ERR_STRING_SZ];
  1274. X
  1275. char    *p_err_text[256] = {
  1276. X    /*   0 */ "Success (prospero)",
  1277. X    /*   1 */ "Port unknown (dirsend)",
  1278. X    /*   2 */ "Can't open local UDP port (dirsend)",
  1279. X    /*   3 */ "Can't resolve hostname (dirsend)",
  1280. X    /*   4 */ "Unable to send entire message (dirsend)",
  1281. X    /*   5 */ "Timed out (dirsend)",
  1282. X    /*   6 */ "Recvfrom failed (dirsend)",
  1283. X    /*   7 */ "",    /*   8 */ "",    /*   9 */ "",    /*  10 */ "",
  1284. X    /*  11 */ "Sendto failed (reply)",
  1285. X    /*  12 */ "",    /*  13 */ "",    /*  14 */ "",    /*  15 */ "",
  1286. X    /*  16 */ "",    /*  17 */ "",    /*  18 */ "",    /*  19 */ "",
  1287. X    /*  20 */ "",
  1288. X    /*  21 */ "Link already exists (vl_insert)",
  1289. X    /*  22 */ "Link with same name already exists (vl_insert)",
  1290. X    /*  23 */ "",    /*  24 */ "",
  1291. X    /*  25 */ "Link already exists (ul_insert)",
  1292. X    /*  26 */ "Replacing existing link (ul_insert)",
  1293. X    /*  27 */ "Previous entry not found in dir->ulinks (ul_insert)",
  1294. X    /*  28 */ "",    /*  29 */ "",    /*  30 */ "",    /*  31 */ "",
  1295. X    /*  32 */ "",    /*  33 */ "",    /*  34 */ "",    /*  35 */ "",
  1296. X    /*  36 */ "",    /*  37 */ "",    /*  38 */ "",    /*  39 */ "",
  1297. X    /*  40 */ "",
  1298. X    /*  41 */ "Temporary not found (rd_vdir)",
  1299. X    /*  42 */ "Namespace not closed with object (rd_vdir)",
  1300. X    /*  43 */ "Alias for namespace not defined (rd_vdir)",
  1301. X    /*  44 */ "Specified namespace not found (rd_vdir)",
  1302. X    /*  45 */ "",    /*  46 */ "",    /*  47 */ "",    /*  48 */ "",
  1303. X    /*  49 */ "",    /*  50 */ "",
  1304. X    /*  51 */ "File access method not supported (pfs_access)",
  1305. X    /*  52 */ "",    /*  53 */ "",    /*  54 */ "",
  1306. X    /*  55 */ "Pointer to cached copy - delete on close (pmap_cache)",
  1307. X    /*  56 */ "Unable to retrieve file (pmap_cache)",
  1308. X    /*  57 */ "",    /*  58 */ "",    /*  59 */ "",    /*  60 */ "",
  1309. X    /*  61 */ "Directory already exists (mk_vdir)",
  1310. X    /*  62 */ "Link with same name already exists (mk_vdir)",
  1311. X    /*  63 */ "",    /*  64 */ "",
  1312. X    /*  65 */ "Not a virtual system (vfsetenv)",
  1313. X    /*  66 */ "Can't find directory (vfsetenv)",
  1314. X    /*  67 */ "",    /*  68 */ "",    /*  69 */ "",    /*  70 */ "",
  1315. X    /*  71 */ "Link already exists (add_vlink)",
  1316. X    /*  72 */ "Link with same name already exists (add_vlink)",
  1317. X    /*  73 */ "",    /*  74 */ "",    /*  75 */ "",    /*  76 */ "",
  1318. X    /*  77 */ "",    /*  78 */ "",    /*  79 */ "",    /*  80 */ "",
  1319. X    /*  81 */ "",    /*  82 */ "",    /*  83 */ "",    /*  84 */ "",
  1320. X    /*  85 */ "",    /*  86 */ "",    /*  87 */ "",    /*  88 */ "",
  1321. X    /*  89 */ "",    /*  90 */ "",    /*  91 */ "",    /*  92 */ "",
  1322. X    /*  93 */ "",    /*  94 */ "",    /*  95 */ "",    /*  96 */ "",
  1323. X    /*  97 */ "",    /*  98 */ "",    /*  99 */ "",    /* 100 */ "",
  1324. X    /* 101 */ "",    /* 102 */ "",    /* 103 */ "",    /* 104 */ "",
  1325. X    /* 105 */ "",    /* 106 */ "",    /* 107 */ "",    /* 108 */ "",
  1326. X    /* 109 */ "",    /* 110 */ "",    /* 111 */ "",    /* 112 */ "",
  1327. X    /* 113 */ "",    /* 114 */ "",    /* 115 */ "",    /* 116 */ "",
  1328. X    /* 117 */ "",    /* 118 */ "",    /* 119 */ "",    /* 120 */ "",
  1329. X    /* 121 */ "",    /* 122 */ "",    /* 123 */ "",    /* 124 */ "",
  1330. X    /* 125 */ "",    /* 126 */ "",    /* 127 */ "",    /* 128 */ "",
  1331. X    /* 129 */ "",    /* 130 */ "",    /* 131 */ "",    /* 132 */ "",
  1332. X    /* 133 */ "",    /* 134 */ "",    /* 135 */ "",    /* 136 */ "",
  1333. X    /* 137 */ "",    /* 138 */ "",    /* 139 */ "",    /* 140 */ "",
  1334. X    /* 141 */ "",    /* 142 */ "",    /* 143 */ "",    /* 144 */ "",
  1335. X    /* 145 */ "",    /* 146 */ "",    /* 147 */ "",    /* 148 */ "",
  1336. X    /* 149 */ "",    /* 150 */ "",    /* 151 */ "",    /* 152 */ "",
  1337. X    /* 153 */ "",    /* 154 */ "",    /* 155 */ "",    /* 156 */ "",
  1338. X    /* 157 */ "",    /* 158 */ "",    /* 159 */ "",    /* 160 */ "",
  1339. X    /* 161 */ "",    /* 162 */ "",    /* 163 */ "",    /* 164 */ "",
  1340. X    /* 165 */ "",    /* 166 */ "",    /* 167 */ "",    /* 168 */ "",
  1341. X    /* 169 */ "",    /* 170 */ "",    /* 171 */ "",    /* 172 */ "",
  1342. X    /* 173 */ "",    /* 174 */ "",    /* 175 */ "",    /* 176 */ "",
  1343. X    /* 177 */ "",    /* 178 */ "",    /* 179 */ "",    /* 180 */ "",
  1344. X    /* 181 */ "",    /* 182 */ "",    /* 183 */ "",    /* 184 */ "",
  1345. X    /* 185 */ "",    /* 186 */ "",    /* 187 */ "",    /* 188 */ "",
  1346. X    /* 189 */ "",    /* 190 */ "",    /* 191 */ "",    /* 192 */ "",
  1347. X    /* 193 */ "",    /* 194 */ "",    /* 195 */ "",    /* 196 */ "",
  1348. X    /* 197 */ "",    /* 198 */ "",    /* 199 */ "",    /* 200 */ "",
  1349. X    /* 201 */ "",    /* 202 */ "",    /* 203 */ "",    /* 204 */ "",
  1350. X    /* 205 */ "",    /* 206 */ "",    /* 207 */ "",    /* 208 */ "",
  1351. X    /* 209 */ "",    /* 210 */ "",    /* 211 */ "",    /* 212 */ "",
  1352. X    /* 213 */ "",    /* 214 */ "",    /* 215 */ "",    /* 216 */ "",
  1353. X    /* 217 */ "",    /* 218 */ "",    /* 219 */ "",    /* 220 */ "",
  1354. X    /* 221 */ "",    /* 222 */ "",    /* 223 */ "",    /* 224 */ "",
  1355. X    /* 225 */ "",    /* 226 */ "",    /* 227 */ "",    /* 228 */ "",
  1356. X    /* 229 */ "",
  1357. X    /* 230 */ "File not found (prospero)",
  1358. X    /* 231 */ "Directory not found (prospero)",
  1359. X    /* 232 */ "Symbolic links nested too deep (prospero)",
  1360. X    /* 233 */ "Environment not initialized - source vfsetup.source then run vfsetup",
  1361. X    /* 234 */ "Can't traverse an external file (prospero)",
  1362. X    /* 235 */ "Forwarding chain is too long (prospero)",
  1363. X    /* 236 */ "",    /* 237 */ "",    /* 238 */ "",    /* 239 */ "",
  1364. X    /* 240 */ "",    /* 241 */ "",
  1365. X    /* 242 */ "Authentication required (prospero server)",
  1366. X    /* 243 */ "Not authorized (prospero server)",
  1367. X    /* 244 */ "Not found (prospero server)",
  1368. X    /* 245 */ "Bad version number (prospero server)",
  1369. X    /* 246 */ "Not a directory (prospero server)",
  1370. X    /* 247 */ "Already exists (prospero server)",
  1371. X    /* 248 */ "Link with same name already exists (prospero server)",
  1372. X    /* 249 */ "",    /* 250 */ "",
  1373. X    /* 251 */ "Command not implemented on server (dirsrv)",
  1374. X    /* 252 */ "Bad format for response (dirsrv)",
  1375. X    /* 253 */ "Protocol error (prospero server)",
  1376. X    /* 254 */ "Unspecified server failure (prospero server)",
  1377. X    /* 255 */ "Generic Failure (prospero)"};
  1378. X
  1379. char    *p_warn_text[256] = {
  1380. X    /*   0 */ "No warning",
  1381. X    /*   1 */ "You are using an old version of this program",
  1382. X    /*   2 */ "From server",
  1383. X    /*   3 */ "Unrecognized line in response from server",
  1384. X  /* 4-254 */ "", "", "", "", "", "", "", "", "", "", "", "", "",
  1385. X  "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
  1386. X  "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
  1387. X  "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
  1388. X  "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
  1389. X  "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
  1390. X  "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
  1391. X  "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
  1392. X  "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
  1393. X  "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
  1394. X  "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
  1395. X  "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
  1396. X  "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
  1397. X  "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
  1398. X  "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
  1399. X    /* 255 */ ""};
  1400. X
  1401. #ifndef ARCHIE
  1402. perrmesg(prefix,no,text)
  1403. X    char    *prefix;
  1404. X    int        no;
  1405. X    char    *text;
  1406. X    {
  1407. X    fprintf(stderr,"%s%s%s%s\n", (prefix ? prefix : ""),
  1408. X        (no ? p_err_text[no] : p_err_text[perrno]),
  1409. X        ((text ? (*text ? " - " : "") : 
  1410. X          (!no && *p_err_string ? " - " : ""))),
  1411. X        (text ? text : (no ? "" : p_err_string)));
  1412. X    }
  1413. X
  1414. sperrmesg(buf,prefix,no,text)
  1415. X    char    *buf;
  1416. X    char    *prefix;
  1417. X    int        no;
  1418. X    char    *text;
  1419. X    {
  1420. X    sprintf(buf,"%s%s%s%s\n", (prefix ? prefix : ""),
  1421. X        (no ? p_err_text[no] : p_err_text[perrno]),
  1422. X        ((text ? (*text ? " - " : "") : 
  1423. X          (!no && *p_err_string ? " - " : ""))),
  1424. X        (text ? text : (no ? "" : p_err_string)));
  1425. X    }
  1426. X
  1427. pwarnmesg(prefix,no,text)
  1428. X    char    *prefix;
  1429. X    int        no;
  1430. X    char    *text;
  1431. X    {
  1432. X    fprintf(stderr,"%s%s%s%s\n", (prefix ? prefix : ""),
  1433. X        (no ? p_warn_text[no] : p_warn_text[pwarn]),
  1434. X        ((text ? (*text ? " - " : "") : 
  1435. X          (!no && *p_warn_string ? " - " : ""))),
  1436. X        (text ? text : (no ? "" : p_warn_string)));
  1437. X    }
  1438. X
  1439. spwarnmesg(buf,prefix,no,text)
  1440. X    char    *buf;
  1441. X    char    *prefix;
  1442. X    int        no;
  1443. X    char    *text;
  1444. X    {
  1445. X    sprintf(buf,"%s%s%s%s\n", (prefix ? prefix : ""),
  1446. X        (no ? p_warn_text[no] : p_warn_text[pwarn]),
  1447. X        ((text ? (*text ? " - " : "") : 
  1448. X          (!no && *p_warn_string ? " - " : ""))),
  1449. X        (text ? text : (no ? "" : p_warn_string)));
  1450. X    }
  1451. #endif
  1452. SHAR_EOF
  1453. chmod 0644 xarchie-2.0.6/perrmesg.c ||
  1454. echo 'restore of xarchie-2.0.6/perrmesg.c failed'
  1455. Wc_c="`wc -c < 'xarchie-2.0.6/perrmesg.c'`"
  1456. test 9027 -eq "$Wc_c" ||
  1457.     echo 'xarchie-2.0.6/perrmesg.c: original size 9027, current size' "$Wc_c"
  1458. rm -f _shar_wnt_.tmp
  1459. fi
  1460. # ============= xarchie-2.0.6/perrno.h ==============
  1461. if test -f 'xarchie-2.0.6/perrno.h' -a X"$1" != X"-c"; then
  1462.     echo 'x - skipping xarchie-2.0.6/perrno.h (File already exists)'
  1463.     rm -f _shar_wnt_.tmp
  1464. else
  1465. > _shar_wnt_.tmp
  1466. echo 'x - extracting xarchie-2.0.6/perrno.h (Text)'
  1467. sed 's/^X//' << 'SHAR_EOF' > 'xarchie-2.0.6/perrno.h' &&
  1468. /*
  1469. X * Copyright (c) 1989, 1990 by the University of Washington
  1470. X *
  1471. X * For copying and distribution information, please see the file
  1472. X * <copyright.h>.
  1473. X */
  1474. X
  1475. #include <copyright.h>
  1476. X
  1477. /* This file and perrmesg.c should be updated simultaneously. */
  1478. X
  1479. /*
  1480. X * perrno.h - definitions for perrno
  1481. X *
  1482. X * This file contains the declarations and defintions of of the external
  1483. X * error values in which errors are returned by the pfs and psrv
  1484. X * libraries.
  1485. X */
  1486. X
  1487. #define        P_ERR_STRING_SZ 100     /* Size of error string        */
  1488. X
  1489. extern int    perrno;
  1490. extern char    p_err_string[];
  1491. extern char    *p_err_text[];
  1492. X
  1493. extern int    pwarn;
  1494. extern char    p_warn_string[];
  1495. extern char    *p_warn_text[];
  1496. X
  1497. /* Error codes returned or found in verrno */
  1498. X
  1499. #ifndef PSUCCESS
  1500. #define    PSUCCESS        0
  1501. #endif
  1502. X
  1503. /* dirsend (perrno) */
  1504. #define DIRSEND_PORT_UNKN    1    /* DIRSRV UDP port unknown      */
  1505. #define DIRSEND_UDP_CANT    2    /* Can't open local UDP port    */
  1506. #define DIRSEND_BAD_HOSTNAME    3    /* Can't resolve hostname       */
  1507. #define DIRSEND_NOT_ALL_SENT    4    /* Didn't send entire message   */
  1508. #define DIRSEND_SELECT_FAILED    5    /* Select failed            */
  1509. #define DIRSEND_BAD_RECV    6    /* Recvfrom failed             */
  1510. X
  1511. /* reply */
  1512. #define REPLY_NOTSENT        11    /* Reply: sendto failed            */
  1513. X
  1514. /* vl_insert */
  1515. #define VL_INSERT_ALREADY_THERE    21    /* Link already exists            */
  1516. #define VL_INSERT_CONFLICT    22    /* Link exists with same name   */
  1517. X
  1518. /* ul_insert */
  1519. #define UL_INSERT_ALREADY_THERE 25    /* Link already exists        */
  1520. #define UL_INSERT_SUPERSEDING   26    /* Replacing existing link    */
  1521. #define UL_INSERT_POS_NOTFOUND  27    /* Prv entry not in dir->ulinks */
  1522. X
  1523. /* rd_vdir */
  1524. #define RVD_DIR_NOT_THERE    41    /* Temporary NOT_FOUND            */
  1525. #define RVD_NO_CLOSED_NS    42    /* Namespace not closed w/ object:: */
  1526. #define RVD_NO_NS_ALIAS        43    /* No alias for namespace NS#:      */
  1527. #define RVD_NS_NOT_FOUND    44    /* Specified namespace not found    */
  1528. X
  1529. /* pfs_access */
  1530. #define PFSA_AM_NOT_SUPPORTED   51      /* Access method not supported  */
  1531. X
  1532. /* pmap_cache */
  1533. #define PMC_DELETE_ON_CLOSE     55    /* Delete cached copy on close   */
  1534. #define PMC_RETRIEVE_FAILED     56      /* Unable to retrieve file       */
  1535. X
  1536. /* mk_vdir */
  1537. /* #define MKVD_ALREADY_EXISTS     61    /* Directory already exists      */
  1538. /* #define MKVD_NAME_CONFLICT    62    /* Link with name already exists */
  1539. X
  1540. /* vfsetenv */
  1541. #define VFSN_NOT_A_VS        65    /* Not a virtual system          */
  1542. #define VFSN_CANT_FIND_DIR    66    /* Not a virtual system          */
  1543. X
  1544. /* add_vlink */
  1545. /* #define ADDVL_ALREADY_EXISTS    71    /* Directory already exists      */
  1546. /* #define ADDVL_NAME_CONFLICT    72    /* Link with name already exists */
  1547. X
  1548. /* Local error codes on server */
  1549. X
  1550. /* dsrdir */
  1551. #define DSRDIR_NOT_A_DIRECTORY 111    /* Not a directory name        */
  1552. /* dsrfinfo */
  1553. #define DSRFINFO_NOT_A_FILE    121      /* Object not found             */
  1554. #define DSRFINFO_FORWARDED     122      /* Object has moved             */
  1555. X
  1556. /* Error codes that may be returned by various procedures               */
  1557. #define PFS_FILE_NOT_FOUND     230      /* File not found               */
  1558. #define PFS_DIR_NOT_FOUND      231      /* Directory in path not found  */
  1559. #define PFS_SYMLINK_DEPTH      232    /* Max sym-link depth exceeded  */
  1560. #define PFS_ENV_NOT_INITIALIZED    233    /* Can't read environment    */
  1561. #define PFS_EXT_USED_AS_DIR    234    /* Can't use externals as dirs  */
  1562. #define PFS_MAX_FWD_DEPTH      235    /* Exceeded max forward depth   */
  1563. X
  1564. /* Error codes returned by directory server                    */
  1565. /* some of these duplicate errors from individual routines     */
  1566. /* some of those error codes should be eliminated              */
  1567. #define DIRSRV_AUTHENT_REQ     242      /* Authentication required       */
  1568. #define DIRSRV_NOT_AUTHORIZED  243      /* Not authorized                */
  1569. #define DIRSRV_NOT_FOUND       244      /* Not found                     */
  1570. #define DIRSRV_BAD_VERS        245
  1571. #define DIRSRV_NOT_DIRECTORY   246
  1572. #define DIRSRV_ALREADY_EXISTS  247    /* Identical link already exists */
  1573. #define DIRSRV_NAME_CONFLICT   248    /* Link with name already exists */
  1574. X
  1575. #define DIRSRV_UNIMPLEMENTED   251      /* Unimplemented command         */
  1576. #define DIRSRV_BAD_FORMAT      252
  1577. #define DIRSRV_ERROR           253
  1578. #define DIRSRV_SERVER_FAILED   254      /* Unspecified server failure    */
  1579. X
  1580. #ifndef PFAILURE
  1581. #define    PFAILURE            255
  1582. #endif
  1583. X
  1584. /* Warning codes */
  1585. X
  1586. #define PNOWARN             0    /* No warning indicated         */
  1587. #define PWARN_OUT_OF_DATE     1    /* Software is out of date       */
  1588. #define PWARN_MSG_FROM_SERVER     2      /* Warning in p_warn_string      */
  1589. #define PWARN_UNRECOGNIZED_RESP  3    /* Unrecognized line in response */
  1590. #define PWARNING           255    /* Warning in p_warn_string      */
  1591. SHAR_EOF
  1592. chmod 0644 xarchie-2.0.6/perrno.h ||
  1593. echo 'restore of xarchie-2.0.6/perrno.h failed'
  1594. Wc_c="`wc -c < 'xarchie-2.0.6/perrno.h'`"
  1595. test 4623 -eq "$Wc_c" ||
  1596.     echo 'xarchie-2.0.6/perrno.h: original size 4623, current size' "$Wc_c"
  1597. rm -f _shar_wnt_.tmp
  1598. fi
  1599. # ============= xarchie-2.0.6/pfs.h ==============
  1600. if test -f 'xarchie-2.0.6/pfs.h' -a X"$1" != X"-c"; then
  1601.     echo 'x - skipping xarchie-2.0.6/pfs.h (File already exists)'
  1602.     rm -f _shar_wnt_.tmp
  1603. else
  1604. > _shar_wnt_.tmp
  1605. echo 'x - extracting xarchie-2.0.6/pfs.h (Text)'
  1606. sed 's/^X//' << 'SHAR_EOF' > 'xarchie-2.0.6/pfs.h' &&
  1607. /*
  1608. X * Copyright (c) 1989, 1990, 1991 by the University of Washington
  1609. X *
  1610. X * For copying and distribution information, please see the file
  1611. X * <copyright.h>.
  1612. X *
  1613. X * xarchie v2.0 - gf - Sync with archie v1.4.1.
  1614. X * v1.3.2 - bpk - for Archie client 1.3.2, except gf ZERO->BZERO
  1615. X * v1.1.3 - gf  11/02/91 - renamed ZERO() to BZERO() for X
  1616. X * v1.1.2 - bpk 08/30/91 - added VMS support
  1617. X * v1.1.1 - bpk 08/20/91 - 4.2 -> 4.2B
  1618. X */
  1619. #ifndef PFS_H
  1620. #define PFS_H
  1621. #include <copyright.h>
  1622. X
  1623. #ifdef PCNFS
  1624. #include <tklib.h>
  1625. #include <tk_errno.h>
  1626. #include <sys/nfs_time.h>
  1627. #endif
  1628. #ifdef VMS
  1629. # include <vms.h>
  1630. #else /* not VMS */
  1631. # ifndef _TYPES_
  1632. #  include <sys/types.h>
  1633. # endif /* _TYPES_ */
  1634. # ifndef IN_H
  1635. #  include <netinet/in.h> 
  1636. #  define IN_H
  1637. # endif
  1638. #endif /* VMS */
  1639. X
  1640. #ifndef NULL
  1641. # ifdef MSDOS
  1642. SHAR_EOF
  1643. true || echo 'restore of xarchie-2.0.6/pfs.h failed'
  1644. fi
  1645. echo 'End of xarchie-2.0.6 part 12'
  1646. echo 'File xarchie-2.0.6/pfs.h is continued in part 13'
  1647. echo 13 > _shar_seq_.tmp
  1648. exit 0
  1649.  
  1650. exit 0 # Just in case...
  1651. -- 
  1652.   // chris@IMD.Sterling.COM       | Send comp.sources.x submissions to:
  1653. \X/  Amiga - The only way to fly! |    sources-x@imd.sterling.com
  1654.  "It's intuitively obvious to the |
  1655.   most casual observer..."        | GCS d+/-- p+ c++ l+ m+ s++/+ g+ w+ t+ r+ x+
  1656.