summaryrefslogtreecommitdiff
path: root/sal/systools
diff options
context:
space:
mode:
Diffstat (limited to 'sal/systools')
-rw-r--r--sal/systools/win32/kill/kill.cxx443
-rw-r--r--sal/systools/win32/kill/makefile.mk64
-rwxr-xr-x[-rw-r--r--]sal/systools/win32/onlineupdate/makefile.mk4
-rw-r--r--sal/systools/win32/onlineupdate/onlinecheck.cxx25
-rw-r--r--sal/systools/win32/uwinapi/CheckTokenMembership.cpp3
-rw-r--r--sal/systools/win32/uwinapi/CommandLineToArgvW.cpp4
-rw-r--r--sal/systools/win32/uwinapi/CopyFileExA.cpp4
-rw-r--r--sal/systools/win32/uwinapi/CopyFileExW.cpp4
-rw-r--r--sal/systools/win32/uwinapi/DeleteVolumeMountPointA.cpp4
-rw-r--r--sal/systools/win32/uwinapi/DeleteVolumeMountPointW.cpp4
-rw-r--r--sal/systools/win32/uwinapi/DllGetVersion.cpp3
-rw-r--r--sal/systools/win32/uwinapi/DllMain.cpp3
-rw-r--r--sal/systools/win32/uwinapi/DrawStateW.cpp3
-rw-r--r--sal/systools/win32/uwinapi/EnumProcesses.cpp2
-rw-r--r--sal/systools/win32/uwinapi/FindFirstVolumeA.cpp4
-rw-r--r--sal/systools/win32/uwinapi/FindFirstVolumeMountPointA.cpp3
-rw-r--r--sal/systools/win32/uwinapi/FindFirstVolumeMountPointW.cpp3
-rw-r--r--sal/systools/win32/uwinapi/FindFirstVolumeW.cpp4
-rw-r--r--sal/systools/win32/uwinapi/FindNextVolumeA.cpp4
-rw-r--r--sal/systools/win32/uwinapi/FindNextVolumeMountPointA.cpp4
-rw-r--r--sal/systools/win32/uwinapi/FindNextVolumeMountPointW.cpp4
-rw-r--r--sal/systools/win32/uwinapi/FindNextVolumeW.cpp4
-rw-r--r--sal/systools/win32/uwinapi/FindVolumeClose.cpp4
-rw-r--r--sal/systools/win32/uwinapi/FindVolumeMountPointClose.cpp4
-rw-r--r--sal/systools/win32/uwinapi/GetDiskFreeSpaceExA.cpp2
-rw-r--r--sal/systools/win32/uwinapi/GetDiskFreeSpaceExW.cpp2
-rw-r--r--sal/systools/win32/uwinapi/GetLogicalDriveStringsW.cpp4
-rw-r--r--sal/systools/win32/uwinapi/GetLongPathName.cpp2
-rw-r--r--sal/systools/win32/uwinapi/GetLongPathNameA.cpp4
-rw-r--r--sal/systools/win32/uwinapi/GetLongPathNameW.cpp3
-rw-r--r--sal/systools/win32/uwinapi/GetModuleFileNameExA.cpp2
-rw-r--r--sal/systools/win32/uwinapi/GetModuleFileNameExW.cpp4
-rw-r--r--sal/systools/win32/uwinapi/GetProcessId.cpp3
-rw-r--r--sal/systools/win32/uwinapi/GetUserDefaultUILanguage.cpp2
-rw-r--r--sal/systools/win32/uwinapi/GetUserDomainA.cpp2
-rw-r--r--sal/systools/win32/uwinapi/GetUserDomainW.cpp2
-rw-r--r--sal/systools/win32/uwinapi/GetUserDomain_NT.cpp3
-rw-r--r--sal/systools/win32/uwinapi/GetUserDomain_WINDOWS.cpp3
-rw-r--r--sal/systools/win32/uwinapi/GetVolumeNameForVolumeMountPointA.cpp4
-rw-r--r--sal/systools/win32/uwinapi/GetVolumeNameForVolumeMountPointW.cpp4
-rw-r--r--sal/systools/win32/uwinapi/GetVolumePathNameA.cpp4
-rw-r--r--sal/systools/win32/uwinapi/GetVolumePathNameW.cpp4
-rw-r--r--sal/systools/win32/uwinapi/MCIWndCreateW.cpp4
-rw-r--r--sal/systools/win32/uwinapi/MoveFileExA.cpp7
-rw-r--r--sal/systools/win32/uwinapi/MoveFileExW.cpp2
-rw-r--r--sal/systools/win32/uwinapi/PathAddBackslashW.cpp3
-rw-r--r--sal/systools/win32/uwinapi/PathCompactPathExW.cpp4
-rw-r--r--sal/systools/win32/uwinapi/PathFileExistsW.cpp3
-rw-r--r--sal/systools/win32/uwinapi/PathFindExtensionW.cpp3
-rw-r--r--sal/systools/win32/uwinapi/PathFindFileNameW.cpp3
-rw-r--r--sal/systools/win32/uwinapi/PathIsFileSpecW.cpp3
-rw-r--r--sal/systools/win32/uwinapi/PathIsUNCW.cpp3
-rw-r--r--sal/systools/win32/uwinapi/PathRemoveExtensionW.cpp3
-rw-r--r--sal/systools/win32/uwinapi/PathRemoveFileSpecW.cpp3
-rw-r--r--sal/systools/win32/uwinapi/PathSetDlgItemPathW.cpp3
-rw-r--r--sal/systools/win32/uwinapi/PathStripToRootW.cpp3
-rw-r--r--sal/systools/win32/uwinapi/ResolveThunk.cpp2
-rw-r--r--sal/systools/win32/uwinapi/ResolveUnicows.cpp3
-rw-r--r--sal/systools/win32/uwinapi/SHCreateItemFromParsingName.cpp4
-rw-r--r--sal/systools/win32/uwinapi/SHILCreateFromPathW.cpp3
-rw-r--r--sal/systools/win32/uwinapi/SetVolumeMountPointA.cpp4
-rw-r--r--sal/systools/win32/uwinapi/SetVolumeMountPointW.cpp4
-rw-r--r--sal/systools/win32/uwinapi/Uwinapi.h9
-rw-r--r--sal/systools/win32/uwinapi/macros.h5
-rw-r--r--sal/systools/win32/uwinapi/makefile.mk41
-rw-r--r--sal/systools/win32/uwinapi/snprintf.c3
-rw-r--r--sal/systools/win32/uwinapi/sntprintf.c7
-rw-r--r--sal/systools/win32/uwinapi/snwprintf.c3
-rw-r--r--sal/systools/win32/uwinapi/toolhelp.cpp3
-rw-r--r--sal/systools/win32/uwinapi/win95sys.h2
70 files changed, 209 insertions, 593 deletions
diff --git a/sal/systools/win32/kill/kill.cxx b/sal/systools/win32/kill/kill.cxx
deleted file mode 100644
index b67518753..000000000
--- a/sal/systools/win32/kill/kill.cxx
+++ /dev/null
@@ -1,443 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_sal.hxx"
-
-#include <tchar.h>
-
-#ifdef _MSC_VER
-#pragma warning(push,1) // disable warnings within system headers
-#endif
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-#include <tlhelp32.h>
-#include <psapi.h>
-#ifdef _MSC_VER
-#pragma warning(pop)
-#endif
-
-#include <signal.h>
-#include <stdarg.h>
-#include <stdlib.h>
-#include <stdio.h>
-
-#ifndef SIGNULL
-#define SIGNULL 0
-#endif
-
-#ifndef SIGKILL
-#define SIGKILL 9
-#endif
-
-#include <signal.h>
-
-#define MAX_MODULES 1024
-
-/////////////////////////////////////////////////////////////////////////////
-// Determines if a returned handle value is valid
-/////////////////////////////////////////////////////////////////////////////
-
-static inline bool IsValidHandle( HANDLE handle )
-{
- return INVALID_HANDLE_VALUE != handle && NULL != handle;
-}
-
-
-#define elementsof( a ) (sizeof(a) / sizeof( (a)[0] ))
-
-/////////////////////////////////////////////////////////////////////////////
-// Retrieves function adress in another process
-/////////////////////////////////////////////////////////////////////////////
-
-#if 1
-#define GetProcAddressEx( hProcess, hModule, lpProcName ) GetProcAddress( hModule, lpProcName )
-#else
-FARPROC WINAPI GetProcAddressEx( HANDLE hProcess, HMODULE hModule, LPCSTR lpProcName )
-{
- FARPROC lpfnProcAddress = GetProcAddress( hModule, lpProcName );
-
- if ( lpfnProcAddress )
- {
- DWORD dwProcessId = GetProcessId( hProcess );
-
- if ( GetCurrentProcessId() != dwProcessId )
- {
- FARPROC lpfnRemoteProcAddress = NULL;
- TCHAR szBaseName[MAX_PATH];
-
- if ( GetModuleBaseName( GetCurrentProcess(), hModule, szBaseName, elementsof(szBaseName) ) )
- {
- HMODULE ahModules[MAX_MODULES];
- DWORD cbNeeded = 0;
-
- if ( EnumProcessModules( hProcess, ahModules, sizeof(ahModules), &cbNeeded ) )
- {
- ULONG nModules = cbNeeded / sizeof(ahModules[0]);
-
- for ( ULONG n = 0; n < nModules; n++ )
- {
- TCHAR szRemoteBaseName[MAX_PATH];
-
- if ( GetModuleBaseName(
- hProcess, ahModules[n], szRemoteBaseName, elementsof(szRemoteBaseName) ) &&
- 0 == lstrcmpi( szRemoteBaseName, szBaseName )
- )
- {
- lpfnRemoteProcAddress = lpfnProcAddress;
-
- if ( ahModules[n] != hModule )
- *(LPBYTE*)&lpfnRemoteProcAddress += (LPBYTE)ahModules[n] - (LPBYTE)hModule;
- break;
- }
- }
- }
- }
-
- lpfnProcAddress = lpfnRemoteProcAddress;
- }
- }
-
- return lpfnProcAddress;
-}
-#endif
-
-/////////////////////////////////////////////////////////////////////////////
-// Raises a signal in an other process
-/////////////////////////////////////////////////////////////////////////////
-
-static DWORD SignalToExceptionCode( int signal )
-{
- switch ( signal )
- {
- case SIGSEGV:
- return EXCEPTION_ACCESS_VIOLATION;
- case SIGFPE:
- return EXCEPTION_FLT_INVALID_OPERATION;
- case SIGILL:
- return EXCEPTION_ILLEGAL_INSTRUCTION;
- case SIGINT:
- return CONTROL_C_EXIT;
- case SIGBREAK:
- return CONTROL_C_EXIT;
- default:
- return 0;
- }
-}
-
-static BOOL RaiseSignalEx( HANDLE hProcess, int sig )
-{
- DWORD dwProcessId = GetProcessId( hProcess );
-
- HANDLE hSnapshot = CreateToolhelp32Snapshot( TH32CS_SNAPTHREAD, 0 );
- HANDLE hThread = 0;
- BOOL fSuccess = FALSE;
-
- if ( IsValidHandle(hSnapshot) )
- {
- THREADENTRY32 te;
-
- te.dwSize = sizeof(te);
- fSuccess = Thread32First( hSnapshot, &te );
- while ( fSuccess )
- {
- if ( te.th32OwnerProcessID == dwProcessId )
- {
- hThread = OpenThread(
- THREAD_SUSPEND_RESUME | THREAD_QUERY_INFORMATION |
- THREAD_GET_CONTEXT | THREAD_SET_CONTEXT,
- FALSE, te.th32ThreadID );
- if ( IsValidHandle(hThread) )
- break;
- }
-
- fSuccess = Thread32Next( hSnapshot, &te );
- }
-
- CloseHandle( hSnapshot );
- }
-
- if ( fSuccess )
- {
- CONTEXT aContext;
-
- if ( SuspendThread( hThread ) != (DWORD)-1 )
- {
- ZeroMemory( &aContext, sizeof(aContext) );
- aContext.ContextFlags = CONTEXT_FULL;
-
- fSuccess = GetThreadContext( hThread, &aContext );
-
- if ( fSuccess )
- {
- if ( sig )
- {
- DWORD dwStackBuffer[] =
- {
- aContext.Eip,
- SignalToExceptionCode( sig ),
- EXCEPTION_NONCONTINUABLE,
- 0,
- 0
- };
-
- aContext.Esp -= sizeof(dwStackBuffer);
- WriteProcessMemory( hProcess, (LPVOID)aContext.Esp, dwStackBuffer, sizeof(dwStackBuffer), NULL );
- aContext.Eip = (DWORD)GetProcAddressEx( hProcess, GetModuleHandleA("KERNEL32"), "RaiseException" );
- }
- else
- {
- aContext.Ecx = aContext.Eax = aContext.Ebx = aContext.Edx = aContext.Esi = aContext.Edi = 0;
- }
-
- fSuccess = SetThreadContext( hThread, &aContext );
- }
-
- fSuccess = ResumeThread( hThread ) && fSuccess;
-
- DWORD dwLastError = GetLastError();
- CloseHandle( hThread );
- SetLastError( dwLastError );
-
- return fSuccess;
- }
- }
-
- return FALSE;
-}
-/////////////////////////////////////////////////////////////////////////////
-// Command line parameter parsing
-/////////////////////////////////////////////////////////////////////////////
-
-static void ParseCommandArgs( LPDWORD lpProcesses, LPDWORD lpdwNumProcesses, int *pSig )
-{
- typedef struct _SignalEntry
- {
- LPCTSTR lpSignalName;
- int iSignalValue;
- } SignalEntry;
-
- #define SIG_ENTRY( signal ) { TEXT(#signal), SIG##signal }
-
- static SignalEntry SupportedSignals[] =
- {
- SIG_ENTRY( NULL ),
- SIG_ENTRY( SEGV ),
- SIG_ENTRY( ILL ),
- SIG_ENTRY( FPE ),
- SIG_ENTRY( INT ),
- SIG_ENTRY( BREAK ),
- SIG_ENTRY( TERM ),
- SIG_ENTRY( ABRT ),
- SIG_ENTRY( KILL )
- };
-
- const int NumSupportedSignals = elementsof(SupportedSignals);
-
- DWORD dwMaxProcesses = *lpdwNumProcesses;
- int argc = __argc;
- TCHAR **argv = __targv;
-
- *lpdwNumProcesses = 0;
-
- for ( int argn = 1; argn < argc; argn++ )
- {
- if ( 0 == lstrcmpi( argv[argn], TEXT("-l") ) ||
- 0 == lstrcmpi( argv[argn], TEXT("/l") ) )
-
- {
- for ( int n = 0; n < NumSupportedSignals; n++ )
- {
- _tprintf( _T("%s "), SupportedSignals[n].lpSignalName );
- }
- _tprintf( _T("\n") );
- ExitProcess( 0 );
- }
- else if ( 0 == lstrcmpi( argv[argn], TEXT("-?") ) ||
- 0 == lstrcmpi( argv[argn], TEXT("/?") ) ||
- 0 == lstrcmpi( argv[argn], TEXT("-h") ) ||
- 0 == lstrcmpi( argv[argn], TEXT("/h") ) ||
- 0 == lstrcmpi( argv[argn], TEXT("--help") ) )
- {
- _tprintf(
- _T("Terminates a process by sending a signal.\n\n")
- _T("Usage: kill [ -l ] [ -signal ] pid ...\n\n")
- _T("-l Lists supported signals\n")
- _T("-signal Sends the specified signal to the given processes.\n")
- _T(" signal can be a numeric value specifying the signal number\n")
- _T(" or a string listed by the -l parameter. If no signal is\n")
- _T(" given SIGTERM (-TERM) is used.\n")
- _T("pid Process id(s) or executables names(s) of processes to \n")
- _T(" signal or terminate.\n\n")
- );
- ExitProcess( 0 );
- }
- else if ( argv[argn] && ( *argv[argn] == '-' || *argv[argn] == '/' ) )
- {
- LPCTSTR argsig = CharNext( argv[argn] );
-
- int n;
- for ( n = 0; n < NumSupportedSignals; n++ )
- {
- _TCHAR *endptr = NULL;
-
- if ( 0 == lstrcmpi( SupportedSignals[n].lpSignalName, argsig ) ||
- _tcstoul( argsig, &endptr, 0 ) == static_cast< unsigned >(SupportedSignals[n].iSignalValue) && (!endptr || !*endptr) )
- {
- *pSig = SupportedSignals[n].iSignalValue;
- break;
- }
- }
-
- if ( n >= NumSupportedSignals )
- {
- _ftprintf( stderr,
- _T("kill: Illegal argument %s\n")
- _T("Type 'kill --help' to show allowed syntax.\n")
- _T("Type 'kill -l' to show supported signals.\n"),
- argv[argn] );
- ExitProcess( 0 );
- }
- }
- else
- {
- unsigned long value = 0;
- _TCHAR *endptr = NULL;
-
- value = _tcstoul( argv[argn], &endptr, 0 );
-
- if ( !endptr || !*endptr )
- {
- if ( *lpdwNumProcesses < dwMaxProcesses )
- {
- *(lpProcesses++) = value;
- (*lpdwNumProcesses)++;
- }
- }
- else
- {
- HANDLE hSnapshot = CreateToolhelp32Snapshot( TH32CS_SNAPPROCESS, 0 );
-
- if ( IsValidHandle( hSnapshot ) )
- {
- PROCESSENTRY32 pe;
-
- pe.dwSize = sizeof(pe);
- BOOL fSuccess = Process32First( hSnapshot, &pe );
-
- while ( fSuccess )
- {
- if ( 0 == lstrcmpi( argv[argn], pe.szExeFile ) )
- {
- if ( *lpdwNumProcesses < dwMaxProcesses )
- {
- *(lpProcesses++) = pe.th32ProcessID;
- (*lpdwNumProcesses)++;
- }
- }
- fSuccess = Process32Next( hSnapshot, &pe );
- }
-
- CloseHandle( hSnapshot );
- }
- }
- }
- }
-
- if ( !*lpdwNumProcesses )
- {
- _ftprintf( stderr,
- _T("kill: No process specified.\n")
- _T("Use kill --help to show allowed syntax.\n")
- );
- ExitProcess( 0 );
- }
-
-}
-
-void OutputSystemMessage( DWORD dwErrorCode )
-{
- LPVOID lpMsgBuf;
- FormatMessageA(
- FORMAT_MESSAGE_ALLOCATE_BUFFER |
- FORMAT_MESSAGE_FROM_SYSTEM |
- FORMAT_MESSAGE_IGNORE_INSERTS,
- NULL,
- dwErrorCode,
- MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language
- (LPSTR)&lpMsgBuf,
- 0,
- NULL
- );
-
- printf( (LPSTR)lpMsgBuf );
- LocalFree( lpMsgBuf );
-}
-
-int _tmain()
-{
- DWORD dwProcessIds[1024];
- DWORD nProcesses = elementsof(dwProcessIds);
- int sig = SIGTERM;
-
-
- ParseCommandArgs( dwProcessIds, &nProcesses, &sig );
-
- for ( ULONG n = 0; n < nProcesses; n++ )
- {
- HANDLE hProcess;
-
- _tprintf( _T("Sending signal to process id %d..."), dwProcessIds[n] );
- hProcess = OpenProcess( PROCESS_TERMINATE | PROCESS_CREATE_THREAD | SYNCHRONIZE |
- PROCESS_QUERY_INFORMATION | PROCESS_VM_OPERATION | PROCESS_VM_WRITE | PROCESS_VM_READ,
- FALSE, dwProcessIds[n] );
-
- if ( IsValidHandle( hProcess ) )
- {
- if ( SIGKILL == sig )
- TerminateProcess( hProcess, 255 );
- else
- {
- if ( RaiseSignalEx( hProcess, sig ) )
- _tprintf( _T("OK\n") );
- else
- {
- OutputSystemMessage( GetLastError() );
- }
- }
-
- CloseHandle( hProcess );
- }
- else
- {
- OutputSystemMessage( GetLastError() );
- }
- }
-
- return 0;
-}
-
diff --git a/sal/systools/win32/kill/makefile.mk b/sal/systools/win32/kill/makefile.mk
deleted file mode 100644
index 3bb961bd1..000000000
--- a/sal/systools/win32/kill/makefile.mk
+++ /dev/null
@@ -1,64 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..$/..
-
-PRJNAME=sal
-TARGET=kill
-LIBTARGET=NO
-DYNAMIC_CRT=
-ENABLE_EXCEPTIONS=TRUE
-TARGETTYPE=CUI
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-
-.IF "$(COM)"=="GCC"
-CDEFS=-D_WIN32_WINNT=0x0501
-.ENDIF
-
-CFLAGS+= $(LFS_CFLAGS)
-CXXFLAGS+= $(LFS_CFLAGS)
-
-# --- Files --------------------------------------------------------
-
-UWINAPILIB=
-
-OBJFILES=\
- $(OBJ)$/kill.obj
-
-APP1NOSAL=TRUE
-APP1OBJS=$(OBJFILES)
-APP1TARGET=$(TARGET)
-
-STDLIB1=
-
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
diff --git a/sal/systools/win32/onlineupdate/makefile.mk b/sal/systools/win32/onlineupdate/makefile.mk
index f09b01bb3..027ddef11 100644..100755
--- a/sal/systools/win32/onlineupdate/makefile.mk
+++ b/sal/systools/win32/onlineupdate/makefile.mk
@@ -66,11 +66,7 @@ DEF1DEPN=\
SHL1OBJS=$(SLOFILES)
-#No default libraries
-#STDSHL=
-
SHL1STDLIBS=\
- $(UNICOWSLIB)\
$(KERNEL32LIB)\
$(LIBCMT)\
$(WININETLIB)
diff --git a/sal/systools/win32/onlineupdate/onlinecheck.cxx b/sal/systools/win32/onlineupdate/onlinecheck.cxx
index 8dbe2f124..dd09b7d83 100644
--- a/sal/systools/win32/onlineupdate/onlinecheck.cxx
+++ b/sal/systools/win32/onlineupdate/onlinecheck.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.
@@ -32,6 +33,7 @@
#endif
#include <sal/types.h>
+#include <sal/macros.h>
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
@@ -41,11 +43,6 @@
#define _UNICODE
#endif
#include <tchar.h>
-#ifdef __MINGW32__
-#include <excpt.h>
-#endif
-
-#define elementsof(a) (sizeof(a)/sizeof((a)[0]))
// #i71984
extern "C" sal_Bool SAL_CALL hasInternetConnection()
@@ -53,30 +50,22 @@ extern "C" sal_Bool SAL_CALL hasInternetConnection()
DWORD dwFlags;
TCHAR szConnectionName[1024];
-#ifdef __MINGW32__
- jmp_buf jmpbuf;
- __SEHandler han;
- if (__builtin_setjmp(jmpbuf) == 0)
- {
- han.Set(jmpbuf, NULL, (__SEHandler::PF)EXCEPTION_EXECUTE_HANDLER);
-#else
+#ifndef __MINGW32__
__try {
#endif
BOOL fIsConnected = InternetGetConnectedStateEx(
&dwFlags,
szConnectionName,
- elementsof(szConnectionName),
+ SAL_N_ELEMENTS(szConnectionName),
0 );
return fIsConnected ? sal_True : sal_False;
-#ifdef __MINGW32__
- }
- else return sal_False;
- han.Reset();
-#else
+#ifndef __MINGW32__
} __except( EXCEPTION_EXECUTE_HANDLER ) {
return sal_False;
}
#endif
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/systools/win32/uwinapi/CheckTokenMembership.cpp b/sal/systools/win32/uwinapi/CheckTokenMembership.cpp
index ea70e92ee..e94dfd5e4 100644
--- a/sal/systools/win32/uwinapi/CheckTokenMembership.cpp
+++ b/sal/systools/win32/uwinapi/CheckTokenMembership.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.
@@ -32,3 +33,5 @@
DEFINE_DEFAULT_THUNK( advapi32, TRYLOAD, BOOL, WINAPI, CheckTokenMembership, (HANDLE TokenHandle, PSID SidToCheck, PBOOL IsMember) )
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/systools/win32/uwinapi/CommandLineToArgvW.cpp b/sal/systools/win32/uwinapi/CommandLineToArgvW.cpp
index fcc54788d..958206a0f 100644
--- a/sal/systools/win32/uwinapi/CommandLineToArgvW.cpp
+++ b/sal/systools/win32/uwinapi/CommandLineToArgvW.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.
@@ -169,4 +170,5 @@ IMPLEMENT_THUNK( shell32, WINDOWS, LPWSTR *, WINAPI, CommandLineToArgvW, ( LPCWS
}
return lpArgvW;
-} \ No newline at end of file
+}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/systools/win32/uwinapi/CopyFileExA.cpp b/sal/systools/win32/uwinapi/CopyFileExA.cpp
index a3f433572..fafc73a16 100644
--- a/sal/systools/win32/uwinapi/CopyFileExA.cpp
+++ b/sal/systools/win32/uwinapi/CopyFileExA.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.
@@ -164,4 +165,5 @@ IMPLEMENT_THUNK( kernel32, WINDOWS, BOOL, WINAPI, CopyFileExA, ( LPCSTR lpExisti
}
return fSuccess;
-} \ No newline at end of file
+}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/systools/win32/uwinapi/CopyFileExW.cpp b/sal/systools/win32/uwinapi/CopyFileExW.cpp
index 977417e5b..9ba56f6ba 100644
--- a/sal/systools/win32/uwinapi/CopyFileExW.cpp
+++ b/sal/systools/win32/uwinapi/CopyFileExW.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.
@@ -37,4 +38,5 @@ IMPLEMENT_THUNK( kernel32, WINDOWS, BOOL, WINAPI, CopyFileExW, ( LPCWSTR lpExist
AUTO_WSTR2STR( lpNewFileName );
return CopyFileExA( lpExistingFileNameA, lpNewFileNameA, lpProgressRoutine, lpData, pbCancel, dwCopyFlags );
-} \ No newline at end of file
+}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/systools/win32/uwinapi/DeleteVolumeMountPointA.cpp b/sal/systools/win32/uwinapi/DeleteVolumeMountPointA.cpp
index 3557670f1..ee81b38b0 100644
--- a/sal/systools/win32/uwinapi/DeleteVolumeMountPointA.cpp
+++ b/sal/systools/win32/uwinapi/DeleteVolumeMountPointA.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.
@@ -30,4 +31,5 @@
#include "macros.h"
-DEFINE_DEFAULT_THUNK( kernel32, TRYLOAD, BOOL, WINAPI, DeleteVolumeMountPointA, (LPCSTR lpszVolumeMountPoint) ) \ No newline at end of file
+DEFINE_DEFAULT_THUNK( kernel32, TRYLOAD, BOOL, WINAPI, DeleteVolumeMountPointA, (LPCSTR lpszVolumeMountPoint) )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/systools/win32/uwinapi/DeleteVolumeMountPointW.cpp b/sal/systools/win32/uwinapi/DeleteVolumeMountPointW.cpp
index 7e4f22ebc..739c5f467 100644
--- a/sal/systools/win32/uwinapi/DeleteVolumeMountPointW.cpp
+++ b/sal/systools/win32/uwinapi/DeleteVolumeMountPointW.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.
@@ -30,4 +31,5 @@
#include "macros.h"
-DEFINE_DEFAULT_THUNK( kernel32, TRYLOAD, BOOL, WINAPI, DeleteVolumeMountPointW, (LPCWSTR lpszVolumeMountPoint) ) \ No newline at end of file
+DEFINE_DEFAULT_THUNK( kernel32, TRYLOAD, BOOL, WINAPI, DeleteVolumeMountPointW, (LPCWSTR lpszVolumeMountPoint) )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/systools/win32/uwinapi/DllGetVersion.cpp b/sal/systools/win32/uwinapi/DllGetVersion.cpp
index 5130b24c5..7f3e4f1d0 100644
--- a/sal/systools/win32/uwinapi/DllGetVersion.cpp
+++ b/sal/systools/win32/uwinapi/DllGetVersion.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.
@@ -71,3 +72,5 @@ extern "C" HRESULT CALLBACK DllGetVersion( DLLVERSIONINFO *pdvi )
return fSuccess ? HRESULT_FROM_WIN32( GetLastError() ) : HRESULT_FROM_WIN32( NO_ERROR );
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/systools/win32/uwinapi/DllMain.cpp b/sal/systools/win32/uwinapi/DllMain.cpp
index 789604853..25be14ec0 100644
--- a/sal/systools/win32/uwinapi/DllMain.cpp
+++ b/sal/systools/win32/uwinapi/DllMain.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.
@@ -233,3 +234,5 @@ extern "C" BOOL WINAPI DllMain( HMODULE hModule, DWORD dwReason, LPVOID )
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/systools/win32/uwinapi/DrawStateW.cpp b/sal/systools/win32/uwinapi/DrawStateW.cpp
index 9e599dc3f..89003c437 100644
--- a/sal/systools/win32/uwinapi/DrawStateW.cpp
+++ b/sal/systools/win32/uwinapi/DrawStateW.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.
@@ -72,3 +73,5 @@ IMPLEMENT_THUNK( user32, WINDOWS, BOOL, WINAPI, DrawStateW,
return DrawStateA( hdc, hbr, lpOutputFunc, lData, wData, x, y, cx, cy, fuFlags );
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/systools/win32/uwinapi/EnumProcesses.cpp b/sal/systools/win32/uwinapi/EnumProcesses.cpp
index 567ee32e0..a8b5fabef 100644
--- a/sal/systools/win32/uwinapi/EnumProcesses.cpp
+++ b/sal/systools/win32/uwinapi/EnumProcesses.cpp
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
#include "macros.h"
#include <tlhelp32.h>
@@ -39,3 +40,4 @@ IMPLEMENT_THUNK( psapi, WINDOWS, BOOL, WINAPI, EnumProcesses, ( LPDWORD lpProces
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/systools/win32/uwinapi/FindFirstVolumeA.cpp b/sal/systools/win32/uwinapi/FindFirstVolumeA.cpp
index 66daeaf5d..ec4d868f6 100644
--- a/sal/systools/win32/uwinapi/FindFirstVolumeA.cpp
+++ b/sal/systools/win32/uwinapi/FindFirstVolumeA.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.
@@ -27,4 +28,5 @@
#include "macros.h"
-DEFINE_DEFAULT_THUNK( kernel32, TRYLOAD, HANDLE, WINAPI, FindFirstVolumeA, (LPSTR lpszVolumeName, DWORD cchBufferLength) ) \ No newline at end of file
+DEFINE_DEFAULT_THUNK( kernel32, TRYLOAD, HANDLE, WINAPI, FindFirstVolumeA, (LPSTR lpszVolumeName, DWORD cchBufferLength) )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/systools/win32/uwinapi/FindFirstVolumeMountPointA.cpp b/sal/systools/win32/uwinapi/FindFirstVolumeMountPointA.cpp
index 191c04f73..f9dc34131 100644
--- a/sal/systools/win32/uwinapi/FindFirstVolumeMountPointA.cpp
+++ b/sal/systools/win32/uwinapi/FindFirstVolumeMountPointA.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.
@@ -49,3 +50,5 @@ extern "C" _declspec( dllexport ) FARPROC kernel32_FindFirstVolumeMountPointA_Pt
static HANDLE __stdcall FindFirstVolumeMountPointA_Failure (LPSTR lpszRootPathName, LPSTR lpszVolumeMountPoint, DWORD cchBufferLength)
{ SetLastError( 120L ); return (HANDLE)0; }
*/
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/systools/win32/uwinapi/FindFirstVolumeMountPointW.cpp b/sal/systools/win32/uwinapi/FindFirstVolumeMountPointW.cpp
index d5142da69..5ac996cc1 100644
--- a/sal/systools/win32/uwinapi/FindFirstVolumeMountPointW.cpp
+++ b/sal/systools/win32/uwinapi/FindFirstVolumeMountPointW.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.
@@ -30,3 +31,5 @@ DEFINE_DEFAULT_THUNK( kernel32, TRYLOAD, HANDLE, WINAPI, FindFirstVolumeMountPoi
#else
DEFINE_DEFAULT_THUNK( kernel32, TRYLOAD, HANDLE, WINAPI, FindFirstVolumeMountPointW, (LPCWSTR lpszRootPathName, LPWSTR lpszVolumeMountPoint, DWORD cchBufferLength) )
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/systools/win32/uwinapi/FindFirstVolumeW.cpp b/sal/systools/win32/uwinapi/FindFirstVolumeW.cpp
index 9323e95a8..627e15c3b 100644
--- a/sal/systools/win32/uwinapi/FindFirstVolumeW.cpp
+++ b/sal/systools/win32/uwinapi/FindFirstVolumeW.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.
@@ -27,4 +28,5 @@
#include "macros.h"
-DEFINE_DEFAULT_THUNK( kernel32, TRYLOAD, HANDLE, WINAPI, FindFirstVolumeW, (LPWSTR lpszVolumeName, DWORD cchBufferLength) ) \ No newline at end of file
+DEFINE_DEFAULT_THUNK( kernel32, TRYLOAD, HANDLE, WINAPI, FindFirstVolumeW, (LPWSTR lpszVolumeName, DWORD cchBufferLength) )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/systools/win32/uwinapi/FindNextVolumeA.cpp b/sal/systools/win32/uwinapi/FindNextVolumeA.cpp
index 36871c07f..22768460d 100644
--- a/sal/systools/win32/uwinapi/FindNextVolumeA.cpp
+++ b/sal/systools/win32/uwinapi/FindNextVolumeA.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.
@@ -27,4 +28,5 @@
#include "macros.h"
-DEFINE_DEFAULT_THUNK( kernel32, TRYLOAD, BOOL, WINAPI, FindNextVolumeA, (HANDLE hFindVolume, LPSTR lpszVolumeName, DWORD cchBufferLength) ) \ No newline at end of file
+DEFINE_DEFAULT_THUNK( kernel32, TRYLOAD, BOOL, WINAPI, FindNextVolumeA, (HANDLE hFindVolume, LPSTR lpszVolumeName, DWORD cchBufferLength) )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/systools/win32/uwinapi/FindNextVolumeMountPointA.cpp b/sal/systools/win32/uwinapi/FindNextVolumeMountPointA.cpp
index dabb84f9e..dad9cc598 100644
--- a/sal/systools/win32/uwinapi/FindNextVolumeMountPointA.cpp
+++ b/sal/systools/win32/uwinapi/FindNextVolumeMountPointA.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.
@@ -27,4 +28,5 @@
#include "macros.h"
-DEFINE_DEFAULT_THUNK( kernel32, TRYLOAD, BOOL, WINAPI, FindNextVolumeMountPointA, (HANDLE hFindVolumeMountPoint, LPSTR lpszVolumeMountPoint, DWORD cchBufferLength) ) \ No newline at end of file
+DEFINE_DEFAULT_THUNK( kernel32, TRYLOAD, BOOL, WINAPI, FindNextVolumeMountPointA, (HANDLE hFindVolumeMountPoint, LPSTR lpszVolumeMountPoint, DWORD cchBufferLength) )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/systools/win32/uwinapi/FindNextVolumeMountPointW.cpp b/sal/systools/win32/uwinapi/FindNextVolumeMountPointW.cpp
index 75b8c3442..5e15a9f2e 100644
--- a/sal/systools/win32/uwinapi/FindNextVolumeMountPointW.cpp
+++ b/sal/systools/win32/uwinapi/FindNextVolumeMountPointW.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.
@@ -27,4 +28,5 @@
#include "macros.h"
-DEFINE_DEFAULT_THUNK( kernel32, TRYLOAD, BOOL, WINAPI, FindNextVolumeMountPointW, (HANDLE hFindVolumeMountPoint, LPWSTR lpszVolumeMountPoint, DWORD cchBufferLength) ) \ No newline at end of file
+DEFINE_DEFAULT_THUNK( kernel32, TRYLOAD, BOOL, WINAPI, FindNextVolumeMountPointW, (HANDLE hFindVolumeMountPoint, LPWSTR lpszVolumeMountPoint, DWORD cchBufferLength) )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/systools/win32/uwinapi/FindNextVolumeW.cpp b/sal/systools/win32/uwinapi/FindNextVolumeW.cpp
index a3795a4d5..e7b092f27 100644
--- a/sal/systools/win32/uwinapi/FindNextVolumeW.cpp
+++ b/sal/systools/win32/uwinapi/FindNextVolumeW.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.
@@ -27,4 +28,5 @@
#include "macros.h"
-DEFINE_DEFAULT_THUNK( kernel32, TRYLOAD, BOOL, WINAPI, FindNextVolumeW, (HANDLE hFindVolume, LPWSTR lpszVolumeName, DWORD cchBufferLength) ) \ No newline at end of file
+DEFINE_DEFAULT_THUNK( kernel32, TRYLOAD, BOOL, WINAPI, FindNextVolumeW, (HANDLE hFindVolume, LPWSTR lpszVolumeName, DWORD cchBufferLength) )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/systools/win32/uwinapi/FindVolumeClose.cpp b/sal/systools/win32/uwinapi/FindVolumeClose.cpp
index 33b46d381..fe028b306 100644
--- a/sal/systools/win32/uwinapi/FindVolumeClose.cpp
+++ b/sal/systools/win32/uwinapi/FindVolumeClose.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.
@@ -27,4 +28,5 @@
#include "macros.h"
-DEFINE_DEFAULT_THUNK( kernel32, TRYLOAD, BOOL, WINAPI, FindVolumeClose, (HANDLE hFindVolume) ) \ No newline at end of file
+DEFINE_DEFAULT_THUNK( kernel32, TRYLOAD, BOOL, WINAPI, FindVolumeClose, (HANDLE hFindVolume) )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/systools/win32/uwinapi/FindVolumeMountPointClose.cpp b/sal/systools/win32/uwinapi/FindVolumeMountPointClose.cpp
index 69efee4e7..59a4fb203 100644
--- a/sal/systools/win32/uwinapi/FindVolumeMountPointClose.cpp
+++ b/sal/systools/win32/uwinapi/FindVolumeMountPointClose.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.
@@ -27,4 +28,5 @@
#include "macros.h"
-DEFINE_DEFAULT_THUNK( kernel32, TRYLOAD, BOOL, WINAPI, FindVolumeMountPointClose, (HANDLE hFindVolumeMountPoint ) ) \ No newline at end of file
+DEFINE_DEFAULT_THUNK( kernel32, TRYLOAD, BOOL, WINAPI, FindVolumeMountPointClose, (HANDLE hFindVolumeMountPoint ) )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/systools/win32/uwinapi/GetDiskFreeSpaceExA.cpp b/sal/systools/win32/uwinapi/GetDiskFreeSpaceExA.cpp
index b681a762b..27dee507d 100644
--- a/sal/systools/win32/uwinapi/GetDiskFreeSpaceExA.cpp
+++ b/sal/systools/win32/uwinapi/GetDiskFreeSpaceExA.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.
@@ -57,3 +58,4 @@ IMPLEMENT_THUNK( kernel32, TRYLOAD, BOOL, WINAPI, GetDiskFreeSpaceExA,(
return fSuccess;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/systools/win32/uwinapi/GetDiskFreeSpaceExW.cpp b/sal/systools/win32/uwinapi/GetDiskFreeSpaceExW.cpp
index 452d4274d..fd30de27c 100644
--- a/sal/systools/win32/uwinapi/GetDiskFreeSpaceExW.cpp
+++ b/sal/systools/win32/uwinapi/GetDiskFreeSpaceExW.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.
@@ -39,3 +40,4 @@ IMPLEMENT_THUNK( kernel32, WINDOWS, BOOL, WINAPI, GetDiskFreeSpaceExW,(
return GetDiskFreeSpaceExA( lpRootPathNameA, lpFreeBytesAvailable, lpTotalNumberOfBytes, lpTotalNumberOfFreeBytes );
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/systools/win32/uwinapi/GetLogicalDriveStringsW.cpp b/sal/systools/win32/uwinapi/GetLogicalDriveStringsW.cpp
index fcd44e18f..0b14490c5 100644
--- a/sal/systools/win32/uwinapi/GetLogicalDriveStringsW.cpp
+++ b/sal/systools/win32/uwinapi/GetLogicalDriveStringsW.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.
@@ -38,4 +39,5 @@ IMPLEMENT_THUNK( kernel32, WINDOWS, DWORD, WINAPI, GetLogicalDriveStringsW, ( DW
STRBUF2WSTR( lpBuffer, (int) (dwResult + 1), (int) cchBuffer );
return dwResult;
-} \ No newline at end of file
+}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/systools/win32/uwinapi/GetLongPathName.cpp b/sal/systools/win32/uwinapi/GetLongPathName.cpp
index 5f26c1909..77df88a55 100644
--- a/sal/systools/win32/uwinapi/GetLongPathName.cpp
+++ b/sal/systools/win32/uwinapi/GetLongPathName.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.
@@ -111,3 +112,4 @@
return dwResult;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/systools/win32/uwinapi/GetLongPathNameA.cpp b/sal/systools/win32/uwinapi/GetLongPathNameA.cpp
index 4d095da66..259b33117 100644
--- a/sal/systools/win32/uwinapi/GetLongPathNameA.cpp
+++ b/sal/systools/win32/uwinapi/GetLongPathNameA.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.
@@ -28,4 +29,5 @@
#include "macros.h"
IMPLEMENT_THUNK( kernel32, WINDOWS, DWORD, WINAPI, GetLongPathNameA, ( LPCTSTR lpShortPath, LPTSTR lpLongPath, DWORD cchBuffer ) )
-#include "GetLongPathName.cpp" \ No newline at end of file
+#include "GetLongPathName.cpp"
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/systools/win32/uwinapi/GetLongPathNameW.cpp b/sal/systools/win32/uwinapi/GetLongPathNameW.cpp
index 7ca31aca0..9a473937a 100644
--- a/sal/systools/win32/uwinapi/GetLongPathNameW.cpp
+++ b/sal/systools/win32/uwinapi/GetLongPathNameW.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.
@@ -61,3 +62,5 @@ EXTERN_C void WINAPI ResolveThunk_GetLongPathNameW( FARPROC *lppfn, LPCSTR lpLib
DEFINE_CUSTOM_THUNK( kernel32, GetLongPathNameW, DWORD, WINAPI, GetLongPathNameW, ( LPCWSTR lpShortPathW, LPWSTR lpLongPathW, DWORD cchBuffer ) );
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/systools/win32/uwinapi/GetModuleFileNameExA.cpp b/sal/systools/win32/uwinapi/GetModuleFileNameExA.cpp
index 8b5d5b5d5..b765be70e 100644
--- a/sal/systools/win32/uwinapi/GetModuleFileNameExA.cpp
+++ b/sal/systools/win32/uwinapi/GetModuleFileNameExA.cpp
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
#include "macros.h"
#ifdef _MSC_VER
#pragma warning(push,1) // disable warnings within system headers
@@ -51,3 +52,4 @@ IMPLEMENT_THUNK( psapi, WINDOWS, DWORD, WINAPI, GetModuleFileNameExA, (HANDLE hP
return dwResult;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/systools/win32/uwinapi/GetModuleFileNameExW.cpp b/sal/systools/win32/uwinapi/GetModuleFileNameExW.cpp
index 1f9527922..2c476731c 100644
--- a/sal/systools/win32/uwinapi/GetModuleFileNameExW.cpp
+++ b/sal/systools/win32/uwinapi/GetModuleFileNameExW.cpp
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
#include "macros.h"
#ifdef _MSC_VER
#pragma warning(push,1) // disable warnings within system headers
@@ -15,4 +16,5 @@ IMPLEMENT_THUNK( psapi, WINDOWS, DWORD, WINAPI, GetModuleFileNameExW, (HANDLE hP
return (DWORD) STR2WSTR( lpFileName, nSize );
else
return 0;
-} \ No newline at end of file
+}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/systools/win32/uwinapi/GetProcessId.cpp b/sal/systools/win32/uwinapi/GetProcessId.cpp
index 0a72c527d..c0fdd07c0 100644
--- a/sal/systools/win32/uwinapi/GetProcessId.cpp
+++ b/sal/systools/win32/uwinapi/GetProcessId.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.
@@ -162,3 +163,5 @@ EXTERN_C void WINAPI ResolveThunk_GetProcessId( FARPROC *lppfn, LPCSTR lpLibFile
DEFINE_CUSTOM_THUNK( kernel32, GetProcessId, DWORD, WINAPI, GetProcessId, ( HANDLE hProcess ) );
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/systools/win32/uwinapi/GetUserDefaultUILanguage.cpp b/sal/systools/win32/uwinapi/GetUserDefaultUILanguage.cpp
index 2777ebc39..cf94a77ea 100644
--- a/sal/systools/win32/uwinapi/GetUserDefaultUILanguage.cpp
+++ b/sal/systools/win32/uwinapi/GetUserDefaultUILanguage.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.
@@ -32,3 +33,4 @@ IMPLEMENT_THUNK( kernel32, WINDOWS, LANGID, WINAPI, GetUserDefaultUILanguage,())
return LANGIDFROMLCID(GetUserDefaultLCID());
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/systools/win32/uwinapi/GetUserDomainA.cpp b/sal/systools/win32/uwinapi/GetUserDomainA.cpp
index d17ea5b5d..92cd9ea96 100644
--- a/sal/systools/win32/uwinapi/GetUserDomainA.cpp
+++ b/sal/systools/win32/uwinapi/GetUserDomainA.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.
@@ -44,3 +45,4 @@ EXTERN_C void WINAPI ResolveThunk_GetUserDomainA( FARPROC *lppfn, LPCSTR lpLibFi
DEFINE_CUSTOM_THUNK( kernel32, GetUserDomainA, DWORD, WINAPI, GetUserDomainA, ( LPSTR lpBuffer, DWORD nSize ) );
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/systools/win32/uwinapi/GetUserDomainW.cpp b/sal/systools/win32/uwinapi/GetUserDomainW.cpp
index 7e72449e1..0a34fe35f 100644
--- a/sal/systools/win32/uwinapi/GetUserDomainW.cpp
+++ b/sal/systools/win32/uwinapi/GetUserDomainW.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.
@@ -45,3 +46,4 @@ EXTERN_C void WINAPI ResolveThunk_GetUserDomainW( FARPROC *lppfn, LPCSTR lpLibFi
DEFINE_CUSTOM_THUNK( kernel32, GetUserDomainW, DWORD, WINAPI, GetUserDomainW, ( LPWSTR lpBuffer, DWORD cchBuffer ) );
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/systools/win32/uwinapi/GetUserDomain_NT.cpp b/sal/systools/win32/uwinapi/GetUserDomain_NT.cpp
index b64b33932..acbb450e3 100644
--- a/sal/systools/win32/uwinapi/GetUserDomain_NT.cpp
+++ b/sal/systools/win32/uwinapi/GetUserDomain_NT.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.
@@ -28,3 +29,5 @@
{
return GetEnvironmentVariable( TEXT("USERDOMAIN"), lpBuffer, nSize );
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/systools/win32/uwinapi/GetUserDomain_WINDOWS.cpp b/sal/systools/win32/uwinapi/GetUserDomain_WINDOWS.cpp
index 1ed83019e..2ed058d33 100644
--- a/sal/systools/win32/uwinapi/GetUserDomain_WINDOWS.cpp
+++ b/sal/systools/win32/uwinapi/GetUserDomain_WINDOWS.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.
@@ -77,3 +78,5 @@
return dwResult;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/systools/win32/uwinapi/GetVolumeNameForVolumeMountPointA.cpp b/sal/systools/win32/uwinapi/GetVolumeNameForVolumeMountPointA.cpp
index c05710579..895d37bfe 100644
--- a/sal/systools/win32/uwinapi/GetVolumeNameForVolumeMountPointA.cpp
+++ b/sal/systools/win32/uwinapi/GetVolumeNameForVolumeMountPointA.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.
@@ -27,4 +28,5 @@
#include "macros.h"
-DEFINE_DEFAULT_THUNK( kernel32, TRYLOAD, BOOL, WINAPI, GetVolumeNameForVolumeMountPointA, (LPCSTR lpszVolumeMountPoint, LPSTR lpszVolumeName, DWORD cchBufferLength) ) \ No newline at end of file
+DEFINE_DEFAULT_THUNK( kernel32, TRYLOAD, BOOL, WINAPI, GetVolumeNameForVolumeMountPointA, (LPCSTR lpszVolumeMountPoint, LPSTR lpszVolumeName, DWORD cchBufferLength) )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/systools/win32/uwinapi/GetVolumeNameForVolumeMountPointW.cpp b/sal/systools/win32/uwinapi/GetVolumeNameForVolumeMountPointW.cpp
index 50bb42edd..12195a2db 100644
--- a/sal/systools/win32/uwinapi/GetVolumeNameForVolumeMountPointW.cpp
+++ b/sal/systools/win32/uwinapi/GetVolumeNameForVolumeMountPointW.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.
@@ -27,4 +28,5 @@
#include "macros.h"
-DEFINE_DEFAULT_THUNK( kernel32, TRYLOAD, BOOL, WINAPI, GetVolumeNameForVolumeMountPointW, (LPCWSTR lpszVolumeMountPoint, LPWSTR lpszVolumeName, DWORD cchBufferLength) ) \ No newline at end of file
+DEFINE_DEFAULT_THUNK( kernel32, TRYLOAD, BOOL, WINAPI, GetVolumeNameForVolumeMountPointW, (LPCWSTR lpszVolumeMountPoint, LPWSTR lpszVolumeName, DWORD cchBufferLength) )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/systools/win32/uwinapi/GetVolumePathNameA.cpp b/sal/systools/win32/uwinapi/GetVolumePathNameA.cpp
index bf18107e7..5b236a90b 100644
--- a/sal/systools/win32/uwinapi/GetVolumePathNameA.cpp
+++ b/sal/systools/win32/uwinapi/GetVolumePathNameA.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.
@@ -27,4 +28,5 @@
#include "macros.h"
-DEFINE_DEFAULT_THUNK( kernel32, TRYLOAD, BOOL, WINAPI, GetVolumePathNameA, (LPCSTR lpszFileName, LPSTR lpszVolumePathName, DWORD cchBufferLength) ) \ No newline at end of file
+DEFINE_DEFAULT_THUNK( kernel32, TRYLOAD, BOOL, WINAPI, GetVolumePathNameA, (LPCSTR lpszFileName, LPSTR lpszVolumePathName, DWORD cchBufferLength) )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/systools/win32/uwinapi/GetVolumePathNameW.cpp b/sal/systools/win32/uwinapi/GetVolumePathNameW.cpp
index 3194ef1ce..d333b1dd3 100644
--- a/sal/systools/win32/uwinapi/GetVolumePathNameW.cpp
+++ b/sal/systools/win32/uwinapi/GetVolumePathNameW.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.
@@ -27,4 +28,5 @@
#include "macros.h"
-DEFINE_DEFAULT_THUNK( kernel32, TRYLOAD, BOOL, WINAPI, GetVolumePathNameW, (LPCWSTR lpszFileName, LPWSTR lpszVolumePathName, DWORD cchBufferLength) ) \ No newline at end of file
+DEFINE_DEFAULT_THUNK( kernel32, TRYLOAD, BOOL, WINAPI, GetVolumePathNameW, (LPCWSTR lpszFileName, LPWSTR lpszVolumePathName, DWORD cchBufferLength) )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/systools/win32/uwinapi/MCIWndCreateW.cpp b/sal/systools/win32/uwinapi/MCIWndCreateW.cpp
index eae0e1868..c4fede9b4 100644
--- a/sal/systools/win32/uwinapi/MCIWndCreateW.cpp
+++ b/sal/systools/win32/uwinapi/MCIWndCreateW.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.
@@ -39,4 +40,5 @@ IMPLEMENT_THUNK( kernel32, WINDOWS, HWND, VFWAPIV, MCIWndCreateW,
AUTO_WSTR2STR( lpFile );
return MCIWndCreateA( hwndParent, hInstance, dwStyle, lpFileA );
-} \ No newline at end of file
+}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/systools/win32/uwinapi/MoveFileExA.cpp b/sal/systools/win32/uwinapi/MoveFileExA.cpp
index 6a39b4a3f..6c47078a4 100644
--- a/sal/systools/win32/uwinapi/MoveFileExA.cpp
+++ b/sal/systools/win32/uwinapi/MoveFileExA.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.
@@ -26,6 +27,7 @@
************************************************************************/
#include "macros.h"
+#include <sal/macros.h>
#define WININIT_FILENAME "wininit.ini"
#define RENAME_SECTION "rename"
@@ -49,7 +51,7 @@ IMPLEMENT_THUNK( kernel32, WINDOWS, BOOL, WINAPI, MoveFileExA, ( LPCSTR lpExisti
)
{
CHAR szBuffer[32767]; // The buffer size must not exceed 32K
- DWORD dwBufLen = GetPrivateProfileSectionA( RENAME_SECTION, szBuffer, elementsof(szBuffer), WININIT_FILENAME );
+ DWORD dwBufLen = GetPrivateProfileSectionA( RENAME_SECTION, szBuffer, SAL_N_ELEMENTS(szBuffer), WININIT_FILENAME );
CHAR szRename[MAX_PATH]; // This is enough for at most to times 67 chracters
strcpy( szRename, szNewFileNameA );
@@ -57,7 +59,7 @@ IMPLEMENT_THUNK( kernel32, WINDOWS, BOOL, WINAPI, MoveFileExA, ( LPCSTR lpExisti
strcat( szRename, szExistingFileNameA );
size_t lnRename = strlen(szRename);
- if ( dwBufLen + lnRename + 2 <= elementsof(szBuffer) )
+ if ( dwBufLen + lnRename + 2 <= SAL_N_ELEMENTS(szBuffer) )
{
CopyMemory( &szBuffer[dwBufLen], szRename, lnRename );
szBuffer[dwBufLen + lnRename ] = 0;
@@ -95,3 +97,4 @@ IMPLEMENT_THUNK( kernel32, WINDOWS, BOOL, WINAPI, MoveFileExA, ( LPCSTR lpExisti
return fSuccess;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/systools/win32/uwinapi/MoveFileExW.cpp b/sal/systools/win32/uwinapi/MoveFileExW.cpp
index 704318201..edd3c773c 100644
--- a/sal/systools/win32/uwinapi/MoveFileExW.cpp
+++ b/sal/systools/win32/uwinapi/MoveFileExW.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.
@@ -36,3 +37,4 @@ IMPLEMENT_THUNK( kernel32, WINDOWS, BOOL, WINAPI, MoveFileExW, ( LPCWSTR lpExist
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/systools/win32/uwinapi/PathAddBackslashW.cpp b/sal/systools/win32/uwinapi/PathAddBackslashW.cpp
index c2c1f7284..3dac9f6b0 100644
--- a/sal/systools/win32/uwinapi/PathAddBackslashW.cpp
+++ b/sal/systools/win32/uwinapi/PathAddBackslashW.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.
@@ -40,3 +41,5 @@ IMPLEMENT_THUNK( shlwapi, WINDOWS, LPWSTR, WINAPI, PathAddBackslashW,
STR2WSTR(lpPath, MAX_PATH);
return lpPathW + wcslen(lpPathW);
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/systools/win32/uwinapi/PathCompactPathExW.cpp b/sal/systools/win32/uwinapi/PathCompactPathExW.cpp
index 839006cbb..ef3f70c36 100644
--- a/sal/systools/win32/uwinapi/PathCompactPathExW.cpp
+++ b/sal/systools/win32/uwinapi/PathCompactPathExW.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.
@@ -43,4 +44,5 @@ IMPLEMENT_THUNK( shlwapi, WINDOWS, BOOL, WINAPI, PathCompactPathExW,
BOOL bret = PathCompactPathExA(pOutA, lpPathA, cchMax, dwFlags);
MultiByteToWideChar(CP_ACP, 0, pOutA, -1, pszOut, (int) cchMax);
return bret;
-} \ No newline at end of file
+}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/systools/win32/uwinapi/PathFileExistsW.cpp b/sal/systools/win32/uwinapi/PathFileExistsW.cpp
index fd868d307..b5a292d21 100644
--- a/sal/systools/win32/uwinapi/PathFileExistsW.cpp
+++ b/sal/systools/win32/uwinapi/PathFileExistsW.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.
@@ -38,3 +39,5 @@ IMPLEMENT_THUNK( shlwapi, WINDOWS, BOOL, WINAPI, PathFileExistsW,
AUTO_WSTR2STR(lpPath);
return PathFileExistsA(lpPathA);
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/systools/win32/uwinapi/PathFindExtensionW.cpp b/sal/systools/win32/uwinapi/PathFindExtensionW.cpp
index d04c933fb..5b40591b9 100644
--- a/sal/systools/win32/uwinapi/PathFindExtensionW.cpp
+++ b/sal/systools/win32/uwinapi/PathFindExtensionW.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.
@@ -50,3 +51,5 @@ IMPLEMENT_THUNK( shlwapi, WINDOWS, LPWSTR, WINAPI, PathFindExtensionW,
else
return const_cast<LPWSTR>(lpPathW) + wcslen(lpPathW);
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/systools/win32/uwinapi/PathFindFileNameW.cpp b/sal/systools/win32/uwinapi/PathFindFileNameW.cpp
index 23eead913..975ae1dd3 100644
--- a/sal/systools/win32/uwinapi/PathFindFileNameW.cpp
+++ b/sal/systools/win32/uwinapi/PathFindFileNameW.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.
@@ -49,3 +50,5 @@ IMPLEMENT_THUNK( shlwapi, WINDOWS, LPWSTR, WINAPI, PathFindFileNameW,
else
return const_cast<LPWSTR>(lpPathW);
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/systools/win32/uwinapi/PathIsFileSpecW.cpp b/sal/systools/win32/uwinapi/PathIsFileSpecW.cpp
index 1e2ed8609..5ee3bf9e7 100644
--- a/sal/systools/win32/uwinapi/PathIsFileSpecW.cpp
+++ b/sal/systools/win32/uwinapi/PathIsFileSpecW.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.
@@ -38,3 +39,5 @@ IMPLEMENT_THUNK( shlwapi, WINDOWS, BOOL, WINAPI, PathIsFileSpecW,
AUTO_WSTR2STR(lpPath);
return PathIsFileSpecA(lpPathA);
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/systools/win32/uwinapi/PathIsUNCW.cpp b/sal/systools/win32/uwinapi/PathIsUNCW.cpp
index 9e943488c..289dbca69 100644
--- a/sal/systools/win32/uwinapi/PathIsUNCW.cpp
+++ b/sal/systools/win32/uwinapi/PathIsUNCW.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.
@@ -38,3 +39,5 @@ IMPLEMENT_THUNK( shlwapi, WINDOWS, BOOL, WINAPI, PathIsUNCW,
AUTO_WSTR2STR(lpPath);
return PathIsUNCA(lpPathA);
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/systools/win32/uwinapi/PathRemoveExtensionW.cpp b/sal/systools/win32/uwinapi/PathRemoveExtensionW.cpp
index ab7bb71be..5222cc713 100644
--- a/sal/systools/win32/uwinapi/PathRemoveExtensionW.cpp
+++ b/sal/systools/win32/uwinapi/PathRemoveExtensionW.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.
@@ -39,3 +40,5 @@ IMPLEMENT_THUNK( shlwapi, WINDOWS, void, WINAPI, PathRemoveExtensionW,
PathRemoveExtensionA(lpPathA);
STR2WSTR(lpPath, wcslen(lpPathW) + 1);
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/systools/win32/uwinapi/PathRemoveFileSpecW.cpp b/sal/systools/win32/uwinapi/PathRemoveFileSpecW.cpp
index c40821de8..e10de8987 100644
--- a/sal/systools/win32/uwinapi/PathRemoveFileSpecW.cpp
+++ b/sal/systools/win32/uwinapi/PathRemoveFileSpecW.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.
@@ -40,3 +41,5 @@ IMPLEMENT_THUNK( shlwapi, WINDOWS, BOOL, WINAPI, PathRemoveFileSpecW,
STR2WSTR(lpPath, wcslen(lpPathW) + 1);
return bret;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/systools/win32/uwinapi/PathSetDlgItemPathW.cpp b/sal/systools/win32/uwinapi/PathSetDlgItemPathW.cpp
index 2d1856d88..c87aee3c9 100644
--- a/sal/systools/win32/uwinapi/PathSetDlgItemPathW.cpp
+++ b/sal/systools/win32/uwinapi/PathSetDlgItemPathW.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.
@@ -40,3 +41,5 @@ IMPLEMENT_THUNK( shlwapi, WINDOWS, void, WINAPI, PathSetDlgItemPathW,
AUTO_WSTR2STR(lpPath);
PathSetDlgItemPathA(hDlg, id, lpPathA);
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/systools/win32/uwinapi/PathStripToRootW.cpp b/sal/systools/win32/uwinapi/PathStripToRootW.cpp
index edad2fcc8..e439561ec 100644
--- a/sal/systools/win32/uwinapi/PathStripToRootW.cpp
+++ b/sal/systools/win32/uwinapi/PathStripToRootW.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.
@@ -40,3 +41,5 @@ IMPLEMENT_THUNK( shlwapi, WINDOWS, BOOL, WINAPI, PathStripToRootW,
STR2WSTR(lpPath, wcslen(lpPathW) + 1);
return bret;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/systools/win32/uwinapi/ResolveThunk.cpp b/sal/systools/win32/uwinapi/ResolveThunk.cpp
index 53ad10f6e..1c8da78e2 100644
--- a/sal/systools/win32/uwinapi/ResolveThunk.cpp
+++ b/sal/systools/win32/uwinapi/ResolveThunk.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.
@@ -62,3 +63,4 @@ EXTERN_C void WINAPI ResolveThunk_ALLWAYS( FARPROC *lppfn, LPCSTR lpLibFileName,
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/systools/win32/uwinapi/ResolveUnicows.cpp b/sal/systools/win32/uwinapi/ResolveUnicows.cpp
index 3077e925b..194c7bea2 100644
--- a/sal/systools/win32/uwinapi/ResolveUnicows.cpp
+++ b/sal/systools/win32/uwinapi/ResolveUnicows.cpp
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
#ifdef __MINGW32__
#define _GDI32_
#include "macros.h"
@@ -513,3 +514,5 @@ DEFINE_UNICOWS_THUNK( winmm, PROC, WINAPI, wglGetProcAddress, (LPCSTR) )
DEFINE_UNICOWS_THUNK( user32, int, WINAPIV, wsprintfW, (LPWSTR,LPCWSTR,...) )
DEFINE_UNICOWS_THUNK( user32, int, WINAPI, wvsprintfW, (LPWSTR,LPCWSTR,va_list arglist) )
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/systools/win32/uwinapi/SHCreateItemFromParsingName.cpp b/sal/systools/win32/uwinapi/SHCreateItemFromParsingName.cpp
index bc3241153..1ca6733a6 100644
--- a/sal/systools/win32/uwinapi/SHCreateItemFromParsingName.cpp
+++ b/sal/systools/win32/uwinapi/SHCreateItemFromParsingName.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.
@@ -30,4 +31,5 @@
#include "macros.h"
-DEFINE_DEFAULT_THUNK( shell32, TRYLOAD, HRESULT, WINAPI, SHCreateItemFromParsingName, (PCWSTR pszPath, IBindCtx *pbc, REFIID riid, void **ppv) ) \ No newline at end of file
+DEFINE_DEFAULT_THUNK( shell32, TRYLOAD, HRESULT, WINAPI, SHCreateItemFromParsingName, (PCWSTR pszPath, IBindCtx *pbc, REFIID riid, void **ppv) )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/systools/win32/uwinapi/SHILCreateFromPathW.cpp b/sal/systools/win32/uwinapi/SHILCreateFromPathW.cpp
index aa2c489a0..5441eb3b8 100644
--- a/sal/systools/win32/uwinapi/SHILCreateFromPathW.cpp
+++ b/sal/systools/win32/uwinapi/SHILCreateFromPathW.cpp
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
#include "uwinapi.h"
EXTERN_C LPITEMIDLIST WINAPI SHSimpleIDListFromPathW_Failure( LPCWSTR lpPathW )
@@ -30,3 +31,5 @@ EXTERN_C void WINAPI ResolveThunk_SHSimpleIDListFromPathW( FARPROC *lppfn, LPCST
DEFINE_CUSTOM_THUNK( kernel32, GetLongPathNameW, DWORD, WINAPI, GetLongPathNameW, ( LPCWSTR lpShortPathW, LPWSTR lpLongPathW, DWORD cchBuffer ) );
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/systools/win32/uwinapi/SetVolumeMountPointA.cpp b/sal/systools/win32/uwinapi/SetVolumeMountPointA.cpp
index d11da4d0c..efe640874 100644
--- a/sal/systools/win32/uwinapi/SetVolumeMountPointA.cpp
+++ b/sal/systools/win32/uwinapi/SetVolumeMountPointA.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.
@@ -27,4 +28,5 @@
#include "macros.h"
-DEFINE_DEFAULT_THUNK( kernel32, TRYLOAD, BOOL, WINAPI, SetVolumeMountPointA, (LPCSTR lpszVolumeMountPoint, LPCSTR lpszVolumeName) ) \ No newline at end of file
+DEFINE_DEFAULT_THUNK( kernel32, TRYLOAD, BOOL, WINAPI, SetVolumeMountPointA, (LPCSTR lpszVolumeMountPoint, LPCSTR lpszVolumeName) )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/systools/win32/uwinapi/SetVolumeMountPointW.cpp b/sal/systools/win32/uwinapi/SetVolumeMountPointW.cpp
index fd61b3572..5d2ff95e8 100644
--- a/sal/systools/win32/uwinapi/SetVolumeMountPointW.cpp
+++ b/sal/systools/win32/uwinapi/SetVolumeMountPointW.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.
@@ -27,4 +28,5 @@
#include "macros.h"
-DEFINE_DEFAULT_THUNK( kernel32, TRYLOAD, BOOL, WINAPI, SetVolumeMountPointW, (LPCWSTR lpszVolumeMountPoint, LPCWSTR lpszVolumeName) ) \ No newline at end of file
+DEFINE_DEFAULT_THUNK( kernel32, TRYLOAD, BOOL, WINAPI, SetVolumeMountPointW, (LPCWSTR lpszVolumeMountPoint, LPCWSTR lpszVolumeName) )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/systools/win32/uwinapi/Uwinapi.h b/sal/systools/win32/uwinapi/Uwinapi.h
index 63ca775be..5a1db0e87 100644
--- a/sal/systools/win32/uwinapi/Uwinapi.h
+++ b/sal/systools/win32/uwinapi/Uwinapi.h
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
#pragma once
#ifdef _UWINAPI_
@@ -47,11 +48,6 @@ EXTERN_C WINBASEAPI LPWSTR WINAPI lstrrchrW( LPCWSTR lpString, WCHAR c );
#define lstrchr lstrchrA
#endif
-// macro that calculates the count of elements of a static array
-
-#define bufsizeof(buf) (sizeof(buf) / sizeof((buf)[0]))
-
-
#define IsValidHandle(Handle) ((DWORD)(Handle) + 1 > 1)
#ifdef __cplusplus
@@ -134,4 +130,5 @@ EXTERN_C _declspec( naked ) rettype calltype func params \
{ \
_asm jmp [module##_##func##_Ptr] \
} \
-EXTERN_C _declspec( dllexport ) FARPROC module##_##func##_Ptr = (FARPROC)func##_Thunk; \ No newline at end of file
+EXTERN_C _declspec( dllexport ) FARPROC module##_##func##_Ptr = (FARPROC)func##_Thunk;
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/systools/win32/uwinapi/macros.h b/sal/systools/win32/uwinapi/macros.h
index 1ebb1e339..c550c2439 100644
--- a/sal/systools/win32/uwinapi/macros.h
+++ b/sal/systools/win32/uwinapi/macros.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.
@@ -40,7 +41,7 @@
# ifdef UNICODE
# define _UNICODE
# endif
-# include <TCHAR.H>
+# include <tchar.h>
#endif
// Globally disable "warning C4100: unreferenced formal parameter" caused by
@@ -230,3 +231,5 @@ static rettype calltype func##_##Failure params \
return (rettype)0; \
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/systools/win32/uwinapi/makefile.mk b/sal/systools/win32/uwinapi/makefile.mk
index 4893bfefa..1ec7706b8 100644
--- a/sal/systools/win32/uwinapi/makefile.mk
+++ b/sal/systools/win32/uwinapi/makefile.mk
@@ -47,14 +47,11 @@ CXXFLAGS+= $(LFS_CFLAGS)
CFLAGSCXX+=-Wno-unused-parameter -Wno-return-type
.ENDIF
-.IF "$(COMEX)"=="9"
-.IF "$(PSDK_HOME)"!=""
-# Since the 02/2003 PSDK the "new" linker is needed here.
-LINK=$(WRAPCMD) "$(PSDK_HOME)$/Bin$/Win64$/LINK.EXE"
-.ENDIF
-.ENDIF
+SLOFILES=
-SLOFILES=\
+.IF "$(CPU)"=="I" && "$(CROSS_COMPILING)"!="YES"
+
+SLOFILES+=\
$(SLO)$/CheckTokenMembership.obj\
$(SLO)$/CommandLineToArgvW.obj\
$(SLO)$/CopyFileExA.obj\
@@ -79,8 +76,6 @@ SLOFILES=\
$(SLO)$/DllMain.obj\
$(SLO)$/ResolveThunk.obj\
$(SLO)$/ResolveUnicows.obj\
- $(SLO)$/snprintf.obj\
- $(SLO)$/snwprintf.obj\
$(SLO)$/FindFirstVolumeA.obj\
$(SLO)$/FindFirstVolumeW.obj\
$(SLO)$/FindNextVolumeA.obj\
@@ -111,25 +106,21 @@ SLOFILES=\
$(SLO)$/PathSetDlgItemPathW.obj\
$(SLO)$/PathStripToRootW.obj\
$(SLO)$/SHCreateItemFromParsingName.obj
-
+
+.ENDIF
+
+SLOFILES+=\
+ $(SLO)$/snprintf.obj\
+ $(SLO)$/snwprintf.obj
+
SHL1TARGET=$(TARGET)
SHL1IMPLIB=$(SHL1TARGET)
SHL1DEF=$(MISC)/$(SHL1TARGET).def
DEF1NAME=$(SHL1TARGET)
-.IF "$(COM)"=="GCC"
-DEF1EXPORTFILE=\
- $(SHL1TARGET)_mingw.dxp\
- unicows_mingw.dxp
-.ELSE
-DEF1EXPORTFILE=\
- $(SHL1TARGET).dxp\
- unicows.dxp
-.ENDIF
DEF1DEPN=\
$(DEF1EXPORTFILE)\
makefile.mk
-#SHL1VERINFO=$(SHL1TARGET).rc
SHL1OBJS=$(SLOFILES)
#No default libraries
@@ -141,9 +132,6 @@ SHL1STDLIBS=\
$(MINGW_LIBGCC)
MINGWSSTDOBJ=
MINGWSSTDENDOBJ=
-.ELSE
-SHL1STDLIBS=\
- unicows.lib
.ENDIF
SHL1STDLIBS+=\
@@ -157,11 +145,4 @@ SHL1STDLIBS+=\
.ENDIF
-.IF "$(COM)"=="GCC"
-ALL: ALLTAR $(LB)$/libuwinapi.a
-
-$(LB)$/libuwinapi.a: $(MISC)$/uwinapi.def
- dlltool --dllname uwinapi.dll --input-def=$(MISC)$/uwinapi.def --kill-at --output-lib=$(LB)$/libuwinapi.a
-.ENDIF
-
.INCLUDE : target.mk
diff --git a/sal/systools/win32/uwinapi/snprintf.c b/sal/systools/win32/uwinapi/snprintf.c
index 694eef21f..3c07e6863 100644
--- a/sal/systools/win32/uwinapi/snprintf.c
+++ b/sal/systools/win32/uwinapi/snprintf.c
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* Not unicode */
#undef _UNICODE
@@ -8,3 +9,5 @@
#endif
#include "sntprintf.c"
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/systools/win32/uwinapi/sntprintf.c b/sal/systools/win32/uwinapi/sntprintf.c
index a256812ad..b5316f022 100644
--- a/sal/systools/win32/uwinapi/sntprintf.c
+++ b/sal/systools/win32/uwinapi/sntprintf.c
@@ -1,8 +1,13 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
#define _SNPRINTF_DLLIMPORT __declspec( dllexport )
#include <stdarg.h>
#include <stdio.h>
+#ifdef __MINGW32__
+/* MinGW-w64 doesn't have a _tcsinc() inline or library function */
+#define _MB_MAP_DIRECT
+#endif
#include <tchar.h>
#include <systools/win32/snprintf.h>
@@ -116,3 +121,5 @@ _SNPRINTF_DLLIMPORT int __cdecl sntprintf( _TCHAR *buffer, size_t count, const _
return retval;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/systools/win32/uwinapi/snwprintf.c b/sal/systools/win32/uwinapi/snwprintf.c
index 80a5760c8..9b159c9b2 100644
--- a/sal/systools/win32/uwinapi/snwprintf.c
+++ b/sal/systools/win32/uwinapi/snwprintf.c
@@ -1,5 +1,8 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
#ifndef _UNICODE
#define _UNICODE
#endif
#include "sntprintf.c"
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/systools/win32/uwinapi/toolhelp.cpp b/sal/systools/win32/uwinapi/toolhelp.cpp
index 7b651581b..411b6a2b6 100644
--- a/sal/systools/win32/uwinapi/toolhelp.cpp
+++ b/sal/systools/win32/uwinapi/toolhelp.cpp
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
#include "macros.h"
#include <tlhelp32.h>
@@ -55,3 +56,5 @@ IMPLEMENT_THUNK( kernel32, TRYLOAD, HANDLE, WINAPI, CreateToolhelp32Snapshot, (D
SetLastError( ERROR_CALL_NOT_IMPLEMENTED );
return NULL;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/systools/win32/uwinapi/win95sys.h b/sal/systools/win32/uwinapi/win95sys.h
index 0a55617b5..a02789ece 100644
--- a/sal/systools/win32/uwinapi/win95sys.h
+++ b/sal/systools/win32/uwinapi/win95sys.h
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
#pragma once
//Kernel32 objects
@@ -346,3 +347,4 @@ DWORD LastTlsSetValueEIP[64]; // 200h (parallel to TlsArray, contains EIP
// where TLS value was last set from)
} THREAD_DATABASE, *PTHREAD_DATABASE;
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */