-/*
- * mlt_tokeniser.c -- String tokeniser
- * Copyright (C) 2002-2003 Ushodaya Enterprises Limited
- * Author: Charles Yates <charles.yates@pandora.be>
+/**
+ * \file mlt_tokeniser.c
+ * \brief string tokeniser
+ * \see mlt_tokeniser_s
+ *
+ * Copyright (C) 2002-2009 Ushodaya Enterprises Limited
+ * \author Charles Yates <charles.yates@pandora.be>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
{
strncat( token, start, end - start );
index += end - start;
- if ( token[ 0 ] != '\"' || ( token[ 0 ] == '\"' && token[ strlen( token ) - 1 ] == '\"' ) )
+ if ( strchr( token, '\"' ) == NULL || token[ strlen( token ) - 1 ] == '\"' )
{
mlt_tokeniser_append( tokeniser, token );
strcpy( token, "" );
count = 0 - ( count - 1 );
mlt_tokeniser_append( tokeniser, token );
}
-
+
free( token );
return count;
}