manager.c 628 B

123456789101112131415161718192021
  1. #include "__virtualmath.h"
  2. #include "clib.h"
  3. static struct InFo{
  4. char *name;
  5. Registered reg;
  6. } ManagerInFo[] = {{"sys", registeredSysFunction},
  7. {NULL, NULL}};
  8. bool checkCLib(char *file) {
  9. for (struct InFo *info = ManagerInFo; info->name != NULL; info++)
  10. if (eqString(file, info->name))
  11. return true;
  12. return false;
  13. }
  14. void runClib(char *file, struct LinkValue *belong, INTER_FUNCTIONSIG_CORE){
  15. for (struct InFo *info = ManagerInFo; info->name != NULL; info++)
  16. if (eqString(file, info->name))
  17. info->reg(CALL_REGISTERED_FUNCTION(belong, var_list));
  18. }