diff options
Diffstat (limited to 'winsup/mingw/mingwex/stdio')
-rwxr-xr-x | winsup/mingw/mingwex/stdio/fopen64.c | 7 | ||||
-rwxr-xr-x | winsup/mingw/mingwex/stdio/fseeko64.c | 30 | ||||
-rwxr-xr-x | winsup/mingw/mingwex/stdio/ftello64.c | 11 | ||||
-rwxr-xr-x | winsup/mingw/mingwex/stdio/lseek64.c | 8 | ||||
-rw-r--r-- | winsup/mingw/mingwex/stdio/snprintf.c | 13 | ||||
-rw-r--r-- | winsup/mingw/mingwex/stdio/snwprintf.c | 13 | ||||
-rw-r--r-- | winsup/mingw/mingwex/stdio/vfscanf.c | 40 | ||||
-rw-r--r-- | winsup/mingw/mingwex/stdio/vfwscanf.c | 42 | ||||
-rw-r--r-- | winsup/mingw/mingwex/stdio/vscanf.c | 9 | ||||
-rw-r--r-- | winsup/mingw/mingwex/stdio/vsnprintf.c | 5 | ||||
-rw-r--r-- | winsup/mingw/mingwex/stdio/vsnwprintf.c | 5 | ||||
-rw-r--r-- | winsup/mingw/mingwex/stdio/vsscanf.c | 41 | ||||
-rw-r--r-- | winsup/mingw/mingwex/stdio/vswscanf.c | 43 | ||||
-rw-r--r-- | winsup/mingw/mingwex/stdio/vwscanf.c | 10 |
14 files changed, 0 insertions, 277 deletions
diff --git a/winsup/mingw/mingwex/stdio/fopen64.c b/winsup/mingw/mingwex/stdio/fopen64.c deleted file mode 100755 index d1dca885b..000000000 --- a/winsup/mingw/mingwex/stdio/fopen64.c +++ /dev/null @@ -1,7 +0,0 @@ -#include <stdio.h> - -FILE* __cdecl -fopen64 (const char* filename, const char* mode) -{ - return fopen (filename, mode); -} diff --git a/winsup/mingw/mingwex/stdio/fseeko64.c b/winsup/mingw/mingwex/stdio/fseeko64.c deleted file mode 100755 index d8dcc0c44..000000000 --- a/winsup/mingw/mingwex/stdio/fseeko64.c +++ /dev/null @@ -1,30 +0,0 @@ -#include <stdio.h> -#include <io.h> -#include <errno.h> - -int __cdecl -fseeko64 (FILE* stream, off64_t offset, int whence) -{ - fpos_t pos; - if (whence == SEEK_CUR) - { - /* If stream is invalid, fgetpos sets errno. */ - if (fgetpos (stream, &pos)) - return (-1); - pos += (fpos_t) offset; - } - else if (whence == SEEK_END) - { - /* If writing, we need to flush before getting file length. */ - fflush (stream); - pos = (fpos_t) (_filelengthi64 (_fileno (stream)) + offset); - } - else if (whence == SEEK_SET) - pos = (fpos_t) offset; - else - { - errno = EINVAL; - return (-1); - } - return fsetpos (stream, &pos); -} diff --git a/winsup/mingw/mingwex/stdio/ftello64.c b/winsup/mingw/mingwex/stdio/ftello64.c deleted file mode 100755 index 97a388cd6..000000000 --- a/winsup/mingw/mingwex/stdio/ftello64.c +++ /dev/null @@ -1,11 +0,0 @@ -#include <stdio.h> - -off64_t __cdecl -ftello64 (FILE * stream) -{ - fpos_t pos; - if (fgetpos(stream, &pos)) - return -1LL; - else - return ((off64_t) pos); -} diff --git a/winsup/mingw/mingwex/stdio/lseek64.c b/winsup/mingw/mingwex/stdio/lseek64.c deleted file mode 100755 index 8f8bfa5e4..000000000 --- a/winsup/mingw/mingwex/stdio/lseek64.c +++ /dev/null @@ -1,8 +0,0 @@ -#include <io.h> - -off64_t lseek64 -(int fd, off64_t offset, int whence) -{ - return _lseeki64(fd, (__int64) offset, whence); -} - diff --git a/winsup/mingw/mingwex/stdio/snprintf.c b/winsup/mingw/mingwex/stdio/snprintf.c deleted file mode 100644 index c8d2a7b20..000000000 --- a/winsup/mingw/mingwex/stdio/snprintf.c +++ /dev/null @@ -1,13 +0,0 @@ -#include <stdarg.h> -#include <stdio.h> - -int snprintf(char* buffer, size_t n, const char* format, ...) -{ - int retval; - va_list argptr; - - va_start( argptr, format ); - retval = _vsnprintf( buffer, n, format, argptr ); - va_end( argptr ); - return retval; -} diff --git a/winsup/mingw/mingwex/stdio/snwprintf.c b/winsup/mingw/mingwex/stdio/snwprintf.c deleted file mode 100644 index 42b05b292..000000000 --- a/winsup/mingw/mingwex/stdio/snwprintf.c +++ /dev/null @@ -1,13 +0,0 @@ -#include <stdarg.h> -#include <wchar.h> - -int snwprintf(wchar_t* buffer, size_t n, const wchar_t* format, ...) -{ - int retval; - va_list argptr; - - va_start( argptr, format ); - retval = _vsnwprintf( buffer, n, format, argptr ); - va_end( argptr ); - return retval; -} diff --git a/winsup/mingw/mingwex/stdio/vfscanf.c b/winsup/mingw/mingwex/stdio/vfscanf.c deleted file mode 100644 index 3c1b137a8..000000000 --- a/winsup/mingw/mingwex/stdio/vfscanf.c +++ /dev/null @@ -1,40 +0,0 @@ -// By aaronwl 2003-01-28 for mingw-msvcrt -// Public domain: all copyrights disclaimed, absolutely no warranties */ - -#include <stdarg.h> -#include <stdio.h> - -int vfscanf(FILE * __restrict__ stream, const char * __restrict__ format, va_list arg) { - int ret; - - __asm__( - - /* allocate stack (esp += frame - arg3 - (8[arg1,2] + 12)) */ - "movl %%esp, %%ebx\n\t" - "lea 0xFFFFFFEC(%%esp, %6), %%esp\n\t" - "subl %5, %%esp\n\t" - - // set up stack - "movl %1, 0xC(%%esp)\n\t" // stream - "movl %2, 0x10(%%esp)\n\t" // format - "lea 0x14(%%esp), %%edi\n\t" - "movl %%edi, (%%esp)\n\t" // memcpy dest - "movl %5, 0x4(%%esp)\n\t" // memcpy src - "movl %5, 0x8(%%esp)\n\t" - "subl %6, 0x8(%%esp)\n\t" // memcpy len - "call _memcpy\n\t" - "addl $12, %%esp\n\t" - - // call fscanf - "call _fscanf\n\t" - - // restore stack - "movl %%ebx, %%esp\n\t" - - : "=a"(ret), "=c"(stream), "=d"(format) - : "1"(stream), "2"(format), "S"(arg), - "a"(&ret) - : "ebx", "edi"); - - return ret; -} diff --git a/winsup/mingw/mingwex/stdio/vfwscanf.c b/winsup/mingw/mingwex/stdio/vfwscanf.c deleted file mode 100644 index 2a1d095bc..000000000 --- a/winsup/mingw/mingwex/stdio/vfwscanf.c +++ /dev/null @@ -1,42 +0,0 @@ -// By aaronwl 2003-01-28 for mingw-msvcrt. -// Public domain: all copyrights disclaimed, absolutely no warranties. - -#include <stdarg.h> -#include <wchar.h> - -int vfwscanf(FILE * __restrict__ stream, const wchar_t * __restrict__ format, - va_list arg) { - - int ret; - - __asm__( - - // allocate stack (esp += frame - arg3 - (8[arg1,2] + 12)) - "movl %%esp, %%ebx\n\t" - "lea 0xFFFFFFEC(%%esp, %6), %%esp\n\t" - "subl %5, %%esp\n\t" - - // set up stack - "movl %1, 0xC(%%esp)\n\t" // stream - "movl %2, 0x10(%%esp)\n\t" // format - "lea 0x14(%%esp), %%edi\n\t" - "movl %%edi, (%%esp)\n\t" // memcpy dest - "movl %5, 0x4(%%esp)\n\t" // memcpy src - "movl %5, 0x8(%%esp)\n\t" - "subl %6, 0x8(%%esp)\n\t" // memcpy len - "call _memcpy\n\t" - "addl $12, %%esp\n\t" - - // call fscanf - "call _fwscanf\n\t" - - // restore stack - "movl %%ebx, %%esp\n\t" - - : "=a"(ret), "=c"(stream), "=d"(format) - : "1"(stream), "2"(format), "S"(arg), - "a"(&ret) - : "ebx", "edi"); - - return ret; -} diff --git a/winsup/mingw/mingwex/stdio/vscanf.c b/winsup/mingw/mingwex/stdio/vscanf.c deleted file mode 100644 index 53f543442..000000000 --- a/winsup/mingw/mingwex/stdio/vscanf.c +++ /dev/null @@ -1,9 +0,0 @@ -// By aaronwl 2003-01-28 for mingw-msvcrt -// Public domain: all copyrights disclaimed, absolutely no warranties - -#include <stdarg.h> -#include <stdio.h> - -int vscanf(const char * __restrict__ format, va_list arg) { - return vfscanf(stdin, format, arg); -} diff --git a/winsup/mingw/mingwex/stdio/vsnprintf.c b/winsup/mingw/mingwex/stdio/vsnprintf.c deleted file mode 100644 index f3dce5b67..000000000 --- a/winsup/mingw/mingwex/stdio/vsnprintf.c +++ /dev/null @@ -1,5 +0,0 @@ -#include <stdarg.h> -#include <stdio.h> - -int vsnprintf (char* s, size_t n, const char* format, va_list arg) - { return _vsnprintf ( s, n, format, arg); } diff --git a/winsup/mingw/mingwex/stdio/vsnwprintf.c b/winsup/mingw/mingwex/stdio/vsnwprintf.c deleted file mode 100644 index 1b59a078b..000000000 --- a/winsup/mingw/mingwex/stdio/vsnwprintf.c +++ /dev/null @@ -1,5 +0,0 @@ -#include <stdarg.h> -#include <wchar.h> - -int vsnwprintf(wchar_t *buffer, size_t n, const wchar_t * format, va_list argptr) - { return _vsnwprintf( buffer, n, format, argptr );} diff --git a/winsup/mingw/mingwex/stdio/vsscanf.c b/winsup/mingw/mingwex/stdio/vsscanf.c deleted file mode 100644 index f59490d3b..000000000 --- a/winsup/mingw/mingwex/stdio/vsscanf.c +++ /dev/null @@ -1,41 +0,0 @@ -// By aaronwl 2003-01-28 for mingw-msvcrt. -// Public domain: all copyrights disclaimed, absolutely no warranties. - -#include <stdarg.h> -#include <stdio.h> - - -int vsscanf(const char * __restrict__ s, const char * __restrict__ format, va_list arg) { - int ret; - - __asm__( - - // allocate stack (esp += frame - arg3 - (8[arg1,2] + 12)) - "movl %%esp, %%ebx\n\t" - "lea 0xFFFFFFEC(%%esp, %6), %%esp\n\t" - "subl %5, %%esp\n\t" - - // set up stack - "movl %1, 0xC(%%esp)\n\t" // s - "movl %2, 0x10(%%esp)\n\t" // format - "lea 0x14(%%esp), %%edi\n\t" - "movl %%edi, (%%esp)\n\t" // memcpy dest - "movl %5, 0x4(%%esp)\n\t" // memcpy src - "movl %5, 0x8(%%esp)\n\t" - "subl %6, 0x8(%%esp)\n\t" // memcpy len - "call _memcpy\n\t" - "addl $12, %%esp\n\t" - - // call sscanf - "call _sscanf\n\t" - - // restore stack - "movl %%ebx, %%esp\n\t" - - : "=a"(ret), "=c"(s), "=d"(format) - : "1"(s), "2"(format), "S"(arg), - "a"(&ret) - : "ebx", "edi"); - - return ret; -} diff --git a/winsup/mingw/mingwex/stdio/vswscanf.c b/winsup/mingw/mingwex/stdio/vswscanf.c deleted file mode 100644 index ea359f3e6..000000000 --- a/winsup/mingw/mingwex/stdio/vswscanf.c +++ /dev/null @@ -1,43 +0,0 @@ -// By aaronwl 2003-01-28 for mingw-msvcrt -// Public domain: all copyrights disclaimed, absolutely no warranties */ - -#include <stdarg.h> -#include <wchar.h> - - -int vswscanf(const wchar_t * __restrict__ s, const wchar_t * __restrict__ format, - va_list arg) { - - int ret; - - __asm__( - - // allocate stack (esp += frame - arg3 - (8[arg1,2] + 12)) - "movl %%esp, %%ebx\n\t" - "lea 0xFFFFFFEC(%%esp, %6), %%esp\n\t" - "subl %5, %%esp\n\t" - - // set up stack - "movl %1, 0xC(%%esp)\n\t" // s - "movl %2, 0x10(%%esp)\n\t" // format - "lea 0x14(%%esp), %%edi\n\t" - "movl %%edi, (%%esp)\n\t" // memcpy dest - "movl %5, 0x4(%%esp)\n\t" // memcpy src - "movl %5, 0x8(%%esp)\n\t" - "subl %6, 0x8(%%esp)\n\t" // memcpy len - "call _memcpy\n\t" - "addl $12, %%esp\n\t" - - // call sscanf - "call _swscanf\n\t" - - // restore stack - "movl %%ebx, %%esp\n\t" - - : "=a"(ret), "=c"(s), "=d"(format) - : "1"(s), "2"(format), "S"(arg), - "a"(&ret) - : "ebx", "edi"); - - return ret; -} diff --git a/winsup/mingw/mingwex/stdio/vwscanf.c b/winsup/mingw/mingwex/stdio/vwscanf.c deleted file mode 100644 index 0b20e2ee4..000000000 --- a/winsup/mingw/mingwex/stdio/vwscanf.c +++ /dev/null @@ -1,10 +0,0 @@ -// By aaronwl 2003-01-28 for mingw-msvcrt. -// Public domain: all copyrights disclaimed, absolutely no warranties. - -#include <stdarg.h> -#include <wchar.h> -#include <stdio.h> - -int vwscanf(const wchar_t * __restrict__ format, va_list arg) { - return vfwscanf(stdin, format, arg); -} |