dirname() (from libgen) dependency removed

patch by "Steven M. Schultz" <sms@2BSD.COM>


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8816 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
arpi 2003-01-06 01:12:30 +00:00
parent 2d438c784c
commit c65b09bc56
1 changed files with 9 additions and 5 deletions

View File

@ -8,7 +8,6 @@
#include <sys/stat.h>
#include <unistd.h>
#include <fcntl.h>
//#include <libgen.h>
#include "config.h"
#include "mp_msg.h"
@ -33,9 +32,6 @@
#define MODE2_2336 40
#define UNKNOWN -1
// from libgen:
extern char *dirname(char *path);
static FILE* fd_cue;
static int fd_bin = 0;
@ -293,7 +289,15 @@ int cue_read_cue (char *in_cue_filename)
/* split the filename into a path and filename part */
s = strdup(in_cue_filename);
t = dirname(s);
t = strrchr(s, '/');
if (t == (char *)NULL)
t = ".";
else {
*t = '\0';
t = s;
if (*t)
strcpy(t, "/");
}
printf ("dirname: %s\n", t);
strcpy(bincue_path,t);