1 /* 2 * COPYRIGHT: GNU GPL, see COPYING in the top level directory 3 * PROJECT: ReactOS crt library 4 * FILE: lib/sdk/crt/printf/_vscprintf.c 5 * PURPOSE: Implementation of _vscprintf 6 */ 7 8 #include <stdio.h> 9 #include <stdarg.h> 10 11 int __cdecl streamout(FILE *stream, const char *format, va_list argptr); 12 13 int 14 _vscprintf( 15 const char *format, 16 va_list argptr) 17 { 18 int ret; 19 FILE* nulfile = fopen("nul", "w"); 20 if(nulfile == NULL) 21 { 22 /* This should never happen... */ 23 return -1; 24 } 25 ret = streamout(nulfile, format, argptr); 26 fclose(nulfile); 27 return ret; 28 } 29