changelog.html : Added entries about RICE2 residue coding method.
[platform/upstream/flac.git] / src / test_libFLAC / metadata_object.c
index 02c1d92..050c482 100644 (file)
@@ -260,22 +260,22 @@ static void vc_delete_(FLAC__StreamMetadata *block, unsigned pos)
 
 static void vc_replace_new_(FLAC__StreamMetadata_VorbisComment_Entry *entry, FLAC__StreamMetadata *block, const char *field, FLAC__bool all)
 {
-       int index;
+       int indx;
        char field_name[256];
        const char *eq = strchr(field, '=');
        FLAC__ASSERT(eq>field && (unsigned)(eq-field) < sizeof(field_name));
        memcpy(field_name, field, eq-field);
        field_name[eq-field]='\0';
 
-       index = vc_find_from_(block, field_name, 0);
-       if(index < 0)
+       indx = vc_find_from_(block, field_name, 0);
+       if(indx < 0)
                vc_insert_new_(entry, block, block->data.vorbis_comment.num_comments, field);
        else {
-               vc_set_new_(entry, block, (unsigned)index, field);
+               vc_set_new_(entry, block, (unsigned)indx, field);
                if(all) {
-                       for(index = index+1; index >= 0 && (unsigned)index < block->data.vorbis_comment.num_comments; )
-                               if((index = vc_find_from_(block, field_name, (unsigned)index)) >= 0)
-                                       vc_delete_(block, (unsigned)index);
+                       for(indx = indx+1; indx >= 0 && (unsigned)indx < block->data.vorbis_comment.num_comments; )
+                               if((indx = vc_find_from_(block, field_name, (unsigned)indx)) >= 0)
+                                       vc_delete_(block, (unsigned)indx);
                }
        }
 
@@ -362,7 +362,7 @@ static void tr_resize_(FLAC__StreamMetadata *block, unsigned track_num, unsigned
        cs_calc_len_(block);
 }
 
-static void tr_set_new_(FLAC__StreamMetadata *block, unsigned track_num, unsigned pos, FLAC__StreamMetadata_CueSheet_Index index)
+static void tr_set_new_(FLAC__StreamMetadata *block, unsigned track_num, unsigned pos, FLAC__StreamMetadata_CueSheet_Index indx)
 {
        FLAC__StreamMetadata_CueSheet_Track *tr;
 
@@ -372,12 +372,12 @@ static void tr_set_new_(FLAC__StreamMetadata *block, unsigned track_num, unsigne
 
        FLAC__ASSERT(pos < tr->num_indices);
 
-       tr->indices[pos] = index;
+       tr->indices[pos] = indx;
 
        cs_calc_len_(block);
 }
 
-static void tr_insert_new_(FLAC__StreamMetadata *block, unsigned track_num, unsigned pos, FLAC__StreamMetadata_CueSheet_Index index)
+static void tr_insert_new_(FLAC__StreamMetadata *block, unsigned track_num, unsigned pos, FLAC__StreamMetadata_CueSheet_Index indx)
 {
        FLAC__StreamMetadata_CueSheet_Track *tr;
 
@@ -389,7 +389,7 @@ static void tr_insert_new_(FLAC__StreamMetadata *block, unsigned track_num, unsi
 
        tr_resize_(block, track_num, tr->num_indices+1);
        memmove(&tr->indices[pos+1], &tr->indices[pos], sizeof(FLAC__StreamMetadata_CueSheet_Index)*(tr->num_indices-1-pos));
-       tr_set_new_(block, track_num, pos, index);
+       tr_set_new_(block, track_num, pos, indx);
        cs_calc_len_(block);
 }
 
@@ -504,7 +504,7 @@ FLAC__bool test_metadata_object(void)
        FLAC__StreamMetadata *block, *blockcopy, *vorbiscomment, *cuesheet, *picture;
        FLAC__StreamMetadata_SeekPoint seekpoint_array[14];
        FLAC__StreamMetadata_VorbisComment_Entry entry;
-       FLAC__StreamMetadata_CueSheet_Index index;
+       FLAC__StreamMetadata_CueSheet_Index indx;
        FLAC__StreamMetadata_CueSheet_Track track;
        unsigned i, expected_length, seekpoints;
        int j;
@@ -1795,11 +1795,11 @@ FLAC__bool test_metadata_object(void)
                return false;
        printf("OK\n");
 
-       index.offset = 0;
-       index.number = 1;
+       indx.offset = 0;
+       indx.number = 1;
        printf("testing FLAC__metadata_object_cuesheet_track_insert_index() on empty array...");
-       tr_insert_new_(cuesheet, 0, 0, index);
-       if(!FLAC__metadata_object_cuesheet_track_insert_index(block, 0, 0, index)) {
+       tr_insert_new_(cuesheet, 0, 0, indx);
+       if(!FLAC__metadata_object_cuesheet_track_insert_index(block, 0, 0, indx)) {
                printf("FAILED, returned false\n");
                return false;
        }
@@ -1807,11 +1807,11 @@ FLAC__bool test_metadata_object(void)
                return false;
        printf("OK\n");
 
-       index.offset = 10;
-       index.number = 2;
+       indx.offset = 10;
+       indx.number = 2;
        printf("testing FLAC__metadata_object_cuesheet_track_insert_index() on beginning of non-empty array...");
-       tr_insert_new_(cuesheet, 0, 0, index);
-       if(!FLAC__metadata_object_cuesheet_track_insert_index(block, 0, 0, index)) {
+       tr_insert_new_(cuesheet, 0, 0, indx);
+       if(!FLAC__metadata_object_cuesheet_track_insert_index(block, 0, 0, indx)) {
                printf("FAILED, returned false\n");
                return false;
        }
@@ -1819,11 +1819,11 @@ FLAC__bool test_metadata_object(void)
                return false;
        printf("OK\n");
 
-       index.offset = 20;
-       index.number = 3;
+       indx.offset = 20;
+       indx.number = 3;
        printf("testing FLAC__metadata_object_cuesheet_track_insert_index() on middle of non-empty array...");
-       tr_insert_new_(cuesheet, 0, 1, index);
-       if(!FLAC__metadata_object_cuesheet_track_insert_index(block, 0, 1, index)) {
+       tr_insert_new_(cuesheet, 0, 1, indx);
+       if(!FLAC__metadata_object_cuesheet_track_insert_index(block, 0, 1, indx)) {
                printf("FAILED, returned false\n");
                return false;
        }
@@ -1831,11 +1831,11 @@ FLAC__bool test_metadata_object(void)
                return false;
        printf("OK\n");
 
-       index.offset = 30;
-       index.number = 4;
+       indx.offset = 30;
+       indx.number = 4;
        printf("testing FLAC__metadata_object_cuesheet_track_insert_index() on end of non-empty array...");
-       tr_insert_new_(cuesheet, 0, 3, index);
-       if(!FLAC__metadata_object_cuesheet_track_insert_index(block, 0, 3, index)) {
+       tr_insert_new_(cuesheet, 0, 3, indx);
+       if(!FLAC__metadata_object_cuesheet_track_insert_index(block, 0, 3, indx)) {
                printf("FAILED, returned false\n");
                return false;
        }
@@ -1843,10 +1843,10 @@ FLAC__bool test_metadata_object(void)
                return false;
        printf("OK\n");
 
-       index.offset = 0;
-       index.number = 0;
+       indx.offset = 0;
+       indx.number = 0;
        printf("testing FLAC__metadata_object_cuesheet_track_insert_blank_index() on end of non-empty array...");
-       tr_insert_new_(cuesheet, 0, 4, index);
+       tr_insert_new_(cuesheet, 0, 4, indx);
        if(!FLAC__metadata_object_cuesheet_track_insert_blank_index(block, 0, 4)) {
                printf("FAILED, returned false\n");
                return false;