clean up and standardize types across the codebase, unify atomic operations, improve UTF-8 handling throughout the system, remove obsolete input and named queue interfaces, redesign process preparation and creation, tighten IPC and service boundaries, improve error handling and reliability, minor documentation cleanup, fix doom surfaces, fix panic in ini parsing.
This commit is contained in:
1 parent
899225f551
commit
c0ad63c27f
226 files changed
+6562
-4147
No files matched your search
@@ -40,13 +40,13 @@ static void print_ipv6(const uint8_t ip[16]) {
|
||||
static const char hex[] = "0123456789abcdef";
|
||||
for (int i = 0; i < 8; ++i) {
|
||||
uint16_t word = ((uint16_t)ip[i * 2] << 8) | ip[i * 2 + 1];
|
||||
int started = 0;
|
||||
bool started = false;
|
||||
for (int shift = 12; shift >= 0; shift -= 4) {
|
||||
unsigned nibble = (word >> shift) & 0xfu;
|
||||
if (nibble || started || shift == 0) {
|
||||
char c = hex[nibble];
|
||||
print_char(c);
|
||||
started = 1;
|
||||
started = true;
|
||||
}
|
||||
}
|
||||
if (i != 7) print(":");
|
||||
@@ -141,7 +141,7 @@ static void usage(void) {
|
||||
}
|
||||
|
||||
// Resolves an IPv4 or IPv6 destination.
|
||||
static uint32_t resolve_address(const char* text, SYS_SOCKET_ADDRESS* out) {
|
||||
static KSTATUS resolve_address(const char* text, SYS_SOCKET_ADDRESS* out) {
|
||||
uint8_t ip[4];
|
||||
if (parse_ipv4(text, ip)) {
|
||||
memset(out, 0, sizeof(*out));
|
||||
@@ -161,7 +161,7 @@ static uint32_t resolve_address(const char* text, SYS_SOCKET_ADDRESS* out) {
|
||||
req.AddressOut = out;
|
||||
req.AddressSizeInOut = &addressSize;
|
||||
|
||||
uint32_t status = SysResolveHost(&req);
|
||||
KSTATUS status = SysResolveHost(&req);
|
||||
if (status == NTLSTATUS_SUCCESS)
|
||||
return NTLSTATUS_SUCCESS;
|
||||
|
||||
@@ -179,7 +179,7 @@ static int run_send(const char* cmd) {
|
||||
|
||||
cmd = next_token(cmd, tok, sizeof(tok));
|
||||
if (!tok[0]) { usage(); return 1; }
|
||||
uint32_t status = resolve_address(tok, &remote);
|
||||
KSTATUS status = resolve_address(tok, &remote);
|
||||
if (status != NTLSTATUS_SUCCESS) { print("udp: resolve failed "); print_u64(status); print("\n"); return 1; }
|
||||
cmd = next_token(cmd, tok, sizeof(tok));
|
||||
if (!tok[0] || !parse_port(tok, &port)) { usage(); return 1; }
|
||||
@@ -197,7 +197,7 @@ static int run_send(const char* cmd) {
|
||||
}
|
||||
|
||||
uint32_t sock = 0;
|
||||
uint32_t st = SysCreateSocket(remote.Family, SYS_SOCK_DGRAM, SYS_IPPROTO_UDP, &sock);
|
||||
KSTATUS st = SysCreateSocket(remote.Family, SYS_SOCK_DGRAM, SYS_IPPROTO_UDP, &sock);
|
||||
if (st != NTLSTATUS_SUCCESS) {
|
||||
print("udp: SysCreateSocket failed "); print_u64(st); print("\n");
|
||||
return 1;
|
||||
@@ -243,7 +243,7 @@ static int run_listen(const char* cmd) {
|
||||
if (!tok[0] || !parse_port(tok, &port)) { usage(); return 1; }
|
||||
|
||||
uint32_t sock = 0;
|
||||
uint32_t st = SysCreateSocket(family, SYS_SOCK_DGRAM, SYS_IPPROTO_UDP, &sock);
|
||||
KSTATUS st = SysCreateSocket(family, SYS_SOCK_DGRAM, SYS_IPPROTO_UDP, &sock);
|
||||
if (st != NTLSTATUS_SUCCESS) {
|
||||
print("udp: SysCreateSocket failed "); print_u64(st); print("\n");
|
||||
return 1;
|
||||
|
||||
Reference in new issue
Block a user