From 5459030be02ce2ea78978060f8a4f8eaf2a0ae45 Mon Sep 17 00:00:00 2001 From: James Zern Date: Thu, 12 Dec 2013 20:20:08 -0800 Subject: [PATCH] gif2webp: let -- stop parameter parsing this enables gif2webp to accept input files starting with '-' Change-Id: I994a5587e16e3af83ca45bfda8caf2dc39068b6c --- examples/gif2webp.c | 3 +++ man/gif2webp.1 | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/examples/gif2webp.c b/examples/gif2webp.c index 6e8d79ee..6c7f4638 100644 --- a/examples/gif2webp.c +++ b/examples/gif2webp.c @@ -359,6 +359,9 @@ int main(int argc, const char *argv[]) { quiet = 1; } else if (!strcmp(argv[c], "-v")) { verbose = 1; + } else if (!strcmp(argv[c], "--")) { + if (c < argc - 1) in_file = argv[++c]; + break; } else if (argv[c][0] == '-') { fprintf(stderr, "Error! Unknown option '%s'\n", argv[c]); Help(); diff --git a/man/gif2webp.1 b/man/gif2webp.1 index 6fb79b7b..ded05e37 100644 --- a/man/gif2webp.1 +++ b/man/gif2webp.1 @@ -1,5 +1,5 @@ .\" Hey, EMACS: -*- nroff -*- -.TH GIF2WEBP 1 "November 18, 2013" +.TH GIF2WEBP 1 "December 12, 2013" .SH NAME gif2webp \- Convert a GIF image to WebP .SH SYNOPSIS @@ -119,6 +119,8 @@ gif2webp \-q 70 picture.gif \-o picture.webp gif2webp \-lossy \-m 3 picture.gif \-o picture_lossy.webp .br gif2webp \-lossy \-f 50 picture.gif \-o picture.webp +.br +gif2webp \-q 70 \-o picture.webp \-\- \-\-\-picture.gif .SH AUTHORS \fBgif2webp\fP was written by the WebP team.