[FFmpeg-devel] [PATCH] Implement av_get_token()
Michael Niedermayer
michaelni
Thu Apr 30 03:45:13 CEST 2009
On Sat, Apr 25, 2009 at 01:21:49PM +0200, Stefano Sabatini wrote:
> On date Friday 2009-04-24 15:18:45 +0200, Michael Niedermayer encoded:
> > On Fri, Apr 24, 2009 at 01:32:08AM +0200, Stefano Sabatini wrote:
> > > Hi, as in subject.
> > > Maybe it should be implemented in libavutil/avstring.h, but then maybe
> > > is also better to wait for it to stabilize.
> > >
> > > This is the output of the test program:
> > >
> > > || -> || + ||
> > > |:| -> || + |:|
> > > | | -> || + ||
> > > |foo | -> |foo| + ||
> > > | foo| -> |foo| + ||
> > > | foo | -> |foo| + ||
> > > | foo bar : blahblah| -> |foo bar| + |: blahblah|
> > > |\f\o\o| -> |foo| + ||
> > > |'foo : \ \ ' : blahblah| -> |foo : \ \| + |: blahblah|
> > > |'\fo\o:': blahblah| -> |\fo\o:| + |: blahblah|
> > > |\'fo\o\:': foo' :blahblah| -> |'foo:: foo| + |:blahblah|
> >
> > add \ at the end escaing the traiing null
> > and unterminated '
> > and escaped leading and trailing whitespace
>
> OK.
>
> [..]
> > > + /* strip trailing whitespaces */
> > > + out--;
> > > + while(--out >= ret && strspn(out, WHITESPACES))
> > > + *out = 0;
> >
> > this will remove escaped trailing whitespaces
>
> Reimplemeneted as a finite state machine, as the previous apporach was
> resulting messy and unreadable.
i do not plan to approve this patch
i think work should continue based on the previous version
which was cleaner, simpler and smaller
it only had one trivial bug
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
If you really think that XML is the answer, then you definitly missunderstood
the question -- Attila Kinali
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090430/6c56cb60/attachment.pgp>
More information about the ffmpeg-devel
mailing list