fix for building on windows, clear some warnings too
This commit is contained in:
@@ -301,7 +301,7 @@ char* dirname(char *path)
|
||||
{
|
||||
char *p;
|
||||
if( path == NULL || *path == '\0' )
|
||||
return ".";
|
||||
return ".";
|
||||
p = path + strlen(path) - 1;
|
||||
while( *p == '/' ) {
|
||||
if( p == path )
|
||||
@@ -309,11 +309,11 @@ char* dirname(char *path)
|
||||
*p-- = '\0';
|
||||
}
|
||||
while( p >= path && *p != '/' )
|
||||
p--;
|
||||
p--;
|
||||
return
|
||||
p < path ? "." :
|
||||
p == path ? "/" :
|
||||
(*p = '\0', path);
|
||||
p < path ? "." :
|
||||
p == path ? "/" :
|
||||
(*p = '\0', path);
|
||||
}
|
||||
/* End of copied part */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user