changeset 9102:048d0a158714

don't depend on libgen/basename()
author arpi
date Sun, 26 Jan 2003 15:55:35 +0000
parents 5d89b1d3a9d4
children 6c2c74adaebe
files libmenu/menu_pt.c
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libmenu/menu_pt.c	Sun Jan 26 15:43:55 2003 +0000
+++ b/libmenu/menu_pt.c	Sun Jan 26 15:55:35 2003 +0000
@@ -2,7 +2,7 @@
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
-#include <libgen.h>
+//#include <libgen.h>
 
 #include "../config.h"
 
@@ -18,7 +18,7 @@
 #include "../playtree.h"
 #include "../input/input.h"
 
-
+#define mp_basename(s) (strrchr((s),'/')==NULL?(char*)(s):(strrchr((s),'/')+1))
 
 extern play_tree_iter_t* playtree_iter;
 
@@ -127,7 +127,7 @@
   for( ; i != NULL ; i = i->next ) {
     e = calloc(1,sizeof(list_entry_t));
     if(i->files)
-      e->p.txt = basename(i->files[0]);
+      e->p.txt = mp_basename(i->files[0]);
     else
       e->p.txt = "Group ...";
     e->pt = i;