/* {Permissions}
*/
-GUILE_PROC (scm_chown, "chown", 3, 0, 0,
+SCM_DEFINE (scm_chown, "chown", 3, 0, 0,
(SCM object, SCM owner, SCM group),
"Change the ownership and group of the file referred to by @var{obj} to
the integer userid values @var{owner} and @var{group}. @var{obj} can be
#undef FUNC_NAME
-GUILE_PROC (scm_chmod, "chmod", 2, 0, 0,
+SCM_DEFINE (scm_chmod, "chmod", 2, 0, 0,
(SCM object, SCM mode),
"Changes the permissions of the file referred to by @var{obj}.
@var{obj} can be a string containing a file name or a port or integer file
}
#undef FUNC_NAME
-GUILE_PROC (scm_umask, "umask", 0, 1, 0,
+SCM_DEFINE (scm_umask, "umask", 0, 1, 0,
(SCM mode),
"If @var{mode} is omitted, retuns a decimal number representing the current
file creation mask. Otherwise the file creation mask is set to
\f
-GUILE_PROC (scm_open_fdes, "open-fdes", 2, 1, 0,
+SCM_DEFINE (scm_open_fdes, "open-fdes", 2, 1, 0,
(SCM path, SCM flags, SCM mode),
"Similar to @code{open} but returns a file descriptor instead of a
port.")
}
#undef FUNC_NAME
-GUILE_PROC (scm_open, "open", 2, 1, 0,
+SCM_DEFINE (scm_open, "open", 2, 1, 0,
(SCM path, SCM flags, SCM mode),
"Open the file named by @var{path} for reading and/or writing.
@var{flags} is an integer specifying how the file should be opened.
}
#undef FUNC_NAME
-GUILE_PROC (scm_close, "close", 1, 0, 0,
+SCM_DEFINE (scm_close, "close", 1, 0, 0,
(SCM fd_or_port),
"Similar to close-port (@pxref{Generic Port Operations, close-port}),
but also works on file descriptors. A side
return ans;
}
-GUILE_PROC (scm_stat, "stat", 1, 0, 0,
+SCM_DEFINE (scm_stat, "stat", 1, 0, 0,
(SCM object),
"Returns an object containing various information
about the file determined by @var{obj}.
/* {Modifying Directories}
*/
-GUILE_PROC (scm_link, "link", 2, 0, 0,
+SCM_DEFINE (scm_link, "link", 2, 0, 0,
(SCM oldpath, SCM newpath),
"Creates a new name @var{path-to} in the file system for the file
named by @var{path-from}. If @var{path-from} is a symbolic link, the
-GUILE_PROC (scm_rename, "rename-file", 2, 0, 0,
+SCM_DEFINE (scm_rename, "rename-file", 2, 0, 0,
(SCM oldname, SCM newname),
"Renames the file specified by @var{path-from} to @var{path-to}.
The return value is unspecified.")
#undef FUNC_NAME
-GUILE_PROC(scm_delete_file, "delete-file", 1, 0, 0,
+SCM_DEFINE(scm_delete_file, "delete-file", 1, 0, 0,
(SCM str),
"Deletes (or \"unlinks\") the file specified by @var{path}.")
#define FUNC_NAME s_scm_delete_file
}
#undef FUNC_NAME
-GUILE_PROC (scm_mkdir, "mkdir", 1, 1, 0,
+SCM_DEFINE (scm_mkdir, "mkdir", 1, 1, 0,
(SCM path, SCM mode),
"Create a new directory named by @var{path}. If @var{mode} is omitted
then the permissions of the directory file are set using the current
#undef FUNC_NAME
-GUILE_PROC (scm_rmdir, "rmdir", 1, 0, 0,
+SCM_DEFINE (scm_rmdir, "rmdir", 1, 0, 0,
(SCM path),
"Remove the existing directory named by @var{path}. The directory must
be empty for this to succeed. The return value is unspecified.")
long scm_tc16_dir;
-GUILE_PROC (scm_directory_stream_p, "directory-stream?", 1, 0, 0,
+SCM_DEFINE (scm_directory_stream_p, "directory-stream?", 1, 0, 0,
(SCM obj),
"Returns a boolean indicating whether @var{object} is a directory stream
as returned by @code{opendir}.")
}
#undef FUNC_NAME
-GUILE_PROC (scm_opendir, "opendir", 1, 0, 0,
+SCM_DEFINE (scm_opendir, "opendir", 1, 0, 0,
(SCM dirname),
"Open the directory specified by @var{path} and return a directory
stream.")
#undef FUNC_NAME
-GUILE_PROC (scm_readdir, "readdir", 1, 0, 0,
+SCM_DEFINE (scm_readdir, "readdir", 1, 0, 0,
(SCM port),
"Return (as a string) the next directory entry from the directory stream
@var{stream}. If there is no remaining entry to be read then the
-GUILE_PROC (scm_rewinddir, "rewinddir", 1, 0, 0,
+SCM_DEFINE (scm_rewinddir, "rewinddir", 1, 0, 0,
(SCM port),
"Reset the directory port @var{stream} so that the next call to
@code{readdir} will return the first directory entry.")
-GUILE_PROC (scm_closedir, "closedir", 1, 0, 0,
+SCM_DEFINE (scm_closedir, "closedir", 1, 0, 0,
(SCM port),
"Close the directory stream @var{stream}.
The return value is unspecified.")
*/
-GUILE_PROC (scm_chdir, "chdir", 1, 0, 0,
+SCM_DEFINE (scm_chdir, "chdir", 1, 0, 0,
(SCM str),
"Change the current working directory to @var{path}.
The return value is unspecified.")
-GUILE_PROC (scm_getcwd, "getcwd", 0, 0, 0,
+SCM_DEFINE (scm_getcwd, "getcwd", 0, 0, 0,
(),
"Returns the name of the current working directory.")
#define FUNC_NAME s_scm_getcwd
}
/* Static helper functions above refer to s_scm_select directly as s_select */
-GUILE_PROC (scm_select, "select", 3, 2, 0,
+SCM_DEFINE (scm_select, "select", 3, 2, 0,
(SCM reads, SCM writes, SCM excepts, SCM secs, SCM usecs),
"@var{reads}, @var{writes} and @var{excepts} can be lists or vectors: it
doesn't matter which, but the corresponding object returned will be
\f
-GUILE_PROC (scm_fcntl, "fcntl", 2, 0, 1,
+SCM_DEFINE (scm_fcntl, "fcntl", 2, 0, 1,
(SCM object, SCM cmd, SCM value),
"Apply @var{command} to the specified file descriptor or the underlying
file descriptor of the specified port. @var{value} is an optional
}
#undef FUNC_NAME
-GUILE_PROC (scm_fsync, "fsync", 1, 0, 0,
+SCM_DEFINE (scm_fsync, "fsync", 1, 0, 0,
(SCM object),
"Copies any unwritten data for the specified output file descriptor to disk.
If @var{port/fd} is a port, its buffer is flushed before the underlying
}
#undef FUNC_NAME
-GUILE_PROC (scm_symlink, "symlink", 2, 0, 0,
+SCM_DEFINE (scm_symlink, "symlink", 2, 0, 0,
(SCM oldpath, SCM newpath),
"Create a symbolic link named @var{path-to} with the value (i.e., pointing to)
@var{path-from}. The return value is unspecified.")
#undef FUNC_NAME
-GUILE_PROC (scm_readlink, "readlink", 1, 0, 0,
+SCM_DEFINE (scm_readlink, "readlink", 1, 0, 0,
(SCM path),
"Returns the value of the symbolic link named by
@var{path} (a string), i.e., the
#undef FUNC_NAME
-GUILE_PROC (scm_lstat, "lstat", 1, 0, 0,
+SCM_DEFINE (scm_lstat, "lstat", 1, 0, 0,
(SCM str),
"Similar to @code{stat}, but does not follow symbolic links, i.e.,
it will return information about a symbolic link itself, not the
#undef FUNC_NAME
-GUILE_PROC (scm_copy_file, "copy-file", 2, 0, 0,
+SCM_DEFINE (scm_copy_file, "copy-file", 2, 0, 0,
(SCM oldfile, SCM newfile),
"Copy the file specified by @var{path-from} to @var{path-to}.
The return value is unspecified.")
SCM scm_dot_string;
-GUILE_PROC (scm_dirname, "dirname", 1, 0, 0,
+SCM_DEFINE (scm_dirname, "dirname", 1, 0, 0,
(SCM filename),
"")
#define FUNC_NAME s_scm_dirname
}
#undef FUNC_NAME
-GUILE_PROC (scm_basename, "basename", 1, 1, 0,
+SCM_DEFINE (scm_basename, "basename", 1, 1, 0,
(SCM filename, SCM suffix),
"")
#define FUNC_NAME s_scm_basename