]> git.sesse.net Git - mlt/blobdiff - src/framework/mlt_tokeniser.c
src/framework/*: improve the doxygen documentation (work in progress). This also...
[mlt] / src / framework / mlt_tokeniser.c
index 053b36f196f1dfeeab090ecffa30beaa399df7b1..9d3977e7050e0c594bcfc29a8c99087b0e52110f 100644 (file)
@@ -1,7 +1,9 @@
-/*
- * 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
+ *
+ * Copyright (C) 2002-2008 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
@@ -102,7 +104,7 @@ int mlt_tokeniser_parse_new( mlt_tokeniser tokeniser, char *string, char *delimi
                {
                        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, "" );
@@ -126,7 +128,7 @@ int mlt_tokeniser_parse_new( mlt_tokeniser tokeniser, char *string, char *delimi
                count = 0 - ( count - 1 );
                mlt_tokeniser_append( tokeniser, token );
        }
-               
+
        free( token );
        return count;
 }