Cleanup out trailing whitespace in src/video/uikit
authorKees Bakker <kees@ijzerbout.nl>
Tue, 27 Sep 2011 21:02:26 +0200
changeset 6001 3ae3d1e58d59
parent 5965 dd0c84d3d846
child 6002 0c0aaaa1e5ed
Cleanup out trailing whitespace in src/video/uikit
src/video/uikit/SDL_uikitappdelegate.m
src/video/uikit/SDL_uikitevents.m
src/video/uikit/SDL_uikitopengles.m
src/video/uikit/SDL_uikitopenglview.h
src/video/uikit/SDL_uikitopenglview.m
src/video/uikit/SDL_uikitvideo.m
src/video/uikit/SDL_uikitview.h
src/video/uikit/SDL_uikitview.m
src/video/uikit/SDL_uikitviewcontroller.h
src/video/uikit/SDL_uikitviewcontroller.m
src/video/uikit/SDL_uikitwindow.m
src/video/uikit/keyinfotable.h
--- a/src/video/uikit/SDL_uikitappdelegate.m	Wed Sep 21 03:08:00 2011 -0400
+++ b/src/video/uikit/SDL_uikitappdelegate.m	Tue Sep 27 21:02:26 2011 +0200
@@ -41,7 +41,7 @@
 
     int i;
     NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
-    
+
     /* store arguments */
     forward_argc = argc;
     forward_argv = (char **)malloc((argc+1) * sizeof(char *));
@@ -53,14 +53,14 @@
 
     /* Give over control to run loop, SDLUIKitDelegate will handle most things from here */
     UIApplicationMain(argc, argv, NULL, [SDLUIKitDelegate getAppDelegateClassName]);
-    
+
     [pool release];
     return 0;
 }
 
 static void SDL_IdleTimerDisabledChanged(const char *name, const char *oldValue, const char *newValue) {
     SDL_assert(SDL_strcmp(name, SDL_HINT_IDLE_TIMER_DISABLED) == 0);
-    
+
     BOOL disable = (*newValue != '0');
     [UIApplication sharedApplication].idleTimerDisabled = disable;
 }
@@ -85,37 +85,37 @@
 }
 
 - (void)postFinishLaunch {
-    
+
     /* register a callback for the idletimer hint */
     SDL_SetHint(SDL_HINT_IDLE_TIMER_DISABLED, "0");
     SDL_RegisterHintChangedCb(SDL_HINT_IDLE_TIMER_DISABLED, &SDL_IdleTimerDisabledChanged);
 
     /* run the user's application, passing argc and argv */
     int exit_status = SDL_main(forward_argc, forward_argv);
-    
+
     /* free the memory we used to hold copies of argc and argv */
     int i;
     for (i=0; i<forward_argc; i++) {
         free(forward_argv[i]);
     }
-    free(forward_argv);    
-        
+    free(forward_argv);
+
     /* exit, passing the return status from the user's application */
     exit(exit_status);
 }
 
 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
-            
+
     /* Set working directory to resource path */
     [[NSFileManager defaultManager] changeCurrentDirectoryPath: [[NSBundle mainBundle] resourcePath]];
-    
+
     [self performSelector:@selector(postFinishLaunch) withObject:nil afterDelay:0.0];
 
     return YES;
 }
 
 - (void)applicationWillTerminate:(UIApplication *)application {
-    
+
     SDL_SendQuit();
      /* hack to prevent automatic termination.  See SDL_uikitevents.m for details */
     longjmp(*(jump_env()), 1);
@@ -130,7 +130,7 @@
     if (!_this) {
         return;
     }
-    
+
     SDL_Window *window;
     for (window = _this->windows; window != nil; window = window->next) {
         SDL_SendWindowEvent(window, SDL_WINDOWEVENT_MINIMIZED, 0, 0);
@@ -146,7 +146,7 @@
     if (!_this) {
         return;
     }
-    
+
     SDL_Window *window;
     for (window = _this->windows; window != nil; window = window->next) {
         SDL_SendWindowEvent(window, SDL_WINDOWEVENT_RESTORED, 0, 0);
--- a/src/video/uikit/SDL_uikitevents.m	Wed Sep 21 03:08:00 2011 -0400
+++ b/src/video/uikit/SDL_uikitevents.m	Tue Sep 27 21:02:26 2011 +0200
@@ -31,17 +31,17 @@
 void
 UIKit_PumpEvents(_THIS)
 {
-    /* 
+    /*
         When the user presses the 'home' button on the iPod
         the application exits -- immediatly.
-     
+
         Unlike in Mac OS X, it appears there is no way to cancel the termination.
-     
+
         This doesn't give the SDL user's application time to respond to an SDL_Quit event.
         So what we do is that in the UIApplicationDelegate class (SDLUIApplicationDelegate),
         when the delegate receives the ApplicationWillTerminate message, we execute
         a longjmp statement to get back here, preventing an immediate exit.
-     */    
+     */
     if (setjmp(*jump_env()) == 0) {
         /* if we're setting the jump, rather than jumping back */
         SInt32 result;
--- a/src/video/uikit/SDL_uikitopengles.m	Wed Sep 21 03:08:00 2011 -0400
+++ b/src/video/uikit/SDL_uikitopengles.m	Tue Sep 27 21:02:26 2011 +0200
@@ -34,7 +34,7 @@
 
 void *
 UIKit_GL_GetProcAddress(_THIS, const char *proc)
-{    
+{
     /* Look through all SO's for the proc symbol.  Here's why:
        -Looking for the path to the OpenGL Library seems not to work in the iPhone Simulator.
        -We don't know that the path won't change in the future.
@@ -47,7 +47,7 @@
 */
 int UIKit_GL_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context)
 {
-    
+
     if (context) {
         SDL_WindowData *data = (SDL_WindowData *)window->driverdata;
         [data->view setCurrentContext];
@@ -55,15 +55,15 @@
     else {
         [EAGLContext setCurrentContext: nil];
     }
-        
+
     return 0;
 }
 
 int
 UIKit_GL_LoadLibrary(_THIS, const char *path)
 {
-    /* 
-        shouldn't be passing a path into this function 
+    /*
+        shouldn't be passing a path into this function
         why?  Because we've already loaded the library
         and because the SDK forbids loading an external SO
     */
@@ -84,7 +84,7 @@
     #endif
 
     SDL_WindowData *data = (SDL_WindowData *)window->driverdata;
-    
+
     if (nil == data->view) {
         return;
     }
@@ -95,7 +95,7 @@
 
     /* we need to let the event cycle run, or the OS won't update the OpenGL view! */
     SDL_PumpEvents();
-    
+
 }
 
 SDL_GLContext UIKit_GL_CreateContext(_THIS, SDL_Window * window)
@@ -114,7 +114,7 @@
                                     aBits: _this->gl_config.alpha_size \
                                     depthBits: _this->gl_config.depth_size \
                                     majorVersion: _this->gl_config.major_version];
-    
+
     data->view = view;
     view->viewcontroller = data->viewcontroller;
     if (view->viewcontroller != nil) {
--- a/src/video/uikit/SDL_uikitopenglview.h	Wed Sep 21 03:08:00 2011 -0400
+++ b/src/video/uikit/SDL_uikitopenglview.h	Tue Sep 27 21:02:26 2011 +0200
@@ -31,17 +31,17 @@
  */
 /* *INDENT-OFF* */
 @interface SDL_uikitopenglview : SDL_uikitview {
-    
+
 @private
     /* The pixel dimensions of the backbuffer */
     GLint backingWidth;
     GLint backingHeight;
-    
+
     EAGLContext *context;
-    
+
     /* OpenGL names for the renderbuffer and framebuffers used to render to this view */
     GLuint viewRenderbuffer, viewFramebuffer;
-    
+
     /* OpenGL name for the depth buffer that is attached to viewFramebuffer, if it exists (0 if it does not exist) */
     GLuint depthRenderbuffer;
 
--- a/src/video/uikit/SDL_uikitopenglview.m	Wed Sep 21 03:08:00 2011 -0400
+++ b/src/video/uikit/SDL_uikitopenglview.m	Tue Sep 27 21:02:26 2011 +0200
@@ -50,7 +50,7 @@
 {
     NSString *colorFormat=nil;
     BOOL useDepthBuffer;
-    
+
     if (rBits == 8 && gBits == 8 && bBits == 8) {
         /* if user specifically requests rbg888 or some color format higher than 16bpp */
         colorFormat = kEAGLColorFormatRGBA8;
@@ -59,7 +59,7 @@
         /* default case (faster) */
         colorFormat = kEAGLColorFormatRGB565;
     }
-    
+
     depthBufferFormat = 0;
 
     if (depthBits == 24) {
@@ -71,22 +71,22 @@
     }
     else {
         /* default case when depth buffer is not disabled */
-        /* 
+        /*
            strange, even when we use this, we seem to get a 24 bit depth buffer on iPhone.
            perhaps that's the only depth format iPhone actually supports
         */
         useDepthBuffer = YES;
         depthBufferFormat = GL_DEPTH_COMPONENT16_OES;
     }
-    
+
     if ((self = [super initWithFrame:frame])) {
         // Get the layer
         CAEAGLLayer *eaglLayer = (CAEAGLLayer *)self.layer;
-        
+
         eaglLayer.opaque = YES;
         eaglLayer.drawableProperties = [NSDictionary dictionaryWithObjectsAndKeys:
                                         [NSNumber numberWithBool: retained], kEAGLDrawablePropertyRetainedBacking, colorFormat, kEAGLDrawablePropertyColorFormat, nil];
-        
+
         if (majorVersion > 1) {
             context = [[EAGLContext alloc] initWithAPI: kEAGLRenderingAPIOpenGLES2];
         } else {
@@ -96,16 +96,16 @@
             [self release];
             return nil;
         }
-        
+
         /* create the buffers */
         glGenFramebuffersOES(1, &viewFramebuffer);
         glGenRenderbuffersOES(1, &viewRenderbuffer);
-        
+
         glBindFramebufferOES(GL_FRAMEBUFFER_OES, viewFramebuffer);
         glBindRenderbufferOES(GL_RENDERBUFFER_OES, viewRenderbuffer);
         [context renderbufferStorage:GL_RENDERBUFFER_OES fromDrawable:(CAEAGLLayer*)self.layer];
         glFramebufferRenderbufferOES(GL_FRAMEBUFFER_OES, GL_COLOR_ATTACHMENT0_OES, GL_RENDERBUFFER_OES, viewRenderbuffer);
-        
+
         glGetRenderbufferParameterivOES(GL_RENDERBUFFER_OES, GL_RENDERBUFFER_WIDTH_OES, &backingWidth);
         glGetRenderbufferParameterivOES(GL_RENDERBUFFER_OES, GL_RENDERBUFFER_HEIGHT_OES, &backingHeight);
 
@@ -115,7 +115,7 @@
             glRenderbufferStorageOES(GL_RENDERBUFFER_OES, depthBufferFormat, backingWidth, backingHeight);
             glFramebufferRenderbufferOES(GL_FRAMEBUFFER_OES, GL_DEPTH_ATTACHMENT_OES, GL_RENDERBUFFER_OES, depthRenderbuffer);
         }
-            
+
         if(glCheckFramebufferStatusOES(GL_FRAMEBUFFER_OES) != GL_FRAMEBUFFER_COMPLETE_OES) {
             return NO;
         }
@@ -140,7 +140,7 @@
     glGenRenderbuffersOES(1, &viewRenderbuffer);
     glBindRenderbufferOES(GL_RENDERBUFFER_OES, viewRenderbuffer);
     [context renderbufferStorage:GL_RENDERBUFFER_OES fromDrawable:(CAEAGLLayer*)self.layer];
-    glFramebufferRenderbufferOES(GL_FRAMEBUFFER_OES, GL_COLOR_ATTACHMENT0_OES, GL_RENDERBUFFER_OES, viewRenderbuffer);  
+    glFramebufferRenderbufferOES(GL_FRAMEBUFFER_OES, GL_COLOR_ATTACHMENT0_OES, GL_RENDERBUFFER_OES, viewRenderbuffer);
 
     glGetRenderbufferParameterivOES(GL_RENDERBUFFER_OES, GL_RENDERBUFFER_WIDTH_OES, &backingWidth);
     glGetRenderbufferParameterivOES(GL_RENDERBUFFER_OES, GL_RENDERBUFFER_HEIGHT_OES, &backingHeight);
@@ -149,7 +149,7 @@
         glBindRenderbufferOES(GL_RENDERBUFFER_OES, depthRenderbuffer);
         glRenderbufferStorageOES(GL_RENDERBUFFER_OES, depthBufferFormat, backingWidth, backingHeight);
     }
-    
+
     // !!! FIXME: use the screen this is on!
     /* Use the main screen scale (for retina display support) */
     if ([[UIScreen mainScreen] respondsToSelector:@selector(scale)])
@@ -176,7 +176,7 @@
     viewFramebuffer = 0;
     glDeleteRenderbuffersOES(1, &viewRenderbuffer);
     viewRenderbuffer = 0;
-    
+
     if (depthRenderbuffer) {
         glDeleteRenderbuffersOES(1, &depthRenderbuffer);
         depthRenderbuffer = 0;
@@ -189,7 +189,7 @@
     if ([EAGLContext currentContext] == context) {
         [EAGLContext setCurrentContext:nil];
     }
-    [context release];    
+    [context release];
     [super dealloc];
 }
 
--- a/src/video/uikit/SDL_uikitvideo.m	Wed Sep 21 03:08:00 2011 -0400
+++ b/src/video/uikit/SDL_uikitvideo.m	Tue Sep 27 21:02:26 2011 +0200
@@ -84,8 +84,8 @@
     device->CreateWindow = UIKit_CreateWindow;
     device->DestroyWindow = UIKit_DestroyWindow;
     device->GetWindowWMInfo = UIKit_GetWindowWMInfo;
-    
-    
+
+
     /* OpenGL (ES) functions */
     device->GL_MakeCurrent        = UIKit_GL_MakeCurrent;
     device->GL_SwapWindow        = UIKit_GL_SwapWindow;
@@ -211,7 +211,7 @@
     mode.w = w;
     mode.h = h;
     mode.refresh_rate = 0;
-    
+
     [uimode retain];
     mode.driverdata = uimode;
 
--- a/src/video/uikit/SDL_uikitview.h	Wed Sep 21 03:08:00 2011 -0400
+++ b/src/video/uikit/SDL_uikitview.h	Tue Sep 27 21:02:26 2011 +0200
@@ -48,7 +48,7 @@
 #if SDL_IPHONE_KEYBOARD
     UITextField *textField;
     BOOL keyboardVisible;
-#endif    
+#endif
 
 @public
     SDL_uikitviewcontroller *viewcontroller;
@@ -62,7 +62,7 @@
 - (void)hideKeyboard;
 - (void)initializeKeyboard;
 @property (readonly) BOOL keyboardVisible;
-#endif 
+#endif
 
 @end
 /* *INDENT-ON* */
--- a/src/video/uikit/SDL_uikitview.m	Wed Sep 21 03:08:00 2011 -0400
+++ b/src/video/uikit/SDL_uikitview.m	Tue Sep 27 21:02:26 2011 +0200
@@ -40,10 +40,10 @@
 - (id)initWithFrame:(CGRect)frame {
 
     self = [super initWithFrame: frame];
-    
+
 #if SDL_IPHONE_KEYBOARD
     [self initializeKeyboard];
-#endif    
+#endif
 
 #ifdef FIXED_MULTITOUCH
     self.multipleTouchEnabled = YES;
@@ -53,7 +53,7 @@
 
     //touch.driverdata = SDL_malloc(sizeof(EventTouchData));
     //EventTouchData* data = (EventTouchData*)(touch.driverdata);
-    
+
     touch.x_min = 0;
     touch.x_max = frame.size.width;
     touch.native_xres = touch.x_max - touch.x_min;
@@ -79,7 +79,7 @@
 
     if (touch) {
         CGPoint locationInView = [touch locationInView: self];
-            
+
         /* send moved event */
         SDL_SendMouseMotion(NULL, 0, locationInView.x, locationInView.y);
 
@@ -112,16 +112,16 @@
       }
 #endif
 
-      touch = (UITouch*)[enumerator nextObject]; 
+      touch = (UITouch*)[enumerator nextObject];
     }
 #endif
 }
 
 - (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {
-    
+
     NSEnumerator *enumerator = [touches objectEnumerator];
     UITouch *touch = (UITouch*)[enumerator nextObject];
-    
+
     if (touch) {
         /* send mouse up */
         SDL_SendMouseButton(NULL, SDL_RELEASED, SDL_BUTTON_LEFT);
@@ -130,7 +130,7 @@
 #ifdef FIXED_MULTITOUCH
     while(touch) {
       CGPoint locationInView = [touch locationInView: self];
-      
+
 
 #ifdef IPHONE_TOUCH_EFFICIENT_DANGEROUS
       SDL_SendFingerDown(touchId,(long)touch,
@@ -149,7 +149,7 @@
       }
 #endif
 
-      touch = (UITouch*)[enumerator nextObject]; 
+      touch = (UITouch*)[enumerator nextObject];
     }
 #endif
 }
@@ -164,10 +164,10 @@
 }
 
 - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {
-    
+
     NSEnumerator *enumerator = [touches objectEnumerator];
     UITouch *touch = (UITouch*)[enumerator nextObject];
-    
+
     if (touch) {
         CGPoint locationInView = [touch locationInView: self];
 
@@ -178,7 +178,7 @@
 #ifdef FIXED_MULTITOUCH
     while(touch) {
       CGPoint locationInView = [touch locationInView: self];
-      
+
 
 #ifdef IPHONE_TOUCH_EFFICIENT_DANGEROUS
       SDL_SendTouchMotion(touchId,(long)touch,
@@ -196,7 +196,7 @@
       }
 #endif
 
-      touch = (UITouch*)[enumerator nextObject]; 
+      touch = (UITouch*)[enumerator nextObject];
     }
 #endif
 }
@@ -213,12 +213,12 @@
 
 /* Set ourselves up as a UITextFieldDelegate */
 - (void)initializeKeyboard {
-        
+
     textField = [[UITextField alloc] initWithFrame: CGRectZero];
     textField.delegate = self;
     /* placeholder so there is something to delete! */
-    textField.text = @" ";    
-    
+    textField.text = @" ";
+
     /* set UITextInputTrait properties, mostly to defaults */
     textField.autocapitalizationType = UITextAutocapitalizationTypeNone;
     textField.autocorrectionType = UITextAutocorrectionTypeNo;
@@ -226,8 +226,8 @@
     textField.keyboardAppearance = UIKeyboardAppearanceDefault;
     textField.keyboardType = UIKeyboardTypeDefault;
     textField.returnKeyType = UIReturnKeyDefault;
-    textField.secureTextEntry = NO;    
-    
+    textField.secureTextEntry = NO;
+
     textField.hidden = YES;
     keyboardVisible = NO;
     /* add the UITextField (hidden) to our view */
@@ -249,7 +249,7 @@
 
 /* UITextFieldDelegate method.  Invoked when user types something. */
 - (BOOL)textField:(UITextField *)_textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string {
-    
+
     if ([string length] == 0) {
         /* it wants to replace text with nothing, ie a delete */
         SDL_SendKeyboardKey(SDL_PRESSED, SDL_SCANCODE_DELETE);
@@ -260,12 +260,12 @@
            and convert them to key presses */
         int i;
         for (i=0; i<[string length]; i++) {
-            
+
             unichar c = [string characterAtIndex: i];
-            
+
             Uint16 mod = 0;
             SDL_Scancode code;
-            
+
             if (c < 127) {
                 /* figure out the SDL_Scancode and SDL_keymod for this unichar */
                 code = unicharToUIKeyInfoTable[c].code;
@@ -276,7 +276,7 @@
                 code = SDL_SCANCODE_UNKNOWN;
                 mod = 0;
             }
-            
+
             if (mod & KMOD_SHIFT) {
                 /* If character uses shift, press shift down */
                 SDL_SendKeyboardKey(SDL_PRESSED, SDL_SCANCODE_LSHIFT);
@@ -287,7 +287,7 @@
             if (mod & KMOD_SHIFT) {
                 /* If character uses shift, press shift back up */
                 SDL_SendKeyboardKey(SDL_RELEASED, SDL_SCANCODE_LSHIFT);
-            }            
+            }
         }
         SDL_SendKeyboardText([string UTF8String]);
     }
@@ -309,18 +309,18 @@
 #if SDL_IPHONE_KEYBOARD
 
 int SDL_iPhoneKeyboardShow(SDL_Window * window) {
-    
+
     SDL_WindowData *data;
     SDL_uikitview *view;
-    
+
     if (NULL == window) {
         SDL_SetError("Window does not exist");
         return -1;
     }
-    
+
     data = (SDL_WindowData *)window->driverdata;
     view = data->view;
-    
+
     if (nil == view) {
         SDL_SetError("Window has no view");
         return -1;
@@ -332,18 +332,18 @@
 }
 
 int SDL_iPhoneKeyboardHide(SDL_Window * window) {
-    
+
     SDL_WindowData *data;
     SDL_uikitview *view;
-    
+
     if (NULL == window) {
         SDL_SetError("Window does not exist");
         return -1;
-    }    
-    
+    }
+
     data = (SDL_WindowData *)window->driverdata;
     view = data->view;
-    
+
     if (NULL == view) {
         SDL_SetError("Window has no view");
         return -1;
@@ -355,18 +355,18 @@
 }
 
 SDL_bool SDL_iPhoneKeyboardIsShown(SDL_Window * window) {
-    
+
     SDL_WindowData *data;
     SDL_uikitview *view;
-    
+
     if (NULL == window) {
         SDL_SetError("Window does not exist");
         return -1;
-    }    
-    
+    }
+
     data = (SDL_WindowData *)window->driverdata;
     view = data->view;
-    
+
     if (NULL == view) {
         SDL_SetError("Window has no view");
         return 0;
@@ -377,18 +377,18 @@
 }
 
 int SDL_iPhoneKeyboardToggle(SDL_Window * window) {
-    
+
     SDL_WindowData *data;
     SDL_uikitview *view;
-    
+
     if (NULL == window) {
         SDL_SetError("Window does not exist");
         return -1;
-    }    
-    
+    }
+
     data = (SDL_WindowData *)window->driverdata;
     view = data->view;
-    
+
     if (NULL == view) {
         SDL_SetError("Window has no view");
         return -1;
--- a/src/video/uikit/SDL_uikitviewcontroller.h	Wed Sep 21 03:08:00 2011 -0400
+++ b/src/video/uikit/SDL_uikitviewcontroller.h	Tue Sep 27 21:02:26 2011 +0200
@@ -1,15 +1,15 @@
 /*
  Simple DirectMedia Layer
  Copyright (C) 1997-2011 Sam Lantinga <slouken@libsdl.org>
- 
+
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
  arising from the use of this software.
- 
+
  Permission is granted to anyone to use this software for any purpose,
  including commercial applications, and to alter it and redistribute it
  freely, subject to the following restrictions:
- 
+
  1. The origin of this software must not be misrepresented; you must not
  claim that you wrote the original software. If you use this software
  in a product, an acknowledgment in the product documentation would be
--- a/src/video/uikit/SDL_uikitviewcontroller.m	Wed Sep 21 03:08:00 2011 -0400
+++ b/src/video/uikit/SDL_uikitviewcontroller.m	Tue Sep 27 21:02:26 2011 +0200
@@ -1,15 +1,15 @@
 /*
  Simple DirectMedia Layer
  Copyright (C) 1997-2011 Sam Lantinga <slouken@libsdl.org>
- 
+
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
  arising from the use of this software.
- 
+
  Permission is granted to anyone to use this software for any purpose,
  including commercial applications, and to alter it and redistribute it
  freely, subject to the following restrictions:
- 
+
  1. The origin of this software must not be misrepresented; you must not
  claim that you wrote the original software. If you use this software
  in a product, an acknowledgment in the product documentation would be
@@ -49,34 +49,34 @@
                                                             encoding:NSUTF8StringEncoding];
         NSArray *orientations = [orientationsNSString componentsSeparatedByCharactersInSet:
                                  [NSCharacterSet characterSetWithCharactersInString:@" "]];
-        
+
         switch (orient) {
             case UIInterfaceOrientationLandscapeLeft:
                 rotate = [orientations containsObject:@"LandscapeLeft"];
                 break;
-                
+
             case UIInterfaceOrientationLandscapeRight:
                 rotate = [orientations containsObject:@"LandscapeRight"];
                 break;
-                
+
             case UIInterfaceOrientationPortrait:
                 rotate = [orientations containsObject:@"Portrait"];
                 break;
-                
+
             case UIInterfaceOrientationPortraitUpsideDown:
                 rotate = [orientations containsObject:@"PortraitUpsideDown"];
                 break;
-                
+
             default: break;
         }
-        
+
         return rotate;
     }
-    
+
     if (self->window->flags & SDL_WINDOW_RESIZABLE) {
         return YES;  // any orientation is okay.
     }
-    
+
     // If not resizable, allow device to orient to other matching sizes
     //  (that is, let the user turn the device upside down...same screen
     //   dimensions, but it lets the user place the device where it's most
@@ -85,14 +85,14 @@
         case UIInterfaceOrientationLandscapeLeft:
         case UIInterfaceOrientationLandscapeRight:
             return (self->window->w >= self->window->h);
-            
+
         case UIInterfaceOrientationPortrait:
         case UIInterfaceOrientationPortraitUpsideDown:
             return (self->window->h >= self->window->w);
-            
+
         default: break;
     }
-    
+
     return NO;  // Nothing else is acceptable.
 }
 
@@ -105,7 +105,7 @@
     if ((self->window->flags & SDL_WINDOW_RESIZABLE) == 0) {
         return;   // don't care, we're just flipping over in this case.
     }
-    
+
     const UIInterfaceOrientation toInterfaceOrientation = [self interfaceOrientation];
     SDL_WindowData *data = self->window->driverdata;
     UIWindow *uiwindow = data->uiwindow;
@@ -114,30 +114,30 @@
     CGRect frame = noborder ? [uiscreen bounds] : [uiscreen applicationFrame];
     const CGSize size = frame.size;
     int w, h;
-    
+
     switch (toInterfaceOrientation) {
         case UIInterfaceOrientationPortrait:
         case UIInterfaceOrientationPortraitUpsideDown:
             w = (size.width < size.height) ? size.width : size.height;
             h = (size.width > size.height) ? size.width : size.height;
             break;
-            
+
         case UIInterfaceOrientationLandscapeLeft:
         case UIInterfaceOrientationLandscapeRight:
             w = (size.width > size.height) ? size.width : size.height;
             h = (size.width < size.height) ? size.width : size.height;
             break;
-            
+
         default:
             SDL_assert(0 && "Unexpected interface orientation!");
             return;
     }
-    
+
     frame.size.width = w;
     frame.size.height = h;
     frame.origin.x = 0;
     frame.origin.y = 0;
-    
+
     [uiwindow setFrame:frame];
     [data->view updateFrame];
     SDL_SendWindowEvent(self->window, SDL_WINDOWEVENT_RESIZED, w, h);
--- a/src/video/uikit/SDL_uikitwindow.m	Wed Sep 21 03:08:00 2011 -0400
+++ b/src/video/uikit/SDL_uikitwindow.m	Tue Sep 27 21:02:26 2011 +0200
@@ -46,7 +46,7 @@
     SDL_VideoDisplay *display = SDL_GetDisplayForWindow(window);
     UIScreen *uiscreen = (UIScreen *) display->driverdata;
     SDL_WindowData *data;
-        
+
     /* Allocate the window data */
     data = (SDL_WindowData *)SDL_malloc(sizeof(*data));
     if (!data) {
@@ -64,7 +64,7 @@
         window->w = (int)uiwindow.frame.size.width;
         window->h = (int)uiwindow.frame.size.height;
     }
-    
+
     window->driverdata = data;
 
     // !!! FIXME: should we force this? Shouldn't specifying FULLSCREEN
@@ -164,7 +164,7 @@
         uiwindow = [uiwindow initWithFrame:[uiscreen bounds]];
     else
         uiwindow = [uiwindow initWithFrame:[uiscreen applicationFrame]];
-    
+
     // put the window on an external display if appropriate. This implicitly
     //  does [uiwindow setframe:[uiscreen bounds]], so don't do it on the
     //  main display, where we land by default, as that would eat the
@@ -176,10 +176,10 @@
     if (SetupWindowData(_this, window, uiwindow, SDL_TRUE) < 0) {
         [uiwindow release];
         return -1;
-    }    
-    
+    }
+
     return 1;
-    
+
 }
 
 void
--- a/src/video/uikit/keyinfotable.h	Wed Sep 21 03:08:00 2011 -0400
+++ b/src/video/uikit/keyinfotable.h	Tue Sep 27 21:02:26 2011 +0200
@@ -88,7 +88,7 @@
 /*  45 */ {   SDL_SCANCODE_MINUS, 0 },        /* '-'                       */
 /*  46 */ {   SDL_SCANCODE_PERIOD, 0 },        /* '.'                       */
 /*  47 */ {   SDL_SCANCODE_SLASH, 0 },        /* '/'                       */
-/*  48 */ {   SDL_SCANCODE_0, 0    },        
+/*  48 */ {   SDL_SCANCODE_0, 0    },
 /*  49 */ {   SDL_SCANCODE_1, 0 },
 /*  50 */ {   SDL_SCANCODE_2, 0 },
 /*  51 */ {   SDL_SCANCODE_3, 0 },
@@ -137,7 +137,7 @@
 /*  94 */ {   SDL_SCANCODE_6,  KMOD_SHIFT },            /* plus shift modifier '^' */
 /*  95 */ {   SDL_SCANCODE_MINUS,  KMOD_SHIFT },        /* plus shift modifier '_' */
 /*  96 */ {   SDL_SCANCODE_GRAVE,  KMOD_SHIFT },        /* '`' */
-/*  97 */ {   SDL_SCANCODE_A, 0    },    
+/*  97 */ {   SDL_SCANCODE_A, 0    },
 /*  98 */ {   SDL_SCANCODE_B, 0 },
 /*  99 */ {   SDL_SCANCODE_C, 0 },
 /*  100 */{    SDL_SCANCODE_D, 0 },