indent
authorSam Lantinga <slouken@libsdl.org>
Tue, 17 Feb 2009 05:57:54 +0000
changeset 30716f3308d4b6cd
parent 3070 3e3724fb829e
child 3072 9da8f57ab92c
indent
src/thread/win32/SDL_syssem.c
test/testnativew32.c
     1.1 --- a/src/thread/win32/SDL_syssem.c	Tue Feb 17 05:44:49 2009 +0000
     1.2 +++ b/src/thread/win32/SDL_syssem.c	Tue Feb 17 05:57:54 2009 +0000
     1.3 @@ -164,7 +164,7 @@
     1.4  #else
     1.5      if (ReleaseSemaphore(sem->id, 1, NULL) == FALSE) {
     1.6  #endif
     1.7 -        InterlockedDecrement(&sem->count);           /* restore */
     1.8 +        InterlockedDecrement(&sem->count);      /* restore */
     1.9          SDL_SetError("ReleaseSemaphore() failed");
    1.10          return -1;
    1.11      }
     2.1 --- a/test/testnativew32.c	Tue Feb 17 05:44:49 2009 +0000
     2.2 +++ b/test/testnativew32.c	Tue Feb 17 05:57:54 2009 +0000
     2.3 @@ -12,18 +12,18 @@
     2.4      DestroyWindowWin32
     2.5  };
     2.6  
     2.7 -LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
     2.8 +LRESULT CALLBACK
     2.9 +WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
    2.10  {
    2.11 -    switch(msg)
    2.12 -    {
    2.13 -        case WM_CLOSE:
    2.14 -            DestroyWindow(hwnd);
    2.15 +    switch (msg) {
    2.16 +    case WM_CLOSE:
    2.17 +        DestroyWindow(hwnd);
    2.18          break;
    2.19 -        case WM_DESTROY:
    2.20 -            PostQuitMessage(0);
    2.21 +    case WM_DESTROY:
    2.22 +        PostQuitMessage(0);
    2.23          break;
    2.24 -        default:
    2.25 -            return DefWindowProc(hwnd, msg, wParam, lParam);
    2.26 +    default:
    2.27 +        return DefWindowProc(hwnd, msg, wParam, lParam);
    2.28      }
    2.29      return 0;
    2.30  }
    2.31 @@ -34,29 +34,30 @@
    2.32      HWND hwnd;
    2.33      WNDCLASS wc;
    2.34  
    2.35 -    wc.style         = 0;
    2.36 -    wc.lpfnWndProc   = WndProc;
    2.37 -    wc.cbClsExtra    = 0;
    2.38 -    wc.cbWndExtra    = 0;
    2.39 -    wc.hInstance     = GetModuleHandle(NULL);
    2.40 -    wc.hIcon         = LoadIcon(NULL, IDI_APPLICATION);
    2.41 -    wc.hCursor       = LoadCursor(NULL, IDC_ARROW);
    2.42 -    wc.hbrBackground = (HBRUSH)(COLOR_WINDOW+1);
    2.43 -    wc.lpszMenuName  = NULL;
    2.44 +    wc.style = 0;
    2.45 +    wc.lpfnWndProc = WndProc;
    2.46 +    wc.cbClsExtra = 0;
    2.47 +    wc.cbWndExtra = 0;
    2.48 +    wc.hInstance = GetModuleHandle(NULL);
    2.49 +    wc.hIcon = LoadIcon(NULL, IDI_APPLICATION);
    2.50 +    wc.hCursor = LoadCursor(NULL, IDC_ARROW);
    2.51 +    wc.hbrBackground = (HBRUSH) (COLOR_WINDOW + 1);
    2.52 +    wc.lpszMenuName = NULL;
    2.53      wc.lpszClassName = "SDL Test";
    2.54  
    2.55 -    if(!RegisterClass(&wc))
    2.56 -    {
    2.57 +    if (!RegisterClass(&wc)) {
    2.58          MessageBox(NULL, "Window Registration Failed!", "Error!",
    2.59 -            MB_ICONEXCLAMATION | MB_OK);
    2.60 +                   MB_ICONEXCLAMATION | MB_OK);
    2.61          return 0;
    2.62      }
    2.63  
    2.64 -    hwnd = CreateWindow("SDL Test", "", WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, w, h, NULL, NULL, GetModuleHandle(NULL), NULL);
    2.65 -    if(hwnd == NULL)
    2.66 -    {
    2.67 +    hwnd =
    2.68 +        CreateWindow("SDL Test", "", WS_OVERLAPPEDWINDOW, CW_USEDEFAULT,
    2.69 +                     CW_USEDEFAULT, w, h, NULL, NULL, GetModuleHandle(NULL),
    2.70 +                     NULL);
    2.71 +    if (hwnd == NULL) {
    2.72          MessageBox(NULL, "Window Creation Failed!", "Error!",
    2.73 -            MB_ICONEXCLAMATION | MB_OK);
    2.74 +                   MB_ICONEXCLAMATION | MB_OK);
    2.75          return 0;
    2.76      }
    2.77  
    2.78 @@ -68,7 +69,7 @@
    2.79  static void
    2.80  DestroyWindowWin32(void *window)
    2.81  {
    2.82 -    DestroyWindow((HWND)window);
    2.83 +    DestroyWindow((HWND) window);
    2.84  }
    2.85  
    2.86  #endif