aboutsummaryrefslogtreecommitdiff
path: root/folder_list.c
diff options
context:
space:
mode:
authorHans-Christoph Steiner <eighthave@users.sourceforge.net>2006-03-26 21:26:04 +0000
committerHans-Christoph Steiner <eighthave@users.sourceforge.net>2006-03-26 21:26:04 +0000
commite640e095e64a6016769ba9a0dc34d969b14b6154 (patch)
tree0153801cbe226938571c994e45b47c102838277a /folder_list.c
parentee789f52c88821ffbd5a40e6653c1b685c7fb48a (diff)
removed getenv dep and ported to GNU libc for GNU/Linux
svn path=/trunk/externals/hcs/; revision=4773
Diffstat (limited to 'folder_list.c')
-rw-r--r--folder_list.c9
1 files changed, 4 insertions, 5 deletions
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 <m_pd.h>
-#include <stdlib.h>
#include <glob.h>
-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 <hans@at.or.at>",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);