From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 27 20:11:15 2025 Received: (at submit) by debbugs.gnu.org; 28 Feb 2025 01:11:15 +0000 Received: from localhost ([127.0.0.1]:40807 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tnouH-0003i7-S8 for submit@debbugs.gnu.org; Thu, 27 Feb 2025 20:11:15 -0500 Received: from lists.gnu.org ([2001:470:142::17]:52174) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1tnouD-0003gl-KD for submit@debbugs.gnu.org; Thu, 27 Feb 2025 20:11:11 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <~@wolfsden.cz>) id 1tnou7-0003Zn-TR for bug-guile@gnu.org; Thu, 27 Feb 2025 20:11:03 -0500 Received: from wolfsden.cz ([37.205.8.62]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <~@wolfsden.cz>) id 1tnou5-0001ZX-D5 for bug-guile@gnu.org; Thu, 27 Feb 2025 20:11:03 -0500 Received: by wolfsden.cz (Postfix, from userid 104) id 2ADCF3184FE; Fri, 28 Feb 2025 01:11:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1740705060; bh=Qp3K4gzPcdmDFfuLhqMua+pvHDsGCaaldSzOLPKkWPM=; h=From:To:Cc:Subject:Date; b=wW+H5j2LFSKxF4mF895vCIwKfeA8uX1zmj2yT145donkAtVEdiqzMSZSOa85WUUyU xy+s7x/WS8dSC9AA9ru9Bu/OHmb2hPD/uZim8eX6wrg7rvouTQe20tMXq2vHMyVeIx lkKmYJL3XRpgRNRAhN1gxmvO7fBUnwv5aHhHTQJ8fcpF/gxyAcY27g11xbjhc+XcwY yUW+Li5sbHhJW3kDWpnrWojZvv6OU/reynl2rfkagf4yAfRQayoWMIxOG61Uiqyumn DDiaJn9DE8snLSwiQ+jFvybpXse8DLD8nlctGOKA1jaGntAjioGIPzAqegNb161nGS de6PTNVyWy+zhryri8k5fC7YkkObrSoH0oQGirxqZcZ59peDdRrRwjKdVJFJvyCMQp /G8E9tilwO5PUUV2Ib9yiPFx3dIsUIUf1483B5/s6so5nd0y7B5Khp6xwBtlNJg60U xzIYrfRCQeKBkSUWrNYTs+2Jj91nXp3MJilo0+IswSQD5z8DcamVeyi7yzJku8dTta Xk/Z5+uuRN2VjFbUZKm1u0Cb+odnG0H6AAjsyKFZsBcMpAkVhjWcZwXOWYUEmSFTMZ oayLNqyy2BdIiKvittf2dxfoZtI7fEpdSQ5G4zHWW3GHlQHeLoEZB2mt+ylUXRX/gS YFPvZZlliTN3b8IJ05X2RG40= X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on wolfsden X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from localhost (unknown [128.0.188.242]) by wolfsden.cz (Postfix) with ESMTPSA id 14C1D31A0B8; Fri, 28 Feb 2025 01:10:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1740705059; bh=Qp3K4gzPcdmDFfuLhqMua+pvHDsGCaaldSzOLPKkWPM=; h=From:To:Cc:Subject:Date; b=DZfdF7VLAJiLLadR94UFibrk8zUei9SaoMbjpMzLYb79g9NoiHlecL+mfBTVNYgqO WuYLaQwnVhIhs7PreHOSg3FNmAKdVgQucWokvWtGlWBEuqdep/heGlit1Ma4i7zPTV vgJd4zhDGWdazsGAV5Z6xWuKR+OhFlX03GgrnF0dJJL2I7aIUCVfBTJ/jc1vbi3E5Z XR+mKB4mPtrq08WO7mr2gRR+h9pbqbbHJIdW4/rRHfEIH6x2W0Ob9KJ9R0bU0nkesS HQmBDztQBlQWzquqZ8QIxrhbMBOF3rcrCCDKnJZwwjlW1TW98Sb1IxVsc2MHZKYB6k 0u3vxznlGMRY+EGFkOcMtfXHaWEmn5S6wZ49t5PBdep+OqX2wLDvFoyuotK3erqne+ UVv9J2Jk267j6fnoHAFHNmC5+a6XpUWEMKVrDxziuPaZBuUuqSg4WwNR6zdkpQoL56 +cka8sNyJkmrEc6CMw2c6V1Buw73oL67InMu6IlombUxDWPicegRdZZ9HCKQEKpEzx kgj5pt6AcSapoSW/qJxOZaebngWkqNxOkEHN8iG+cbgcH9kQXSUCo3KiAc91DXyosh 7xB6yDwQAjqv/xhmgtKpACnCEfKXlmi1RTFVoO0EzvTsvyhy15xoKKALPC4AXJIO1C Lu9FxLH3Y8U8ZRhDGeHxQtaI= From: Tomas Volf <~@wolfsden.cz> To: bug-guile@gnu.org Subject: [PATCH] filesys.c: Trim trailing white-space. Date: Fri, 28 Feb 2025 02:10:41 +0100 Message-ID: <20250228011041.14458-1-~@wolfsden.cz> X-Mailer: git-send-email 2.48.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=37.205.8.62; envelope-from=~@wolfsden.cz; helo=wolfsden.cz X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: submit Cc: Tomas Volf <~@wolfsden.cz> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) * 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