l i n u x - u s e r s - g r o u p - o f - d a v i s
L U G O D
 
Next Meeting:
August 5: Social gathering
Next Installfest:
TBD
Latest News:
Jul. 4: July, August and September: Security, Photography and Programming for Kids
Page last updated:
2003 Apr 18 11:47

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
Re: [vox-tech] a better scanf?? (C-programming question)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vox-tech] a better scanf?? (C-programming question)



--V0207lvV8h4k8FAm
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Thu, Apr 17, 2003 at 11:42:09AM -0700, Andy Campbell wrote:
> Does anyone know of a better input mechanism from stdin than scanf?
[...] =20
> I basically need a scanf that doesn't halt the program?

Andy,

  It sounds like you are trying to read input from a user...

- Are you interested in keypress by keypress input?
  or will all inputs be a line followed by a return key press?


  Non-blocking with select/poll/busy-looping, reading into a=20
buffer, followed by sscanf when a return key is found will certainly
handle the second case... examples if that's what you want.
  Otherwise you will have to go with some curses or raw mode input
to get character by character input from a user, and opens a whole
can of worms...

    TTFN,
      Mike

--=20
GPG key: http://simons-clan.com/~msimons/gpg/msimons.asc
Fingerprint: 524D A726 77CB 62C9 4D56  8109 E10C 249F B7FA ACBE

--V0207lvV8h4k8FAm
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE+nv/E4Qwkn7f6rL4RAhnEAKCc3BbjVT7UKwFmC3T5dDRDtM/IUACfa1KJ
w3/tOEbKgiWB9FBJiU4cfjE=
=DIYN
-----END PGP SIGNATURE-----

--V0207lvV8h4k8FAm--
_______________________________________________
vox-tech mailing list
vox-tech@lists.lugod.org
http://lists.lugod.org/mailman/listinfo/vox-tech








LinkedIn
LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
facebook
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
Sunset Systems
Who graciously hosts our website & mailing lists!