delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1998/05/22/00:20:38

From: davidav AT msil DOT sps DOT mot DOT com (David Avrahamov)
Subject: Re: BUG: readline
22 May 1998 00:20:38 -0700 :
Message-ID: <356465EF.486C05AF.cygnus.gnu-win32@msil.sps.mot.com>
References: <19980520184533 DOT 26037 DOT rocketmail AT send1e DOT yahoomail DOT com>
Mime-Version: 1.0
To: earnie_boyd AT yahoo DOT com, gnu-win32 AT cygnus DOT com

--------------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----
> --earnie_boyd AT yahoo DOT com--
> ------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
> "gnu-win32-request AT cygnus DOT com" 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>--earnie_boyd AT yahoo DOT com--
<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>"gnu-win32-request AT cygnus DOT com" 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
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019