remove unused stack_alloc.h

- see xiph's projects if needed again
This commit is contained in:
bnnm 2023-01-17 18:11:11 +01:00
parent 495958af42
commit 16ecf5552c
6 changed files with 4 additions and 122 deletions

View File

@ -16,7 +16,6 @@ ifeq ($(TARGET_OS),Windows_NT)
OUTPUT_CLI = vgmstream-cli.exe OUTPUT_CLI = vgmstream-cli.exe
OUTPUT_123 = vgmstream123.exe OUTPUT_123 = vgmstream123.exe
# -DUSE_ALLOCA
CFLAGS += -DWIN32 -I../ext_includes -I../ext_libs/Getopt CFLAGS += -DWIN32 -I../ext_includes -I../ext_libs/Getopt
LDFLAGS += -L../ext_libs/$(DLL_DIR) LDFLAGS += -L../ext_libs/$(DLL_DIR)

View File

@ -11,9 +11,6 @@ set(EXT_HEADERS
file(GLOB MAIN_HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/*.h") file(GLOB MAIN_HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/*.h")
file(GLOB MAIN_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.c") file(GLOB MAIN_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.c")
# stack_allow.h is not being used, so no need to include it in the sources
list(REMOVE_ITEM MAIN_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/stack_alloc.h)
# Setup source groups, mainly for Visual Studio # Setup source groups, mainly for Visual Studio
source_group("Header Files\\coding" FILES ${CODING_HEADERS}) source_group("Header Files\\coding" FILES ${CODING_HEADERS})
source_group("Header Files\\layout" FILES ${LAYOUT_HEADERS}) source_group("Header Files\\layout" FILES ${LAYOUT_HEADERS})

View File

@ -50,7 +50,7 @@
<ClCompile> <ClCompile>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>../ext_includes;../ext_includes/ffmpeg;$(DependenciesDir)/qaac/mp4v2/include;$(DependenciesDir)/fdk-aac/libSYS/include;$(DependenciesDir)/fdk-aac/libAACdec/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>../ext_includes;../ext_includes/ffmpeg;$(DependenciesDir)/qaac/mp4v2/include;$(DependenciesDir)/fdk-aac/libSYS/include;$(DependenciesDir)/fdk-aac/libAACdec/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;VGMSTREAM_VERSION_AUTO;VGM_LOG_OUTPUT;VGM_USE_VORBIS;VGM_USE_MPEG;VGM_USE_FFMPEG;VGM_USE_G7221;VGM_USE_G719;VGM_USE_ATRAC9;VGM_USE_CELT;VGM_USE_SPEEX;USE_ALLOCA;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;VGMSTREAM_VERSION_AUTO;VGM_LOG_OUTPUT;VGM_USE_VORBIS;VGM_USE_MPEG;VGM_USE_FFMPEG;VGM_USE_G7221;VGM_USE_G719;VGM_USE_ATRAC9;VGM_USE_CELT;VGM_USE_SPEEX;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader> <PrecompiledHeader>
@ -63,7 +63,7 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile> <ClCompile>
<AdditionalIncludeDirectories>../ext_includes;../ext_includes/ffmpeg;$(DependenciesDir)/qaac/mp4v2/include;$(DependenciesDir)/fdk-aac/libSYS/include;$(DependenciesDir)/fdk-aac/libAACdec/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>../ext_includes;../ext_includes/ffmpeg;$(DependenciesDir)/qaac/mp4v2/include;$(DependenciesDir)/fdk-aac/libSYS/include;$(DependenciesDir)/fdk-aac/libAACdec/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_WIN32_WINNT=0x501;WIN32;VGMSTREAM_VERSION_AUTO;VGM_LOG_OUTPUT;VGM_USE_VORBIS;VGM_USE_MPEG;VGM_USE_FFMPEG;VGM_USE_G7221;VGM_USE_G719;VGM_USE_ATRAC9;VGM_USE_CELT;VGM_USE_SPEEX;USE_ALLOCA;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>_WIN32_WINNT=0x501;WIN32;VGMSTREAM_VERSION_AUTO;VGM_LOG_OUTPUT;VGM_USE_VORBIS;VGM_USE_MPEG;VGM_USE_FFMPEG;VGM_USE_G7221;VGM_USE_G719;VGM_USE_ATRAC9;VGM_USE_CELT;VGM_USE_SPEEX;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary> <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader> <PrecompiledHeader>
</PrecompiledHeader> </PrecompiledHeader>
@ -90,7 +90,6 @@
<ClInclude Include="coding\coding_utils_samples.h" /> <ClInclude Include="coding\coding_utils_samples.h" />
<ClInclude Include="coding\compresswave_decoder_lib.h" /> <ClInclude Include="coding\compresswave_decoder_lib.h" />
<ClInclude Include="coding\ea_mt_decoder_utk.h" /> <ClInclude Include="coding\ea_mt_decoder_utk.h" />
<ClInclude Include="coding\fsb_vorbis_data.h" />
<ClInclude Include="coding\g7221_decoder_aes.h" /> <ClInclude Include="coding\g7221_decoder_aes.h" />
<ClInclude Include="coding\g7221_decoder_lib.h" /> <ClInclude Include="coding\g7221_decoder_lib.h" />
<ClInclude Include="coding\g7221_decoder_lib_data.h" /> <ClInclude Include="coding\g7221_decoder_lib_data.h" />
@ -109,7 +108,6 @@
<ClInclude Include="coding\vorbis_custom_decoder.h" /> <ClInclude Include="coding\vorbis_custom_decoder.h" />
<ClInclude Include="layout\layout.h" /> <ClInclude Include="layout\layout.h" />
<ClInclude Include="meta\9tav_streamfile.h" /> <ClInclude Include="meta\9tav_streamfile.h" />
<ClInclude Include="meta\aax_utf.h" />
<ClInclude Include="meta\adx_keys.h" /> <ClInclude Include="meta\adx_keys.h" />
<ClInclude Include="meta\ahx_keys.h" /> <ClInclude Include="meta\ahx_keys.h" />
<ClInclude Include="meta\aix_streamfile.h" /> <ClInclude Include="meta\aix_streamfile.h" />

View File

@ -1,112 +0,0 @@
/* Copyright (C) 2002-2003 Jean-Marc Valin
Copyright (C) 2007-2009 Xiph.Org Foundation */
/**
@file stack_alloc.h
@brief Temporary memory allocation on stack
*/
/*
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
- Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef STACK_ALLOC_H
#define STACK_ALLOC_H
#if (!defined (VAR_ARRAYS) && !defined (USE_ALLOCA))
#error "Vgmstream requires one of VAR_ARRAYS or USE_ALLOCA be defined to select the temporary allocation mode."
#endif
#ifdef USE_ALLOCA
# ifdef WIN32
# include <malloc.h>
# else
# ifdef HAVE_ALLOCA_H
# include <alloca.h>
# else
# include <stdlib.h>
# endif
# endif
#endif
/**
* @def ALIGN(stack, size)
*
* Aligns the stack to a 'size' boundary
*
* @param stack Stack
* @param size New size boundary
*/
/**
* @def PUSH(stack, size, type)
*
* Allocates 'size' elements of type 'type' on the stack
*
* @param stack Stack
* @param size Number of elements
* @param type Type of element
*/
/**
* @def VARDECL(var)
*
* Declare variable on stack
*
* @param var Variable to declare
*/
/**
* @def ALLOC(var, size, type)
*
* Allocate 'size' elements of 'type' on stack
*
* @param var Name of variable to allocate
* @param size Number of elements
* @param type Type of element
*/
#if defined(VAR_ARRAYS)
#define VARDECL(type, var)
#define ALLOC(var, size, type) type var[size]
#define SAVE_STACK
#define RESTORE_STACK
#define ALLOC_STACK
#elif defined(USE_ALLOCA)
#define VARDECL(type, var) type *var
# ifdef WIN32
# define ALLOC(var, size, type) var = ((type*)_alloca(sizeof(type)*(size)))
# else
# define ALLOC(var, size, type) var = ((type*)alloca(sizeof(type)*(size)))
# endif
#define SAVE_STACK
#define RESTORE_STACK
#define ALLOC_STACK
#endif /* VAR_ARRAYS */
#endif /* STACK_ALLOC_H */

View File

@ -22,7 +22,7 @@ TARGET_EXT_LIBS =
OUTPUT_WINAMP = in_vgmstream.dll OUTPUT_WINAMP = in_vgmstream.dll
ifeq ($(TARGET_OS),Windows_NT) ifeq ($(TARGET_OS),Windows_NT)
CFLAGS += -DWIN32 -m32 -DUSE_ALLOCA -I../ext_includes CFLAGS += -DWIN32 -m32 -I../ext_includes
LDFLAGS += -L../ext_libs/$(DLL_DIR) LDFLAGS += -L../ext_libs/$(DLL_DIR)
endif endif

View File

@ -17,7 +17,7 @@ endif
OUTPUT_XMPLAY = xmp-vgmstream.dll OUTPUT_XMPLAY = xmp-vgmstream.dll
ifeq ($(TARGET_OS),Windows_NT) ifeq ($(TARGET_OS),Windows_NT)
CFLAGS += -m32 -DUSE_ALLOCA -DWIN32 CFLAGS += -m32 -DWIN32
endif endif
CFLAGS += $(DEF_CFLAGS) -I../ext_includes $(EXTRA_CFLAGS) CFLAGS += $(DEF_CFLAGS) -I../ext_includes $(EXTRA_CFLAGS)