FunctionMap.h 479 B

1234567891011121314151617181920212223
  1. #ifndef FUNCTIONMAP_H
  2. #define FUNCTIONMAP_H
  3. #include <stdbool.h>
  4. typedef struct Function {
  5. const char* name;
  6. int arguments;
  7. int address;
  8. } Function;
  9. typedef struct FunctionMap {
  10. int capacity;
  11. int entries;
  12. Function* data;
  13. } FunctionMap;
  14. void fmInit(FunctionMap* fm);
  15. void fmDelete(FunctionMap* fm);
  16. int fmSearchAddress(FunctionMap* fm, const char* name, int arguments);
  17. bool fmAdd(FunctionMap* fm, const char* name, int arguments, int address);
  18. #endif