Commit 08e11bdc authored by Joey Hess's avatar Joey Hess Committed by Sandro Tosi

Imported Debian patch 0.7.3-4.1

parent 624f76d1
# use this on big-endian machines (like m68k, PowerPC, MIPS and Sparc)
prefix = ${DESTDIR}@prefix@
exec_prefix = @exec_prefix@
CXXFLAGS = @CXXFLAGS@
# use correct linker in implicit rule (c++ or g++)
CC=@CXX@
CXX=@CXX@
INSTALLPROG = @INSTALL@
# Edited for Debian GNU/Linux by Klaus Kettner (kk@debian.org)
BIN = @bindir@
DATADIR = @datadir@
MANDIR = @mandir@
TARGET = mp3check
OBJECTS = crc16.o id3tag.o mp3check.o tappconfig.o tstring.o tfiletools.o
${TARGET} : ${OBJECTS}
clean :
rm -f ${OBJECTS} ${TARGET} ${TARGET}.exe core *~
distclean: clean
rm -f config.cache config.log config.status config.h Makefile
# debian install target
install : mp3check
${INSTALLPROG} -d $(BIN)
${INSTALLPROG} ./mp3check $(BIN)
install-docs:
${INSTALLPROG} -d ${DATADIR}/doc/mp3check
${INSTALLPROG} -m 644 -p FAQ TODO THANKS CHANGES-Khali HISTORY $(DESTDIR)/doc/mp3check
${INSTALL_PROG} -d ${MANDIR}/man1
${INSTALL_PROG} -m 644 -p mp3check.1 ${MANDIR}/man1
# red hat package target
spec:
sed -e "s/^\(Version:\).*/\1 $(VER)/" $(TARGET).spec > $(TARGET).spec.new || true
mv -f $(TARGET).spec.new $(TARGET).spec || true
/* config.h.in. Generated from configure.ac by autoheader. */
/* Define to 1 if you have the `asprintf' function. */
#undef HAVE_ASPRINTF
/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
*/
#undef HAVE_DIRENT_H
/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
#undef HAVE_DOPRNT
/* Define to 1 if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H
/* Define to 1 if you have the <float.h> header file. */
#undef HAVE_FLOAT_H
/* Define to 1 if you have the `ftruncate' function. */
#undef HAVE_FTRUNCATE
/* Define to 1 if you have the `getpagesize' function. */
#undef HAVE_GETPAGESIZE
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Define to 1 if you have the <limits.h> header file. */
#undef HAVE_LIMITS_H
/* Define to 1 if `lstat' has the bug that it succeeds when given the
zero-length file name argument. */
#undef HAVE_LSTAT_EMPTY_STRING_BUG
/* Define to 1 if you have the `memmove' function. */
#undef HAVE_MEMMOVE
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define to 1 if you have the `memset' function. */
#undef HAVE_MEMSET
/* Define to 1 if you have a working `mmap' system call. */
#undef HAVE_MMAP
/* Define to 1 if you have the `munmap' function. */
#undef HAVE_MUNMAP
/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
#undef HAVE_NDIR_H
/* Define to 1 if `stat' has the bug that it succeeds when given the
zero-length file name argument. */
#undef HAVE_STAT_EMPTY_STRING_BUG
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/* Define to 1 if you have the `strchr' function. */
#undef HAVE_STRCHR
/* Define to 1 if you have the `strdup' function. */
#undef HAVE_STRDUP
/* Define to 1 if you have the `strerror' function. */
#undef HAVE_STRERROR
/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define to 1 if you have the `strrchr' function. */
#undef HAVE_STRRCHR
/* Define to 1 if you have the `strtol' function. */
#undef HAVE_STRTOL
/* Define to 1 if you have the `strtoul' function. */
#undef HAVE_STRTOUL
/* Define to 1 if `st_rdev' is member of `struct stat'. */
#undef HAVE_STRUCT_STAT_ST_RDEV
/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
*/
#undef HAVE_SYS_DIR_H
/* Define to 1 if you have the <sys/ioctl.h> header file. */
#undef HAVE_SYS_IOCTL_H
/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
*/
#undef HAVE_SYS_NDIR_H
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
/* Define to 1 if you have the <termios.h> header file. */
#undef HAVE_TERMIOS_H
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Define to 1 if you have the `vprintf' function. */
#undef HAVE_VPRINTF
/* Define to 1 if `lstat' dereferences a symlink specified with a trailing
slash. */
#undef LSTAT_FOLLOWS_SLASHED_SYMLINK
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
/* Define to the full name of this package. */
#undef PACKAGE_NAME
/* Define to the full name and version of this package. */
#undef PACKAGE_STRING
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the version of this package. */
#undef PACKAGE_VERSION
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Define to 1 if your processor stores words with the most significant byte
first (like Motorola and SPARC, unlike Intel and VAX). */
#undef WORDS_BIGENDIAN
/* Define to empty if `const' does not conform to ANSI C. */
#undef const
/* Define to `int' if <sys/types.h> doesn't define. */
#undef gid_t
/* Define as `__inline' if that's what the C compiler calls it, or to nothing
if it is not supported. */
#undef inline
/* Define to `int' if <sys/types.h> does not define. */
#undef mode_t
/* Define to `long' if <sys/types.h> does not define. */
#undef off_t
/* Define to `unsigned' if <sys/types.h> does not define. */
#undef size_t
/* Define to `int' if <sys/types.h> doesn't define. */
#undef uid_t
# Process this file with autoconf to produce a configure script.
AC_INIT(mp3check, 0.7.3, overmann@iname.com)
AC_CONFIG_SRCDIR([crc16.cc])
AC_CONFIG_HEADER([config.h])
# Checks for programs.
AC_PROG_CXX
AC_PROG_CC
AC_PROG_INSTALL
# Checks for libraries.
# Checks for header files.
AC_HEADER_DIRENT
AC_HEADER_STDC
AC_CHECK_HEADERS([fcntl.h float.h limits.h stdlib.h string.h sys/ioctl.h termios.h unistd.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_UID_T
AC_C_INLINE
AC_C_BIGENDIAN
AC_TYPE_MODE_T
AC_TYPE_OFF_T
AC_TYPE_SIZE_T
AC_CHECK_MEMBERS([struct stat.st_rdev])
# Checks for library functions.
AC_FUNC_ERROR_AT_LINE
AC_PROG_GCC_TRADITIONAL
AC_FUNC_LSTAT
AC_FUNC_MEMCMP
AC_FUNC_MMAP
AC_FUNC_STAT
AC_FUNC_STRTOD
AC_FUNC_VPRINTF
AC_CHECK_FUNCS([asprintf ftruncate memmove memset munmap strchr strdup strerror strrchr strtol strtoul])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
mp3check (0.7.3-4.1) unstable; urgency=high
* Put the binary back in. Closes: #143862 (NMU; patch in bug report)
* s/dh_installmanpages/dh_installman/; so it installs the man page instead
of skipping it.
-- Joey Hess <joeyh@debian.org> Sat, 27 Apr 2002 11:57:07 -0400
mp3check (0.7.3-4) unstable; urgency=low
* Fix Makefile.in to define CXX and CC.
* mp3check.cc: use namespace std and include <iostream>. (Closes: #143252)
-- James Morrison <phython@debian.org> Wed, 17 Apr 2002 09:51:24 -0400
mp3check (0.7.3-3) unstable; urgency=low
* Include autoconf in the build dependencies. (Closes: #143090)
-- James Morrison <phython@debian.org> Tue, 16 Apr 2002 00:11:41 -0400
mp3check (0.7.3-2) unstable; urgency=low
* Run autoconf before the configure script. (Closes: #142931)
-- James Morrison <phython@debian.org> Mon, 15 Apr 2002 11:42:58 -0400
mp3check (0.7.3-1) unstable; urgency=low
* New upstream version. (Closes: #140676).
* New maintainer (Closes: #142840)
* Use asprintf instead of vasprintf for exception handling. (Closes: #104982)
* Updated upstream download site.
-- James Morrison <phython@debian.org> Sun, 14 Apr 2002 09:41:33 -0400
mp3check (0.5.2-1) unstable; urgency=low
* Initial Release.
* Adjusted Makefile to fix $(DESTDIR) problems.
-- Klaus Kettner <kk@debian.org> Sat, 2 Sep 2000 22:26:01 +0200
Local variables:
mode: debian-changelog
End:
Source: mp3check
Section: sound
Priority: optional
Maintainer: James Morrison <phython@debian.org>
Build-Depends: debhelper (>= 3.0), autoconf
Standards-Version: 3.5.6.1
Package: mp3check
Architecture: any
Depends: ${shlibs:Depends}
Suggests: mpg321
Description: Check mp3 files for consistency
Check mp3 files for consistency and print several errors and warnings. List
stream attributes (color). Layer 1,2,3, mpeg1.0+2.0 are currently supported.
CRC check for layer 3.
.
mp3check is very useful for incomplete mp3 detection as it can be used to scan
through your mp3 collection and find all mp3s that aren't perfect. Good for use
with Napster and other bulk downloading of mp3s.
This package was debianized by Klaus Kettner <kk@debian.org> on
Sat, 2 Sep 2000 22:26:01 +0200.
It was downloaded from http://www.0vermann.de/soft/mp3check/mp3check.html
Upstream Author(s): Johannes Overmann
Copyright:
You are free to distribute this software under the terms of the GNU
General Public Licence. On Debian GNU/Linux systems, the complete text
of the GNU General Public Licence can be found in the /usr/share/common-
licences/GPL file.
usr/bin
usr/share/man/man1
THANKS
TODO
FAQ
CHANGES-Khali
HISTORY
webpage/mp3check.html
webpage/mp3check.jpg
webpage/mp3check2.jpg
#!/usr/bin/make -f
# Sample debian/rules that uses debhelper.
# GNU copyright 1997 to 1999 by Joey Hess.
# Uncomment this to turn on verbose mode.
export DH_VERBOSE=1
# This is the debhelper compatability version to use.
export DH_COMPAT=3
configure: configure-stamp
configure-stamp:
dh_testdir
autoconf
touch install-sh # ensure this file exists.
# Add here commands to configure the package.
./configure --prefix=/usr --mandir=\$${prefix}/share/man
touch configure-stamp
build: configure-stamp build-stamp
build-stamp:
dh_testdir
# Add here commands to compile the package.
$(MAKE)
touch build-stamp
clean:
dh_testdir
dh_testroot
rm -f build-stamp configure-stamp
# Add here commands to clean up after the build process.
-$(MAKE) distclean
rm -rf configure autom4te.cache
dh_clean
install: build
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
# Add here commands to install the package into debian/tmp.
$(MAKE) install DESTDIR=`pwd`/debian/mp3check
# Build architecture-independent files here.
binary-indep: build install
# We have nothing to do by default.
# Build architecture-dependent files here.
binary-arch: build install
dh_testdir
dh_testroot
dh_installdocs
dh_installexamples
dh_installmenu
dh_installcron
dh_installman mp3check.1
dh_installinfo
dh_installchangelogs
dh_link
dh_strip
dh_compress
dh_fixperms
# You may want to make some executables suid here.
# dh_makeshlibs
dh_installdeb
# dh_perl
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install configure
......@@ -19,6 +19,10 @@
* *GPL*END*/
/* C++ standard definitions */
using namespace std;
#include <iostream>
#include <sys/stat.h>
#include <sys/mman.h>
#include <fcntl.h>
......@@ -29,6 +33,7 @@
#include "crc16.h"
#include "id3tag.h"
#include "tfiletools.h"
#include "config.h"
// defines:
......@@ -225,7 +230,7 @@ int samp_2_tab[4]={22050, 24000, 16000, 50000};
const unsigned int CONST_MASK = 0xffffffff;
struct Header {
#ifdef BIGENDIAN
#ifdef WORDS_BIGENDIAN
unsigned int
syncword: 12, // fix must 0xfff
ID: 1, // fix 1==mpeg1.0 0==mpeg2.0
......@@ -367,7 +372,7 @@ struct Header {
inline Header get_header(const unsigned char *p) {
Header h;
unsigned char *q = (unsigned char *)&h;
#ifdef BIGENDIAN
#ifdef WORDS_BIGENDIAN
q[0]=p[0];
q[1]=p[1];
q[2]=p[2];
......@@ -385,7 +390,7 @@ inline Header get_header(const unsigned char *p) {
// set header to pointer
inline void set_header(unsigned char *p, Header h) {
unsigned char *q = (unsigned char *)&h;
#ifdef BIGENDIAN
#ifdef WORDS_BIGENDIAN
p[0]=q[0];
p[1]=q[1];
p[2]=q[2];
......@@ -530,6 +535,7 @@ bool error_check(const char *name, const unsigned char *stream, int len, CRC16&
if(start<0) {
if(!ign_noamp) {
fmes(name, "%s%s%s\n", cerror, (len?"not an audio mpeg stream":"empty file"), cnor);
cout << "fucking1 start < 0" << endl;
errors++;
}
} else {
......@@ -838,6 +844,7 @@ bool anomaly_check(const char *name, const unsigned char *p, int len, bool err_c
} else {
if((!err_check)&&(!ign_noamp)) {
fmes(name, "%s%s%s\n", cerror, (len?"not an audio mpeg stream":"empty file"), cnor);
cout << "fucking errcheck = 0" << endl;
++err;
}
}
......@@ -859,6 +866,7 @@ bool cut_junk_end(const char *name, const unsigned char *p, int len, const unsig
if(start<0) {
if(!ign_noamp) {
fmes(name, "%s%s%s\n", cerror, (len?"not an audio mpeg stream":"empty file"), cnor);
cout << "fucking2(cut_end_junk) start < 0" << endl;
err++;
}
return false;
......@@ -990,6 +998,7 @@ bool cut_tag_end(const char *name, const unsigned char *p, int len, int fd, int&
if(start<0) {
if(!ign_noamp) {
fmes(name, "%s%s%s\n", cerror, (len?"not an audio mpeg stream":"empty file"), cnor);
cout << "fucking3(cut_tag_end) start < 0" << endl;
err++;
}
return false;
......@@ -1260,7 +1269,7 @@ int main(int argc, char *argv[]) {
if(ac("list")||ac("compact-list")||ac("raw-list")) {
// speed up list of very large files (like *.wav)
int maxl = 128*1024; // search max 128k
int start = find_next_header(p, len<=maxl?len:maxl, min_valid);
int start = find_next_header(p, len<maxl?len:maxl, min_valid);
if(start<0) {
if(!ign_noamp) {
if(ac("raw-list")) {
......@@ -1269,6 +1278,7 @@ int main(int argc, char *argv[]) {
printf("%s%-25s%s%s %s%s%s\n", cerror, (len?"not an audio mpeg stream":"empty file"), cnor, (columns>=82?" ":""), cfil, name, cnor);
} else {
fmes(name, "%s%s%s\n", cerror, (len?"not an audio mpeg stream":"empty file"), cnor);
cout << "fucking4(main) start < 0" << endl;
}
err++;
}
......@@ -1356,6 +1366,7 @@ int main(int argc, char *argv[]) {
int start = find_next_header(p, len, min_valid);
if(start<0) {
fmes(name, "%s%s%s\n", cerror, (len?"not an audio mpeg stream":"empty file"), cnor);
cout << "fucking5(ac-cut-junk-start) start < 0" << endl;
err++;
} else if(start==0) {
fmes(name, "%scut-junk-start: no junk found%s\n", cok, cnor);
......
......@@ -38,10 +38,10 @@ extern "C" {
#define TExceptionN(n) public: virtual const char *name() const { return #n; }
#define TExceptionM(m) public: virtual const char *message() const { return m; }
#define TExceptionM1(m,a) public: virtual const char *message() const { char *buf; vasprintf(&buf, m, a); return buf; }
#define TExceptionM2(m,a,b) public: virtual const char *message() const { char *buf; vasprintf(&buf, m, a,b); return buf; }
#define TExceptionM3(m,a,b,c) public: virtual const char *message() const { char *buf; vasprintf(&buf, m, a,b,c); return buf; }
#define TExceptionM4(m,a,b,c,d) public: virtual const char *message() const { char *buf; vasprintf(&buf, m, a,b,c,d); return buf; }
#define TExceptionM1(m,a) public: virtual const char *message() const { char *buf; asprintf(&buf, m, a); return buf; }
#define TExceptionM2(m,a,b) public: virtual const char *message() const { char *buf; asprintf(&buf, m, a,b); return buf; }
#define TExceptionM3(m,a,b,c) public: virtual const char *message() const { char *buf; asprintf(&buf, m, a,b,c); return buf; }
#define TExceptionM4(m,a,b,c,d) public: virtual const char *message() const { char *buf; asprintf(&buf, m, a,b,c,d); return buf; }
// base class of all exceptions
class TException {
......@@ -49,7 +49,7 @@ class TException {
virtual ~TException() {}
TExceptionM("(no message available)");
#ifndef __USE_GNU
static void vasprintf(char **strp, const char *format, ...) {
static void asprintf(char **strp, const char *format, ...) {
va_list ap;
va_start(ap, format);
*strp = new char[1024];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment