diff options
author | wm4 <wm4@nowhere> | 2012-09-21 12:19:59 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2012-10-12 10:10:31 +0200 |
commit | ed8e738e0f7da90597732965fe4e8cd1feb9099a (patch) | |
tree | 0665723e3a5db809b188d4e34f275ec0d9fc3df5 /m_property.c | |
parent | d6dad9e93431f8ec3ad7999d0bac3a585b47866c (diff) | |
download | mpv-ed8e738e0f7da90597732965fe4e8cd1feb9099a.tar.bz2 mpv-ed8e738e0f7da90597732965fe4e8cd1feb9099a.tar.xz |
commands: cosmetic changes mostly to m_property.h
The Doxygen-style documentation comments were nothing but bloat.
Also move mp_property_do() and mp_property_print() to command.h, where
they should belong, and fix their argument types. m_property.c/h is
supposed to be generic, while command.h provides declarations specific
to the mplayer core.
Diffstat (limited to 'm_property.c')
-rw-r--r-- | m_property.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/m_property.c b/m_property.c index c53ef19d81..aebdde88ef 100644 --- a/m_property.c +++ b/m_property.c @@ -38,17 +38,17 @@ static int do_action(const m_option_t *prop_list, const char *name, { const char *sep; const m_option_t *prop; - m_property_action_t ka; - int r; if ((sep = strchr(name, '/')) && sep[1]) { int len = sep - name; char base[len + 1]; memcpy(base, name, len); base[len] = 0; prop = m_option_list_find(prop_list, base); - ka.key = sep + 1; - ka.action = action; - ka.arg = arg; + struct m_property_action ka = { + .key = sep + 1, + .action = action, + .arg = arg, + }; action = M_PROPERTY_KEY_ACTION; arg = &ka; } else @@ -56,7 +56,7 @@ static int do_action(const m_option_t *prop_list, const char *name, if (!prop) return M_PROPERTY_UNKNOWN; int (*control)(const m_option_t*, int, void*, void*) = prop->p; - r = control(prop, action, arg, ctx); + int r = control(prop, action, arg, ctx); if (action == M_PROPERTY_GET_TYPE && r < 0) { *(const m_option_t **)arg = prop; return M_PROPERTY_OK; |