Added optional os.* library, fixed cosmoB_loadLibrary

- os.time() returns the UNIX Epoch time in seconds
- os.read() reads file and returns the data as a <string> object
This commit is contained in:
2021-02-10 17:10:03 -06:00
parent 7db0782991
commit cfb4df66f9
3 changed files with 90 additions and 3 deletions

View File

@@ -13,10 +13,16 @@ COSMO_API void cosmoB_loadLibrary(CState *state);
/* loads the base object library, including:
- object.ischild or <obj>:ischild()
- object.__proto (allows grabbing and setting proto objects)
*/
COSMO_API void cosmoB_loadObjLib(CState *state);
/* loads the os library, including:
- os.read()
- os.time()
*/
COSMO_API void cosmoB_loadOSLib(CState *state);
/* loads the base string library, including:
- string.sub & <string>:sub()
- stirng.find & <string>:find()