[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: readline library question



----- Original Message ----- 
From: "Francesco P. Lovergine" <frankie@debian.org>
To: <debian-mentors@lists.debian.org>
Sent: Wednesday, August 25, 2004 3:22 PM
Subject: Re: readline library question


> On Thu, Aug 19, 2004 at 03:34:57PM -0400, Alexander Baranov wrote:
> >
> > So, the readline seems to work fine with standard input-output, but
somehow
> > goes wrong when I try to use non-standard stream ("dirstream",
associated
> > with a socket in my case)
> >
> > Can anybody give an advise?
> > Thanks in advance, Alex.
>
> readline uses ncurses which in turns uses terminfo, you need to associate
a
> term type to your socket.
>
> -- 
> Francesco P. Lovergine
>
>
> -- 
> To UNSUBSCRIBE, email to debian-mentors-REQUEST@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact
listmaster@lists.debian.org
>
>
Thank you. I tried setupterm(NULL, fileno(dirstream), &erret)
erret returned 1, showing success.
Then I assigned rl_instream and rl_outstream to dirstream and ran pCmd =
readline(">").
But the readline still did not echo input characters to the socket the
diagnostic warning was the same.
Of course, I included "curses.h" and "term.h" .
Could you tell me where is my mistake?
Thanks, Alex.




Reply to: