From f4a96e0b2eb8862b0316c85db8ec59dc94e1f25f Mon Sep 17 00:00:00 2001 From: EnderIce2 Date: Mon, 17 Mar 2025 23:22:00 +0000 Subject: [PATCH] docs: add note in echo.c PrintHelp() Signed-off-by: EnderIce2 --- Userspace/coreutils/src/admin.c | 7 ------- Userspace/coreutils/src/echo.c | 8 ++++++++ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/Userspace/coreutils/src/admin.c b/Userspace/coreutils/src/admin.c index 637c77d2..bdecb01b 100644 --- a/Userspace/coreutils/src/admin.c +++ b/Userspace/coreutils/src/admin.c @@ -17,13 +17,6 @@ #include #include -#include -#include -#include -#include -#include -#include -#include int main(int argc, char *argv[]) { diff --git a/Userspace/coreutils/src/echo.c b/Userspace/coreutils/src/echo.c index b7fc76ae..d6f631b9 100644 --- a/Userspace/coreutils/src/echo.c +++ b/Userspace/coreutils/src/echo.c @@ -24,6 +24,14 @@ void PrintHelp() { + /** + * POSIX specification for echo specifies that + * "Implementations shall not support any options." + * but i will do this anyway. + * + * https://pubs.opengroup.org/onlinepubs/9799919799/utilities/echo.html + */ + printf("Usage: echo [OPTION]... [STRING]...\n"); printf("Echo the STRING(s) to standard output.\n\n"); printf(" -n do not output the trailing newline\n");