Team Fortress 2 Source Code as on 22/4/2020
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.

32 lines
866 B

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $Workfile: $
  6. // $NoKeywords: $
  7. //=============================================================================//
  8. #include <stdarg.h>
  9. #include "gameui_util.h"
  10. #include "strtools.h"
  11. // memdbgon must be the last include file in a .cpp file!!!
  12. #include "tier0/memdbgon.h"
  13. //-----------------------------------------------------------------------------
  14. // Purpose: Performs a var args printf into a static return buffer
  15. // Input : *format -
  16. // ... -
  17. // Output : char
  18. //-----------------------------------------------------------------------------
  19. char *VarArgs( const char *format, ... )
  20. {
  21. va_list argptr;
  22. static char string[1024];
  23. va_start (argptr, format);
  24. Q_vsnprintf (string, sizeof( string ), format,argptr);
  25. va_end (argptr);
  26. return string;
  27. }