[MPlayer-cvslog] r32630 - in trunk: gui/interface.c libmenu/menu_pt.c mplayer.c path.c path.h

Clément Bœsch ubitux at gmail.com
Wed Nov 17 22:16:17 CET 2010


On Wed, Nov 17, 2010 at 06:33:22PM +0300, Yuriy Kaminskiy wrote:
> cboesch wrote:
> > Author: cboesch
> > Date: Tue Nov 16 22:06:52 2010
> > New Revision: 32630
> > 
> > Log:
> > Export mp_basename in a function instead of duplicate macros in various places
> > 
> > Modified:
> >    trunk/gui/interface.c
> >    trunk/libmenu/menu_pt.c
> >    trunk/mplayer.c
> >    trunk/path.c
> >    trunk/path.h
> > 
> [...]
> > Modified: trunk/path.c
> > ==============================================================================
> > --- trunk/path.c	Tue Nov 16 20:58:54 2010	(r32629)
> > +++ trunk/path.c	Tue Nov 16 22:06:52 2010	(r32630)
> > @@ -193,3 +193,16 @@ void set_codec_path(const char *path)
> >      strcpy(codec_path, path);
> >      needs_free = 1;
> >  }
> > +
> > +const char *mp_basename(const char *path)
> > +{
> > +    char *s;
> > +
> > +#if HAVE_DOS_PATHS
> > +    s = strrchr(path, '\\');
> > +    if (s)
> > +        return s + 1;
> > +#endif
> > +    s = strrchr(path, '/');
> > +    return s ? s + 1 : s;
> 1) Return NULL and sigsegv on filenames without /.
> s/: s;/: path;/
> 2) Not that I care about DoSish OS, but it does not work nice with both \ and /
> in paths, like c:\foo/bar.avi
> 

Both applied, thanks.

-- 
Clément B.
Not sent from a jesusPhone.


More information about the MPlayer-cvslog mailing list