Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9ea4bf6fd9 | |||
| 082353e0b8 |
@@ -4,7 +4,7 @@
|
||||
#include <sys/types.h>
|
||||
#include <time.h>
|
||||
// FCTs perso
|
||||
|
||||
/*
|
||||
struct queue *enqueue(struct queue *queue, struct node *node){
|
||||
|
||||
//if (!queue || !node) return NULL;
|
||||
@@ -53,7 +53,7 @@ void queue_destroy(struct queue *queue){
|
||||
free(tmp);
|
||||
}
|
||||
}
|
||||
|
||||
*/
|
||||
void delete_tree(struct node *root){
|
||||
|
||||
if(!root) return;
|
||||
@@ -259,6 +259,7 @@ void pretty_print(struct node *root){
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
int main(int argc, char *argv[]) {
|
||||
if (argc == 1)
|
||||
return 1;
|
||||
@@ -273,7 +274,7 @@ int main(int argc, char *argv[]) {
|
||||
delete_tree(root);
|
||||
return 0;
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "expansion.h"
|
||||
|
||||
char *weird_copy(const char *input){
|
||||
(void) input;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -5,17 +5,21 @@
|
||||
#include <sys/types.h>
|
||||
|
||||
struct node *create_node(const char *line){
|
||||
|
||||
(void) line;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
struct node *parse_file(const char *filename){
|
||||
|
||||
(void) filename;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -1,12 +1,16 @@
|
||||
#include "vector_tree.h"
|
||||
|
||||
struct vector *insert(struct vector *tree, int value){
|
||||
|
||||
(void) tree;
|
||||
(void) value;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void delete_node(struct vector *tree, int value){
|
||||
|
||||
(void) tree;
|
||||
(void) value;
|
||||
return;
|
||||
}
|
||||
|
||||
void pretty_print(struct vector *tree);
|
||||
void pretty_print(struct vector *tree){ (void) tree;}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
#include "evaluate_rpn.h"
|
||||
|
||||
int evaluate_rpn(struct queue *queue){return 0 ;}
|
||||
int evaluate_rpn(struct queue *queue){(void) queue;return 0 ;}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
#include "parse_exp.h"
|
||||
|
||||
struct queue *parse_expression(const char *str){return NULL;}
|
||||
struct queue *parse_expression(const char *str){(void) str;return NULL;}
|
||||
|
||||
@@ -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 */
|
||||
Reference in New Issue
Block a user