From feb5a8a4f2340899708c9f71baf3dcf399556369 Mon Sep 17 00:00:00 2001 From: cacapon Date: Sun, 27 Apr 2025 16:29:40 +0900 Subject: [PATCH 1/3] remove dummy function --- inc/main.h | 4 +--- src/debug.c | 25 ------------------------- 2 files changed, 1 insertion(+), 28 deletions(-) delete mode 100644 src/debug.c diff --git a/inc/main.h b/inc/main.h index d539115..14f4b7e 100644 --- a/inc/main.h +++ b/inc/main.h @@ -6,7 +6,7 @@ /* By: ttsubo +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2025/04/03 12:50:38 by ttsubo #+# #+# */ -/* Updated: 2025/04/25 18:16:36 by ttsubo ### ########.fr */ +/* Updated: 2025/04/27 16:28:37 by ttsubo ### ########.fr */ /* */ /* ************************************************************************** */ @@ -36,6 +36,4 @@ # include # include -t_cmd *parse_command_line(char *line); - #endif diff --git a/src/debug.c b/src/debug.c deleted file mode 100644 index e600607..0000000 --- a/src/debug.c +++ /dev/null @@ -1,25 +0,0 @@ -/* ************************************************************************** */ -/* */ -/* ::: :::::::: */ -/* debug.c :+: :+: :+: */ -/* +:+ +:+ +:+ */ -/* By: ttsubo +#+ +:+ +#+ */ -/* +#+#+#+#+#+ +#+ */ -/* Created: 2025/04/24 12:09:42 by ttsubo #+# #+# */ -/* Updated: 2025/04/24 12:12:26 by ttsubo ### ########.fr */ -/* */ -/* ************************************************************************** */ - -#include "main.h" - -t_cmd *parse_command_line(char *line) -{ - (void)line; - return (NULL); -} - -int invoke_commands(t_cmd *cmd) -{ - (void)cmd; - return (0); -} From 3e978351fb386d090882b27bcb77b3a4129c1399 Mon Sep 17 00:00:00 2001 From: cacapon Date: Sun, 27 Apr 2025 16:32:41 +0900 Subject: [PATCH 2/3] rm _dbg_show_cmd --- src/main.c | 35 ++++------------------------------- 1 file changed, 4 insertions(+), 31 deletions(-) diff --git a/src/main.c b/src/main.c index 4c88f12..ffcbc59 100644 --- a/src/main.c +++ b/src/main.c @@ -6,38 +6,12 @@ /* By: ttsubo +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2025/04/03 12:50:11 by ttsubo #+# #+# */ -/* Updated: 2025/04/25 18:19:42 by ttsubo ### ########.fr */ +/* Updated: 2025/04/27 16:31:53 by ttsubo ### ########.fr */ /* */ /* ************************************************************************** */ #include "main.h" -/** - * @brief debug用 cmdを表示します。 後で削除予定。 - * - * @param tokens - */ -static void _dbg_show_cmd(t_cmd **cmds) -{ - size_t cmd_i; - size_t arg_i; - - cmd_i = 0; - printf("DEBUG: show cmds\n"); - while (cmds[cmd_i]) - { - arg_i = 0; - printf("cmd[%zu]\n", cmd_i); - printf("\tcmd->type=%d\n", cmds[cmd_i]->type); - printf("\tcmd->argc=%d\n", cmds[cmd_i]->argc); - printf("\tcmd->argv=["); - while (cmds[cmd_i]->argv[arg_i]) - printf("%s,", cmds[cmd_i]->argv[arg_i++]); - printf("NULL]\n"); - cmd_i++; - } -} - static void _free_tokens(char **tokens) { int i; @@ -59,9 +33,9 @@ static void destroy_minish(t_minish *minish) } /** - * @brief bool型が利用できるみたいなので、使用してみました。 - * @brief parse_command_lineのプロトタイプを勝手に作成しているので、好きなように改変していただいて大丈夫です - * @param program_nam + * @brief I used bool type since it seems to be available. + * @brief I have created a prototype of parse_command_line on my own, so you can modify it as you like! + * @param program_name * @param minish * @return true * @return false @@ -88,7 +62,6 @@ static bool prompt(char *program_name, t_minish *minish, int *status) } if (cmds[0]->argc > 0) *status = invoke_commands(cmds[0], minish); - _dbg_show_cmd(cmds); _free_tokens(tokens); free_cmds(cmds, cmds_len(cmds)); free(line); From d3807ae4e24eda829350899683e51afa2ae49c33 Mon Sep 17 00:00:00 2001 From: cacapon Date: Sun, 27 Apr 2025 16:34:40 +0900 Subject: [PATCH 3/3] =?UTF-8?q?=E7=8F=BE=E7=8A=B6=E3=81=A8=E5=B7=AE?= =?UTF-8?q?=E7=95=B0=E3=81=8C=E3=81=82=E3=81=A3=E3=81=9F=E3=81=AE=E3=81=A7?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main.c b/src/main.c index ffcbc59..700a756 100644 --- a/src/main.c +++ b/src/main.c @@ -6,7 +6,7 @@ /* By: ttsubo +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2025/04/03 12:50:11 by ttsubo #+# #+# */ -/* Updated: 2025/04/27 16:31:53 by ttsubo ### ########.fr */ +/* Updated: 2025/04/27 16:33:43 by ttsubo ### ########.fr */ /* */ /* ************************************************************************** */ @@ -34,7 +34,6 @@ static void destroy_minish(t_minish *minish) /** * @brief I used bool type since it seems to be available. - * @brief I have created a prototype of parse_command_line on my own, so you can modify it as you like! * @param program_name * @param minish * @return true