OSDN Git Service
(root)
/
android-x86
/
external-ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e6e6060
)
cmdutils: allow ':'-separated modifiers in option names.
author
Anton Khirnov
<anton@khirnov.net>
Fri, 29 Jul 2011 11:47:37 +0000
(13:47 +0200)
committer
Anton Khirnov
<anton@khirnov.net>
Fri, 12 Aug 2011 11:51:30 +0000
(13:51 +0200)
cmdutils.c
patch
|
blob
|
history
diff --git
a/cmdutils.c
b/cmdutils.c
index
d3fdae7
..
1df2556
100644
(file)
--- a/
cmdutils.c
+++ b/
cmdutils.c
@@
-141,8
+141,11
@@
void show_help_options(const OptionDef *options, const char *msg, int mask, int
}
static const OptionDef* find_option(const OptionDef *po, const char *name){
+ const char *p = strchr(name, ':');
+ int len = p ? p - name : strlen(name);
+
while (po->name != NULL) {
- if (!str
cmp(name, po->name)
)
+ if (!str
ncmp(name, po->name, len) && strlen(po->name) == len
)
break;
po++;
}