From: Lukas Jiriste Date: Fri, 21 Jun 2024 11:03:35 +0000 (+0200) Subject: Improve formatting of ft_parsing_table_printf X-Git-Url: https://git.ljiriste.work/?a=commitdiff_plain;h=e3a37f0ef57189e628b8e64f96abff56d9cb065a;p=Libft.git Improve formatting of ft_parsing_table_printf The token names in the output header are now limitedr to the column width. --- diff --git a/ft_parse/ft_parsing_table_print.c b/ft_parse/ft_parsing_table_print.c index 141130c..2f6dd0e 100644 --- a/ft_parse/ft_parsing_table_print.c +++ b/ft_parse/ft_parsing_table_print.c @@ -6,7 +6,7 @@ /* By: ljiriste +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/06/16 07:19:50 by ljiriste #+# #+# */ -/* Updated: 2024/06/20 12:51:30 by ljiriste ### ########.fr */ +/* Updated: 2024/06/21 12:20:22 by ljiriste ### ########.fr */ /* */ /* ************************************************************************** */ @@ -79,7 +79,7 @@ void ft_parsing_table_print(t_parsing_table *table, i = 0; ft_printf("\n%-5s ", "State"); while (i < table->tokens.size) - ft_printf("%-*s ", column_width - 1, + ft_printf("%-*.*s ", column_width - 1, column_width - 1, ((t_token *)ft_vec_access(&table->tokens, i++))->type); ft_printf("\n"); i = 0;