From e640e095e64a6016769ba9a0dc34d969b14b6154 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Sun, 26 Mar 2006 21:26:04 +0000 Subject: removed getenv dep and ported to GNU libc for GNU/Linux svn path=/trunk/externals/hcs/; revision=4773 --- folder_list.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'folder_list.c') diff --git a/folder_list.c b/folder_list.c index 370ec84..912f64f 100644 --- a/folder_list.c +++ b/folder_list.c @@ -1,8 +1,7 @@ #include -#include #include -static char *version = "$Revision: 1.2 $"; +static char *version = "$Revision: 1.3 $"; #define DEBUG(x) //#define DEBUG(x) x @@ -38,7 +37,7 @@ static void folder_list_output(t_folder_list* x) case GLOB_NOMATCH: error("[folder_list] no match"); break; } - for(i = 0; i < x->x_glob.gl_matchc; i++) + for(i = 0; i < x->x_glob.gl_pathc; i++) outlet_symbol( x->x_obj.ob_outlet, gensym(x->x_glob.gl_pathv[i]) ); } @@ -72,8 +71,8 @@ static void *folder_list_new(t_symbol *s) t_folder_list *x = (t_folder_list *)pd_new(folder_list_class); post("[folder_list] %s, written by Hans-Christoph Steiner ",version); - /* set HOME as default */ - x->x_pattern = gensym(getenv("HOME")); + /* TODO set current dir of patch as default */ + x->x_pattern = gensym("/")); symbolinlet_new(&x->x_obj, &x->x_pattern); outlet_new(&x->x_obj, &s_symbol); -- cgit v1.2.1