Added comments and help commands to user apps
This commit is contained in:
8
screen.c
8
screen.c
@ -23,10 +23,12 @@ int main(int argc, char *argv[]) {
|
||||
{
|
||||
printf(1, "Creates a new virtual console.\n");
|
||||
printf(1, "Options:\n");
|
||||
printf(1, "-bg [0 - 9] : Sets a background preset for the title bar.");
|
||||
printf(1, "-bg [0 - 9] : Sets a background preset for the title bar.\n");
|
||||
printf(1, "-t [String] : Sets a custom title for the console.\n");
|
||||
exit();
|
||||
return 0;
|
||||
}
|
||||
// Setup the title, it adds the space seperated strings to the title
|
||||
else
|
||||
{
|
||||
if (accepttitle)
|
||||
@ -50,6 +52,7 @@ int main(int argc, char *argv[]) {
|
||||
}
|
||||
}
|
||||
|
||||
// Set the variable to the selected bg/fg preset option
|
||||
switch(selopt)
|
||||
{
|
||||
case 1:
|
||||
@ -81,6 +84,7 @@ int main(int argc, char *argv[]) {
|
||||
break;
|
||||
}
|
||||
|
||||
// Fork into a new process and create the screen
|
||||
pid = fork();
|
||||
if (pid < 0) {
|
||||
printf(1, "screen: fork failed\n");
|
||||
@ -93,7 +97,7 @@ int main(int argc, char *argv[]) {
|
||||
}
|
||||
else
|
||||
{
|
||||
printf(1, "screen: failed to create a new console\n");
|
||||
|
||||
}
|
||||
}
|
||||
exit();
|
||||
|
Reference in New Issue
Block a user