Sun-Spots Digest, v6n44

William LeFebvre Sun-Spots-Request at RICE.EDU
Thu Apr 7 02:38:01 AEST 1988


SUN-SPOTS DIGEST          Monday, 4 April 1988         Volume 6 : Issue 44

Today's Topics:
                Re: Multi-process debugging using Dbxtool
                     Re: writing 100K to tape drives
                              sun scsi tapes
                     Diffs for calentool version 1.4
                     MX support hacked in to sendmail
                       uudecode and trailing blanks
       Abstract background for Suntools (program for generating it)
                      Problems with philips monitors
         Printing problem: Canon CX using Interleaf on SUN 2/120
                          Sun Caps Key Remapping
                Using DNA/DNI to submit jobs on a VAX/VMS?
                      sendmail aliases file question

Send contributions to:  sun-spots at rice.edu
Send subscription add/delete requests to:  sun-spots-request at rice.edu
Bitnet readers can subscribe directly with the CMS command:
    TELL LISTSERV AT RICE SUBSCRIBE SUNSPOTS My Full Name
Recent backissues are stored on "titan.rice.edu".  For volume X, issue Y,
"get sun-spots/vXnY".  They are also accessible through the archive
server:  mail the word "help" to "archive-server at rice.edu".

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

Date:    Tue, 22 Mar 88 12:05:43 GMT
From:    Ian Phillipps <mcvax!camcon!igp at uunet.uu.net>
Subject: Re: Multi-process debugging using Dbxtool
Reference: v6n25

> If you do a fork, but not an exec, dbx will not be able to attach to the
> new child unless your executable file has type OMAGIC.   (See 'man ld' for
> how to make a file have OMAGIC). We do this here--works fine.

We have Sunos 3.4 (aka BSD4.2) - no mention of OMAGIC in man ld(1)
We do have -n and -z flags which control magic numbers.
Ideas?

[[ Idea: read the manual page for a.out as well.  There we find that
OMAGIC is number 0407 (leading 0 means octal), NMAGIC is 0410, and ZMAGIC
is 0413.  Now we can interpret ld(1) a little better:  -N means use magic
number 0407 or OMAGIC, -n means 0410 (NMAGIC), and -z means 0413 (ZMAGIC).
Object files created by the assembler (and thus the C compiler) are the
standard a.out format with an OMAGIC number.  By default, ld creates
ZMAGIC executables.  Perhaps the manual page for "ld" should not refer to
the magic numbers by number but by name instead?  Or maybe both?  --wnl ]]

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

Date:    Wed, 23 Mar 88 14:53:18 PST
From:    hoptoad!gnu at cgl.ucsf.edu (John Gilmore)
Subject: Re: writing 100K to tape drives

The TapeMaster controller can only write blocks of 64K or less -- it's
based on an Intel 8089 I/O controller.  That's why you get an error from
trying to write a 100K block to it.  It's a pain to find Intel brain
damage infesting even the guts of your Sun, I know...

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

Date:    Wed, 23 Mar 88 16:59:03 PST
From:    roode at orc.olivetti.com (David Roode)
Subject: sun scsi tapes

The Sun-3/1xx series SCSI host adapter was until recently not capable of
supporting SCSI disconnect and reconnect.  Sun only recently started
supporting this in their software, which was beneficial only for the Sun
3/50 and 3/60 integral SCSI host adapter.

More recently still Sun SCSI 3 host adapter has been released which fixes
this problem.  They sell an upgrade from Sun SCSI 2 to Sun SCSI 3.  Once
you get that, you will not see the problem of tape motion locking out any
disk access via the SCSI bus.  But, beware, I have seen rumors that this
new SCSI 3 host adapter has problems when placed on the VMEBus which also
has Xylogics 451's, which until recently has been Sun's favored controller
for SMD disks.  If you had SMD disks, you probably would not be seeing the
kind of system lockups you describe though.

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

Date:    Wed, 23 Mar 88 13:52:31 EST
From:    Matt Landau <mlandau at diamond.bbn.com>
Subject: Diffs for calentool version 1.4

Here is a set of diffs to apply to calentool 1.4 -- they implement the
following changes:

   (1) Improved option parsing to allow -f, -r (described below),
       and the standard SunView options to be supplied in any order,
       instead of requiring that -f precede other options.  Uses 
       getopt to parse non-SunView options in a SVID'ish way.

   (2) New -r flag to force readonly mode.  This is convenient if
       you want to peruse someone else's calendar file without making
       accidental changes, even though you may have write-permission
       on it.

   (3) Tool banner stripe now indicates when you're in readonly mode.

   (4) Changes to how the appointment filename and tempfile name are
       generated to make alternative calendar files specifed with -f 
       work correctly.  Version 1.4 always generated .tmp.appointments
       in the user's home directory, then tried using rename() to 
       make it become the appointments file.  This failed if the target
       file was on a different filesystem.  Calentool now generates
       tempfiles in the same directory as the appointments file.  At
       the same time, I cleaned up the name generation code a bit.

   (5) Tempfiles are uniquely named.  Version 1.4 always calls the 
       temp file .tmp.appointments -- in light of the preceding change,
       this is not great in the case of shared calendar files.  I
       changed it to generate names based on the processid of the
       calentool process, which should prevent these files from being 
       stomped on by concurrent users of a shared (readonly) calendar.

   (6) Man page now includes a BUGS section.

Next on my list is file-locking for shared writeable calendars, but I
won't get to it for weeks, so if someone else is inclined to do it first...

 Matt Landau			Waiting for a flash of enlightenment
 mlandau at bbn.com			  in all this blood and thunder

[[ The patch is too long for a digest, so it has been placed in the
archives as "sun-source/calentool1.4.diff".  It can be retrieved via
anonymous FTP from the host "titan.rice.edu" or via the archive server
with the request "send sun-source calentool1.4.diff".  For more
information about the archive server, send a mail message containing the
word "help" to the address "archive-server at rice.edu".  The source for
calentool itself is also available in the archived shar files
"sun-source/calentool.shar.1" and "sun-source/calentool.shar.2"  --wnl ]]

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

Date:    Wed, 23 Mar 88 09:02:43 PST
From:    jonab at cam.unisys.com (Jonathan P. Biggar)
Subject: MX support hacked in to sendmail

Funny thing,  I just hacked in MX support into the SUN 3.4 release of
sendmail yesterday.  I can send out the patches for anyone who needs them.

Jon Biggar
jonab at cam.unisys.com

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

Date:    Wed, 23 Mar 88 21:50:25 EST
From:    Brian Glendenning <brian at radio.toronto.edu>
Subject: uudecode and trailing blanks

In a recent Sun-Spots Steve Platts complains of uuencoded files being
mangled by having trailing spaces being stripped out (bitnet is the usual
culprit). The following program is quite useful for fixing this. I grabbed
the code off the net a while ago, I'm afraid I don't know who the author
is.

/*
    Try to repair uuencoded files when trailing space has been removed.
    It pads short lines with spaces whenever needed.
    It reads from stdin and writes to stdout.

	use: pgm <uuencoded > repaired
	     uudecode repaired

	or:  pgm <uuencoded | uudecode

    If it doesn't work, I can't help you.
*/

#include <stdio.h>

main()
  {
    char c;
    int tab, len;

    tab = 0;
    while ((c = getchar()) != EOF)
      {
	if (tab == 0)
	  {
	    if (' '<=c && c<='Z') len = ((c-' '+2)/3)*4+1;
	    else len = 1;
	  }
	if (c == '\n')
	  {
	    while (tab++<len) putchar(' ');
	    tab = 0;
	  }
	else tab++;
	putchar (c);
      }
  }
/* End of text from mirror:comp.sys.ibm.pc */

Brian Glendenning                INTERNET - brian at radio.toronto.edu
Radio Astronomy, U. Toronto          UUCP - {uunet,pyramid}!utai!radio!brian
+1 (416) 978-5558                  BITNET - glendenn at utorphys.bitnet

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

Date:    Thu, 24 Mar 88 09:23:59 gmt
From:    Robin Boswell <robin%aiva.edinburgh.ac.uk at nss.cs.ucl.ac.uk>
Subject: Abstract background for Suntools (program for generating it)

The following program implements a simple graphical algorithm described in
the  "Computer Recreations" column a few years ago.  It produces a
rasterfile suitable for loading as a background to suntools.  The default
values for the arguments are chosen so as to give an attractive result.
____________________

/*  File:      draw_circles.c
    Author:    Robin Boswell
    Updated:   Tuesday Mar 22 00:06   (1988)
    Purpose:   Create pretty background rasterfile for 
               monochrome SUN2's and SUN3's

    Compile with:  -lpixrect

    Usage:  draw_circles [-m modulus] [-s scale] [-i] [-f] 

            The -f (frame-buffer) option causes the program to display its
            output directly on the screen. Otherwise, it writes a rasterfile
            to the standard output.
            The -i (invert) option gives a predominantly light background;
            the default is predominantly dark.

            The default values of the arguments are: modulus = 7, scale = 13.

    Note:   It takes a while.
                                                                         */
#include <pixrect/pixrect_hs.h>
#include <stdio.h>

#define WIDTH  1152
#define HEIGHT  900

#define DEFAULT_SCALE    13.0
#define DEFAULT_MODULUS   7

struct rasterfile picture =
       {RAS_MAGIC,
        WIDTH,
        HEIGHT,
        1,
        (WIDTH * HEIGHT)/8,
        RT_STANDARD,
        RMT_NONE,
        0}; 

main(argc, argv)
int argc;
char *argv[];
{
   struct pixrect *pr;
   int i, j, z, modulus, half_width, half_height, invert, frame;
   float scale, x, y;

   modulus = DEFAULT_MODULUS; scale = DEFAULT_SCALE;
   invert = 0; frame = 0;

   while (--argc > 0 && (*++argv)[0] == '-'){
     switch((*argv)[1]){
       case 'm':
         if (! (--argc > 0 && sscanf(*++argv, "%d", &modulus) && modulus != 0)){
             fprintf(stderr, "modulus must be non-zero integer\n");
             exit(-1);
         }
         break;
       case 's':
         if (! (--argc > 0 && sscanf(*++argv, "%f", &scale) && scale != 0.0)){
             fprintf(stderr, "scale must be non-zero float\n");
             exit(-1);
        }
        break;
       case 'i':
        invert = 1;
        break;
       case 'f':
        frame = 1;
        break;   
       default:
        fprintf(stderr, "unknown option: %s\n", *argv);
        exit(-1);
     }
   }

   if (frame)
     pr = pr_open("/dev/fb");
   else
     pr = mem_create(WIDTH, HEIGHT, 1);

   pr_rop(pr,0,0,WIDTH,HEIGHT, - (! invert),0,0,0);
   half_width  = WIDTH /2; half_height = HEIGHT /2;

   for (i=0; i < WIDTH; ++i){
        for (j=0; j < HEIGHT; ++j){
             x = (i-half_width)/scale;
             y = (j-half_height)/scale;
             z = ((int) ((x*x) + (y*y)));
             if (! (z % modulus))  
                pr_put(pr, i, j, invert);
        }
   }
   if (frame)
     pr_close(pr);
   else {
     pr_dump_header(stdout, &picture, 0);
     pr_dump_image(pr, stdout, &picture);        
   }
}

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

Date:    Wed, 23 Mar 88 20:32:27 CST
From:    carey at b.cs.uiuc.edu (John Carey)
Subject: Problems with philips monitors

Here is something I have noticed on philips monitors ( I have noticed the
same thing on philips monitors used on Symbolics consoles, so I consider
this to be a monitor problem.  Symbolics fix was to change the video board
in the CPU, with limited success.  But I have noticed on several sun-3's,
which use the same philips monitor as the symbolics.) ok - what is it?

Very rarely -- sometimes once an hour, sometimes once every 5 or 10
minutes, depending on the severity of the problem (or maybe depending on
when you blink your eyes), a disruption in the picture occurs.  It is a
horizontal streak in the middle of the screen for a fraction of a second.
It looks like static or a momentary freakout in the horizontal scan.  Has
anybody noticed this?  Does anyone have any idea where the problem is?  Is
it in the horizontal? the video amplifier?  power supply?

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

Date:    Thu, 24 Mar 88 10:24:54 EST
From:    Lauri A. Szklut <lauri at mitre-bedford.arpa>
Subject: Printing problem: Canon CX using Interleaf on SUN 2/120

We have a CANON CX printer attached to our SUN 2/120 running 3.2.  I
installed WPS from INTERLEAF and am able to print INTERLEAF documents just
fine.  The problem is that at the UNIX level, I can only print documents
which do not have a # sign as the first character.  I know this sounds
weird, but I can print a file, then insert a # sign in the first line, and
then I can't print it anymore.  I get no error messages but all I get is
the header page.  INTERLEAF claims that it's not their problem, and that
it's a SUN UNIX problem.

This is the printcap entry:

1|cx1|Printer#1(imagen-serial-cx):\
	:lpd=/usr/lib/lpd:lp=/dev/ttyb:sd=/usr/spool/ipd1:\
	:lf=/usr/spool/ipd1/log:if=/usr/spool/ipd1:\
	:pl#1:sh:sb:sf:rw:\
	:printerleaf=pl2imp ! icat:\
	:impress=icat:\
	:ascii=icat:

Any ideas would be appreciated.  Thanks.

Lauri Szklut
MITRE Corporation
E-mail: lauri at mitre-bedford.arpa

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

Date:    Wed, 23 Mar 88 15:00:24 MST
From:    howie at cadnetix.com (Howie Grapek)
Subject: Sun Caps Key Remapping

After using a sun 3/50 for about 9 months in a UNIX development
environment (VI and other tools are used), I have become totally annoyed
at the lower left hand caps lock key.  

In a nutshell, the Caps key is like the F1 key with one exception.  While
in suntools, if I hit the Caps key no message is displayed in the top bar,
but when I hit the F1 key, the message [CAPS] is prepended to whatever is
in the top bar.

I'm sure, anyone who uses VI a lot may find the following scenareo a bit
annoying...

You are scrolling up and down making assorted modifications to a source
file.  You accidentially hit the Caps key, but are unaware of it. You want
to scroll down in the file so you hit a few 'j's.  Instead of moving down
a few lines in the code, you have JOINED the lines together because in VI,
a little 'j' and a large 'J' act completely different.  

It isn't so bad the first couple of times it happens, just deal with it
and go on. By the 50th or more time, it gets pretty bad. You tend to swear
pretty loudly and hit the keyboard.  A few people I work with have even
taken (physically) the Caps key out of the keyboard.

I have several questions:

1) Why is there more than 1 caps lock key?

[[ The F1 key is a convenience key created by the authors of shelltool.
The CAPS key is handled by the console keyboard driver.  Similar effect,
but for entirely different reasons.  --wnl ]]

2) Is there any way of mapping the two keys to act in the same manner
(preferably, make the caps key display [CAPS] in the border)?

3) Is there a way of disableing the Caps key while leaving the F1 key
alone via software or an escape sequence.

[[ This is more likely easier to do than #2.  --wnl ]]

4) Is there a method of doing what I asked above by creating an entry in
the '~/.ttyswrc' file?

Also, since I use VI a lot for development, I have created a few key maps
in my '~/.ttyswrc' file.  It is pretty straight forward. 

# 
#  vi editing special key maps 
# 
# right hand pad
# R5 - ESC
mapi	R5	\E
#  R9 - paragraph up
mapi	R9	
#  R15 - paragraph down
mapi	R15	
#  R1 - top of file
mapi	R1	1G
#  R4 - bottom of file
mapi	R4	G
#  R7 - beginning of line
mapi	R7	0
#  R13 - end of line
mapi	R13	$


Thanks in advance.

Howie Grapek  		Internet:howie at cadnetix.COM
Cadnetix Corp.		UUCP:	 cadnetix!howie
5775 Flatiron Parkway		{uunet,boulder,nbires}!cadnetix!howie
Boulder, CO 80301	Voice:	 303-444-8075 x 366

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

Date:    Wed, 23 Mar 88 16:32:11 EST
From:    helios!hydra!lalonde at uunet.uu.net (Terry Lalonde)
Subject: Using DNA/DNI to submit jobs on a VAX/VMS?

Has anybody out there got any code that would enable us, using SUNLINK
DNI, to submit batch jobs to a VMS VAX.  We have a piece of hardware which
runs logic simulation connect to the VAX.  We wish to download an input
file, run the simulation, then upload the results file.

Thanks in advance.
Terry lalonde
Mitel Corporation

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

Date:    Thu, 24 Mar 88 10:42:15 est
From:    rogers at nems.arpa (Rogers)
Subject: sendmail aliases file question

I'm running Sun 3.0 on a Sun 2/120 and trying to set up the aliases to
reflect several variations of names for each user.  As I understand the
man aliases documentation all that is required is name: name_1, name2,
name_3,...  If name is the directory name of the users home directory and
name_1 is a varation , its not working for me.  I also have group
distribution and that works for some people. I tried reversing the format
to (aliases:directory) and only one varation works.  Advance Thanks Bob
Holmquist

<bob>rogers at nems.arpa

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

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



More information about the Comp.sys.sun mailing list