From b7cb1af4980e4ec2da117c0bf29d83eaec5c58f3 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Fri, 30 Jul 2010 15:21:32 +0200 Subject: Make -c and -F options accept an optional argument The long --capture and --file options have an optional argument, fix the short versions. Signed-off-by: Laurent Pinchart --- yavta.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/yavta.c b/yavta.c index ebb94b8..123f42f 100644 --- a/yavta.c +++ b/yavta.c @@ -845,7 +845,7 @@ static void usage(const char *argv0) printf("-c, --capture[=nframes] Capture frames\n"); printf("-d, --delay Delay (in ms) before requeuing buffers\n"); printf("-f, --format format Set the video format\n"); - printf("-F, --file prefix Read/write frames from/to disk\n"); + printf("-F, --file[=prefix] Read/write frames from/to disk\n"); printf("-h, --help Show this help screen\n"); printf("-i, --input input Select the video input\n"); printf("-l, --list-controls List available controls\n"); @@ -934,7 +934,7 @@ int main(int argc, char *argv[]) const char *filename = "frame"; opterr = 0; - while ((c = getopt_long(argc, argv, "cd:f:Fhi:ln:pq:r:s:t:uw:", opts, NULL)) != -1) { + while ((c = getopt_long(argc, argv, "c::d:f:F::hi:ln:pq:r:s:t:uw:", opts, NULL)) != -1) { switch (c) { case 'c': -- cgit v1.2.3