ERR: Borland fix for stricmp. ERR: removed itk dependencies.
This commit is contained in:
parent
756653cbb8
commit
a4f49798c4
|
@ -1032,8 +1032,12 @@ unsigned long SystemTools::FileLength(const char* filename)
|
||||||
|
|
||||||
int SystemTools::Strucmp(const char *s1, const char *s2)
|
int SystemTools::Strucmp(const char *s1, const char *s2)
|
||||||
{
|
{
|
||||||
#ifdef _WIN32
|
#if defined(_WIN32)
|
||||||
|
#ifdef __BORLANDC__
|
||||||
|
return stricmp(s1,s2);
|
||||||
|
#else
|
||||||
return _stricmp(s1,s2);
|
return _stricmp(s1,s2);
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
return strcasecmp(s1,s2);
|
return strcasecmp(s1,s2);
|
||||||
#endif
|
#endif
|
||||||
|
@ -1069,9 +1073,9 @@ char *SystemTools
|
||||||
::RealPath(const char *path, char *resolved_path)
|
::RealPath(const char *path, char *resolved_path)
|
||||||
{
|
{
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
char pathpart[itk::IOCommon::ITK_MAXPATHLEN];
|
char pathpart[4096];
|
||||||
strcpy(pathpart,path);
|
strcpy(pathpart,path);
|
||||||
char fnamepart[itk::IOCommon::ITK_MAXPATHLEN];
|
char fnamepart[4096];
|
||||||
char *slash;
|
char *slash;
|
||||||
|
|
||||||
if((slash = strrchr(pathpart,'/')) == NULL)
|
if((slash = strrchr(pathpart,'/')) == NULL)
|
||||||
|
@ -1089,7 +1093,7 @@ char *SystemTools
|
||||||
*slash = '\0';
|
*slash = '\0';
|
||||||
strcpy(fnamepart,slash+1);
|
strcpy(fnamepart,slash+1);
|
||||||
|
|
||||||
char savedir[itk::IOCommon::ITK_MAXPATHLEN];
|
char savedir[4096];
|
||||||
Getcwd(savedir,sizeof(savedir));
|
Getcwd(savedir,sizeof(savedir));
|
||||||
Chdir(pathpart);
|
Chdir(pathpart);
|
||||||
Getcwd(pathpart,sizeof(pathpart));
|
Getcwd(pathpart,sizeof(pathpart));
|
||||||
|
|
Loading…
Reference in New Issue