[MPlayer-cvslog] r25468 - in trunk: Copyright Makefile configure unrar_exec.h unrarlib.c unrarlib.h vobsub.c

diego subversion at mplayerhq.hu
Thu Dec 20 11:10:26 CET 2007


Author: diego
Date: Thu Dec 20 11:10:26 2007
New Revision: 25468

Log:
Remove internal unrarlib copy, the new unrarexec code is a strict superset.


Removed:
   trunk/unrarlib.c
   trunk/unrarlib.h
Modified:
   trunk/Copyright
   trunk/Makefile
   trunk/configure
   trunk/unrar_exec.h
   trunk/vobsub.c

Modified: trunk/Copyright
==============================================================================
--- trunk/Copyright	(original)
+++ trunk/Copyright	Thu Dec 20 11:10:26 2007
@@ -136,14 +136,6 @@ Directory:  libmpdemux/genres.h
 Copyright:  2001 Jason Carter
 License:    GNU General Public License
 
-Name:       unrarlib
-Version:    0.4.0 + patches
-Homepage:   http://www.unrarlib.org/
-Directory:  unrarlib.[ch]
-Copyright:  2000-2002 Christian Scheurer (www.ChristianScheurer.ch)
-            2000-2002 by Johannes Winkelmann (jw at tks6.net)
-License:    GNU General Public License / UniquE RAR File Library License
-
 Name:       FreeSDP
 Version:    0.4.1
 Homepage:   https://savannah.nongnu.org/projects/freesdp/

Modified: trunk/Makefile
==============================================================================
--- trunk/Makefile	(original)
+++ trunk/Makefile	Thu Dec 20 11:10:26 2007
@@ -34,7 +34,6 @@ SRCS_COMMON = asxparser.c \
               subreader.c \
               vobsub.c \
 
-SRCS_COMMON-$(UNRARLIB) += unrarlib.c
 SRCS_COMMON-$(UNRAR_EXEC) += unrar_exec.c
 
 SRCS_MPLAYER = mplayer.c \

Modified: trunk/configure
==============================================================================
--- trunk/configure	(original)
+++ trunk/configure	Thu Dec 20 11:10:26 2007
@@ -255,7 +255,6 @@ Optional features:
   --disable-bitmap-font  disable bitmap font support [enable]
   --disable-freetype     disable FreeType 2 font rendering [autodetect]
   --disable-fontconfig   disable fontconfig font lookup [autodetect]
-  --disable-unrarlib     disable Unique RAR File Library [enabled]
   --disable-unrarexec    disable using of UnRAR executable [enabled]
   --enable-menu          enable OSD menu (not DVD menu) [disabled]
   --disable-sortsub      disable subtitle sorting [enabled]
@@ -592,7 +591,6 @@ _sgiaudio=auto
 _sunaudio=auto
 _alsa=auto
 _fastmemcpy=yes
-_unrarlib=yes
 _unrar_exec=auto
 _win32dll=auto
 _select=yes
@@ -1097,8 +1095,6 @@ for ac_option do
   --disable-freetype)   _freetype=no    ;;
   --enable-fontconfig)  _fontconfig=yes ;;
   --disable-fontconfig) _fontconfig=no  ;;
-  --enable-unrarlib)	_unrarlib=yes	;;
-  --disable-unrarlib)	_unrarlib=no	;;
   --enable-unrarexec)   _unrar_exec=yes ;;
   --disable-unrarexec)  _unrar_exec=no  ;;
   --enable-ftp)         _ftp=yes        ;;
@@ -6711,13 +6707,6 @@ else
 fi
 echores "$_fastmemcpy"
 
-echocheck "UniquE RAR File Library"
-if test "$_unrarlib" = yes ; then
-    _def_unrarlib='#define USE_UNRARLIB 1'
-else
-    _def_unrarlib='#undef USE_UNRARLIB'
-fi
-echores "$_unrarlib"
 
 echocheck "UnRAR executable"
 if test "$_unrar_exec" = auto ; then
@@ -7626,7 +7615,6 @@ FAAD = $_faad
 SPEEX = $_speex
 MUSEPACK = $_musepack
 
-UNRARLIB = $_unrarlib
 UNRAR_EXEC = $_unrar_exec
 PNG = $_png
 JPEG = $_jpeg
@@ -8179,9 +8167,6 @@ $_def_nemesi
 /* Use 3dnow/mmxext/sse/mmx optimized fast memcpy() [maybe buggy... signal 4]*/
 $_def_fastmemcpy
 
-/* Use unrarlib for Vobsubs */
-$_def_unrarlib
-
 /* Use UnRAR executable for Vobsubs */
 $_def_unrar_exec
 

Modified: trunk/unrar_exec.h
==============================================================================
--- trunk/unrar_exec.h	(original)
+++ trunk/unrar_exec.h	Thu Dec 20 11:10:26 2007
@@ -24,7 +24,23 @@
 #ifndef UNRAR_EXEC_H
 #define UNRAR_EXEC_H
 
-#include "unrarlib.h"
+struct RAR_archive_entry
+{
+  char           *Name;
+  unsigned long  PackSize;
+  unsigned long  UnpSize;
+  unsigned long  FileCRC;
+  unsigned long  FileTime;
+  unsigned char  UnpVer;
+  unsigned char  Method;
+  unsigned long  FileAttr;
+};
+
+typedef struct  archivelist
+{
+  struct RAR_archive_entry item;
+  struct archivelist         *next;
+} ArchiveList_struct;
 
 extern char* unrar_executable;
 

Modified: trunk/vobsub.c
==============================================================================
--- trunk/vobsub.c	(original)
+++ trunk/vobsub.c	Thu Dec 20 11:10:26 2007
@@ -22,8 +22,6 @@
 #include "mp_msg.h"
 #ifdef USE_UNRAR_EXEC
 #include "unrar_exec.h"
-#elif defined(USE_UNRARLIB)
-#include "unrarlib.h"
 #endif
 #include "libavutil/common.h"
 
@@ -35,9 +33,8 @@ static int vobsubid = -2;
 /**********************************************************************
  * RAR stream handling
  * The RAR file must have the same basename as the file to open
- * See <URL:http://www.unrarlib.org/>
  **********************************************************************/
-#if defined(USE_UNRARLIB) || defined(USE_UNRAR_EXEC)
+#ifdef USE_UNRAR_EXEC
 typedef struct {
     FILE *file;
     unsigned char *data;
@@ -90,27 +87,15 @@ rar_open(const char *const filename, con
 	} else {
 		p++;
 	}
-#ifdef USE_UNRAR_EXEC
 	rc = unrar_exec_get(&stream->data, &stream->size, p, rar_filename);
-#endif
-#ifdef USE_UNRARLIB
-	if (!rc)
-	rc = urarlib_get(&stream->data, &stream->size, (char*) p, rar_filename, "");
-#endif
 	if (!rc) {
 	    /* There is no matching filename in the archive. However, sometimes
 	     * the files we are looking for have been given arbitrary names in the archive.
 	     * Let's look for a file with an exact match in the extension only. */
 	    int i, num_files = -1, name_len;
 	    ArchiveList_struct *list, *lp;
-#ifdef USE_UNRARLIB
-	    /* the cast in the next line is a hack to overcome a design flaw (IMHO) in unrarlib */
-	    num_files = urarlib_list (rar_filename, (ArchiveList_struct *)&list);
-#endif
-#ifdef USE_UNRAR_EXEC
 	    if (num_files <= 0)
 	    num_files = unrar_exec_list(rar_filename, &list);
-#endif
 	    if (num_files > 0) {
 		char *demanded_ext;
 		demanded_ext = strrchr (p, '.');
@@ -119,24 +104,13 @@ rar_open(const char *const filename, con
 	    	    for (i=0, lp=list; i<num_files; i++, lp=lp->next) {
 			name_len = strlen (lp->item.Name);
 			if (name_len >= demanded_ext_len && !strcasecmp (lp->item.Name + name_len - demanded_ext_len, demanded_ext)) {
-#ifdef USE_UNRAR_EXEC
 	                    rc = unrar_exec_get(&stream->data, &stream->size,
                                                 lp->item.Name, rar_filename);
 		            if (rc) break;
-#endif
-#ifdef USE_UNRARLIB
-		            rc = urarlib_get(&stream->data, &stream->size,
-                                             lp->item.Name, rar_filename, "");
-		            if (rc) break;
-#endif
 			}
 		    }
 		}
-#ifdef USE_UNRARLIB
-	    	urarlib_freelist (list);
-#else
 	    	unrar_exec_freelist(list);
-#endif
 	    }
 	    if (!rc) {
 		free(rar_filename);



More information about the MPlayer-cvslog mailing list