diff options
Diffstat (limited to 'public/tools')
| -rw-r--r-- | public/tools/cc/src/CommandLine.cc | 2 | ||||
| -rw-r--r-- | public/tools/ld.dyn/src/CommandLine.cc | 5 | ||||
| -rw-r--r-- | public/tools/manual/src/CommandLine.cc | 36 | ||||
| -rw-r--r-- | public/tools/mgmt.oe/src/CommandLine.cc | 3 |
4 files changed, 41 insertions, 5 deletions
diff --git a/public/tools/cc/src/CommandLine.cc b/public/tools/cc/src/CommandLine.cc index 62757c43..3ce8a29d 100644 --- a/public/tools/cc/src/CommandLine.cc +++ b/public/tools/cc/src/CommandLine.cc @@ -10,6 +10,6 @@ SInt32 main(SInt32 argc, Char* argv[]) { PrintOut(nullptr, - "cc: A C++ compiler to be installed.\rcc: This program is present as a placeholder."); + "cc: A C++ compiler is to be installed.\rcc: This program is present as a placeholder."); return EXIT_FAILURE; } diff --git a/public/tools/ld.dyn/src/CommandLine.cc b/public/tools/ld.dyn/src/CommandLine.cc index 45f707a9..b3774f85 100644 --- a/public/tools/ld.dyn/src/CommandLine.cc +++ b/public/tools/ld.dyn/src/CommandLine.cc @@ -8,7 +8,8 @@ /// @brief Library loader. -#define DYNLIB_FLAG "-dyn" +#define DYNLIB_FLAG "-e" +#define DYNLIB_FLAG_ALT "-exec" SInt32 _NeMain(SInt32 argc, Char* argv[]) { LIBSYS_UNUSED(argc); @@ -19,7 +20,7 @@ SInt32 _NeMain(SInt32 argc, Char* argv[]) { "ld.dyn: © 2024-2025 Amlal El Mahrouss, Licensed under the Apache 2.0 license.\n"); for (SInt32 i = 1U; i < argc; ++i) { - if (MmStrCmp(argv[i], DYNLIB_FLAG) == 0) { + if (MmStrCmp(argv[i], DYNLIB_FLAG) == 0 || MmStrCmp(argv[i], DYNLIB_FLAG_ALT) == 0) { UIntPtr ret = RtlSpawnProcess(argv[i], 0, nullptr, nullptr, 0); if (0 < ret) { diff --git a/public/tools/manual/src/CommandLine.cc b/public/tools/manual/src/CommandLine.cc index 8c75d565..9dc535bb 100644 --- a/public/tools/manual/src/CommandLine.cc +++ b/public/tools/manual/src/CommandLine.cc @@ -1,13 +1,45 @@ +// Copyright 2024-2026, Amlal El Mahrouss (amlal@nekernel.org) +// Licensed under the Apache License, Version 2.0 (see LICENSE file) +// Official repository: https://github.com/nekernel-org/nekernel + +#include <libSystem/SystemKit/Err.h> #include <libSystem/SystemKit/System.h> SInt32 _NeMain(SInt32 argc, Char* argv[]) { LIBSYS_UNUSED(argc); LIBSYS_UNUSED(argv); - if (argc < 2) { - PrintOut(nullptr, "HELP: manual <tutorial_name>\n"); + if (argc != 3) { + PrintOut(nullptr, "HELP: manual <tutorial_name> <output_name>\n"); return EXIT_FAILURE; } + IORef fileHtml = IoOpenFile(argv[2], nullptr); + + if (fileHtml) { + IORef printRef = PrintCreate(); + + PrintOut(printRef, "<HTML>"); + PrintOut(printRef, "<PRE>"); + + IORef in = PrintGet(argv[1]); + + MUST_PASS(in); + + Char buf[1024] = {0}; + + while (PrintIn(printRef, "%s:1024", buf) == kErrorSuccess); + + PrintRelease(in); + + PrintOut(printRef, "</PRE>"); + PrintOut(printRef, "</HTML>"); + + IoWriteFile(fileHtml, printRef, PrintSize(printRef)); + PrintRelease(printRef); + + IoCloseFile(fileHtml); + } + return EXIT_SUCCESS; }
\ No newline at end of file diff --git a/public/tools/mgmt.oe/src/CommandLine.cc b/public/tools/mgmt.oe/src/CommandLine.cc index ccff8c0e..445609d1 100644 --- a/public/tools/mgmt.oe/src/CommandLine.cc +++ b/public/tools/mgmt.oe/src/CommandLine.cc @@ -24,5 +24,8 @@ SInt32 _NeMain(SInt32 argc, Char* argv[]) { /// access the jail then) if (kJailSrv->fClient == nullptr) return EXIT_FAILURE; + ::PrintOut(nullptr, "Jail-Hash: %ul", kJailSrv->fJailHash); + ::PrintOut(nullptr, "Parent-ID: %ul", kJailSrv->fParentID); + return EXIT_FAILURE; }
\ No newline at end of file |
