2 Commits

Author SHA1 Message Date
lucas 9ea4bf6fd9 vteteour 2026-04-27 00:12:05 +02:00
lucas 082353e0b8 j 2026-04-27 00:08:01 +02:00
7 changed files with 42 additions and 12 deletions
+4 -3
View File
@@ -4,7 +4,7 @@
#include <sys/types.h> #include <sys/types.h>
#include <time.h> #include <time.h>
// FCTs perso // FCTs perso
/*
struct queue *enqueue(struct queue *queue, struct node *node){ struct queue *enqueue(struct queue *queue, struct node *node){
//if (!queue || !node) return NULL; //if (!queue || !node) return NULL;
@@ -53,7 +53,7 @@ void queue_destroy(struct queue *queue){
free(tmp); free(tmp);
} }
} }
*/
void delete_tree(struct node *root){ void delete_tree(struct node *root){
if(!root) return; if(!root) return;
@@ -259,6 +259,7 @@ void pretty_print(struct node *root){
} }
} }
/*
int main(int argc, char *argv[]) { int main(int argc, char *argv[]) {
if (argc == 1) if (argc == 1)
return 1; return 1;
@@ -273,7 +274,7 @@ int main(int argc, char *argv[]) {
delete_tree(root); delete_tree(root);
return 0; return 0;
} }
*/
/* /*
@@ -1,5 +1,6 @@
#include "expansion.h" #include "expansion.h"
char *weird_copy(const char *input){ char *weird_copy(const char *input){
(void) input;
return NULL; return NULL;
} }
+8 -4
View File
@@ -5,17 +5,21 @@
#include <sys/types.h> #include <sys/types.h>
struct node *create_node(const char *line){ struct node *create_node(const char *line){
(void) line;
return NULL; return NULL;
} }
struct node *parse_file(const char *filename){ struct node *parse_file(const char *filename){
(void) filename;
return NULL; return NULL;
} }
void execute_tree(struct node *node, int value){ void execute_tree(struct node *node, int value){
return NULL; (void)node;
} }
int main(int argc, char *argv[]); int main(int argc, char *argv[]){
(void) argc;
(void) argv;
return 1;
}
+6 -2
View File
@@ -1,12 +1,16 @@
#include "vector_tree.h" #include "vector_tree.h"
struct vector *insert(struct vector *tree, int value){ struct vector *insert(struct vector *tree, int value){
(void) tree;
(void) value;
return NULL; return NULL;
} }
void delete_node(struct vector *tree, int value){ void delete_node(struct vector *tree, int value){
(void) tree;
(void) value;
return; return;
} }
void pretty_print(struct vector *tree); void pretty_print(struct vector *tree){ (void) tree;}
@@ -1,3 +1,3 @@
#include "evaluate_rpn.h" #include "evaluate_rpn.h"
int evaluate_rpn(struct queue *queue){return 0 ;} int evaluate_rpn(struct queue *queue){(void) queue;return 0 ;}
+1 -1
View File
@@ -1,3 +1,3 @@
#include "parse_exp.h" #include "parse_exp.h"
struct queue *parse_expression(const char *str){return NULL;} struct queue *parse_expression(const char *str){(void) str;return NULL;}
+20
View File
@@ -0,0 +1,20 @@
#ifndef UTILS_H
#define UTILS_H
union element_type
{
int operand;
char operator;
};
enum element_tag {
TOKEN_OPERAND,
TOKEN_OPERATOR
};
struct expression_element {
enum element_tag tag;
union element_type data;
};
#endif /* ! UTILS_H */