Author: rmottola Date: Tue May 26 02:18:08 2015 New Revision: 38547 URL: http://svn.gna.org/viewcvs/gnustep?rev=38547&view=rev Log: cleanup, use NSUInteger
Modified: apps/gworkspace/trunk/Tools/fswatcher/fswatcher-inotify.m apps/gworkspace/trunk/Tools/fswatcher/fswatcher.m Modified: apps/gworkspace/trunk/Tools/fswatcher/fswatcher-inotify.m URL: http://svn.gna.org/viewcvs/gnustep/apps/gworkspace/trunk/Tools/fswatcher/fswatcher-inotify.m?rev=38547&r1=38546&r2=38547&view=diff ============================================================================== --- apps/gworkspace/trunk/Tools/fswatcher/fswatcher-inotify.m (original) +++ apps/gworkspace/trunk/Tools/fswatcher/fswatcher-inotify.m Tue May 26 02:18:08 2015 @@ -24,6 +24,7 @@ #import "fswatcher-inotify.h" #include "config.h" +#include <unistd.h> #define GWDebugLog(format, args...) \ do { if (GW_DEBUG_LOG) \ @@ -121,7 +122,7 @@ - (void)dealloc { - int i; + NSUInteger i; for (i = 0; i < [clientsInfo count]; i++) { @@ -305,7 +306,7 @@ { NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; id entry; - unsigned i; + NSUInteger i; [defaults synchronize]; @@ -372,7 +373,7 @@ NSArray *excluded = [info objectForKey: @"GSMetadataExcludedPaths"]; NSArray *suffixes = [info objectForKey: @"GSMetadataExcludedSuffixes"]; - unsigned i; + NSUInteger i; emptyTreeWithBase(includePathsTree); @@ -393,19 +394,21 @@ - (oneway void)registerClient:(id <FSWClientProtocol>)client isGlobalWatcher:(BOOL)global { - NSConnection *connection = [(NSDistantObject *)client connectionForProxy]; + NSConnection *connection = [(NSDistantObject *)client connectionForProxy]; FSWClientInfo *info = [self clientInfoWithConnection: connection]; - if (info == nil) { - [NSException raise: NSInternalInconsistencyException - format: @"registration with unknown connection"]; - } - - if ([info client] != nil) { - [NSException raise: NSInternalInconsistencyException - format: @"registration with registered client"]; - } - + if (info == nil) + { + [NSException raise: NSInternalInconsistencyException + format: @"registration with unknown connection"]; + } + + if ([info client] != nil) + { + [NSException raise: NSInternalInconsistencyException + format: @"registration with registered client"]; + } + if ([(id)client isProxy] == YES) { [(id)client setProtocolForProxy: @protocol(FSWClientProtocol)]; [info setClient: client]; @@ -415,13 +418,13 @@ - (oneway void)unregisterClient:(id <FSWClientProtocol>)client { - NSConnection *connection = [(NSDistantObject *)client connectionForProxy]; + NSConnection *connection = [(NSDistantObject *)client connectionForProxy]; FSWClientInfo *info = [self clientInfoWithConnection: connection]; NSSet *wpaths; NSEnumerator *enumerator; NSString *wpath; - if (info == nil) { + if (info == nil) { [NSException raise: NSInternalInconsistencyException format: @"unregistration with unknown connection"]; } @@ -459,7 +462,7 @@ - (FSWClientInfo *)clientInfoWithConnection:(NSConnection *)connection { - int i; + NSUInteger i; for (i = 0; i < [clientsInfo count]; i++) { FSWClientInfo *info = [clientsInfo objectAtIndex: i]; @@ -474,27 +477,27 @@ - (FSWClientInfo *)clientInfoWithRemote:(id)remote { - int i; - - for (i = 0; i < [clientsInfo count]; i++) { - FSWClientInfo *info = [clientsInfo objectAtIndex: i]; - - if ([info client] == remote) { - return info; - } - } - - return nil; + NSUInteger i; + + for (i = 0; i < [clientsInfo count]; i++) + { + FSWClientInfo *info = [clientsInfo objectAtIndex: i]; + + if ([info client] == remote) + return info; + } + + return nil; } - (oneway void)client:(id <FSWClientProtocol>)client addWatcherForPath:(NSString *)path { - NSConnection *connection = [(NSDistantObject *)client connectionForProxy]; + NSConnection *connection = [(NSDistantObject *)client connectionForProxy]; FSWClientInfo *info = [self clientInfoWithConnection: connection]; Watcher *watcher = [self watcherForPath: path]; - if (info == nil) { + if (info == nil) { [NSException raise: NSInternalInconsistencyException format: @"adding watcher from unknown connection"]; } @@ -540,7 +543,7 @@ - (oneway void)client:(id <FSWClientProtocol>)client removeWatcherForPath:(NSString *)path { - NSConnection *connection = [(NSDistantObject *)client connectionForProxy]; + NSConnection *connection = [(NSDistantObject *)client connectionForProxy]; FSWClientInfo *info = [self clientInfoWithConnection: connection]; Watcher *watcher = [self watcherForPath: path]; @@ -597,7 +600,7 @@ CREATE_AUTORELEASE_POOL(pool); NSString *path = [info objectForKey: @"path"]; NSData *data = [NSArchiver archivedDataWithRootObject: info]; - int i; + NSUInteger i; for (i = 0; i < [clientsInfo count]; i++) { FSWClientInfo *clinfo = [clientsInfo objectAtIndex: i]; @@ -612,7 +615,7 @@ - (void)notifyGlobalWatchingClients:(NSDictionary *)info { - int i; + NSUInteger i; for (i = 0; i < [clientsInfo count]; i++) { FSWClientInfo *clinfo = [clientsInfo objectAtIndex: i]; Modified: apps/gworkspace/trunk/Tools/fswatcher/fswatcher.m URL: http://svn.gna.org/viewcvs/gnustep/apps/gworkspace/trunk/Tools/fswatcher/fswatcher.m?rev=38547&r1=38546&r2=38547&view=diff ============================================================================== --- apps/gworkspace/trunk/Tools/fswatcher/fswatcher.m (original) +++ apps/gworkspace/trunk/Tools/fswatcher/fswatcher.m Tue May 26 02:18:08 2015 @@ -114,7 +114,7 @@ - (void)dealloc { - int i; + NSUInteger i; for (i = 0; i < [clientsInfo count]; i++) { @@ -418,7 +418,7 @@ - (FSWClientInfo *)clientInfoWithConnection:(NSConnection *)connection { - int i; + NSUInteger i; for (i = 0; i < [clientsInfo count]; i++) { @@ -434,17 +434,17 @@ - (FSWClientInfo *)clientInfoWithRemote:(id)remote { - int i; - - for (i = 0; i < [clientsInfo count]; i++) { - FSWClientInfo *info = [clientsInfo objectAtIndex: i]; - - if ([info client] == remote) { - return info; - } - } - - return nil; + NSUInteger i; + + for (i = 0; i < [clientsInfo count]; i++) + { + FSWClientInfo *info = [clientsInfo objectAtIndex: i]; + + if ([info client] == remote) + return info; + } + + return nil; } - (oneway void)client:(id <FSWClientProtocol>)client _______________________________________________ Gnustep-cvs mailing list Gnustep-cvs@gna.org https://mail.gna.org/listinfo/gnustep-cvs