diff --git a/SRB2.cbp b/SRB2.cbp
index 2a1eb87b85..91e45d6f1b 100644
--- a/SRB2.cbp
+++ b/SRB2.cbp
@@ -1785,15 +1785,6 @@ HW3SOUND for 3D hardware sound support
-
-
-
-
-
-
-
-
-
diff --git a/src/android/i_system.c b/src/android/i_system.c
index 58fca7c194..e527fafd89 100644
--- a/src/android/i_system.c
+++ b/src/android/i_system.c
@@ -271,5 +271,3 @@ char *I_ClipboardPaste(void)
}
void I_RegisterSysCommands(void) {}
-
-#include "../sdl/dosstr.c"
diff --git a/src/doomtype.h b/src/doomtype.h
index b44e32e46c..8cac201514 100644
--- a/src/doomtype.h
+++ b/src/doomtype.h
@@ -162,8 +162,8 @@ typedef long ssize_t;
#endif
#ifndef HAVE_DOSSTR_FUNCS
-int strupr(char *n); // from dosstr.c
-int strlwr(char *n); // from dosstr.c
+int strupr(char *n); // from string.c
+int strlwr(char *n); // from string.c
#endif
#include // for size_t
diff --git a/src/dummy/i_system.c b/src/dummy/i_system.c
index a3fe3077c2..f54e846f8e 100644
--- a/src/dummy/i_system.c
+++ b/src/dummy/i_system.c
@@ -175,6 +175,3 @@ char *I_ClipboardPaste(void)
}
void I_RegisterSysCommands(void) {}
-
-#include "../sdl/dosstr.c"
-
diff --git a/src/nds/i_system.c b/src/nds/i_system.c
index 3e5c4b8c6d..831a8c203c 100644
--- a/src/nds/i_system.c
+++ b/src/nds/i_system.c
@@ -282,5 +282,3 @@ char *I_ClipboardPaste(void)
}
void I_RegisterSysCommands(void) {}
-
-#include "../sdl/dosstr.c"
diff --git a/src/sdl/CMakeLists.txt b/src/sdl/CMakeLists.txt
index de21570558..82f1e13d35 100644
--- a/src/sdl/CMakeLists.txt
+++ b/src/sdl/CMakeLists.txt
@@ -27,7 +27,6 @@ else()
endif()
set(SRB2_SDL2_SOURCES
- dosstr.c
endtxt.c
hwsym_sdl.c
i_cdmus.c
diff --git a/src/sdl/Makefile.cfg b/src/sdl/Makefile.cfg
index 58c4d0861f..1daaef203d 100644
--- a/src/sdl/Makefile.cfg
+++ b/src/sdl/Makefile.cfg
@@ -45,7 +45,7 @@ ifndef NOASM
endif
endif
- OBJS+=$(OBJDIR)/i_video.o $(OBJDIR)/dosstr.o $(OBJDIR)/endtxt.o $(OBJDIR)/hwsym_sdl.o
+ OBJS+=$(OBJDIR)/i_video.o $(OBJDIR)/endtxt.o $(OBJDIR)/hwsym_sdl.o
OPTS+=-DDIRECTFULLSCREEN -DHAVE_SDL
diff --git a/src/sdl/Srb2SDL-vc10.vcxproj b/src/sdl/Srb2SDL-vc10.vcxproj
index ee5df4dcb1..df90b20e1d 100644
--- a/src/sdl/Srb2SDL-vc10.vcxproj
+++ b/src/sdl/Srb2SDL-vc10.vcxproj
@@ -456,7 +456,6 @@
-
diff --git a/src/sdl/Srb2SDL-vc10.vcxproj.filters b/src/sdl/Srb2SDL-vc10.vcxproj.filters
index d67ac63082..58beb74786 100644
--- a/src/sdl/Srb2SDL-vc10.vcxproj.filters
+++ b/src/sdl/Srb2SDL-vc10.vcxproj.filters
@@ -840,9 +840,6 @@
W_Wad
-
- SDLApp
-
SDLApp
diff --git a/src/sdl/Srb2SDL-vc9.vcproj b/src/sdl/Srb2SDL-vc9.vcproj
index 3898aeba4e..38c34877be 100644
--- a/src/sdl/Srb2SDL-vc9.vcproj
+++ b/src/sdl/Srb2SDL-vc9.vcproj
@@ -418,46 +418,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/sdl/Srb2SDL.dsp b/src/sdl/Srb2SDL.dsp
index 879113ca2f..c067098686 100644
--- a/src/sdl/Srb2SDL.dsp
+++ b/src/sdl/Srb2SDL.dsp
@@ -128,10 +128,6 @@ SOURCE=.\filter\lq2x.h
# End Group
# Begin Source File
-SOURCE=.\dosstr.c
-# End Source File
-# Begin Source File
-
SOURCE=.\endtxt.c
# End Source File
# Begin Source File
diff --git a/src/sdl/dosstr.c b/src/sdl/dosstr.c
deleted file mode 100644
index f9bbee9b4c..0000000000
--- a/src/sdl/dosstr.c
+++ /dev/null
@@ -1,38 +0,0 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// This file is in the public domain.
-// (Re)written by Graue in 2006.
-//
-//-----------------------------------------------------------------------------
-/// \file
-/// \brief String uppercasing/lowercasing functions for non-DOS non-Win32
-/// systems
-
-#include "../doomtype.h"
-
-#ifndef HAVE_DOSSTR_FUNCS
-
-#include
-
-int strupr(char *n)
-{
- while (*n != '\0')
- {
- *n = toupper(*n);
- n++;
- }
- return 1;
-}
-
-int strlwr(char *n)
-{
- while (*n != '\0')
- {
- *n = tolower(*n);
- n++;
- }
- return 1;
-}
-
-#endif
diff --git a/src/sdl/macosx/Srb2mac.xcodeproj/project.pbxproj b/src/sdl/macosx/Srb2mac.xcodeproj/project.pbxproj
index 9297833e26..8d2a2e7795 100644
--- a/src/sdl/macosx/Srb2mac.xcodeproj/project.pbxproj
+++ b/src/sdl/macosx/Srb2mac.xcodeproj/project.pbxproj
@@ -82,7 +82,6 @@
1E44AFA90B67CF6400BAD059 /* w_wad.c in Sources */ = {isa = PBXBuildFile; fileRef = 1E44AFA70B67CF6400BAD059 /* w_wad.c */; };
1E44AFAD0B67CF6F00BAD059 /* y_inter.c in Sources */ = {isa = PBXBuildFile; fileRef = 1E44AFAB0B67CF6F00BAD059 /* y_inter.c */; };
1E44AFB10B67CF7A00BAD059 /* z_zone.c in Sources */ = {isa = PBXBuildFile; fileRef = 1E44AFAF0B67CF7A00BAD059 /* z_zone.c */; };
- 1E44AFC40B67CFDC00BAD059 /* dosstr.c in Sources */ = {isa = PBXBuildFile; fileRef = 1E44AFB40B67CFDC00BAD059 /* dosstr.c */; };
1E44AFC50B67CFDC00BAD059 /* endtxt.c in Sources */ = {isa = PBXBuildFile; fileRef = 1E44AFB50B67CFDC00BAD059 /* endtxt.c */; };
1E44AFC70B67CFDC00BAD059 /* hwsym_sdl.c in Sources */ = {isa = PBXBuildFile; fileRef = 1E44AFB70B67CFDC00BAD059 /* hwsym_sdl.c */; };
1E44AFC90B67CFDC00BAD059 /* i_cdmus.c in Sources */ = {isa = PBXBuildFile; fileRef = 1E44AFB90B67CFDC00BAD059 /* i_cdmus.c */; };
@@ -335,7 +334,6 @@
1E44AFAC0B67CF6F00BAD059 /* y_inter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = y_inter.h; path = ../../y_inter.h; sourceTree = SOURCE_ROOT; };
1E44AFAF0B67CF7A00BAD059 /* z_zone.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = z_zone.c; path = ../../z_zone.c; sourceTree = SOURCE_ROOT; };
1E44AFB00B67CF7A00BAD059 /* z_zone.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = z_zone.h; path = ../../z_zone.h; sourceTree = SOURCE_ROOT; };
- 1E44AFB40B67CFDC00BAD059 /* dosstr.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = dosstr.c; path = ../dosstr.c; sourceTree = SOURCE_ROOT; };
1E44AFB50B67CFDC00BAD059 /* endtxt.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = endtxt.c; path = ../endtxt.c; sourceTree = SOURCE_ROOT; };
1E44AFB60B67CFDC00BAD059 /* endtxt.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = endtxt.h; path = ../endtxt.h; sourceTree = SOURCE_ROOT; };
1E44AFB70B67CFDC00BAD059 /* hwsym_sdl.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = hwsym_sdl.c; path = ../hwsym_sdl.c; sourceTree = SOURCE_ROOT; };
@@ -794,7 +792,6 @@
children = (
1E44AFE50B67D04900BAD059 /* macosx */,
1E44AFD40B67D03100BAD059 /* filter */,
- 1E44AFB40B67CFDC00BAD059 /* dosstr.c */,
1E44AFB50B67CFDC00BAD059 /* endtxt.c */,
1E44AFB60B67CFDC00BAD059 /* endtxt.h */,
1E44AFB70B67CFDC00BAD059 /* hwsym_sdl.c */,
@@ -1142,7 +1139,6 @@
1E44AFA90B67CF6400BAD059 /* w_wad.c in Sources */,
1E44AFAD0B67CF6F00BAD059 /* y_inter.c in Sources */,
1E44AFB10B67CF7A00BAD059 /* z_zone.c in Sources */,
- 1E44AFC40B67CFDC00BAD059 /* dosstr.c in Sources */,
1E44AFC50B67CFDC00BAD059 /* endtxt.c in Sources */,
1E44AFC70B67CFDC00BAD059 /* hwsym_sdl.c in Sources */,
1E44AFC90B67CFDC00BAD059 /* i_cdmus.c in Sources */,
diff --git a/src/sdl12/Makefile.cfg b/src/sdl12/Makefile.cfg
index 8d9ebc35cd..5bf536ffc7 100644
--- a/src/sdl12/Makefile.cfg
+++ b/src/sdl12/Makefile.cfg
@@ -65,7 +65,7 @@ ifndef NOASM
endif
endif
- OBJS+=$(OBJDIR)/i_video.o $(OBJDIR)/dosstr.o $(OBJDIR)/endtxt.o $(OBJDIR)/hwsym_sdl.o
+ OBJS+=$(OBJDIR)/i_video.o $(OBJDIR)/endtxt.o $(OBJDIR)/hwsym_sdl.o
OPTS+=-DDIRECTFULLSCREEN -DHAVE_SDL
diff --git a/src/sdl12/Srb2SDL-vc10.vcxproj b/src/sdl12/Srb2SDL-vc10.vcxproj
index 99916f58d4..93006a8152 100644
--- a/src/sdl12/Srb2SDL-vc10.vcxproj
+++ b/src/sdl12/Srb2SDL-vc10.vcxproj
@@ -319,16 +319,6 @@
-
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
-
%(AdditionalIncludeDirectories)
%(PreprocessorDefinitions)
diff --git a/src/sdl12/Srb2SDL-vc9.vcproj b/src/sdl12/Srb2SDL-vc9.vcproj
index fa386e381b..85e2ddaa85 100644
--- a/src/sdl12/Srb2SDL-vc9.vcproj
+++ b/src/sdl12/Srb2SDL-vc9.vcproj
@@ -418,46 +418,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/sdl12/Srb2SDL.dsp b/src/sdl12/Srb2SDL.dsp
index 879113ca2f..c067098686 100644
--- a/src/sdl12/Srb2SDL.dsp
+++ b/src/sdl12/Srb2SDL.dsp
@@ -128,10 +128,6 @@ SOURCE=.\filter\lq2x.h
# End Group
# Begin Source File
-SOURCE=.\dosstr.c
-# End Source File
-# Begin Source File
-
SOURCE=.\endtxt.c
# End Source File
# Begin Source File
diff --git a/src/sdl12/dosstr.c b/src/sdl12/dosstr.c
deleted file mode 100644
index f9bbee9b4c..0000000000
--- a/src/sdl12/dosstr.c
+++ /dev/null
@@ -1,38 +0,0 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// This file is in the public domain.
-// (Re)written by Graue in 2006.
-//
-//-----------------------------------------------------------------------------
-/// \file
-/// \brief String uppercasing/lowercasing functions for non-DOS non-Win32
-/// systems
-
-#include "../doomtype.h"
-
-#ifndef HAVE_DOSSTR_FUNCS
-
-#include
-
-int strupr(char *n)
-{
- while (*n != '\0')
- {
- *n = toupper(*n);
- n++;
- }
- return 1;
-}
-
-int strlwr(char *n)
-{
- while (*n != '\0')
- {
- *n = tolower(*n);
- n++;
- }
- return 1;
-}
-
-#endif
diff --git a/src/sdl12/macosx/Srb2mac.xcodeproj/project.pbxproj b/src/sdl12/macosx/Srb2mac.xcodeproj/project.pbxproj
index d67903819e..59a44e4421 100644
--- a/src/sdl12/macosx/Srb2mac.xcodeproj/project.pbxproj
+++ b/src/sdl12/macosx/Srb2mac.xcodeproj/project.pbxproj
@@ -82,7 +82,6 @@
1E44AFA90B67CF6400BAD059 /* w_wad.c in Sources */ = {isa = PBXBuildFile; fileRef = 1E44AFA70B67CF6400BAD059 /* w_wad.c */; };
1E44AFAD0B67CF6F00BAD059 /* y_inter.c in Sources */ = {isa = PBXBuildFile; fileRef = 1E44AFAB0B67CF6F00BAD059 /* y_inter.c */; };
1E44AFB10B67CF7A00BAD059 /* z_zone.c in Sources */ = {isa = PBXBuildFile; fileRef = 1E44AFAF0B67CF7A00BAD059 /* z_zone.c */; };
- 1E44AFC40B67CFDC00BAD059 /* dosstr.c in Sources */ = {isa = PBXBuildFile; fileRef = 1E44AFB40B67CFDC00BAD059 /* dosstr.c */; };
1E44AFC50B67CFDC00BAD059 /* endtxt.c in Sources */ = {isa = PBXBuildFile; fileRef = 1E44AFB50B67CFDC00BAD059 /* endtxt.c */; };
1E44AFC70B67CFDC00BAD059 /* hwsym_sdl.c in Sources */ = {isa = PBXBuildFile; fileRef = 1E44AFB70B67CFDC00BAD059 /* hwsym_sdl.c */; };
1E44AFC90B67CFDC00BAD059 /* i_cdmus.c in Sources */ = {isa = PBXBuildFile; fileRef = 1E44AFB90B67CFDC00BAD059 /* i_cdmus.c */; };
@@ -335,7 +334,6 @@
1E44AFAC0B67CF6F00BAD059 /* y_inter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = y_inter.h; path = ../../y_inter.h; sourceTree = SOURCE_ROOT; };
1E44AFAF0B67CF7A00BAD059 /* z_zone.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = z_zone.c; path = ../../z_zone.c; sourceTree = SOURCE_ROOT; };
1E44AFB00B67CF7A00BAD059 /* z_zone.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = z_zone.h; path = ../../z_zone.h; sourceTree = SOURCE_ROOT; };
- 1E44AFB40B67CFDC00BAD059 /* dosstr.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = dosstr.c; path = ../dosstr.c; sourceTree = SOURCE_ROOT; };
1E44AFB50B67CFDC00BAD059 /* endtxt.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = endtxt.c; path = ../endtxt.c; sourceTree = SOURCE_ROOT; };
1E44AFB60B67CFDC00BAD059 /* endtxt.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = endtxt.h; path = ../endtxt.h; sourceTree = SOURCE_ROOT; };
1E44AFB70B67CFDC00BAD059 /* hwsym_sdl.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = hwsym_sdl.c; path = ../hwsym_sdl.c; sourceTree = SOURCE_ROOT; };
@@ -794,7 +792,6 @@
children = (
1E44AFE50B67D04900BAD059 /* macosx */,
1E44AFD40B67D03100BAD059 /* filter */,
- 1E44AFB40B67CFDC00BAD059 /* dosstr.c */,
1E44AFB50B67CFDC00BAD059 /* endtxt.c */,
1E44AFB60B67CFDC00BAD059 /* endtxt.h */,
1E44AFB70B67CFDC00BAD059 /* hwsym_sdl.c */,
@@ -1142,7 +1139,6 @@
1E44AFA90B67CF6400BAD059 /* w_wad.c in Sources */,
1E44AFAD0B67CF6F00BAD059 /* y_inter.c in Sources */,
1E44AFB10B67CF7A00BAD059 /* z_zone.c in Sources */,
- 1E44AFC40B67CFDC00BAD059 /* dosstr.c in Sources */,
1E44AFC50B67CFDC00BAD059 /* endtxt.c in Sources */,
1E44AFC70B67CFDC00BAD059 /* hwsym_sdl.c in Sources */,
1E44AFC90B67CFDC00BAD059 /* i_cdmus.c in Sources */,
diff --git a/src/string.c b/src/string.c
index 2a03e87296..85bcf1ecde 100644
--- a/src/string.c
+++ b/src/string.c
@@ -14,6 +14,33 @@
#include
#include
#include "doomdef.h"
+#include "doomtype.h"
+
+#ifndef HAVE_DOSSTR_FUNCS
+
+#include
+
+int strupr(char *n)
+{
+ while (*n != '\0')
+ {
+ *n = toupper(*n);
+ n++;
+ }
+ return 1;
+}
+
+int strlwr(char *n)
+{
+ while (*n != '\0')
+ {
+ *n = tolower(*n);
+ n++;
+ }
+ return 1;
+}
+
+#endif
#if !defined (__APPLE__)
diff --git a/src/win32ce/wince_stuff.c b/src/win32ce/wince_stuff.c
index eb02e8ae28..7e6d0a4298 100644
--- a/src/win32ce/wince_stuff.c
+++ b/src/win32ce/wince_stuff.c
@@ -4,22 +4,6 @@
#include
#include "wince_stuff.h"
-char* _strlwr( char *string )
-{
- int i;
-
- if(!string)
- return NULL;
-
- for(i=0 ; i < strlen(string); i++)
- {
- if((*(string + i) >= 65) && (*(string + i) <= 90))
- *(string+i) = *(string+i) + 32;
- }
-
- return string;
-}
-
int _strnicmp(const char *first,const char *last, size_t count )
{
int f, l;
@@ -56,25 +40,6 @@ int _stricmp( const char *dst, const char *src )
}
-char* _strupr( char *string )
-{
- int i;
-
- if(!string)
- return NULL;
-
- for(i=0 ; i < strlen(string); i++)
- {
- if((*(string + i) >= 97) && (*(string + i) <= 122))
- *(string + i) = *(string + i) - 32;
- }
-
- return string;
-}
-
-
-
-
int isprint( int c )
{
if(c <= 31)
diff --git a/src/win32ce/wince_stuff.h b/src/win32ce/wince_stuff.h
index 5eab748482..b871538e26 100644
--- a/src/win32ce/wince_stuff.h
+++ b/src/win32ce/wince_stuff.h
@@ -2,10 +2,8 @@
#define WINCE_STUFF_H
/*
-char* _strlwr(char *string);
int _strnicmp(const char *string1,const char *string2, size_t count );
int _stricmp( const char *string1, const char *string2 );
-char* _strupr( char *string );
char *_strdup( const char *strSource );
char *strrchr( const char *string, int c );