[net.emacs] Help needed

anders@lth.UUCP (Anders Ardo) (10/15/84)

[]
I am forced to use Goslings EMACS v 264 over a terminal switching
network with virtually no buffering, slow trunks between nodes and
no flow control other than ^S and ^Q.  SIGH!!!
  So I need to modify EMACS to handle flowcontrol with ^S and ^Q.
  Are there anyone out there that has a mod doing this and who is
willing to share it with me?
  I am running EMACS on a VAX/(VMS) EUNICE system.

     Thanks    Anders Ardo

  UUCP:    ...seismo!mcvax!enea!lth!anders

mats@enea.UUCP (10/26/84)

Here are the diffs to our Gosling #264 (running on 4.2BSD).  I think
that the mod's originally came from mcvax.

	Mats Josefsson	(mats@enea.UUCP)
	ENEA DATA Svenska AB
	SWEDEN

************ config.h ************

80a81,86
> #define HalfBaked 1
>                               /* define this if halfbaked (CBREAK) IO
>                                * is to be done. This may prove neccesary
>                                * , because even parity is
>                                * discarded otherwise.
>                                */

************* dsp.c **************

15d14
< char _sobuf[BUFSIZ];
16a16,21
> #ifdef HalfBaked
> static struct tchars OldTchars;
> static struct ltchars OldLtchars;
> static int OldLmode;
> #endif
> 
21a27,52
> #ifdef HalfBaked
>     ioctl (0, TIOCGETC, &OldTchars);
>     ioctl (0, TIOCGLTC, &OldLtchars);
>     ioctl (0, TIOCLGET, &OldLmode);
>     sg.sg_flags = (sg.sg_flags & ~(ECHO | CRMOD | XTABS)) | CBREAK;
>     {   struct tchars tchars;
>       struct ltchars ltchars;
>       int lmode;
>       tchars.t_intrc = -1;
>       tchars.t_quitc = -1;
>       tchars.t_startc = Ctl ('Q');
>       tchars.t_stopc = Ctl ('S');
>       tchars.t_eofc = -1;
>       tchars.t_brkc = -1;
>       ltchars.t_suspc = -1;
>       ltchars.t_dsuspc = -1;
>       ltchars.t_rprntc = -1;
>       ltchars.t_flushc = -1;
>       ltchars.t_werasc = -1;
>       ltchars.t_lnextc = -1;
>       lmode = OldLmode;
>       ioctl (0, TIOCSETC, &tchars);
>       ioctl (0, TIOCSLTC, &ltchars);
>       ioctl (0, TIOCLSET, &lmode);
>     }
> #else
22a54
> #endif
31d62
<     stty (0, &old);
32a64
>     (*tt.t_cleanup) ();
35d66
<     (*tt.t_cleanup) ();
36a68,73
> #ifdef HalfBaked
>       ioctl (0, TIOCSETC, &OldTchars);
>       ioctl (0, TIOCSLTC, &OldLtchars);
>       ioctl (0, TIOCLSET, &OldLmode);
> #endif
>     stty (0, &old);
38d74
< 

kay@ubu.UUCP (Kay Dekker) (10/31/84)

We have had similar problems here at Warwick. Our local net uses XON-XOFF
flowcontrol, and therefore I've had to hack out Gosmacs to accomodate this.

The solution is to squirrel away the terminal special characters in the
appropriate structs; place the terminal in CBREAK rather than in RAW mode;
check to see if the user's terminal is on a flow-control line (by looking in
/etc/ttytype); if so, we don't throw the start/stop characters away with all
the rest.

This means that you'll have to rebind search-forward & quote-character (etc)
to sequences not involving ^S/^Q when you are dialling-in , and also the
help info/ manual  will need updating to take account of this.

I admit it's not nice; it was only ever done as a temporary hack, but ....

If you ask, I'll mail you the altered source files (TrmTERM.c & dsp.c)

						Kay.
-- 
"Happiness is: Having a computer go down on you."

			... mcvax!ukc!qtlon!flame!ubu!kay