summaryrefslogtreecommitdiffstats
path: root/m_property.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2012-09-22 08:04:08 +0200
committerwm4 <wm4@nowhere>2012-10-12 10:10:32 +0200
commit84af1733800fd78af61b2ebf5be10673192b68fe (patch)
tree8d1efba46dfb2af05e594360c90c2b2d63c670e3 /m_property.c
parentb591688a2774f1142a56e9c2034ecd3002fdb8d8 (diff)
downloadmpv-84af1733800fd78af61b2ebf5be10673192b68fe.tar.bz2
mpv-84af1733800fd78af61b2ebf5be10673192b68fe.tar.xz
commands: cosmetics: rename things
This is Better (tm). The only actual change is that with M_PROPERTY_SET_STRING, the option parser will use the property name, instead whatever was set in the name field of the option returned by M_PROPERTY_GET_TYPE. In most cases, these should be the same, though.
Diffstat (limited to 'm_property.c')
-rw-r--r--m_property.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/m_property.c b/m_property.c
index dc856966f3..25c0ef51e8 100644
--- a/m_property.c
+++ b/m_property.c
@@ -88,7 +88,7 @@ int m_property_do(const m_option_t *prop_list, const char *name,
*(char **)arg = str;
return str != NULL;
}
- case M_PROPERTY_TO_STRING: {
+ case M_PROPERTY_GET_STRING: {
if ((r = do_action(prop_list, name, M_PROPERTY_GET, &val, ctx)) <= 0)
return r;
char *str = m_option_print(&opt, &val);
@@ -96,9 +96,9 @@ int m_property_do(const m_option_t *prop_list, const char *name,
*(char **)arg = str;
return str != NULL;
}
- case M_PROPERTY_PARSE: {
+ case M_PROPERTY_SET_STRING: {
// (reject 0 return value: success, but empty string with flag)
- if (m_option_parse(&opt, bstr0(opt->name), bstr0(arg), &val) <= 0)
+ if (m_option_parse(&opt, bstr0(name), bstr0(arg), &val) <= 0)
return M_PROPERTY_ERROR;
r = do_action(prop_list, name, M_PROPERTY_SET, &val, ctx);
m_option_free(&opt, &val);
@@ -184,7 +184,7 @@ char *m_properties_expand_string(const m_option_t *prop_list, char *str,
int method = M_PROPERTY_PRINT;
if (str[0] == '=') {
str += 1;
- method = M_PROPERTY_TO_STRING;
+ method = M_PROPERTY_GET_STRING;
}
int pl = e - str;
char pname[pl + 1];