1234567891011121314151617181920212223242526272829303132333435363738 |
- #ifndef FUNCTIONMAP_H
- #define FUNCTIONMAP_H
- #include <stdbool.h>
- typedef struct {
- const char* name;
- int arguments;
- int address;
- bool returns;
- } Function;
- typedef struct {
- const char* name;
- int arguments;
- int line;
- int reserved;
- bool noReturn;
- } LingeringFunction;
- typedef struct {
- int capacity;
- int entries;
- Function* data;
- int queueCapacity;
- int queueEntries;
- LingeringFunction* queue;
- } FunctionMap;
- void fmInit(FunctionMap* fm);
- void fmDelete(FunctionMap* fm);
- Function* fmSearch(FunctionMap* fm, const char* name, int arguments);
- bool fmAdd(FunctionMap* fm, const char* name, int arguments, int address,
- bool returns);
- void fmEnqueue(FunctionMap* fm, const char* name, int arguments, int line,
- int reserved, bool noReturn);
- #endif
|