mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 09:04:13 +00:00
make bitfield flags obey consistency standards for BOOL ... set based on a C truth value, get a YES or a NO
This commit is contained in:
parent
8cb9495ad7
commit
4a03bbc328
1 changed files with 10 additions and 11 deletions
|
@ -2631,7 +2631,7 @@ static inline void gsedRelease(GSEnumeratedDirectory X)
|
|||
|
||||
- (void) _setSkipHidden: (BOOL)flag
|
||||
{
|
||||
_flags.skipHidden = flag;
|
||||
_flags.skipHidden = flag ? 1 : 0;
|
||||
}
|
||||
|
||||
- (void) _setErrorHandler: (GSDirEnumErrorHandler) handler
|
||||
|
@ -2651,17 +2651,17 @@ static inline void gsedRelease(GSEnumeratedDirectory X)
|
|||
{
|
||||
//TODO: the justContents flag is currently basically useless and should be
|
||||
// removed
|
||||
_DIR *dir_pointer;
|
||||
_DIR *dir_pointer;
|
||||
const GSNativeChar *localPath;
|
||||
|
||||
_mgr = RETAIN(mgr);
|
||||
_stack = NSZoneMalloc([self zone], sizeof(GSIArray_t));
|
||||
GSIArrayInitWithZoneAndCapacity(_stack, [self zone], 64);
|
||||
|
||||
_flags.isRecursive = recurse;
|
||||
_flags.isFollowing = follow;
|
||||
_flags.justContents = justContents;
|
||||
_flags.skipHidden = skipHidden;
|
||||
_flags.isRecursive = recurse ? 1 : 0;
|
||||
_flags.isFollowing = follow ? 1 : 0;
|
||||
_flags.justContents = justContents ? 1 : 0;
|
||||
_flags.skipHidden = skipHidden ? 1 : 0;
|
||||
_errorHandler = handler;
|
||||
|
||||
_topPath = [[NSString alloc] initWithString: path];
|
||||
|
@ -2745,7 +2745,7 @@ static inline void gsedRelease(GSEnumeratedDirectory X)
|
|||
- (NSDictionary*) directoryAttributes
|
||||
{
|
||||
return [_mgr fileAttributesAtPath: _topPath
|
||||
traverseLink: _flags.isFollowing];
|
||||
traverseLink: _flags.isFollowing ? YES : NO];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2757,7 +2757,7 @@ static inline void gsedRelease(GSEnumeratedDirectory X)
|
|||
- (NSDictionary*) fileAttributes
|
||||
{
|
||||
return [_mgr fileAttributesAtPath: _currentFilePath
|
||||
traverseLink: _flags.isFollowing];
|
||||
traverseLink: _flags.isFollowing ? YES : NO];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2825,8 +2825,7 @@ static inline void gsedRelease(GSEnumeratedDirectory X)
|
|||
if (dirname)
|
||||
{
|
||||
// Skip it if it is hidden and flag is yes...
|
||||
if (dirname[0] == '.'
|
||||
&& _flags.skipHidden == YES)
|
||||
if (dirname[0] == '.' && _flags.skipHidden)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
@ -2868,7 +2867,7 @@ static inline void gsedRelease(GSEnumeratedDirectory X)
|
|||
_currentFilePath = RETAIN([_topPath stringByAppendingPathComponent:
|
||||
returnFileName]);
|
||||
|
||||
if (_flags.isRecursive == YES)
|
||||
if (_flags.isRecursive)
|
||||
{
|
||||
// Do not follow links
|
||||
#ifdef S_IFLNK
|
||||
|
|
Loading…
Reference in a new issue