jbe@268: jbe@268: --[[-- jbe@268: data_out, -- string containing stdout data, or nil in case of error jbe@268: data_err, -- string containing error or stderr data jbe@268: status = -- exit code, or negative code in case of abnormal termination jbe@268: extos.pfilter{ jbe@268: data_in = data_in, -- string containing stdin data jbe@268: filename = filename, -- executable jbe@268: arg1 = arg1, -- first (non-zero) argument to executable jbe@268: arg2 = arg2, -- second argument to executable jbe@268: ... jbe@268: } jbe@268: jbe@268: Executes the executable given by "filename", passing optional arguments. A given string may be fed into the program as stdin. On success 3 values are returned: A string containing all stdout data of the sub-process, a string containing all stderr data of the sub-process, and a status code. The status code is negative, if the program didn't terminate normally. By convention a status code of zero indicates success, while positive status codes indicate error conditions. If program execution was not possible at all, then nil is returned as first value and an error string as second value. jbe@268: jbe@268: --]]-- jbe@268: -- implemented in extos.c as jbe@268: -- static int extos_pfilter(lua_State *L) jbe@268: --//-- jbe@268: jbe@268: jbe@268: --[[-- jbe@268: directory_entries = -- table of directory entries jbe@268: extos.listdir{ jbe@268: path = path -- path name jbe@268: } jbe@268: jbe@268: This function returns a table containing strings representing each entry in a directory. On error nil and an error message is returned. jbe@268: jbe@268: --]]-- jbe@268: -- implemented in extos.c as jbe@268: -- static int extos_listdir(lua_State *L) jbe@268: --//-- jbe@268: jbe@268: jbe@268: --[[-- jbe@268: passhash = -- encrypted password jbe@268: extos.crypt{ jbe@268: key = key, -- password to be one-way encrypted jbe@268: salt = salt -- salt to be used for encryption, optionally starting with "$N$", where N is a digit jbe@268: } jbe@268: jbe@268: This function is a wrapper for the C function char *crypt(const char *key, const char *salt). jbe@268: jbe@268: --]]-- jbe@268: -- implemented in extos.c as jbe@268: -- static int extos_crypt(lua_State *L) jbe@268: --//-- jbe@268: jbe@268: jbe@268: --[[-- jbe@268: seconds = jbe@268: extos.hires_time() jbe@268: jbe@268: Returns a unix time stamp representing current time with high resolution. jbe@268: jbe@268: --]]-- jbe@268: -- implemented in extos.c as jbe@268: -- static int extos_hires_time(lua_State *L) jbe@268: --//-- jbe@268: jbe@268: jbe@268: --[[-- jbe@268: seconds = jbe@268: extos.monotonic_hires_time() jbe@268: jbe@268: Returns the number of (SI) seconds since loading the library with high resolution. jbe@268: jbe@268: --]]-- jbe@268: -- implemented in extos.c as jbe@268: -- static int extos_monotonic_hires_time(lua_State *L) jbe@268: --//-- jbe@268: