psterm (NeWS terminal emulator) "official" patch #1

John Gilmore gnu at hoptoad.uucp
Wed Nov 16 19:46:26 AEST 1988


This context diff updates the original posted version of psterm
(version Grass-1, patch level 0) to patch level 1.

IMPORTANT: Before performing these changes, cd to the psterm
source directory and execute the command:

	mv psterm.ps psterm_1.ps

*then* apply the patches using "patch -p":

	patch -p < [thisfilename]

The mv command is because we made the psterm.ps file name version-
specific, so that different versions of psterm can coexist on the same
server.  If you have installed the patchlevel 0 version of psterm, you
can leave the original psterm.ps file installed in /usr/NeWS/lib on the
server, in case any patchlevel 0 psterm binaries connect to your
server.  People who have never installed patchlevel 0, or who have
replaced all the level 0 binaries, only need a copy of psterm_1.ps in
/usr/NeWS/lib, since you don't expect any level 0 psterms to try to
connect to this machine.  See the patch to the BUGS file below.


		Changes in this patch #1

The psterm.ps file has been renamed to psterm_1.ps, and it creates a
PostScript dictionary named PSTermDict_1.  The "1" will be incremented
in future releases if the interface between the psterm binary and the
psterm PostScript code changes.  This change allows multiple versions
of psterm to coexist on the same screen (e.g. due to terminal sessions
from different hosts).

If psterm_V.ps [V = version number] does not exist on the server's
system, the client side now attempts to copy the local version across
the network.  This permits psterm to be run with no change to the
server machine -- it can just be installed on the client(s) -- and
further improves multiple version compatability.  Optionally
installing psterm_V.ps on the server improves performance slightly the
first time you run psterm.

The installation section of the Makefile has been expanded to chown
and chgrp to bin the files it installs; it also chmod's the files to
known modes.  The procedure also correctly installs on System V
systems where a ``busy'' text file cannot be deleted.

Two bugs in -ixy are fixed.

A bug which caused psterm to fail if DefaultWindow was a subclass
of LiteWindow (instead of LiteWindow itself) is fixed.

The iconcanvas is now reshaped in the same manner as it is in
LiteWindow.  Both methods are correct.

The server side now remembers how long the scrollbar is.

A bug which caused the font size from -fs to be ignored if the
font is specified with -F is fixed.

A bug which caused the window to be opened about 35 points lower
than specified by -xy is fixed.

Some initialization code is rearranged to avoid timing problems in
psterm.ps.

The termcap and terminfo files are updated to remove the :ul:
parameter, which should not be there.  We also removed parentheses
from the long terminal names, as they cause problems.

We removed spurious Grasshopper copyright notices from the ref/config_*
files.  These files, like all the other Grasshopper changes, are public
domain.

We removed information from the ref/config_* files that wasn't relevant to
psterm.  They are rearranged to (hopefully) allow easier creation of
new config files.

Documentation and sample files have been updated.

The patch level is upgraded from 0 to 1.

Index: patchlevel.h
Prereq: 0
diff -rc ./patchlevel.h ../psterm.update/patchlevel.h
*** ./patchlevel.h	Tue Nov 15 21:12:58 1988
--- ../psterm.update/patchlevel.h	Tue Nov 15 21:41:47 1988
***************
*** 1 ****
! #define PATCHLEVEL 0
--- 1 ----
! #define PATCHLEVEL 1
diff -rc ./psterm.tcap ../psterm.update/psterm.tcap
diff -rc ./BUGS ../psterm.update/BUGS
*** ./BUGS	Tue Nov 15 21:12:58 1988
--- ../psterm.update/BUGS	Tue Nov 15 21:41:47 1988
***************
*** 1,5 ****
  #		Psterm Bug List
! # @(#)$Header: BUGS,v 1.3 88/10/03 18:57:58 gnu Release $
  
  PSTerm was an experiment in general purpose terminal emulators.  It
  was a very interesting experiment, and taught us how to do a few
--- 1,5 ----
  #		Psterm Bug List
! # @(#)$Header: /u/eric/client/psterm/RCS/BUGS,v 1.4 88/11/15 21:38:58 eric Update $
  
  PSTerm was an experiment in general purpose terminal emulators.  It
  was a very interesting experiment, and taught us how to do a few
***************
*** 61,63 ****
--- 61,82 ----
  worth the extra effort to fix.
  
  See the README file for more discussion of problems with the psterm concept.
+ 
+ -------------------
+ 
+ COMPATABILITY PROBLEMS:
+ 
+ All versions of psterm released by Grasshopper should not interfere with
+ the original Sun psterm.
+ 
+ The version of psterm released (on floppy disk) with MacNews 1.1.01 is
+ incompatable with patchlevel 0.  Windows from these two releases
+ cannot be freely intermingled on a single screen.
+ 
+ Patchlevel 1 (and all later releases) should not interfere with any
+ previous or later versions released by Grasshopper.  HOWEVER, versions
+ beyond patchlevel 0 will not support patchlevel 0.  The file psterm.ps
+ must be retained in order to run patchlevel 0 psterms.  Patchlevel 1
+ does not contain a copy of psterm.ps.  If you expect to encounter
+ patchlevel 0 psterms, make sure psterm.ps is installed in
+ /usr/NeWS/lib. 
diff -rc ./Makefile ../psterm.update/Makefile
*** ./Makefile	Tue Nov 15 21:12:59 1988
--- ../psterm.update/Makefile	Tue Nov 15 21:41:48 1988
***************
*** 26,32 ****
  #
  #
  # @(#)Makefile.psterm 9.9 88/01/19
! # @(#)$Header: Makefile,v 2.4 88/10/04 19:17:36 eric Release $
  #
  # Copyright (c) 1987 by Sun Microsystems, Inc.
  #
--- 26,32 ----
  #
  #
  # @(#)Makefile.psterm 9.9 88/01/19
! # @(#)$Header: /u/eric/client/psterm/RCS/Makefile,v 2.7 88/11/15 21:18:04 eric Update $
  #
  # Copyright (c) 1987 by Sun Microsystems, Inc.
  #
***************
*** 119,125 ****
  	display.c
  SHAR3 =	ref/config_aux \
  	ref/config_sunos \
! 	psterm.ps \
  	selection.c \
  	sys5.c
  SHAR4 = tcap.cps \
--- 119,125 ----
  	display.c
  SHAR3 =	ref/config_aux \
  	ref/config_sunos \
! 	psterm_1.ps \
  	selection.c \
  	sys5.c
  SHAR4 = tcap.cps \
***************
*** 127,132 ****
--- 127,134 ----
  	tcap_parse.c \
  	termcap.h
  
+ PSCODE = psterm_1.ps
+ 
  all:	psterm
  
  lint:	tcap.h
***************
*** 137,147 ****
  
  tcap.h: tcap.cps
  
! install: psterm psterm.ps
! 	rm -f ${BINDIR}/psterm ${LIBDIR}/psterm.ps
  	cp psterm ${BINDIR}
! 	cp psterm.ps ${LIBDIR}/psterm.ps
  	cp psterm.1 ${MANDIR}/psterm.${MANEXT}
  
  clean:
  	rm -f *.o psterm tcap tcap.h *.BAK *~
--- 139,159 ----
  
  tcap.h: tcap.cps
  
! install: psterm ${PSCODE}
! 	cd ${LIBDIR} ; rm -f ${PSCODE}
! 	cd ${BINDIR} ; mv psterm RemoveMe.$$$$ ; rm -f RemoveMe.$$$$
! 	@echo You may have to remove ${BINDIR}/RemoveMe.\* manually on
! 	@echo  systems which cannot delete busy text files
  	cp psterm ${BINDIR}
! 	-chown bin ${BINDIR}/psterm
! 	-chgrp bin ${BINDIR}/psterm
! 	chmod 755 ${BINDIR}/psterm
! 	cp ${PSCODE} ${LIBDIR}
! 	-cd ${LIBDIR} ; chown bin ${PSCODE}
! 	-cd ${LIBDIR} ; chgrp bin ${PSCODE}
! 	cd ${LIBDIR} ; chmod 644 ${PSCODE}
  	cp psterm.1 ${MANDIR}/psterm.${MANEXT}
+ 	chmod 644 ${MANDIR}/psterm.${MANEXT}
  
  clean:
  	rm -f *.o psterm tcap tcap.h *.BAK *~
diff -rc ./README ../psterm.update/README
*** ./README	Wed Nov 16 00:29:31 1988
--- ../psterm.update/README	Wed Nov 16 01:09:43 1988
***************
*** 7,18 ****
  it's best to use the "psterm" termcap entry unless you have special
  requirements.
  
! This is release Grass-1 of psterm from the Grasshopper Group.  The
! original source from Sun Microsystems' NeWS 1.1 release is freely
! distributable under Sun's copyright, reproduced below.  (Sun modified
! the copyright after the release, and supplied us the revised wording
! that is used here.)  The modifications to that source which were made at
! the Grasshopper Group are in the public domain.
  
  The Grasshopper Group sells and supports NeWS-related products.  Our
  first product is MacNews, a port of NeWS for A/UX on the Macintosh-II.
--- 7,18 ----
  it's best to use the "psterm" termcap entry unless you have special
  requirements.
  
! This is release Grass-1 (Patch Level 1) of psterm from the Grasshopper
! Group.  The original source from Sun Microsystems' NeWS 1.1 release is
! freely distributable under Sun's copyright, reproduced below.  (Sun
! modified the copyright after the release, and supplied us the revised
! wording that is used here.)  The modifications to that source which
! were made at the Grasshopper Group are in the public domain.
  
  The Grasshopper Group sells and supports NeWS-related products.  Our
  first product is MacNews, a port of NeWS for A/UX on the Macintosh-II.
***************
*** 64,70 ****
  	make install
  
  to install the psterm binary in /usr/NeWS/bin/psterm, the PostScript
! code in /usr/NeWS/lib/psterm.ps, and the man page in /usr/man/manl/psterm.l.
  Edit the Makefile if this is inappropriate on your system.
  
  A tutorial called UsingPSTerm is also included.
--- 64,70 ----
  	make install
  
  to install the psterm binary in /usr/NeWS/bin/psterm, the PostScript
! code in /usr/NeWS/lib/psterm_1.ps, and the man page in /usr/man/manl/psterm.l.
  Edit the Makefile if this is inappropriate on your system.
  
  A tutorial called UsingPSTerm is also included.
***************
*** 112,120 ****
  main.c		argument processing, main()
  patchlevel.h	revision level
  psterm.1	man page
- psterm.ps	PostScript code
  psterm.tcap	termcap entries
  psterm.tinfo	terminfo entries
  ref/config_aux	A/UX specific configuration information
  ref/config_sunos	SunOS configuration information
  sampl.pstermrc	example .pstermrc file
--- 112,120 ----
  main.c		argument processing, main()
  patchlevel.h	revision level
  psterm.1	man page
  psterm.tcap	termcap entries
  psterm.tinfo	terminfo entries
+ psterm_1.ps	PostScript code
  ref/config_aux	A/UX specific configuration information
  ref/config_sunos	SunOS configuration information
  sampl.pstermrc	example .pstermrc file
***************
*** 213,216 ****
   * Mountain View, California  94043
   */
  
! @(#)$Header: README,v 2.4 88/10/04 19:17:18 eric Release $
--- 213,216 ----
   * Mountain View, California  94043
   */
  
! @(#)$Header: /u/eric/client/psterm/RCS/README,v 2.6 88/11/16 00:52:03 gnu Exp $
diff -rc ./UsingPSTerm ../psterm.update/UsingPSTerm
*** ./UsingPSTerm	Tue Nov 15 21:13:01 1988
--- ../psterm.update/UsingPSTerm	Tue Nov 15 21:41:50 1988
***************
*** 6,12 ****
  
  				by Eric Messick
  
!  @(#)$Header: UsingPSTerm,v 2.1 88/10/03 18:17:14 eric Release $
  
  	Starting psterm.
  
--- 6,12 ----
  
  				by Eric Messick
  
!  @(#)$Header: /u/eric/client/psterm/RCS/UsingPSTerm,v 2.2 88/11/10 17:25:18 eric Update $
  
  	Starting psterm.
  
***************
*** 137,147 ****
  
  
  Following the other command line options, you can specify a command
! and arguments to be executed in lieu of your shell.
  
  
  
  
  	Starting psterm from a Menu
  
  The default root menu has entries for starting a psterm.  These just
--- 137,162 ----
  
  
  Following the other command line options, you can specify a command
! and arguments to be executed in lieu of your shell.  Several commands
! that are very useful are:
  
+ 	psterm /bin/login -p username
  
+ which opens a psterm window and prompts for username's password.  The
+ -p tells login to pass the environment through, so your shell will
+ know what kind of terminal you're on.  If you leave off the username: 
  
+ 	psterm /bin/login -p
  
+ it will prompt for it.  You can also connect to another host via tip:
+ 
+ 	psterm tip hostname
+ 
+ and when you get out of tip, the window will go away.
+ 
+ 
+ 
+ 
  	Starting psterm from a Menu
  
  The default root menu has entries for starting a psterm.  These just
***************
*** 150,156 ****
  and redirects its stdin stdout and stderr, generally to /dev/null.
  When psterm sees that it has been started this way, it doesn't bother
  to fork itself (see -fg and -bg, above).  You can create your own menu
! entries to do this in your .litewin.rc file.  See the example files.
  
  
  
--- 165,171 ----
  and redirects its stdin stdout and stderr, generally to /dev/null.
  When psterm sees that it has been started this way, it doesn't bother
  to fork itself (see -fg and -bg, above).  You can create your own menu
! entries to do this in your user.ps file.  See the example files.
  
  
  
***************
*** 188,194 ****
  wants to talk to, you need to make sure that the news_server is
  willing to talk back.  You have to either get the remote host into the
  list of hosts that your local server will talk to, or set
! /NetSecurityWanted to false in you .litewin.rc.  See the example
  files.
  
  
--- 203,209 ----
  wants to talk to, you need to make sure that the news_server is
  willing to talk back.  You have to either get the remote host into the
  list of hosts that your local server will talk to, or set
! /NetSecurityWanted to false in your user.ps.  See the example
  files.
  
  
diff -rc ./display.c ../psterm.update/display.c
*** ./display.c	Tue Nov 15 21:13:10 1988
--- ../psterm.update/display.c	Tue Nov 15 21:41:58 1988
***************
*** 38,44 ****
  #ifndef lint
  static char sccsid[] = "@(#)display.c 9.5 88/01/19 Copyright 1985 Sun Micro";
  static char RCSid[] =
! 	"@(#)$Header: display.c,v 2.2 88/10/04 05:11:23 eric Release $";
  #endif
  
  /*
--- 38,44 ----
  #ifndef lint
  static char sccsid[] = "@(#)display.c 9.5 88/01/19 Copyright 1985 Sun Micro";
  static char RCSid[] =
! 	"@(#)$Header: display.c,v 2.3 88/11/08 19:35:07 eric Update $";
  #endif
  
  /*
***************
*** 362,367 ****
--- 362,368 ----
  	PSFILE	   *f;
  	char		frametitle[100];
  	char		host[100];
+ 	char		buf[2];
  
  	f = Connect_To_Server();
  	if (f==NULL) return NULL;
***************
*** 369,374 ****
--- 370,383 ----
  	PSDefs(reload);
  	psio_flush(PostScript);
  
+ 	if (read(psio_fileno(PostScriptInput), buf, 2) != 2) {
+ 		perror("PostScriptInput");
+ 		return NULL;
+ 		}
+ 	if (buf[0]!='y')
+ 		if (JamItDownTheSocket())
+ 			return NULL;
+ 
  	if (framelabel == NULL) {
  		static char te[] = " terminal emulator";
  		sprintf(frametitle, "%.*s%s",
***************
*** 395,400 ****
--- 404,431 ----
  	psio_flush(PostScript);
  	return (f);
  }
+ 
+ JamItDownTheSocket()
+ {
+ 	int f, nread;
+ 	char buf[4096], *s;
+ 
+ 	if ((f=open("psterm_1.ps", O_RDONLY)) < 0)
+ 		if ((f=open("/usr/NeWS/lib/psterm_1.ps", O_RDONLY)) < 0)
+ 			Fatal("Cannot access %s", "psterm_1.ps");
+ 	nread = read(f, buf, 4096);
+ 	while (nread>0) {
+ 		s = buf;
+ 		while(nread-- > 0)
+ 			psio_putc(*s++, PostScript);
+ 		nread = read(f, buf, 4096);
+ 		}
+ 	if (nread<0)
+ 		perror("psterm_1.ps");
+ 	close(f);
+ 	return nread;
+ }
+ 
  
  PostScriptErrorMessage(s)
  char *s;
diff -rc ./main.c ../psterm.update/main.c
*** ./main.c	Tue Nov 15 21:13:09 1988
--- ../psterm.update/main.c	Tue Nov 15 21:41:57 1988
***************
*** 37,43 ****
  
  #ifndef lint
  static	char sccsid[] = "@(#)main.c 9.7 88/01/19 Copyright 1985 Sun Micro";
! static	char RCSid[] = "@(#)$Header: main.c,v 2.2 88/10/04 04:22:48 eric Release $";
  #endif
  
  /*
--- 37,43 ----
  
  #ifndef lint
  static	char sccsid[] = "@(#)main.c 9.7 88/01/19 Copyright 1985 Sun Micro";
! static	char RCSid[] = "@(#)$Header: main.c,v 2.3 88/10/25 12:57:34 eric Update $";
  #endif
  
  /*
***************
*** 180,186 ****
  	    if (--argc > 0)
  		iconx = atoi(*++argv);
  	    if (--argc > 0)
! 		iconx = atoi(*++argv);
  	    if (iconx >= 0 && icony >= 0)
  		continue;
  	}
--- 180,186 ----
  	    if (--argc > 0)
  		iconx = atoi(*++argv);
  	    if (--argc > 0)
! 		icony = atoi(*++argv);
  	    if (iconx >= 0 && icony >= 0)
  		continue;
  	}
*** ./psterm.tcap	Tue Nov 15 21:13:05 1988
--- ../psterm.update/psterm.tcap	Tue Nov 15 21:41:54 1988
***************
*** 1,6 ****
  #
! #	Grasshopper Group NeWS Termcaps 1.8  -HD  88/08/23
! #	@(#)$Header: psterm.tcap,v 2.1 88/09/23 19:12:35 hugh Release $
  #
  # nterm is a fancy vt220 terminal emulator for the NeWS window system
  nt|nterm:\
--- 1,6 ----
  #
! #	Grasshopper Group NeWS Termcaps 2.0  -HD  88/10/24
! #	@(#)$Header: psterm.tcap,v 2.2 88/10/27 18:47:29 eric Update $
  #
  # nterm is a fancy vt220 terminal emulator for the NeWS window system
  nt|nterm:\
***************
*** 17,23 ****
  	:AL=\E[%dL:DL=\E[%dM:IC=\E[%d@:DC=\E[%dP:\
  	:ti=\E[2J\E[?47h:te=\E[?47l:im=\E[4h:ei=\E[4l:\
  	:ts=\E[?E\E[?%i%dT:fs=\E[?F:es:ds=\E[?E:
! nt|nterms|nterm terminal emulator (small)(NeWS window system):\
  	:co#80:li#24:tc=nterm:
  #
  # Termcap for NeWS's psterm from Eric Messick & Hugh Daniel
--- 17,24 ----
  	:AL=\E[%dL:DL=\E[%dM:IC=\E[%d@:DC=\E[%dP:\
  	:ti=\E[2J\E[?47h:te=\E[?47l:im=\E[4h:ei=\E[4l:\
  	:ts=\E[?E\E[?%i%dT:fs=\E[?F:es:ds=\E[?E:
! # Small nterm terminal emulator termcap
! nt|nterms|small nterm:\
  	:co#80:li#24:tc=nterm:
  #
  # Termcap for NeWS's psterm from Eric Messick & Hugh Daniel
***************
*** 36,45 ****
  	:me=\EN*:mr=\EOr:nd=\EV:pt:rc=\034:rs=\EN*:sc=\035:\
  	:se=\ENo:sf=\EW:sl=\EOl:so=\EOo:sr=\EX:te=\ENt:\
  	:ti=\EOt:ts=\EOl:ue=\ENu:\
! 	:le=\ET:ll=\EU:ul:up=\EY:us=\EOu:vb=\EZ:\
  	:co#80:li#34:
  #  This is a faster termcap for psterm, Warning: if you use this termcap
! #  some control characters you type will do strange things to the screen.
  p1|psterm-fast:\
  	:am:bs:al=^A:cd=^B:ce=^C:cl=^L:cm=^D%d;%d;:cs=^E%d;%d;:\
  	:dc=^F:dl=^K:do=^P:ei=^Ni:el=^Nl:fs=^Nl:\
--- 37,47 ----
  	:me=\EN*:mr=\EOr:nd=\EV:pt:rc=\034:rs=\EN*:sc=\035:\
  	:se=\ENo:sf=\EW:sl=\EOl:so=\EOo:sr=\EX:te=\ENt:\
  	:ti=\EOt:ts=\EOl:ue=\ENu:\
! 	:le=\ET:ll=\EU:up=\EY:us=\EOu:vb=\EZ:\
  	:co#80:li#34:
  #  This is a faster termcap for psterm, Warning: if you use this termcap
! #  some control characters you type will do strange things to the screen
! #  on systems that echo typed control characters to the users terminal.
  p1|psterm-fast:\
  	:am:bs:al=^A:cd=^B:ce=^C:cl=^L:cm=^D%d;%d;:cs=^E%d;%d;:\
  	:dc=^F:dl=^K:do=^P:ei=^Ni:el=^Nl:fs=^Nl:\
***************
*** 49,54 ****
  	:me=^N*:mr=^Or:nd=^V:pt:rc=\034:rs=^N*:sc=\035:\
  	:se=^No:sf=^W:sl=^Ol:so=^Oo:sr=^X:te=^Nt:\
  	:ti=^Ot:ts=^Ol:ue=^Nu:\
! 	:le=^T:ll=^U:ul:up=^Y:us=^Ou:vb=^Z:\
  	:co#80:li#34:
  ####  End of stuff added by Grasshopper Group
--- 51,56 ----
  	:me=^N*:mr=^Or:nd=^V:pt:rc=\034:rs=^N*:sc=\035:\
  	:se=^No:sf=^W:sl=^Ol:so=^Oo:sr=^X:te=^Nt:\
  	:ti=^Ot:ts=^Ol:ue=^Nu:\
! 	:le=^T:ll=^U:up=^Y:us=^Ou:vb=^Z:\
  	:co#80:li#34:
  ####  End of stuff added by Grasshopper Group
diff -rc ./psterm.tinfo ../psterm.update/psterm.tinfo
*** ./psterm.tinfo	Tue Nov 15 21:13:05 1988
--- ../psterm.update/psterm.tinfo	Tue Nov 15 21:41:54 1988
***************
*** 1,6 ****
  #
! #	Grasshopper Group NeWS Termcaps 1.9  -HD  88/9/03
! #	@(#)$Header: psterm.tinfo,v 2.2 88/10/05 17:36:11 eric Release $
  #
  # nterm is a fancy vt220 terminal emulator for the NeWS window system
  nterm,
--- 1,6 ----
  #
! #	Grasshopper Group NeWS Termcaps 2.0  -HD  88/10/24
! #	@(#)$Header: psterm.tinfo,v 2.3 88/10/27 18:47:45 eric Update $
  #
  # nterm is a fancy vt220 terminal emulator for the NeWS window system
  nterm,
***************
*** 51,57 ****
  	kcub1=\b,	nel=\r\n,	ind=\n,
  	use=psterm-basic,
  psterm|psterm-basic|psterm-80x34,
! 	am,	km,	hs,	ul,
  	cols#80,	lines#34,
  	bel=^G,	cr=\r,	csr=\EE%p1%d;%p2%d;,
  	clear=\f,	el=\EC,	ed=\EB,
--- 51,57 ----
  	kcub1=\b,	nel=\r\n,	ind=\n,
  	use=psterm-basic,
  psterm|psterm-basic|psterm-80x34,
! 	am,	km,	hs,
  	cols#80,	lines#34,
  	bel=^G,	cr=\r,	csr=\EE%p1%d;%p2%d;,
  	clear=\f,	el=\EC,	ed=\EB,
***************
*** 72,78 ****
  #  some control characters you type will do strange things to the screen
  #  on systems that echo typed control characters to the users terminal.
  psterm-fast,
! 	am,	km,	hs,	ul,
  	cols#80,	lines#34,
  	bel=^G,	cr=\r,	csr=^E%p1%d;%p2%d;,
  	clear=\f,	el=^C,	ed=^B,
--- 72,78 ----
  #  some control characters you type will do strange things to the screen
  #  on systems that echo typed control characters to the users terminal.
  psterm-fast,
! 	am,	km,	hs,
  	cols#80,	lines#34,
  	bel=^G,	cr=\r,	csr=^E%p1%d;%p2%d;,
  	clear=\f,	el=^C,	ed=^B,
diff -rc ./psterm_1.ps ../psterm.update/psterm_1.ps
*** ./psterm_1.ps	Wed Nov 16 01:11:39 1988
--- ../psterm.update/psterm_1.ps	Wed Nov 16 01:09:43 1988
***************
*** 36,42 ****
  %
  %
  % "@(#)psterm.ps 1.0 88/06/09 SMI
! % "@(#)$Header: psterm.ps,v 2.3 88/10/05 17:45:46 eric Release $
  %
  % Copyright (c) 1985 by Sun Microsystems, Inc.
  %/
--- 36,42 ----
  %
  %
  % "@(#)psterm.ps 1.0 88/06/09 SMI
! % "@(#)$Header: /u/eric/client/psterm/RCS/psterm_1.ps,v 2.14 88/11/11 20:44:00 eric Update $
  %
  % Copyright (c) 1985 by Sun Microsystems, Inc.
  %/
***************
*** 45,54 ****
  pause
  
  systemdict begin
! 	/PSTermDict 150 dict def
  end
  
! PSTermDict begin
  
  		% user customization of these items can be done in ~/.pstermrc
  
--- 45,54 ----
  pause
  
  systemdict begin
! 	/PSTermDict_1 150 dict def
  end
  
! PSTermDict_1 begin
  
  		% user customization of these items can be done in ~/.pstermrc
  
***************
*** 65,71 ****
  	/EdgeBottom		1	def
  
  	/ScrollbarWidth		16	def
! 
  	/Shrink_To_Cols_Lines	true	def
  			% contract window to nearest integral size
  
--- 65,72 ----
  	/EdgeBottom		1	def
  
  	/ScrollbarWidth		16	def
! 	/ScrollBarMinBoxSize	8	def
! 			% minimum height of scroll bar box
  	/Shrink_To_Cols_Lines	true	def
  			% contract window to nearest integral size
  
***************
*** 283,289 ****
  
  						}
  			(Version to Frame Label){
! 				($Header: psterm.ps,v 2.3 88/10/05 17:45:46 eric Release $)
  				8 1 index length 9 sub getinterval SL
  						}
  		] /new DefaultMenu send def
--- 284,290 ----
  
  						}
  			(Version to Frame Label){
! 				($Header: /u/eric/client/psterm/RCS/psterm_1.ps,v 2.14 88/11/11 20:44:00 eric Update $)
  				8 1 index length 9 sub getinterval SL
  						}
  		] /new DefaultMenu send def
***************
*** 305,311 ****
  				BarMax BarMin sub div def
  			/BoxSize BarViewPercent BarScale mul neg
  				ItemHeight ButtonSize 2 mul sub min
! 				5 max
  				def
  		} def
  		/ValueToY { % value -> y
--- 306,312 ----
  				BarMax BarMin sub div def
  			/BoxSize BarViewPercent BarScale mul neg
  				ItemHeight ButtonSize 2 mul sub min
! 				ScrollBarMinBoxSize max
  				def
  		} def
  		/ValueToY { % value -> y
***************
*** 312,321 ****
  			BarMin BarViewPercent sub dup 0 le {
  				pop ButtonSize
  			} {
! 				exch
! 				1 index exch sub
! 				1 index BarMax sub div mul neg
  				BarScale mul ButtonSize add
  			} ifelse
  		} def
  		/YToValue { % y -> value
--- 313,323 ----
  			BarMin BarViewPercent sub dup 0 le {
  				pop ButtonSize
  			} {
! 				sub BarViewPercent sub
  				BarScale mul ButtonSize add
+ 				BoxSize sub
+ 				ButtonSize max
+ 				ItemHeight ButtonSize sub BoxSize sub min
  			} ifelse
  		} def
  		/YToValue { % y -> value
***************
*** 323,329 ****
  			BarScale div BarMin add .5 add truncate
  			CheckValueBounds
  		} def
- 		/ferd pop
  		/CheckValueBounds { % value => value (in range)
  			BarMax max BarMin BarViewPercent sub min
  		} def
--- 325,330 ----
***************
*** 361,368 ****
  		/Scrollbar		null	def
  		/ScrollbarActive	false	def
  	dictend
! 	cl
! assbegin
  		/BorderRight {
  			ScrollbarActive {
  				{
--- 362,368 ----
  		/Scrollbar		null	def
  		/ScrollbarActive	false	def
  	dictend
! 	classbegin
  		/BorderRight {
  			ScrollbarActive {
  				{
***************
*** 370,376 ****
  					BorderRight max
  				} DefaultWindow send
  			} {
! 				DefaultWindow /BorderRight get
  			} ifelse
  		} def
  
--- 370,376 ----
  					BorderRight max
  				} DefaultWindow send
  			} {
! 				{ BorderRight } DefaultWindow send
  			} ifelse
  		} def
  
***************
*** 470,477 ****
  			/MoveFrameControls super send
  			ScrollbarActive {
  				FrameWidth BorderRight sub
! 				ControlSize 1 s
! ub
  				ScrollbarWidth
  				FrameHeight ControlSize sub BorderTop sub 2 add
  				/reshape Scrollbar send
--- 470,476 ----
  			/MoveFrameControls super send
  			ScrollbarActive {
  				FrameWidth BorderRight sub
! 				ControlSize 1 sub
  				ScrollbarWidth
  				FrameHeight ControlSize sub BorderTop sub 2 add
  				/reshape Scrollbar send
***************
*** 504,514 ****
  		/ShapeIconCanvas {
  			gsave
  			ParentCanvas setcanvas
- 			IconX null ne {
- 				IconX IconY translate
- 			} if
  			0 0 IconWidth IconHeight IconPath
  			IconCanvas reshapecanvas
  			grestore
  		} def
  
--- 503,515 ----
  		/ShapeIconCanvas {
  			gsave
  			ParentCanvas setcanvas
  			0 0 IconWidth IconHeight IconPath
  			IconCanvas reshapecanvas
+ 			IconX null ne {
+ 				IconCanvas setcanvas
+ 				[1 0 0 1 0 0] setmatrix
+ 				IconX IconY movecanvas
+ 			} if
  			grestore
  		} def
  
***************
*** 517,525 ****
  		/makemenus {
  			/ResizeMenu [
  				(Changing Font Size determines:) {}
- 				() {
- }
  				() {}
  				(Changing Lines/Cols determines:) {}
  				() {}
  				() {}
--- 518,525 ----
  		/makemenus {
  			/ResizeMenu [
  				(Changing Font Size determines:) {}
  				() {}
+ 				() {}
  				(Changing Lines/Cols determines:) {}
  				() {}
  				() {}
***************
*** 597,602 ****
--- 597,603 ----
  	grestore
  
  	/TSB { % on/off => -   ``toggle'' scrollbar
+ 		dup /ScrollSaveLength exch store
  		0 eq { /ScrollbarOff } { /ScrollbarOn } ifelse MyWindow send
  	} def
  	/SSBV { % totallines currentpos => -   set scrollbar value
***************
*** 1281,1288 ****
  	/createwindow {
  % x y fs col line framelabel iconlabel font starticonic iconx icony
  		pause
- 		/IconInitialX exch store
  		/IconInitialY exch store
  		/StartIconic exch store
  		/InitialFont exch store
  		/MyIconLabel exch store
--- 1282,1289 ----
  	/createwindow {
  % x y fs col line framelabel iconlabel font starticonic iconx icony
  		pause
  		/IconInitialY exch store
+ 		/IconInitialX exch store
  		/StartIconic exch store
  		/InitialFont exch store
  		/MyIconLabel exch store
***************
*** 1289,1295 ****
  		/MyFrameLabel exch store
  		/Window_lines exch store
  		/Window_cols exch store
! 		/SelectedFontSize exch store
  		/Window_y exch store
  		/Window_x exch store
  
--- 1290,1296 ----
  		/MyFrameLabel exch store
  		/Window_lines exch store
  		/Window_cols exch store
! 		/CommandLineFontSize exch store
  		/Window_y exch store
  		/Window_x exch store
  
***************
*** 1297,1303 ****
  
  		/UserWindowCustom load MyWindow send
  
! 		Window_x Window_y 0 0 /doreshape MyWindow send
  		% this calls checkcanvases to set up FrameMenu ... ugh...
  
  		{
--- 1298,1304 ----
  
  		/UserWindowCustom load MyWindow send
  
! 		Window_x Window_y 100 100 /doreshape MyWindow send
  		% this calls checkcanvases to set up FrameMenu ... ugh...
  
  		{
***************
*** 1325,1345 ****
  			/Window_cols DefaultCols store
  		} if
  
! 		SelectedFontSize 0 le
! 			{ /SelectedFontSize DefaultFontSize store } if
  
  		{ InitialFont findfont } errored not
  			{ InitialFont ChangeFont } if
  
! 		SelectedFontSize ChangeFontSize
! 
! 		MyWindow /ClientCanvas get setcanvas
! 
! 		InitialReshapeFromUser { /reshapefromuser MyWindow send } if
  
! 		StartIconic 0 ne { /flipiconic MyWindow send } if
! 		/map MyWindow send
! 		pause
  
  		/MySetTransform createevent store
  
--- 1326,1340 ----
  			/Window_cols DefaultCols store
  		} if
  
! 		CommandLineFontSize 0 le
! 			{ /CommandLineFontSize DefaultFontSize store } if
  
  		{ InitialFont findfont } errored not
  			{ InitialFont ChangeFont } if
  
! 		CommandLineFontSize ChangeFontSize
  
! 		{ ClientCanvas setcanvas } MyWindow send
  
  		/MySetTransform createevent store
  
***************
*** 1356,1368 ****
  			/Canvas currentcanvas def
  		end
  
  	} def
  
  	/startinput {
  		/childprocess null store
- 		resetscale
- 		( ) 0 0 CU
- 		pause
  		{
  			systemdict /Selections known {
  				{ ClientCanvas } MyWindow send
--- 1351,1363 ----
  			/Canvas currentcanvas def
  		end
  
+ 		{ ClientCanvas /Retained get not } MyWindow send
+ 		FastRepaint and { { ToggleFastRepaint } MyWindow send } if
+ 
  	} def
  
  	/startinput {
  		/childprocess null store
  		{
  			systemdict /Selections known {
  				{ ClientCanvas } MyWindow send
***************
*** 1518,1524 ****
--- 1513,1534 ----
  			end
  			} loop
  		} fork /childprocess exch store
+ 
  		pause pause
+ 
+ 		InitialReshapeFromUser
+ 			{ /reshapefromuser MyWindow send } if
+ 
+ 		StartIconic 0 ne
+ 			{ /flipiconic MyWindow send } if
+ 
+ 		resetscale
+ 		( ) 0 0 CU
+ 		pause
+ 
+ 		/map MyWindow send
+ 
+ 		pause
  	} def
  
  	/StretchOpen {				% called from -ui StretchOpen
***************
*** 1530,1535 ****
--- 1540,1546 ----
  		/Term_Font DefaultTerminalFont findfont def
  		/SelectedFont Term_Font def
  		/SelectedFontSize DefaultFontSize def
+ 		/CommandLineFontSize DefaultFontSize def
  		/ScaledFont Term_Font def
  		/InitialFont Term_Font def
  		/InitialReshapeFromUser false def
***************
*** 1544,1549 ****
--- 1555,1561 ----
  		/UseCopyArea DefaultUseCopyArea not def		% likewise
  		/CurrentMatrix matrix def
  		/CurrentSelection () def
+ 		/ScrollSaveLength 0 def
  
  		/char_width 1 def
  		/char_height 1 def
diff -rc ./sampl.user.ps ../psterm.update/sampl.user.ps
*** ./sampl.user.ps	Tue Nov 15 21:13:04 1988
--- ../psterm.update/sampl.user.ps	Tue Nov 15 21:41:53 1988
***************
*** 1,5 ****
  %
! % @(#)$Header: sampl.user.ps,v 2.1 88/10/04 05:59:50 gnu Release $
  % to use this file, copy it to ~/user.ps
  %
  
--- 1,5 ----
  %
! % @(#)$Header: /u/eric/client/psterm/RCS/sampl.user.ps,v 2.2 88/11/10 17:05:50 eric Update $
  % to use this file, copy it to ~/user.ps
  %
  
***************
*** 212,218 ****
  				/DefaultRootGrayOrColor {.5 .5 .5 hsbcolor} def
  				framebuffer /Retained false put
  				PaintRoot end }
- %	(wedge)		{ (pscode/wl.root.ps) run PaintRoot }
  	(dull)		{ systemdict begin
  			 	/PaintRoot systemdict /DullPaintRoot get def
  				PaintRoot /RootImageCanvas null def end }
--- 212,217 ----
***************
*** 224,234 ****
  /loginmenu [
  	(local)		{ term forkunix }
  % change rsh below to remsh under A/UX
! 	(hoptoad)	{ (rsh hoptoad ) term append forkunix }
! 	(polliwog)	{ (rsh polliwog ) term append forkunix }
! 	(pondscum)	{ (rsh pondscum ) term append forkunix }
  	(console)	{
  		 (psterm -C -t sun -sl 512 -il Console -fl Console) forkunix }
  ] /new DefaultMenu send def
  
  0 (Roots =>) roots /insertitem rootmenu send
--- 223,241 ----
  /loginmenu [
  	(local)		{ term forkunix }
  % change rsh below to remsh under A/UX
! 	(yourhost)	{ (rsh yourhost ) term append forkunix }
! 	(myhost)	{ (rsh myhost ) term append forkunix }
  	(console)	{
  		 (psterm -C -t sun -sl 512 -il Console -fl Console) forkunix }
+ % you can put a command at the end of the command line too:
+ 	(login)		{ (psterm /bin/login -p) forkunix }
+ 		% make it ask for user name and passwd
+ 	(login me)	{ (psterm /bin/login -p me) forkunix }
+ 		% make it ask for passwd for me
+ 	(login you)	{ (psterm /bin/login -p you) forkunix }
+ 		% make it log you in
+ 	(tip out)	{ (psterm tip out) forkunix }
+ 		% when the tip dies, the window goes away!
  ] /new DefaultMenu send def
  
  0 (Roots =>) roots /insertitem rootmenu send
***************
*** 242,254 ****
  		initialrootimage setrootpicture } { PaintRoot } ifelse
  end
  
! startclock {
! 	(/usr/NeWS/demo/roundclock -s) forkunix pause
! } if
  
! startconsole {
! 	(psterm -C -t sun -sl 512 -il Console -fl Console) forkunix pause
! } if
  
  /dragframe? false store	% false means continuously repaint
  
--- 249,267 ----
  		initialrootimage setrootpicture } { PaintRoot } ifelse
  end
  
! {
! 	pause pause	% allow server to start accpting connections
  
! 	startclock {
! 		(/usr/NeWS/demo/roundclock -s) forkunix pause
! 	} if
! 
! 	startconsole {
! 		(psterm -C -t sun -sl 512 -il Console -fl Console)
! 			forkunix pause
! 	} if
! 
! } fork
  
  /dragframe? false store	% false means continuously repaint
  
diff -rc ./tcap.cps ../psterm.update/tcap.cps
*** ./tcap.cps	Tue Nov 15 21:13:19 1988
--- ../psterm.update/tcap.cps	Tue Nov 15 21:42:05 1988
***************
*** 36,76 ****
  %
  %
  % "@(#)tcap.cps 9.5 88/01/19 SMI
! % "@(#)$Header: tcap.cps,v 2.2 88/10/04 05:59:57 gnu Release $
  %
  % Copyright (c) 1985 by Sun Microsystems, Inc.
  %/
  
  cdef PSDefs(reload)
! 	systemdict /LoadingPSTerm known {
  		createevent dup begin
! 			/Name [/PSTimer /PSTermLoaded] def
  		end expressinterest
  		createevent dup begin
  			/Name /PSTimer def
! 			/TimeStamp currenttime .5 add def
  		end sendevent awaitevent pop
  	} if pause
! 	systemdict /PSTermDict known not reload 0 ne or {
! 		systemdict /LoadingPSTerm true put
! 		systemdict /PSTermDict undef
! 		(psterm.ps) LoadFile pop
  	} if pause
  
  cdef PSInitCode(string userinit)
! 	PSTermDict /UserCodeLoaded known not {
  		(.pstermrc) LoadFile pop
! 		PSTermDict /UserCodeLoaded true put
! 		systemdict /LoadingPSTerm undef
  		createevent dup begin
! 			/Name /PSTermLoaded def
  			/TimeStamp currenttime def
  		end sendevent
  	} if pause
! 	userdict end PSTermDict begin begin		
!              % PSTermDict begin dictstackexch
  	PSTermInit
! 	PSTermDict userinit known { userinit cvx exec } if
  
  cdef CreateWindow(x, y, fs, col, lines, string framelabel,
  	string iconlabel, string initialfont, starticonic, iconx, icony)
--- 36,87 ----
  %
  %
  % "@(#)tcap.cps 9.5 88/01/19 SMI
! % "@(#)$Header: tcap.cps,v 2.5 88/11/08 19:35:45 eric Update $
  %
  % Copyright (c) 1985 by Sun Microsystems, Inc.
  %/
  
+ % note:  all instinces of PSTermDict_n and psterm_n.ps should
+ %  have a value of n which matches PATCHLEVEL as defined in
+ %  patchlevel.h.  this mechinism is used to allow a single
+ %  news_server to bring up psterm windows on multiple machines
+ %  running different versions of psterm.
+ 
  cdef PSDefs(reload)
! 	systemdict /LoadingPSTerm_1 known {
  		createevent dup begin
! 			/Name [/PSTimer /PSTermLoaded_1] def
  		end expressinterest
  		createevent dup begin
  			/Name /PSTimer def
! 			/TimeStamp currenttime 1 add def
  		end sendevent awaitevent pop
  	} if pause
! 	systemdict /PSTermDict_1 known not reload 0 ne or {
! 		systemdict /LoadingPSTerm_1 true put
! 		systemdict /PSTermDict_1 undef
! 		(psterm_1.ps) LoadFile pop
  	} if pause
+ 	systemdict /PSTermDict_1 known {
+ 		(y\n) print
+ 	} {
+ 		(n\n) print
+ 	} ifelse
  
  cdef PSInitCode(string userinit)
! 	PSTermDict_1 /UserCodeLoaded known not {
  		(.pstermrc) LoadFile pop
! 		PSTermDict_1 /UserCodeLoaded true put
! 		systemdict /LoadingPSTerm_1 undef
  		createevent dup begin
! 			/Name /PSTermLoaded_1 def
  			/TimeStamp currenttime def
  		end sendevent
  	} if pause
! 	userdict end PSTermDict_1 begin begin		
!              % PSTermDict_1 begin dictstackexch
  	PSTermInit
! 	PSTermDict_1 userinit known { userinit cvx exec } if
  
  cdef CreateWindow(x, y, fs, col, lines, string framelabel,
  	string iconlabel, string initialfont, starticonic, iconx, icony)
diff -rc ./ref/config_aux ../psterm.update/ref/config_aux
*** ./ref/config_aux	Tue Nov 15 21:13:12 1988
--- ../psterm.update/ref/config_aux	Tue Nov 15 21:41:59 1988
***************
*** 1,29 ****
! /* ref/config.h  --  Configuration and other very global information
!  *			Hugh Daniel 88/1/15 (c) Copyright, Grasshopper Group
!  * @(#)$Header: config_aux,v 2.0 88/09/16 01:39:55 eric Release $
   */
- /* RCS ID
-  */
  
- #define FNDELAY		O_NDELAY
- 
- /* Compile time controls for system dependances
-  */
- #define	mc68000
  /* Things we do have in A/UX */
  #define	HAVE_SELECT
! #define	HAVE_SOCKETS
! #define	HAVE_BSDSYSTIME
! 	/* Useed by psterm & nterm -HD */
! #define	HAVE_SYSV_TTYS
! #define	HAVE_PUTTULINE
  #define	HAVE_TERMCAP
- #define	HAVE_STRINGS_H
  
! /* Things that we dont have
! 	#define	HAVE_MMAN_H
! */
  
  #ifndef bcopy
  #define bcopy(s1, s2, len) { \
      register char *s__s = (char *)(s1); \
--- 1,26 ----
! /* ref/config_aux  --  Configuration and other very global information
!  *
!  * @(#)$Header: config_aux,v 2.1 88/11/09 17:03:08 eric Update $
   */
  
  /* Things we do have in A/UX */
+ 
+ #define HAVE_FNDELAY
  #define	HAVE_SELECT
! #define HAVE_SYSV_TTYS
  #define	HAVE_TERMCAP
  
! #ifdef undef
! /* Things we don't have in A/UX */
  
+ #define HAVE_BSD_TTYS
+ #define	HAVE_VFORK
+ #define HAVE_WAIT3
+ 
+ #endif
+ 
+ #define FNDELAY		O_NDELAY
+ 
  #ifndef bcopy
  #define bcopy(s1, s2, len) { \
      register char *s__s = (char *)(s1); \
***************
*** 44,49 ****
  #define bzero(s, n)		memset(s, '\0', n)
  #endif
  #define bcmp(s1, s2, n)		memcmp(s1, s2, n)
- 
- #define	srandom(n)	srand(n)
- #define	gettimeofday(time, tz) _gettimeofday(time)
--- 41,43 ----
diff -rc ./ref/config_sunos ../psterm.update/ref/config_sunos
*** ./ref/config_sunos	Tue Nov 15 21:13:12 1988
--- ../psterm.update/ref/config_sunos	Tue Nov 15 21:42:00 1988
***************
*** 1,19 ****
  /* ref/config_sunos  --  Configuration and other very global information
!  *			Hugh Daniel 88/1/15 (c) Copyright, Grasshopper Group
!  * @(#)$Header: config_sunos,v 2.0 88/09/16 01:40:11 eric Release $
   */
- /* RCS ID
-  */
  
  /* Things we do have in sunos */
! #define	HAVE_SELECT
! #define	HAVE_SOCKETS
! #define	HAVE_BSDSYSTIME
! 	/* Useed by psterm & nterm -HD */
  #define HAVE_BSD_TTYS
! /*#define	HAVE_PUTTULINE */
  #define	HAVE_TERMCAP
- #define	HAVE_STRINGS_H
- 
- /* #define	HAVE_MMAN_H */
  #define	HAVE_VFORK
--- 1,20 ----
  /* ref/config_sunos  --  Configuration and other very global information
!  *
!  * @(#)$Header: config_sunos,v 2.1 88/11/09 17:04:02 eric Update $
   */
  
  /* Things we do have in sunos */
! 
  #define HAVE_BSD_TTYS
! #define HAVE_FNDELAY
! #define	HAVE_SELECT
  #define	HAVE_TERMCAP
  #define	HAVE_VFORK
+ #define HAVE_WAIT3
+ 
+ #ifdef undef
+ /* Things we don't have in sunos */
+ 
+ #define HAVE_SYSV_TTYS
+ 
+ #endif
-- 
John Gilmore    {sun,pacbell,uunet,pyramid,amdahl}!hoptoad!gnu    gnu at toad.com
		"The network *is* the confuser."



More information about the Comp.sources.bugs mailing list