mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-06-01 09:27:44 +00:00
Implement read_yesno().
Originally committed as revision 18037 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
eab5168cd3
commit
090b61b2d1
2 changed files with 17 additions and 0 deletions
11
cmdutils.c
11
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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue