l i n u x - u s e r s - g r o u p - o f - d a v i s
Next Meeting:
July 7: Social gathering
Next Installfest:
Latest News:
Jun. 14: June LUGOD meeting cancelled
Page last updated:
2003 Apr 18 20:15

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)

> I'm trying to read your intent from the code above,
> and it seems to be "run a process until
> it finishes or let me press 'x' if I run out of patience." If
> that's the case,
> then it'll be much easier to interrupt the process with <ctl>c instead.

really the intent of this program is "let me see if I can get the string
'Waiting...' to print over and over again until I input any letter (other
than x) at which point waiting will then print over and over again....

> Another possibility of intent is to prompt the user with a list
> of choices,
> assigning each choice a single letter to press, and have that choice be
> recorded without having to press <enter>. If that's the case, then Ryan's
> reference to the function "set_keypress()" will work. However,
> the function
> as posted has some bugs in it. Here is a complete program with the
> function working.

It's not just pressing enter....I actually implemented the set_keypress
function successfully (not shown in the code obviuosly) but it is not what I
want. It still stopped the program flow until I entered one character, at
which point it continued through once and got hung up on the getchar()
function again.

I want it to run through the code continuosly, and then when I input a char,
it interrupts the program and stores the value.

vox-tech mailing list

LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
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:
Appahost Applications
For a significant contribution towards our projector, and a generous donation to allow us to continue meeting at the Davis Library.