[MPlayer-dev-eng] [PATCH] suboption escaping

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Fri Aug 19 21:14:30 CEST 2005


On Fri, Aug 19, 2005 at 10:09:21AM -0500, Joey Parrish wrote:
> On Thu, Aug 18, 2005 at 11:51:10PM +0200, Reimar Döffinger wrote:
> > Yes, but the backslash escaping behaves in a certain way that your patch
> > does not conform to (e.g. \\ is supposed to stand for \ etc.).
> 
> IT DOES.  For the last time, it DOES behave that way.  Read the source!

I did, but I always end up reading the first patch, sorry :-(.

> > IMHO the current way to parse it is broken (first strtok and then
> > sscanf). I think it would be better to first assign the subopt variable
> > (by finding the end of the option string by searching for '=' or ':'),
> 
> No, this doesn't work.  If you end subopt by finding :, then we can't
> have : in a value.  That's the whole reason for my patch.

No, I meant search for ':' _or_ '=', whichever comes first. Of course,
the suboption name can't contain a ':' or '=' in that case, but I'd say
that's no problem.

> > and then parse the value (if any). e.g. if it starts with " search for
> > the closing " and copy all of it. if not you can do backslash escaping
> > processing. Etc.
> 
> I would accept "" parsing if you have a patch to offer.  All I care
> about is mencoder -info "title=Star Trek: The Next Generation".  If you
> can make this work (other than the %len% method, which is a pain for
> scripting) then I'll be happy.

Hmmm... I'd prefer somebody else to do it, but I can try to whip
something up if nobody else does...

Greetings,
Reimar Döffinger




More information about the MPlayer-dev-eng mailing list