Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
863 B

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================//
  6. #include <windows.h>
  7. #include <stdio.h>
  8. //-----------------------------------------------------------------------------
  9. // Purpose: converts an english string to unicode
  10. //-----------------------------------------------------------------------------
  11. int ConvertANSIToUnicode(const char *ansi, wchar_t *unicode, int unicodeBufferSize)
  12. {
  13. return ::MultiByteToWideChar(CP_ACP, 0, ansi, -1, unicode, unicodeBufferSize);
  14. }
  15. char *va( const char *fmt, ... )
  16. {
  17. va_list args;
  18. static char output[4][1024];
  19. static int outbuffer = 0;
  20. outbuffer++;
  21. va_start( args, fmt );
  22. vprintf( fmt, args );
  23. vsprintf( output[ outbuffer & 3 ], fmt, args );
  24. return output[ outbuffer & 3 ];
  25. }