mirror of https://github.com/mpv-player/mpv
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:
parent
2d438c784c
commit
c65b09bc56
|
@ -8,7 +8,6 @@
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
//#include <libgen.h>
|
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "mp_msg.h"
|
#include "mp_msg.h"
|
||||||
|
@ -33,9 +32,6 @@
|
||||||
#define MODE2_2336 40
|
#define MODE2_2336 40
|
||||||
#define UNKNOWN -1
|
#define UNKNOWN -1
|
||||||
|
|
||||||
// from libgen:
|
|
||||||
extern char *dirname(char *path);
|
|
||||||
|
|
||||||
static FILE* fd_cue;
|
static FILE* fd_cue;
|
||||||
static int fd_bin = 0;
|
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 */
|
/* split the filename into a path and filename part */
|
||||||
s = strdup(in_cue_filename);
|
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);
|
printf ("dirname: %s\n", t);
|
||||||
strcpy(bincue_path,t);
|
strcpy(bincue_path,t);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue