summaryrefslogtreecommitdiffstats
path: root/ftw.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2020-07-20 07:13:40 -0700
committerKaz Kylheku <kaz@kylheku.com>2020-07-20 07:13:40 -0700
commitd9afdbb32c0dd0b693e01b4204176d333805571b (patch)
treebb515cc1144e5de5127f332ac7f5a4a811192fa0 /ftw.c
parent9cd58d83904fc531f214c3bc2f506c80d816f415 (diff)
downloadtxr-d9afdbb32c0dd0b693e01b4204176d333805571b.tar.gz
txr-d9afdbb32c0dd0b693e01b4204176d333805571b.tar.bz2
txr-d9afdbb32c0dd0b693e01b4204176d333805571b.zip
stat, lstat and dirstat now take struct param.
* ftw.c (ftw_callback): Pass nil to new parameter of stat_to_struct, to have a new stat struct allocated as before. * sysif.c (stat_to_struct, stat_impl, stat_wrap, lstat_wrap dirstat): New optional parameter that lets caller specify an existing struct object to fill. (sysif_init): Adjust registrations of stat, fstat, lstat and dirstat for new optional parameter. * sysif.h (stat_to_struct, stat_wrap): Declarations updated. * txr.1: Documented.
Diffstat (limited to 'ftw.c')
-rw-r--r--ftw.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ftw.c b/ftw.c
index 4e911f2f..57790b4e 100644
--- a/ftw.c
+++ b/ftw.c
@@ -65,7 +65,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, path);
+ val sb = stat_to_struct(*c_sb, path, nil);
val level = num(fb->level);
val base = num(fb->base);
val result;