[comp.sys.sun] sun-spots v5n24

sklower@VANGOGH.BERKELEY.EDU (Keith Sklower) (07/15/87)

From rif@rice.edu Tue Jul 14 12:31:05 1987
Received: from RICE.EDU by vangogh.Berkeley.EDU (5.58/1.25)
	id AA14565; Tue, 14 Jul 87 12:30:43 PDT
Received: from eos.rice.edu by rice.edu (AA15662); Tue, 14 Jul 87 14:29:00 CDT
Received: by eos.rice.edu (AA09057); Tue, 14 Jul 87 14:28:44 CDT
Date: Tue, 14 Jul 87 14:28:44 CDT
From: Vicky Riffle <rif@rice.edu>
Message-Id: <8707141928.AA09057@eos.rice.edu>
To: sklower@vangogh.Berkeley.EDU
Subject: sun-spots v5n24
Status: R

SUN-SPOTS DIGEST          Thursday, 9 July 1987       Volume 5 : Issue 24

Today's Topics:
              Re:  plot(1) filter -- Sun-Spots Digest, v5n23
               Expanded menus for 3.X shelltool (very long)
                                Smalltalk
                   Cipher 890 tape drive on Sun-3/280?
                                X Windows?
                  bitblt to offscreen bitmap in SUN CGI?
                 Latex previewer and Sun interest group?
                  is there a TeX previewer for the sun?
                         Sun 3/50 edge card info?
               Why does icon die if built with cc -f68881?
                             Sun-3 keyboards?
                     sun 3 client on a sun 2 server?
                       How to write a SCSI driver?
                           NFS daemon problems?

------------------------------------------------------------------------

Date: Wed, 8 Jul 87 14:33:21 EDT
From: jacob@nrl-rjkj.arpa (Rob Jacob)
Subject: Re:  plot(1) filter -- Sun-Spots Digest, v5n23

Saw your msg in sun-spots.  I always wondered why there wasn't a plot
filter for sunwindows, it seemed like there should be.  I have written
a quite modest one, which I used to use on ver. 2 of sun OS.  I just
tried it and it still compiles and runs on ver. 3, but it is written
with the old style sun windows calls from ver. 2, so the code is not as
pretty as it could be.  I'll attach the code to the end of this
message, hope it's useful.  [CODE DELETED from Sun-spots copy --
send me a msg if you want it]  (Another, fairly clumsy solution is to
run sun's "tektool" and then run tektronix plot filter "tek" in the
window).

Good luck,
Rob Jacob

ARPA:	jacob@nrl-css.arpa
UUCP:	...!decvax!nrl-css!jacob
SNAIL:	Code 5590, Naval Research Lab, Washington, D.C. 20375

------------------------------

Date: Mon, 06 Jul 87 16:31:35 EDT
From: ted@braggvax.arpa (Ted Nolan)
Subject: Expanded menus for 3.X shelltool (very long)

Here's a little project I've been working with off and on for a while.  I
don't know why Sun hasn't done something similar, maybe they will sometime in
4.X.  I just got it going under 3.X (I had something similar under 2.2, but
it needed adb patches too grotty to post).  I welcome (constructive) comments
(including "Hey there's already an easy way to do this").

Stretch your window, and you should be able to read the sharred README file below 
easily.

				Ted Nolan
				ted@braggvax.arpa

-----------------------------------CUT HERE----------------------------------
#! /bin/sh
# This is a shell archive, meaning:
# 1. Remove everything above the #! /bin/sh line.
# 2. Save the resulting text in a file.
# 3. Execute the file with /bin/sh (not csh) to create the files:
#	README
#	bragg_menu.c
#	Makefile.pat
#	basetools.h.pat
#	shelltool.c.pat
#	toolmerge.c.pat
#	walkmenurc.5
#	walkmenurc
#	picktool.c
#	picktool.icon
#	delete
#	expunge
#	print
#	type
#	undelete
#	domove
# This archive created: Mon Jul  6 16:19:08 1987
export PATH; PATH=/bin:$PATH
echo shar: extracting "'README'" '(2286 characters)'
if test -f 'README'
then
	echo shar: will not over-write existing file "'README'"
else
sed 's/^	X//' << \SHAR_EOF > 'README'
	XThis shell archive contains the files necessary to compile the bragg menu
	Xsystem for a Sun running 3.X.  Unlike previous versions, it needs no adb
	Xpatches, but it does rely on one unsupported include file.  The whole thing
	Xwas programmed by someone (me) with very little idea how SunView really works,
	Xso there may be eaiser ways to twist its tail to get it to do what I wanted 
	Xdone here.
	X
	XThe basic premise of the bragg menu system is that the tty subwindow is
	Xwhere all the "action" in Unix systems has traditionally taken place
	Xand that this venue is more or less currently ignored by Suntools.  The
	Xstragegy taken is to provide a per user customizable menu startup file
	Xwhich specifies constant strings to be "stuffed" into a shelltool
	Xwindow.  It is then possible to make up menus to help with
	Xspreadsheets, editors, file management, mailers and many other things.
	XA mouse need no longer just get in the way in tty subwindows.
	X
	XAlso included (though not really related to the menu system) is a handy tool
	Xcalled "picktool" that is a mouse based version of the pick command from
	XKernighan and Pike's _The Unix Programming Environment_.  Anyone who understands
	XSunView is welcome to add scrollbars (really needed) and other bells and
	Xwhistles to it.  A simple file management system implemented with picktool and
	Xthe menu system is included as an example.
	X
	XTo extract everything, cut off the extraneous lines and feed this file to
	X/bin/sh.  In the /usr/src/sun/suntool directory, use Larry Wall's patch
	Xprogram, or manually apply the .pat files to the original sources from sun. 
	X
	XType 
	X	make braggtools
	X
	XPut the resulting "suntools" binary somewhere in your path before the standard
	Xsuntools binary (or replace that binary with it).  Make the appropriate
	Xsymbolic links for shelltool, picktool etc.  Copy the supplied walkmenurc file
	Xto /usr/local/lib (or $HOME/.walkmenurc) and crank up the new suntools.
	XIf you want to try the "filer", put all the little shell files somewhere in
	Xyour path too.
	X
	XI would be interested in hearing any comments (that are more constructive than 
	X"this stinks"), bug reports, or enhancement suggestions.  It would be 
	Xespecially nice if you would make your own bug fixes and enhancements and
	Xtell me about them.
	X
	X
	X				Ted Nolan
	X				ted@braggvax.arpa
SHAR_EOF
if test 2286 -ne "`wc -c < 'README'`"
then
	echo shar: error transmitting "'README'" '(should have been 2286 characters)'
fi
fi # end of overwriting check
echo shar: extracting "'bragg_menu.c'" '(10917 characters)'
if test -f 'bragg_menu.c'
then
	echo shar: will not over-write existing file "'bragg_menu.c'"
else
sed 's/^	X//' << \SHAR_EOF > 'bragg_menu.c'
	X/*
	X * This file attempts to provide a flexible user defined menu interface to the
	X * Sunview shelltool (see walkmenurc.1).  The basic idea is to construct 
	X * multiple, constant value stuff buffers which each have a menu entry.
	X *
	X * One unsupported feature is used.
	X *
	X * Bear in mind that I don't understand Sunview - I'm just kicking it to make
	X * it do what I want.
	X */
	X#include <stdio.h>
	X#include <ctype.h>
	X#include <strings.h>
	X#include <pwd.h>
	X
	X/*
	X * It is certainly possible that some of these are not needed...
	X */
	X
	X#include <sys/types.h>
	X#include <sys/time.h>
	X#include <pixrect/pixrect.h>
	X#include <pixrect/pixfont.h>
	X#include <sunwindow/rect.h>
	X#include <sunwindow/win_input.h>
	X#include <suntool/.UNSUPPORTED.ttysw_impl.h>	/* WARNING  WARNING */
	X#include <suntool/tty.h>
	X#include <suntool/ttysw.h>
	X#include <suntool/walkmenu.h>
	X#include <suntool/menu.h>
	X/*
	X * Local Constants - customize as desired
	X */
	X
	X#define INSIZE 132	/* No line in the menu file should be this long*/
	X#define WALKMENURC	"walkmenurc"
	X#define WALKMENULIB	"/usr/local/lib"
	X#define WALKMENULABEL	"Expanded Functions"
	X
	Xstatic struct ttysubwindow *ttysw;
	X
	X/*
	X * bragg_menu_init()
	X *
	X *	This function is called once during shelltool startup.  It reads the
	X *	menu startup file, creates the specified menus and appends a 
	X *	pullright to them onto the bottom of the regular shelltool menu.
	X *	Anytime before we do this we may return, without any harm done 
	X *	except for a little memory wasted.
	X */
	Xvoid
	Xbragg_menu_init(sw)
	X        Tty sw;
	X{
	X
	X
	X	Menu	*bragg_menus;	/* Handle array for all the menus we create*/
	X	int     cur_menu = -1;	/* Ordinal number of menu we are building */
	X	int	cur_line = 0;	/* What line of the rcfile are we handling? */
	X	FILE    *rcfile;	/* File pointer for reading rcfile */
	X	int	num_menus;	/* How many menus does the rcfile specify */
	X	int	i;		/* Counter */
	X	char	*equals;	/* Pointer to the character '=' in a menu */
	X				/* specification string*/
	X	char	inbuf[INSIZE];	/* Read input lines into here */
	X	int	pullno;		/* Ordinal number of a menu to be attached as*/
	X				/* a pullright */
	X	char	*main_label = WALKMENULABEL;	/* The pullright label for */
	X						/* the whole shebang */
	X	
	X	void	bragg_menu_stuff();	/* procedure for doing "stuff" */
	X	void	bragg_seln_stuff();	/* do an ordinary stuff */
	X	char	*parse_escape();	/* expand \ escapes */
	X	FILE	*open_rcfile();		/* find and open the startup file */
	X	char	*strsave();		/* Famous K&R routine */
	X
	X/*
	X * We know sw from the main shelltool code.  We can coerce this into
	X * becoming what we really want which is a ttysw pointer.
	X */
	X	ttysw = (struct ttysubwindow *) sw;
	X
	X/*
	X * We open the startup file, if possible.  If not, we 
	X * silently do nothing.
	X */
	X	if( (rcfile = open_rcfile()) == (FILE *) 0)
	X		return;			/*maybe should print error mesg? */
	X
	X/*
	X * We need to know the number of menus we will have so we can 
	X * malloc enough space for the array.  This makes the parse procedure
	X * 2 pass - oh well.  Could use realloc I guess to avoid this.
	X */
	X	if( (num_menus = count_menus(rcfile)) <= 0){
	X		fprintf(stderr,"Bad rcfile: no menus\n");
	X		return;
	X	}
	X
	X/*
	X * Allocate an array for our menu handles
	X */
	X	bragg_menus = (Menu *) malloc( (unsigned) ( num_menus * sizeof (Menu)));
	X	if(bragg_menus == (Menu *) 0) {
	X		fprintf(stderr,"Can't allocate memory for menus\n");
	X		return;
	X	}
	X
	X/*
	X * Create the (empty) menus
	X */
	X	for(i = 0; i < num_menus; i++)
	X		bragg_menus[i] = menu_create(0);
	X
	X/*
	X * main loop: do till EOF
	X */
	X	while(fgets(inbuf, sizeof inbuf, rcfile) != (char *) 0){
	X		
	X		++cur_line;
	X		inbuf[strlen(inbuf) -1] = '\0';		/* Zap Newline */
	X
	X		if(inbuf[0] == '#')		/* comment line */
	X			continue;
	X
	X		if(! strncmp(inbuf,"%FAMILY",7)) /* backwards compatability*/
	X			continue;
	X
	X		if(! strncmp(inbuf,"%MAINLABEL",10)){
	X			main_label = strsave(inbuf+11);
	X			continue;
	X		}
	X
	X		if(! strncmp(inbuf,"%MENU",5)){
	X			cur_menu++;
	X			continue;
	X		}
	X
	X/*
	X * Must be an '=' somewhere. No other sanity check is done
	X */
	X		if( (equals = index(inbuf,'=')) == (char *) 0){
	X			fprintf(stderr,"Syntax error line %d <%s>\n",
	X				cur_line,inbuf);
	X			return;
	X		}
	X
	X/*
	X * Inserting \0 over the '=' create 2 strings, the label string and the
	X * string to be stuffed.
	X */
	X		*equals = '\0';			/* Null out '=', split string*/
	X
	X/*
	X * Unfortunately, the \p and \s escape have to be handled
	X * explicitly here since they behave differently from the
	X * other escapes (and require different type ITEMS)
	X */
	X		if(! strncmp(equals+1,"\\p",2)){	/*pull right */
	X			if(sscanf(equals+3,"%d",&pullno) != 1){
	X				fprintf(stderr,"Bad menu number line %d <%s>\n",
	X					cur_line,equals+3);
	X				return;
	X			}
	X
	X			menu_set(bragg_menus[cur_menu],
	X				MENU_APPEND_ITEM, menu_create_item(
	X					MENU_STRING, strsave(inbuf),
	X					MENU_PULLRIGHT, bragg_menus[pullno],
	X					0),
	X				0);
	X
	X		}
	X		else if(! strncmp(equals+1,"\\s",2)){
	X			menu_set(bragg_menus[cur_menu],
	X				MENU_APPEND_ITEM, menu_create_item(
	X					MENU_STRING, strsave(inbuf),
	X					MENU_ACTION, bragg_seln_stuff,
	X					0),
	X				0);
	X		}
	X/* 
	X * normal case: set the item label to the string to the
	X * left of the '=' and parse the string to the right to 
	X * expand \ escapes for later stuffing
	X */
	X		else {
	X			menu_set(bragg_menus[cur_menu],
	X				MENU_APPEND_ITEM, menu_create_item(
	X					MENU_STRING, strsave(inbuf),
	X					MENU_ACTION, bragg_menu_stuff,
	X					MENU_CLIENT_DATA,parse_escape(equals+1),
	X					0),
	X				0);
	X
	X		}
	X
	X	}	/* End of main loop */
	X
	X/*
	X * Menu options - roll your own if you don't like these. 
	X */
	X	for(i = 0; i < num_menus;i++)
	X		menu_set(bragg_menus[i],
	X			MENU_INITIAL_SELECTION, MENU_SELECTED,
	X			MENU_INITIAL_SELECTION_EXPANDED, TRUE,
	X			MENU_INITIAL_SELECTION_SELECTED, TRUE,
	X			MENU_JUMP_AFTER_NO_SELECTION, TRUE,
	X			MENU_JUMP_AFTER_SELECTION, TRUE,
	X			0);
	X
	X/*
	X * Sort of committed after this, since we are playing with the original
	X * shelltool menu here.
	X */
	X	menu_set(ttysw -> ttysw_menu,
	X		MENU_INITIAL_SELECTION, MENU_SELECTED,
	X		MENU_INITIAL_SELECTION_EXPANDED, TRUE,
	X		MENU_INITIAL_SELECTION_SELECTED, TRUE,
	X		MENU_JUMP_AFTER_NO_SELECTION, TRUE,
	X		MENU_JUMP_AFTER_SELECTION, TRUE,
	X		0);
	X
	X
	X/*
	X * We are really commited after this!
	X */
	X	menu_set(ttysw -> ttysw_menu,
	X		MENU_APPEND_ITEM, menu_create_item(
	X			MENU_STRING, main_label,
	X			MENU_PULLRIGHT, bragg_menus[0],
	X			0),
	X		0);
	X}
	X
	X
	X/*
	X * Trivial function to count the number of %MENU lines in the startup file
	X * and return it.  Notice that we rewind the file when we are done!
	X */
	Xcount_menus(fp)
	X	FILE *fp;
	X{
	X
	Xchar inbuf[INSIZE];
	Xint count = 0;
	X
	Xwhile(fgets(inbuf, sizeof inbuf, fp) != (char *) 0){
	X	if(!strncmp(inbuf,"%MENU",5))
	X		++count;
	X}
	X
	Xrewind(fp);
	X
	Xreturn count;
	X
	X}
	X
	X
	X/*
	X * open_rcfile()
	X *
	X * This function tries to find a startup file to initialize the
	X * menu system.  The strategy is as follows:
	X *
	X *	1) If the environment variable WALKMENURC is set, 
	X *	   use the file it names.
	X *
	X *	2) Otherwise, use the file .WALKMENURC (.walkmenurc) in the user's 
	X *	   home directory.
	X *
	X *	3) Finally if all else fails, try WALKMENULIB/WALKMENURC.
	X */
	X
	XFILE *
	Xopen_rcfile()
	X{
	XFILE *fp;
	Xchar *rcfile;
	Xchar *name;
	Xstruct passwd *pw;
	Xchar filebuf[INSIZE];
	Xchar *getenv();
	Xchar *getlogin();
	X
	Xrcfile = getenv("WALKMENURC");		/* Case 1 */
	X
	Xif( rcfile == (char *) 0 ){		/* Case 2 */
	X	name = getlogin();		/* determine who we are */
	X	if(name)
	X		pw = getpwnam(name);
	X	else
	X		pw = getpwuid(getuid());
	X	
	X	if(pw == (struct passwd *)0 ){
	X		fprintf(stderr,"Who are you?\n");
	X		return;
	X	}
	X	sprintf(filebuf,"%s/.%s",pw -> pw_dir,WALKMENURC);
	X	rcfile = filebuf;
	X}
	X
	Xfp = fopen(rcfile,"r");
	X
	Xif(fp == (FILE *) 0){			/* Case 3 */
	X	sprintf(filebuf,"%s/%s",WALKMENULIB,WALKMENURC);
	X	rcfile = filebuf;
	X	fp = fopen(rcfile,"r");
	X}
	X
	Xreturn fp ;
	X}
	X
	X
	X/*
	X * K & R
	X */
	Xchar *strsave(s)
	X        char *s;
	X{
	X        char *p ;
	X
	Xif ((p = malloc( (unsigned) (strlen(s)+1) )) != NULL)
	X        (void) strcpy(p,s);
	X
	Xreturn (p);
	X}
	X
	X
	X/*
	X * Parse a string with C like escapes
	X *
	X *	\r	return
	X *	\n	newline
	X *	\b	backspace
	X *	\t	tab
	X *	\^	caret		 (turns off specialness of caret)
	X *	\\	backslash	 (turns off specialness of backslash)
	X *	\0x..	hex byte intro	 (\0x followed by 2 hex digits [0-9][a-f][A-F])
	X *	\[0-7]	octal byte intro (\ followed by 3 octal digits)
	X *	^char	control char	 (both upper and lower case allowed )
	X */
	X
	Xchar * 
	Xparse_escape(s)
	X	char *s;
	X{
	Xchar outstring[512];
	Xchar *out = outstring;
	X
	Xchar *strsave();
	X
	Xint i;
	Xwhile(*s){
	X	switch(*s){
	X		case '\\':
	X			++s;
	X			switch(*s){
	X
	X				case 'r':
	X					*out++ = '\r';
	X					break;
	X
	X				case 'n':
	X					*out++ = '\n';
	X					break;
	X				
	X				case 'b':
	X					*out++ = '\b';
	X					break;
	X
	X				case 't':
	X					*out++ = '\t';
	X					break;
	X
	X				case '^':
	X					*out++ = '^';
	X					break;
	X				
	X				case '\\':
	X					*out++ = '\\';
	X					break;
	X				
	X				case '0':
	X					if(*(s+1) == 'x'){
	X						scan_hex(&out,&s);
	X					}
	X					else{
	X						scan_oct(&out,&s);
	X					}
	X					break;
	X				
	X				case '1':
	X				case '2':
	X				case '3':
	X				case '4':
	X				case '5':
	X				case '6':
	X				case '7':
	X					scan_oct(&out,&s);
	X					break;
	X				
	X				default:
	X					fprintf(stderr,
	X						"unknown escape \\%c\n",*s);
	X					break;
	X			}
	X			break;
	X
	X		case '^':
	X			*out++ = ctrl(*++s);
	X			break;
	X
	X		default:
	X			*out++ = *s;
	X			break;
	X	}
	X	s++;
	X}
	X*out='\0';
	Xreturn(strsave(outstring));
	X}
	X
	X
	X/*
	X * Do control chars
	X */
	Xctrl(c)
	X	char c;
	X
	X{
	Xif(c == '?')
	X	return(0x7f);
	X
	Xif(isalpha(c) && islower(c))
	X	c = toupper(c);
	X
	Xreturn( c & ~0x40);
	X}
	X
	X
	X/*
	X * Scan a string of 3 octal digits
	X * Put them in a buffer and use sscanf.
	X * A space is returned on error (why?)
	X */
	Xscan_oct(out,s)
	X	char **out;
	X	char **s;
	X{
	X
	Xint i;
	Xchar buf[4];
	X
	Xbuf[0] = *((*s)++);
	Xbuf[1] = *((*s)++);
	Xbuf[2] = *(*s);
	Xbuf[3] = '\0';
	X
	X
	Xif(sscanf(buf,"%o",&i) != 1){
	X	fprintf(stderr,"Bad octal conversion\n");
	X	*((*out)++) = ' ';			/*Silly Default*/
	X}
	Xelse{
	X	*((*out)++) = i;
	X}
	X
	X}
	X
	X/*
	X * Scan a string of 2 hex digits
	X * A space is returned on error
	X *
	X */
	Xscan_hex(out,s)
	X	char **out;
	X	char **s;
	X{
	Xint i;
	X
	Xchar buf[3];
	X
	X*s+=2;		/*skip the '0x' that we know must be there (we hope)*/
	Xbuf[0] = *((*s)++);
	Xbuf[1] = *((*s));
	Xbuf[2] = '\0';
	X
	Xif(sscanf(buf,"%x",&i) != 1){
	X	fprintf(stderr,"Bad hex conversion\n");
	X	*((*out)++) = ' ';			/*Silly Default*/
	X}
	Xelse{
	X	*((*out)++) = i;
	X}
	X}
	X
	X
	X/*
	X * Called automagically by the Sunview menu code when an item containing
	X * this as its MENU_ACTION is chosen.
	X *
	X * We have stored a pointer to the string to be stuffed in MENU_CLIENT_DATA
	X * at the time the menu item was created.  (Is the bad? Sun uses 
	X * MENU_CLIENT_DATA differently)
	X */
	Xvoid
	Xbragg_menu_stuff(menu,mi)
	X	Menu	menu;
	X	Menu_item mi;
	X{
	X
	Xchar 	*text;
	X
	Xtext = (char *) menu_get(mi, MENU_CLIENT_DATA);		/* retreive pointer*/
	Xttysw_input( (Tty) ttysw, text, strlen(text));		/* Stuff it */
	X
	Xttysw_reset_conditions(ttysw);				/* is the necessary?*/
	X}
	X
	X
	X/*
	X * Do a vanilla stuff.  (This is so we can have other stuff items besides
	X * the one on the main shelltool menu
	X */
	Xvoid
	Xbragg_seln_stuff(menu,mi)
	X	Menu	menu;
	X	Menu_item mi;
	X{
	X
	X	ttygetselection(ttysw);
	X}
SHAR_EOF
if test 10917 -ne "`wc -c < 'bragg_menu.c'`"
then
	echo shar: error transmitting "'bragg_menu.c'" '(should have been 10917 characters)'
fi
fi # end of overwriting check
echo shar: extracting "'Makefile.pat'" '(554 characters)'
if test -f 'Makefile.pat'
then
	echo shar: will not over-write existing file "'Makefile.pat'"
else
sed 's/^	X//' << \SHAR_EOF > 'Makefile.pat'
	X*** Makefile.orig	Mon Jul  6 14:45:42 1987
	X--- Makefile	Thu Jul  2 12:49:44 1987
	X***************
	X*** 51,56
	X  	mv toolmerge.o othertools.o
	X  	
	X  
	X  FRC:
	X  # non-existent so always younger
	X  
	X
	X--- 51,63 -----
	X  	mv toolmerge.o othertools.o
	X  	
	X  
	X+ braggtools: shelltool.o picktool.o bragg_menu.o
	X+ 	make basetools MOREOBJS="shelltool.o bragg_menu.o picktool.o"
	X+ 	
	X+ braggtools.o:	toolmerge.c basetools.h
	X+ 	cc $(CFLAGS_NOT_ROI_DATA) -c toolmerge.c -DTOOLSLIST=\"basetools.h\"
	X+ 	mv toolmerge.o basetools.o
	X+ 
	X  FRC:
	X  # non-existent so always younger
	X  
SHAR_EOF
if test 554 -ne "`wc -c < 'Makefile.pat'`"
then
	echo shar: error transmitting "'Makefile.pat'" '(should have been 554 characters)'
fi
fi # end of overwriting check
echo shar: extracting "'basetools.h.pat'" '(386 characters)'
if test -f 'basetools.h.pat'
then
	echo shar: will not over-write existing file "'basetools.h.pat'"
else
sed 's/^	X//' << \SHAR_EOF > 'basetools.h.pat'
	X*** basetools.h.orig	Mon Jul  6 14:46:10 1987
	X--- basetools.h	Mon Jul  6 14:40:25 1987
	X***************
	X*** 20,22
	X  "get_selection",get_selection_main,
	X  "insert_brackets",insert_brackets_main,
	X  "shift_lines",shift_lines_main,
	X
	X--- 20,23 -----
	X  "get_selection",get_selection_main,
	X  "insert_brackets",insert_brackets_main,
	X  "shift_lines",shift_lines_main,
	X+ "picktool",picktool_main,
SHAR_EOF
if test 386 -ne "`wc -c < 'basetools.h.pat'`"
then
	echo shar: error transmitting "'basetools.h.pat'" '(should have been 386 characters)'
fi
fi # end of overwriting check
echo shar: extracting "'shelltool.c.pat'" '(715 characters)'
if test -f 'shelltool.c.pat'
then
	echo shar: will not over-write existing file "'shelltool.c.pat'"
else
sed 's/^	X//' << \SHAR_EOF > 'shelltool.c.pat'
	X*** shelltool.c.orig	Mon Jul  6 14:46:32 1987
	X--- shelltool.c	Thu Jul  2 12:50:06 1987
	X***************
	X*** 191,196
	X  	if (bold_name) {
	X  		window_set(ttysw, TTY_BOLDSTYLE_NAME, bold_name, 0);
	X  	}
	X  	
	X  			
	X  	if (init_cmd) {
	X
	X--- 191,197 -----
	X  	if (bold_name) {
	X  		window_set(ttysw, TTY_BOLDSTYLE_NAME, bold_name, 0);
	X  	}
	X+ 
	X  	
	X  /*
	X   * Entry point to the bragg menu system.
	X***************
	X*** 192,197
	X  		window_set(ttysw, TTY_BOLDSTYLE_NAME, bold_name, 0);
	X  	}
	X  	
	X  			
	X  	if (init_cmd) {
	X  	    int	len = strlen(init_cmd);
	X
	X--- 193,202 -----
	X  	}
	X  
	X  	
	X+ /*
	X+  * Entry point to the bragg menu system.
	X+  */
	X+         bragg_menu_init(ttysw);
	X  			
	X  	if (init_cmd) {
	X  	    int	len = strlen(init_cmd);
SHAR_EOF
if test 715 -ne "`wc -c < 'shelltool.c.pat'`"
then
	echo shar: error transmitting "'shelltool.c.pat'" '(should have been 715 characters)'
fi
fi # end of overwriting check
echo shar: extracting "'toolmerge.c.pat'" '(448 characters)'
if test -f 'toolmerge.c.pat'
then
	echo shar: will not over-write existing file "'toolmerge.c.pat'"
else
sed 's/^	X//' << \SHAR_EOF > 'toolmerge.c.pat'
	X*** toolmerge.c.orig	Mon Jul  6 14:46:50 1987
	X--- toolmerge.c	Thu Jul  2 12:50:38 1987
	X***************
	X*** 59,64
	X  extern defaults_from_input_main();
	X  extern input_from_defaults_main();
	X  extern switcher_main();
	X  
	X  struct map {
	X  	char cmd[32];
	X
	X--- 59,68 -----
	X  extern defaults_from_input_main();
	X  extern input_from_defaults_main();
	X  extern switcher_main();
	X+ /*
	X+  * local
	X+  */
	X+ extern picktool_main();
	X  
	X  struct map {
	X  	char cmd[32];
SHAR_EOF
if test 448 -ne "`wc -c < 'toolmerge.c.pat'`"
then
	echo shar: error transmitting "'toolmerge.c.pat'" '(should have been 448 characters)'
fi
fi # end of overwriting check
echo shar: extracting "'walkmenurc.5'" '(4897 characters)'
if test -f 'walkmenurc.5'
then
	echo shar: will not over-write existing file "'walkmenurc.5'"
else
sed 's/^	X//' << \SHAR_EOF > 'walkmenurc.5'
	X.TH Walkmenurc 5
	X.SH NAME
	Xwalkmenurc \- startup file for Bragg Sun3 menu system
	X.SH DESCRIPTION
	XThe walkmenurc file is the key to the bragg shelltool's menu system.
	XIt is read on startup by a new shelltool,
	Xto determine the menus to display and the actions to take when each 
	Xoption is chosen.
	XThe additional menu items defined by the walkmenurc file will appear as
	Xa pullright item at the bottom of the standard shelltool menu.
	XThe walkmenurc file is searched for in the following manner.
	XFirst the environment variable 
	X.I WALKMENURC 
	Xis checked, and if set, the
	Xfile indicated is used as the rc file.
	XIf this variable is not set, the user's home directory is checked
	Xfor a file called 
	X.I .walkmenurc.
	XIf this does not exist, the file 
	X.I /usr/local/lib/walkmenurc
	Xis used.
	XIf no walkmenurc file exists anywhere, the shelltool defaults to its
	Xold behavior.
	XTty subwindows other than in the shelltool may have startup
	Xfiles other than .walkmenurc,
	Xbut these may still be overridden with the WALKMENURC variable.
	X.SH FORMAT
	XThe walkmenurc file is an ascii text file with a fairly simple syntax.
	XThere are three types of lines in the file:
	Xcomments, control lines, and option lines.
	X.PP
	XAny line beginning with a # is considered to be a comment and is ignored.
	X.PP
	XControl lines in this iteration of the code come in only two flavors: 
	XMENU lines, and MAINLABEL lines.
	X.PP
	XMENU lines are identified by the string %MENU starting in the first column of a
	Xline.
	XMAINLABEL lines start with %MAINLABEL.
	XAny future control lines defined will also start with a '%' in col 1 followed
	Xby an uppercase word (though the text after this initial string may be
	Xarbitrary).
	X.PP
	XThere should be only one MAINLABEL line in an rc file (though this is not
	Xenforced).
	XThe text after the key word is taken as the label to give the pullright item
	Xwhich opens onto the additional menus.  (It will default to 
	X"Expanded\ Functions").
	X.PP
	XIn previous (Sun2) versions, any text appearing after the word 
	XMENU would be taken
	Xas a menu label, and would be displayed as such.
	XThis is not currently supported.
	XMENU lines now serve only to delimit different menus.
	X.PP
	XFinally there are option lines.
	XOption lines define an item in a menu.
	XSpecifically, an item is associated with a menu that begins at the first
	Xoption line following the previous MENU line and ends with the next MENU
	Xline.
	XThe format of an option line is
	X.br
	X.sp
	X.ce
	Xtext=text
	X.sp
	X.br
	XThe text on the left side of the equals sign is not interpreted at all, and
	Xis used as the string to display for the option when the menu is popped
	Xup.
	XThe text to the right of the equals sign is in effect typed into the shelltool
	Xwindow when the option is selected.
	XThis is similar to the generic suntools 
	X.I Stuff
	Xoperation, except that the text is unchanging.
	XThis text is subject to C like interpretation in the following manner.
	X.nf
	X
	X			\\b	- maps into a backspace
	X			\\r	- maps into a carriage return
	X			\\n	- maps into a newline
	X			\\t	- maps into a tab character
	X			\\\	- maps into a literal \\
	X			\\^	- maps into a literal ^
	X			\\nnn	- maps into the octal value of nnn 
	X			\\0xnn	- maps into the hex value of nn
	X			^x	- maps into CTRL(x).
	X
	X.fi
	X.br
	XThere are two more escapes that rather than mapping 
	Xto specific characters map to actions by the menu system.
	XIn the current implementation, these must be the only text 
	Xon the right of the equals sign if they are to be used.
	X.nf
	X			
	X			\\s	- perform the suntools Stuff option
	X			\\pdd	- add the menu whose number is dd as a
	X				  pullright from the current menu.  (Menu
	X				  numbers start at 0)
	X.fi
	X.PP
	X.SH
	XAn Example
	X.PP
	XHere is an example of a simple
	X.I walkmenurc
	Xfile.
	XWe will create four menus 
	Xcalled 
	X.I Info,
	X.I Edit
	Xand
	X.I Bye.
	XThe
	X.I info
	Xmenu will perform the commands
	X.I ls
	Xand 
	X.I who,
	Xwhile the
	X.I edit
	Xmenu will start up
	X.I emacs
	Xand allow stuffing, exiting, and starting the emacs tutorial.
	XThe 
	X.I Bye
	Xmenu
	Xand will have
	Xthe options
	X.I lockscreen
	Xand
	X.I logout.
	X.br
	X.sp 2
	X.nf
	X%MENU
	XInfo	=\\p1
	XEdit	=\\p2
	XBye	=\\p3
	X%MENU Info
	XList Directory=^Uls -l\\n
	XUsers logged on=^Uwho\\n
	X%MENU Edit
	XStuff=\\s
	XStart emacs=^Uemacs\\n
	XExit emacs=^X^C
	X#Enter a ^Ht  in octal just to show it can be done
	XEmacs Tutorial=\\010t
	X%MENU Bye
	XLockscreen=^Ulockscreen -r\\n
	XSignoff=^Ulogout\\n
	X.fi
	X.SH FILES
	X/usr/local/lib/walkmenurc
	X.SH "SEE ALSO"
	Xsuntools(1)
	X.SH BUGS
	X.PP
	XYou cannot enter a null character from a menu in the current implementation.
	X.br
	XTabs on the left side of an '=' display wrong, use expand(1) on your rc file.
	X.br
	XMaking the users count %MENU lines is a crock.
	X.br
	XBlank lines are not tolerated.
	X.br
	XSyntax errors are ungracefully handled.
	X.br
	XThe parser probably has some bugs.
	X.br
	XThe file should probably be compiled somehow.
	X.br
	XWalkmenurc is probably a dangerous name for this beast.
	X.br
	XThe author does not understand SunView.
	X.br
	XThe file should be upwards compatible with the Sun2 version.
SHAR_EOF
if test 4897 -ne "`wc -c < 'walkmenurc.5'`"
then
	echo shar: error transmitting "'walkmenurc.5'" '(should have been 4897 characters)'
fi
fi # end of overwriting check
echo shar: extracting "'walkmenurc'" '(3701 characters)'
if test -f 'walkmenurc'
then
	echo shar: will not over-write existing file "'walkmenurc'"
else
sed 's/^	X//' << \SHAR_EOF > 'walkmenurc'
	X%MENU Top Menu
	XStuff			=\s
	XClear Screen		=^Uclear\n
	XLock Screen		=^Ulockscreen -n\n
	XMessage check		=^Umsgchk\n
	XResize                  =^Usunsize `picktool 24 34 40 50 60 70 80`\n
	XHelp                    =?\n
	XMH Stack Menus		=\p4
	XEMACS Stack Menus 	=\p8
	XFiler Menu		=\p1
	XPager Menu		=\p2
	XProgram Control		=\p3
	X%MENU Filer Menu
	XList Directory		=ls\n
	XType   			=^Utype `picktool -d *`\n
	XPrint 			=^Uprint `picktool -d *`\n
	XDelete			=^Udelete `picktool -d *`\n
	XUndelete		=^Uundelete\n
	XExpunge Deleted  	=^Uexpunge\n
	X%MENU Pager Menu
	XForward			= 
	XBackward		=b
	XStart of File		=g
	XEnd of File		=G
	XNext File		=N
	XPrev File		=P
	XQuit			=q
	X%MENU Program Control
	XRepeat=			^U!!\n
	XInterrupt		=^C
	XQuit			=^\
	XEOF			=^D
	XStop			=^Z
	XStart			=^Ufg\n
	X%FAMILY
	X%MENU MH Top Menu
	XPage Forward		= 
	XPage Backward		=b
	XQuit Page		=q\n
	XShow Next Msg		=q^Unext\n
	XShow Previous Msg	=q^Uprev\n
	XShow Current Msg	=q^Ushow\n
	XShow by Msg Num(s)      =q^Ushow 
	XDel-Cur/Show-Next	=q^Urmm\nnext\n
	XDelete Current		=q^Urmm\n
	XPrint Current		=q^Ushow -show pr -l60 | imprint -2 -n -J\n
	XDelete by Msg Num(s)    =q^Urmm 
	XIncorporate Msgs 	=q^Uinc\n
	XCompose Menu		=\p5
	XScan Menu		=\p6
	XRefile Menu		=\p7
	X%MENU Compose Menu
	XStuff			=\s
	XReply to Msg   		=q^Urepl\n
	XForward Msg		=q^Uforw\n
	XCompose Msg		=q^Ucomp\n
	XEnd of Text		=\n^D
	X%MENU Scan Menu
	XScan All		=q^Uscan\n
	XScan by Msg Num(s)      =q^Uscan 
	XScan by Subject 	=q^Usubscan\n
	XScan From 		=q^Ufromscan\n
	XScan To 		=q^Utoscan\n
	X%MENU Refile
	XComics=q\nrefile +comics\n
	XUnix-Wiz=q\nrefile +unix-wizards\n
	XSun-Spots=q\nrefile +sun-spots\n
	XMH=q\nrefile +mh\n
	XAction=q\nrefile +action\n
	X4.3=q\nrefile +4.3\n
	Xminix=q^Urefile +minix\n
	XUnread=q\nrefile +unread\n
	X%MENU (1) Startup/Input/Exit
	XStuff                   =\s
	XStart Up GNUEMACS       =^Ugnuemacs\n
	XFind File               =^X^F
	XInsert File             =^Xi
	XSave File               =^X^S
	XWrite File              =^X^W
	XHelp                    =\b?\b
	XExit                    =^X^C
	XMode/Movement		=\p9
	XFormatting		=\p10
	XMH Utilities		=\p11
	XDirectory Mgt		=\p12
	XWindow/Buffer Mgt	=\p13
	XUtilities		=\p14
	X%MENU (2) Mode/Movement
	XStuff                   =\s
	XOverwrite/Insert Togl   =^[xoverwrite-mode\r
	XPage Forward            =^V
	XPage Backward           =^[V
	XTop of File             =^[<
	XEnd of File             =^[>
	X%MENU (3) Formatting
	XStuff                   =\s
	XToggle Auto-Fill        =^[xauto-fill-mode\r
	XDbl Space=^[<^[xreplace-string\r^Q\n\r^Q\n^Q\n\r^[<
	XSgl Space=^[<^[xreplace-string\r^Q\n^Q\n\r^Q\n\r^[<
	XFill Paragraph          =^[xfill-paragraph\r
	XCenter Line	        =^[xcenter-line\r
	X%MENU (4) MH Utilities
	XLoad MH and Incorporate =^[xmh-rmail\r
	XShow Options            =?
	XRead Next Msg           =n
	XRead Previous Msg       =p
	XRead by Msg Number      =g
	XDelete Cur Msg          =d
	XUndo Deletion           =u
	XRefile Msg              =^
	XShow Cur Msg            =.
	XPrint Cur Msg           =l
	XReply to Cur Msg        =a
	XForward Cur Msg         =f
	XSend a Msg              =s
	XProcess Deletes         =e
	XCompose and Send Msg  =^[xmh-smail\r
	X%MENU (5) Directory/File Mgmt
	XStuff                   =\s
	XRead Directory          =^Xd
	XDelete Cur File         =d 
	XUndelete Cur file       =u 
	XView Cur File           =v 
	XEdit Cur File           =e 
	XCopy File	        =c
	XRename File             =r
	XExpunge Deleted Files   =x
	X%MENU (6) Window/Buffer Mgmt
	XStuff                   =\s
	XList Buffers            =^X^B
	XSelect a Buffer         =^Xb
	XKill a Buffer           =^Xk
	XSplit Window (Vert)     =^X2
	XSplit Window (Horz)     =^X5
	XSelect Other Window     =^Xo
	XKill Current Window     =^X0
	XKill Other Windows      =^X1
	X%MENU (7) Utilities
	XStuff                   =\s
	XPrint Current Draft     =^[xprint-buffer\r
	XCheck Spelling          =^[x1bxspell-buffer\r
SHAR_EOF
if test 3701 -ne "`wc -c < 'walkmenurc'`"
then
	echo shar: error transmitting "'walkmenurc'" '(should have been 3701 characters)'
fi
fi # end of overwriting check
echo shar: extracting "'picktool.c'" '(2968 characters)'
if test -f 'picktool.c'
then
	echo shar: will not over-write existing file "'picktool.c'"
else
sed 's/^	X//' << \SHAR_EOF > 'picktool.c'
	X/*
	X * Picktool - present arguments as choices.  Print selected ones on stdout
	X */
	X
	X#include <stdio.h>
	X#include <suntool/tool_hs.h>
	X#include <suntool/panel.h>
	X#include <sys/stat.h>
	X
	Xstatic struct tool *tool;
	Xstatic char *tool_name="Picktool";
	Xstatic struct toolsw *panel_sw;
	Xstatic Panel	panel;
	X
	Xstatic Panel_item *choice_items;
	Xstatic Panel_item quit_item;
	Xstatic Panel_item dummy_item;
	Xstatic int s_argc;
	Xstatic char **s_argv;
	X
	Xstatic int quit_proc();
	Xstatic int sigwinched();
	X
	Xstatic short ic_image[258] = {
	X#include "picktool.icon"
	X};
	Xmpr_static(pickgfxic_mpr, 64, 64, 1, ic_image);
	X 
	Xstatic  struct icon icon = {64, 64, (struct pixrect *)NULL, 0, 0, 64, 64,
	X            &pickgfxic_mpr, 0, 0, 0, 0, NULL, (struct pixfont *)NULL,
	X            ICON_BKGRDCLR};
	X 
	X
	Xpicktool_main(argc,argv)
	X	int argc;
	X	char **argv;
	X{
	X
	Xshort i;
	Xstruct stat	statbuf;	/* check for dirs */
	Xshort zap_dirs = 0;		/* if we get a directory in the arg list*/
	X				/* don't process it.			*/
	X/*
	X * Very simple argument parse!
	X */
	X
	Xif( argc == 1){
	X	fprintf(stderr,"%s : no arguments\n",argv[0]);
	X	exit(1);
	X}
	Xif(!strcmp(argv[1],"-d")){
	X	if( argc == 2){
	X		fprintf(stderr,"%s : no arguments after -d\n",argv[0]);
	X		exit(1);
	X	}
	X	zap_dirs = 1;
	X	--argc;
	X	++argv;
	X}
	X
	X
	Xs_argc = argc;
	Xs_argv = argv;
	X
	X/*
	X * Count the # of args, and malloc enough choice items to handle them.
	X */
	X
	Xchoice_items = (Panel_item *) malloc( (unsigned) (argc-1)* sizeof(Panel_item));
	Xif(choice_items == (Panel_item *) 0){
	X	fprintf(stderr,"Can't malloc space for choice items\n");
	X	exit(1);
	X}
	X
	X/*
	X * Create the tool and panel
	X */
	X
	Xtool = tool_make(WIN_NAME_STRIPE, TRUE,
	X		 WIN_ICON,           &icon,
	X		 WIN_LABEL,	tool_name,
	X		 0);
	Xpanel_sw = panel_create(tool,0);
	Xpanel = (Panel) panel_sw-> ts_data;
	X
	X/*
	X * Create Items
	X */
	X
	Xquit_item = panel_create_item(panel,PANEL_BUTTON,
	X				PANEL_ITEM_X,	PANEL_CU(32),
	X				PANEL_ITEM_Y,	PANEL_CU(1),
	X				PANEL_LABEL_IMAGE,	
	X				panel_button_image(panel," EXECUTE ",11,NULL),
	X				PANEL_NOTIFY_PROC,	quit_proc,
	X				0);
	X
	Xdummy_item= panel_create_item(panel,PANEL_BUTTON,
	X				PANEL_SHOW_ITEM,FALSE,
	X				PANEL_ITEM_X,	PANEL_CU(0),
	X				PANEL_ITEM_Y,	PANEL_CU(3),
	X				PANEL_LABEL_STRING,	"",
	X				PANEL_NOTIFY_PROC,	quit_proc,
	X				0);
	X				
	Xfor (i = 0; i < argc -1; i++){
	X	if(zap_dirs)
	X		if(stat(argv[i+1],&statbuf) == -1){
	X			;				/* let it go for now */
	X		}
	X	if( (statbuf.st_mode & S_IFMT) == S_IFDIR)
	X		continue;
	X	choice_items[i] = panel_create_item	(panel,	PANEL_TOGGLE,
	X						PANEL_FEEDBACK, PANEL_MARKED,
	X						PANEL_SHOW_MENU, FALSE,
	X						PANEL_LABEL_STRING, argv[i+1],
	X						PANEL_CHOICE_STRINGS, " ",
	X									0,
	X						0);
	X}
	X
	Xsignal(SIGWINCH, sigwinched);
	Xtool_install(tool);
	Xtool_select(tool,0);
	X}
	X
	Xstatic quit_proc(panel,item)
	X	Panel panel;
	X	Panel_item item;
	X
	X{
	Xshort i;
	Xunsigned int value;
	X
	Xfor (i = 0; i < (s_argc-1); i++)
	X	if( (unsigned int) panel_get_value(choice_items[i]))
	X		printf("%s\n",s_argv[i+1]);
	X	
	X
	Xtool_destroy(tool);
	Xexit(0);
	X}
	X
	X
	Xstatic sigwinched()
	X{
	X	tool_sigwinch(tool);
	X}
SHAR_EOF
if test 2968 -ne "`wc -c < 'picktool.c'`"
then
	echo shar: error transmitting "'picktool.c'" '(should have been 2968 characters)'
fi
fi # end of overwriting check
echo shar: extracting "'picktool.icon'" '(1933 characters)'
if test -f 'picktool.icon'
then
	echo shar: will not over-write existing file "'picktool.icon'"
else
sed 's/^	X//' << \SHAR_EOF > 'picktool.icon'
	X/* Format_version=1, Width=64, Height=64, Depth=1, Valid_bits_per_item=16
	X */
	X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
	X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
	X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
	X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0010,0x0000,0x0000,
	X	0x0000,0x003C,0x0000,0x0000,0x0000,0x00FF,0x8000,0x0000,
	X	0x0000,0x007F,0xF000,0x0000,0x0000,0x000F,0xFC00,0x0000,
	X	0x0000,0x0003,0xFE00,0x0000,0x0000,0x0001,0xFF00,0x0000,
	X	0x0000,0x0000,0x7F80,0x0000,0x0000,0x0000,0x3FFC,0x0000,
	X	0x0000,0x0000,0x0FFC,0x0000,0x0000,0x0000,0x00FC,0x0000,
	X	0x0000,0x0000,0x00FE,0x0000,0x0000,0x0000,0x01DE,0x0000,
	X	0x0000,0x0000,0x038F,0x0000,0x0000,0x0000,0x0607,0x0000,
	X	0x0000,0x0000,0x0607,0x8000,0x0000,0x0000,0x0C07,0x8000,
	X	0x0000,0x0000,0x1807,0x8000,0x0000,0x0000,0x3007,0x8000,
	X	0x0000,0x0000,0x6007,0x8000,0x0000,0x0000,0xC007,0x8000,
	X	0x0000,0x0003,0x8007,0x8000,0x0000,0x0007,0x0007,0x8000,
	X	0x0000,0x000E,0x0007,0x8000,0x0000,0x000E,0x0007,0x8000,
	X	0x0000,0x003C,0x0003,0x8000,0x0000,0x00F0,0x0003,0x8000,
	X	0x0000,0x00E0,0x0003,0x8000,0x0000,0x01C0,0x0003,0x8000,
	X	0x0000,0x0380,0x0003,0x8000,0x0000,0x0700,0x0003,0x8000,
	X	0x0000,0x0600,0x0000,0x8000,0x0000,0x0C00,0x0000,0x0000,
	X	0x0000,0x1800,0x0000,0x0000,0x0000,0x3000,0x0000,0x0000,
	X	0x0000,0x6000,0x0000,0x0000,0x0001,0xC000,0x0000,0x0000,
	X	0x0003,0x8000,0x0000,0x0000,0x0007,0x0000,0x0000,0x0000,
	X	0x000E,0x0FFF,0xFFFF,0xFFF8,0x003C,0x0800,0x0000,0x0008,
	X	0x0070,0x0800,0x0000,0x0008,0x00E0,0x0BC1,0x0010,0x0008,
	X	0x00C0,0x0A20,0x0010,0x0008,0x0000,0x0A27,0x0712,0x0008,
	X	0x0000,0x0A21,0x0894,0x0008,0x0000,0x0BC1,0x0818,0x0008,
	X	0x0000,0x0A01,0x0818,0x0008,0x0000,0x0A01,0x0814,0x0008,
	X	0x0000,0x0A01,0x0892,0x0008,0x0000,0x0A01,0x0711,0x0008,
	X	0x0000,0x0800,0x0000,0x0008,0x0000,0x0FFF,0xFFFF,0xFFF8,
	X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
	X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000
SHAR_EOF
if test 1933 -ne "`wc -c < 'picktool.icon'`"
then
	echo shar: error transmitting "'picktool.icon'" '(should have been 1933 characters)'
fi
fi # end of overwriting check
echo shar: extracting "'delete'" '(117 characters)'
if test -f 'delete'
then
	echo shar: will not over-write existing file "'delete'"
else
sed 's/^	X//' << \SHAR_EOF > 'delete'
	X#! /bin/sh
	Xcase $# in
	X	0)	exit 0 ;;
	X	*) 	mkdir $HOME/.deleted 2>/dev/null
	X		exec /bin/mv -f $* $HOME/.deleted;;
	Xesac
SHAR_EOF
if test 117 -ne "`wc -c < 'delete'`"
then
	echo shar: error transmitting "'delete'" '(should have been 117 characters)'
fi
chmod +x 'delete'
fi # end of overwriting check
echo shar: extracting "'expunge'" '(39 characters)'
if test -f 'expunge'
then
	echo shar: will not over-write existing file "'expunge'"
else
sed 's/^	X//' << \SHAR_EOF > 'expunge'
	X#! /bin/sh
	X/bin/rm -f $HOME/.deleted/*
SHAR_EOF
if test 39 -ne "`wc -c < 'expunge'`"
then
	echo shar: error transmitting "'expunge'" '(should have been 39 characters)'
fi
chmod +x 'expunge'
fi # end of overwriting check
echo shar: extracting "'print'" '(130 characters)'
if test -f 'print'
then
	echo shar: will not over-write existing file "'print'"
else
sed 's/^	X//' << \SHAR_EOF > 'print'
	X#! /bin/sh 
	Xistty=`tty`
	X
	Xcase $# in
	X	0)
	X		case $istty in
	X			not*)	exec lpr   ;;
	X			*)	exit 0 ;;
	X		esac
	X		;;
	X
	X	*)	exec lpr $@
	Xesac
SHAR_EOF
if test 130 -ne "`wc -c < 'print'`"
then
	echo shar: error transmitting "'print'" '(should have been 130 characters)'
fi
chmod +x 'print'
fi # end of overwriting check
echo shar: extracting "'type'" '(132 characters)'
if test -f 'type'
then
	echo shar: will not over-write existing file "'type'"
else
sed 's/^	X//' << \SHAR_EOF > 'type'
	X#! /bin/sh 
	Xistty=`tty`
	X
	Xcase $# in
	X	0)
	X		case $istty in
	X			not*)	exec less   ;;
	X			*)	exit 0 ;;
	X		esac
	X		;;
	X
	X	*)	exec less $@
	Xesac
SHAR_EOF
if test 132 -ne "`wc -c < 'type'`"
then
	echo shar: error transmitting "'type'" '(should have been 132 characters)'
fi
chmod +x 'type'
fi # end of overwriting check
echo shar: extracting "'undelete'" '(126 characters)'
if test -f 'undelete'
then
	echo shar: will not over-write existing file "'undelete'"
else
sed 's/^	X//' << \SHAR_EOF > 'undelete'
	X#! /bin/sh
	Xcd $HOME/.deleted
	Xa=`echo *`
	Xcase $a in
	X	'*')	echo No deleted files
	X		exit 0 ;;
	X
	X	*) exec domove `picktool *`
	Xesac
SHAR_EOF
if test 126 -ne "`wc -c < 'undelete'`"
then
	echo shar: error transmitting "'undelete'" '(should have been 126 characters)'
fi
chmod +x 'undelete'
fi # end of overwriting check
echo shar: extracting "'domove'" '(70 characters)'
if test -f 'domove'
then
	echo shar: will not over-write existing file "'domove'"
else
sed 's/^	X//' << \SHAR_EOF > 'domove'
	X#! /bin/sh
	Xcase $# in
	X	0)	exit 0 ;;
	X	*)	exec /bin/mv -f $* $HOME
	Xesac
SHAR_EOF
if test 70 -ne "`wc -c < 'domove'`"
then
	echo shar: error transmitting "'domove'" '(should have been 70 characters)'
fi
chmod +x 'domove'
fi # end of overwriting check
#	End of shell archive
exit 0

------------------------------

Date: 8 Jul 87 09:12:00 EST
From: gaudette@icst-ecf.arpa (Phillip Gaudette)
Subject: Smalltalk

I posted a question some time ago about Berkeley Smalltalk on version 3.x
of the Sun OS, which produced some helpful answers and some general
interest, so here is a summary of what we know.  Thanks to those
individuals who responded with detailed help.

Berkeley Smalltalk II is a non-supported implementation of a Virtual 
Machine that interprets a Virtual Image of Smalltalk-80, slightly
modified from the original Virtual Image from Xerox.  With a little
effort, it will work under Suntools with Sun OS 3.2 (in our case)
on a Sun 2 or Sun 3 system.

Our feeling is that it is too slow on a Sun 2 to do significant work,
but it is fairly reasonable on a Sun 3 with no other users.  There
are bugs around, and it takes some hacking, but it works.

We acquired it based on an announcement from Berkeley, which is
now several years old, but here are the essential facts from
that announcement.  The virtual machine is free to universities
and government labs (Thank you!) and available for a "donation"
for companies.  You must also have a license to the virtual image
from Xerox, which cost us $400 but is much more expensive for
commercial organizations.  It has 32 bit OOPS, is written in C,
and runs with Unix.  It is slower than a Dorado, doesn't run well
on a timeshared computer, and is not supported.  The announcement
clearly states "We are making BS II available to help the sophisticated
Smalltalk fan to get his or her hands on the system, and we cannot
hold those hands when problems occur".

The contact for distribution listed:
	Allene Parker
	Computer Science Division
	573 Evans Hall
	University of California
	Berkeley  CA  94720
	415-642-5399
	parker%ucbernie@Berkeley.ARPA
	...!ucbvax!ucbernie!parker
This person had left Berkeley but the mail address worked ok for us.
For technical questions (see above note on support) it listed:
	Peter Lee, 415-642-3560, pkl%ucbkim@Berkeley.ARPA
	Dave Ungar, 415-642-8006, dmu%ucbkim@Berkeley.ARPA

If you have a license and a tape, the makefile as distributed won't work
(or at least didn't for us) but a modest effort will let you bring
up a system.  Certain files shouldn't be linked in.  Some cc options
are necessary that aren't in the makefile.  The keytables code must
be updated to use the Sun 3 keyboard.  I'll provide details on
what we did if anyone asks, but we didn't go beyond the minimum
and additional hacking is clearly desirable for serious use.

For completeness, you should know that Xerox has created a small
company to market Smalltalk-80 commercially.  Their implementation
is faster, more complete, fully supported, and expensive ($5000 or so).
That address is:
	ParcPlace Systems
	3333 Coyote Hill Road
	Palo Alto  CA  94304
	415-494-4361
This is information and not an endorsement.

Philip Gaudette
Computer Scientist
Natl Bureau of Standards
------

------------------------------

Date: 7 Jul 87 00:33:41 GMT
From: uw-apl!hess@beaver.cs.washington.edu (Bill Hess)
Subject: Cipher 890 tape drive on Sun-3/280?

We are planning to purchase a Sun-3/280.  We will be providing
our own tape drive and disk drive but purchasing the controllers
from Sun.  We plan on reading Sun's boot tapes from the our tape
drive.  The tape drive is a Cipher M890-2 and will be interfaced
with a Xylogics 472 controller.  The disk drives are a pair of
Fujitsu M2333K which will be used with a Xylogics 451.  We intend
to use Sun's drivers with both the standalone system and SunOS.
Has anyone successsfully read the Sun boot tapes with our proposed
configuration (with possibly different disks) and got the system
up and running.  Has anybody run into problems using this configuration
either in booting or running?

                                        Bill Hess
                                        Applied Physics Laboratory
                                        University of Washington
                                        uw-beaver!uw-apl!ampmsp!hess

------------------------------

Date: 6 Jul 87 19:01:56 GMT
From: dartvax!kaplan.UUCP@seismo.css.gov (Daniel Kaplan)
Subject: X Windows?

I work for the Physics department at Vanderbilt University and we
have just purchased a Sun system.   Could someone please tell me how
I can get a hold of a copy of X windows and if there is an
implimentation of the Macintosh toolbox for the Sun.

Dan Kaplan                                                        
 kaplan@dartmouth.edu
 kaplandh@vuctrvax.bitnet

------------------------------

Date: 7 Jul 87 13:48:20 GMT
From: mcvax!uva!dolf@seismo.css.gov (Dolf Starreveld)
Subject: bitblt to offscreen bitmap in SUN CGI?

I want to copy some part of the pixrect belonging to the current
view surface to an offscreen bitmap. I am using the SUN CGI library.
I tried doing it using bitblt_source_array, but can't get it to work.
It seems to me from the docs that bitblt_source_array will only
blit to the view surface, never to something that is off-screen.
Can anyone tell me how to accomplish this ?

P.S.
I tried doing it using pr_rop, but since I'm running in a graphics tool,
the devicePix do not correspond to the graphics subwindow, but to the
whole tool window. I don't want to hard code the vertical offset within
the tool window to compensate for this.

--dolf
-- 
Dolf Starreveld  Phone: +31 20 592 2054/5022, TELEX: 10262 HEF NL
EMAIL:           dolf@uva.uucp (...!mcvax!uva!dolf), or dolfs@hasara5.bitnet
SNAIL:           Dept. of Computing Science, University of Amsterdam,
                 Kruislaan 409, NL-1098 SJ  Amsterdam, The Netherlands

------------------------------

Date: Mon, 6 Jul 87 20:10:07 EDT
From: schmolze%tufts.csnet@relay.cs.net (James G Schmolze)
Subject: Latex previewer and Sun interest group?

To whom may be of help:  I am seeking a Latex previewer for our sun-3's and,
in general, a bulletin board for Sun software.  Can someone give me pointers
and/or suggestions?

Thanks for any assistance,
Jim Schmolze
schmolze.tufts@csnet-relay

------------------------------

Date: Mon, 06 Jul 87 21:55:09 EDT
From: kjs%tufts.csnet@relay.cs.net (Kevin Sullivan)
Subject: is there a TeX previewer for the sun?

If you know the answer and have a second,  could you send me the facts?

Thank you.

Kevin Sullivan
Sr. Systems Programmer,
Tufts University

kjs@tufts.csnet

------------------------------

Date: Tue 7 Jul 87 16:51:40-EDT
From: CY13@te.cc.cmu.edu (Curt Yeske)
Subject: Sun 3/50 edge card info?

Carnegie Mellon Hardware Systems needs to find out the edge card connector
pinout information for a Sun 3/50 mono workstation.  If anyone out there has
this information or can point to where we can get, please let me know.

Thank you for your time and effort.


Curt Yeske
Technical Administrator
Carnegie Mellon Computing Services
CY13@te.cc.cmu.edu

Disclaimer: The opinions expressed are my own and are not Carnegie Mellon's.
	The facts are figments of my imagination anyway.

------------------------------

Date: Tue, 07 Jul 87 14:43:59 PDT
From: grand!day@uunet.uu.net (Dave Yost)
Subject: Why does icon die if built with cc -f68881?

If you have a fix, please let me know.  Thanks.

--dave yost

------------------------------

Date: Tue, 7 Jul 87 16:13:52 PDT
From: rusty@weyl.berkeley.edu (Rusty Wright)
Subject: Sun-3 keyboards?

I've often wondered if taking off all of the keycaps and squirting a
bit of silicon lubricant into each cylinder that the keycaps slide in
would help.  On our public suns and the heavily used ones the return
key starts getting stiff and the fix is to pull it off and clean out
that cylinder.  It's just plastic rubbing against plastic.

------------------------------

Date: 8 Jul 87 01:10:44 GMT
From: bparent%sdcc6@sdcsvax.ucsd.edu (Brian Parent)
Subject: sun 3 client on a sun 2 server?

I'm trying to boot a sun 3/50 using a sun 2 as an nd server.  I know the people
at Sun don't recommend it, but they say it is possible.  I've already tried
calling their software support number, but they can't seem to help me.
(No offense intended to the parties involved.)  Does anyone out there have
direct experience with this who also wouldn't mind talking to me about it?

Brief description:
	The Sun 2/120, we'll call server2, currently has a sun 2/50 as a client.

	The Sun 3/50, we'll call client3, has successfully been booted using 
	another Sun 3/180, we'll call it server3, as a server.

	The client's root partitions for client3 are identical on both
	server2 and server3.

	When booting client3 (single user) using server2 as the nd server,
	the last thing that prints out is:

		Singleuser boot -- fsck not done.
	
	The next thing that *should* print out is the # singleuser prompt.
	But I never see it; instead, after a minute or so I get the message:

		nd: disk server not responding, still trying

	Using etherfind(8C), it appears that server2 *only* responds to
	requests from client3 when client3 uses a broadcast packet.
	Then server2 sends lots of stuff to client3 (probably the tftpboot stuff
	and then the rc.boot file to execute), and then client3 sends 
	packet after packet to server2 with no responses from server2.

Did I say brief?  Sorry.
Anyway, any help would be appreciated.

Brian Parent	ARPA - bparent@sdcc6.UCSD.EDU
		uucp - ...!ucbvax!sdcsvax!sdcc6!bparent
		voice - (619)534-6090

------------------------------

Date: Wed, 8 Jul 87 07:08:18 EDT
From: thomas@nrl-css.arpa (George Thomas)
Subject: How to write a SCSI driver?

Does anyone know how to write a SCSI driver for the Sun 3/50's (or any sun
for that matter)?. Specifically, what are the calls and how are they used in
the si and sc drivers, and what other things need to be set up so that a
new device and its driver can be added to SCSI?


,George
(Arpanet-thomas@nrl-css.arpa)

------------------------------

Date: Tue, 7 Jul 87 08:58:57 edt
From: white%cs.unc.edu@relay.cs.net (Brian T. White)
Subject: NFS daemon problems?

I have recently been having problems with my NFS daemons:  Users on our
system find their programs "hung" -- a particular window just stops
responding.  A "ps -aux |grep nfsd" reveals that the NFS daemons are
in the "D" or "DW" state.  I have found this to be a no-win situation:
the nfsd processes never get out of the "D" state, and they cannot be
killed and restarted.  The Sun System Administration manual says:

	Log in to the server and do a ps to see if nfsd is running
	and accumulating cpu time.  If not you may be able to kill 
	and then restart nfsd.  If this doesn't work you will have
	to reboot the server.

Rebooting the server works, but this doesn't seem a very satisfactory
solution.  the incidence of this problem has increased dramatically
of late -- it happens about 5 times per week.  Does anybody have any
clues as to how I might prevent the NFS daemons from hanging like
this or how I might recover without rebooting?  Any help will be
greatly appreciated.

(I have tried increasing the number of NFS daemons from 4 to 8 to see
if this will help, but it is too early to tell yet.)

------------------------------

End of SUN-Spots Digest
***********************