[MPlayer-cvslog] r33942 - in trunk/gui/win32: playlist.c playlist.h

diego subversion at mplayerhq.hu
Sat Jul 30 17:36:37 CEST 2011


Author: diego
Date: Sat Jul 30 17:36:37 2011
New Revision: 33942

Log:
win32 gui: replace C99 bool type by int

int is used in all other places for boolean arguments.

Modified:
   trunk/gui/win32/playlist.c
   trunk/gui/win32/playlist.h

Modified: trunk/gui/win32/playlist.c
==============================================================================
--- trunk/gui/win32/playlist.c	Sat Jul 30 16:04:49 2011	(r33941)
+++ trunk/gui/win32/playlist.c	Sat Jul 30 17:36:37 2011	(r33942)
@@ -22,7 +22,6 @@
  */
 
 #include <windows.h>
-#include <stdbool.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include "mp_msg.h"
@@ -30,7 +29,7 @@
 
 /* TODO: implement sort_playlist */
 
-bool adddirtoplaylist(playlist_t *playlist, const char *path, bool recursive)
+int adddirtoplaylist(playlist_t *playlist, const char *path, int recursive)
 {
     HANDLE findHandle = INVALID_HANDLE_VALUE;
     WIN32_FIND_DATA finddata;
@@ -41,7 +40,7 @@ bool adddirtoplaylist(playlist_t *playli
 
     findHandle = FindFirstFile(findpath, &finddata);
 
-    if (findHandle == INVALID_HANDLE_VALUE) return FALSE;
+    if (findHandle == INVALID_HANDLE_VALUE) return 0;
     do
     {
         if (finddata.cFileName[0] == '.' || strstr(finddata.cFileName, "Thumbs.db")) continue;
@@ -59,7 +58,7 @@ bool adddirtoplaylist(playlist_t *playli
         }
     } while (FindNextFile(findHandle, &finddata));
     FindClose(findHandle);
-    return TRUE;
+    return 1;
 }
 
 static void add_track(playlist_t *playlist, const char *filename, const char *artist, const char *title, int duration)

Modified: trunk/gui/win32/playlist.h
==============================================================================
--- trunk/gui/win32/playlist.h	Sat Jul 30 16:04:49 2011	(r33941)
+++ trunk/gui/win32/playlist.h	Sat Jul 30 17:36:37 2011	(r33942)
@@ -24,8 +24,6 @@
 #ifndef MPLAYER_GUI_PLAYLIST_H
 #define MPLAYER_GUI_PLAYLIST_H
 
-#include <stdbool.h>
-
 typedef struct
 {
     char *filename;
@@ -56,6 +54,6 @@ struct playlist_t
 #define SORT_BYDURATION     4
 
 playlist_t *create_playlist(void);
-bool adddirtoplaylist(playlist_t *playlist, const char* path, bool recursive);
+int adddirtoplaylist(playlist_t *playlist, const char* path, int recursive);
 
 #endif /* MPLAYER_GUI_PLAYLIST_H */


More information about the MPlayer-cvslog mailing list