[vlc-devel] commit: Improved config_chain parsing by using escape for \ " and ' ( close #1952) (Laurent Aimar )

git version control git at videolan.org
Fri Aug 29 12:19:25 CEST 2008


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Fri Aug 29 12:14:48 2008 +0200| [ce1a1d9677d22a87bbec1fa9cbba42eca549b5c3] | committer: Laurent Aimar 

Improved config_chain parsing by using escape for \ " and ' (close #1952)

It also add checks against failed malloc.

The option value should be escaped by \ for the mentionned characters and
only for them (and only one time).

For example
 dst="test \"ok\".mp3"
will assign the value
 test "ok".mp3
to the option dst.

The following one
 dst="c:\test\\'bla'bla.txt"
will assign the value
 c:\test\'bla'bla.txt

You can use the functions
- config_StringEscape (allocates memory)
- config_StringUnescape (does not allocate memory).

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ce1a1d9677d22a87bbec1fa9cbba42eca549b5c3
---

 include/vlc_configuration.h |   54 ++++++++-
 src/config/chain.c          |  287 ++++++++++++++++++++++++++++++-------------
 src/libvlccore.sym          |    2 +
 3 files changed, 253 insertions(+), 90 deletions(-)

Diff:   http://git.videolan.org/gitweb.cgi/vlc.git/?a=commitdiff;h=ce1a1d9677d22a87bbec1fa9cbba42eca549b5c3



More information about the vlc-devel mailing list