diff options
author | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2009-07-07 02:26:13 +0300 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2009-07-07 02:34:35 +0300 |
commit | 0eb321bf2c1cc0e048faff26a01f86cdd3ec254f (patch) | |
tree | 71cb9bd9ed121156d3382066c0722c73189afe04 /osdep/getch2-win.c | |
parent | 6d908205fbadbdf7ccdc6c5e0eb918f0b43f16e0 (diff) | |
download | mpv-0eb321bf2c1cc0e048faff26a01f86cdd3ec254f.tar.bz2 mpv-0eb321bf2c1cc0e048faff26a01f86cdd3ec254f.tar.xz |
Remove trailing whitespace from most files
Diffstat (limited to 'osdep/getch2-win.c')
-rw-r--r-- | osdep/getch2-win.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/osdep/getch2-win.c b/osdep/getch2-win.c index 5df87b2377..1882bb419d 100644 --- a/osdep/getch2-win.c +++ b/osdep/getch2-win.c @@ -61,7 +61,7 @@ static int getch2_internal(void) INPUT_RECORD eventbuffer[128]; DWORD retval; int i=0; - if(!getch2_status)return -1; + if(!getch2_status)return -1; /*check if there are input events*/ if(!GetNumberOfConsoleInputEvents(stdin,&retval)) { @@ -69,18 +69,18 @@ static int getch2_internal(void) return -1; } if(retval<=0)return -1; - - /*read all events*/ + + /*read all events*/ if(!ReadConsoleInput(stdin,eventbuffer,128,&retval)) { printf("getch: can't read input events\n"); return -1; } - + /*filter out keyevents*/ - for (i = 0; i < retval; i++) + for (i = 0; i < retval; i++) { - switch(eventbuffer[i].EventType) + switch(eventbuffer[i].EventType) { case KEY_EVENT: /*only a pressed key is interresting for us*/ @@ -116,26 +116,26 @@ static int getch2_internal(void) case VK_DOWN: return KEY_DOWN; case VK_SHIFT: - continue; + continue; } /*check for function keys*/ if(0x87 >= eventbuffer[i].Event.KeyEvent.wVirtualKeyCode && eventbuffer[i].Event.KeyEvent.wVirtualKeyCode >= 0x70) return KEY_F + 1 + eventbuffer[i].Event.KeyEvent.wVirtualKeyCode - 0x70; - + /*only characters should be remaining*/ - //printf("getch2: YOU PRESSED \"%c\" \n",eventbuffer[i].Event.KeyEvent.uChar.AsciiChar); + //printf("getch2: YOU PRESSED \"%c\" \n",eventbuffer[i].Event.KeyEvent.uChar.AsciiChar); return eventbuffer[i].Event.KeyEvent.uChar.AsciiChar; } - break; - + break; + case MOUSE_EVENT: - case WINDOW_BUFFER_SIZE_EVENT: - case FOCUS_EVENT: + case WINDOW_BUFFER_SIZE_EVENT: + case FOCUS_EVENT: case MENU_EVENT: default: - //printf("getch2: unsupported event type"); - break; - } + //printf("getch2: unsupported event type"); + break; + } } return -1; } @@ -186,7 +186,7 @@ static const struct { { 65001, "UTF-8" }, { 0, NULL } }; - + char* get_term_charset(void) { static char codepage[10]; |