From 1fcf54094a915bbc7ec1d74a877699212714ae93 Mon Sep 17 00:00:00 2001 From: Graham Madarasz <graham@lindenlab.com> Date: Wed, 5 Jun 2013 07:24:31 -0700 Subject: [PATCH] BUG-2707 fix comment typos, remove unnecessary winmm_shim changes, and revert 2672 fix included only for local integ test --- doc/contributions.txt | 1 + indra/llcommon/llerror.h | 6 ++---- indra/llui/lltextbase.cpp | 4 ++-- indra/llui/llxuiparser.cpp | 6 ++++-- indra/lscript/lscript_compile/indra.l | 8 +++++--- indra/lscript/lscript_compile/indra.y | 7 +++++++ indra/media_plugins/winmmshim/winmm_shim.cpp | 5 ----- 7 files changed, 21 insertions(+), 16 deletions(-) diff --git a/doc/contributions.txt b/doc/contributions.txt index 8c5bb3d5763..a4d1f6d5919 100755 --- a/doc/contributions.txt +++ b/doc/contributions.txt @@ -901,6 +901,7 @@ Nicky Dasmijn MAINT-873 SUN-72 BUG-2432 + BUG-2707 Nicky Perian OPEN-1 STORM-1087 diff --git a/indra/llcommon/llerror.h b/indra/llcommon/llerror.h index a2a69933300..cc9bfba8182 100755 --- a/indra/llcommon/llerror.h +++ b/indra/llcommon/llerror.h @@ -206,10 +206,8 @@ namespace LLError } #if LL_WINDOWS - // Macro accepting a wchar_t* for display in windows debugging console in debug builds only - // (wchar_t flavor chosen for maximal utility with unicode text debugging) - // - #define LL_WINDOWS_OUTPUT_DEBUG(a) LLError::LLOutputDebugUTF8((a)) + // Macro accepting a const std::string& for display in windows debugging console in debug builds only + #define LL_WINDOWS_OUTPUT_DEBUG(a) LLError::LLOutputDebugUTF8(a) #else #define LL_WINDOWS_OUTPUT_DEBUG(a) #endif diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index a45c4ced2ee..588f8dfc348 100755 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -3207,13 +3207,13 @@ S32 LLNormalTextSegment::getNumChars(S32 num_pixels, S32 segment_offset, S32 lin if(getLength() < segment_offset + mStart) { - llinfos << "getLength() < segment_offset + mStart\t getLength()\t" << getLength() << "\tsegment_offset:\t" + llerrs << "getLength() < segment_offset + mStart\t getLength()\t" << getLength() << "\tsegment_offset:\t" << segment_offset << "\tmStart:\t" << mStart << "\tsegments\t" << mEditor.mSegments.size() << "\tmax_chars\t" << max_chars << llendl; } if(offsetString.length() + 1 < max_chars) { - llinfos << "offsetString.length() + 1 < max_chars\t max_chars:\t" << max_chars << "\toffsetString.length():\t" << offsetString.length() << " getLength() : " + llerrs << "offsetString.length() + 1 < max_chars\t max_chars:\t" << max_chars << "\toffsetString.length():\t" << offsetString.length() << getLength() << "\tsegment_offset:\t" << segment_offset << "\tmStart:\t" << mStart << "\tsegments\t" << mEditor.mSegments.size() << llendl; } diff --git a/indra/llui/llxuiparser.cpp b/indra/llui/llxuiparser.cpp index ee570ce51fb..6322da91235 100755 --- a/indra/llui/llxuiparser.cpp +++ b/indra/llui/llxuiparser.cpp @@ -1309,7 +1309,7 @@ bool LLXUIParser::writeSDValue(Parser& parser, const void* val_ptr, name_stack_t void LLXUIParser::parserWarning(const std::string& message) { #ifdef LL_WINDOWS - // use Visual Studo friendly formatting of output message for easy access to originating xml + // use Visual Studio friendly formatting of output message for easy access to originating xml LL_WINDOWS_OUTPUT_DEBUG(llformat("%s(%d):\t%s", mCurFileName.c_str(), mCurReadNode->getLineNumber(), message.c_str())); #else Parser::parserWarning(message); @@ -1319,6 +1319,7 @@ void LLXUIParser::parserWarning(const std::string& message) void LLXUIParser::parserError(const std::string& message) { #ifdef LL_WINDOWS + // use Visual Studio friendly formatting of output message for easy access to originating xml LL_WINDOWS_OUTPUT_DEBUG(llformat("%s(%d):\t%s", mCurFileName.c_str(), mCurReadNode->getLineNumber(), message.c_str())); #else Parser::parserError(message); @@ -1636,7 +1637,7 @@ bool LLSimpleXUIParser::processText() void LLSimpleXUIParser::parserWarning(const std::string& message) { #ifdef LL_WINDOWS - // use Visual Studo friendly formatting of output message for easy access to originating xml + // use Visual Studio friendly formatting of output message for easy access to originating xml LL_WINDOWS_OUTPUT_DEBUG(llformat("%s(%d):\t%s", mCurFileName.c_str(), LINE_NUMBER_HERE, message.c_str())); #else Parser::parserWarning(message); @@ -1646,6 +1647,7 @@ void LLSimpleXUIParser::parserWarning(const std::string& message) void LLSimpleXUIParser::parserError(const std::string& message) { #ifdef LL_WINDOWS + // use Visual Studio friendly formatting of output message for easy access to originating xml LL_WINDOWS_OUTPUT_DEBUG(llformat("%s(%d):\t%s", mCurFileName.c_str(), LINE_NUMBER_HERE, message.c_str())); #else Parser::parserError(message); diff --git a/indra/lscript/lscript_compile/indra.l b/indra/lscript/lscript_compile/indra.l index 1bb38bbf655..b2c49083cb2 100755 --- a/indra/lscript/lscript_compile/indra.l +++ b/indra/lscript/lscript_compile/indra.l @@ -79,9 +79,11 @@ void parse_string(); #define yyfree indra_free -int yylex( void ); -int yyparse( void ); -int yyerror(const char *fmt, ...); +#if defined(__cplusplus) +extern "C" { int yylex( void ); } +extern "C" { int yyparse( void ); } +extern "C" { int yyerror(const char *fmt, ...); } +#endif %} diff --git a/indra/lscript/lscript_compile/indra.y b/indra/lscript/lscript_compile/indra.y index a0a034d21c2..e4b10ffdd9d 100755 --- a/indra/lscript/lscript_compile/indra.y +++ b/indra/lscript/lscript_compile/indra.y @@ -2,6 +2,10 @@ #include "linden_common.h" #include "lscript_tree.h" + #ifdef __cplusplus + extern "C" { + #endif + int yylex(void); int yyparse( void ); int yyerror(const char *fmt, ...); @@ -16,6 +20,9 @@ #pragma warning( disable : 4065 ) // warning: switch statement contains 'default' but no 'case' labels #endif + #ifdef __cplusplus + } + #endif %} %union diff --git a/indra/media_plugins/winmmshim/winmm_shim.cpp b/indra/media_plugins/winmmshim/winmm_shim.cpp index 9e2e7ad3aa5..47a1e5c0187 100755 --- a/indra/media_plugins/winmmshim/winmm_shim.cpp +++ b/indra/media_plugins/winmmshim/winmm_shim.cpp @@ -61,18 +61,13 @@ void ll_winmm_shim_initialize(){ { // we have a dll, let's get out pointers! initialized = true; init_function_pointers(winmm_handle); -#if defined(_DEBUG) ::OutputDebugStringA("WINMM_SHIM.DLL: real winmm.dll initialized successfully\n"); -#endif } -#if defined(_DEBUG) else { // failed to initialize real winmm.dll ::OutputDebugStringA("WINMM_SHIM.DLL: Failed to initialize real winmm.dll\n"); } -#endif - } LeaveCriticalSection(&sCriticalSection); } -- GitLab