[MPlayer-dev-eng] [PATCH] replace glibc basename by macro to

Diego Biurrun diego at biurrun.de
Sun Jan 26 19:05:05 CET 2003


Arpi writes:
 > > +
 > > +#ifdef HAVE_LIBGEN_H
 > >  #include <libgen.h>
 > > +#else
 > > +#define basename(s) (strrchr(s,'/')==NULL?(char*)s:(strrchr(s,'/')+1))
 > > +#endif
 > 
 > imho we shouldn't use libgen at all, even if available.
 > dirna,e() and basename() are so simple that can be implemented in a single
 > line macro of a few line function. we should put mp_basename() and
 > mp_dirname() into linux/ (soon: osdep/) dir.

Hmm, should we start adding a "cleanup after 0.90" list in the TODO?

Diego


More information about the MPlayer-dev-eng mailing list