# HG changeset patch # User arpi # Date 1041815550 0 # Node ID 74dd9b5cc7f69617a1107c60ff1ee3c95d6ff54d # Parent 9e4ef4ee2a069a03c55f5b605d7b852d53daf82c dirname() (from libgen) dependency removed patch by "Steven M. Schultz" diff -r 9e4ef4ee2a06 -r 74dd9b5cc7f6 libmpdemux/cue_read.c --- a/libmpdemux/cue_read.c Mon Jan 06 01:07:17 2003 +0000 +++ b/libmpdemux/cue_read.c Mon Jan 06 01:12:30 2003 +0000 @@ -8,7 +8,6 @@ #include #include #include -//#include #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 @@ /* 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);