[osx] Document isatty().

This commit is contained in:
Lorenzo Cogotti 2022-12-15 19:41:14 +01:00
parent d7cb61142c
commit 9086bbd527
1 changed files with 7 additions and 0 deletions

7
osx.c
View File

@ -802,6 +802,13 @@ static int os_fadvise(lua_State *L)
return os_result(L, ec, NULL);
}
/**
* Test whether an opened file handle references a character device (TTY).
*
* @tparam File f an opened file handle
* @treturn boolean true if file references a character device, false otherwise.
* @function isatty
*/
static int os_isatty(lua_State *L)
{
luaL_Stream *stream = luaL_checkudata(L, 1, LUA_FILEHANDLE);