diff --git a/util_fns.cc b/util_fns.cc index acebdb0..fb8b82f 100644 --- a/util_fns.cc +++ b/util_fns.cc @@ -55,7 +55,7 @@ void check_cmd_io(simple_command *cmd) { } return; } - else { + // else { if (cmd->infile != "") { cmd->infd = open(cmd->infile.c_str(), O_RDONLY); if (cmd->infd < 0) { @@ -81,14 +81,12 @@ void check_cmd_io(simple_command *cmd) { } } else cmd->outfd = 1; - } + // } } - - // http://www.gnu.org/software/libc/manual/html_node/Wordexp-Example.html int expand_and_execute (simple_command *cmd) { const char *program = cmd->vargs[0].c_str(); diff --git a/util_fns.h b/util_fns.h index 104f92b..00e7e33 100644 --- a/util_fns.h +++ b/util_fns.h @@ -8,6 +8,7 @@ #include using namespace std; + // method definitions void ctrlCHandler(int sig); vector split(const char *str, char c = ' '); @@ -17,4 +18,5 @@ void check_cmd_io(simple_command *cmd); int expand_and_execute (simple_command *cmd); bool remap_pipe_stdin_stdout(int rpipe, int wpipe); + #endif