Documented but un-obvious UNIX tricks

Michael "Ford" Ditto ford at cbmvax.UUCP
Fri Nov 10 23:50:14 AEST 1989


In article <23698 at cup.portal.com> thad at cup.portal.com (Thad P Floryan) writes:
>I've been informed the "ln" trick with respect to "ls" doesn't work with:
>
>	AT&T 386 running SysVR3.2, or
>	AT&T 3B2 600 running SysVR3.1.1

The "trick" of ls looking at its invocation name was present and
documented in 7th edition Unix, and is still in BSD.  I don't know exactly
when it was dropped, but it was not in SVR2.  It's one of the few cases
where I'm glad the Unix PC ended up with a pre-SVR2 version of a command.
The Unix PC ls source code contains various comments and code labelled
"UCB", and a comment: "Modified by Bill Joy and Mark Horton Sommer 1980".

>Sheesh.  Seems strange for features to be REMOVED from subsequent versions of
>AT&T System V; the UNIXPC's version is System V Release 2."something".

It is rather silly.  BTW, nobody ever officially said the Unix PC is
Release 2."something" -- it seems to be 80% SVR2, 10% SVR3, and 10% random
weirdness (pre-SVR2, BSD, and whatever).

>Can anyone with access to the just-released SVR4 verify the absence/presence
>of the shorthands for ls(1) and od(1) in that release?

SVR4 (at least the beta releases to date) doesn't have the ls link trick.

But speaking of SVR4 and Unix PC geneology -- SVR4 comes with TAM (the
Unix PC's curses-like windowing terminal support library) and even includes
some familiar include files:  Here, for example, are some exceprts from
/usr/add-on/include/sys/window.h, included by tam.h:

#define WIOCREAD	(WIOC|6)	/* read whole screen (32k)	*/
#define WIOCGETTEXT	(WIOC|7)	/* get window text info		*/
#define WIOCSETTEXT	(WIOC|8)	/* set window text info		*/
#define WIOCSYS		(WIOC|10)	/* set system window slot	*/
#define WIOCGETMOUSE	(WIOC|11)	/* get mouse info		*/
#define WIOCSETMOUSE	(WIOC|12)	/* set mouse info		*/
#define WIOCRASTOP	(WIOC|13)	/* user-level rastop		*/

/* slots in syswin for WIOCGET/SET SYS					*/
#define SYSWIN		3	/* number of sys wins	*/
#define SYSWMGR		0	/* window manager	*/
#define SYSPMGR		1	/* telephony manager	*/
#define SYSSMGR		2	/* status mgr		*/


In fact, <sys/window.h>, <sys/mouse.h>, even <sys/iohw.h> are present and
intact.  No, I don't think this means AT&T is thinking about porting SVR4
to the Unix PC, I think it just means they haven't finished sorting out
the machine-independent parts of TAM from the Unix PC specific parts.  It
is rather amusing to see:

#define VIDMEM		((usort *)0x420000)	/* mem addr	*/

in a header file on an Amiga running SVR4.
-- 
					-=] Ford [=-

"The number of Unix installations	(In Real Life:  Mike Ditto)
has grown to 10, with more expected."	ditto at amix.commodore.com
- The Unix Programmer's Manual,		...!uunet!cbmvax!ditto
  2nd Edition, June, 1972.		ford at kenobi.commodore.com



More information about the Unix-pc.general mailing list