summaryrefslogtreecommitdiffstats
path: root/lib.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2020-07-08 08:32:30 -0700
committerKaz Kylheku <kaz@kylheku.com>2020-07-08 08:32:30 -0700
commitdc73df1834c98dc13ba9c22bc3d009f604c07af7 (patch)
tree1dcf1acbb9c7b0825e460b01feef7d5d7b410647 /lib.c
parent107242691ea0317095bcb42378128de0eb4bbe57 (diff)
downloadtxr-dc73df1834c98dc13ba9c22bc3d009f604c07af7.tar.gz
txr-dc73df1834c98dc13ba9c22bc3d009f604c07af7.tar.bz2
txr-dc73df1834c98dc13ba9c22bc3d009f604c07af7.zip
Expose low-level opendir/readdir dir traversal.
* stream.c (UTF_DECL_OPENDIR): Macro defined, to enable w_opendir declaration in utf8.h. (w_opendir): Static function removed. * sysif.c (UTF_DECL_OPENDIR): Macro defined. (dir_s): Symbol defined unconditionally now, regardless of HAVE_PWUID. (dirent_s): New symbol. (dirent_st): New static variable. (struct dir): New struct type. (opendir_free, opendir_mark opendir_wrap, readdir_wrap): New static functions. (opendir_ops): New static structure. (sysif_init): Intern dirent symbol. Create dirent structure type. Register opendir and readdir intrinsic functions. Register variables dt-blk, dt-chr, dt-dir, dt-fifo, dt-lnk, dt-reg, dt-sock and dt-unknown. * utf8.c (UTF8_DECL_OPENDIR): Macro defined. (w_opendir): Function moved here from stream.c, and turned external. * utf8.h (w_opendir): Declared, conditionally on UTF8_DECL_OPENDIR being defined, so that most modules that include utf8.h don't have to include <dirent.h>. * txr.1: Documented. diff --git a/sysif.c b/sysif.c
Diffstat (limited to 'lib.c')
0 files changed, 0 insertions, 0 deletions