- Added #CURRENTSECTION# variable.

For instance:
-----
[Variables]
Var=#CURRENTSECTION#

[StyleString]
Text=#CURRENTSECTION#

[MeterString]
Meter=String
MeterStyle=StyleString
Prefix="#CURRENTSECTION# / "
Postfix=" / #Var#"
-----
Displays:
MeterString / MeterString / Variables

- Additional changes for r677.
* Obsoleted DebugLog(). Use LogWithArgs() with LOG_DEBUG instead.
* Added Log().
This commit is contained in:
spx
2010-12-20 08:57:37 +00:00
parent c50f1c27f2
commit f4bfe8f4fc
13 changed files with 88 additions and 108 deletions

View File

@ -605,28 +605,9 @@ void RmNullCRTInvalidParameterHandler(const wchar_t* expression, const wchar_t*
// Do nothing.
}
// DebugLog function preserved to comply with lines 32-36 in Litestep.h,
// it is unclear whether they/it are required or used.
void DebugLog(const WCHAR* format, ... )
void Log(int nLevel, const WCHAR* message)
{
WCHAR buffer[4096];
va_list args;
va_start( args, format );
_invalid_parameter_handler oldHandler = _set_invalid_parameter_handler(RmNullCRTInvalidParameterHandler);
_CrtSetReportMode(_CRT_ASSERT, 0);
errno = 0;
_vsnwprintf_s( buffer, _TRUNCATE, format, args );
if (errno != 0)
{
_snwprintf_s(buffer, _TRUNCATE, L"DebugLog internal error: %s", format);
}
_set_invalid_parameter_handler(oldHandler);
LSLog(LOG_DEBUG, L"Rainmeter", buffer);
va_end(args);
LSLog(nLevel, L"Rainmeter", message);
}
void LogWithArgs(int nLevel, const WCHAR* format, ... )