Re: [Mingw-users] Detecting console input [WAS: SNDCTL_DSP_RESET ?]
- Date: Mon, 12 Nov 2007 08:44:53 -0800
- From: "Suresh Govindachar" <sgovindachar@xxxxxxxxx>
- Subject: Re: [Mingw-users] Detecting console input [WAS: SNDCTL_DSP_RESET ?]
Earnie wrote:
> Quoting Erik de Castro Lopo <mle+mingw@xxxxxxxxxxxxx>:
>>
>>> Also need a way to determine if there is input from the
>>> console. Select is not supported for the console in Win32?
>>
>> I don't think so, but I've avoided doing that sort of stuff on
>> win32. On Unix I use select a lot, because it works so well
>> and is so convienient.
>>
>
> Here is an interesting article (watch for line wrapping):
>
> http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/dnaraskdr/html/askgui07152003.asp
Perl seems to have a way to detect input on STDIN:
Quoting from http://www.perlmonks.org/?node_id=647315
| C:\> perl -lwe "printf '<%s>', -t STDIN"
| <1>
| C:\> perl -e1 | perl -lwe "printf '<%s>', -t STDIN"
| <>
| C:\> perl -lwe "printf '<%s>', -t STDIN" < AUTOEXEC.BAT
| <>
--Suresh
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
MinGW-users mailing list
MinGW-users@xxxxxxxxxxxxxxxxxxxxx
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users