[MPlayer-cvslog] r33868 - in trunk: Makefile gui/win32/interface.c
ib
subversion at mplayerhq.hu
Sun Jul 10 17:45:18 CEST 2011
Author: ib
Date: Sun Jul 10 17:45:18 2011
New Revision: 33868
Log:
Remove duplicated list code from the Win32 GUI.
Use common code.
Patch by Stephen Sheldon, sfsheldo gmail com.
Modified:
trunk/Makefile
trunk/gui/win32/interface.c
Modified: trunk/Makefile
==============================================================================
--- trunk/Makefile Sun Jul 10 17:42:09 2011 (r33867)
+++ trunk/Makefile Sun Jul 10 17:45:18 2011 (r33868)
@@ -518,6 +518,7 @@ SRCS_MPLAYER-$(GL_WIN32) += libvo/w3
SRCS_MPLAYER-$(GL_X11) += libvo/x11_common.c
SRCS_MPLAYER-$(MATRIXVIEW) += libvo/vo_matrixview.c libvo/matrixview.c
SRCS_MPLAYER-$(GUI) += gui/util/bitmap.c \
+ gui/util/list.c \
gui/util/string.c
SRCS_MPLAYER-$(GUI_GTK) += gui/app.c \
gui/cfg.c \
@@ -542,7 +543,6 @@ SRCS_MPLAYER-$(GUI_GTK) += gui/app.
gui/ui/sub.c \
gui/ui/widgets.c \
gui/util/cut.c \
- gui/util/list.c \
gui/wm/ws.c \
gui/wm/wsxdnd.c \
Modified: trunk/gui/win32/interface.c
==============================================================================
--- trunk/gui/win32/interface.c Sun Jul 10 17:42:09 2011 (r33867)
+++ trunk/gui/win32/interface.c Sun Jul 10 17:45:18 2011 (r33868)
@@ -94,53 +94,6 @@ int parse_filename(char *file, play_tree
return 0;
}
-/**
- * \brief this actually creates a new list containing only one element...
- */
-void gaddlist( char ***list, const char *entry)
-{
- int i;
-
- if (*list)
- {
- for (i=0; (*list)[i]; i++) free((*list)[i]);
- free(*list);
- }
-
- *list = malloc(2 * sizeof(char **));
- (*list)[0] = gstrdup(entry);
- (*list)[1] = NULL;
-}
-
-/**
- * \brief this replaces a string starting with search by replace.
- * If not found, replace is appended.
- */
-void greplace(char ***list, const char *search, const char *replace)
-{
- int i = 0;
- int len = (search) ? strlen(search) : 0;
-
- if (*list)
- {
- for (i = 0; (*list)[i]; i++)
- {
- if (search && (!strncmp((*list)[i], search, len)))
- {
- free((*list)[i]);
- (*list)[i] = gstrdup(replace);
- return;
- }
- }
- *list = realloc(*list, (i + 2) * sizeof(char *));
- }
- else
- *list = malloc(2 * sizeof(char *));
-
- (*list)[i] = gstrdup(replace);
- (*list)[i + 1] = NULL;
-}
-
/* this function gets called by the gui to update mplayer */
static void guiSetEvent(int event)
{
More information about the MPlayer-cvslog
mailing list