mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-01 00:38:31 +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,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_ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue