summaryrefslogtreecommitdiffstats
path: root/sysif.h
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2015-08-30 10:10:48 -0700
committerKaz Kylheku <kaz@kylheku.com>2015-08-30 10:10:48 -0700
commite4ef51fb143fbd971d94b2f2f92683627dbabc60 (patch)
treec8302b4abf5610a3cd273ebae3233165647f2f67 /sysif.h
parent8dbbc8c2f56e84e9cff97188dc5ad832660d3cc8 (diff)
downloadtxr-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 'sysif.h')
-rw-r--r--sysif.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/sysif.h b/sysif.h
index 034d3911..c54ddbad 100644
--- a/sysif.h
+++ b/sysif.h
@@ -24,4 +24,12 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+extern val stat_s;
+extern val dev_k, ino_k, mode_k, nlink_k, uid_k;
+extern val gid_k, rdev_k, size_k, blksize_k, blocks_k;
+extern val atime_k, mtime_k, ctime_k;
+extern val dev_s, ino_s, mode_s, nlink_s, uid_s;
+extern val gid_s, rdev_s, size_s, blksize_s, blocks_s;
+extern val atime_s, mtime_s, ctime_s;
+
void sysif_init(void);