changeset 33779:55d46640a679

Remove duplicated string code from the Win32 GUI. Use common code. Patch by Stephen Sheldon, sfsheldo gmail com.
author ib
date Sun, 10 Jul 2011 15:42:09 +0000
parents 4fcbd59b4e78
children 04b4fa214c2a
files Makefile gui/win32/interface.c
diffstat 2 files changed, 2 insertions(+), 21 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Sun Jul 10 12:59:43 2011 +0000
+++ b/Makefile	Sun Jul 10 15:42:09 2011 +0000
@@ -517,7 +517,8 @@
 SRCS_MPLAYER-$(GL_WIN32)     += libvo/w32_common.c
 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
+SRCS_MPLAYER-$(GUI)          += gui/util/bitmap.c \
+                                gui/util/string.c
 SRCS_MPLAYER-$(GUI_GTK)      += gui/app.c \
                                 gui/cfg.c \
                                 gui/interface.c \
@@ -542,7 +543,6 @@
                                 gui/ui/widgets.c \
                                 gui/util/cut.c \
                                 gui/util/list.c \
-                                gui/util/string.c \
                                 gui/wm/ws.c \
                                 gui/wm/wsxdnd.c \
 
--- a/gui/win32/interface.c	Sun Jul 10 12:59:43 2011 +0000
+++ b/gui/win32/interface.c	Sun Jul 10 15:42:09 2011 +0000
@@ -94,25 +94,6 @@
     return 0;
 }
 
-char *gstrdup(const char *str)
-{
-    if (!str) return NULL;
-    return strdup(str);
-}
-
-void setdup (char **old, const char *str)
-{
-  free(*old);
-  *old = gstrdup(str);
-}
-
-void setddup (char **old, const char *dir, const char *name)
-{
-  free(*old);
-  *old = malloc(strlen(dir) + strlen(name) + 2);
-  if (*old) sprintf(*old, "%s/%s", dir, name);
-}
-
 /**
  * \brief this actually creates a new list containing only one element...
  */