manager.c 613 B

12345678910111213141516171819202122
  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 importClibCore(char *file, struct LinkValue *belong, FUNC_CORE){
  15. for (struct InFo *info = ManagerInFo; info->name != NULL; info++) {
  16. if (eqString(file, info->name))
  17. info->reg(CR_FUNC(belong, var_list));
  18. }
  19. }