diff options
author | Gary Houston <ghouston@arglist.com> | 1997-01-18 17:51:33 +0000 |
---|---|---|
committer | Gary Houston <ghouston@arglist.com> | 1997-01-18 17:51:33 +0000 |
commit | 3d8d56dfacd9a9072903e4b9c09ab1a81cd873cb (patch) | |
tree | 9436d8f9ad3a89adc4e37f051efb46e21c8a54f6 /libguile/filesys.h | |
parent | 3f81f8f238fc2c467a867d5e72f83baa22ac7914 (diff) | |
download | guile-3d8d56dfacd9a9072903e4b9c09ab1a81cd873cb.tar.gz |
* init.scm (index, rindex): replace versions in utilities.scm with
primitives.
load errno.scm.
* netconst.scm: undefine maybe-define and maybe-define-so after use.
* errno.scm: new file.
* fports.c (scm_open_file): pass errno to scm_syserror_msg.
* filesys.h: update prototypes. Remove macros: SCM_FD_P, SCM_FD_FLAGS,
SCM_FD.
* filesys.c (scm_sys_stat, scm_sys_lstat): pass errno to
scm_syserror_msg.
* (scm_sys_read_fd, scm_sys_write_fd, scm_sys_close, scm_sys_lseek,
scm_sys_dup): deleted: FD capability will be added to other
procedures.
* Remove support for the FD object type: scm_tc16_fd, scm_fd_print,
scm_fd_free, fd_smob, scm_intern_fd.
* (scm_open): renamed from scm_sys_open. Return a port instead of
an FD object. Make the mode argument optional.
* (scm_sys_create): deleted, it's just a special case of open.
(scm_init_filesys): move interning of constants O_CREAT etc.,
here (were previously using SCM_CONST_LONG macro).
Add missing constants: O_RDONLY, O_WRONLY, O_RDWR, O_CREAT.
don't newsmob fd.
(numerous _sys_ procedures): remove gratuitous _sys_ from names.
include "fports.h" and <stdio.h>
(scm_stat, scm_select): don't support FD objects.
* error.h: adjust scm_syserror_msg prototype.
* error.c (scm_syserror_msg): take an extra argument for errno.
Using the global value didn't always work, since it could be
reset by procedure calls in the message or args arguments.
* fports.c (scm_setbuf0): call setbuf even if FIONREAD is not defined.
I don't understand why the check was there (and what about the
ultrix check?)
* strop.c (scm_string_copy): allow shared substrings to be copied.
* unif.h: corresponding change to prototypes.
* unif.c (scm_uniform_array_read_x, scm_uniform_array_write_x):
recognize two new optional arguments: offset and length. Allow
the port argument to be an integer (file descriptor, for scsh).
Include <unistd.h> for "read" prototype.
Diffstat (limited to 'libguile/filesys.h')
-rw-r--r-- | libguile/filesys.h | 64 |
1 files changed, 20 insertions, 44 deletions
diff --git a/libguile/filesys.h b/libguile/filesys.h index ff7a28664..dd73537bd 100644 --- a/libguile/filesys.h +++ b/libguile/filesys.h @@ -2,7 +2,7 @@ #ifndef FILESYSH #define FILESYSH -/* Copyright (C) 1995 Free Software Foundation, Inc. +/* Copyright (C) 1995,1997 Free Software Foundation, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -49,57 +49,33 @@ -extern long scm_tc16_fd; - -#define SCM_FD_P(x) (SCM_TYP16(x)==(scm_tc16_fd)) -#define SCM_FD_FLAGS(x) (SCM_CAR(x) >> 16) -#define SCM_FD(x) ((int)SCM_CDR (x)) - -enum scm_fd_flags -{ - scm_fd_is_open = 1, - scm_close_fd_on_gc = 2 -}; - - - - extern long scm_tc16_dir; #define SCM_DIRP(x) (SCM_TYP16(x)==(scm_tc16_dir)) #define SCM_OPDIRP(x) (SCM_CAR(x)==(scm_tc16_dir | SCM_OPN)) - - -extern SCM scm_sys_chown SCM_P ((SCM path, SCM owner, SCM group)); -extern SCM scm_sys_chmod SCM_P ((SCM port_or_path, SCM mode)); +extern SCM scm_chown SCM_P ((SCM path, SCM owner, SCM group)); +extern SCM scm_chmod SCM_P ((SCM port_or_path, SCM mode)); extern SCM scm_umask SCM_P ((SCM mode)); -extern SCM scm_intern_fd SCM_P ((int fd, int flags)); -extern SCM scm_sys_open SCM_P ((SCM path, SCM flags, SCM mode)); -extern SCM scm_sys_create SCM_P ((SCM path, SCM mode)); -extern SCM scm_sys_close SCM_P ((SCM sfd)); -extern SCM scm_sys_write_fd SCM_P ((SCM sfd, SCM buf)); -extern SCM scm_sys_read_fd SCM_P ((SCM sfd, SCM buf, SCM offset, SCM length)); -extern SCM scm_sys_lseek SCM_P ((SCM sfd, SCM offset, SCM whence)); -extern SCM scm_sys_dup SCM_P ((SCM oldfd, SCM newfd)); -extern SCM scm_sys_stat SCM_P ((SCM fd_or_path)); -extern SCM scm_sys_link SCM_P ((SCM oldpath, SCM newpath)); -extern SCM scm_sys_rename SCM_P ((SCM oldname, SCM newname)); -extern SCM scm_sys_delete_file SCM_P ((SCM str)); -extern SCM scm_sys_mkdir SCM_P ((SCM path, SCM mode)); -extern SCM scm_sys_rmdir SCM_P ((SCM path)); -extern SCM scm_sys_opendir SCM_P ((SCM dirname)); -extern SCM scm_sys_readdir SCM_P ((SCM port)); +extern SCM scm_open SCM_P ((SCM path, SCM flags, SCM mode)); +extern SCM scm_stat SCM_P ((SCM fd_or_path)); +extern SCM scm_link SCM_P ((SCM oldpath, SCM newpath)); +extern SCM scm_rename SCM_P ((SCM oldname, SCM newname)); +extern SCM scm_delete_file SCM_P ((SCM str)); +extern SCM scm_mkdir SCM_P ((SCM path, SCM mode)); +extern SCM scm_rmdir SCM_P ((SCM path)); +extern SCM scm_opendir SCM_P ((SCM dirname)); +extern SCM scm_readdir SCM_P ((SCM port)); extern SCM scm_rewinddir SCM_P ((SCM port)); -extern SCM scm_sys_closedir SCM_P ((SCM port)); -extern SCM scm_sys_chdir SCM_P ((SCM str)); -extern SCM scm_sys_getcwd SCM_P ((void)); -extern SCM scm_sys_select SCM_P ((SCM reads, SCM writes, SCM excepts, SCM secs, SCM msecs)); +extern SCM scm_closedir SCM_P ((SCM port)); +extern SCM scm_chdir SCM_P ((SCM str)); +extern SCM scm_getcwd SCM_P ((void)); +extern SCM scm_select SCM_P ((SCM reads, SCM writes, SCM excepts, SCM secs, SCM msecs)); extern int scm_input_waiting_p SCM_P ((FILE *file, char *caller)); -extern SCM scm_sys_symlink SCM_P ((SCM oldpath, SCM newpath)); -extern SCM scm_sys_readlink SCM_P ((SCM path)); -extern SCM scm_sys_lstat SCM_P ((SCM str)); -extern SCM scm_sys_copy_file SCM_P ((SCM oldfile, SCM newfile)); +extern SCM scm_symlink SCM_P ((SCM oldpath, SCM newpath)); +extern SCM scm_readlink SCM_P ((SCM path)); +extern SCM scm_lstat SCM_P ((SCM str)); +extern SCM scm_copy_file SCM_P ((SCM oldfile, SCM newfile)); extern void scm_init_filesys SCM_P ((void)); #endif /* FILESYSH */ |