From 62e8d8f44e8b3f12ddc6f98ef2a93336cbdc926e Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 25 Jul 2015 00:58:51 +0200 Subject: [PATCH] Cleanups --- mednafen/general.cpp | 48 -------------------------------------------- mednafen/general.h | 6 ------ 2 files changed, 54 deletions(-) diff --git a/mednafen/general.cpp b/mednafen/general.cpp index 4a91c36..6d372cf 100644 --- a/mednafen/general.cpp +++ b/mednafen/general.cpp @@ -171,51 +171,3 @@ const char * GetFNComponent(const char *str) else return (str); } - -// Remove whitespace from beginning of string -void MDFN_ltrim(char *string) -{ - int32 di, si; - bool InWhitespace = TRUE; - - di = si = 0; - - while(string[si]) - { - if(InWhitespace && (string[si] == ' ' || string[si] == '\r' || string[si] == '\n' || string[si] == '\t' || string[si] == 0x0b)) - { - - } - else - { - InWhitespace = FALSE; - string[di] = string[si]; - di++; - } - si++; - } - string[di] = 0; -} - -// Remove whitespace from end of string -void MDFN_rtrim(char *string) -{ - int32 len = strlen(string); - - if(len) - { - for(int32 x = len - 1; x >= 0; x--) - { - if(string[x] == ' ' || string[x] == '\r' || string[x] == '\n' || string[x] == '\t' || string[x] == 0x0b) - string[x] = 0; - else - break; - } - } -} - -void MDFN_trim(char *string) -{ - MDFN_rtrim(string); - MDFN_ltrim(string); -} diff --git a/mednafen/general.h b/mednafen/general.h index 65c1f25..d74b188 100644 --- a/mednafen/general.h +++ b/mednafen/general.h @@ -3,8 +3,6 @@ #include -extern uint32 MDFN_RoundUpPow2(uint32); - void GetFileBase(const char *f); // File-inclusion for-read-only path, for PSF and CUE/TOC sheet usage. @@ -12,10 +10,6 @@ bool MDFN_IsFIROPSafe(const std::string &path); std::string MDFN_MakeFName(int type, int id1, const char *cd1); -void MDFN_ltrim(char *string); -void MDFN_rtrim(char *string); -void MDFN_trim(char *string); - typedef enum { MDFNMKF_STATE = 0,