[vox-tech] a better scanf?? (C-programming question)
Andy Campbell
vox-tech@lists.lugod.org
Thu, 17 Apr 2003 13:43:00 -0700
This is a multi-part message in MIME format.
------=_NextPart_000_0019_01C304E7.4333A380
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
MessageThank you! The link is very helpful!!
Andy
-----Original Message-----
From: vox-tech-admin@lists.lugod.org
[mailto:vox-tech-admin@lists.lugod.org]On Behalf Of Ryan
Sent: Thursday, April 17, 2003 12:25 PM
To: vox-tech@lists.lugod.org
Subject: Re: [vox-tech] a better scanf?? (C-programming question)
there is a getch() you can use from ncurses, otherwise
See if this link helps
http://www.c-for-dummies.com/lessons/linux/04/
----- Original Message -----
From: Andy Campbell
To: vox-tech@lists.lugod.org
Sent: Thursday, April 17, 2003 11:42 AM
Subject: [vox-tech] a better scanf?? (C-programming question)
Hello all,
Does anyone know of a better input mechanism from stdin than scanf?? I
need the functionality of scanf, without stopping the program flow. In other
words, is there a function that will store any keyboard info into a buffer,
and then continue with the program until next time the loop executes and it
sees what (if anything) has been put into the buffer, and stores the buffer
contents once the carriage return is input??
I basically need a scanf that doesn't halt the program?? The only thing
I have found is "bioskey" but I think that that is only in a dos
environment??
Does anyone know how to do this in linux??
Thanks
Andy
------=_NextPart_000_0019_01C304E7.4333A380
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Message</TITLE>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.3502.4373" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN =
class=3D215454220-17042003>Thank=20
you! The link is very helpful!!</SPAN></FONT></DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN=20
class=3D215454220-17042003></SPAN></FONT> </DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN=20
class=3D215454220-17042003>Andy</SPAN></FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"BORDER-LEFT: #0000ff 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: =
0px; PADDING-LEFT: 5px">
<DIV align=3Dleft class=3DOutlookMessageHeader dir=3Dltr><FONT =
face=3DTahoma=20
size=3D2>-----Original Message-----<BR><B>From:</B>=20
vox-tech-admin@lists.lugod.org =
[mailto:vox-tech-admin@lists.lugod.org]<B>On=20
Behalf Of </B>Ryan<BR><B>Sent:</B> Thursday, April 17, 2003 12:25=20
PM<BR><B>To:</B> vox-tech@lists.lugod.org<BR><B>Subject:</B> Re: =
[vox-tech] a=20
better scanf?? (C-programming question)<BR><BR></DIV></FONT>
<DIV><FONT face=3DArial size=3D2>there is a getch() you can use from =
ncurses,=20
otherwise</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>See if this link helps</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><A=20
=
href=3D"http://www.c-for-dummies.com/lessons/linux/04/">http://www.c-for-=
dummies.com/lessons/linux/04/</A></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; =
MARGIN-RIGHT: 0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px">
<DIV style=3D"FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV=20
style=3D"BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: =
black"><B>From:</B>=20
<A href=3D"mailto:atcampbell@ucdavis.edu" =
title=3Datcampbell@ucdavis.edu>Andy=20
Campbell</A> </DIV>
<DIV style=3D"FONT: 10pt arial"><B>To:</B> <A=20
href=3D"mailto:vox-tech@lists.lugod.org"=20
title=3Dvox-tech@lists.lugod.org>vox-tech@lists.lugod.org</A> </DIV>
<DIV style=3D"FONT: 10pt arial"><B>Sent:</B> Thursday, April 17, =
2003 11:42=20
AM</DIV>
<DIV style=3D"FONT: 10pt arial"><B>Subject:</B> [vox-tech] a better =
scanf??=20
(C-programming question)</DIV>
<DIV><BR></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN =
class=3D375243218-17042003>Hello=20
all,</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D375243218-17042003></SPAN></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><SPAN =
class=3D375243218-17042003>Does anyone know=20
of a better input mechanism from stdin than scanf?? I need the =
functionality=20
of scanf, without stopping the program flow. In other words, is =
there a=20
function that will store any keyboard info into a buffer, and then =
continue=20
with the program until next time the loop executes and it sees what =
(if=20
anything) has been put into the buffer, and stores the buffer=20
contents once the carriage return is =
input??</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D375243218-17042003></SPAN></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><SPAN =
class=3D375243218-17042003>I basically=20
need a scanf that doesn't halt the program?? The only thing I have =
found is=20
"bioskey" but I think that that is only in a dos=20
environment??</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D375243218-17042003></SPAN></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><SPAN =
class=3D375243218-17042003>Does anyone know=20
how to do this in linux??</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D375243218-17042003></SPAN></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D375243218-17042003>Thanks</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
=
class=3D375243218-17042003>Andy</SPAN></FONT></DIV></BLOCKQUOTE></BLOCKQU=
OTE></BODY></HTML>
------=_NextPart_000_0019_01C304E7.4333A380--