home *** CD-ROM | disk | FTP | other *** search
/ Super Net 1 / SUPERNET_1.iso / PC / OTROS / UNIX / ARCHIE / CLIENTS / XARCHIE_.3 < prev    next >
Encoding:
Text File  |  1991-12-11  |  204.4 KB  |  6,744 lines

  1. *** /tmp/release17219/EzMenu/EzMenu.c    Tue Nov 12 16:52:44 1991
  2. --- EzMenu/EzMenu.c    Sat Nov  2 17:22:40 1991
  3. ***************
  4. *** 363,371 ****
  5.     EzMenuWidget newez = (EzMenuWidget) new;
  6.     EzMenuWidget requestez = (EzMenuWidget) request;
  7.   
  8. ! #ifdef DEBUG
  9.     fprintf(stderr,"Initialize %s\n",
  10. !       XtWidgetName(request);
  11.   #endif
  12.   
  13.     /* just copy the string that will be used to initialize the menu */
  14. --- 363,371 ----
  15.     EzMenuWidget newez = (EzMenuWidget) new;
  16.     EzMenuWidget requestez = (EzMenuWidget) request;
  17.   
  18. ! #ifdef EZMENU_DEBUG
  19.     fprintf(stderr,"Initialize %s\n",
  20. !       XtName(request);
  21.   #endif
  22.   
  23.     /* just copy the string that will be used to initialize the menu */
  24. *** /tmp/release17219/Imakefile    Tue Nov 12 16:52:56 1991
  25. --- Imakefile    Sat Nov  2 20:26:11 1991
  26. ***************
  27. *** 32,48 ****
  28.   # How excited are you about debugging? This can be -g, -O, or nothing.
  29.   CDEBUGFLAGS = -g
  30.   
  31. ! # Are you using gcc? If so, read on:
  32. ! #   [from Brendan Kehoe (brendan@cs.widener.edu)]
  33. ! #   dirsend.c shouldn't be compiled with Gnu C.  Until gcc 2.0, structure
  34. ! #   passing is completely hosed on Suns -- and the inet_ntoa() calls in
  35. ! #   dirsend will seg fault.
  36. ! # You should uncommment this if you're using gcc.
  37. ! #dirsend.o:
  38. ! #    cc -c $(CFLAGS) dirsend.c
  39.   
  40. ! # Does your system have re_comp() and re_exec()? If not, uncomment the
  41. ! # following definitions.
  42.   #REGEXC = regex.c
  43.   #REGEXO = regex.o
  44.   
  45. --- 32,42 ----
  46.   # How excited are you about debugging? This can be -g, -O, or nothing.
  47.   CDEBUGFLAGS = -g
  48.   
  49. ! # To enable Prospero tracing (controlled by the -debug option), uncomment this
  50. ! #PDEBUG = -DDEBUG
  51.   
  52. ! # Does your system have re_comp() and re_exec(), or regcmp() and regex()
  53. ! # [in the case of A/UX]? If not, uncomment the following definitions.
  54.   #REGEXC = regex.c
  55.   #REGEXO = regex.o
  56.   
  57. ***************
  58. *** 55,73 ****
  59.   MakeSubdirs($(SUBDIRS))
  60.   
  61.   ASRCS = aquery.c atalloc.c dirsend.c get_pauth.c get_vdir.c \
  62. !     p_err_text.c ptalloc.c stcopy.c support.c vl_comp.c vlalloc.c
  63.   XSRCS = xarchie.c db.c actions.c types.c classnames.c procquery.c settings.c \
  64. !     ftp.c alert.c confirm.c
  65.   
  66.   AOBJS = aquery.o atalloc.o dirsend.o get_pauth.o get_vdir.o \
  67. !     p_err_text.o ptalloc.o stcopy.o support.o vl_comp.o vlalloc.o
  68.   XOBJS = xarchie.o db.o actions.o types.o classnames.o procquery.o settings.o \
  69. !     ftp.o alert.o confirm.o
  70.   
  71.   SRCS = $(ASRCS) $(XSRCS) $(REGEXC)
  72.   OBJS = $(AOBJS) $(XOBJS) $(REGEXO)
  73.   
  74. ! DEFINES =        -DARCHIE -DXARCHIE
  75.   INCLUDES =        -I. -I$(EZMENUDIR)
  76.   
  77.   DEPLIBS =        $(EZMENULIB) XawClientDepLibs
  78. --- 49,67 ----
  79.   MakeSubdirs($(SUBDIRS))
  80.   
  81.   ASRCS = aquery.c atalloc.c dirsend.c get_pauth.c get_vdir.c \
  82. !     perrmesg.c ptalloc.c stcopy.c support.c vl_comp.c vlalloc.c
  83.   XSRCS = xarchie.c db.c actions.c types.c classnames.c procquery.c settings.c \
  84. !     ftp.c alert.c confirm.c dialog.c
  85.   
  86.   AOBJS = aquery.o atalloc.o dirsend.o get_pauth.o get_vdir.o \
  87. !     perrmesg.o ptalloc.o stcopy.o support.o vl_comp.o vlalloc.o
  88.   XOBJS = xarchie.o db.o actions.o types.o classnames.o procquery.o settings.o \
  89. !     ftp.o alert.o confirm.o dialog.o
  90.   
  91.   SRCS = $(ASRCS) $(XSRCS) $(REGEXC)
  92.   OBJS = $(AOBJS) $(XOBJS) $(REGEXO)
  93.   
  94. ! DEFINES =        -DARCHIE -DXARCHIE $(PDEBUG)
  95.   INCLUDES =        -I. -I$(EZMENUDIR)
  96.   
  97.   DEPLIBS =        $(EZMENULIB) XawClientDepLibs
  98. ***************
  99. *** 89,95 ****
  100.       $(MAKE) $(MFLAGS) 'CDEBUGFLAGS=$(CDEBUGFLAGS)' all);
  101.   
  102.   #
  103. ! # C code for fallback resources
  104.   #
  105.   Xarchie.ad.h: Xarchie.ad
  106.       $(AD2C) Xarchie.ad >Xarchie.ad.h
  107. --- 83,89 ----
  108.       $(MAKE) $(MFLAGS) 'CDEBUGFLAGS=$(CDEBUGFLAGS)' all);
  109.   
  110.   #
  111. ! # Make C code for fallback resources from application resource file
  112.   #
  113.   Xarchie.ad.h: Xarchie.ad
  114.       $(AD2C) Xarchie.ad >Xarchie.ad.h
  115. *** /tmp/release17219/MANIFEST    Tue Nov 12 16:53:01 1991
  116. --- MANIFEST    Sat Nov  2 16:52:38 1991
  117. ***************
  118. *** 38,55 ****
  119.    classnames.h               1    
  120.    confirm.c                  2    Popup yes/no confirmer
  121.    confirm.h                  1    
  122. !  copyright.h                1    +From Archie client distribution (renamed)
  123.    db.c                       6    Database for results of queries
  124.    db.h                       1    
  125.    dirsend.c                  7    +From Archie client distribution (#ifdef'd)
  126.    ftp.c                      1    File retrieval code
  127.    ftp.h                      1    
  128.    get_pauth.c                1    +From Archie client distribution
  129.    get_vdir.c                 5    +From Archie client distribution
  130. -  p_err_text.c               4    +From Archie client distribution
  131.    patchlevel.h               1    Version control information
  132.    pauthent.h                 1    +From Archie client distribution
  133.    pcompat.h                  1    +From Archie client distribution
  134.    perrno.h                   2    +From Archie client distribution
  135.    pfs.h                      4    +From Archie client distribution
  136.    pmachine.h                 1    +From Archie client distribution
  137. --- 38,57 ----
  138.    classnames.h               1    
  139.    confirm.c                  2    Popup yes/no confirmer
  140.    confirm.h                  1    
  141. !  copyright.h                1    +From Archie client distribution
  142.    db.c                       6    Database for results of queries
  143.    db.h                       1    
  144. +  dialog.c            X   Popup string entry box
  145. +  dialog.h            X
  146.    dirsend.c                  7    +From Archie client distribution (#ifdef'd)
  147.    ftp.c                      1    File retrieval code
  148.    ftp.h                      1    
  149.    get_pauth.c                1    +From Archie client distribution
  150.    get_vdir.c                 5    +From Archie client distribution
  151.    patchlevel.h               1    Version control information
  152.    pauthent.h                 1    +From Archie client distribution
  153.    pcompat.h                  1    +From Archie client distribution
  154. +  perrmesg.c                 4    +From Archie client distribution
  155.    perrno.h                   2    +From Archie client distribution
  156.    pfs.h                      4    +From Archie client distribution
  157.    pmachine.h                 1    +From Archie client distribution
  158. ***************
  159. *** 57,63 ****
  160.    procquery.c                2    +From Archie client distribution (#ifdef'd)
  161.    procquery.h                1    +From Archie client distribution
  162.    ptalloc.c                  1    +From Archie client distribution
  163. !  regex.c                    7    +From Archie client distribution (non-static)
  164.    regex.h            7   New to allow regex.c to be linked with
  165.    settings.c                 4    Settings panel
  166.    settings.h                 1    
  167. --- 59,66 ----
  168.    procquery.c                2    +From Archie client distribution (#ifdef'd)
  169.    procquery.h                1    +From Archie client distribution
  170.    ptalloc.c                  1    +From Archie client distribution
  171. !  rdgram.h            X   +From Archie client distribution
  172. !  regex.c                    7    +From Archie client distribution
  173.    regex.h            7   New to allow regex.c to be linked with
  174.    settings.c                 4    Settings panel
  175.    settings.h                 1    
  176. ***************
  177. *** 65,70 ****
  178. --- 68,74 ----
  179.    support.c                  6    +From Archie client distribution
  180.    types.c                    2    Newly defined types and converters
  181.    types.h                    1    
  182. +  udp.c                X   Standalone program to test UDP traffic
  183.    vl_comp.c                  1    +From Archie client distribution
  184.    vlalloc.c                  2    +From Archie client distribution
  185.    xarchie.c                  5    Main program file for xarchie
  186. *** /tmp/release17219/Makefile    Tue Nov 12 16:53:05 1991
  187. --- Makefile    Fri Nov  8 13:05:21 1991
  188. ***************
  189. *** 7,13 ****
  190.   #
  191.   
  192.   ###########################################################################
  193. ! # Makefile generated from "Imake.tmpl" and </tmp/IIf.a00891>
  194.   # $XConsortium: Imake.tmpl,v 1.77 89/12/18 17:01:37 jim Exp $
  195.   #
  196.   # Platform-specific parameters may be set in the appropriate .cf
  197. --- 7,13 ----
  198.   #
  199.   
  200.   ###########################################################################
  201. ! # Makefile generated from "Imake.tmpl" and </tmp/IIf.a15629>
  202.   # $XConsortium: Imake.tmpl,v 1.77 89/12/18 17:01:37 jim Exp $
  203.   #
  204.   # Platform-specific parameters may be set in the appropriate .cf
  205. ***************
  206. *** 230,236 ****
  207.   #
  208.   # Imakefile for xarchie : X11 Browser interface to Archie
  209.   #
  210. ! # George Ferguson, ferguson@cs.rochester.edu, 11 Sep 1991.
  211.   #
  212.   
  213.   # Where do you want this stuff? Uncomment and adjust these to change the
  214. --- 230,236 ----
  215.   #
  216.   # Imakefile for xarchie : X11 Browser interface to Archie
  217.   #
  218. ! # George Ferguson, ferguson@cs.rochester.edu, 12 Sep 1991.
  219.   #
  220.   
  221.   # Where do you want this stuff? Uncomment and adjust these to change the
  222. ***************
  223. *** 261,277 ****
  224.   # How excited are you about debugging? This can be -g, -O, or nothing.
  225.   CDEBUGFLAGS = -g
  226.   
  227. ! # Are you using gcc? If so, read on:
  228. ! #   [from Brendan Kehoe (brendan@cs.widener.edu)]
  229. ! #   dirsend.c shouldn't be compiled with Gnu C.  Until gcc 2.0, structure
  230. ! #   passing is completely hosed on Suns -- and the inet_ntoa() calls in
  231. ! #   dirsend will seg fault.
  232. ! # You should uncommment this if you're using gcc.
  233. ! #dirsend.o:
  234. ! #    cc -c $(CFLAGS) dirsend.c
  235.   
  236. ! # Does your system have re_comp() and re_exec()? If not, uncomment the
  237. ! # following definitions.
  238.   #REGEXC = regex.c
  239.   #REGEXO = regex.o
  240.   
  241. --- 261,271 ----
  242.   # How excited are you about debugging? This can be -g, -O, or nothing.
  243.   CDEBUGFLAGS = -g
  244.   
  245. ! # To enable Prospero tracing (controlled by the -debug option), uncomment this
  246. ! #PDEBUG = -DDEBUG
  247.   
  248. ! # Does your system have re_comp() and re_exec(), or regcmp() and regex()
  249. ! # [in the case of A/UX]? If not, uncomment the following definitions.
  250.   #REGEXC = regex.c
  251.   #REGEXO = regex.o
  252.   
  253. ***************
  254. *** 289,307 ****
  255.       done
  256.   
  257.   ASRCS = aquery.c atalloc.c dirsend.c get_pauth.c get_vdir.c \
  258. !     p_err_text.c ptalloc.c stcopy.c support.c vl_comp.c vlalloc.c
  259.   XSRCS = xarchie.c db.c actions.c types.c classnames.c procquery.c settings.c \
  260. !     ftp.c alert.c confirm.c
  261.   
  262.   AOBJS = aquery.o atalloc.o dirsend.o get_pauth.o get_vdir.o \
  263. !     p_err_text.o ptalloc.o stcopy.o support.o vl_comp.o vlalloc.o
  264.   XOBJS = xarchie.o db.o actions.o types.o classnames.o procquery.o settings.o \
  265. !     ftp.o alert.o confirm.o
  266.   
  267.   SRCS = $(ASRCS) $(XSRCS) $(REGEXC)
  268.   OBJS = $(AOBJS) $(XOBJS) $(REGEXO)
  269.   
  270. ! DEFINES =        -DARCHIE -DXARCHIE
  271.   INCLUDES =        -I. -I$(EZMENUDIR)
  272.   
  273.   DEPLIBS =        $(EZMENULIB) $(DEPXAWLIB) $(DEPXMULIB) $(DEPXTOOLLIB) $(DEPXLIB)
  274. --- 283,301 ----
  275.       done
  276.   
  277.   ASRCS = aquery.c atalloc.c dirsend.c get_pauth.c get_vdir.c \
  278. !     perrmesg.c ptalloc.c stcopy.c support.c vl_comp.c vlalloc.c
  279.   XSRCS = xarchie.c db.c actions.c types.c classnames.c procquery.c settings.c \
  280. !     ftp.c alert.c confirm.c dialog.c
  281.   
  282.   AOBJS = aquery.o atalloc.o dirsend.o get_pauth.o get_vdir.o \
  283. !     perrmesg.o ptalloc.o stcopy.o support.o vl_comp.o vlalloc.o
  284.   XOBJS = xarchie.o db.o actions.o types.o classnames.o procquery.o settings.o \
  285. !     ftp.o alert.o confirm.o dialog.o
  286.   
  287.   SRCS = $(ASRCS) $(XSRCS) $(REGEXC)
  288.   OBJS = $(AOBJS) $(XOBJS) $(REGEXO)
  289.   
  290. ! DEFINES =        -DARCHIE -DXARCHIE $(PDEBUG)
  291.   INCLUDES =        -I. -I$(EZMENUDIR)
  292.   
  293.   DEPLIBS =        $(EZMENULIB) $(DEPXAWLIB) $(DEPXMULIB) $(DEPXTOOLLIB) $(DEPXLIB)
  294. ***************
  295. *** 354,360 ****
  296.       $(MAKE) $(MFLAGS) 'CDEBUGFLAGS=$(CDEBUGFLAGS)' all);
  297.   
  298.   #
  299. ! # C code for fallback resources
  300.   #
  301.   Xarchie.ad.h: Xarchie.ad
  302.       $(AD2C) Xarchie.ad >Xarchie.ad.h
  303. --- 348,354 ----
  304.       $(MAKE) $(MFLAGS) 'CDEBUGFLAGS=$(CDEBUGFLAGS)' all);
  305.   
  306.   #
  307. ! # Make C code for fallback resources from application resource file
  308.   #
  309.   Xarchie.ad.h: Xarchie.ad
  310.       $(AD2C) Xarchie.ad >Xarchie.ad.h
  311. ***************
  312. *** 516,532 ****
  313.   atalloc.o: /usr/include/netinet/in.h pmachine.h
  314.   dirsend.o: copyright.h /usr/include/stdio.h /usr/include/errno.h
  315.   dirsend.o: /usr/include/sys/errno.h /usr/include/sys/time.h
  316. ! dirsend.o: /usr/include/sys/time.h /usr/include/netdb.h
  317. ! dirsend.o: /usr/include/strings.h /usr/include/sys/types.h
  318.   dirsend.o: /usr/include/sys/stdtypes.h /usr/include/sys/sysmacros.h
  319. ! dirsend.o: /usr/include/sys/socket.h pfs.h /usr/include/netinet/in.h pprot.h
  320. ! dirsend.o: /usr/include/sys/param.h /usr/include/machine/param.h
  321. ! dirsend.o: /usr/include/sys/signal.h /usr/include/vm/faultcode.h pcompat.h
  322. ! dirsend.o: perrno.h pmachine.h
  323. ! get_pauth.o: copyright.h /usr/include/stdio.h /usr/include/strings.h
  324. ! get_pauth.o: /usr/include/pwd.h /usr/include/sys/types.h
  325.   get_pauth.o: /usr/include/sys/stdtypes.h /usr/include/sys/sysmacros.h
  326. ! get_pauth.o: pcompat.h pauthent.h
  327.   get_vdir.o: copyright.h /usr/include/stdio.h /usr/include/strings.h pfs.h
  328.   get_vdir.o: /usr/include/sys/types.h /usr/include/sys/stdtypes.h
  329.   get_vdir.o: /usr/include/sys/sysmacros.h /usr/include/netinet/in.h pprot.h
  330. --- 510,534 ----
  331.   atalloc.o: /usr/include/netinet/in.h pmachine.h
  332.   dirsend.o: copyright.h /usr/include/stdio.h /usr/include/errno.h
  333.   dirsend.o: /usr/include/sys/errno.h /usr/include/sys/time.h
  334. ! dirsend.o: /usr/include/sys/time.h /usr/include/strings.h
  335. ! dirsend.o: /usr/include/netdb.h /usr/include/sys/types.h
  336.   dirsend.o: /usr/include/sys/stdtypes.h /usr/include/sys/sysmacros.h
  337. ! dirsend.o: pmachine.h /usr/include/sys/socket.h /usr/include/netinet/in.h
  338. ! dirsend.o: /usr/include/arpa/inet.h pfs.h pprot.h /usr/include/sys/param.h
  339. ! dirsend.o: /usr/include/machine/param.h /usr/include/sys/signal.h
  340. ! dirsend.o: /usr/include/vm/faultcode.h pcompat.h perrno.h
  341. ! dirsend.o: /usr/staff/include/X11/Intrinsic.h /usr/staff/include/X11/Xlib.h
  342. ! dirsend.o: /usr/staff/include/X11/X.h /usr/staff/include/X11/Xutil.h
  343. ! dirsend.o: /usr/staff/include/X11/Xresource.h /usr/staff/include/X11/Xos.h
  344. ! dirsend.o: /usr/include/sys/file.h /usr/include/sys/fcntlcom.h
  345. ! dirsend.o: /usr/include/sys/stat.h /usr/staff/include/X11/Core.h
  346. ! dirsend.o: /usr/staff/include/X11/Composite.h
  347. ! dirsend.o: /usr/staff/include/X11/Constraint.h
  348. ! dirsend.o: /usr/staff/include/X11/Object.h /usr/staff/include/X11/RectObj.h
  349. ! get_pauth.o: copyright.h /usr/include/stdio.h /usr/include/sys/types.h
  350.   get_pauth.o: /usr/include/sys/stdtypes.h /usr/include/sys/sysmacros.h
  351. ! get_pauth.o: /usr/include/strings.h /usr/include/pwd.h pcompat.h pauthent.h
  352. ! get_pauth.o: /usr/include/netinet/in.h
  353.   get_vdir.o: copyright.h /usr/include/stdio.h /usr/include/strings.h pfs.h
  354.   get_vdir.o: /usr/include/sys/types.h /usr/include/sys/stdtypes.h
  355.   get_vdir.o: /usr/include/sys/sysmacros.h /usr/include/netinet/in.h pprot.h
  356. ***************
  357. *** 533,539 ****
  358.   get_vdir.o: /usr/include/sys/param.h /usr/include/machine/param.h
  359.   get_vdir.o: /usr/include/sys/signal.h /usr/include/vm/faultcode.h perrno.h
  360.   get_vdir.o: pcompat.h pauthent.h pmachine.h
  361. ! p_err_text.o: copyright.h
  362.   ptalloc.o: copyright.h /usr/include/stdio.h pfs.h /usr/include/sys/types.h
  363.   ptalloc.o: /usr/include/sys/stdtypes.h /usr/include/sys/sysmacros.h
  364.   ptalloc.o: /usr/include/netinet/in.h pmachine.h
  365. --- 535,541 ----
  366.   get_vdir.o: /usr/include/sys/param.h /usr/include/machine/param.h
  367.   get_vdir.o: /usr/include/sys/signal.h /usr/include/vm/faultcode.h perrno.h
  368.   get_vdir.o: pcompat.h pauthent.h pmachine.h
  369. ! perrmesg.o: copyright.h perrno.h /usr/include/stdio.h
  370.   ptalloc.o: copyright.h /usr/include/stdio.h pfs.h /usr/include/sys/types.h
  371.   ptalloc.o: /usr/include/sys/stdtypes.h /usr/include/sys/sysmacros.h
  372.   ptalloc.o: /usr/include/netinet/in.h pmachine.h
  373. ***************
  374. *** 540,547 ****
  375.   stcopy.o: copyright.h /usr/include/stdio.h /usr/include/strings.h
  376.   support.o: copyright.h /usr/include/stdio.h /usr/include/strings.h
  377.   support.o: /usr/include/errno.h /usr/include/sys/errno.h /usr/include/netdb.h
  378. ! support.o: /usr/include/sys/file.h /usr/include/sys/types.h
  379. ! support.o: /usr/include/sys/stdtypes.h /usr/include/sys/sysmacros.h
  380.   support.o: /usr/include/sys/fcntlcom.h /usr/include/sys/stat.h
  381.   support.o: /usr/include/sys/param.h /usr/include/machine/param.h
  382.   support.o: /usr/include/sys/signal.h /usr/include/vm/faultcode.h pfs.h
  383. --- 542,549 ----
  384.   stcopy.o: copyright.h /usr/include/stdio.h /usr/include/strings.h
  385.   support.o: copyright.h /usr/include/stdio.h /usr/include/strings.h
  386.   support.o: /usr/include/errno.h /usr/include/sys/errno.h /usr/include/netdb.h
  387. ! support.o: /usr/include/sys/types.h /usr/include/sys/stdtypes.h
  388. ! support.o: /usr/include/sys/sysmacros.h /usr/include/sys/file.h
  389.   support.o: /usr/include/sys/fcntlcom.h /usr/include/sys/stat.h
  390.   support.o: /usr/include/sys/param.h /usr/include/machine/param.h
  391.   support.o: /usr/include/sys/signal.h /usr/include/vm/faultcode.h pfs.h
  392. ***************
  393. *** 583,589 ****
  394.   xarchie.o: /usr/staff/include/X11/Xaw/AsciiSink.h
  395.   xarchie.o: /usr/staff/include/X11/Xaw/Command.h
  396.   xarchie.o: /usr/staff/include/X11/Xaw/Cardinals.h types.h appres.h
  397. ! xarchie.o: classnames.h db.h actions.h patchlevel.h Xarchie.ad.h
  398.   db.o: /usr/staff/include/X11/Intrinsic.h /usr/staff/include/X11/Xlib.h
  399.   db.o: /usr/include/sys/types.h /usr/include/sys/stdtypes.h
  400.   db.o: /usr/include/sys/sysmacros.h /usr/staff/include/X11/X.h
  401. --- 585,591 ----
  402.   xarchie.o: /usr/staff/include/X11/Xaw/AsciiSink.h
  403.   xarchie.o: /usr/staff/include/X11/Xaw/Command.h
  404.   xarchie.o: /usr/staff/include/X11/Xaw/Cardinals.h types.h appres.h
  405. ! xarchie.o: classnames.h db.h actions.h settings.h patchlevel.h Xarchie.ad.h
  406.   db.o: /usr/staff/include/X11/Intrinsic.h /usr/staff/include/X11/Xlib.h
  407.   db.o: /usr/include/sys/types.h /usr/include/sys/stdtypes.h
  408.   db.o: /usr/include/sys/sysmacros.h /usr/staff/include/X11/X.h
  409. ***************
  410. *** 597,611 ****
  411.   db.o: /usr/staff/include/X11/Xaw/Cardinals.h
  412.   db.o: /usr/staff/include/X11/Xaw/List.h /usr/staff/include/X11/Xaw/Simple.h
  413.   db.o: xarchie.h db.h alert.h
  414. ! actions.o: /usr/staff/include/X11/Intrinsic.h /usr/staff/include/X11/Xlib.h
  415. ! actions.o: /usr/include/sys/types.h /usr/include/sys/stdtypes.h
  416. ! actions.o: /usr/include/sys/sysmacros.h /usr/staff/include/X11/X.h
  417. ! actions.o: /usr/staff/include/X11/Xutil.h /usr/staff/include/X11/Xresource.h
  418. ! actions.o: /usr/staff/include/X11/Xos.h /usr/include/strings.h
  419. ! actions.o: /usr/include/sys/file.h /usr/include/sys/fcntlcom.h
  420. ! actions.o: /usr/include/sys/stat.h /usr/include/sys/time.h
  421. ! actions.o: /usr/include/sys/time.h /usr/staff/include/X11/Core.h
  422. ! actions.o: /usr/staff/include/X11/Composite.h
  423.   actions.o: /usr/staff/include/X11/Constraint.h
  424.   actions.o: /usr/staff/include/X11/Object.h /usr/staff/include/X11/RectObj.h
  425.   actions.o: /usr/staff/include/X11/StringDefs.h
  426. --- 599,613 ----
  427.   db.o: /usr/staff/include/X11/Xaw/Cardinals.h
  428.   db.o: /usr/staff/include/X11/Xaw/List.h /usr/staff/include/X11/Xaw/Simple.h
  429.   db.o: xarchie.h db.h alert.h
  430. ! actions.o: /usr/include/stdio.h /usr/staff/include/X11/Intrinsic.h
  431. ! actions.o: /usr/staff/include/X11/Xlib.h /usr/include/sys/types.h
  432. ! actions.o: /usr/include/sys/stdtypes.h /usr/include/sys/sysmacros.h
  433. ! actions.o: /usr/staff/include/X11/X.h /usr/staff/include/X11/Xutil.h
  434. ! actions.o: /usr/staff/include/X11/Xresource.h /usr/staff/include/X11/Xos.h
  435. ! actions.o: /usr/include/strings.h /usr/include/sys/file.h
  436. ! actions.o: /usr/include/sys/fcntlcom.h /usr/include/sys/stat.h
  437. ! actions.o: /usr/include/sys/time.h /usr/include/sys/time.h
  438. ! actions.o: /usr/staff/include/X11/Core.h /usr/staff/include/X11/Composite.h
  439.   actions.o: /usr/staff/include/X11/Constraint.h
  440.   actions.o: /usr/staff/include/X11/Object.h /usr/staff/include/X11/RectObj.h
  441.   actions.o: /usr/staff/include/X11/StringDefs.h
  442. ***************
  443. *** 615,621 ****
  444.   actions.o: /usr/staff/include/X11/Xaw/AsciiSrc.h
  445.   actions.o: /usr/staff/include/X11/Xaw/AsciiSink.h
  446.   actions.o: /usr/staff/include/X11/Xaw/Cardinals.h procquery.h xarchie.h
  447. ! actions.o: types.h appres.h db.h settings.h ftp.h alert.h regex.h
  448.   types.o: /usr/staff/include/X11/IntrinsicP.h
  449.   types.o: /usr/staff/include/X11/Intrinsic.h /usr/staff/include/X11/Xlib.h
  450.   types.o: /usr/include/sys/types.h /usr/include/sys/stdtypes.h
  451. --- 617,624 ----
  452.   actions.o: /usr/staff/include/X11/Xaw/AsciiSrc.h
  453.   actions.o: /usr/staff/include/X11/Xaw/AsciiSink.h
  454.   actions.o: /usr/staff/include/X11/Xaw/Cardinals.h procquery.h xarchie.h
  455. ! actions.o: types.h appres.h db.h settings.h ftp.h alert.h confirm.h dialog.h
  456. ! actions.o: regex.h
  457.   types.o: /usr/staff/include/X11/IntrinsicP.h
  458.   types.o: /usr/staff/include/X11/Intrinsic.h /usr/staff/include/X11/Xlib.h
  459.   types.o: /usr/include/sys/types.h /usr/include/sys/stdtypes.h
  460. ***************
  461. *** 715,724 ****
  462.   settings.o: /usr/staff/include/X11/Xaw/AsciiSink.h EzMenu/EzMenu.h
  463.   settings.o: /usr/staff/include/X11/Xaw/SimpleMenu.h
  464.   settings.o: /usr/staff/include/X11/Xaw/Cardinals.h xarchie.h types.h appres.h
  465. ! settings.o: alert.h confirm.h
  466.   ftp.o: /usr/include/stdio.h /usr/include/pwd.h /usr/include/sys/types.h
  467. ! ftp.o: /usr/include/sys/stdtypes.h /usr/include/sys/sysmacros.h appres.h
  468. ! ftp.o: types.h
  469.   alert.o: /usr/staff/include/X11/Intrinsic.h /usr/staff/include/X11/Xlib.h
  470.   alert.o: /usr/include/sys/types.h /usr/include/sys/stdtypes.h
  471.   alert.o: /usr/include/sys/sysmacros.h /usr/staff/include/X11/X.h
  472. --- 718,735 ----
  473.   settings.o: /usr/staff/include/X11/Xaw/AsciiSink.h EzMenu/EzMenu.h
  474.   settings.o: /usr/staff/include/X11/Xaw/SimpleMenu.h
  475.   settings.o: /usr/staff/include/X11/Xaw/Cardinals.h xarchie.h types.h appres.h
  476. ! settings.o: rdgram.h copyright.h alert.h confirm.h
  477.   ftp.o: /usr/include/stdio.h /usr/include/pwd.h /usr/include/sys/types.h
  478. ! ftp.o: /usr/include/sys/stdtypes.h /usr/include/sys/sysmacros.h
  479. ! ftp.o: /usr/staff/include/X11/Intrinsic.h /usr/staff/include/X11/Xlib.h
  480. ! ftp.o: /usr/staff/include/X11/X.h /usr/staff/include/X11/Xutil.h
  481. ! ftp.o: /usr/staff/include/X11/Xresource.h /usr/staff/include/X11/Xos.h
  482. ! ftp.o: /usr/include/strings.h /usr/include/sys/file.h
  483. ! ftp.o: /usr/include/sys/fcntlcom.h /usr/include/sys/stat.h
  484. ! ftp.o: /usr/include/sys/time.h /usr/include/sys/time.h
  485. ! ftp.o: /usr/staff/include/X11/Core.h /usr/staff/include/X11/Composite.h
  486. ! ftp.o: /usr/staff/include/X11/Constraint.h /usr/staff/include/X11/Object.h
  487. ! ftp.o: /usr/staff/include/X11/RectObj.h appres.h types.h
  488.   alert.o: /usr/staff/include/X11/Intrinsic.h /usr/staff/include/X11/Xlib.h
  489.   alert.o: /usr/include/sys/types.h /usr/include/sys/stdtypes.h
  490.   alert.o: /usr/include/sys/sysmacros.h /usr/staff/include/X11/X.h
  491. ***************
  492. *** 748,750 ****
  493. --- 759,776 ----
  494.   confirm.o: /usr/staff/include/X11/Xaw/Dialog.h
  495.   confirm.o: /usr/staff/include/X11/Xaw/Form.h
  496.   confirm.o: /usr/staff/include/X11/Xaw/Cardinals.h /usr/include/stdio.h
  497. + dialog.o: /usr/staff/include/X11/Intrinsic.h /usr/staff/include/X11/Xlib.h
  498. + dialog.o: /usr/include/sys/types.h /usr/include/sys/stdtypes.h
  499. + dialog.o: /usr/include/sys/sysmacros.h /usr/staff/include/X11/X.h
  500. + dialog.o: /usr/staff/include/X11/Xutil.h /usr/staff/include/X11/Xresource.h
  501. + dialog.o: /usr/staff/include/X11/Xos.h /usr/include/strings.h
  502. + dialog.o: /usr/include/sys/file.h /usr/include/sys/fcntlcom.h
  503. + dialog.o: /usr/include/sys/stat.h /usr/include/sys/time.h
  504. + dialog.o: /usr/include/sys/time.h /usr/staff/include/X11/Core.h
  505. + dialog.o: /usr/staff/include/X11/Composite.h
  506. + dialog.o: /usr/staff/include/X11/Constraint.h /usr/staff/include/X11/Object.h
  507. + dialog.o: /usr/staff/include/X11/RectObj.h
  508. + dialog.o: /usr/staff/include/X11/StringDefs.h /usr/staff/include/X11/Shell.h
  509. + dialog.o: /usr/staff/include/X11/Xaw/Dialog.h
  510. + dialog.o: /usr/staff/include/X11/Xaw/Form.h
  511. + dialog.o: /usr/staff/include/X11/Xaw/Cardinals.h /usr/include/stdio.h
  512. *** /tmp/release17219/README    Tue Nov 12 16:53:11 1991
  513. --- README    Tue Nov 12 12:52:28 1991
  514. ***************
  515. *** 2,12 ****
  516.   
  517.           George Ferguson, ferguson@cs.rochester.edu
  518.   
  519. !              Last Change: 12 Sep 1991
  520.   
  521.   DISCLAIMER:
  522.   
  523. !      This is release 1.2.
  524.   
  525.        This software is provided as is with no warranty expressed or
  526.        implied. I hope you find it useful, but I won't be held responsible
  527. --- 2,13 ----
  528.   
  529.           George Ferguson, ferguson@cs.rochester.edu
  530.   
  531. !              Last Change: 12 Nov 1991
  532.   
  533.   DISCLAIMER:
  534.   
  535. !      This is release 1.3 of xarchie -- an X browser interface to
  536. !      the Archie Internet information system.
  537.   
  538.        This software is provided as is with no warranty expressed or
  539.        implied. I hope you find it useful, but I won't be held responsible
  540. ***************
  541. *** 21,33 ****
  542.        See the file "copyright.h" for details. Examples of other things
  543.        Prospero can do are in the file "README.PROSP" in this distribution.
  544.   
  545.        The original standalone archie client was written by Brendan Kehoe,
  546.        (brendan@cs.widener.edu), based on the Prospero archie client by
  547.        Clifford Neuman, (bcn@isi.edu). The file "README.FILES" describes
  548.        the files that are shared with these clients. The archie service was
  549. !      conceived of and implemented by Alan Emtage (bajan@cs.mcgill.ca) and
  550. !      Peter Deutsch (peterd@expresso.cc.mcgill.ca).
  551.   
  552.   INSTALLATION:
  553.   
  554.        1. Edit the Imakefile to reflect any changes for your site. These
  555. --- 22,46 ----
  556.        See the file "copyright.h" for details. Examples of other things
  557.        Prospero can do are in the file "README.PROSP" in this distribution.
  558.   
  559. + CREDITS:
  560.        The original standalone archie client was written by Brendan Kehoe,
  561.        (brendan@cs.widener.edu), based on the Prospero archie client by
  562.        Clifford Neuman, (bcn@isi.edu). The file "README.FILES" describes
  563.        the files that are shared with these clients. The archie service was
  564. !      conceived of and implemented by Alan Emtage (bajan@cs.mcgill.ca),
  565. !      Peter Deutsch (peterd@expresso.cc.mcgill.ca), and Bill Heelan
  566. !      (wheelan@cs.mcgill.ca).
  567.   
  568. + REPORTING BUGS/KUDOS:
  569. +      When reporting bugs, problems, suggestions or contributions, please
  570. +      be sure to send them to the right place. I (George Ferguson) am really
  571. +      only interested in the working of the X interface. Brendan Kehoe is
  572. +      is charge of the archie clients and the network stuff underlying xarchie,
  573. +      Cliff Neuman is in charge of Prospero, and Alan Emtage and the others
  574. +      are in charge of the Archie service itself.
  575.   INSTALLATION:
  576.   
  577.        1. Edit the Imakefile to reflect any changes for your site. These
  578. ***************
  579. *** 34,46 ****
  580.       include setting BINDIR, LIBDIR, and MANDIR if needed, and
  581.       checking CDEBUGFLAGS if debugging or optimization is desired.
  582.   
  583. -     [from Brendan Kehoe (brendan@cs.widener.edu)]
  584. -     If your default C compiler is gcc, dirsend.c shouldn't be compiled
  585. -     with Gnu C.  Until gcc 2.0, structure passing is completely hosed
  586. -     on Suns -- and the inet_ntoa() calls in dirsend will seg fault.
  587. -     There is a suitable target that you can uncomment if you are
  588. -     using gcc.
  589.       If your system doesn't have re_comp() and re_exec(), then you
  590.       need to uncomment the appropriate section in the Imakefile to
  591.       include those routines.
  592. --- 47,52 ----
  593. ***************
  594. *** 72,78 ****
  595.       IMPORTANT: Ignore the error message from makedepend if Xarchie.ad.h
  596.              is not found; it will be created automatically.
  597.   
  598. !      4. Make the package using
  599.           % make
  600.       or install it directly with
  601.           % make install install.man
  602. --- 78,84 ----
  603.       IMPORTANT: Ignore the error message from makedepend if Xarchie.ad.h
  604.              is not found; it will be created automatically.
  605.   
  606. !      5. Make the package using
  607.           % make
  608.       or install it directly with
  609.           % make install install.man
  610. ***************
  611. *** 82,87 ****
  612. --- 88,103 ----
  613.           % make install.xarchie
  614.       to install xarchie, its resource file, and its man page only.
  615.   
  616. + DEBUGGING:
  617. +      The Prospero protocol that underlies xarchie requires that UDP traffic
  618. +      be enabled on your system. If you get nothing but timeouts from dirsend,
  619. +      then either the server is just too heavily loaded or UDP traffic is
  620. +      disabled. To test the latter hypothesis, compile udp.c and follow the
  621. +      directions at the top of the file. If UDP traffic is in fact disabled,
  622. +      talk to to your syadmins. Otherwise, if you're *sure* it isn't just a
  623. +      loaded server, report the situation in detail to brendan@cs.widener.edu.
  624.   HISTORY:
  625.        Version 1.1 - 4 Sep 1991
  626.       Released to comp.sources.x.
  627. ***************
  628. *** 104,106 ****
  629. --- 120,161 ----
  630.          and: Alan B Clegg <abc@concert.net>
  631.         - Changed some widget names in resource file since the Settings
  632.           form wasn't being laid out correctly.
  633. +      Version 1.3 - 12 Nov 1991
  634. +     - Separated EzMenu widget creation from others by adding .menus
  635. +       resource and slightly changing initWidgets() in xarchie.c. This
  636. +       hopefully prevents those annoying core dumps under old or otherwise
  637. +       strange version of X. Also renamed the "hostText" on the Settings
  638. +       form to "setHostText" again in hopes of avoiding the problem.
  639. +     - Added archie.sura.net to hostMenu and made it the default elsewhere.
  640. +     - "-debug" formerly didn't want an argument -- fixed.
  641. +     - Made dirsend() asynchronous by restructuring it, so xarchie will
  642. +       now refresh and can be interrupted during queries. Added "Abort"
  643. +       button to interrupt queries.
  644. +     - Removed comments about gcc from this file and the Imakefile since
  645. +       it's handled automatically in dirsend.c using SUN_GNU_FIX.
  646. +     - From the TODO file: Fixed default-settings() action so it uses
  647. +       as defaults the values of the application resources when xarchie
  648. +       starts up.
  649. +     - Added confirmation of quitting and -expert flag (and expert
  650. +       resource) to avoid it if desired.
  651. +     - Tweaked resources for better layout, better resizing, etc, etc.
  652. +     - From: bajan@cs.mcgill.ca
  653. +       - Updated man page and added Bill Heelan acknowledgement.
  654. +     - From: khushro@zip.eecs.umich.edu
  655. +       - Added "save-to-file()" action.
  656. +     - From: Dennis Shiao <shiao@ans.net>
  657. +       - ftp.c called alert0() rather than alert1().
  658. +     - From: Lee M J McLoughlin <lmjm@doc.imperial.ac.uk>
  659. +       - Added archie.doc.ic.ac.uk to hostMenu
  660. +     - From: Amos Shapira <amoss@cs.huji.ac.il>
  661. +       - Added cs.huji.ac.il to hostMenu.
  662. +     - From: brendan@cs.widener.edu (Brendan Kehoe)
  663. +       - Changes to many files from the "archie" distribution, including
  664. +         more portable #includes and Prospero warning message handling.
  665. +         Includes new file perrmesg.c.
  666. +       - Provide udp.c to test whether UDP traffic is enabled.
  667. +     - From bcn@isi.edu (Clifford Neuman)
  668. +       - Changed dirsend.c to compare connection id's rather than
  669. +         hostnames, based on an observation from Lee McLoughlin,
  670. +         among other Prospero stuff.
  671. *** /tmp/release17219/README.FILES    Tue Nov 12 16:53:15 1991
  672. --- README.FILES    Tue Oct 22 09:10:04 1991
  673. ***************
  674. *** 20,25 ****
  675. --- 20,26 ----
  676.   
  677.   The following file is from the standalone archie client distribution:
  678.       pmachine.h
  679. +     rdgram.h
  680.   
  681.   The following file is from the standalone archie client distribution, and
  682.   was put together from parts of the Prospero distribution:
  683. ***************
  684. *** 41,52 ****
  685.   Prospero distribution:
  686.       regex.c
  687.   
  688. ! The following file is identical to the Prospero version except for code
  689. ! surrounded by "#ifdef XARCHIE" conditionals:
  690. !     dirsend.c
  691. ! The following file is identical to the standalone archie client version
  692.   except for code surrounded by "#ifdef XARCHIE" conditionals:
  693.       procquery.c
  694.   
  695.   The following files are solely in the xarchie distribution:
  696. --- 42,50 ----
  697.   Prospero distribution:
  698.       regex.c
  699.   
  700. ! The following file are identical to the standalone archie client version
  701.   except for code surrounded by "#ifdef XARCHIE" conditionals:
  702. +     dirsend.c
  703.       procquery.c
  704.   
  705.   The following files are solely in the xarchie distribution:
  706. ***************
  707. *** 63,68 ****
  708. --- 61,68 ----
  709.       confirm.h
  710.       db.c
  711.       db.h
  712. +     dialog.c
  713. +     dialog.h
  714.       ftp.c
  715.       ftp.h
  716.       procquery.c
  717. *** /tmp/release17219/TODO    Tue Nov 12 16:53:20 1991
  718. --- TODO    Tue Oct 22 08:14:59 1991
  719. ***************
  720. *** 17,26 ****
  721.   - Make the "Nice Level" button a different color or shade when the value
  722.     is >0.
  723.   
  724. - - Make the "Default" button on the Settings panel use the values that
  725. -   we had at startup (ie. in main() copy the appResources into variables
  726. -   for the button's use).
  727.   - Try to improve the status calls so that the message "grows" as more
  728.     things are received (look for "recvd_thru = htons(...)" in get_vdir.c).
  729.   
  730. --- 17,22 ----
  731. *** /tmp/release17219/Xarchie.ad    Tue Nov 12 16:53:24 1991
  732. --- Xarchie.ad    Tue Nov 12 12:46:59 1991
  733. ***************
  734. *** 1,13 ****
  735.   !
  736.   ! Xarchie.ad : Application defaults for the X11 browser interface to Archie
  737.   !
  738. ! ! George Ferguson, ferguson@cs.rochester.edu, 12 Sep 1991.
  739.   !
  740.   
  741.   !    -    -    -    -    -    -    -    -    -
  742.   ! Non-widget resources
  743.   
  744. ! Xarchie.archieHost:    archie.mcgill.ca
  745.   
  746.   ! Possible values are: exact, substr, subcase, or regexp
  747.   Xarchie.searchType:    exact
  748. --- 1,13 ----
  749.   !
  750.   ! Xarchie.ad : Application defaults for the X11 browser interface to Archie
  751.   !
  752. ! ! George Ferguson, ferguson@cs.rochester.edu, 12 Nov 1991.
  753.   !
  754.   
  755.   !    -    -    -    -    -    -    -    -    -
  756.   ! Non-widget resources
  757.   
  758. ! Xarchie.archieHost:    archie.sura.net
  759.   
  760.   ! Possible values are: exact, substr, subcase, or regexp
  761.   Xarchie.searchType:    exact
  762. ***************
  763. *** 36,44 ****
  764. --- 36,53 ----
  765.   ! Transfer mode for ftp() action
  766.   Xarchie.ftpMode:    binary
  767.   
  768. + ! If True, then results of save-to-file() are printed one entry per line.
  769. + ! If False, then results are pretty-printed.
  770. + Xarchie.saveFormatOneLine:    False
  771.   ! Bigger numbers == more verbose, if -DDEBUG was given at compile-time
  772.   Xarchie.debugLevel:    0
  773.   
  774. + ! If True, don't confirm things like quitting
  775. + Xarchie.expert:        False
  776. + !    -    -    -    -    -    -    -    -    -
  777.   ! Main display widget hierachy:
  778.   Xarchie.widgets: \
  779.       toplevel            Paned        outerPaned \
  780. ***************
  781. *** 46,58 ****
  782.       outerPaned            Form        buttonForm \
  783.       outerPaned.buttonForm        Command        quitButton \
  784.       outerPaned.buttonForm        Command        queryButton \
  785.       outerPaned.buttonForm        Command        ftpButton \
  786.       outerPaned.buttonForm        MenuButton    searchButton \
  787. -     outerPaned.buttonForm.searchButton EzMenu    searchNowMenu \
  788.       outerPaned.buttonForm        MenuButton    sortButton \
  789. -     outerPaned.buttonForm.sortButton EzMenu        sortNowMenu \
  790.       outerPaned.buttonForm        MenuButton    niceButton \
  791. -     outerPaned.buttonForm.niceButton EzMenu        niceNowMenu \
  792.       outerPaned.buttonForm        Command        settingsButton \
  793.       outerPaned.buttonForm        Label        statusLabel \
  794.       outerPaned.buttonForm        AsciiText    statusText \
  795. --- 55,66 ----
  796.       outerPaned            Form        buttonForm \
  797.       outerPaned.buttonForm        Command        quitButton \
  798.       outerPaned.buttonForm        Command        queryButton \
  799. +     outerPaned.buttonForm        Command        abortButton \
  800. +     outerPaned.buttonForm        Command        saveButton \
  801.       outerPaned.buttonForm        Command        ftpButton \
  802.       outerPaned.buttonForm        MenuButton    searchButton \
  803.       outerPaned.buttonForm        MenuButton    sortButton \
  804.       outerPaned.buttonForm        MenuButton    niceButton \
  805.       outerPaned.buttonForm        Command        settingsButton \
  806.       outerPaned.buttonForm        Label        statusLabel \
  807.       outerPaned.buttonForm        AsciiText    statusText \
  808. ***************
  809. *** 81,86 ****
  810. --- 89,100 ----
  811.       outerPaned.stringForm    Label            dateLabel \
  812.       outerPaned.stringForm    AsciiText        dateText 
  813.   
  814. + ! Main window menus have to be created separately (puke-ola)
  815. + Xarchie.menus:\
  816. +     outerPaned.buttonForm.searchButton EzMenu    searchNowMenu \
  817. +     outerPaned.buttonForm.sortButton EzMenu        sortNowMenu \
  818. +     outerPaned.buttonForm.niceButton EzMenu        niceNowMenu
  819.   ! Settings panel widget hierarchy
  820.   Xarchie.settingsWidgets:\
  821.       toplevel            TopLevelShell    settingsShell \
  822. ***************
  823. *** 97,103 ****
  824.       settingsShell.settingsForm    Label        sortLabel \
  825.       settingsShell.settingsForm    MenuButton    hostButton \
  826.       settingsShell.settingsForm    EzMenu        hostMenu \
  827. !     settingsShell.settingsForm    AsciiText    hostText \
  828.       settingsShell.settingsForm    Label        maxHitsLabel \
  829.       settingsShell.settingsForm    AsciiText    maxHitsText \
  830.       settingsShell.settingsForm    Label        timeoutLabel \
  831. --- 111,117 ----
  832.       settingsShell.settingsForm    Label        sortLabel \
  833.       settingsShell.settingsForm    MenuButton    hostButton \
  834.       settingsShell.settingsForm    EzMenu        hostMenu \
  835. !     settingsShell.settingsForm    AsciiText    setHostText \
  836.       settingsShell.settingsForm    Label        maxHitsLabel \
  837.       settingsShell.settingsForm    AsciiText    maxHitsText \
  838.       settingsShell.settingsForm    Label        timeoutLabel \
  839. ***************
  840. *** 172,182 ****
  841.   ! vary if you change the fonts. The "fromVert" and "fromHoriz" resources
  842.   ! make the buttons "pile up" properly. You can change them subject to
  843.   ! the widget creation order which is the same as the order in which the
  844. ! ! widgets are described in this file.
  845.   
  846.   Xarchie*buttonForm*quitButton.label:    Quit
  847.   Xarchie*buttonForm*quitButton.translations:#override\n\
  848. !     <Btn1Down>,<Btn1Up>:    quit() \n
  849.   
  850.   Xarchie*buttonForm*queryButton.label:        Query
  851.   Xarchie*buttonForm*queryButton.fromHoriz:    quitButton
  852. --- 186,206 ----
  853.   ! vary if you change the fonts. The "fromVert" and "fromHoriz" resources
  854.   ! make the buttons "pile up" properly. You can change them subject to
  855.   ! the widget creation order which is the same as the order in which the
  856. ! ! widgets are listed in the .widgets (or similar) resource.
  857.   
  858. + ! These keep the buttons from getting bigger or smaller when the panes
  859. + ! resize. Thus only the browser grows.
  860. + Xarchie*buttonForm.min: 50
  861. + Xarchie*buttonForm.max: 50
  862. + ! No point in having grips since only the browser can grow, and then only
  863. + ! if the whole application grows.
  864. + Xarchie*buttonForm.showGrip: False
  865.   Xarchie*buttonForm*quitButton.label:    Quit
  866.   Xarchie*buttonForm*quitButton.translations:#override\n\
  867. !     Shift<Btn1Down>,<Btn1Up>:    quit(always) \n\
  868. !     <Btn1Down>,<Btn1Up>:        quit() \n
  869.   
  870.   Xarchie*buttonForm*queryButton.label:        Query
  871.   Xarchie*buttonForm*queryButton.fromHoriz:    quitButton
  872. ***************
  873. *** 183,190 ****
  874.   Xarchie*buttonForm*queryButton.translations:#override\n\
  875.       <Btn1Down>,<Btn1Up>:    query() \n
  876.   
  877.   Xarchie*buttonForm*ftpButton.label:        Ftp
  878. ! Xarchie*buttonForm*ftpButton.fromHoriz:        queryButton
  879.   Xarchie*buttonForm*ftpButton.translations:#override\n\
  880.       <Btn1Down>,<Btn1Up>:    ftp() \n
  881.   
  882. --- 207,225 ----
  883.   Xarchie*buttonForm*queryButton.translations:#override\n\
  884.       <Btn1Down>,<Btn1Up>:    query() \n
  885.   
  886. + Xarchie*buttonForm*abortButton.label:        Abort
  887. + Xarchie*buttonForm*abortButton.fromHoriz:    queryButton
  888. + Xarchie*buttonForm*abortButton.translations:#override\n\
  889. +     <Btn1Down>,<Btn1Up>:    abort() \n
  890. + Xarchie*buttonForm*saveButton.label:        Save
  891. + Xarchie*buttonForm*saveButton.fromHoriz:    abortButton
  892. + Xarchie*buttonForm*saveButton.translations:#override\n\
  893. +     Shift<Btn1Down>,<Btn1Up>:    save-to-file("%s.lst") \n\
  894. +     <Btn1Down>,<Btn1Up>:        save-to-file() \n
  895.   Xarchie*buttonForm*ftpButton.label:        Ftp
  896. ! Xarchie*buttonForm*ftpButton.fromHoriz:        saveButton
  897.   Xarchie*buttonForm*ftpButton.translations:#override\n\
  898.       <Btn1Down>,<Btn1Up>:    ftp() \n
  899.   
  900. ***************
  901. *** 214,219 ****
  902. --- 249,256 ----
  903.   Xarchie*buttonForm*statusText*editType:        read
  904.   ! Don't give a border since it's "read-only"
  905.   Xarchie*buttonForm*statusText.borderWidth:    0
  906. + ! Don't ever give a scrollbar since it's just confusing
  907. + Xarchie*buttonForm*statusText*scrollHorizontal:    never
  908.   ! Don't ever show the caret in the status line
  909.   Xarchie*buttonForm*statusText*translations:#override\n
  910.   
  911. ***************
  912. *** 222,227 ****
  913. --- 259,269 ----
  914.   
  915.   Xarchie*innerPaned.orientation:    horizontal
  916.   
  917. + ! No point in having grips since only the browser can grow, and then only
  918. + ! if the whole application grows.
  919. + Xarchie*innerPaned.showGrip: False
  920.   !    -    -    -    -    -    -    -    -    -
  921.   ! Bottom String Form
  922.   
  923. ***************
  924. *** 230,238 ****
  925. --- 272,291 ----
  926.   Xarchie*stringForm.min: 120
  927.   Xarchie*stringForm.max: 120
  928.   
  929. + ! Left justify labels or they'll move on resize
  930. + Xarchie*stringForm*Label.justify:    left
  931. + ! De-emphasize most labels
  932. + Xarchie*stringForm*Label.font:        fixed
  933. + ! Disable typing into most Text widgets
  934. + Xarchie*stringForm*AsciiSrc.editType:     read
  935. + ! Except the search term items, which can be edited and should stand out
  936.   Xarchie*stringForm*searchLabel.label:        Search Term:
  937. + Xarchie*stringForm*searchLabel.font:        *fixed*bold*
  938.   Xarchie*stringForm*searchText*width:        375
  939.   Xarchie*stringForm*searchText.fromHoriz:    searchLabel
  940. + Xarchie*stringForm*searchText*editType:     edit
  941.   Xarchie*stringForm*searchText*translations:#override\n\
  942.       <Enter>:    display-caret(True) \n\
  943.       <Leave>:    display-caret(False) \n\
  944. ***************
  945. *** 242,266 ****
  946.   Xarchie*stringForm*hostLabel.fromVert:    searchLabel
  947.   Xarchie*stringForm*hostText.fromVert:    searchLabel
  948.   Xarchie*stringForm*hostText.fromHoriz:    hostLabel
  949. ! Xarchie*stringForm*hostText.width:    424
  950.   
  951.   Xarchie*stringForm*locationLabel.label:        Location:
  952.   Xarchie*stringForm*locationLabel.fromVert:    hostLabel
  953.   Xarchie*stringForm*locationText.fromHoriz:    locationLabel
  954.   Xarchie*stringForm*locationText.fromVert:    hostLabel
  955. ! Xarchie*stringForm*locationText.width:        396
  956.   
  957.   Xarchie*stringForm*fileLabel.label:    File:
  958.   Xarchie*stringForm*fileLabel.fromVert:    locationLabel
  959.   Xarchie*stringForm*fileText.fromHoriz:    fileLabel
  960.   Xarchie*stringForm*fileText.fromVert:    locationLabel
  961. ! Xarchie*stringForm*fileText.width:    424
  962.   
  963.   Xarchie*stringForm*sizeLabel.label:    Size:
  964.   Xarchie*stringForm*sizeLabel.fromVert:    fileLabel
  965.   Xarchie*stringForm*sizeText.fromHoriz:    sizeLabel
  966.   Xarchie*stringForm*sizeText.fromVert:    fileLabel
  967. ! Xarchie*stringForm*sizeText*width:    111
  968.   
  969.   Xarchie*stringForm*modesLabel.label:    Mode:
  970.   Xarchie*stringForm*modesLabel.fromHoriz:sizeText
  971. --- 295,319 ----
  972.   Xarchie*stringForm*hostLabel.fromVert:    searchLabel
  973.   Xarchie*stringForm*hostText.fromVert:    searchLabel
  974.   Xarchie*stringForm*hostText.fromHoriz:    hostLabel
  975. ! Xarchie*stringForm*hostText.width:    429
  976.   
  977.   Xarchie*stringForm*locationLabel.label:        Location:
  978.   Xarchie*stringForm*locationLabel.fromVert:    hostLabel
  979.   Xarchie*stringForm*locationText.fromHoriz:    locationLabel
  980.   Xarchie*stringForm*locationText.fromVert:    hostLabel
  981. ! Xarchie*stringForm*locationText.width:        405
  982.   
  983.   Xarchie*stringForm*fileLabel.label:    File:
  984.   Xarchie*stringForm*fileLabel.fromVert:    locationLabel
  985.   Xarchie*stringForm*fileText.fromHoriz:    fileLabel
  986.   Xarchie*stringForm*fileText.fromVert:    locationLabel
  987. ! Xarchie*stringForm*fileText.width:    429
  988.   
  989.   Xarchie*stringForm*sizeLabel.label:    Size:
  990.   Xarchie*stringForm*sizeLabel.fromVert:    fileLabel
  991.   Xarchie*stringForm*sizeText.fromHoriz:    sizeLabel
  992.   Xarchie*stringForm*sizeText.fromVert:    fileLabel
  993. ! Xarchie*stringForm*sizeText*width:    112
  994.   
  995.   Xarchie*stringForm*modesLabel.label:    Mode:
  996.   Xarchie*stringForm*modesLabel.fromHoriz:sizeText
  997. ***************
  998. *** 274,280 ****
  999.   Xarchie*stringForm*dateLabel.fromVert:    fileLabel
  1000.   Xarchie*stringForm*dateText.fromHoriz:    dateLabel
  1001.   Xarchie*stringForm*dateText.fromVert:    fileLabel
  1002. ! Xarchie*stringForm*dateText*width:    111
  1003.   
  1004.   !    -    -    -    -    -    -    -    -    -
  1005.   ! Popup settings editor
  1006. --- 327,333 ----
  1007.   Xarchie*stringForm*dateLabel.fromVert:    fileLabel
  1008.   Xarchie*stringForm*dateText.fromHoriz:    dateLabel
  1009.   Xarchie*stringForm*dateText.fromVert:    fileLabel
  1010. ! Xarchie*stringForm*dateText*width:    125
  1011.   
  1012.   !    -    -    -    -    -    -    -    -    -
  1013.   ! Popup settings editor
  1014. ***************
  1015. *** 317,325 ****
  1016.   Xarchie*settingsForm*hostButton.label:        Host:
  1017.   Xarchie*settingsForm*hostButton.menuName:    hostMenu
  1018.   Xarchie*settingsForm*hostButton.fromVert:    setSortButton
  1019. ! Xarchie*settingsForm*hostText.fromVert:        setSortButton
  1020. ! Xarchie*settingsForm*hostText.fromHoriz:    hostButton
  1021. ! Xarchie*settingsForm*hostText*width:        200
  1022.   
  1023.   Xarchie*settingsForm*maxHitsLabel.label:    Max Hits:
  1024.   Xarchie*settingsForm*maxHitsLabel.fromVert:    hostButton
  1025. --- 370,378 ----
  1026.   Xarchie*settingsForm*hostButton.label:        Host:
  1027.   Xarchie*settingsForm*hostButton.menuName:    hostMenu
  1028.   Xarchie*settingsForm*hostButton.fromVert:    setSortButton
  1029. ! Xarchie*settingsForm*setHostText.fromVert:    setSortButton
  1030. ! Xarchie*settingsForm*setHostText.fromHoriz:    hostButton
  1031. ! Xarchie*settingsForm*setHostText*width:        200
  1032.   
  1033.   Xarchie*settingsForm*maxHitsLabel.label:    Max Hits:
  1034.   Xarchie*settingsForm*maxHitsLabel.fromVert:    hostButton
  1035. ***************
  1036. *** 377,385 ****
  1037.   Xarchie*hostMenu.label:        Archie Hosts
  1038.   Xarchie*hostMenu.menu:\
  1039.      (line) \
  1040.      (item "archie.mcgill.ca"    (action "set-host(archie.mcgill.ca)")) \
  1041.      (item "archie.funet.fi"    (action "set-host(archie.funet.fi)")) \
  1042. !    (item "archie.au"        (action "set-host(archie.au)"))
  1043.   
  1044.   Xarchie*niceMenu.label:        Nice Levels
  1045.   Xarchie*niceMenu.menu:\
  1046. --- 430,441 ----
  1047.   Xarchie*hostMenu.label:        Archie Hosts
  1048.   Xarchie*hostMenu.menu:\
  1049.      (line) \
  1050. +    (item "archie.sura.net"    (action "set-host(archie.sura.net)")) \
  1051.      (item "archie.mcgill.ca"    (action "set-host(archie.mcgill.ca)")) \
  1052.      (item "archie.funet.fi"    (action "set-host(archie.funet.fi)")) \
  1053. !    (item "archie.au"        (action "set-host(archie.au)")) \
  1054. !    (item "archie.doc.ic.ac.uk"    (action "set-host(archie.doc.ic.ac.uk)")) \
  1055. !    (item "cs.huji.ac.il"    (action "set-host(cs.huji.ac.il)"))
  1056.   
  1057.   Xarchie*niceMenu.label:        Nice Levels
  1058.   Xarchie*niceMenu.menu:\
  1059. ***************
  1060. *** 426,431 ****
  1061. --- 482,488 ----
  1062.   
  1063.   Xarchie*allowShellResize:        True
  1064.   Xarchie*Dialog*Label.resizable:        True
  1065. + Xarchie*Dialog*Text*scrollHorizontal:    never
  1066.   Xarchie*Dialog.icon:            xlogo32
  1067.   
  1068.   Xarchie*alertDialog*okButton.label:    Ok
  1069. ***************
  1070. *** 432,434 ****
  1071. --- 489,498 ----
  1072.   
  1073.   Xarchie*confirmDialog*yesButton.label:    Yes
  1074.   Xarchie*confirmDialog*noButton.label:    No
  1075. + Xarchie*dialogDialog*okButton.label:    Ok
  1076. + Xarchie*dialogDialog*cancelButton.label:Cancel
  1077. + Xarchie*dialogDialog.value*translations:#override\n\
  1078. +     <Key>Return:    dialog-ok() \n\
  1079. +     <Enter>:    display-caret(True) \n\
  1080. +     <Leave>:    display-caret(False) \n
  1081. *** /tmp/release17219/Xarchie.ad.h    Tue Nov 12 16:53:30 1991
  1082. --- Xarchie.ad.h    Tue Nov 12 12:53:03 1991
  1083. ***************
  1084. *** 1,4 ****
  1085. ! "Xarchie.archieHost:    archie.mcgill.ca",
  1086.   "Xarchie.searchType:    exact",
  1087.   "Xarchie.sortType:    default",
  1088.   "Xarchie.maxHits:    99",
  1089. --- 1,4 ----
  1090. ! "Xarchie.archieHost:    archie.sura.net",
  1091.   "Xarchie.searchType:    exact",
  1092.   "Xarchie.sortType:    default",
  1093.   "Xarchie.maxHits:    99",
  1094. ***************
  1095. *** 8,14 ****
  1096. --- 8,16 ----
  1097.   "Xarchie.niceLevel:    0",
  1098.   "Xarchie.ftpDir:        .",
  1099.   "Xarchie.ftpMode:    binary",
  1100. + "Xarchie.saveFormatOneLine:    False",
  1101.   "Xarchie.debugLevel:    0",
  1102. + "Xarchie.expert:        False",
  1103.   "Xarchie.widgets: \
  1104.       toplevel            Paned        outerPaned \
  1105.   \
  1106. ***************
  1107. *** 15,27 ****
  1108.       outerPaned            Form        buttonForm \
  1109.       outerPaned.buttonForm        Command        quitButton \
  1110.       outerPaned.buttonForm        Command        queryButton \
  1111.       outerPaned.buttonForm        Command        ftpButton \
  1112.       outerPaned.buttonForm        MenuButton    searchButton \
  1113. -     outerPaned.buttonForm.searchButton EzMenu    searchNowMenu \
  1114.       outerPaned.buttonForm        MenuButton    sortButton \
  1115. -     outerPaned.buttonForm.sortButton EzMenu        sortNowMenu \
  1116.       outerPaned.buttonForm        MenuButton    niceButton \
  1117. -     outerPaned.buttonForm.niceButton EzMenu        niceNowMenu \
  1118.       outerPaned.buttonForm        Command        settingsButton \
  1119.       outerPaned.buttonForm        Label        statusLabel \
  1120.       outerPaned.buttonForm        AsciiText    statusText \
  1121. --- 17,28 ----
  1122.       outerPaned            Form        buttonForm \
  1123.       outerPaned.buttonForm        Command        quitButton \
  1124.       outerPaned.buttonForm        Command        queryButton \
  1125. +     outerPaned.buttonForm        Command        abortButton \
  1126. +     outerPaned.buttonForm        Command        saveButton \
  1127.       outerPaned.buttonForm        Command        ftpButton \
  1128.       outerPaned.buttonForm        MenuButton    searchButton \
  1129.       outerPaned.buttonForm        MenuButton    sortButton \
  1130.       outerPaned.buttonForm        MenuButton    niceButton \
  1131.       outerPaned.buttonForm        Command        settingsButton \
  1132.       outerPaned.buttonForm        Label        statusLabel \
  1133.       outerPaned.buttonForm        AsciiText    statusText \
  1134. ***************
  1135. *** 49,54 ****
  1136. --- 50,59 ----
  1137.       outerPaned.stringForm    AsciiText        modesText \
  1138.       outerPaned.stringForm    Label            dateLabel \
  1139.       outerPaned.stringForm    AsciiText        dateText ",
  1140. + "Xarchie.menus:\
  1141. +     outerPaned.buttonForm.searchButton EzMenu    searchNowMenu \
  1142. +     outerPaned.buttonForm.sortButton EzMenu        sortNowMenu \
  1143. +     outerPaned.buttonForm.niceButton EzMenu        niceNowMenu",
  1144.   "Xarchie.settingsWidgets:\
  1145.       toplevel            TopLevelShell    settingsShell \
  1146.       settingsShell            Form        settingsForm \
  1147. ***************
  1148. *** 64,70 ****
  1149.       settingsShell.settingsForm    Label        sortLabel \
  1150.       settingsShell.settingsForm    MenuButton    hostButton \
  1151.       settingsShell.settingsForm    EzMenu        hostMenu \
  1152. !     settingsShell.settingsForm    AsciiText    hostText \
  1153.       settingsShell.settingsForm    Label        maxHitsLabel \
  1154.       settingsShell.settingsForm    AsciiText    maxHitsText \
  1155.       settingsShell.settingsForm    Label        timeoutLabel \
  1156. --- 69,75 ----
  1157.       settingsShell.settingsForm    Label        sortLabel \
  1158.       settingsShell.settingsForm    MenuButton    hostButton \
  1159.       settingsShell.settingsForm    EzMenu        hostMenu \
  1160. !     settingsShell.settingsForm    AsciiText    setHostText \
  1161.       settingsShell.settingsForm    Label        maxHitsLabel \
  1162.       settingsShell.settingsForm    AsciiText    maxHitsText \
  1163.       settingsShell.settingsForm    Label        timeoutLabel \
  1164. ***************
  1165. *** 105,119 ****
  1166.       <Enter>:    display-caret(True) \\n\
  1167.       <Leave>:    display-caret(False) \\n",
  1168.   "Xarchie*outerPaned.orientation:    vertical",
  1169.   "Xarchie*buttonForm*quitButton.label:    Quit",
  1170.   "Xarchie*buttonForm*quitButton.translations:#override\\n\
  1171. !     <Btn1Down>,<Btn1Up>:    quit() \\n",
  1172.   "Xarchie*buttonForm*queryButton.label:        Query",
  1173.   "Xarchie*buttonForm*queryButton.fromHoriz:    quitButton",
  1174.   "Xarchie*buttonForm*queryButton.translations:#override\\n\
  1175.       <Btn1Down>,<Btn1Up>:    query() \\n",
  1176.   "Xarchie*buttonForm*ftpButton.label:        Ftp",
  1177. ! "Xarchie*buttonForm*ftpButton.fromHoriz:        queryButton",
  1178.   "Xarchie*buttonForm*ftpButton.translations:#override\\n\
  1179.       <Btn1Down>,<Btn1Up>:    ftp() \\n",
  1180.   "Xarchie*buttonForm*searchButton.label:        Search Type",
  1181. --- 110,137 ----
  1182.       <Enter>:    display-caret(True) \\n\
  1183.       <Leave>:    display-caret(False) \\n",
  1184.   "Xarchie*outerPaned.orientation:    vertical",
  1185. + "Xarchie*buttonForm.min: 50",
  1186. + "Xarchie*buttonForm.max: 50",
  1187. + "Xarchie*buttonForm.showGrip: False",
  1188.   "Xarchie*buttonForm*quitButton.label:    Quit",
  1189.   "Xarchie*buttonForm*quitButton.translations:#override\\n\
  1190. !     Shift<Btn1Down>,<Btn1Up>:    quit(always) \\n\
  1191. !     <Btn1Down>,<Btn1Up>:        quit() \\n",
  1192.   "Xarchie*buttonForm*queryButton.label:        Query",
  1193.   "Xarchie*buttonForm*queryButton.fromHoriz:    quitButton",
  1194.   "Xarchie*buttonForm*queryButton.translations:#override\\n\
  1195.       <Btn1Down>,<Btn1Up>:    query() \\n",
  1196. + "Xarchie*buttonForm*abortButton.label:        Abort",
  1197. + "Xarchie*buttonForm*abortButton.fromHoriz:    queryButton",
  1198. + "Xarchie*buttonForm*abortButton.translations:#override\\n\
  1199. +     <Btn1Down>,<Btn1Up>:    abort() \\n",
  1200. + "Xarchie*buttonForm*saveButton.label:        Save",
  1201. + "Xarchie*buttonForm*saveButton.fromHoriz:    abortButton",
  1202. + "Xarchie*buttonForm*saveButton.translations:#override\\n\
  1203. +     Shift<Btn1Down>,<Btn1Up>:    save-to-file(\"%s.lst\") \\n\
  1204. +     <Btn1Down>,<Btn1Up>:        save-to-file() \\n",
  1205.   "Xarchie*buttonForm*ftpButton.label:        Ftp",
  1206. ! "Xarchie*buttonForm*ftpButton.fromHoriz:        saveButton",
  1207.   "Xarchie*buttonForm*ftpButton.translations:#override\\n\
  1208.       <Btn1Down>,<Btn1Up>:    ftp() \\n",
  1209.   "Xarchie*buttonForm*searchButton.label:        Search Type",
  1210. ***************
  1211. *** 136,148 ****
  1212. --- 154,173 ----
  1213.   "Xarchie*buttonForm*statusText*width:        410",
  1214.   "Xarchie*buttonForm*statusText*editType:        read",
  1215.   "Xarchie*buttonForm*statusText.borderWidth:    0",
  1216. + "Xarchie*buttonForm*statusText*scrollHorizontal:    never",
  1217.   "Xarchie*buttonForm*statusText*translations:#override\\n",
  1218.   "Xarchie*innerPaned.orientation:    horizontal",
  1219. + "Xarchie*innerPaned.showGrip: False",
  1220.   "Xarchie*stringForm.min: 120",
  1221.   "Xarchie*stringForm.max: 120",
  1222. + "Xarchie*stringForm*Label.justify:    left",
  1223. + "Xarchie*stringForm*Label.font:        fixed",
  1224. + "Xarchie*stringForm*AsciiSrc.editType:     read",
  1225.   "Xarchie*stringForm*searchLabel.label:        Search Term:",
  1226. + "Xarchie*stringForm*searchLabel.font:        *fixed*bold*",
  1227.   "Xarchie*stringForm*searchText*width:        375",
  1228.   "Xarchie*stringForm*searchText.fromHoriz:    searchLabel",
  1229. + "Xarchie*stringForm*searchText*editType:     edit",
  1230.   "Xarchie*stringForm*searchText*translations:#override\\n\
  1231.       <Enter>:    display-caret(True) \\n\
  1232.       <Leave>:    display-caret(False) \\n\
  1233. ***************
  1234. *** 151,172 ****
  1235.   "Xarchie*stringForm*hostLabel.fromVert:    searchLabel",
  1236.   "Xarchie*stringForm*hostText.fromVert:    searchLabel",
  1237.   "Xarchie*stringForm*hostText.fromHoriz:    hostLabel",
  1238. ! "Xarchie*stringForm*hostText.width:    424",
  1239.   "Xarchie*stringForm*locationLabel.label:        Location:",
  1240.   "Xarchie*stringForm*locationLabel.fromVert:    hostLabel",
  1241.   "Xarchie*stringForm*locationText.fromHoriz:    locationLabel",
  1242.   "Xarchie*stringForm*locationText.fromVert:    hostLabel",
  1243. ! "Xarchie*stringForm*locationText.width:        396",
  1244.   "Xarchie*stringForm*fileLabel.label:    File:",
  1245.   "Xarchie*stringForm*fileLabel.fromVert:    locationLabel",
  1246.   "Xarchie*stringForm*fileText.fromHoriz:    fileLabel",
  1247.   "Xarchie*stringForm*fileText.fromVert:    locationLabel",
  1248. ! "Xarchie*stringForm*fileText.width:    424",
  1249.   "Xarchie*stringForm*sizeLabel.label:    Size:",
  1250.   "Xarchie*stringForm*sizeLabel.fromVert:    fileLabel",
  1251.   "Xarchie*stringForm*sizeText.fromHoriz:    sizeLabel",
  1252.   "Xarchie*stringForm*sizeText.fromVert:    fileLabel",
  1253. ! "Xarchie*stringForm*sizeText*width:    111",
  1254.   "Xarchie*stringForm*modesLabel.label:    Mode:",
  1255.   "Xarchie*stringForm*modesLabel.fromHoriz:sizeText",
  1256.   "Xarchie*stringForm*modesLabel.fromVert:    fileLabel",
  1257. --- 176,197 ----
  1258.   "Xarchie*stringForm*hostLabel.fromVert:    searchLabel",
  1259.   "Xarchie*stringForm*hostText.fromVert:    searchLabel",
  1260.   "Xarchie*stringForm*hostText.fromHoriz:    hostLabel",
  1261. ! "Xarchie*stringForm*hostText.width:    429",
  1262.   "Xarchie*stringForm*locationLabel.label:        Location:",
  1263.   "Xarchie*stringForm*locationLabel.fromVert:    hostLabel",
  1264.   "Xarchie*stringForm*locationText.fromHoriz:    locationLabel",
  1265.   "Xarchie*stringForm*locationText.fromVert:    hostLabel",
  1266. ! "Xarchie*stringForm*locationText.width:        405",
  1267.   "Xarchie*stringForm*fileLabel.label:    File:",
  1268.   "Xarchie*stringForm*fileLabel.fromVert:    locationLabel",
  1269.   "Xarchie*stringForm*fileText.fromHoriz:    fileLabel",
  1270.   "Xarchie*stringForm*fileText.fromVert:    locationLabel",
  1271. ! "Xarchie*stringForm*fileText.width:    429",
  1272.   "Xarchie*stringForm*sizeLabel.label:    Size:",
  1273.   "Xarchie*stringForm*sizeLabel.fromVert:    fileLabel",
  1274.   "Xarchie*stringForm*sizeText.fromHoriz:    sizeLabel",
  1275.   "Xarchie*stringForm*sizeText.fromVert:    fileLabel",
  1276. ! "Xarchie*stringForm*sizeText*width:    112",
  1277.   "Xarchie*stringForm*modesLabel.label:    Mode:",
  1278.   "Xarchie*stringForm*modesLabel.fromHoriz:sizeText",
  1279.   "Xarchie*stringForm*modesLabel.fromVert:    fileLabel",
  1280. ***************
  1281. *** 178,184 ****
  1282.   "Xarchie*stringForm*dateLabel.fromVert:    fileLabel",
  1283.   "Xarchie*stringForm*dateText.fromHoriz:    dateLabel",
  1284.   "Xarchie*stringForm*dateText.fromVert:    fileLabel",
  1285. ! "Xarchie*stringForm*dateText*width:    111",
  1286.   "Xarchie*settingsForm*Text*borderWidth:        0",
  1287.   "Xarchie*settingsForm*Label*resizable:        True",
  1288.   "Xarchie*settingsShell.title:            Xarchie Settings Panel",
  1289. --- 203,209 ----
  1290.   "Xarchie*stringForm*dateLabel.fromVert:    fileLabel",
  1291.   "Xarchie*stringForm*dateText.fromHoriz:    dateLabel",
  1292.   "Xarchie*stringForm*dateText.fromVert:    fileLabel",
  1293. ! "Xarchie*stringForm*dateText*width:    125",
  1294.   "Xarchie*settingsForm*Text*borderWidth:        0",
  1295.   "Xarchie*settingsForm*Label*resizable:        True",
  1296.   "Xarchie*settingsShell.title:            Xarchie Settings Panel",
  1297. ***************
  1298. *** 210,218 ****
  1299.   "Xarchie*settingsForm*hostButton.label:        Host:",
  1300.   "Xarchie*settingsForm*hostButton.menuName:    hostMenu",
  1301.   "Xarchie*settingsForm*hostButton.fromVert:    setSortButton",
  1302. ! "Xarchie*settingsForm*hostText.fromVert:        setSortButton",
  1303. ! "Xarchie*settingsForm*hostText.fromHoriz:    hostButton",
  1304. ! "Xarchie*settingsForm*hostText*width:        200",
  1305.   "Xarchie*settingsForm*maxHitsLabel.label:    Max Hits:",
  1306.   "Xarchie*settingsForm*maxHitsLabel.fromVert:    hostButton",
  1307.   "Xarchie*settingsForm*maxHitsText.fromVert:    hostButton",
  1308. --- 235,243 ----
  1309.   "Xarchie*settingsForm*hostButton.label:        Host:",
  1310.   "Xarchie*settingsForm*hostButton.menuName:    hostMenu",
  1311.   "Xarchie*settingsForm*hostButton.fromVert:    setSortButton",
  1312. ! "Xarchie*settingsForm*setHostText.fromVert:    setSortButton",
  1313. ! "Xarchie*settingsForm*setHostText.fromHoriz:    hostButton",
  1314. ! "Xarchie*settingsForm*setHostText*width:        200",
  1315.   "Xarchie*settingsForm*maxHitsLabel.label:    Max Hits:",
  1316.   "Xarchie*settingsForm*maxHitsLabel.fromVert:    hostButton",
  1317.   "Xarchie*settingsForm*maxHitsText.fromVert:    hostButton",
  1318. ***************
  1319. *** 256,264 ****
  1320.   "Xarchie*hostMenu.label:        Archie Hosts",
  1321.   "Xarchie*hostMenu.menu:\
  1322.      (line) \
  1323.      (item \"archie.mcgill.ca\"    (action \"set-host(archie.mcgill.ca)\")) \
  1324.      (item \"archie.funet.fi\"    (action \"set-host(archie.funet.fi)\")) \
  1325. !    (item \"archie.au\"        (action \"set-host(archie.au)\"))",
  1326.   "Xarchie*niceMenu.label:        Nice Levels",
  1327.   "Xarchie*niceMenu.menu:\
  1328.       (line) \
  1329. --- 281,292 ----
  1330.   "Xarchie*hostMenu.label:        Archie Hosts",
  1331.   "Xarchie*hostMenu.menu:\
  1332.      (line) \
  1333. +    (item \"archie.sura.net\"    (action \"set-host(archie.sura.net)\")) \
  1334.      (item \"archie.mcgill.ca\"    (action \"set-host(archie.mcgill.ca)\")) \
  1335.      (item \"archie.funet.fi\"    (action \"set-host(archie.funet.fi)\")) \
  1336. !    (item \"archie.au\"        (action \"set-host(archie.au)\")) \
  1337. !    (item \"archie.doc.ic.ac.uk\"    (action \"set-host(archie.doc.ic.ac.uk)\")) \
  1338. !    (item \"cs.huji.ac.il\"    (action \"set-host(cs.huji.ac.il)\"))",
  1339.   "Xarchie*niceMenu.label:        Nice Levels",
  1340.   "Xarchie*niceMenu.menu:\
  1341.       (line) \
  1342. ***************
  1343. *** 294,300 ****
  1344. --- 322,335 ----
  1345.       (item \"Nicest\"        (action \"set-nice-level-now(32765)\"))",
  1346.   "Xarchie*allowShellResize:        True",
  1347.   "Xarchie*Dialog*Label.resizable:        True",
  1348. + "Xarchie*Dialog*Text*scrollHorizontal:    never",
  1349.   "Xarchie*Dialog.icon:            xlogo32",
  1350.   "Xarchie*alertDialog*okButton.label:    Ok",
  1351.   "Xarchie*confirmDialog*yesButton.label:    Yes",
  1352.   "Xarchie*confirmDialog*noButton.label:    No",
  1353. + "Xarchie*dialogDialog*okButton.label:    Ok",
  1354. + "Xarchie*dialogDialog*cancelButton.label:Cancel",
  1355. + "Xarchie*dialogDialog.value*translations:#override\\n\
  1356. +     <Key>Return:    dialog-ok() \\n\
  1357. +     <Enter>:    display-caret(True) \\n\
  1358. +     <Leave>:    display-caret(False) \\n",
  1359. *** /tmp/release17219/actions.c    Tue Nov 12 16:53:34 1991
  1360. --- actions.c    Tue Nov 12 12:47:14 1991
  1361. ***************
  1362. *** 6,15 ****
  1363.    * which are imported. Eventually there may be more actions, and they'll
  1364.    * be put here.
  1365.    *
  1366. !  * George Ferguson, ferguson@cs.rochester.edu, 12 Sep 1991.
  1367.    *
  1368.    */
  1369.   
  1370.   #include <X11/Intrinsic.h>
  1371.   #include <X11/StringDefs.h>
  1372.   #include <X11/Xaw/Text.h>
  1373. --- 6,16 ----
  1374.    * which are imported. Eventually there may be more actions, and they'll
  1375.    * be put here.
  1376.    *
  1377. !  * George Ferguson, ferguson@cs.rochester.edu, 12 Nov 1991.
  1378.    *
  1379.    */
  1380.   
  1381. + #include <stdio.h>
  1382.   #include <X11/Intrinsic.h>
  1383.   #include <X11/StringDefs.h>
  1384.   #include <X11/Xaw/Text.h>
  1385. ***************
  1386. *** 22,38 ****
  1387.   #include "settings.h"        /* for settings actions */
  1388.   #include "ftp.h"
  1389.   #include "alert.h"
  1390.   #include "regex.h"
  1391.   
  1392.   /*
  1393.    * Functions defined here
  1394.    */
  1395.   static void quitAction(),queryAction(),ftpAction();
  1396.   
  1397.   /*
  1398.    * Data defined here:
  1399.    */
  1400. ! XtActionsRec actionTable[15] = {    /* check size in actions.h! */
  1401.       { "quit",            quitAction },
  1402.       { "query",            queryAction },
  1403.       { "ftp",            ftpAction },
  1404. --- 23,45 ----
  1405.   #include "settings.h"        /* for settings actions */
  1406.   #include "ftp.h"
  1407.   #include "alert.h"
  1408. + #include "confirm.h"
  1409. + #include "dialog.h"
  1410.   #include "regex.h"
  1411. + extern char *progname;
  1412. + extern Database *db;
  1413. + extern abortDirsend();        /* dirsend.c */
  1414.   
  1415.   /*
  1416.    * Functions defined here
  1417.    */
  1418.   static void quitAction(),queryAction(),ftpAction();
  1419. + static void saveAction(),abortAction();
  1420.   
  1421.   /*
  1422.    * Data defined here:
  1423.    */
  1424. ! XtActionsRec actionTable[22] = {    /* check size in actions.h! */
  1425.       { "quit",            quitAction },
  1426.       { "query",            queryAction },
  1427.       { "ftp",            ftpAction },
  1428. ***************
  1429. *** 48,54 ****
  1430. --- 55,69 ----
  1431.       { "set-host-now",        setHostNowAction },
  1432.       { "set-nice-level",        setNiceLevelAction },
  1433.       { "set-nice-level-now",    setNiceLevelNowAction },
  1434. +     { "save-to-file",        saveAction },
  1435. +     { "abort",            abortAction },
  1436. +     { "alert-ok",        alertOk },
  1437. +     { "confirm-yes",        confirmYes },
  1438. +     { "confirm-no",        confirmNo },
  1439. +     { "dialog-ok",        dialogOk },
  1440. +     { "dialog-cancel",        dialogCancel },
  1441.   };
  1442. + static Boolean doingQuery;
  1443.   
  1444.   /*    -    -    -    -    -    -    -    -    */
  1445.   
  1446. ***************
  1447. *** 60,67 ****
  1448.   String *params;
  1449.   Cardinal *num_params;
  1450.   {
  1451. !     XtDestroyApplicationContext(appContext);
  1452. !     exit(0);
  1453.   }
  1454.   
  1455.   /*ARGSUSED*/
  1456. --- 75,85 ----
  1457.   String *params;
  1458.   Cardinal *num_params;
  1459.   {
  1460. !     if (*num_params > ZERO || appResources.expert ||
  1461. !                     confirm0("Really quit xarchie?")) {
  1462. !     XtDestroyApplicationContext(appContext);
  1463. !     exit(0);
  1464. !     }
  1465.   }
  1466.   
  1467.   /*ARGSUSED*/
  1468. ***************
  1469. *** 77,82 ****
  1470. --- 95,106 ----
  1471.       int len;
  1472.       Boolean gif;
  1473.   
  1474. +     if (doingQuery) {
  1475. +     /* Don't do anything using popups since we could be in dirsend()
  1476. +        by now. */
  1477. +     XBell(display,0);
  1478. +     return;
  1479. +     }
  1480.       XtSetArg(args[0],XtNstring,&s);
  1481.       XtGetValues(searchText,args,ONE);
  1482.       if (*s == '\0') {
  1483. ***************
  1484. *** 114,119 ****
  1485. --- 138,148 ----
  1486.           return;
  1487.       }
  1488.   #endif /* DONT_CATCH_GIFS */
  1489. +     doingQuery = True;
  1490. +     if (queryButton != NULL)
  1491. +     XtSetSensitive(queryButton,False);
  1492. +     if (abortButton != NULL)
  1493. +     XtSetSensitive(abortButton,True);
  1494.       if (appResources.sortType == GfInvdate)
  1495.       procquery(appResources.archieHost,s,appResources.maxHits,
  1496.             appResources.offset,appResources.searchType,True,0);
  1497. ***************
  1498. *** 120,125 ****
  1499. --- 149,159 ----
  1500.       else
  1501.       procquery(appResources.archieHost,s,appResources.maxHits,
  1502.             appResources.offset,appResources.searchType,False,0);
  1503. +     doingQuery = False;
  1504. +     if (abortButton != NULL)
  1505. +     XtSetSensitive(abortButton,False);
  1506. +     if (queryButton != NULL)
  1507. +     XtSetSensitive(queryButton,True);
  1508.   }
  1509.   
  1510.   /*ARGSUSED*/
  1511. ***************
  1512. *** 141,144 ****
  1513. --- 175,245 ----
  1514.       }
  1515.       ftp(selectedHostEntry->hostname,selectedLocEntry->linkpath,
  1516.       selectedFileEntry->name);
  1517. + }
  1518. + /*ARGSUSED*/
  1519. + static void
  1520. + saveAction(w,event,params,num_params)
  1521. + Widget w;
  1522. + XEvent *event;
  1523. + String *params;
  1524. + Cardinal *num_params;
  1525. + {
  1526. +     static char filename[256];
  1527. +     Arg args[1];
  1528. +     char *s;
  1529. +     FILE *fp;
  1530. +     HostEntry *hostp;
  1531. +     LocEntry *locp;
  1532. +     FileEntry *filep;
  1533. +     if (*num_params == ZERO) {
  1534. +     if ((s=dialog("Filename to save to:",filename)) == NULL || *s == '\0')
  1535. +         return;
  1536. +     strncpy(filename,s,255);
  1537. +     } else if (*num_params == ONE) {
  1538. +     XtSetArg(args[0],XtNstring,&s);
  1539. +     XtGetValues(searchText,args,ONE);
  1540. +      sprintf(filename,*params,s);
  1541. +     } else {
  1542. +     fprintf(stderr,"%s: wrong number of args to \"save-to-file()\"",
  1543. +                                 progname);
  1544. +     return;
  1545. +     }
  1546. +     if ((fp=fopen(filename,"w")) == NULL) {
  1547. +     alert1("Can't open %s for writing",filename);
  1548. +     return;
  1549. +     }
  1550. +     status1("Writing %s...",filename);
  1551. +     if (appResources.saveFormatOneLine) {
  1552. +     for (hostp=db->hostEntries; hostp != NULL; hostp = hostp->next)
  1553. +         for (locp=hostp->locEntries; locp != NULL; locp = locp->next)
  1554. +         for (filep=locp->fileEntries; filep != NULL; filep=filep->next)
  1555. +             fprintf(fp,"%s %10d  %s  %s:%s/%s\n",
  1556. +                 filep->modes,filep->size,filep->date,
  1557. +                 hostp->hostname,locp->linkpath,filep->name);
  1558. +     } else {
  1559. +     for (hostp=db->hostEntries; hostp != NULL; hostp = hostp->next) {
  1560. +         fprintf(fp,"%s\n",hostp->hostname);
  1561. +         for (locp=hostp->locEntries; locp != NULL; locp = locp->next) {
  1562. +         fprintf(fp,"\t%s\n",locp->linkpath);
  1563. +         for (filep=locp->fileEntries; filep != NULL; filep=filep->next)
  1564. +             fprintf(fp,"\t\t%s %10d  %s  %s\n",
  1565. +                 filep->modes,filep->size,filep->date,filep->name);
  1566. +         }
  1567. +     }
  1568. +     }
  1569. +     fclose(fp);
  1570. +     status0("Ready");
  1571. + }
  1572. + /*ARGSUSED*/
  1573. + static void
  1574. + abortAction(w,event,params,num_params)
  1575. + Widget w;
  1576. + XEvent *event;
  1577. + String *params;
  1578. + Cardinal *num_params;
  1579. + {
  1580. +     abortDirsend();
  1581.   }
  1582. *** /tmp/release17219/actions.h    Tue Nov 12 16:53:38 1991
  1583. --- actions.h    Tue Oct 22 08:31:03 1991
  1584. ***************
  1585. *** 1,7 ****
  1586.   /*
  1587.    * actions.h : Definition of the action table so its size is known
  1588.    *
  1589. !  * George Ferguson, ferguson@cs.rochester.edu, 4 Sep 1991.
  1590.    *
  1591.    */
  1592.   
  1593. --- 1,7 ----
  1594.   /*
  1595.    * actions.h : Definition of the action table so its size is known
  1596.    *
  1597. !  * George Ferguson, ferguson@cs.rochester.edu, 20 Oct 1991.
  1598.    *
  1599.    */
  1600.   
  1601. ***************
  1602. *** 8,13 ****
  1603.   #ifndef ACTIONS_H
  1604.   #define ACTIONS_H
  1605.   
  1606. ! extern XtActionsRec actionTable[15];
  1607.   
  1608.   #endif /* ACTIONS_H */
  1609. --- 8,13 ----
  1610.   #ifndef ACTIONS_H
  1611.   #define ACTIONS_H
  1612.   
  1613. ! extern XtActionsRec actionTable[22];
  1614.   
  1615.   #endif /* ACTIONS_H */
  1616. *** /tmp/release17219/appres.h    Tue Nov 12 16:53:44 1991
  1617. --- appres.h    Tue Nov 12 12:47:49 1991
  1618. ***************
  1619. *** 2,8 ****
  1620.    * appres.h : External defs for files needing the application
  1621.    *    resources.
  1622.    *
  1623. !  * George Ferguson, ferguson@cs.rochester.edu, 12 Sep 1991.
  1624.    *
  1625.    */
  1626.   
  1627. --- 2,8 ----
  1628.    * appres.h : External defs for files needing the application
  1629.    *    resources.
  1630.    *
  1631. !  * George Ferguson, ferguson@cs.rochester.edu, 12 Nov 1991.
  1632.    *
  1633.    */
  1634.   
  1635. ***************
  1636. *** 13,18 ****
  1637. --- 13,19 ----
  1638.   
  1639.   typedef struct {
  1640.       String    widgets;
  1641. +     String    menus;
  1642.       SearchType    searchType;
  1643.       SortType    sortType;
  1644.       String    archieHost;
  1645. ***************
  1646. *** 25,30 ****
  1647. --- 26,33 ----
  1648.       String    ftpType;
  1649.       int        debugLevel;
  1650.       String    settingsWidgets;
  1651. +     Boolean    saveFormatOneLine;
  1652. +     Boolean    expert;
  1653.   } AppResources;
  1654.   
  1655.   extern AppResources appResources;
  1656. *** /tmp/release17219/aquery.c    Tue Nov 12 16:53:48 1991
  1657. --- aquery.c    Sat Nov  2 16:48:27 1991
  1658. ***************
  1659. *** 11,23 ****
  1660.    * and new sorting code by George Ferguson (ferguson@cs.rochester.edu) 
  1661.    * and Brendan Kehoe (brendan@cs.widener.edu).
  1662.    *
  1663. !  * v1.1.1 - bcn  08/20/91 - make it do it properly (new invdatecmplink)
  1664. !  * v1.1.1 - bpk 08/20/91 - made sorting go inverted as we purport it does
  1665.    */
  1666.   #include <copyright.h>
  1667.   
  1668.   #include <stdio.h>
  1669. ! #include <strings.h>            /* for char *index() */
  1670.   
  1671.   #include <pfs.h>
  1672.   #include <perrno.h>
  1673. --- 11,29 ----
  1674.    * and new sorting code by George Ferguson (ferguson@cs.rochester.edu) 
  1675.    * and Brendan Kehoe (brendan@cs.widener.edu).
  1676.    *
  1677. !  * v1.2.0 - 09/17/91 (bpk) - added BULL & USG stuff, thanks to Jim Sillas
  1678. !  * v1.1.3 - 08/30/91 (bpk) - cast index()
  1679. !  * v1.1.2 - 08/20/91 (bcn) - make it do it properly (new invdatecmplink)
  1680. !  * v1.1.1 - 08/20/91 (bpk) - made sorting go inverted as we purport it does
  1681.    */
  1682.   #include <copyright.h>
  1683.   
  1684.   #include <stdio.h>
  1685. ! #if defined(USG) || defined(UTS) || defined(_AIX)
  1686. ! # include <string.h>            /* for char *index() */
  1687. ! #else
  1688. ! # include <strings.h>            /* for char *index() */
  1689. ! #endif
  1690.   
  1691.   #include <pfs.h>
  1692.   #include <perrno.h>
  1693. ***************
  1694. *** 26,31 ****
  1695. --- 32,40 ----
  1696.   
  1697.   static void translateArchieResponse();
  1698.   
  1699. + extern int pwarn;
  1700. + extern char p_warn_string[];
  1701.   /*
  1702.    * archie_query : Sends a request to _host_, telling it to search for
  1703.    *                _string_ using _query_type_ as the search method.
  1704. ***************
  1705. *** 83,89 ****
  1706.           max_hits,offset,query_type,string);
  1707.   
  1708.       /* Initialize Prospero structures */
  1709. !     perrno = 0; *p_err_string = '\0';
  1710.       vdir_init(dir);
  1711.       
  1712.       /* Retrieve the list of matches, return error if there was one */
  1713. --- 92,99 ----
  1714.           max_hits,offset,query_type,string);
  1715.   
  1716.       /* Initialize Prospero structures */
  1717. !     perrno = PSUCCESS; *p_err_string = '\0';
  1718. !     pwarn = PNOWARN; *p_warn_string = '\0';
  1719.       vdir_init(dir);
  1720.       
  1721.       /* Retrieve the list of matches, return error if there was one */
  1722. ***************
  1723. *** 181,187 ****
  1724.           if (strncmp(l->filename,"ARCHIE/HOST",11) == 0) {
  1725.           l->type = stcopyr("EXTERNAL(AFTP,DIRECTORY)",l->type);
  1726.           l->host = stcopyr(l->filename+12,l->host);
  1727. !         slash = index(l->host,'/');
  1728.           if (slash) {
  1729.               l->filename = stcopyr(slash,l->filename);
  1730.               *slash++ = '\0';
  1731. --- 191,197 ----
  1732.           if (strncmp(l->filename,"ARCHIE/HOST",11) == 0) {
  1733.           l->type = stcopyr("EXTERNAL(AFTP,DIRECTORY)",l->type);
  1734.           l->host = stcopyr(l->filename+12,l->host);
  1735. !         slash = (char *)index(l->host,'/');
  1736.           if (slash) {
  1737.               l->filename = stcopyr(slash,l->filename);
  1738.               *slash++ = '\0';
  1739. ***************
  1740. *** 197,202 ****
  1741. --- 207,213 ----
  1742.    *             belongs before q, > 0 if p belongs after q, and == 0 if their
  1743.    *             host and filename fields are identical.
  1744.    */
  1745. + int
  1746.   defcmplink(p,q)
  1747.       VLINK p,q;
  1748.       {
  1749. ***************
  1750. *** 216,221 ****
  1751. --- 227,233 ----
  1752.    *                 same, it then calls defcmplink() and returns its 
  1753.    *           value.
  1754.    */
  1755. + int
  1756.   invdatecmplink(p,q)
  1757.       VLINK p,q;
  1758.       {
  1759. *** /tmp/release17219/archie.h    Tue Nov 12 16:53:51 1991
  1760. --- archie.h    Mon Oct 21 12:38:21 1991
  1761. ***************
  1762. *** 4,18 ****
  1763.    *     Written by Brendan Kehoe (brendan@cs.widener.edu), 
  1764.    *                George Ferguson (ferguson@cs.rochester.edu), and
  1765.    *                Clifford Neuman (bcn@isi.edu).
  1766. -  *
  1767.    */
  1768.   
  1769.   /*
  1770. !  * Archie server (one of):   archie.mcgill.ca
  1771.    *                           archie.funet.fi
  1772.    *                           archie.au
  1773.    */
  1774. ! #define ARCHIE_HOST "ARCHIE.MCGILL.CA"
  1775.   
  1776.   /*
  1777.    * Default value for max hits.  Note that this is normally different
  1778. --- 4,18 ----
  1779.    *     Written by Brendan Kehoe (brendan@cs.widener.edu), 
  1780.    *                George Ferguson (ferguson@cs.rochester.edu), and
  1781.    *                Clifford Neuman (bcn@isi.edu).
  1782.    */
  1783.   
  1784.   /*
  1785. !  * Archie server (one of):   archie.sura.net
  1786. !  *                 archie.mcgill.ca
  1787.    *                           archie.funet.fi
  1788.    *                           archie.au
  1789.    */
  1790. ! #define ARCHIE_HOST "ARCHIE.SURA.NET"
  1791.   
  1792.   /*
  1793.    * Default value for max hits.  Note that this is normally different
  1794. ***************
  1795. *** 19,25 ****
  1796.    * for different client implementations.  Doing so makes it easier to
  1797.    * collect statistics on the use of the various clients.
  1798.    */
  1799. ! #define    MAX_HITS    99
  1800.   
  1801.   /*
  1802.    * CLIENT_VERSION may be used to identify the version of the client if 
  1803. --- 19,33 ----
  1804.    * for different client implementations.  Doing so makes it easier to
  1805.    * collect statistics on the use of the various clients.
  1806.    */
  1807. ! #ifdef VMS
  1808. ! # define    MAX_HITS    98    /* VMS Client */
  1809. ! #else
  1810. ! # ifdef XARCHIE
  1811. ! #  define    MAX_HITS    99    /* X Client */
  1812. ! # else
  1813. ! #  define    MAX_HITS    95    /* Normal client */
  1814. ! # endif
  1815. ! #endif
  1816.   
  1817.   /*
  1818.    * CLIENT_VERSION may be used to identify the version of the client if 
  1819. ***************
  1820. *** 26,35 ****
  1821.    * distributed separately from the Prospero distribution.  The version
  1822.    * command should then identify both the client version and the Prospero
  1823.    * version identifiers.   
  1824. -  *
  1825. -  * #define CLIENT_VERSION    "xyz"
  1826.    */
  1827. ! #define CLIENT_VERSION        "xarchie"
  1828.   
  1829.   /* Procedures from user/aquery.c */
  1830.   
  1831. --- 34,45 ----
  1832.    * distributed separately from the Prospero distribution.  The version
  1833.    * command should then identify both the client version and the Prospero
  1834.    * version identifiers.   
  1835.    */
  1836. ! #ifdef XARCHIE
  1837. ! # define CLIENT_VERSION    "1.3-X"
  1838. ! #else
  1839. ! # define CLIENT_VERSION "1.2"
  1840. ! #endif
  1841.   
  1842.   /* Procedures from user/aquery.c */
  1843.   
  1844. ***************
  1845. *** 47,50 ****
  1846.   /* Flags                                                               */
  1847.   #define AQ_NOSORT    0x01    /* Don't sort                          */
  1848.   #define AQ_NOTRANS    0x02    /* Don't translate Archie responses    */
  1849. --- 57,59 ----
  1850. *** /tmp/release17219/atalloc.c    Tue Nov 12 16:53:55 1991
  1851. --- atalloc.c    Mon Oct 21 12:39:23 1991
  1852. ***************
  1853. *** 52,57 ****
  1854. --- 52,58 ----
  1855.    *    ATFREE takes a pointer to a PATTRRIB structure and adds it to
  1856.    *    the free list for later reuse.
  1857.    */
  1858. + void
  1859.   atfree(at)
  1860.       PATTRIB    at;
  1861.       {
  1862. ***************
  1863. *** 77,82 ****
  1864. --- 78,84 ----
  1865.    *    PATTRIB structures.  It is used to free an entrie list of PATTRIB
  1866.    *    structures.
  1867.    */
  1868. + void
  1869.   atlfree(at)
  1870.       PATTRIB    at;
  1871.       {
  1872. *** /dev/null    Tue Nov 12 16:30:11 1991
  1873. --- dialog.c    Sun Oct 20 15:58:33 1991
  1874. ***************
  1875. *** 0 ****
  1876. --- 1,110 ----
  1877. + /*
  1878. +  * dialog.c : A popup string entry box
  1879. +  *
  1880. +  * George Ferguson, ferguson@cs.rochester.edu, 20 Oct 1991.
  1881. +  *
  1882. +  */
  1883. + #include <X11/Intrinsic.h>
  1884. + #include <X11/StringDefs.h>
  1885. + #include <X11/Shell.h>
  1886. + #include <X11/Xaw/Dialog.h>
  1887. + #include <X11/Xaw/Cardinals.h>
  1888. + #include <stdio.h>
  1889. + extern Widget toplevel;            /* this is the only external */
  1890. + /*
  1891. +  * Functions defined here
  1892. +  */
  1893. + char *dialog0();            /* main public routine */
  1894. + void dialogOk(), dialogCancel();    /* public action procedures */
  1895. + static Widget dialogShell,dialogDialog;
  1896. + static Boolean dialogDone;
  1897. + static char *dialogResult;
  1898. + char *
  1899. + dialog(str,value)
  1900. + char *str,*value;
  1901. + {
  1902. +     Arg args[2];
  1903. +     XEvent event;
  1904. +     Window rwin,child;
  1905. +     int rx,ry,cx,cy,x,y;
  1906. +     unsigned int but;
  1907. +     Dimension w,h;
  1908. +     /* Go synchronous or the widgets don't resize properly */
  1909. +     XSynchronize(XtDisplay(toplevel),True);
  1910. +     if (dialogShell == NULL) {
  1911. +     dialogShell = XtCreatePopupShell("dialogShell",
  1912. +                      transientShellWidgetClass,
  1913. +                      toplevel,NULL,ZERO);
  1914. +     dialogDialog = XtCreateManagedWidget("dialogDialog",
  1915. +                          dialogWidgetClass,
  1916. +                          dialogShell,NULL,ZERO);
  1917. +     XawDialogAddButton(dialogDialog,"okButton",dialogOk,NULL);
  1918. +     XawDialogAddButton(dialogDialog,"cancelButton",dialogCancel,NULL);
  1919. +     XtRealizeWidget(dialogShell);
  1920. +     }
  1921. +     /* Set the label and initial value */
  1922. +     XtSetArg(args[0],XtNlabel,str);
  1923. +     XtSetArg(args[1],XtNvalue,(value ? value : ""));
  1924. +     XtSetValues(dialogDialog,args,TWO);
  1925. +     /* Center the popup over the mouse */
  1926. +     XtSetArg(args[0],XtNwidth,&w);
  1927. +     XtSetArg(args[1],XtNheight,&h);
  1928. +     XtGetValues(dialogShell,args,TWO);
  1929. +     XQueryPointer(XtDisplay(toplevel),XtWindow(toplevel),
  1930. +                     &rwin,&child,&rx,&ry,&cx,&cy,&but);
  1931. +     x = rx-w/2;
  1932. +     if (x < 0)
  1933. +     x = 0;
  1934. +     else if (x > WidthOfScreen(XtScreen(toplevel))-w)
  1935. +     x = WidthOfScreen(XtScreen(toplevel))-w;
  1936. +     y = ry-h/2;
  1937. +     if (y < 0)
  1938. +     y = 0;
  1939. +     else if (y > HeightOfScreen(XtScreen(toplevel))-h)
  1940. +     y = WidthOfScreen(XtScreen(toplevel))-h;
  1941. +     XtSetArg(args[0],XtNx,x);
  1942. +     XtSetArg(args[1],XtNy,y);
  1943. +     XtSetValues(dialogShell,args,TWO);
  1944. +     /* Pop it up and block until one of the buttons is clicked */
  1945. +     dialogDone = False;
  1946. +     XtPopup(dialogShell,XtGrabExclusive);
  1947. +     while (!dialogDone) {
  1948. +     XtAppNextEvent(XtWidgetToApplicationContext(toplevel),&event);
  1949. +     XtDispatchEvent(&event);
  1950. +     }
  1951. +     /* Okay, pop it down */
  1952. +     XtPopdown(dialogShell);
  1953. +     /* Back to normal */
  1954. +     XSynchronize(XtDisplay(toplevel),False);
  1955. +     /* And here's the entered value */
  1956. +     return(dialogResult);
  1957. + }
  1958. + /*ARGSUSED*/
  1959. + void
  1960. + dialogOk(w,event,params,num_params)
  1961. + Widget w;
  1962. + XEvent *event;
  1963. + String *params;
  1964. + Cardinal *num_params;
  1965. + {
  1966. +     dialogResult = XawDialogGetValueString(dialogDialog);
  1967. +     dialogDone = True;
  1968. + }
  1969. + /*ARGSUSED*/
  1970. + void
  1971. + dialogCancel(w,event,params,num_params)
  1972. + Widget w;
  1973. + XEvent *event;
  1974. + String *params;
  1975. + Cardinal *num_params;
  1976. + {
  1977. +     dialogResult = NULL;
  1978. +     dialogDone = True;
  1979. + }
  1980. *** /dev/null    Tue Nov 12 16:30:11 1991
  1981. --- dialog.h    Sun Oct 20 15:54:11 1991
  1982. ***************
  1983. *** 0 ****
  1984. --- 1,10 ----
  1985. + /*
  1986. +  * dialog.h : A popup string entry box.
  1987. +  *
  1988. +  * George Ferguson, ferguson@cs.rochester.edu, 20 Oct 1991.
  1989. +  *
  1990. +  */
  1991. + extern char *dialog(/* str,value */);
  1992. + extern void dialogOk(/* w,event,params,numparams */);
  1993. + extern void dialogCancel(/* w,event,params,numparams */);
  1994. *** /tmp/release17219/dirsend.c    Tue Nov 12 16:54:39 1991
  1995. --- dirsend.c    Thu Nov  7 10:05:57 1991
  1996. ***************
  1997. *** 4,44 ****
  1998.    * For copying and distribution information, please see the file
  1999.    * <copyright.h>.
  2000.    *
  2001. !  * Modified for xarchie by George Ferguson, ferguson@cs.rochester.edu,
  2002. !  * 4 Sep 1991.
  2003.    */
  2004.   
  2005.   #include <copyright.h>
  2006.   #include <stdio.h>
  2007.   #include <errno.h>
  2008. - #include <sys/time.h>
  2009. - #include <netdb.h>
  2010. - #include <strings.h>
  2011.   
  2012. ! #include <sys/types.h>
  2013. ! #include <sys/socket.h>
  2014. ! #ifdef AIX
  2015. ! #include <sys/select.h>
  2016. ! #endif
  2017.   
  2018.   #include <pfs.h>
  2019.   #include <pprot.h>
  2020.   #include <pcompat.h>
  2021.   #include <perrno.h>
  2022. - #include <pmachine.h>
  2023.   
  2024.   
  2025.   static int notprived = 0;
  2026.   extern int errno;
  2027.   extern int perrno;
  2028.   #ifdef DEBUG
  2029.   extern int pfs_debug;
  2030.   #endif
  2031.   extern int pfs_disable_flag;
  2032.   
  2033. - int    rdgram_priority = 0;
  2034.   char    *nlsindex();
  2035.   
  2036.   #define max(X, Y)  ((X) > (Y) ? (X) : (Y))
  2037. --- 4,88 ----
  2038.    * For copying and distribution information, please see the file
  2039.    * <copyright.h>.
  2040.    *
  2041. !  * v1.2.3 - 11/04/91 (bcn) - removed host comparison and replaced with check
  2042. !                   for connection id (undoes effect of v1.2.2.).
  2043. !  * v1.2.2 - 11/02/91 (gf)  - removed extra inet_ntoa() calls and stuff for
  2044. !                  multi-interface nets (lmjm@doc.imperial.ac.uk)
  2045. !  * v1.2.1 - 10/20/91 (gf)  - asynch implementation
  2046. !  * v1.2.0 - 09/17/91 (bpk) - added BULL & USG stuff, thanks to Jim Sillas
  2047. !  * v1.1.2 - 08/30/91 (bpk) - added VMS support
  2048. !  * v1.1.1 - 08/29/91 (bcn) - changed backoff handling
  2049. !  * v1.1.0 - 08/13/91 (gf)  - added XArchie status calls
  2050. !  *
  2051. !  * gf: 20 Oct 1991:
  2052. !  *  Broken into pieces so that under X dirsend() doesn't block in select()
  2053. !  *  but rather uses Xt calls to allow continued event processing. If
  2054. !  *  XARCHIE is not defined, can still be used since processEvent() will
  2055. !  *  use select() in this case.
  2056. !  *
  2057. !  * lmjm: 2 Nov 1991:
  2058. !  *  I've found that dirsend.c checks to see if the ip address of the response
  2059. !  *  is the same as the ip address that it sent to.  With multiple interfaces
  2060. !  *  this is not always true and a valid response is rejected.
  2061.    */
  2062.   
  2063.   #include <copyright.h>
  2064.   #include <stdio.h>
  2065.   #include <errno.h>
  2066.   
  2067. ! #ifdef VMS
  2068. ! # ifdef WALLONGONG
  2069. ! #  include "twg$tcp:[netdist.include]netdb.h"
  2070. ! # else /* Multinet */
  2071. ! #  include "multinet_root:[multinet.include]netdb.h"
  2072. ! # endif
  2073. ! # include <vms.h>
  2074. ! #else /* not VMS */
  2075. ! # ifdef NEED_TIME_H
  2076. ! #  include <time.h>
  2077. ! # else
  2078. ! #  include <sys/time.h>
  2079. ! # endif
  2080. ! # if defined(USG) || defined(UTS) || defined(_AIX)
  2081. ! #  include <string.h>
  2082. ! # else
  2083. ! #  include <strings.h>
  2084. ! # endif
  2085. ! # include <netdb.h>
  2086. ! # include <sys/types.h>
  2087. ! # include <pmachine.h>
  2088. ! # include <sys/socket.h>
  2089. ! # ifdef NEED_SELECT_H
  2090. ! #  include <sys/select.h>
  2091. ! # endif /* NEED_SELECT_H */
  2092. ! #endif /* !VMS */
  2093. ! #include <netinet/in.h>
  2094. ! #include <arpa/inet.h>
  2095.   
  2096.   #include <pfs.h>
  2097.   #include <pprot.h>
  2098.   #include <pcompat.h>
  2099.   #include <perrno.h>
  2100.   
  2101. + /* Gnu C currently fails to pass structures on Sparcs properly.  This directly
  2102. +    effects the calling of inet_ntoa().  To get around it, we use this hack;
  2103. +    take the address of what's being called to inet_ntoa, so it gets it
  2104. +    properly.  This won't be necessary with gcc 2.0.  */
  2105. + #if defined(sun) && defined(__GNUC__)
  2106. + # define SUN_GNU_FIX &
  2107. + #else
  2108. + # define SUN_GNU_FIX
  2109. + #endif
  2110.   
  2111.   static int notprived = 0;
  2112.   extern int errno;
  2113.   extern int perrno;
  2114. + extern int rdgram_priority;
  2115.   #ifdef DEBUG
  2116.   extern int pfs_debug;
  2117.   #endif
  2118.   extern int pfs_disable_flag;
  2119.   
  2120.   char    *nlsindex();
  2121.   
  2122.   #define max(X, Y)  ((X) > (Y) ? (X) : (Y))
  2123. ***************
  2124. *** 55,60 ****
  2125. --- 99,191 ----
  2126.   static int client_dirsrv_retry = CLIENT_DIRSRV_RETRY; 
  2127.   #endif /* XARCHIE */
  2128.   
  2129. + /* These were parameters to dirsend() */
  2130. + static PTEXT pkt;
  2131. + static char *hostname;
  2132. + static struct sockaddr_in *hostaddr;
  2133. + /* These were locals in dirsend(). Note that the initializations here
  2134. +  * are really meaningless since we have to redo them for each call to
  2135. +  * dirsend() since they were formerly automatically initialized.
  2136. +  */
  2137. + static PTEXT        first = NULL;    /* First returned packet     */
  2138. + static PTEXT        next;        /* The one we are waiting for      */
  2139. + static PTEXT        vtmp;           /* For reorganizing linked list  */
  2140. + static PTEXT        comp_thru;    /* We have all packets though    */
  2141. + static int        lp = -1;    /* Opened UDP port             */
  2142. + static int        hdr_len;    /* Header Length                 */
  2143. + static int        nd_pkts;    /* Number of packets we want     */
  2144. + static int        no_pkts;    /* Number of packets we have     */
  2145. + static int        pkt_cid;        /* Packet connection identifier  */
  2146. + static unsigned short    this_conn_id;    /* Connection ID we are using    */
  2147. + static unsigned short    recvd_thru;    /* Received through              */
  2148. + static short        priority;    /* Priority for request          */
  2149. + static short        one = 0;    /* Pointer to value 1            */
  2150. + static short        zero = 0;    /* Pointer to value 0         */
  2151. + static char        *seqtxt;    /* Pointer to text w/ sequence # */
  2152. + static struct sockaddr_in  us;        /* Our address                   */
  2153. + static struct sockaddr_in  to;        /* Address to send query     */
  2154. + static struct sockaddr_in  from;    /* Reply received from         */
  2155. + static int        from_sz;    /* Size of from structure     */
  2156. + static struct hostent    *host;        /* Host info from gethostbyname  */
  2157. + static long        newhostaddr;    /* New host address from *host   */
  2158. + static int        req_udp_port=0; /* Requested port (optional)     */
  2159. + static char        *openparen;    /* Delimits port in name         */
  2160. + static char        hostnoport[500];/* Host name without port        */
  2161. + static int        ns;        /* Number of bytes actually sent */
  2162. + static int        nr;        /* Number of bytes received      */
  2163. + static fd_set        readfds;    /* Used for select         */
  2164. + static int        tmp;
  2165. + static char        *ctlptr;    /* Pointer to control field      */
  2166. + static short        stmp;        /* Temp short for conversions    */
  2167. + static int        backoff;    /* Server requested backoff      */
  2168. + static unsigned char    rdflag11;    /* First byte of flags (bit vect)*/
  2169. + static unsigned char    rdflag12;    /* Second byte of flags (int)    */
  2170. + static int        scpflag = 0;    /* Set if any sequencd cont pkts */
  2171. + static int        ackpend = 0;    /* Acknowledgement pending      */
  2172. + static int        gaps = 0;    /* Gaps present in recvd pkts   */
  2173. + static struct timeval    timeout;    /* Time to wait for response    */
  2174. + static struct timeval    ackwait;    /* Time to wait before acking   */
  2175. + static struct timeval    gapwait;    /* Time to wait b4 filling gaps */
  2176. + static struct timeval    *selwait;    /* Time to wait for select      */
  2177. + static int        retries;    /* was = client_dirsrv_retry    */
  2178. + char   to_hostname[512];        /* lmjm: saves inet_ntoa() str  */
  2179. + /* These are added so dirsend() "blocks" properly */
  2180. + static PTEXT dirsendReturn;
  2181. + static int dirsendDone;
  2182. + /* And here are the values for dirsendDone */
  2183. + #define DSRET_DONE        1
  2184. + #define DSRET_SEND_ERROR    -1
  2185. + #define DSRET_RECV_ERROR    -2
  2186. + #define DSRET_SELECT_ERROR    -3
  2187. + #define DSRET_TIMEOUT        -4
  2188. + #define DSRET_ABORTED        -5
  2189. + /* New procedures to break up dirsend() */
  2190. + static int initDirsend();
  2191. + static void retryDirsend(), keepWaitingDirsend();
  2192. + static void timeoutProc();
  2193. + static void readProc();
  2194. + /* Wrappers around X calls to allow non-X usage */
  2195. + static void addInputSource(), removeInputSource();
  2196. + static void addTimeOut(), removeTimeOut();
  2197. + static void processEvent();
  2198. + /* Extra stuff for the asynchronous X version of dirsend() */
  2199. + #ifdef XARCHIE
  2200. + #include <X11/Intrinsic.h>
  2201. + extern XtAppContext appContext;
  2202. + #else
  2203. + typedef char *XtPointer;
  2204. + typedef char *XtInputId;
  2205. + typedef char *XtIntervalId;
  2206. + #endif
  2207. + static XtInputId inputId;
  2208. + static XtIntervalId timerId = (XtIntervalId)0;
  2209.   /*
  2210.    * dirsend - send packet and receive response
  2211.    *
  2212. ***************
  2213. *** 75,129 ****
  2214.    *   The packet is freed even if dirsend fails.
  2215.    */
  2216.   PTEXT
  2217. ! dirsend(pkt,hostname,hostaddr)
  2218. !     PTEXT pkt;
  2219. !     char *hostname;
  2220. !     struct sockaddr_in    *hostaddr;
  2221.   {
  2222. !     PTEXT        first = NULL;    /* First returned packet     */
  2223. !     PTEXT        next;        /* The one we are waiting for      */
  2224. !     PTEXT        vtmp;           /* For reorganizing linked list  */
  2225. !     PTEXT        comp_thru;    /* We have all packets though    */
  2226. !     int            lp = -1;    /* Opened UDP port             */
  2227. !     int            hdr_len;    /* Header Length                 */
  2228. !     int            nd_pkts;    /* Number of packets we want     */
  2229. !     int            no_pkts;    /* Number of packets we have     */
  2230. !     int            pkt_cid;        /* Packet connection identifier  */
  2231. !     unsigned short    this_conn_id;    /* Connection ID we are using    */
  2232. !     unsigned short    recvd_thru;    /* Received through              */
  2233. !     short        priority;    /* Priority for request          */
  2234. !     static short    one = 0;    /* Pointer to value 1            */
  2235. !     static short    zero = 0;    /* Pointer to value 0         */
  2236. !     char        *seqtxt;    /* Pointer to text w/ sequence # */
  2237. !     struct sockaddr_in  us;        /* Our address                   */
  2238. !     struct sockaddr_in    to;        /* Address to send query     */
  2239. !     struct sockaddr_in    from;        /* Reply received from         */
  2240. !     int            from_sz;    /* Size of from structure     */
  2241. !     struct hostent    *host;        /* Host info from gethostbyname  */
  2242. !     long        newhostaddr;    /* New host address from *host   */
  2243. !     int            req_udp_port=0; /* Requested port (optional)     */
  2244. !     char        *openparen;    /* Delimits port in name         */
  2245. !     char        hostnoport[500];/* Host name without port        */
  2246. !     int            ns;        /* Number of bytes actually sent */
  2247. !     int            nr;        /* Number of bytes received      */
  2248. !     fd_set        readfds;    /* Used for select         */
  2249. !     int            tmp;
  2250. !     char        *ctlptr;    /* Pointer to control field      */
  2251. !     short        stmp;        /* Temp short for conversions    */
  2252. !     int            backoff;    /* Server requested backoff      */
  2253. !     unsigned char    rdflag11;    /* First byte of flags (bit vect)*/
  2254. !     unsigned char    rdflag12;    /* Second byte of flags (int)    */
  2255. !     int            scpflag = 0;    /* Set if any sequencd cont pkts */
  2256.   
  2257. !     int            ackpend = 0;    /* Acknowledgement pending      */
  2258. !     int            gaps = 0;    /* Gaps present in recvd pkts   */
  2259. !     struct timeval    timeout;    /* Time to wait for response    */
  2260. !     struct timeval    ackwait;    /* Time to wait before acking   */
  2261. !     struct timeval    gapwait;    /* Time to wait b4 filling gaps */
  2262. !     struct timeval    *selwait;    /* Time to wait for select      */
  2263. !     int            retries = client_dirsrv_retry;
  2264.   
  2265.   #ifdef XARCHIE
  2266.       status0("Initializing");
  2267.   #endif
  2268.   
  2269. --- 206,271 ----
  2270.    *   The packet is freed even if dirsend fails.
  2271.    */
  2272.   PTEXT
  2273. ! dirsend(pkt_p,hostname_p,hostaddr_p)
  2274. !     PTEXT pkt_p;
  2275. !     char *hostname_p;
  2276. !     struct sockaddr_in    *hostaddr_p;
  2277.   {
  2278. !     /* copy parameters to globals since other routines use them */
  2279. !     pkt = pkt_p;
  2280. !     hostname = hostname_p;
  2281. !     hostaddr = hostaddr_p;
  2282. !     /* Do the initializations of formerly auto variables */
  2283. !     first = NULL;
  2284. !     lp = -1;
  2285. !     one = 0;
  2286. !     zero = 0;
  2287. !     req_udp_port=0;
  2288. !     scpflag = 0;
  2289. !     ackpend = 0;
  2290. !     gaps = 0;
  2291. !     retries = client_dirsrv_retry;
  2292.   
  2293. !     if (initDirsend() < 0)
  2294. !     return(NULL);
  2295. !     addInputSource();
  2296. !     /* set the first timeout */
  2297. !     retryDirsend();
  2298.   
  2299. +     dirsendReturn = NULL;
  2300. +     dirsendDone = 0;
  2301. +     /* Until one of the callbacks says to return, keep processing events */
  2302. +     while (!dirsendDone)
  2303. +     processEvent();
  2304. +     /* Clean up event generators */
  2305. +     removeTimeOut();
  2306. +     removeInputSource();
  2307.   #ifdef XARCHIE
  2308. +     /* Set status if needed (has to be outside of loop or X will crash) */
  2309. +     switch (dirsendDone) {
  2310. +     case DSRET_SEND_ERROR: status0("Send error"); break;
  2311. +     case DSRET_RECV_ERROR: status0("Recv error"); break;
  2312. +         case DSRET_TIMEOUT:
  2313. +         status1("Connection to %s timed out",to_hostname);
  2314. +         break;
  2315. +         case DSRET_ABORTED: status0("Aborted"); break;
  2316. +     }
  2317. + #endif
  2318. +     /* Return whatever we're supposed to */
  2319. +     return(dirsendReturn);
  2320. + }
  2321. + /*    -    -    -    -    -    -    -    -    */
  2322. + /* This function does all the initialization that used to be done at the
  2323. +  * start of dirsend(), including opening the socket descriptor "lp". It
  2324. +  * returns the descriptor if successful, otherwise -1 to indicate that
  2325. +  * dirsend() should return NULL immediately.
  2326. +  */
  2327. + static int
  2328. + initDirsend()
  2329. + {
  2330. + #ifdef XARCHIE
  2331.       status0("Initializing");
  2332.   #endif
  2333.   
  2334. ***************
  2335. *** 196,202 ****
  2336.   #endif
  2337.           perrno = DIRSEND_BAD_HOSTNAME;
  2338.           ptlfree(pkt);
  2339. !             return(NULL);
  2340.       }
  2341.       /* If a port is included, save it away */
  2342.       if(openparen = index(hostname,'(')) {
  2343. --- 338,345 ----
  2344.   #endif
  2345.           perrno = DIRSEND_BAD_HOSTNAME;
  2346.           ptlfree(pkt);
  2347. !             /* return(NULL); */
  2348. !         return(-1);
  2349.       }
  2350.       /* If a port is included, save it away */
  2351.       if(openparen = index(hostname,'(')) {
  2352. ***************
  2353. *** 219,225 ****
  2354.   #endif
  2355.           perrno = DIRSEND_BAD_HOSTNAME;
  2356.           ptlfree(pkt);
  2357. !         return(NULL);
  2358.           }
  2359.           bzero((char *)&to, S_AD_SZ);
  2360.           to.sin_family = AF_INET;
  2361. --- 362,369 ----
  2362.   #endif
  2363.           perrno = DIRSEND_BAD_HOSTNAME;
  2364.           ptlfree(pkt);
  2365. !         /* return(NULL); */
  2366. !         return(-1);
  2367.           }
  2368.           bzero((char *)&to, S_AD_SZ);
  2369.           to.sin_family = AF_INET;
  2370. ***************
  2371. *** 235,240 ****
  2372. --- 379,388 ----
  2373.       }
  2374.       }
  2375.       else bcopy(hostaddr,&to, S_AD_SZ);
  2376. +     /* lmjm: Save away the hostname */
  2377. +     strncpy(to_hostname,
  2378. +         inet_ntoa(SUN_GNU_FIX *(struct in_addr *)&to.sin_addr),
  2379. +         sizeof(to_hostname)-1);
  2380.   
  2381.       if(req_udp_port) to.sin_port = htons(req_udp_port);
  2382.       else to.sin_port = dir_udp_port;
  2383. ***************
  2384. *** 254,260 ****
  2385.   #endif
  2386.       perrno = DIRSEND_UDP_CANT;
  2387.       ptlfree(pkt);
  2388. !         return(NULL);
  2389.       }
  2390.   
  2391.       /* Try to bind it to a privileged port - loop through candidate */
  2392. --- 402,409 ----
  2393.   #endif
  2394.       perrno = DIRSEND_UDP_CANT;
  2395.       ptlfree(pkt);
  2396. !         /* return(NULL); */
  2397. !     return(-1);
  2398.       }
  2399.   
  2400.       /* Try to bind it to a privileged port - loop through candidate */
  2401. ***************
  2402. *** 305,317 ****
  2403.           if (to.sin_family == AF_INET) {
  2404.           if(req_udp_port) 
  2405.           fprintf(stderr,"Sending message to %s+%d(%d)...",
  2406. !             inet_ntoa(*(struct in_addr *)&to.sin_addr), req_udp_port, ntohs(this_conn_id));
  2407.           else fprintf(stderr,"Sending message to %s(%d)...",
  2408. !              inet_ntoa(*(struct in_addr *)&to.sin_addr), ntohs(this_conn_id));
  2409.       }
  2410.   #else
  2411.           if (to.sin_family == AF_INET) 
  2412. !         fprintf(stderr,"Sending message to %s...", inet_ntoa(*(struct in_addr *)&to.sin_addr));
  2413.   #endif
  2414.           else
  2415.               fprintf(stderr,"Sending message...");
  2416. --- 454,466 ----
  2417.           if (to.sin_family == AF_INET) {
  2418.           if(req_udp_port) 
  2419.           fprintf(stderr,"Sending message to %s+%d(%d)...",
  2420. !             to_hostname, req_udp_port, ntohs(this_conn_id));
  2421.           else fprintf(stderr,"Sending message to %s(%d)...",
  2422. !              to_hostname, ntohs(this_conn_id));
  2423.       }
  2424.   #else
  2425.           if (to.sin_family == AF_INET) 
  2426. !         fprintf(stderr,"Sending message to %s...", to_hostname);
  2427.   #endif
  2428.           else
  2429.               fprintf(stderr,"Sending message...");
  2430. ***************
  2431. *** 323,333 ****
  2432.       next = first;
  2433.   
  2434.   #ifdef XARCHIE
  2435. !     status1("Connecting to %s",inet_ntoa(*(struct in_addr *)&to.sin_addr));
  2436.   #endif
  2437.   
  2438. !  retry:
  2439.       gaps = ackpend = 0;
  2440.   
  2441.       ns = sendto(lp,(char *)(pkt->start), pkt->length, 0, (struct sockaddr *)&to, S_AD_SZ);
  2442. --- 472,492 ----
  2443.       next = first;
  2444.   
  2445.   #ifdef XARCHIE
  2446. !     status1("Connecting to %s",to_hostname);
  2447.   #endif
  2448. +     return(lp);
  2449. + }
  2450.   
  2451. ! /*    -    -    -    -    -    -    -    -    */
  2452. ! /*
  2453. !  * This used to be a label to goto to retry the last packet. Now we resend
  2454. !  * the packet and call keepWaitingDirsend() to wait for a reply. (We
  2455. !  * call keepWaitingDirsend() because formerly the code dropped through
  2456. !  * the keep_waiting label.)
  2457. !  */
  2458. ! static void
  2459. ! retryDirsend()
  2460. ! {
  2461.       gaps = ackpend = 0;
  2462.   
  2463.       ns = sendto(lp,(char *)(pkt->start), pkt->length, 0, (struct sockaddr *)&to, S_AD_SZ);
  2464. ***************
  2465. *** 334,340 ****
  2466.       if(ns != pkt->length) {
  2467.   #ifdef DEBUG
  2468.       if (pfs_debug) {
  2469. !         fprintf(stderr,"\nsent only %d/%d: ",ns, pkt->length);
  2470.           perror("");
  2471.       }
  2472.   #endif
  2473. --- 493,499 ----
  2474.       if(ns != pkt->length) {
  2475.   #ifdef DEBUG
  2476.       if (pfs_debug) {
  2477. !     fprintf(stderr,"\nsent only %d/%d: ",ns, pkt->length);
  2478.           perror("");
  2479.       }
  2480.   #endif
  2481. ***************
  2482. *** 342,360 ****
  2483.       perrno = DIRSEND_NOT_ALL_SENT;
  2484.       ptlfree(first);
  2485.       ptlfree(pkt);
  2486. ! #ifdef XARCHIE
  2487. !         status0("Send Error");
  2488. ! #endif
  2489. !         return(NULL);
  2490.       }
  2491.   #ifdef DEBUG
  2492.       if (pfs_debug > 2) fprintf(stderr,"Sent.\n");
  2493.   #endif
  2494.       /* We come back to this point (by a goto) if the packet */
  2495.       /* received is only part of the response, or if the     */
  2496.       /* response came from the wrong host            */
  2497.   
  2498. -  keep_waiting:    
  2499.   #ifdef DEBUG
  2500.       if (pfs_debug > 2) fprintf(stderr,"Waiting for reply...");
  2501.   #endif
  2502. --- 501,530 ----
  2503.       perrno = DIRSEND_NOT_ALL_SENT;
  2504.       ptlfree(first);
  2505.       ptlfree(pkt);
  2506. !     /* return(NULL); */
  2507. !     dirsendReturn = NULL;
  2508. !     dirsendDone = DSRET_SEND_ERROR;
  2509.       }
  2510.   #ifdef DEBUG
  2511.       if (pfs_debug > 2) fprintf(stderr,"Sent.\n");
  2512.   #endif
  2513. +     keepWaitingDirsend();
  2514. + }
  2515. + /*    -    -    -    -    -    -    -    -    */
  2516. + /*
  2517. +  * This used to be a label to goto to set the appropriate timeout value
  2518. +  * and blocked in select(). Now we set selwait and the fd_sets to the
  2519. +  * appropriate values, and in X register a new timeout, then return to
  2520. +  * allow event processing.
  2521. +  */
  2522. + static void
  2523. + keepWaitingDirsend()
  2524. + {
  2525.       /* We come back to this point (by a goto) if the packet */
  2526.       /* received is only part of the response, or if the     */
  2527.       /* response came from the wrong host            */
  2528.   
  2529.   #ifdef DEBUG
  2530.       if (pfs_debug > 2) fprintf(stderr,"Waiting for reply...");
  2531.   #endif
  2532. ***************
  2533. *** 365,375 ****
  2534.       else if(gaps) selwait = &gapwait;
  2535.       else selwait = &timeout;
  2536.   
  2537. !     /* select - either recv is ready, or timeout */
  2538. !     /* see if timeout or error or wrong descriptor */
  2539. !     tmp = select(lp + 1, &readfds, (fd_set *)0, (fd_set *)0, selwait);
  2540.   
  2541. !     if((tmp == 0) && (gaps || ackpend)) { /* Send acknowledgment */
  2542.       /* Acks are piggybacked on retries - If we have received */
  2543.       /* an ack from the server, then the packet sent is only  */
  2544.       /* an ack and the rest of the message will be empty      */
  2545. --- 535,555 ----
  2546.       else if(gaps) selwait = &gapwait;
  2547.       else selwait = &timeout;
  2548.   
  2549. !     addTimeOut();
  2550. ! }
  2551.   
  2552. ! /*    -    -    -    -    -    -    -    -    */
  2553. ! /*
  2554. !  * This routine is called when a timeout occurs. It includes the code that
  2555. !  * was formerly used when select() returned 0 (indicating a timeout).
  2556. !  */
  2557. ! /*ARGSUSED*/
  2558. ! static void
  2559. ! timeoutProc(client_data,id)
  2560. ! XtPointer client_data;
  2561. ! XtIntervalId *id;
  2562. ! {
  2563. !     if (gaps || ackpend) { /* Send acknowledgment */
  2564.       /* Acks are piggybacked on retries - If we have received */
  2565.       /* an ack from the server, then the packet sent is only  */
  2566.       /* an ack and the rest of the message will be empty      */
  2567. ***************
  2568. *** 379,388 ****
  2569.               (ackpend ? "requested" : "gaps"));
  2570.       }    
  2571.   #endif
  2572. !     goto retry;
  2573.       }
  2574.   
  2575. !     if((tmp == 0) && (retries-- > 0)) {
  2576.       timeout.tv_sec = CLIENT_DIRSRV_BACKOFF(timeout.tv_sec);
  2577.   #ifdef DEBUG
  2578.       if (pfs_debug > 2) {
  2579. --- 559,569 ----
  2580.               (ackpend ? "requested" : "gaps"));
  2581.       }    
  2582.   #endif
  2583. !     retryDirsend();
  2584. !     return;
  2585.       }
  2586.   
  2587. !     if (retries-- > 0) {
  2588.       timeout.tv_sec = CLIENT_DIRSRV_BACKOFF(timeout.tv_sec);
  2589.   #ifdef DEBUG
  2590.       if (pfs_debug > 2) {
  2591. ***************
  2592. *** 393,420 ****
  2593.   #ifdef XARCHIE
  2594.           status1("Timed out -- retrying (%d seconds)",timeout.tv_sec);
  2595.   #endif
  2596. !     goto retry;
  2597.       }
  2598.   
  2599. -     if((tmp < 1) || !FD_ISSET(lp, &readfds)) {
  2600.   #ifdef DEBUG
  2601. !     if (pfs_debug) {
  2602. !         fprintf(stderr, "select failed: readfds=%x ",
  2603. !                     readfds);
  2604. !             perror("");
  2605. !         }
  2606. ! #endif
  2607. !     close(lp);
  2608. !     perrno = DIRSEND_SELECT_FAILED;
  2609. !     ptlfree(first);
  2610. !     ptlfree(pkt);
  2611. ! #ifdef XARCHIE
  2612. !         status1("Couldn't connect to %s",
  2613. !         inet_ntoa(*(struct in_addr *)&to.sin_addr));
  2614. ! #endif
  2615. !         return(NULL);
  2616.       }
  2617.   
  2618.   
  2619.       from_sz = sizeof(from);
  2620.       next->start = next->dat;
  2621. --- 574,614 ----
  2622.   #ifdef XARCHIE
  2623.           status1("Timed out -- retrying (%d seconds)",timeout.tv_sec);
  2624.   #endif
  2625. !     retryDirsend();
  2626. !     return;
  2627.       }
  2628.   
  2629.   #ifdef DEBUG
  2630. !     if (pfs_debug) {
  2631. !     fprintf(stderr, "select failed(timeoutProc): readfds=%x ",
  2632. !         readfds);
  2633. !     perror("");
  2634.       }
  2635. + #endif
  2636. +     close(lp);
  2637. +     perrno = DIRSEND_SELECT_FAILED;
  2638. +     ptlfree(first);
  2639. +     ptlfree(pkt);
  2640. +     /* return(NULL); */
  2641. +     dirsendReturn = NULL;
  2642. +     dirsendDone = DSRET_TIMEOUT;
  2643. + }
  2644.   
  2645. + /*    -    -    -    -    -    -    -    -    */
  2646. + /*
  2647. +  * This function is called whenever there's something to read on the
  2648. +  * connection. It includes the code that was run when select() returned
  2649. +  * greater than 0 (indicating read ready).
  2650. +  */
  2651. + /*ARGSUSED*/
  2652. + static void
  2653. + readProc(client_data,source,id)
  2654. + XtPointer client_data;
  2655. + int *source;
  2656. + XtInputId *id;
  2657. + {
  2658. +     /* We got something to read, so clear the timer */
  2659. +     removeTimeOut();
  2660.   
  2661.       from_sz = sizeof(from);
  2662.       next->start = next->dat;
  2663. ***************
  2664. *** 426,435 ****
  2665.       perrno = DIRSEND_BAD_RECV;
  2666.       ptlfree(first);
  2667.       ptlfree(pkt);
  2668. ! #ifdef XARCHIE
  2669. !         status0("Recv Error");
  2670. ! #endif
  2671. !         return(NULL);
  2672.       }
  2673.   
  2674.       next->length = nr;
  2675. --- 620,629 ----
  2676.       perrno = DIRSEND_BAD_RECV;
  2677.       ptlfree(first);
  2678.       ptlfree(pkt);
  2679. !     /* return(NULL) */
  2680. !     dirsendReturn = NULL;
  2681. !     dirsendDone = DSRET_RECV_ERROR;
  2682. !         return;
  2683.       }
  2684.   
  2685.       next->length = nr;
  2686. ***************
  2687. *** 437,462 ****
  2688.       *(next->start + next->length) = NULL;
  2689.   
  2690.   #ifdef DEBUG
  2691. !     if (pfs_debug > 2) 
  2692. !         fprintf(stderr,"Received packet from %s\n", inet_ntoa(*(struct in_addr *)&from.sin_addr));
  2693.   #endif
  2694. -     if (to.sin_addr.s_addr != from.sin_addr.s_addr) {
  2695. - #ifdef DEBUG
  2696. -     if (pfs_debug) {
  2697. -         fprintf(stderr, "dirsend: received packet from wrong host! (%x)\n",
  2698. -             from.sin_addr.s_addr);
  2699. -         (void) fflush(stdout);
  2700. -     }
  2701. - #endif
  2702. -     goto keep_waiting;
  2703. -     }
  2704.   
  2705.   #ifdef XARCHIE
  2706.       {
  2707.           static int num = 2;
  2708.       if (num == 2)
  2709. !         status1("Connected to %s",
  2710. !             inet_ntoa(*(struct in_addr *)&to.sin_addr));
  2711.       else
  2712.           status1("Receiving...%c",(num?'+':'*'));
  2713.       num = !num;
  2714. --- 631,646 ----
  2715.       *(next->start + next->length) = NULL;
  2716.   
  2717.   #ifdef DEBUG
  2718. !     if (pfs_debug > 2)
  2719. !         fprintf(stderr,"Received packet from %s\n",
  2720. !         inet_ntoa(SUN_GNU_FIX *(struct in_addr *)&from.sin_addr);
  2721.   #endif
  2722.   
  2723.   #ifdef XARCHIE
  2724.       {
  2725.           static int num = 2;
  2726.       if (num == 2)
  2727. !         status1("Connected to %s",to_hostname);
  2728.       else
  2729.           status1("Receiving...%c",(num?'+':'*'));
  2730.       num = !num;
  2731. ***************
  2732. *** 474,479 ****
  2733. --- 658,669 ----
  2734.           if(stmp) pkt_cid = ntohs(stmp);
  2735.           ctlptr += 2;
  2736.       }
  2737. +     if(pkt_cid && this_conn_id && (pkt_cid != this_conn_id)) {
  2738. +         /* The packet is not for us */
  2739. +         /* goto keep_waiting; */
  2740. +         keepWaitingDirsend();
  2741. +         return;
  2742. +     }
  2743.       if(hdr_len >= 5) {    /* Packet number */
  2744.           bcopy(ctlptr,&stmp,2);
  2745.           next->seq = ntohs(stmp);
  2746. ***************
  2747. *** 543,549 ****
  2748.           bcopy(ctlptr,&rdflag12,1);
  2749.           ctlptr += 1;
  2750.       }
  2751. !     if(next->seq == 0) goto keep_waiting;
  2752.       if(next->length >= 0) next->length -= hdr_len;
  2753.       next->start += hdr_len;
  2754.       goto done_old;
  2755. --- 733,743 ----
  2756.           bcopy(ctlptr,&rdflag12,1);
  2757.           ctlptr += 1;
  2758.       }
  2759. !     if(next->seq == 0) {
  2760. !         /* goto keep_waiting; */
  2761. !         keepWaitingDirsend();
  2762. !         return;
  2763. !     }
  2764.       if(next->length >= 0) next->length -= hdr_len;
  2765.       next->start += hdr_len;
  2766.       goto done_old;
  2767. ***************
  2768. *** 564,569 ****
  2769. --- 758,769 ----
  2770.       bcopy(ctlptr,&stmp,2);
  2771.       if(stmp) pkt_cid = ntohs(stmp);
  2772.       ctlptr += 2;
  2773. +     if(pkt_cid && this_conn_id && (pkt_cid != this_conn_id)) {
  2774. +         /* The packet is not for us */
  2775. +         /* goto keep_waiting; */
  2776. +         keepWaitingDirsend();
  2777. +         return;
  2778. +     }
  2779.       /* Packet number */
  2780.       if(ctlptr < (next->start + next->length)) {
  2781.           bcopy(ctlptr,&stmp,2);
  2782. ***************
  2783. *** 592,598 ****
  2784.           if(backoff) timeout.tv_sec = backoff;
  2785.           ctlptr += 2;
  2786.       }
  2787. !     if(next->seq == 0) goto keep_waiting;
  2788.       goto done_old;
  2789.   
  2790.       }
  2791. --- 792,802 ----
  2792.           if(backoff) timeout.tv_sec = backoff;
  2793.           ctlptr += 2;
  2794.       }
  2795. !     if(next->seq == 0) {
  2796. !         /* goto keep_waiting; */
  2797. !         keepWaitingDirsend();
  2798. !         return;
  2799. !     }
  2800.       goto done_old;
  2801.   
  2802.       }
  2803. ***************
  2804. *** 625,631 ****
  2805.       else gaps++;
  2806.       no_pkts = 1;
  2807.       next = ptalloc();
  2808. !     goto keep_waiting;
  2809.       }
  2810.       
  2811.       if(comp_thru && (next->seq <= comp_thru->seq))
  2812. --- 829,837 ----
  2813.       else gaps++;
  2814.       no_pkts = 1;
  2815.       next = ptalloc();
  2816. !     /* goto keep_waiting; */
  2817. !     keepWaitingDirsend();
  2818. !     return;
  2819.       }
  2820.       
  2821.       if(comp_thru && (next->seq <= comp_thru->seq))
  2822. ***************
  2823. *** 687,693 ****
  2824.   
  2825.       if ((nd_pkts == 0) || (no_pkts < nd_pkts)) {
  2826.       next = ptalloc();
  2827. !     goto keep_waiting;
  2828.       }
  2829.   
  2830.    all_done:
  2831. --- 893,901 ----
  2832.   
  2833.       if ((nd_pkts == 0) || (no_pkts < nd_pkts)) {
  2834.       next = ptalloc();
  2835. !     /* goto keep_waiting; */
  2836. !     keepWaitingDirsend();
  2837. !     return;
  2838.       }
  2839.   
  2840.    all_done:
  2841. ***************
  2842. *** 696,702 ****
  2843.       if (pfs_debug > 2) {
  2844.           if (to.sin_family == AF_INET)
  2845.           fprintf(stderr,"Acknowledging final packet to %s(%d)\n",
  2846. !             inet_ntoa(*(struct in_addr *)&to.sin_addr), ntohs(this_conn_id));
  2847.               else
  2848.                   fprintf(stderr,"Acknowledging final packet\n");
  2849.           (void) fflush(stderr);
  2850. --- 904,910 ----
  2851.       if (pfs_debug > 2) {
  2852.           if (to.sin_family == AF_INET)
  2853.           fprintf(stderr,"Acknowledging final packet to %s(%d)\n",
  2854. !             to_hostname, ntohs(this_conn_id));
  2855.               else
  2856.                   fprintf(stderr,"Acknowledging final packet\n");
  2857.           (void) fflush(stderr);
  2858. ***************
  2859. *** 741,746 ****
  2860.       }
  2861.       }
  2862.   
  2863. !     return(first);
  2864.   
  2865.   }
  2866. --- 949,1052 ----
  2867.       }
  2868.       }
  2869.   
  2870. !     /* return(first); */
  2871. !     dirsendReturn = first;
  2872. !     dirsendDone = DSRET_DONE;
  2873.   
  2874. + }
  2875. + /*    -    -    -    -    -    -    -    -    */
  2876. + /* These routines allow dirsend() to run with or without X by providing
  2877. +  * wrappers around the calls that handle the asynchronous communication.
  2878. +  * All parameters are passed using globals.
  2879. +  * Under X: The input sources and timeouts are set using Xt calls, and
  2880. +  *        processEvent() just calls XtAppProcessEvent().
  2881. +  * Non-X: None of the input sources and timeouts are used, and
  2882. +  *      processEvent() calls select() to handle both timeouts and the
  2883. +  *      socket file descriptor. The return value of select() is used
  2884. +  *      to determine which callback routine to call.
  2885. +  */
  2886. + static void
  2887. + addInputSource()
  2888. + {
  2889. + #ifdef XARCHIE
  2890. +     inputId = XtAppAddInput(appContext,lp,XtInputReadMask,readProc,NULL);
  2891. + #endif
  2892. + }
  2893. + static void
  2894. + removeInputSource()
  2895. + {
  2896. + #ifdef XARCHIE
  2897. +     XtRemoveInput(inputId);
  2898. + #endif
  2899. + }
  2900. + static void
  2901. + addTimeOut()
  2902. + {
  2903. + #ifdef XARCHIE
  2904. +     unsigned long timeoutLen = selwait->tv_sec*1000 + selwait->tv_usec/1000;
  2905. +     /* old timeout can still be there if we are being called after the
  2906. +      * file descriptor was read, so we remove it just to be sure. */
  2907. +     removeTimeOut();
  2908. +     timerId = XtAppAddTimeOut(appContext,timeoutLen,timeoutProc,NULL);
  2909. + #endif
  2910. + }
  2911. + static void
  2912. + removeTimeOut()
  2913. + {
  2914. + #ifdef XARCHIE
  2915. +     if (timerId != (XtIntervalId)0) {
  2916. +     XtRemoveTimeOut(timerId);
  2917. +     timerId = (XtIntervalId)0;
  2918. +     }
  2919. + #endif
  2920. + }
  2921. + static void
  2922. + processEvent()
  2923. + {
  2924. + #ifdef XARCHIE
  2925. +     XtAppProcessEvent(appContext,XtIMAll);
  2926. + #else
  2927. +     /* select - either recv is ready, or timeout */
  2928. +     /* see if timeout or error or wrong descriptor */
  2929. +     tmp = select(lp + 1, &readfds, (fd_set *)0, (fd_set *)0, selwait);
  2930. +     if (tmp == 0) {
  2931. +     timeoutProc(NULL,&timerId);
  2932. +     } else if ((tmp < 0) || !FD_ISSET(lp,&readfds)) {
  2933. + #ifdef DEBUG
  2934. +     if (pfs_debug) {
  2935. +         fprintf(stderr, "select failed(processEvent): readfds=%x ",
  2936. +             readfds);
  2937. +         perror("");
  2938. +     }
  2939. + #endif
  2940. +     close(lp);
  2941. +     perrno = DIRSEND_SELECT_FAILED;
  2942. +     ptlfree(first);
  2943. +     ptlfree(pkt);
  2944. +     /* return(NULL); */
  2945. +     dirsendReturn = NULL;
  2946. +     dirsendDone = DSRET_SELECT_ERROR;
  2947. +     } else {
  2948. +     readProc(NULL,&lp,&inputId);
  2949. +     }
  2950. + #endif /* XARCHIE */
  2951. + }
  2952. + void
  2953. + abortDirsend()
  2954. + {
  2955. +     if (!dirsendDone) {
  2956. +     close(lp);
  2957. +     ptlfree(first);
  2958. +     ptlfree(pkt);
  2959. +     dirsendReturn = NULL;
  2960. +     dirsendDone = DSRET_ABORTED;
  2961. +     }
  2962. +     return;
  2963.   }
  2964. *** /tmp/release17219/ftp.c    Tue Nov 12 16:54:45 1991
  2965. --- ftp.c    Tue Nov 12 12:48:35 1991
  2966. ***************
  2967. *** 1,7 ****
  2968.   /*
  2969.    * ftp.c : Fetches a file by anonymous ftp.
  2970.    *
  2971. !  * George Ferguson, ferguson@cs.rochester.edu, 12 Sep 1991.
  2972.    *
  2973.    * This is just an initial cut at providing the real kind of ftp
  2974.    * services that we want. In particular, we will eventually be using
  2975. --- 1,7 ----
  2976.   /*
  2977.    * ftp.c : Fetches a file by anonymous ftp.
  2978.    *
  2979. !  * George Ferguson, ferguson@cs.rochester.edu, 12 Nov 1991.
  2980.    *
  2981.    * This is just an initial cut at providing the real kind of ftp
  2982.    * services that we want. In particular, we will eventually be using
  2983. ***************
  2984. *** 59,64 ****
  2985.       fprintf(fp,"get %s\n",file);
  2986.       status = pclose(fp) >> 8;
  2987.       if (status)
  2988. !     alert0("Ftp returned error code %d",status);
  2989.       status0("Ready");
  2990.   }
  2991. --- 59,64 ----
  2992.       fprintf(fp,"get %s\n",file);
  2993.       status = pclose(fp) >> 8;
  2994.       if (status)
  2995. !     alert1("Ftp returned error code %d",status);
  2996.       status0("Ready");
  2997.   }
  2998. *** /tmp/release17219/get_pauth.c    Tue Nov 12 16:54:49 1991
  2999. --- get_pauth.c    Sat Nov  2 16:48:39 1991
  3000. ***************
  3001. *** 3,15 ****
  3002.    *
  3003.    * For copying and distribution information, please see the file
  3004.    * <copyright.h>.
  3005.    */
  3006.   
  3007.   #include <copyright.h>
  3008.   #include <stdio.h>
  3009. ! #include <strings.h>
  3010. ! #include <pwd.h>
  3011.   
  3012.   #include <pcompat.h>
  3013.   #include <pauthent.h>
  3014.   
  3015. --- 3,32 ----
  3016.    *
  3017.    * For copying and distribution information, please see the file
  3018.    * <copyright.h>.
  3019. +  *
  3020. +  * v1.2.1 - 09/17/91 (bpk) - added BULL & USG stuff, thanks to Jim Sillas
  3021. +  * v1.2.0 - 09/17/91 (bpk) - fixed it up (thanks to synful)
  3022. +  * v1.1.1 - 08/30/91 (bpk) - added VMS support
  3023.    */
  3024.   
  3025.   #include <copyright.h>
  3026.   #include <stdio.h>
  3027. ! #ifndef VMS
  3028. ! # include <sys/types.h>
  3029. ! #endif
  3030.   
  3031. + #if defined(USG) || defined(UTS) || defined(_AIX)
  3032. + # include <string.h>
  3033. + #else
  3034. + # include <strings.h>
  3035. + #endif
  3036. + #ifndef VMS
  3037. + # include <pwd.h>
  3038. + #else
  3039. + # include <jpidef.h>
  3040. + #endif
  3041.   #include <pcompat.h>
  3042.   #include <pauthent.h>
  3043.   
  3044. ***************
  3045. *** 19,26 ****
  3046.       {
  3047.       static PAUTH_ST   no_auth_st;
  3048.       static PAUTH          no_auth = NULL;
  3049.       struct passwd *whoiampw;
  3050.   
  3051.       if(no_auth == NULL) {
  3052.           no_auth = &no_auth_st;
  3053. --- 36,54 ----
  3054.       {
  3055.       static PAUTH_ST   no_auth_st;
  3056.       static PAUTH          no_auth = NULL;
  3057. ! #ifndef VMS
  3058.       struct passwd *whoiampw;
  3059. + #else
  3060. +     char username[13];
  3061. +     unsigned short usernamelen;
  3062. +     struct {
  3063. +         unsigned short buflen;
  3064. +         unsigned short itmcod;
  3065. +         char *bufadr;
  3066. +         unsigned short *retlenadr;
  3067. +         unsigned long null;
  3068. +     } jpi_itemlist;
  3069. + #endif
  3070.   
  3071.       if(no_auth == NULL) {
  3072.           no_auth = &no_auth_st;
  3073. ***************
  3074. *** 27,35 ****
  3075. --- 55,77 ----
  3076.           strcpy(no_auth->auth_type,"UNAUTHENTICATED");
  3077.   
  3078.           /* find out who we are */
  3079. + #ifndef VMS
  3080.           DISABLE_PFS(whoiampw = getpwuid(getuid()));
  3081.           if (whoiampw == 0) strcpy(no_auth->authenticator,"nobody");
  3082.           else strcpy(no_auth->authenticator, whoiampw->pw_name);
  3083. + #else
  3084. +         jpi_itemlist.buflen = sizeof(username);
  3085. +         jpi_itemlist.itmcod = JPI$_USERNAME;
  3086. +         jpi_itemlist.bufadr = &username;
  3087. +         jpi_itemlist.retlenadr = &usernamelen;
  3088. +         jpi_itemlist.null = 0;
  3089. +         if (SYS$GETJPI(0, 0, 0, &jpi_itemlist, 0, 0, 0) & 0x1)
  3090. +         {
  3091. +         username[usernamelen] = 0;
  3092. +         strcpy(no_auth->authenticator, username);
  3093. +         } else
  3094. +         strcpy(no_auth->authenticator, "nobody");
  3095. + #endif
  3096.       }
  3097.       return(no_auth);
  3098.       }
  3099. *** /tmp/release17219/get_vdir.c    Tue Nov 12 16:54:53 1991
  3100. --- get_vdir.c    Sun Nov  3 18:17:54 1991
  3101. ***************
  3102. *** 3,13 ****
  3103.    *
  3104.    * For copying and distribution information, please see the file
  3105.    * <copyright.h>.
  3106.    */
  3107.   
  3108.   #include <copyright.h>
  3109.   #include <stdio.h>
  3110. ! #include <strings.h>
  3111.   
  3112.   #include <pfs.h>
  3113.   #include <pprot.h>
  3114. --- 3,21 ----
  3115.    *
  3116.    * For copying and distribution information, please see the file
  3117.    * <copyright.h>.
  3118. +  *
  3119. +  * v1.2.1 - 10/23/91 (bpk) - added missing code
  3120. +  * v1.2.0 - 09/17/91 (bpk) - added new get_vdir code
  3121. +  * v1.1.1 - 08/30/91 (bpk) - cast rindex()
  3122.    */
  3123.   
  3124.   #include <copyright.h>
  3125.   #include <stdio.h>
  3126. ! #if defined(USG) || defined(UTS) || defined(_AIX)
  3127. ! # include <string.h>
  3128. ! #else
  3129. ! # include <strings.h>
  3130. ! #endif
  3131.   
  3132.   #include <pfs.h>
  3133.   #include <pprot.h>
  3134. ***************
  3135. *** 20,25 ****
  3136. --- 28,35 ----
  3137.   extern int    pfs_debug;
  3138.   #endif
  3139.   
  3140. + extern int    pwarn;
  3141. + extern char    p_warn_string[];
  3142.   extern int    perrno;
  3143.   extern char    p_err_string[];
  3144.   
  3145. ***************
  3146. *** 67,72 ****
  3147. --- 77,83 ----
  3148.    *              Doesn't process errors returned from server
  3149.    *        Doesn't expand union links if requested to
  3150.    */
  3151. + int
  3152.   get_vdir(dhost,dfile,components,dir,flags,filters,acomp)
  3153.       char    *dhost;        /* Host on which directory resides           */
  3154.       char    *dfile;        /* Name of file on that host                 */
  3155. ***************
  3156. *** 91,96 ****
  3157. --- 102,109 ----
  3158.       int    getattrib = 0;  /* Get attributes from server                */
  3159.       int    vl_insert_flag; /* Flags to vl_insert                        */
  3160.   
  3161. +     int    fwdcnt = MAX_FWD_DEPTH;
  3162.       int    no_links = 0;   /* Count of number of links found         */
  3163.   
  3164.       char    options[40];    /* LIST option                               */
  3165. ***************
  3166. *** 200,207 ****
  3167.               char     l_ntype[MAX_DIR_LINESIZE];
  3168.               char     l_fname[MAX_DIR_LINESIZE];
  3169.               int        l_version;
  3170. -             int        l_magic;
  3171.               char     t_unresolved[MAX_DIR_LINESIZE];
  3172.               int        tmp;
  3173.   
  3174.           case 'L': /* LINK or LINK-INFO */
  3175. --- 213,220 ----
  3176.               char     l_ntype[MAX_DIR_LINESIZE];
  3177.               char     l_fname[MAX_DIR_LINESIZE];
  3178.               int        l_version;
  3179.               char     t_unresolved[MAX_DIR_LINESIZE];
  3180. +             int        l_magic;
  3181.               int        tmp;
  3182.   
  3183.           case 'L': /* LINK or LINK-INFO */
  3184. ***************
  3185. *** 231,237 ****
  3186.               break;
  3187.               }
  3188.   
  3189. !             /* Not LINK-INFO, must be LINK */
  3190.   
  3191.               /* If only verifying, don't want to change dir */
  3192.               if(flags == GVD_VERIFY) {
  3193. --- 244,251 ----
  3194.               break;
  3195.               }
  3196.   
  3197. !             /* Not LINK-INFO, must be LINK - if not check for error */
  3198. !             if(strncmp(line,"LINK",4) != 0) goto scanerr;
  3199.   
  3200.               /* If only verifying, don't want to change dir */
  3201.               if(flags == GVD_VERIFY) {
  3202. ***************
  3203. *** 292,304 ****
  3204.               break;
  3205.   
  3206.           case 'F': /* FILTER, FAILURE or FORWARDED*/
  3207. -             /* FAILURE (treat as NOT-A-DIRECTORY, let caller know) */
  3208. -             if(strncmp(line,"FAILURE",7) == 0) {
  3209. -             perrno = scan_error(line);
  3210. -             return(perrno);
  3211. -             }
  3212.               /* FORWARDED */
  3213.               if(strncmp(line,"FORWARDED",9) == 0) {
  3214.               /* parse and start over */
  3215.   
  3216.               tmp = sscanf(line,"FORWARDED %s %s %s %s %d %d", 
  3217. --- 306,318 ----
  3218.               break;
  3219.   
  3220.           case 'F': /* FILTER, FAILURE or FORWARDED*/
  3221.               /* FORWARDED */
  3222.               if(strncmp(line,"FORWARDED",9) == 0) {
  3223. +             if(fwdcnt-- <= 0) {
  3224. +                 ptlfree(resp);
  3225. +                 perrno = PFS_MAX_FWD_DEPTH;
  3226. +                 return(perrno);
  3227. +             }
  3228.               /* parse and start over */
  3229.   
  3230.               tmp = sscanf(line,"FORWARDED %s %s %s %s %d %d", 
  3231. ***************
  3232. *** 316,321 ****
  3233. --- 330,336 ----
  3234.               ptlfree(resp);
  3235.               goto startover;
  3236.               }
  3237. +             if(strncmp(line,"FILTER",6) != 0) goto scanerr;
  3238.               break;
  3239.   
  3240.   
  3241. ***************
  3242. *** 324,335 ****
  3243.               break;
  3244.   
  3245.           case 'N': /* NOT-A-DIRECTORY or NONE-FOUND */
  3246. -             /* NOT-A-DIRECTORY, let caller know       */
  3247. -             if(strncmp(line,"NOT-A-DIRECTORY",15) == 0) {
  3248. -             perrno = DIRSRV_NOT_DIRECTORY;
  3249. -             return(perrno);
  3250. -             }
  3251.               /* NONE-FOUND, we just have no links to insert */
  3252.               /* It is not an error, but we must clear any   */
  3253.               /* old links in the directory arg              */
  3254. --- 339,344 ----
  3255. ***************
  3256. *** 348,370 ****
  3257.               }
  3258.               break;
  3259.               }
  3260.   
  3261. -             perrno = DIRSRV_BAD_FORMAT;
  3262. -             break;
  3263. -         case 'E': /* ERROR */
  3264. -             if(strncmp(line,"ERROR",5) == 0) {
  3265. -             perrno = DIRSRV_ERROR;
  3266. -             strncpy(p_err_string,line+6,P_ERR_STRING_SZ);
  3267. -             return(perrno);
  3268. -             }
  3269. -             perrno = DIRSRV_BAD_FORMAT;
  3270. -             break;
  3271.           case 'U': /* UNRESOLVED */
  3272.               if(strncmp(line,"UNRESOLVED",10) != 0) {
  3273. !             perrno = DIRSRV_BAD_FORMAT;
  3274. !             break;
  3275.               }
  3276.               tmp = sscanf(line,"UNRESOLVED %s", t_unresolved);
  3277.               if(tmp < 1) {
  3278. --- 357,368 ----
  3279.               }
  3280.               break;
  3281.               }
  3282. +             /* If NOT-A-DIRECTORY or anything else, scan error */
  3283. +             goto scanerr;
  3284.   
  3285.           case 'U': /* UNRESOLVED */
  3286.               if(strncmp(line,"UNRESOLVED",10) != 0) {
  3287. !             goto scanerr;
  3288.               }
  3289.               tmp = sscanf(line,"UNRESOLVED %s", t_unresolved);
  3290.               if(tmp < 1) {
  3291. ***************
  3292. *** 377,383 ****
  3293.               /* ulcomp is the components that were resolved */
  3294.               *(ulcomp+strlen(acomp)-strlen(t_unresolved)-1) = '\0';
  3295.               /* Comp gets the last component resolved */
  3296. !             comp = rindex(ulcomp,'/');
  3297.               if(comp) comp++;
  3298.               else comp = ulcomp;
  3299.               /* Let rd_vdir know what remains */
  3300. --- 375,381 ----
  3301.               /* ulcomp is the components that were resolved */
  3302.               *(ulcomp+strlen(acomp)-strlen(t_unresolved)-1) = '\0';
  3303.               /* Comp gets the last component resolved */
  3304. !             comp = (char *) rindex(ulcomp,'/');
  3305.               if(comp) comp++;
  3306.               else comp = ulcomp;
  3307.               /* Let rd_vdir know what remains */
  3308. ***************
  3309. *** 391,400 ****
  3310.               perrno = DIRSRV_BAD_VERS;
  3311.               return(perrno);
  3312.               }
  3313. !             perrno = DIRSRV_BAD_FORMAT;
  3314. !             break;
  3315.           default:
  3316. !             if(*line) perrno = DIRSRV_BAD_FORMAT;
  3317.               break;
  3318.           }
  3319.           }
  3320. --- 389,402 ----
  3321.               perrno = DIRSRV_BAD_VERS;
  3322.               return(perrno);
  3323.               }
  3324. !             goto scanerr;
  3325. !         scanerr:
  3326.           default:
  3327. !             if(*line && (tmp = scan_error(line))) {
  3328. !             ptlfree(resp);
  3329. !             return(tmp);
  3330. !             }
  3331.               break;
  3332.           }
  3333.           }
  3334. ***************
  3335. *** 410,416 ****
  3336.           /* ulcomp is the components that were resolved */
  3337.           strcpy(ulcomp,acomp);
  3338.           /* Comp gets the last component resolved */
  3339. !         comp = rindex(ulcomp,'/');
  3340.           if(comp) comp++;
  3341.           else comp = ulcomp;
  3342.           /* If we have union links to resolve, only one component remains */
  3343. --- 412,418 ----
  3344.           /* ulcomp is the components that were resolved */
  3345.           strcpy(ulcomp,acomp);
  3346.           /* Comp gets the last component resolved */
  3347. !         comp = (char *) rindex(ulcomp,'/');
  3348.           if(comp) comp++;
  3349.           else comp = ulcomp;
  3350.           /* If we have union links to resolve, only one component remains */
  3351. *** /tmp/release17219/patchlevel.h    Tue Nov 12 16:54:57 1991
  3352. --- patchlevel.h    Tue Nov 12 16:52:18 1991
  3353. ***************
  3354. *** 1,10 ****
  3355.   /*
  3356.    * patchlevel.h : xarchie version control
  3357.    *
  3358. !  * George Ferguson, ferguson@cs.rochester.edu, 12 Sep 1991.
  3359.    *
  3360.    */
  3361.   
  3362.   int xarchieMajorVersion = 1;
  3363. ! int xarchieMinorVersion = 2;
  3364. --- 1,10 ----
  3365.   /*
  3366.    * patchlevel.h : xarchie version control
  3367.    *
  3368. !  * George Ferguson, ferguson@cs.rochester.edu, 12 Nov 1991.
  3369.    *
  3370.    */
  3371.   
  3372.   int xarchieMajorVersion = 1;
  3373. ! int xarchieMinorVersion = 3;
  3374. ! char *xarchieExtraVersion = "";
  3375. *** /tmp/release17219/pauthent.h    Tue Nov 12 16:55:00 1991
  3376. --- pauthent.h    Sat Nov  2 12:50:54 1991
  3377. ***************
  3378. *** 19,24 ****
  3379. --- 19,28 ----
  3380.   
  3381.   PAUTH get_pauth();
  3382.   
  3383. + #ifndef VMS
  3384. + #include <netinet/in.h>
  3385. + #endif
  3386.   struct client_info {
  3387.       int                ainfo_type;
  3388.       char            *auth_type;
  3389. ***************
  3390. *** 25,31 ****
  3391.       char            *authenticator;
  3392.       char            *userid;
  3393.       short            port;
  3394. !     long            haddr;
  3395.       struct pfs_auth_info    *previous;
  3396.       struct pfs_auth_info    *next;
  3397.   };
  3398. --- 29,35 ----
  3399.       char            *authenticator;
  3400.       char            *userid;
  3401.       short            port;
  3402. !     struct in_addr        haddr;
  3403.       struct pfs_auth_info    *previous;
  3404.       struct pfs_auth_info    *next;
  3405.   };
  3406. *** /dev/null    Tue Nov 12 16:30:11 1991
  3407. --- perrmesg.c    Sat Nov  2 20:55:53 1991
  3408. ***************
  3409. *** 0 ****
  3410. --- 1,195 ----
  3411. + /*
  3412. +  * Copyright (c) 1989, 1990, 1991 by the University of Washington
  3413. +  *
  3414. +  * For copying and distribution information, please see the file
  3415. +  * <copyright.h>.
  3416. +  */
  3417. + #include <copyright.h>
  3418. + #include <perrno.h>
  3419. + #include <stdio.h>
  3420. + /* This file and perrno.h should always be updated simultaneously */
  3421. + int    perrno = 0;
  3422. + int    pwarn = 0;
  3423. + char    p_err_string[P_ERR_STRING_SZ];
  3424. + char    p_warn_string[P_ERR_STRING_SZ];
  3425. + char    *p_err_text[256] = {
  3426. +     /*   0 */ "Success (prospero)",
  3427. +     /*   1 */ "Port unknown (dirsend)",
  3428. +     /*   2 */ "Can't open local UDP port (dirsend)",
  3429. +     /*   3 */ "Can't resolve hostname (dirsend)",
  3430. +     /*   4 */ "Unable to send entire message (dirsend)",
  3431. +     /*   5 */ "Timed out (dirsend)",
  3432. +     /*   6 */ "Recvfrom failed (dirsend)",
  3433. +     /*   7 */ "",    /*   8 */ "",    /*   9 */ "",    /*  10 */ "",
  3434. +     /*  11 */ "Sendto failed (reply)",
  3435. +     /*  12 */ "",    /*  13 */ "",    /*  14 */ "",    /*  15 */ "",
  3436. +     /*  16 */ "",    /*  17 */ "",    /*  18 */ "",    /*  19 */ "",
  3437. +     /*  20 */ "",
  3438. +     /*  21 */ "Link already exists (vl_insert)",
  3439. +     /*  22 */ "Link with same name already exists (vl_insert)",
  3440. +     /*  23 */ "",    /*  24 */ "",
  3441. +     /*  25 */ "Link already exists (ul_insert)",
  3442. +     /*  26 */ "Replacing existing link (ul_insert)",
  3443. +     /*  27 */ "Previous entry not found in dir->ulinks (ul_insert)",
  3444. +     /*  28 */ "",    /*  29 */ "",    /*  30 */ "",    /*  31 */ "",
  3445. +     /*  32 */ "",    /*  33 */ "",    /*  34 */ "",    /*  35 */ "",
  3446. +     /*  36 */ "",    /*  37 */ "",    /*  38 */ "",    /*  39 */ "",
  3447. +     /*  40 */ "",
  3448. +     /*  41 */ "Temporary not found (rd_vdir)",
  3449. +     /*  42 */ "Namespace not closed with object (rd_vdir)",
  3450. +     /*  43 */ "Alias for namespace not defined (rd_vdir)",
  3451. +     /*  44 */ "Specified namespace not found (rd_vdir)",
  3452. +     /*  45 */ "",    /*  46 */ "",    /*  47 */ "",    /*  48 */ "",
  3453. +     /*  49 */ "",    /*  50 */ "",
  3454. +     /*  51 */ "File access method not supported (pfs_access)",
  3455. +     /*  52 */ "",    /*  53 */ "",    /*  54 */ "",
  3456. +     /*  55 */ "Pointer to cached copy - delete on close (pmap_cache)",
  3457. +     /*  56 */ "Unable to retrieve file (pmap_cache)",
  3458. +     /*  57 */ "",    /*  58 */ "",    /*  59 */ "",    /*  60 */ "",
  3459. +     /*  61 */ "Directory already exists (mk_vdir)",
  3460. +     /*  62 */ "Link with same name already exists (mk_vdir)",
  3461. +     /*  63 */ "",    /*  64 */ "",
  3462. +     /*  65 */ "Not a virtual system (vfsetenv)",
  3463. +     /*  66 */ "Can't find directory (vfsetenv)",
  3464. +     /*  67 */ "",    /*  68 */ "",    /*  69 */ "",    /*  70 */ "",
  3465. +     /*  71 */ "Link already exists (add_vlink)",
  3466. +     /*  72 */ "Link with same name already exists (add_vlink)",
  3467. +     /*  73 */ "",    /*  74 */ "",    /*  75 */ "",    /*  76 */ "",
  3468. +     /*  77 */ "",    /*  78 */ "",    /*  79 */ "",    /*  80 */ "",
  3469. +     /*  81 */ "",    /*  82 */ "",    /*  83 */ "",    /*  84 */ "",
  3470. +     /*  85 */ "",    /*  86 */ "",    /*  87 */ "",    /*  88 */ "",
  3471. +     /*  89 */ "",    /*  90 */ "",    /*  91 */ "",    /*  92 */ "",
  3472. +     /*  93 */ "",    /*  94 */ "",    /*  95 */ "",    /*  96 */ "",
  3473. +     /*  97 */ "",    /*  98 */ "",    /*  99 */ "",    /* 100 */ "",
  3474. +     /* 101 */ "",    /* 102 */ "",    /* 103 */ "",    /* 104 */ "",
  3475. +     /* 105 */ "",    /* 106 */ "",    /* 107 */ "",    /* 108 */ "",
  3476. +     /* 109 */ "",    /* 110 */ "",    /* 111 */ "",    /* 112 */ "",
  3477. +     /* 113 */ "",    /* 114 */ "",    /* 115 */ "",    /* 116 */ "",
  3478. +     /* 117 */ "",    /* 118 */ "",    /* 119 */ "",    /* 120 */ "",
  3479. +     /* 121 */ "",    /* 122 */ "",    /* 123 */ "",    /* 124 */ "",
  3480. +     /* 125 */ "",    /* 126 */ "",    /* 127 */ "",    /* 128 */ "",
  3481. +     /* 129 */ "",    /* 130 */ "",    /* 131 */ "",    /* 132 */ "",
  3482. +     /* 133 */ "",    /* 134 */ "",    /* 135 */ "",    /* 136 */ "",
  3483. +     /* 137 */ "",    /* 138 */ "",    /* 139 */ "",    /* 140 */ "",
  3484. +     /* 141 */ "",    /* 142 */ "",    /* 143 */ "",    /* 144 */ "",
  3485. +     /* 145 */ "",    /* 146 */ "",    /* 147 */ "",    /* 148 */ "",
  3486. +     /* 149 */ "",    /* 150 */ "",    /* 151 */ "",    /* 152 */ "",
  3487. +     /* 153 */ "",    /* 154 */ "",    /* 155 */ "",    /* 156 */ "",
  3488. +     /* 157 */ "",    /* 158 */ "",    /* 159 */ "",    /* 160 */ "",
  3489. +     /* 161 */ "",    /* 162 */ "",    /* 163 */ "",    /* 164 */ "",
  3490. +     /* 165 */ "",    /* 166 */ "",    /* 167 */ "",    /* 168 */ "",
  3491. +     /* 169 */ "",    /* 170 */ "",    /* 171 */ "",    /* 172 */ "",
  3492. +     /* 173 */ "",    /* 174 */ "",    /* 175 */ "",    /* 176 */ "",
  3493. +     /* 177 */ "",    /* 178 */ "",    /* 179 */ "",    /* 180 */ "",
  3494. +     /* 181 */ "",    /* 182 */ "",    /* 183 */ "",    /* 184 */ "",
  3495. +     /* 185 */ "",    /* 186 */ "",    /* 187 */ "",    /* 188 */ "",
  3496. +     /* 189 */ "",    /* 190 */ "",    /* 191 */ "",    /* 192 */ "",
  3497. +     /* 193 */ "",    /* 194 */ "",    /* 195 */ "",    /* 196 */ "",
  3498. +     /* 197 */ "",    /* 198 */ "",    /* 199 */ "",    /* 200 */ "",
  3499. +     /* 201 */ "",    /* 202 */ "",    /* 203 */ "",    /* 204 */ "",
  3500. +     /* 205 */ "",    /* 206 */ "",    /* 207 */ "",    /* 208 */ "",
  3501. +     /* 209 */ "",    /* 210 */ "",    /* 211 */ "",    /* 212 */ "",
  3502. +     /* 213 */ "",    /* 214 */ "",    /* 215 */ "",    /* 216 */ "",
  3503. +     /* 217 */ "",    /* 218 */ "",    /* 219 */ "",    /* 220 */ "",
  3504. +     /* 221 */ "",    /* 222 */ "",    /* 223 */ "",    /* 224 */ "",
  3505. +     /* 225 */ "",    /* 226 */ "",    /* 227 */ "",    /* 228 */ "",
  3506. +     /* 229 */ "",
  3507. +     /* 230 */ "File not found (prospero)",
  3508. +     /* 231 */ "Directory not found (prospero)",
  3509. +     /* 232 */ "Symbolic links nested too deep (prospero)",
  3510. +     /* 233 */ "Environment not initialized - source vfsetup.source then run vfsetup",
  3511. +     /* 234 */ "Can't traverse an external file (prospero)",
  3512. +     /* 235 */ "Forwarding chain is too long (prospero)",
  3513. +     /* 236 */ "",    /* 237 */ "",    /* 238 */ "",    /* 239 */ "",
  3514. +     /* 240 */ "",    /* 241 */ "",
  3515. +     /* 242 */ "Authentication required (prospero server)",
  3516. +     /* 243 */ "Not authorized (prospero server)",
  3517. +     /* 244 */ "Not found (prospero server)",
  3518. +     /* 245 */ "Bad version number (prospero server)",
  3519. +     /* 246 */ "Not a directory (prospero server)",
  3520. +     /* 247 */ "Already exists (prospero server)",
  3521. +     /* 248 */ "Link with same name already exists (prospero server)",
  3522. +     /* 249 */ "",    /* 250 */ "",
  3523. +     /* 251 */ "Command not implemented on server (dirsrv)",
  3524. +     /* 252 */ "Bad format for response (dirsrv)",
  3525. +     /* 253 */ "Protocol error (prospero server)",
  3526. +     /* 254 */ "Unspecified server failure (prospero server)",
  3527. +     /* 255 */ "Generic Failure (prospero)"};
  3528. + char    *p_warn_text[256] = {
  3529. +     /*   0 */ "No warning",
  3530. +     /*   1 */ "You are using an old version of this program",
  3531. +     /*   2 */ "From server",
  3532. +     /*   3 */ "Unrecognized line in response from server",
  3533. +   /* 4-254 */ "", "", "", "", "", "", "", "", "", "", "", "", "",
  3534. +   "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
  3535. +   "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
  3536. +   "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
  3537. +   "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
  3538. +   "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
  3539. +   "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
  3540. +   "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
  3541. +   "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
  3542. +   "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
  3543. +   "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
  3544. +   "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
  3545. +   "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
  3546. +   "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
  3547. +   "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
  3548. +     /* 255 */ ""};
  3549. + #ifndef ARCHIE
  3550. + perrmesg(prefix,no,text)
  3551. +     char    *prefix;
  3552. +     int        no;
  3553. +     char    *text;
  3554. +     {
  3555. +     fprintf(stderr,"%s%s%s%s\n", (prefix ? prefix : ""),
  3556. +         (no ? p_err_text[no] : p_err_text[perrno]),
  3557. +         ((text ? (*text ? " - " : "") : 
  3558. +           (!no && *p_err_string ? " - " : ""))),
  3559. +         (text ? text : (no ? "" : p_err_string)));
  3560. +     }
  3561. + sperrmesg(buf,prefix,no,text)
  3562. +     char    *buf;
  3563. +     char    *prefix;
  3564. +     int        no;
  3565. +     char    *text;
  3566. +     {
  3567. +     sprintf(buf,"%s%s%s%s\n", (prefix ? prefix : ""),
  3568. +         (no ? p_err_text[no] : p_err_text[perrno]),
  3569. +         ((text ? (*text ? " - " : "") : 
  3570. +           (!no && *p_err_string ? " - " : ""))),
  3571. +         (text ? text : (no ? "" : p_err_string)));
  3572. +     }
  3573. + pwarnmesg(prefix,no,text)
  3574. +     char    *prefix;
  3575. +     int        no;
  3576. +     char    *text;
  3577. +     {
  3578. +     fprintf(stderr,"%s%s%s%s\n", (prefix ? prefix : ""),
  3579. +         (no ? p_warn_text[no] : p_warn_text[pwarn]),
  3580. +         ((text ? (*text ? " - " : "") : 
  3581. +           (!no && *p_warn_string ? " - " : ""))),
  3582. +         (text ? text : (no ? "" : p_warn_string)));
  3583. +     }
  3584. + spwarnmesg(buf,prefix,no,text)
  3585. +     char    *buf;
  3586. +     char    *prefix;
  3587. +     int        no;
  3588. +     char    *text;
  3589. +     {
  3590. +     sprintf(buf,"%s%s%s%s\n", (prefix ? prefix : ""),
  3591. +         (no ? p_warn_text[no] : p_warn_text[pwarn]),
  3592. +         ((text ? (*text ? " - " : "") : 
  3593. +           (!no && *p_warn_string ? " - " : ""))),
  3594. +         (text ? text : (no ? "" : p_warn_string)));
  3595. +     }
  3596. + #endif
  3597. *** /tmp/release17219/perrno.h    Tue Nov 12 16:55:10 1991
  3598. --- perrno.h    Mon Oct 21 12:54:42 1991
  3599. ***************
  3600. *** 17,28 ****
  3601.    * libraries.
  3602.    */
  3603.   
  3604. ! /**/ /* Means that this code should be replace by the 24X series code */
  3605.   
  3606.   extern int    perrno;
  3607.   extern char    p_err_string[];
  3608.   extern char    *p_err_text[];
  3609.   
  3610.   /* Error codes returned or found in verrno */
  3611.   
  3612.   #ifndef PSUCCESS
  3613. --- 17,32 ----
  3614.    * libraries.
  3615.    */
  3616.   
  3617. ! #define        P_ERR_STRING_SZ 100     /* Size of error string        */
  3618.   
  3619.   extern int    perrno;
  3620.   extern char    p_err_string[];
  3621.   extern char    *p_err_text[];
  3622.   
  3623. + extern int    pwarn;
  3624. + extern char    p_warn_string[];
  3625. + extern char    *p_warn_text[];
  3626.   /* Error codes returned or found in verrno */
  3627.   
  3628.   #ifndef PSUCCESS
  3629. ***************
  3630. *** 88,93 ****
  3631. --- 92,98 ----
  3632.   #define PFS_SYMLINK_DEPTH      232    /* Max sym-link depth exceeded  */
  3633.   #define PFS_ENV_NOT_INITIALIZED    233    /* Can't read environment    */
  3634.   #define PFS_EXT_USED_AS_DIR    234    /* Can't use externals as dirs  */
  3635. + #define PFS_MAX_FWD_DEPTH      235    /* Exceeded max forward depth   */
  3636.   
  3637.   /* Error codes returned by directory server                    */
  3638.   /* some of these duplicate errors from individual routines     */
  3639. ***************
  3640. *** 100,105 ****
  3641. --- 105,111 ----
  3642.   #define DIRSRV_ALREADY_EXISTS  247    /* Identical link already exists */
  3643.   #define DIRSRV_NAME_CONFLICT   248    /* Link with name already exists */
  3644.   
  3645. + #define DIRSRV_UNIMPLEMENTED   251      /* Unimplemented command         */
  3646.   #define DIRSRV_BAD_FORMAT      252
  3647.   #define DIRSRV_ERROR           253
  3648.   #define DIRSRV_SERVER_FAILED   254      /* Unspecified server failure    */
  3649. ***************
  3650. *** 107,109 ****
  3651. --- 113,123 ----
  3652.   #ifndef PFAILURE
  3653.   #define    PFAILURE            255
  3654.   #endif
  3655. + /* Warning codes */
  3656. + #define PNOWARN             0    /* No warning indicated         */
  3657. + #define PWARN_OUT_OF_DATE     1    /* Software is out of date       */
  3658. + #define PWARN_MSG_FROM_SERVER     2      /* Warning in p_warn_string      */
  3659. + #define PWARN_UNRECOGNIZED_RESP  3    /* Unrecognized line in response */
  3660. + #define PWARNING           255    /* Warning in p_warn_string      */
  3661. *** /tmp/release17219/pfs.h    Tue Nov 12 16:55:14 1991
  3662. --- pfs.h    Sat Nov  2 13:25:03 1991
  3663. ***************
  3664. *** 3,23 ****
  3665.    *
  3666.    * For copying and distribution information, please see the file
  3667.    * <copyright.h>.
  3668.    */
  3669.   
  3670.   #include <copyright.h>
  3671.   
  3672. ! #ifndef _TYPES_
  3673. ! #include <sys/types.h>
  3674. ! #endif /* _TYPES_ */
  3675.   
  3676. - #include <netinet/in.h> 
  3677.   #ifndef NULL
  3678.   #define NULL 0
  3679.   #endif /* NULL */
  3680.   
  3681. ! #define        PFS_RELEASE    "Beta.4.2"
  3682.   /* moved up for vdir_init */
  3683.   #define ZERO(p)        bzero((char *)(p), sizeof(*(p)))
  3684.   
  3685. --- 3,29 ----
  3686.    *
  3687.    * For copying and distribution information, please see the file
  3688.    * <copyright.h>.
  3689. +  *
  3690. +  * v1.1.2 - bpk 08/30/91 - added VMS support
  3691. +  * v1.1.1 - bpk 08/20/91 - 4.2 -> 4.2B
  3692.    */
  3693.   
  3694.   #include <copyright.h>
  3695.   
  3696. ! #ifdef VMS
  3697. ! # include <vms.h>
  3698. ! #else /* not VMS */
  3699. ! # ifndef _TYPES_
  3700. ! #  include <sys/types.h>
  3701. ! # endif /* _TYPES_ */
  3702. ! # include <netinet/in.h> 
  3703. ! #endif /* VMS */
  3704.   
  3705.   #ifndef NULL
  3706.   #define NULL 0
  3707.   #endif /* NULL */
  3708.   
  3709. ! #define        PFS_RELEASE    "Beta.4.2D"
  3710.   /* moved up for vdir_init */
  3711.   #define ZERO(p)        bzero((char *)(p), sizeof(*(p)))
  3712.   
  3713. ***************
  3714. *** 46,51 ****
  3715. --- 52,59 ----
  3716.   /* Request structure: maintains information about server requests */
  3717.   struct preq {
  3718.       int            cid;          /* Connection ID                  */
  3719. +     short        priority;      /* Connection priority            */
  3720. +     int            pf_priority;      /* Priority assigned by pri_func  */
  3721.       int            recv_tot;      /* Total # of packets received    */
  3722.       int            trns_tot;      /* Total # of packets to transmit */
  3723.       struct ptext    *cpkt;          /* Current packet being filled in */
  3724. ***************
  3725. *** 61,67 ****
  3726.   typedef struct preq PREQ_ST;
  3727.   
  3728.   
  3729. ! /* Definition of structure contining information on virtual link */
  3730.   
  3731.   struct vlink {
  3732.       int            dontfree;      /* Flag: don't free this link     */
  3733. --- 69,75 ----
  3734.   typedef struct preq PREQ_ST;
  3735.   
  3736.   
  3737. ! /* Definition of structure containing information on virtual link */
  3738.   
  3739.   struct vlink {
  3740.       int            dontfree;      /* Flag: don't free this link     */
  3741. ***************
  3742. *** 299,304 ****
  3743. --- 307,315 ----
  3744.   
  3745.   #define        PSUCCESS    0
  3746.   #define        PFAILURE    255
  3747. + /* Hush up warnings.  */
  3748. + void vllfree();
  3749.   
  3750.   /* Procedures in libpfs.a */
  3751.   
  3752. *** /tmp/release17219/pmachine.h    Tue Nov 12 16:55:18 1991
  3753. --- pmachine.h    Sat Nov  2 16:48:59 1991
  3754. ***************
  3755. *** 5,14 ****
  3756.    * barely resembles the pmachine.h that comes with the real Prospero, tho.
  3757.    */
  3758.   
  3759. - #if defined(NOREGEX)
  3760. - #define REGEX_FILE "regex.c" /* originally "../../misc/regex.c in wcmatch.c */
  3761. - #endif
  3762.   #ifdef FUNCS
  3763.   #define index        strchr
  3764.   #define rindex        strrchr
  3765. --- 5,10 ----
  3766. ***************
  3767. *** 18,27 ****
  3768.   #endif
  3769.   #endif
  3770.   
  3771.   /*
  3772.    * FD_SET: lib/pfs/dirsend.c, user/vget/ftp.c
  3773.    */
  3774. ! #ifndef FD_SET
  3775.   #define    NFDBITS        32
  3776.   #define    FD_SETSIZE    32
  3777.   #define    FD_SET(n, p)    ((p)->fds_bits[(n)/NFDBITS] |= (1 << ((n) % NFDBITS)))
  3778. --- 14,36 ----
  3779.   #endif
  3780.   #endif
  3781.   
  3782. + #if defined(RS6000) || defined(BULL)
  3783. + # define NEED_SELECT_H
  3784. + #endif
  3785. + #if defined(_AIX) || defined(UTS) || defined(AUX) || defined(USG)
  3786. + # define NEED_TIME_H
  3787. + #endif
  3788. + #ifdef VMS
  3789. + /* Get the system status stuff.  */
  3790. + # include <ssdef.h>
  3791. + #endif /* VMS */
  3792.   /*
  3793.    * FD_SET: lib/pfs/dirsend.c, user/vget/ftp.c
  3794.    */
  3795. ! #if !defined(FD_SET) && !defined(VMS)
  3796.   #define    NFDBITS        32
  3797.   #define    FD_SETSIZE    32
  3798.   #define    FD_SET(n, p)    ((p)->fds_bits[(n)/NFDBITS] |= (1 << ((n) % NFDBITS)))
  3799. *** /tmp/release17219/pprot.h    Tue Nov 12 16:55:21 1991
  3800. --- pprot.h    Sat Nov  2 13:26:49 1991
  3801. ***************
  3802. *** 8,14 ****
  3803.   #include <copyright.h>
  3804.   
  3805.   #ifndef MAXPATHLEN
  3806. ! #include <sys/param.h>
  3807.   #endif
  3808.   
  3809.   /* Protocol Definitions */
  3810. --- 8,18 ----
  3811.   #include <copyright.h>
  3812.   
  3813.   #ifndef MAXPATHLEN
  3814. ! # ifdef VMS
  3815. ! #  define MAXPATHLEN 32
  3816. ! # else /* not VMS */
  3817. ! #  include <sys/param.h>
  3818. ! # endif /* VMS */
  3819.   #endif
  3820.   
  3821.   /* Protocol Definitions */
  3822. ***************
  3823. *** 23,28 ****
  3824. --- 27,34 ----
  3825.   #define           MAXPKT            1024   /* Max size of response from server  */
  3826.   #define           SEQ_SIZE        32     /* Max size of sequence text in resp */ 
  3827.   #define           MAX_DIR_LINESIZE 160+MAXPATHLEN /* Max linesize in directory */
  3828. + #define           MAX_FWD_DEPTH    20     /* Max fwd pointers to follow        */
  3829.   
  3830.   #define S_AD_SZ        sizeof(struct sockaddr_in)
  3831.   
  3832. *** /tmp/release17219/procquery.c    Tue Nov 12 16:55:25 1991
  3833. --- procquery.c    Sat Nov  2 21:03:58 1991
  3834. ***************
  3835. *** 10,16 ****
  3836.    * For copying and distribution information, please see the file
  3837.    * <copyright.h>.
  3838.    *
  3839. !  * v1.1.1 - bpk 08/20/91 - took out archie_query from error msg
  3840.    */
  3841.   #include <copyright.h>
  3842.   #include <stdio.h>
  3843. --- 10,18 ----
  3844.    * For copying and distribution information, please see the file
  3845.    * <copyright.h>.
  3846.    *
  3847. !  * v1.2.1 - 10/18/91 (bpk) - warning stuff
  3848. !  * v1.2.0 - 09/20/91 (bpk) - VMS under Multinet 3.0 too
  3849. !  * v1.1.1 - 08/20/91 (bpk) - took out archie_query from error msg
  3850.    */
  3851.   #include <copyright.h>
  3852.   #include <stdio.h>
  3853. ***************
  3854. *** 18,28 ****
  3855.   #include <perrno.h>
  3856.   #include <pmachine.h>
  3857.   #include <archie.h>
  3858. ! #if defined(AUX) || defined (AIX)
  3859.   # include <time.h>
  3860.   #else
  3861. ! # include <sys/time.h>
  3862.   #endif
  3863.   extern int client_dirsrv_timeout,client_dirsrv_retry;    /* dirsend.c */
  3864.   extern char *progname;
  3865.   
  3866. --- 20,34 ----
  3867.   #include <perrno.h>
  3868.   #include <pmachine.h>
  3869.   #include <archie.h>
  3870. ! #ifdef NEED_TIME_H
  3871.   # include <time.h>
  3872.   #else
  3873. ! # ifndef VMS
  3874. ! #  include <sys/time.h>
  3875. ! # endif
  3876.   #endif
  3877.   extern int client_dirsrv_timeout,client_dirsrv_retry;    /* dirsend.c */
  3878.   extern char *progname;
  3879.   
  3880. ***************
  3881. *** 35,40 ****
  3882. --- 41,47 ----
  3883.   extern Database *db;                    /* database for all queries */
  3884.   static HostEntry *currentHostEntry;     /* current host, this query */
  3885.   static LocEntry *currentLocEntry;       /* current location, this query */
  3886. + static int numMatches;            /* num hits this query */
  3887.   #endif
  3888.   
  3889.   /*
  3890. ***************
  3891. *** 45,57 ****
  3892.   /*
  3893.    * Data defined here
  3894.    */
  3895. ! int perrno, pfs_debug;
  3896.   static struct tm *presenttime;
  3897.   
  3898.   /*    -    -    -    -    -    -    -    -    */
  3899.   /*
  3900.    * display_link : Prints the contents of the given virtual link. If
  3901. !  *    listflag is 0, then this uses static variables to save state
  3902.    *    between calls for a less verbose output. If listflag is non-zero
  3903.    *    then all information is printed every time.
  3904.    */
  3905. --- 52,67 ----
  3906.   /*
  3907.    * Data defined here
  3908.    */
  3909. ! extern int pwarn, perrno;
  3910. ! int pfs_debug;
  3911.   static struct tm *presenttime;
  3912. + static char lastpath[MAX_VPATH] = "\001";
  3913. + static char lasthost[MAX_VPATH] = "\001";
  3914.   
  3915.   /*    -    -    -    -    -    -    -    -    */
  3916.   /*
  3917.    * display_link : Prints the contents of the given virtual link. If
  3918. !  *    listflag is 0, then this uses last{host,path} to save state
  3919.    *    between calls for a less verbose output. If listflag is non-zero
  3920.    *    then all information is printed every time.
  3921.    */
  3922. ***************
  3923. *** 60,68 ****
  3924.   VLINK l;
  3925.   int listflag;
  3926.   {
  3927. -     static char    lastpath[MAX_VPATH] = "\001";
  3928. -     static char    lasthost[MAX_VPATH] = "\001";
  3929.       PATTRIB     ap;
  3930.       char    linkpath[MAX_VPATH];
  3931.       int        dirflag = 0;
  3932. --- 70,75 ----
  3933. ***************
  3934. *** 146,157 ****
  3935.       currentLocEntry = addLocEntry("*UNKNOWN*",currentHostEntry,NULL);
  3936.       }
  3937.       (void)addFileEntry(linkpath,size,modes,archie_date,currentLocEntry,NULL);
  3938. !     doPendingEvents();
  3939.   #else
  3940.       /* Print this link's information */
  3941.       if (listflag)
  3942.       printf("%s %6d %s %s%s\n",gt_date,size,l->host,l->filename,
  3943. !                             (dirflag ? "/" : ""));
  3944.       else
  3945.       printf("      %9s %s %10d  %s  %s\n",(dirflag ? "DIRECTORY" : "FILE"),
  3946.                       modes,size,archie_date,l->name);
  3947. --- 153,164 ----
  3948.       currentLocEntry = addLocEntry("*UNKNOWN*",currentHostEntry,NULL);
  3949.       }
  3950.       (void)addFileEntry(linkpath,size,modes,archie_date,currentLocEntry,NULL);
  3951. !     numMatches += 1;
  3952.   #else
  3953.       /* Print this link's information */
  3954.       if (listflag)
  3955.       printf("%s %6d %s %s%s\n",gt_date,size,l->host,l->filename,
  3956. !            (dirflag ? "/" : ""));
  3957.       else
  3958.       printf("      %9s %s %10d  %s  %s\n",(dirflag ? "DIRECTORY" : "FILE"),
  3959.                       modes,size,archie_date,l->name);
  3960. ***************
  3961. *** 193,198 ****
  3962. --- 200,206 ----
  3963.       clearDb(db);
  3964.       currentHostEntry = HOST_NULL;
  3965.       currentLocEntry = LOC_NULL;
  3966. +     numMatches = 0;
  3967.   #endif
  3968.   
  3969.       /* Do the query */
  3970. ***************
  3971. *** 204,228 ****
  3972.       /* Error? */
  3973.       if (perrno != PSUCCESS) {
  3974.   #ifdef XARCHIE
  3975. !     if (*p_err_string)
  3976. !         alert2("Prospero error: %.100s - %.100s",p_err_text[perrno],
  3977. !                              p_err_string);
  3978.       else
  3979. !         alert1("Prospero error: %.200s",p_err_text[perrno]);
  3980.           status0("Ready");
  3981.   #else
  3982. !     if (*p_err_string)
  3983. !       fprintf(stderr, "%s: failed: %s - %s\n", progname,
  3984. !           p_err_text[perrno], p_err_string);
  3985.       else
  3986. !       fprintf(stderr, "%s failed: %s\n", progname, p_err_text[perrno]);
  3987.   #endif
  3988.       }
  3989.   
  3990.       /* Display the results */
  3991.   #ifdef XARCHIE
  3992.       status0("Parsing");
  3993.   #endif
  3994.       while (l != NULL) {
  3995.       display_link(l,listflag);
  3996.       l = l->next;
  3997. --- 212,263 ----
  3998.       /* Error? */
  3999.       if (perrno != PSUCCESS) {
  4000.   #ifdef XARCHIE
  4001. !     if (p_err_text[perrno]) {
  4002. !       if (*p_err_string)
  4003. !         alert2("Prospero error: %.100s - %.100s",p_err_text[perrno],
  4004. !             p_err_string);
  4005. !       else
  4006. !         alert1("Prospero error: %.200s",p_err_text[perrno]);
  4007. !     } else
  4008. !         alert1("Prospero error: Undefined error %d (prospero)", perrno);
  4009. !         status0("Ready");
  4010. ! #else
  4011. !     if (p_err_text[perrno]) {
  4012. !         if (*p_err_string)
  4013. !         fprintf(stderr, "%s: failed: %s - %s\n", progname,
  4014. !                 p_err_text[perrno], p_err_string);
  4015. !         else
  4016. !             fprintf(stderr, "%s failed: %s\n", progname, p_err_text[perrno]);
  4017. !     } else
  4018. !         fprintf(stderr, "%s failed: Undefined error %d (prospero)", perrno);
  4019. ! #endif
  4020. !     }
  4021. !     /* Warning? */
  4022. !     if (pwarn != PNOWARN) {
  4023. ! #ifdef XARCHIE
  4024. !     if (*p_warn_string)
  4025. !         alert2("Prospero warning: %.100s - %.100s",
  4026. !            p_warn_text[pwarn], p_warn_string);
  4027.       else
  4028. !         alert1("Prospero warning: %.200s",p_warn_text[pwarn]);
  4029.           status0("Ready");
  4030.   #else
  4031. !     if (*p_warn_string)
  4032. !         fprintf(stderr, "%s: Warning! %s - %s\n", progname,
  4033. !         p_warn_text[pwarn], p_warn_string);
  4034.       else
  4035. !         fprintf(stderr, "%s: Warning! %s\n", progname, p_warn_text[pwarn]);
  4036.   #endif
  4037.       }
  4038.   
  4039.       /* Display the results */
  4040.   #ifdef XARCHIE
  4041.       status0("Parsing");
  4042.   #endif
  4043. +     *lasthost = '\001';
  4044. +     *lastpath = '\001';
  4045.       while (l != NULL) {
  4046.       display_link(l,listflag);
  4047.       l = l->next;
  4048. ***************
  4049. *** 229,234 ****
  4050.       }
  4051.   #ifdef XARCHIE
  4052.       displayHosts(db);
  4053. !     status0("Ready");
  4054.   #endif
  4055.   }
  4056. --- 264,269 ----
  4057.       }
  4058.   #ifdef XARCHIE
  4059.       displayHosts(db);
  4060. !     status1("Found %d matches -- Ready",numMatches);
  4061.   #endif
  4062.   }
  4063. *** /tmp/release17219/ptalloc.c    Tue Nov 12 16:55:29 1991
  4064. --- ptalloc.c    Mon Oct 21 12:56:01 1991
  4065. ***************
  4066. *** 51,56 ****
  4067. --- 51,57 ----
  4068.    *    VTFREE takes a pointer to a VTEXT structure and adds it to
  4069.    *    the free list for later reuse.
  4070.    */
  4071. + void
  4072.   ptfree(vt)
  4073.       PTEXT    vt;
  4074.       {
  4075. ***************
  4076. *** 67,72 ****
  4077. --- 68,74 ----
  4078.    *    VTEXT structures.  It is used to free an entrie list of VTEXT
  4079.    *    structures.
  4080.    */
  4081. + void
  4082.   ptlfree(vt)
  4083.       PTEXT    vt;
  4084.       {
  4085. *** /dev/null    Tue Nov 12 16:30:11 1991
  4086. --- rdgram.h    Sat Nov  2 13:31:22 1991
  4087. ***************
  4088. *** 0 ****
  4089. --- 1,16 ----
  4090. + /*
  4091. +  * Copyright (c) 1991 by the University of Washington
  4092. +  *
  4093. +  * For copying and distribution information, please see the file
  4094. +  * <copyright.h>.
  4095. +  */
  4096. + #include <copyright.h>
  4097. + /* Queuing priorities for datagrams */
  4098. + #define           RDGRAM_MAX_PRI   32765  /* Maximum user proiority          */
  4099. + #define           RDGRAM_MAX_SPRI  32767  /* Maximum priority for system use */
  4100. + #define           RDGRAM_MIN_PRI  -32765  /* Maximum user proiority          */
  4101. + #define           RDGRAM_MIN_SPRI -32768  /* Maximum priority for system use */
  4102. + int    rdgram_priority = 0;
  4103. *** /tmp/release17219/regex.c    Tue Nov 12 16:55:46 1991
  4104. --- regex.c    Tue Nov 12 16:50:52 1991
  4105. ***************
  4106. *** 1,74 ****
  4107.   /*
  4108. !  * These routines are from "a pre-release of a bunch of berkelix
  4109. !  * regex(3)/ed(1) compatible regular-expression routines" written by Ozan
  4110. !  * S. Yigit, Dept. of Computer Science, York University.  Parts of the
  4111. !  * code that are not needed by Prospero have been removed, but most of
  4112. !  * the accompanying information has been left intact.  This file is to be
  4113. !  * included on those operating systems that do not support re_comp and
  4114. !  * re_exec.
  4115. !  *
  4116. !  * gf: 12 Sep 1991: Modified so routines aren't static, so we can link with
  4117. !  *                  them instead of including the C code.
  4118.    */
  4119.   
  4120.   /*
  4121. - These routines are completely public domain. You can do whatever you
  4122. - like with them, and hopefully you are professional enough not to strip
  4123. - out the authorship information, acknowledgements and references.
  4124. - The reason for this being a *pre-release* is that I received a lot
  4125. - of useful suggestions about packaging, about additional routines etc.
  4126. - from a few people. I do not have too much time to do those changes
  4127. - right now, so I am putting this package out for those who needed
  4128. - it yesterday. Next release will include other routines, and better
  4129. - packaging.
  4130. - These routines are *not* tested under SysV, but they are tested
  4131. - under PRO/Venix (2.0) and BSD 4.2.
  4132. - In general, these routines run just as fast, or faster than regex library
  4133. - routines under BSD 4.2. In some cases, they are slightly slower. I did not
  4134. - try too hard to optimize the re_exec routine.
  4135. - Coding style is a la K&R, with lotsa short identifiers. I like it
  4136. - that way. All flames should be fed to yetti!dragon.
  4137. - Acknowledgements: Henry Spencer, Hugh Redelmeier and Drew Sullivan made
  4138. -           a lot of important suggestions, some of which will be
  4139. -           incorporated into the next version.
  4140. -  */
  4141. - /*
  4142.    * regex - Regular expression pattern matching
  4143.    *         and replacement
  4144.    *
  4145. !  *
  4146. !  * By:  Ozan S. Yigit (oz)
  4147. !  *      Dept. of Computer Science
  4148.    *      York University
  4149. -  *         [...!utzoo!yetti!oz || oz@yusol.BITNET || oz@yuyetti.BITNET]
  4150.    *
  4151.    * These routines are the PUBLIC DOMAIN equivalents 
  4152.    * of regex routines as found in 4.nBSD UN*X, with minor
  4153.    * extensions.
  4154.    *
  4155. !  * These routines are derived from various implementations
  4156. !  * found in software tools books, and Conroy's grep. They
  4157. !  * are NOT derived from licensed/restricted software.
  4158. !  * For more interesting/academic/complicated implementations,
  4159. !  * see Henry Spencer's regexp routines, or GNU Emacs pattern
  4160. !  * matching module.
  4161.    *
  4162.    * Routines:
  4163.    *      re_comp:        compile a regular expression into
  4164. !  *                      a DFA.
  4165.    *
  4166.    *            char *re_comp(s)
  4167.    *            char *s;
  4168.    *
  4169. !  *      re_exec:        execute the DFA to match a pattern.
  4170.    *
  4171.    *            int re_exec(s)
  4172.    *            char *s;
  4173. --- 1,52 ----
  4174. + #ifdef NOREGEX
  4175.   /*
  4176. !  * These routines are BSD regex(3)/ed(1) compatible regular-expression
  4177. !  * routines written by Ozan S. Yigit, Computer Science, York University.
  4178. !  * Parts of the code that are not needed by Prospero have been removed,
  4179. !  * but most of the accompanying information has been left intact. 
  4180. !  * This file is to be included on those operating systems that do not
  4181. !  * support re_comp and re_exec.
  4182.    */
  4183.   
  4184.   /*
  4185.    * regex - Regular expression pattern matching
  4186.    *         and replacement
  4187.    *
  4188. !  * by:  Ozan S. Yigit (oz@nexus.yorku.ca)
  4189. !  *    Dept. of Computing Services
  4190.    *      York University
  4191.    *
  4192.    * These routines are the PUBLIC DOMAIN equivalents 
  4193.    * of regex routines as found in 4.nBSD UN*X, with minor
  4194.    * extensions.
  4195.    *
  4196. !  * Modification history:
  4197.    *
  4198. +  * Log:    regex.c,v
  4199. +  * Revision 1.3  89/04/01  14:18:09  oz
  4200. +  * Change all references to a dfa: this is actually an nfa.
  4201. +  * 
  4202. +  * Revision 1.2  88/08/28  15:36:04  oz
  4203. +  * Use a complement bitmap to represent NCL.
  4204. +  * This removes the need to have seperate 
  4205. +  * code in the pmatch case block - it is 
  4206. +  * just CCL code now.
  4207. +  * 
  4208. +  * Use the actual CCL code in the CLO
  4209. +  * section of pmatch. No need for a recursive
  4210. +  * pmatch call.
  4211. +  * 
  4212. +  * Use a bitmap table to set char bits in an
  4213. +  * 8-bit chunk.
  4214. +  * 
  4215.    * Routines:
  4216.    *      re_comp:        compile a regular expression into
  4217. !  *                      a NFA.
  4218.    *
  4219.    *            char *re_comp(s)
  4220.    *            char *s;
  4221.    *
  4222. !  *      re_exec:        execute the NFA to match a pattern.
  4223.    *
  4224.    *            int re_exec(s)
  4225.    *            char *s;
  4226. ***************
  4227. *** 91,102 ****
  4228.    *
  4229.    *      [4]     [set]   matches one of the characters in the set.
  4230.    *                      If the first character in the set is "^",
  4231. !  *                      it matches a character NOT in the set. A
  4232. !  *                      shorthand S-E is used to specify a set of
  4233. !  *                      characters S upto E, inclusive. The special
  4234. !  *                      characters "]" and "-" have no special
  4235. !  *                      meaning if they appear as the first chars
  4236. !  *                      in the set.
  4237.    *                      examples:        match:
  4238.    *
  4239.    *                              [a-z]    any lowercase alpha
  4240. --- 69,80 ----
  4241.    *
  4242.    *      [4]     [set]   matches one of the characters in the set.
  4243.    *                      If the first character in the set is "^",
  4244. !  *                      it matches a character NOT in the set, i.e. 
  4245. !  *            complements the set. A shorthand S-E is 
  4246. !  *            used to specify a set of characters S upto 
  4247. !  *            E, inclusive. The special characters "]" and 
  4248. !  *            "-" have no special meaning if they appear 
  4249. !  *            as the first chars in the set.
  4250.    *                      examples:        match:
  4251.    *
  4252.    *                              [a-z]    any lowercase alpha
  4253. ***************
  4254. *** 155,168 ****
  4255.    *              Grep [rsx-11 C dist]            David Conroy
  4256.    *        ed - text editor        Un*x Programmer's Manual
  4257.    *        Advanced editing on Un*x    B. W. Kernighan
  4258. !  *        RegExp routines            Henry Spencer
  4259.    *
  4260.    * Notes:
  4261.    *
  4262.    *    This implementation uses a bit-set representation for character
  4263.    *    classes for speed and compactness. Each character is represented 
  4264. !  *    by one bit in a 128-bit block. Thus, CCL or NCL always takes a 
  4265. !  *    constant 16 bytes in the internal dfa, and re_exec does a single
  4266.    *    bit comparison to locate the character in the set.
  4267.    *
  4268.    * Examples:
  4269. --- 133,146 ----
  4270.    *              Grep [rsx-11 C dist]            David Conroy
  4271.    *        ed - text editor        Un*x Programmer's Manual
  4272.    *        Advanced editing on Un*x    B. W. Kernighan
  4273. !  *        regexp routines            Henry Spencer
  4274.    *
  4275.    * Notes:
  4276.    *
  4277.    *    This implementation uses a bit-set representation for character
  4278.    *    classes for speed and compactness. Each character is represented 
  4279. !  *    by one bit in a 128-bit block. Thus, CCL always takes a 
  4280. !  *    constant 16 bytes in the internal nfa, and re_exec does a single
  4281.    *    bit comparison to locate the character in the set.
  4282.    *
  4283.    * Examples:
  4284. ***************
  4285. *** 172,178 ****
  4286.    *    matches:    fo foo fooo foobar fobar foxx ...
  4287.    *
  4288.    *    pattern:    fo[ob]a[rz]    
  4289. !  *    compile:    CHR f CHR o CCL 2 o b CHR a CCL bitset END
  4290.    *    matches:    fobar fooar fobaz fooaz
  4291.    *
  4292.    *    pattern:    foo\\+
  4293. --- 150,156 ----
  4294.    *    matches:    fo foo fooo foobar fobar foxx ...
  4295.    *
  4296.    *    pattern:    fo[ob]a[rz]    
  4297. !  *    compile:    CHR f CHR o CCL bitset CHR a CCL bitset END
  4298.    *    matches:    fobar fooar fobaz fooaz
  4299.    *
  4300.    *    pattern:    foo\\+
  4301. ***************
  4302. *** 189,195 ****
  4303.    * 
  4304.    */
  4305.   
  4306. ! #define MAXDFA  1024
  4307.   #define MAXTAG  10
  4308.   
  4309.   #define OKP     1
  4310. --- 167,173 ----
  4311.    * 
  4312.    */
  4313.   
  4314. ! #define MAXNFA  1024
  4315.   #define MAXTAG  10
  4316.   
  4317.   #define OKP     1
  4318. ***************
  4319. *** 198,218 ****
  4320.   #define CHR     1
  4321.   #define ANY     2
  4322.   #define CCL     3
  4323. ! #define NCL     4
  4324. ! #define BOL     5
  4325. ! #define EOL     6
  4326. ! #define BOT     7
  4327. ! #define EOT     8
  4328. ! #define BOW    9
  4329. ! #define EOW    10
  4330. ! #define REF     11
  4331. ! #define CLO     12
  4332.   
  4333.   #define END     0
  4334.   
  4335.   /*
  4336.    * The following defines are not meant
  4337. !  * to be changeable. They are for readibility
  4338.    * only.
  4339.    *
  4340.    */
  4341. --- 176,195 ----
  4342.   #define CHR     1
  4343.   #define ANY     2
  4344.   #define CCL     3
  4345. ! #define BOL     4
  4346. ! #define EOL     5
  4347. ! #define BOT     6
  4348. ! #define EOT     7
  4349. ! #define BOW    8
  4350. ! #define EOW    9
  4351. ! #define REF     10
  4352. ! #define CLO     11
  4353.   
  4354.   #define END     0
  4355.   
  4356.   /*
  4357.    * The following defines are not meant
  4358. !  * to be changeable. They are for readability
  4359.    * only.
  4360.    *
  4361.    */
  4362. ***************
  4363. *** 227,243 ****
  4364.   typedef /*unsigned*/ char CHAR;
  4365.   
  4366.   static int  tagstk[MAXTAG];             /* subpat tag stack..*/
  4367. ! static CHAR dfa[MAXDFA];        /* automaton..       */
  4368.   static int  sta = NOP;                   /* status of lastpat */
  4369.   
  4370.   static CHAR bittab[BITBLK];        /* bit table for CCL */
  4371.   
  4372. ! static int  internal_error;
  4373.   
  4374.   static void
  4375. ! chset(c) register CHAR c; { bittab[((c)&BLKIND)>>3] |= 1<<((c)&BITIND); }
  4376.   
  4377. ! #define badpat(x)    return(*dfa = END, x)
  4378.   #define store(x)    *mp++ = x
  4379.    
  4380.   char *     
  4381. --- 204,226 ----
  4382.   typedef /*unsigned*/ char CHAR;
  4383.   
  4384.   static int  tagstk[MAXTAG];             /* subpat tag stack..*/
  4385. ! static CHAR nfa[MAXNFA];        /* automaton..       */
  4386.   static int  sta = NOP;                   /* status of lastpat */
  4387.   
  4388.   static CHAR bittab[BITBLK];        /* bit table for CCL */
  4389. +                     /* pre-set bits...   */
  4390. + static CHAR bitarr[] = {1,2,4,8,16,32,64,128};
  4391.   
  4392. ! static int internal_error;
  4393.   
  4394.   static void
  4395. ! chset(c)
  4396. ! register CHAR c;
  4397. ! {
  4398. !     bittab[((c) & BLKIND) >> 3] |= bitarr[(c) & BITIND];
  4399. ! }
  4400.   
  4401. ! #define badpat(x)    return (*nfa = END, x)
  4402.   #define store(x)    *mp++ = x
  4403.    
  4404.   char *     
  4405. ***************
  4406. *** 245,265 ****
  4407.   char *pat;
  4408.   {
  4409.       register char *p;               /* pattern pointer   */
  4410. !     register CHAR *mp=dfa;          /* dfa pointer       */
  4411.       register CHAR *lp;              /* saved pointer..   */
  4412. !     register CHAR *sp=dfa;          /* another one..     */
  4413.   
  4414.       register int tagi = 0;          /* tag stack index   */
  4415.       register int tagc = 1;          /* actual tag count  */
  4416.   
  4417.       register int n;
  4418.       int c1, c2;
  4419.           
  4420. -     internal_error = 0;
  4421.       if (!pat || !*pat)
  4422.           if (sta)
  4423. !             return(0);
  4424.           else
  4425.               badpat("No previous regular expression");
  4426.       sta = NOP;
  4427. --- 228,247 ----
  4428.   char *pat;
  4429.   {
  4430.       register char *p;               /* pattern pointer   */
  4431. !     register CHAR *mp = nfa;        /* nfa pointer       */
  4432.       register CHAR *lp;              /* saved pointer..   */
  4433. !     register CHAR *sp = nfa;        /* another one..     */
  4434.   
  4435.       register int tagi = 0;          /* tag stack index   */
  4436.       register int tagc = 1;          /* actual tag count  */
  4437.   
  4438.       register int n;
  4439. +     register CHAR mask;        /* xor mask -CCL/NCL */
  4440.       int c1, c2;
  4441.           
  4442.       if (!pat || !*pat)
  4443.           if (sta)
  4444. !             return 0;
  4445.           else
  4446.               badpat("No previous regular expression");
  4447.       sta = NOP;
  4448. ***************
  4449. *** 291,303 ****
  4450.               break;
  4451.   
  4452.           case '[':               /* match char class..*/
  4453.   
  4454.               if (*++p == '^') {
  4455. !                 store(NCL);
  4456.                   p++;
  4457.               }
  4458.               else
  4459. !                 store(CCL);
  4460.   
  4461.               if (*p == '-')        /* real dash */
  4462.                   chset(*p++);
  4463. --- 273,286 ----
  4464.               break;
  4465.   
  4466.           case '[':               /* match char class..*/
  4467. +             store(CCL);
  4468.   
  4469.               if (*++p == '^') {
  4470. !                 mask = 0377;    
  4471.                   p++;
  4472.               }
  4473.               else
  4474. !                 mask = 0;
  4475.   
  4476.               if (*p == '-')        /* real dash */
  4477.                   chset(*p++);
  4478. ***************
  4479. *** 324,330 ****
  4480.                   badpat("Missing ]");
  4481.   
  4482.               for (n = 0; n < BITBLK; bittab[n++] = (char) 0)
  4483. !                 store(bittab[n]);
  4484.       
  4485.               break;
  4486.   
  4487. --- 307,313 ----
  4488.                   badpat("Missing ]");
  4489.   
  4490.               for (n = 0; n < BITBLK; bittab[n++] = (char) 0)
  4491. !                 store(mask ^ bittab[n]);
  4492.       
  4493.               break;
  4494.   
  4495. ***************
  4496. *** 332,339 ****
  4497.           case '+':               /* match 1 or more.. */
  4498.               if (p == pat)
  4499.                   badpat("Empty closure");
  4500. !             lp = sp;                /* previous opcode */
  4501. !             if (*lp == CLO)         /* equivalence..   */
  4502.                   break;
  4503.               switch(*lp) {
  4504.   
  4505. --- 315,322 ----
  4506.           case '+':               /* match 1 or more.. */
  4507.               if (p == pat)
  4508.                   badpat("Empty closure");
  4509. !             lp = sp;        /* previous opcode */
  4510. !             if (*lp == CLO)        /* equivalence..   */
  4511.                   break;
  4512.               switch(*lp) {
  4513.   
  4514. ***************
  4515. *** 449,455 ****
  4516.           badpat("Unmatched \\(");
  4517.       store(END);
  4518.       sta = OKP;
  4519. !     return(0);
  4520.   }
  4521.   
  4522.   
  4523. --- 432,438 ----
  4524.           badpat("Unmatched \\(");
  4525.       store(END);
  4526.       sta = OKP;
  4527. !     return 0;
  4528.   }
  4529.   
  4530.   
  4531. ***************
  4532. *** 456,469 ****
  4533.   static char *bol;
  4534.   static char *bopat[MAXTAG];
  4535.   static char *eopat[MAXTAG];
  4536.   char *pmatch();
  4537.   
  4538.   /*
  4539.    * re_exec:
  4540. !  *     execute dfa to find a match.
  4541.    *
  4542. !  *    special cases: (dfa[0])    
  4543.    *        BOL
  4544.    *            Match only once, starting from the
  4545.    *            beginning.
  4546. --- 439,451 ----
  4547.   static char *bol;
  4548.   static char *bopat[MAXTAG];
  4549.   static char *eopat[MAXTAG];
  4550.   char *pmatch();
  4551.   
  4552.   /*
  4553.    * re_exec:
  4554. !  *     execute nfa to find a match.
  4555.    *
  4556. !  *    special cases: (nfa[0])    
  4557.    *        BOL
  4558.    *            Match only once, starting from the
  4559.    *            beginning.
  4560. ***************
  4561. *** 487,493 ****
  4562.   {
  4563.       register char c;
  4564.       register char *ep = 0;
  4565. !     register CHAR *ap = dfa;
  4566.   
  4567.       bol = lp;
  4568.   
  4569. --- 469,475 ----
  4570.   {
  4571.       register char c;
  4572.       register char *ep = 0;
  4573. !     register CHAR *ap = nfa;
  4574.   
  4575.       bol = lp;
  4576.   
  4577. ***************
  4578. *** 512,518 ****
  4579.           while (*lp && *lp != c)
  4580.               lp++;
  4581.           if (!*lp)        /* if EOS, fail, else fall thru. */
  4582. !             return(0);
  4583.       default:            /* regular matching all the way. */
  4584.           while (*lp) {
  4585.               if ((ep = pmatch(lp,ap)))
  4586. --- 494,500 ----
  4587.           while (*lp && *lp != c)
  4588.               lp++;
  4589.           if (!*lp)        /* if EOS, fail, else fall thru. */
  4590. !             return 0;
  4591.       default:            /* regular matching all the way. */
  4592.           while (*lp) {
  4593.               if ((ep = pmatch(lp,ap)))
  4594. ***************
  4595. *** 521,537 ****
  4596.           }
  4597.           break;
  4598.       case END:            /* munged automaton. fail always */
  4599. !         return(0);
  4600.       }
  4601.       if (!ep)
  4602. !         return(0);
  4603.   
  4604. !     if (internal_error) 
  4605. !         return(-1);
  4606.   
  4607.       bopat[0] = lp;
  4608.       eopat[0] = ep;
  4609. !     return(1);
  4610.   }
  4611.   
  4612.   /* 
  4613. --- 503,519 ----
  4614.           }
  4615.           break;
  4616.       case END:            /* munged automaton. fail always */
  4617. !         return 0;
  4618.       }
  4619.       if (!ep)
  4620. !         return 0;
  4621.   
  4622. !     if (internal_error)
  4623. !         return -1;
  4624.   
  4625.       bopat[0] = lp;
  4626.       eopat[0] = ep;
  4627. !     return 1;
  4628.   }
  4629.   
  4630.   /* 
  4631. ***************
  4632. *** 542,548 ****
  4633.    *     grep written by David Conroy. The backref and
  4634.    *     tag stuff, and various other mods are by oZ.
  4635.    *
  4636. !  *    special cases: (dfa[n], dfa[n+1])
  4637.    *        CLO ANY
  4638.    *            We KNOW ".*" will match ANYTHING
  4639.    *            upto the end of line. Thus, go to
  4640. --- 524,530 ----
  4641.    *     grep written by David Conroy. The backref and
  4642.    *     tag stuff, and various other mods are by oZ.
  4643.    *
  4644. !  *    special cases: (nfa[n], nfa[n+1])
  4645.    *        CLO ANY
  4646.    *            We KNOW ".*" will match ANYTHING
  4647.    *            upto the end of line. Thus, go to
  4648. ***************
  4649. *** 559,565 ****
  4650.    *            We can again scan the string forward
  4651.    *            for the single char without recursion, 
  4652.    *            and at the point of failure, we execute 
  4653. !  *            the remaining dfa recursively, as
  4654.    *            described above.
  4655.    *
  4656.    *    At the end of a successful match, bopat[n] and eopat[n]
  4657. --- 541,547 ----
  4658.    *            We can again scan the string forward
  4659.    *            for the single char without recursion, 
  4660.    *            and at the point of failure, we execute 
  4661. !  *            the remaining nfa recursively, as
  4662.    *            described above.
  4663.    *
  4664.    *    At the end of a successful match, bopat[n] and eopat[n]
  4665. ***************
  4666. *** 568,574 ****
  4667.    *
  4668.    */
  4669.   
  4670.   /*
  4671.    * character classification table for word boundary
  4672.    * operators BOW and EOW. the reason for not using 
  4673. --- 550,555 ----
  4674. ***************
  4675. *** 597,603 ****
  4676.   
  4677.   #define inascii(x)    (0177&(x))
  4678.   #define iswordc(x)     chrtyp[inascii(x)]
  4679. ! #define isinset(x,y)     ((x)[((y)&BLKIND)>>3] & (1<<((y)&BITIND)))
  4680.   
  4681.   /*
  4682.    * skip values for CLO XXX to skip past the closure
  4683. --- 578,584 ----
  4684.   
  4685.   #define inascii(x)    (0177&(x))
  4686.   #define iswordc(x)     chrtyp[inascii(x)]
  4687. ! #define isinset(x,y)     ((x)[((y)&BLKIND)>>3] & bitarr[(y)&BITIND])
  4688.   
  4689.   /*
  4690.    * skip values for CLO XXX to skip past the closure
  4691. ***************
  4692. *** 604,612 ****
  4693.    *
  4694.    */
  4695.   
  4696. ! #define ANYSKIP    2     /* CLO ANY END ...       */
  4697. ! #define CHRSKIP    3    /* CLO CHR chr END ...       */
  4698. ! #define CCLSKIP 18    /* CLO CCL 16bytes END ... */
  4699.   
  4700.   static char *
  4701.   pmatch(lp, ap)
  4702. --- 585,593 ----
  4703.    *
  4704.    */
  4705.   
  4706. ! #define ANYSKIP    2     /* [CLO] ANY END ...         */
  4707. ! #define CHRSKIP    3    /* [CLO] CHR chr END ...     */
  4708. ! #define CCLSKIP 18    /* [CLO] CCL 16bytes END ... */
  4709.   
  4710.   static char *
  4711.   pmatch(lp, ap)
  4712. ***************
  4713. *** 613,622 ****
  4714.   register char *lp;
  4715.   register CHAR *ap;
  4716.   {
  4717.       register char *e;        /* extra pointer for CLO */
  4718.       register char *bp;        /* beginning of subpat.. */
  4719.       register char *ep;        /* ending of subpat..     */
  4720. -     register int op, c, n;
  4721.       char *are;            /* to save the line ptr. */
  4722.   
  4723.       while ((op = *ap++) != END)
  4724. --- 594,603 ----
  4725.   register char *lp;
  4726.   register CHAR *ap;
  4727.   {
  4728. +     register int op, c, n;
  4729.       register char *e;        /* extra pointer for CLO */
  4730.       register char *bp;        /* beginning of subpat.. */
  4731.       register char *ep;        /* ending of subpat..     */
  4732.       char *are;            /* to save the line ptr. */
  4733.   
  4734.       while ((op = *ap++) != END)
  4735. ***************
  4736. *** 624,654 ****
  4737.   
  4738.           case CHR:
  4739.               if (*lp++ != *ap++)
  4740. !                 return(0);
  4741.               break;
  4742.           case ANY:
  4743.               if (!*lp++)
  4744. !                 return(0);
  4745.               break;
  4746.           case CCL:
  4747.               c = *lp++;
  4748.               if (!isinset(ap,c))
  4749. !                 return(0);
  4750.               ap += BITBLK;
  4751.               break;
  4752. -         case NCL:
  4753. -             c = *lp++;
  4754. -             if (isinset(ap,c))
  4755. -                 return(0);
  4756. -             ap += BITBLK;
  4757. -             break;
  4758.           case BOL:
  4759.               if (lp != bol)
  4760. !                 return(0);
  4761.               break;
  4762.           case EOL:
  4763.               if (*lp)
  4764. !                 return(0);
  4765.               break;
  4766.           case BOT:
  4767.               bopat[*ap++] = lp;
  4768. --- 605,629 ----
  4769.   
  4770.           case CHR:
  4771.               if (*lp++ != *ap++)
  4772. !                 return 0;
  4773.               break;
  4774.           case ANY:
  4775.               if (!*lp++)
  4776. !                 return 0;
  4777.               break;
  4778.           case CCL:
  4779.               c = *lp++;
  4780.               if (!isinset(ap,c))
  4781. !                 return 0;
  4782.               ap += BITBLK;
  4783.               break;
  4784.           case BOL:
  4785.               if (lp != bol)
  4786. !                 return 0;
  4787.               break;
  4788.           case EOL:
  4789.               if (*lp)
  4790. !                 return 0;
  4791.               break;
  4792.           case BOT:
  4793.               bopat[*ap++] = lp;
  4794. ***************
  4795. *** 657,669 ****
  4796.               eopat[*ap++] = lp;
  4797.               break;
  4798.            case BOW:
  4799. !             if (!(lp!=bol && iswordc(lp[-1])) && iswordc(*lp))
  4800. !                 break;
  4801. !             return(0);
  4802.           case EOW:
  4803. !             if ((lp!=bol && iswordc(lp[-1])) && !iswordc(*lp))
  4804. !                 break;
  4805. !             return(0);
  4806.           case REF:
  4807.               n = *ap++;
  4808.               bp = bopat[n];
  4809. --- 632,644 ----
  4810.               eopat[*ap++] = lp;
  4811.               break;
  4812.            case BOW:
  4813. !             if (lp!=bol && iswordc(lp[-1]) || !iswordc(*lp))
  4814. !                 return 0;
  4815. !             break;
  4816.           case EOW:
  4817. !             if (lp==bol || !iswordc(lp[-1]) || iswordc(*lp))
  4818. !                 return 0;
  4819. !             break;
  4820.           case REF:
  4821.               n = *ap++;
  4822.               bp = bopat[n];
  4823. ***************
  4824. *** 670,676 ****
  4825.               ep = eopat[n];
  4826.               while (bp < ep)
  4827.                   if (*bp++ != *lp++)
  4828. !                     return(0);
  4829.               break;
  4830.           case CLO:
  4831.               are = lp;
  4832. --- 645,651 ----
  4833.               ep = eopat[n];
  4834.               while (bp < ep)
  4835.                   if (*bp++ != *lp++)
  4836. !                     return 0;
  4837.               break;
  4838.           case CLO:
  4839.               are = lp;
  4840. ***************
  4841. *** 688,701 ****
  4842.                   n = CHRSKIP;
  4843.                   break;
  4844.               case CCL:
  4845. !             case NCL:
  4846. !                 while (*lp && (e = pmatch(lp, ap)))
  4847. !                     lp = e;
  4848.                   n = CCLSKIP;
  4849.                   break;
  4850.               default:
  4851.                   internal_error++;
  4852. !                 return(0);
  4853.               }
  4854.   
  4855.               ap += n;
  4856. --- 663,675 ----
  4857.                   n = CHRSKIP;
  4858.                   break;
  4859.               case CCL:
  4860. !                 while ((c = *lp) && isinset(ap+1,c))
  4861. !                     lp++;
  4862.                   n = CCLSKIP;
  4863.                   break;
  4864.               default:
  4865.                   internal_error++;
  4866. !                 return 0;
  4867.               }
  4868.   
  4869.               ap += n;
  4870. ***************
  4871. *** 702,716 ****
  4872.   
  4873.               while (lp >= are) {
  4874.                   if (e = pmatch(lp, ap))
  4875. !                     return(e);
  4876.                   --lp;
  4877.               }
  4878. !             return(0);
  4879.           default:
  4880.               internal_error++;
  4881. !             return(0);
  4882.           }
  4883. !     return(lp);
  4884.   }
  4885. --- 676,689 ----
  4886.   
  4887.               while (lp >= are) {
  4888.                   if (e = pmatch(lp, ap))
  4889. !                     return e;
  4890.                   --lp;
  4891.               }
  4892. !             return 0;
  4893.           default:
  4894.               internal_error++;
  4895. !             return 0;
  4896.           }
  4897. !     return lp;
  4898.   }
  4899. ! #endif /* Need regex libraries? Compile to nothing if not.  */
  4900. *** /tmp/release17219/regex.h    Tue Nov 12 16:55:51 1991
  4901. --- regex.h    Mon Oct 21 12:57:03 1991
  4902. ***************
  4903. *** 9,13 ****
  4904. --- 9,20 ----
  4905.    * George Ferguson, ferguson@cs.rochester.edu, 11 Sep 1991.
  4906.    */
  4907.   
  4908. + #ifdef AUX
  4909. + extern char *regcmp();
  4910. + extern char *regex();
  4911. + #define re_comp regcmp
  4912. + #define re_exec regex
  4913. + #else
  4914.   extern char *re_comp();
  4915.   extern int re_exec();
  4916. + #endif
  4917. *** /tmp/release17219/settings.c    Tue Nov 12 16:55:54 1991
  4918. --- settings.c    Tue Oct 22 09:03:25 1991
  4919. ***************
  4920. *** 1,7 ****
  4921.   /*
  4922.    * settings.c : Set program parameters on a popup panel
  4923.    *
  4924. !  * George Ferguson, ferguson@cs.rochester.edu, 12 Sep 1991.
  4925.    *
  4926.    */
  4927.   #include <stdio.h>
  4928. --- 1,7 ----
  4929.   /*
  4930.    * settings.c : Set program parameters on a popup panel
  4931.    *
  4932. !  * George Ferguson, ferguson@cs.rochester.edu, 22 Oct 1991.
  4933.    *
  4934.    */
  4935.   #include <stdio.h>
  4936. ***************
  4937. *** 17,22 ****
  4938. --- 17,23 ----
  4939.   #include "xarchie.h"
  4940.   #include "types.h"
  4941.   #include "appres.h"
  4942. + #include "rdgram.h"
  4943.   #include "alert.h"
  4944.   #include "confirm.h"
  4945.   
  4946. ***************
  4947. *** 23,29 ****
  4948.   /*
  4949.    * Functions declared in this file
  4950.    */
  4951. ! void settingsAction();
  4952.   void applySettingsAction(),defaultSettingsAction(),doneSettingsAction();
  4953.   void setSearchTypeAction(),setSortTypeAction();
  4954.   void setHostAction(),setNiceLevelAction();
  4955. --- 24,30 ----
  4956.   /*
  4957.    * Functions declared in this file
  4958.    */
  4959. ! void settingsAction(),initSettingsDefaults();
  4960.   void applySettingsAction(),defaultSettingsAction(),doneSettingsAction();
  4961.   void setSearchTypeAction(),setSortTypeAction();
  4962.   void setHostAction(),setNiceLevelAction();
  4963. ***************
  4964. *** 42,48 ****
  4965.   static Widget applyButton;
  4966.   static Widget searchLabel;
  4967.   static Widget sortLabel;
  4968. ! static Widget hostText;
  4969.   static Widget maxHitsText;
  4970.   static Widget timeoutText;
  4971.   static Widget retriesText;
  4972. --- 43,49 ----
  4973.   static Widget applyButton;
  4974.   static Widget searchLabel;
  4975.   static Widget sortLabel;
  4976. ! static Widget setHostText;
  4977.   static Widget maxHitsText;
  4978.   static Widget timeoutText;
  4979.   static Widget retriesText;
  4980. ***************
  4981. *** 49,58 ****
  4982.   static Widget niceText;
  4983.   static Widget ftpDirText,ftpTypeText;
  4984.   
  4985. ! static SearchType currentSearchType;
  4986. ! static SortType currentSortType;
  4987.   static Boolean settingsChanged,isPoppedUp;
  4988.   
  4989.   #define ACTION_PROC(NAME)    void NAME(w,event,params,num_params) \
  4990.                       Widget w; \
  4991.                       XEvent *event; \
  4992. --- 50,62 ----
  4993.   static Widget niceText;
  4994.   static Widget ftpDirText,ftpTypeText;
  4995.   
  4996. ! static SearchType currentSearchType,defSearchType;
  4997. ! static SortType currentSortType,defSortType;
  4998. ! static char *defArchieHost,*defFtpDir,*defFtpType;
  4999. ! static int defMaxHits,defTimeout,defRetries,defNiceLevel;
  5000.   static Boolean settingsChanged,isPoppedUp;
  5001.   
  5002.   #define ACTION_PROC(NAME)    void NAME(w,event,params,num_params) \
  5003.                       Widget w; \
  5004.                       XEvent *event; \
  5005. ***************
  5006. *** 69,76 ****
  5007.   /*ARGSUSED*/
  5008.   ACTION_PROC(settingsAction)
  5009.   {
  5010. !     if (settingsShell == NULL)
  5011.       initSettingsShell();
  5012.       if (isPoppedUp) {
  5013.       XRaiseWindow(display,XtWindow(settingsShell));
  5014.       } else {
  5015. --- 73,82 ----
  5016.   /*ARGSUSED*/
  5017.   ACTION_PROC(settingsAction)
  5018.   {
  5019. !     if (settingsShell == NULL) {
  5020.       initSettingsShell();
  5021. +     initSettingsDefaults();
  5022. +     }
  5023.       if (isPoppedUp) {
  5024.       XRaiseWindow(display,XtWindow(settingsShell));
  5025.       } else {
  5026. ***************
  5027. *** 97,103 ****
  5028.       applyButton = XtNameToWidget(toplevel,"settingsShell*applyButton");
  5029.       searchLabel = XtNameToWidget(toplevel,"settingsShell*searchLabel");
  5030.       sortLabel = XtNameToWidget(toplevel,"settingsShell*sortLabel");
  5031. !     hostText = XtNameToWidget(toplevel,"settingsShell*hostText");
  5032.       maxHitsText = XtNameToWidget(toplevel,"settingsShell*maxHitsText");
  5033.       timeoutText = XtNameToWidget(toplevel,"settingsShell*timeoutText");
  5034.       retriesText = XtNameToWidget(toplevel,"settingsShell*retriesText");
  5035. --- 103,109 ----
  5036.       applyButton = XtNameToWidget(toplevel,"settingsShell*applyButton");
  5037.       searchLabel = XtNameToWidget(toplevel,"settingsShell*searchLabel");
  5038.       sortLabel = XtNameToWidget(toplevel,"settingsShell*sortLabel");
  5039. !     setHostText = XtNameToWidget(toplevel,"settingsShell*setHostText");
  5040.       maxHitsText = XtNameToWidget(toplevel,"settingsShell*maxHitsText");
  5041.       timeoutText = XtNameToWidget(toplevel,"settingsShell*timeoutText");
  5042.       retriesText = XtNameToWidget(toplevel,"settingsShell*retriesText");
  5043. ***************
  5044. *** 105,111 ****
  5045.       ftpDirText = XtNameToWidget(toplevel,"settingsShell*ftpDirText");
  5046.       ftpTypeText = XtNameToWidget(toplevel,"settingsShell*ftpTypeText");
  5047.       /* add event handler for detecting changes */
  5048. !     addTextEventHandler(hostText);
  5049.       addTextEventHandler(maxHitsText);
  5050.       addTextEventHandler(timeoutText);
  5051.       addTextEventHandler(retriesText);
  5052. --- 111,117 ----
  5053.       ftpDirText = XtNameToWidget(toplevel,"settingsShell*ftpDirText");
  5054.       ftpTypeText = XtNameToWidget(toplevel,"settingsShell*ftpTypeText");
  5055.       /* add event handler for detecting changes */
  5056. !     addTextEventHandler(setHostText);
  5057.       addTextEventHandler(maxHitsText);
  5058.       addTextEventHandler(timeoutText);
  5059.       addTextEventHandler(retriesText);
  5060. ***************
  5061. *** 125,130 ****
  5062. --- 131,155 ----
  5063.   
  5064.   /*    -    -    -    -    -    -    -    -    */
  5065.   /*
  5066. +  * initSettingsDefaults() : Stores away the values of the application
  5067. +  *    resources at startup for use by the default-settings() action.
  5068. +  */
  5069. + void
  5070. + initSettingsDefaults()
  5071. + {
  5072. +     defSearchType = appResources.searchType;
  5073. +     defSortType = appResources.sortType;
  5074. +     defArchieHost = XtNewString(appResources.archieHost);
  5075. +     defMaxHits = appResources.maxHits;
  5076. +     defTimeout = appResources.timeout;
  5077. +     defRetries = appResources.retries;
  5078. +     defNiceLevel = appResources.niceLevel;
  5079. +     defFtpDir = XtNewString(appResources.ftpDir);
  5080. +     defFtpType = XtNewString(appResources.ftpType);
  5081. + }
  5082. + /*    -    -    -    -    -    -    -    -    */
  5083. + /*
  5084.    * initSettingsItems() : Sets the values in the settings editor from the
  5085.    *    current state of the application resources.
  5086.    */
  5087. ***************
  5088. *** 135,144 ****
  5089.   
  5090.       setCurrentSearchType(appResources.searchType);
  5091.       setCurrentSortType(appResources.sortType);
  5092. !     setText(hostText,appResources.archieHost);
  5093.       sprintf(buf,"%d",appResources.maxHits);
  5094.       setText(maxHitsText,buf);
  5095. -     setText(hostText,appResources.archieHost);
  5096.       sprintf(buf,"%d",appResources.timeout);
  5097.       setText(timeoutText,buf);
  5098.       sprintf(buf,"%d",appResources.retries);
  5099. --- 160,168 ----
  5100.   
  5101.       setCurrentSearchType(appResources.searchType);
  5102.       setCurrentSortType(appResources.sortType);
  5103. !     setText(setHostText,appResources.archieHost);
  5104.       sprintf(buf,"%d",appResources.maxHits);
  5105.       setText(maxHitsText,buf);
  5106.       sprintf(buf,"%d",appResources.timeout);
  5107.       setText(timeoutText,buf);
  5108.       sprintf(buf,"%d",appResources.retries);
  5109. ***************
  5110. *** 166,174 ****
  5111.   
  5112.       appResources.searchType = currentSearchType;
  5113.       appResources.sortType = currentSortType;
  5114. !     if (hostText != NULL) {
  5115.       XtSetArg(args[0],XtNstring,&s);
  5116. !     XtGetValues(hostText,args,ONE);
  5117.       if (strcmp(appResources.archieHost,s) != 0)
  5118.           appResources.archieHost = XtNewString(s); /* memory leak */
  5119.       }
  5120. --- 190,198 ----
  5121.   
  5122.       appResources.searchType = currentSearchType;
  5123.       appResources.sortType = currentSortType;
  5124. !     if (setHostText != NULL) {
  5125.       XtSetArg(args[0],XtNstring,&s);
  5126. !     XtGetValues(setHostText,args,ONE);
  5127.       if (strcmp(appResources.archieHost,s) != 0)
  5128.           appResources.archieHost = XtNewString(s); /* memory leak */
  5129.       }
  5130. ***************
  5131. *** 191,200 ****
  5132.       XtSetArg(args[0],XtNstring,&s);
  5133.       XtGetValues(niceText,args,ONE);
  5134.       n = atoi(s);
  5135. !     if (n < -32765)        /* leave -32766 to -32768 alone */
  5136. !         n = -32765;
  5137. !     else if (n > 32767)
  5138. !         n = 32767;
  5139.       appResources.niceLevel = n;
  5140.       }
  5141.       if (ftpDirText != NULL) {
  5142. --- 215,224 ----
  5143.       XtSetArg(args[0],XtNstring,&s);
  5144.       XtGetValues(niceText,args,ONE);
  5145.       n = atoi(s);
  5146. !     if (n < RDGRAM_MIN_PRI)        /* leave -32766 to -32768 alone */
  5147. !         n = RDGRAM_MIN_PRI;
  5148. !     else if (n > RDGRAM_MAX_SPRI)
  5149. !         n = RDGRAM_MAX_PRI;
  5150.       appResources.niceLevel = n;
  5151.       }
  5152.       if (ftpDirText != NULL) {
  5153. ***************
  5154. *** 219,233 ****
  5155.   /*ARGSUSED*/
  5156.   ACTION_PROC(defaultSettingsAction)
  5157.   {
  5158. !     setCurrentSearchType(GfExact);
  5159. !     setCurrentSortType(GfDefault);
  5160. !     setText(hostText,"archie.mcgill.ca");
  5161. !     setText(maxHitsText,"99");
  5162. !     setText(timeoutText,"4");
  5163. !     setText(retriesText,"3");
  5164. !     setText(niceText,"0");
  5165. !     setText(ftpDirText,".");
  5166. !     setText(ftpTypeText,"binary");
  5167.       setChangedFlag(True);
  5168.   }
  5169.   
  5170. --- 243,263 ----
  5171.   /*ARGSUSED*/
  5172.   ACTION_PROC(defaultSettingsAction)
  5173.   {
  5174. !     char buf[8];
  5175. !     setCurrentSearchType(defSearchType);
  5176. !     setCurrentSortType(defSortType);
  5177. !     setText(setHostText,defArchieHost);
  5178. !     sprintf(buf,"%d",defMaxHits);
  5179. !     setText(maxHitsText,buf);
  5180. !     sprintf(buf,"%d",defTimeout);
  5181. !     setText(timeoutText,buf);
  5182. !     sprintf(buf,"%d",defRetries);
  5183. !     setText(retriesText,buf);
  5184. !     sprintf(buf,"%d",defNiceLevel);
  5185. !     setText(niceText,buf);
  5186. !     setText(ftpDirText,defFtpDir);
  5187. !     setText(ftpTypeText,defFtpType);
  5188.       setChangedFlag(True);
  5189.   }
  5190.   
  5191. ***************
  5192. *** 295,305 ****
  5193.       alert0("Incorrect number of arguments to set-host()");
  5194.       return;
  5195.       }
  5196. !     if (hostText == NULL) {
  5197. !     alert0("set-host() has no effect since hostText was not created");
  5198.       return;
  5199.       }
  5200. !     setText(hostText,*params);
  5201.       setChangedFlag(True);
  5202.   }
  5203.   
  5204. --- 325,335 ----
  5205.       alert0("Incorrect number of arguments to set-host()");
  5206.       return;
  5207.       }
  5208. !     if (setHostText == NULL) {
  5209. !     alert0("set-host() has no effect since setHostText was not created");
  5210.       return;
  5211.       }
  5212. !     setText(setHostText,*params);
  5213.       setChangedFlag(True);
  5214.   }
  5215.   
  5216. ***************
  5217. *** 309,314 ****
  5218. --- 339,345 ----
  5219.   /*ARGSUSED*/
  5220.   ACTION_PROC(setNiceLevelAction)
  5221.   {
  5222. +     char buf[8];
  5223.       int n;
  5224.   
  5225.       if (*num_params != ONE) {
  5226. ***************
  5227. *** 320,331 ****
  5228.       return;
  5229.       }
  5230.       n = atoi(*params);
  5231. !     if (n < -32765) {
  5232.       alert1("Nice level too negative: %d",n);
  5233. !     setText(niceText,"-32765");
  5234. !     } else if (n > 32767) {
  5235.       alert1("Nice level too positive: %d",n);
  5236. !     setText(niceText,"32767");
  5237.       } else {
  5238.       setText(niceText,*params);
  5239.       }
  5240. --- 351,364 ----
  5241.       return;
  5242.       }
  5243.       n = atoi(*params);
  5244. !     if (n < RDGRAM_MIN_PRI) {
  5245.       alert1("Nice level too negative: %d",n);
  5246. !     sprintf(buf,"%d",RDGRAM_MIN_PRI);
  5247. !     setText(niceText,buf);
  5248. !     } else if (n > RDGRAM_MAX_PRI) {
  5249.       alert1("Nice level too positive: %d",n);
  5250. !     sprintf(buf,"%d",RDGRAM_MAX_PRI);
  5251. !     setText(niceText,buf);
  5252.       } else {
  5253.       setText(niceText,*params);
  5254.       }
  5255. ***************
  5256. *** 396,402 ****
  5257.       /* Memory leak */
  5258.       appResources.archieHost = XtNewString(*params);
  5259.       status1("Set host to %s",*params);
  5260. !     setText(hostText,*params);
  5261.   }
  5262.   
  5263.   /*ARGSUSED*/
  5264. --- 429,435 ----
  5265.       /* Memory leak */
  5266.       appResources.archieHost = XtNewString(*params);
  5267.       status1("Set host to %s",*params);
  5268. !     setText(setHostText,*params);
  5269.   }
  5270.   
  5271.   /*ARGSUSED*/
  5272. ***************
  5273. *** 409,417 ****
  5274.       return;
  5275.       }
  5276.       n = atoi(*params);
  5277. !     if (n < -32765) {
  5278.       alert1("Nice level too negative: %d -- not set",n);
  5279. !     } else if (n > 32767) {
  5280.       alert1("Nice level too positive: %d -- not set",n);
  5281.       } else {
  5282.       appResources.niceLevel = n;
  5283. --- 442,450 ----
  5284.       return;
  5285.       }
  5286.       n = atoi(*params);
  5287. !     if (n < RDGRAM_MIN_PRI) {
  5288.       alert1("Nice level too negative: %d -- not set",n);
  5289. !     } else if (n > RDGRAM_MAX_PRI) {
  5290.       alert1("Nice level too positive: %d -- not set",n);
  5291.       } else {
  5292.       appResources.niceLevel = n;
  5293. *** /tmp/release17219/settings.h    Tue Nov 12 16:55:59 1991
  5294. --- settings.h    Tue Oct 22 08:17:11 1991
  5295. ***************
  5296. *** 1,7 ****
  5297.   /*
  5298.    * settings.h : External defs for the settings panel
  5299.    *
  5300. !  * George Ferguson, ferguson@cs.rochester.edu, 4 Sep 1991.
  5301.    *
  5302.    */
  5303.   
  5304. --- 1,7 ----
  5305.   /*
  5306.    * settings.h : External defs for the settings panel
  5307.    *
  5308. !  * George Ferguson, ferguson@cs.rochester.edu, 22 Oct 1991.
  5309.    *
  5310.    */
  5311.   
  5312. ***************
  5313. *** 8,14 ****
  5314.   #ifndef SETTINGS_H
  5315.   #define SETTINGS_H
  5316.   
  5317. ! extern void settingsAction();
  5318.   extern void applySettingsAction();
  5319.   extern void defaultSettingsAction();
  5320.   extern void doneSettingsAction();
  5321. --- 8,14 ----
  5322.   #ifndef SETTINGS_H
  5323.   #define SETTINGS_H
  5324.   
  5325. ! extern void settingsAction(),initSettingsDefaults();
  5326.   extern void applySettingsAction();
  5327.   extern void defaultSettingsAction();
  5328.   extern void doneSettingsAction();
  5329. *** /tmp/release17219/stcopy.c    Tue Nov 12 16:56:02 1991
  5330. --- stcopy.c    Sat Nov  2 16:49:08 1991
  5331. ***************
  5332. *** 3,13 ****
  5333.    *
  5334.    * For copying and distribution information, please see the file
  5335.    * <copyright.h>.
  5336.    */
  5337.   
  5338.   #include <copyright.h>
  5339.   #include <stdio.h>
  5340. ! #include <strings.h>
  5341.   
  5342.   char    *stcopyr();
  5343.   
  5344. --- 3,19 ----
  5345.    *
  5346.    * For copying and distribution information, please see the file
  5347.    * <copyright.h>.
  5348. +  *
  5349. +  * v1.2.0 - 09/17/91 (bpk) - added BULL & USG stuff, thanks to Jim Sillas
  5350.    */
  5351.   
  5352.   #include <copyright.h>
  5353.   #include <stdio.h>
  5354. ! #if defined(USG) || defined(UTS) || defined(_AIX)
  5355. ! # include <string.h>
  5356. ! #else
  5357. ! # include <strings.h>
  5358. ! #endif
  5359.   
  5360.   char    *stcopyr();
  5361.   
  5362. ***************
  5363. *** 29,35 ****
  5364.         if (!st) return(NULL);
  5365.         if (string_max < ++string_count) string_max = string_count;
  5366.   
  5367. !       return strcpy(malloc(strlen(st) + 1), st);
  5368.       }
  5369.   
  5370.   /*
  5371. --- 35,41 ----
  5372.         if (!st) return(NULL);
  5373.         if (string_max < ++string_count) string_max = string_count;
  5374.   
  5375. !       return strcpy((char *)malloc(strlen(st) + 1), st);
  5376.       }
  5377.   
  5378.   /*
  5379. ***************
  5380. *** 81,86 ****
  5381. --- 87,93 ----
  5382.    *     STFREE takes a string that was returned by stcopy or stalloc 
  5383.    *     and frees the space that was allocated for the string.
  5384.    */
  5385. + void
  5386.   stfree(st)
  5387.       char *st;
  5388.       {
  5389. *** /tmp/release17219/support.c    Tue Nov 12 16:56:06 1991
  5390. --- support.c    Sat Nov  2 16:49:17 1991
  5391. ***************
  5392. *** 4,10 ****
  5393.    * For copying and distribution information, please see the file
  5394.    * <copyright.h>.
  5395.    *
  5396. !  * gf: 12 Sep 1991: Changed in include regex.h rather than regex.c
  5397.    */
  5398.   
  5399.   /*
  5400. --- 4,12 ----
  5401.    * For copying and distribution information, please see the file
  5402.    * <copyright.h>.
  5403.    *
  5404. !  * v1.2.1 - 09/23/91 (gf)  - made it use regex.h---much nicer
  5405. !  * v1.2.0 - 09/17/91 (bpk) - added BULL & USG stuff, thanks to Jim Sillas
  5406. !  * v1.1.1 - 08/30/91 (bpk) - added VMS support; cast index()
  5407.    */
  5408.   
  5409.   /*
  5410. ***************
  5411. *** 13,27 ****
  5412.   
  5413.   #include <copyright.h>
  5414.   #include <stdio.h>
  5415. ! #include <strings.h>
  5416.   #include <errno.h>
  5417. - #include <netdb.h>
  5418.   
  5419. ! #ifdef AUX
  5420. ! #include <sys/types.h>
  5421. ! #endif
  5422. ! #include <sys/file.h>
  5423. ! #include <sys/param.h>
  5424.   
  5425.   #include <pfs.h>
  5426.   #include <pprot.h>
  5427. --- 15,41 ----
  5428.   
  5429.   #include <copyright.h>
  5430.   #include <stdio.h>
  5431. ! #if defined(USG) || defined(UTS) || defined(_AIX)
  5432. ! # include <string.h>
  5433. ! #else
  5434. ! # include <strings.h>
  5435. ! #endif
  5436.   #include <errno.h>
  5437.   
  5438. ! #ifdef VMS
  5439. ! # ifdef WALLONGONG
  5440. ! #  include "twg$tcp:[netdist.include]netdb.h"
  5441. ! # else /* Multinet */
  5442. ! #  include "multinet_root:[multinet.include]netdb.h"
  5443. ! # endif
  5444. ! # include <vms.h>
  5445. ! #else /* not VMS */
  5446. ! # include <netdb.h>
  5447. ! # include <sys/types.h>
  5448. ! # include <sys/file.h>
  5449. ! # include <sys/param.h>
  5450. ! #endif /* VMS */
  5451.   
  5452.   #include <pfs.h>
  5453.   #include <pprot.h>
  5454. ***************
  5455. *** 30,45 ****
  5456.   #include <pauthent.h>
  5457.   #include <pmachine.h>
  5458.   
  5459.   int    pfs_enable = PMAP_ATSIGN;
  5460. - char    p_err_string[P_ERR_STRING_SZ];
  5461.   
  5462.   #ifndef FALSE
  5463. ! #define TRUE     1
  5464. ! #define FALSE   0
  5465.   #endif
  5466.   
  5467. - #include "regex.h"
  5468.   /* 
  5469.    * wcmatch - Match string s against template containing widlcards
  5470.    *
  5471. --- 44,58 ----
  5472.   #include <pauthent.h>
  5473.   #include <pmachine.h>
  5474.   
  5475. + #include "regex.h"
  5476.   int    pfs_enable = PMAP_ATSIGN;
  5477.   
  5478.   #ifndef FALSE
  5479. ! # define TRUE     1
  5480. ! # define FALSE   0
  5481.   #endif
  5482.   
  5483.   /* 
  5484.    * wcmatch - Match string s against template containing widlcards
  5485.    *
  5486. ***************
  5487. *** 55,60 ****
  5488. --- 68,74 ----
  5489.    *    NOTE:  If template is NULL, will return TRUE.
  5490.    *
  5491.    */
  5492. + int
  5493.   wcmatch(s,template)
  5494.       char    *s;
  5495.       char    *template;
  5496. ***************
  5497. *** 81,87 ****
  5498. --- 95,107 ----
  5499.   
  5500.       if(re_comp(temp)) return(FALSE);
  5501.   
  5502. + #ifdef AUX
  5503. +     if (re_exec(s) == (char *)NULL)
  5504. +       return 0;
  5505. +     return 1;
  5506. + #else
  5507.       return(re_exec(s));
  5508. + #endif
  5509.       }
  5510.   
  5511.   /*
  5512. ***************
  5513. *** 105,110 ****
  5514. --- 125,131 ----
  5515.    *
  5516.    * RETURNS:    Success, or UL_INSERT_ALREADY_THERE or UL_INSERT_SUPERSEDING
  5517.    */
  5518. + int
  5519.   ul_insert(ul,vd,p)
  5520.       VLINK    ul;        /* Link to be inserted                   */
  5521.       VDIR    vd;        /* Directory to receive link             */
  5522. ***************
  5523. *** 204,209 ****
  5524. --- 225,231 ----
  5525.    *
  5526.    * RETURNS:    Success, or VL_INSERT_ALREADY_THERE
  5527.    */
  5528. + int
  5529.   vl_insert(vl,vd,allow_conflict)
  5530.       VLINK    vl;        /* Link to be inserted               */
  5531.       VDIR    vd;        /* Directory to receive link         */
  5532. ***************
  5533. *** 331,337 ****
  5534.           return(curline);
  5535.   
  5536.       /* Check remaining lines of s1 */
  5537. !     while((curline = index(curline,'\n')) != NULL) {
  5538.           curline++;
  5539.           if(strncmp(curline,s2,s2len) == 0)
  5540.           return(curline);
  5541. --- 353,359 ----
  5542.           return(curline);
  5543.   
  5544.       /* Check remaining lines of s1 */
  5545. !     while((curline = (char *) index(curline,'\n')) != NULL) {
  5546.           curline++;
  5547.           if(strncmp(curline,s2,s2len) == 0)
  5548.           return(curline);
  5549. ***************
  5550. *** 384,390 ****
  5551.       char    *s = s1;    /* Temp pointer to string  */
  5552.   
  5553.       /* Check for first character of s2 */
  5554. !     while((s = index(s,*s2)) != NULL) {
  5555.           if(strncmp(s,s2,s2len) == 0)
  5556.           return(s);
  5557.           s++;
  5558. --- 406,412 ----
  5559.       char    *s = s1;    /* Temp pointer to string  */
  5560.   
  5561.       /* Check for first character of s2 */
  5562. !     while((s = (char *) index(s,*s2)) != NULL) {
  5563.           if(strncmp(s,s2,s2len) == 0)
  5564.           return(s);
  5565.           s++;
  5566. ***************
  5567. *** 394,399 ****
  5568. --- 416,422 ----
  5569.       return(NULL);
  5570.       }
  5571.   
  5572. + int
  5573.   scan_error(erst)
  5574.       char    *erst;
  5575.       {
  5576. ***************
  5577. *** 402,444 ****
  5578.       if(strncmp(erst,"NOT-A-DIRECTORY",15) == 0) 
  5579.           return(DIRSRV_NOT_DIRECTORY);
  5580.   
  5581.       /* The rest start with "FAILURE" */
  5582.   
  5583. !     if(strncmp(erst,"FAILURE",7) != 0) 
  5584. !         return(DIRSRV_BAD_FORMAT);
  5585. !     if(strncmp(erst,"FAILURE ",8) != 0) 
  5586. !         return(PFAILURE);
  5587.       erst += 8;
  5588. -     sscanf(erst, "%*s %[^\n]", p_err_string);
  5589.       
  5590.       /* Still to add               */
  5591.       /* DIRSRV_AUTHENT_REQ     242 */
  5592.       /* DIRSRV_BAD_VERS        245 */
  5593.   
  5594.       if(strncmp(erst,"NOT-FOUND",9) == 0) 
  5595. !         return(DIRSRV_NOT_FOUND);
  5596.   
  5597. !     if(strncmp(erst,"NOT-AUTHORIZED",13) == 0) 
  5598. !         return(DIRSRV_NOT_AUTHORIZED);
  5599. !     if(strncmp(erst,"ALREADY-EXISTS",14) == 0) 
  5600. !         return(DIRSRV_ALREADY_EXISTS);
  5601. !     if(strncmp(erst,"NAME-CONFLICT",13) == 0) 
  5602. !         return(DIRSRV_NAME_CONFLICT);
  5603. !     if(strncmp(erst,"SERVER-FAILED",13) == 0) 
  5604. !         return(DIRSRV_SERVER_FAILED);
  5605. !  
  5606. !     /* Use it whether it starts with FAILURE or not */
  5607. !     if(strncmp(erst,"NOT-A-DIRECTORY",15) == 0) 
  5608. !         return(DIRSRV_NOT_DIRECTORY);
  5609. !     return(PFAILURE);
  5610.       }
  5611.   
  5612.   PATTRIB 
  5613. --- 425,497 ----
  5614.       if(strncmp(erst,"NOT-A-DIRECTORY",15) == 0) 
  5615.           return(DIRSRV_NOT_DIRECTORY);
  5616.   
  5617. +     if(strncmp(erst,"UNIMPLEMENTED",13) == 0) {
  5618. +         perrno = DIRSRV_UNIMPLEMENTED;
  5619. +         sscanf(erst+13,"%*[^\n \t\r]%*[ \t]%[^\n]",p_err_string);
  5620. +         return(perrno);
  5621. +     }
  5622. +     if(strncmp(erst,"WARNING ",8) == 0) {
  5623. +         erst += 8;
  5624. +         *p_warn_string = '\0';
  5625. +         sscanf(erst,"%*[^\n \t\r]%*[ \t]%[^\n]",p_warn_string);
  5626. +         /* Return values for warnings are negative */
  5627. +         if(strncmp(erst,"OUT-OF-DATE",11) == 0) {
  5628. +         pwarn = PWARN_OUT_OF_DATE;
  5629. +         return(PSUCCESS);
  5630. +         }
  5631. +         if(strncmp(erst,"MESSAGE",7) == 0) {
  5632. +         pwarn = PWARN_MSG_FROM_SERVER;
  5633. +         return(PSUCCESS);
  5634. +         }
  5635. +         pwarn = PWARNING;
  5636. +         sscanf(erst,"%[^\n]",p_warn_string);
  5637. +         return(PSUCCESS);
  5638. +     }
  5639. +     else if(strncmp(erst,"ERROR",5) == 0) {
  5640. +         if(*(erst+5)) sscanf(erst+6,"%[^\n]",p_err_string);
  5641. +         perrno = DIRSRV_ERROR;
  5642. +         return(perrno);
  5643. +     }
  5644.       /* The rest start with "FAILURE" */
  5645. +     else if(strncmp(erst,"FAILURE",7) != 0) {
  5646. +         /* Unrecognized - Give warning, but return PSUCCESS */
  5647. +         if(pwarn == 0) {
  5648. +         *p_warn_string = '\0';
  5649. +         pwarn = PWARN_UNRECOGNIZED_RESP;
  5650. +         sscanf(erst,"%[^\n]",p_warn_string);
  5651. +         }
  5652. +         return(PSUCCESS);
  5653. +     }
  5654.   
  5655. !     if(strncmp(erst,"FAILURE ",8) != 0) {
  5656. !         perrno = PFAILURE;
  5657. !         return(perrno);
  5658. !     }    
  5659.       erst += 8;
  5660.       
  5661. +     sscanf(erst,"%*[^\n \t\r]%*[ \t]%[^\n]",p_err_string);
  5662.       /* Still to add               */
  5663.       /* DIRSRV_AUTHENT_REQ     242 */
  5664.       /* DIRSRV_BAD_VERS        245 */
  5665.   
  5666.       if(strncmp(erst,"NOT-FOUND",9) == 0) 
  5667. !         perrno = DIRSRV_NOT_FOUND;
  5668. !     else if(strncmp(erst,"NOT-AUTHORIZED",13) == 0) 
  5669. !         perrno = DIRSRV_NOT_AUTHORIZED;
  5670. !     else if(strncmp(erst,"ALREADY-EXISTS",14) == 0) 
  5671. !         perrno = DIRSRV_ALREADY_EXISTS;
  5672. !     else if(strncmp(erst,"NAME-CONFLICT",13) == 0) 
  5673. !         perrno = DIRSRV_NAME_CONFLICT;
  5674. !     else if(strncmp(erst,"SERVER-FAILED",13) == 0) 
  5675. !         perrno = DIRSRV_SERVER_FAILED;
  5676. !      /* Use it whether it starts with FAILURE or not */
  5677. !     else if(strncmp(erst,"NOT-A-DIRECTORY",15) == 0) 
  5678. !         perrno = DIRSRV_NOT_DIRECTORY;
  5679. !     else perrno = PFAILURE;
  5680.   
  5681. !     return(perrno);
  5682.       }
  5683.   
  5684.   PATTRIB 
  5685. ***************
  5686. *** 529,535 ****
  5687.   nxtline(s)
  5688.       char    *s;        /* String to be searched */
  5689.    {
  5690. !     s = index(s,'\n');
  5691.       if(s) return(++s);
  5692.       else return(NULL);
  5693.       }
  5694. --- 582,588 ----
  5695.   nxtline(s)
  5696.       char    *s;        /* String to be searched */
  5697.    {
  5698. !     s = (char *) index(s,'\n');
  5699.       if(s) return(++s);
  5700.       else return(NULL);
  5701.       }
  5702. *** /dev/null    Tue Nov 12 16:30:11 1991
  5703. --- udp.c    Sat Nov  2 13:54:45 1991
  5704. ***************
  5705. *** 0 ****
  5706. --- 1,81 ----
  5707. + /*
  5708. +  * udp - Check if UDP traffic is allowed on this host; we open port 1527 on
  5709. +  *       a system (default of cs.widener.edu), which is expecting it; the
  5710. +  *       date is output (e.g. very similar to the daytime service).  This
  5711. +  *       will conclusively tell us if UDP traffic on ports > 1000 is allowed.
  5712. +  *
  5713. +  *    It should print out the date if UDP traffic's not blocked on your
  5714. +  *    system.  If it just hangs, try these tests too:
  5715. +  *      a. run it with -d  (e.g. "udp -d"); that goes to the normal UDP port
  5716. +  *         to print the date.  If it works, then you can be sure that any
  5717. +  *         UDP traffic > port 1000 is blocked on your system.
  5718. +  *      b. if it hangs too, try "telnet 147.31.254.130 13" and see if
  5719. +  *         _that_ prints the date; if it doesn't, it's another problem (your
  5720. +  *         network can't get to me, e.g.).
  5721. +  *
  5722. +  * Compile by: cc -o udp udp.c
  5723. +  *
  5724. +  * Brendan Kehoe, brendan@cs.widener.edu, Oct 1991.
  5725. +  */
  5726. + #include <stdio.h>
  5727. + #include <sys/types.h>
  5728. + #include <sys/socket.h>
  5729. + #include <netinet/in.h>
  5730. + #include <arpa/inet.h>
  5731. + #define    SIZE    2048
  5732. + #define    HOST    "147.31.254.130"    /* cs.widener.edu */
  5733. + #define PORT    1527
  5734. + main (argc, argv)
  5735. +      int argc;
  5736. +      char **argv;
  5737. + {
  5738. +   int s, len;
  5739. +   struct sockaddr_in server, sa;
  5740. +   char buf[SIZE];
  5741. +   if ((s = socket (AF_INET, SOCK_DGRAM, IPPROTO_UDP)) < 0)
  5742. +     {
  5743. +       perror ("socket()");
  5744. +       exit (1);
  5745. +     }
  5746. +   bzero ((char *) &sa, sizeof (sa));
  5747. +   sa.sin_family = AF_INET;
  5748. +   sa.sin_addr.s_addr = htonl (INADDR_ANY);
  5749. +   sa.sin_port = htons (0);
  5750. +   if (bind (s, (struct sockaddr *) &sa, sizeof (sa)) < 0)
  5751. +     {
  5752. +       perror ("bind()");
  5753. +       exit (1);
  5754. +     }
  5755. +   bzero ((char *) &server, sizeof (server));
  5756. +   server.sin_family = AF_INET;
  5757. +   server.sin_addr.s_addr = inet_addr (HOST);
  5758. +   if (argc > 1 && strcmp(*(argv + 1), "-d") == 0)
  5759. +     server.sin_port = htons ((unsigned short) 13);
  5760. +   else
  5761. +     server.sin_port = htons ((unsigned short) PORT);
  5762. +   /* yoo hoo, we're here .. */
  5763. +   if (sendto (s, "\n", 1, 0, &server, sizeof (server)) < 0)
  5764. +     {
  5765. +       perror ("sendto()");
  5766. +       exit (1);
  5767. +     }
  5768. +   /* slurp */
  5769. +   len = sizeof (server);
  5770. +   if (recvfrom (s, buf, sizeof (buf), 0, &server, &len) < 0)
  5771. +     {
  5772. +       perror ("recvfrom");
  5773. +       exit (1);
  5774. +     }
  5775. +   printf ("%s", buf);
  5776. +   close (s);
  5777. + }
  5778. *** /tmp/release17219/vl_comp.c    Tue Nov 12 16:56:18 1991
  5779. --- vl_comp.c    Mon Oct 21 12:57:51 1991
  5780. ***************
  5781. *** 24,29 ****
  5782. --- 24,30 ----
  5783.    *           native filenametype, native filename.  The only time
  5784.    *           the name will not exist if if the link is a union link.
  5785.    */
  5786. + int
  5787.   vl_comp(vl1,vl2)
  5788.       VLINK    vl1;
  5789.       VLINK    vl2;
  5790. ***************
  5791. *** 53,58 ****
  5792. --- 54,60 ----
  5793.    * RETURNS:  1 if equal, 0 if not equal
  5794.    *
  5795.    */
  5796. + int
  5797.   vl_equal(vl1,vl2)
  5798.       VLINK    vl1;
  5799.       VLINK    vl2;
  5800. *** /tmp/release17219/vlalloc.c    Tue Nov 12 16:56:21 1991
  5801. --- vlalloc.c    Mon Oct 21 12:58:05 1991
  5802. ***************
  5803. *** 57,62 ****
  5804. --- 57,63 ----
  5805.    *    VLFREE takes a pointer to a VLINK structure and adds it to
  5806.    *    the free list for later reuse.
  5807.    */
  5808. + void
  5809.   vlfree(vl)
  5810.       VLINK    vl;
  5811.       {
  5812. ***************
  5813. *** 92,97 ****
  5814. --- 93,99 ----
  5815.    *    VLINK structures.  It is used to free an entrie list of VLINK
  5816.    *    structures.
  5817.    */
  5818. + void
  5819.   vllfree(vl)
  5820.       VLINK    vl;
  5821.       {
  5822. *** /tmp/release17219/xarchie.c    Tue Nov 12 16:56:25 1991
  5823. --- xarchie.c    Tue Nov 12 12:50:32 1991
  5824. ***************
  5825. *** 10,16 ****
  5826.    * Finally, it provides the generic setText(), setLabel(), and status*()
  5827.    * routines which could go just about anywhere.
  5828.    *
  5829. !  * George Ferguson, ferguson@cs.rochester.edu, 12 Sep 1991.
  5830.    *
  5831.    */
  5832.   #include <stdio.h>
  5833. --- 10,16 ----
  5834.    * Finally, it provides the generic setText(), setLabel(), and status*()
  5835.    * routines which could go just about anywhere.
  5836.    *
  5837. !  * George Ferguson, ferguson@cs.rochester.edu, 12 Nov 1991.
  5838.    *
  5839.    */
  5840.   #include <stdio.h>
  5841. ***************
  5842. *** 33,38 ****
  5843. --- 33,39 ----
  5844.   #include "classnames.h"
  5845.   #include "db.h"
  5846.   #include "actions.h"
  5847. + #include "settings.h"
  5848.   #include "patchlevel.h"
  5849.   
  5850.   /*    -    -    -    -    -    -    -    -    */
  5851. ***************
  5852. *** 40,46 ****
  5853.    * Functions defined in this file:
  5854.    */
  5855.   int main();
  5856. - void doPendingEvents();
  5857.   void initWidgetsFromString();
  5858.   void displayHostInfo(), clearHostInfo();
  5859.   void displayLocationInfo(), clearLocationInfo();
  5860. --- 41,46 ----
  5861. ***************
  5862. *** 49,55 ****
  5863.   void status0(), status1(), status2();
  5864.   void fail0(), fail1();
  5865.   
  5866. ! static void initGraphics(), initWidgets();
  5867.   static void selectItem();
  5868.   static void syntax();
  5869.   
  5870. --- 49,55 ----
  5871.   void status0(), status1(), status2();
  5872.   void fail0(), fail1();
  5873.   
  5874. ! static void initGraphics(), initWidgets(), initErrorHandlers();
  5875.   static void selectItem();
  5876.   static void syntax();
  5877.   
  5878. ***************
  5879. *** 67,72 ****
  5880. --- 67,73 ----
  5881.   Widget toplevel;
  5882.   Widget hostList,locationList,fileList;
  5883.   Widget searchText;
  5884. + Widget queryButton,abortButton;        /* global since changes sensitivity */
  5885.   
  5886.   static Widget statusText;
  5887.   static Widget hostText,locationText,fileText,sizeText,modesText,dateText;
  5888. ***************
  5889. *** 88,99 ****
  5890.   static XtResource resources[] = {
  5891.       { "widgets", "Widgets", XtRString, sizeof(String),
  5892.         XtOffset(AppResources *,widgets), XtRImmediate, "" },
  5893.       { "searchType", "SearchType", GfRSearchType, sizeof(SearchType),
  5894.         XtOffset(AppResources *,searchType), XtRImmediate, (XtPointer)GfExact },
  5895.       { "sortType", "SortType", GfRSortType, sizeof(SortType),
  5896.         XtOffset(AppResources *,sortType), XtRImmediate, (XtPointer)GfDefault },
  5897.       { "archieHost", "ArchieHost", XtRString, sizeof(String),
  5898. !       XtOffset(AppResources *,archieHost), XtRImmediate, "archie.mcgill.ca" },
  5899.       { "maxHits", "MaxHits", XtRInt, sizeof(int),
  5900.         XtOffset(AppResources *,maxHits), XtRImmediate, (XtPointer)99 },
  5901.       { "offset", "Offset", XtRInt, sizeof(int),
  5902. --- 89,102 ----
  5903.   static XtResource resources[] = {
  5904.       { "widgets", "Widgets", XtRString, sizeof(String),
  5905.         XtOffset(AppResources *,widgets), XtRImmediate, "" },
  5906. +     { "menus", "Menus", XtRString, sizeof(String),
  5907. +       XtOffset(AppResources *,menus), XtRImmediate, "" },
  5908.       { "searchType", "SearchType", GfRSearchType, sizeof(SearchType),
  5909.         XtOffset(AppResources *,searchType), XtRImmediate, (XtPointer)GfExact },
  5910.       { "sortType", "SortType", GfRSortType, sizeof(SortType),
  5911.         XtOffset(AppResources *,sortType), XtRImmediate, (XtPointer)GfDefault },
  5912.       { "archieHost", "ArchieHost", XtRString, sizeof(String),
  5913. !       XtOffset(AppResources *,archieHost), XtRImmediate, "archie.sura.net" },
  5914.       { "maxHits", "MaxHits", XtRInt, sizeof(int),
  5915.         XtOffset(AppResources *,maxHits), XtRImmediate, (XtPointer)99 },
  5916.       { "offset", "Offset", XtRInt, sizeof(int),
  5917. ***************
  5918. *** 112,117 ****
  5919. --- 115,125 ----
  5920.         XtOffset(AppResources *,debugLevel), XtRImmediate, (XtPointer)0 },
  5921.       { "settingsWidgets", "SettingsWidgets", XtRString, sizeof(String),
  5922.         XtOffset(AppResources *,settingsWidgets), XtRImmediate, "" },
  5923. +     { "saveFormatOneLine", "SaveFormatOneLine", XtRBoolean, sizeof(Boolean),
  5924. +       XtOffset(AppResources *,saveFormatOneLine), XtRImmediate,
  5925. +                             (XtPointer)False },
  5926. +     { "expert", "Expert", XtRBoolean, sizeof(Boolean),
  5927. +       XtOffset(AppResources *,expert), XtRImmediate, (XtPointer)False },
  5928.   };
  5929.   
  5930.   /*
  5931. ***************
  5932. *** 129,141 ****
  5933.       { "-sort",    ".sortType",     XrmoptionSepArg, (XtPointer)"default" },
  5934.       { "-t",      ".sortType",     XrmoptionNoArg,  (XtPointer)"invdate" },
  5935.       { "-host",      ".archieHost", XrmoptionSepArg,
  5936. !                     (XtPointer)"archie.mcgill.ca" },
  5937.       { "-maxhits", ".maxHits",     XrmoptionSepArg, (XtPointer)"99" },
  5938.       { "-offset",  ".offset",     XrmoptionSepArg, (XtPointer)"0" },
  5939.       { "-nice",    ".niceLevel",     XrmoptionSepArg, (XtPointer)"0" },
  5940.       { "-N",       ".niceLevel",     XrmoptionSepArg, (XtPointer)"0" },
  5941. !     { "-debug",      ".debugLevel", XrmoptionNoArg,  (XtPointer)"1" },
  5942.       { "-D",      ".debugLevel", XrmoptionSepArg, (XtPointer)"1" },
  5943.   };
  5944.   
  5945.   /*
  5946. --- 137,150 ----
  5947.       { "-sort",    ".sortType",     XrmoptionSepArg, (XtPointer)"default" },
  5948.       { "-t",      ".sortType",     XrmoptionNoArg,  (XtPointer)"invdate" },
  5949.       { "-host",      ".archieHost", XrmoptionSepArg,
  5950. !                     (XtPointer)"archie.sura.net" },
  5951.       { "-maxhits", ".maxHits",     XrmoptionSepArg, (XtPointer)"99" },
  5952.       { "-offset",  ".offset",     XrmoptionSepArg, (XtPointer)"0" },
  5953.       { "-nice",    ".niceLevel",     XrmoptionSepArg, (XtPointer)"0" },
  5954.       { "-N",       ".niceLevel",     XrmoptionSepArg, (XtPointer)"0" },
  5955. !     { "-debug",      ".debugLevel", XrmoptionSepArg, (XtPointer)"1" },
  5956.       { "-D",      ".debugLevel", XrmoptionSepArg, (XtPointer)"1" },
  5957. +     { "-expert",  ".expert",     XrmoptionNoArg,  (XtPointer)"True" },
  5958.   };
  5959.   
  5960.   /*
  5961. ***************
  5962. *** 156,162 ****
  5963.   int argc;
  5964.   char **argv;
  5965.   {
  5966. !     char buf[32];
  5967.   
  5968.       progname = argv[0];
  5969.       initGraphics(&argc,argv);
  5970. --- 165,171 ----
  5971.   int argc;
  5972.   char **argv;
  5973.   {
  5974. !     char buf[64];
  5975.   
  5976.       progname = argv[0];
  5977.       initGraphics(&argc,argv);
  5978. ***************
  5979. *** 165,177 ****
  5980.       XtDestroyApplicationContext(appContext);
  5981.       exit(1);
  5982.       }
  5983.       initWidgets();
  5984.       XtRealizeWidget(toplevel);
  5985.       /* Set window title to indicate version */
  5986. !     sprintf(buf,"xarchie %d.%d",xarchieMajorVersion,xarchieMinorVersion);
  5987.       XStoreName(display,XtWindow(toplevel),buf);
  5988. !     sprintf(buf,"Welcome to xarchie %d.%d",xarchieMajorVersion,
  5989. !                             xarchieMinorVersion);
  5990.       status0(buf);
  5991.       /* get the data structure for responses */
  5992.       db = newDb();
  5993. --- 174,191 ----
  5994.       XtDestroyApplicationContext(appContext);
  5995.       exit(1);
  5996.       }
  5997. +     initErrorHandlers();
  5998. +     initSettingsDefaults();
  5999.       initWidgets();
  6000.       XtRealizeWidget(toplevel);
  6001.       /* Set window title to indicate version */
  6002. !     sprintf(buf,"xarchie %d.%d%s",xarchieMajorVersion,
  6003. !                   xarchieMinorVersion,
  6004. !                   xarchieExtraVersion);
  6005.       XStoreName(display,XtWindow(toplevel),buf);
  6006. !     sprintf(buf,"Welcome to xarchie %d.%d%s",xarchieMajorVersion,
  6007. !                          xarchieMinorVersion,
  6008. !                          xarchieExtraVersion);
  6009.       status0(buf);
  6010.       /* get the data structure for responses */
  6011.       db = newDb();
  6012. ***************
  6013. *** 180,191 ****
  6014.       /*NOTREACHED*/
  6015.   }
  6016.   
  6017. ! void
  6018. ! doPendingEvents()
  6019. ! {
  6020. !     while (XtAppPending(appContext))
  6021. !     XtAppProcessEvent(appContext,XtIMAll);
  6022. ! }
  6023.   
  6024.   static void
  6025.   initGraphics(argcp,argv)
  6026. --- 194,201 ----
  6027.       /*NOTREACHED*/
  6028.   }
  6029.   
  6030. ! /*    -    -    -    -    -    -    -    -    */
  6031. ! /* Initialization routines */
  6032.   
  6033.   static void
  6034.   initGraphics(argcp,argv)
  6035. ***************
  6036. *** 230,235 ****
  6037. --- 240,249 ----
  6038.       sizeText = XtNameToWidget(toplevel,"*sizeText");
  6039.       modesText = XtNameToWidget(toplevel,"*modesText");
  6040.       dateText = XtNameToWidget(toplevel,"*dateText");
  6041. +     queryButton = XtNameToWidget(toplevel,"*queryButton");
  6042. +     abortButton = XtNameToWidget(toplevel,"*abortButton");
  6043. +     if (abortButton != NULL)
  6044. +     XtSetSensitive(abortButton,False);
  6045.       /* make the lists behave like a browser should */
  6046.       XtAddCallback(hostList,XtNcallback,selectItem,(XtPointer)1);
  6047.       XtAddCallback(locationList,XtNcallback,selectItem,(XtPointer)2);
  6048. ***************
  6049. *** 238,243 ****
  6050. --- 252,259 ----
  6051.       clearList(hostList);
  6052.       clearList(locationList);
  6053.       clearList(fileList);
  6054. +     /* Some people crash when the EzMenu's are created earlier (puke-ola) */
  6055. +     initWidgetsFromString(appResources.menus,".menus");
  6056.   }
  6057.   
  6058.   #define ISSPACE(c)    ((c) == ' ' || (c) == '\t' || (c) == '\n')
  6059. ***************
  6060. *** 308,313 ****
  6061. --- 324,376 ----
  6062.   }
  6063.   
  6064.   /*    -    -    -    -    -    -    -    -    */
  6065. + /* The following functions attempt to provide information in the event of
  6066. +  * a crash. If you have trouble compiling them because of UNIX-isms in
  6067. +  * the signal handlers, then add -DDONT_CATCH_ERRORS to the definition
  6068. +  * of DEFINES in the Imakefile and re-make (or just #define it here).
  6069. +  */
  6070. + #ifndef DONT_CATCH_ERRORS
  6071. + static void crashHandler();
  6072. + #endif /* DONT_CATCH_ERRORS */
  6073. + static void
  6074. + initErrorHandlers()
  6075. + {
  6076. + #ifndef DONT_CATCH_ERRORS
  6077. +     signal(SIGBUS,crashHandler);
  6078. +     signal(SIGSEGV,crashHandler);
  6079. + #endif /* DONT_CATCH_ERRORS */
  6080. + }
  6081. + #ifndef DONT_CATCH_ERRORS
  6082. + static void
  6083. + crashHandler(sig)
  6084. + int sig;
  6085. + {
  6086. +     char *s;
  6087. +     switch (sig) {
  6088. +     case SIGBUS: s = "SIGBUS"; break;
  6089. +     case SIGSEGV: s = "SIGSEGV"; break;
  6090. +     default: s = "UNKNOWN";
  6091. +     }
  6092. +     fprintf(stderr,"%s: caught a %s signal!\n",progname,s);
  6093. +     fprintf(stderr,"If a backtrace (using dbx or gdb or something) shows that the crash is\n");
  6094. +     fprintf(stderr,"is occurring in XtNameToWidget() or something similar, then before\n");
  6095. +     fprintf(stderr,"reporting an error, please check that your X distribution is up to date.\n");
  6096. +     fprintf(stderr,"Xarchie may not run under versions of X that are not at least X11R4\n");
  6097. +     fprintf(stderr,"with all fixes applied. Your copy of \".../include/X11/Intrinsic.h\"\n");
  6098. +     fprintf(stderr,"should have XConsortium revision number at least 1.139.\n");
  6099. +     fprintf(stderr,"If you still want to report an error, please indicate your hardware type,\n");
  6100. +     fprintf(stderr,"operating system, compiler, and your version of X and include a\n");
  6101. +     fprintf(stderr,"backtrace. Thanks.\n");
  6102. +     abort();
  6103. + }
  6104. + #endif /* DONT_CATCH_ERRORS */
  6105. + /*    -    -    -    -    -    -    -    -    */
  6106.   /* Callback procedures */
  6107.   
  6108.   /*ARGSUSED*/
  6109. ***************
  6110. *** 412,418 ****
  6111.       }
  6112.       if (modesText != NULL)
  6113.       setText(modesText,filep->modes);
  6114. !     if (sizeText != NULL)
  6115.       setText(dateText,filep->date);
  6116.   }
  6117.   
  6118. --- 475,481 ----
  6119.       }
  6120.       if (modesText != NULL)
  6121.       setText(modesText,filep->modes);
  6122. !     if (dateText != NULL)
  6123.       setText(dateText,filep->date);
  6124.   }
  6125.   
  6126. ***************
  6127. *** 470,476 ****
  6128.   {
  6129.       if (statusText != NULL)
  6130.       setText(statusText,str);
  6131. -     doPendingEvents();
  6132.   }
  6133.   
  6134.   void
  6135. --- 533,538 ----
  6136. *** /tmp/release17219/xarchie.h    Tue Nov 12 16:56:29 1991
  6137. --- xarchie.h    Tue Nov 12 12:50:45 1991
  6138. ***************
  6139. *** 1,7 ****
  6140.   /*
  6141.    * xarchie.h : Definitions of the X globals and misc. functions
  6142.    *
  6143. !  * George Ferguson, ferguson@cs.rochester.edu, 4 Sep 1991.
  6144.    *
  6145.    */
  6146.   
  6147. --- 1,7 ----
  6148.   /*
  6149.    * xarchie.h : Definitions of the X globals and misc. functions
  6150.    *
  6151. !  * George Ferguson, ferguson@cs.rochester.edu, 12 Nov 1991.
  6152.    *
  6153.    */
  6154.   
  6155. ***************
  6156. *** 16,23 ****
  6157.   extern Widget toplevel;
  6158.   extern Widget hostList,locationList,fileList;
  6159.   extern Widget searchText;
  6160.   
  6161. - extern void doPendingEvents();
  6162.   extern void initWidgetsFromString();
  6163.   extern void displayHostInfo(), clearHostInfo();
  6164.   extern void displayLocationInfo(), clearLocationInfo();
  6165. --- 16,23 ----
  6166.   extern Widget toplevel;
  6167.   extern Widget hostList,locationList,fileList;
  6168.   extern Widget searchText;
  6169. + extern Widget queryButton,abortButton;
  6170.   
  6171.   extern void initWidgetsFromString();
  6172.   extern void displayHostInfo(), clearHostInfo();
  6173.   extern void displayLocationInfo(), clearLocationInfo();
  6174. *** /tmp/release17219/xarchie.man    Tue Nov 12 16:56:33 1991
  6175. --- xarchie.man    Tue Nov 12 12:51:08 1991
  6176. ***************
  6177. *** 1,9 ****
  6178.   .\"
  6179.   .\" xarchie : X11 browser interface to archie
  6180.   .\"
  6181. ! .\" George Ferguson, ferguson@cs.rochester.edu, 12 Sep 1991.
  6182.   .\"
  6183. ! .TH XARCHIE 1 "12 Sep 1991"
  6184.   .ds ]W U of Rochester
  6185.   .SH NAME
  6186.   xarchie \- X11 browser interface to archie
  6187. --- 1,9 ----
  6188.   .\"
  6189.   .\" xarchie : X11 browser interface to archie
  6190.   .\"
  6191. ! .\" George Ferguson, ferguson@cs.rochester.edu, 12 Nov 1991.
  6192.   .\"
  6193. ! .TH XARCHIE 1 "12 Nov 1991"
  6194.   .ds ]W U of Rochester
  6195.   .SH NAME
  6196.   xarchie \- X11 browser interface to archie
  6197. ***************
  6198. *** 20,25 ****
  6199. --- 20,26 ----
  6200.   [\-offset\ num]
  6201.   [\-nice lev\ |\ \-N\ lev]
  6202.   [\-debug\ num\ |\ \-D\ num]
  6203. + [\-expert ]
  6204.   [\-help\ |\ -?]
  6205.   .in -8n
  6206.   .ad
  6207. ***************
  6208. *** 60,65 ****
  6209. --- 61,77 ----
  6210.   itself, write to archie-l@cs.mcgill.ca. If you have questions about
  6211.   .IR Prospero ,
  6212.   write to info-prospero@isi.edu.
  6213. + .PP
  6214. + When reporting bugs, problems, suggestions or contributions, please
  6215. + be sure to send them to the right place. Issues dealing with the X
  6216. + interface should be sent to George Ferguson (ferguson@cs.rochester.edu).
  6217. + Brendan Kehoe (brendan@cs.widener.edu) is charge of the archie clients
  6218. + and the network stuff underlying
  6219. + .IR xarchie ,
  6220. + Cliff Neuman (bcn@isi.edu) is in charge of Prospero, and Alan Emtage
  6221. + (bajan@cs.mcgill.edu) and the others are in charge of the
  6222. + .I Archie
  6223. + service itself.
  6224.   .SH USAGE
  6225.   .PP
  6226.   This section describes how to use
  6227. ***************
  6228. *** 72,80 ****
  6229.   .IR Xarchie 's
  6230.   display is divided into three horizontal areas. The top pane is a
  6231.   control panel. The "Quit" button exits
  6232. ! .IR xarchie ,
  6233.   the "Query" button sends your search term (see below) to
  6234.   .IR Archie ,
  6235.   and the "Settings" button pops up a panel from which you can change
  6236.   various parameters of your queries. The buttons labelled "Search
  6237.   Type", "Sort Type", and "Nice Level" allow you to modify aspects of
  6238. --- 84,96 ----
  6239.   .IR Xarchie 's
  6240.   display is divided into three horizontal areas. The top pane is a
  6241.   control panel. The "Quit" button exits
  6242. ! .IR xarchie
  6243. ! after prompting for confirmation (but see the
  6244. ! .B \-expert
  6245. ! option, below, or use Shift while clicking),
  6246.   the "Query" button sends your search term (see below) to
  6247.   .IR Archie ,
  6248. + the "Abort" button allows to you to abort a long-running query,
  6249.   and the "Settings" button pops up a panel from which you can change
  6250.   various parameters of your queries. The buttons labelled "Search
  6251.   Type", "Sort Type", and "Nice Level" allow you to modify aspects of
  6252. ***************
  6253. *** 81,87 ****
  6254.   your search without using the Settings panel. Their use is described
  6255.   below under "The Settings Panel".  The area labelled "Status" is
  6256.   updated to reflect the progress of your query when one is progress.
  6257. ! The "Ftp" button is described below under "Retrieving Files".
  6258.   .SH "Querying"
  6259.   .PP
  6260.   You enter your "search term" (the string or expression you want to
  6261. --- 97,104 ----
  6262.   your search without using the Settings panel. Their use is described
  6263.   below under "The Settings Panel".  The area labelled "Status" is
  6264.   updated to reflect the progress of your query when one is progress.
  6265. ! The "Save" and "Ftp" buttons are described below under "Retrieving
  6266. ! Files".
  6267.   .SH "Querying"
  6268.   .PP
  6269.   You enter your "search term" (the string or expression you want to
  6270. ***************
  6271. *** 94,99 ****
  6272. --- 111,124 ----
  6273.   Entries matching your search term will be displayed in middle pane of
  6274.   .IR xarchie 's
  6275.   display, which functions as a host-location-file browser.
  6276. + .PP
  6277. + If you find that your query is taking too long, you can abort it by
  6278. + clicking on the "Abort" button when it is sensitive. Your query will
  6279. + be aborted as soon as possible. You should note that while aborting a
  6280. + query will allow you to enter a new query, it does not currently
  6281. + remove the query from the server's queue. Thus aborting queries does
  6282. + not reduce the load on the server -- just the opposite probably. Use
  6283. + with discretion, like the rest of the service.
  6284.   .SH "The Browser"
  6285.   .PP
  6286.   The left-hand pane of the browser contains the names of hosts that have a
  6287. ***************
  6288. *** 122,130 ****
  6289.   pane lets you retrieve the file currently selected in the browser by
  6290.   anonymous ftp. This service is presently quite rudimentary. You must
  6291.   have selected a host, location, and file in the browser, and the
  6292. ! selection must not be a directory. The file is retrieved to the
  6293. ! current directory using binary mode. This functionality will be
  6294. ! improved in the near future.
  6295.   .SH "The Settings Panel"
  6296.   .PP
  6297.   The panel popped up by clicking on the "Settings" button in the top
  6298. --- 147,171 ----
  6299.   pane lets you retrieve the file currently selected in the browser by
  6300.   anonymous ftp. This service is presently quite rudimentary. You must
  6301.   have selected a host, location, and file in the browser, and the
  6302. ! selection must not be a directory. The destination directory and mode
  6303. ! of the file transfer can be set on the Settings panel, described below.
  6304. ! This functionality will be improved in the near future.
  6305. ! .PP
  6306. ! To allow you to save the results of a query for later use, the button
  6307. ! labelled "Save" in the top pane causes
  6308. ! .I xarchie
  6309. ! to write a file containing the information currently displayed in the
  6310. ! browser. Clicking on this button prompts for the filename to save to,
  6311. ! then writes the file.  When clicked on with "Shift" held down, it uses
  6312. ! the current search term with ".lst" appended.  The format of the
  6313. ! output file is controlled by the
  6314. ! .B saveFormatOneLine
  6315. ! resource, and the operation is actually performed by the
  6316. ! .B save-to-file()
  6317. ! action. Both of these are described below. Judicious use of "Save"
  6318. ! will obviously help reduce the load on the
  6319. ! .I Archie
  6320. ! servers.
  6321.   .SH "The Settings Panel"
  6322.   .PP
  6323.   The panel popped up by clicking on the "Settings" button in the top
  6324. ***************
  6325. *** 171,182 ****
  6326.   .PP
  6327.   Clicking on the "Apply" button will apply the settings on the panel to
  6328.   .IR xarchie .
  6329. ! Clicking on "Default" will reset the settings to their default values
  6330. ! (but note that you will still have to apply them to have them take
  6331. ! effect). Clicking on "Done" closes the Settings panel. A popup
  6332. ! confirmer will appear if you did not apply your changes, allowing you
  6333. ! to discard the changes or go back and apply them. Note that the
  6334. ! "Apply" button is inactive until a change is made.
  6335.   .PP
  6336.   The menus available from the "Search Type", "Sort Type", and "Nice
  6337.   Level" buttons on the
  6338. --- 212,225 ----
  6339.   .PP
  6340.   Clicking on the "Apply" button will apply the settings on the panel to
  6341.   .IR xarchie .
  6342. ! Clicking on "Default" will reset the settings to the values they had
  6343. ! when
  6344. ! .I xarchie
  6345. ! started (but note that you will still have to apply them to have
  6346. ! them take effect). Clicking on "Done" closes the Settings panel. A
  6347. ! popup confirmer will appear if you did not apply your changes,
  6348. ! allowing you to discard the changes or go back and apply them. Note
  6349. ! that the "Apply" button is inactive until a change is made.
  6350.   .PP
  6351.   The menus available from the "Search Type", "Sort Type", and "Nice
  6352.   Level" buttons on the
  6353. ***************
  6354. *** 298,303 ****
  6355. --- 341,353 ----
  6356.   flag. This option corresponds to the
  6357.   .B debugLevel
  6358.   resource.
  6359. + .IP "\fB-expert\fP"
  6360. + Tells
  6361. + .I xarchie
  6362. + not to confirm operations like quitting. This option corresponds to
  6363. + the
  6364. + .B expert
  6365. + resource.
  6366.   .IP "\fB-help\fP or \fB-?\fP"
  6367.   Prints the usage message summarizing
  6368.   .I xarchie
  6369. ***************
  6370. *** 389,394 ****
  6371. --- 439,451 ----
  6372.   or
  6373.   .B \-D
  6374.   options.
  6375. + .IP "\fBexpert\fP"
  6376. + Tells
  6377. + .I xarchie
  6378. + not to confirm operations like quitting. This resource can be set with
  6379. + the
  6380. + .B \-expert
  6381. + option.
  6382.   .IP "\fBtimeout\fP"
  6383.   Sets the initial timeout value, in seconds. The default is 4. This
  6384.   resource can be set on the Settings panel.
  6385. ***************
  6386. *** 407,412 ****
  6387. --- 464,480 ----
  6388.   action will use the "type" command to set the transfer type before
  6389.   retrieving the file.
  6390.   This resource can be set on the Settings panel.
  6391. + .IP "\fBsaveFormatOneLine\fP"
  6392. + If True, then the file written by the
  6393. + .B save-to-file()
  6394. + action will have one line per entry, in the format
  6395. + .ce
  6396. + mode size date host:location/file
  6397. + If False (the default), then the file format has hostnames starting at
  6398. + the start of the line, location names indented one tab, and file
  6399. + entries indented two tabs, all on separate lines. Hostnames and
  6400. + locations are only printed once.  The latter is more readable, the
  6401. + former may be more useful if the output is to be used by a program.
  6402.   .IP "\fBwidgets\fP"
  6403.   Specifies the widget hierarchy, as described below. This should be a
  6404.   whitespace-separated list of
  6405. ***************
  6406. *** 416,421 ****
  6407. --- 484,498 ----
  6408.   .I xarchie
  6409.   will fail with an error message if they are not. These are described
  6410.   in the next section.
  6411. + .IP "\fBmenus\fP"
  6412. + Due to problems with some versions of X, widgets of class EzMenu
  6413. + must be created separately from the others. Thus any entries that
  6414. + would normally go in the
  6415. + .B widgets
  6416. + resource with class EzMenu must instead be listed here. The format is
  6417. + the same as for the
  6418. + .B widgets
  6419. + resource.
  6420.   .IP "\fBsettingsWidgets\fP"
  6421.   Specifies the widget hierarchy for the popup settings pane. These
  6422.   widgets are not created until they are needed. The format is the same
  6423. ***************
  6424. *** 441,449 ****
  6425.           Paned outerPaned
  6426.               Form buttonForm
  6427.                   Command quitButton,queryButton
  6428. !                 Command ftpButton,searchButton
  6429. !                 Command sortButton,niceButton
  6430. !                 Command settingsButton
  6431.                   Label,AsciiText status{Label,Text}
  6432.               Paned innerPaned
  6433.                   Viewport hostView
  6434. --- 518,527 ----
  6435.           Paned outerPaned
  6436.               Form buttonForm
  6437.                   Command quitButton,queryButton
  6438. !                 Command abortButton
  6439. !                 Command saveButton,ftpButton
  6440. !                 Command searchButton,sortButton
  6441. !                 Command niceButton,settingButton
  6442.                   Label,AsciiText status{Label,Text}
  6443.               Paned innerPaned
  6444.                   Viewport hostView
  6445. ***************
  6446. *** 491,496 ****
  6447. --- 569,589 ----
  6448.   off to
  6449.   .I archie .
  6450.   The
  6451. + .I abortButton
  6452. + invokes the
  6453. + .B abort()
  6454. + action to interrupt the current query. (Note that
  6455. + .I xarchie
  6456. + looks for a widget with this name to sensitize and desensitize, so if
  6457. + you want the button be active only during queries, be sure to create it
  6458. + with this name.)
  6459. + The
  6460. + .I saveButton
  6461. + widget invokes the
  6462. + .B save-to-file()
  6463. + action which writes the currently displayed results to a file.
  6464. + Without "Shift", it prompts for the filename. With "Shift" it uses the
  6465. + current search term with ".lst" appended.  The
  6466.   .I ftpButton
  6467.   invokes the
  6468.   .B ftp()
  6469. ***************
  6470. *** 633,641 ****
  6471.   "-now" forms of these actions (see below), thereby removing the need
  6472.   to "Apply" the changes.
  6473.   .PP
  6474. ! Finally, two types of popup windows can appear. An Alert box signals
  6475. ! an error and blocks until clicked in; a Confirm box allows the user to
  6476. ! make a Yes/No decision. These have widget hierarchies
  6477.   
  6478.   .na
  6479.   .nf
  6480. --- 726,735 ----
  6481.   "-now" forms of these actions (see below), thereby removing the need
  6482.   to "Apply" the changes.
  6483.   .PP
  6484. ! Finally, three types of popup windows can appear. An Alert box signals
  6485. ! an error and blocks until clicked in, a Confirm box allows the user to
  6486. ! make a Yes/No decision, and a Dialog box allows the user to enter a
  6487. ! string. These have widget hierarchies:
  6488.   
  6489.   .na
  6490.   .nf
  6491. ***************
  6492. *** 642,655 ****
  6493.       TransientShell alertShell
  6494.           Dialog alertDialog
  6495.               Command okButton
  6496. ! .fi
  6497. ! .ad
  6498. ! and
  6499. ! .na
  6500. ! .nf
  6501.       TransientShell confirmShell
  6502.           Dialog confirmDialog
  6503.               Command yesButton,noButton
  6504.   .fi
  6505.   .ad
  6506.   respectively.
  6507. --- 736,749 ----
  6508.       TransientShell alertShell
  6509.           Dialog alertDialog
  6510.               Command okButton
  6511.       TransientShell confirmShell
  6512.           Dialog confirmDialog
  6513.               Command yesButton,noButton
  6514. +     TransientShell dialogShell
  6515. +         Dialog dialogDialog
  6516. +             Command okButton,cancelButton
  6517.   .fi
  6518.   .ad
  6519.   respectively.
  6520. ***************
  6521. *** 667,674 ****
  6522.   .IP \fBquit()\fP
  6523.   Exit
  6524.   .IR xarchie .
  6525. ! By default this is performed by clicking on the "Quit" button
  6526. ! (\fIquitButton\fP).
  6527.   .IP \fBquery()\fP
  6528.   Send the current contents of the "Search Term" text widget
  6529.   (\fIsearchText\fP) to
  6530. --- 761,772 ----
  6531.   .IP \fBquit()\fP
  6532.   Exit
  6533.   .IR xarchie .
  6534. ! Prompts for confirmation unless either an argument is passed to the
  6535. ! action procedure or the
  6536. ! .B expert
  6537. ! resource is True. By default this is called without arguments by
  6538. ! clicking on the "Quit" button (\fIquitButton\fP), and is called with
  6539. ! an argument to force exit if Shift-"Quit" is used.
  6540.   .IP \fBquery()\fP
  6541.   Send the current contents of the "Search Term" text widget
  6542.   (\fIsearchText\fP) to
  6543. ***************
  6544. *** 675,680 ****
  6545. --- 773,791 ----
  6546.   .IR xarchie .
  6547.   By default this is performed by clicking on the "Query" button
  6548.   (\fIqueryButton\fP).
  6549. + .IP \fBabort()\fP
  6550. + Aborts the current query at the soonest possible time. Has no effect
  6551. + is a query is not currently being processed. By default, this is
  6552. + performed by clicking on the "Abort" button (\fIabortButton\fP).
  6553. + .IP \fBsave-to-file()\fP
  6554. + Writes a file containing the information displayed in the browser.
  6555. + With no arguments, this action prompts for the filename to write to.
  6556. + With one argument, the argument is passed to
  6557. + .IR sprintf (3)
  6558. + together with the current search term to form the filename. By
  6559. + default, the "Save" button invokes \fBsave-to-file()\fP to prompt for
  6560. + the filename and Shift-"Save" invokes
  6561. + \fBsave-to-file(\fP"%s.lst"\fB)\fP.
  6562.   .IP \fBftp()\fP
  6563.   Attempts to fetch the currently selected file by anonymous ftp. It is
  6564.   currently an error if a file is not selected, and the selected file
  6565. ***************
  6566. *** 728,733 ****
  6567. --- 839,862 ----
  6568.   .IP \fBset-nice-level-now()\fP
  6569.   Sets the niceLevel immediately without waiting for
  6570.   .BR apply\-settings() .
  6571. + .PP
  6572. + \fBalert-ok()\fP
  6573. + .br
  6574. + \fBconfirm-yes()\fP
  6575. + .br
  6576. + \fBconfirm-no()\fP
  6577. + .br
  6578. + \fBdialog-ok()\fP
  6579. + .br
  6580. + \fBdialog-cancel()\fP
  6581. + .in +\n(INu
  6582. + These actions are registered for use with the Alert, Confirm, and
  6583. + Dialog popups.  Registering them for widgets that are not popups will
  6584. + at best have no effect.  These actions are invoked by default by the
  6585. + buttons on the popups.  As well, by default pressing Return in a
  6586. + Dialog popup's "value" sub-widget (where the value is entered) invokes
  6587. + \fBdialog-ok()\fP.
  6588. + .in
  6589.   .SH ENVIRONMENT
  6590.   .PP
  6591.   XAPPLRESDIR    - Directory containing
  6592. ***************
  6593. *** 791,794 ****
  6594.   The
  6595.   .I archie
  6596.   service was conceived of and implemented by Alan Emtage
  6597. ! (bajan@cs.mcgill.ca) and Peter Deutsch (peterd@expresso.cc.mcgill.ca).
  6598. --- 920,925 ----
  6599.   The
  6600.   .I archie
  6601.   service was conceived of and implemented by Alan Emtage
  6602. ! (bajan@cs.mcgill.ca), Peter Deutsch (peterd@expresso.cc.mcgill.ca),
  6603. ! and Bill Heelan (wheelan@cs.mcgill.ca).
  6604.