diff options
author | Ferass El Hafidi <vitali64pmemail@protonmail.com> | 2023-02-02 19:13:39 +0100 |
---|---|---|
committer | Ferass El Hafidi <vitali64pmemail@protonmail.com> | 2023-02-02 19:13:39 +0100 |
commit | a21ddcce587b46fda9b231b2ebdcb9ce50c0c6ef (patch) | |
tree | 75f5516ef149f30217c9cc2c22eaab2e404da61d | |
parent | 9b5d1ac0f97be475cb8c07dd297f106a5b09a9e8 (diff) | |
download | fases-a21ddcce587b46fda9b231b2ebdcb9ce50c0c6ef.tar.gz fases-a21ddcce587b46fda9b231b2ebdcb9ce50c0c6ef.zip |
sh: shorten comments
Signed-off-by: Ferass El Hafidi <vitali64pmemail@protonmail.com>
-rw-r--r-- | sh/parser.c | 16 | ||||
-rw-r--r-- | sh/sh.c | 11 |
2 files changed, 5 insertions, 22 deletions
diff --git a/sh/parser.c b/sh/parser.c index 347fdb2..fc64777 100644 --- a/sh/parser.c +++ b/sh/parser.c @@ -44,13 +44,7 @@ int parseCommand(int, char **); int splitCommand(char [4096], char *[4096]); -/* USAGE - * ----- - * parseCommand(name); - * - * DESCRIPTION - * ----------- - * Parse a shell command and determine if the command to run is built-in or +/* Parse a shell command and determine if the command to run is built-in or * external. It then runs the command accordinately. * <It also could in the future handle tokens.> */ @@ -88,13 +82,7 @@ int parseCommand(int argc, char *argv[]) { return err; } -/* USAGE - * ----- - * splitCommand(name, dest); - * - * DESCRIPTION - * ----------- - * This splits a command string in multiple words. +/* This splits a command string in multiple words. * The array command can then be ran using execvp(3). It * also returns an int that can be used as argc. */ @@ -88,15 +88,10 @@ int main(int argc, char *const argv[]) { return 0; } -/* USAGE - * ----- - * commandLoop() - * - * DESCRIPTION - * ----------- - * This function is the actual command prompt. +/* This function is the actual command prompt. + * It basically enters in a for(;;) loop where it reads the user's input. + * When the input is NULL, it exits. */ - void commandLoop(FILE *filstr) { char *prompt = getenv("PS1"); char *token, *tokenstate; |