4 // Selected portions of dlls/util.cpp from SDK 2.1.
5 // Functions copied from there as needed...
6 // And modified to avoid buffer overflows (argh).
10 * Copyright (c) 1999, 2000 Valve LLC. All rights reserved.
12 * This product contains software technology licensed from Id
13 * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
14 * All Rights Reserved.
16 * Use, distribution, and modification of this source code and/or resulting
17 * object code is restricted to non-commercial enhancements to products from
18 * Valve LLC. All other use, distribution, or modification is prohibited
19 * without written permission from Valve LLC.
24 ===== util.cpp ========================================================
26 Utility code. Really not optional after all.
31 #include <enginecallback.h> // ALERT()
33 #include "osdep.h" // win32 vsnprintf, etc
35 //=========================================================
36 // UTIL_LogPrintf - Prints a logged message to console.
37 // Preceded by LOG: ( timestamp ) < message >
38 //=========================================================
39 void UTIL_LogPrintf( char *fmt
, ... )
42 static char string
[1024];
44 va_start ( argptr
, fmt
);
45 vsnprintf ( string
, sizeof(string
), fmt
, argptr
);
48 // Print to server console
49 ALERT( at_logged
, "%s", string
);