[MPlayer-cvslog] r25529 - in trunk: DOCS/man/en/mplayer.1 m_property.c
ulion
subversion at mplayerhq.hu
Wed Dec 26 05:15:57 CET 2007
Author: ulion
Date: Wed Dec 26 05:15:56 2007
New Revision: 25529
Log:
Support ?(!NAME:TEXT) format for expanding string by property.
Modified:
trunk/m_property.c
Changes in other areas also in this revision:
Modified:
trunk/DOCS/man/en/mplayer.1
Modified: trunk/m_property.c
==============================================================================
--- trunk/m_property.c (original)
+++ trunk/m_property.c Wed Dec 26 05:15:56 2007
@@ -146,11 +146,16 @@ char* m_properties_expand_string(m_optio
} else if(str[0] == '?' && str[1] == '(' && (e = strchr(str+2,':'))) {
lvl++;
if(!skip) {
- int pl = e-str-2;
+ int is_not = str[2] == '!';
+ int pl = e - str - (is_not ? 3 : 2);
char pname[pl+1];
- memcpy(pname,str+2,pl);
+ memcpy(pname, str + (is_not ? 3 : 2), pl);
pname[pl] = 0;
- if(m_property_do(prop_list,pname,M_PROPERTY_GET,NULL,ctx) < 0)
+ if(m_property_do(prop_list,pname,M_PROPERTY_GET,NULL,ctx) < 0) {
+ if (!is_not)
+ skip = 1, skip_lvl = lvl;
+ }
+ else if (is_not)
skip = 1, skip_lvl = lvl;
}
str = e+1, l = 0;
More information about the MPlayer-cvslog
mailing list