diff options
author | midipix <writeonce@midipix.org> | 2018-07-15 12:16:36 -0400 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2018-07-15 12:18:48 -0400 |
commit | 71f809d21ce73dffecf370a761a83d892504465b (patch) | |
tree | 3d39c2c422f75832d08f9b356a9152daf95377db /src/internal/ntux_ntaio_impl.c | |
parent | 395925f40dbea1073f89dd9d852c944cbd779ffa (diff) | |
download | ntux-71f809d21ce73dffecf370a761a83d892504465b.tar.bz2 ntux-71f809d21ce73dffecf370a761a83d892504465b.tar.xz |
internals: removed the surrogate streams layer, as it is no longer needed.
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); -} |