mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-23 13:52:28 +00:00
Make cli commands yoinkable into cosmo shell
This lets our system() and popen() commands function sort of like BusyBox and ToyBox. By default the Cosmopolitan Shell is lightweight. But if you use STATIC_YOINK then you can pull the individual commands you want into the linkage, and they'll be included in a single binary. For example the demo binary embeds `tr` and `sed` and ends up ~140kb.
This commit is contained in:
parent
5af19b7eed
commit
3d2d04b25e
32 changed files with 897 additions and 276 deletions
10
third_party/awk/lib.c
vendored
10
third_party/awk/lib.c
vendored
|
@ -28,26 +28,18 @@
|
|||
#define DEBUG
|
||||
#include "libc/calls/calls.h"
|
||||
#include "libc/errno.h"
|
||||
#include "libc/fmt/conv.h"
|
||||
#include "libc/fmt/fmt.h"
|
||||
#include "libc/limits.h"
|
||||
#include "libc/math.h"
|
||||
#include "libc/mem/alg.h"
|
||||
#include "libc/mem/mem.h"
|
||||
#include "libc/nexgen32e/ffs.h"
|
||||
#include "libc/runtime/runtime.h"
|
||||
#include "libc/stdio/lock.internal.h"
|
||||
#include "libc/stdio/rand.h"
|
||||
#include "libc/stdio/stdio.h"
|
||||
#include "libc/stdio/temp.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "libc/sysv/consts/exit.h"
|
||||
#include "third_party/awk/awk.h"
|
||||
#include "third_party/gdtoa/gdtoa.h"
|
||||
// clang-format off
|
||||
|
||||
char EMPTY[] = { '\0' };
|
||||
FILE *infile = NULL;
|
||||
static FILE *infile = NULL;
|
||||
bool innew; /* true = infile has not been read by readrec */
|
||||
char *file = EMPTY;
|
||||
char *record;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue