From 0eb321bf2c1cc0e048faff26a01f86cdd3ec254f Mon Sep 17 00:00:00 2001 From: Uoti Urpala Date: Tue, 7 Jul 2009 02:26:13 +0300 Subject: Remove trailing whitespace from most files --- osdep/getch2-os2.c | 1 - osdep/getch2-win.c | 34 +++++++++++++++++----------------- osdep/getch2.c | 1 - osdep/glob-win.c | 8 ++++---- osdep/keycodes.h | 2 +- osdep/macosx_finder_args.c | 6 +++--- osdep/mmap_anon.c | 6 +++--- osdep/mplayer.rc | 9 ++++----- osdep/priority.c | 1 - osdep/priority.h | 1 - osdep/strsep.c | 2 +- osdep/timer-darwin.c | 8 ++++---- osdep/timer-linux.c | 4 ++-- osdep/timer-win2.c | 4 ++-- 14 files changed, 41 insertions(+), 46 deletions(-) (limited to 'osdep') diff --git a/osdep/getch2-os2.c b/osdep/getch2-os2.c index 4ecfacd5cd..c470743e14 100644 --- a/osdep/getch2-os2.c +++ b/osdep/getch2-os2.c @@ -197,4 +197,3 @@ char *get_term_charset( void ) return charset; } #endif - 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]; diff --git a/osdep/getch2.c b/osdep/getch2.c index e1871c7d6d..3b680acd7f 100644 --- a/osdep/getch2.c +++ b/osdep/getch2.c @@ -304,4 +304,3 @@ char* get_term_charset(void) return charset; } #endif - diff --git a/osdep/glob-win.c b/osdep/glob-win.c index 427a30e7b0..6cf29efd5f 100644 --- a/osdep/glob-win.c +++ b/osdep/glob-win.c @@ -42,7 +42,7 @@ int glob(const char *pattern, int flags, //printf("could not find a file matching your search criteria\n"); return 1; } - else + else { //printf("glob():ERROR:FindFirstFile: %i\n",GetLastError()); return 1; @@ -69,9 +69,9 @@ int glob(const char *pattern, int flags, else { //printf("glob: found file %s\n",found_file.cFileName); - pglob->gl_pathc++; + pglob->gl_pathc++; pglob->gl_pathv = realloc(pglob->gl_pathv,pglob->gl_pathc * sizeof(char*)); - pglob->gl_pathv[pglob->gl_pathc-1] = strdup(found_file.cFileName); + pglob->gl_pathv[pglob->gl_pathc-1] = strdup(found_file.cFileName); } } FindClose(searchhndl); @@ -98,7 +98,7 @@ int main(void){ for(i=0;i +#include #include "version.h" 1 VERSIONINFO @@ -27,8 +27,8 @@ PRODUCTVERSION 0,0,9,0 FILEOS VOS__WINDOWS32 FILETYPE VFT_APP { - BLOCK "StringFileInfo" - { + BLOCK "StringFileInfo" + { BLOCK "000004b0" // LANG_NEUTRAL,UNICODE_CP { VALUE "Comments","MPlayer is distributed under the terms of the GNU General Public License Version 2. Source code is available at http://www.mplayerhq.hu\000" @@ -44,11 +44,10 @@ FILETYPE VFT_APP //VALUE "SpecialBuild","\000" } } - BLOCK "VarFileInfo" + BLOCK "VarFileInfo" { VALUE "Translation",0,0x04b0 } } IDI_ICON1 ICON DISCARDABLE "etc/mplayer.ico" - diff --git a/osdep/priority.c b/osdep/priority.c index ffc589386f..7a21868ddf 100644 --- a/osdep/priority.c +++ b/osdep/priority.c @@ -86,4 +86,3 @@ void set_priority(void) #endif } } - diff --git a/osdep/priority.h b/osdep/priority.h index cb4bc56c3f..1a74f95665 100644 --- a/osdep/priority.h +++ b/osdep/priority.h @@ -28,4 +28,3 @@ extern char *proc_priority; void set_priority(void); #endif /* MPLAYER_PRIORITY_H */ - diff --git a/osdep/strsep.c b/osdep/strsep.c index 21552907a5..a5ffa7054d 100644 --- a/osdep/strsep.c +++ b/osdep/strsep.c @@ -53,6 +53,6 @@ char *strsep(char **stringp, const char *delim) { } else *stringp = NULL; - + return begin; } diff --git a/osdep/timer-darwin.c b/osdep/timer-darwin.c index a6e5a987d1..e0b4622c00 100644 --- a/osdep/timer-darwin.c +++ b/osdep/timer-darwin.c @@ -37,9 +37,9 @@ const char timer_name[] = "Darwin accurate"; float sleep_accurate(float time_frame) { uint64_t deadline = time_frame / timebase_ratio + mach_absolute_time(); - + mach_wait_until(deadline); - + return (mach_absolute_time() - deadline) * timebase_ratio; } @@ -68,7 +68,7 @@ void InitTimer(void) struct mach_timebase_info timebase; mach_timebase_info(&timebase); - timebase_ratio = (double)timebase.numer / (double)timebase.denom + timebase_ratio = (double)timebase.numer / (double)timebase.denom * (double)1e-9; } @@ -78,7 +78,7 @@ void InitTimer(void) int main(void) { int i,j, r, c = 200; long long t = 0; - + InitTimer(); for (i = 0; i < c; i++) { diff --git a/osdep/timer-linux.c b/osdep/timer-linux.c index defb69ff7b..073ca84182 100644 --- a/osdep/timer-linux.c +++ b/osdep/timer-linux.c @@ -54,7 +54,7 @@ unsigned int GetTimer(void) struct timeval tv; gettimeofday(&tv,NULL); return tv.tv_sec * 1000000 + tv.tv_usec; -} +} // Returns current time in milliseconds unsigned int GetTimerMS(void) @@ -62,7 +62,7 @@ unsigned int GetTimerMS(void) struct timeval tv; gettimeofday(&tv,NULL); return tv.tv_sec * 1000 + tv.tv_usec / 1000; -} +} // Initialize timer, must be called at least once at start void InitTimer(void) diff --git a/osdep/timer-win2.c b/osdep/timer-win2.c index 0a424f2dd3..ac8eaa1bd6 100644 --- a/osdep/timer-win2.c +++ b/osdep/timer-win2.c @@ -37,10 +37,10 @@ unsigned int GetTimerMS(void) } int usec_sleep(int usec_delay){ - // Sleep(0) won't sleep for one clocktick as the unix usleep + // Sleep(0) won't sleep for one clocktick as the unix usleep // instead it will only make the thread ready // it may take some time until it actually starts to run again - if(usec_delay<1000)usec_delay=1000; + if(usec_delay<1000)usec_delay=1000; Sleep( usec_delay/1000); return 0; } -- cgit v1.2.3