lib,wcc,w6a,w6l: char-literals for remaining source magic decimals (Wave-1)

This commit is contained in:
2026-06-02 21:02:26 +09:00
parent 2131ae0dee
commit 688275bfd6
17 changed files with 86 additions and 86 deletions

View File

@@ -422,7 +422,7 @@ export fn mkdirs(path: str, mode: i32) (void | oserror) = {
// trigger an empty mkdir.
let i: i32 = 1;
for (i < n) {
if (pathbuf[i] == 47u8) { // '/'
if (pathbuf[i] == '/') {
pathbuf[i] = 0u8;
let r: i32 = syscall2(nr.MKDIR,
(&pathbuf[0]): i64, mode: i64): i32;
@@ -541,7 +541,7 @@ export fn getenv(name: str) (str | void) = {
j += 1;
};
if (matched) {
if (entry[name.len] == 61u8) { // '='
if (entry[name.len] == '=') {
let val: *u8 = entry + ((name.len + 1): u64);
let n: i32 = 0;
for (val[n] != 0u8) { n += 1; };
@@ -6088,7 +6088,7 @@ let i64tos_buf: [65]u8 = [0...]; // 64 binary digits plus '-'
export fn i64tos(i: i64, b: base) str = {
if (i >= 0) { return u64tos(i: u64, b); };
i64tos_buf[0] = 45u8; // '-'
i64tos_buf[0] = '-';
// `(-i): u64`: for I64_MIN, -i wraps (two's complement) back to the
// I64_MIN bit pattern; reinterpreting to u64 yields the true
// magnitude 9223372036854775808. ref/hare/strconv/itos.ha:25. Probed