/***********************************************************/
/* ntux: native translation und extension */
/* Copyright (C) 2016--2021 SysDeer Technologies, LLC */
/* Released under GPLv2 and GPLv3; see COPYING.NTUX. */
/***********************************************************/
#include <psxabi/sys_sysapi.h>
#include <psxabi/sys_errno.h>
#include <psxxfi/xfi_base.h>
#include <psxxfi/xfi_acl.h>
#include <ntapi/nt_memory.h>
#include <ntapi/nt_file.h>
#include <ntapi/nt_process.h>
int ntux_sprintf(char * str, const char * fmt, ...)
{
int ret;
va_list ap;
va_start(ap, fmt);
ret = __xfi_vsprintf(str, fmt, ap);
va_end(ap);
return ret;
}
int ntux_snprintf(char * str, size_t n, const char * fmt, ...)
{
int ret;
va_list ap;
va_start(ap, fmt);
ret = __xfi_vsnprintf(str, n, fmt, ap);
va_end(ap);
return ret;
}
int ntux_isatty(int fildes)
{
return __xfi_get_runtime_data_file_type(fildes) == NT_FILE_TYPE_PTY;
}