add support for new file_utils convenience library
authorJosh Coalson <jcoalson@users.sourceforce.net>
Wed, 30 Oct 2002 06:24:01 +0000 (06:24 +0000)
committerJosh Coalson <jcoalson@users.sourceforce.net>
Wed, 30 Oct 2002 06:24:01 +0000 (06:24 +0000)
FLAC.dsw
Makefile.lite
configure.in
include/share/Makefile.am
src/flac/Makefile.lite
src/flac/Makefile.vc
src/flac/decode.c
src/metaflac/Makefile.lite
src/metaflac/Makefile.vc
src/share/Makefile.am
src/share/Makefile.vc

index 7eec19b3dcdf4049d6cf5ed46820813f6285579a..a3ce2930191f6b7bb376997d25539a97b9166566 100644 (file)
--- a/FLAC.dsw
+++ b/FLAC.dsw
@@ -27,6 +27,9 @@ Package=<4>
     Project_Dep_Name flac_ren\r
     End Project Dependency\r
     Begin Project Dependency\r
+    Project_Dep_Name file_utils\r
+    End Project Dependency\r
+    Begin Project Dependency\r
     Project_Dep_Name gain_analysis\r
     End Project Dependency\r
     Begin Project Dependency\r
@@ -74,6 +77,9 @@ Package=<5>
 \r
 Package=<4>\r
 {{{\r
+    Begin Project Dependency\r
+    Project_Dep_Name file_utils\r
+    End Project Dependency\r
     Begin Project Dependency\r
     Project_Dep_Name gain_analysis\r
     End Project Dependency\r
@@ -117,6 +123,18 @@ Package=<4>
 \r
 ###############################################################################\r
 \r
+Project: "file_utils"=.\src\share\file_utils\file_utils.dsp - Package Owner=<4>\r
+\r
+Package=<5>\r
+{{{\r
+}}}\r
+\r
+Package=<4>\r
+{{{\r
+}}}\r
+\r
+###############################################################################\r
+\r
 Project: "gain_analysis"=.\src\share\gain_analysis\gain_analysis.dsp - Package Owner=<4>\r
 \r
 Package=<5>\r
index 49868fb64d6f404e36f38b09052bcde29c000b43..372877b448362cbc3f5bbc5c15e2aa7394bbe222 100644 (file)
@@ -58,6 +58,7 @@ libOggFLAC++: libFLAC
        (cd src/$@ ; $(MAKE) -f Makefile.lite $(CONFIG))
 
 share:
+       (cd src/$@/file_utils ; $(MAKE) -f Makefile.lite $(CONFIG))
        (cd src/$@/gain_analysis ; $(MAKE) -f Makefile.lite $(CONFIG))
        (cd src/$@/getopt ; $(MAKE) -f Makefile.lite $(CONFIG))
        (cd src/$@/replaygain ; $(MAKE) -f Makefile.lite $(CONFIG))
@@ -99,6 +100,7 @@ clean:
        -(cd src/libFLAC++ ; $(MAKE) -f Makefile.lite clean)
        -(cd src/libOggFLAC ; $(MAKE) -f Makefile.lite clean)
        -(cd src/libOggFLAC++ ; $(MAKE) -f Makefile.lite clean)
+       -(cd src/share/file_utils ; $(MAKE) -f Makefile.lite clean)
        -(cd src/share/gain_analysis ; $(MAKE) -f Makefile.lite clean)
        -(cd src/share/getopt ; $(MAKE) -f Makefile.lite clean)
        -(cd src/share/replaygain ; $(MAKE) -f Makefile.lite clean)
index 72fb120284c1f6419be2452b398d5c2e833150ef..c3879b3e1159359ce46210705c045e81426bb004 100644 (file)
@@ -230,7 +230,7 @@ fi
 AM_PATH_XMMS(0.9.5.1, , AC_MSG_WARN([*** XMMS >= 0.9.5.1 not installed - xmms support will not be built]))
 AM_CONDITIONAL(FLaC__HAS_XMMS, test x$XMMS_INPUT_PLUGIN_DIR != x)
 
-SHARE_LIBS='$(top_builddir)/src/share/libreplaygain.a $(top_builddir)/src/share/libgain_analysis.a $(top_builddir)/src/share/libgetopt.a $(top_builddir)/src/share/libutf8.a'
+SHARE_LIBS='$(top_builddir)/src/share/libreplaygain.a $(top_builddir)/src/share/libgain_analysis.a $(top_builddir)/src/share/libgetopt.a $(top_builddir)/src/share/libutf8.a $(top_builddir)/src/share/libfile_utils.a'
 
 dnl check for i18n(internationalization); these are from libiconv/gettext
 AM_ICONV
@@ -382,6 +382,7 @@ AC_OUTPUT( \
        src/plugin_winamp3/Makefile \
        src/plugin_xmms/Makefile \
        src/share/Makefile \
+       src/share/file_utils/Makefile \
        src/share/gain_analysis/Makefile \
        src/share/getopt/Makefile \
        src/share/replaygain/Makefile \
index e01f08d5ab02ead701bcc428337e87528c6f56b3..6aafc08b0decf90c082ca629fa9f7d986180759c 100644 (file)
@@ -3,6 +3,7 @@
 AUTOMAKE_OPTIONS = foreign
 
 EXTRA_DIST = \
+       file_utils.h \
        gain_analysis.h \
        getopt.h \
        utf8.h
index 2246bed71ffc31dd87d17610c1fd276ddcc4e184..ca6410f59c6d6fae332ebc0ea62fac1baf31d629 100644 (file)
@@ -24,16 +24,16 @@ topdir = ../..
 PROGRAM_NAME = flac
 ifeq ($(DARWIN_BUILD),yes)
 INCLUDES     = -I./include -I$(topdir)/include
-LIBS         = -lreplaygain -lFLAC -lgain_analysis -lgetopt -lutf8 -lc -lm
+LIBS         = -lreplaygain -lFLAC -lgain_analysis -lgetopt -lutf8 -lfile_utils -lc -lm
 else
 #@@@ TODO: conditionalize ogg includes, defines, and -logg
 ifeq ($(SOLARIS_BUILD),yes)
 INCLUDES     = -I./include -I$(topdir)/include -I$(HOME)/local/include -DFLAC__HAS_OGG
-LIBS         = -lreplaygain -lOggFLAC -lFLAC -lgain_analysis -lgetopt -lutf8 -lm -L$(HOME)/local/lib -logg
+LIBS         = -lreplaygain -lOggFLAC -lFLAC -lgain_analysis -lgetopt -lutf8 -lfile_utils -lm -L$(HOME)/local/lib -logg
 else
 #@@@ TODO: conditionalize ogg includes, defines, and -logg
 INCLUDES     = -I./include -I$(topdir)/include -I$(HOME)/local/include -DFLAC__HAS_OGG
-LIBS         = -lreplaygain -lOggFLAC -lFLAC -lgain_analysis -lgetopt -lutf8 -lm -L$(HOME)/local/lib -logg
+LIBS         = -lreplaygain -lOggFLAC -lFLAC -lgain_analysis -lgetopt -lutf8 -lfile_utils -lm -L$(HOME)/local/lib -logg
 endif
 endif
 
@@ -41,7 +41,6 @@ OBJS = \
        analyze.o \
        decode.o \
        encode.o \
-       file.o \
        main.o \
        vorbiscomment.o
 
index 0e0ee0e20b19ef8359a07fb49a1b1b65142685e5..94f9cf5fba658ca2fc4a305ec00e4d5911c031c3 100644 (file)
@@ -31,7 +31,6 @@ C_FILES= \
        analyze.c \\r
        decode.c \\r
        encode.c \\r
-       file.c \\r
        main.c \\r
        vorbiscomment.c\r
 \r
@@ -40,7 +39,7 @@ OBJS= $(C_FILES:.c=.obj)
 all: flac.exe\r
 \r
 flac.exe: $(OBJS)\r
-       link.exe /libpath:"..\..\obj\lib" -out:../../obj/bin/$*.exe $(OBJS) replaygain.lib libOggFLAC.lib libFLAC.lib ogg_static.lib gain_analysis.lib getopt.lib utf8.lib\r
+       link.exe /libpath:"..\..\obj\lib" -out:../../obj/bin/$*.exe $(OBJS) replaygain.lib libOggFLAC.lib libFLAC.lib ogg_static.lib gain_analysis.lib getopt.lib utf8.lib file_utils.lib\r
 \r
 clean:\r
        -del *.obj *.pch\r
index 44bf3b1c0a19b435aee75f7e503b1b1d6e1f824d..d0afee29b0133197fde7d1e437c5e4571135bb13 100644 (file)
@@ -30,8 +30,8 @@
 #include <stdio.h> /* for FILE et al. */
 #include <string.h> /* for strcmp() */
 #include "FLAC/all.h"
+#include "share/file_utils.h"
 #include "decode.h"
-#include "file.h"
 
 #ifdef FLAC__HAS_OGG
 #include "OggFLAC/stream_decoder.h"
@@ -206,7 +206,7 @@ FLAC__bool DecoderSession_construct(DecoderSession *d, FLAC__bool is_ogg, FLAC__
        d->aopts = aopts;
        d->skip = skip;
 
-       d->inbasefilename = flac__file_get_basename(infilename);
+       d->inbasefilename = FLAC__file_utils_get_basename(infilename);
        d->outfilename = outfilename;
 
        d->samples_processed = 0;
@@ -229,7 +229,7 @@ FLAC__bool DecoderSession_construct(DecoderSession *d, FLAC__bool is_ogg, FLAC__
 
        if(!d->test_only) {
                if(0 == strcmp(outfilename, "-")) {
-                       d->fout = file__get_binary_stdout();
+                       d->fout = FLAC__file_utils_get_binary_stdout();
                }
                else {
                        if(0 == (d->fout = fopen(outfilename, "wb"))) {
@@ -243,7 +243,7 @@ FLAC__bool DecoderSession_construct(DecoderSession *d, FLAC__bool is_ogg, FLAC__
 #ifdef FLAC__HAS_OGG
        if(d->is_ogg) {
                if (0 == strcmp(infilename, "-")) {
-                       d->fin = file__get_binary_stdin();
+                       d->fin = FLAC__file_utils_get_binary_stdin();
                } else {
                        if (0 == (d->fin = fopen(infilename, "rb"))) {
                                fprintf(stderr, "%s: ERROR: can't open input file %s\n", d->inbasefilename, infilename);
index 280825ee1171cff87bcd63651ca6aea86965dd57..e40b09b931d18dcc2b06fe271d1f9038e58f1e66 100644 (file)
@@ -23,7 +23,7 @@ topdir = ../..
 
 PROGRAM_NAME = metaflac
 INCLUDES     = -I./include -I$(topdir)/include
-LIBS         = -lreplaygain -lFLAC -lgain_analysis -lgetopt -lutf8 -lm
+LIBS         = -lreplaygain -lFLAC -lgain_analysis -lgetopt -lutf8 -lfile_utils -lm
 
 OBJS = \
        main.o
index a1c744aa07e336bd13dcfd66bdb370cedfb9d453..938eaae1741ecbfa5b47697f030a3a3477866765 100644 (file)
@@ -33,7 +33,7 @@ OBJS= $(C_FILES:.c=.obj)
 all: metaflac.exe\r
 \r
 metaflac.exe: $(OBJS)\r
-       link.exe /libpath:"..\..\obj\lib" -out:../../obj/bin/$*.exe $(OBJS) replaygain.lib libFLAC.lib gain_analysis.lib getopt.lib utf8.lib\r
+       link.exe /libpath:"..\..\obj\lib" -out:../../obj/bin/$*.exe $(OBJS) replaygain.lib libFLAC.lib gain_analysis.lib getopt.lib utf8.lib file_utils.lib\r
 \r
 clean:\r
        -del *.obj *.pch\r
index 4d2089f083210f1d8c3d416fd8b5564c297e7433..4ee3a21d8fd3179bd60fc5e618a5c26ada43da22 100644 (file)
@@ -15,7 +15,7 @@
 #  along with this program; if not, write to the Free Software
 #  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
-SUBDIRS = gain_analysis getopt replaygain utf8
+SUBDIRS = file_utils gain_analysis getopt replaygain utf8
 
 EXTRA_DIST = \
        Makefile.vc \
index 882ca6651e16a0634b1c0e5425080a2a75d5de75..b85e0da5170786ae4f8cb97a5f1f958626a6e3b2 100644 (file)
@@ -3,6 +3,9 @@
 # It's less hassle to spell it all out that to figure out how to do it right with nmake:\r
 \r
 all:\r
+       cd file_utils\r
+       nmake /f Makefile.vc\r
+       cd ..\r
        cd gain_analysis\r
        nmake /f Makefile.vc\r
        cd ..\r
@@ -17,6 +20,9 @@ all:
        cd ..\r
 \r
 clean:\r
+       cd file_utils\r
+       nmake /f Makefile.vc clean\r
+       cd ..\r
        cd gain_analysis\r
        nmake /f Makefile.vc clean\r
        cd ..\r