minishell
minishell copied to clipboard
[REFACTOR] Standardize function interfaces in executor and reduce double pointers
- [ ] First merge #339
- Reducing the double pointers makes it more clear when list pointers are not getting moved forward.
- Move going to next cmd_table_node out of
handle_builtin()to make the interface the same ashandle_external_cmd(). - Reuse
get_cmd_table_type_from_list()more often. - Change interface of
is_control_op_cmd_table()to align with its name. - Reduce unnecessary intermediary variables.
- Delete
get_cmd_table_from_list()andget_token_from_list()bc they are unnecessary and the code is even shorter without these function calls.
I'm ok to change this, but I don't feel any different. Do we really need to do that?