mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-23 05:42:29 +00:00
Add scouts honor escape hatch for source embedding
This commit is contained in:
parent
c91b3c5006
commit
b4269930f7
547 changed files with 1516 additions and 944 deletions
|
@ -23,11 +23,12 @@
|
|||
#include "libc/runtime/internal.h"
|
||||
#include "libc/str/appendchar.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "libc/str/tpenc.h"
|
||||
|
||||
/* TODO(jart): Make early-stage data structures happen. */
|
||||
#undef isspace
|
||||
#undef iswspace
|
||||
#define isspace(c) ((c) == ' ' || (c) == '\t' || (c) == '\n' || (c) == '\r')
|
||||
#define isspace(c) ((c) == ' ' || (c) == '\t' || (c) == '\n' || (c) == '\r')
|
||||
#define iswspace(c) isspace(c)
|
||||
|
||||
struct DosArgv {
|
||||
|
@ -37,14 +38,12 @@ struct DosArgv {
|
|||
wint_t wc;
|
||||
};
|
||||
|
||||
static textwindows void decodedosargv(struct DosArgv *st) {
|
||||
static inline textwindows void decodedosargv(struct DosArgv *st) {
|
||||
st->s += getutf16(st->s, &st->wc);
|
||||
}
|
||||
|
||||
static textwindows void appenddosargv(struct DosArgv *st, wint_t wc) {
|
||||
if (st->p < st->pe) {
|
||||
st->p += tpencode(st->p, st->pe - st->p, wc, false);
|
||||
}
|
||||
static inline textwindows void appenddosargv(struct DosArgv *st, wint_t wc) {
|
||||
AppendChar(&st->p, st->pe, wc);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue