This repository has been archived on 2026-01-21. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
ground-old/extlibs/exec.cpp

17 lines
361 B
C++

#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()