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 | |
parent | 6d908205fbadbdf7ccdc6c5e0eb918f0b43f16e0 (diff) | |
download | mpv-0eb321bf2c1cc0e048faff26a01f86cdd3ec254f.tar.bz2 mpv-0eb321bf2c1cc0e048faff26a01f86cdd3ec254f.tar.xz |
Remove trailing whitespace from most files
Diffstat (limited to 'osdep')
-rw-r--r-- | osdep/getch2-os2.c | 1 | ||||
-rw-r--r-- | osdep/getch2-win.c | 34 | ||||
-rw-r--r-- | osdep/getch2.c | 1 | ||||
-rw-r--r-- | osdep/glob-win.c | 8 | ||||
-rw-r--r-- | osdep/keycodes.h | 2 | ||||
-rw-r--r-- | osdep/macosx_finder_args.c | 6 | ||||
-rw-r--r-- | osdep/mmap_anon.c | 6 | ||||
-rw-r--r-- | osdep/mplayer.rc | 9 | ||||
-rw-r--r-- | osdep/priority.c | 1 | ||||
-rw-r--r-- | osdep/priority.h | 1 | ||||
-rw-r--r-- | osdep/strsep.c | 2 | ||||
-rw-r--r-- | osdep/timer-darwin.c | 8 | ||||
-rw-r--r-- | osdep/timer-linux.c | 4 | ||||
-rw-r--r-- | osdep/timer-win2.c | 4 |
14 files changed, 41 insertions, 46 deletions
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<gg.gl_pathc;i++)printf("GLOBED:%i %s\n",i,gg.gl_pathv[i]); } globfree(&gg); - + return 0; } #endif diff --git a/osdep/keycodes.h b/osdep/keycodes.h index fd5a7f22b2..4d153a24aa 100644 --- a/osdep/keycodes.h +++ b/osdep/keycodes.h @@ -72,7 +72,7 @@ #define KEY_VOLUME_UP (KEY_MM_BASE+10) #define KEY_VOLUME_DOWN (KEY_MM_BASE+11) #define KEY_MUTE (KEY_MM_BASE+12) - + /* Keypad keys */ #define KEY_KEYPAD (KEY_BASE+32) #define KEY_KP0 (KEY_KEYPAD+0) diff --git a/osdep/macosx_finder_args.c b/osdep/macosx_finder_args.c index f784db0e61..81c1959894 100644 --- a/osdep/macosx_finder_args.c +++ b/osdep/macosx_finder_args.c @@ -29,8 +29,8 @@ static play_tree_t *files=NULL; static inline void add_entry(play_tree_t **last_parentp, play_tree_t **last_entryp, play_tree_t *entry) { if(*last_entryp==NULL) - play_tree_set_child(*last_parentp, entry); - else + play_tree_set_child(*last_parentp, entry); + else play_tree_append_entry(*last_entryp, entry); *last_entryp=entry; @@ -97,7 +97,7 @@ long itemsInList; } else mp_msg(MSGT_CFGPARSER, MSGL_ERR, "AECountItems() error %d\n", res); - + AEDisposeDesc(&docList); } else diff --git a/osdep/mmap_anon.c b/osdep/mmap_anon.c index a29345a4ee..d5b3a3dd2f 100644 --- a/osdep/mmap_anon.c +++ b/osdep/mmap_anon.c @@ -36,9 +36,9 @@ /* * mmap() anonymous space, depending on the system's mmap() style. On systems * that use the /dev/zero mapping idiom, zerofd will be set to the file descriptor - * of the opened /dev/zero. + * of the opened /dev/zero. */ - + /** * \brief mmap() anonymous space, depending on the system's mmap() style. On systems * that use the /dev/zero mapping idiom, zerofd will be set to the file descriptor @@ -49,7 +49,7 @@ * \param prot protections (region accessibility). * \param flags specifies the type of the mapped object. * \param offset start mapping at byte offset. - * \param zerofd + * \param zerofd * \return a pointer to the mapped region upon successful completion, -1 otherwise. */ void *mmap_anon(void *addr, size_t len, int prot, int flags, off_t offset) diff --git a/osdep/mplayer.rc b/osdep/mplayer.rc index 82c5fbb317..7432b45231 100644 --- a/osdep/mplayer.rc +++ b/osdep/mplayer.rc @@ -18,7 +18,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#include <winver.h> +#include <winver.h> #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; } |