changeset 33854:e2e7d9d88063

win32 gui: replace C99 bool type by int int is used in all other places for boolean arguments.
author diego
date Sat, 30 Jul 2011 15:36:37 +0000
parents 4b0394235050
children 395ed228b8f5
files gui/win32/playlist.c gui/win32/playlist.h
diffstat 2 files changed, 4 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/gui/win32/playlist.c	Sat Jul 30 14:04:49 2011 +0000
+++ b/gui/win32/playlist.c	Sat Jul 30 15:36:37 2011 +0000
@@ -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 @@
 
     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 @@
         }
     } 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)
--- a/gui/win32/playlist.h	Sat Jul 30 14:04:49 2011 +0000
+++ b/gui/win32/playlist.h	Sat Jul 30 15:36:37 2011 +0000
@@ -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 @@
 #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 */