[comp.os.misc] Coherent Digest Vol. 91.1, No. 6

rose@galtee.cs.wisc.edu (Scott M. Rose) (01/23/91)

Coherent Digest Vol. 91.1, No. 6      Tue Jan 22 11:52:07 CST 1991

Today's Topics:

   Re: Problems with Clam-141
   Less clearing the screen
   replies
   Re: replies (about clam)
   varargs.h
   less sources
   sc and less sources
   Internal Compiler Errors
   pathalias
   removing MWC master boot
   Also having problems w/ Clam-141
   Re: pathalias

Administrivia:

  The Coherent Digest is a forum for discussion of the MWC Coherent 3.x 
  operating system.  Send submissions to "coherent@cs.wisc.edu" and 
  administrivia to "coherent-reqeust@cs.wisc.edu".  Previous issues are 
  archived for anonymous FTP access on piggy.ucsb.edu in the directory
  "pub/coherent/mail-list".

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

Date: Sun, 20 Jan 91 01:02:50 MST
From: wayne@cpsc.ucalgary.ca (Wayne McCormick)
To: coherent
Subject: Re: Problems with Clam-141

Grant says:

>bhenning says:
>
>> Some problems: (for the mailing list)<> 
>> - I'm having problems with Clam-141 (off piggy). I keep
>>   getting a 'bad termcap entry', and after typing one or
>>   two commands (which it does not execute) it logs out..
>
>I've had exactly the same experience -- Clam complains about the
>termcap entry, then dies after one or two ignored commands.  It leaves
>the terminal in raw noecho mode and sometimes seems to crash the
>console device completely.
>
>Does anybody know where I can get the sources for the Coherent port of
>less?  I find it's habit of clearing the screen on exit very annoying
>and would like to change that.

I haven't had a problem with Clam-141 since I put it in, other than the
command line gets a little garbled when I try to edit a retrieved command
line from the history buffer.

I would also be interested in the sources for less, for the exact same
reason.

Wayne
wayne@cpsc.ucalgary.ca


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

Date: Sun, 20 Jan 91 19:22:04 +0100
From: hania@utwente.nl (Simon Hania)
To: coherent
Subject: Less clearing the screen

Lately I see people complaining about less clearing the screen upon exit.
This is caused by a termcap entry, which seems to be used only by
less. From memory I recall it is the "is" entry, which is used to
initialize the terminal. It contains a screen clearing escape sequence.
Just remove it.


- ------------+-----------------------
Simon Hania |  Hania@UTwente.NL
            |  hania@utrcu1.UUCP
            |  ..!hp4nl!utrcu1!hania

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

Date: Sun Jan 20 12:11:34 1991
From: Bill Henning <bhenning@bhami.wimsey.bc.ca>
To: coherent
Subject: replies

>> my observations
>  Mohd H. Misnan	replies

>>- Catching the bootblock's attention with a digit is
>   I solved this problem by waiting a beep during boot time 

Eventually it is possible to get the bootblock's attention, but it usually
takes me 3-5 tries

>>- compress needed a work file most of the time, it could not
>   Use compress or uncompress -b12 for compatibility with previous

I was de-compressing -b16 files from a unix box and from my Amiga

>>- I clobbered /usr/include/dirent.h when I was installing
>   Just copy dirent.h from the original distribution disks or use

I copied the distribution dirent.h to odirent.h, and sys/dir.h to sys/odir.h
just to be on the safe side.

>> my observations
>  Grant Edwards

>> - I'm having problems with Clam-141 (off piggy). I keep
>I've had exactly the same experience -- Clam complains about the
>termcap entry, then dies after one or two ignored commands.  It leaves

Problem solved: MAKE SURE that your .clamrc has a clam style path - I use
PATH=~# . /bin /usr/bin /usr/local/bin /usr/ganes /etc
and be careful of the permissions. Clam is FAR better than sh for interactive
use. Also note the conflict between clam's use of .aliases (for aliases)
and mail's for address aliases - just embed command aliases in .clamrc

>> - I've  almost managed to get sc41 running. It is not stable
>Just for curiosity's sake, what is sc41?

a 'Spreadsheet Calculator' - a simple spreadsheet, see comp.sources.unix
volume 8 for version 4.1 - v5.1, and v6.1 are too big.

The problem turns out to be a lack of D space. The program is VERY stack
intensive, and malloc's all over the place as well. I've been going through it
cutting down on the char buffer sizes, etc., and it MAY be possible to have
a 20x20 spreadsheet. I may try an earlier version.

>Does anybody know where I can get the sources for the Coherent port of
>less?  I find it's habit of clearing the screen on exit very annoying

On piggy - in coherent/sources/less.tar

- --
+-----------+----------------------------------------------------------------+
| Amiga//   |   UUCP: bhenning@bhami.wimsey.bc.ca /* preferred address */    |
| 1000//    |   -or-  uunet!van-bc!bhami!bhenning                            |
| \\ //     |   -or-  uunet!wimsey!bhami!bhenning                            |
|  \X/bhami |                                                                |
+-----------+----------------------------------------------------------------+

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

Date: Sun, 20 Jan 91 16:49:47 CST
From: David Fenyes <dfenyes@thesis1.hsch.utexas.edu>
To: bhenning@bhami.wimsey.bc.ca (Bill Henning)
Cc: coherent
Subject: Re: replies (about clam)

> 
> Problem solved: MAKE SURE that your .clamrc has a clam style path - I use
> PATH=~# . /bin /usr/bin /usr/local/bin /usr/ganes /etc
> and be careful of the permissions. Clam is FAR better than sh for interactive

Good.  You saved me the trouble of trying to butcher my working setup to 
duplicate the problem!!! :-)

BY the way, Make sure you have the more recent patches to Clam, to polish
up the key-binding scheme.  This is much cleaner & eliminates the risk
of internal conflicts in the data structure.
These are at piggy and MWC, called my_clam.tar.Z, compressed -b16.

> use. Also note the conflict between clam's use of .aliases (for aliases)
> and mail's for address aliases - just embed command aliases in .clamrc

Actually, Clam does *NOT* use .aliases specifically! I just threw in
a 
   source .aliases
line into .clamrc.  All you need to do is to change this to 
   source .clam_aliases
or whatever.

> On piggy - in coherent/sources/less.tar

last time I checked, this was only the binary.  Scott Rose was kind enough
to make this available, so he presumably has the sources (Do you, Scott :-)


- --
David Fenyes                                  dfenyes@thesis1.hsch.utexas.edu
University of Texas Medical School            Houston, Texas

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

Date: Mon, 21 Jan 91 2:24:40 CST
From: David Fenyes <dfenyes@thesis1.hsch.utexas.edu>
To: coherent
Subject: varargs.h

Hello folks,

Since I foisted the last varargs.h on you last time, I thought I'd
post the improved version, which seems to work so far :-).  If there are
any problems, please let me know at once!  I don't claim to be particularly
bright ;-}

This is useful for performing ports of software written for other
systems, etc.

David.
- --
David Fenyes                                  dfenyes@thesis1.hsch.utexas.edu
University of Texas Medical School            Houston, Texas
- -----------------------------cut here------------------------------
/*
 * varargs.h -- varargs definitions for Mark Williams C under Coherent 3.10
 *
 * This is for compatibility/ porting purposes.
 *
 * By David Fenyes,   Jan. 1991.
*/

/* Be aware that the (char) type is passed as a 16-bit word, and the (float)
 * type is passed as eight bytes (like (double)), so it may be
 * better to retrieve (char) variables as 
 *
 * x_char = (char) va_arg(args,short);
 *
 * and floats as
 *
 * x_float = (float) va_arg(args,double);
 *
 * the same goes for any (char)-based type or (float) -based type.
 *
 * The promotion of odd-sized types such as char to even-sized stack
 * increments can be accomplished by #define'ing VARGS_NO_UPGRADE_CHAR as 0.
 * this uses a different set of definitions for va_arg, which, with a 
 * good optimizer, should produce equivalently efficient assembly.
 * This still doesn't fix the (float) to (double) passing problem,
 * however, and the above casting may be the best solution.
 *
 * The default is VARGS_NO_UPGRADE_CHAR is 0. 
 * To disable the automatic upgrading of odd-sized types, set
 * VARGS__NO_UPGRADE_CHAR to 1.
 */

#if !defined(VARARG_H) && !defined(va_dcl)

#ifdef VARGS_NO_UPGRADE_CHAR
# undef VARGS_NO_UPGRADE_CHAR
#endif

# define VARGS_NO_UPGRADE_CHAR 0

#if VARGS_NO_UPGRADE_CHAR
# define va_arg(ptr,type) * ( ((type *) ptr)++)
#else
# define rsizeof(x) (sizeof(x) + (sizeof(x) & 1))
# define va_arg(ptr,type) ( \
    ptr = (char *) ((int)ptr + rsizeof (type)), \
     * ((type *) ((int) ptr - rsizeof (type))) \
  )
#endif /*VARGS_NO_UPGRADE_CHAR*/

#define va_dcl char va_alist;
#define va_start(ptr) (ptr = &va_alist);
#define va_end(ptr)

typedef char *va_list;


#define VARARG_H 1

#endif /* !defined (VARARG_H) */



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

Date: Mon, 21 Jan 91 11:08:15 EST
From: msdc!esa@uunet.UU.NET (Esa T. Ahola)
To: coherent
Subject: less sources

> > On piggy - in coherent/sources/less.tar
> 
> last time I checked, this was only the binary.  Scott Rose was kind enough
> to make this available, so he presumably has the sources (Do you, Scott :-)

I ported a semi-recent version and added some PD regular expression routines,
which an earlier port was lacking.  I sent the sources along with a bunch of 
other stuff to mwcbbs, but I haven't looked to see if they made it available.  


- -- 
Esa Ahola           esa@msdc.com      uunet!msdc!esa        CIS:70012,2753
Medical Systems Development Corporation (MsdC), Atlanta GA  (404) 589-3368

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

Date: Mon, 21 Jan 91 10:48:06 EST
From: Don Irmiger <don@delta.com>
To: coherent (coherent discussion group), grante@hydro.rosemont.com
Subject: sc and less sources

> > - I've  almost managed to get sc41 running. It is not stable
> 
> Just for curiosity's sake, what is sc41?

sc is a spreadsheet program posted to comp.unix.sources some time ago.  The
latest release is in the uunet archives and I believe is up to version 6.8.

> 
> Does anybody know where I can get the sources for the Coherent port of
> less?  I find it's habit of clearing the screen on exit very annoying
> and would like to change that.
> 

See the uunet archives for the less sources, version 5.  I have them if you
can't get them from uunet.

Try:
	echo "help" | mail <bigsite>!uunet!netlib
for information on accessing the uunet archives.

- -- 
Donald K. Irmiger III                                 UUCP: uunet!delta.com!don
Data Systems Coordinator                          Internet: don@delta.com
Michiana Rehabilitation Institute's Data Systems Center \ Altos 2086/Xenix 3.4b

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

Date: 21 Jan 91 21:43:44
From: hdrock!john@rex.cs.tulane.edu (John Welch)
To: lafayet!coherent
Subject: Internal Compiler Errors

Greetings, 
I am new to C so this may be a dumb question but I keep running into
internal compiler errors.   My brother wrote some code that I have 
had trouble porting.  After pondering the situation he wrote a test 
program which runs on numerous C compilers but gives internal compiler
error no. 1006.  

Could someone at MWC please look at these and perhaps
enlighten me.  Thanks in advance

- -----------Cut Here--------------------------------------------
/*  Start of test program
 *	This program contains no bugs, and should compile.
 */
struct test {
	int	dummy;
	void	(*f)();
};
struct test	t;
struct test	*gf() {
	extern void ff();

	t.f = ff;
	return(&t);
}
main() {
	(*(gf()->f))();
}
void	ff() {
	printf("Hello, World\n");
}
/*

John Welch                         Core Laboratories a division of
____    ____     ____              Western Atlas International Inc.
\   \  /   /\   /   /\             =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 \   \/   /  \ /   /  \            Humans   (903) 566-1436
  \  /   / \  /   /\   \           Internet lafayet!hdrock!john@rouge.usl.edu
   \/___/   \/___/  \___\          Bang.....!uunet!lafayet!hdrock!john
To him that can take all that you have, give what he asks.

*/

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

Date: 22 Jan 91 07:27:37
From: trystro!root@Think.COM (Richard Nickle)
To: think!fcsys!coherent
Subject: pathalias

I had pathalias sitting around for a long time, but I was
stuck on the yacc portion and never could get it figured
out.  I learned a little bit about yacc syntac, and since
I got smail today, I figured I'd give it a go.  I did manage
to get it compile, but it crashes gloriously.  Has anyone
gotten pathalias to work?  If it's a prerequisite to smail,
and you don't have it, what do you do, fake the path files?

Thanks,

Rick.

__|__  __      __ __|__  __   __  __  
  |   |   |  ||__   |   |__| |   |  | 		uunet!alphalpha!trystro!rick
  |__ |   |__| __|  |__ |__  |   |__| 		trystro!rick@alphalpha.com
           __| 2400bps (617) 625-7155 		fcsys!trystro!rick@think.com


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

Date: 21 Jan 91 13:50:11
From: mwc!hal@uunet.UU.NET (Hal Snyder)
To: cohmail@uunet.UU.NET
Subject: removing MWC master boot

>I've decided to run Coherent on its own machine.  In trying to reformat
>the partition it has occupied on my hard disk, I find it impossible to
>get rid of that small portion which pops up on the screen on booting up.
>It doesn't take up any space to speak of, but because I'm curious--how
>do I get rid of that protected area?

To remove the Mark Williams master boot program, you need to overwrite
the master boot block on hard drive 0 with another boot program.  Usually
this is the DOS master boot program.  DOS fdisk will write a new master
boot program if there is not a valid signature at the end of the current
contents of the master boot block.  So, all you need to do is modify the
contents of the last two bytes of the master boot block, and run DOS fdisk.
WARNING:  see the note below about DOS fdisk - be sure your hard drive is
backed up before you try this!!!

One way to invalidate the signature is to copy any sort of garbage into
the master boot block.  You can (a) reformat cylinder 0 of your hard
drive - for example using the "DIAGNOSTICS" menu of the AMI BIOS - or
(b) use COHERENT to overwrite the block, e.g. via
	dd if=/coherent of=/dev/at0x count=1

The master boot block is the first physical sector of the hard drive, e.g.
cylinder 0, head 0, sector 1 (don't ask why sector numbering starts at 1!).
The MWC master boot program is part of the initial program load, and does
not belong to any operating system since it runs before an operating
system is loaded.

We can make no promises or guarantees what one version or other of DOS fdisk
may do.  All versions of the program that we have tried do not recognize
partitions allocated for other operating systems - such partitions can not
be deleted, and are not even displayed, by DOS.  Certain configurations of
empty partitions cause DOS fdisk to hang.  And, most unfortunately, don't
expect any data on your hard drive to be available after DOS fdisk rewrites
an invalid master boot block;  our experience is that, even if previously
existing DOS partitions are re-allocated with identical cylinder ranges as
at the time of their initial creation, data in these partitions disappears.

One other note - if you do NOT select the MWC master boot when you install
COHERENT, you can save the DOS or other master boot program using COHERENT'
dd command, e.g.
	dd if=/dev/at0x of=/conf/mboot.DOS count=1
You can then use COHERENT fdisk to write the MWC master boot to your drive
from /conf/mboot and you will always have the option of restoring the old
boot program later with COHERENT fdisk or dd.

Mark Williams Tech. Support		(708)-291-6700 (voice)
uunet!mwc!support			(708)-291-6750 (fax)

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

Date: Mon, 21 Jan 91 09:18:09 EST
From: bond!clark@cmcl2.NYU.EDU (Dayton Clark)
To: cs.wisc.edu!rosevax.rosemount.com!rutgers!grante
Cc: coherent
Subject: Also having problems w/ Clam-141

> From: cmcl2!cs.wisc.edu!rosevax.rosemount.com!grante%rutgers.UUCP (Grant B. Edwards)


> bhenning says:

> > Some problems: (for the mailing list)
> > 
> > - I'm having problems with Clam-141 (off piggy). I keep
> >   getting a 'bad termcap entry', and after typing one or
> >   two commands (which it does not execute) it logs out.

> I've had exactly the same experience -- Clam complains about the
> termcap entry, then dies after one or two ignored commands.  It leaves
> the terminal in raw noecho mode and sometimes seems to crash the
> console device completely.


I had this problem also.  I seems that clam (I'm not at home so I'm
not sure which version of clam I'm running) fails miserably if it is
not initialized.  What I did is carefully craft .profile and .clamrc
files, including the TERM and TERMCAP definitions.  After that it
works OK.

dayton

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

Date: Tue, 22 Jan 91 12:18:09 EST
From: msdc!esa@uunet.UU.NET (Esa T. Ahola)
To: coherent
Subject: Re: pathalias

> I had pathalias sitting around for a long time, but I was
> stuck on the yacc portion and never could get it figured
> out.  I learned a little bit about yacc syntac, and since
> I got smail today, I figured I'd give it a go.  I did manage
> to get it compile, but it crashes gloriously.  Has anyone
> gotten pathalias to work?  If it's a prerequisite to smail,
> and you don't have it, what do you do, fake the path files?

Pathalias is not a prerequisite.

Smail allows you to include a special path entry called "smart-host" in
your local path database, and be configured to relay all unresolved
paths to that host.  I've found this to be the perfect solution;
instead of maintaining a path database myself, I "borrow" that of my
UUCP neighbor using the smart-host scheme.  My local path file contains
about a dozen path entries for my uucp neighbors plus a few aliases I've 
set up for convenience.


- -- 
Esa Ahola           esa@msdc.com      uunet!msdc!esa        CIS:70012,2753
Medical Systems Development Corporation (MsdC), Atlanta GA  (404) 589-3368

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

End of Coherent Digest Vol. 91.1, No. 6
***************************************

-- 
	Scott Rose
	rose@cs.wisc.edu