diff options
Diffstat (limited to 'src/internal/ntux_ntaio_impl.c')
-rw-r--r-- | src/internal/ntux_ntaio_impl.c | 64 |
1 files changed, 0 insertions, 64 deletions
diff --git a/src/internal/ntux_ntaio_impl.c b/src/internal/ntux_ntaio_impl.c index a1a4d8e..772df64 100644 --- a/src/internal/ntux_ntaio_impl.c +++ b/src/internal/ntux_ntaio_impl.c @@ -10,60 +10,6 @@ extern const ntapi_vtbl * ntux_ntapi; -typedef struct ntux_file { - void * hany; -} FILE; - -int ntux_fputs(const char * str, FILE * file) -{ - ssize_t ret; - size_t size; - size_t nbytes; - - size = ntux_ntapi->tt_string_null_offset_multibyte(str); - nbytes = size; - - while (nbytes) { - ret = __sys_write( - (int)(intptr_t)file, - str,nbytes); - - if (ret == -EINTR) - (void)0; - - else if (ret < 0) - return -1; - - else { - str += ret; - nbytes -= ret; - } - } - - /* all done */ - return (int)size; -} - -int ntux_fprintf(FILE * file, const char * fmt, ...) -{ - va_list ap; - char * str; - size_t buffer[32768/sizeof(size_t)]; - - ntux_ntapi->tt_aligned_block_memset( - buffer,0,sizeof(buffer)); - - str = (char *)buffer; - - va_start(ap, fmt); - ntux_ntapi->vsnprintf(str, sizeof(buffer), fmt, ap); - va_end(ap); - - str[sizeof(buffer)-1] = 0; - - return ntux_fputs(str,file); -} - int ntux_sprintf(char * str, const char * fmt, ...) { int ret; @@ -107,13 +53,3 @@ int ntux_isatty(int fildes) else return 0; } - -int ntux_fileno(void * any) -{ - return (int)(intptr_t)any; -} - -int ntux_fflush(FILE * file) -{ - return __sys_fsync((int)(intptr_t)file); -} |