aboutsummaryrefslogtreecommitdiff
path: root/src/praise_the_norme.c
diff options
context:
space:
mode:
authorDominik Kaiser2025-01-20 18:41:55 +0100
committerDominik Kaiser2025-01-20 18:41:55 +0100
commit4e249399780b53dad6fa1bf6db8a7c6d32ee2d13 (patch)
tree21ec55386702455222d320cbf270f3c2065ccc3a /src/praise_the_norme.c
parenteceed405102e019b1f001751de60f5534be0a0ef (diff)
downloadminishell-4e249399780b53dad6fa1bf6db8a7c6d32ee2d13.tar.gz
minishell-4e249399780b53dad6fa1bf6db8a7c6d32ee2d13.zip
I love the norme sooooooooooo much!!!!
Diffstat (limited to 'src/praise_the_norme.c')
-rw-r--r--src/praise_the_norme.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/praise_the_norme.c b/src/praise_the_norme.c
new file mode 100644
index 0000000..a22843b
--- /dev/null
+++ b/src/praise_the_norme.c
@@ -0,0 +1,30 @@
+/* ************************************************************************** */
+/* */
+/* ::: :::::::: */
+/* praise_the_norme.c :+: :+: :+: */
+/* +:+ +:+ +:+ */
+/* By: dkaiser <dkaiser@student.42heilbronn.de +#+ +:+ +#+ */
+/* +#+#+#+#+#+ +#+ */
+/* Created: 2025/01/20 18:35:41 by dkaiser #+# #+# */
+/* Updated: 2025/01/20 18:39:31 by dkaiser ### ########.fr */
+/* */
+/* ************************************************************************** */
+
+#include "minishell.h"
+
+void i_love_the_norme(t_token **cur, t_token **tokens)
+{
+ t_token *next_token;
+
+ next_token = (*cur)->next;
+ free_token_and_connect(*cur);
+ if (next_token)
+ {
+ if (next_token->previous == NULL)
+ *tokens = next_token->next;
+ *cur = next_token->next;
+ free_token_and_connect(next_token);
+ }
+ else
+ *cur = NULL;
+}