Merge "webpmux: let -- stop parameter parsing"

This commit is contained in:
James Zern 2013-12-18 11:05:43 -08:00 committed by Gerrit Code Review
commit f307f98b21
2 changed files with 18 additions and 1 deletions

View File

@ -677,6 +677,17 @@ static int ParseCommandLine(int argc, const char* argv[],
(version >> 16) & 0xff, (version >> 8) & 0xff, version & 0xff); (version >> 16) & 0xff, (version >> 8) & 0xff, version & 0xff);
DeleteConfig(config); DeleteConfig(config);
exit(0); exit(0);
} else if (!strcmp(argv[i], "--")) {
if (i < argc - 1) {
++i;
if (config->input_ == NULL) {
config->input_ = argv[i];
} else {
ERROR_GOTO2("ERROR at '%s': Multiple input files specified.\n",
argv[i], ErrParse);
}
}
break;
} else { } else {
ERROR_GOTO2("ERROR: Unknown option: '%s'.\n", argv[i], ErrParse); ERROR_GOTO2("ERROR: Unknown option: '%s'.\n", argv[i], ErrParse);
} }

View File

@ -1,5 +1,5 @@
.\" Hey, EMACS: -*- nroff -*- .\" Hey, EMACS: -*- nroff -*-
.TH WEBPMUX 1 "August 26, 2013" .TH WEBPMUX 1 "December 17, 2013"
.SH NAME .SH NAME
webpmux \- command line tool to create WebP Mux/container file. webpmux \- command line tool to create WebP Mux/container file.
.SH SYNOPSIS .SH SYNOPSIS
@ -161,6 +161,12 @@ webpmux \-frame anim_1.webp +100 \-frame anim_2.webp +100+50+50
.RE .RE
.br .br
webpmux \-get frame 2 anim_container.webp \-o frame_2.webp webpmux \-get frame 2 anim_container.webp \-o frame_2.webp
.br
webpmux \-set icc image_profile.icc \-o icc_container.webp \-\- \-\-\-in.webp
.br
webpmux \-get icc \-o image_profile.icc \-\- \-\-\-icc_container.webp
.br
webpmux \-strip icc \-o without_icc.webp \-\- \-\-\-icc_container.webp
.SH AUTHORS .SH AUTHORS
\fBwebpmux\fP is written by the WebP team. \fBwebpmux\fP is written by the WebP team.