mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-27 23:08:31 +00:00
Fix bugs and make improvements to redbean
- Abort if .init.lua fails - Refactor redbean to use new append library - Use first certificate if SNI routing fails - Use function/data sections when building Lua - Don't use self-signed auto-generated cert for client - Add -D staging dirs to redbean lua module default path
This commit is contained in:
parent
55a15c204e
commit
aeeb851422
26 changed files with 703 additions and 513 deletions
|
@ -44,9 +44,10 @@ double MeasureEntropy(const char *p, size_t n) {
|
|||
if (h[i]) {
|
||||
x = h[i];
|
||||
x /= n;
|
||||
e += x * log2(1 / x);
|
||||
e += x * log(x);
|
||||
}
|
||||
}
|
||||
e = -(e / M_LN2);
|
||||
}
|
||||
return e;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue