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

+7 -1
View File
@@ -1,4 +1,5 @@
// posix_dir.c - chdir, getcwd, opendir, readdir, closedir
// POSIX compatibility support for posix dir.
#include <string.h>
#include <ntlite/syscall.h>
#include <stdlib.h>
@@ -10,6 +11,7 @@ typedef SYS_DIR_ENTRY KDIR_ENTRY;
#define KATTR_DIR 0x10
// Implements the chdir operation.
__declspec(dllexport) int chdir(const char* path) {
char native[512];
PosixTranslatePath(path, native, sizeof(native));
@@ -19,6 +21,7 @@ __declspec(dllexport) int chdir(const char* path) {
return 0;
}
// Implements the getcwd operation.
__declspec(dllexport) char* getcwd(char* buf, size_t size) {
if (!buf || size == 0) { errno = EINVAL; return (char*)0; }
char native[512];
@@ -31,6 +34,7 @@ __declspec(dllexport) char* getcwd(char* buf, size_t size) {
return buf;
}
// Implements the opendir operation.
__declspec(dllexport) DIR* opendir(const char* path) {
char native[512];
PosixTranslatePath(path, native, sizeof(native));
@@ -47,6 +51,7 @@ __declspec(dllexport) DIR* opendir(const char* path) {
return d;
}
// Implements the readdir operation.
__declspec(dllexport) struct dirent* readdir(DIR* d) {
if (!d) { errno = EBADF; return (struct dirent*)0; }
KDIR_ENTRY ke;
@@ -62,6 +67,7 @@ __declspec(dllexport) struct dirent* readdir(DIR* d) {
return &d->Current;
}
// Implements the closedir operation.
__declspec(dllexport) int closedir(DIR* d) {
if (!d) { errno = EBADF; return -1; }
SysCloseHandle(d->KHandle);