home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-06-14 | 50.4 KB | 1,656 lines |
- Newsgroups: comp.sources.x
- From: ferguson@cs.rochester.edu (George Ferguson)
- Subject: v20i040: xarchie - An X browser interface to Archie, v2.0.6, Part12/24
- Message-ID: <1993Jun15.223339.726@sparky.imd.sterling.com>
- X-Md4-Signature: 70cd40fc03f3f075291a975299592dec
- Sender: chris@sparky.imd.sterling.com (Chris Olson)
- Organization: Sterling Software
- Date: Tue, 15 Jun 1993 22:33:39 GMT
- Approved: chris@sparky.imd.sterling.com
-
- Submitted-by: ferguson@cs.rochester.edu (George Ferguson)
- Posting-number: Volume 20, Issue 40
- Archive-name: xarchie/part12
- Environment: X11
- Supersedes: xarchie: Volume 14, Issue 82-90
-
- Submitted-by: ferguson@cs.rochester.edu
- Archive-name: xarchie-2.0.6/part12
-
- #!/bin/sh
- # this is Part.12 (part 12 of xarchie-2.0.6)
- # do not concatenate these parts, unpack them in order with /bin/sh
- # file xarchie-2.0.6/hostname.c continued
- #
- if test ! -r _shar_seq_.tmp; then
- echo 'Please unpack part 1 first!'
- exit 1
- fi
- (read Scheck
- if test "$Scheck" != 12; then
- echo Please unpack part "$Scheck" next!
- exit 1
- else
- exit 0
- fi
- ) < _shar_seq_.tmp || exit 1
- if test ! -f _shar_wnt_.tmp; then
- echo 'x - still skipping xarchie-2.0.6/hostname.c'
- else
- echo 'x - continuing file xarchie-2.0.6/hostname.c'
- sed 's/^X//' << 'SHAR_EOF' >> 'xarchie-2.0.6/hostname.c' &&
- X else if (gethostname(hostname,sizeof(hostname)) != 0) {
- X fprintf(stderr,"gethostname failed -- you should set $HOSTNAME");
- X strcpy(hostname,"unknown.host");
- X } else if ((host=gethostbyname(hostname)) == NULL) {
- X fprintf(stderr,"gethostbyname failed -- you should set $HOSTNAME");
- X strcpy(hostname,"unknown.host");
- X } else {
- X strcpy(hostname,host->h_name);
- X }
- X return(hostname);
- }
- X
- #ifdef STANDALONE
- main()
- {
- X printf("%s\n",GetHostname());
- X exit(0);
- }
- #endif /* STANDALONE */
- X
- SHAR_EOF
- echo 'File xarchie-2.0.6/hostname.c is complete' &&
- chmod 0644 xarchie-2.0.6/hostname.c ||
- echo 'restore of xarchie-2.0.6/hostname.c failed'
- Wc_c="`wc -c < 'xarchie-2.0.6/hostname.c'`"
- test 1284 -eq "$Wc_c" ||
- echo 'xarchie-2.0.6/hostname.c: original size 1284, current size' "$Wc_c"
- rm -f _shar_wnt_.tmp
- fi
- # ============= xarchie-2.0.6/hostname.h ==============
- if test -f 'xarchie-2.0.6/hostname.h' -a X"$1" != X"-c"; then
- echo 'x - skipping xarchie-2.0.6/hostname.h (File already exists)'
- rm -f _shar_wnt_.tmp
- else
- > _shar_wnt_.tmp
- echo 'x - extracting xarchie-2.0.6/hostname.h (Text)'
- sed 's/^X//' << 'SHAR_EOF' > 'xarchie-2.0.6/hostname.h' &&
- /*
- X * hostname.h : Definition of "portable" hostname function
- X *
- X * George Ferguson, ferguson@cs.rochester.edu, 23 Apr 1993.
- X */
- X
- extern char *GetHostname();
- SHAR_EOF
- chmod 0644 xarchie-2.0.6/hostname.h ||
- echo 'restore of xarchie-2.0.6/hostname.h failed'
- Wc_c="`wc -c < 'xarchie-2.0.6/hostname.h'`"
- test 158 -eq "$Wc_c" ||
- echo 'xarchie-2.0.6/hostname.h: original size 158, current size' "$Wc_c"
- rm -f _shar_wnt_.tmp
- fi
- # ============= xarchie-2.0.6/inet_ntoa.c ==============
- if test -f 'xarchie-2.0.6/inet_ntoa.c' -a X"$1" != X"-c"; then
- echo 'x - skipping xarchie-2.0.6/inet_ntoa.c (File already exists)'
- rm -f _shar_wnt_.tmp
- else
- > _shar_wnt_.tmp
- echo 'x - extracting xarchie-2.0.6/inet_ntoa.c (Text)'
- sed 's/^X//' << 'SHAR_EOF' > 'xarchie-2.0.6/inet_ntoa.c' &&
- /* gf: Modified to use sprintf() rather than snprintf() */
- /*
- X * Copyright (c) 1983 Regents of the University of California.
- X * All rights reserved.
- X *
- X * Redistribution and use in source and binary forms, with or without
- X * modification, are permitted provided that the following conditions
- X * are met:
- X * 1. Redistributions of source code must retain the above copyright
- X * notice, this list of conditions and the following disclaimer.
- X * 2. Redistributions in binary form must reproduce the above copyright
- X * notice, this list of conditions and the following disclaimer in the
- X * documentation and/or other materials provided with the distribution.
- X * 3. All advertising materials mentioning features or use of this software
- X * must display the following acknowledgement:
- X * This product includes software developed by the University of
- X * California, Berkeley and its contributors.
- X * 4. Neither the name of the University nor the names of its contributors
- X * may be used to endorse or promote products derived from this software
- X * without specific prior written permission.
- X *
- X * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- X * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- X * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- X * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- X * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- X * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- X * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- X * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- X * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- X * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- X * SUCH DAMAGE.
- X */
- X
- #if defined(LIBC_SCCS) && !defined(lint)
- static char sccsid[] = "@(#)inet_ntoa.c 5.6 (Berkeley) 2/24/91";
- #endif /* LIBC_SCCS and not lint */
- X
- /*
- X * Convert network-format internet address
- X * to base 256 d.d.d.d representation.
- X */
- #include <sys/types.h>
- #include <netinet/in.h>
- #include <arpa/inet.h>
- #include <stdio.h>
- X
- char *
- inet_ntoa(in)
- X struct in_addr in;
- {
- X static char b[18];
- X register char *p;
- X
- X p = (char *)∈
- #define UC(b) (((int)b)&0xff)
- /* gf: Didn't want to use snprintf().
- X (void)snprintf(b, sizeof(b),
- X "%d.%d.%d.%d", UC(p[0]), UC(p[1]), UC(p[2]), UC(p[3]));
- X */
- X (void)sprintf(b,
- X "%d.%d.%d.%d", UC(p[0]), UC(p[1]), UC(p[2]), UC(p[3]));
- X return (b);
- }
- SHAR_EOF
- chmod 0644 xarchie-2.0.6/inet_ntoa.c ||
- echo 'restore of xarchie-2.0.6/inet_ntoa.c failed'
- Wc_c="`wc -c < 'xarchie-2.0.6/inet_ntoa.c'`"
- test 2560 -eq "$Wc_c" ||
- echo 'xarchie-2.0.6/inet_ntoa.c: original size 2560, current size' "$Wc_c"
- rm -f _shar_wnt_.tmp
- fi
- # ============= xarchie-2.0.6/m-defs.h ==============
- if test -f 'xarchie-2.0.6/m-defs.h' -a X"$1" != X"-c"; then
- echo 'x - skipping xarchie-2.0.6/m-defs.h (File already exists)'
- rm -f _shar_wnt_.tmp
- else
- > _shar_wnt_.tmp
- echo 'x - extracting xarchie-2.0.6/m-defs.h (Text)'
- sed 's/^X//' << 'SHAR_EOF' > 'xarchie-2.0.6/m-defs.h' &&
- /*
- X * menus.h : Defs for all the xarchie menus
- X *
- X * George Ferguson, ferguson@cs.rochester.edu, 23 Apr 1993.
- X */
- X
- extern void initFileMenu();
- X
- extern void initQueryMenu();
- X
- extern void initSettingsMenu();
- extern void updateSettingsMenuMarks();
- extern void setSearchMenuMark(),setSortMenuMark();
- extern void setNiceMenuMark(),setHostMenuMark();
- X
- extern void initFilePanelMenu();
- SHAR_EOF
- chmod 0644 xarchie-2.0.6/m-defs.h ||
- echo 'restore of xarchie-2.0.6/m-defs.h failed'
- Wc_c="`wc -c < 'xarchie-2.0.6/m-defs.h'`"
- test 379 -eq "$Wc_c" ||
- echo 'xarchie-2.0.6/m-defs.h: original size 379, current size' "$Wc_c"
- rm -f _shar_wnt_.tmp
- fi
- # ============= xarchie-2.0.6/m-file-panel.c ==============
- if test -f 'xarchie-2.0.6/m-file-panel.c' -a X"$1" != X"-c"; then
- echo 'x - skipping xarchie-2.0.6/m-file-panel.c (File already exists)'
- rm -f _shar_wnt_.tmp
- else
- > _shar_wnt_.tmp
- echo 'x - extracting xarchie-2.0.6/m-file-panel.c (Text)'
- sed 's/^X//' << 'SHAR_EOF' > 'xarchie-2.0.6/m-file-panel.c' &&
- /*
- X * m-file-panel.c : Save-load-write menu routines
- X *
- X * George Ferguson, ferguson@cs.rochester.edu, 23 Apr 1993.
- X */
- X
- #include <X11/Intrinsic.h>
- #include <X11/Xaw/SimpleMenu.h>
- #include <X11/Xaw/SmeBSB.h>
- #include <X11/StringDefs.h>
- #include "menu.h"
- #include "appres.h"
- #include "file-panel.h"
- X
- /*
- X * Functions defined here:
- X */
- void initFilePanelMenu();
- static void fileWriteModeMenuCallback();
- X
- /*
- X * Data defined here:
- X */
- static Widget fileWriteModeMenu;
- static SmeBSBObject fileWriteModeMenuItems[2];
- X
- static Boolean fileWriteModeValues [] = {
- X True, False
- };
- X
- /* - - - - - - - - */
- X
- void
- initFilePanelMenu()
- {
- X fileWriteModeMenu = createMenu("filePanelWriteModeMenu",
- X "filePanelWriteModeMenuItem",2,
- X fileWriteModeMenuItems,
- X fileWriteModeMenuCallback);
- }
- X
- /* - - - - - - - - */
- /* Callback procedures */
- X
- /*ARGSUSED*/
- static void
- fileWriteModeMenuCallback(w,client_data,call_data)
- Widget w;
- XXtPointer client_data; /* item */
- XXtPointer call_data; /* ignored */
- {
- X int item = (int)client_data;
- X
- X setIthItemMark(fileWriteModeMenuItems,item,
- X XtNumber(fileWriteModeMenuItems));
- X appResources.fileWriteOnePerLine = fileWriteModeValues[item];
- X updateFileWriteMode(appResources.fileWriteOnePerLine);
- }
- SHAR_EOF
- chmod 0644 xarchie-2.0.6/m-file-panel.c ||
- echo 'restore of xarchie-2.0.6/m-file-panel.c failed'
- Wc_c="`wc -c < 'xarchie-2.0.6/m-file-panel.c'`"
- test 1247 -eq "$Wc_c" ||
- echo 'xarchie-2.0.6/m-file-panel.c: original size 1247, current size' "$Wc_c"
- rm -f _shar_wnt_.tmp
- fi
- # ============= xarchie-2.0.6/m-file.c ==============
- if test -f 'xarchie-2.0.6/m-file.c' -a X"$1" != X"-c"; then
- echo 'x - skipping xarchie-2.0.6/m-file.c (File already exists)'
- rm -f _shar_wnt_.tmp
- else
- > _shar_wnt_.tmp
- echo 'x - extracting xarchie-2.0.6/m-file.c (Text)'
- sed 's/^X//' << 'SHAR_EOF' > 'xarchie-2.0.6/m-file.c' &&
- /*
- X * m-file.c : File menu routines
- X *
- X * George Ferguson, ferguson@cs.rochester.edu, 23 Apr 1993.
- X */
- X
- #include <X11/Intrinsic.h>
- #include <X11/Xaw/SimpleMenu.h>
- #include <X11/Xaw/SmeBSB.h>
- #include <X11/StringDefs.h>
- #include "xarchie.h"
- #include "menu.h"
- X
- /*
- X * Functions defined here:
- X */
- void initFileMenu();
- static void fileMenuCallback();
- X
- /*
- X * Data defined here:
- X */
- static Widget fileMenu;
- X
- /* - - - - - - - - */
- X
- void
- initFileMenu()
- {
- X fileMenu = createMenu("fileMenu","fileMenuItem",7,NULL,
- X fileMenuCallback);
- }
- X
- /* Callback procedure */
- X
- /*ARGSUSED*/
- static void
- fileMenuCallback(w,client_data,call_data)
- Widget w;
- XXtPointer client_data; /* item */
- XXtPointer call_data; /* ignored */
- {
- X int item = (int)client_data;
- X
- X switch (item) {
- X case 0: /* About */
- X XtCallActionProc(toplevel,"about",NULL,NULL,0);
- X break;
- X case 1: /* Open */
- X XtCallActionProc(toplevel,"browser-open-all",NULL,NULL,0);
- X break;
- X case 2: /* Get */
- X XtCallActionProc(toplevel,"ftp-get",NULL,NULL,0);
- X break;
- X case 3: /* Save */
- X XtCallActionProc(toplevel,"file-save",NULL,NULL,0);
- X break;
- X case 4: /* Load */
- X XtCallActionProc(toplevel,"file-load",NULL,NULL,0);
- X break;
- X case 5: /* Write */
- X XtCallActionProc(toplevel,"file-write",NULL,NULL,0);
- X break;
- X case 6: /* Quit */
- X XtCallActionProc(toplevel,"quit",NULL,NULL,0);
- X }
- }
- SHAR_EOF
- chmod 0644 xarchie-2.0.6/m-file.c ||
- echo 'restore of xarchie-2.0.6/m-file.c failed'
- Wc_c="`wc -c < 'xarchie-2.0.6/m-file.c'`"
- test 1381 -eq "$Wc_c" ||
- echo 'xarchie-2.0.6/m-file.c: original size 1381, current size' "$Wc_c"
- rm -f _shar_wnt_.tmp
- fi
- # ============= xarchie-2.0.6/m-query.c ==============
- if test -f 'xarchie-2.0.6/m-query.c' -a X"$1" != X"-c"; then
- echo 'x - skipping xarchie-2.0.6/m-query.c (File already exists)'
- rm -f _shar_wnt_.tmp
- else
- > _shar_wnt_.tmp
- echo 'x - extracting xarchie-2.0.6/m-query.c (Text)'
- sed 's/^X//' << 'SHAR_EOF' > 'xarchie-2.0.6/m-query.c' &&
- /*
- X * m-query.c : Query menu routines
- X *
- X * George Ferguson, ferguson@cs.rochester.edu, 23 Apr 1993.
- X */
- X
- #include <X11/Intrinsic.h>
- #include <X11/Xaw/SimpleMenu.h>
- #include <X11/Xaw/SmeBSB.h>
- #include <X11/StringDefs.h>
- #include "xarchie.h"
- #include "menu.h"
- X
- /*
- X * Functions defined here:
- X */
- void initQueryMenu();
- static void queryMenuCallback();
- X
- /*
- X * Data defined here:
- X */
- static Widget queryMenu;
- X
- /* - - - - - - - - */
- X
- void
- initQueryMenu()
- {
- X queryMenu = createMenu("queryMenu","queryMenuItem",3,NULL,
- X queryMenuCallback);
- }
- X
- /* Callback procedure */
- X
- /*ARGSUSED*/
- static void
- queryMenuCallback(w,client_data,call_data)
- Widget w;
- XXtPointer client_data; /* item */
- XXtPointer call_data; /* ignored */
- {
- X int item = (int)client_data;
- X
- X switch (item) {
- X case 0: /* Query term */
- X XtCallActionProc(toplevel,"query",NULL,NULL,0);
- X break;
- X case 1: /* Query host */
- X XtCallActionProc(toplevel,"query-host",NULL,NULL,0);
- X break;
- X case 2: /* Query location */
- X XtCallActionProc(toplevel,"query-location",NULL,NULL,0);
- X break;
- X }
- }
- SHAR_EOF
- chmod 0644 xarchie-2.0.6/m-query.c ||
- echo 'restore of xarchie-2.0.6/m-query.c failed'
- Wc_c="`wc -c < 'xarchie-2.0.6/m-query.c'`"
- test 1072 -eq "$Wc_c" ||
- echo 'xarchie-2.0.6/m-query.c: original size 1072, current size' "$Wc_c"
- rm -f _shar_wnt_.tmp
- fi
- # ============= xarchie-2.0.6/m-settings.c ==============
- if test -f 'xarchie-2.0.6/m-settings.c' -a X"$1" != X"-c"; then
- echo 'x - skipping xarchie-2.0.6/m-settings.c (File already exists)'
- rm -f _shar_wnt_.tmp
- else
- > _shar_wnt_.tmp
- echo 'x - extracting xarchie-2.0.6/m-settings.c (Text)'
- sed 's/^X//' << 'SHAR_EOF' > 'xarchie-2.0.6/m-settings.c' &&
- /*
- X * m-settings.c : Settings menu routines
- X *
- X * George Ferguson, ferguson@cs.rochester.edu, 23 Apr 1993.
- X */
- X
- #include <X11/Intrinsic.h>
- #include <X11/Xaw/SimpleMenu.h>
- #include <X11/Xaw/SmeBSB.h>
- #include <X11/StringDefs.h>
- #include <X11/IntrinsicP.h> /* Need rectangle part of SmeBSBObject */
- #include <X11/Xaw/SmeBSBP.h> /* See below, popupSubmenuAction() */
- #include "stringdefs.h"
- #include "menu.h"
- #include "xarchie.h"
- #include "types.h"
- #include "appres.h"
- #include "browser.h"
- #include "settings.h"
- #include "status.h"
- X
- /*
- X * Functions defined here:
- X */
- void initSettingsMenu();
- void updateSettingsMenuMarks();
- void setHostMenuMark(),setSearchMenuMark(),setSortMenuMark(),setNiceMenuMark();
- X
- static void settingsSubmenuAction();
- static void settingsMenuCallback();
- static void hostMenuCallback(),searchMenuCallback();
- static void sortMenuCallback(),niceMenuCallback();
- static void setHostMenuCallback(),setSearchMenuCallback();
- static void setSortMenuCallback(),setNiceMenuCallback();
- static void setAutoScrollMenuCallback();
- static void ftpTypeMenuCallback(),ftpPromptMenuCallback();
- static void ftpTraceMenuCallback(),ftpStripMenuCallback();
- X
- /*
- X * Data defined here:
- X */
- static Widget settingsMenu;
- static Widget hostMenu,searchMenu,sortMenu,niceMenu;
- static Widget setHostMenu,setSearchMenu,setSortMenu,setNiceMenu;
- static Widget setAutoScrollMenu;
- static Widget ftpTypeMenu,ftpPromptMenu,ftpTraceMenu,ftpStripMenu;
- static SmeBSBObject settingsMenuItems[5];
- static SmeBSBObject *hostMenuItems,searchMenuItems[7];
- static SmeBSBObject sortMenuItems[3],niceMenuItems[6];
- X
- static SearchType searchValues[] = {
- X GfExact, GfSubstr, GfSubcase, GfRegexp,
- X GfExactSubstr, GfExactSubcase, GfExactRegexp
- };
- static SortType sortValues[] = {
- X GfName, GfDate, GfWeight
- };
- static int niceValues[] = {
- X /* Default, Nice, Nicer, Very Nice, Extremely Nice, Nicest */
- X 0, 500, 1000, 5000, 10000, 32765
- };
- static Boolean autoScrollValues[] = {
- X True, False
- };
- X
- static char *ftpTypeValues[] = {
- X "binary", "ascii"
- };
- static Boolean ftpPromptValues[] = {
- X True, False
- };
- static Boolean ftpTraceValues[] = {
- X True, False
- };
- static Boolean ftpStripValues[] = {
- X True, False
- };
- X
- static XtActionsRec actionTable[] = {
- X { "settings-submenu", settingsSubmenuAction },
- };
- X
- /* - - - - - - - - */
- X
- void
- initSettingsMenu()
- {
- X /* Add action for popup submenus */
- X XtAppAddActions(appContext,actionTable,XtNumber(actionTable));
- X /* This is the main Settings menu */
- X settingsMenu = createMenu("settingsMenu","settingsMenuItem",5,
- X settingsMenuItems,settingsMenuCallback);
- X /* Special case for hostMenu so it's easy to change */
- X hostMenuItems = (SmeBSBObject *)XtCalloc(appResources.numHosts,
- X sizeof(SmeBSBObject));
- X hostMenu = createMenu("hostMenu","hostMenuItem",
- X appResources.numHosts,hostMenuItems,
- X hostMenuCallback);
- X setHostMenu = createMenu("setHostMenu","hostMenuItem",
- X appResources.numHosts,NULL,
- X setHostMenuCallback);
- X /* These are submenus of the Settings menu */
- X searchMenu = createMenu("searchMenu","searchMenuItem",7,searchMenuItems,
- X searchMenuCallback);
- X sortMenu = createMenu("sortMenu","sortMenuItem",3,sortMenuItems,
- X sortMenuCallback);
- X niceMenu = createMenu("niceMenu","niceMenuItem",6,niceMenuItems,
- X niceMenuCallback);
- X /* These are for the settings panel (same labels, different callbacks) */
- X setSearchMenu = createMenu("setSearchMenu","searchMenuItem",7,NULL,
- X setSearchMenuCallback);
- X setSortMenu = createMenu("setSortMenu","sortMenuItem",3,NULL,
- X setSortMenuCallback);
- X setNiceMenu = createMenu("setNiceMenu","niceMenuItem",6,NULL,
- X setNiceMenuCallback);
- X setAutoScrollMenu = createMenu("setAutoScrollMenu","setAutoScrollMenuItem",
- X 2,NULL,setAutoScrollMenuCallback);
- X ftpTypeMenu = createMenu("ftpTypeMenu","ftpTypeMenuItem",2,
- X NULL,ftpTypeMenuCallback);
- X ftpPromptMenu = createMenu("ftpPromptMenu","ftpPromptMenuItem",2,
- X NULL,ftpPromptMenuCallback);
- X ftpTraceMenu = createMenu("ftpTraceMenu","ftpTraceMenuItem",2,
- X NULL,ftpTraceMenuCallback);
- X ftpStripMenu = createMenu("ftpStripMenu","ftpStripMenuItem",2,
- X NULL,ftpStripMenuCallback);
- X /* Initialize the menu marks */
- X updateSettingsMenuMarks();
- }
- X
- /* - - - - - - - - */
- /* Action procedures */
- X
- /*
- X * This function expects to be called from a BtnMotion event in the
- X * settingsMenu ONLY. It looks after popping up the submenus, but only
- X * if we've pulled right at least a bit.
- X */
- /*ARGSUSED*/
- static void
- settingsSubmenuAction(widget,event,params,num_params)
- Widget widget;
- XXEvent *event;
- String *params;
- Cardinal *num_params;
- {
- X Arg args[2];
- X Widget parent,popup;
- X Window root,child;
- X int x,y,cx,cy,item,item_y;
- X Dimension w,h,item_h;
- X unsigned int buttons;
- X
- X /* Where'd the event occur? */
- X x = event->xmotion.x;
- X y = event->xmotion.y;
- X /* Check that it's in the menu */
- X XtSetArg(args[0],XtNwidth,&w);
- X XtSetArg(args[1],XtNheight,&h);
- X XtGetValues(widget,args,2);
- X if (x < 0 || x >= (int)w || y < 0 || y >= (int)h)
- X return;
- X /* Check that we've pulled right */
- X if (x < (int)w/2)
- X return;
- X /* It is, figure out which item it's in */
- X for (item=0; item < 4; item++) {
- X /* Can't do GetValues on XtNy, for some reason. Oh well. */
- X /* This is why we need those private header files above. */
- X item_y = settingsMenuItems[item]->rectangle.y;
- X item_h = settingsMenuItems[item]->rectangle.height;
- X if (item_y < y && item_y + (int)item_h > y)
- X break;
- X }
- X /* Some items have popups, some don't */
- X switch (item) {
- X case 0: popup = hostMenu;
- X break;
- X case 1: popup = searchMenu;
- X break;
- X case 2: popup = sortMenu;
- X break;
- X case 3: popup = niceMenu;
- X break;
- X default: return;
- X }
- X parent = XtParent(widget);
- X XQueryPointer(display,XtWindow(parent),
- X &root,&child,&x,&y,&cx,&cy,&buttons);
- X /* Put the mouse solidly in the window */
- X x -= 20;
- X y -= 20;
- X /* Position the menu */
- X XtSetArg(args[0],XtNx,x);
- X XtSetArg(args[1],XtNy,y);
- X XtSetValues(popup,args,2);
- X /* Pop it up */
- X XtPopup(popup,XtGrabExclusive);
- }
- X
- /* - - - - - - - - */
- /* Callback procedures */
- X
- /*ARGSUSED*/
- static void
- settingsMenuCallback(w,client_data,call_data)
- Widget w;
- XXtPointer client_data; /* item */
- XXtPointer call_data; /* ignored */
- {
- X int item = (int)client_data;
- X
- X switch (item) {
- X case 0: /* Archie Host */
- X case 1: /* Search Type */
- X case 2: /* Sort Type */
- X case 3: /* Nice Level */
- X break;
- X case 4: /* Other */
- X item = 0;
- X XtCallActionProc((Widget)w,"popup-settings",(XEvent*)NULL,
- X (String*)NULL,item);
- X break;
- X }
- }
- X
- /*ARGSUSED*/
- static void
- hostMenuCallback(w,client_data,call_data)
- Widget w;
- XXtPointer client_data; /* item */
- XXtPointer call_data; /* ignored */
- {
- X int item = (int)client_data;
- X Arg args[1];
- X char *str,*blank,c;
- X
- X setIthItemMark(hostMenuItems,item,appResources.numHosts);
- X XtSetArg(args[0],XtNlabel,&str);
- X XtGetValues((Widget)(hostMenuItems[item]),args,1);
- X if ((blank=index(str,' ')) != NULL) {
- X c = *blank;
- X *blank = '\0';
- X }
- X XtFree(appResources.archieHost);
- X appResources.archieHost = XtNewString(str);
- X if (blank != NULL)
- X *blank = c;
- X updateSettingsHost(appResources.archieHost);
- X status1("Set archie host to %s",appResources.archieHost);
- }
- X
- /*ARGSUSED*/
- static void
- searchMenuCallback(w,client_data,call_data)
- Widget w;
- XXtPointer client_data; /* item */
- XXtPointer call_data; /* ignored */
- {
- X int item = (int)client_data;
- X
- X setIthItemMark(searchMenuItems,item,XtNumber(searchMenuItems));
- X appResources.searchType = searchValues[item];
- X updateSettingsSearchType(appResources.searchType);
- X status1("Set search type to %s",
- X searchTypeToString(appResources.searchType));
- }
- X
- /*ARGSUSED*/
- static void
- sortMenuCallback(w,client_data,call_data)
- Widget w;
- XXtPointer client_data; /* item */
- XXtPointer call_data; /* ignored */
- {
- X int item = (int)client_data;
- X
- X setIthItemMark(sortMenuItems,item,XtNumber(sortMenuItems));
- X appResources.sortType = sortValues[item];
- X updateSettingsSortType(appResources.sortType);
- X resortBrowser();
- X status1("Set sort type to %s",sortTypeToString(appResources.sortType));
- }
- X
- /*ARGSUSED*/
- static void
- niceMenuCallback(w,client_data,call_data)
- Widget w;
- XXtPointer client_data; /* item */
- XXtPointer call_data; /* ignored */
- {
- X
- X int item = (int)client_data;
- X
- X setIthItemMark(niceMenuItems,item,XtNumber(niceMenuItems));
- X appResources.niceLevel = niceValues[item];
- X updateSettingsNiceLevel(appResources.niceLevel);
- X status1("Set nice level to %d",(char *)appResources.niceLevel);
- }
- X
- /*ARGSUSED*/
- static void
- setHostMenuCallback(w,client_data,call_data)
- Widget w;
- XXtPointer client_data; /* item */
- XXtPointer call_data; /* ignored */
- {
- X int item = (int)client_data;
- X Arg args[1];
- X char *str,*blank,c;
- X
- X XtSetArg(args[0],XtNlabel,&str);
- X XtGetValues((Widget)(hostMenuItems[item]),args,1);
- X if ((blank=index(str,' ')) != NULL) {
- X c = *blank;
- X *blank = '\0';
- X }
- X updateSettingsHost(str);
- X if (blank != NULL)
- X *blank = c;
- X setSettingsChangedFlag(True);
- }
- X
- /*ARGSUSED*/
- static void
- setSearchMenuCallback(w,client_data,call_data)
- Widget w;
- XXtPointer client_data; /* item */
- XXtPointer call_data; /* ignored */
- {
- X int item = (int)client_data;
- X
- X updateSettingsSearchType(searchValues[item]);
- X setSettingsChangedFlag(True);
- }
- X
- /*ARGSUSED*/
- static void
- setSortMenuCallback(w,client_data,call_data)
- Widget w;
- XXtPointer client_data; /* item */
- XXtPointer call_data; /* ignored */
- {
- X int item = (int)client_data;
- X
- X updateSettingsSortType(sortValues[item]);
- X setSettingsChangedFlag(True);
- }
- X
- /*ARGSUSED*/
- static void
- setNiceMenuCallback(w,client_data,call_data)
- Widget w;
- XXtPointer client_data; /* item */
- XXtPointer call_data; /* ignored */
- {
- X int item = (int)client_data;
- X
- X updateSettingsNiceLevel(niceValues[item]);
- X setSettingsChangedFlag(True);
- }
- X
- /*ARGSUSED*/
- static void
- setAutoScrollMenuCallback(w,client_data,call_data)
- Widget w;
- XXtPointer client_data; /* item */
- XXtPointer call_data; /* ignored */
- {
- X int item = (int)client_data;
- X
- X updateSettingsAutoScroll(autoScrollValues[item]);
- X setSettingsChangedFlag(True);
- }
- X
- /*ARGSUSED*/
- static void
- ftpTypeMenuCallback(w,client_data,call_data)
- Widget w;
- XXtPointer client_data; /* item */
- XXtPointer call_data; /* ignored */
- {
- X int item = (int)client_data;
- X
- X updateSettingsFtpType(ftpTypeValues[item]);
- X setSettingsChangedFlag(True);
- }
- X
- /*ARGSUSED*/
- static void
- ftpPromptMenuCallback(w,client_data,call_data)
- Widget w;
- XXtPointer client_data; /* item */
- XXtPointer call_data; /* ignored */
- {
- X int item = (int)client_data;
- X
- X updateSettingsFtpPrompt(ftpPromptValues[item]);
- X setSettingsChangedFlag(True);
- }
- X
- /*ARGSUSED*/
- static void
- ftpTraceMenuCallback(w,client_data,call_data)
- Widget w;
- XXtPointer client_data; /* item */
- XXtPointer call_data; /* ignored */
- {
- X int item = (int)client_data;
- X
- X updateSettingsFtpTrace(ftpTraceValues[item]);
- X setSettingsChangedFlag(True);
- }
- X
- /*ARGSUSED*/
- static void
- ftpStripMenuCallback(w,client_data,call_data)
- Widget w;
- XXtPointer client_data; /* item */
- XXtPointer call_data; /* ignored */
- {
- X int item = (int)client_data;
- X
- X updateSettingsFtpStrip(ftpStripValues[item]);
- X setSettingsChangedFlag(True);
- }
- X
- /* - - - - - - - - */
- X
- void
- updateSettingsMenuMarks()
- {
- X setHostMenuMark(appResources.archieHost);
- X setSearchMenuMark(appResources.searchType);
- X setSortMenuMark(appResources.sortType);
- X setNiceMenuMark(appResources.niceLevel);
- }
- X
- void
- setHostMenuMark(host)
- char *host;
- {
- X Arg args[1];
- X char *str;
- X int i;
- X
- X for (i=0; i < appResources.numHosts; i++) {
- X XtSetArg(args[0],XtNlabel,&str);
- X XtGetValues((Widget)(hostMenuItems[i]),args,1);
- X if (strncmp(str,host,strlen(host)) == 0)
- X break;
- X }
- X if (i < appResources.numHosts)
- X setIthItemMark(hostMenuItems,i,appResources.numHosts);
- X else
- X clearAllItemMarks(hostMenuItems,appResources.numHosts);
- }
- X
- void
- setSearchMenuMark(type)
- SearchType type;
- {
- X int i;
- X
- X for (i=0; i < XtNumber(searchValues) && searchValues[i] != type; i++)
- X /*EMPTY*/;
- X if (i < XtNumber(searchValues))
- X setIthItemMark(searchMenuItems,i,XtNumber(searchMenuItems));
- }
- X
- void
- setSortMenuMark(type)
- SortType type;
- {
- X int i;
- X
- X for (i=0; i < XtNumber(sortValues) && sortValues[i] != type; i++)
- X /*EMPTY*/;
- X if (i < XtNumber(sortValues))
- X setIthItemMark(sortMenuItems,i,XtNumber(sortMenuItems));
- }
- X
- void
- setNiceMenuMark(level)
- int level;
- {
- X int i;
- X
- X for (i=0; i < XtNumber(niceValues) && niceValues[i] != level; i++)
- X /*EMPTY*/;
- X if (i < XtNumber(niceValues))
- X setIthItemMark(niceMenuItems,i,XtNumber(niceMenuItems));
- X else
- X clearAllItemMarks(niceMenuItems,XtNumber(niceMenuItems));
- }
- SHAR_EOF
- chmod 0644 xarchie-2.0.6/m-settings.c ||
- echo 'restore of xarchie-2.0.6/m-settings.c failed'
- Wc_c="`wc -c < 'xarchie-2.0.6/m-settings.c'`"
- test 12891 -eq "$Wc_c" ||
- echo 'xarchie-2.0.6/m-settings.c: original size 12891, current size' "$Wc_c"
- rm -f _shar_wnt_.tmp
- fi
- # ============= xarchie-2.0.6/menu.c ==============
- if test -f 'xarchie-2.0.6/menu.c' -a X"$1" != X"-c"; then
- echo 'x - skipping xarchie-2.0.6/menu.c (File already exists)'
- rm -f _shar_wnt_.tmp
- else
- > _shar_wnt_.tmp
- echo 'x - extracting xarchie-2.0.6/menu.c (Text)'
- sed 's/^X//' << 'SHAR_EOF' > 'xarchie-2.0.6/menu.c' &&
- /*
- X * menu.c : Menu creation and manipulation routines
- X *
- X * George Ferguson, ferguson@cs.rochester.edu, 23 Apr 1993.
- X */
- X
- #include <stdio.h>
- #include <X11/Intrinsic.h>
- #include <X11/Xaw/SimpleMenu.h>
- #include <X11/Xaw/SmeBSB.h>
- #include <X11/StringDefs.h>
- #include <X11/bitmaps/xlogo11>
- extern Widget toplevel;
- X
- /*
- X * Functions defined here:
- X */
- void initMenuCreator();
- Widget createMenu();
- void clearAllItemMarks();
- void setIthItemMark();
- X
- /*
- X * Data defined here:
- X */
- static Pixmap checkmarkBitmap;
- X
- /* - - - - - - - - */
- X
- void
- initMenuCreator()
- {
- X checkmarkBitmap = XCreateBitmapFromData(XtDisplay(toplevel),
- X XDefaultRootWindow(XtDisplay(toplevel)),
- X xlogo11_bits,
- X xlogo11_width,xlogo11_height);
- }
- X
- /*
- X * createMenu : Creates menu named "name" with "numItems", each of which
- X * calls back to "callback". If "items" is non-NULL, then saves the
- X * items in it.
- X */
- Widget
- createMenu(name,item_basename,numItems,items,callback)
- char *name,*item_basename;
- int numItems;
- SmeBSBObject *items;
- XXtCallbackProc callback;
- {
- X Widget menu;
- X SmeBSBObject item;
- X char itemName[64];
- X int i;
- X
- X menu = XtCreatePopupShell(name,simpleMenuWidgetClass,toplevel,NULL,0);
- X for (i=0; i < numItems; i++) {
- X sprintf(itemName,"%s%d",item_basename,i);
- X item = (SmeBSBObject)XtCreateManagedWidget(itemName,smeBSBObjectClass,
- X menu,NULL,0);
- X if (items != NULL)
- X *(items+i) = item;
- X XtAddCallback((Widget)item,XtNcallback,callback,(XtPointer)i);
- X }
- X return(menu);
- }
- X
- /* - - - - - - - - */
- X
- void
- clearAllItemMarks(items,numItems)
- SmeBSBObject *items;
- int numItems;
- {
- X Arg args[1];
- X int i;
- X
- X for (i=0; i < numItems; i++) {
- X XtSetArg(args[0],XtNleftBitmap,None);
- X XtSetValues((Widget)(*(items+i)),args,1);
- X }
- }
- X
- void
- setIthItemMark(items,i,numItems)
- SmeBSBObject *items;
- int i,numItems;
- {
- X Arg args[1];
- X
- X clearAllItemMarks(items,numItems);
- X XtSetArg(args[0],XtNleftBitmap,checkmarkBitmap);
- X XtSetValues((Widget)(*(items+i)),args,1);
- }
- SHAR_EOF
- chmod 0644 xarchie-2.0.6/menu.c ||
- echo 'restore of xarchie-2.0.6/menu.c failed'
- Wc_c="`wc -c < 'xarchie-2.0.6/menu.c'`"
- test 1979 -eq "$Wc_c" ||
- echo 'xarchie-2.0.6/menu.c: original size 1979, current size' "$Wc_c"
- rm -f _shar_wnt_.tmp
- fi
- # ============= xarchie-2.0.6/menu.h ==============
- if test -f 'xarchie-2.0.6/menu.h' -a X"$1" != X"-c"; then
- echo 'x - skipping xarchie-2.0.6/menu.h (File already exists)'
- rm -f _shar_wnt_.tmp
- else
- > _shar_wnt_.tmp
- echo 'x - extracting xarchie-2.0.6/menu.h (Text)'
- sed 's/^X//' << 'SHAR_EOF' > 'xarchie-2.0.6/menu.h' &&
- /*
- X * menu.h : Menu creation rotuines
- X *
- X * George Ferguson, ferguson@cs.rochester.edu, 23 Apr 1993.
- X */
- X
- extern void initMenuCreator();
- X
- extern Widget createMenu(/* char *name, char *item_basename,
- X int numItems,
- X SmeBSBObject *items,
- X XtCallbackProc callback */);
- X
- extern void clearAllItemMarks(/* Object *items, int numItems */);
- extern void setIthItemMark(/* Object *items, int i, int numItems */);
- SHAR_EOF
- chmod 0644 xarchie-2.0.6/menu.h ||
- echo 'restore of xarchie-2.0.6/menu.h failed'
- Wc_c="`wc -c < 'xarchie-2.0.6/menu.h'`"
- test 421 -eq "$Wc_c" ||
- echo 'xarchie-2.0.6/menu.h: original size 421, current size' "$Wc_c"
- rm -f _shar_wnt_.tmp
- fi
- # ============= xarchie-2.0.6/patchlevel.h ==============
- if test -f 'xarchie-2.0.6/patchlevel.h' -a X"$1" != X"-c"; then
- echo 'x - skipping xarchie-2.0.6/patchlevel.h (File already exists)'
- rm -f _shar_wnt_.tmp
- else
- > _shar_wnt_.tmp
- echo 'x - extracting xarchie-2.0.6/patchlevel.h (Text)'
- sed 's/^X//' << 'SHAR_EOF' > 'xarchie-2.0.6/patchlevel.h' &&
- /*
- X * patchlevel.h : xarchie version control
- X *
- X * George Ferguson, ferguson@cs.rochester.edu, 19 Nov 1991.
- X * Version 2.0 : 23 Apr 1993.
- X * Version 2.0.1: 26 Apr 1993
- X * Version 2.0.2: 28 Apr 1993
- X * Version 2.0.3: 13 May 1993
- X * Version 2.0.4: 14 May 1993
- X * Version 2.0.5: 1 Jun 1993
- X * Version 2.0.6: 7 Jun 1993
- X */
- X
- #undef BETA
- #define VERSION 2.0
- #define PATCHLEVEL 6
- SHAR_EOF
- chmod 0644 xarchie-2.0.6/patchlevel.h ||
- echo 'restore of xarchie-2.0.6/patchlevel.h failed'
- Wc_c="`wc -c < 'xarchie-2.0.6/patchlevel.h'`"
- test 377 -eq "$Wc_c" ||
- echo 'xarchie-2.0.6/patchlevel.h: original size 377, current size' "$Wc_c"
- rm -f _shar_wnt_.tmp
- fi
- # ============= xarchie-2.0.6/pauthent.h ==============
- if test -f 'xarchie-2.0.6/pauthent.h' -a X"$1" != X"-c"; then
- echo 'x - skipping xarchie-2.0.6/pauthent.h (File already exists)'
- rm -f _shar_wnt_.tmp
- else
- > _shar_wnt_.tmp
- echo 'x - extracting xarchie-2.0.6/pauthent.h (Text)'
- sed 's/^X//' << 'SHAR_EOF' > 'xarchie-2.0.6/pauthent.h' &&
- /*
- X * Copyright (c) 1989, 1990, 1991 by the University of Washington
- X *
- X * For copying and distribution information, please see the file
- X * <copyright.h>.
- X *
- X * gf xarchie v2.0 - Sync with archie v1.4.1.
- X */
- X
- #include <copyright.h>
- X
- #define PFSA_UNAUTHENTICATED 1
- X
- struct pfs_auth_info {
- X char auth_type[100];
- X char authenticator[250];
- };
- X
- typedef struct pfs_auth_info *PAUTH;
- typedef struct pfs_auth_info PAUTH_ST;
- X
- PAUTH get_pauth();
- X
- #ifndef VMS
- # ifndef IN_H
- # ifdef PCNFS
- # include <tklib.h>
- # endif
- # ifndef _TYPES_
- # include <sys/types.h>
- # endif
- # include <netinet/in.h>
- # define IN_H
- # endif
- #else
- # ifndef _ARCHIE_VMS
- # include <vms.h>
- # endif
- #endif
- X
- struct client_info {
- X int ainfo_type;
- X char *auth_type;
- X char *authenticator;
- X char *userid;
- X short port;
- X struct in_addr haddr;
- X struct pfs_auth_info *previous;
- X struct pfs_auth_info *next;
- };
- X
- typedef struct client_info *CINFO;
- typedef struct client_info CINFO_ST;
- SHAR_EOF
- chmod 0644 xarchie-2.0.6/pauthent.h ||
- echo 'restore of xarchie-2.0.6/pauthent.h failed'
- Wc_c="`wc -c < 'xarchie-2.0.6/pauthent.h'`"
- test 987 -eq "$Wc_c" ||
- echo 'xarchie-2.0.6/pauthent.h: original size 987, current size' "$Wc_c"
- rm -f _shar_wnt_.tmp
- fi
- # ============= xarchie-2.0.6/pcompat.h ==============
- if test -f 'xarchie-2.0.6/pcompat.h' -a X"$1" != X"-c"; then
- echo 'x - skipping xarchie-2.0.6/pcompat.h (File already exists)'
- rm -f _shar_wnt_.tmp
- else
- > _shar_wnt_.tmp
- echo 'x - extracting xarchie-2.0.6/pcompat.h (Text)'
- sed 's/^X//' << 'SHAR_EOF' > 'xarchie-2.0.6/pcompat.h' &&
- /*
- X * Copyright (c) 1989, 1990 by the University of Washington
- X *
- X * For copying and distribution information, please see the file
- X * <copyright.h>.
- X */
- X
- #include <copyright.h>
- X
- /*
- X * pcompat.h - Definitions for compatability library
- X *
- X * This file contains the defintions used by the compatability
- X * library. Among the definitions are the possible values for
- X * pfs_disable_flag. This file also contains the external
- X * declaration of that variable. Note, however that the
- X * the module pfs_disable_flag.o is included in libpfs.a
- X * because some of the routines in that library set it.
- X * The only place it is checked, however, is in pfs_access,
- X * found in libpcompat.a
- X *
- X */
- X
- extern int pfs_default;
- extern int pfs_enable;
- X
- /* Definitions for values of pfs_enable */
- #define PMAP_DISABLE 0
- #define PMAP_ENABLE 1
- #define PMAP_COLON 2
- #define PMAP_ATSIGN_NF 3
- #define PMAP_ATSIGN 4
- X
- #define DISABLE_PFS(stmt) do {int DpfStmp; DpfStmp = pfs_enable;\
- X pfs_enable = PMAP_DISABLE; \
- X stmt; \
- X pfs_enable = DpfStmp;} while (0)
- X
- /* Definitions for PFS_ACCESS */
- #define PFA_MAP 0 /* Map the file name only */
- #define PFA_CREATE 1 /* Create file if not found */
- #define PFA_CRMAP 2 /* Map file name. Map to new name if not found */
- #define PFA_RO 4 /* Access to file is read only */
- X
- #define check_pfs_default() \
- X do { if (pfs_default == -1) get_pfs_default(); } while (0)
- SHAR_EOF
- chmod 0644 xarchie-2.0.6/pcompat.h ||
- echo 'restore of xarchie-2.0.6/pcompat.h failed'
- Wc_c="`wc -c < 'xarchie-2.0.6/pcompat.h'`"
- test 1512 -eq "$Wc_c" ||
- echo 'xarchie-2.0.6/pcompat.h: original size 1512, current size' "$Wc_c"
- rm -f _shar_wnt_.tmp
- fi
- # ============= xarchie-2.0.6/perrmesg.c ==============
- if test -f 'xarchie-2.0.6/perrmesg.c' -a X"$1" != X"-c"; then
- echo 'x - skipping xarchie-2.0.6/perrmesg.c (File already exists)'
- rm -f _shar_wnt_.tmp
- else
- > _shar_wnt_.tmp
- echo 'x - extracting xarchie-2.0.6/perrmesg.c (Text)'
- sed 's/^X//' << 'SHAR_EOF' > 'xarchie-2.0.6/perrmesg.c' &&
- /*
- X * Copyright (c) 1989, 1990, 1991 by the University of Washington
- X *
- X * For copying and distribution information, please see the file
- X * <copyright.h>.
- X */
- X
- #include <copyright.h>
- #include <perrno.h>
- #include <stdio.h>
- X
- /* This file and perrno.h should always be updated simultaneously */
- X
- int perrno = 0;
- int pwarn = 0;
- char p_err_string[P_ERR_STRING_SZ];
- char p_warn_string[P_ERR_STRING_SZ];
- X
- char *p_err_text[256] = {
- X /* 0 */ "Success (prospero)",
- X /* 1 */ "Port unknown (dirsend)",
- X /* 2 */ "Can't open local UDP port (dirsend)",
- X /* 3 */ "Can't resolve hostname (dirsend)",
- X /* 4 */ "Unable to send entire message (dirsend)",
- X /* 5 */ "Timed out (dirsend)",
- X /* 6 */ "Recvfrom failed (dirsend)",
- X /* 7 */ "", /* 8 */ "", /* 9 */ "", /* 10 */ "",
- X /* 11 */ "Sendto failed (reply)",
- X /* 12 */ "", /* 13 */ "", /* 14 */ "", /* 15 */ "",
- X /* 16 */ "", /* 17 */ "", /* 18 */ "", /* 19 */ "",
- X /* 20 */ "",
- X /* 21 */ "Link already exists (vl_insert)",
- X /* 22 */ "Link with same name already exists (vl_insert)",
- X /* 23 */ "", /* 24 */ "",
- X /* 25 */ "Link already exists (ul_insert)",
- X /* 26 */ "Replacing existing link (ul_insert)",
- X /* 27 */ "Previous entry not found in dir->ulinks (ul_insert)",
- X /* 28 */ "", /* 29 */ "", /* 30 */ "", /* 31 */ "",
- X /* 32 */ "", /* 33 */ "", /* 34 */ "", /* 35 */ "",
- X /* 36 */ "", /* 37 */ "", /* 38 */ "", /* 39 */ "",
- X /* 40 */ "",
- X /* 41 */ "Temporary not found (rd_vdir)",
- X /* 42 */ "Namespace not closed with object (rd_vdir)",
- X /* 43 */ "Alias for namespace not defined (rd_vdir)",
- X /* 44 */ "Specified namespace not found (rd_vdir)",
- X /* 45 */ "", /* 46 */ "", /* 47 */ "", /* 48 */ "",
- X /* 49 */ "", /* 50 */ "",
- X /* 51 */ "File access method not supported (pfs_access)",
- X /* 52 */ "", /* 53 */ "", /* 54 */ "",
- X /* 55 */ "Pointer to cached copy - delete on close (pmap_cache)",
- X /* 56 */ "Unable to retrieve file (pmap_cache)",
- X /* 57 */ "", /* 58 */ "", /* 59 */ "", /* 60 */ "",
- X /* 61 */ "Directory already exists (mk_vdir)",
- X /* 62 */ "Link with same name already exists (mk_vdir)",
- X /* 63 */ "", /* 64 */ "",
- X /* 65 */ "Not a virtual system (vfsetenv)",
- X /* 66 */ "Can't find directory (vfsetenv)",
- X /* 67 */ "", /* 68 */ "", /* 69 */ "", /* 70 */ "",
- X /* 71 */ "Link already exists (add_vlink)",
- X /* 72 */ "Link with same name already exists (add_vlink)",
- X /* 73 */ "", /* 74 */ "", /* 75 */ "", /* 76 */ "",
- X /* 77 */ "", /* 78 */ "", /* 79 */ "", /* 80 */ "",
- X /* 81 */ "", /* 82 */ "", /* 83 */ "", /* 84 */ "",
- X /* 85 */ "", /* 86 */ "", /* 87 */ "", /* 88 */ "",
- X /* 89 */ "", /* 90 */ "", /* 91 */ "", /* 92 */ "",
- X /* 93 */ "", /* 94 */ "", /* 95 */ "", /* 96 */ "",
- X /* 97 */ "", /* 98 */ "", /* 99 */ "", /* 100 */ "",
- X /* 101 */ "", /* 102 */ "", /* 103 */ "", /* 104 */ "",
- X /* 105 */ "", /* 106 */ "", /* 107 */ "", /* 108 */ "",
- X /* 109 */ "", /* 110 */ "", /* 111 */ "", /* 112 */ "",
- X /* 113 */ "", /* 114 */ "", /* 115 */ "", /* 116 */ "",
- X /* 117 */ "", /* 118 */ "", /* 119 */ "", /* 120 */ "",
- X /* 121 */ "", /* 122 */ "", /* 123 */ "", /* 124 */ "",
- X /* 125 */ "", /* 126 */ "", /* 127 */ "", /* 128 */ "",
- X /* 129 */ "", /* 130 */ "", /* 131 */ "", /* 132 */ "",
- X /* 133 */ "", /* 134 */ "", /* 135 */ "", /* 136 */ "",
- X /* 137 */ "", /* 138 */ "", /* 139 */ "", /* 140 */ "",
- X /* 141 */ "", /* 142 */ "", /* 143 */ "", /* 144 */ "",
- X /* 145 */ "", /* 146 */ "", /* 147 */ "", /* 148 */ "",
- X /* 149 */ "", /* 150 */ "", /* 151 */ "", /* 152 */ "",
- X /* 153 */ "", /* 154 */ "", /* 155 */ "", /* 156 */ "",
- X /* 157 */ "", /* 158 */ "", /* 159 */ "", /* 160 */ "",
- X /* 161 */ "", /* 162 */ "", /* 163 */ "", /* 164 */ "",
- X /* 165 */ "", /* 166 */ "", /* 167 */ "", /* 168 */ "",
- X /* 169 */ "", /* 170 */ "", /* 171 */ "", /* 172 */ "",
- X /* 173 */ "", /* 174 */ "", /* 175 */ "", /* 176 */ "",
- X /* 177 */ "", /* 178 */ "", /* 179 */ "", /* 180 */ "",
- X /* 181 */ "", /* 182 */ "", /* 183 */ "", /* 184 */ "",
- X /* 185 */ "", /* 186 */ "", /* 187 */ "", /* 188 */ "",
- X /* 189 */ "", /* 190 */ "", /* 191 */ "", /* 192 */ "",
- X /* 193 */ "", /* 194 */ "", /* 195 */ "", /* 196 */ "",
- X /* 197 */ "", /* 198 */ "", /* 199 */ "", /* 200 */ "",
- X /* 201 */ "", /* 202 */ "", /* 203 */ "", /* 204 */ "",
- X /* 205 */ "", /* 206 */ "", /* 207 */ "", /* 208 */ "",
- X /* 209 */ "", /* 210 */ "", /* 211 */ "", /* 212 */ "",
- X /* 213 */ "", /* 214 */ "", /* 215 */ "", /* 216 */ "",
- X /* 217 */ "", /* 218 */ "", /* 219 */ "", /* 220 */ "",
- X /* 221 */ "", /* 222 */ "", /* 223 */ "", /* 224 */ "",
- X /* 225 */ "", /* 226 */ "", /* 227 */ "", /* 228 */ "",
- X /* 229 */ "",
- X /* 230 */ "File not found (prospero)",
- X /* 231 */ "Directory not found (prospero)",
- X /* 232 */ "Symbolic links nested too deep (prospero)",
- X /* 233 */ "Environment not initialized - source vfsetup.source then run vfsetup",
- X /* 234 */ "Can't traverse an external file (prospero)",
- X /* 235 */ "Forwarding chain is too long (prospero)",
- X /* 236 */ "", /* 237 */ "", /* 238 */ "", /* 239 */ "",
- X /* 240 */ "", /* 241 */ "",
- X /* 242 */ "Authentication required (prospero server)",
- X /* 243 */ "Not authorized (prospero server)",
- X /* 244 */ "Not found (prospero server)",
- X /* 245 */ "Bad version number (prospero server)",
- X /* 246 */ "Not a directory (prospero server)",
- X /* 247 */ "Already exists (prospero server)",
- X /* 248 */ "Link with same name already exists (prospero server)",
- X /* 249 */ "", /* 250 */ "",
- X /* 251 */ "Command not implemented on server (dirsrv)",
- X /* 252 */ "Bad format for response (dirsrv)",
- X /* 253 */ "Protocol error (prospero server)",
- X /* 254 */ "Unspecified server failure (prospero server)",
- X /* 255 */ "Generic Failure (prospero)"};
- X
- char *p_warn_text[256] = {
- X /* 0 */ "No warning",
- X /* 1 */ "You are using an old version of this program",
- X /* 2 */ "From server",
- X /* 3 */ "Unrecognized line in response from server",
- X /* 4-254 */ "", "", "", "", "", "", "", "", "", "", "", "", "",
- X "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
- X "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
- X "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
- X "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
- X "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
- X "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
- X "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
- X "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
- X "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
- X "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
- X "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
- X "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
- X "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
- X "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
- X /* 255 */ ""};
- X
- #ifndef ARCHIE
- perrmesg(prefix,no,text)
- X char *prefix;
- X int no;
- X char *text;
- X {
- X fprintf(stderr,"%s%s%s%s\n", (prefix ? prefix : ""),
- X (no ? p_err_text[no] : p_err_text[perrno]),
- X ((text ? (*text ? " - " : "") :
- X (!no && *p_err_string ? " - " : ""))),
- X (text ? text : (no ? "" : p_err_string)));
- X }
- X
- sperrmesg(buf,prefix,no,text)
- X char *buf;
- X char *prefix;
- X int no;
- X char *text;
- X {
- X sprintf(buf,"%s%s%s%s\n", (prefix ? prefix : ""),
- X (no ? p_err_text[no] : p_err_text[perrno]),
- X ((text ? (*text ? " - " : "") :
- X (!no && *p_err_string ? " - " : ""))),
- X (text ? text : (no ? "" : p_err_string)));
- X }
- X
- pwarnmesg(prefix,no,text)
- X char *prefix;
- X int no;
- X char *text;
- X {
- X fprintf(stderr,"%s%s%s%s\n", (prefix ? prefix : ""),
- X (no ? p_warn_text[no] : p_warn_text[pwarn]),
- X ((text ? (*text ? " - " : "") :
- X (!no && *p_warn_string ? " - " : ""))),
- X (text ? text : (no ? "" : p_warn_string)));
- X }
- X
- spwarnmesg(buf,prefix,no,text)
- X char *buf;
- X char *prefix;
- X int no;
- X char *text;
- X {
- X sprintf(buf,"%s%s%s%s\n", (prefix ? prefix : ""),
- X (no ? p_warn_text[no] : p_warn_text[pwarn]),
- X ((text ? (*text ? " - " : "") :
- X (!no && *p_warn_string ? " - " : ""))),
- X (text ? text : (no ? "" : p_warn_string)));
- X }
- #endif
- SHAR_EOF
- chmod 0644 xarchie-2.0.6/perrmesg.c ||
- echo 'restore of xarchie-2.0.6/perrmesg.c failed'
- Wc_c="`wc -c < 'xarchie-2.0.6/perrmesg.c'`"
- test 9027 -eq "$Wc_c" ||
- echo 'xarchie-2.0.6/perrmesg.c: original size 9027, current size' "$Wc_c"
- rm -f _shar_wnt_.tmp
- fi
- # ============= xarchie-2.0.6/perrno.h ==============
- if test -f 'xarchie-2.0.6/perrno.h' -a X"$1" != X"-c"; then
- echo 'x - skipping xarchie-2.0.6/perrno.h (File already exists)'
- rm -f _shar_wnt_.tmp
- else
- > _shar_wnt_.tmp
- echo 'x - extracting xarchie-2.0.6/perrno.h (Text)'
- sed 's/^X//' << 'SHAR_EOF' > 'xarchie-2.0.6/perrno.h' &&
- /*
- X * Copyright (c) 1989, 1990 by the University of Washington
- X *
- X * For copying and distribution information, please see the file
- X * <copyright.h>.
- X */
- X
- #include <copyright.h>
- X
- /* This file and perrmesg.c should be updated simultaneously. */
- X
- /*
- X * perrno.h - definitions for perrno
- X *
- X * This file contains the declarations and defintions of of the external
- X * error values in which errors are returned by the pfs and psrv
- X * libraries.
- X */
- X
- #define P_ERR_STRING_SZ 100 /* Size of error string */
- X
- extern int perrno;
- extern char p_err_string[];
- extern char *p_err_text[];
- X
- extern int pwarn;
- extern char p_warn_string[];
- extern char *p_warn_text[];
- X
- /* Error codes returned or found in verrno */
- X
- #ifndef PSUCCESS
- #define PSUCCESS 0
- #endif
- X
- /* dirsend (perrno) */
- #define DIRSEND_PORT_UNKN 1 /* DIRSRV UDP port unknown */
- #define DIRSEND_UDP_CANT 2 /* Can't open local UDP port */
- #define DIRSEND_BAD_HOSTNAME 3 /* Can't resolve hostname */
- #define DIRSEND_NOT_ALL_SENT 4 /* Didn't send entire message */
- #define DIRSEND_SELECT_FAILED 5 /* Select failed */
- #define DIRSEND_BAD_RECV 6 /* Recvfrom failed */
- X
- /* reply */
- #define REPLY_NOTSENT 11 /* Reply: sendto failed */
- X
- /* vl_insert */
- #define VL_INSERT_ALREADY_THERE 21 /* Link already exists */
- #define VL_INSERT_CONFLICT 22 /* Link exists with same name */
- X
- /* ul_insert */
- #define UL_INSERT_ALREADY_THERE 25 /* Link already exists */
- #define UL_INSERT_SUPERSEDING 26 /* Replacing existing link */
- #define UL_INSERT_POS_NOTFOUND 27 /* Prv entry not in dir->ulinks */
- X
- /* rd_vdir */
- #define RVD_DIR_NOT_THERE 41 /* Temporary NOT_FOUND */
- #define RVD_NO_CLOSED_NS 42 /* Namespace not closed w/ object:: */
- #define RVD_NO_NS_ALIAS 43 /* No alias for namespace NS#: */
- #define RVD_NS_NOT_FOUND 44 /* Specified namespace not found */
- X
- /* pfs_access */
- #define PFSA_AM_NOT_SUPPORTED 51 /* Access method not supported */
- X
- /* pmap_cache */
- #define PMC_DELETE_ON_CLOSE 55 /* Delete cached copy on close */
- #define PMC_RETRIEVE_FAILED 56 /* Unable to retrieve file */
- X
- /* mk_vdir */
- /* #define MKVD_ALREADY_EXISTS 61 /* Directory already exists */
- /* #define MKVD_NAME_CONFLICT 62 /* Link with name already exists */
- X
- /* vfsetenv */
- #define VFSN_NOT_A_VS 65 /* Not a virtual system */
- #define VFSN_CANT_FIND_DIR 66 /* Not a virtual system */
- X
- /* add_vlink */
- /* #define ADDVL_ALREADY_EXISTS 71 /* Directory already exists */
- /* #define ADDVL_NAME_CONFLICT 72 /* Link with name already exists */
- X
- /* Local error codes on server */
- X
- /* dsrdir */
- #define DSRDIR_NOT_A_DIRECTORY 111 /* Not a directory name */
- /* dsrfinfo */
- #define DSRFINFO_NOT_A_FILE 121 /* Object not found */
- #define DSRFINFO_FORWARDED 122 /* Object has moved */
- X
- /* Error codes that may be returned by various procedures */
- #define PFS_FILE_NOT_FOUND 230 /* File not found */
- #define PFS_DIR_NOT_FOUND 231 /* Directory in path not found */
- #define PFS_SYMLINK_DEPTH 232 /* Max sym-link depth exceeded */
- #define PFS_ENV_NOT_INITIALIZED 233 /* Can't read environment */
- #define PFS_EXT_USED_AS_DIR 234 /* Can't use externals as dirs */
- #define PFS_MAX_FWD_DEPTH 235 /* Exceeded max forward depth */
- X
- /* Error codes returned by directory server */
- /* some of these duplicate errors from individual routines */
- /* some of those error codes should be eliminated */
- #define DIRSRV_AUTHENT_REQ 242 /* Authentication required */
- #define DIRSRV_NOT_AUTHORIZED 243 /* Not authorized */
- #define DIRSRV_NOT_FOUND 244 /* Not found */
- #define DIRSRV_BAD_VERS 245
- #define DIRSRV_NOT_DIRECTORY 246
- #define DIRSRV_ALREADY_EXISTS 247 /* Identical link already exists */
- #define DIRSRV_NAME_CONFLICT 248 /* Link with name already exists */
- X
- #define DIRSRV_UNIMPLEMENTED 251 /* Unimplemented command */
- #define DIRSRV_BAD_FORMAT 252
- #define DIRSRV_ERROR 253
- #define DIRSRV_SERVER_FAILED 254 /* Unspecified server failure */
- X
- #ifndef PFAILURE
- #define PFAILURE 255
- #endif
- X
- /* Warning codes */
- X
- #define PNOWARN 0 /* No warning indicated */
- #define PWARN_OUT_OF_DATE 1 /* Software is out of date */
- #define PWARN_MSG_FROM_SERVER 2 /* Warning in p_warn_string */
- #define PWARN_UNRECOGNIZED_RESP 3 /* Unrecognized line in response */
- #define PWARNING 255 /* Warning in p_warn_string */
- SHAR_EOF
- chmod 0644 xarchie-2.0.6/perrno.h ||
- echo 'restore of xarchie-2.0.6/perrno.h failed'
- Wc_c="`wc -c < 'xarchie-2.0.6/perrno.h'`"
- test 4623 -eq "$Wc_c" ||
- echo 'xarchie-2.0.6/perrno.h: original size 4623, current size' "$Wc_c"
- rm -f _shar_wnt_.tmp
- fi
- # ============= xarchie-2.0.6/pfs.h ==============
- if test -f 'xarchie-2.0.6/pfs.h' -a X"$1" != X"-c"; then
- echo 'x - skipping xarchie-2.0.6/pfs.h (File already exists)'
- rm -f _shar_wnt_.tmp
- else
- > _shar_wnt_.tmp
- echo 'x - extracting xarchie-2.0.6/pfs.h (Text)'
- sed 's/^X//' << 'SHAR_EOF' > 'xarchie-2.0.6/pfs.h' &&
- /*
- X * Copyright (c) 1989, 1990, 1991 by the University of Washington
- X *
- X * For copying and distribution information, please see the file
- X * <copyright.h>.
- X *
- X * xarchie v2.0 - gf - Sync with archie v1.4.1.
- X * v1.3.2 - bpk - for Archie client 1.3.2, except gf ZERO->BZERO
- X * v1.1.3 - gf 11/02/91 - renamed ZERO() to BZERO() for X
- X * v1.1.2 - bpk 08/30/91 - added VMS support
- X * v1.1.1 - bpk 08/20/91 - 4.2 -> 4.2B
- X */
- #ifndef PFS_H
- #define PFS_H
- #include <copyright.h>
- X
- #ifdef PCNFS
- #include <tklib.h>
- #include <tk_errno.h>
- #include <sys/nfs_time.h>
- #endif
- #ifdef VMS
- # include <vms.h>
- #else /* not VMS */
- # ifndef _TYPES_
- # include <sys/types.h>
- # endif /* _TYPES_ */
- # ifndef IN_H
- # include <netinet/in.h>
- # define IN_H
- # endif
- #endif /* VMS */
- X
- #ifndef NULL
- # ifdef MSDOS
- SHAR_EOF
- true || echo 'restore of xarchie-2.0.6/pfs.h failed'
- fi
- echo 'End of xarchie-2.0.6 part 12'
- echo 'File xarchie-2.0.6/pfs.h is continued in part 13'
- echo 13 > _shar_seq_.tmp
- exit 0
-
- exit 0 # Just in case...
- --
- // chris@IMD.Sterling.COM | Send comp.sources.x submissions to:
- \X/ Amiga - The only way to fly! | sources-x@imd.sterling.com
- "It's intuitively obvious to the |
- most casual observer..." | GCS d+/-- p+ c++ l+ m+ s++/+ g+ w+ t+ r+ x+
-