🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.x
Article #25048

Re: Cursor movement

#25048
From: Paul Asente
Date: Thu, 05 Mar 1987 18:25
28 lines
2225 bytes
In article <8703042256.AA02507@paul.UUCP> root%paul.ARPA%uscacsc.UUCP@USC-CSE.USC.EDU (Paul Nahi) writes:
>
>It was suggested to me by Paul Asente to use the Xtty library for input
>and output to a window (text I/O).  After looking over the library however
>I didn't see anything that would help me with cursor movement.  Did I just
>miss it or will it be necessary for me to use curses?  It seems redundant
>to have to use curses on an X window.

Yes, you have to use curses, yes it is redundant, and yes, it really
does work (I use it every day).  It seems absurd to have to take some
idea like "move the cursor to x,y", have curses encode it into a byte
stream, send it to the emulator, and have the emulator decode it and
call a "mve the cursor to x,y" routine, but, until someone writes a
terminal emulator subroutine package, it's the only way to do it.  I
think the ideal way to do this is to take the xterm code and heavily
#ifdef it so that you could compile it into either xterm or into a
terminal emulator library.  

I suspect that I have one of the most convoluted process stuctures
of any X application: I use Xtty to start up a subfork of xterm, ask it to
keep the slave end of the pty open (undocumented feature!), and fork
off an emacs process that uses the pty, so it runs in the terminal.  But
I still keep a copy of the slave end of the pty open myself, so emacs 
receives commands both from my program and the user.  The amazing thing
is that it all seems to work perfectly...

	-paul asente
	    asente@cascade.stanford.edu    decwrl!labrea!cascade!asente
Technical Details
Message-ID: <288@figaro.STANFORD.EDU>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!columbia!rutgers!sri-spam!ames!ucbcad!ucbvax!decvax!decwrl!labrea!figaro!asente
References: <8703042256.AA02507@paul.UUCP>

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!columbia!rutgers!sri-spam!ames!ucbcad!ucbvax!decvax!decwrl!labrea!figaro!asente
From: asente@figaro.STANFORD.EDU (Paul Asente)
Newsgroups: comp.windows.x
Subject: Re: Cursor movement
Message-ID: <288@figaro.STANFORD.EDU>
Date: Thu, 5-Mar-87 13:25:25 EST
Article-I.D.: figaro.288
Posted: Thu Mar  5 13:25:25 1987
Date-Received: Sat, 7-Mar-87 22:49:26 EST
References: <8703042256.AA02507@paul.UUCP>
Reply-To: asente@figaro.UUCP (Paul Asente)
Distribution: world
Organization: Stanford University CIS Apple Orchard
Lines: 28