home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!spool.mu.edu!agate!dog.ee.lbl.gov!lbl.gov!vxwexplo
- From: bgeer@beorn.sim.es.com (bob geer)
- Newsgroups: comp.os.vxworks
- Subject: shell input line editor
- Date: Wed, 23 Dec 92 15:15:25 MST
- Organization: Lawrence Berkeley Laboratory, Berkeley CA
- Lines: 36
- Sender: vxwexplo@lbl.gov
- Message-ID: <9212232215.AA11226@beorn>
- NNTP-Posting-Host: 128.3.112.16
- Originator: daemon@vxw.ee.lbl.gov
-
- I don't much like the vi-like "led" line editor that comes with
- VxWorks & I would like to replace it with a friendlier one that knows
- about cursor & function keys & can be user configured. I have the
- input & editing code already running to my satisfaction as a
- standalone & now I'm trying to put in between the terminal input & the
- shell by creating a /pty/ pseudo-terminal device & redirecting shell's
- input by changing it's STD_IN fd. Not having a lot of luck, tho.
-
- In particular, my routine echos all the input, & the shell insists on
- echoing it as well after it's received from the /pty/slave device.
-
- My routine expects unquoted string input & assumes the user wants
- strings to be quoted. An input token that doesn't start with a digit
- is considered a string & is quoted by my routine, a token that starts
- with a digit is not quoted -- this is satisfactory for my current
- needs. However, the quotes disappear somewhere after being written to
- the /pty/master; double quoting on each end of the token seems to
- preserve a single set of quotes thru to the shell.
-
- So far, my experience trying to figure out how to accomplish what
- should be a straightforward task using the distributed documentation
- is sure taking a long time. Both the telnet & rlogin daemons do this
- somehow; unfortunately that source code isn't included as an example.
-
- Yes, I am RFM & RFMan pages.
-
- I would appreciate any info & suggestions anyone had regarding this
- problem. In particular:
-
- 1) Is the pseudo-terminal method a reasonable way to do this?
-
- 2) Describe a better way to do this.
-
- 3) Example code would be appreciated.
-
- Thanks in advance...Bob
-