mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-22 21:32:31 +00:00
Have redbean Lua repl show utf-8 when it's valid
Otherwise EncodeLua() will assume strings are binary and display them using hex sequences.
This commit is contained in:
parent
31e4b0867b
commit
ce5cb8a2f8
10 changed files with 217 additions and 35 deletions
|
@ -53,6 +53,7 @@ static textexit void LogStackUse(void) {
|
|||
bool quote;
|
||||
char *p, *q;
|
||||
size_t n, usage;
|
||||
if (!PLEDGED(STDIO) || !PLEDGED(WPATH) || !PLEDGED(CPATH)) return;
|
||||
usage = GetStackUsage((char *)GetStackAddr(), GetStackSize());
|
||||
fd = open(stacklog, O_APPEND | O_CREAT | O_WRONLY, 0644);
|
||||
p = FormatUint64(stacklog, usage);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue