#include <stdlib.h>
#include <time.h>
#include <ctype.h>
+#include <cstddef>
+
#ifdef WIN32 // mac doesn't have malloc.h
#include <malloc.h> // for _alloca()
#endif
extern "C" {
#endif
-void QDECL Com_sprintf( char *dest, int size, const char *fmt, ... );
+void QDECL Com_sprintf( char *dest, std::size_t size, const char *fmt, ... );
// mode parm for FS_FOpenFile
char *Q_strrchr( const char* string, int c );
// buffer size safe library replacements
-void Q_strncpyz( char *dest, const char *src, int destsize );
-void Q_strcat( char *dest, int size, const char *src );
+void Q_strncpyz( char *dest, const char *src, std::size_t destsize );
+void Q_strcat( char *dest, std::size_t size, const char *src );
// strlen that discounts Quake color sequences
int Q_PrintStrlen( const char *string );