mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-28 15:28:30 +00:00
Reduce header complexity
- Remove most __ASSEMBLER__ __LINKER__ ifdefs - Rename libc/intrin/bits.h to libc/serialize.h - Block pthread cancelation in fchmodat() polyfill - Remove `clang-format off` statements in third_party
This commit is contained in:
parent
96f979dfc5
commit
fa20edc44d
3057 changed files with 410 additions and 4398 deletions
|
@ -1,10 +1,8 @@
|
|||
#ifndef COSMOPOLITAN_TOOL_ARGS_ARGS_H_
|
||||
#define COSMOPOLITAN_TOOL_ARGS_ARGS_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
int LoadZipArgs(int *, char ***);
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_TOOL_ARGS_ARGS_H_ */
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
#include "libc/elf/struct/phdr.h"
|
||||
#include "libc/fmt/conv.h"
|
||||
#include "libc/fmt/itoa.h"
|
||||
#include "libc/intrin/bits.h"
|
||||
#include "libc/serialize.h"
|
||||
#include "libc/limits.h"
|
||||
#include "libc/macho.internal.h"
|
||||
#include "libc/macros.internal.h"
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
#include "libc/fmt/itoa.h"
|
||||
#include "libc/fmt/libgen.h"
|
||||
#include "libc/fmt/magnumstrs.internal.h"
|
||||
#include "libc/intrin/bits.h"
|
||||
#include "libc/serialize.h"
|
||||
#include "libc/intrin/bsr.h"
|
||||
#include "libc/limits.h"
|
||||
#include "libc/macros.internal.h"
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#include "libc/elf/struct/ehdr.h"
|
||||
#include "libc/errno.h"
|
||||
#include "libc/fmt/conv.h"
|
||||
#include "libc/intrin/bits.h"
|
||||
#include "libc/serialize.h"
|
||||
#include "libc/limits.h"
|
||||
#include "libc/macho.internal.h"
|
||||
#include "libc/macros.internal.h"
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
#include "libc/fmt/itoa.h"
|
||||
#include "libc/fmt/libgen.h"
|
||||
#include "libc/fmt/magnumstrs.internal.h"
|
||||
#include "libc/intrin/bits.h"
|
||||
#include "libc/serialize.h"
|
||||
#include "libc/intrin/safemacros.internal.h"
|
||||
#include "libc/limits.h"
|
||||
#include "libc/log/appendresourcereport.internal.h"
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#include "libc/elf/struct/shdr.h"
|
||||
#include "libc/fmt/conv.h"
|
||||
#include "libc/fmt/itoa.h"
|
||||
#include "libc/intrin/bits.h"
|
||||
#include "libc/serialize.h"
|
||||
#include "libc/intrin/describeflags.internal.h"
|
||||
#include "libc/intrin/dll.h"
|
||||
#include "libc/limits.h"
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
#include "libc/errno.h"
|
||||
#include "libc/fmt/itoa.h"
|
||||
#include "libc/fmt/magnumstrs.internal.h"
|
||||
#include "libc/intrin/bits.h"
|
||||
#include "libc/serialize.h"
|
||||
#include "libc/limits.h"
|
||||
#include "libc/log/log.h"
|
||||
#include "libc/macros.internal.h"
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
#ifndef COSMOPOLITAN_TOOL_BUILD_LIB_ASMDOWN_H_
|
||||
#define COSMOPOLITAN_TOOL_BUILD_LIB_ASMDOWN_H_
|
||||
#include "tool/build/lib/javadown.h"
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
struct Asmdown {
|
||||
|
@ -20,5 +19,4 @@ struct Asmdown *ParseAsmdown(const char *, size_t);
|
|||
void FreeAsmdown(struct Asmdown *);
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_TOOL_BUILD_LIB_ASMDOWN_H_ */
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#ifndef COSMOPOLITAN_TOOL_BUILD_LIB_BUFFER_H_
|
||||
#define COSMOPOLITAN_TOOL_BUILD_LIB_BUFFER_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
struct Buffer {
|
||||
|
@ -16,5 +15,4 @@ int AppendFmt(struct Buffer *, const char *, ...);
|
|||
ssize_t WriteBuffer(struct Buffer *, int);
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_TOOL_BUILD_LIB_BUFFER_H_ */
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#ifndef COSMOPOLITAN_TOOL_BUILD_LIB_CASE_H_
|
||||
#define COSMOPOLITAN_TOOL_BUILD_LIB_CASE_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
#define CASE(OP, CODE) \
|
||||
case OP: \
|
||||
|
@ -12,5 +11,4 @@
|
|||
CODE; \
|
||||
return
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_TOOL_BUILD_LIB_CASE_H_ */
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
#ifndef COSMOPOLITAN_TOOL_BUILD_LIB_DEMANGLE_H_
|
||||
#define COSMOPOLITAN_TOOL_BUILD_LIB_DEMANGLE_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
char *Demangle(char *, const char *, size_t);
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_TOOL_BUILD_LIB_DEMANGLE_H_ */
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
#include "libc/elf/struct/shdr.h"
|
||||
#include "libc/elf/struct/sym.h"
|
||||
#include "tool/build/lib/interner.h"
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
struct ElfWriterSyms {
|
||||
|
@ -77,5 +76,4 @@ void elfwriter_zip(struct ElfWriter *, const char *, const char *, size_t,
|
|||
struct timespec, struct timespec, bool);
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_TOOL_BUILD_LIB_ELFWRITER_H_ */
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
#include "libc/dos.internal.h"
|
||||
#include "libc/elf/def.h"
|
||||
#include "libc/fmt/wintime.internal.h"
|
||||
#include "libc/serialize.h"
|
||||
#include "libc/limits.h"
|
||||
#include "libc/log/check.h"
|
||||
#include "libc/mem/gc.h"
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
#include "third_party/mbedtls/ctr_drbg.h"
|
||||
#include "third_party/mbedtls/ssl.h"
|
||||
#include "third_party/mbedtls/x509_crt.h"
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
struct EzTlsBio {
|
||||
|
@ -41,5 +40,4 @@ forceinline void SetupPresharedKeySsl(int endpoint, char psk[32]) {
|
|||
}
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_TOOL_BUILD_LIB_EZTLS_H_ */
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#ifndef COSMOPOLITAN_TOOL_BUILD_LIB_GETARGS_H_
|
||||
#define COSMOPOLITAN_TOOL_BUILD_LIB_GETARGS_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
struct GetArgs {
|
||||
|
@ -16,5 +15,4 @@ const char *getargs_next(struct GetArgs *);
|
|||
void getargs_destroy(struct GetArgs *);
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_TOOL_BUILD_LIB_GETARGS_H_ */
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#ifndef COSMOPOLITAN_TOOL_BUILD_LIB_INTERNER_H_
|
||||
#define COSMOPOLITAN_TOOL_BUILD_LIB_INTERNER_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
struct Interner {
|
||||
|
@ -17,5 +16,4 @@ size_t intern(struct Interner *, const char *) paramsnonnull();
|
|||
bool isinterned(struct Interner *, const char *) paramsnonnull();
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_TOOL_BUILD_LIB_INTERNER_H_ */
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#ifndef COSMOPOLITAN_TOOL_BUILD_LIB_JAVADOWN_H_
|
||||
#define COSMOPOLITAN_TOOL_BUILD_LIB_JAVADOWN_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
struct JavadownTag {
|
||||
|
@ -24,5 +23,4 @@ struct Javadown *ParseJavadown(const char *, size_t);
|
|||
void FreeJavadown(struct Javadown *);
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_TOOL_BUILD_LIB_JAVADOWN_H_ */
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
#ifndef COSMOPOLITAN_TOOL_BUILD_LIB_LIB_H_
|
||||
#define COSMOPOLITAN_TOOL_BUILD_LIB_LIB_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
bool ParseSupportVector(char *, int *);
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_TOOL_BUILD_LIB_LIB_H_ */
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
#ifndef COSMOPOLITAN_TOOL_BUILD_LIB_PANEL_H_
|
||||
#define COSMOPOLITAN_TOOL_BUILD_LIB_PANEL_H_
|
||||
#include "tool/build/lib/buffer.h"
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
struct Panel {
|
||||
|
@ -17,5 +16,4 @@ ssize_t PrintPanels(int, long, struct Panel *, long, long);
|
|||
void PrintMessageBox(int, const char *, long, long);
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_TOOL_BUILD_LIB_PANEL_H_ */
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
#ifndef COSMOPOLITAN_TOOL_BUILD_LIB_PSK_H_
|
||||
#define COSMOPOLITAN_TOOL_BUILD_LIB_PSK_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
void *GetRunitPsk(void);
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_TOOL_BUILD_LIB_PSK_H_ */
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
#ifndef COSMOPOLITAN_TOOL_BUILD_LIB_STRIPCOMPONENTS_H_
|
||||
#define COSMOPOLITAN_TOOL_BUILD_LIB_STRIPCOMPONENTS_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
char *StripComponents(const char *, int);
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_TOOL_BUILD_LIB_STRIPCOMPONENTS_H_ */
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
#include "libc/errno.h"
|
||||
#include "libc/fmt/libgen.h"
|
||||
#include "libc/fmt/magnumstrs.internal.h"
|
||||
#include "libc/intrin/bits.h"
|
||||
#include "libc/serialize.h"
|
||||
#include "libc/intrin/kprintf.h"
|
||||
#include "libc/limits.h"
|
||||
#include "libc/macros.internal.h"
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/calls/calls.h"
|
||||
#include "libc/intrin/bits.h"
|
||||
#include "libc/serialize.h"
|
||||
#include "libc/limits.h"
|
||||
#include "libc/nt/struct/imageimportbyname.internal.h"
|
||||
#include "libc/nt/struct/imageimportdescriptor.internal.h"
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
#include "libc/errno.h"
|
||||
#include "libc/fmt/conv.h"
|
||||
#include "libc/fmt/itoa.h"
|
||||
#include "libc/intrin/bits.h"
|
||||
#include "libc/serialize.h"
|
||||
#include "libc/intrin/kprintf.h"
|
||||
#include "libc/intrin/promises.internal.h"
|
||||
#include "libc/intrin/safemacros.internal.h"
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#include "libc/dns/dns.h"
|
||||
#include "libc/errno.h"
|
||||
#include "libc/fmt/libgen.h"
|
||||
#include "libc/intrin/bits.h"
|
||||
#include "libc/serialize.h"
|
||||
#include "libc/intrin/kprintf.h"
|
||||
#include "libc/intrin/safemacros.internal.h"
|
||||
#include "libc/limits.h"
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
#include "libc/fmt/conv.h"
|
||||
#include "libc/fmt/itoa.h"
|
||||
#include "libc/fmt/libgen.h"
|
||||
#include "libc/intrin/bits.h"
|
||||
#include "libc/serialize.h"
|
||||
#include "libc/intrin/kprintf.h"
|
||||
#include "libc/log/appendresourcereport.internal.h"
|
||||
#include "libc/log/check.h"
|
||||
|
|
|
@ -23,9 +23,11 @@
|
|||
#include "libc/elf/struct/shdr.h"
|
||||
#include "libc/errno.h"
|
||||
#include "libc/fmt/magnumstrs.internal.h"
|
||||
#include "libc/serialize.h"
|
||||
#include "libc/limits.h"
|
||||
#include "libc/runtime/runtime.h"
|
||||
#include "libc/stdio/stdio.h"
|
||||
#include "libc/stdio/sysparam.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "libc/sysv/consts/map.h"
|
||||
#include "libc/sysv/consts/o.h"
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
#include "libc/mem/gc.internal.h"
|
||||
#include "libc/runtime/runtime.h"
|
||||
#include "libc/stdio/stdio.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "libc/sysv/consts/clock.h"
|
||||
#include "libc/sysv/consts/ex.h"
|
||||
#include "libc/sysv/consts/exit.h"
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
#ifndef COSMOPOLITAN_TOOL_CURL_CMD_H_
|
||||
#define COSMOPOLITAN_TOOL_CURL_CMD_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
int _curl(int, char *[]);
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_TOOL_CURL_CMD_H_ */
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
#include "libc/calls/calls.h"
|
||||
#include "libc/calls/struct/stat.h"
|
||||
#include "libc/fmt/conv.h"
|
||||
#include "libc/intrin/bits.h"
|
||||
#include "libc/serialize.h"
|
||||
#include "libc/log/check.h"
|
||||
#include "libc/log/log.h"
|
||||
#include "libc/mem/mem.h"
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#include "libc/errno.h"
|
||||
#include "libc/fmt/conv.h"
|
||||
#include "libc/fmt/libgen.h"
|
||||
#include "libc/intrin/bits.h"
|
||||
#include "libc/serialize.h"
|
||||
#include "libc/intrin/safemacros.internal.h"
|
||||
#include "libc/log/check.h"
|
||||
#include "libc/log/log.h"
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
#define COSMOPOLITAN_TOOL_DECODE_LIB_ASMCODEGEN_H_
|
||||
#include "libc/stdio/stdio.h"
|
||||
#include "tool/decode/lib/idname.h"
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
#define COLUMN_WIDTH 24
|
||||
|
@ -24,5 +23,4 @@ char *tabpad(const char *s, unsigned width) __wur;
|
|||
void show(const char *directive, const char *value, const char *comment);
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_TOOL_DECODE_LIB_ASMCODEGEN_H_ */
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "tool/decode/lib/bitabuilder.h"
|
||||
#include "libc/assert.h"
|
||||
#include "libc/intrin/bits.h"
|
||||
#include "libc/limits.h"
|
||||
#include "libc/log/check.h"
|
||||
#include "libc/macros.internal.h"
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#ifndef COSMOPOLITAN_TOOL_DECODE_LIB_BITABUILDER_H_
|
||||
#define COSMOPOLITAN_TOOL_DECODE_LIB_BITABUILDER_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
struct FILE;
|
||||
|
@ -11,5 +10,4 @@ bool bitabuilder_fwrite(const struct BitaBuilder *, struct FILE *);
|
|||
void bitabuilder_free(struct BitaBuilder **);
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_TOOL_DECODE_LIB_BITABUILDER_H_ */
|
||||
|
|
|
@ -3,11 +3,9 @@
|
|||
|
||||
#define kDisassembleHexColumns 8
|
||||
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
void disassemblehex(uint8_t *data, size_t size, FILE *f);
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_TOOL_DECODE_LIB_DISASSEMBLEHEX_H_ */
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
#ifndef COSMOPOLITAN_TOOL_DECODE_LIB_ELFIDNAMES_H_
|
||||
#define COSMOPOLITAN_TOOL_DECODE_LIB_ELFIDNAMES_H_
|
||||
#include "tool/decode/lib/idname.h"
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
extern const struct IdName kElfTypeNames[];
|
||||
|
@ -20,5 +19,4 @@ extern const struct IdName kElfSpecialSectionNames[];
|
|||
extern const struct IdName kElfNexgen32eRelocationNames[];
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_TOOL_DECODE_LIB_ELFIDNAMES_H_ */
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
#ifndef COSMOPOLITAN_TOOL_DECODE_LIB_FLAGGER_H_
|
||||
#define COSMOPOLITAN_TOOL_DECODE_LIB_FLAGGER_H_
|
||||
#include "tool/decode/lib/idname.h"
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
char *RecreateFlags(const struct IdName *, unsigned long) __wur;
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_TOOL_DECODE_LIB_FLAGGER_H_ */
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#ifndef COSMOPOLITAN_TOOL_DECODE_LIB_IDNAME_H_
|
||||
#define COSMOPOLITAN_TOOL_DECODE_LIB_IDNAME_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
struct IdName {
|
||||
|
@ -11,5 +10,4 @@ struct IdName {
|
|||
const char *findnamebyid(const struct IdName *names, unsigned long id);
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_TOOL_DECODE_LIB_IDNAME_H_ */
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
#ifndef COSMOPOLITAN_TOOL_DECODE_LIB_MACHOIDNAMES_H_
|
||||
#define COSMOPOLITAN_TOOL_DECODE_LIB_MACHOIDNAMES_H_
|
||||
#include "tool/decode/lib/idname.h"
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
extern const struct IdName kMachoArchitectures[];
|
||||
|
@ -14,5 +13,4 @@ extern const struct IdName kMachoLoadCommandNames[];
|
|||
extern const struct IdName kMachoVmProtNames[];
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_TOOL_DECODE_LIB_MACHOIDNAMES_H_ */
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
#ifndef COSMOPOLITAN_TOOL_DECODE_LIB_NTFILEFLAGNAMES_H_
|
||||
#define COSMOPOLITAN_TOOL_DECODE_LIB_NTFILEFLAGNAMES_H_
|
||||
#include "tool/decode/lib/idname.h"
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
extern const struct IdName kNtFileFlagNames[];
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_TOOL_DECODE_LIB_NTFILEFLAGNAMES_H_ */
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
#ifndef COSMOPOLITAN_TOOL_DECODE_LIB_PEIDNAMES_H_
|
||||
#define COSMOPOLITAN_TOOL_DECODE_LIB_PEIDNAMES_H_
|
||||
#include "tool/decode/lib/idname.h"
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
extern const struct IdName kNtImageFileMachineNames[];
|
||||
|
@ -14,5 +13,4 @@ extern const struct IdName kNtImageDirectoryEntryNames[];
|
|||
extern const struct IdName kNtPeSectionNames[];
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_TOOL_DECODE_LIB_PEIDNAMES_H_ */
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
#ifndef COSMOPOLITAN_TOOL_DECODE_LIB_SOCKNAMES_H_
|
||||
#define COSMOPOLITAN_TOOL_DECODE_LIB_SOCKNAMES_H_
|
||||
#include "tool/decode/lib/idname.h"
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
extern const struct IdName kAddressFamilyNames[];
|
||||
|
@ -10,5 +9,4 @@ extern const struct IdName kAddrInfoFlagNames[];
|
|||
extern const struct IdName kProtocolNames[];
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_TOOL_DECODE_LIB_SOCKNAMES_H_ */
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#ifndef COSMOPOLITAN_TOOL_DECODE_LIB_TITLEGEN_H_
|
||||
#define COSMOPOLITAN_TOOL_DECODE_LIB_TITLEGEN_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
struct Modeline {
|
||||
|
@ -14,5 +13,4 @@ void showtitle(const char *brand, const char *tool, const char *title,
|
|||
const char *description, const struct Modeline *modeline);
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_TOOL_DECODE_LIB_TITLEGEN_H_ */
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
#ifndef COSMOPOLITAN_TOOL_DECODE_LIB_X86IDNAMES_H_
|
||||
#define COSMOPOLITAN_TOOL_DECODE_LIB_X86IDNAMES_H_
|
||||
#include "tool/decode/lib/idname.h"
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
extern const struct IdName kX86MarchNames[];
|
||||
extern const struct IdName kX86GradeNames[];
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_TOOL_DECODE_LIB_X86IDNAMES_H_ */
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
#ifndef COSMOPOLITAN_TOOL_DECODE_LIB_XEDERRORS_H_
|
||||
#define COSMOPOLITAN_TOOL_DECODE_LIB_XEDERRORS_H_
|
||||
#include "tool/decode/lib/idname.h"
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
extern const struct IdName kXedErrorIdNames[];
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_TOOL_DECODE_LIB_XEDERRORS_H_ */
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
#ifndef COSMOPOLITAN_TOOL_DECODE_LIB_ZIPNAMES_H_
|
||||
#define COSMOPOLITAN_TOOL_DECODE_LIB_ZIPNAMES_H_
|
||||
#include "tool/decode/lib/idname.h"
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
extern const struct IdName kZipCompressionNames[];
|
||||
|
@ -11,5 +10,4 @@ extern const struct IdName kZipOsNames[];
|
|||
extern const struct IdName kZipEraNames[];
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_TOOL_DECODE_LIB_ZIPNAMES_H_ */
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#include "libc/calls/struct/stat.h"
|
||||
#include "libc/fmt/conv.h"
|
||||
#include "libc/fmt/libgen.h"
|
||||
#include "libc/intrin/bits.h"
|
||||
#include "libc/serialize.h"
|
||||
#include "libc/intrin/safemacros.internal.h"
|
||||
#include "libc/mem/gc.h"
|
||||
#include "libc/mem/gc.internal.h"
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/errno.h"
|
||||
#include "libc/intrin/bits.h"
|
||||
#include "libc/macros.internal.h"
|
||||
#include "libc/runtime/runtime.h"
|
||||
#include "libc/stdio/stdio.h"
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#include "libc/calls/struct/stat.h"
|
||||
#include "libc/fmt/libgen.h"
|
||||
#include "libc/fmt/wintime.internal.h"
|
||||
#include "libc/intrin/bits.h"
|
||||
#include "libc/serialize.h"
|
||||
#include "libc/intrin/kprintf.h"
|
||||
#include "libc/intrin/safemacros.internal.h"
|
||||
#include "libc/log/check.h"
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
#ifndef COSMOPOLITAN_TOOL_LAMBDA_LIB_BLC_H_
|
||||
#define COSMOPOLITAN_TOOL_LAMBDA_LIB_BLC_H_
|
||||
#include "libc/stdio/stdio.h"
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
#define BUILTINS 4
|
||||
|
@ -61,5 +60,4 @@ void PrintVar(int, FILE *);
|
|||
void *Calloc(size_t, size_t);
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_TOOL_LAMBDA_LIB_BLC_H_ */
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
#ifndef COSMOPOLITAN_TOOL_NET_LFINGER_H_
|
||||
#define COSMOPOLITAN_TOOL_NET_LFINGER_H_
|
||||
#include "third_party/lua/lauxlib.h"
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
int LuaFinger(lua_State *);
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_TOOL_NET_LFINGER_H_ */
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#include "libc/errno.h"
|
||||
#include "libc/fmt/itoa.h"
|
||||
#include "libc/fmt/leb128.h"
|
||||
#include "libc/intrin/bits.h"
|
||||
#include "libc/serialize.h"
|
||||
#include "libc/intrin/bsf.h"
|
||||
#include "libc/intrin/bsr.h"
|
||||
#include "libc/intrin/popcnt.h"
|
||||
|
@ -606,16 +606,16 @@ int LuaEncodeLatin1(lua_State *L) {
|
|||
}
|
||||
|
||||
dontinline int LuaBase32Impl(lua_State *L,
|
||||
char *B32(const char *, size_t, const char *, size_t, size_t *)) {
|
||||
char *B32(const char *, size_t, const char *,
|
||||
size_t, size_t *)) {
|
||||
char *p;
|
||||
size_t sl, al; // source/output and alphabet lengths
|
||||
size_t sl, al; // source/output and alphabet lengths
|
||||
const char *s = luaL_checklstring(L, 1, &sl);
|
||||
// use an empty string, as EncodeBase32 provides a default value
|
||||
const char *a = luaL_optlstring(L, 2, "", &al);
|
||||
if (!IS2POW(al) || al > 128 || al == 1)
|
||||
return luaL_error(L, "alphabet length is not a power of 2 in range 2..128");
|
||||
if (!(p = B32(s, sl, a, al, &sl)))
|
||||
return luaL_error(L, "out of memory");
|
||||
if (!(p = B32(s, sl, a, al, &sl))) return luaL_error(L, "out of memory");
|
||||
lua_pushlstring(L, p, sl);
|
||||
free(p);
|
||||
return 1;
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
#define COSMOPOLITAN_TOOL_NET_LFUNCS_H_
|
||||
#include "net/http/url.h"
|
||||
#include "third_party/lua/lua.h"
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
int LuaMaxmind(lua_State *);
|
||||
|
@ -96,5 +95,4 @@ void LuaPushUrlView(lua_State *, struct UrlView *);
|
|||
char *FormatUnixHttpDateTime(char *, int64_t);
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_TOOL_NET_LFUNCS_H_ */
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "tool/net/ljson.h"
|
||||
#include "libc/intrin/bits.h"
|
||||
#include "libc/serialize.h"
|
||||
#include "libc/intrin/likely.h"
|
||||
#include "libc/log/check.h"
|
||||
#include "libc/log/log.h"
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
#ifndef COSMOPOLITAN_TOOL_NET_LJSON_H_
|
||||
#define COSMOPOLITAN_TOOL_NET_LJSON_H_
|
||||
#include "third_party/lua/lauxlib.h"
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
struct DecodeJson {
|
||||
|
@ -12,5 +11,4 @@ struct DecodeJson {
|
|||
struct DecodeJson DecodeJson(struct lua_State *, const char *, size_t);
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_TOOL_NET_LJSON_H_ */
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
#ifndef COSMOPOLITAN_TOOL_NET_LPATH_H_
|
||||
#define COSMOPOLITAN_TOOL_NET_LPATH_H_
|
||||
#include "third_party/lua/lauxlib.h"
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
int LuaPath(lua_State *);
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_TOOL_NET_LPATH_H_ */
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
#include "libc/mem/mem.h"
|
||||
#include "third_party/lua/cosmo.h"
|
||||
#include "third_party/lua/lua.h"
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
#define AssertLuaStackIsAt(L, level) \
|
||||
|
@ -19,5 +18,4 @@ COSMOPOLITAN_C_START_
|
|||
} while (0)
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_TOOL_NET_LUACHECK_H_ */
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
#include "libc/fmt/itoa.h"
|
||||
#include "libc/fmt/wintime.internal.h"
|
||||
#include "libc/intrin/atomic.h"
|
||||
#include "libc/intrin/bits.h"
|
||||
#include "libc/serialize.h"
|
||||
#include "libc/intrin/bsr.h"
|
||||
#include "libc/intrin/likely.h"
|
||||
#include "libc/intrin/nomultics.internal.h"
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#ifndef COSMOPOLITAN_TOOL_PLINKO_LIB_CHAR_H_
|
||||
#define COSMOPOLITAN_TOOL_PLINKO_LIB_CHAR_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
static inline pureconst bool IsC0(int c) {
|
||||
|
@ -39,5 +38,4 @@ int GetMonospaceCharacterWidth(int) pureconst;
|
|||
bool IsWide(int) pureconst;
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_TOOL_PLINKO_LIB_CHAR_H_ */
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
// not so large that we're drowning in virtual memory pages!
|
||||
#define TERM 0x20000
|
||||
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
#if IsModeDbg()
|
||||
|
@ -34,5 +33,4 @@ COSMOPOLITAN_C_START_
|
|||
#define DWBITS (sizeof(dword) * CHAR_BIT)
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_TOOL_PLINKO_LIB_CONFIG_H_ */
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
#include "tool/plinko/lib/error.h"
|
||||
#include "tool/plinko/lib/plinko.h"
|
||||
#include "tool/plinko/lib/types.h"
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
forceinline void Set(int i, dword t) {
|
||||
|
@ -64,5 +63,4 @@ int ShareCons(int, int);
|
|||
int ShareList(int, int);
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_TOOL_PLINKO_LIB_CONS_H_ */
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#ifndef COSMOPOLITAN_TOOL_PLINKO_LIB_ERROR_H_
|
||||
#define COSMOPOLITAN_TOOL_PLINKO_LIB_ERROR_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
void Raise(int) relegated wontreturn;
|
||||
|
@ -10,5 +9,4 @@ void StackOverflow(void) relegated wontreturn;
|
|||
void React(int, int, int) relegated wontreturn;
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_TOOL_PLINKO_LIB_ERROR_H_ */
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
#ifndef COSMOPOLITAN_TOOL_PLINKO_LIB_GC_H_
|
||||
#define COSMOPOLITAN_TOOL_PLINKO_LIB_GC_H_
|
||||
#include "tool/plinko/lib/types.h"
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
struct Gc {
|
||||
|
@ -30,5 +29,4 @@ forceinline void Mark(struct Gc *G, int x) {
|
|||
}
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_TOOL_PLINKO_LIB_GC_H_ */
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
#define COSMOPOLITAN_TOOL_PLINKO_LIB_HISTO_H_
|
||||
#include "libc/intrin/bsr.h"
|
||||
#include "libc/macros.internal.h"
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
#define HISTO(H, X) \
|
||||
|
@ -16,5 +15,4 @@ void PrintHistogram(int, const char *, const long *, size_t);
|
|||
long GetLongSum(const long *, size_t);
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_TOOL_PLINKO_LIB_HISTO_H_ */
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
#include "tool/plinko/lib/error.h"
|
||||
#include "tool/plinko/lib/plinko.h"
|
||||
#include "tool/plinko/lib/stack.h"
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
forceinline nosideeffect int Head(int x) {
|
||||
|
@ -131,5 +130,4 @@ static inline nosideeffect int Cddddr(int X) {
|
|||
}
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_TOOL_PLINKO_LIB_INDEX_H_ */
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
#ifndef COSMOPOLITAN_TOOL_PLINKO_LIB_KTPENC_H_
|
||||
#define COSMOPOLITAN_TOOL_PLINKO_LIB_KTPENC_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
extern const short kTpEnc[25];
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_TOOL_PLINKO_LIB_KTPENC_H_ */
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
#include "libc/runtime/runtime.h"
|
||||
#include "tool/plinko/lib/config.h"
|
||||
#include "tool/plinko/lib/types.h"
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
#define LO(x) (int)(x)
|
||||
|
@ -333,5 +332,4 @@ static inline int Keep(int x, int y) {
|
|||
}
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_TOOL_PLINKO_LIB_PLINKO_H_ */
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#ifndef COSMOPOLITAN_TOOL_PLINKO_LIB_PRINT_H_
|
||||
#define COSMOPOLITAN_TOOL_PLINKO_LIB_PRINT_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
int Print(int, int);
|
||||
|
@ -27,5 +26,4 @@ void PrintNewline(int);
|
|||
void PrintTree(int, int, int);
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_TOOL_PLINKO_LIB_PRINT_H_ */
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#ifndef COSMOPOLITAN_TOOL_PLINKO_LIB_PRINTF_H_
|
||||
#define COSMOPOLITAN_TOOL_PLINKO_LIB_PRINTF_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
int Printf(const char *, ...);
|
||||
|
@ -10,5 +9,4 @@ int Vfprintf(const char *, va_list, int);
|
|||
int Vfnprintf(const char *, va_list, int, int);
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_TOOL_PLINKO_LIB_PRINTF_H_ */
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
#include "libc/stdckdint.h"
|
||||
#include "tool/plinko/lib/error.h"
|
||||
#include "tool/plinko/lib/plinko.h"
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
#define SetFrame(r, x) \
|
||||
|
@ -45,5 +44,4 @@ forceinline void Repush(int x) {
|
|||
}
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_TOOL_PLINKO_LIB_STACK_H_ */
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
#ifndef COSMOPOLITAN_TOOL_PLINKO_LIB_TRACE_H_
|
||||
#define COSMOPOLITAN_TOOL_PLINKO_LIB_TRACE_H_
|
||||
#include "libc/str/str.h"
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
#define START_TRACE \
|
||||
|
@ -36,5 +35,4 @@ COSMOPOLITAN_C_START_
|
|||
void EnableTracing(void);
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_TOOL_PLINKO_LIB_TRACE_H_ */
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
#define COSMOPOLITAN_TOOL_PLINKO_LIB_TREE_H_
|
||||
#include "tool/plinko/lib/cons.h"
|
||||
#include "tool/plinko/lib/plinko.h"
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
int PutTree(int, int, int);
|
||||
|
@ -43,5 +42,4 @@ forceinline int Bkn(int N) {
|
|||
}
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_TOOL_PLINKO_LIB_TREE_H_ */
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#ifndef COSMOPOLITAN_TOOL_PLINKO_LIB_TYPES_H_
|
||||
#define COSMOPOLITAN_TOOL_PLINKO_LIB_TYPES_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
typedef unsigned long dword;
|
||||
|
@ -11,5 +10,4 @@ struct qword {
|
|||
};
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_TOOL_PLINKO_LIB_TYPES_H_ */
|
||||
|
|
|
@ -50,8 +50,6 @@ def FixThirdParty(path):
|
|||
|
||||
start = 0
|
||||
res = []
|
||||
if not code.startswith('// clang-format off\n'):
|
||||
res.append('// clang-format off\n')
|
||||
for m in re.finditer(r'(?:/[/*] MISSING )?#\s*include\s*"([^"]+)"(?: \*/)?', code):
|
||||
end, newstart = m.span()
|
||||
res.append(code[start:end])
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
│ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │
|
||||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/intrin/bits.h"
|
||||
#include "libc/intrin/kprintf.h"
|
||||
#include "libc/log/color.internal.h"
|
||||
#include "libc/mem/gc.h"
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#ifndef COSMOPOLITAN_TOOL_VIZ_LIB_BILINEARSCALE_H_
|
||||
#define COSMOPOLITAN_TOOL_VIZ_LIB_BILINEARSCALE_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
void *BilinearScale(long dcw, long dyw, long dxw,
|
||||
|
@ -10,5 +9,4 @@ void *BilinearScale(long dcw, long dyw, long dxw,
|
|||
double);
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_TOOL_VIZ_LIB_BILINEARSCALE_H_ */
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
#ifndef COSMOPOLITAN_TOOL_VIZ_LIB_CONVOLUTION_H_
|
||||
#define COSMOPOLITAN_TOOL_VIZ_LIB_CONVOLUTION_H_
|
||||
#include "dsp/core/q.h"
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
/* clang-format off */
|
||||
|
||||
#define CONVROUND(X) ((int)rint(X))
|
||||
|
@ -63,5 +62,4 @@
|
|||
|
||||
unsigned *convoindex(unsigned, unsigned, unsigned) mallocesque;
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_TOOL_VIZ_LIB_CONVOLUTION_H_ */
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
#include "libc/mem/mem.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "tool/viz/lib/graphic.h"
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
typedef float convolve_t __attribute__((__vector_size__(16)));
|
||||
|
@ -42,5 +41,4 @@ forceinline void convolve(unsigned yn, unsigned xn, ttyrgb_m128 img[yn][xn],
|
|||
}
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_TOOL_VIZ_LIB_CONVOLVE_H_ */
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/fmt/itoa.h"
|
||||
#include "libc/intrin/bits.h"
|
||||
#include "libc/intrin/safemacros.internal.h"
|
||||
#include "libc/mem/gc.internal.h"
|
||||
#include "libc/str/str.h"
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
#include "libc/str/str.h"
|
||||
#include "libc/testlib/testlib.h"
|
||||
#include "tool/viz/lib/formatstringtable.h"
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
/**
|
||||
* Tests matrix contains expected content w/ string compare.
|
||||
|
@ -64,5 +63,4 @@
|
|||
void testlib_showerror_expect_matrixeq(int, const char *, const char *, char *,
|
||||
char *, const char *, ...);
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_TOOL_VIZ_LIB_FORMATSTRINGTABLE_TESTLIB_H_ */
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#ifndef COSMOPOLITAN_TOOL_VIZ_LIB_FORMATSTRINGTABLE_H_
|
||||
#define COSMOPOLITAN_TOOL_VIZ_LIB_FORMATSTRINGTABLE_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
typedef void *StringTableFormatter(long yn, long xn, const char *const[yn][xn],
|
||||
|
@ -44,5 +43,4 @@ char *StringifyMatrixShort(long yn, long xn, const short[yn][xn],
|
|||
const char *) mallocesque;
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_TOOL_VIZ_LIB_FORMATSTRINGTABLE_H_ */
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
#ifndef COSMOPOLITAN_TOOL_VIZ_LIB_GRAPHIC_H_
|
||||
#define COSMOPOLITAN_TOOL_VIZ_LIB_GRAPHIC_H_
|
||||
#include "dsp/tty/quant.h"
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
struct Graphic {
|
||||
|
@ -45,5 +44,4 @@ void WriteToFrameBuffer(size_t dyn, size_t dxn, unsigned char dst[dyn][dxn][4],
|
|||
size_t yn, size_t xn);
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_TOOL_VIZ_LIB_GRAPHIC_H_ */
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
#ifndef COSMOPOLITAN_TOOL_VIZ_LIB_HALFBLIT_H_
|
||||
#define COSMOPOLITAN_TOOL_VIZ_LIB_HALFBLIT_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
void *halfblit(size_t, void *);
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_TOOL_VIZ_LIB_HALFBLIT_H_ */
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#ifndef COSMOPOLITAN_TOOL_VIZ_LIB_KNOBS_H_
|
||||
#define COSMOPOLITAN_TOOL_VIZ_LIB_KNOBS_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
extern bool pf1_;
|
||||
|
@ -17,5 +16,4 @@ extern bool pf11_;
|
|||
extern bool pf12_;
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_TOOL_VIZ_LIB_KNOBS_H_ */
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
│ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │
|
||||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/intrin/bits.h"
|
||||
#include "libc/macros.internal.h"
|
||||
#include "libc/math.h"
|
||||
#include "tool/viz/lib/graphic.h"
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#ifndef COSMOPOLITAN_TOOL_VIZ_LIB_STRINGBUILDER_H_
|
||||
#define COSMOPOLITAN_TOOL_VIZ_LIB_STRINGBUILDER_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
struct StringBuilder {
|
||||
|
@ -17,5 +16,4 @@ char *FreeStringBuilder(struct StringBuilder *) mallocesque returnsnonnull
|
|||
paramsnonnull();
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_TOOL_VIZ_LIB_STRINGBUILDER_H_ */
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#ifndef COSMOPOLITAN_TOOL_VIZ_LIB_YCBCR_H_
|
||||
#define COSMOPOLITAN_TOOL_VIZ_LIB_YCBCR_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
struct YCbCr;
|
||||
|
@ -30,5 +29,4 @@ void *YCbCr2RgbScale(long dyn, long dxn, unsigned char[restrict 3][dyn][dxn],
|
|||
double, double, double, double, struct YCbCr **);
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_TOOL_VIZ_LIB_YCBCR_H_ */
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/calls/calls.h"
|
||||
#include "libc/intrin/bits.h"
|
||||
#include "libc/serialize.h"
|
||||
#include "libc/log/check.h"
|
||||
#include "libc/log/log.h"
|
||||
#include "libc/mem/gc.internal.h"
|
||||
|
@ -27,10 +27,8 @@
|
|||
#include "net/http/ip.h"
|
||||
#include "third_party/maxmind/maxminddb.h"
|
||||
|
||||
#define PATH(...) \
|
||||
(const char *const[]) { \
|
||||
__VA_ARGS__, 0 \
|
||||
}
|
||||
#define PATH(...) \
|
||||
(const char *const[]) { __VA_ARGS__, 0 }
|
||||
|
||||
MMDB_s *ipdb, *asdb;
|
||||
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
#include "libc/errno.h"
|
||||
#include "libc/fmt/conv.h"
|
||||
#include "libc/fmt/itoa.h"
|
||||
#include "libc/intrin/bits.h"
|
||||
#include "libc/intrin/bsf.h"
|
||||
#include "libc/intrin/bsr.h"
|
||||
#include "libc/intrin/hilbert.h"
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
#include "libc/dce.h"
|
||||
#include "libc/errno.h"
|
||||
#include "libc/fmt/conv.h"
|
||||
#include "libc/intrin/bits.h"
|
||||
#include "libc/intrin/safemacros.internal.h"
|
||||
#include "libc/limits.h"
|
||||
#include "libc/log/check.h"
|
||||
|
|
|
@ -42,7 +42,6 @@
|
|||
#include "libc/errno.h"
|
||||
#include "libc/fmt/conv.h"
|
||||
#include "libc/fmt/itoa.h"
|
||||
#include "libc/intrin/bits.h"
|
||||
#include "libc/intrin/kprintf.h"
|
||||
#include "libc/intrin/safemacros.internal.h"
|
||||
#include "libc/intrin/xchg.internal.h"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue