minishell icon indicating copy to clipboard operation
minishell copied to clipboard

[REFACTOR] Standardize function interfaces in executor and reduce double pointers

Open itislu opened this issue 1 year ago • 1 comments

  • [ ] 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 as handle_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() and get_token_from_list() bc they are unnecessary and the code is even shorter without these function calls.

itislu avatar Jun 07 '24 15:06 itislu

I'm ok to change this, but I don't feel any different. Do we really need to do that?

LeaYeh avatar Jun 08 '24 22:06 LeaYeh