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