aboutsummaryrefslogtreecommitdiffstats
path: root/cmdutils.c
diff options
context:
space:
mode:
authorStefano Sabatini <stefano.sabatini-lala@poste.it>2009-03-18 21:35:49 +0000
committerStefano Sabatini <stefano.sabatini-lala@poste.it>2009-03-18 21:35:49 +0000
commit090b61b2d18a034c225598d54304e05c95b71b3e (patch)
tree2519bc247eff7ecb4ac3f35bab497c69946ffc22 /cmdutils.c
parenteab5168cd345a5ce0001036690daac7767062aa1 (diff)
downloadffmpeg-090b61b2d18a034c225598d54304e05c95b71b3e.tar.gz
Implement read_yesno().
Originally committed as revision 18037 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'cmdutils.c')
-rw-r--r--cmdutils.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/cmdutils.c b/cmdutils.c
index 7c4a530ef9..167d15a71c 100644
--- a/cmdutils.c
+++ b/cmdutils.c
@@ -472,3 +472,14 @@ void show_formats(void)
"decoder corresponds to the h263 and h263p encoders, for file formats it is even\n"
"worse.\n");
}
+
+int read_yesno(void)
+{
+ int c = getchar();
+ int yesno = (toupper(c) == 'Y');
+
+ while (c != '\n' && c != EOF)
+ c = getchar();
+
+ return yesno;
+}