New ACC system.
committer: mfx <mfx> 1048662134 +0000
This commit is contained in:
+13
-7
@@ -238,16 +238,22 @@ int upx_tolower(int c)
|
||||
// filename util
|
||||
**************************************************************************/
|
||||
|
||||
static const char dir_sep[] = DIR_SEP;
|
||||
#if (ACC_OS_CYGWIN || ACC_OS_DOS16 || ACC_OS_DOS32 || ACC_OS_EMX || ACC_OS_TOS || ACC_OS_WIN16 || ACC_OS_WIN32 || ACC_OS_WIN64)
|
||||
|
||||
static const char dir_sep[] = "/\\";
|
||||
#define fn_is_drive(s) (s[0] && s[1] == ':')
|
||||
#define fn_is_sep(c) (strchr(dir_sep,c) != NULL)
|
||||
#define fn_skip_drive(s) (fn_is_drive(s) ? (s) + 2 : (s))
|
||||
#define fn_tolower(c) (tolower(((unsigned char)(c))))
|
||||
|
||||
#if defined(DOSISH)
|
||||
#define fn_is_drive(n) (n[0] && n[1] == ':')
|
||||
#define fn_skip_drive(n) (fn_is_drive(n) ? (n) + 2 : (n))
|
||||
#else
|
||||
#define fn_is_drive(n) (0)
|
||||
#define fn_skip_drive(n) (n)
|
||||
|
||||
static const char dir_sep[] = "/";
|
||||
#define fn_is_drive(s) (0)
|
||||
#define fn_is_sep(c) ((c) == '/')
|
||||
#define fn_skip_drive(s) (s)
|
||||
#define fn_tolower(c) (c)
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -324,7 +330,7 @@ int fn_strcmp(const char *n1, const char *n2)
|
||||
bool fn_is_same_file(const char *n1, const char *n2)
|
||||
{
|
||||
/* very simple... */
|
||||
if (fn_strcmp(n1,n2) == 0)
|
||||
if (fn_strcmp(n1, n2) == 0)
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user