sam-fans - fans of the sam editor
 help / color / mirror / Atom feed
From: Aharon Robbins <arnold@gnu.org>
To: Jim.Robinson@Stanford.Edu
Cc: sam-fans@hawkwind.utcs.toronto.edu
Subject: Re: 9term under Linux?
Date: Thu, 28 Jan 1999 06:33:33 -0500	[thread overview]
Message-ID: <199901281145.GAA19439@dilbert.mathcs.emory.edu> (raw)

Me:
> > I know this has come up before, but I don't remember the answers...
> > Has anyone got patches to 9term 1.6.6 for Linux?  I have it built, but
> > hold mode isn't working.  And with the latest rc as the shell,
> > input characters are not echoed.
> > 
> > I'm using Redhat 5.2, if that matters.

From: "James A. Robinson" <Jim.Robinson@Stanford.Edu>
> Yes, I have it working. As I recall, I had to nab a patch off the net.  A
> quick search gave this: http://cm.bell-labs.com/who/rsc/linux/9term.patch
> which I think is what I used.

This is for 1.6.3.  But it was enough to get me started.  After a whopping
5 minutes of testing, rc and hold mode work.  Here's a diff against
the 1.6.6 sources.  I can supply the makefile I used too, if anyone
wants it; the main thing is to define _POSIX_SOURCE and LINUX.

Now, to try restarting X with 9wm as the window manager...

Much thanks!

Arnold
--------------------------------
*** 9term.c.dist	Thu Sep 28 06:16:15 1995
--- 9term.c	Thu Jan 28 13:15:36 1999
***************
*** 10,16 ****
  #include <frame.h>
  #include <text.h>
  
! #ifdef SOLARIS
  #include <sys/termios.h>
  #else
  #include <sys/termio.h>
--- 10,16 ----
  #include <frame.h>
  #include <text.h>
  
! #if defined SOLARIS || defined LINUX
  #include <sys/termios.h>
  #else
  #include <sys/termio.h>
*** 9term.h.dist	Tue Nov 28 07:27:04 1995
--- 9term.h	Thu Jan 28 13:14:56 1999
***************
*** 30,35 ****
--- 30,39 ----
  extern int		echo;
  extern int		isig;
  
+ #if	defined(LINUX)
+ #define	setenv	p9term_setenv
+ #endif
+ 
  extern void		specialchars(int);
  extern int		setenv(char *, char *, int);
  extern void		init_display(int *, char **, char**, char*);
***************
*** 87,90 ****
--- 91,99 ----
  #if	defined(SOLARIS)
  #define	POSIXPTYS
  #define	REMOTE
+ #endif
+ 
+ #if	defined(LINUX)
+ #define POSIXPTYS
+ #define BSDPTYS
  #endif
*** display.c.dist	Thu Oct  5 09:55:54 1995
--- display.c	Thu Jan 28 13:10:28 1999
***************
*** 275,280 ****
--- 275,287 ----
  {
  	int width, height;
  
+ 	static int called=0;
+ 	
+ 	if (called) {
+ 		/*fprintf(stderr, "ereshaped called twice\n");*/
+ 		return;
+ 	}
+ 	called = 1;
  	if (ninewm) {
  		/* work around textsetrects wierdness */
  		r = inset(r, -3);
***************
*** 286,291 ****
--- 293,299 ----
  		tty_set_size(comm_fd, width, height, Dx(text->r), Dy(text->r));
  		setborder();
  	}
+ 	called = 0;
  }
  
  /*
*** pty.c.dist	Tue Nov 28 07:30:45 1995
--- pty.c	Thu Jan 28 13:22:07 1999
***************
*** 60,73 ****
  #	define	V_FLUSH VFLUSH
  #endif
  
! #ifdef	linux
  #	define	V_START VSTART
  #	define	V_STOP VSTOP
  #	define	V_SUSP VSUSP
  #	define	V_DSUSP VDSUSP
  #	define	V_RPRNT VREPRINT
  #	define	V_WERAS VWERASE
- #	define	V_FLUSH VFLUSH
  #endif
  
  #ifdef	HPUX
--- 60,73 ----
  #	define	V_FLUSH VFLUSH
  #endif
  
! #ifdef	LINUX
! #include <pty.h>
  #	define	V_START VSTART
  #	define	V_STOP VSTOP
  #	define	V_SUSP VSUSP
  #	define	V_DSUSP VDSUSP
  #	define	V_RPRNT VREPRINT
  #	define	V_WERAS VWERASE
  #endif
  
  #ifdef	HPUX
***************
*** 304,309 ****
--- 304,312 ----
  		ttmode.c_lflag |= ECHO;
  		ttmode.c_oflag &= ~(ONLCR);
  		ttmode.c_oflag |= ONLRET;
+ #ifdef	LINUX
+ 		ttmode.c_lflag |= ICANON;
+ #endif
  	} else {
  		ttmode.c_iflag = BRKINT | IGNPAR | ICRNL | IXON;
  		ttmode.c_oflag = OPOST | ONLRET;
--
Aharon (a.k.a. Arnold) Robbins		arnold@gnu.org
P.O. Box 354			Home Phone: +972  8 979-0381
Nof Ayalon			Cell Phone: +972 51  297-545
D.N. Shimshon 99784		Laundry increases exponentially in the
ISRAEL				number of children. -- Miriam Robbins



             reply	other threads:[~1999-01-28 16:16 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-01-28 11:33 Aharon Robbins [this message]
  -- strict thread matches above, loose matches on Subject: below --
1999-02-03  7:19 Bengt Kleberg
1999-02-02 20:41 Chris Siebenmann
1999-02-02  6:49 Aharon Robbins
1999-02-02  0:25 Chaotrope
1999-02-02  2:01 ` James A. Robinson
1999-01-28 12:28 Bengt Kleberg
1999-02-02 19:11 ` Mark H. Wilkinson
1999-01-28  7:45 Bengt Kleberg
1999-01-26 15:35 Aharon Robbins
1999-01-27 22:24 ` James A. Robinson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=199901281145.GAA19439@dilbert.mathcs.emory.edu \
    --to=arnold@gnu.org \
    --cc=Jim.Robinson@Stanford.Edu \
    --cc=sam-fans@hawkwind.utcs.toronto.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).