Revision: 5315
          http://skim-app.svn.sourceforge.net/skim-app/?rev=5315&view=rev
Author:   hofman
Date:     2009-04-16 16:34:06 +0000 (Thu, 16 Apr 2009)

Log Message:
-----------
Use new integer types also in 3rd party code

Modified Paths:
--------------
    trunk/vendorsrc/martinkahr/RemoteControlWrapper/GlobalKeyboardDevice.h
    trunk/vendorsrc/martinkahr/RemoteControlWrapper/GlobalKeyboardDevice.m
    trunk/vendorsrc/martinkahr/RemoteControlWrapper/HIDRemoteControlDevice.h
    trunk/vendorsrc/martinkahr/RemoteControlWrapper/HIDRemoteControlDevice.m
    trunk/vendorsrc/martinkahr/RemoteControlWrapper/MultiClickRemoteBehavior.h
    trunk/vendorsrc/martinkahr/RemoteControlWrapper/MultiClickRemoteBehavior.m
    trunk/vendorsrc/martinkahr/RemoteControlWrapper/RemoteControlContainer.h
    trunk/vendorsrc/martinkahr/RemoteControlWrapper/RemoteControlContainer.m
    trunk/vendorsrc/ulikusterer/UKKQueue.h
    trunk/vendorsrc/ulikusterer/UKKQueue.m

Modified: trunk/vendorsrc/martinkahr/RemoteControlWrapper/GlobalKeyboardDevice.h
===================================================================
--- trunk/vendorsrc/martinkahr/RemoteControlWrapper/GlobalKeyboardDevice.h      
2009-04-16 15:35:46 UTC (rev 5314)
+++ trunk/vendorsrc/martinkahr/RemoteControlWrapper/GlobalKeyboardDevice.h      
2009-04-16 16:34:06 UTC (rev 5315)
@@ -40,8 +40,8 @@
        
 }
 
-- (void) mapRemoteButton: (RemoteControlEventIdentifier) 
remoteButtonIdentifier defaultKeycode: (unsigned int) defaultKeycode 
defaultModifiers: (unsigned int) defaultModifiers;
+- (void) mapRemoteButton: (RemoteControlEventIdentifier) 
remoteButtonIdentifier defaultKeycode: (NSUInteger) defaultKeycode 
defaultModifiers: (NSUInteger) defaultModifiers;
 
-- (BOOL)registerHotKeyCode: (unsigned int) keycode modifiers: (unsigned int) 
modifiers remoteEventIdentifier: (RemoteControlEventIdentifier) identifier;
+- (BOOL)registerHotKeyCode: (NSUInteger) keycode modifiers: (NSUInteger) 
modifiers remoteEventIdentifier: (RemoteControlEventIdentifier) identifier;
 
 @end

Modified: trunk/vendorsrc/martinkahr/RemoteControlWrapper/GlobalKeyboardDevice.m
===================================================================
--- trunk/vendorsrc/martinkahr/RemoteControlWrapper/GlobalKeyboardDevice.m      
2009-04-16 15:35:46 UTC (rev 5314)
+++ trunk/vendorsrc/martinkahr/RemoteControlWrapper/GlobalKeyboardDevice.m      
2009-04-16 16:34:06 UTC (rev 5315)
@@ -64,7 +64,7 @@
        if (self = [super initWithDelegate: _remoteControlDelegate]) {
                hotKeyRemoteEventMapping = [[NSMutableDictionary alloc] init];
                
-               unsigned int modifiers = cmdKey + shiftKey /*+ optionKey*/ + 
controlKey;
+               NSUInteger modifiers = cmdKey + shiftKey /*+ optionKey*/ + 
controlKey;
                                
                [self mapRemoteButton:kRemoteButtonPlus                 
defaultKeycode:F1 defaultModifiers:modifiers];
                [self mapRemoteButton:kRemoteButtonMinus                
defaultKeycode:F2 defaultModifiers:modifiers];
@@ -82,7 +82,7 @@
        [super dealloc];
 }
 
-- (void) mapRemoteButton: (RemoteControlEventIdentifier) 
remoteButtonIdentifier defaultKeycode: (unsigned int) defaultKeycode 
defaultModifiers: (unsigned int) defaultModifiers {
+- (void) mapRemoteButton: (RemoteControlEventIdentifier) 
remoteButtonIdentifier defaultKeycode: (NSUInteger) defaultKeycode 
defaultModifiers: (NSUInteger) defaultModifiers {
        NSString* defaultsKey = nil;    
        
        switch(remoteButtonIdentifier) {
@@ -114,10 +114,10 @@
        NSNumber* modifiersCfg = [[NSUserDefaults standardUserDefaults] 
objectForKey: [NSString stringWithFormat: 
@"mac.remotecontrols.globalkeyboarddevic...@_modifiers", defaultsKey]];
        NSNumber* keycodeCfg   = [[NSUserDefaults standardUserDefaults] 
objectForKey: [NSString stringWithFormat: 
@"mac.remotecontrols.globalkeyboarddevic...@_keycode", defaultsKey]];
        
-       unsigned int modifiers = defaultModifiers;
+       NSUInteger modifiers = defaultModifiers;
        if (modifiersCfg) modifiers = [modifiersCfg unsignedIntValue];
        
-       unsigned int keycode = defaultKeycode;
+       NSUInteger keycode = defaultKeycode;
        if (keycodeCfg) keycode = [keycodeCfg unsignedIntValue];
                                  
     [self registerHotKeyCode: keycode  modifiers: modifiers 
remoteEventIdentifier: remoteButtonIdentifier];
@@ -166,7 +166,7 @@
        return "Keyboard";
 }
 
-- (BOOL)registerHotKeyCode: (unsigned int) keycode modifiers: (unsigned int) 
modifiers remoteEventIdentifier: (RemoteControlEventIdentifier) identifier {    
  
+- (BOOL)registerHotKeyCode: (NSUInteger) keycode modifiers: (NSUInteger) 
modifiers remoteEventIdentifier: (RemoteControlEventIdentifier) identifier {  
        OSStatus err;
        EventHotKeyID hotKeyID;
        EventHotKeyRef carbonHotKey;
@@ -208,7 +208,7 @@
 }
 */
 
-- (RemoteControlEventIdentifier) remoteControlEventIdentifierForID: (unsigned 
int) anId {
+- (RemoteControlEventIdentifier) remoteControlEventIdentifierForID: 
(NSUInteger) anId {
        NSNumber* remoteEventIdentifier = [hotKeyRemoteEventMapping 
objectForKey:[NSNumber numberWithUnsignedInt: anId]];
        return [remoteEventIdentifier unsignedIntValue];
 }

Modified: 
trunk/vendorsrc/martinkahr/RemoteControlWrapper/HIDRemoteControlDevice.h
===================================================================
--- trunk/vendorsrc/martinkahr/RemoteControlWrapper/HIDRemoteControlDevice.h    
2009-04-16 15:35:46 UTC (rev 5314)
+++ trunk/vendorsrc/martinkahr/RemoteControlWrapper/HIDRemoteControlDevice.h    
2009-04-16 16:34:06 UTC (rev 5315)
@@ -44,7 +44,7 @@
        BOOL openInExclusiveMode;
        BOOL processesBacklog;  
        
-       int supportedButtonEvents;
+       NSInteger supportedButtonEvents;
 }
 
 // When your application needs to much time on the main thread when processing 
an event other events

Modified: 
trunk/vendorsrc/martinkahr/RemoteControlWrapper/HIDRemoteControlDevice.m
===================================================================
--- trunk/vendorsrc/martinkahr/RemoteControlWrapper/HIDRemoteControlDevice.m    
2009-04-16 15:35:46 UTC (rev 5314)
+++ trunk/vendorsrc/martinkahr/RemoteControlWrapper/HIDRemoteControlDevice.m    
2009-04-16 16:34:06 UTC (rev 5315)
@@ -107,7 +107,7 @@
 
 - (void) setCookieMappingInDictionary: (NSMutableDictionary*) 
cookieToButtonMapping {
 }
-- (int) remoteIdSwitchCookie {
+- (NSInteger) remoteIdSwitchCookie {
        return 0;
 }
 
@@ -343,7 +343,7 @@
        
                //printf("%d %d %d\n", event.elementCookie, event.value, 
event.longValue);              
                
-               if (((int)event.elementCookie)!=5) {
+               if (((NSInteger)event.elementCookie)!=5) {
                        sumOfValues+=event.value;
                        [cookieString appendString:[NSString 
stringWithFormat:@"%d_", event.elementCookie]];
                }
@@ -436,7 +436,7 @@
                        if (object == nil || ![object isKindOfClass:[NSNumber 
class]]) continue;                        
                        usagePage = [object longValue];
 
-                       [allCookies addObject: [NSNumber 
numberWithInt:(int)cookie]];
+                       [allCookies addObject: [NSNumber 
numberWithInt:(NSInteger)cookie]];
                }
        } else {
                return NO;

Modified: 
trunk/vendorsrc/martinkahr/RemoteControlWrapper/MultiClickRemoteBehavior.h
===================================================================
--- trunk/vendorsrc/martinkahr/RemoteControlWrapper/MultiClickRemoteBehavior.h  
2009-04-16 15:35:46 UTC (rev 5314)
+++ trunk/vendorsrc/martinkahr/RemoteControlWrapper/MultiClickRemoteBehavior.h  
2009-04-16 16:34:06 UTC (rev 5315)
@@ -43,11 +43,11 @@
        NSTimeInterval lastHoldEventTime;       
        
        // state for multi click
-       unsigned int clickCountEnabledButtons;
+       NSUInteger clickCountEnabledButtons;
        NSTimeInterval maxClickTimeDifference;
        NSTimeInterval lastClickCountEventTime; 
        RemoteControlEventIdentifier lastClickCountEvent;
-       unsigned int eventClickCount;   
+       NSUInteger eventClickCount;     
 }
 
 - (id) init;
@@ -71,8 +71,8 @@
 - (BOOL) clickCountingEnabled;
 - (void) setClickCountingEnabled: (BOOL) value;
 
-- (unsigned int) clickCountEnabledButtons;
-- (void) setClickCountEnabledButtons: (unsigned int)value;
+- (NSUInteger) clickCountEnabledButtons;
+- (void) setClickCountEnabledButtons: (NSUInteger)value;
 
 // the maximum time difference till which clicks are recognized as multi clicks
 - (NSTimeInterval) maximumClickCountTimeDifference;
@@ -85,6 +85,6 @@
  */
 @interface NSObject(MultiClickRemoteBehaviorDelegate)
 
-- (void) remoteButton: (RemoteControlEventIdentifier)buttonIdentifier 
pressedDown: (BOOL) pressedDown clickCount: (unsigned int) count;
+- (void) remoteButton: (RemoteControlEventIdentifier)buttonIdentifier 
pressedDown: (BOOL) pressedDown clickCount: (NSUInteger) count;
 
 @end

Modified: 
trunk/vendorsrc/martinkahr/RemoteControlWrapper/MultiClickRemoteBehavior.m
===================================================================
--- trunk/vendorsrc/martinkahr/RemoteControlWrapper/MultiClickRemoteBehavior.m  
2009-04-16 15:35:46 UTC (rev 5314)
+++ trunk/vendorsrc/martinkahr/RemoteControlWrapper/MultiClickRemoteBehavior.m  
2009-04-16 16:34:06 UTC (rev 5315)
@@ -78,10 +78,10 @@
        }
 }
 
-- (unsigned int) clickCountEnabledButtons {
+- (NSUInteger) clickCountEnabledButtons {
        return clickCountEnabledButtons;
 }
-- (void) setClickCountEnabledButtons: (unsigned int)value {
+- (void) setClickCountEnabledButtons: (NSUInteger)value {
        clickCountEnabledButtons = value;
 }
 
@@ -110,7 +110,7 @@
        NSTimeInterval eventTimePoint = [[values objectAtIndex: 1] doubleValue];
        
        BOOL finishedClicking = NO;
-       int finalClickCount = eventClickCount;  
+       NSInteger finalClickCount = eventClickCount;    
        
        @synchronized(self) {
                finishedClicking = (event != lastClickCountEvent || 
fabs(eventTimePoint - lastClickCountEventTime) < 0.001);

Modified: 
trunk/vendorsrc/martinkahr/RemoteControlWrapper/RemoteControlContainer.h
===================================================================
--- trunk/vendorsrc/martinkahr/RemoteControlWrapper/RemoteControlContainer.h    
2009-04-16 15:35:46 UTC (rev 5314)
+++ trunk/vendorsrc/martinkahr/RemoteControlWrapper/RemoteControlContainer.h    
2009-04-16 16:34:06 UTC (rev 5315)
@@ -34,6 +34,6 @@
 }
 
 - (BOOL) instantiateAndAddRemoteControlDeviceWithClass: (Class) clazz;
-- (unsigned int) count;
+- (NSUInteger) count;
 
 @end

Modified: 
trunk/vendorsrc/martinkahr/RemoteControlWrapper/RemoteControlContainer.m
===================================================================
--- trunk/vendorsrc/martinkahr/RemoteControlWrapper/RemoteControlContainer.m    
2009-04-16 15:35:46 UTC (rev 5314)
+++ trunk/vendorsrc/martinkahr/RemoteControlWrapper/RemoteControlContainer.m    
2009-04-16 16:34:06 UTC (rev 5315)
@@ -40,7 +40,7 @@
 }
 
 - (void) dealloc {
-       unsigned int i;
+       NSUInteger i;
        for(i=0; i < [remoteControls count]; i++) {
                [[remoteControls objectAtIndex: i] removeObserver: self 
forKeyPath:@"listeningToRemote"];
        }       
@@ -52,7 +52,7 @@
 - (void) reset {
        [self willChangeValueForKey:@"listeningToRemote"];
     listeningToRemote = NO;
-    unsigned int i;
+    NSUInteger i;
        for(i=0; i < [remoteControls count]; i++) {
                if ([[remoteControls objectAtIndex: i] isListeningToRemote]) {
                        listeningToRemote = YES;
@@ -74,7 +74,7 @@
        return NO;      
 }
 
-- (unsigned int) count {
+- (NSUInteger) count {
        return [remoteControls count];
 }
 
@@ -87,7 +87,7 @@
 }
 
 - (void) setListeningToRemote: (BOOL) value {
-       unsigned int i;
+       NSUInteger i;
        for(i=0; i < [remoteControls count]; i++) {
                [[remoteControls objectAtIndex: i] setListeningToRemote: value];
        }
@@ -98,13 +98,13 @@
 }
 
 - (IBAction) startListening: (id) sender {
-       unsigned int i;
+       NSUInteger i;
        for(i=0; i < [remoteControls count]; i++) {
                [[remoteControls objectAtIndex: i] startListening: sender];
        }       
 }
 - (IBAction) stopListening: (id) sender {
-       unsigned int i;
+       NSUInteger i;
        for(i=0; i < [remoteControls count]; i++) {
                [[remoteControls objectAtIndex: i] stopListening: sender];
        }       
@@ -112,14 +112,14 @@
 
 - (BOOL) isOpenInExclusiveMode {
        BOOL mode = YES;
-       unsigned int i;
+       NSUInteger i;
        for(i=0; i < [remoteControls count]; i++) {
                mode = mode && ([[remoteControls objectAtIndex: i] 
isOpenInExclusiveMode]);
        }
        return mode;    
 }
 - (void) setOpenInExclusiveMode: (BOOL) value {
-       unsigned int i;
+       NSUInteger i;
        for(i=0; i < [remoteControls count]; i++) {
                [[remoteControls objectAtIndex: i] 
setOpenInExclusiveMode:value];
        }       

Modified: trunk/vendorsrc/ulikusterer/UKKQueue.h
===================================================================
--- trunk/vendorsrc/ulikusterer/UKKQueue.h      2009-04-16 15:35:46 UTC (rev 
5314)
+++ trunk/vendorsrc/ulikusterer/UKKQueue.h      2009-04-16 16:34:06 UTC (rev 
5315)
@@ -75,14 +75,14 @@
 
 @interface UKKQueue : NSObject <UKFileWatcher>
 {
-       int                             queueFD;                        // The 
actual queue ID (Unix file descriptor).
+       NSInteger                               queueFD;                        
// The actual queue ID (Unix file descriptor).
        NSMutableSet*   watchedPaths;           // List of NSStrings containing 
the paths we're watching.
        BOOL                    keepThreadRunning;      // Termination 
criterion of our thread.
 }
 
 +(id)  sharedFileWatcher;      // Returns a singleton, a shared kqueue object 
Handy if you're subscribing to the notifications. Use this, or just create 
separate objects using alloc/init. Whatever floats your boat.
 
--(int)  queueFD;               // I know you unix geeks want this...
+-(NSInteger)  queueFD;         // I know you unix geeks want this...
 
 // High-level file watching: (use UKFileWatcher protocol methods instead, 
where possible!)
 -(void) addPathToQueue: (NSString*)path;

Modified: trunk/vendorsrc/ulikusterer/UKKQueue.m
===================================================================
--- trunk/vendorsrc/ulikusterer/UKKQueue.m      2009-04-16 15:35:46 UTC (rev 
5314)
+++ trunk/vendorsrc/ulikusterer/UKKQueue.m      2009-04-16 16:34:06 UTC (rev 
5315)
@@ -28,10 +28,10 @@
 @interface UKWatchedPath : NSObject
 {
     NSString *path;
-    int fd;
+    NSInteger fd;
 }
 + (id)watchedPathWithPath:(NSString *)fullPath;
-- (int)fileDescriptor;
+- (NSInteger)fileDescriptor;
 - (NSString *)path;
 @end
 
@@ -181,7 +181,7 @@
 //             2004-03-13      UK      Documented.
 // 
-----------------------------------------------------------------------------
 
--(int)  queueFD
+-(NSInteger)  queueFD
 {
        return queueFD;
 }
@@ -234,7 +234,7 @@
         if ([watchedPaths containsObject:watchedPath] == NO) {
             
             // this will be closed when watchedPath is dealloced
-            int                                        fd = [watchedPath 
fileDescriptor];
+            NSInteger                                  fd = [watchedPath 
fileDescriptor];
 
             if( fd >= 0 )
             {
@@ -318,9 +318,9 @@
 
 -(void)                watcherThread: (id)sender
 {
-       int                                     n;
+       NSInteger                                       n;
     struct kevent              ev;
-       int                                     theFD = queueFD;        // So 
we don't have to risk accessing iVars when the thread is terminated.
+       NSInteger                                       theFD = queueFD;        
// So we don't have to risk accessing iVars when the thread is terminated.
     
     while( keepThreadRunning )
     {
@@ -443,7 +443,7 @@
 @implementation UKWatchedPath
 
 // open() is documented to return -1 in case of an error and >=0 for success
-static const int UNOPENED_DESCRIPTOR = -2;
+static const NSInteger UNOPENED_DESCRIPTOR = -2;
 
 - (id)initWatchedPathWithPath:(NSString *)fullPath;
 {
@@ -470,10 +470,10 @@
     [super dealloc];
 }
 
-- (unsigned int)hash { return [path hash]; }
+- (NSUInteger)hash { return [path hash]; }
 // implement in terms of -isEqualToString: since that's what NSPathStore2 uses
 - (BOOL)isEqual:(id)other { return [other isKindOfClass:[self class]] ? [path 
isEqualToString:[other path]] : NO; }
-- (int)fileDescriptor { 
+- (NSInteger)fileDescriptor { 
     if (fd == UNOPENED_DESCRIPTOR)
         fd = open([path fileSystemRepresentation], O_EVTONLY, 0);
     return fd; 


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to