From 478ae133483a91b35028eca9666689669fe55015 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Sat, 8 Apr 2017 13:10:56 -0700 Subject: New path slot in stat struct. * ftw.c (ftw_callback): Pass path to stat_to_struct function. * socket.c (path_s): Variable definition removed from here. (sock_load_init): Do not intern path symbol here. * sysif.c (path_s): Variable definition moved here. (stat_to_struct): New parameter, path. Store its argument in the path slot of the structure. (stat_impl): New parameter, path. Pass argument to stat_to_struct. (statp, statl): Pass path down to stat_impl. (statf): Pass nil down as path argument of stat_impl. (sysif_init): Intern path symbol here. Add path_s to the slot list in the make_struct_type call which creates the stat structure type. * sysif.h (path_s): Declared here now. (stat_to_struct): Declaration updated. * txr.1: Documented new slot of stat structure and behavior of stat, lstat and fstat w.r.t. this slot. --- ftw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ftw.c') diff --git a/ftw.c b/ftw.c index 9f3109dc..346b0655 100644 --- a/ftw.c +++ b/ftw.c @@ -61,7 +61,7 @@ static int ftw_callback(const char *c_path, const struct stat *c_sb, { val path = string_utf8(c_path); val type = num(c_type); - val sb = stat_to_struct(*c_sb); + val sb = stat_to_struct(*c_sb, path); val level = num(fb->level); val base = num(fb->base); val result; -- cgit v1.2.3