From 4016c52a38d78f54b601155067acb43e0b97de5e Mon Sep 17 00:00:00 2001 From: David Anderson Date: Wed, 15 Aug 2007 16:21:28 +0000 Subject: [PATCH] - removed some debug stuff - committed msvc8 detection to sm_platform.h - updated comments to FormatTime() --HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401340 --- core/smn_core.cpp | 2 -- plugins/include/sourcemod.inc | 6 +++++- public/sm_platform.h | 3 +++ 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/core/smn_core.cpp b/core/smn_core.cpp index 7733b85d..6c912ba2 100644 --- a/core/smn_core.cpp +++ b/core/smn_core.cpp @@ -114,8 +114,6 @@ void _ignore_invalid_parameter( } #endif -#include "sm_srvcmds.h" - static cell_t FormatTime(IPluginContext *pContext, const cell_t *params) { char *format, *buffer; diff --git a/plugins/include/sourcemod.inc b/plugins/include/sourcemod.inc index 3badbb4d..c07ae657 100644 --- a/plugins/include/sourcemod.inc +++ b/plugins/include/sourcemod.inc @@ -290,13 +290,17 @@ native LogError(const String:format[], any:...); native GetTime(bigStamp[2]={0,0}); /** - * Format date and time. + * Produces a date and/or time string value for a timestamp. + * + * See this URL for valid parameters: + * http://opengroup.org/onlinepubs/007908799/xsh/strftime.html * * @param buffer Destination string buffer. * @param maxlength Maximum length of output string buffer. * @param format Formatting rules. * @param stamp Optional time stamp. * @noreturn + * @error Buffer too small or invalid time format. */ native FormatTime(String:buffer[], maxlength, const String:format[], stamp=-1); diff --git a/public/sm_platform.h b/public/sm_platform.h index 8b23795a..7a8405e3 100644 --- a/public/sm_platform.h +++ b/public/sm_platform.h @@ -57,6 +57,9 @@ #define PLATFORM_SEP_CHAR '\\' #define PLATFORM_SEP_ALTCHAR '/' #define PLATFORM_EXTERN_C extern "C" __declspec(dllexport) +#if defined _MSC_VER && _MSC_VER >= 1400 +#define SUBPLATFORM_SECURECRT +#endif #elif defined __linux__ #define PLATFORM_LINUX #define PLATFORM_POSIX