diff --git a/libc/calls/groups.internal.h b/libc/calls/groups.internal.h index d7d0c80b732..2fca2ca100e 100644 --- a/libc/calls/groups.internal.h +++ b/libc/calls/groups.internal.h @@ -5,9 +5,9 @@ COSMOPOLITAN_C_START_ int sys_getgroups(int size, uint32_t list[]); int sys_setgroups(size_t size, const uint32_t list[]); -const char *DescribeGidList(char[128], int, int, const uint32_t list[]); +const char *_DescribeGidList(char[128], int, int, const uint32_t list[]); #define DescribeGidList(rc, length, gidlist) \ - DescribeGidList(alloca(128), rc, length, gidlist) + _DescribeGidList(alloca(128), rc, length, gidlist) COSMOPOLITAN_C_END_ #endif /* COSMOPOLITAN_LIBC_CALLS_GROUPS_INTERNAL_H_ */ diff --git a/libc/calls/printfds.c b/libc/calls/printfds.c index 36cb548d7a2..4786357ef1e 100644 --- a/libc/calls/printfds.c +++ b/libc/calls/printfds.c @@ -18,8 +18,8 @@ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/calls/internal.h" #include "libc/calls/state.internal.h" -#include "libc/intrin/fds.h" #include "libc/intrin/describeflags.h" +#include "libc/intrin/fds.h" #include "libc/intrin/kprintf.h" static const char *__fdkind2str(int x) { @@ -55,7 +55,7 @@ void __printfds(struct Fd *fds, size_t fdslen) { continue; kprintf("%3d %s", i, __fdkind2str(fds[i].kind)); if (fds[i].flags) { - kprintf(" flags=%s", (DescribeOpenFlags)(buf, fds[i].flags)); + kprintf(" flags=%s", _DescribeOpenFlags(buf, fds[i].flags)); } if (fds[i].mode) kprintf(" mode=%#o", fds[i].mode); diff --git a/libc/calls/seccomp.c b/libc/calls/seccomp.c index 3048745d0ac..1d004fe2d71 100644 --- a/libc/calls/seccomp.c +++ b/libc/calls/seccomp.c @@ -82,7 +82,7 @@ int seccomp(unsigned operation, unsigned flags, void *args) { } else { rc = enosys(); } - STRACE("seccomp(%s, %#x, %p) → %d% m", DescribeSeccompOperation(operation), + STRACE("seccomp(%s, %#x, %p) → %d% m", _DescribeSeccompOperation(operation), flags, args, rc); return rc; } diff --git a/libc/calls/sig.c b/libc/calls/sig.c index 247c567460c..9cb94f14131 100644 --- a/libc/calls/sig.c +++ b/libc/calls/sig.c @@ -194,7 +194,7 @@ textwindows int __sig_raise(volatile int sig, int sic) { char ssbuf[128]; siginfo_t si = {.si_signo = sig, .si_code = sic}; STRACE("__sig_raise(%G, %t) mask %s", sig, __sig_handler(rva), - (DescribeSigset)(ssbuf, 0, (sigset_t *)&pt->tib->tib_sigmask)); + _DescribeSigset(ssbuf, 0, (sigset_t *)&pt->tib->tib_sigmask)); __sig_handler(rva)(sig, &si, &ctx); // record this handler @@ -265,8 +265,8 @@ static textwindows wontreturn void __sig_tramp(struct SignalFrame *sf) { // call the user's signal handler char ssbuf[2][128]; STRACE("__sig_tramp(%G, %t) mask %s → %s", sig, __sig_handler(sf->rva), - (DescribeSigset)(ssbuf[0], 0, &sf->ctx.uc_sigmask), - (DescribeSigset)(ssbuf[1], 0, (sigset_t *)&tib->tib_sigmask)); + _DescribeSigset(ssbuf[0], 0, &sf->ctx.uc_sigmask), + _DescribeSigset(ssbuf[1], 0, (sigset_t *)&tib->tib_sigmask)); __sig_handler(sf->rva)(sig, &sf->si, &sf->ctx); // restore the signal mask that was used by the interrupted code diff --git a/libc/calls/struct/flock.internal.h b/libc/calls/struct/flock.internal.h index aea17b09e46..52b14ad6678 100644 --- a/libc/calls/struct/flock.internal.h +++ b/libc/calls/struct/flock.internal.h @@ -4,8 +4,8 @@ #include "libc/mem/alloca.h" COSMOPOLITAN_C_START_ -const char *DescribeFlock(char[300], int, const struct flock *); -#define DescribeFlock(c, l) DescribeFlock(alloca(300), c, l) +const char *_DescribeFlock(char[300], int, const struct flock *); +#define DescribeFlock(c, l) _DescribeFlock(alloca(300), c, l) COSMOPOLITAN_C_END_ #endif /* COSMOPOLITAN_LIBC_CALLS_STRUCT_FLOCK_INTERNAL_H_ */ diff --git a/libc/calls/struct/iovec.internal.h b/libc/calls/struct/iovec.internal.h index cfa58b479ad..6c6a3661a97 100644 --- a/libc/calls/struct/iovec.internal.h +++ b/libc/calls/struct/iovec.internal.h @@ -1,7 +1,7 @@ #ifndef COSMOPOLITAN_LIBC_CALLS_STRUCT_IOVEC_INTERNAL_H_ #define COSMOPOLITAN_LIBC_CALLS_STRUCT_IOVEC_INTERNAL_H_ -#include "libc/intrin/fds.h" #include "libc/calls/struct/iovec.h" +#include "libc/intrin/fds.h" #include "libc/mem/alloca.h" COSMOPOLITAN_C_START_ @@ -22,8 +22,8 @@ ssize_t sys_send_nt(int, const struct iovec *, size_t, uint32_t); ssize_t sys_sendto_nt(int, const struct iovec *, size_t, uint32_t, const void *, uint32_t); -const char *DescribeIovec(char[300], ssize_t, const struct iovec *, int); -#define DescribeIovec(x, y, z) DescribeIovec(alloca(300), x, y, z) +const char *_DescribeIovec(char[300], ssize_t, const struct iovec *, int); +#define DescribeIovec(x, y, z) _DescribeIovec(alloca(300), x, y, z) COSMOPOLITAN_C_END_ #endif /* COSMOPOLITAN_LIBC_CALLS_STRUCT_IOVEC_INTERNAL_H_ */ diff --git a/libc/calls/struct/itimerval.internal.h b/libc/calls/struct/itimerval.internal.h index ababa1bee88..9bad9b7a04c 100644 --- a/libc/calls/struct/itimerval.internal.h +++ b/libc/calls/struct/itimerval.internal.h @@ -8,8 +8,8 @@ int sys_getitimer(int, struct itimerval *); int sys_setitimer(int, const struct itimerval *, struct itimerval *); int sys_setitimer_nt(int, const struct itimerval *, struct itimerval *); -const char *DescribeItimerval(char[90], int, const struct itimerval *); -#define DescribeItimerval(rc, ts) DescribeItimerval(alloca(90), rc, ts) +const char *_DescribeItimerval(char[90], int, const struct itimerval *); +#define DescribeItimerval(rc, ts) _DescribeItimerval(alloca(90), rc, ts) COSMOPOLITAN_C_END_ #endif /* COSMOPOLITAN_LIBC_CALLS_STRUCT_ITIMERVAL_INTERNAL_H_ */ diff --git a/libc/calls/struct/rlimit.internal.h b/libc/calls/struct/rlimit.internal.h index fa8ce920049..5818c6d5a9a 100644 --- a/libc/calls/struct/rlimit.internal.h +++ b/libc/calls/struct/rlimit.internal.h @@ -8,8 +8,8 @@ int sys_getrlimit(int, struct rlimit *); int sys_setrlimit(int, const struct rlimit *); int sys_setrlimit_nt(int, const struct rlimit *); -const char *DescribeRlimit(char[64], int, const struct rlimit *); -#define DescribeRlimit(rc, rl) DescribeRlimit(alloca(64), rc, rl) +const char *_DescribeRlimit(char[64], int, const struct rlimit *); +#define DescribeRlimit(rc, rl) _DescribeRlimit(alloca(64), rc, rl) COSMOPOLITAN_C_END_ #endif /* COSMOPOLITAN_LIBC_CALLS_STRUCT_RLIMIT_INTERNAL_H_ */ diff --git a/libc/calls/struct/sched_param.internal.h b/libc/calls/struct/sched_param.internal.h index 9df42312e25..565d661b3f9 100644 --- a/libc/calls/struct/sched_param.internal.h +++ b/libc/calls/struct/sched_param.internal.h @@ -4,8 +4,8 @@ #include "libc/mem/alloca.h" COSMOPOLITAN_C_START_ -const char *DescribeSchedParam(char[32], const struct sched_param *); -#define DescribeSchedParam(x) DescribeSchedParam(alloca(32), x) +const char *_DescribeSchedParam(char[32], const struct sched_param *); +#define DescribeSchedParam(x) _DescribeSchedParam(alloca(32), x) COSMOPOLITAN_C_END_ #endif /* COSMOPOLITAN_LIBC_CALLS_STRUCT_SCHED_PARAM_INTERNAL_H_ */ diff --git a/libc/calls/struct/sigaction.internal.h b/libc/calls/struct/sigaction.internal.h index bf69a81db07..19b1177a5d1 100644 --- a/libc/calls/struct/sigaction.internal.h +++ b/libc/calls/struct/sigaction.internal.h @@ -66,8 +66,8 @@ void __sigenter_netbsd(int, siginfo_t *, void *); void __sigenter_freebsd(int, siginfo_t *, void *); void __sigenter_openbsd(int, siginfo_t *, void *); -const char *DescribeSigaction(char[256], int, const struct sigaction *); -#define DescribeSigaction(rc, sa) DescribeSigaction(alloca(256), rc, sa) +const char *_DescribeSigaction(char[256], int, const struct sigaction *); +#define DescribeSigaction(rc, sa) _DescribeSigaction(alloca(256), rc, sa) void _init_onntconsoleevent(void); diff --git a/libc/calls/struct/sigaltstack.internal.h b/libc/calls/struct/sigaltstack.internal.h index c95eea69643..b2416b56007 100644 --- a/libc/calls/struct/sigaltstack.internal.h +++ b/libc/calls/struct/sigaltstack.internal.h @@ -4,8 +4,8 @@ #include "libc/mem/alloca.h" COSMOPOLITAN_C_START_ -const char *DescribeSigaltstack(char[128], int, const struct sigaltstack *); -#define DescribeSigaltstack(rc, ss) DescribeSigaltstack(alloca(128), rc, ss) +const char *_DescribeSigaltstack(char[128], int, const struct sigaltstack *); +#define DescribeSigaltstack(rc, ss) _DescribeSigaltstack(alloca(128), rc, ss) COSMOPOLITAN_C_END_ #endif /* COSMOPOLITAN_LIBC_CALLS_STRUCT_SIGALTSTACK_INTERNAL_H_ */ diff --git a/libc/calls/struct/siginfo.internal.h b/libc/calls/struct/siginfo.internal.h index 99b2e4edaf9..d5479c464dc 100644 --- a/libc/calls/struct/siginfo.internal.h +++ b/libc/calls/struct/siginfo.internal.h @@ -6,8 +6,8 @@ COSMOPOLITAN_C_START_ int sys_sigqueueinfo(int, const siginfo_t *); -const char *DescribeSiginfo(char[300], int, const siginfo_t *); -#define DescribeSiginfo(x, y) DescribeSiginfo(alloca(300), x, y) +const char *_DescribeSiginfo(char[300], int, const siginfo_t *); +#define DescribeSiginfo(x, y) _DescribeSiginfo(alloca(300), x, y) COSMOPOLITAN_C_END_ #endif /* COSMOPOLITAN_LIBC_CALLS_STRUCT_SIGINFO_INTERNAL_H_ */ diff --git a/libc/calls/struct/sigset.internal.h b/libc/calls/struct/sigset.internal.h index ad4fe0a784c..b31093dbbc8 100644 --- a/libc/calls/struct/sigset.internal.h +++ b/libc/calls/struct/sigset.internal.h @@ -34,8 +34,8 @@ int sys_sigprocmask(int, const sigset_t *, sigset_t *); int sys_sigsuspend(const uint64_t *, uint64_t); int sys_sigpending(uint64_t *, size_t); -const char *DescribeSigset(char[128], int, const sigset_t *); -#define DescribeSigset(rc, ss) DescribeSigset(alloca(128), rc, ss) +const char *_DescribeSigset(char[128], int, const sigset_t *); +#define DescribeSigset(rc, ss) _DescribeSigset(alloca(128), rc, ss) COSMOPOLITAN_C_END_ #endif /* COSMOPOLITAN_LIBC_CALLS_STRUCT_SIGSET_INTERNAL_H_ */ diff --git a/libc/calls/struct/stat.internal.h b/libc/calls/struct/stat.internal.h index 5d1c9fed644..eb9aa1ca6b0 100644 --- a/libc/calls/struct/stat.internal.h +++ b/libc/calls/struct/stat.internal.h @@ -13,8 +13,8 @@ int sys_fstatat_nt(int, const char *, struct stat *, int); int sys_lstat_nt(const char *, struct stat *); int sys_fstat_metal(int, struct stat *); -const char *DescribeStat(char[300], int, const struct stat *); -#define DescribeStat(rc, st) DescribeStat(alloca(300), rc, st) +const char *_DescribeStat(char[300], int, const struct stat *); +#define DescribeStat(rc, st) _DescribeStat(alloca(300), rc, st) COSMOPOLITAN_C_END_ #endif /* COSMOPOLITAN_LIBC_CALLS_STRUCT_STAT_INTERNAL_H_ */ diff --git a/libc/calls/struct/statfs.internal.h b/libc/calls/struct/statfs.internal.h index ab3919628b6..b98073dc412 100644 --- a/libc/calls/struct/statfs.internal.h +++ b/libc/calls/struct/statfs.internal.h @@ -12,8 +12,8 @@ int sys_fstatfs_nt(int64_t, struct statfs *); int sys_statfs_nt(const char *, struct statfs *); void statfs2statvfs(struct statvfs *, const struct statfs *); -const char *DescribeStatfs(char[300], int, const struct statfs *); -#define DescribeStatfs(rc, sf) DescribeStatfs(alloca(300), rc, sf) +const char *_DescribeStatfs(char[300], int, const struct statfs *); +#define DescribeStatfs(rc, sf) _DescribeStatfs(alloca(300), rc, sf) COSMOPOLITAN_C_END_ #endif /* COSMOPOLITAN_LIBC_CALLS_STRUCT_STATFS_INTERNAL_H_ */ diff --git a/libc/calls/struct/termios.internal.h b/libc/calls/struct/termios.internal.h index c116d4d044f..ac85545dcf6 100644 --- a/libc/calls/struct/termios.internal.h +++ b/libc/calls/struct/termios.internal.h @@ -4,9 +4,9 @@ #include "libc/mem/alloca.h" COSMOPOLITAN_C_START_ -const char *DescribeTermios(char[1024], ssize_t, const struct termios *); +const char *_DescribeTermios(char[1024], ssize_t, const struct termios *); -#define DescribeTermios(rc, tio) DescribeTermios(alloca(1024), rc, tio) +#define DescribeTermios(rc, tio) _DescribeTermios(alloca(1024), rc, tio) COSMOPOLITAN_C_END_ #endif /* COSMOPOLITAN_LIBC_CALLS_STRUCT_TERMIOS_INTERNAL_H_ */ diff --git a/libc/calls/struct/timespec.internal.h b/libc/calls/struct/timespec.internal.h index fc15a20617b..bc4ff4d4791 100644 --- a/libc/calls/struct/timespec.internal.h +++ b/libc/calls/struct/timespec.internal.h @@ -26,8 +26,8 @@ int sys_utimensat(int, const char *, const struct timespec[2], int); int sys_utimensat_nt(int, const char *, const struct timespec[2], int); int sys_utimensat_old(int, const char *, const struct timespec[2], int); -const char *DescribeTimespec(char[45], int, const struct timespec *); -#define DescribeTimespec(rc, ts) DescribeTimespec(alloca(45), rc, ts) +const char *_DescribeTimespec(char[45], int, const struct timespec *); +#define DescribeTimespec(rc, ts) _DescribeTimespec(alloca(45), rc, ts) COSMOPOLITAN_C_END_ #endif /* COSMOPOLITAN_LIBC_CALLS_STRUCT_TIMESPEC_INTERNAL_H_ */ diff --git a/libc/calls/struct/timeval.internal.h b/libc/calls/struct/timeval.internal.h index ceaf8f73e16..a3cf06847c5 100644 --- a/libc/calls/struct/timeval.internal.h +++ b/libc/calls/struct/timeval.internal.h @@ -11,8 +11,8 @@ int sys_lutimes(const char *, const struct timeval *); int sys_utimes(const char *, const struct timeval *); int sys_utimes_nt(const char *, const struct timeval[2]); -const char *DescribeTimeval(char[45], int, const struct timeval *); -#define DescribeTimeval(rc, ts) DescribeTimeval(alloca(45), rc, ts) +const char *_DescribeTimeval(char[45], int, const struct timeval *); +#define DescribeTimeval(rc, ts) _DescribeTimeval(alloca(45), rc, ts) COSMOPOLITAN_C_END_ #endif /* COSMOPOLITAN_LIBC_CALLS_STRUCT_TIMEVAL_INTERNAL_H_ */ diff --git a/libc/calls/struct/winsize.internal.h b/libc/calls/struct/winsize.internal.h index 642b995d8fd..8c5e07fadc8 100644 --- a/libc/calls/struct/winsize.internal.h +++ b/libc/calls/struct/winsize.internal.h @@ -1,13 +1,13 @@ #ifndef COSMOPOLITAN_LIBC_CALLS_STRUCT_WINSIZE_INTERNAL_H_ #define COSMOPOLITAN_LIBC_CALLS_STRUCT_WINSIZE_INTERNAL_H_ -#include "libc/intrin/fds.h" #include "libc/calls/struct/winsize.h" +#include "libc/intrin/fds.h" #include "libc/mem/alloca.h" COSMOPOLITAN_C_START_ int tcgetwinsize_nt(int, struct winsize *); -const char *DescribeWinsize(char[64], int, const struct winsize *); -#define DescribeWinsize(rc, ws) DescribeWinsize(alloca(64), rc, ws) +const char *_DescribeWinsize(char[64], int, const struct winsize *); +#define DescribeWinsize(rc, ws) _DescribeWinsize(alloca(64), rc, ws) COSMOPOLITAN_C_END_ #endif /* COSMOPOLITAN_LIBC_CALLS_STRUCT_WINSIZE_INTERNAL_H_ */ diff --git a/libc/fmt/magnumstrs.internal.h b/libc/fmt/magnumstrs.internal.h index 77833499cac..8899b27ce00 100644 --- a/libc/fmt/magnumstrs.internal.h +++ b/libc/fmt/magnumstrs.internal.h @@ -28,7 +28,8 @@ extern const struct MagnumStr kSockOptnames[]; extern const struct MagnumStr kTcpOptnames[]; extern const struct MagnumStr kPollNames[]; -const char *DescribeMagnum(char *, const struct MagnumStr *, const char *, int); +const char *_DescribeMagnum(char *, const struct MagnumStr *, const char *, + int); __funline const char *GetMagnumStr(const struct MagnumStr *ms, int x) { int i; diff --git a/libc/intrin/cp.c b/libc/intrin/cp.c index d65670cee66..d98c36e6638 100644 --- a/libc/intrin/cp.c +++ b/libc/intrin/cp.c @@ -53,7 +53,7 @@ void report_cancelation_point(int sysv_ordinal, int xnu_ordinal) { char bt[160]; struct StackFrame *bp = __builtin_frame_address(0); kprintf("error: report_cancelation_point(%#x, %#x) %s\n", sysv_ordinal, - xnu_ordinal, (DescribeBacktrace)(bt, bp)); + xnu_ordinal, _DescribeBacktrace(bt, bp)); __builtin_trap(); } diff --git a/libc/intrin/createfile.c b/libc/intrin/createfile.c index 265675a1bf5..3bac501f4da 100644 --- a/libc/intrin/createfile.c +++ b/libc/intrin/createfile.c @@ -57,11 +57,11 @@ CreateFile(const char16_t *lpFileName, // opt_lpSecurity, dwCreationDisposition, dwFlagsAndAttributes, opt_hTemplateFile); NTTRACE("CreateFile(%#hs, %s, %s, %s, %s, %s, %ld) → {%ld, %d}", lpFileName, - (DescribeNtFileAccessFlags)(buf_accessflags, dwDesiredAccess), - (DescribeNtFileShareFlags)(buf_shareflags, dwShareMode), - (DescribeNtSecurityAttributes)(buf_secattr, opt_lpSecurity), - DescribeNtCreationDisposition(dwCreationDisposition), - (DescribeNtFileFlagAttr)(buf_flagattr, dwFlagsAndAttributes), + _DescribeNtFileAccessFlags(buf_accessflags, dwDesiredAccess), + _DescribeNtFileShareFlags(buf_shareflags, dwShareMode), + _DescribeNtSecurityAttributes(buf_secattr, opt_lpSecurity), + _DescribeNtCreationDisposition(dwCreationDisposition), + _DescribeNtFileFlagAttr(buf_flagattr, dwFlagsAndAttributes), opt_hTemplateFile, hHandle, __imp_GetLastError()); if (hHandle == -1) { switch (__imp_GetLastError()) { diff --git a/libc/intrin/describearchprctlcode.c b/libc/intrin/describearchprctlcode.c index 9c1fea1f9b7..b260b73baa1 100644 --- a/libc/intrin/describearchprctlcode.c +++ b/libc/intrin/describearchprctlcode.c @@ -21,7 +21,7 @@ #include "libc/intrin/describeflags.h" #include "libc/sysv/consts/arch.h" -const char *(DescribeArchPrctlCode)(char buf[12], int x) { +const char *_DescribeArchPrctlCode(char buf[12], int x) { if (x == ARCH_SET_FS) return "ARCH_SET_FS"; if (x == ARCH_GET_FS) diff --git a/libc/intrin/describebacktrace.c b/libc/intrin/describebacktrace.c index 440c4921c6a..8c92e93ebee 100644 --- a/libc/intrin/describebacktrace.c +++ b/libc/intrin/describebacktrace.c @@ -39,8 +39,8 @@ privileged static char *FormatHex(char *p, unsigned long x) { return p; } -privileged dontinstrument const char *( - DescribeBacktrace)(char buf[N], const struct StackFrame *fr) { +privileged dontinstrument const char *_DescribeBacktrace( + char buf[N], const struct StackFrame *fr) { char *p = buf; char *pe = p + N; bool gotsome = false; diff --git a/libc/intrin/describebacktrace.h b/libc/intrin/describebacktrace.h index c9e600d6617..ee86143173c 100644 --- a/libc/intrin/describebacktrace.h +++ b/libc/intrin/describebacktrace.h @@ -4,8 +4,8 @@ #include "libc/nexgen32e/stackframe.h" COSMOPOLITAN_C_START_ -const char *DescribeBacktrace(char[160], const struct StackFrame *) libcesque; -#define DescribeBacktrace(x) DescribeBacktrace(alloca(160), x) +const char *_DescribeBacktrace(char[160], const struct StackFrame *) libcesque; +#define DescribeBacktrace(x) _DescribeBacktrace(alloca(160), x) COSMOPOLITAN_C_END_ #endif /* COSMOPOLITAN_LIBC_INTRIN_DESCRIBEBACKTRACE_H_ */ diff --git a/libc/intrin/describecancelstate.c b/libc/intrin/describecancelstate.c index 4b58566666b..ccaa1d13918 100644 --- a/libc/intrin/describecancelstate.c +++ b/libc/intrin/describecancelstate.c @@ -20,7 +20,7 @@ #include "libc/intrin/describeflags.h" #include "libc/thread/thread.h" -const char *(DescribeCancelState)(char buf[12], int err, int *state) { +const char *_DescribeCancelState(char buf[12], int err, int *state) { if (err) return "n/a"; if (!state) diff --git a/libc/intrin/describecapability.c b/libc/intrin/describecapability.c index 7ef9e97fd6f..67ddcf82936 100644 --- a/libc/intrin/describecapability.c +++ b/libc/intrin/describecapability.c @@ -69,7 +69,7 @@ static const struct thatispacked { {CAP_CHECKPOINT_RESTORE, "CHECKPOINT_RESTORE"}, // }; -const char *(DescribeCapability)(char buf[32], int x) { +const char *_DescribeCapability(char buf[32], int x) { int i; for (i = 0; i < ARRAYLEN(kCapabilityName); ++i) { if (kCapabilityName[i].x == x) { diff --git a/libc/intrin/describeclockname.c b/libc/intrin/describeclockname.c index c8e704ca59c..58d73b86f08 100644 --- a/libc/intrin/describeclockname.c +++ b/libc/intrin/describeclockname.c @@ -22,6 +22,6 @@ /** * Describes clock_gettime() clock argument. */ -const char *(DescribeClockName)(char buf[32], int x) { - return DescribeMagnum(buf, kClockNames, "CLOCK_", x); +const char *_DescribeClockName(char buf[32], int x) { + return _DescribeMagnum(buf, kClockNames, "CLOCK_", x); } diff --git a/libc/intrin/describecontrolkeystate.c b/libc/intrin/describecontrolkeystate.c index f8231d108a1..f2e75e300ef 100644 --- a/libc/intrin/describecontrolkeystate.c +++ b/libc/intrin/describecontrolkeystate.c @@ -32,7 +32,7 @@ static const struct DescribeFlags kControlKeyState[] = { {kNtEnhancedKey, "EnhancedKey"}, // }; -const char *(DescribeControlKeyState)(char buf[64], uint32_t x) { - return DescribeFlags(buf, 64, kControlKeyState, ARRAYLEN(kControlKeyState), - "kNt", x); +const char *_DescribeControlKeyState(char buf[64], uint32_t x) { + return _DescribeFlags(buf, 64, kControlKeyState, ARRAYLEN(kControlKeyState), + "kNt", x); } diff --git a/libc/intrin/describedirfd.c b/libc/intrin/describedirfd.c index 6b33d8ebf10..36f72929671 100644 --- a/libc/intrin/describedirfd.c +++ b/libc/intrin/describedirfd.c @@ -20,7 +20,7 @@ #include "libc/intrin/describeflags.h" #include "libc/sysv/consts/at.h" -const char *(DescribeDirfd)(char buf[12], int dirfd) { +const char *_DescribeDirfd(char buf[12], int dirfd) { if (dirfd == AT_FDCWD) return "AT_FDCWD"; FormatInt32(buf, dirfd); diff --git a/libc/intrin/describednotify.c b/libc/intrin/describednotify.c index 2739ccca10b..2a56e155797 100644 --- a/libc/intrin/describednotify.c +++ b/libc/intrin/describednotify.c @@ -31,7 +31,7 @@ static const struct DescribeFlags kDnotifyFlags[] = { {DN_MULTISHOT, "MULTISHOT"}, // }; -const char *(DescribeDnotifyFlags)(char buf[80], int x) { - return DescribeFlags(buf, 80, kDnotifyFlags, ARRAYLEN(kDnotifyFlags), "DN_", - x); +const char *_DescribeDnotifyFlags(char buf[80], int x) { + return _DescribeFlags(buf, 80, kDnotifyFlags, ARRAYLEN(kDnotifyFlags), "DN_", + x); } diff --git a/libc/intrin/describeerrnoresult.c b/libc/intrin/describeerrnoresult.c index 0deed696e98..9f3817e022b 100644 --- a/libc/intrin/describeerrnoresult.c +++ b/libc/intrin/describeerrnoresult.c @@ -22,7 +22,7 @@ #include "libc/log/libfatal.internal.h" #include "libc/str/str.h" -const char *(DescribeErrno)(char buf[30], int ax) { +const char *_DescribeErrno(char buf[30], int ax) { char *p = buf; const char *s; if (ax < 0) { diff --git a/libc/intrin/describefcntlcmd.c b/libc/intrin/describefcntlcmd.c index bcebd1b1965..dbdef851339 100644 --- a/libc/intrin/describefcntlcmd.c +++ b/libc/intrin/describefcntlcmd.c @@ -21,7 +21,7 @@ #include "libc/intrin/describeflags.h" #include "libc/str/str.h" -const char *(DescribeFcntlCmd)(char buf[20], int x) { +const char *_DescribeFcntlCmd(char buf[20], int x) { const char *s; if (x >= 0 && (s = GetMagnumStr(kFcntlCmds, x))) { buf[0] = 'F'; diff --git a/libc/intrin/describefdset.c b/libc/intrin/describefdset.c index 1ef26444d67..62ffccaadb9 100644 --- a/libc/intrin/describefdset.c +++ b/libc/intrin/describefdset.c @@ -26,7 +26,7 @@ #define append(...) o += ksnprintf(buf + o, N - o, __VA_ARGS__) -const char *(DescribeFdSet)(char buf[N], ssize_t rc, int nfds, fd_set *fds) { +const char *_DescribeFdSet(char buf[N], ssize_t rc, int nfds, fd_set *fds) { int o = 0; if (!fds) diff --git a/libc/intrin/describeflags.c b/libc/intrin/describeflags.c index 10aa0ea1cab..b4ea4ed981f 100644 --- a/libc/intrin/describeflags.c +++ b/libc/intrin/describeflags.c @@ -18,8 +18,8 @@ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/intrin/describeflags.h" -const char *DescribeFlags(char *p, size_t n, const struct DescribeFlags *d, - size_t m, const char *prefix, unsigned x) { +const char *_DescribeFlags(char *p, size_t n, const struct DescribeFlags *d, + size_t m, const char *prefix, unsigned x) { bool t; char b[21]; size_t i, j, k; diff --git a/libc/intrin/describeflags.h b/libc/intrin/describeflags.h index 9bcf9621847..917ef0f46ea 100644 --- a/libc/intrin/describeflags.h +++ b/libc/intrin/describeflags.h @@ -8,121 +8,121 @@ struct thatispacked DescribeFlags { const char *name; }; -const char *DescribeFlags(char *, size_t, const struct DescribeFlags *, size_t, - const char *, unsigned) libcesque; +const char *_DescribeFlags(char *, size_t, const struct DescribeFlags *, + size_t, const char *, unsigned) libcesque; -const char *DescribeArchPrctlCode(char[12], int) libcesque; -const char *DescribeCancelState(char[12], int, int *) libcesque; -const char *DescribeClockName(char[32], int) libcesque; -const char *DescribeControlKeyState(char[64], uint32_t) libcesque; -const char *DescribeDirfd(char[12], int) libcesque; -const char *DescribeDnotifyFlags(char[80], int) libcesque; -const char *DescribeErrno(char[30], int) libcesque; -const char *DescribeFcntlCmd(char[20], int) libcesque; -const char *DescribeFlockType(char[12], int) libcesque; -const char *DescribeFutexOp(char[64], int) libcesque; -const char *DescribeHow(char[12], int) libcesque; -const char *DescribeInOutInt64(char[23], ssize_t, int64_t *) libcesque; -const char *DescribeItimer(char[12], int) libcesque; -const char *DescribeMapFlags(char[64], int) libcesque; -const char *DescribeMapping(char[8], int, int) libcesque; -const char *DescribeMremapFlags(char[30], int) libcesque; -const char *DescribeMsyncFlags(char[48], int) libcesque; -const char *DescribeNtConsoleInFlags(char[256], uint32_t) libcesque; -const char *DescribeNtConsoleOutFlags(char[128], uint32_t) libcesque; -const char *DescribeNtCreationDisposition(uint32_t) libcesque; -const char *DescribeNtFileAccessFlags(char[512], uint32_t) libcesque; -const char *DescribeNtFileFlagAttr(char[256], uint32_t) libcesque; -const char *DescribeNtFileMapFlags(char[64], uint32_t) libcesque; -const char *DescribeNtFileShareFlags(char[64], uint32_t) libcesque; -const char *DescribeNtFiletypeFlags(char[64], uint32_t) libcesque; -const char *DescribeNtLockFileFlags(char[64], uint32_t) libcesque; -const char *DescribeNtMovFileInpFlags(char[256], uint32_t) libcesque; -const char *DescribeNtPageFlags(char[64], uint32_t) libcesque; -const char *DescribeNtPipeModeFlags(char[64], uint32_t) libcesque; -const char *DescribeNtPipeOpenFlags(char[64], uint32_t) libcesque; -const char *DescribeNtProcAccessFlags(char[256], uint32_t) libcesque; -const char *DescribeNtStartFlags(char[128], uint32_t) libcesque; -const char *DescribeNtSymlinkFlags(char[64], uint32_t) libcesque; -const char *DescribeOpenFlags(char[128], int) libcesque; -const char *DescribeOpenMode(char[15], int, int) libcesque; -const char *DescribePersonalityFlags(char[128], int) libcesque; -const char *DescribePollFlags(char[64], int) libcesque; -const char *DescribeProtFlags(char[48], int) libcesque; -const char *DescribePtrace(char[12], int) libcesque; -const char *DescribePtraceEvent(char[32], int) libcesque; -const char *DescribeRlimitName(char[20], int) libcesque; -const char *DescribeSchedPolicy(char[48], int) libcesque; -const char *DescribeSeccompOperation(int) libcesque; -const char *DescribeSiCode(char[20], int, int) libcesque; -const char *DescribeSigaltstackFlags(char[22], int) libcesque; -const char *DescribeSleepFlags(char[16], int) libcesque; -const char *DescribeSockLevel(char[12], int) libcesque; -const char *DescribeSockOptname(char[32], int, int) libcesque; -const char *DescribeSocketFamily(char[12], int) libcesque; -const char *DescribeSocketProtocol(char[12], int) libcesque; -const char *DescribeSocketType(char[64], int) libcesque; -const char *DescribeStdioState(char[12], int) libcesque; -const char *DescribeStringList(char[300], char *const[]) libcesque; -const char *DescribeThreadCreateFlags(char[64], uint32_t) libcesque; -const char *DescribeVirtualKeyCode(char[32], uint32_t) libcesque; -const char *DescribeWhence(char[12], int) libcesque; -const char *DescribeWhichPrio(char[12], int) libcesque; +const char *_DescribeArchPrctlCode(char[12], int) libcesque; +const char *_DescribeCancelState(char[12], int, int *) libcesque; +const char *_DescribeClockName(char[32], int) libcesque; +const char *_DescribeControlKeyState(char[64], uint32_t) libcesque; +const char *_DescribeDirfd(char[12], int) libcesque; +const char *_DescribeDnotifyFlags(char[80], int) libcesque; +const char *_DescribeErrno(char[30], int) libcesque; +const char *_DescribeFcntlCmd(char[20], int) libcesque; +const char *_DescribeFlockType(char[12], int) libcesque; +const char *_DescribeFutexOp(char[64], int) libcesque; +const char *_DescribeHow(char[12], int) libcesque; +const char *_DescribeInOutInt64(char[23], ssize_t, int64_t *) libcesque; +const char *_DescribeItimer(char[12], int) libcesque; +const char *_DescribeMapFlags(char[64], int) libcesque; +const char *_DescribeMapping(char[8], int, int) libcesque; +const char *_DescribeMremapFlags(char[30], int) libcesque; +const char *_DescribeMsyncFlags(char[48], int) libcesque; +const char *_DescribeNtConsoleInFlags(char[256], uint32_t) libcesque; +const char *_DescribeNtConsoleOutFlags(char[128], uint32_t) libcesque; +const char *_DescribeNtCreationDisposition(uint32_t) libcesque; +const char *_DescribeNtFileAccessFlags(char[512], uint32_t) libcesque; +const char *_DescribeNtFileFlagAttr(char[256], uint32_t) libcesque; +const char *_DescribeNtFileMapFlags(char[64], uint32_t) libcesque; +const char *_DescribeNtFileShareFlags(char[64], uint32_t) libcesque; +const char *_DescribeNtFiletypeFlags(char[64], uint32_t) libcesque; +const char *_DescribeNtLockFileFlags(char[64], uint32_t) libcesque; +const char *_DescribeNtMovFileInpFlags(char[256], uint32_t) libcesque; +const char *_DescribeNtPageFlags(char[64], uint32_t) libcesque; +const char *_DescribeNtPipeModeFlags(char[64], uint32_t) libcesque; +const char *_DescribeNtPipeOpenFlags(char[64], uint32_t) libcesque; +const char *_DescribeNtProcAccessFlags(char[256], uint32_t) libcesque; +const char *_DescribeNtStartFlags(char[128], uint32_t) libcesque; +const char *_DescribeNtSymlinkFlags(char[64], uint32_t) libcesque; +const char *_DescribeOpenFlags(char[128], int) libcesque; +const char *_DescribeOpenMode(char[15], int, int) libcesque; +const char *_DescribePersonalityFlags(char[128], int) libcesque; +const char *_DescribePollFlags(char[64], int) libcesque; +const char *_DescribeProtFlags(char[48], int) libcesque; +const char *_DescribePtrace(char[12], int) libcesque; +const char *_DescribePtraceEvent(char[32], int) libcesque; +const char *_DescribeRlimitName(char[20], int) libcesque; +const char *_DescribeSchedPolicy(char[48], int) libcesque; +const char *_DescribeSeccompOperation(int) libcesque; +const char *_DescribeSiCode(char[20], int, int) libcesque; +const char *_DescribeSigaltstackFlags(char[22], int) libcesque; +const char *_DescribeSleepFlags(char[16], int) libcesque; +const char *_DescribeSockLevel(char[12], int) libcesque; +const char *_DescribeSockOptname(char[32], int, int) libcesque; +const char *_DescribeSocketFamily(char[12], int) libcesque; +const char *_DescribeSocketProtocol(char[12], int) libcesque; +const char *_DescribeSocketType(char[64], int) libcesque; +const char *_DescribeStdioState(char[12], int) libcesque; +const char *_DescribeStringList(char[300], char *const[]) libcesque; +const char *_DescribeThreadCreateFlags(char[64], uint32_t) libcesque; +const char *_DescribeVirtualKeyCode(char[32], uint32_t) libcesque; +const char *_DescribeWhence(char[12], int) libcesque; +const char *_DescribeWhichPrio(char[12], int) libcesque; -#define DescribeCancelState(x, y) DescribeCancelState(alloca(12), x, y) -#define DescribeClockName(x) DescribeClockName(alloca(32), x) -#define DescribeControlKeyState(x) DescribeControlKeyState(alloca(64), x) -#define DescribeDirfd(x) DescribeDirfd(alloca(12), x) -#define DescribeDnotifyFlags(x) DescribeDnotifyFlags(alloca(80), x) -#define DescribeErrno(x) DescribeErrno(alloca(30), x) -#define DescribeFcntlCmd(x) DescribeFcntlCmd(alloca(20), x) -#define DescribeFlockType(x) DescribeFlockType(alloca(12), x) -#define DescribeFutexOp(x) DescribeFutexOp(alloca(64), x) -#define DescribeHow(x) DescribeHow(alloca(12), x) -#define DescribeInOutInt64(rc, x) DescribeInOutInt64(alloca(23), rc, x) -#define DescribeItimer(x) DescribeItimer(alloca(12), x) -#define DescribeMapFlags(x) DescribeMapFlags(alloca(64), x) -#define DescribeMapping(x, y) DescribeMapping(alloca(8), x, y) -#define DescribeMremapFlags(x) DescribeMremapFlags(alloca(30), x) -#define DescribeMsyncFlags(x) DescribeMsyncFlags(alloca(48), x) -#define DescribeNtConsoleInFlags(x) DescribeNtConsoleInFlags(alloca(256), x) -#define DescribeNtConsoleOutFlags(x) DescribeNtConsoleOutFlags(alloca(128), x) -#define DescribeNtFileAccessFlags(x) DescribeNtFileAccessFlags(alloca(512), x) -#define DescribeNtFileFlagAttr(x) DescribeNtFileFlagAttr(alloca(256), x) -#define DescribeNtFileMapFlags(x) DescribeNtFileMapFlags(alloca(64), x) -#define DescribeNtFileShareFlags(x) DescribeNtFileShareFlags(alloca(64), x) -#define DescribeNtFiletypeFlags(x) DescribeNtFiletypeFlags(alloca(64), x) -#define DescribeNtLockFileFlags(x) DescribeNtLockFileFlags(alloca(64), x) -#define DescribeNtMovFileInpFlags(x) DescribeNtMovFileInpFlags(alloca(256), x) -#define DescribeNtPageFlags(x) DescribeNtPageFlags(alloca(64), x) -#define DescribeNtPipeModeFlags(x) DescribeNtPipeModeFlags(alloca(64), x) -#define DescribeNtPipeOpenFlags(x) DescribeNtPipeOpenFlags(alloca(64), x) -#define DescribeNtProcAccessFlags(x) DescribeNtProcAccessFlags(alloca(256), x) -#define DescribeNtStartFlags(x) DescribeNtStartFlags(alloca(128), x) -#define DescribeNtSymlinkFlags(x) DescribeNtSymlinkFlags(alloca(64), x) -#define DescribeOpenFlags(x) DescribeOpenFlags(alloca(128), x) -#define DescribeOpenMode(x, y) DescribeOpenMode(alloca(15), x, y) -#define DescribePersonalityFlags(p) DescribePersonalityFlags(alloca(128), p) -#define DescribePollFlags(p) DescribePollFlags(alloca(64), p) -#define DescribeProtFlags(x) DescribeProtFlags(alloca(48), x) -#define DescribePtrace(i) DescribePtrace(alloca(12), i) -#define DescribePtraceEvent(x) DescribePtraceEvent(alloca(32), x) -#define DescribeRlimitName(rl) DescribeRlimitName(alloca(20), rl) -#define DescribeSchedPolicy(x) DescribeSchedPolicy(alloca(48), x) -#define DescribeSiCode(x, y) DescribeSiCode(alloca(20), x, y) -#define DescribeSigaltstackFlags(x) DescribeSigaltstackFlags(alloca(22), x) -#define DescribeSleepFlags(x) DescribeSleepFlags(alloca(16), x) -#define DescribeSockLevel(x) DescribeSockLevel(alloca(12), x) -#define DescribeSockOptname(x, y) DescribeSockOptname(alloca(32), x, y) -#define DescribeSocketFamily(x) DescribeSocketFamily(alloca(12), x) -#define DescribeSocketProtocol(x) DescribeSocketProtocol(alloca(12), x) -#define DescribeSocketType(x) DescribeSocketType(alloca(64), x) -#define DescribeStdioState(x) DescribeStdioState(alloca(12), x) -#define DescribeStringList(x) DescribeStringList(alloca(300), x) -#define DescribeThreadCreateFlags(x) DescribeThreadCreateFlags(alloca(64), x) -#define DescribeVirtualKeyCode(x) DescribeVirtualKeyCode(alloca(32), x) -#define DescribeWhence(x) DescribeWhence(alloca(12), x) -#define DescribeWhichPrio(x) DescribeWhichPrio(alloca(12), x) +#define DescribeCancelState(x, y) _DescribeCancelState(alloca(12), x, y) +#define DescribeClockName(x) _DescribeClockName(alloca(32), x) +#define DescribeControlKeyState(x) _DescribeControlKeyState(alloca(64), x) +#define DescribeDirfd(x) _DescribeDirfd(alloca(12), x) +#define DescribeDnotifyFlags(x) _DescribeDnotifyFlags(alloca(80), x) +#define DescribeErrno(x) _DescribeErrno(alloca(30), x) +#define DescribeFcntlCmd(x) _DescribeFcntlCmd(alloca(20), x) +#define DescribeFlockType(x) _DescribeFlockType(alloca(12), x) +#define DescribeFutexOp(x) _DescribeFutexOp(alloca(64), x) +#define DescribeHow(x) _DescribeHow(alloca(12), x) +#define DescribeInOutInt64(rc, x) _DescribeInOutInt64(alloca(23), rc, x) +#define DescribeItimer(x) _DescribeItimer(alloca(12), x) +#define DescribeMapFlags(x) _DescribeMapFlags(alloca(64), x) +#define DescribeMapping(x, y) _DescribeMapping(alloca(8), x, y) +#define DescribeMremapFlags(x) _DescribeMremapFlags(alloca(30), x) +#define DescribeMsyncFlags(x) _DescribeMsyncFlags(alloca(48), x) +#define DescribeNtConsoleInFlags(x) _DescribeNtConsoleInFlags(alloca(256), x) +#define DescribeNtConsoleOutFlags(x) _DescribeNtConsoleOutFlags(alloca(128), x) +#define DescribeNtFileAccessFlags(x) _DescribeNtFileAccessFlags(alloca(512), x) +#define DescribeNtFileFlagAttr(x) _DescribeNtFileFlagAttr(alloca(256), x) +#define DescribeNtFileMapFlags(x) _DescribeNtFileMapFlags(alloca(64), x) +#define DescribeNtFileShareFlags(x) _DescribeNtFileShareFlags(alloca(64), x) +#define DescribeNtFiletypeFlags(x) _DescribeNtFiletypeFlags(alloca(64), x) +#define DescribeNtLockFileFlags(x) _DescribeNtLockFileFlags(alloca(64), x) +#define DescribeNtMovFileInpFlags(x) _DescribeNtMovFileInpFlags(alloca(256), x) +#define DescribeNtPageFlags(x) _DescribeNtPageFlags(alloca(64), x) +#define DescribeNtPipeModeFlags(x) _DescribeNtPipeModeFlags(alloca(64), x) +#define DescribeNtPipeOpenFlags(x) _DescribeNtPipeOpenFlags(alloca(64), x) +#define DescribeNtProcAccessFlags(x) _DescribeNtProcAccessFlags(alloca(256), x) +#define DescribeNtStartFlags(x) _DescribeNtStartFlags(alloca(128), x) +#define DescribeNtSymlinkFlags(x) _DescribeNtSymlinkFlags(alloca(64), x) +#define DescribeOpenFlags(x) _DescribeOpenFlags(alloca(128), x) +#define DescribeOpenMode(x, y) _DescribeOpenMode(alloca(15), x, y) +#define DescribePersonalityFlags(p) _DescribePersonalityFlags(alloca(128), p) +#define DescribePollFlags(p) _DescribePollFlags(alloca(64), p) +#define DescribeProtFlags(x) _DescribeProtFlags(alloca(48), x) +#define DescribePtrace(i) _DescribePtrace(alloca(12), i) +#define DescribePtraceEvent(x) _DescribePtraceEvent(alloca(32), x) +#define DescribeRlimitName(rl) _DescribeRlimitName(alloca(20), rl) +#define DescribeSchedPolicy(x) _DescribeSchedPolicy(alloca(48), x) +#define DescribeSiCode(x, y) _DescribeSiCode(alloca(20), x, y) +#define DescribeSigaltstackFlags(x) _DescribeSigaltstackFlags(alloca(22), x) +#define DescribeSleepFlags(x) _DescribeSleepFlags(alloca(16), x) +#define DescribeSockLevel(x) _DescribeSockLevel(alloca(12), x) +#define DescribeSockOptname(x, y) _DescribeSockOptname(alloca(32), x, y) +#define DescribeSocketFamily(x) _DescribeSocketFamily(alloca(12), x) +#define DescribeSocketProtocol(x) _DescribeSocketProtocol(alloca(12), x) +#define DescribeSocketType(x) _DescribeSocketType(alloca(64), x) +#define DescribeStdioState(x) _DescribeStdioState(alloca(12), x) +#define DescribeStringList(x) _DescribeStringList(alloca(300), x) +#define DescribeThreadCreateFlags(x) _DescribeThreadCreateFlags(alloca(64), x) +#define DescribeVirtualKeyCode(x) _DescribeVirtualKeyCode(alloca(32), x) +#define DescribeWhence(x) _DescribeWhence(alloca(12), x) +#define DescribeWhichPrio(x) _DescribeWhichPrio(alloca(12), x) COSMOPOLITAN_C_END_ #endif /* COSMOPOLITAN_LIBC_INTRIN_DESCRIBEFLAGS_INTERNAL_H_ */ diff --git a/libc/intrin/describeflock.c b/libc/intrin/describeflock.c index ea7b744bd87..7f95445c42c 100644 --- a/libc/intrin/describeflock.c +++ b/libc/intrin/describeflock.c @@ -27,7 +27,7 @@ #define append(...) o += ksnprintf(buf + o, N - o, __VA_ARGS__) -const char *(DescribeFlock)(char buf[N], int cmd, const struct flock *l) { +const char *_DescribeFlock(char buf[N], int cmd, const struct flock *l) { int o = 0; if (!l) diff --git a/libc/intrin/describeflocktype.c b/libc/intrin/describeflocktype.c index 67c13a02495..ffb13879f61 100644 --- a/libc/intrin/describeflocktype.c +++ b/libc/intrin/describeflocktype.c @@ -19,7 +19,7 @@ #include "libc/fmt/itoa.h" #include "libc/sysv/consts/f.h" -const char *(DescribeFlockType)(char buf[12], int x) { +const char *_DescribeFlockType(char buf[12], int x) { if (x == F_RDLCK) return "F_RDLCK"; if (x == F_WRLCK) diff --git a/libc/intrin/describefutexop.c b/libc/intrin/describefutexop.c index 7a4b0c7838e..7777a475547 100644 --- a/libc/intrin/describefutexop.c +++ b/libc/intrin/describefutexop.c @@ -21,7 +21,7 @@ #include "libc/str/str.h" #include "libc/sysv/consts/futex.h" -const char *(DescribeFutexOp)(char buf[64], int x) { +const char *_DescribeFutexOp(char buf[64], int x) { bool priv = false; if (x & FUTEX_PRIVATE_FLAG) { diff --git a/libc/intrin/describegidlist.c b/libc/intrin/describegidlist.c index c2c10613622..f915da80b67 100644 --- a/libc/intrin/describegidlist.c +++ b/libc/intrin/describegidlist.c @@ -25,8 +25,8 @@ #define N 128 -const char *(DescribeGidList)(char buf[N], int rc, int size, - const uint32_t list[]) { +const char *_DescribeGidList(char buf[N], int rc, int size, + const uint32_t list[]) { if ((rc == -1) || (size < 0)) return "n/a"; if (!size) diff --git a/libc/intrin/describehow.c b/libc/intrin/describehow.c index f4fc6798d54..9a92abd7adc 100644 --- a/libc/intrin/describehow.c +++ b/libc/intrin/describehow.c @@ -20,7 +20,7 @@ #include "libc/intrin/describeflags.h" #include "libc/sysv/consts/sig.h" -const char *(DescribeHow)(char buf[12], int how) { +const char *_DescribeHow(char buf[12], int how) { if (how == SIG_BLOCK) return "SIG_BLOCK"; if (how == SIG_UNBLOCK) diff --git a/libc/intrin/describeinoutint64.c b/libc/intrin/describeinoutint64.c index 49fe1015bf3..19a8f31ad4a 100644 --- a/libc/intrin/describeinoutint64.c +++ b/libc/intrin/describeinoutint64.c @@ -20,7 +20,7 @@ #include "libc/fmt/itoa.h" #include "libc/intrin/describeflags.h" -const char *(DescribeInOutInt64)(char buf[23], ssize_t rc, int64_t *x) { +const char *_DescribeInOutInt64(char buf[23], ssize_t rc, int64_t *x) { if (!x) return "NULL"; char *p = buf; diff --git a/libc/intrin/describeiovec.c b/libc/intrin/describeiovec.c index a39c69c3f9f..30a2f3afbfe 100644 --- a/libc/intrin/describeiovec.c +++ b/libc/intrin/describeiovec.c @@ -27,8 +27,8 @@ #define append(...) o += ksnprintf(buf + o, N - o, __VA_ARGS__) -const char *(DescribeIovec)(char buf[N], ssize_t rc, const struct iovec *iov, - int iovlen) { +const char *_DescribeIovec(char buf[N], ssize_t rc, const struct iovec *iov, + int iovlen) { const char *d; int i, j, o = 0; diff --git a/libc/intrin/describeiovnt.c b/libc/intrin/describeiovnt.c index 58e60ec4168..e33b493fb14 100644 --- a/libc/intrin/describeiovnt.c +++ b/libc/intrin/describeiovnt.c @@ -22,7 +22,7 @@ #include "libc/macros.h" #include "libc/nt/winsock.h" -void DescribeIovNt(const struct NtIovec *iov, uint32_t iovlen, ssize_t rem) { +void _DescribeIovNt(const struct NtIovec *iov, uint32_t iovlen, ssize_t rem) { int i; if (kisdangerous(iov)) { kprintf("%p", iov); diff --git a/libc/intrin/describeitimer.c b/libc/intrin/describeitimer.c index 98c4e2a8cb0..aa1f96c750b 100644 --- a/libc/intrin/describeitimer.c +++ b/libc/intrin/describeitimer.c @@ -20,7 +20,7 @@ #include "libc/intrin/describeflags.h" #include "libc/sysv/consts/itimer.h" -const char *(DescribeItimer)(char buf[12], int which) { +const char *_DescribeItimer(char buf[12], int which) { if (which == ITIMER_REAL) return "ITIMER_REAL"; if (which == ITIMER_VIRTUAL) diff --git a/libc/intrin/describeitimerval.c b/libc/intrin/describeitimerval.c index 1e5661f509d..94af2a008d8 100644 --- a/libc/intrin/describeitimerval.c +++ b/libc/intrin/describeitimerval.c @@ -25,8 +25,8 @@ #define N 90 -const char *(DescribeItimerval)(char buf[N], int rc, - const struct itimerval *it) { +const char *_DescribeItimerval(char buf[N], int rc, + const struct itimerval *it) { if (!it) return "NULL"; if (rc == -1) diff --git a/libc/intrin/describemagnums.c b/libc/intrin/describemagnums.c index fe76de780fa..c5540cfc1f0 100644 --- a/libc/intrin/describemagnums.c +++ b/libc/intrin/describemagnums.c @@ -20,8 +20,8 @@ #include "libc/fmt/magnumstrs.internal.h" #include "libc/str/str.h" -const char *DescribeMagnum(char *b, const struct MagnumStr *m, const char *p, - int x) { +const char *_DescribeMagnum(char *b, const struct MagnumStr *m, const char *p, + int x) { const char *s; if (x == 127) return "CLOCK_INVALID"; diff --git a/libc/intrin/describemapflags.c b/libc/intrin/describemapflags.c index e46b28a3d1f..9367ee08328 100644 --- a/libc/intrin/describemapflags.c +++ b/libc/intrin/describemapflags.c @@ -22,7 +22,7 @@ #include "libc/sysv/consts/map.h" #include "libc/sysv/consts/prot.h" -const char *(DescribeMapFlags)(char buf[64], int x) { +const char *_DescribeMapFlags(char buf[64], int x) { const struct DescribeFlags kMapFlags[] = { {MAP_PRIVATE, "PRIVATE"}, // {MAP_ANONYMOUS, "ANONYMOUS"}, // @@ -36,5 +36,5 @@ const char *(DescribeMapFlags)(char buf[64], int x) { {MAP_NONBLOCK, "NONBLOCK"}, // {MAP_POPULATE, "POPULATE"}, // }; - return DescribeFlags(buf, 64, kMapFlags, ARRAYLEN(kMapFlags), "MAP_", x); + return _DescribeFlags(buf, 64, kMapFlags, ARRAYLEN(kMapFlags), "MAP_", x); } diff --git a/libc/intrin/describemapping.c b/libc/intrin/describemapping.c index 79f1cf706ad..6510e98483e 100644 --- a/libc/intrin/describemapping.c +++ b/libc/intrin/describemapping.c @@ -45,7 +45,7 @@ char *DescribeProt(char p[4], int prot) { return p; } -const char *(DescribeMapping)(char p[8], int prot, int flags) { +const char *_DescribeMapping(char p[8], int prot, int flags) { /* asan runtime depends on this function */ DescribeProt(p, prot); p[3] = DescribeMapType(flags); diff --git a/libc/intrin/describemremapflags.c b/libc/intrin/describemremapflags.c index a4505131af6..152f8a4ce14 100644 --- a/libc/intrin/describemremapflags.c +++ b/libc/intrin/describemremapflags.c @@ -25,7 +25,7 @@ static const struct DescribeFlags kMremapFlags[] = { {MREMAP_FIXED, "FIXED"}, // }; -const char *(DescribeMremapFlags)(char buf[30], int x) { - return DescribeFlags(buf, 30, kMremapFlags, ARRAYLEN(kMremapFlags), "MREMAP_", - x); +const char *_DescribeMremapFlags(char buf[30], int x) { + return _DescribeFlags(buf, 30, kMremapFlags, ARRAYLEN(kMremapFlags), + "MREMAP_", x); } diff --git a/libc/intrin/describemsyncflags.c b/libc/intrin/describemsyncflags.c index 2223afe6203..56a838e975f 100644 --- a/libc/intrin/describemsyncflags.c +++ b/libc/intrin/describemsyncflags.c @@ -20,11 +20,11 @@ #include "libc/macros.h" #include "libc/sysv/consts/msync.h" -const char *(DescribeMsyncFlags)(char buf[48], int x) { +const char *_DescribeMsyncFlags(char buf[48], int x) { const struct DescribeFlags kMsyncFlags[] = { {MS_SYNC, "SYNC"}, // {MS_ASYNC, "ASYNC"}, // {MS_INVALIDATE, "INVALIDATE"}, // }; - return DescribeFlags(buf, 48, kMsyncFlags, ARRAYLEN(kMsyncFlags), "MS_", x); + return _DescribeFlags(buf, 48, kMsyncFlags, ARRAYLEN(kMsyncFlags), "MS_", x); } diff --git a/libc/intrin/describentconsolemodeinputflags.c b/libc/intrin/describentconsolemodeinputflags.c index fdea2e24969..a53575481c8 100644 --- a/libc/intrin/describentconsolemodeinputflags.c +++ b/libc/intrin/describentconsolemodeinputflags.c @@ -33,7 +33,7 @@ static const struct DescribeFlags kConsoleModeInputFlags[] = { {kNtEnableVirtualTerminalInput, "VirtualTerminalInput"}, // }; -const char *(DescribeNtConsoleInFlags)(char buf[256], uint32_t x) { - return DescribeFlags(buf, 256, kConsoleModeInputFlags, - ARRAYLEN(kConsoleModeInputFlags), "kNtEnable", x); +const char *_DescribeNtConsoleInFlags(char buf[256], uint32_t x) { + return _DescribeFlags(buf, 256, kConsoleModeInputFlags, + ARRAYLEN(kConsoleModeInputFlags), "kNtEnable", x); } diff --git a/libc/intrin/describentconsolemodeoutputflags.c b/libc/intrin/describentconsolemodeoutputflags.c index 78f1d39d551..2686e765a3b 100644 --- a/libc/intrin/describentconsolemodeoutputflags.c +++ b/libc/intrin/describentconsolemodeoutputflags.c @@ -28,7 +28,7 @@ static const struct DescribeFlags kConsoleModeOutputFlags[] = { {kNtEnableLvbGridWorldwide, "EnableLvbGridWorldwide"}, // }; -const char *(DescribeNtConsoleOutFlags)(char buf[128], uint32_t x) { - return DescribeFlags(buf, 128, kConsoleModeOutputFlags, - ARRAYLEN(kConsoleModeOutputFlags), "kNt", x); +const char *_DescribeNtConsoleOutFlags(char buf[128], uint32_t x) { + return _DescribeFlags(buf, 128, kConsoleModeOutputFlags, + ARRAYLEN(kConsoleModeOutputFlags), "kNt", x); } diff --git a/libc/intrin/describentcreationdisposition.c b/libc/intrin/describentcreationdisposition.c index 136a8119f9f..00636b1f73b 100644 --- a/libc/intrin/describentcreationdisposition.c +++ b/libc/intrin/describentcreationdisposition.c @@ -19,7 +19,7 @@ #include "libc/intrin/describeflags.h" #include "libc/nt/enum/creationdisposition.h" -const char *DescribeNtCreationDisposition(uint32_t x) { +const char *_DescribeNtCreationDisposition(uint32_t x) { switch (x) { case kNtCreateNew: return "kNtCreateNew"; diff --git a/libc/intrin/describentfileaccessflags.c b/libc/intrin/describentfileaccessflags.c index b1d935a55a3..582f519e4b9 100644 --- a/libc/intrin/describentfileaccessflags.c +++ b/libc/intrin/describentfileaccessflags.c @@ -72,7 +72,7 @@ static const struct DescribeFlags kFileAccessflags[] = { {kNtTokenAdjustSessionid, "kNtTokenAdjustSessionid"}, }; -const char *(DescribeNtFileAccessFlags)(char buf[512], uint32_t x) { - return DescribeFlags(buf, 512, kFileAccessflags, ARRAYLEN(kFileAccessflags), +const char *_DescribeNtFileAccessFlags(char buf[512], uint32_t x) { + return _DescribeFlags(buf, 512, kFileAccessflags, ARRAYLEN(kFileAccessflags), "", x); } diff --git a/libc/intrin/describentfileflagattr.c b/libc/intrin/describentfileflagattr.c index 5dc9ee8ccc5..4dc9528df28 100644 --- a/libc/intrin/describentfileflagattr.c +++ b/libc/intrin/describentfileflagattr.c @@ -50,9 +50,9 @@ static const struct DescribeFlags kFileFlags[] = { {kNtFileFlagFirstPipeInstance, "FlagFirstPipeInstance"}, // }; -const char *(DescribeNtFileFlagAttr)(char buf[256], uint32_t x) { +const char *_DescribeNtFileFlagAttr(char buf[256], uint32_t x) { if (x == -1u) return "-1u"; - return DescribeFlags(buf, 256, kFileFlags, ARRAYLEN(kFileFlags), "kNtFile", - x); + return _DescribeFlags(buf, 256, kFileFlags, ARRAYLEN(kFileFlags), "kNtFile", + x); } diff --git a/libc/intrin/describentfilemapflags.c b/libc/intrin/describentfilemapflags.c index 316fb089452..08ba982421a 100644 --- a/libc/intrin/describentfilemapflags.c +++ b/libc/intrin/describentfilemapflags.c @@ -30,7 +30,7 @@ static const struct DescribeFlags kFileMapFlags[] = { {kNtFileMapLargePages, "LargePages"}, // }; -const char *(DescribeNtFileMapFlags)(char buf[64], uint32_t x) { - return DescribeFlags(buf, 64, kFileMapFlags, ARRAYLEN(kFileMapFlags), - "kNtFileMap", x); +const char *_DescribeNtFileMapFlags(char buf[64], uint32_t x) { + return _DescribeFlags(buf, 64, kFileMapFlags, ARRAYLEN(kFileMapFlags), + "kNtFileMap", x); } diff --git a/libc/intrin/describentfileshareflags.c b/libc/intrin/describentfileshareflags.c index 49e771979f8..52f3aeee49f 100644 --- a/libc/intrin/describentfileshareflags.c +++ b/libc/intrin/describentfileshareflags.c @@ -26,7 +26,7 @@ static const struct DescribeFlags kFileShareflags[] = { {kNtFileShareDelete, "Delete"}, // }; -const char *(DescribeNtFileShareFlags)(char buf[64], uint32_t x) { - return DescribeFlags(buf, 64, kFileShareflags, ARRAYLEN(kFileShareflags), - "kNtFileShare", x); +const char *_DescribeNtFileShareFlags(char buf[64], uint32_t x) { + return _DescribeFlags(buf, 64, kFileShareflags, ARRAYLEN(kFileShareflags), + "kNtFileShare", x); } diff --git a/libc/intrin/describentfiletypeflags.c b/libc/intrin/describentfiletypeflags.c index 5f7c9d1343c..7cecebc0498 100644 --- a/libc/intrin/describentfiletypeflags.c +++ b/libc/intrin/describentfiletypeflags.c @@ -28,7 +28,7 @@ static const struct DescribeFlags kFiletypeFlags[] = { {kNtFileTypeChar, "Char"}, // }; -const char *(DescribeNtFiletypeFlags)(char buf[64], uint32_t x) { - return DescribeFlags(buf, 64, kFiletypeFlags, ARRAYLEN(kFiletypeFlags), - "kNtFileType", x); +const char *_DescribeNtFiletypeFlags(char buf[64], uint32_t x) { + return _DescribeFlags(buf, 64, kFiletypeFlags, ARRAYLEN(kFiletypeFlags), + "kNtFileType", x); } diff --git a/libc/intrin/describentlockfileflags.c b/libc/intrin/describentlockfileflags.c index a32a75bca3f..007b5c74d65 100644 --- a/libc/intrin/describentlockfileflags.c +++ b/libc/intrin/describentlockfileflags.c @@ -25,7 +25,7 @@ static const struct DescribeFlags kNtLockFileFlags[] = { {kNtLockfileExclusiveLock, "ExclusiveLock"}, // }; -const char *(DescribeNtLockFileFlags)(char buf[64], uint32_t x) { - return DescribeFlags(buf, 64, kNtLockFileFlags, ARRAYLEN(kNtLockFileFlags), - "kNtLockfile", x); +const char *_DescribeNtLockFileFlags(char buf[64], uint32_t x) { + return _DescribeFlags(buf, 64, kNtLockFileFlags, ARRAYLEN(kNtLockFileFlags), + "kNtLockfile", x); } diff --git a/libc/intrin/describentmovfileinpflags.c b/libc/intrin/describentmovfileinpflags.c index e4ba860ca49..311a3992b62 100644 --- a/libc/intrin/describentmovfileinpflags.c +++ b/libc/intrin/describentmovfileinpflags.c @@ -29,7 +29,7 @@ static const struct DescribeFlags kMoveFileInputFlags[] = { {kNtMovefileFailIfNotTrackable, "FailIfNotTrackable"}, // }; -const char *(DescribeNtMovFileInpFlags)(char buf[256], uint32_t x) { - return DescribeFlags(buf, 256, kMoveFileInputFlags, - ARRAYLEN(kMoveFileInputFlags), "kNtMovefile", x); +const char *_DescribeNtMovFileInpFlags(char buf[256], uint32_t x) { + return _DescribeFlags(buf, 256, kMoveFileInputFlags, + ARRAYLEN(kMoveFileInputFlags), "kNtMovefile", x); } diff --git a/libc/intrin/describentoverlapped.c b/libc/intrin/describentoverlapped.c index c516c51d895..c21e231e5f7 100644 --- a/libc/intrin/describentoverlapped.c +++ b/libc/intrin/describentoverlapped.c @@ -20,7 +20,7 @@ #include "libc/intrin/kprintf.h" #include "libc/macros.h" -const char *(DescribeNtOverlapped)(char b[128], const struct NtOverlapped *o) { +const char *_DescribeNtOverlapped(char b[128], const struct NtOverlapped *o) { int i = 0, n = 128; bool gotsome = false; if (!o) diff --git a/libc/intrin/describentoverlapped.h b/libc/intrin/describentoverlapped.h index 009dad0c1b4..b7d97f6d395 100644 --- a/libc/intrin/describentoverlapped.h +++ b/libc/intrin/describentoverlapped.h @@ -4,8 +4,8 @@ #include "libc/nt/struct/overlapped.h" COSMOPOLITAN_C_START_ -const char *DescribeNtOverlapped(char[128], const struct NtOverlapped *); -#define DescribeNtOverlapped(x) DescribeNtOverlapped(alloca(128), x) +const char *_DescribeNtOverlapped(char[128], const struct NtOverlapped *); +#define DescribeNtOverlapped(x) _DescribeNtOverlapped(alloca(128), x) COSMOPOLITAN_C_END_ #endif /* COSMOPOLITAN_LIBC_INTRIN_DESCRIBENTOVERLAPPED_INTERNAL_H_ */ diff --git a/libc/intrin/describentpageflags.c b/libc/intrin/describentpageflags.c index 55ef2e63c81..aac644adba9 100644 --- a/libc/intrin/describentpageflags.c +++ b/libc/intrin/describentpageflags.c @@ -41,6 +41,6 @@ static const struct DescribeFlags kPageFlags[] = { {kNtSecWritecombine, "SecWritecombine"}, // }; -const char *(DescribeNtPageFlags)(char buf[64], uint32_t x) { - return DescribeFlags(buf, 64, kPageFlags, ARRAYLEN(kPageFlags), "kNt", x); +const char *_DescribeNtPageFlags(char buf[64], uint32_t x) { + return _DescribeFlags(buf, 64, kPageFlags, ARRAYLEN(kPageFlags), "kNt", x); } diff --git a/libc/intrin/describentpipemodeflags.c b/libc/intrin/describentpipemodeflags.c index f64125eb81b..0c8f58bfcdb 100644 --- a/libc/intrin/describentpipemodeflags.c +++ b/libc/intrin/describentpipemodeflags.c @@ -32,7 +32,7 @@ static const struct DescribeFlags kPipeModeFlags[] = { //{kNtPipeTypeByte, "TypeByte"}, // 0x00000000 }; -const char *(DescribeNtPipeModeFlags)(char buf[64], uint32_t x) { - return DescribeFlags(buf, 64, kPipeModeFlags, ARRAYLEN(kPipeModeFlags), - "kNtPipe", x); +const char *_DescribeNtPipeModeFlags(char buf[64], uint32_t x) { + return _DescribeFlags(buf, 64, kPipeModeFlags, ARRAYLEN(kPipeModeFlags), + "kNtPipe", x); } diff --git a/libc/intrin/describentpipeopenflags.c b/libc/intrin/describentpipeopenflags.c index 8f4b0d783f4..623075468ce 100644 --- a/libc/intrin/describentpipeopenflags.c +++ b/libc/intrin/describentpipeopenflags.c @@ -35,7 +35,7 @@ static const struct DescribeFlags kPipeOpenFlags[] = { {kNtAccessSystemSecurity, "kNtAccessSystemSecurity"}, }; -const char *(DescribeNtPipeOpenFlags)(char buf[64], uint32_t x) { - return DescribeFlags(buf, 64, kPipeOpenFlags, ARRAYLEN(kPipeOpenFlags), "", - x); +const char *_DescribeNtPipeOpenFlags(char buf[64], uint32_t x) { + return _DescribeFlags(buf, 64, kPipeOpenFlags, ARRAYLEN(kPipeOpenFlags), "", + x); } diff --git a/libc/intrin/describentprocaccessflags.c b/libc/intrin/describentprocaccessflags.c index 732f7df186b..63b94754baf 100644 --- a/libc/intrin/describentprocaccessflags.c +++ b/libc/intrin/describentprocaccessflags.c @@ -37,7 +37,7 @@ static const struct DescribeFlags kProcessAccessflags[] = { {kNtProcessSynchronize, "Synchronize"}, // }; -const char *(DescribeNtProcAccessFlags)(char buf[256], uint32_t x) { - return DescribeFlags(buf, 256, kProcessAccessflags, - ARRAYLEN(kProcessAccessflags), "kNtProcess", x); +const char *_DescribeNtProcAccessFlags(char buf[256], uint32_t x) { + return _DescribeFlags(buf, 256, kProcessAccessflags, + ARRAYLEN(kProcessAccessflags), "kNtProcess", x); } diff --git a/libc/intrin/describentsecurityattributes.c b/libc/intrin/describentsecurityattributes.c index 058c2a49ffb..674fe2f2877 100644 --- a/libc/intrin/describentsecurityattributes.c +++ b/libc/intrin/describentsecurityattributes.c @@ -21,9 +21,8 @@ #include "libc/intrin/describeflags.h" #include "libc/nt/struct/securityattributes.h" -const char *( - DescribeNtSecurityAttributes)(char buf[32], - const struct NtSecurityAttributes *p) { +const char *_DescribeNtSecurityAttributes( + char buf[32], const struct NtSecurityAttributes *p) { FormatInt64(buf, (uintptr_t)p); return buf; } diff --git a/libc/intrin/describentstartflags.c b/libc/intrin/describentstartflags.c index 082dd026f1c..6af9c87448a 100644 --- a/libc/intrin/describentstartflags.c +++ b/libc/intrin/describentstartflags.c @@ -38,7 +38,7 @@ static const struct DescribeFlags kNtStartFlags[] = { {kNtStartfUntrustedsource, "Untrustedsource"}, // }; -const char *(DescribeNtStartFlags)(char buf[128], uint32_t x) { - return DescribeFlags(buf, 128, kNtStartFlags, ARRAYLEN(kNtStartFlags), - "kNtStartf", x); +const char *_DescribeNtStartFlags(char buf[128], uint32_t x) { + return _DescribeFlags(buf, 128, kNtStartFlags, ARRAYLEN(kNtStartFlags), + "kNtStartf", x); } diff --git a/libc/intrin/describentsymlinkflags.c b/libc/intrin/describentsymlinkflags.c index 2da9dfb1019..c9924fba581 100644 --- a/libc/intrin/describentsymlinkflags.c +++ b/libc/intrin/describentsymlinkflags.c @@ -25,7 +25,7 @@ static const struct DescribeFlags kSymbolicLinkflags[] = { {kNtSymbolicLinkFlagAllowUnprivilegedCreate, "AllowUnprivilegedCreate"}, // }; -const char *(DescribeNtSymlinkFlags)(char buf[64], uint32_t x) { - return DescribeFlags(buf, 64, kSymbolicLinkflags, - ARRAYLEN(kSymbolicLinkflags), "kNtSymbolicLinkFlag", x); +const char *_DescribeNtSymlinkFlags(char buf[64], uint32_t x) { + return _DescribeFlags(buf, 64, kSymbolicLinkflags, + ARRAYLEN(kSymbolicLinkflags), "kNtSymbolicLinkFlag", x); } diff --git a/libc/intrin/describeopenflags.c b/libc/intrin/describeopenflags.c index c8741e9ef6b..0f640288fa5 100644 --- a/libc/intrin/describeopenflags.c +++ b/libc/intrin/describeopenflags.c @@ -30,7 +30,7 @@ /** * Describes clock_gettime() clock argument. */ -const char *(DescribeOpenFlags)(char buf[128], int x) { +const char *_DescribeOpenFlags(char buf[128], int x) { char *p; int i, n; const char *pipe; @@ -68,7 +68,7 @@ const char *(DescribeOpenFlags)(char buf[128], int x) { d[i].flag = MAGNUM_NUMBER(kOpenFlags, i); d[i].name = MAGNUM_STRING(kOpenFlags, i); } - DescribeFlags(p, 128 - (p - buf), d, n, "O_", x); + _DescribeFlags(p, 128 - (p - buf), d, n, "O_", x); } return buf; } diff --git a/libc/intrin/describeopenmode.c b/libc/intrin/describeopenmode.c index bbfa86e8ea9..bfcc3397e8d 100644 --- a/libc/intrin/describeopenmode.c +++ b/libc/intrin/describeopenmode.c @@ -28,7 +28,7 @@ static bool IsCreatingFile(int flags) { (IsLinux() && (flags & O_TMPFILE_LINUX) == O_TMPFILE_LINUX); } -const char *(DescribeOpenMode)(char buf[15], int flags, int mode) { +const char *_DescribeOpenMode(char buf[15], int flags, int mode) { if (!IsCreatingFile(flags)) { return ""; } diff --git a/libc/intrin/describepersonalityflags.c b/libc/intrin/describepersonalityflags.c index ea2ce49eeca..88fab320374 100644 --- a/libc/intrin/describepersonalityflags.c +++ b/libc/intrin/describepersonalityflags.c @@ -36,7 +36,7 @@ static const struct DescribeFlags kPersonalityFlags[] = { {UNAME26, "UNAME26"}, // }; -const char *(DescribePersonalityFlags)(char buf[128], int x) { - return DescribeFlags(buf, 128, kPersonalityFlags, ARRAYLEN(kPersonalityFlags), - "", x); +const char *_DescribePersonalityFlags(char buf[128], int x) { + return _DescribeFlags(buf, 128, kPersonalityFlags, + ARRAYLEN(kPersonalityFlags), "", x); } diff --git a/libc/intrin/describepollfds.c b/libc/intrin/describepollfds.c index 60691a98475..94ebd2da5d9 100644 --- a/libc/intrin/describepollfds.c +++ b/libc/intrin/describepollfds.c @@ -28,8 +28,8 @@ #define append(...) o += ksnprintf(buf + o, N - o, __VA_ARGS__) -const char *(DescribePollFds)(char buf[N], ssize_t rc, struct pollfd *fds, - size_t nfds) { +const char *_DescribePollFds(char buf[N], ssize_t rc, struct pollfd *fds, + size_t nfds) { char b64[64]; int i, o = 0; @@ -45,9 +45,9 @@ const char *(DescribePollFds)(char buf[N], ssize_t rc, struct pollfd *fds, for (i = 0; i < nfds; ++i) { if (i) append(", "); - append("{%d, %s", fds[i].fd, (DescribePollFlags)(b64, fds[i].events)); + append("{%d, %s", fds[i].fd, _DescribePollFlags(b64, fds[i].events)); if (rc >= 0) { - append(", [%s]", (DescribePollFlags)(b64, fds[i].revents)); + append(", [%s]", _DescribePollFlags(b64, fds[i].revents)); } append("}"); } diff --git a/libc/intrin/describepollflags.c b/libc/intrin/describepollflags.c index f552d965171..6445b4e54c7 100644 --- a/libc/intrin/describepollflags.c +++ b/libc/intrin/describepollflags.c @@ -21,7 +21,7 @@ #include "libc/nt/enum/filemapflags.h" #include "libc/sysv/consts/poll.h" -const char *(DescribePollFlags)(char buf[64], int x) { +const char *_DescribePollFlags(char buf[64], int x) { const struct DescribeFlags kPollFlags[] = { {POLLIN, "IN"}, // order matters {POLLOUT, "OUT"}, // order matters @@ -35,5 +35,5 @@ const char *(DescribePollFlags)(char buf[64], int x) { {POLLWRBAND, "WRBAND"}, // {POLLWRNORM, "WRNORM"}, // }; - return DescribeFlags(buf, 64, kPollFlags, ARRAYLEN(kPollFlags), "POLL", x); + return _DescribeFlags(buf, 64, kPollFlags, ARRAYLEN(kPollFlags), "POLL", x); } diff --git a/libc/intrin/describeprotflags.c b/libc/intrin/describeprotflags.c index 03492a9b231..44008757bab 100644 --- a/libc/intrin/describeprotflags.c +++ b/libc/intrin/describeprotflags.c @@ -20,12 +20,12 @@ #include "libc/macros.h" #include "libc/sysv/consts/prot.h" -const char *(DescribeProtFlags)(char buf[48], int x) { +const char *_DescribeProtFlags(char buf[48], int x) { const struct DescribeFlags kProtFlags[] = { {PROT_READ, "READ"}, // {PROT_WRITE, "WRITE"}, // {PROT_EXEC, "EXEC"}, // {PROT_GUARD, "GUARD"}, // }; - return DescribeFlags(buf, 48, kProtFlags, ARRAYLEN(kProtFlags), "PROT_", x); + return _DescribeFlags(buf, 48, kProtFlags, ARRAYLEN(kProtFlags), "PROT_", x); } diff --git a/libc/intrin/describeptrace.c b/libc/intrin/describeptrace.c index d4c6f4fece8..84baa0e5d5a 100644 --- a/libc/intrin/describeptrace.c +++ b/libc/intrin/describeptrace.c @@ -20,7 +20,7 @@ #include "libc/intrin/describeflags.h" #include "libc/sysv/consts/ptrace.h" -const char *(DescribePtrace)(char buf[12], int x) { +const char *_DescribePtrace(char buf[12], int x) { if (x == -1) return "-1"; if (x == PTRACE_TRACEME) diff --git a/libc/intrin/describeptraceevent.c b/libc/intrin/describeptraceevent.c index b3ba1ee180b..11c0c4699d3 100644 --- a/libc/intrin/describeptraceevent.c +++ b/libc/intrin/describeptraceevent.c @@ -20,7 +20,7 @@ #include "libc/intrin/describeflags.h" #include "libc/sysv/consts/ptrace.h" -const char *(DescribePtraceEvent)(char buf[32], int x) { +const char *_DescribePtraceEvent(char buf[32], int x) { if (x == PTRACE_EVENT_FORK) return "PTRACE_EVENT_FORK"; if (x == PTRACE_EVENT_VFORK) diff --git a/libc/intrin/describerlimit.c b/libc/intrin/describerlimit.c index feb7574ee55..7c58a965be5 100644 --- a/libc/intrin/describerlimit.c +++ b/libc/intrin/describerlimit.c @@ -24,7 +24,7 @@ #include "libc/str/str.h" #include "libc/sysv/consts/rlim.h" -const char *DescribeRlimit(char buf[64], int rc, const struct rlimit *rlim) { +const char *_DescribeRlimit(char buf[64], int rc, const struct rlimit *rlim) { if (rc == -1) return "n/a"; if (!rlim) diff --git a/libc/intrin/describerlimitname.c b/libc/intrin/describerlimitname.c index 15ee5a7b93b..1872e779265 100644 --- a/libc/intrin/describerlimitname.c +++ b/libc/intrin/describerlimitname.c @@ -22,8 +22,8 @@ /** * Describes setrlimit() / getrlimit() argument. */ -const char *(DescribeRlimitName)(char buf[20], int x) { +const char *_DescribeRlimitName(char buf[20], int x) { if (x == 127) return "n/a"; - return DescribeMagnum(buf, kRlimitNames, "RLIMIT_", x); + return _DescribeMagnum(buf, kRlimitNames, "RLIMIT_", x); } diff --git a/libc/intrin/describeschedparam.c b/libc/intrin/describeschedparam.c index 369f52d936c..f559ffad5c5 100644 --- a/libc/intrin/describeschedparam.c +++ b/libc/intrin/describeschedparam.c @@ -24,7 +24,7 @@ /** * Describes clock_gettime() clock argument. */ -const char *(DescribeSchedParam)(char buf[32], const struct sched_param *x) { +const char *_DescribeSchedParam(char buf[32], const struct sched_param *x) { char *p; if (!x) return "0"; diff --git a/libc/intrin/describeschedpolicy.c b/libc/intrin/describeschedpolicy.c index 5e65a554f16..24c7eb67ca7 100644 --- a/libc/intrin/describeschedpolicy.c +++ b/libc/intrin/describeschedpolicy.c @@ -26,7 +26,7 @@ /** * Describes clock_gettime() clock argument. */ -const char *(DescribeSchedPolicy)(char buf[48], int x) { +const char *_DescribeSchedPolicy(char buf[48], int x) { char *p = buf; if (x == -1) { goto DoNumber; diff --git a/libc/intrin/describeseccompoperation.c b/libc/intrin/describeseccompoperation.c index a18b18d6fc4..824f1084105 100644 --- a/libc/intrin/describeseccompoperation.c +++ b/libc/intrin/describeseccompoperation.c @@ -19,7 +19,7 @@ #include "libc/calls/struct/seccomp.internal.h" #include "libc/intrin/describeflags.h" -const char *DescribeSeccompOperation(int x) { +const char *_DescribeSeccompOperation(int x) { switch (x) { case SECCOMP_SET_MODE_STRICT: return "SECCOMP_SET_MODE_STRICT"; diff --git a/libc/intrin/describesicode.c b/libc/intrin/describesicode.c index 56dcf898d11..a9e33ca4a36 100644 --- a/libc/intrin/describesicode.c +++ b/libc/intrin/describesicode.c @@ -38,7 +38,7 @@ static void NameIt(char p[20], const char *s, int si_code) { /** * Returns symbolic name for siginfo::si_code value. */ -const char *(DescribeSiCode)(char b[20], int sig, int si_code) { +const char *_DescribeSiCode(char b[20], int sig, int si_code) { NameIt(b, "SI_", si_code); if (si_code == SI_QUEUE) { strcpy(b + 3, "QUEUE"); /* sent by sigqueue(2) */ diff --git a/libc/intrin/describesigaction.c b/libc/intrin/describesigaction.c index e9c0413d3b3..5a7a417a661 100644 --- a/libc/intrin/describesigaction.c +++ b/libc/intrin/describesigaction.c @@ -51,15 +51,15 @@ static const char *DescribeSigFlags(char buf[64], int x) { {SA_ONESHOT, "ONESHOT"}, // {0x04000000, "RESTORER"}, // }; - return DescribeFlags(buf, 64, kSigFlags, ARRAYLEN(kSigFlags), "SA_", x); + return _DescribeFlags(buf, 64, kSigFlags, ARRAYLEN(kSigFlags), "SA_", x); } #define N 256 #define append(...) o += ksnprintf(buf + o, N - o, __VA_ARGS__) -const char *(DescribeSigaction)(char buf[N], int rc, - const struct sigaction *sa) { +const char *_DescribeSigaction(char buf[N], int rc, + const struct sigaction *sa) { int o = 0; char b64[64]; diff --git a/libc/intrin/describesigaltstack.c b/libc/intrin/describesigaltstack.c index 32cdb3bc246..71ed5033597 100644 --- a/libc/intrin/describesigaltstack.c +++ b/libc/intrin/describesigaltstack.c @@ -21,8 +21,8 @@ #include "libc/intrin/describeflags.h" #include "libc/intrin/kprintf.h" -const char *(DescribeSigaltstack)(char buf[128], int rc, - const struct sigaltstack *ss) { +const char *_DescribeSigaltstack(char buf[128], int rc, + const struct sigaltstack *ss) { if (rc == -1) return "n/a"; if (!ss) diff --git a/libc/intrin/describesigaltstackflags.c b/libc/intrin/describesigaltstackflags.c index 537ebae65fa..33354d07e19 100644 --- a/libc/intrin/describesigaltstackflags.c +++ b/libc/intrin/describesigaltstackflags.c @@ -20,11 +20,11 @@ #include "libc/macros.h" #include "libc/sysv/consts/ss.h" -const char *(DescribeSigaltstackFlags)(char buf[22], int x) { +const char *_DescribeSigaltstackFlags(char buf[22], int x) { const struct DescribeFlags kSigaltstackFlags[] = { {SS_ONSTACK, "ONSTACK"}, // {SS_DISABLE, "DISABLE"}, // }; - return DescribeFlags(buf, 48, kSigaltstackFlags, ARRAYLEN(kSigaltstackFlags), - "SS_", x); + return _DescribeFlags(buf, 48, kSigaltstackFlags, ARRAYLEN(kSigaltstackFlags), + "SS_", x); } diff --git a/libc/intrin/describesiginfo.c b/libc/intrin/describesiginfo.c index 8235b078baf..074e0944249 100644 --- a/libc/intrin/describesiginfo.c +++ b/libc/intrin/describesiginfo.c @@ -29,7 +29,7 @@ #define append(...) i += ksnprintf(buf + i, N - i, __VA_ARGS__) -const char *(DescribeSiginfo)(char buf[N], int rc, const siginfo_t *si) { +const char *_DescribeSiginfo(char buf[N], int rc, const siginfo_t *si) { int i = 0; if (rc == -1) diff --git a/libc/intrin/describesigset.c b/libc/intrin/describesigset.c index e05758d49ea..ee15291551f 100644 --- a/libc/intrin/describesigset.c +++ b/libc/intrin/describesigset.c @@ -31,7 +31,7 @@ #define append(...) o += ksnprintf(buf + o, N - o, __VA_ARGS__) -const char *(DescribeSigset)(char buf[N], int rc, const sigset_t *ss) { +const char *_DescribeSigset(char buf[N], int rc, const sigset_t *ss) { int olderr; bool gotsome; const char *s; diff --git a/libc/intrin/describesleepflags.c b/libc/intrin/describesleepflags.c index 858a254f6b1..2bcfaf4d703 100644 --- a/libc/intrin/describesleepflags.c +++ b/libc/intrin/describesleepflags.c @@ -24,7 +24,7 @@ /** * Describes clock_nanosleep() flags argument. */ -const char *(DescribeSleepFlags)(char buf[16], int x) { +const char *_DescribeSleepFlags(char buf[16], int x) { switch (x) { case 0: return "0"; diff --git a/libc/intrin/describesocketfamily.c b/libc/intrin/describesocketfamily.c index e4bacb527d3..1144ec8da2c 100644 --- a/libc/intrin/describesocketfamily.c +++ b/libc/intrin/describesocketfamily.c @@ -20,7 +20,7 @@ #include "libc/intrin/describeflags.h" #include "libc/sysv/consts/af.h" -const char *(DescribeSocketFamily)(char buf[12], int family) { +const char *_DescribeSocketFamily(char buf[12], int family) { if (family == AF_UNIX) return "AF_UNIX"; if (family == AF_INET) diff --git a/libc/intrin/describesocketprotocol.c b/libc/intrin/describesocketprotocol.c index 39086245f3d..16059fa1f47 100644 --- a/libc/intrin/describesocketprotocol.c +++ b/libc/intrin/describesocketprotocol.c @@ -20,7 +20,7 @@ #include "libc/intrin/describeflags.h" #include "libc/sysv/consts/ipproto.h" -const char *(DescribeSocketProtocol)(char buf[12], int family) { +const char *_DescribeSocketProtocol(char buf[12], int family) { if (family == IPPROTO_IP) return "IPPROTO_IP"; if (family == IPPROTO_ICMP) diff --git a/libc/intrin/describesockettype.c b/libc/intrin/describesockettype.c index f28ffc5b829..c8084b57308 100644 --- a/libc/intrin/describesockettype.c +++ b/libc/intrin/describesockettype.c @@ -21,7 +21,7 @@ #include "libc/str/str.h" #include "libc/sysv/consts/sock.h" -const char *(DescribeSocketType)(char buf[64], int type) { +const char *_DescribeSocketType(char buf[64], int type) { int x; char *p; p = buf; diff --git a/libc/intrin/describesocklevel.c b/libc/intrin/describesocklevel.c index 8edadadc5d1..d2b981a3610 100644 --- a/libc/intrin/describesocklevel.c +++ b/libc/intrin/describesocklevel.c @@ -23,7 +23,7 @@ /** * Describes setsockopt() level arguments. */ -const char *(DescribeSockLevel)(char buf[12], int x) { +const char *_DescribeSockLevel(char buf[12], int x) { if (x == SOL_SOCKET) return "SOL_SOCKET"; if (x == SOL_IP) diff --git a/libc/intrin/describesockoptname.c b/libc/intrin/describesockoptname.c index baf37f81b9c..adf162606ec 100644 --- a/libc/intrin/describesockoptname.c +++ b/libc/intrin/describesockoptname.c @@ -25,7 +25,7 @@ /** * Describes setsockopt() optname arguments. */ -const char *(DescribeSockOptname)(char buf[32], int l, int x) { +const char *_DescribeSockOptname(char buf[32], int l, int x) { char *p; const char *s; const struct MagnumStr *ms; diff --git a/libc/intrin/describestat.c b/libc/intrin/describestat.c index 102e58ef7a7..530708568cc 100644 --- a/libc/intrin/describestat.c +++ b/libc/intrin/describestat.c @@ -25,7 +25,7 @@ #define append(...) o += ksnprintf(buf + o, N - o, __VA_ARGS__) -const char *(DescribeStat)(char buf[N], int rc, const struct stat *st) { +const char *_DescribeStat(char buf[N], int rc, const struct stat *st) { int o = 0; if (rc == -1) diff --git a/libc/intrin/describestatfs.c b/libc/intrin/describestatfs.c index 787062edc23..439fb925f83 100644 --- a/libc/intrin/describestatfs.c +++ b/libc/intrin/describestatfs.c @@ -27,7 +27,7 @@ #define append(...) i += ksnprintf(buf + i, N - i, __VA_ARGS__) -const char *(DescribeStatfs)(char buf[N], int rc, const struct statfs *f) { +const char *_DescribeStatfs(char buf[N], int rc, const struct statfs *f) { int i = 0; char ibuf[21]; int64_t flags; diff --git a/libc/intrin/describestdiostate.c b/libc/intrin/describestdiostate.c index 822bd2ed9b2..ec7fdba3ece 100644 --- a/libc/intrin/describestdiostate.c +++ b/libc/intrin/describestdiostate.c @@ -21,7 +21,7 @@ #include "libc/intrin/describeflags.h" #include "libc/str/str.h" -const char *(DescribeStdioState)(char buf[12], int x) { +const char *_DescribeStdioState(char buf[12], int x) { if (!x) return ""; if (x == -1) diff --git a/libc/intrin/describestringlist.c b/libc/intrin/describestringlist.c index 9f0e5949f1f..67baea91e76 100644 --- a/libc/intrin/describestringlist.c +++ b/libc/intrin/describestringlist.c @@ -24,7 +24,7 @@ #define append(...) o += ksnprintf(buf + o, N - o, __VA_ARGS__) -const char *(DescribeStringList)(char buf[N], char *const list[]) { +const char *_DescribeStringList(char buf[N], char *const list[]) { int i, o = 0; if (!list) diff --git a/libc/intrin/describetermios.c b/libc/intrin/describetermios.c index 36ad691bd0c..1cbb4069428 100644 --- a/libc/intrin/describetermios.c +++ b/libc/intrin/describetermios.c @@ -29,8 +29,8 @@ #define append(...) o += ksnprintf(buf + o, N - o, __VA_ARGS__) -const char *(DescribeTermios)(char buf[N], ssize_t rc, - const struct termios *tio) { +const char *_DescribeTermios(char buf[N], ssize_t rc, + const struct termios *tio) { int o = 0; char b128[128]; @@ -61,7 +61,7 @@ const char *(DescribeTermios)(char buf[N], ssize_t rc, {IUTF8, "IUTF8"}, // }; append(".c_iflag=%s", - DescribeFlags(b128, 128, kInput, ARRAYLEN(kInput), "", tio->c_iflag)); + _DescribeFlags(b128, 128, kInput, ARRAYLEN(kInput), "", tio->c_iflag)); struct DescribeFlags kOutput[] = { {OPOST, "OPOST"}, // @@ -83,8 +83,8 @@ const char *(DescribeTermios)(char buf[N], ssize_t rc, {VT1, "VT1"}, // {FF1, "FF1"}, // }; - append(", .c_oflag=%s", DescribeFlags(b128, 128, kOutput, ARRAYLEN(kOutput), - "", tio->c_oflag)); + append(", .c_oflag=%s", _DescribeFlags(b128, 128, kOutput, ARRAYLEN(kOutput), + "", tio->c_oflag)); struct DescribeFlags kControl[] = { {CS8, "CS8"}, // @@ -98,8 +98,8 @@ const char *(DescribeTermios)(char buf[N], ssize_t rc, {CLOCAL, "CLOCAL"}, // {CRTSCTS, "CRTSCTS"}, // }; - append(", .c_cflag=%s", DescribeFlags(b128, 128, kControl, ARRAYLEN(kControl), - "", tio->c_cflag)); + append(", .c_cflag=%s", _DescribeFlags(b128, 128, kControl, + ARRAYLEN(kControl), "", tio->c_cflag)); struct DescribeFlags kLocal[] = { {ISIG, "ISIG"}, // @@ -125,7 +125,7 @@ const char *(DescribeTermios)(char buf[N], ssize_t rc, ".c_cc[VTIME]=%d, " ".c_cc[VINTR]=CTRL(%#c), " ".c_cc[VQUIT]=CTRL(%#c)", - DescribeFlags(b128, 128, kLocal, ARRAYLEN(kLocal), "", tio->c_lflag), + _DescribeFlags(b128, 128, kLocal, ARRAYLEN(kLocal), "", tio->c_lflag), tio->c_cc[VMIN], tio->c_cc[VTIME], CTRL(tio->c_cc[VINTR]), CTRL(tio->c_cc[VQUIT])); diff --git a/libc/intrin/describethreadcreationflags.c b/libc/intrin/describethreadcreationflags.c index a53064a27a3..d77faee1055 100644 --- a/libc/intrin/describethreadcreationflags.c +++ b/libc/intrin/describethreadcreationflags.c @@ -25,7 +25,7 @@ static const struct DescribeFlags kThreadCreationFlags[] = { {kNtStackSizeParamIsAReservation, "kNtStackSizeParamIsAReservation"}, // }; -const char *(DescribeThreadCreateFlags)(char buf[64], uint32_t x) { - return DescribeFlags(buf, 64, kThreadCreationFlags, - ARRAYLEN(kThreadCreationFlags), "", x); +const char *_DescribeThreadCreateFlags(char buf[64], uint32_t x) { + return _DescribeFlags(buf, 64, kThreadCreationFlags, + ARRAYLEN(kThreadCreationFlags), "", x); } diff --git a/libc/intrin/describetimespec.c b/libc/intrin/describetimespec.c index a07f0c9924d..121c7f4798d 100644 --- a/libc/intrin/describetimespec.c +++ b/libc/intrin/describetimespec.c @@ -22,8 +22,7 @@ #include "libc/intrin/kprintf.h" #include "libc/str/str.h" -const char *(DescribeTimespec)(char buf[45], int rc, - const struct timespec *ts) { +const char *_DescribeTimespec(char buf[45], int rc, const struct timespec *ts) { if (rc == -1) return "n/a"; if (!ts) diff --git a/libc/intrin/describetimeval.c b/libc/intrin/describetimeval.c index 896b10c3dfb..10d0abb3d6a 100644 --- a/libc/intrin/describetimeval.c +++ b/libc/intrin/describetimeval.c @@ -21,7 +21,7 @@ #include "libc/intrin/describeflags.h" #include "libc/intrin/kprintf.h" -const char *(DescribeTimeval)(char buf[45], int rc, const struct timeval *tv) { +const char *_DescribeTimeval(char buf[45], int rc, const struct timeval *tv) { if (!tv) return "NULL"; if (rc == -1) diff --git a/libc/intrin/describevirtualkeycode.c b/libc/intrin/describevirtualkeycode.c index 4131b31f3b2..8655ca08147 100644 --- a/libc/intrin/describevirtualkeycode.c +++ b/libc/intrin/describevirtualkeycode.c @@ -205,7 +205,7 @@ static const struct VirtualKeyCodeName { }; // clang-format on -const char *(DescribeVirtualKeyCode)(char buf[32], uint32_t x) { +const char *_DescribeVirtualKeyCode(char buf[32], uint32_t x) { for (int i = 0; i < ARRAYLEN(kVirtualKeyCodeNames); ++i) { if (x == kVirtualKeyCodeNames[i].code) { return kVirtualKeyCodeNames[i].name; diff --git a/libc/intrin/describewhence.c b/libc/intrin/describewhence.c index 3d166fcbd66..3c0820b7c02 100644 --- a/libc/intrin/describewhence.c +++ b/libc/intrin/describewhence.c @@ -20,7 +20,7 @@ #include "libc/fmt/itoa.h" #include "libc/intrin/describeflags.h" -const char *(DescribeWhence)(char buf[12], int whence) { +const char *_DescribeWhence(char buf[12], int whence) { if (whence == SEEK_SET) return "SEEK_SET"; if (whence == SEEK_CUR) diff --git a/libc/intrin/describewhichprio.c b/libc/intrin/describewhichprio.c index c72bf5ecab6..121e026f92d 100644 --- a/libc/intrin/describewhichprio.c +++ b/libc/intrin/describewhichprio.c @@ -20,7 +20,7 @@ #include "libc/intrin/describeflags.h" #include "libc/sysv/consts/prio.h" -const char *(DescribeWhichPrio)(char buf[12], int x) { +const char *_DescribeWhichPrio(char buf[12], int x) { if (x == PRIO_PROCESS) return "PRIO_PROCESS"; if (x == PRIO_PGRP) diff --git a/libc/intrin/describewinsize.c b/libc/intrin/describewinsize.c index de671b7ead0..a84c15907bf 100644 --- a/libc/intrin/describewinsize.c +++ b/libc/intrin/describewinsize.c @@ -28,7 +28,7 @@ #define append(...) o += ksnprintf(buf + o, N - o, __VA_ARGS__) -const char *(DescribeWinsize)(char buf[N], int rc, const struct winsize *ws) { +const char *_DescribeWinsize(char buf[N], int rc, const struct winsize *ws) { int o = 0; if (!ws) return "NULL"; diff --git a/libc/intrin/mmap.c b/libc/intrin/mmap.c index 4a1c02486ad..f1028736994 100644 --- a/libc/intrin/mmap.c +++ b/libc/intrin/mmap.c @@ -59,7 +59,7 @@ char bt[160]; \ struct StackFrame *bp = __builtin_frame_address(0); \ kprintf("%!s:%d: assertion failed: %!s\n", __FILE__, __LINE__, #x); \ - kprintf("bt %!s\n", (DescribeBacktrace)(bt, bp)); \ + kprintf("bt %!s\n", _DescribeBacktrace(bt, bp)); \ __print_maps(0); \ __builtin_trap(); \ } \ diff --git a/libc/intrin/printmaps.c b/libc/intrin/printmaps.c index 48a84127d39..0747a50dc07 100644 --- a/libc/intrin/printmaps.c +++ b/libc/intrin/printmaps.c @@ -35,7 +35,7 @@ void __print_maps(size_t limit) { for (struct Tree *e = tree_first(__maps.maps); e; e = tree_next(e)) { struct Map *map = MAP_TREE_CONTAINER(e); kprintf("%012lx-%012lx %!s", map->addr, map->addr + map->size, - (DescribeMapping)(mappingbuf, map->prot, map->flags)); + _DescribeMapping(mappingbuf, map->prot, map->flags)); sizefmt(sb, map->size, 1024); kprintf(" %!sb", sb); if (map->hand && map->hand != -1) diff --git a/libc/log/printwindowsmemory.c b/libc/log/printwindowsmemory.c index a305aae675e..9353b00eea8 100644 --- a/libc/log/printwindowsmemory.c +++ b/libc/log/printwindowsmemory.c @@ -33,8 +33,8 @@ static const struct DescribeFlags kNtMemState[] = { }; static const char *DescribeNtMemState(char buf[64], uint32_t x) { - return DescribeFlags(buf, 64, kNtMemState, ARRAYLEN(kNtMemState), "kNtMem", - x); + return _DescribeFlags(buf, 64, kNtMemState, ARRAYLEN(kNtMemState), "kNtMem", + x); } static const struct DescribeFlags kNtMemType[] = { @@ -44,7 +44,7 @@ static const struct DescribeFlags kNtMemType[] = { }; static const char *DescribeNtMemType(char buf[64], uint32_t x) { - return DescribeFlags(buf, 64, kNtMemType, ARRAYLEN(kNtMemType), "kNtMem", x); + return _DescribeFlags(buf, 64, kNtMemType, ARRAYLEN(kNtMemType), "kNtMem", x); } /** @@ -77,7 +77,7 @@ void PrintWindowsMemory(const char *high, size_t size) { mi.AllocationBase, mi.BaseAddress, b[0], DescribeNtMemState(b[1], mi.State), DescribeNtMemType(b[2], mi.Type), - (DescribeNtPageFlags)(b[3], mi.AllocationProtect), - (DescribeNtPageFlags)(b[4], mi.Protect), stop); + _DescribeNtPageFlags(b[3], mi.AllocationProtect), + _DescribeNtPageFlags(b[4], mi.Protect), stop); } } diff --git a/libc/proc/posix_spawn.c b/libc/proc/posix_spawn.c index 467c791beec..e0f13f5a5be 100644 --- a/libc/proc/posix_spawn.c +++ b/libc/proc/posix_spawn.c @@ -302,30 +302,30 @@ static textwindows errno_t posix_spawn_nt_impl( case _POSIX_SPAWN_CLOSE: err = spawnfds_close(&fds, a->fildes); STRACE("spawnfds_close(%d) → %s", a->fildes, - (DescribeErrno)(errno_buf, err)); + _DescribeErrno(errno_buf, err)); break; case _POSIX_SPAWN_DUP2: err = spawnfds_dup2(&fds, a->fildes, a->newfildes); STRACE("spawnfds_dup2(%d, %d) → %s", a->fildes, a->newfildes, - (DescribeErrno)(errno_buf, err)); + _DescribeErrno(errno_buf, err)); break; case _POSIX_SPAWN_OPEN: err = spawnfds_open(&fds, dirhand, a->path, a->oflag, a->mode, a->fildes); STRACE("spawnfds_open(%#s, %s, %s, %d) → %s", a->path, - (DescribeOpenFlags)(oflags_buf, a->oflag), - (DescribeOpenMode)(openmode_buf, a->oflag, a->mode), a->fildes, - (DescribeErrno)(errno_buf, err)); + _DescribeOpenFlags(oflags_buf, a->oflag), + _DescribeOpenMode(openmode_buf, a->oflag, a->mode), a->fildes, + _DescribeErrno(errno_buf, err)); break; case _POSIX_SPAWN_CHDIR: err = spawnfds_chdir(&fds, dirhand, a->path, &dirhand); STRACE("spawnfds_chdir(%#s) → %s", a->path, - (DescribeErrno)(errno_buf, err)); + _DescribeErrno(errno_buf, err)); break; case _POSIX_SPAWN_FCHDIR: err = spawnfds_fchdir(&fds, a->fildes, &dirhand); STRACE("spawnfds_fchdir(%d) → %s", a->fildes, - (DescribeErrno)(errno_buf, err)); + _DescribeErrno(errno_buf, err)); break; default: __builtin_unreachable(); diff --git a/libc/sock/select.internal.h b/libc/sock/select.internal.h index d565635a6dd..5de28441a29 100644 --- a/libc/sock/select.internal.h +++ b/libc/sock/select.internal.h @@ -4,8 +4,8 @@ #include "libc/sock/select.h" COSMOPOLITAN_C_START_ -const char *DescribeFdSet(char[100], ssize_t, int, fd_set *) libcesque; -#define DescribeFdSet(x, y, z) DescribeFdSet(alloca(100), x, y, z) +const char *_DescribeFdSet(char[100], ssize_t, int, fd_set *) libcesque; +#define DescribeFdSet(x, y, z) _DescribeFdSet(alloca(100), x, y, z) COSMOPOLITAN_C_END_ #endif /* COSMOPOLITAN_LIBC_SOCK_SELECT_INTERNAL_H_ */ diff --git a/libc/sock/sockdebug.c b/libc/sock/sockdebug.c index d26bc3a4b82..cb2631e04d3 100644 --- a/libc/sock/sockdebug.c +++ b/libc/sock/sockdebug.c @@ -28,8 +28,8 @@ #include "libc/sysv/consts/ipproto.h" #include "libc/sysv/consts/sock.h" -const char *(DescribeSockaddr)(char buf[128], const struct sockaddr *sa, - size_t sasize) { +const char *_DescribeSockaddr(char buf[128], const struct sockaddr *sa, + size_t sasize) { int e; size_t n; char *p, ip[72]; diff --git a/libc/sock/struct/pollfd.internal.h b/libc/sock/struct/pollfd.internal.h index 70b452258c2..0594fa57cae 100644 --- a/libc/sock/struct/pollfd.internal.h +++ b/libc/sock/struct/pollfd.internal.h @@ -13,8 +13,8 @@ int sys_ppoll(struct pollfd *, size_t, const struct timespec *, int sys_poll_metal(struct pollfd *, size_t, unsigned); int sys_poll_nt(struct pollfd *, uint64_t, uint32_t *, const sigset_t *); -const char *DescribePollFds(char[300], ssize_t, struct pollfd *, size_t); -#define DescribePollFds(x, y, z) DescribePollFds(alloca(300), x, y, z) +const char *_DescribePollFds(char[300], ssize_t, struct pollfd *, size_t); +#define DescribePollFds(x, y, z) _DescribePollFds(alloca(300), x, y, z) COSMOPOLITAN_C_END_ #endif /* COSMOPOLITAN_LIBC_SOCK_STRUCT_POLLFD_INTERNAL_H_ */ diff --git a/libc/sock/struct/sockaddr.internal.h b/libc/sock/struct/sockaddr.internal.h index 59d996d4ab7..724478d2ce9 100644 --- a/libc/sock/struct/sockaddr.internal.h +++ b/libc/sock/struct/sockaddr.internal.h @@ -40,8 +40,8 @@ union sockaddr_storage_linux { struct sockaddr_un sun; }; -const char *DescribeSockaddr(char[128], const struct sockaddr *, size_t); -#define DescribeSockaddr(sa, sz) DescribeSockaddr(alloca(128), sa, sz) +const char *_DescribeSockaddr(char[128], const struct sockaddr *, size_t); +#define DescribeSockaddr(sa, sz) _DescribeSockaddr(alloca(128), sa, sz) void __convert_bsd_to_sockaddr(struct sockaddr_storage *); void __convert_sockaddr_to_bsd(struct sockaddr_storage *); diff --git a/libc/stdio/printargs.c b/libc/stdio/printargs.c index 16226c8c28a..b2100812808 100644 --- a/libc/stdio/printargs.c +++ b/libc/stdio/printargs.c @@ -306,7 +306,7 @@ textstartup void __printargs(const char *prologue) { if (i && (u.pfds[i].revents & POLLNVAL)) continue; PRINT(" ☼ %d (revents=%#hx fcntl(F_GETFL)=%s isatty()=%hhhd)", i, - u.pfds[i].revents, (DescribeOpenFlags)(oflagbuf, fcntl(i, F_GETFL)), + u.pfds[i].revents, _DescribeOpenFlags(oflagbuf, fcntl(i, F_GETFL)), isatty(i)); } } else { @@ -375,7 +375,7 @@ textstartup void __printargs(const char *prologue) { rlim.rlim_cur = -1; if (rlim.rlim_max == RLIM_INFINITY) rlim.rlim_max = -1; - PRINT(" ☼ %-20s %,16ld %,16ld", (DescribeRlimitName)(buf, i), + PRINT(" ☼ %-20s %,16ld %,16ld", _DescribeRlimitName(buf, i), rlim.rlim_cur, rlim.rlim_max); gotsome = true; } diff --git a/test/libc/calls/sigprocmask_test.c b/test/libc/calls/sigprocmask_test.c index e794b2b3cfa..5d378bb6b84 100644 --- a/test/libc/calls/sigprocmask_test.c +++ b/test/libc/calls/sigprocmask_test.c @@ -45,7 +45,7 @@ const char *DescribeMask(void) { sigset_t ss; _Thread_local static char buf[128]; unassert(!sigprocmask(SIG_SETMASK, 0, &ss)); - return (DescribeSigset)(buf, 0, &ss); + return _DescribeSigset(buf, 0, &ss); } TEST(sigprocmask, testMultipleBlockedDeliveries) { diff --git a/test/libc/intrin/describeflags_test.c b/test/libc/intrin/describeflags_test.c index 65be2c1e790..a805f560511 100644 --- a/test/libc/intrin/describeflags_test.c +++ b/test/libc/intrin/describeflags_test.c @@ -27,7 +27,7 @@ static const struct DescribeFlags kFlags[] = { const char *DescribeIt(uint32_t x) { static char s[64]; - return DescribeFlags(s, ARRAYLEN(s), kFlags, ARRAYLEN(kFlags), "x", x); + return _DescribeFlags(s, ARRAYLEN(s), kFlags, ARRAYLEN(kFlags), "x", x); } TEST(describeflags, test) { diff --git a/tool/viz/rlimit.c b/tool/viz/rlimit.c index 1e4296b26d6..6923626ec07 100644 --- a/tool/viz/rlimit.c +++ b/tool/viz/rlimit.c @@ -67,7 +67,7 @@ int main(int argc, char *argv[]) { for (i = 0; i < RLIM_NLIMITS; ++i) { rc = getrlimit(i, &rlim); printf("SETRLIMIT(%-20s, %,16ld, %,16ld) → %d %s\n", - (DescribeRlimitName)(rlnbuf, i), rlim.rlim_cur, rlim.rlim_max, rc, + _DescribeRlimitName(rlnbuf, i), rlim.rlim_cur, rlim.rlim_max, rc, !rc ? "" : strerror(errno)); } diff --git a/tool/viz/virtualquery.c b/tool/viz/virtualquery.c index 27e0fc9e0bf..92558fa606a 100644 --- a/tool/viz/virtualquery.c +++ b/tool/viz/virtualquery.c @@ -40,8 +40,8 @@ static const struct DescribeFlags kNtMemState[] = { }; const char *DescribeNtMemState(char buf[64], uint32_t x) { - return DescribeFlags(buf, 64, kNtMemState, ARRAYLEN(kNtMemState), "kNtMem", - x); + return _DescribeFlags(buf, 64, kNtMemState, ARRAYLEN(kNtMemState), "kNtMem", + x); } static const struct DescribeFlags kNtMemType[] = { @@ -51,7 +51,7 @@ static const struct DescribeFlags kNtMemType[] = { }; const char *DescribeNtMemType(char buf[64], uint32_t x) { - return DescribeFlags(buf, 64, kNtMemType, ARRAYLEN(kNtMemType), "kNtMem", x); + return _DescribeFlags(buf, 64, kNtMemType, ARRAYLEN(kNtMemType), "kNtMem", x); } int main(int argc, char *argv[]) { @@ -72,8 +72,8 @@ int main(int argc, char *argv[]) { printf("%.12lx %.12lx %10s %16s %16s %32s %32s\n", mi.AllocationBase, mi.BaseAddress, b[0], DescribeNtMemState(b[1], mi.State), DescribeNtMemType(b[2], mi.Type), - (DescribeNtPageFlags)(b[3], mi.AllocationProtect), - (DescribeNtPageFlags)(b[4], mi.Protect)); + _DescribeNtPageFlags(b[3], mi.AllocationProtect), + _DescribeNtPageFlags(b[4], mi.Protect)); } }