rewrite comments into one, unified style

This commit is contained in:
maksw committed 2026-06-15 10:17:48 +02:00
1 parent 6260de0085
commit 467a58c9c6
163 files changed
+3560 -2556

No files matched your search

+8
View File
@@ -1,17 +1,22 @@
// User application entry points for resolve.
#include <stdint.h>
#include <stddef.h>
#include <string.h>
#include <ntlite/syscall.h>
// Prints the requested operation.
static void print(const char* s) {
if (s) { SYS_WRITE_CONSOLE_REQUEST req = { SysSvFromCstr(s) }; SysWriteConsole(&req); }
}
// Prints char.
static void print_char(char c) {
SYS_WRITE_CONSOLE_REQUEST req = { SysSvFromParts(&c, 1) };
SysWriteConsole(&req);
}
// Prints u64.
static void print_u64(uint64_t v) {
char buf[32];
int n = 0;
@@ -23,6 +28,7 @@ static void print_u64(uint64_t v) {
while (n > 0) print_char(buf[--n]);
}
// Implements the next token operation.
static const char* next_token(const char* s, char* out, size_t outSize) {
if (!s || !out || outSize == 0) return NULL;
while (*s == ' ' || *s == '\t') s++;
@@ -37,11 +43,13 @@ static const char* next_token(const char* s, char* out, size_t outSize) {
return s;
}
// Prints ipv4.
static void print_ipv4(const uint8_t ip[4]) {
print_u64(ip[0]); print("."); print_u64(ip[1]); print(".");
print_u64(ip[2]); print("."); print_u64(ip[3]);
}
// Runs the requested operation.
int main(void) {
char name[256];
const char* cmd = SysGetPeb()->CommandLine.Data;