diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2015-08-30 10:10:48 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2015-08-30 10:10:48 -0700 |
commit | e4ef51fb143fbd971d94b2f2f92683627dbabc60 (patch) | |
tree | c8302b4abf5610a3cd273ebae3233165647f2f67 /stream.c | |
parent | 8dbbc8c2f56e84e9cff97188dc5ad832660d3cc8 (diff) | |
download | txr-e4ef51fb143fbd971d94b2f2f92683627dbabc60.tar.gz txr-e4ef51fb143fbd971d94b2f2f92683627dbabc60.tar.bz2 txr-e4ef51fb143fbd971d94b2f2f92683627dbabc60.zip |
Move stat functions to use a struct.
* lib.c (init): Move hash_init and struct init
before sysif_init.
* share/txr/stdlib/path-test.tl (sys:path-test-mode,
path-mine-p, path-my-group-p, sys:path-access,
path-newer, path-examine): Convert to struct return
of stat functions.
* stream.c (dev_k, ino_k, mode_k, nlink_k, uid_k,
gid_k, rdev_k, size_k, blksize_k, blocks_k, atime_k,
mtime_k, ctime_k): Global variable definitions removed from here.
(stream_init): Initializations of moved global
variables removed from here.
* stream.h (dev_k, ino_k, mode_k, nlink_k, uid_k,
gid_k, rdev_k, size_k, blksize_k, blocks_k, atime_k,
mtime_k, ctime_k): Declarations removed from here.
* sysif.c (stat_s, dev_s, ino_s, mode_s, nlink_s,
uid_s, gid_s, rdev_s, size_s, blksize_s, blocks_s,
atime_s, mtime_s, ctime_s): New global variables.
(dev_k, ino_k, mode_k, nlink_k, uid_k, gid_k, rdev_k,
size_k, blksize_k, blocks_k, atime_k, mtime_k,
ctime_k): Existing variables moved here.
(stat_to_struct): New static function.
(stat_impl): Use stat_to_struct, except under
113 compatibility.
(sysif_init): Initialize new symbol variables.
Make stat struct type.
* sysif.h (stat_s, dev_s, ino_s, mode_s, nlink_s,
uid_s, gid_s, rdev_s, size_s, blksize_s, blocks_s,
atime_s, mtime_s, ctime_s): Declared.
Diffstat (limited to 'stream.c')
-rw-r--r-- | stream.c | 16 |
1 files changed, 0 insertions, 16 deletions
@@ -64,9 +64,6 @@ val stdin_s, stdout_s, stddebug_s, stderr_s, stdnull_s; -val dev_k, ino_k, mode_k, nlink_k, uid_k; -val gid_k, rdev_k, size_k, blksize_k, blocks_k; -val atime_k, mtime_k, ctime_k; val from_start_k, from_current_k, from_end_k; val real_time_k, name_k, fd_k; val format_s; @@ -3213,19 +3210,6 @@ void stream_init(void) detect_format_string(); - dev_k = intern(lit("dev"), keyword_package); - ino_k = intern(lit("ino"), keyword_package); - mode_k = intern(lit("mode"), keyword_package); - nlink_k = intern(lit("nlink"), keyword_package); - uid_k = intern(lit("uid"), keyword_package); - gid_k = intern(lit("gid"), keyword_package); - rdev_k = intern(lit("rdev"), keyword_package); - size_k = intern(lit("size"), keyword_package); - blksize_k = intern(lit("blksize"), keyword_package); - blocks_k = intern(lit("blocks"), keyword_package); - atime_k = intern(lit("atime"), keyword_package); - mtime_k = intern(lit("mtime"), keyword_package); - ctime_k = intern(lit("ctime"), keyword_package); from_start_k = intern(lit("from-start"), keyword_package); from_current_k = intern(lit("from-current"), keyword_package); from_end_k = intern(lit("from-end"), keyword_package); |