mirror of
https://github.com/jfdelnero/HxCFloppyEmulator.git
synced 2026-07-28 04:06:36 +00:00
Define DIR_SEPARATOR to deal with the Windows / Linux folder separators.
git-svn-id: svn://svn.code.sf.net/p/hxcfloppyemu/code/HxCFloppyEmulator/libhxcadaptor/trunk@1755 63fa2f70-6a9b-4bc4-b855-9c6a949b1d69
This commit is contained in:
@@ -408,12 +408,12 @@ char * hxc_getfilenamebase(char * fullpath,char * filenamebase)
|
||||
if(len)
|
||||
{
|
||||
i=len-1;
|
||||
while(i && (fullpath[i]!='\\' && fullpath[i]!='/' && fullpath[i]!=':') )
|
||||
while(i && ( fullpath[i] != DIR_SEPARATOR_CHAR && fullpath[i]!=':') )
|
||||
{
|
||||
i--;
|
||||
}
|
||||
|
||||
if( fullpath[i]=='\\' || fullpath[i]=='/' || fullpath[i]==':' )
|
||||
if( fullpath[i] == DIR_SEPARATOR_CHAR || fullpath[i]==':' )
|
||||
{
|
||||
i++;
|
||||
}
|
||||
|
||||
@@ -2,6 +2,14 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef WIN32
|
||||
#define DIR_SEPARATOR "\\"
|
||||
#define DIR_SEPARATOR_CHAR '\\'
|
||||
#else
|
||||
#define DIR_SEPARATOR "/"
|
||||
#define DIR_SEPARATOR_CHAR '/'
|
||||
#endif
|
||||
|
||||
/////////////// Thread functions ////////////////
|
||||
|
||||
typedef int (*THREADFUNCTION) (void* floppyemulator,void* hwemulator);
|
||||
|
||||
Reference in New Issue
Block a user