[vlc-devel] commit: Factorize identical XML escape RPN functions ( Rémi Denis-Courmont )
git version control
git at videolan.org
Tue Mar 31 18:50:54 CEST 2009
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Mar 31 19:50:12 2009 +0300| [4ec2f03671d5e153be1038c18c9f10a1b99030ee] | committer: Rémi Denis-Courmont
Factorize identical XML escape RPN functions
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4ec2f03671d5e153be1038c18c9f10a1b99030ee
---
modules/control/http/rpn.c | 14 ++------------
1 files changed, 2 insertions(+), 12 deletions(-)
diff --git a/modules/control/http/rpn.c b/modules/control/http/rpn.c
index 6872f64..05c30cf 100644
--- a/modules/control/http/rpn.c
+++ b/modules/control/http/rpn.c
@@ -365,7 +365,8 @@ void EvaluateRPN( intf_thread_t *p_intf, mvar_t *vars,
SSPush( st, value );
free( value );
}
- else if( !strcmp( s, "xml_encode" ) )
+ else if( !strcmp( s, "xml_encode" )
+ || !strcmp( s, "htmlspecialchars" ) )
{
char *url = SSPop( st );
char *value = convert_xml_special_chars( url );
@@ -418,17 +419,6 @@ void EvaluateRPN( intf_thread_t *p_intf, mvar_t *vars,
free( psz_src );
free( psz_dest );
}
- else if( !strcmp( s, "htmlspecialchars" ) )
- {
- char *psz_src = SSPop( st );
- char *psz_dest;
-
- psz_dest = convert_xml_special_chars( psz_src );
-
- SSPush( st, psz_dest );
- free( psz_src );
- free( psz_dest );
- }
else if( !strcmp( s, "realpath" ) )
{
char *psz_src = SSPop( st );
More information about the vlc-devel
mailing list