* libguile/filesys.c: Trim trailing white-space. --- libguile/filesys.c | 122 ++++++++++++++++++++++----------------------- 1 file changed, 61 insertions(+), 61 deletions(-)
diff --git a/libguile/filesys.c b/libguile/filesys.c index 0e7078cf0..3bfa5eb91 100644 --- a/libguile/filesys.c +++ b/libguile/filesys.c @@ -146,7 +146,7 @@ */ #ifdef HAVE_CHOWN -SCM_DEFINE (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{object} to\n" "the integer values @var{owner} and @var{group}. @var{object} can be\n" @@ -224,7 +224,7 @@ SCM_DEFINE (scm_chownat, "chown-at", 4, 1, 0, -SCM_DEFINE (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 return a file descriptor instead of\n" "a port.") @@ -297,7 +297,7 @@ flags_to_mode (int iflags) } } -SCM_DEFINE (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.\n" "@var{flags} is an integer specifying how the file should be opened.\n" @@ -361,7 +361,7 @@ SCM_DEFINE (scm_openat, "openat", 3, 1, 0, #undef FUNC_NAME #endif /* HAVE_OPENAT */ -SCM_DEFINE (scm_close, "close", 1, 0, 0, +SCM_DEFINE (scm_close, "close", 1, 0, 0, (SCM fd_or_port), "Similar to close-port (@pxref{Closing, close-port}),\n" "but also works on file descriptors. A side\n" @@ -389,7 +389,7 @@ SCM_DEFINE (scm_close, "close", 1, 0, 0, } #undef FUNC_NAME -SCM_DEFINE (scm_close_fdes, "close-fdes", 1, 0, 0, +SCM_DEFINE (scm_close_fdes, "close-fdes", 1, 0, 0, (SCM fd), "A simple wrapper for the @code{close} system call.\n" "Close file descriptor @var{fd}, which must be an integer.\n" @@ -427,11 +427,11 @@ SCM_SYMBOL (scm_sym_fifo, "fifo"); SCM_SYMBOL (scm_sym_sock, "socket"); SCM_SYMBOL (scm_sym_unknown, "unknown"); -static SCM +static SCM scm_stat2scm (struct stat_or_stat64 *stat_temp) { SCM ans = scm_c_make_vector (18, SCM_UNSPECIFIED); - + SCM_SIMPLE_VECTOR_SET(ans, 0, scm_from_ulong (stat_temp->st_dev)); SCM_SIMPLE_VECTOR_SET(ans, 1, scm_from_ino_t_or_ino64_t (stat_temp->st_ino)); SCM_SIMPLE_VECTOR_SET(ans, 2, scm_from_ulong (stat_temp->st_mode)); @@ -459,7 +459,7 @@ scm_stat2scm (struct stat_or_stat64 *stat_temp) #endif { int mode = stat_temp->st_mode; - + if (S_ISREG (mode)) SCM_SIMPLE_VECTOR_SET(ans, 13, scm_sym_regular); else if (S_ISDIR (mode)) @@ -509,12 +509,12 @@ scm_stat2scm (struct stat_or_stat64 *stat_temp) tmp <<= 1; if (S_IWOTH & mode) tmp += 1; tmp <<= 1; - if (S_IXOTH & mode) tmp += 1; + if (S_IXOTH & mode) tmp += 1; SCM_SIMPLE_VECTOR_SET(ans, 14, scm_from_int (tmp)); - + */ - } + } #ifdef HAVE_STRUCT_STAT_ST_ATIM SCM_SIMPLE_VECTOR_SET(ans, 15, scm_from_long (stat_temp->st_atim.tv_nsec)); #else @@ -546,7 +546,7 @@ is_file_name_separator (SCM c) return 0; } -SCM_DEFINE (scm_stat, "stat", 1, 1, 0, +SCM_DEFINE (scm_stat, "stat", 1, 1, 0, (SCM object, SCM exception_on_error), "Return an object containing various information about the file\n" "determined by @var{object}. @var{object} can be a string containing\n" @@ -690,7 +690,7 @@ SCM_DEFINE (scm_statat, "statat", 2, 1, 0, #undef FUNC_NAME #endif /* HAVE_FSTATAT */ -SCM_DEFINE (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.,\n" "it will return information about a symbolic link itself, not the\n" @@ -743,7 +743,7 @@ SCM_DEFINE (scm_link, "link", 2, 0, 0, */ -SCM_DEFINE (scm_chdir, "chdir", 1, 0, 0, +SCM_DEFINE (scm_chdir, "chdir", 1, 0, 0, (SCM str), "Change the current working directory to @var{str}.\n" "@var{str} can be a string containing a file name,\n" @@ -832,7 +832,7 @@ fill_select_type (fd_set *set, SCM *ports_ready, SCM list_or_vec, int pos) if (scm_is_vector (list_or_vec)) { int i = SCM_SIMPLE_VECTOR_LENGTH (list_or_vec); - + while (--i >= 0) { int fd = set_element (set, ports_ready, @@ -881,11 +881,11 @@ get_element (fd_set *set, SCM element, SCM list) set: pointer to set of file descriptors found by select to be ready ports_ready: ports ready due to buffering list_or_vec: original list/vector handed to scm_select. - the return value is a list/vector of ready ports/file descriptors. + the return value is a list/vector of ready ports/file descriptors. works by finding the objects in list which correspond to members of *set and appending them to ports_ready. result is converted to a vector if list_or_vec is a vector. */ -static SCM +static SCM retrieve_select_type (fd_set *set, SCM ports_ready, SCM list_or_vec) { SCM answer_list = ports_ready; @@ -915,7 +915,7 @@ retrieve_select_type (fd_set *set, SCM ports_ready, SCM list_or_vec) } /* Static helper functions above refer to s_scm_select directly as s_select */ -SCM_DEFINE (scm_select, "select", 3, 2, 0, +SCM_DEFINE (scm_select, "select", 3, 2, 0, (SCM reads, SCM writes, SCM excepts, SCM secs, SCM usecs), "This procedure has a variety of uses: waiting for the ability\n" "to provide input, accept output, or the existence of\n" @@ -998,7 +998,7 @@ SCM_DEFINE (scm_select, "select", 3, 2, 0, max_fd = fill_select_type (&read_set, &read_ports_ready, reads, SCM_ARG1); { - int write_max = fill_select_type (&write_set, &write_ports_ready, + int write_max = fill_select_type (&write_set, &write_ports_ready, writes, SCM_ARG2); int except_max = fill_select_type (&except_set, NULL, excepts, SCM_ARG3); @@ -1123,7 +1123,7 @@ SCM_DEFINE (scm_fcntl, "fcntl", 2, 1, 0, #undef FUNC_NAME #endif /* HAVE_FCNTL */ -SCM_DEFINE (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\n" "descriptor to disk. If @var{object} is a port, its buffer is\n" @@ -1574,7 +1574,7 @@ SCM_DEFINE (scm_mkdirat, "mkdirat", 2, 1, 0, #undef FUNC_NAME #endif -SCM_DEFINE (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\n" "be empty for this to succeed. The return value is unspecified.") @@ -1641,7 +1641,7 @@ SCM_DEFINE (scm_renameat, "rename-file-at", 4, 0, 0, #undef FUNC_NAME #endif -SCM_DEFINE (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{str}.") #define FUNC_NAME s_scm_delete_file @@ -1814,7 +1814,7 @@ SCM_DEFINE (scm_chmodat, "chmodat", 3, 1, 0, #undef FUNC_NAME #endif -SCM_DEFINE (scm_umask, "umask", 0, 1, 0, +SCM_DEFINE (scm_umask, "umask", 0, 1, 0, (SCM mode), "If @var{mode} is omitted, returns a decimal number representing the current\n" "file creation mask. Otherwise the file creation mask is set to\n" @@ -2018,7 +2018,7 @@ SCM_DEFINE (scm_system_file_name_convention, } #undef FUNC_NAME -SCM_DEFINE (scm_dirname, "dirname", 1, 0, 0, +SCM_DEFINE (scm_dirname, "dirname", 1, 0, 0, (SCM filename), "Return the directory name component of the file name\n" "@var{filename}. If @var{filename} does not contain a directory\n" @@ -2044,7 +2044,7 @@ SCM_DEFINE (scm_dirname, "dirname", 1, 0, 0, } #undef FUNC_NAME -SCM_DEFINE (scm_basename, "basename", 1, 1, 0, +SCM_DEFINE (scm_basename, "basename", 1, 1, 0, (SCM filename, SCM suffix), "Return the base name of @var{filename}. The base name is the\n" "@var{filename} without any directory components.\n" @@ -2092,7 +2092,7 @@ SCM_DEFINE (scm_basename, "basename", 1, 1, 0, } #undef FUNC_NAME -SCM_DEFINE (scm_canonicalize_path, "canonicalize-path", 1, 0, 0, +SCM_DEFINE (scm_canonicalize_path, "canonicalize-path", 1, 0, 0, (SCM path), "Return the canonical path of @var{path}. A canonical path has\n" "no @code{.} or @code{..} components, nor any repeated path\n" @@ -2101,13 +2101,13 @@ SCM_DEFINE (scm_canonicalize_path, "canonicalize-path", 1, 0, 0, #define FUNC_NAME s_scm_canonicalize_path { char *str, *canon; - + SCM_VALIDATE_STRING (1, path); str = scm_to_locale_string (path); canon = canonicalize_file_name (str); free (str); - + if (canon) return scm_take_locale_string (canon); else @@ -2119,7 +2119,7 @@ SCM scm_i_relativize_path (SCM path, SCM in_path) { SCM scanon; - + { char *str, *canon; @@ -2132,7 +2132,7 @@ scm_i_relativize_path (SCM path, SCM in_path) scanon = scm_take_locale_string (canon); } - + for (; scm_is_pair (in_path); in_path = scm_cdr (in_path)) { SCM dir = scm_car (in_path); @@ -2145,7 +2145,7 @@ scm_i_relativize_path (SCM path, SCM in_path) str = scm_to_locale_string (dir); canon = canonicalize_file_name (str); free (str); - + if (canon) dir = scm_from_locale_string (canon); free (canon); @@ -2339,38 +2339,38 @@ scm_init_filesys () #ifdef O_RDONLY scm_c_define ("O_RDONLY", scm_from_int (O_RDONLY)); -#endif +#endif #ifdef O_WRONLY scm_c_define ("O_WRONLY", scm_from_int (O_WRONLY)); -#endif +#endif #ifdef O_RDWR scm_c_define ("O_RDWR", scm_from_int (O_RDWR)); -#endif +#endif #ifdef O_CREAT scm_c_define ("O_CREAT", scm_from_int (O_CREAT)); -#endif -#ifdef O_EXCL +#endif +#ifdef O_EXCL scm_c_define ("O_EXCL", scm_from_int (O_EXCL)); -#endif +#endif #ifdef O_NOCTTY scm_c_define ("O_NOCTTY", scm_from_int (O_NOCTTY)); -#endif -#ifdef O_TRUNC +#endif +#ifdef O_TRUNC scm_c_define ("O_TRUNC", scm_from_int (O_TRUNC)); -#endif +#endif #ifdef O_APPEND scm_c_define ("O_APPEND", scm_from_int (O_APPEND)); -#endif +#endif #ifdef O_NONBLOCK scm_c_define ("O_NONBLOCK", scm_from_int (O_NONBLOCK)); -#endif +#endif #ifdef O_NDELAY scm_c_define ("O_NDELAY", scm_from_int (O_NDELAY)); -#endif -#ifdef O_SYNC +#endif +#ifdef O_SYNC scm_c_define ("O_SYNC", scm_from_int (O_SYNC)); -#endif -#ifdef O_LARGEFILE +#endif +#ifdef O_LARGEFILE scm_c_define ("O_LARGEFILE", scm_from_int (O_LARGEFILE)); #endif #ifdef O_IGNORE_CTTY @@ -2413,28 +2413,28 @@ scm_init_filesys () scm_c_define ("O_DIRECT", scm_from_int (O_DIRECT)); #endif -#ifdef F_DUPFD +#ifdef F_DUPFD scm_c_define ("F_DUPFD", scm_from_int (F_DUPFD)); -#endif -#ifdef F_GETFD +#endif +#ifdef F_GETFD scm_c_define ("F_GETFD", scm_from_int (F_GETFD)); -#endif -#ifdef F_SETFD +#endif +#ifdef F_SETFD scm_c_define ("F_SETFD", scm_from_int (F_SETFD)); -#endif -#ifdef F_GETFL +#endif +#ifdef F_GETFL scm_c_define ("F_GETFL", scm_from_int (F_GETFL)); -#endif -#ifdef F_SETFL +#endif +#ifdef F_SETFL scm_c_define ("F_SETFL", scm_from_int (F_SETFL)); -#endif -#ifdef F_GETOWN +#endif +#ifdef F_GETOWN scm_c_define ("F_GETOWN", scm_from_int (F_GETOWN)); -#endif -#ifdef F_SETOWN +#endif +#ifdef F_SETOWN scm_c_define ("F_SETOWN", scm_from_int (F_SETOWN)); -#endif -#ifdef FD_CLOEXEC +#endif +#ifdef FD_CLOEXEC scm_c_define ("FD_CLOEXEC", scm_from_int (FD_CLOEXEC)); #endif #endif /* HAVE_POSIX */ -- 2.48.1