30 lines
668 B
C
30 lines
668 B
C
#include <stdbool.h>
|
|
|
|
typedef char fix_str[256];
|
|
typedef struct node *nodept;
|
|
typedef struct nodes graph_vec;
|
|
|
|
struct nodes {
|
|
int n;
|
|
int cap;
|
|
nodept node[1000];
|
|
};
|
|
|
|
struct node {
|
|
int num; // le numero de noeud
|
|
int nbs; // nombre de successeurs
|
|
fix_str func; // noms de fonctions
|
|
int cap;
|
|
nodept *succ; // les successeurs
|
|
};
|
|
|
|
struct node *new_node(int num);
|
|
void delete_node(struct node *n);
|
|
void insert_succ(graph_vec *g, int i, int i1, fix_str str);
|
|
graph_vec new_graph(int cap);
|
|
void insert_node(graph_vec *g, fix_str str);
|
|
void delete_graph(graph_vec *g);
|
|
int is_in(graph_vec g, fix_str func);
|
|
void print_node(nodept node);
|
|
void dot_graph(nodept node);
|