diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2011-07-30 16:51:01 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2011-07-30 16:51:01 +0300 |
commit | 004fd5299b3c24a1d11e6c450e5e763ea95779ad (patch) | |
tree | 3052034bd49efdb3fa84271e0eeccb6afc19e7cc /src | |
parent | 8006a1de47d492a2fc15e314a3851fb40e6622bd (diff) | |
download | idest-004fd5299b3c24a1d11e6c450e5e763ea95779ad.tar.gz idest-004fd5299b3c24a1d11e6c450e5e763ea95779ad.tar.bz2 |
Finish the testsuite.
* scheme/Makefile.am: Rewrite.
* src/frametab.gperf (frametab_enumerate): Minor fix.
* tests/Makefile.am (TESTSUITE_AT): Add new testcases.
(EXTRA_DIST): Add idest-32.png and idest-68.png.
* tests/testsuite.at: Add new testcases.
* tests/atlocal.in (GUILE_VERSION,INSTALL_PROG): New variables.
* tests/id3v2: Remove trailing whitespace from USLT.
* tests/delcomm.at: New file.
* tests/fmt-shortlist.at: New file.
* tests/framelist00.at: New file.
* tests/framelist01.at: New file.
* tests/framelist02.at: New file.
* tests/list1.at: New file.
* tests/list2.at: New file.
* tests/lyrics00.at: New file.
* tests/pic00.at: New file.
* tests/pic01.at: New file.
* tests/script00.at: New file.
* tests/script01.at: New file.
* tests/script02.at: New file.
* tests/script03.at: New file.
* tests/script04.at: New file.
* tests/script05.at: New file.
* tests/script06.at: New file.
* tests/script07.at: New file.
* tests/script08.at: New file.
* tests/setlyrics.at: New file.
* tests/setpic.at: New file.
* tests/settitle.at: New file.
* tests/shortlist.at: New file.
* tests/version.at: Remove useless prereq.
Diffstat (limited to 'src')
-rw-r--r-- | src/frametab.gperf | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/frametab.gperf b/src/frametab.gperf index 15310c9..e716954 100644 --- a/src/frametab.gperf +++ b/src/frametab.gperf @@ -592,13 +592,15 @@ int frametab_enumerate(int (*fun)(const struct idest_frametab *, void *), void *data, int sorted) { - struct idest_frametab *ft; + struct idest_frametab const *ft; + struct idest_frametab *ftbuf = NULL; int i; if (sorted) { - ft = xmalloc(sizeof(wordlist)); - memcpy(ft, wordlist, sizeof(wordlist)); - qsort(ft, wordlist_count, sizeof(ft[0]), frametab_cmp); + ftbuf = xmalloc(sizeof(wordlist)); + memcpy(ftbuf, wordlist, sizeof(wordlist)); + qsort(ftbuf, wordlist_count, sizeof(ftbuf[0]), frametab_cmp); + ft = ftbuf; } else ft = wordlist; for (i = 0; i < wordlist_count; i++) { @@ -606,8 +608,7 @@ frametab_enumerate(int (*fun)(const struct idest_frametab *, void *), if (rc) return rc; } - if (sorted) - free(ft); + free(ftbuf); return 0; } |