mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-01 08:48:29 +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
|
@ -20,8 +20,18 @@
|
|||
#include "libc/str/str.h"
|
||||
|
||||
/**
|
||||
* Appends string to buffer.
|
||||
* Appends string to buffer, e.g.
|
||||
*
|
||||
* char *b = 0;
|
||||
* appends(&b, "hello");
|
||||
* free(b);
|
||||
*
|
||||
* The resulting buffer is guaranteed to be NUL-terminated, i.e.
|
||||
* `!b[appendz(b).i]` will be the case.
|
||||
*
|
||||
* @return bytes appended (always `strlen(s)`) or -1 if `ENOMEM`
|
||||
* @see appendz(b).i to get buffer length
|
||||
*/
|
||||
int appends(char **b, const char *s) {
|
||||
ssize_t appends(char **b, const char *s) {
|
||||
return appendd(b, s, strlen(s));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue