Organisation, documentation, mathlib

This commit is contained in:
2025-08-28 11:11:59 +10:00
parent a9bfc1b0e3
commit 6596bfcc85
13 changed files with 948 additions and 1 deletions

16
extlibs/exec/exec.cpp Normal file
View File

@@ -0,0 +1,16 @@
#include "ground_lib.h"
GroundValue exec(GroundValue* args, int arg_count) {
VALIDATE_ARGS_1(GROUND_STRING);
int exec = system(GET_STRING(args[0]));
return GROUND_INT_VAL(exec);
}
GROUND_LIBRARY_INTERFACE()
GROUND_LIBRARY_INIT()
REGISTER_GROUND_FUNCTION(exec);
GROUND_LIBRARY_INIT_END()
GROUND_LIBRARY_CLEANUP()
GROUND_LIBRARY_CLEANUP_END()