diff options
author | Christopher Faylor <me@cgf.cx> | 2012-11-07 16:52:48 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2012-11-07 16:52:48 +0000 |
commit | 61746d6ae850aa6a89b0c0b00c609011c6d0ade9 (patch) | |
tree | 95552490c8ee6f3bf8b0f2d37e61bbc9dafe7a7b /winsup/mingw/mingwex/stdio/sprintf.c | |
parent | 2ca28ea2dc0c397b9a11072e121e1c5b6f87650b (diff) | |
download | cygnal-61746d6ae850aa6a89b0c0b00c609011c6d0ade9.tar.gz cygnal-61746d6ae850aa6a89b0c0b00c609011c6d0ade9.tar.bz2 cygnal-61746d6ae850aa6a89b0c0b00c609011c6d0ade9.zip |
* mingw: Delete obsolete directory.
* w32api: Ditto.
Diffstat (limited to 'winsup/mingw/mingwex/stdio/sprintf.c')
-rw-r--r-- | winsup/mingw/mingwex/stdio/sprintf.c | 68 |
1 files changed, 0 insertions, 68 deletions
diff --git a/winsup/mingw/mingwex/stdio/sprintf.c b/winsup/mingw/mingwex/stdio/sprintf.c deleted file mode 100644 index c3381d3ef..000000000 --- a/winsup/mingw/mingwex/stdio/sprintf.c +++ /dev/null @@ -1,68 +0,0 @@ -/* sprintf.c - * - * $Id$ - * - * Provides an implementation of the "sprintf" function, conforming - * generally to C99 and SUSv3/POSIX specifications, with extensions - * to support Microsoft's non-standard format specifications. This - * is included in libmingwex.a, whence it may replace the Microsoft - * function of the same name. - * - * Written by Keith Marshall <keithmarshall@users.sourceforge.net> - * - * This implementation of "sprintf" will normally be invoked by calling - * "__mingw_sprintf()" in preference to a direct reference to "sprintf()" - * itself; this leaves the MSVCRT implementation as the default, which - * will be deployed when user code invokes "sprint()". Users who then - * wish to use this implementation may either call "__mingw_sprintf()" - * directly, or may use conditional preprocessor defines, to redirect - * references to "sprintf()" to "__mingw_sprintf()". - * - * Compiling this module with "-D INSTALL_AS_DEFAULT" will change this - * recommended convention, such that references to "sprintf()" in user - * code will ALWAYS be redirected to "__mingw_sprintf()"; if this option - * is adopted, then users wishing to use the MSVCRT implementation of - * "sprintf()" will be forced to use a "back-door" mechanism to do so. - * Such a "back-door" mechanism is provided with MinGW, allowing the - * MSVCRT implementation to be called as "__msvcrt_sprintf()"; however, - * since users may not expect this behaviour, a standard libmingwex.a - * installation does not employ this option. - * - * - * This is free software. You may redistribute and/or modify it as you - * see fit, without restriction of copyright. - * - * This software is provided "as is", in the hope that it may be useful, - * but WITHOUT WARRANTY OF ANY KIND, not even any implied warranty of - * MERCHANTABILITY, nor of FITNESS FOR ANY PARTICULAR PURPOSE. At no - * time will the author accept any form of liability for any damages, - * however caused, resulting from the use of this software. - * - */ -#include <stdio.h> -#include <stdarg.h> - -#include "pformat.h" - -int __cdecl __sprintf (char *, const char *, ...) __MINGW_NOTHROW; - -#ifdef INSTALL_AS_DEFAULT -/* - * This implementation is to become the default for calls to sprintf(); - * establish the alias to make this so, forcing users to use the back-door - * __msvcrt_sprintf() reference, to access the original MSVCRT function. - */ -int __cdecl __mingw_alias(sprintf) (char *, const char *, ...) __MINGW_NOTHROW; - -#endif - -int __cdecl __sprintf( char *buf, const char *fmt, ... ) -{ - register int retval; - va_list argv; va_start( argv, fmt ); - buf[retval = __pformat( PFORMAT_NOLIMIT, buf, 0, fmt, argv )] = '\0'; - va_end( argv ); - return retval; -} - -/* $RCSfile$Revision$: end of file */ |