From 83937d697931c2fda3d8e71af6b9e2f616914de5 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Wed, 17 Mar 2004 19:52:29 +0000 Subject: [PATCH] Removed the stuff from librmff that mkvtoolnix does not need. --- librmff/Makefile | 46 --------------------- librmff/config.h | 2 - librmff/os.h | 80 ------------------------------------- librmff/testrmff/Makefile | 32 --------------- librmff/testrmff/testrmff.c | 53 ------------------------ 5 files changed, 213 deletions(-) delete mode 100644 librmff/Makefile delete mode 100644 librmff/config.h delete mode 100644 librmff/os.h delete mode 100644 librmff/testrmff/Makefile delete mode 100644 librmff/testrmff/testrmff.c diff --git a/librmff/Makefile b/librmff/Makefile deleted file mode 100644 index 17af3d13b..000000000 --- a/librmff/Makefile +++ /dev/null @@ -1,46 +0,0 @@ -# User settings -CC = gcc -AR = ar -RANLIB = ranlib -INSTALL = install -CFLAGS = -Wall -Wshadow -g -INCLUDES = -I. - -# Used for 'make install'. Change/overwrite as needed. -prefix = /usr/local -libdir = $(prefix)/lib -includedir = $(prefix)/include - -# Don't change these settings -SOURCES = rmff.c mb_file_io.c -HEADERS = librmff.h mb_file_io.h -OBJECTS := $(patsubst %.c,%.o,$(SOURCES)) - -CFLAGS += -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 - -all: librmff.a - -clean: - rm -f $(OBJECTS) librmff.a - -%.o: %.c librmff.h - $(CC) -c -o $@ $(CFLAGS) $(INCLUDES) $< - -librmff.a: $(OBJECTS) - $(AR) rcvu $@ $? - $(RANLIB) $@ - -install: all - @if ! test -d $(includedir); then \ - echo $(INSTALL) -d $(includedir); \ - $(INSTALL) -d $(includedir); \ - fi - @for i in $(HEADERS); do \ - echo $(INSTALL) $$i $(includedir); \ - $(INSTALL) $$i $(includedir); \ - done - @if ! test -d $(libdir); then \ - echo $(INSTALL) -d $(libdir); \ - $(INSTALL) -d $(libdir); \ - fi - $(INSTALL) librmff.a $(libdir) diff --git a/librmff/config.h b/librmff/config.h deleted file mode 100644 index 4064380e1..000000000 --- a/librmff/config.h +++ /dev/null @@ -1,2 +0,0 @@ -/* big endian system */ -/* #undef WORDS_BIGENDIAN */ diff --git a/librmff/os.h b/librmff/os.h deleted file mode 100644 index 489aa138f..000000000 --- a/librmff/os.h +++ /dev/null @@ -1,80 +0,0 @@ -#ifndef __OS_H -#define __OS_H - -#include "config.h" - -#if defined(_WIN32) || defined(WIN32) || defined(__CYGWIN__) || defined(__MINGW32__) -# define SYS_WINDOWS -# if defined __MINGW32__ -# define COMP_MINGW -# elif defined __CYGWIN__ -# define COMP_CYGWIN -# else -# define COMP_MSC -# endif -#elif defined(__APPLE__) -# define SYS_APPLE -#else -# define COMP_GCC -# define SYS_UNIX -# if defined(__bsdi__) || defined(__FreeBSD__) -# define SYS_BSD -# else -# define SYS_LINUX -# endif -#endif - -#if defined(COMP_MSC) -# define PACKAGE "mkvtoolnix" -# define VERSION "0.8.6" - -# define strncasecmp _strnicmp -# define strcasecmp _stricmp -# define nice(a) -# define vsnprintf _vsnprintf -# define vfprintf _vfprintf -#endif // COMP_MSC - -#if defined(COMP_MINGW) || defined(COMP_MSC) - -// For DLL stuff... -# if defined(MTX_DLL) -# if defined(MTX_DLL_EXPORT) -# define MTX_DLL_API __declspec(dllexport) -# else // MTX_DLL_EXPORT -# define MTX_DLL_API __declspec(dllimport) -# endif -# else // MTX_DLL -# define MTX_DLL_API -# endif - -# define LLD "%I64d" -# define LLU "%I64u" - -#else // COMP_MINGW || COMP_MSC - -# define MTX_DLL_API -# define LLD "%lld" -# define LLU "%llu" -#endif // COMP_MINGW || COMP_MSC - -#if defined(HAVE_STDINT_H) -#include -#endif // HAVE_STDINT_H -#if defined(HAVE_INTTYPES_H) -#include -#endif // HAVE_INTTYPES_H - -#if defined(SYS_WINDOWS) -# define PATHSEP '\\' -#else -# define PATHSEP '/' -#endif - -#if defined(WORDS_BIGENDIAN) && (WORDS_BIGENDIAN == 1) -# define ARCH_BIGENDIAN -#else -# define ARCH_LITTLEENDIAN -#endif - -#endif diff --git a/librmff/testrmff/Makefile b/librmff/testrmff/Makefile deleted file mode 100644 index 4d69d5245..000000000 --- a/librmff/testrmff/Makefile +++ /dev/null @@ -1,32 +0,0 @@ -# User settings -CC = gcc -AR = ar -RANLIB = ranlib -INSTALL = install -CFLAGS = -Wall -Wshadow -g -INCLUDES = -I.. -LDFLAGS = -L.. - -# Used for 'make install'. Change/overwrite as needed. -prefix = /usr/local -libdir = $(prefix)/lib -includedir = $(prefix)/include - -# Don't change these settings -SOURCES = testrmff.c -OBJECTS := $(patsubst %.c,%.o,$(SOURCES)) - -CFLAGS += -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 - -all: - make -C .. all - make testrmff - -clean: - rm -f $(OBJECTS) testrmff - -%.o: %.c ../librmff.h - $(CC) -c -o $@ $(CFLAGS) $(INCLUDES) $< - -testrmff: $(OBJECTS) ../librmff.a - $(CC) -o $@ $(LDFLAGS) $(OBJECTS) -lrmff diff --git a/librmff/testrmff/testrmff.c b/librmff/testrmff/testrmff.c deleted file mode 100644 index 834777681..000000000 --- a/librmff/testrmff/testrmff.c +++ /dev/null @@ -1,53 +0,0 @@ -#include -#include - -#include "librmff.h" - -char buffer[128000]; - -void -test_reading(const char *file_name) { - rmff_file_t *file; - rmff_frame_t *frame; - int frame_no; - - file = rmff_open_file(file_name, MB_OPEN_MODE_READING); - if (file == NULL) { - printf("Could not open %s\n", file_name); - return; - } - printf("Opened %s, reading headers... ", file_name); - if (rmff_read_headers(file) != RMFF_ERR_OK) { - printf("failed. Error code: %d, error message: %s\n", - rmff_last_error, rmff_last_error_msg); - return; - } - printf("done.\nNumber of tracks: %u, number of packets: %u\nNow reading " - "all frames.\n", file->num_tracks, file->num_packets_in_chunk); - frame_no = 0; - do { - printf("frame %d expected size: %d", frame_no, - rmff_get_next_frame_size(file)); - if ((frame = rmff_read_next_frame(file, buffer)) != NULL) { - printf(", read ok with size %d", frame->size); - rmff_release_frame(frame); - } - printf("\n"); - frame_no++; - } while (frame != NULL); - rmff_close_file(file); -} - -int -main(int argc, - char *argv[]) { - int i; - - if (argc < 2) - test_reading("readtestvideo.rm"); - else - for (i = 1; i < argc; i++) - test_reading(argv[i]); - - return 0; -}