shithub: dumb

Download patch

ref: 991ce8202643a296969d9a623e9702966a957e69
parent: bfb8fea251124760b834c36e5eabd2aff24494b4
author: Chris Moeller <kode54@gmail.com>
date: Sat Jun 22 11:16:04 EDT 2013

Moved DUMBFILE structure to its own header file to unify the rare cases where it needs to be visible outside of dumbfile.c

--- /dev/null
+++ b/dumb/include/internal/dumbfile.h
@@ -1,0 +1,13 @@
+#ifndef DUMBFILE_H
+#define DUMBFILE_H
+
+#include "../dumb.h"
+
+struct DUMBFILE
+{
+    const DUMBFILE_SYSTEM *dfs;
+    void *file;
+    long pos;
+};
+
+#endif // DUMBFILE_H
--- a/dumb/prj/dumb/dumb.pro
+++ b/dumb/prj/dumb/dumb.pro
@@ -115,7 +115,8 @@
     ../../include/internal/aldumb.h \
     ../../include/internal/lanczos_resampler.h \
     ../../include/internal/stack_alloc.h \
-    ../../include/internal/lpc.h
+    ../../include/internal/lpc.h \
+    ../../include/internal/dumbfile.h
 unix:!symbian {
     maemo5 {
         target.path = /opt/usr/lib
--- a/dumb/src/core/dumbfile.c
+++ b/dumb/src/core/dumbfile.c
@@ -40,12 +40,7 @@
 
 
 
-struct DUMBFILE
-{
-	const DUMBFILE_SYSTEM *dfs;
-	void *file;
-	long pos;
-};
+#include "internal/dumbfile.h"
 
 
 
--- a/dumb/src/it/readxm.c
+++ b/dumb/src/it/readxm.c
@@ -23,6 +23,7 @@
 
 #include "dumb.h"
 #include "internal/it.h"
+#include "internal/dumbfile.h"
 
 
 
@@ -364,14 +365,6 @@
 	unsigned char *buffered;
 	long ptr, limit, allocated;
 	DUMBFILE *remaining;
-};
-
-/* XXX */
-struct DUMBFILE
-{
-	DUMBFILE_SYSTEM *dfs;
-	void *file;
-	long pos;
 };
 
 static int limit_xm_resize(void *f, long n)
--- a/dumb/vc6/dumb/dumb.vcproj
+++ b/dumb/vc6/dumb/dumb.vcproj
@@ -1976,6 +1976,10 @@
 					>
 				</File>
 				<File
+					RelativePath="..\..\include\internal\dumbfile.h"
+					>
+				</File>
+				<File
 					RelativePath="..\..\include\internal\it.h"
 					>
 				</File>
--- a/dumb/vc6/dumb/dumb.vcxproj
+++ b/dumb/vc6/dumb/dumb.vcxproj
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <ItemGroup Label="ProjectConfigurations">
     <ProjectConfiguration Include="Debug|Win32">
@@ -206,6 +206,7 @@
     <ClInclude Include="..\..\include\internal\barray.h" />
     <ClInclude Include="..\..\include\internal\blip_buf.h" />
     <ClInclude Include="..\..\include\internal\dumb.h" />
+    <ClInclude Include="..\..\include\internal\dumbfile.h" />
     <ClInclude Include="..\..\include\internal\fir_resampler.h" />
     <ClInclude Include="..\..\include\internal\it.h" />
     <ClInclude Include="..\..\include\internal\lanczos_resampler.h" />
--- a/dumb/vc6/dumb/dumb.vcxproj.filters
+++ b/dumb/vc6/dumb/dumb.vcxproj.filters
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <ItemGroup>
     <Filter Include="include">
@@ -297,6 +297,9 @@
       <Filter>include\internal</Filter>
     </ClInclude>
     <ClInclude Include="..\..\include\internal\dumb.h">
+      <Filter>include\internal</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\include\internal\dumbfile.h">
       <Filter>include\internal</Filter>
     </ClInclude>
     <ClInclude Include="..\..\include\internal\fir_resampler.h">