Mercurial > mplayer.hg
diff gui/util/list.c @ 35493:411875efca3f
Introduce boolean symbolic constants.
Use them wherever suitable and useful to make code easier to read.
author | ib |
---|---|
date | Tue, 04 Dec 2012 18:36:14 +0000 |
parents | 58a221f73d75 |
children | e27855a45128 |
line wrap: on
line diff
--- a/gui/util/list.c Tue Dec 04 16:08:18 2012 +0000 +++ b/gui/util/list.c Tue Dec 04 18:36:14 2012 +0000 @@ -25,6 +25,7 @@ #include <string.h> #include "list.h" +#include "gui/gui.h" #include "string.h" #include "mp_msg.h" @@ -329,7 +330,7 @@ * @param what file to be added * @param how command (#PLAYLIST_ITEM_APPEND or #PLAYLIST_ITEM_INSERT) to be performed * - * @return 1 (ok) or 0 (error) + * @return #True (ok) or #False (error) */ int add_to_gui_playlist(const char *what, int how) { @@ -338,7 +339,7 @@ plItem *item; if (!what || !*what || (how != PLAYLIST_ITEM_APPEND && how != PLAYLIST_ITEM_INSERT)) - return 0; + return False; file = mp_basename(what); path = strdup(what); @@ -351,7 +352,7 @@ item = calloc(1, sizeof(plItem)); if (!item) - return 0; + return False; mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[list] adding %s/%s\n", path, file); @@ -360,5 +361,5 @@ listMgr(how, item); - return 1; + return True; }