mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-28 00:02:28 +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
3
third_party/awk/awk.h
vendored
3
third_party/awk/awk.h
vendored
|
@ -4,9 +4,7 @@
|
|||
#include "libc/limits.h"
|
||||
#include "libc/literal.h"
|
||||
#include "libc/stdio/stdio.h"
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
/* clang-format off */
|
||||
|
||||
typedef double Awkfloat;
|
||||
|
||||
|
@ -412,5 +410,4 @@ extern Cell *gsub(Node **, int);
|
|||
extern const char *flags2str(int flags);
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_THIRD_PARTY_AWK_AWK_H_ */
|
||||
|
|
1
third_party/awk/awkgram.tab.c
vendored
1
third_party/awk/awkgram.tab.c
vendored
|
@ -1,4 +1,3 @@
|
|||
// clang-format off
|
||||
#include "libc/mem/mem.h"
|
||||
#include "libc/str/str.h"
|
||||
#define YYBYACC 1
|
||||
|
|
2
third_party/awk/awkgram.tab.h
vendored
2
third_party/awk/awkgram.tab.h
vendored
|
@ -1,7 +1,6 @@
|
|||
#ifndef COSMOPOLITAN_THIRD_PARTY_AWK_AWKGRAM_TAB_H_
|
||||
#define COSMOPOLITAN_THIRD_PARTY_AWK_AWKGRAM_TAB_H_
|
||||
#include "third_party/awk/awk.h"
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
#define FIRSTTOKEN 257
|
||||
|
@ -111,5 +110,4 @@ typedef union {
|
|||
extern YYSTYPE yylval;
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_THIRD_PARTY_AWK_AWKGRAM_TAB_H_ */
|
||||
|
|
1
third_party/awk/b.c
vendored
1
third_party/awk/b.c
vendored
|
@ -31,7 +31,6 @@
|
|||
#include "libc/str/str.h"
|
||||
#include "third_party/awk/awk.h"
|
||||
#include "third_party/awk/awkgram.tab.h"
|
||||
// clang-format off
|
||||
|
||||
/* lasciate ogne speranza, voi ch'intrate. */
|
||||
|
||||
|
|
2
third_party/awk/cmd.h
vendored
2
third_party/awk/cmd.h
vendored
|
@ -1,10 +1,8 @@
|
|||
#ifndef COSMOPOLITAN_THIRD_PARTY_AWK_CMD_H_
|
||||
#define COSMOPOLITAN_THIRD_PARTY_AWK_CMD_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
int _awk(int, char *[]);
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_THIRD_PARTY_AWK_CMD_H_ */
|
||||
|
|
1
third_party/awk/lex.c
vendored
1
third_party/awk/lex.c
vendored
|
@ -34,7 +34,6 @@
|
|||
#include "third_party/awk/awk.h"
|
||||
#include "third_party/awk/awkgram.tab.h"
|
||||
#include "third_party/gdtoa/gdtoa.h"
|
||||
// clang-format off
|
||||
|
||||
extern bool infunc;
|
||||
|
||||
|
|
1
third_party/awk/lib.c
vendored
1
third_party/awk/lib.c
vendored
|
@ -35,7 +35,6 @@
|
|||
#include "libc/runtime/runtime.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "third_party/awk/awk.h"
|
||||
// clang-format off
|
||||
|
||||
char EMPTY[] = { '\0' };
|
||||
static FILE *infile = NULL;
|
||||
|
|
1
third_party/awk/main.c
vendored
1
third_party/awk/main.c
vendored
|
@ -38,7 +38,6 @@
|
|||
#include "libc/sysv/consts/sicode.h"
|
||||
#include "libc/sysv/consts/sig.h"
|
||||
#include "third_party/awk/awk.h"
|
||||
// clang-format off
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
Copyright (C) Lucent Technologies 1997\\n\
|
||||
|
|
1
third_party/awk/maketab.c
vendored
1
third_party/awk/maketab.c
vendored
|
@ -31,7 +31,6 @@
|
|||
#include "libc/str/str.h"
|
||||
#include "third_party/awk/awk.h"
|
||||
#include "third_party/awk/awkgram.tab.h"
|
||||
// clang-format off
|
||||
|
||||
/*
|
||||
* this program makes the table to link function names
|
||||
|
|
1
third_party/awk/parse.c
vendored
1
third_party/awk/parse.c
vendored
|
@ -30,7 +30,6 @@
|
|||
#include "libc/str/str.h"
|
||||
#include "third_party/awk/awk.h"
|
||||
#include "third_party/awk/awkgram.tab.h"
|
||||
// clang-format off
|
||||
|
||||
Node *nodealloc(int n)
|
||||
{
|
||||
|
|
1
third_party/awk/proctab.c
vendored
1
third_party/awk/proctab.c
vendored
|
@ -27,7 +27,6 @@
|
|||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "third_party/awk/awk.h"
|
||||
#include "third_party/awk/awkgram.tab.h"
|
||||
// clang-format off
|
||||
|
||||
static const char * const printname[95] = {
|
||||
"FIRSTTOKEN", /* 258 */
|
||||
|
|
1
third_party/awk/run.c
vendored
1
third_party/awk/run.c
vendored
|
@ -39,7 +39,6 @@
|
|||
#include "third_party/awk/awk.h"
|
||||
#include "third_party/awk/awkgram.tab.h"
|
||||
#include "third_party/libcxx/math.h"
|
||||
// clang-format off
|
||||
|
||||
static void stdinit(void);
|
||||
static void flush_all(void);
|
||||
|
|
1
third_party/awk/tran.c
vendored
1
third_party/awk/tran.c
vendored
|
@ -31,7 +31,6 @@
|
|||
#include "libc/mem/mem.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "third_party/awk/awk.h"
|
||||
// clang-format off
|
||||
|
||||
#define FULLTAB 2 /* rehash when table gets this x full */
|
||||
#define GROWTAB 4 /* grow table by this factor */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue