From 3392b56aab0a9d216341029483504eb8123b19f2 Mon Sep 17 00:00:00 2001 From: boreddevnl Date: Mon, 11 May 2026 18:54:34 +0200 Subject: [PATCH] dep: Depricate man.c --- src/userland/cli/man.c | 37 ------------------------------------- 1 file changed, 37 deletions(-) delete mode 100644 src/userland/cli/man.c diff --git a/src/userland/cli/man.c b/src/userland/cli/man.c deleted file mode 100644 index 360be7c..0000000 --- a/src/userland/cli/man.c +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2023-2026 Chris (boreddevnl) -// This software is released under the GNU General Public License v3.0. See LICENSE file for details. -// This header needs to maintain in any file it is present in, as per the GPL license terms. -// BOREDOS_APP_DESC: Manual pages CLI utility -#include -#include - -int main(int argc, char **argv) { - if (argc < 2) { - printf("What manual page do you want?\nExample: man ls\n"); - return 0; - } - - char path[128]; - printf("Manual for: %s\n", argv[1]); - printf("---------------------------\n"); - - strcpy(path, "/Library/man/"); - strcat(path, argv[1]); - strcat(path, ".txt"); - - int fd = sys_open(path, "r"); - if (fd < 0) { - printf("No manual entry for %s\n", argv[1]); - return 1; - } - - char buffer[4096]; - int bytes; - while ((bytes = sys_read(fd, buffer, sizeof(buffer))) > 0) { - sys_write(1, buffer, bytes); - } - - sys_close(fd); - printf("\n"); - return 0; -}