From 4c9c2e7fc030fd922b8834a8e63e4bf7c001ac26 Mon Sep 17 00:00:00 2001 From: Jonathan Dowland Date: Mon, 5 Mar 2018 15:36:35 +0000 Subject: [PATCH] Remove msvc project (unmaintained) --- msvc/.gitignore | 11 - msvc/README | 5 - msvc/chocolate.sln | 91 --- msvc/config.h | 31 - msvc/doom.vcproj | 1094 ------------------------------------ msvc/heretic.vcproj | 912 ------------------------------ msvc/hexen.vcproj | 870 ---------------------------- msvc/inttypes.h | 301 ---------- msvc/libopl.vcproj | 241 -------- msvc/libpcsound.vcproj | 195 ------- msvc/libtextscreen.vcproj | 356 ------------ msvc/server.vcproj | 322 ----------- msvc/setup.vcproj | 446 --------------- msvc/stdint.h | 208 ------- msvc/strife.vcproj | 1122 ------------------------------------- msvc/win32.rc | 57 -- msvc/win_opendir.c | 336 ----------- msvc/win_opendir.h | 73 --- 18 files changed, 6671 deletions(-) delete mode 100644 msvc/.gitignore delete mode 100644 msvc/README delete mode 100644 msvc/chocolate.sln delete mode 100644 msvc/config.h delete mode 100644 msvc/doom.vcproj delete mode 100644 msvc/heretic.vcproj delete mode 100644 msvc/hexen.vcproj delete mode 100644 msvc/inttypes.h delete mode 100644 msvc/libopl.vcproj delete mode 100644 msvc/libpcsound.vcproj delete mode 100644 msvc/libtextscreen.vcproj delete mode 100644 msvc/server.vcproj delete mode 100644 msvc/setup.vcproj delete mode 100644 msvc/stdint.h delete mode 100644 msvc/strife.vcproj delete mode 100644 msvc/win32.rc delete mode 100644 msvc/win_opendir.c delete mode 100644 msvc/win_opendir.h diff --git a/msvc/.gitignore b/msvc/.gitignore deleted file mode 100644 index 08f34987..00000000 --- a/msvc/.gitignore +++ /dev/null @@ -1,11 +0,0 @@ -*.cfg -*.ncb -*.suo -*.user -hexndata -savegames -strfsav* -*.pcx -SDL* -begin_code.h -close_code.h \ No newline at end of file diff --git a/msvc/README b/msvc/README deleted file mode 100644 index a63f9653..00000000 --- a/msvc/README +++ /dev/null @@ -1,5 +0,0 @@ -Project and header files for building with Microsoft Visual C++. Please -note that the MSVC project files are not officially supported; the -canonical way to build Chocolate Doom under Windows is using -MingW + MSYS. - diff --git a/msvc/chocolate.sln b/msvc/chocolate.sln deleted file mode 100644 index d6a62c12..00000000 --- a/msvc/chocolate.sln +++ /dev/null @@ -1,91 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual Studio 2008 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Doom", "doom.vcproj", "{8B744A3B-8F18-41A0-85A3-293816E85B6E}" - ProjectSection(ProjectDependencies) = postProject - {FC8D0610-1507-4F36-99BC-6F5A422B6AD3} = {FC8D0610-1507-4F36-99BC-6F5A422B6AD3} - {66CD7F50-73B9-482F-8B69-1AF54983F845} = {66CD7F50-73B9-482F-8B69-1AF54983F845} - {35F435DB-AC4A-4F28-BA2D-812E638FB01A} = {35F435DB-AC4A-4F28-BA2D-812E638FB01A} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Heretic", "heretic.vcproj", "{8D4FF322-7414-4668-94BD-D63B45D9CBF8}" - ProjectSection(ProjectDependencies) = postProject - {FC8D0610-1507-4F36-99BC-6F5A422B6AD3} = {FC8D0610-1507-4F36-99BC-6F5A422B6AD3} - {66CD7F50-73B9-482F-8B69-1AF54983F845} = {66CD7F50-73B9-482F-8B69-1AF54983F845} - {35F435DB-AC4A-4F28-BA2D-812E638FB01A} = {35F435DB-AC4A-4F28-BA2D-812E638FB01A} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Hexen", "hexen.vcproj", "{8FBB8720-340B-4185-9442-A76781FD6278}" - ProjectSection(ProjectDependencies) = postProject - {FC8D0610-1507-4F36-99BC-6F5A422B6AD3} = {FC8D0610-1507-4F36-99BC-6F5A422B6AD3} - {66CD7F50-73B9-482F-8B69-1AF54983F845} = {66CD7F50-73B9-482F-8B69-1AF54983F845} - {35F435DB-AC4A-4F28-BA2D-812E638FB01A} = {35F435DB-AC4A-4F28-BA2D-812E638FB01A} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Server", "server.vcproj", "{10DCBB24-F8BB-4796-A653-6DE9C8AAC24B}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Setup", "setup.vcproj", "{01975BB6-D2DA-48E7-AE0D-6A8AC8ECF48A}" - ProjectSection(ProjectDependencies) = postProject - {35F435DB-AC4A-4F28-BA2D-812E638FB01A} = {35F435DB-AC4A-4F28-BA2D-812E638FB01A} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libpcsound", "libpcsound.vcproj", "{66CD7F50-73B9-482F-8B69-1AF54983F845}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libtextscreen", "libtextscreen.vcproj", "{35F435DB-AC4A-4F28-BA2D-812E638FB01A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Strife", "strife.vcproj", "{FC4DACBA-2A3E-4AF0-804A-AF5FFFD13B08}" - ProjectSection(ProjectDependencies) = postProject - {FC8D0610-1507-4F36-99BC-6F5A422B6AD3} = {FC8D0610-1507-4F36-99BC-6F5A422B6AD3} - {66CD7F50-73B9-482F-8B69-1AF54983F845} = {66CD7F50-73B9-482F-8B69-1AF54983F845} - {35F435DB-AC4A-4F28-BA2D-812E638FB01A} = {35F435DB-AC4A-4F28-BA2D-812E638FB01A} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libopl", "libopl.vcproj", "{FC8D0610-1507-4F36-99BC-6F5A422B6AD3}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {8B744A3B-8F18-41A0-85A3-293816E85B6E}.Debug|Win32.ActiveCfg = Debug|Win32 - {8B744A3B-8F18-41A0-85A3-293816E85B6E}.Debug|Win32.Build.0 = Debug|Win32 - {8B744A3B-8F18-41A0-85A3-293816E85B6E}.Release|Win32.ActiveCfg = Release|Win32 - {8B744A3B-8F18-41A0-85A3-293816E85B6E}.Release|Win32.Build.0 = Release|Win32 - {8D4FF322-7414-4668-94BD-D63B45D9CBF8}.Debug|Win32.ActiveCfg = Debug|Win32 - {8D4FF322-7414-4668-94BD-D63B45D9CBF8}.Debug|Win32.Build.0 = Debug|Win32 - {8D4FF322-7414-4668-94BD-D63B45D9CBF8}.Release|Win32.ActiveCfg = Release|Win32 - {8D4FF322-7414-4668-94BD-D63B45D9CBF8}.Release|Win32.Build.0 = Release|Win32 - {8FBB8720-340B-4185-9442-A76781FD6278}.Debug|Win32.ActiveCfg = Debug|Win32 - {8FBB8720-340B-4185-9442-A76781FD6278}.Debug|Win32.Build.0 = Debug|Win32 - {8FBB8720-340B-4185-9442-A76781FD6278}.Release|Win32.ActiveCfg = Release|Win32 - {8FBB8720-340B-4185-9442-A76781FD6278}.Release|Win32.Build.0 = Release|Win32 - {10DCBB24-F8BB-4796-A653-6DE9C8AAC24B}.Debug|Win32.ActiveCfg = Debug|Win32 - {10DCBB24-F8BB-4796-A653-6DE9C8AAC24B}.Debug|Win32.Build.0 = Debug|Win32 - {10DCBB24-F8BB-4796-A653-6DE9C8AAC24B}.Release|Win32.ActiveCfg = Release|Win32 - {10DCBB24-F8BB-4796-A653-6DE9C8AAC24B}.Release|Win32.Build.0 = Release|Win32 - {01975BB6-D2DA-48E7-AE0D-6A8AC8ECF48A}.Debug|Win32.ActiveCfg = Debug|Win32 - {01975BB6-D2DA-48E7-AE0D-6A8AC8ECF48A}.Debug|Win32.Build.0 = Debug|Win32 - {01975BB6-D2DA-48E7-AE0D-6A8AC8ECF48A}.Release|Win32.ActiveCfg = Release|Win32 - {01975BB6-D2DA-48E7-AE0D-6A8AC8ECF48A}.Release|Win32.Build.0 = Release|Win32 - {66CD7F50-73B9-482F-8B69-1AF54983F845}.Debug|Win32.ActiveCfg = Debug|Win32 - {66CD7F50-73B9-482F-8B69-1AF54983F845}.Debug|Win32.Build.0 = Debug|Win32 - {66CD7F50-73B9-482F-8B69-1AF54983F845}.Release|Win32.ActiveCfg = Release|Win32 - {66CD7F50-73B9-482F-8B69-1AF54983F845}.Release|Win32.Build.0 = Release|Win32 - {35F435DB-AC4A-4F28-BA2D-812E638FB01A}.Debug|Win32.ActiveCfg = Debug|Win32 - {35F435DB-AC4A-4F28-BA2D-812E638FB01A}.Debug|Win32.Build.0 = Debug|Win32 - {35F435DB-AC4A-4F28-BA2D-812E638FB01A}.Release|Win32.ActiveCfg = Release|Win32 - {35F435DB-AC4A-4F28-BA2D-812E638FB01A}.Release|Win32.Build.0 = Release|Win32 - {FC4DACBA-2A3E-4AF0-804A-AF5FFFD13B08}.Debug|Win32.ActiveCfg = Debug|Win32 - {FC4DACBA-2A3E-4AF0-804A-AF5FFFD13B08}.Debug|Win32.Build.0 = Debug|Win32 - {FC4DACBA-2A3E-4AF0-804A-AF5FFFD13B08}.Release|Win32.ActiveCfg = Release|Win32 - {FC4DACBA-2A3E-4AF0-804A-AF5FFFD13B08}.Release|Win32.Build.0 = Release|Win32 - {FC8D0610-1507-4F36-99BC-6F5A422B6AD3}.Debug|Win32.ActiveCfg = Debug|Win32 - {FC8D0610-1507-4F36-99BC-6F5A422B6AD3}.Debug|Win32.Build.0 = Debug|Win32 - {FC8D0610-1507-4F36-99BC-6F5A422B6AD3}.Release|Win32.ActiveCfg = Release|Win32 - {FC8D0610-1507-4F36-99BC-6F5A422B6AD3}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/msvc/config.h b/msvc/config.h deleted file mode 100644 index cf099f15..00000000 --- a/msvc/config.h +++ /dev/null @@ -1,31 +0,0 @@ -/* config.h for MSVC builds. This is just the config.h created by - * configure. */ - -/* Name of package */ -#define PACKAGE "chocolate-doom" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "fraggle@gmail.com" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "Chocolate Doom" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "Chocolate Doom 3.0.0" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "chocolate-doom" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "3.0.0" - -/* Change this when you create your awesome forked version */ -#define PROGRAM_PREFIX "chocolate-" - -/* Version number of package */ -#define VERSION "3.0.0" - -/* Define to 1 if your processor stores words with the most significant byte - first (like Motorola and SPARC, unlike Intel and VAX). */ -/* #undef WORDS_BIGENDIAN */ - diff --git a/msvc/doom.vcproj b/msvc/doom.vcproj deleted file mode 100644 index b3583f49..00000000 --- a/msvc/doom.vcproj +++ /dev/null @@ -1,1094 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/msvc/heretic.vcproj b/msvc/heretic.vcproj deleted file mode 100644 index 5aece1c7..00000000 --- a/msvc/heretic.vcproj +++ /dev/null @@ -1,912 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/msvc/hexen.vcproj b/msvc/hexen.vcproj deleted file mode 100644 index c7e362e4..00000000 --- a/msvc/hexen.vcproj +++ /dev/null @@ -1,870 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/msvc/inttypes.h b/msvc/inttypes.h deleted file mode 100644 index 52cd8de1..00000000 --- a/msvc/inttypes.h +++ /dev/null @@ -1,301 +0,0 @@ -// ISO C9x compliant inttypes.h for Miscrosoft Visual Studio -// Based on ISO/IEC 9899:TC2 Committee draft (May 6, 2005) WG14/N1124 -// -// Copyright (c) 2006 Alexander Chemeris -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, -// this list of conditions and the following disclaimer. -// -// 2. 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. -// -// 3. The name of the author may be used to endorse or promote products -// derived from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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 _MSC_VER // [ -#error "Use this header only with Microsoft Visual C++ compilers!" -#endif // _MSC_VER ] - -#ifndef _MSC_INTTYPES_H_ // [ -#define _MSC_INTTYPES_H_ - -#if _MSC_VER > 1000 -#pragma once -#endif - -#include - -// 7.8 Format conversion of integer types - -typedef struct { - intmax_t quot; - intmax_t rem; -} imaxdiv_t; - -// 7.8.1 Macros for format specifiers - -// The fprintf macros for signed integers are: -#define PRId8 "d" -#define PRIi8 "i" -#define PRIdLEAST8 "d" -#define PRIiLEAST8 "i" -#define PRIdFAST8 "d" -#define PRIiFAST8 "i" - -#define PRId16 "hd" -#define PRIi16 "hi" -#define PRIdLEAST16 "hd" -#define PRIiLEAST16 "hi" -#define PRIdFAST16 "hd" -#define PRIiFAST16 "hi" - -#define PRId32 "I32d" -#define PRIi32 "I32i" -#define PRIdLEAST32 "I32d" -#define PRIiLEAST32 "I32i" -#define PRIdFAST32 "I32d" -#define PRIiFAST32 "I32i" - -#define PRId64 "I64d" -#define PRIi64 "I64i" -#define PRIdLEAST64 "I64d" -#define PRIiLEAST64 "I64i" -#define PRIdFAST64 "I64d" -#define PRIiFAST64 "I64i" - -#define PRIdMAX "I64d" -#define PRIiMAX "I64i" - -#define PRIdPTR "Id" -#define PRIiPTR "Ii" - -// The fprintf macros for unsigned integers are: -#define PRIo8 "o" -#define PRIu8 "u" -#define PRIx8 "x" -#define PRIX8 "X" -#define PRIoLEAST8 "o" -#define PRIuLEAST8 "u" -#define PRIxLEAST8 "x" -#define PRIXLEAST8 "X" -#define PRIoFAST8 "o" -#define PRIuFAST8 "u" -#define PRIxFAST8 "x" -#define PRIXFAST8 "X" - -#define PRIo16 "ho" -#define PRIu16 "hu" -#define PRIx16 "hx" -#define PRIX16 "hX" -#define PRIoLEAST16 "ho" -#define PRIuLEAST16 "hu" -#define PRIxLEAST16 "hx" -#define PRIXLEAST16 "hX" -#define PRIoFAST16 "ho" -#define PRIuFAST16 "hu" -#define PRIxFAST16 "hx" -#define PRIXFAST16 "hX" - -#define PRIo32 "I32o" -#define PRIu32 "I32u" -#define PRIx32 "I32x" -#define PRIX32 "I32X" -#define PRIoLEAST32 "I32o" -#define PRIuLEAST32 "I32u" -#define PRIxLEAST32 "I32x" -#define PRIXLEAST32 "I32X" -#define PRIoFAST32 "I32o" -#define PRIuFAST32 "I32u" -#define PRIxFAST32 "I32x" -#define PRIXFAST32 "I32X" - -#define PRIo64 "I64o" -#define PRIu64 "I64u" -#define PRIx64 "I64x" -#define PRIX64 "I64X" -#define PRIoLEAST64 "I64o" -#define PRIuLEAST64 "I64u" -#define PRIxLEAST64 "I64x" -#define PRIXLEAST64 "I64X" -#define PRIoFAST64 "I64o" -#define PRIuFAST64 "I64u" -#define PRIxFAST64 "I64x" -#define PRIXFAST64 "I64X" - -#define PRIoMAX "I64o" -#define PRIuMAX "I64u" -#define PRIxMAX "I64x" -#define PRIXMAX "I64X" - -#define PRIoPTR "Io" -#define PRIuPTR "Iu" -#define PRIxPTR "Ix" -#define PRIXPTR "IX" - -// The fscanf macros for signed integers are: -#define SCNd8 "d" -#define SCNi8 "i" -#define SCNdLEAST8 "d" -#define SCNiLEAST8 "i" -#define SCNdFAST8 "d" -#define SCNiFAST8 "i" - -#define SCNd16 "hd" -#define SCNi16 "hi" -#define SCNdLEAST16 "hd" -#define SCNiLEAST16 "hi" -#define SCNdFAST16 "hd" -#define SCNiFAST16 "hi" - -#define SCNd32 "ld" -#define SCNi32 "li" -#define SCNdLEAST32 "ld" -#define SCNiLEAST32 "li" -#define SCNdFAST32 "ld" -#define SCNiFAST32 "li" - -#define SCNd64 "I64d" -#define SCNi64 "I64i" -#define SCNdLEAST64 "I64d" -#define SCNiLEAST64 "I64i" -#define SCNdFAST64 "I64d" -#define SCNiFAST64 "I64i" - -#define SCNdMAX "I64d" -#define SCNiMAX "I64i" - -#ifdef _WIN64 // [ -# define SCNdPTR "I64d" -# define SCNiPTR "I64i" -#else // _WIN64 ][ -# define SCNdPTR "ld" -# define SCNiPTR "li" -#endif // _WIN64 ] - -// The fscanf macros for unsigned integers are: -#define SCNo8 "o" -#define SCNu8 "u" -#define SCNx8 "x" -#define SCNX8 "X" -#define SCNoLEAST8 "o" -#define SCNuLEAST8 "u" -#define SCNxLEAST8 "x" -#define SCNXLEAST8 "X" -#define SCNoFAST8 "o" -#define SCNuFAST8 "u" -#define SCNxFAST8 "x" -#define SCNXFAST8 "X" - -#define SCNo16 "ho" -#define SCNu16 "hu" -#define SCNx16 "hx" -#define SCNX16 "hX" -#define SCNoLEAST16 "ho" -#define SCNuLEAST16 "hu" -#define SCNxLEAST16 "hx" -#define SCNXLEAST16 "hX" -#define SCNoFAST16 "ho" -#define SCNuFAST16 "hu" -#define SCNxFAST16 "hx" -#define SCNXFAST16 "hX" - -#define SCNo32 "lo" -#define SCNu32 "lu" -#define SCNx32 "lx" -#define SCNX32 "lX" -#define SCNoLEAST32 "lo" -#define SCNuLEAST32 "lu" -#define SCNxLEAST32 "lx" -#define SCNXLEAST32 "lX" -#define SCNoFAST32 "lo" -#define SCNuFAST32 "lu" -#define SCNxFAST32 "lx" -#define SCNXFAST32 "lX" - -#define SCNo64 "I64o" -#define SCNu64 "I64u" -#define SCNx64 "I64x" -#define SCNX64 "I64X" -#define SCNoLEAST64 "I64o" -#define SCNuLEAST64 "I64u" -#define SCNxLEAST64 "I64x" -#define SCNXLEAST64 "I64X" -#define SCNoFAST64 "I64o" -#define SCNuFAST64 "I64u" -#define SCNxFAST64 "I64x" -#define SCNXFAST64 "I64X" - -#define SCNoMAX "I64o" -#define SCNuMAX "I64u" -#define SCNxMAX "I64x" -#define SCNXMAX "I64X" - -#ifdef _WIN64 // [ -# define SCNoPTR "I64o" -# define SCNuPTR "I64u" -# define SCNxPTR "I64x" -# define SCNXPTR "I64X" -#else // _WIN64 ][ -# define SCNoPTR "lo" -# define SCNuPTR "lu" -# define SCNxPTR "lx" -# define SCNXPTR "lX" -#endif // _WIN64 ] - -// 7.8.2 Functions for greatest-width integer types - -// 7.8.2.1 The imaxabs function -#define imaxabs _abs64 - -// 7.8.2.2 The imaxdiv function - -// This is modified version of div() function from Microsoft's div.c found -// in %MSVC.NET%\crt\src\div.c -#ifdef STATIC_IMAXDIV // [ -static -#else // STATIC_IMAXDIV ][ -_inline -#endif // STATIC_IMAXDIV ] -imaxdiv_t __cdecl imaxdiv(intmax_t numer, intmax_t denom) -{ - imaxdiv_t result; - - result.quot = numer / denom; - result.rem = numer % denom; - - if (numer < 0 && result.rem > 0) { - // did division wrong; must fix up - ++result.quot; - result.rem -= denom; - } - - return result; -} - -// 7.8.2.3 The strtoimax and strtoumax functions -#define strtoimax _strtoi64 -#define strtoumax _strtoui64 - -// 7.8.2.4 The wcstoimax and wcstoumax functions -#define wcstoimax _wcstoi64 -#define wcstoumax _wcstoui64 - - -#endif // _MSC_INTTYPES_H_ ] diff --git a/msvc/libopl.vcproj b/msvc/libopl.vcproj deleted file mode 100644 index 316847c0..00000000 --- a/msvc/libopl.vcproj +++ /dev/null @@ -1,241 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/msvc/libpcsound.vcproj b/msvc/libpcsound.vcproj deleted file mode 100644 index 496f1f69..00000000 --- a/msvc/libpcsound.vcproj +++ /dev/null @@ -1,195 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/msvc/libtextscreen.vcproj b/msvc/libtextscreen.vcproj deleted file mode 100644 index e3e7bdaa..00000000 --- a/msvc/libtextscreen.vcproj +++ /dev/null @@ -1,356 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/msvc/server.vcproj b/msvc/server.vcproj deleted file mode 100644 index 0e52ab10..00000000 --- a/msvc/server.vcproj +++ /dev/null @@ -1,322 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/msvc/setup.vcproj b/msvc/setup.vcproj deleted file mode 100644 index 53ecc916..00000000 --- a/msvc/setup.vcproj +++ /dev/null @@ -1,446 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/msvc/stdint.h b/msvc/stdint.h deleted file mode 100644 index 53da6ebf..00000000 --- a/msvc/stdint.h +++ /dev/null @@ -1,208 +0,0 @@ -// ISO C9x compliant stdint.h for Miscrosoft Visual Studio -// Based on ISO/IEC 9899:TC2 Committee draft (May 6, 2005) WG14/N1124 -// -// Copyright (c) 2006 Alexander Chemeris -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, -// this list of conditions and the following disclaimer. -// -// 2. 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. -// -// 3. The name of the author may be used to endorse or promote products -// derived from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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 _MSC_VER // [ -#error "Use this header only with Microsoft Visual C++ compilers!" -#endif // _MSC_VER ] - -#ifndef _MSC_STDINT_H_ // [ -#define _MSC_STDINT_H_ - -#if _MSC_VER > 1000 -#pragma once -#endif - -#include -#include -#include - -// 7.18.1 Integer types - -// 7.18.1.1 Exact-width integer types -typedef __int8 int8_t; -typedef __int16 int16_t; -typedef __int32 int32_t; -typedef __int64 int64_t; -typedef unsigned __int8 uint8_t; -typedef unsigned __int16 uint16_t; -typedef unsigned __int32 uint32_t; -typedef unsigned __int64 uint64_t; - -// 7.18.1.2 Minimum-width integer types -typedef int8_t int_least8_t; -typedef int16_t int_least16_t; -typedef int32_t int_least32_t; -typedef int64_t int_least64_t; -typedef uint8_t uint_least8_t; -typedef uint16_t uint_least16_t; -typedef uint32_t uint_least32_t; -typedef uint64_t uint_least64_t; - -// 7.18.1.3 Fastest minimum-width integer types -typedef int8_t int_fast8_t; -typedef int16_t int_fast16_t; -typedef int32_t int_fast32_t; -typedef int64_t int_fast64_t; -typedef uint8_t uint_fast8_t; -typedef uint16_t uint_fast16_t; -typedef uint32_t uint_fast32_t; -typedef uint64_t uint_fast64_t; - -// 7.18.1.4 Integer types capable of holding object pointers -typedef INT_PTR intptr_t; -typedef UINT_PTR uintptr_t; - -// 7.18.1.5 Greatest-width integer types -typedef int64_t intmax_t; -typedef uint64_t uintmax_t; - - -// 7.18.2 Limits of specified-width integer types - -#if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) // [ See footnote 220 at page 257 and footnote 221 at page 259 - -// 7.18.2.1 Limits of exact-width integer types -#define INT8_MIN _I8_MIN -#define INT8_MAX _I8_MAX -#define INT16_MIN _I16_MIN -#define INT16_MAX _I16_MAX -#define INT32_MIN _I32_MIN -#define INT32_MAX _I32_MAX -#define INT64_MIN _I64_MIN -#define INT64_MAX _I64_MAX -#define UINT8_MAX _UI8_MAX -#define UINT16_MAX _UI16_MAX -#define UINT32_MAX _UI32_MAX -#define UINT64_MAX _UI64_MAX - -// 7.18.2.2 Limits of minimum-width integer types -#define INT_LEAST8_MIN INT8_MIN -#define INT_LEAST8_MAX INT8_MAX -#define INT_LEAST16_MIN INT16_MIN -#define INT_LEAST16_MAX INT16_MAX -#define INT_LEAST32_MIN INT32_MIN -#define INT_LEAST32_MAX INT32_MAX -#define INT_LEAST64_MIN INT64_MIN -#define INT_LEAST64_MAX INT64_MAX -#define UINT_LEAST8_MAX UINT8_MAX -#define UINT_LEAST16_MAX UINT16_MAX -#define UINT_LEAST32_MAX UINT32_MAX -#define UINT_LEAST64_MAX UINT64_MAX - -// 7.18.2.3 Limits of fastest minimum-width integer types -#define INT_FAST8_MIN INT8_MIN -#define INT_FAST8_MAX INT8_MAX -#define INT_FAST16_MIN INT16_MIN -#define INT_FAST16_MAX INT16_MAX -#define INT_FAST32_MIN INT32_MIN -#define INT_FAST32_MAX INT32_MAX -#define INT_FAST64_MIN INT64_MIN -#define INT_FAST64_MAX INT64_MAX -#define UINT_FAST8_MAX UINT8_MAX -#define UINT_FAST16_MAX UINT16_MAX -#define UINT_FAST32_MAX UINT32_MAX -#define UINT_FAST64_MAX UINT64_MAX - -// 7.18.2.4 Limits of integer types capable of holding object pointers -#ifdef _WIN64 // [ -# define INTPTR_MIN INT64_MIN -# define INTPTR_MAX INT64_MAX -# define UINTPTR_MAX UINT64_MAX -#else // _WIN64 ][ -# define INTPTR_MIN INT32_MIN -# define INTPTR_MAX INT32_MAX -# define UINTPTR_MAX UINT32_MAX -#endif // _WIN64 ] - -// 7.18.2.5 Limits of greatest-width integer types -#define INTMAX_MIN INT64_MIN -#define INTMAX_MAX INT64_MAX -#define UINTMAX_MAX UINT64_MAX - -// 7.18.3 Limits of other integer types - -#ifdef _WIN64 // [ -# define PTRDIFF_MIN _I64_MIN -# define PTRDIFF_MAX _I64_MAX -#else // _WIN64 ][ -# define PTRDIFF_MIN _I32_MIN -# define PTRDIFF_MAX _I32_MAX -#endif // _WIN64 ] - -#define SIG_ATOMIC_MIN INT_MIN -#define SIG_ATOMIC_MAX INT_MAX - -#ifndef SIZE_MAX // [ -# ifdef _WIN64 // [ -# define SIZE_MAX _UI64_MAX -# else // _WIN64 ][ -# define SIZE_MAX _UI32_MAX -# endif // _WIN64 ] -#endif // SIZE_MAX ] - -// WCHAR_MIN and WCHAR_MAX are also defined in -#ifndef WCHAR_MIN // [ -# define WCHAR_MIN 0 -#endif // WCHAR_MIN ] -#ifndef WCHAR_MAX // [ -# define WCHAR_MAX _UI16_MAX -#endif // WCHAR_MAX ] - -#define WINT_MIN 0 -#define WINT_MAX _UI16_MAX - -#endif // __STDC_LIMIT_MACROS ] - - -// 7.18.4 Limits of other integer types - -#if !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS) // [ See footnote 224 at page 260 - -// 7.18.4.1 Macros for minimum-width integer constants - -#define INT8_C(val) val -#define INT16_C(val) val -#define INT32_C(val) val##L -#define INT64_C(val) val##i64 - -#define UINT8_C(val) val -#define UINT16_C(val) val -#define UINT32_C(val) val##UL -#define UINT64_C(val) val##Ui64 - -// 7.18.4.2 Macros for greatest-width integer constants -#define INTMAX_C INT64_C -#define UINTMAX_C UINT64_C - -#endif // __STDC_CONSTANT_MACROS ] - - -#endif // _MSC_STDINT_H_ ] diff --git a/msvc/strife.vcproj b/msvc/strife.vcproj deleted file mode 100644 index e41f03fe..00000000 --- a/msvc/strife.vcproj +++ /dev/null @@ -1,1122 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/msvc/win32.rc b/msvc/win32.rc deleted file mode 100644 index 97457e4f..00000000 --- a/msvc/win32.rc +++ /dev/null @@ -1,57 +0,0 @@ -// -// Copyright(C) 2005-2014 Simon Howard -// Copyright(C) 2008 "GhostlyDeath" (ghostlydeath@gmail.com) -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// DESCRIPTION: -// Win32 Resources -// - -#ifndef DEDICATEDSERVER -#ifdef CHOCOLATESETUP -1 ICON "../data/setup.ico" -#else -1 ICON "../data/doom.ico" -#endif -#endif - -1 VERSIONINFO -PRODUCTVERSION 3,0,0,0 -FILEVERSION 3,0,0,0 -FILETYPE 1 -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904E4" - BEGIN - VALUE "FileVersion", "1.0.0" - VALUE "FileDescription", "Chocolate Doom 3.0.0" - VALUE "InternalName", "chocolate-doom" - VALUE "CompanyName", "fraggle@gmail.com" - VALUE "LegalCopyright", "GNU General Public License" - VALUE "ProductName", "Chocolate Doom" - VALUE "ProductVersion", "3.0.0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1252 - END -END - -// GhostlyDeath - Preferebly for codeblocks (if it even uses this RC!) -#ifdef __MINGW32__ -#ifdef CHOCOLATESETUP -// RT_MANIFEST might NOT be defined -1 24 "../setup/setup-manifest.xml" -#endif -#endif diff --git a/msvc/win_opendir.c b/msvc/win_opendir.c deleted file mode 100644 index 3c4b4867..00000000 --- a/msvc/win_opendir.c +++ /dev/null @@ -1,336 +0,0 @@ -// -// 03/10/2006 James Haley -// -// For this module only: -// This code is public domain. No change sufficient enough to constitute a -// significant or original work has been made, and thus it remains as such. -// -// -// DESCRIPTION: -// -// Implementation of POSIX opendir for Visual C++. -// Derived from the MinGW C Library Extensions Source (released to the -// public domain). As with other Win32 modules, don't include most DOOM -// headers into this or conflicts will occur. -// -// Original Header: -// -// * dirent.c -// * This file has no copyright assigned and is placed in the Public Domain. -// * This file is a part of the mingw-runtime package. -// * No warranty is given; refer to the file DISCLAIMER within the package. -// * -// * Derived from DIRLIB.C by Matt J. Weinstein -// * This note appears in the DIRLIB.H -// * DIRLIB.H by M. J. Weinstein Released to public domain 1-Jan-89 -// * -// * Updated by Jeremy Bettis -// * Significantly revised and rewinddir, seekdir and telldir added by Colin -// * Peters -// - -#ifndef _MSC_VER -#error i_opndir.c is for Microsoft Visual C++ only -#endif - -#include -#include -#include - -#define WIN32_LEAN_AND_MEAN -#include /* for GetFileAttributes */ - -#include -#define SUFFIX _T("*") -#define SLASH _T("\\") - -#include "win_opendir.h" - -// -// opendir -// -// Returns a pointer to a DIR structure appropriately filled in to begin -// searching a directory. -// -DIR *opendir(const _TCHAR *szPath) -{ - DIR *nd; - unsigned int rc; - _TCHAR szFullPath[MAX_PATH]; - - errno = 0; - - if(!szPath) - { - errno = EFAULT; - return (DIR *)0; - } - - if(szPath[0] == _T('\0')) - { - errno = ENOTDIR; - return (DIR *)0; - } - - /* Attempt to determine if the given path really is a directory. */ - rc = GetFileAttributes(szPath); - if(rc == (unsigned int)-1) - { - /* call GetLastError for more error info */ - errno = ENOENT; - return (DIR *)0; - } - if(!(rc & FILE_ATTRIBUTE_DIRECTORY)) - { - /* Error, entry exists but not a directory. */ - errno = ENOTDIR; - return (DIR *)0; - } - - /* Make an absolute pathname. */ - _tfullpath(szFullPath, szPath, MAX_PATH); - - /* Allocate enough space to store DIR structure and the complete - * directory path given. */ - nd = (DIR *)(malloc(sizeof(DIR) + (_tcslen(szFullPath) - + _tcslen(SLASH) - + _tcslen(SUFFIX) + 1) - * sizeof(_TCHAR))); - - if(!nd) - { - /* Error, out of memory. */ - errno = ENOMEM; - return (DIR *)0; - } - - /* Create the search expression. */ - _tcscpy(nd->dd_name, szFullPath); - - /* Add on a slash if the path does not end with one. */ - if(nd->dd_name[0] != _T('\0') - && _tcsrchr(nd->dd_name, _T('/')) != nd->dd_name - + _tcslen(nd->dd_name) - 1 - && _tcsrchr(nd->dd_name, _T('\\')) != nd->dd_name - + _tcslen(nd->dd_name) - 1) - { - _tcscat(nd->dd_name, SLASH); - } - - /* Add on the search pattern */ - _tcscat(nd->dd_name, SUFFIX); - - /* Initialize handle to -1 so that a premature closedir doesn't try - * to call _findclose on it. */ - nd->dd_handle = -1; - - /* Initialize the status. */ - nd->dd_stat = 0; - - /* Initialize the dirent structure. ino and reclen are invalid under - * Win32, and name simply points at the appropriate part of the - * findfirst_t structure. */ - nd->dd_dir.d_ino = 0; - nd->dd_dir.d_reclen = 0; - nd->dd_dir.d_namlen = 0; - memset(nd->dd_dir.d_name, 0, FILENAME_MAX); - - return nd; -} - -// -// readdir -// -// Return a pointer to a dirent structure filled with the information on the -// next entry in the directory. -// -struct dirent *readdir(DIR *dirp) -{ - errno = 0; - - /* Check for valid DIR struct. */ - if(!dirp) - { - errno = EFAULT; - return (struct dirent *)0; - } - - if (dirp->dd_stat < 0) - { - /* We have already returned all files in the directory - * (or the structure has an invalid dd_stat). */ - return (struct dirent *)0; - } - else if (dirp->dd_stat == 0) - { - /* We haven't started the search yet. */ - /* Start the search */ - dirp->dd_handle = _tfindfirst(dirp->dd_name, &(dirp->dd_dta)); - - if(dirp->dd_handle == -1) - { - /* Whoops! Seems there are no files in that - * directory. */ - dirp->dd_stat = -1; - } - else - { - dirp->dd_stat = 1; - } - } - else - { - /* Get the next search entry. */ - if(_tfindnext(dirp->dd_handle, &(dirp->dd_dta))) - { - /* We are off the end or otherwise error. - _findnext sets errno to ENOENT if no more file - Undo this. */ - DWORD winerr = GetLastError(); - if(winerr == ERROR_NO_MORE_FILES) - errno = 0; - _findclose(dirp->dd_handle); - dirp->dd_handle = -1; - dirp->dd_stat = -1; - } - else - { - /* Update the status to indicate the correct - * number. */ - dirp->dd_stat++; - } - } - - if (dirp->dd_stat > 0) - { - /* Successfully got an entry. Everything about the file is - * already appropriately filled in except the length of the - * file name. */ - dirp->dd_dir.d_namlen = _tcslen(dirp->dd_dta.name); - _tcscpy(dirp->dd_dir.d_name, dirp->dd_dta.name); - return &dirp->dd_dir; - } - - return (struct dirent *)0; -} - - -// -// closedir -// -// Frees up resources allocated by opendir. -// -int closedir(DIR *dirp) -{ - int rc; - - errno = 0; - rc = 0; - - if(!dirp) - { - errno = EFAULT; - return -1; - } - - if(dirp->dd_handle != -1) - { - rc = _findclose(dirp->dd_handle); - } - - /* Delete the dir structure. */ - free(dirp); - - return rc; -} - -// -// rewinddir -// -// Return to the beginning of the directory "stream". We simply call findclose -// and then reset things like an opendir. -// -void rewinddir(DIR * dirp) -{ - errno = 0; - - if(!dirp) - { - errno = EFAULT; - return; - } - - if(dirp->dd_handle != -1) - { - _findclose(dirp->dd_handle); - } - - dirp->dd_handle = -1; - dirp->dd_stat = 0; -} - -// -// telldir -// -// Returns the "position" in the "directory stream" which can be used with -// seekdir to go back to an old entry. We simply return the value in stat. -// -long telldir(DIR *dirp) -{ - errno = 0; - - if(!dirp) - { - errno = EFAULT; - return -1; - } - return dirp->dd_stat; -} - -// -// seekdir -// -// Seek to an entry previously returned by telldir. We rewind the directory -// and call readdir repeatedly until either dd_stat is the position number -// or -1 (off the end). This is not perfect, in that the directory may -// have changed while we weren't looking. But that is probably the case with -// any such system. -// -void seekdir(DIR *dirp, long lPos) -{ - errno = 0; - - if(!dirp) - { - errno = EFAULT; - return; - } - - if(lPos < -1) - { - /* Seeking to an invalid position. */ - errno = EINVAL; - return; - } - else if(lPos == -1) - { - /* Seek past end. */ - if(dirp->dd_handle != -1) - { - _findclose(dirp->dd_handle); - } - dirp->dd_handle = -1; - dirp->dd_stat = -1; - } - else - { - /* Rewind and read forward to the appropriate index. */ - rewinddir(dirp); - - while((dirp->dd_stat < lPos) && readdir(dirp)) - ; /* do-nothing loop */ - } -} - -// EOF - diff --git a/msvc/win_opendir.h b/msvc/win_opendir.h deleted file mode 100644 index 14fb8563..00000000 --- a/msvc/win_opendir.h +++ /dev/null @@ -1,73 +0,0 @@ -// -// 03/10/2006 James Haley -// -// For this module only: -// This code is public domain. No change sufficient enough to constitute a -// significant or original work has been made, and thus it remains as such. -// -// -// DESCRIPTION: -// -// Implementation of POSIX opendir for Visual C++. -// Derived from the MinGW C Library Extensions Source (released to the -// public domain). -// - -#ifndef I_OPNDIR_H__ -#define I_OPNDIR_H__ - -#include - -#ifndef FILENAME_MAX -#define FILENAME_MAX 260 -#endif - -struct dirent -{ - long d_ino; /* Always zero. */ - unsigned short d_reclen; /* Always zero. */ - unsigned short d_namlen; /* Length of name in d_name. */ - char d_name[FILENAME_MAX]; /* File name. */ -}; - -/* - * This is an internal data structure. Good programmers will not use it - * except as an argument to one of the functions below. - * dd_stat field is now int (was short in older versions). - */ -typedef struct -{ - /* disk transfer area for this dir */ - struct _finddata_t dd_dta; - - /* dirent struct to return from dir (NOTE: this makes this thread - * safe as long as only one thread uses a particular DIR struct at - * a time) */ - struct dirent dd_dir; - - /* _findnext handle */ - long dd_handle; - - /* - * Status of search: - * 0 = not started yet (next entry to read is first entry) - * -1 = off the end - * positive = 0 based index of next entry - */ - int dd_stat; - - /* given path for dir with search pattern (struct is extended) */ - char dd_name[1]; -} DIR; - -DIR *opendir(const char *); -struct dirent *readdir(DIR *); -int closedir(DIR *); -void rewinddir(DIR *); -long telldir(DIR *); -void seekdir(DIR *, long); - -#endif - -// EOF -