This commit is contained in:
twinaphex 2015-07-25 01:01:25 +02:00
parent b877588e6d
commit 0da0eefa18
2 changed files with 0 additions and 58 deletions

View File

@ -22,15 +22,11 @@
#include <sys/types.h>
#include <string>
#include "general.h"
#include "state.h"
#include "md5.h"
using namespace std;
const char * GetFNComponent(const char *str)
{
const char *tp1;
@ -53,51 +49,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);
}

View File

@ -3,8 +3,6 @@
#include <string>
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,