summaryrefslogtreecommitdiffstats
path: root/crashrep
diff options
context:
space:
mode:
Diffstat (limited to 'crashrep')
-rwxr-xr-xcrashrep/prj/build.lst2
-rw-r--r--[-rwxr-xr-x]crashrep/source/unx/main.cxx32
-rwxr-xr-xcrashrep/source/unx/makefile.mk3
-rw-r--r--[-rwxr-xr-x]crashrep/source/win32/base64.cpp3
-rw-r--r--[-rwxr-xr-x]crashrep/source/win32/base64.h2
-rwxr-xr-xcrashrep/source/win32/makefile.mk5
-rwxr-xr-xcrashrep/source/win32/rcheader.txt22
-rw-r--r--[-rwxr-xr-x]crashrep/source/win32/resource.h3
-rw-r--r--[-rwxr-xr-x]crashrep/source/win32/soreport.cpp210
9 files changed, 135 insertions, 147 deletions
diff --git a/crashrep/prj/build.lst b/crashrep/prj/build.lst
index 6e4b552c6585..ac6218b793f4 100755
--- a/crashrep/prj/build.lst
+++ b/crashrep/prj/build.lst
@@ -1,4 +1,4 @@
-cr crashrep : L10N:l10n sal sysui SO:tools shell NULL
+cr crashrep : L10N:l10n sal sysui shell NULL
cr crashrep usr1 - all cr_mkout NULL
cr crashrep\source\all nmake - all cr_sresource NULL
cr crashrep\source\unx nmake - u cr_sunx NULL
diff --git a/crashrep/source/unx/main.cxx b/crashrep/source/unx/main.cxx
index 7579de78ec94..7c7df75ec53e 100755..100644
--- a/crashrep/source/unx/main.cxx
+++ b/crashrep/source/unx/main.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,7 +30,6 @@
#include <sys/utsname.h>
#include <_version.h>
#include <errno.h>
-#include <string>
#include <string.h>
#include <assert.h>
@@ -40,7 +40,7 @@
#include <pthread.h>
#include <limits.h>
-#include <hash_map>
+#include <boost/unordered_map.hpp>
#include <vector>
#include <string>
@@ -148,7 +148,7 @@ static string xml_encode( const string &rString )
string temp = rString;
string::size_type pos = 0;
- // First replace all occurences of '&' because it may occur in further
+ // First replace all occurrences of '&' because it may occur in further
// encoded chardters too
for( pos = 0; (pos = temp.find( '&', pos )) != string::npos; pos += 4 )
@@ -182,7 +182,7 @@ static size_t fcopy( FILE *fpout, FILE *fpin )
from which it can be reviewed and sent
*/
-bool write_report( const hash_map< string, string >& rSettings )
+bool write_report( const boost::unordered_map< string, string >& rSettings )
{
FILE *fp = fopen( tmpnam( g_szReportFile ), "w" );
const char *pszUserType = getenv( "STAROFFICE_USERTYPE" );
@@ -249,7 +249,7 @@ bool write_report( const hash_map< string, string >& rSettings )
}
-bool write_description( const hash_map< string, string >& rSettings )
+bool write_description( const boost::unordered_map< string, string >& rSettings )
{
bool bSuccess = false;
FILE *fp = fopen( tmpnam( g_szDescriptionFile ), "w" );
@@ -267,17 +267,17 @@ bool write_description( const hash_map< string, string >& rSettings )
#if 0
// unused
-static void printSettings( const hash_map<string,string>& rSettings )
+static void printSettings( const boost::unordered_map<string,string>& rSettings )
{
printf( "Settings:\n" );
- for( hash_map<string,string>::const_iterator it = rSettings.begin(); it != rSettings.end(); ++it )
+ for( boost::unordered_map<string,string>::const_iterator it = rSettings.begin(); it != rSettings.end(); ++it )
{
printf( "%s=\"%s\"\n", it->first.c_str(), it->second.c_str() );
}
}
#endif
-bool save_crash_report( const string& rFileName, const hash_map< string, string >& /*rSettings*/ )
+bool save_crash_report( const string& rFileName, const boost::unordered_map< string, string >& /*rSettings*/ )
{
bool bSuccess = false;
FILE *fpout = fopen( rFileName.c_str(), "w" );
@@ -493,7 +493,7 @@ struct RequestParams
};
-bool send_crash_report( const hash_map< string, string >& rSettings )
+bool send_crash_report( const boost::unordered_map< string, string >& rSettings )
{
if ( 0 == strcasecmp( rSettings.find( "CONTACT" )->second.c_str(), "true" ) &&
!trim_string(rSettings.find( "EMAIL" )->second).length() )
@@ -557,7 +557,7 @@ static bool append_file( const char *filename, string& rString )
return true;
}
-string crash_get_details( const hash_map< string, string >& rSettings )
+string crash_get_details( const boost::unordered_map< string, string >& rSettings )
{
string aRet;
@@ -911,7 +911,7 @@ static bool write_crash_data()
#if 0
// unused
-static bool write_settings( const hash_map< string, string >& rSettings )
+static bool write_settings( const boost::unordered_map< string, string >& rSettings )
{
bool success = false;
string sRCFile = get_home_dir();
@@ -936,7 +936,7 @@ static bool write_settings( const hash_map< string, string >& rSettings )
}
#endif
-static void read_settings( hash_map< string, string >& rSettings )
+static void read_settings( boost::unordered_map< string, string >& rSettings )
{
string sRCFile = get_home_dir();
@@ -952,7 +952,7 @@ static void read_settings( hash_map< string, string >& rSettings )
rSettings[ "TITLE" ] = "";
}
-static void read_settings_from_environment( hash_map< string, string >& rSettings )
+static void read_settings_from_environment( boost::unordered_map< string, string >& rSettings )
{
string strEnv;
@@ -1071,7 +1071,7 @@ int main( int argc, char** argv )
if ( g_bSendReport )
{
- hash_map< string, string > aDialogSettings;
+ boost::unordered_map< string, string > aDialogSettings;
read_settings( aDialogSettings );
read_settings_from_environment( aDialogSettings );
@@ -1080,7 +1080,7 @@ int main( int argc, char** argv )
}
else
{
- hash_map< string, string > aDialogSettings;
+ boost::unordered_map< string, string > aDialogSettings;
read_settings( aDialogSettings );
read_settings_from_environment( aDialogSettings );
@@ -1120,3 +1120,5 @@ int main( int argc, char** argv )
return -1;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/crashrep/source/unx/makefile.mk b/crashrep/source/unx/makefile.mk
index 8383f682443c..d0d04ff58361 100755
--- a/crashrep/source/unx/makefile.mk
+++ b/crashrep/source/unx/makefile.mk
@@ -56,7 +56,8 @@ APP1TARGET=$(TARGET)
APP1OBJS=$(OBJFILES)
APP1RPATH=BRAND
-.IF "$(OS)" != "FREEBSD" && "$(OS)" != "MACOSX" && "$(OS)"!="NETBSD"
+.IF "$(OS)" != "FREEBSD" && "$(OS)" != "MACOSX" && "$(OS)"!="NETBSD" && \
+ "$(OS)" != "DRAGONFLY"
APP1STDLIBS+=-ldl -lnsl
.ENDIF
.IF "$(OS)" == "SOLARIS"
diff --git a/crashrep/source/win32/base64.cpp b/crashrep/source/win32/base64.cpp
index dd30ce4d5d16..82d54fb4e16d 100755..100644
--- a/crashrep/source/win32/base64.cpp
+++ b/crashrep/source/win32/base64.cpp
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -81,3 +82,5 @@ extern "C" size_t base64_encode( FILE *fin, FILE *fout )
return nBytesWritten;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/crashrep/source/win32/base64.h b/crashrep/source/win32/base64.h
index d6ab0e2760d2..241899563802 100755..100644
--- a/crashrep/source/win32/base64.h
+++ b/crashrep/source/win32/base64.h
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -43,3 +44,4 @@ size_t base64_encode( FILE *fin, FILE *fout );
#endif /* __BASE64_H */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/crashrep/source/win32/makefile.mk b/crashrep/source/win32/makefile.mk
index fe4078c08602..2f8aef7239a8 100755
--- a/crashrep/source/win32/makefile.mk
+++ b/crashrep/source/win32/makefile.mk
@@ -61,8 +61,6 @@ APP1NOSAL=TRUE
APP1TARGET=$(TARGET)
APP1RPATH=BRAND
-#SHL1STDLIBS=$(SALLIB)
-
STDLIB1=\
$(SALLIB)\
$(GDI32LIB)\
@@ -71,7 +69,8 @@ STDLIB1=\
$(ADVAPI32LIB)\
$(WSOCK32LIB)\
$(SHELL32LIB)\
- $(DBGHELPLIB)
+ $(DBGHELPLIB)\
+ psapi.lib
APP1NOSVRES=$(RES)$/$(TARGET).res
diff --git a/crashrep/source/win32/rcheader.txt b/crashrep/source/win32/rcheader.txt
index afecc9cda681..22821e5f9a6b 100755
--- a/crashrep/source/win32/rcheader.txt
+++ b/crashrep/source/win32/rcheader.txt
@@ -65,28 +65,11 @@ VS_VERSION_INFO versioninfo
VS_FF_PRERELEASE |
#endif
0
-#ifndef WIN32
- fileos VOS_DOS_WINDOWS16
-#else
fileos VOS_NT_WINDOWS32
-#endif
filetype VFT_APP
{
block "StringFileInfo"
{
-#ifdef LG_D
- block "040704E4"
- {
- // German StringTable
- value "CompanyName", "OpenOffice.org\0"
- value "FileDescription", "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\0"
- value "FileVersion", PPS(VER_LEVEL) "\0"
- value "ProductVersion", PPS(VER_LEVEL) "\0"
- value "OriginalFilename", "SOREPORT.EXE\0"
- value "InternalName", "CrashReport\0"
- value "LegalCopyright", S_CRIGHT " Sun Microsystems, Inc.\0"
- }
-#else
block "040904E4"
{
// International StringTable
@@ -98,16 +81,11 @@ VS_VERSION_INFO versioninfo
value "InternalName", "CrashReport\0"
value "LegalCopyright", S_CRIGHT " Sun Microsystems, Inc.\0"
}
-#endif
}
block "VarFileInfo"
{
-#ifdef LG_D
- value "Translation", 0x0407, 1252
-#else
value "Translation", 0x0409, 1252
-#endif
}
}
diff --git a/crashrep/source/win32/resource.h b/crashrep/source/win32/resource.h
index 21d4ba4e6617..57befff2b8d7 100755..100644
--- a/crashrep/source/win32/resource.h
+++ b/crashrep/source/win32/resource.h
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -118,3 +119,5 @@
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/crashrep/source/win32/soreport.cpp b/crashrep/source/win32/soreport.cpp
index abca528dc987..e37913e90bf9 100755..100644
--- a/crashrep/source/win32/soreport.cpp
+++ b/crashrep/source/win32/soreport.cpp
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -69,7 +70,7 @@
#include <io.h>
#include <fcntl.h>
#include <string>
-#include <hash_map>
+#include <boost/unordered_map.hpp>
#include <winsock.h>
#include <malloc.h>
#include <process.h>
@@ -154,7 +155,7 @@ static FILE *_tmpfile(void)
TCHAR szTempPath[MAX_PATH];
- if ( GetTempPath( elementsof(szTempPath), szTempPath ) )
+ if ( GetTempPath( SAL_N_ELEMENTS(szTempPath), szTempPath ) )
{
TCHAR szFileName[MAX_PATH];
@@ -183,12 +184,12 @@ static FILE *_tmpfile(void)
static BOOL GetCrashDataPath( LPTSTR szBuffer )
{
- ::rtl::OUString ustrValue = ::rtl::OUString::createFromAscii("${$BRAND_BASE_DIR/program/bootstrap.ini:UserInstallation}");
+ ::rtl::OUString ustrValue(RTL_CONSTASCII_USTRINGPARAM("${$BRAND_BASE_DIR/program/bootstrap.ini:UserInstallation}"));
::rtl::Bootstrap::expandMacros( ustrValue );
if ( ustrValue.getLength() )
{
- ustrValue += ::rtl::OUString::createFromAscii("/user/crashdata");
+ ustrValue += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/user/crashdata"));
::osl::FileBase::RC result = ::osl::Directory::createPath( ustrValue );
@@ -396,27 +397,27 @@ void CrashReportParams::ReadFromEnvironment()
{
TCHAR szBuffer[2048];
- DWORD dwResult = GetEnvironmentVariable( TEXT("ERRORREPORT_HTTPPROXYSERVER"), szBuffer, elementsof(szBuffer) );
+ DWORD dwResult = GetEnvironmentVariable( TEXT("ERRORREPORT_HTTPPROXYSERVER"), szBuffer, SAL_N_ELEMENTS(szBuffer) );
- if ( dwResult && dwResult < elementsof(szBuffer) )
+ if ( dwResult && dwResult < SAL_N_ELEMENTS(szBuffer) )
sProxyServer = szBuffer;
- dwResult = GetEnvironmentVariable( TEXT("ERRORREPORT_HTTPPROXYPORT"), szBuffer, elementsof(szBuffer) );
+ dwResult = GetEnvironmentVariable( TEXT("ERRORREPORT_HTTPPROXYPORT"), szBuffer, SAL_N_ELEMENTS(szBuffer) );
- if ( dwResult && dwResult < elementsof(szBuffer) )
+ if ( dwResult && dwResult < SAL_N_ELEMENTS(szBuffer) )
sProxyPort = szBuffer;
- dwResult = GetEnvironmentVariable( TEXT("ERRORREPORT_RETURNADDRESS"), szBuffer, elementsof(szBuffer) );
+ dwResult = GetEnvironmentVariable( TEXT("ERRORREPORT_RETURNADDRESS"), szBuffer, SAL_N_ELEMENTS(szBuffer) );
- if ( dwResult && dwResult < elementsof(szBuffer) )
+ if ( dwResult && dwResult < SAL_N_ELEMENTS(szBuffer) )
{
sEmail = szBuffer;
// fAllowContact = TRUE;
}
- dwResult = GetEnvironmentVariable( TEXT("ERRORREPORT_HTTPCONNECTIONTYPE"), szBuffer, elementsof(szBuffer) );
+ dwResult = GetEnvironmentVariable( TEXT("ERRORREPORT_HTTPCONNECTIONTYPE"), szBuffer, SAL_N_ELEMENTS(szBuffer) );
- if ( dwResult && dwResult < elementsof(szBuffer) )
+ if ( dwResult && dwResult < SAL_N_ELEMENTS(szBuffer) )
{
if ( 0 == _tcsicmp( szBuffer, _T("DIRECT") ) )
uInternetConnection = 1;
@@ -426,15 +427,15 @@ void CrashReportParams::ReadFromEnvironment()
uInternetConnection = 0;
}
- dwResult = GetEnvironmentVariable( TEXT("ERRORREPORT_SUBJECT"), szBuffer, elementsof(szBuffer) );
+ dwResult = GetEnvironmentVariable( TEXT("ERRORREPORT_SUBJECT"), szBuffer, SAL_N_ELEMENTS(szBuffer) );
- if ( dwResult && dwResult < elementsof(szBuffer) )
+ if ( dwResult && dwResult < SAL_N_ELEMENTS(szBuffer) )
sTitle = szBuffer;
- dwResult = GetEnvironmentVariable( TEXT("ERRORREPORT_BODYFILE"), szBuffer, elementsof(szBuffer) );
+ dwResult = GetEnvironmentVariable( TEXT("ERRORREPORT_BODYFILE"), szBuffer, SAL_N_ELEMENTS(szBuffer) );
- if ( dwResult && dwResult < elementsof(szBuffer) )
+ if ( dwResult && dwResult < SAL_N_ELEMENTS(szBuffer) )
{
FILE *fp = _xfopen( szBuffer, _T("rb") );
@@ -445,11 +446,11 @@ void CrashReportParams::ReadFromEnvironment()
sComment = TEXT("");
- while ( 0 != (nBytesRead = fread( aUTF8Buffer, sizeof(aUTF8Buffer[0]), elementsof(aUTF8Buffer), fp )) )
+ while ( 0 != (nBytesRead = fread( aUTF8Buffer, sizeof(aUTF8Buffer[0]), SAL_N_ELEMENTS(aUTF8Buffer), fp )) )
{
TCHAR aBuffer[256+1];
- DWORD dwCharacters = MultiByteToWideChar( CP_UTF8, 0, aUTF8Buffer, nBytesRead, aBuffer, elementsof(aBuffer) - 1 );
+ DWORD dwCharacters = MultiByteToWideChar( CP_UTF8, 0, aUTF8Buffer, nBytesRead, aBuffer, SAL_N_ELEMENTS(aBuffer) - 1 );
aBuffer[dwCharacters] = 0;
sComment += aBuffer;
}
@@ -512,7 +513,7 @@ static int LoadAndFormatString( HINSTANCE hInstance, UINT uID, LPTSTR lpBuffer,
TCHAR szBuffer[FORMATBUFSIZE];
TCHAR szBuffer2[FORMATBUFSIZE];
- LoadString( hInstance, uID, szBuffer, elementsof(szBuffer) );
+ LoadString( hInstance, uID, szBuffer, SAL_N_ELEMENTS(szBuffer) );
LPCTSTR src;
LPTSTR dest;
@@ -569,7 +570,7 @@ static string xml_encode( const string &rString )
string temp = rString;
string::size_type pos = 0;
- // First replace all occurences of '&' because it may occur in further
+ // First replace all occurrences of '&' because it may occur in further
// encoded chardters too
for( pos = 0; (pos = temp.find( '&', pos )) != string::npos; pos += 4 )
@@ -621,7 +622,7 @@ static string GetModuleDirectory( HMODULE hModule )
CHAR szModuleNameUTF8[MAX_PATH] = "";
- WideCharToMultiByte( CP_UTF8, 0, szModuleName, -1, szModuleNameUTF8, elementsof(szModuleNameUTF8), NULL, NULL );
+ WideCharToMultiByte( CP_UTF8, 0, szModuleName, -1, szModuleNameUTF8, SAL_N_ELEMENTS(szModuleNameUTF8), NULL, NULL );
return string( szModuleNameUTF8 );
}
@@ -660,7 +661,7 @@ BOOL WriteReportFile( CrashReportParams *pParams )
BOOL fSuccess = FALSE;
TCHAR szTempPath[MAX_PATH];
- if ( GetTempPath( elementsof(szTempPath), szTempPath ) )
+ if ( GetTempPath( SAL_N_ELEMENTS(szTempPath), szTempPath ) )
{
TCHAR szFileName[MAX_PATH];
@@ -899,10 +900,10 @@ BOOL CALLBACK PreviewDialogProc(
HINSTANCE hInstance = (HINSTANCE)GetWindowLong( hwndDlg, GWL_HINSTANCE );
HWND hwndParent = (HWND)GetWindowLong( hwndDlg, GWL_HWNDPARENT );
- GetWindowText( hwndParent, szBuffer, elementsof(szBuffer) );
+ GetWindowText( hwndParent, szBuffer, SAL_N_ELEMENTS(szBuffer) );
SetWindowText( hwndDlg, szBuffer );
- LoadAndFormatString( hInstance, IDS_OK_BUTTON, szBuffer, elementsof(szBuffer) );
+ LoadAndFormatString( hInstance, IDS_OK_BUTTON, szBuffer, SAL_N_ELEMENTS(szBuffer) );
Button_SetText( GetDlgItem(hwndDlg, IDOK), szBuffer );
basic_string<TCHAR> aString;
@@ -918,11 +919,11 @@ BOOL CALLBACK PreviewDialogProc(
{
char buf[1024];
- while ( fgets( buf, elementsof(buf), fp ) != NULL )
+ while ( fgets( buf, SAL_N_ELEMENTS(buf), fp ) != NULL )
{
WCHAR bufW[1024];
- MultiByteToWideChar( CP_UTF8, 0, buf, -1, bufW, elementsof(bufW) );
+ MultiByteToWideChar( CP_UTF8, 0, buf, -1, bufW, SAL_N_ELEMENTS(bufW) );
aString.append( bufW );
}
@@ -943,16 +944,16 @@ BOOL CALLBACK PreviewDialogProc(
{
int i;
- count = fread( buf, sizeof(buf[0]), sizeof(buf)/sizeof(buf[0]), fp );
+ count = fread( buf, sizeof(buf[0]), SAL_N_ELEMENTS(buf), fp );
for ( i = 0; i < count; i++ )
{
TCHAR output[16];
- _sntprintf( output, elementsof(output), _T("%02X\x20"), buf[i] );
+ _sntprintf( output, SAL_N_ELEMENTS(output), _T("%02X\x20"), buf[i] );
aString.append( output );
}
- for ( ; i < elementsof(buf); i++ )
+ for ( ; i < SAL_N_ELEMENTS(buf); i++ )
{
aString.append( _T("\x20\x20\x20") );
}
@@ -1051,31 +1052,31 @@ BOOL CALLBACK OptionsDialogProc(
pParams = (CrashReportParams *)lParam;
- LoadAndFormatString( hInstance, IDS_OPTIONS_CAPTION, szBuffer, elementsof(szBuffer) );
+ LoadAndFormatString( hInstance, IDS_OPTIONS_CAPTION, szBuffer, SAL_N_ELEMENTS(szBuffer) );
SetWindowText( hwndDlg, szBuffer );
- LoadAndFormatString( hInstance, IDS_PROXY_SETTINGS_HEADER, szBuffer, elementsof(szBuffer) );
+ LoadAndFormatString( hInstance, IDS_PROXY_SETTINGS_HEADER, szBuffer, SAL_N_ELEMENTS(szBuffer) );
Static_SetText( GetDlgItem(hwndDlg, IDC_PROXY_SETTINGS), szBuffer );
- LoadAndFormatString( hInstance, IDS_PROXY_SYSTEM, szBuffer, elementsof(szBuffer) );
+ LoadAndFormatString( hInstance, IDS_PROXY_SYSTEM, szBuffer, SAL_N_ELEMENTS(szBuffer) );
Button_SetText( GetDlgItem(hwndDlg, IDC_RADIO_SYSTEM), szBuffer );
- LoadAndFormatString( hInstance, IDS_PROXY_DIRECT, szBuffer, elementsof(szBuffer) );
+ LoadAndFormatString( hInstance, IDS_PROXY_DIRECT, szBuffer, SAL_N_ELEMENTS(szBuffer) );
Button_SetText( GetDlgItem(hwndDlg, IDC_RADIO_DIRECT), szBuffer );
- LoadAndFormatString( hInstance, IDS_PROXY_MANUAL, szBuffer, elementsof(szBuffer) );
+ LoadAndFormatString( hInstance, IDS_PROXY_MANUAL, szBuffer, SAL_N_ELEMENTS(szBuffer) );
Button_SetText( GetDlgItem(hwndDlg, IDC_RADIO_MANUAL), szBuffer );
- LoadAndFormatString( hInstance, IDS_LABEL_PROXYSERVER, szBuffer, elementsof(szBuffer) );
+ LoadAndFormatString( hInstance, IDS_LABEL_PROXYSERVER, szBuffer, SAL_N_ELEMENTS(szBuffer) );
Static_SetText( GetDlgItem(hwndDlg, IDC_LABEL_PROXYSERVER), szBuffer );
- LoadAndFormatString( hInstance, IDS_LABEL_PROXYPORT, szBuffer, elementsof(szBuffer) );
+ LoadAndFormatString( hInstance, IDS_LABEL_PROXYPORT, szBuffer, SAL_N_ELEMENTS(szBuffer) );
Static_SetText( GetDlgItem(hwndDlg, IDC_LABEL_PROXYPORT), szBuffer );
- LoadAndFormatString( hInstance, IDS_OK_BUTTON, szBuffer, elementsof(szBuffer) );
+ LoadAndFormatString( hInstance, IDS_OK_BUTTON, szBuffer, SAL_N_ELEMENTS(szBuffer) );
Button_SetText( GetDlgItem(hwndDlg, IDOK), szBuffer );
- LoadAndFormatString( hInstance, IDS_CANCEL_BUTTON, szBuffer, elementsof(szBuffer) );
+ LoadAndFormatString( hInstance, IDS_CANCEL_BUTTON, szBuffer, SAL_N_ELEMENTS(szBuffer) );
Button_SetText( GetDlgItem(hwndDlg, IDCANCEL), szBuffer );
Edit_SetText( GetDlgItem(hwndDlg, IDC_EDIT_PROXYSERVER), pParams->sProxyServer.c_str() );
@@ -1088,7 +1089,7 @@ BOOL CALLBACK OptionsDialogProc(
EM_SETBKGNDCOLOR,
(WPARAM)FALSE,
GetSysColor( COLOR_3DFACE ) );
- LoadAndFormatString( hInstance, IDS_PROXY_DESCRIPTION, szBuffer, elementsof(szBuffer) );
+ LoadAndFormatString( hInstance, IDS_PROXY_DESCRIPTION, szBuffer, SAL_N_ELEMENTS(szBuffer) );
Edit_SetText( GetDlgItem(hwndDlg, IDC_PROXY_DESCRIPTION), szBuffer );
UpdateOptionsDialogControls( hwndDlg );
@@ -1107,10 +1108,10 @@ BOOL CALLBACK OptionsDialogProc(
{
TCHAR szBuffer[1024];
- Edit_GetText( GetDlgItem(hwndDlg, IDC_EDIT_PROXYSERVER), szBuffer, elementsof(szBuffer) );
+ Edit_GetText( GetDlgItem(hwndDlg, IDC_EDIT_PROXYSERVER), szBuffer, SAL_N_ELEMENTS(szBuffer) );
pParams->sProxyServer = szBuffer;
- Edit_GetText( GetDlgItem(hwndDlg, IDC_EDIT_PROXYPORT), szBuffer, elementsof(szBuffer) );
+ Edit_GetText( GetDlgItem(hwndDlg, IDC_EDIT_PROXYPORT), szBuffer, SAL_N_ELEMENTS(szBuffer) );
pParams->sProxyPort = szBuffer;
if ( Button_GetCheck( GetDlgItem(hwndDlg, IDC_RADIO_DIRECT) ) & BST_CHECKED )
@@ -1177,21 +1178,21 @@ BOOL CALLBACK ReportDialogProc(
HINSTANCE hInstance = (HINSTANCE)GetWindowLong(hwndDlg, GWL_HINSTANCE );
TCHAR szBuffer[FORMATBUFSIZE];
- LoadAndFormatString( hInstance, IDS_REPORT_INTRO, szBuffer, elementsof(szBuffer) );
+ LoadAndFormatString( hInstance, IDS_REPORT_INTRO, szBuffer, SAL_N_ELEMENTS(szBuffer) );
Static_SetText( GetDlgItem(hwndDlg, IDC_REPORT_INTRO), szBuffer );
Edit_SetText( GetDlgItem(hwndDlg, IDC_EDIT3), szBuffer );
- LoadAndFormatString( hInstance, IDS_ENTER_TITLE, szBuffer, elementsof(szBuffer) );
+ LoadAndFormatString( hInstance, IDS_ENTER_TITLE, szBuffer, SAL_N_ELEMENTS(szBuffer) );
Static_SetText( GetDlgItem(hwndDlg, IDC_ENTER_TITLE), szBuffer );
- LoadAndFormatString( hInstance, IDS_ENTER_DESCRIPTION, szBuffer, elementsof(szBuffer) );
+ LoadAndFormatString( hInstance, IDS_ENTER_DESCRIPTION, szBuffer, SAL_N_ELEMENTS(szBuffer) );
Static_SetText( GetDlgItem(hwndDlg, IDC_ENTER_DESCRIPTION), szBuffer );
- LoadAndFormatString( hInstance, IDS_SHOW_REPORT_BUTTON, szBuffer, elementsof(szBuffer) );
+ LoadAndFormatString( hInstance, IDS_SHOW_REPORT_BUTTON, szBuffer, SAL_N_ELEMENTS(szBuffer) );
Button_SetText( GetDlgItem(hwndDlg, IDC_SHOW_REPORT), szBuffer );
- LoadAndFormatString( hInstance, IDS_SAVE_REPORT_BUTTON, szBuffer, elementsof(szBuffer) );
+ LoadAndFormatString( hInstance, IDS_SAVE_REPORT_BUTTON, szBuffer, SAL_N_ELEMENTS(szBuffer) );
Button_SetText( GetDlgItem(hwndDlg, IDC_SAVE_REPORT), szBuffer );
const char *pszUserType = getenv( "STAROFFICE_USERTYPE" );
@@ -1200,14 +1201,14 @@ BOOL CALLBACK ReportDialogProc(
else
ShowWindow( GetDlgItem(hwndDlg, IDC_SAVE_REPORT), SW_HIDE );
- LoadAndFormatString( hInstance, IDS_OPTIONS_BUTTON, szBuffer, elementsof(szBuffer) );
+ LoadAndFormatString( hInstance, IDS_OPTIONS_BUTTON, szBuffer, SAL_N_ELEMENTS(szBuffer) );
Button_SetText( GetDlgItem(hwndDlg, IDC_OPTIONS), szBuffer );
- LoadAndFormatString( hInstance, IDS_ALLOW_CONTACT, szBuffer, elementsof(szBuffer) );
+ LoadAndFormatString( hInstance, IDS_ALLOW_CONTACT, szBuffer, SAL_N_ELEMENTS(szBuffer) );
Button_SetText( GetDlgItem(hwndDlg, IDC_ALLOW_CONTACT), szBuffer );
Button_SetCheck( GetDlgItem(hwndDlg, IDC_ALLOW_CONTACT), pParams->fAllowContact ? BST_CHECKED : BST_UNCHECKED );
- LoadAndFormatString( hInstance, IDS_LABEL_EMAIL, szBuffer, elementsof(szBuffer) );
+ LoadAndFormatString( hInstance, IDS_LABEL_EMAIL, szBuffer, SAL_N_ELEMENTS(szBuffer) );
Button_SetText( GetDlgItem(hwndDlg, IDC_LABEL_EMAIL), szBuffer );
Edit_SetText( GetDlgItem(hwndDlg, IDC_EDIT_EMAIL), pParams->sEmail.c_str() );
@@ -1222,13 +1223,13 @@ BOOL CALLBACK ReportDialogProc(
CrashReportParams *pParams = (CrashReportParams*)GetWindowLong( GetParent(hwndDlg), GWL_USERDATA );
TCHAR szBuffer[FORMATBUFSIZE];
- LoadAndFormatString( hInstance, IDS_REPORT_CAPTION, szBuffer, elementsof(szBuffer) );
+ LoadAndFormatString( hInstance, IDS_REPORT_CAPTION, szBuffer, SAL_N_ELEMENTS(szBuffer) );
SetWindowText( GetParent(hwndDlg), szBuffer );
- LoadAndFormatString( hInstance, IDS_REPORT_HEADER, szBuffer, elementsof(szBuffer) );
+ LoadAndFormatString( hInstance, IDS_REPORT_HEADER, szBuffer, SAL_N_ELEMENTS(szBuffer) );
SetWindowText( GetDlgItem(GetParent(hwndDlg), IDC_HEADER), szBuffer );
- LoadAndFormatString( hInstance, IDS_DONOT_SEND_BUTTON, szBuffer, elementsof(szBuffer) );
+ LoadAndFormatString( hInstance, IDS_DONOT_SEND_BUTTON, szBuffer, SAL_N_ELEMENTS(szBuffer) );
Button_SetText( GetDlgItem(GetParent(hwndDlg), IDCANCEL), szBuffer );
@@ -1259,13 +1260,13 @@ BOOL CALLBACK ReportDialogProc(
pParams->fAllowContact = Button_GetCheck( GetDlgItem(hwndDlg, IDC_ALLOW_CONTACT) ) ? TRUE : FALSE;
- Edit_GetText( GetDlgItem(hwndDlg, IDC_EDIT_TITLE), szBuffer, elementsof(szBuffer) );
+ Edit_GetText( GetDlgItem(hwndDlg, IDC_EDIT_TITLE), szBuffer, SAL_N_ELEMENTS(szBuffer) );
pParams->sTitle = szBuffer;
- Edit_GetText( GetDlgItem(hwndDlg, IDC_EDIT_DESCRIPTION), szBuffer, elementsof(szBuffer) );
+ Edit_GetText( GetDlgItem(hwndDlg, IDC_EDIT_DESCRIPTION), szBuffer, SAL_N_ELEMENTS(szBuffer) );
pParams->sComment = szBuffer;
- Edit_GetText( GetDlgItem(hwndDlg, IDC_EDIT_EMAIL), szBuffer, elementsof(szBuffer) );
+ Edit_GetText( GetDlgItem(hwndDlg, IDC_EDIT_EMAIL), szBuffer, SAL_N_ELEMENTS(szBuffer) );
pParams->sEmail = szBuffer;
PreviewReport( GetParent(hwndDlg), pParams );
@@ -1316,16 +1317,16 @@ BOOL CALLBACK WelcomeDialogProc( HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM
SendMessage( hwndRichEdit, EM_SETEVENTMASK, 0, ENM_LINK );
SendMessage( hwndRichEdit, EM_AUTOURLDETECT, TRUE, 0 );
- LoadAndFormatString( hInstance, IDS_WELCOME_BODY1, szBuffer, elementsof(szBuffer) );
- LoadAndFormatString( hInstance, IDS_WELCOME_BODY2, szBuffer2, elementsof(szBuffer2) );
- _tcsncat( szBuffer, szBuffer2, elementsof(szBuffer) );
- LoadAndFormatString( hInstance, IDS_WELCOME_BODY3, szBuffer2, elementsof(szBuffer2) );
- _tcsncat( szBuffer, szBuffer2, elementsof(szBuffer) );
- LoadString( hInstance, IDS_PRIVACY_URL, szURL, elementsof(szURL) );
- _tcsncat( szBuffer, szURL, elementsof(szBuffer) );
+ LoadAndFormatString( hInstance, IDS_WELCOME_BODY1, szBuffer, SAL_N_ELEMENTS(szBuffer) );
+ LoadAndFormatString( hInstance, IDS_WELCOME_BODY2, szBuffer2, SAL_N_ELEMENTS(szBuffer2) );
+ _tcsncat( szBuffer, szBuffer2, SAL_N_ELEMENTS(szBuffer) );
+ LoadAndFormatString( hInstance, IDS_WELCOME_BODY3, szBuffer2, SAL_N_ELEMENTS(szBuffer2) );
+ _tcsncat( szBuffer, szBuffer2, SAL_N_ELEMENTS(szBuffer) );
+ LoadString( hInstance, IDS_PRIVACY_URL, szURL, SAL_N_ELEMENTS(szURL) );
+ _tcsncat( szBuffer, szURL, SAL_N_ELEMENTS(szBuffer) );
SetWindowText( hwndRichEdit, szBuffer );
- LoadAndFormatString( hInstance, IDS_WELCOME_CAPTION, szCaption, elementsof(szCaption) );
+ LoadAndFormatString( hInstance, IDS_WELCOME_CAPTION, szCaption, SAL_N_ELEMENTS(szCaption) );
SetWindowText( GetParent(hwndDlg), szCaption );
}
@@ -1336,13 +1337,13 @@ BOOL CALLBACK WelcomeDialogProc( HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM
HINSTANCE hInstance = (HINSTANCE)GetWindowLong(hwndDlg, GWL_HINSTANCE );
TCHAR szBuffer[FORMATBUFSIZE];
- LoadAndFormatString( hInstance, IDS_WELCOME_CAPTION, szBuffer, elementsof(szBuffer) );
+ LoadAndFormatString( hInstance, IDS_WELCOME_CAPTION, szBuffer, SAL_N_ELEMENTS(szBuffer) );
SetWindowText( GetParent(hwndDlg), szBuffer );
- LoadAndFormatString( hInstance, IDS_WELCOME_HEADER, szBuffer, elementsof(szBuffer) );
+ LoadAndFormatString( hInstance, IDS_WELCOME_HEADER, szBuffer, SAL_N_ELEMENTS(szBuffer) );
SetWindowText( GetDlgItem(GetParent(hwndDlg), IDC_HEADER), szBuffer );
- LoadAndFormatString( hInstance, IDS_CANCEL_BUTTON, szBuffer, elementsof(szBuffer) );
+ LoadAndFormatString( hInstance, IDS_CANCEL_BUTTON, szBuffer, SAL_N_ELEMENTS(szBuffer) );
Button_SetText( GetDlgItem(GetParent(hwndDlg), IDCANCEL), szBuffer );
ShowWindow( GetDlgItem(GetParent(hwndDlg),IDBACK), FALSE );
@@ -1421,16 +1422,16 @@ BOOL CALLBACK DialogProc( HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam
SCF_ALL,
(LPARAM)&chfmt );
- LoadAndFormatString( hInstance, IDS_CANCEL_BUTTON, szBuffer, elementsof(szBuffer) );
+ LoadAndFormatString( hInstance, IDS_CANCEL_BUTTON, szBuffer, SAL_N_ELEMENTS(szBuffer) );
Button_SetText( GetDlgItem(hwndDlg, IDCANCEL), szBuffer );
- LoadAndFormatString( hInstance, IDS_NEXT_BUTTON, szBuffer, elementsof(szBuffer) );
+ LoadAndFormatString( hInstance, IDS_NEXT_BUTTON, szBuffer, SAL_N_ELEMENTS(szBuffer) );
Button_SetText( GetDlgItem(hwndDlg, IDNEXT), szBuffer );
- LoadAndFormatString( hInstance, IDS_SEND_BUTTON, szBuffer, elementsof(szBuffer) );
+ LoadAndFormatString( hInstance, IDS_SEND_BUTTON, szBuffer, SAL_N_ELEMENTS(szBuffer) );
Button_SetText( GetDlgItem(hwndDlg, IDFINISH), szBuffer );
- LoadAndFormatString( hInstance, IDS_BACK_BUTTON, szBuffer, elementsof(szBuffer) );
+ LoadAndFormatString( hInstance, IDS_BACK_BUTTON, szBuffer, SAL_N_ELEMENTS(szBuffer) );
Button_SetText( GetDlgItem(hwndDlg, IDBACK), szBuffer );
ShowWindow( hwndPages[1], SW_HIDE );
@@ -1453,7 +1454,7 @@ BOOL CALLBACK DialogProc( HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam
}
return TRUE;
case IDNEXT:
- if ( iActualPage < elementsof(hwndPages) - 1 )
+ if ( iActualPage < SAL_N_ELEMENTS(hwndPages) - 1 )
{
ShowWindow( hwndPages[iActualPage], SW_HIDE );
ShowWindow( hwndPages[++iActualPage], SW_SHOW );
@@ -1466,20 +1467,20 @@ BOOL CALLBACK DialogProc( HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam
pParams->fAllowContact = Button_GetCheck( GetDlgItem(hwndPages[1], IDC_ALLOW_CONTACT) ) ? TRUE : FALSE;
- Edit_GetText( GetDlgItem(hwndPages[1], IDC_EDIT_TITLE), szBuffer, elementsof(szBuffer) );
+ Edit_GetText( GetDlgItem(hwndPages[1], IDC_EDIT_TITLE), szBuffer, SAL_N_ELEMENTS(szBuffer) );
pParams->sTitle = szBuffer;
- Edit_GetText( GetDlgItem(hwndPages[1], IDC_EDIT_DESCRIPTION), szBuffer, elementsof(szBuffer) );
+ Edit_GetText( GetDlgItem(hwndPages[1], IDC_EDIT_DESCRIPTION), szBuffer, SAL_N_ELEMENTS(szBuffer) );
pParams->sComment = szBuffer;
- Edit_GetText( GetDlgItem(hwndPages[1], IDC_EDIT_EMAIL), szBuffer, elementsof(szBuffer) );
+ Edit_GetText( GetDlgItem(hwndPages[1], IDC_EDIT_EMAIL), szBuffer, SAL_N_ELEMENTS(szBuffer) );
pParams->sEmail = szBuffer;
if ( pParams->fAllowContact && !pParams->sEmail.length() )
{
TCHAR szMessage[MAX_TEXT_BUFFER];
- LoadAndFormatString( GetModuleHandle(NULL), IDS_ERROR_MSG_NOEMAILADDRESS, szMessage, elementsof(szMessage) );
+ LoadAndFormatString( GetModuleHandle(NULL), IDS_ERROR_MSG_NOEMAILADDRESS, szMessage, SAL_N_ELEMENTS(szMessage) );
MessageBox( hwndDlg, szMessage, NULL, MB_ICONERROR | MB_OK );
break; // Don't end the dialog
@@ -1522,7 +1523,7 @@ static void repatch_soffice_exe( void *pBuffer, size_t nBufSize )
wchar_t DescriptionBuffer[MAGIC_DESCRIPTION_COUNT];
memset( DescriptionBuffer, 0, sizeof(DescriptionBuffer) );
- wcsncpy( DescriptionBuffer, g_wstrProductKey.c_str(), elementsof(DescriptionBuffer) - 1 );
+ wcsncpy( DescriptionBuffer, g_wstrProductKey.c_str(), SAL_N_ELEMENTS(DescriptionBuffer) - 1 );
bool bPatched = false;
@@ -1699,7 +1700,7 @@ static sal_uInt32 calc_md5_checksum( const char *filename, sal_uInt8 *pChecksum,
#endif
//***************************************************************************
-static bool WriteStackFile( FILE *fout, hash_map< string, string >& rLibraries, DWORD dwProcessId, PEXCEPTION_POINTERS pExceptionPointers )
+static bool WriteStackFile( FILE *fout, boost::unordered_map< string, string >& rLibraries, DWORD dwProcessId, PEXCEPTION_POINTERS pExceptionPointers )
{
bool fSuccess = false;
@@ -1822,7 +1823,7 @@ static bool WriteStackFile( FILE *fout, hash_map< string, string >& rLibraries,
return fSuccess;
}
-bool WriteChecksumFile( FILE *fchksum, const hash_map< string, string >& rLibraries )
+bool WriteChecksumFile( FILE *fchksum, const boost::unordered_map< string, string >& rLibraries )
{
bool success = false;
@@ -1830,11 +1831,9 @@ bool WriteChecksumFile( FILE *fchksum, const hash_map< string, string >& rLibrar
{
fprintf( fchksum, "<errormail:Checksums type=\"MD5\">\n" );
- hash_map< string, string >::const_iterator iter;
+ boost::unordered_map< string, string >::const_iterator iter;
- for ( iter = rLibraries.begin();
- iter != rLibraries.end();
- iter++ )
+ for ( iter = rLibraries.begin(); iter != rLibraries.end(); ++iter )
{
sal_uInt8 checksum[RTL_DIGEST_LENGTH_MD5];
sal_uInt32 nBytesProcessed = calc_md5_checksum(
@@ -1919,7 +1918,7 @@ BOOL WriteDumpFile( DWORD dwProcessId, PEXCEPTION_POINTERS pExceptionPointers, D
{
TCHAR szTempPath[MAX_PATH];
-// if ( GetTempPath( elementsof(szTempPath), szTempPath ) )
+// if ( GetTempPath( SAL_N_ELEMENTS(szTempPath), szTempPath ) )
if ( GetCrashDataPath( szTempPath ) )
{
TCHAR szFileName[MAX_PATH];
@@ -1997,7 +1996,7 @@ static DWORD FindProcessForImage( LPCTSTR lpImagePath )
DWORD dwSize = 0;
TCHAR szShortImagePath[MAX_PATH];
- if ( GetShortPathName( lpImagePath, szShortImagePath, elementsof(szShortImagePath) ) &&
+ if ( GetShortPathName( lpImagePath, szShortImagePath, SAL_N_ELEMENTS(szShortImagePath) ) &&
EnumProcesses( aProcesses, sizeof(aProcesses), &dwSize ) )
{
unsigned nProcesses = dwSize / sizeof(aProcesses[0]);
@@ -2014,7 +2013,7 @@ static DWORD FindProcessForImage( LPCTSTR lpImagePath )
{
TCHAR szShortModulePath[MAX_PATH];
- if ( GetShortPathName( szModulePath, szShortModulePath, elementsof(szShortModulePath) ) )
+ if ( GetShortPathName( szModulePath, szShortModulePath, SAL_N_ELEMENTS(szShortModulePath) ) )
{
if ( 0 == _tcsicmp( szShortModulePath, szShortImagePath ) )
dwProcessId = aProcesses[i];
@@ -2087,10 +2086,10 @@ static bool ParseCommandArgs( LPDWORD pdwProcessId, PEXCEPTION_POINTERS* ppExcep
TCHAR szProcessDescription[FORMATBUFSIZE];
TCHAR szHelpDescription[FORMATBUFSIZE];
- LoadAndFormatString( hInstance, IDS_MSG_CMDLINE_USAGE, szUsage, elementsof(szUsage) );
- LoadAndFormatString( hInstance, IDS_MSG_PARAM_PROCESSID, szProcess, elementsof(szProcess) );
- LoadAndFormatString( hInstance, IDS_MSG_PARAM_PROCESSID_DESCRIPTION, szProcessDescription, elementsof(szProcessDescription) );
- LoadAndFormatString( hInstance, IDS_MSG_PARAM_HELP_DESCRIPTION, szHelpDescription, elementsof(szHelpDescription) );
+ LoadAndFormatString( hInstance, IDS_MSG_CMDLINE_USAGE, szUsage, SAL_N_ELEMENTS(szUsage) );
+ LoadAndFormatString( hInstance, IDS_MSG_PARAM_PROCESSID, szProcess, SAL_N_ELEMENTS(szProcess) );
+ LoadAndFormatString( hInstance, IDS_MSG_PARAM_PROCESSID_DESCRIPTION, szProcessDescription, SAL_N_ELEMENTS(szProcessDescription) );
+ LoadAndFormatString( hInstance, IDS_MSG_PARAM_HELP_DESCRIPTION, szHelpDescription, SAL_N_ELEMENTS(szHelpDescription) );
_tprintf(
TEXT("\n%s: crashrep %s\n\n")
@@ -2183,7 +2182,7 @@ BOOL WriteCommentFile( LPCTSTR lpComment )
BOOL fSuccess = FALSE;
TCHAR szTempPath[MAX_PATH];
- if ( GetTempPath( elementsof(szTempPath), szTempPath ) )
+ if ( GetTempPath( SAL_N_ELEMENTS(szTempPath), szTempPath ) )
{
TCHAR szFileName[MAX_PATH];
@@ -2335,7 +2334,7 @@ static bool ReadBootstrapParams( CrashReportParams &rParams )
TEXT("ProductKey"),
TEXT("OpenOffice.org"),
szBuffer,
- elementsof(szBuffer),
+ SAL_N_ELEMENTS(szBuffer),
szModuleName )
)
{
@@ -2363,7 +2362,7 @@ static bool ReadBootstrapParams( CrashReportParams &rParams )
TEXT("Version"),
TEXT("buildid"),
TEXT("unknown"),
- g_szBuildId, elementsof(g_szBuildId),
+ g_szBuildId, SAL_N_ELEMENTS(g_szBuildId),
szModuleVersionName );
g_strDefaultLanguage = get_script_string( "instdb.inf", "DefaultLanguage" );
@@ -2372,7 +2371,7 @@ static bool ReadBootstrapParams( CrashReportParams &rParams )
TEXT("ErrorReport"),
TEXT("ErrorReportPort"),
TEXT("80"),
- szReportPort, elementsof(szReportPort),
+ szReportPort, SAL_N_ELEMENTS(szReportPort),
szModuleName
) )
{
@@ -2387,11 +2386,11 @@ static bool ReadBootstrapParams( CrashReportParams &rParams )
TEXT("ErrorReport"),
TEXT("ErrorReportServer"),
TEXT(""),
- szReportServer, elementsof(szReportServer),
+ szReportServer, SAL_N_ELEMENTS(szReportServer),
szModuleName
) )
{
- bSuccess = 0 != WideCharToMultiByte( CP_ACP, 0, szReportServer, -1, g_szReportServerA, elementsof(g_szReportServerA), NULL, NULL );
+ bSuccess = 0 != WideCharToMultiByte( CP_ACP, 0, szReportServer, -1, g_szReportServerA, SAL_N_ELEMENTS(g_szReportServerA), NULL, NULL );
}
LPCTSTR lpEnvString;
@@ -2624,13 +2623,13 @@ BOOL CALLBACK SendingStatusDialogProc(
pRequest = (RequestParams *)lParam;
- LoadAndFormatString( hInstance, IDS_SENDING_REPORT_HEADER, szBuffer, elementsof(szBuffer) );
+ LoadAndFormatString( hInstance, IDS_SENDING_REPORT_HEADER, szBuffer, SAL_N_ELEMENTS(szBuffer) );
SetWindowText( hwndDlg, szBuffer );
- LoadAndFormatString( hInstance, IDS_SENDING_REPORT_STATUS, szBuffer, elementsof(szBuffer) );
+ LoadAndFormatString( hInstance, IDS_SENDING_REPORT_STATUS, szBuffer, SAL_N_ELEMENTS(szBuffer) );
Static_SetText( GetDlgItem(hwndDlg, IDC_SENDING_REPORT_STATUS), szBuffer );
- LoadAndFormatString( hInstance, IDS_CANCEL_BUTTON, szBuffer, elementsof(szBuffer) );
+ LoadAndFormatString( hInstance, IDS_CANCEL_BUTTON, szBuffer, SAL_N_ELEMENTS(szBuffer) );
Button_SetText( GetDlgItem(hwndDlg, IDCANCEL), szBuffer );
pRequest->hwndStatus = hwndDlg;
@@ -2767,7 +2766,7 @@ bool SendCrashReport( HWND hwndParent, const CrashReportParams &rParams )
{
TCHAR szMessage[1024];
- LoadAndFormatString( GetModuleHandle(NULL), IDS_ERROR_MSG_PROXY, szMessage, elementsof(szMessage) );
+ LoadAndFormatString( GetModuleHandle(NULL), IDS_ERROR_MSG_PROXY, szMessage, SAL_N_ELEMENTS(szMessage) );
MessageBox( hwndParent, szMessage, NULL, MB_ICONERROR | MB_OK );
}
@@ -2776,8 +2775,8 @@ bool SendCrashReport( HWND hwndParent, const CrashReportParams &rParams )
TCHAR szMessage[1024];
TCHAR szTitle[1024];
- LoadAndFormatString( GetModuleHandle(NULL), IDS_SENDING_REPORT_STATUS_FINISHED, szMessage, elementsof(szMessage) );
- LoadAndFormatString( GetModuleHandle(NULL), IDS_SENDING_REPORT_HEADER, szTitle, elementsof(szTitle) );
+ LoadAndFormatString( GetModuleHandle(NULL), IDS_SENDING_REPORT_STATUS_FINISHED, szMessage, SAL_N_ELEMENTS(szMessage) );
+ LoadAndFormatString( GetModuleHandle(NULL), IDS_SENDING_REPORT_HEADER, szTitle, SAL_N_ELEMENTS(szTitle) );
MessageBox( hwndParent, szMessage, szTitle, MB_ICONINFORMATION | MB_OK );
}
@@ -2795,14 +2794,14 @@ bool SendCrashReport( HWND hwndParent, const CrashReportParams &rParams )
{
TCHAR szMessage[1024];
- LoadAndFormatString( GetModuleHandle(NULL), IDS_ERROR_MSG_PROXY, szMessage, elementsof(szMessage) );
+ LoadAndFormatString( GetModuleHandle(NULL), IDS_ERROR_MSG_PROXY, szMessage, SAL_N_ELEMENTS(szMessage) );
_ftprintf( stderr, _T("ERROR: %s\n"), szMessage );
}
else
{
TCHAR szMessage[1024];
- LoadAndFormatString( GetModuleHandle(NULL), IDS_SENDING_REPORT_STATUS_FINISHED, szMessage, elementsof(szMessage) );
+ LoadAndFormatString( GetModuleHandle(NULL), IDS_SENDING_REPORT_STATUS_FINISHED, szMessage, SAL_N_ELEMENTS(szMessage) );
_ftprintf( stderr, _T("SUCCESS: %s\n"), szMessage );
}
@@ -2813,7 +2812,7 @@ bool SendCrashReport( HWND hwndParent, const CrashReportParams &rParams )
{
TCHAR szMessage[1024];
- LoadAndFormatString( GetModuleHandle(NULL), IDS_ERROR_MSG_DISK_FULL, szMessage, elementsof(szMessage) );
+ LoadAndFormatString( GetModuleHandle(NULL), IDS_ERROR_MSG_DISK_FULL, szMessage, SAL_N_ELEMENTS(szMessage) );
if ( hwndParent )
MessageBox( hwndParent, szMessage, NULL, MB_ICONERROR | MB_OK );
@@ -2882,7 +2881,7 @@ int WINAPI _tWinMain( HINSTANCE hInstance, HINSTANCE, LPTSTR /*lpCmdLine*/, int
if( bGotDumpFile )
{
- hash_map< string, string > aLibraries;
+ boost::unordered_map< string, string > aLibraries;
if ( g_bLoadReport )
{
@@ -2980,3 +2979,4 @@ int WINAPI _tWinMain( HINSTANCE hInstance, HINSTANCE, LPTSTR /*lpCmdLine*/, int
return exitcode;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */