bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gnulib-tool (Python) bug: "module count-one-bits doesn't exist"


From: Bruno Haible
Subject: Re: gnulib-tool (Python) bug: "module count-one-bits doesn't exist"
Date: Sun, 12 May 2024 04:16:05 +0200

Paul Eggert wrote:
> > Also in Emacs 'whitespace-mode' I noticed the lines that cause issues
> > use tabs instead of spaces. Shouldn't that be disallowed?
> 
> I'd allow tabs there, myself. In Gnulib we don't use leading tabs, but 
> columnar tabs are OK, e.g., in build-aux/gcc-warning.spec.

Sorry Paul. No. We have been using spaces for indentation and tabulation
since 2009, and the coding got significantly simplified by that. Tabs are
still used in ChangeLog, in Makefile.am snippets (because some 'make'
programs give a syntax error when the lines that define the commands
for a target don't all start with a tab), and in files which are occasionally
synced with glibc. Other than that, please use spaces — instead of
complicating our lives!

I'm applying this.


2024-05-11  Bruno Haible  <bruno@clisp.org>

        Continue to use spaces for indentation, not tabs.
        * lib/strftime.c: Untabify. Correct indentation.
        * tests/test-posix_memalign.c: Untabify.

diff --git a/lib/strftime.c b/lib/strftime.c
index 9b205e4802..834f3a79f4 100644
--- a/lib/strftime.c
+++ b/lib/strftime.c
@@ -143,11 +143,11 @@ extern char *tzname[];
 
 enum pad_style
 {
-  ZERO_PAD,      /* (default) Pad with 0 unless format says otherwise.  */
-  ALWAYS_ZERO_PAD,     /* '0' Always pad with 0.  */
-  SIGN_PAD,            /* '+' Always output a sign.  */
-  SPACE_PAD,           /* '_' Pad with space.  */
-  NO_PAD               /* '-' Do not pad.  */
+  ZERO_PAD,         /* (default) Pad with 0 unless format says otherwise.  */
+  ALWAYS_ZERO_PAD,  /* '0'       Always pad with 0.  */
+  SIGN_PAD,         /* '+'       Always output a sign.  */
+  SPACE_PAD,        /* '_'       Pad with space.  */
+  NO_PAD            /* '-'       Do not pad.  */
 };
 
 #define TM_YEAR_BASE 1900
diff --git a/tests/test-posix_memalign.c b/tests/test-posix_memalign.c
index 803e40c5f5..af71d6d692 100644
--- a/tests/test-posix_memalign.c
+++ b/tests/test-posix_memalign.c
@@ -63,12 +63,12 @@ main (int argc, char *argv[])
         }
 
       if (sizeof (void *) <= 8)
-       {
-         ASSERT (posix_memalign (&aligned8_blocks[i], 8, size) == 0);
-         ASSERT (aligned8_blocks[i] != NULL);
-         ASSERT (((uintptr_t) aligned8_blocks[i] % 8) == 0);
-         memset (aligned8_blocks[i], 'w', size);
-       }
+        {
+          ASSERT (posix_memalign (&aligned8_blocks[i], 8, size) == 0);
+          ASSERT (aligned8_blocks[i] != NULL);
+          ASSERT (((uintptr_t) aligned8_blocks[i] % 8) == 0);
+          memset (aligned8_blocks[i], 'w', size);
+        }
 
       ASSERT (posix_memalign (&aligned16_blocks[i], 16, size) == 0);
       ASSERT (aligned16_blocks[i] != NULL);
@@ -93,7 +93,7 @@ main (int argc, char *argv[])
       if (sizeof (void *) <= 4)
         free (aligned4_blocks[i]);
       if (sizeof (void *) <= 8)
-       free (aligned8_blocks[i]);
+        free (aligned8_blocks[i]);
       free (aligned16_blocks[i]);
       free (aligned32_blocks[i]);
       free (aligned64_blocks[i]);






reply via email to

[Prev in Thread] Current Thread [Next in Thread]