v08i019: SE Patches for 4.2 and USG Unices, Patch1

sources-request at mirror.UUCP sources-request at mirror.UUCP
Wed Feb 4 14:52:01 AEST 1987


Submitted by: emoryu1!arnold (Arnold D. Robbins)
Mod.sources: Volume 8, Issue 19
Archive-name: se/Patch1

It turns out that the version of se that I sent you had problems on USG
systems and 4.2 systems without windowing.  Here is a patch to the file
term.c.
	--Arnold Robbins
----------------CUT HERE------------------
#! /bin/sh
# This is a shell archive.  Remove anything before this line,
# then unpack it by saving it in a file and typing "sh file".
# If all goes well, you will see the message "End of shell archive."
# Contents:  term.patch
PATH=/bin:/usr/bin:/usr/ucb; export PATH
echo shar: extracting "'term.patch'" '(3562 characters)'
if test -f 'term.patch' ; then 
  echo shar: will not over-write existing file "'term.patch'"
else
sed 's/^X//' >term.patch <<'@//E*O*F term.patch//'
XRCS file: RCS/term.c,v
Xretrieving revision 1.7
Xdiff -c -r1.7 term.c
X*** /tmp/,RCSt1004590	Tue Feb  3 14:34:36 1987
X--- term.c	Tue Feb  3 14:33:55 1987
X***************
X*** 1,9 ****
X  #ifndef lint
X! static char RCSid[] = "$Header: term.c,v 1.7 86/11/12 11:37:30 arnold Exp $";
X  #endif
X  
X  /*
X   * $Log:	term.c,v $
X   * Revision 1.7  86/11/12  11:37:30  arnold
X   * Fixed winsize() to verify that cols and rows not 0 before assigning
X   * them to Nrows and Ncols.
X--- 1,13 ----
X  #ifndef lint
X! static char RCSid[] = "$Header: term.c,v 1.8 87/02/03 14:32:32 arnold Exp $";
X  #endif
X  
X  /*
X   * $Log:	term.c,v $
X+  * Revision 1.8  87/02/03  14:32:32  arnold
X+  * Changes for non-windowing and USG systems; reorganization had
X+  * caused these to break during the compile.
X+  * 
X   * Revision 1.7  86/11/12  11:37:30  arnold
X   * Fixed winsize() to verify that cols and rows not 0 before assigning
X   * them to Nrows and Ncols.
X***************
X*** 57,63 ****
X  ** Routines that are only if HARD_TERMS is NOT defined. These contain:
X  **	BSD/termlib routines
X  **	System V/terminfo routines
X! **	Routines idenpendant of BSD/System V
X  ** Routines that are only if HARD_TERMS is defined.
X  ** Routines that have regular and conditonal code mixed.
X  */
X--- 61,67 ----
X  ** Routines that are only if HARD_TERMS is NOT defined. These contain:
X  **	BSD/termlib routines
X  **	System V/terminfo routines
X! **	Routines independant of BSD/System V
X  ** Routines that are only if HARD_TERMS is defined.
X  ** Routines that have regular and conditonal code mixed.
X  */
X***************
X*** 151,156 ****
X--- 155,161 ----
X  		getdescrip ();		/* get terminal description */
X  		Nrows = tgetnum ("li");
X  		Ncols = tgetnum ("co");
X+ 		PC = pcstr ? pcstr[0] : EOS;
X  		break;
X  
X  	default:
X***************
X*** 175,180 ****
X--- 180,187 ----
X  
X  #include <term.h>	/* should be all we really need */
X  
X+ extern char *tgoto();
X+ 
X  #define AM	auto_right_margin
X  #define TI	enter_ca_mode
X  #define TE	exit_ca_mode
X***************
X*** 184,189 ****
X--- 191,197 ----
X  #define CE	clr_eol
X  #define DL	delete_line
X  #define AL	insert_line
X+ #define CM	cursor_address
X  
X  /* setcaps -- get the capabilities from the terminfo database */
X  
X***************
X*** 229,234 ****
X--- 237,244 ----
X  
X  #include <signal.h>
X  
X+ #if defined(SIGWIND) || defined(SIGWINCH)
X+ 
X  #ifdef SIGWIND			/* UNIX PC */
X  #include <sys/font.h>
X  #include <sys/window.h>
X***************
X*** 268,274 ****
X  
X  winsize ()
X  {
X- #if defined(SIGWIND) || defined(SIGWINCH)
X  	static int first = 1;
X  	static char savestatus[MAXCOLS];
X  	int row, oldstatus = Nrows - 1;
X--- 278,283 ----
X***************
X*** 328,338 ****
X  	loadstr (savestatus, Nrows - 1, 0, Ncols);
X  	remark ("window size change");
X  	tflush ();
X- #endif
X  }
X  
X  #else
X  
X  /* begin terminal dependant routines */
X  
X  /* addspos --- position cursor to (row, col) on ADDS Consul 980 */
X--- 337,355 ----
X  	loadstr (savestatus, Nrows - 1, 0, Ncols);
X  	remark ("window size change");
X  	tflush ();
X  }
X  
X  #else
X  
X+ winsize ()	/* no windowing system, don't do anything */
X+ {
X+ 	return;
X+ }
X+ 
X+ #endif
X+ 
X+ #else
X+ 
X  /* begin terminal dependant routines */
X  
X  /* addspos --- position cursor to (row, col) on ADDS Consul 980 */
X***************
X*** 2044,2052 ****
X  #else
X  	if (setcaps (type) == ERR)
X  		error (NO, "se: could not find terminal in system database");
X- 
X- 
X- 	PC = pcstr ? pcstr[0] : EOS;
X  
X  	if (*tgoto (CM, 0, 0) == 'O')	/* OOPS returned.. */
X  		error (NO, "se: terminal does not have cursor motion.");
X--- 2061,2066 ----
X
@//E*O*F term.patch//
if test 3562 -ne "`wc -c <'term.patch'`"; then
    echo shar: error transmitting "'term.patch'" '(should have been 3562 characters)'
fi
fi # end of overwriting check
echo shar: "End of shell archive."
exit 0



More information about the Mod.sources mailing list