rewrite comments
This commit is contained in:
parent
10d9c9dec9
commit
2acfcb280c
2 changed files with 2 additions and 11 deletions
1
color.c
1
color.c
|
@ -3,7 +3,6 @@
|
|||
#include <stdlib.h>
|
||||
|
||||
// color str in place
|
||||
|
||||
void color_text(char str[], const char *color) {
|
||||
int size = snprintf(NULL, 0, "\x1b[38;2;%sm%s\x1b[0m", color, str) + 1; // calculate size that is needed for colored string
|
||||
if (size < 0) {
|
||||
|
|
12
rush.c
12
rush.c
|
@ -73,11 +73,7 @@ int rush_exit(char **args) {
|
|||
return 0; // exit prompting loop, which also the shell
|
||||
}
|
||||
|
||||
/**
|
||||
@brief Launch a program and wait for it to terminate.
|
||||
@param args Null terminated list of arguments (including program).
|
||||
@return Always returns 1, to continue execution.
|
||||
*/
|
||||
// launch program and wait it to terminate, return 1 to continue running
|
||||
int rush_launch(char **args) {
|
||||
pid_t pid, wpid;
|
||||
int status;
|
||||
|
@ -103,11 +99,7 @@ int rush_launch(char **args) {
|
|||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
@brief Execute shell built-in or launch program.
|
||||
@param args Null terminated list of arguments.
|
||||
@return 1 if the shell should continue running, 0 if it should terminate
|
||||
*/
|
||||
// execute built in commands or launch commands, return 1 to keep shell running
|
||||
int rush_execute(char **args) {
|
||||
if (args[0] == NULL) {
|
||||
// An empty command was entered.
|
||||
|
|
Loading…
Reference in a new issue