No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

table_fonctions.h 833B

1234567891011121314151617181920212223242526272829303132333435
  1. //
  2. // Created by Nahom Belay on 29/04/2021.
  3. //
  4. #ifndef PROJET_SYSTEME_TABLE_FONCTIONS_H
  5. #define PROJET_SYSTEME_TABLE_FONCTIONS_H
  6. #define FUNCTION_TABLE_SIZE 50
  7. #define FUNCTION_NAME_SIZE 30
  8. enum Return_Type {RET_INT , RET_INT_PTR};
  9. typedef struct Fonction {
  10. char function_name[FUNCTION_NAME_SIZE];
  11. int start_addr ;
  12. enum Return_Type type;
  13. int function_depth;
  14. } Fonction;
  15. typedef struct Table_Fonctions {
  16. Fonction array[FUNCTION_TABLE_SIZE];
  17. int depth;
  18. } Table_Fonctions;
  19. void initialise_function_table(Table_Fonctions * table);
  20. void add_function(Table_Fonctions * table, char * function_name, enum Return_Type return_type, int start_addr);
  21. void print_fonction_table(Table_Fonctions * table);
  22. int function_exists(Table_Fonctions * table, char * func_name);
  23. #endif //PROJET_SYSTEME_TABLE_FONCTIONS_H