[comp.emacs] MicroEMACS on VAX/VMS

ittfb@dcatla.UUCP (04/23/87)

We recently acquired MicroEmacs from (I think) mod.sources, and have it
running on our SUNs and PCs.  We'd like it to work on our Vaxen, which
run VMS (sorry, it's beyond my control), but we're having some problems.
When it starts up, and anytime it does an amount of screen output, I get
a lot of '^S's and end up in search mode.  A couple of '^G's gets back,
but this happens too often for it to be usable.  The version I have is
3.8b.  Is there a newer one?  I think I've seen references to 3.8g.

The problem appears to be that the VMS version buffers output and then
sends a burst of it too fast for either our terminal or our asynch
network to handle.  I'm willing to put some work into fixing it, but
not if someone else already has.  Any suggestions as to what would be
the best approach?  I'm considering just disabling any response at
all to '^S' from memacs, and changing output to some sort of unbuffered
mode for VMS.  Any insight or suggestions would be appreciated.

Tom Blakely
DCA, Inc.
Alpharetta (yes, it's near Atlanta), GA  30201
(404)442-4866
{akgua, sunatl!sun, gatech}!dcatla!ittfb

earleh@dartvax.UUCP (Earle R. Horton) (04/25/87)

In article <220@dcatla.UUCP>, ittfb@dcatla.UUCP (Thomas F. Blakely) writes:
> We recently acquired MicroEmacs from (I think) mod.sources, and have it
> running on our SUNs and PCs.  We'd like it to work on our Vaxen, which
> run VMS (sorry, it's beyond my control), but we're having some problems.
> When it starts up, and anytime it does an amount of screen output, I get
> a lot of '^S's and end up in search mode.  

Seriously, the problem may be with your terminal settings.  I have 3.8b
running under VMS with no problems, except that when I am forced to use
one of those bizarre DEC terminals I have to remember to shut off the
flow control on the stupid, brain-damaged thing (sorry, got carried
away).  I don't know what your connection is like, but here microemacs
seems to work fine with vt220s up to 9600 baud.  You have to go into
setup mode and tell the terminal to "Never Send XOFF" first.  At 19200
baud, forget it.


I am just guessing that the problem is either with your terminal
or that the baud rate is too fast.  If this is not the case, and
your hardware environment dictates that you simply must have flow
control, I believe this is the way to get it.  I haven't actually
tried this, because I wouldn't be caught dead with a DEC terminal
in my office even if they gave it to me (sorry, got carried away
again).  The following is a chunk of code from "termio.c" in 
the "ttopen()" code for VMS.  Comment out the line:

"       newmode[1] &= ~(TT$M_TTSYNC|TT$M_HOSTSYNC);"

If you do this, microemacs won't even get the ^Ss your terminal is
sending it, and everything will be hunky-dory (except that you don't
get to use ^S).

(context, somewhere in "termio.c")
                          oldmode, sizeof(oldmode), 0, 0, 0, 0);
        if (status!=SS$_NORMAL || (iosb[0]&0xFFFF)!=SS$_NORMAL)
                exit(status);
        newmode[0] = oldmode[0];
        newmode[1] = oldmode[1] | TT$M_NOECHO;
        newmode[1] &= ~(TT$M_TTSYNC|TT$M_HOSTSYNC);
        newmode[2] = oldmode[2] | TT2$M_PASTHRU;
        status = SYS$QIOW(EFN, iochan, IO$_SETMODE, iosb, 0, 0,
                          newmode, sizeof(newmode), 0, 0, 0, 0);
        if (status!=SS$_NORMAL || (iosb[0]&0xFFFF)!=SS$_NORMAL)
                exit(status);
        term.t_nrow = (newmode[1]>>24) - 1;
        term.t_ncol = newmode[0]>>16;