summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlejandro Colomar <alx@kernel.org>2023-04-19 23:58:56 +0200
committerAlejandro Colomar <alx@kernel.org>2023-04-20 00:02:52 +0200
commit90b153fd195cd66648c5ab2043935ebddee2aabd (patch)
tree3f467f36a4436be990c7d43bdbefaa6019000f0d
parent7cc7951ce7afa1cbb47a96dd37828bf890576b9d (diff)
bin/stdc, stdc.1: ffix; Don't print spaces before pointer qualifiersHEADmain
ISO C uses spaces before them, but all coding styles I like don't use them. POSIX doesn't use them either. Let's apply house style here. Signed-off-by: Alejandro Colomar <alx@kernel.org>
-rwxr-xr-xbin/stdc3
-rw-r--r--share/man/man1/stdc.12
2 files changed, 3 insertions, 2 deletions
diff --git a/bin/stdc b/bin/stdc
index 29d317a..5de51d0 100755
--- a/bin/stdc
+++ b/bin/stdc
@@ -18,7 +18,8 @@ grep_proto()
{
pcre2grep -M "(?s)\b$1 *\([[:alnum:]*,._\s\(\)-]*\);$" \
| sed 's/^ *//' \
- | sed -z 's/\([^;]\)\n/\1 /g';
+ | sed -z 's/\([^;]\)\n/\1 /g' \
+ | sed 's/* /*/g';
}
libc_summ_c89()
diff --git a/share/man/man1/stdc.1 b/share/man/man1/stdc.1
index b9b9a64..dd9d006 100644
--- a/share/man/man1/stdc.1
+++ b/share/man/man1/stdc.1
@@ -54,7 +54,7 @@ An error occured.
.SH Examples
.EX
.RB "$ " "stdc c11 \[aq]mem[[:alpha:]]*\[aq]"
-void *memcpy(void * restrict s1, const void * restrict s2, size_t n);
+void *memcpy(void *restrict s1, const void *restrict s2, size_t n);
void *memmove(void *s1, const void *s2, size_t n);
int memcmp(const void *s1, const void *s2, size_t n);
void *memchr(const void *s, int c, size_t n);