├── ExternFunc.c ├── ExternFunc.h └── Readme.txt /ExternFunc.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KimAlittleStar/ExternFunc/1318580e7a362868dbe2747f35479297d4f940a1/ExternFunc.c -------------------------------------------------------------------------------- /ExternFunc.h: -------------------------------------------------------------------------------- 1 | #ifndef EXTERNFUNC_H_INCLUDED 2 | #define EXTERNFUNC_H_INCLUDED 3 | 4 | #include "stdio.h" 5 | #include "string.h" 6 | 7 | typedef struct 8 | { 9 | const char * FuncName; 10 | void *( (*func)(void* args,...)); 11 | const char * fmt; 12 | const char * Introduction; 13 | } CALLFUNCTIONTABLE; 14 | 15 | #define EXPOTRFUNC(NAME,FUNC,FTM,INTRO) {#NAME,(void *(*)(void* args,...))FUNC,#FTM,#INTRO} 16 | 17 | extern const CALLFUNCTIONTABLE functable[]; 18 | 19 | void ExternFunc_excute(char* str); 20 | 21 | 22 | #endif // EXTERNFUNC_H_INCLUDED 23 | -------------------------------------------------------------------------------- /Readme.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KimAlittleStar/ExternFunc/1318580e7a362868dbe2747f35479297d4f940a1/Readme.txt --------------------------------------------------------------------------------