1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-24 21:17:42 +00:00

Shell: Run clang-format on everything.

This commit is contained in:
Andreas Kling 2019-06-07 11:49:21 +02:00
parent 46527b72d7
commit f7ede145b4
3 changed files with 47 additions and 48 deletions

View file

@ -1,8 +1,8 @@
#include "LineEditor.h"
#include "GlobalState.h"
#include <ctype.h>
#include <stdio.h>
#include <unistd.h>
#include <ctype.h>
LineEditor::LineEditor()
{

View file

@ -52,7 +52,7 @@ Vector<Subcommand> Parser::parse()
commit_token();
if (m_tokens.is_empty()) {
fprintf(stderr, "Syntax error: Nothing before pipe (|)\n");
return { };
return {};
}
do_pipe();
break;
@ -110,7 +110,7 @@ Vector<Subcommand> Parser::parse()
commit_token();
if (m_tokens.is_empty()) {
fprintf(stderr, "Syntax error: Nothing before pipe (|)\n");
return { };
return {};
}
do_pipe();
m_state = State::Free;
@ -145,7 +145,7 @@ Vector<Subcommand> Parser::parse()
for (auto& redirection : m_subcommands.last().redirections) {
if (redirection.type == Redirection::Pipe) {
fprintf(stderr, "Syntax error: Nothing after last pipe (|)\n");
return { };
return {};
}
}
}

View file

@ -191,7 +191,7 @@ static bool handle_builtin(int argc, char** argv, int& retval)
class FileDescriptionCollector {
public:
FileDescriptionCollector() { }
FileDescriptionCollector() {}
~FileDescriptionCollector() { collect(); }
void collect()
@ -427,7 +427,6 @@ static int run_command(const String& cmd)
dbgprintf(" %d\n", child);
#endif
int wstatus = 0;
int return_value = 0;
@ -452,7 +451,7 @@ static int run_command(const String& cmd)
printf("Shell: %s(%d) exited abnormally\n", child.name.characters(), child.pid);
}
}
} while(errno == EINTR);
} while (errno == EINTR);
}
// FIXME: Should I really have to tcsetpgrp() after my child has exited?