Subject: Re: BUG: readline
From: [email-masked] (David Avrahamov)

22 May 1998 00:20:38 -0700
Message-ID: <[email-masked]>
References: <[email-masked]>
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="------------68A5EFCB7D7AD073F559F83F"
To: [email-masked], [email-masked]

--------------68A5EFCB7D7AD073F559F83F
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Earnie Boyd wrote:

> I have found that the readline function from readline-2.2 will return
> the first character of the command line instead of the first character
> of the input buffer for buffered input.  The rest of the input buffer
> is OK.
>
> This has nothing to do with the cygwinb19.dll.  I'm using Mingw32
> compiled libraries and sources.
>
> EG:  If I have a program called testit which sleeps or loops and then
> calls readline and I enter abcdef before the readline call executes
> readline will return tbcdef instead of abcdef.
>
> I don't know where the problem is yet.  If you have an idea please let
> me know.
>
> Thanks,
>
> ==
> -        \\||//
> ---o0O0--Earnie--0O0o----
> [email-masked]
> ------ooo0O--O0ooo-------
>
> _________________________________________________________
> DO YOU YAHOO!?
> Get your free @yahoo.com address at http://mail.yahoo.com
>
> -
> For help on using this list (especially unsubscribing), send a message to
> "[email-masked]" with one line of text: "help".

Hi,

I believe that the problem is not with the readline function but with the
input buffer or keybord
that is somehow left closed for input during program execution.
The only input can be entered to the buffer while reading the standard input
(e.g. scanf).
I have encountered this problem two weeks ago.
You can try the following code which doesn't calls for readline but also has
the same problem.

main()
{
    char string[20];

    printf("Please type something whithin 10 seconds from now and watch how
it 'disappear' !")
    wait(10);
    scanf("%s",string);
    printf("You typed: %s",string);
}

Only the charecters entered after the the first 10 secs will be printed.

I really don't know how to solve this problem.

If you have any ideas please feel free to let me know.

By the way, what is Mingw32 ?

--
David Avrahamov
Phone number: 952-2176
Software department
Motorola Semiconductor Israel

--------------68A5EFCB7D7AD073F559F83F
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<HTML>
Earnie Boyd wrote:
<BLOCKQUOTE TYPE=CITE>I have found that the readline function from readline-2.2
will return
<BR>the first character of the command line instead of the first character
<BR>of the input buffer for buffered input.&nbsp; The rest of the input
buffer
<BR>is OK.

<P>This has nothing to do with the cygwinb19.dll.&nbsp; I'm using Mingw32
<BR>compiled libraries and sources.

<P>EG:&nbsp; If I have a program called testit which sleeps or loops and
then
<BR>calls readline and I enter abcdef before the readline call executes
<BR>readline will return tbcdef instead of abcdef.

<P>I don't know where the problem is yet.&nbsp; If you have an idea please
let
<BR>me know.

<P>Thanks,

<P>==
<BR>-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \\||//
<BR>---o0O0--Earnie--0O0o----
<BR>[email-masked]
<BR>------ooo0O--O0ooo-------

<P>_________________________________________________________
<BR>DO YOU YAHOO!?
<BR>Get your free @yahoo.com address at <A HREF="http://mail.yahoo.com">http://mail.yahoo.com</A>

<P>-
<BR>For help on using this list (especially unsubscribing), send a message
to
<BR>"[email-masked]" with one line of text: "help".</BLOCKQUOTE>
Hi,

<P>I believe that the problem is not with the readline function but with
the input buffer or keybord
<BR>that is somehow left closed for input during program execution.
<BR>The only input can be entered to the buffer while reading the standard
input (e.g. scanf).
<BR>I have encountered this problem two weeks ago.
<BR>You can try the following code which doesn't calls for readline but
also has the same problem.

<P>main()
<BR>{
<BR>&nbsp;&nbsp;&nbsp; char string[20];

<P>&nbsp;&nbsp;&nbsp; printf("Please type something whithin 10 seconds
from now and watch how it 'disappear' !")
<BR>&nbsp;&nbsp;&nbsp; wait(10);
<BR>&nbsp;&nbsp;&nbsp; scanf("%s",string);
<BR>&nbsp;&nbsp;&nbsp; printf("You typed: %s",string);
<BR>}
<PRE>Only the charecters entered after the the first 10 secs will be printed.</PRE>

<PRE>I really don't know how to solve this problem.</PRE>

<PRE>If you have any ideas please feel free to let me know.</PRE>

<PRE>By the way, what is Mingw32 ?</PRE>

<PRE></PRE>

<PRE>--&nbsp;
David Avrahamov&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Phone number: 952-2176
Software department
Motorola Semiconductor Israel</PRE>
&nbsp;</HTML>

--------------68A5EFCB7D7AD073F559F83F--

-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".