mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-27 23:08:31 +00:00
Make exciting improvements
- Add Lua backtraces to redbean! - Wipe serving keys after redbean forks - Audit redbean to remove free via exit - Log SSL client ciphersuite preferences - Increase ASAN malloc() backtrace depth - Make GetSslRoots() behave as a singleton - Move leaks.c from LIBC_TESTLIB to LIBC_LOG - Add undocumented %n to printf() for newlines - Fix redbean memory leak reindexing inode change - Fix redbean memory leak with Fetch() DNS object - Restore original environ after __cxa_finalize() - Make backtrace always work after __cxa_finalize() - Introduce COUNTEXPR() diagnostic / benchmark tool - Fix a few more instances of errno being clobbered - Consolidate the ANSI color disabling internal APIs
This commit is contained in:
parent
f5831a62fa
commit
af645fcbec
61 changed files with 1354 additions and 814 deletions
|
@ -141,7 +141,6 @@ bool wantfentry;
|
|||
bool wantrecord;
|
||||
bool fulloutput;
|
||||
bool touchtarget;
|
||||
bool inarticulate;
|
||||
bool wantnoredzone;
|
||||
bool stdoutmustclose;
|
||||
bool no_sanitize_null;
|
||||
|
@ -198,7 +197,7 @@ const char *const kSafeEnv[] = {
|
|||
"PATH", // needed by clang
|
||||
"PWD", // just seems plain needed
|
||||
"STRACE", // useful for troubleshooting
|
||||
"TERM", // needed by IsTerminalInarticulate
|
||||
"TERM", // needed to detect colors
|
||||
"TMPDIR", // needed by compiler
|
||||
};
|
||||
|
||||
|
@ -268,19 +267,19 @@ void OnChld(int sig, siginfo_t *si, ucontext_t *ctx) {
|
|||
}
|
||||
|
||||
void PrintBold(void) {
|
||||
if (!inarticulate) {
|
||||
if (!__nocolor) {
|
||||
appends(&output, "\e[1m");
|
||||
}
|
||||
}
|
||||
|
||||
void PrintRed(void) {
|
||||
if (!inarticulate) {
|
||||
if (!__nocolor) {
|
||||
appends(&output, "\e[91;1m");
|
||||
}
|
||||
}
|
||||
|
||||
void PrintReset(void) {
|
||||
if (!inarticulate) {
|
||||
if (!__nocolor) {
|
||||
appends(&output, "\e[0m");
|
||||
}
|
||||
}
|
||||
|
@ -806,11 +805,6 @@ int main(int argc, char *argv[]) {
|
|||
ispkg = true;
|
||||
}
|
||||
|
||||
/*
|
||||
* get information about stdout
|
||||
*/
|
||||
inarticulate = IsTerminalInarticulate();
|
||||
|
||||
/*
|
||||
* ingest arguments
|
||||
*/
|
||||
|
@ -942,7 +936,7 @@ int main(int argc, char *argv[]) {
|
|||
AddArg("-Wno-incompatible-pointer-types-discards-qualifiers");
|
||||
}
|
||||
AddArg("-no-canonical-prefixes");
|
||||
if (!inarticulate) {
|
||||
if (!__nocolor) {
|
||||
AddArg(firstnonnull(colorflag, "-fdiagnostics-color=always"));
|
||||
}
|
||||
if (wantpg && !wantnopg) {
|
||||
|
@ -1181,7 +1175,7 @@ int main(int argc, char *argv[]) {
|
|||
if (fulloutput) {
|
||||
ReportResources();
|
||||
}
|
||||
if (!inarticulate && ischardev(2)) {
|
||||
if (!__nocolor && ischardev(2)) {
|
||||
/* clear line forward */
|
||||
appendw(&output, READ32LE("\e[K"));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue