Kaydet (Commit) 335cd830 authored tarafından Tor Lillqvist's avatar Tor Lillqvist

Kill superfluous vertical whitespace

Change-Id: I8c37b9ec45836f9c0e2dc0cf232f96f23c7c36d3
üst c04f4393
......@@ -348,7 +348,6 @@ get_jni_string_array(JNIEnv *env,
return JNI_TRUE;
}
// public static native int getpid();
__attribute__ ((visibility("default")))
......@@ -362,7 +361,6 @@ Java_org_libreoffice_android_Bootstrap_getpid(JNIEnv* env,
return getpid();
}
// public static native void system(String cmdline);
__attribute__ ((visibility("default")))
......
......@@ -225,7 +225,6 @@ do {
HASH_FSCK(hh,head); \
} while (0)
/* convenience forms of HASH_FIND/HASH_ADD/HASH_DEL */
#define HASH_FIND_STR(head,findstr,out) \
HASH_FIND(hh,head,findstr,strlen(findstr),out)
......@@ -333,7 +332,6 @@ do {
bkt = (hashv) & (num_bkts-1); \
} while (0)
/* SAX/FNV/OAT/JEN hash functions are macro variants of those listed at
* http://eternallyconfuzzled.com/tuts/algorithms/jsw_tut_hashing.aspx */
#define HASH_SAX(key,keylen,num_bkts,hashv,bkt) \
......@@ -751,7 +749,6 @@ do {
uthash_expand_fyi(tbl); \
} while(0)
/* This is an adaptation of Simon Tatham's O(n log(n)) mergesort */
/* Note that HASH_SORT assumes the hash handle name to be hh.
* HASH_SRT was added to allow the hash handle name to be passed in. */
......
......@@ -23,10 +23,8 @@
#include <osl/diagnose.h>
#include <rtl/alloc.h>
// AllocatorTraits
namespace
{
......@@ -70,8 +68,6 @@ struct AllocatorTraits
}
};
struct VectorTraits : public AllocatorTraits
{
static const signature_type g_signature;
......@@ -95,18 +91,14 @@ const AllocatorTraits::signature_type ScalarTraits::g_signature = "new() ";
} // anonymous namespace
// Allocator
static void default_handler (void)
{
// Multithreading race in 'std::set_new_handler()' call sequence below.
throw std::bad_alloc();
}
static void* allocate (
std::size_t n, AllocatorTraits const & rTraits)
SAL_THROW((std::bad_alloc))
......@@ -128,8 +120,6 @@ static void* allocate (
}
}
static void* allocate_nothrow (
std::size_t n, AllocatorTraits const & rTraits)
SAL_THROW(())
......@@ -144,8 +134,6 @@ static void* allocate_nothrow (
}
}
static void deallocate (void * p, AllocatorTraits const & rTraits)
SAL_THROW(())
{
......@@ -155,70 +143,52 @@ static void deallocate (void * p, AllocatorTraits const & rTraits)
}
}
// T * p = new T; delete p;
void* SAL_CALL operator new (std::size_t n) throw (std::bad_alloc)
{
return allocate (n, ScalarTraits());
}
void SAL_CALL operator delete (void * p) throw ()
{
deallocate (p, ScalarTraits());
}
// T * p = new(nothrow) T; delete(nothrow) p;
void* SAL_CALL operator new (std::size_t n, std::nothrow_t const &) throw ()
{
return allocate_nothrow (n, ScalarTraits());
}
void SAL_CALL operator delete (void * p, std::nothrow_t const &) throw ()
{
deallocate (p, ScalarTraits());
}
// T * p = new T[n]; delete[] p;
void* SAL_CALL operator new[] (std::size_t n) throw (std::bad_alloc)
{
return allocate (n, VectorTraits());
}
void SAL_CALL operator delete[] (void * p) throw ()
{
deallocate (p, VectorTraits());
}
// T * p = new(nothrow) T[n]; delete(nothrow)[] p;
void* SAL_CALL operator new[] (std::size_t n, std::nothrow_t const &) throw ()
{
return allocate_nothrow (n, VectorTraits());
}
void SAL_CALL operator delete[] (void * p, std::nothrow_t const &) throw ()
{
deallocate (p, VectorTraits());
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include "rtl/strbuf.hxx"
#include "rtl/string.hxx"
#include "rtl/ustring.hxx"
......
......@@ -25,7 +25,6 @@ static sal_uInt32 SAL_CALL osl_defCalcTextWidth( rtl_uString *ustrText )
return ustrText ? ustrText->length : 0;
}
oslFileError SAL_CALL osl_abbreviateSystemPath( rtl_uString *ustrSystemPath, rtl_uString **pustrCompacted, sal_uInt32 uMaxWidth, oslCalcTextWidthFunc pfnCalcWidth )
{
oslFileError error = osl_File_E_None;
......@@ -112,5 +111,4 @@ oslFileError SAL_CALL osl_abbreviateSystemPath( rtl_uString *ustrSystemPath, rtl
return error;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include "sal/config.h"
#include <cstddef>
......
......@@ -19,7 +19,6 @@
#include "osl/time.h"
/*
* mfe : maybe it would be wishful to include initialization
* of the global timer in dllmain or _init directly.
......@@ -42,7 +41,6 @@ public:
return osl_getGlobalTimer();
}
};
static OGlobalTimer aGlobalTimer;
......
......@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#ifdef SOLARIS
#include <dlfcn.h>
......@@ -55,7 +54,6 @@
#endif /* defined SPARC or INTEL */
int backtrace( void **buffer, int max_frames )
{
jmp_buf ctx;
......@@ -130,7 +128,6 @@ void backtrace_symbols_fd( void **buffer, int size, int fd )
#endif /* defined SOLARIS */
#if defined FREEBSD || defined NETBSD || defined OPENBSD || defined(DRAGONFLY)
#include <dlfcn.h>
#include <pthread.h>
......@@ -233,7 +230,6 @@ int backtrace( void **buffer, int max_frames )
return i;
}
void backtrace_symbols_fd( void **buffer, int size, int fd )
{
FILE *fp = fdopen( fd, "w" );
......
......@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#if defined (SOLARIS) || defined (FREEBSD) || defined (NETBSD) || \
defined (OPENBSD) || defined (DRAGONFLY) || defined (MACOSX)
......@@ -42,7 +41,6 @@ struct frame {
};
#endif
#ifdef __cplusplus
} /* extern "C" */
#endif
......
......@@ -28,7 +28,6 @@
#include <osl/conditn.h>
#include <osl/time.h>
typedef struct _oslConditionImpl
{
pthread_cond_t m_Condition;
......@@ -36,7 +35,6 @@ typedef struct _oslConditionImpl
bool m_State;
} oslConditionImpl;
oslCondition SAL_CALL osl_createCondition()
{
oslConditionImpl* pCond;
......@@ -331,5 +329,4 @@ sal_Bool SAL_CALL osl_checkCondition(oslCondition Condition)
return State;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -227,5 +227,4 @@ oslFileError oslTranslateFileError(sal_Bool bIsError, int Errno)
return osl_error;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -54,7 +54,6 @@ extern "C"
oslFileError oslTranslateFileError(sal_Bool bIsError, int Errno);
#ifdef __cplusplus
}
#endif
......
......@@ -306,7 +306,6 @@ oslFileError SAL_CALL osl_getNextDirectoryItem(oslDirectory Directory, oslDirect
if (NULL == pEntry)
return osl_File_E_NOENT;
#if defined(MACOSX)
// convert decomposed filename to precomposed unicode
......
......@@ -20,12 +20,10 @@
#ifndef _OSL_FILE_PATH_HELPER_HXX_
#define _OSL_FILE_PATH_HELPER_HXX_
#include "file_path_helper.h"
#include <rtl/ustring.hxx>
namespace osl
{
......@@ -173,11 +171,8 @@ namespace osl
&ustrPathFound.pData);
}
} // namespace osl
#endif /* #ifndef _OSL_PATH_HELPER_HXX_ */
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -109,7 +109,6 @@ namespace
pStat->uAttributes |= osl_File_Attribute_Executable;
}
inline void set_file_hidden_status(const rtl::OUString& file_path, oslFileStatus* pStat)
{
pStat->uAttributes = osl::systemPathIsHiddenFileOrDirectoryEntry(file_path) ? osl_File_Attribute_Hidden : 0;
......
......@@ -251,7 +251,6 @@ oslFileError SAL_CALL osl_getFileURLFromSystemPath( rtl_uString *ustrSystemPath,
return osl_File_E_INVAL;
}
/* check if system path starts with ~ or ~user and replace it with the appropriate home dir */
if( '~' == ustrSystemPath->buffer[0] )
{
......
......@@ -44,7 +44,6 @@
#define FREEBSD 1
#endif
#if defined(SOLARIS)
#include <sys/mnttab.h>
......@@ -220,7 +219,6 @@ oslFileError osl_getVolumeInformation( rtl_uString* ustrDirectoryURL, oslVolumeI
# define __OSL_STATFS_IS_CASE_PRESERVING_FS(a) (true)
#endif /* HAVE_STATFS_H */
static oslFileError osl_psz_getVolumeInformation (
const sal_Char* pszDirectory, oslVolumeInfo* pInfo, sal_uInt32 uFieldMask)
{
......
......@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include "system.h"
#include <osl/interlck.h>
......
......@@ -106,7 +106,6 @@ static bool getModulePathFromAddress(void * address, rtl_String ** path) {
return result;
}
#ifndef DISABLE_DYNLOADING
/*****************************************************************************/
......@@ -244,7 +243,6 @@ osl_getSymbol(oslModule Module, rtl_uString* pSymbolName)
return (void *) osl_getFunctionSymbol(Module, pSymbolName);
}
/*****************************************************************************/
/* osl_getAsciiFunctionSymbol */
/*****************************************************************************/
......
......@@ -36,7 +36,6 @@ typedef struct _oslMutexImpl
pthread_mutex_t mutex;
} oslMutexImpl;
/*****************************************************************************/
/* osl_createMutex */
/*****************************************************************************/
......@@ -155,7 +154,6 @@ sal_Bool SAL_CALL osl_releaseMutex(oslMutexImpl *pMutex)
return sal_False;
}
static oslMutexImpl globalMutexImpl;
static void globalMutexInitImpl(void) {
......
......@@ -41,7 +41,6 @@ typedef struct {
const rtl_TextEncoding value;
} _pair;
/*****************************************************************************
compare function for binary search
*****************************************************************************/
......@@ -85,7 +84,6 @@ _pair_search (const char *key, const _pair *base, unsigned int member )
return NULL;
}
/*****************************************************************************
convert rtl_Locale to locale string
*****************************************************************************/
......
......@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <sal/types.h>
#include <assert.h>
......
......@@ -38,7 +38,6 @@
sal_Bool SAL_CALL osl_psz_getUserIdent(oslSecurity Security, sal_Char *pszIdent, sal_uInt32 nMax);
oslPipe SAL_CALL osl_psz_createPipe(const sal_Char *pszPipeName, oslPipeOptions Options, oslSecurity Security);
static struct
{
int errcode;
......@@ -62,7 +61,6 @@ static struct
{ -1, osl_Pipe_E_invalidError }
};
/* map */
/* mfe: NOT USED
static int osl_NativeFromPipeError(oslPipeError errorCode)
......@@ -88,11 +86,9 @@ static oslPipeError osl_PipeErrorFromNative(int nativeType)
return PipeError[i].error;
}
/* macros */
#define ERROR_FROM_NATIVE(y) osl_PipeErrorFromNative(y)
oslPipe __osl_createPipeImpl()
{
oslPipe pPipeImpl;
......@@ -115,7 +111,6 @@ void __osl_destroyPipeImpl(oslPipe pImpl)
free(pImpl);
}
oslPipe SAL_CALL osl_createPipe(rtl_uString *ustrPipeName, oslPipeOptions Options, oslSecurity Security)
{
oslPipe pPipe=0;
......@@ -307,7 +302,6 @@ oslPipe SAL_CALL osl_psz_createPipe(const sal_Char *pszPipeName, oslPipeOptions
if ( !Security )
chmod(name,S_IRWXU | S_IRWXG |S_IRWXO);
strncpy(pPipe->m_Name, name, sizeof(pPipe->m_Name) - 1);
if ( listen(pPipe->m_Socket, 5) < 0 )
......@@ -413,7 +407,6 @@ void SAL_CALL osl_closePipe( oslPipe pPipe )
}
#endif /* LINUX */
nRet = shutdown(ConnFD, 2);
if ( nRet < 0 )
{
......@@ -435,7 +428,6 @@ void SAL_CALL osl_closePipe( oslPipe pPipe )
/* OSL_TRACE("Out osl_destroyPipe"); */
}
oslPipe SAL_CALL osl_acceptPipe(oslPipe pPipe)
{
int s, flags;
......@@ -547,7 +539,6 @@ sal_Int32 SAL_CALL osl_sendPipe(oslPipe pPipe,
(sal_Char*)pBuffer,
BytesToSend, 0);
if ( nRet <= 0 )
{
OSL_TRACE("osl_sendPipe failed : %i '%s'",nRet,strerror(errno));
......@@ -562,7 +553,6 @@ oslPipeError SAL_CALL osl_getLastPipeError(oslPipe pPipe)
return ERROR_FROM_NATIVE(errno);
}
sal_Int32 SAL_CALL osl_writePipe( oslPipe pPipe, const void *pBuffer , sal_Int32 n )
{
/* loop until all desired bytes were send or an error occurred */
......
......@@ -36,7 +36,6 @@
# endif
#endif
#if defined(FREEBSD) || defined(NETBSD) || defined(DRAGONFLY)
#include <machine/param.h>
#endif
......@@ -167,7 +166,6 @@ oslProcessError SAL_CALL osl_psz_executeProcess(sal_Char *pszImageName,
*
*****************************************************************************/
sal_Bool osl_sendResourcePipe(oslPipe /*pPipe*/, oslSocket /*pSocket*/)
{
return osl_Process_E_InvalidError;
......@@ -179,8 +177,6 @@ oslSocket osl_receiveResourcePipe(oslPipe /*pPipe*/)
return pSocket;
}
/******************************************************************************
*
* Functions for starting a process
......@@ -389,7 +385,6 @@ static void ChildStatusProc(void *pData)
child_pid = pid;
}
if ( child_pid > 0 )
{
oslProcessImpl* pChild;
......@@ -499,12 +494,10 @@ oslProcessError SAL_CALL osl_executeProcess_WithRedirectedIO(
pArguments = (sal_Char**) malloc( ( nArguments + 2 ) * sizeof(sal_Char*) );
}
for ( idx = 0 ; idx < nArguments ; ++idx )
{
rtl_String* strArg =0;
rtl_uString2String( &strArg,
rtl_uString_getStr(ustrArguments[idx]),
rtl_uString_getLength(ustrArguments[idx]),
......@@ -536,7 +529,6 @@ oslProcessError SAL_CALL osl_executeProcess_WithRedirectedIO(
pEnvironment[idx+1]=0;
}
Error = osl_psz_executeProcess(szImagePath,
pArguments,
Options,
......@@ -728,7 +720,6 @@ oslProcessError SAL_CALL osl_psz_executeProcess(sal_Char *pszImageName,
*
*****************************************************************************/
oslProcessError SAL_CALL osl_terminateProcess(oslProcess Process)
{
if (Process == NULL)
......@@ -981,7 +972,6 @@ bool osl_getProcStatus(pid_t pid, struct osl_procStat* procstat)
);
}
tmp = strstr(prstatusbuf,"Gid:");
if(tmp)
{
......@@ -1150,7 +1140,6 @@ oslProcessError SAL_CALL osl_getProcessInfo(oslProcess Process, oslProcessData F
return (pInfo->Fields == Fields) ? osl_Process_E_None : osl_Process_E_Unknown;
}
/***********************************************
helper function for osl_joinProcessWithTimeout
**********************************************/
......
......@@ -52,7 +52,6 @@ extern "C" oslProcessError SAL_CALL osl_bootstrap_getExecutableFile_Impl (
rtl_uString ** ppFileURL
) SAL_THROW_EXTERN_C();
#if defined(MACOSX) || defined(IOS)
#include <mach-o/dyld.h>
......@@ -412,7 +411,6 @@ oslProcessError SAL_CALL osl_clearEnvironment(rtl_uString* pustrEnvVar)
return (result);
}
/***************************************
osl_getProcessWorkingDir().
**************************************/
......
......@@ -84,7 +84,6 @@ typedef struct _osl_TProfileSection
osl_TProfileEntry* m_Entries;
} osl_TProfileSection;
/* Profile-data structure hidden behind oslProfile: */
typedef struct _osl_TProfileImpl
{
......@@ -184,7 +183,6 @@ static oslProfile SAL_CALL osl_psz_openProfile(const sal_Char *pszProfileName, o
}
#endif
if ( ( pFile = openFileImpl(pszProfileName, Flags ) ) == NULL )
{
#ifdef TRACE_OSL_PROFILE
......@@ -193,7 +191,6 @@ static oslProfile SAL_CALL osl_psz_openProfile(const sal_Char *pszProfileName, o
return (NULL);
}
pProfile = (osl_TProfileImpl*)calloc(1, sizeof(osl_TProfileImpl));
if ( pProfile == 0 )
......@@ -273,7 +270,6 @@ sal_Bool SAL_CALL osl_closeProfile(oslProfile Profile)
pTmpProfile = acquireProfile(Profile,sal_False);
}
if ( pTmpProfile == 0 )
{
pthread_mutex_unlock(&(pProfile->m_AccessLock));
......@@ -336,7 +332,6 @@ sal_Bool SAL_CALL osl_closeProfile(oslProfile Profile)
return (sal_True);
}
sal_Bool SAL_CALL osl_flushProfile(oslProfile Profile)
{
osl_TProfileImpl* pProfile = (osl_TProfileImpl*) Profile;
......@@ -432,7 +427,6 @@ static sal_Bool writeProfileImpl(osl_TFile* pFile)
return sal_True;
}
sal_Bool SAL_CALL osl_readProfileString(oslProfile Profile,
const sal_Char* pszSection,
const sal_Char* pszEntry,
......@@ -509,7 +503,6 @@ sal_Bool SAL_CALL osl_readProfileString(oslProfile Profile,
else
{ /* not implemented */ }
bRet=releaseProfile(pProfile);
OSL_ASSERT(bRet);
(void)bRet;
......@@ -830,7 +823,6 @@ sal_Bool SAL_CALL osl_removeProfileEntry(oslProfile Profile,
return sal_False;
}
pProfile = acquireProfile(Profile, sal_True);
if (pProfile == NULL)
......@@ -842,7 +834,6 @@ sal_Bool SAL_CALL osl_removeProfileEntry(oslProfile Profile,
return (sal_False);
}
if (! (pProfile->m_Flags & osl_Profile_SYSTEM))
{
if (((pSec = findEntry(pProfile, pszSection, pszEntry, &NoEntry)) != NULL) &&
......@@ -867,7 +858,6 @@ sal_Bool SAL_CALL osl_removeProfileEntry(oslProfile Profile,
else
{ /* not implemented */ }
bRet = releaseProfile(pProfile);
OSL_ASSERT(bRet);
......@@ -934,7 +924,6 @@ sal_uInt32 SAL_CALL osl_getProfileSectionEntries(oslProfile Profile,
return (0);
}
if (! (pProfile->m_Flags & osl_Profile_SYSTEM))
{
if ((pSec = findEntry(pProfile, pszSection, "", &NoEntry)) != NULL)
......@@ -1065,7 +1054,6 @@ sal_uInt32 SAL_CALL osl_getProfileSections(oslProfile Profile,
else
{ /* not implemented */ }
bRet=releaseProfile(pProfile);
OSL_ASSERT(bRet);
(void)bRet;
......@@ -1088,7 +1076,6 @@ static osl_TStamp OslProfile_getFileStamp(osl_TFile* pFile)
return (0);
}
return (status.st_mtime);
}
......@@ -1129,7 +1116,6 @@ static sal_Bool OslProfile_lockFile(const osl_TFile* pFile, osl_TLockMode eMode)
return (sal_False);
}
if ( bLockingDisabled )
{
#ifdef TRACE_OSL_PROFILE
......@@ -1138,7 +1124,6 @@ static sal_Bool OslProfile_lockFile(const osl_TFile* pFile, osl_TLockMode eMode)
return (sal_True);
}
lock.l_start = 0;
lock.l_whence = SEEK_SET;
lock.l_len = 0;
......@@ -1275,7 +1260,6 @@ static osl_TStamp closeFileImpl(osl_TFile* pFile, oslProfileOption Flags)
pFile->m_Handle = -1;