]> git.dkaiser.de - 42/minishell.git/commitdiff
added other token append to remove the error that its not at the start
authorChristopher Uhlig <chuhlig@1-D-24.42heilbronn.de>
Thu, 29 Aug 2024 13:57:14 +0000 (15:57 +0200)
committerChristopher Uhlig <chuhlig@1-D-24.42heilbronn.de>
Thu, 29 Aug 2024 13:57:14 +0000 (15:57 +0200)
src/new_token.c

index 92ff421ddb224a86e0360b4e93eedf61c4720d0f..6431c7d2b39f4f2006d4515403c7ac89264fde4d 100644 (file)
@@ -3,10 +3,10 @@
 /*                                                        :::      ::::::::   */
 /*   new_token.c                                        :+:      :+:    :+:   */
 /*                                                    +:+ +:+         +:+     */
-/*   By: dkaiser <dkaiser@student.42heilbronn.de    +#+  +:+       +#+        */
+/*   By: chuhlig <chuhlig@student.42.fr>            +#+  +:+       +#+        */
 /*                                                +#+#+#+#+#+   +#+           */
 /*   Created: 2024/06/27 14:29:44 by dkaiser           #+#    #+#             */
-/*   Updated: 2024/06/28 14:59:34 by dkaiser          ###   ########.fr       */
+/*   Updated: 2024/08/29 15:30:52 by chuhlig          ###   ########.fr       */
 /*                                                                            */
 /* ************************************************************************** */
 
@@ -50,3 +50,28 @@ t_token      *new_redir_token(int type, t_token *previous, t_token *next)
        token->content.redir_type = type;
        return (token);
 }
+
+// void        ft_append_token(int type, t_token **list)// but we need somewhere token/node head initialize with nul
+// {
+//     t_token *node;
+//     t_token *last_node;
+
+//     if (!list)
+//             return ;
+//     node = malloc(sizeof(t_token));
+//     if (!node)
+//             return ;
+//     node->next = NULL;
+//     node->type = type;
+//     if (!*list)
+//     {
+//             *list = node;
+//             node->previous = NULL;
+//     }
+//     else
+//     {
+//             last_node = ft_lstlast(*list);
+//             last_node->next = node;
+//             node->previous = last_node;
+//     }
+// }
\ No newline at end of file