# HG changeset patch # User thib # Date 1237996852 0 # Node ID a85cdca1980a248bcd0bf81daf97739e4c996604 # Parent 01aa5ddf7dc8110e508a3cf61cbb80d3abf9b000 * fixed itoa_ws * now, configure fails if the requested vorbis lib is not found (so it doesn't build with the wrong lib) * removed unused current_section in koe_ogg.cc diff --git a/configure.ac b/configure.ac --- a/configure.ac +++ b/configure.ac @@ -86,9 +86,11 @@ if test X$with_vorbis != X"no"; then AC_CHECK_LIB(ogg, ogg_stream_init) AC_CHECK_LIB(vorbis, vorbis_book_decode,,,-logg) if test X$enable_tremor = X"yes"; then - AC_CHECK_LIB(vorbisidec, ov_read,,,-logg -lvorbis) + AC_CHECK_LIB(vorbisidec, ov_read,, + AC_MSG_ERROR(vorbisidec (tremor) not found),-logg -lvorbis) else - AC_CHECK_LIB(vorbisfile, ov_read,,,-logg -lvorbis) + AC_CHECK_LIB(vorbisfile, ov_read,, + AC_MSG_ERROR(vorbisfile not found),-logg -lvorbis) fi fi diff --git a/music2/koedec_ogg.cc b/music2/koedec_ogg.cc --- a/music2/koedec_ogg.cc +++ b/music2/koedec_ogg.cc @@ -150,12 +150,11 @@ extern char* decode_koe_ogg(AvgKoeInfo i cur_size = INITSIZE; out = (char*)malloc(cur_size); - int current_section; do { #if HAVE_LIBVORBISFILE - r = ov_read(&vf, out+cur, cur_size-cur, 0, 2, 1, 0); + r = ov_read(&vf, out+cur, cur_size-cur, 0, 2, 1, NULL); #else /* HAVE_LIBVORBISIDEC */ - r = ov_read(&vf, out+cur, cur_size-cur, ¤t_section); + r = ov_read(&vf, out+cur, cur_size-cur, NULL); #endif if (r <= 0) break; cur += r; @@ -211,20 +210,19 @@ OggFILE::~OggFILE() { } int OggFILE::Read(char* buf, int blksize, int blklen) { if (pimpl == 0) return -1; - int current_section; #if HAVE_LIBVORBISFILE - int r = ov_read( &(pimpl->vf), buf, blksize*blklen, 0, 2, 1, 0); + int r = ov_read( &(pimpl->vf), buf, blksize*blklen, 0, 2, 1, NULL); #else /* HAVE_LIBVORBISIDEC */ - int r = ov_read( &(pimpl->vf), buf, blksize*blklen, ¤t_section); + int r = ov_read( &(pimpl->vf), buf, blksize*blklen, NULL); #endif if (r <= 0) { // end of file return -1; } while(r < blksize*blklen) { #if HAVE_LIBVORBISFILE - int dr = ov_read(&(pimpl->vf), buf+r, blksize*blklen-r, 0, 2, 1, 0); + int dr = ov_read(&(pimpl->vf), buf+r, blksize*blklen-r, 0, 2, 1, NULL); #else /* HAVE_LIBVORBISIDEC */ - int dr = ov_read(&(pimpl->vf), buf+r, blksize*blklen-r, ¤t_section); + int dr = ov_read(&(pimpl->vf), buf+r, blksize*blklen-r, NULL); #endif if (dr <= 0) break; r += dr; diff --git a/scn2k/scn2k_cmd.cc b/scn2k/scn2k_cmd.cc --- a/scn2k/scn2k_cmd.cc +++ b/scn2k/scn2k_cmd.cc @@ -487,13 +487,13 @@ bool Flags::Exec(Cmd& cmd) { int i; for (i=0; buf[i] != 0; i++) { if (buf[i] == ' ') { - wc[0] = 0x81; - wc[0] = 0x40; + wc[0] = 0x81; // ' ' in SHIFT_JIS + wc[1] = 0x40; } else if (buf[i] == '-') { - wc[0] = 0x81; - wc[0] = 0x7c; + wc[0] = 0x81; // '-' in SHIFT_JIS + wc[1] = 0x7c; } else if (isdigit(buf[i])) { - wc[0] = 0x82; + wc[0] = 0x82; // number in SHIFT_JIS wc[1] = buf[i] - '0' + 0x4f; } else { continue;