fix for building on windows, clear some warnings too

This commit is contained in:
2011-09-27 01:32:27 +00:00
parent 2170301204
commit f4dec97cef
6 changed files with 23 additions and 12 deletions

View File

@@ -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 */