mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-04 18:28:30 +00:00
Make curl
example into a complete tool (#706)
You can now handily use `curl` with popen()/system() by placing `STATIC_YOINK("_curl")` in your main source file.
This commit is contained in:
parent
dd04aeba1c
commit
f6b3019796
8 changed files with 96 additions and 4 deletions
|
@ -38,6 +38,7 @@
|
|||
#include "third_party/awk/cmd.h"
|
||||
#include "third_party/sed/cmd.h"
|
||||
#include "third_party/tr/cmd.h"
|
||||
#include "tool/curl/cmd.h"
|
||||
|
||||
/**
|
||||
* @fileoverview Cosmopolitan Command Interpreter
|
||||
|
@ -417,6 +418,7 @@ static int TryBuiltin(void) {
|
|||
if (_weaken(_tr) && !strcmp(args[0], "tr")) return Fake(_weaken(_tr));
|
||||
if (_weaken(_sed) && !strcmp(args[0], "sed")) return Fake(_weaken(_sed));
|
||||
if (_weaken(_awk) && !strcmp(args[0], "awk")) return Fake(_weaken(_awk));
|
||||
if (_weaken(_curl) && !strcmp(args[0], "curl")) return Fake(_weaken(_curl));
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue