[mod.computers.sun] SUN-Spots Digest, v4n27

Sun-Spots-Request@RICE.EDU (Vicky Riffle) (08/27/86)

SUN-SPOTS DIGEST           Wednesday, 27 August 1986       Volume 4 : Issue 27

Today's Topics:
		  Remove -J switch with Unix TeX for the SUN PC
		         TeX and BIBTEX problems on Sun-3
			    68010 binaries on a 68020
			 	Setup and 68010 code
	    User settable menus for sun2.2 suntools' tty subwindows (long)
		       Problems with color map in SunCore?
			    Bug in Release 3.0 'rdate'?
			Drivers (DY-4/Kennedy 9400, others)?
				  Public domain APL?
			SunView problems when using color?
			      Sun screen copy to imagen?
				   Used sun brokers?
------------------------------------------------------------------------
Date: Fri, 22 Aug 86 21:53:07 EDT
From: Richard Furuta <furuta@mimsy.umd.edu>
Subject: Remove -J switch with Unix TeX for the SUN PC

I sent out a message a couple of days ago to the Unix TeX list noting that
the -J switch should not be used with the Sun PC---remove it from the
Makefile.  This probably has been fixed in the current distribution but it
was wrong up until just very recently.  If you're having trouble with
Metafont, the fix is quite likely to be the same.

I am running TeX, LaTeX, bibtex, and Metafont on a Sun 3 with no problems at
all.  In fact, I just had the occasion to LaTeX the same file on an unloaded
Sun 3 and on a lightly loaded DEC 2060 (via the Internet).  The Sun won!

					--Rick

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

Date: Mon, 25 Aug 86 10:34:07 -0100
From: mcvax!inria!shapiro@seismo.CSS.GOV (Marc Shapiro)
Subject: TeX and BIBTEX problems on Sun-3

	From: Barry Shein <bzs@BU-CS.BU.EDU>
	Subject: BIBTEX on a SUN3?

	Has anyone gotten bibtex from the UNIX TeX distribution working?
	[...]
	-Barry Shein, Boston University

The TeX distribution (at least the one I received from U. of Washington 
approx. 6 months ago) is a real mess.  It took me a lot of time and grief 
to get it to just compile on my Sun-3.  Say one week of half-time work and 
full-time grief.

BIBTEX will *NOT* run correctly if you insist on compiling it with the '-J'
option.  Take '-J' out of the Makefile, ignore the comments, and re-compile.

I'm willing to send out a full, running, clean TeX & LaTeX tape for
Sun-3's, to people who don't want to waste a week of their time on trying to
understand what's wrong with the standard distribution.

			Marc Shapiro
			mcvax!inria!shapiro

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

Date: Fri, 22 Aug 86 21:43:08 edt
From: hedrick@topaz.rutgers.edu (Charles Hedrick)
Subject: 68010 binaries on a 68020

Because of the comments about 68010 binaries on a 68020, I thought I
would tell you about our experience.  We have a 68020 server whose
sole job in life is to serve a bunch (13?) of diskless 68010 Sun
2/50's.  To avoid wasting disk space, we have the system set up as if
the file server were a 68010.  That is, there is no usr.68020 or
pub.68020.  The file server is using entirely 68010 code, except for
vmunix, boot, and ps.  Since vmunix and boot are on the real root, it
does not waste any disk space to have the server use separate versions
from the clients.  Thus the only additional disk space caused by this
mixed configuration is that we have a separate copy of ps for use on
the server (which we call ps3).  I certainly don't claim to have tried
every program on the disk, but as far as I can tell, the 68020 works
just fine using 68010 software, except for vmunix, boot, and ps.  This
configuration is reasonable because we don't expect any users to log
in to the server.  So we don't care if the system software runs
slightly too slow on it.  The server spends all of its time doing nd
and NFS, both of which are part of the kernel, and of course the
kernel is 68020 code.

We are not sure what we are going to do when the next release comes
out.  This setup is the result of upgrading a working 68010 system to
a 68020.  So "setup" was run on a 68010.  Now that we have a 68020,
next time we install a release, things will get interesting.  I
suspect it will be hard to get "setup" to install a 68010-only
software on a 68020.  But I'm sure we'll find some solution.

We have also found that addresses like 128.135.1030 work fine in
setup, for those of us with class B networks.

I have an explanation of the wierd routing entries that show up on
diskless nodes.  When the Sun kernel first comes up, it doesn't know
its own Internet address.  One would think they would issue an RARP
request, and not do anything else until they get an answer.  But 3.0
is an interim release between the old ND technology and their new
generation (which presumably will use RARP or bootp).  So instead they
start off by trying to find an ND server.  To do so, they send a
broadcast ND request.  Unfortunately, they need to turn on TCP/IP in
order to do this.  So what host address should they use when they turn
on the network?  They have chosen to use their CPU serial number as
their Internet address.  This is a number that is guaranteed to be
unique, I guess.  One effect of turning on the network is to create a
routing entry, of the form

	localnet  localhost  U  ie0

But consider the implications of using a small number as your address.
This causes the first 8 bits of the address to be 0.  Thus the network
number looks like zero.  Of course a zero network number is a default
route!   Thus we end up with something like

	default	   0.0.xx.yy   U  ie0

Once the system figures out its real address, a routing is added for
it.  Unfortunately, the system fails to take out the old routing.
(I suspect it gets confused because the old route looks like a default
route rather than the usual local route.)  The net result is a routing
table that looks like it has a completely random default route.

Now for the interesting thing.  That random default route is actually
useful.  As it turns out, when you have a route with a zero hop count,
(i.e. it is flagged as U, rather than UG), it makes all of the
destinations appear to be local.  Technically, it is a route to the
interface, instead of a route to a gateway.  A route to the interface
causes the machine to issue ARP requests, just as if all destinations
were on the local Ethernet.  With the gateway technology we use, that
happens to be the exact thing that we want to happen.  The same seems
to be true at some other universities as well.  So we do not consider
that bogus entry to be a bug.  It means that when one of our
unsophisticated users installs a Sun according to the instructions, it
can immediately talk to the whole world.  We don't have to explain to
them how to put "route add" commands into /etc/rc.local.  However it
seems fairly clear that this happy state of affairs is an accident.
We fully expect to see the default route vanish with the next release
of SunOS.  (This is one of the few cases where we hope they *don't*
fix a bug.)

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

Date: 24 Aug 86 20:25:45 EDT
From: Charles <MCGREW@RED.RUTGERS.EDU>
Subject: Setup and 68010 code

   (This is a slight expansion of Scott Anderson's solution to the
network problem in setup - which I beleive to be the most correct
one.)
    A solution to the Class-C network problem in setup is to define
your default network to be only the first two digits (e.g.  for
Rutgers, with 128.6.x.x, we put just 128.6).  For the host number,
however, put in the value: 256*subnet_number + realhostnumber.  This
give the same effect as the correct complete host number by shifting
the subnet number into the right place in the internet address.  The
only glitch is you have to set the default network before typing in
the host number, since numbers like 1381 are not legal for the default
network.  A side effect of this is that your host tables will look
funny until you put in a complete one - we ftp in a complete host
table when we bring up the machine anyway, so this one solves itself.

   On the matter of running 68010 binaries on 68020's, we've found
that *everything* with the exception of the boot blocks, boot program,
the kernel and 'ps' (which reads /dev/kmem) will work on the 68020.
We found this when we had a sun3 serving an all-sun2 client set and
didn't want to waste the space.

Charles
-------

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

Date: Tue, 26 Aug 86 18:37:30 EDT
From: ted@braggvax.arpa
Subject: User settable menus for sun2.2 suntools' tty subwindows

	Does anyone else think that Sun made a mistake by allowing you to 
change your rootmenu in 2.x but not the tty subwindow menu?  I have always 
felt that the tty subwindows are where the real action is, given the nature 
of traditional Unix tools, and that they are the most fertile ground for 
menu enhancements.

	To realize some of that potential, we have developed a suntools
which allows you to specify a menu system for tty subwindows.  You can
specify almost arbitrary text (no nulls) to be "stuffed" into a window when a
particular menu item is chosen.  This lets you put menus on your favorite
(or your users' least favorite) utilities like emacs, mh, vi, less, 
spreadsheets etc.  The nice thing is that, as opposed to some menu systems,
the menus are nonintrusive.  The "old" keyboard method is always still
available, and advanced users can dispense entirely with the menus if they
want to.  You can also cure that bane of the sun2 keyboard by putting a
shift lock option in a menu to toggle upper case mode.

	We first developed the system on Sun 1.4, whose source code we
had access to.  When we jumped to 2.2, we lost this advantage and had to
figure out a binary patch for suntools to allow the system to work.  The
system is thus nonportable, but I think the 2.2 binary should continue to
work on 2.X and maybe 3.X (We have no sun 3 hw or sw yet).

	If anyone is interested, I will be glad to make the sources or
the binary available.  We also have a kind on neat tool I have been playing
with, analogous to Kernighan and Pike's pick(1), but window based.  (Ie, you
can say something like  rm `picktool *` ).

All the world's not a sun3 (yet).

			Ted Nolan
			ted@braggvax.arpa

Here is a man page for the menu system startup file:

--




Menurc(5)                 FILE FORMATS                  Menurc(5)



NAME
     menurc - startup file for bragg menu system

DESCRIPTION
     The menurc file is the key to  the  bragg  shelltool's  menu
     system.  It is read on startup by a new shelltool, to deter-
     mine the menus to display and the actions to take when  each
     option  is  chosen.   The menurc file is searched for in the
     following manner.  First the environment variable MENURC  is
     checked,  and  if  set,  the  file  indicated is used as the
     menurc file.  If this variable is not set, the  user's  home
     directory is checked for a file called .menurc. If this does
     not exist, the file /usr/lib/menu/.menurc is  used.   If  no
     menurc  file  exists anywhere, the shelltool defaults to its
     old behavior.  Tty subwindows other than the shelltool's may
     have  startup  files other than .menurc, but these may still
     be overridden with the MENURC variable.

FORMAT
     The menurc file is an ascii text file with a  fairly  simple
     syntax.   There  are  three types of lines in the file: com-
     ments, control lines, and option lines.

     Any line beginning with a # is considered to  be  a  comment
     and is ignored.

     Control lines come in two flavors,  MENU  lines  and  FAMILY
     lines.   Both  flavors start with a % in the first position,
     and any future control lines defined  should  continue  this
     tradition.

     A MENU line introduces a new menu and has the following for-
     mat.

                            %MENU menuname

     The argument menuname is the text that will  appear  at  the
     top  of the menu in reverse video.  It may be one or several
     words.

     A FAMILY line serves to group menus into stacks of families.
     All  menus  before  the  first FAMILY line are considered to
     belong to menu family 0. Menus after the first  FAMILY  line
     and  before  the second are considered to belong to family 1
     and so on.  The format of a FAMILY line is

                               %FAMILLY

     there are no arguments.

     Finally there are option lines.  Option lines define an item
     in  a menu.  Specifically, an item is associated with a menu



Sun Release 2.0           Last change:                          1






Menurc(5)                 FILE FORMATS                  Menurc(5)



     that begins at the first option line following the  previous
     MENU  line  and ends with the next MENU or FAMILY line.  The
     format of an option line is

                              text=text

     The text on the left side of the equals sign is  not  inter-
     preted  at all, and is used as the string to display for the
     option when the menu is popped up.  The text to the right of
     the equals sign is in effect typed into the shelltool window
     when the option is selected.  This is similar to the generic
     suntools  Stuff  operation, except that the text is unchang-
     ing.  This text is subject to C like interpretation  in  the
     following manner.

                    \b   - maps into a backspace
                    \r   - maps into a carriage return
                    \n   - maps into a newline
                    \t   - maps into a tab character
                    \- maps into a literal \
                    \^   - maps into a literal ^
                    \nnn - maps into the octal value of nnn
                    \0xnn     - maps into the hex value of nn
                    ^x   - maps into CTRL(x).

     There are four more escapes  that  rather  than  mapping  to
     specific  characters  map to actions by the menu system.  In
     the current implementation, these must be the only  text  on
     the right of the equals sign if they are to be used.

                    \mn  - switch to menu family n for next display
                    \s   - perform the suntools Stuff option
                    \p   - perform the suntools page mode toggle
                    \u   - Toggle shift lock (uppercase) mode for window

     The page and shift toggle escapes are special  in  that  the
     last time they appear in a menu, the text to the left of the
     equal sign is ignored and is replaced with a string indicat-
     ing  the  state  of the option.  If either option appears in
     the menu file more than once, each occurance will  have  the
     desired effect, but only the first last will have the chang-
     ing labels.


     An Example

     Here is an example of a simple menurc file.  We will  create
     three  menus  in two families, two menus in the first family
     (family 0) and one in the second (family 1).  The  menus  in
     the first family will be called Info and Edit. The info menu
     will perform the commands ls and who, while  the  edit  menu
     will  start  up  emacs  and  allow  stuffing,  exiting,  and



Sun Release 2.0           Last change:                          2






Menurc(5)                 FILE FORMATS                  Menurc(5)



     starting the emacs tutorial.  The menu in the second  family
     will  be called Bye and will have the options lockscreen and
     logout.


     %MENU Info
     List Directory=ls -l\n
     Users logged on=who\n
     Bye Menu=\m1
     %MENU Edit
     Stuff=\s
     Start emacs=emacs\n
     Exit emacs=^X^Z
     #Enter a ^_t  in octal just to show it can be done
     Emacs Tutorial=\037t
     %FAMILY
     %MENU Bye
     Lockscreen=lockscreen -r\n
     Signoff=logout\n
     Main Menus=\m0

FILES
     /usr/lib/menu/.menurc

SEE ALSO
     suntools(1)

BUGS
     You cannot enter a null character from a menu in the current
     implementation.  There can only be 16 families of menus in a
     menurc file.  There is currently no way to  stuff  text  and
     switch  menus in the same operation as in previous versions.
     Blank lines are not tolerated.  Syntax errors  are  ungrace-
     fully handled.  The parser probably has some bugs.  The file
     should probably be compiled somehow.




















Sun Release 2.0           Last change:                          3




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

Date: Thu, 21 Aug 86 15:02:14 edt
From: allegra!phri!roy@seismo.CSS.GOV (Roy Smith)
Subject: Problems with color map in SunCore?

	I'm trying to figure out how to get color output using SunCore on
my 3/160C (with GP/GB), but I'm not getting anywhere.  I tried taking the
demo program on page 7 of the "SunCore Reference Manual" (17-feb-86
edition), and adding in color.  So far, I havn't gotten anything to work.
After numerous little changes, I'm up to:

----------------
# include <usercore.h>
# define MAXCOLORS 256

float glassdx[] = {-10.0,9.0, 0.0,-14.0,30.0,-14.0,  0.0, 9.0,-10.0};
float glassdy[] = {  0.0,1.0,19.0, 15.0, 0.0,-15.0,-19.0,-1.0,  0.0};

float xred[] = {0.5, 0.7, 1.0, 0.0, 0.0};
float xgrn[] = {0.0, 0.7, 0.0, 1.0, 0.0};
float xblu[] = {0.5, 0.0, 0.0, 0.0, 1.0};

int gp1pixwindd();
struct vwsurf vwsurf = DEFAULT_VWSURF (gp1pixwindd);

main ()
{
	int ncolors, color;
	float red[MAXCOLORS], grn[MAXCOLORS], blu[MAXCOLORS];

	ncolors = sizeof (red) / sizeof (*red);
	printf ("%d colors\n", ncolors);

	initialize_core (DYNAMICC, NOINPUT, TWOD);
	initialize_view_surface (&vwsurf, FALSE);
	select_view_surface (&vwsurf);

	inquire_color_indices (&vwsurf, 0, MAXCOLORS-1, red, grn, blu);
	for (color = 0; color < ncolors; color++)
	{
		red[color] = xred[color];
		grn[color] = xgrn[color];
		blu[color] = xblu[color];
	}
	define_color_indices (&vwsurf, 0, MAXCOLORS-1, red, grn, blu);

	set_viewport_2 (0.125, 0.875, 0.125, 0.75);
	set_window (-50.0, 50.0, -10.0, 80.0);

	while (printf ("color? "), scanf ("%d", &color) == 1)
	{
		create_retained_segment (1);
		set_line_index (color);
		set_linewidth (1.0);

		move_abs_2 (0.0, 0.0);
		polyline_rel_2 (glassdx, glassdy, 9);
		move_rel_2 (-12.0, 33.0);
		line_rel_2 (24.0, 0.0);
		sleep (2);
		delete_retained_segment (1);
	}

	deselect_view_surface (&vwsurf);
	terminate_core ();

	exit (0);
}
----------------

	For some reason, it's only accepting the first 2 colors -- in the
current version, I get a maroon background and either a maroon (for odd
colors) or yellow-green (for even colors) martini glass.  Actually, I'm
just assuming I got a maroon glass -- you can't see it against the maroon
background.  If I do a ^\ to get a core dump, and use dbxtool to look at
vwsurf, I see vwsurf.cmapsize is 2.  Why won't it recognize the rest of the
color map?

	I have, at various times tried stuff like "vwsurf.cmapsize = 5;",
but that has produced either no or strange results, depending on when I do
it.  I'm sure that can't be what you're supposed to do anyway -- seems
terribly unportable to me.

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

Date: Sat, 23 Aug 86 16:10:45 bst
From: Grenville Whelan <GDW%UK.CO.SSL-MACC@ac.uk>
Subject: Bug in Release 3.0 'rdate'?

Recently, I upgraded a Sun-2/50 from Rel2.0 to Rel3.0. This Sun is on a single
ethernet network with 14 other Suns, (all running Rel2.0). Ever since, we've
not been able to get /usr/ucb/rdate functioning correctly -- when supplied with
the name of another host, the date returned is exactly 9 hours behind, whereas
all other Suns get the correct date. Any ideas ??

Thanks.
       +----------------------------+----------------------------------+
       | Grenville Whelan,          | Tel   - +44 625 29241            |
       | Software Sciences Ltd,     |                                  |
       | London & Manchester House, |                                  |
       | Park Street,               | EMAIL - gdw@ssl-macc.co.uk       |
       | Macclesfield, UK.          | UUCP  - ...!mcvax!ukc!sslvax!gdw |
       +----------------------------+----------------------------------+

           "I didn't get where I am today by writing silly quotes in
            my .signature file"  -- C.J.

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

Date: Mon, 4 Aug 86 20:05:47 pdt
From: David L. Markowitz <hplabs!seismo!csuf.ARPA!davstoy!dav@ucbvax.Berkeley.EDU>
Subject: Drivers (DY-4/Kennedy 9400, others)?

	I am looking for drivers for a few devices.

	I need a driver for a DY-4 1/2" tape controller with dual
Kennedy 9400 drives.  It will be in an ISI Optimum V workstation.
This machine runs a 4.2-based port to the 68020.  Any driver for
the DY-4 would be appreciated, and any driver for an ISI or Sun
for the Kennedy 9400 (with any controller) would also be appreciated.

	I also am putting a Mercury Zip 3216 array processor in the
ISI.  It is a multibus board set in an expansion chassis connected
to the main VMEbus.  I already have a driver for the Sun, so I'd
only be interested in on for the ISI VMEbus machine (or any useful
experiences concerning these devices).

===============================================================================

        David L. Markowitz
        Real Time Trekker
        Rockwell International (Where Science Gets Down To Busyness)
         ...!ucbvax!trwrb\
        ...!sdcsvax!ucivax!csuf!davstoy!dav
         ...!hplabs!felix/

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

Date: Mon, 25 Aug 86 15:55:12 pdt
From: white@ee.UCLA.EDU (Joseph White)
Subject: Public domain APL?

Does anyone know of a public domain version of APL which will
run on a SUN workstation? Thanks for the help.

					Joe White
					Electrical Engineering Dept.
					UCLA

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

Date: Mon, 25 Aug 86 10:48 EDT
From: HOUSE%williams.csnet@CSNET-RELAY.ARPA
Subject: SunView problems when using color

We are currently attempting to develop applications under 4.2 on a 3/160c
without a graphics processor.  Our problem concerns the use of user-defined
colormaps within the SunView pixwindows environment.

We define the colormap through the "pw_setcmsname" and "pw_putcolormap"
routines as described in the Beta draft (10/11/85) and rev. A (2/17/86)
of the SunView Programmer's Guide.  Our colormaps are designed specifically
after the example set forward in the /usr/include/sunwindows/cms_rgb.h file.
The applications consist of a FRAME containing a CANVAS and a PANEL.
Changes are made to the colormap of the Pixwin of the CANVAS (as accessed
through the canvas_pixwin() macro).

Under most circumstances there are no problems.  However, certain calls to
the Pixrect drawing routines result in a variety of seemingly unexplainable
errors:  e.g. on an 800x800 canvas a long vertical line (550+ pixels) drawn
with pw_vector() will be displayed properly when drawn "downward" but
will cause a core dump when drawn "upward".  Other problems include system
hanging, improper returns from procedures, shifted graphic displays, etc.
The debugger seems to indicate that the system stack is getting clobbered.

NOTE: All of these problems disappear when the identical program is run on
a black/white machine (3/50).

We would greatly appreciate any advice or suggestions that anyone has to offer.

Donald H House
Computer Science
Williams College

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

Date: Tue, 26 Aug 86 19:35:46 EDT
From: Rick Adams <rick@seismo.CSS.GOV>
Subject: sun screen copy to imagen?

Does anyone have a program to convert a sun screen dump to
something suitable for printing on an Imagen Laser Printer.

I have it working on a versatec, but I don't want to try the
Imagen if someone has already done it.

---rick

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

Date: Tue, 26 Aug 86 19:37:46 EDT
From: Rick Adams <rick@seismo.CSS.GOV>
Subject: Used sun brokers?

I have a Sun 2/120 that isn't much use anymore (all of our other
Suns are Sun3s). Is there any company that would accept a
Sun 2 as a trade in on a Sun 3. We can't sell it outright, since
it's government owned equipment.

---rick

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

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