[MPlayer-cvslog] r23723 - in trunk: configure gui/mplayer/common.c gui/skin/font.c gui/skin/skin.c libmpdemux/demux_mkv.c libmpdemux/demux_ty.c libvo/vo_dxr3.c m_option.c osdep/Makefile osdep/strlcat.c osdep/strlcpy.c stream/stream_cue.c stream/stream_dvb.c stream/stream_pvr.c stream/stream_radio.c stream/tv.c
Diego Biurrun
diego at biurrun.de
Fri Jul 6 09:32:39 CEST 2007
On Fri, Jul 06, 2007 at 12:01:07AM +0200, reimar wrote:
>
> Log:
> Avoid code duplication and ugly config.h hack by using av_strlcat/av_strlcpy
> instead of plain strlcat/strlcpy
>
>
> Modified:
> trunk/osdep/Makefile
> trunk/osdep/strlcat.c
> trunk/osdep/strlcpy.c
>
> --- trunk/osdep/Makefile (original)
> +++ trunk/osdep/Makefile Fri Jul 6 00:01:07 2007
> @@ -12,8 +12,6 @@ SRCS_COMMON-$(NEED_GLOB) +=
> SRCS_COMMON-$(NEED_SCANDIR) += scandir.c
> SRCS_COMMON-$(NEED_SETENV) += setenv.c
> SRCS_COMMON-$(NEED_SHMEM) += shmem.c
> -SRCS_COMMON-$(NEED_STRLCAT) += strlcat.c
> -SRCS_COMMON-$(NEED_STRLCPY) += strlcpy.c
> SRCS_COMMON-$(NEED_STRSEP) += strsep.c
> SRCS_COMMON-$(NEED_SWAB) += swab.c
> SRCS_COMMON-$(NEED_VSSCANF) += vsscanf.c
>
> --- trunk/osdep/strlcat.c (original)
> +++ trunk/osdep/strlcat.c Fri Jul 6 00:01:07 2007
> @@ -1,15 +0,0 @@
> -/* strlcat implementation for systems that do not have it in libc
> - * Time-stamp: <2004-03-14 njk>
> - * (C) 2003-2004 Nicholas J. Kain <njk at aerifal.cx>
> - */
> -
> -#include "config.h"
> -
> -unsigned int strlcat (char *dest, const char *src, unsigned int size)
> -{
> - register char *d = dest;
> -
> - for (; size > 0 && *d != '\0'; size--, d++);
> - return (d - dest) + strlcpy(d, src, size);
> -}
> -
>
> --- trunk/osdep/strlcpy.c (original)
> +++ trunk/osdep/strlcpy.c Fri Jul 6 00:01:07 2007
> @@ -1,22 +0,0 @@
> -/* strlcpy implementation for systems that do not have it in libc
> - * Time-stamp: <2004-03-14 njk>
> - * (C) 2003-2004 Nicholas J. Kain <njk at aerifal.cx>
> - */
> -
> -#include "config.h"
> -
> -unsigned int strlcpy (char *dest, const char *src, unsigned int size)
> -{
> - register unsigned int i = 0;
> -
> - if (size > 0) {
> - size--;
> - for (i=0; size > 0 && src[i] != '\0'; ++i, size--)
> - dest[i] = src[i];
> -
> - dest[i] = '\0';
> - }
> - while (src[i++]);
> -
> - return i;
> -}
It seems that you emptied the files when you really wanted to remove
them...
Diego
More information about the MPlayer-cvslog
mailing list