Commit f7d9ccdadd7359f1b6e0113d955eca4b6dd30318

Authored by mertz
1 parent 66021509

ajout_libtree

Showing 2 changed files with 42 additions and 0 deletions   Show diff stats
tree.c 0 → 100644
... ... @@ -0,0 +1,23 @@
  1 +#include "trees.h"
  2 +
  3 +/*
  4 +typedef struct node {
  5 + int val;
  6 + struct node* fils[];
  7 +}Node, *PtNode, *Tree;
  8 + */
  9 +
  10 +void cons_tree(struct node **, int, struct node *)
  11 +{
  12 +
  13 +}
  14 +
  15 +void mk_empty_tree(struct node **);
  16 +
  17 +int is_leaf(struct node *);
  18 +
  19 +void add(struct node **, int);
  20 +
  21 +void load_tree(FILE *, struct node **);
  22 +
  23 +void free_tree(struct node **);
... ...
tree.h 0 → 100644
... ... @@ -0,0 +1,19 @@
  1 +#include <stdio.h>
  2 +#include <stdlib.h>
  3 +
  4 +typedef struct node {
  5 + int val;
  6 + struct node* fils[];
  7 +}Node, *PtNode, *Tree;
  8 +
  9 +void cons_tree(struct node **, int, struct node *);
  10 +
  11 +void mk_empty_tree(struct node **);
  12 +
  13 +int is_leaf(struct node *);
  14 +
  15 +void add(struct node **, int);
  16 +
  17 +void load_tree(FILE *, struct node **);
  18 +
  19 +void free_tree(struct node **);
... ...