🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.misc.discuss
Article #63058

Features of the readline library

#63058
From: Matthias Drochner
Date: Fri, 17 Mar 1995 11:16
26 lines
1637 bytes
For a shell-like network application, I'd like to use the
GNU readline library for input line editing.
The program has to react on user input as well as on
pending data on TCP sockets.
This means, after printing a prompt a "select" is called.
If a keypress occurs (terminal is set into raw mode)
"readline" is entered, otherwise the network handler.

How can I tell "readline", that the prompt is already
written? I don't want to have a new prompt, and when
giving an empty prompt to "readline", the input line is
messed up by certain actions.

I also tried to delete the old prompt by writing some
'\b's or a '\r' to the terminal before calling "readline".
I consider this ugly, and it does not always work, sometimes
these characters are intermixed (I don't know why).

Is this kind of application foreseen in "readline"?
Other advices?

Best regards,
Matthias Drochner

-- 
drochner@zelux6.zel.kfa-juelich.de
Technical Details
Message-ID: <2018@zam103.zam.kfa-juelich.de>
Path: arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!howland.reston.ans.net!Germany.EU.net!nntp.gmd.de!news.rwth-aachen.de!news.rhrz.uni-bonn.de!news.uni-stuttgart.de!uni-regensburg.de!fauern!gs.dfn.de!zam103!zelux6!drochner

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1025b4,4ae26dc38cfa7bea,start
X-Google-Attributes: gid1025b4,public
X-Google-ArrivalTime: 1995-03-17 20:18:09 PST
Path: arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!howland.reston.ans.net!Germany.EU.net!nntp.gmd.de!news.rwth-aachen.de!news.rhrz.uni-bonn.de!news.uni-stuttgart.de!uni-regensburg.de!fauern!gs.dfn.de!zam103!zelux6!drochner
From: drochner@zelux6.zel.kfa-juelich.de (Matthias Drochner)
Newsgroups: gnu.misc.discuss
Subject: Features of the readline library
Message-ID: <2018@zam103.zam.kfa-juelich.de>
Date: 17 Mar 95 11:16:11 GMT
Sender: news@zam103.zam.kfa-juelich.de
Organization: KFA Juelich
Lines: 26
Nntp-Posting-Host: zelux6