
6 Jul
2008
6 Jul
'08
3:31 p.m.
In message 20080706111620.GC13922@game.jcrosoft.org you wrote:
+static int yes(void) +{
- char c;
- c = getc();
- if (c != 'y' && c != 'Y')
return 0;
- c = getc();
- return c == '\r' || c == '\n';
+}
It will be good to have it in a re-usable header as inline.
And why not name it as "ask_confirm()"?
Or extend it a bit and call it ckyorn() - oh, good old SVR4 times :-)
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
Hegel was right when he said that we learn from history that man can
never learn anything from history. - George Bernard Shaw