diff options
Diffstat (limited to 'sal/osl')
-rw-r--r-- | sal/osl/all/compat.cxx | 2 | ||||
-rw-r--r-- | sal/osl/unx/file_misc.cxx | 38 | ||||
-rw-r--r-- | sal/osl/unx/file_stat.cxx | 4 | ||||
-rw-r--r-- | sal/osl/unx/file_url.cxx | 4 | ||||
-rw-r--r-- | sal/osl/unx/file_volume.cxx | 4 | ||||
-rw-r--r-- | sal/osl/unx/module.cxx | 4 | ||||
-rw-r--r-- | sal/osl/unx/pipe.cxx | 12 | ||||
-rw-r--r-- | sal/osl/unx/process.cxx | 36 | ||||
-rw-r--r-- | sal/osl/unx/profile.cxx | 174 | ||||
-rw-r--r-- | sal/osl/unx/secimpl.hxx | 2 | ||||
-rw-r--r-- | sal/osl/unx/security.cxx | 16 | ||||
-rw-r--r-- | sal/osl/unx/socket.cxx | 64 | ||||
-rw-r--r-- | sal/osl/unx/sockimpl.hxx | 2 | ||||
-rw-r--r-- | sal/osl/unx/uunxapi.cxx | 4 | ||||
-rw-r--r-- | sal/osl/w32/file_url.cxx | 26 | ||||
-rw-r--r-- | sal/osl/w32/module.cxx | 4 | ||||
-rw-r--r-- | sal/osl/w32/path_helper.cxx | 8 | ||||
-rw-r--r-- | sal/osl/w32/pipe.cxx | 4 | ||||
-rw-r--r-- | sal/osl/w32/profile.cxx | 152 | ||||
-rw-r--r-- | sal/osl/w32/socket.cxx | 12 |
20 files changed, 286 insertions, 286 deletions
diff --git a/sal/osl/all/compat.cxx b/sal/osl/all/compat.cxx index dd47debea6ec..406c39229397 100644 --- a/sal/osl/all/compat.cxx +++ b/sal/osl/all/compat.cxx @@ -150,7 +150,7 @@ SAL_DLLPUBLIC_EXPORT void SAL_CALL rtl_zeroMemory(void *, sal_Size) { std::abort(); } -SAL_DLLPUBLIC_EXPORT void SAL_CALL rtl_logfile_trace( const sal_Char*, ... ) { +SAL_DLLPUBLIC_EXPORT void SAL_CALL rtl_logfile_trace( const char*, ... ) { std::abort(); } diff --git a/sal/osl/unx/file_misc.cxx b/sal/osl/unx/file_misc.cxx index 7b6ec7457e94..f9f316d8b5fb 100644 --- a/sal/osl/unx/file_misc.cxx +++ b/sal/osl/unx/file_misc.cxx @@ -144,7 +144,7 @@ oslFileType DirectoryItem_Impl::getFileType() const static oslFileError osl_psz_createDirectory( char const * pszPath, sal_uInt32 flags); -static oslFileError osl_psz_removeDirectory(const sal_Char* pszPath); +static oslFileError osl_psz_removeDirectory(const char* pszPath); oslFileError SAL_CALL osl_openDirectory(rtl_uString* ustrDirectoryURL, oslDirectory* pDirectory) { @@ -476,7 +476,7 @@ oslFileError osl_psz_createDirectory(char const * pszPath, sal_uInt32 flags) return osl_File_E_None; } -static oslFileError osl_psz_removeDirectory( const sal_Char* pszPath ) +static oslFileError osl_psz_removeDirectory( const char* pszPath ) { int nRet = rmdir(pszPath); @@ -578,15 +578,15 @@ oslFileError SAL_CALL osl_createDirectoryPath( return create_dir_recursively_(sys_path.pData->buffer, aDirectoryCreationCallbackFunc, pData); } -static oslFileError osl_unlinkFile(const sal_Char* pszPath); -static oslFileError osl_psz_copyFile(const sal_Char* pszPath, const sal_Char* pszDestPath, bool preserveMetadata); -static oslFileError osl_psz_moveFile(const sal_Char* pszPath, const sal_Char* pszDestPath); +static oslFileError osl_unlinkFile(const char* pszPath); +static oslFileError osl_psz_copyFile(const char* pszPath, const char* pszDestPath, bool preserveMetadata); +static oslFileError osl_psz_moveFile(const char* pszPath, const char* pszDestPath); -static oslFileError oslDoCopy(const sal_Char* pszSourceFileName, const sal_Char* pszDestFileName, mode_t nMode, size_t nSourceSize, bool DestFileExists); -static void attemptChangeMetadata(const sal_Char* pszFileName, mode_t nMode, time_t nAcTime, time_t nModTime, uid_t nUID, gid_t nGID); -static int oslDoCopyLink(const sal_Char* pszSourceFileName, const sal_Char* pszDestFileName); -static int oslDoCopyFile(const sal_Char* pszSourceFileName, const sal_Char* pszDestFileName, size_t nSourceSize, mode_t mode); -static oslFileError oslDoMoveFile(const sal_Char* pszPath, const sal_Char* pszDestPath); +static oslFileError oslDoCopy(const char* pszSourceFileName, const char* pszDestFileName, mode_t nMode, size_t nSourceSize, bool DestFileExists); +static void attemptChangeMetadata(const char* pszFileName, mode_t nMode, time_t nAcTime, time_t nModTime, uid_t nUID, gid_t nGID); +static int oslDoCopyLink(const char* pszSourceFileName, const char* pszDestFileName); +static int oslDoCopyFile(const char* pszSourceFileName, const char* pszDestFileName, size_t nSourceSize, mode_t mode); +static oslFileError oslDoMoveFile(const char* pszPath, const char* pszDestPath); oslFileError SAL_CALL osl_moveFile( rtl_uString* ustrFileURL, rtl_uString* ustrDestURL ) { @@ -699,7 +699,7 @@ oslFileError SAL_CALL osl_removeFile(rtl_uString* ustrFileURL) return osl_unlinkFile(path); } -static oslFileError oslDoMoveFile(const sal_Char* pszPath, const sal_Char* pszDestPath) +static oslFileError oslDoMoveFile(const char* pszPath, const char* pszDestPath) { oslFileError tErr = osl_psz_moveFile(pszPath,pszDestPath); if (tErr == osl_File_E_None) @@ -721,7 +721,7 @@ static oslFileError oslDoMoveFile(const sal_Char* pszPath, const sal_Char* pszDe return tErr; } -static oslFileError osl_unlinkFile(const sal_Char* pszPath) +static oslFileError osl_unlinkFile(const char* pszPath) { int nRet=0; struct stat aStat; @@ -749,7 +749,7 @@ static oslFileError osl_unlinkFile(const sal_Char* pszPath) return osl_File_E_None; } -static oslFileError osl_psz_moveFile(const sal_Char* pszPath, const sal_Char* pszDestPath) +static oslFileError osl_psz_moveFile(const char* pszPath, const char* pszDestPath) { int nRet = rename(pszPath,pszDestPath); @@ -765,7 +765,7 @@ static oslFileError osl_psz_moveFile(const sal_Char* pszPath, const sal_Char* ps return osl_File_E_None; } -static oslFileError osl_psz_copyFile( const sal_Char* pszPath, const sal_Char* pszDestPath, bool preserveMetadata ) +static oslFileError osl_psz_copyFile( const char* pszPath, const char* pszDestPath, bool preserveMetadata ) { time_t nAcTime=0; time_t nModTime=0; @@ -832,7 +832,7 @@ static oslFileError osl_psz_copyFile( const sal_Char* pszPath, const sal_Char* p return tErr; } -static oslFileError oslDoCopy(const sal_Char* pszSourceFileName, const sal_Char* pszDestFileName, mode_t nMode, size_t nSourceSize, bool DestFileExists) +static oslFileError oslDoCopy(const char* pszSourceFileName, const char* pszDestFileName, mode_t nMode, size_t nSourceSize, bool DestFileExists) { int nRet=0; @@ -913,7 +913,7 @@ static oslFileError oslDoCopy(const sal_Char* pszSourceFileName, const sal_Char* return osl_File_E_None; } -void attemptChangeMetadata( const sal_Char* pszFileName, mode_t nMode, time_t nAcTime, time_t nModTime, uid_t nUID, gid_t nGID) +void attemptChangeMetadata( const char* pszFileName, mode_t nMode, time_t nAcTime, time_t nModTime, uid_t nUID, gid_t nGID) { struct utimbuf aTimeBuffer; @@ -954,13 +954,13 @@ void attemptChangeMetadata( const sal_Char* pszFileName, mode_t nMode, time_t nA SAL_INFO("sal.file", "lchown(" << pszFileName << "): OK"); } -static int oslDoCopyLink(const sal_Char* pszSourceFileName, const sal_Char* pszDestFileName) +static int oslDoCopyLink(const char* pszSourceFileName, const char* pszDestFileName) { int nRet=0; /* mfe: if dest file is symbolic link remove the link and place the file instead (hro says so) */ /* mfe: if source is a link copy the link and not the file it points to (hro says so) */ - sal_Char pszLinkContent[PATH_MAX+1]; + char pszLinkContent[PATH_MAX+1]; pszLinkContent[0] = '\0'; @@ -985,7 +985,7 @@ static int oslDoCopyLink(const sal_Char* pszSourceFileName, const sal_Char* pszD return 0; } -static int oslDoCopyFile(const sal_Char* pszSourceFileName, const sal_Char* pszDestFileName, size_t nSourceSize, mode_t mode) +static int oslDoCopyFile(const char* pszSourceFileName, const char* pszDestFileName, size_t nSourceSize, mode_t mode) { oslFileHandle SourceFileFH=nullptr; int DestFileFD=0; diff --git a/sal/osl/unx/file_stat.cxx b/sal/osl/unx/file_stat.cxx index dce25b5a1990..4d7a7cb43da5 100644 --- a/sal/osl/unx/file_stat.cxx +++ b/sal/osl/unx/file_stat.cxx @@ -266,7 +266,7 @@ oslFileError SAL_CALL osl_getFileStatus(oslDirectoryItem Item, oslFileStatus* pS return osl_File_E_None; } -static oslFileError osl_psz_setFileAttributes( const sal_Char* pszFilePath, sal_uInt64 uAttributes ) +static oslFileError osl_psz_setFileAttributes( const char* pszFilePath, sal_uInt64 uAttributes ) { oslFileError osl_error = osl_File_E_None; mode_t nNewMode = 0; @@ -327,7 +327,7 @@ oslFileError SAL_CALL osl_setFileAttributes( rtl_uString* ustrFileURL, sal_uInt6 } static oslFileError osl_psz_setFileTime ( - const sal_Char* pszFilePath, + const char* pszFilePath, const TimeValue* pLastAccessTime, const TimeValue* pLastWriteTime ) { diff --git a/sal/osl/unx/file_url.cxx b/sal/osl/unx/file_url.cxx index 33fcd2952802..207bb907feaf 100644 --- a/sal/osl/unx/file_url.cxx +++ b/sal/osl/unx/file_url.cxx @@ -127,7 +127,7 @@ namespace { } sal_Size convert( - sal_Unicode const * pSrcBuf, sal_Size nSrcChars, sal_Char * pDstBuf, sal_Size nDstBytes, + sal_Unicode const * pSrcBuf, sal_Size nSrcChars, char * pDstBuf, sal_Size nDstBytes, sal_uInt32 nFlags, sal_uInt32 * pInfo, sal_Size * pSrcCvtChars) { OSL_ASSERT(m_converter != nullptr); @@ -885,7 +885,7 @@ namespace } sal_Size convert( - sal_Char const * pSrcBuf, sal_Size nSrcBytes, sal_Unicode * pDstBuf, sal_Size nDstChars, + char const * pSrcBuf, sal_Size nSrcBytes, sal_Unicode * pDstBuf, sal_Size nDstChars, sal_uInt32 nFlags, sal_uInt32 * pInfo, sal_Size * pSrcCvtBytes) { OSL_ASSERT(m_converter != nullptr); diff --git a/sal/osl/unx/file_volume.cxx b/sal/osl/unx/file_volume.cxx index 3c51a909359e..5e661bd656c3 100644 --- a/sal/osl/unx/file_volume.cxx +++ b/sal/osl/unx/file_volume.cxx @@ -86,7 +86,7 @@ * *****************************************************************************/ -static oslFileError osl_psz_getVolumeInformation(const sal_Char* , oslVolumeInfo* pInfo, sal_uInt32 uFieldMask); +static oslFileError osl_psz_getVolumeInformation(const char* , oslVolumeInfo* pInfo, sal_uInt32 uFieldMask); /****************************************************************************/ /* osl_getVolumeInformation */ @@ -194,7 +194,7 @@ oslFileError osl_getVolumeInformation( rtl_uString* ustrDirectoryURL, oslVolumeI #endif /* HAVE_STATFS_H */ static oslFileError osl_psz_getVolumeInformation ( - const sal_Char* pszDirectory, oslVolumeInfo* pInfo, sal_uInt32 uFieldMask) + const char* pszDirectory, oslVolumeInfo* pInfo, sal_uInt32 uFieldMask) { if (!pInfo) return osl_File_E_INVAL; diff --git a/sal/osl/unx/module.cxx b/sal/osl/unx/module.cxx index a10fa851a9fc..7befa66678f6 100644 --- a/sal/osl/unx/module.cxx +++ b/sal/osl/unx/module.cxx @@ -139,7 +139,7 @@ oslModule SAL_CALL osl_loadModule(rtl_uString *ustrModuleName, sal_Int32 nRtldMo /* osl_loadModuleAscii */ /*****************************************************************************/ -oslModule SAL_CALL osl_loadModuleAscii(const sal_Char *pModuleName, sal_Int32 nRtldMode) +oslModule SAL_CALL osl_loadModuleAscii(const char *pModuleName, sal_Int32 nRtldMode) { SAL_WARN_IF( ((nRtldMode & SAL_LOADMODULE_LAZY) != 0 @@ -277,7 +277,7 @@ osl_getSymbol(oslModule Module, rtl_uString* pSymbolName) /* osl_getAsciiFunctionSymbol */ /*****************************************************************************/ oslGenericFunction SAL_CALL -osl_getAsciiFunctionSymbol(oslModule Module, const sal_Char *pSymbol) +osl_getAsciiFunctionSymbol(oslModule Module, const char *pSymbol) { return reinterpret_cast<oslGenericFunction>(getSymbol(Module, pSymbol)); // requires conditionally-supported conversion from void * to function diff --git a/sal/osl/unx/pipe.cxx b/sal/osl/unx/pipe.cxx index c56c7a3c3d17..d601b6531531 100644 --- a/sal/osl/unx/pipe.cxx +++ b/sal/osl/unx/pipe.cxx @@ -38,7 +38,7 @@ #define PIPEDEFAULTPATH "/tmp" #define PIPEALTERNATEPATH "/var/tmp" -static oslPipe osl_psz_createPipe(const sal_Char *pszPipeName, oslPipeOptions Options, oslSecurity Security); +static oslPipe osl_psz_createPipe(const char *pszPipeName, oslPipeOptions Options, oslSecurity Security); static struct { @@ -114,7 +114,7 @@ oslPipe SAL_CALL osl_createPipe(rtl_uString *ustrPipeName, oslPipeOptions Option rtl_uString_getLength(ustrPipeName), osl_getThreadTextEncoding(), OUSTRING_TO_OSTRING_CVTFLAGS); - sal_Char* pszPipeName = rtl_string_getStr(strPipeName); + char* pszPipeName = rtl_string_getStr(strPipeName); pPipe = osl_psz_createPipe(pszPipeName, Options, Security); if (strPipeName) @@ -137,7 +137,7 @@ getBootstrapSocketPath() return ""; } -static oslPipe osl_psz_createPipe(const sal_Char *pszPipeName, oslPipeOptions Options, +static oslPipe osl_psz_createPipe(const char *pszPipeName, oslPipeOptions Options, oslSecurity Security) { int Flags; @@ -159,7 +159,7 @@ static oslPipe osl_psz_createPipe(const sal_Char *pszPipeName, oslPipeOptions Op if (Security) { - sal_Char Ident[256]; + char Ident[256]; Ident[0] = '\0'; @@ -489,7 +489,7 @@ sal_Int32 SAL_CALL osl_writePipe(oslPipe pPipe, const void *pBuffer, sal_Int32 n BytesToSend -= RetVal; BytesSend += RetVal; - pBuffer= static_cast< sal_Char const* >(pBuffer) + RetVal; + pBuffer= static_cast< char const* >(pBuffer) + RetVal; } return BytesSend; @@ -513,7 +513,7 @@ sal_Int32 SAL_CALL osl_readPipe( oslPipe pPipe, void *pBuffer , sal_Int32 n ) BytesToRead -= RetVal; BytesRead += RetVal; - pBuffer= static_cast< sal_Char* >(pBuffer) + RetVal; + pBuffer= static_cast< char* >(pBuffer) + RetVal; } return BytesRead; diff --git a/sal/osl/unx/process.cxx b/sal/osl/unx/process.cxx index d479e0d40cfc..f2746bda2b18 100644 --- a/sal/osl/unx/process.cxx +++ b/sal/osl/unx/process.cxx @@ -79,12 +79,12 @@ struct oslProcessImpl { struct ProcessData { - const sal_Char* m_pszArgs[MAX_ARGS + 1]; - const sal_Char* m_pszDir; - sal_Char* m_pszEnv[MAX_ENVS + 1]; + const char* m_pszArgs[MAX_ARGS + 1]; + const char* m_pszDir; + char* m_pszEnv[MAX_ENVS + 1]; uid_t m_uid; gid_t m_gid; - sal_Char* m_name; + char* m_name; oslCondition m_started; oslProcessImpl* m_pProcImpl; oslFileHandle *m_pInputWrite; @@ -97,12 +97,12 @@ static oslMutex ChildListMutex; } //Anonymous namespace -static oslProcessError osl_psz_executeProcess(sal_Char *pszImageName, - sal_Char *pszArguments[], +static oslProcessError osl_psz_executeProcess(char *pszImageName, + char *pszArguments[], oslProcessOption Options, oslSecurity Security, - sal_Char *pszDirectory, - sal_Char *pszEnvironments[], + char *pszDirectory, + char *pszEnvironments[], oslProcess *pProcess, oslFileHandle *pInputWrite, oslFileHandle *pOutputRead, @@ -426,9 +426,9 @@ oslProcessError SAL_CALL osl_executeProcess_WithRedirectedIO( } oslProcessError Error; - sal_Char* pszWorkDir=nullptr; - sal_Char** pArguments=nullptr; - sal_Char** pEnvironment=nullptr; + char* pszWorkDir=nullptr; + char** pArguments=nullptr; + char** pEnvironment=nullptr; unsigned int idx; char szImagePath[PATH_MAX] = ""; @@ -460,7 +460,7 @@ oslProcessError SAL_CALL osl_executeProcess_WithRedirectedIO( if ( pArguments == nullptr && nArguments > 0 ) { - pArguments = static_cast<sal_Char**>(malloc( ( nArguments + 2 ) * sizeof(sal_Char*) )); + pArguments = static_cast<char**>(malloc( ( nArguments + 2 ) * sizeof(char*) )); } for ( idx = 0 ; idx < nArguments ; ++idx ) @@ -484,7 +484,7 @@ oslProcessError SAL_CALL osl_executeProcess_WithRedirectedIO( if ( pEnvironment == nullptr ) { - pEnvironment = static_cast<sal_Char**>(malloc( ( nEnvironmentVars + 2 ) * sizeof(sal_Char*) )); + pEnvironment = static_cast<char**>(malloc( ( nEnvironmentVars + 2 ) * sizeof(char*) )); } rtl_uString2String( &strEnv, @@ -565,12 +565,12 @@ oslProcessError SAL_CALL osl_executeProcess( ); } -oslProcessError osl_psz_executeProcess(sal_Char *pszImageName, - sal_Char *pszArguments[], +oslProcessError osl_psz_executeProcess(char *pszImageName, + char *pszArguments[], oslProcessOption Options, oslSecurity Security, - sal_Char *pszDirectory, - sal_Char *pszEnvironments[], + char *pszDirectory, + char *pszEnvironments[], oslProcess *pProcess, oslFileHandle *pInputWrite, oslFileHandle *pOutputRead, @@ -1009,7 +1009,7 @@ oslProcessError SAL_CALL osl_getProcessInfo(oslProcess Process, oslProcessData F #if defined(__sun) int fd; - sal_Char name[PATH_MAX + 1]; + char name[PATH_MAX + 1]; snprintf(name, sizeof(name), "/proc/%ld", (long)pid); diff --git a/sal/osl/unx/profile.cxx b/sal/osl/unx/profile.cxx index 717316c0817c..b7bc5771fd64 100644 --- a/sal/osl/unx/profile.cxx +++ b/sal/osl/unx/profile.cxx @@ -61,9 +61,9 @@ enum osl_TLockMode struct osl_TFile { int m_Handle; - sal_Char* m_pReadPtr; - sal_Char m_ReadBuf[512]; - sal_Char* m_pWriteBuf; + char* m_pReadPtr; + char m_ReadBuf[512]; + char* m_pWriteBuf; sal_uInt32 m_nWriteBufLen; sal_uInt32 m_nWriteBufFree; }; @@ -91,12 +91,12 @@ struct osl_TProfileImpl sal_uInt32 m_Flags; osl_TFile* m_pFile; osl_TStamp m_Stamp; - sal_Char m_FileName[PATH_MAX + 1]; + char m_FileName[PATH_MAX + 1]; sal_uInt32 m_NoLines; sal_uInt32 m_MaxLines; sal_uInt32 m_NoSections; sal_uInt32 m_MaxSections; - sal_Char** m_Lines; + char** m_Lines; osl_TProfileSection* m_Sections; pthread_mutex_t m_AccessLock; bool m_bIsValid; @@ -104,28 +104,28 @@ struct osl_TProfileImpl } -static osl_TFile* openFileImpl(const sal_Char* pszFilename, oslProfileOption ProfileFlags); +static osl_TFile* openFileImpl(const char* pszFilename, oslProfileOption ProfileFlags); static osl_TStamp closeFileImpl(osl_TFile* pFile, oslProfileOption Flags); static bool OslProfile_lockFile(const osl_TFile* pFile, osl_TLockMode eMode); static bool OslProfile_rewindFile(osl_TFile* pFile, bool bTruncate); static osl_TStamp OslProfile_getFileStamp(osl_TFile* pFile); -static sal_Char* OslProfile_getLine(osl_TFile* pFile); -static bool OslProfile_putLine(osl_TFile* pFile, const sal_Char *pszLine); -static sal_Char* stripBlanks(sal_Char* String, sal_uInt32* pLen); -static sal_Char* addLine(osl_TProfileImpl* pProfile, const sal_Char* Line); -static sal_Char* insertLine(osl_TProfileImpl* pProfile, const sal_Char* Line, sal_uInt32 LineNo); +static char* OslProfile_getLine(osl_TFile* pFile); +static bool OslProfile_putLine(osl_TFile* pFile, const char *pszLine); +static char* stripBlanks(char* String, sal_uInt32* pLen); +static char* addLine(osl_TProfileImpl* pProfile, const char* Line); +static char* insertLine(osl_TProfileImpl* pProfile, const char* Line, sal_uInt32 LineNo); static void removeLine(osl_TProfileImpl* pProfile, sal_uInt32 LineNo); static void setEntry(osl_TProfileImpl* pProfile, osl_TProfileSection* pSection, sal_uInt32 NoEntry, sal_uInt32 Line, - sal_Char* Entry, sal_uInt32 Len); + char* Entry, sal_uInt32 Len); static bool addEntry(osl_TProfileImpl* pProfile, osl_TProfileSection *pSection, - int Line, sal_Char* Entry, sal_uInt32 Len); + int Line, char* Entry, sal_uInt32 Len); static void removeEntry(osl_TProfileSection *pSection, sal_uInt32 NoEntry); -static bool addSection(osl_TProfileImpl* pProfile, int Line, const sal_Char* Section, sal_uInt32 Len); +static bool addSection(osl_TProfileImpl* pProfile, int Line, const char* Section, sal_uInt32 Len); static void removeSection(osl_TProfileImpl* pProfile, osl_TProfileSection *pSection); -static osl_TProfileSection* findEntry(osl_TProfileImpl* pProfile, const sal_Char* Section, - const sal_Char* Entry, sal_uInt32 *pNoEntry); +static osl_TProfileSection* findEntry(osl_TProfileImpl* pProfile, const char* Section, + const char* Entry, sal_uInt32 *pNoEntry); static bool loadProfile(osl_TFile* pFile, osl_TProfileImpl* pProfile); static bool storeProfile(osl_TProfileImpl* pProfile, bool bCleanup); static osl_TProfileImpl* acquireProfile(oslProfile Profile, bool bWriteable); @@ -134,8 +134,8 @@ static bool releaseProfile(osl_TProfileImpl* pProfile); static bool writeProfileImpl (osl_TFile* pFile); static osl_TFile* osl_openTmpProfileImpl(osl_TProfileImpl*); static bool osl_ProfileSwapProfileNames(osl_TProfileImpl*); -static void osl_ProfileGenerateExtension(const sal_Char* pszFileName, const sal_Char* pszExtension, sal_Char* pszTmpName, int BufferMaxLen); -static oslProfile osl_psz_openProfile(const sal_Char *pszProfileName, oslProfileOption Flags); +static void osl_ProfileGenerateExtension(const char* pszFileName, const char* pszExtension, char* pszTmpName, int BufferMaxLen); +static oslProfile osl_psz_openProfile(const char *pszProfileName, oslProfileOption Flags); oslProfile SAL_CALL osl_openProfile(rtl_uString *ustrProfileName, oslProfileOption Options) { @@ -149,7 +149,7 @@ oslProfile SAL_CALL osl_openProfile(rtl_uString *ustrProfileName, oslProfileOpti : nullptr; } -static oslProfile osl_psz_openProfile(const sal_Char *pszProfileName, oslProfileOption Flags) +static oslProfile osl_psz_openProfile(const char *pszProfileName, oslProfileOption Flags) { osl_TFile* pFile; osl_TProfileImpl* pProfile; @@ -352,14 +352,14 @@ static bool writeProfileImpl(osl_TFile* pFile) } sal_Bool SAL_CALL osl_readProfileString(oslProfile Profile, - const sal_Char* pszSection, - const sal_Char* pszEntry, - sal_Char* pszString, + const char* pszSection, + const char* pszEntry, + char* pszString, sal_uInt32 MaxLen, - const sal_Char* pszDefault) + const char* pszDefault) { sal_uInt32 NoEntry; - sal_Char* pStr=nullptr; + char* pStr=nullptr; osl_TProfileImpl* pProfile=nullptr; osl_TProfileImpl* pTmpProfile=nullptr; bool bRet = false; @@ -401,7 +401,7 @@ sal_Bool SAL_CALL osl_readProfileString(oslProfile Profile, } else { - pStr=const_cast<sal_Char*>(pszDefault); + pStr=const_cast<char*>(pszDefault); } if ( pStr != nullptr ) @@ -432,11 +432,11 @@ sal_Bool SAL_CALL osl_readProfileString(oslProfile Profile, } sal_Bool SAL_CALL osl_readProfileBool(oslProfile Profile, - const sal_Char* pszSection, - const sal_Char* pszEntry, + const char* pszSection, + const char* pszEntry, sal_Bool Default) { - sal_Char Line[32]; + char Line[32]; Line[0] = '\0'; if (osl_readProfileString(Profile, pszSection, pszEntry, Line, sizeof(Line), "")) @@ -456,14 +456,14 @@ sal_Bool SAL_CALL osl_readProfileBool(oslProfile Profile, } sal_uInt32 SAL_CALL osl_readProfileIdent(oslProfile Profile, - const sal_Char* pszSection, - const sal_Char* pszEntry, + const char* pszSection, + const char* pszEntry, sal_uInt32 FirstId, - const sal_Char* Strings[], + const char* Strings[], sal_uInt32 Default) { sal_uInt32 i; - sal_Char Line[256]; + char Line[256]; Line[0] = '\0'; if (osl_readProfileString(Profile, pszSection, pszEntry, Line, sizeof(Line), "")) @@ -484,15 +484,15 @@ sal_uInt32 SAL_CALL osl_readProfileIdent(oslProfile Profile, } sal_Bool SAL_CALL osl_writeProfileString(oslProfile Profile, - const sal_Char* pszSection, - const sal_Char* pszEntry, - const sal_Char* pszString) + const char* pszSection, + const char* pszEntry, + const char* pszString) { sal_uInt32 i; bool bRet = false; sal_uInt32 NoEntry; - sal_Char* pStr; - sal_Char* Line = nullptr; + char* pStr; + char* Line = nullptr; osl_TProfileSection* pSec; osl_TProfileImpl* pProfile = nullptr; osl_TProfileImpl* pTmpProfile = static_cast<osl_TProfileImpl*>(Profile); @@ -521,7 +521,7 @@ sal_Bool SAL_CALL osl_writeProfileString(oslProfile Profile, return false; } - Line = static_cast<sal_Char*>(malloc(strlen(pszEntry)+strlen(pszString)+48)); + Line = static_cast<char*>(malloc(strlen(pszEntry)+strlen(pszString)+48)); if (! (pProfile->m_Flags & osl_Profile_SYSTEM)) { @@ -604,8 +604,8 @@ sal_Bool SAL_CALL osl_writeProfileString(oslProfile Profile, } sal_Bool SAL_CALL osl_writeProfileBool(oslProfile Profile, - const sal_Char* pszSection, - const sal_Char* pszEntry, + const char* pszSection, + const char* pszEntry, sal_Bool Value) { bool bRet = false; @@ -619,10 +619,10 @@ sal_Bool SAL_CALL osl_writeProfileBool(oslProfile Profile, } sal_Bool SAL_CALL osl_writeProfileIdent(oslProfile Profile, - const sal_Char* pszSection, - const sal_Char* pszEntry, + const char* pszSection, + const char* pszEntry, sal_uInt32 FirstId, - const sal_Char* Strings[], + const char* Strings[], sal_uInt32 Value) { int i, n = 0; @@ -640,8 +640,8 @@ sal_Bool SAL_CALL osl_writeProfileIdent(oslProfile Profile, } sal_Bool SAL_CALL osl_removeProfileEntry(oslProfile Profile, - const sal_Char *pszSection, - const sal_Char *pszEntry) + const char *pszSection, + const char *pszEntry) { sal_uInt32 NoEntry; osl_TProfileImpl* pProfile = nullptr; @@ -707,8 +707,8 @@ sal_Bool SAL_CALL osl_removeProfileEntry(oslProfile Profile, } sal_uInt32 SAL_CALL osl_getProfileSectionEntries(oslProfile Profile, - const sal_Char *pszSection, - sal_Char* pszBuffer, + const char *pszSection, + char* pszBuffer, sal_uInt32 MaxLen) { sal_uInt32 i, n = 0; @@ -792,7 +792,7 @@ sal_uInt32 SAL_CALL osl_getProfileSectionEntries(oslProfile Profile, } sal_uInt32 SAL_CALL osl_getProfileSections(oslProfile Profile, - sal_Char* pszBuffer, + char* pszBuffer, sal_uInt32 MaxLen) { sal_uInt32 i, n = 0; @@ -926,7 +926,7 @@ static bool OslProfile_lockFile(const osl_TFile* pFile, osl_TLockMode eMode) return true; } -static osl_TFile* openFileImpl(const sal_Char* pszFilename, oslProfileOption ProfileFlags ) +static osl_TFile* openFileImpl(const char* pszFilename, oslProfileOption ProfileFlags ) { int Flags; osl_TFile* pFile = static_cast<osl_TFile*>(calloc(1, sizeof(osl_TFile))); @@ -1041,12 +1041,12 @@ static bool OslProfile_rewindFile(osl_TFile* pFile, bool bTruncate) return bRet; } -static sal_Char* OslProfile_getLine(osl_TFile* pFile) +static char* OslProfile_getLine(osl_TFile* pFile) { int Max, Free, nLineBytes = 0; - sal_Char* pChr; - sal_Char* pLine = nullptr; - sal_Char* pNewLine; + char* pChr; + char* pLine = nullptr; + char* pNewLine; if ( pFile == nullptr ) { @@ -1093,7 +1093,7 @@ static sal_Char* OslProfile_getLine(osl_TFile* pFile) pChr++); Max = pChr - pFile->m_pReadPtr; - pNewLine = static_cast<sal_Char*>(malloc( nLineBytes + Max + 1 )); + pNewLine = static_cast<char*>(malloc( nLineBytes + Max + 1 )); if( pLine ) { memcpy( pNewLine, pLine, nLineBytes ); @@ -1129,7 +1129,7 @@ static sal_Char* OslProfile_getLine(osl_TFile* pFile) return pLine; } -static bool OslProfile_putLine(osl_TFile* pFile, const sal_Char *pszLine) +static bool OslProfile_putLine(osl_TFile* pFile, const char *pszLine) { unsigned int Len = strlen(pszLine); @@ -1140,7 +1140,7 @@ static bool OslProfile_putLine(osl_TFile* pFile, const sal_Char *pszLine) if ( pFile->m_pWriteBuf == nullptr ) { - pFile->m_pWriteBuf = static_cast<sal_Char*>(malloc(Len+3)); + pFile->m_pWriteBuf = static_cast<char*>(malloc(Len+3)); pFile->m_nWriteBufLen = Len+3; pFile->m_nWriteBufFree = Len+3; } @@ -1148,9 +1148,9 @@ static bool OslProfile_putLine(osl_TFile* pFile, const sal_Char *pszLine) { if ( pFile->m_nWriteBufFree <= Len + 3 ) { - sal_Char* pTmp; + char* pTmp; - pTmp=static_cast<sal_Char*>(realloc(pFile->m_pWriteBuf,( ( pFile->m_nWriteBufLen + Len ) * 2) )); + pTmp=static_cast<char*>(realloc(pFile->m_pWriteBuf,( ( pFile->m_nWriteBufLen + Len ) * 2) )); if ( pTmp == nullptr ) { return false; @@ -1171,7 +1171,7 @@ static bool OslProfile_putLine(osl_TFile* pFile, const sal_Char *pszLine) return true; } -static sal_Char* stripBlanks(sal_Char* String, sal_uInt32* pLen) +static char* stripBlanks(char* String, sal_uInt32* pLen) { if ( ( pLen != nullptr ) && ( *pLen != 0 ) ) { @@ -1191,14 +1191,14 @@ static sal_Char* stripBlanks(sal_Char* String, sal_uInt32* pLen) return String; } -static sal_Char* addLine(osl_TProfileImpl* pProfile, const sal_Char* Line) +static char* addLine(osl_TProfileImpl* pProfile, const char* Line) { if (pProfile->m_NoLines >= pProfile->m_MaxLines) { if (pProfile->m_Lines == nullptr) { pProfile->m_MaxLines = LINES_INI; - pProfile->m_Lines = static_cast<sal_Char **>(calloc(pProfile->m_MaxLines, sizeof(sal_Char *))); + pProfile->m_Lines = static_cast<char **>(calloc(pProfile->m_MaxLines, sizeof(char *))); } else { @@ -1206,8 +1206,8 @@ static sal_Char* addLine(osl_TProfileImpl* pProfile, const sal_Char* Line) unsigned int oldmax=pProfile->m_MaxLines; pProfile->m_MaxLines += LINES_ADD; - pProfile->m_Lines = static_cast<sal_Char **>(realloc(pProfile->m_Lines, - pProfile->m_MaxLines * sizeof(sal_Char *))); + pProfile->m_Lines = static_cast<char **>(realloc(pProfile->m_Lines, + pProfile->m_MaxLines * sizeof(char *))); for ( idx = oldmax ; idx < pProfile->m_MaxLines ; ++idx ) { pProfile->m_Lines[idx]=nullptr; @@ -1230,24 +1230,24 @@ static sal_Char* addLine(osl_TProfileImpl* pProfile, const sal_Char* Line) return pProfile->m_Lines[pProfile->m_NoLines - 1]; } -static sal_Char* insertLine(osl_TProfileImpl* pProfile, const sal_Char* Line, sal_uInt32 LineNo) +static char* insertLine(osl_TProfileImpl* pProfile, const char* Line, sal_uInt32 LineNo) { if (pProfile->m_NoLines >= pProfile->m_MaxLines) { if (pProfile->m_Lines == nullptr) { pProfile->m_MaxLines = LINES_INI; - pProfile->m_Lines = static_cast<sal_Char **>(calloc(pProfile->m_MaxLines, sizeof(sal_Char *))); + pProfile->m_Lines = static_cast<char **>(calloc(pProfile->m_MaxLines, sizeof(char *))); } else { pProfile->m_MaxLines += LINES_ADD; - pProfile->m_Lines = static_cast<sal_Char **>(realloc(pProfile->m_Lines, - pProfile->m_MaxLines * sizeof(sal_Char *))); + pProfile->m_Lines = static_cast<char **>(realloc(pProfile->m_Lines, + pProfile->m_MaxLines * sizeof(char *))); memset(&pProfile->m_Lines[pProfile->m_NoLines], 0, - (pProfile->m_MaxLines - pProfile->m_NoLines - 1) * sizeof(sal_Char*)); + (pProfile->m_MaxLines - pProfile->m_NoLines - 1) * sizeof(char*)); } if (pProfile->m_Lines == nullptr) @@ -1265,7 +1265,7 @@ static sal_Char* insertLine(osl_TProfileImpl* pProfile, const sal_Char* Line, sa sal_uInt32 i, n; memmove(&pProfile->m_Lines[LineNo + 1], &pProfile->m_Lines[LineNo], - (pProfile->m_NoLines - LineNo) * sizeof(sal_Char *)); + (pProfile->m_NoLines - LineNo) * sizeof(char *)); /* adjust line references */ for (i = 0; i < pProfile->m_NoSections; i++) @@ -1299,11 +1299,11 @@ static void removeLine(osl_TProfileImpl* pProfile, sal_uInt32 LineNo) sal_uInt32 i, n; memmove(&pProfile->m_Lines[LineNo], &pProfile->m_Lines[LineNo + 1], - (pProfile->m_NoLines - LineNo - 1) * sizeof(sal_Char *)); + (pProfile->m_NoLines - LineNo - 1) * sizeof(char *)); memset(&pProfile->m_Lines[pProfile->m_NoLines - 1], 0, - (pProfile->m_MaxLines - pProfile->m_NoLines) * sizeof(sal_Char*)); + (pProfile->m_MaxLines - pProfile->m_NoLines) * sizeof(char*)); /* adjust line references */ for (i = 0; i < pProfile->m_NoSections; i++) @@ -1329,7 +1329,7 @@ static void removeLine(osl_TProfileImpl* pProfile, sal_uInt32 LineNo) static void setEntry(osl_TProfileImpl* pProfile, osl_TProfileSection* pSection, sal_uInt32 NoEntry, sal_uInt32 Line, - sal_Char* Entry, sal_uInt32 Len) + char* Entry, sal_uInt32 Len) { Entry = stripBlanks(Entry, &Len); pSection->m_Entries[NoEntry].m_Line = Line; @@ -1339,7 +1339,7 @@ static void setEntry(osl_TProfileImpl* pProfile, osl_TProfileSection* pSection, static bool addEntry(osl_TProfileImpl* pProfile, osl_TProfileSection *pSection, - int Line, sal_Char* Entry, + int Line, char* Entry, sal_uInt32 Len) { if (pSection != nullptr) @@ -1398,7 +1398,7 @@ static void removeEntry(osl_TProfileSection *pSection, sal_uInt32 NoEntry) } -static bool addSection(osl_TProfileImpl* pProfile, int Line, const sal_Char* Section, sal_uInt32 Len) +static bool addSection(osl_TProfileImpl* pProfile, int Line, const char* Section, sal_uInt32 Len) { if (pProfile->m_NoSections >= pProfile->m_MaxSections) { @@ -1474,8 +1474,8 @@ static void removeSection(osl_TProfileImpl* pProfile, osl_TProfileSection *pSect } static osl_TProfileSection* findEntry(osl_TProfileImpl* pProfile, - const sal_Char* Section, - const sal_Char* Entry, + const char* Section, + const char* Entry, sal_uInt32 *pNoEntry) { static sal_uInt32 Sect = 0; @@ -1508,7 +1508,7 @@ static osl_TProfileSection* findEntry(osl_TProfileImpl* pProfile, for (i = 0; i < pSec->m_NoEntries; i++) { - const sal_Char* pStr = &pProfile->m_Lines[pSec->m_Entries[i].m_Line] + const char* pStr = &pProfile->m_Lines[pSec->m_Entries[i].m_Line] [pSec->m_Entries[i].m_Offset]; if ((Len == pSec->m_Entries[i].m_Len) && (strncasecmp(Entry, pStr, pSec->m_Entries[i].m_Len) @@ -1528,10 +1528,10 @@ static osl_TProfileSection* findEntry(osl_TProfileImpl* pProfile, static bool loadProfile(osl_TFile* pFile, osl_TProfileImpl* pProfile) { sal_uInt32 i; - sal_Char* pStr; - sal_Char* pChar; + char* pStr; + char* pChar; - sal_Char* pLine; + char* pLine; if ( !pFile ) { @@ -1550,7 +1550,7 @@ static bool loadProfile(osl_TFile* pFile, osl_TProfileImpl* pProfile) while ( ( pLine=OslProfile_getLine(pFile) ) != nullptr ) { - sal_Char* bWasAdded = addLine( pProfile, pLine ); + char* bWasAdded = addLine( pProfile, pLine ); free( pLine ); SAL_WARN_IF(!bWasAdded, "sal.osl", "addLine( pProfile, pLine ) ==> false"); if ( ! bWasAdded ) @@ -1674,8 +1674,8 @@ static bool storeProfile(osl_TProfileImpl* pProfile, bool bCleanup) static osl_TFile* osl_openTmpProfileImpl(osl_TProfileImpl* pProfile) { osl_TFile* pFile=nullptr; - sal_Char const * const pszExtension = "tmp"; - sal_Char pszTmpName[PATH_MAX]; + char const * const pszExtension = "tmp"; + char pszTmpName[PATH_MAX]; oslProfileOption PFlags=0; pszTmpName[0] = '\0'; @@ -1702,8 +1702,8 @@ static osl_TFile* osl_openTmpProfileImpl(osl_TProfileImpl* pProfile) static bool osl_ProfileSwapProfileNames(osl_TProfileImpl* pProfile) { - sal_Char pszBakFile[PATH_MAX]; - sal_Char pszTmpFile[PATH_MAX]; + char pszBakFile[PATH_MAX]; + char pszTmpFile[PATH_MAX]; pszBakFile[0] = '\0'; pszTmpFile[0] = '\0'; @@ -1738,9 +1738,9 @@ static bool osl_ProfileSwapProfileNames(osl_TProfileImpl* pProfile) return result; } -static void osl_ProfileGenerateExtension(const sal_Char* pszFileName, const sal_Char* pszExtension, sal_Char* pszTmpName, int BufferMaxLen) +static void osl_ProfileGenerateExtension(const char* pszFileName, const char* pszExtension, char* pszTmpName, int BufferMaxLen) { - sal_Char* cursor = pszTmpName; + char* cursor = pszTmpName; int len; /* concatenate filename + "." + extension, limited to the size of the diff --git a/sal/osl/unx/secimpl.hxx b/sal/osl/unx/secimpl.hxx index fda1c421c5db..f93b85f8f505 100644 --- a/sal/osl/unx/secimpl.hxx +++ b/sal/osl/unx/secimpl.hxx @@ -27,7 +27,7 @@ struct oslSecurityImpl { char m_buffer[1]; /* should be a C99 flexible array member */ }; -bool osl_psz_getUserIdent(oslSecurity Security, sal_Char *pszIdent, sal_uInt32 nMax); +bool osl_psz_getUserIdent(oslSecurity Security, char *pszIdent, sal_uInt32 nMax); #endif diff --git a/sal/osl/unx/security.cxx b/sal/osl/unx/security.cxx index 413c67e943d3..23b8046dbcb5 100644 --- a/sal/osl/unx/security.cxx +++ b/sal/osl/unx/security.cxx @@ -193,7 +193,7 @@ oslSecurityError SAL_CALL osl_loginUserOnFileServer( sal_Bool SAL_CALL osl_getUserIdent(oslSecurity Security, rtl_uString **ustrIdent) { bool bRet = false; - sal_Char pszIdent[1024]; + char pszIdent[1024]; pszIdent[0] = '\0'; @@ -205,9 +205,9 @@ sal_Bool SAL_CALL osl_getUserIdent(oslSecurity Security, rtl_uString **ustrIdent return bRet; } -bool osl_psz_getUserIdent(oslSecurity Security, sal_Char *pszIdent, sal_uInt32 nMax) +bool osl_psz_getUserIdent(oslSecurity Security, char *pszIdent, sal_uInt32 nMax) { - sal_Char buffer[32]; + char buffer[32]; sal_Int32 nChr; oslSecurityImpl *pSecImpl = static_cast<oslSecurityImpl *>(Security); @@ -227,7 +227,7 @@ bool osl_psz_getUserIdent(oslSecurity Security, sal_Char *pszIdent, sal_uInt32 n sal_Bool SAL_CALL osl_getUserName(oslSecurity Security, rtl_uString **ustrName) { bool bRet = false; - sal_Char * pszName; + char * pszName; sal_Int32 len; oslSecurityImpl *pSecImpl = static_cast<oslSecurityImpl *>(Security); @@ -285,7 +285,7 @@ static bool osl_psz_getHomeDir(oslSecurity Security, OString* pszDirectory) #ifdef HAIKU dev_t volume = dev_for_path("/boot"); - sal_Char homeDir[B_PATH_NAME_LENGTH + B_FILE_NAME_LENGTH]; + char homeDir[B_PATH_NAME_LENGTH + B_FILE_NAME_LENGTH]; status_t result = find_directory(B_USER_DIRECTORY, volume, false, homeDir, sizeof(homeDir)); if (result == B_OK) { @@ -330,7 +330,7 @@ static bool osl_psz_getHomeDir(oslSecurity Security, OString* pszDirectory) /* if current user, check also environment for HOME */ if (getuid() == pSecImpl->m_pPasswd.pw_uid) { - sal_Char *pStr = nullptr; + char *pStr = nullptr; #ifdef __sun char buffer[8192]; @@ -398,7 +398,7 @@ static bool osl_psz_getConfigDir(oslSecurity Security, OString* pszDirectory) assert(pszDirectory != nullptr); (void) Security; dev_t volume = dev_for_path("/boot"); - sal_Char configDir[B_PATH_NAME_LENGTH + B_FILE_NAME_LENGTH]; + char configDir[B_PATH_NAME_LENGTH + B_FILE_NAME_LENGTH]; status_t result = find_directory(B_USER_SETTINGS_DIRECTORY, volume, false, configDir, sizeof(configDir)); if (result == B_OK) { @@ -417,7 +417,7 @@ static bool osl_psz_getConfigDir(oslSecurity Security, OString* pszDirectory) { assert(pszDirectory != nullptr); - sal_Char *pStr = getenv("XDG_CONFIG_HOME"); + char *pStr = getenv("XDG_CONFIG_HOME"); if (pStr == nullptr || pStr[0] == '\0' || access(pStr, 0) != 0) { diff --git a/sal/osl/unx/socket.cxx b/sal/osl/unx/socket.cxx index f708c4911797..5db922e7674d 100644 --- a/sal/osl/unx/socket.cxx +++ b/sal/osl/unx/socket.cxx @@ -263,25 +263,25 @@ static oslSocketError osl_SocketErrorFromNative(int nativeType) #define ERROR_FROM_NATIVE(y) osl_SocketErrorFromNative(y) static oslSocketAddr osl_psz_createInetSocketAddr ( - const sal_Char* pszDottedAddr, sal_Int32 Port); + const char* pszDottedAddr, sal_Int32 Port); static oslHostAddr osl_psz_createHostAddr ( - const sal_Char *pszHostname, const oslSocketAddr Addr); + const char *pszHostname, const oslSocketAddr Addr); static oslHostAddr osl_psz_createHostAddrByName ( - const sal_Char *pszHostname); + const char *pszHostname); -static const sal_Char* osl_psz_getHostnameOfHostAddr ( +static const char* osl_psz_getHostnameOfHostAddr ( const oslHostAddr Addr); static oslSocketAddr osl_psz_resolveHostname ( - const sal_Char* pszHostname); + const char* pszHostname); static sal_Int32 osl_psz_getServicePort ( - const sal_Char* pszServicename, const sal_Char* pszProtocol); + const char* pszServicename, const char* pszProtocol); static void osl_psz_getLastSocketErrorDescription ( - oslSocket Socket, sal_Char* pBuffer, sal_uInt32 BufferSize); + oslSocket Socket, char* pBuffer, sal_uInt32 BufferSize); static oslSocket createSocketImpl(int Socket) { @@ -478,7 +478,7 @@ oslSocketAddr SAL_CALL osl_createInetSocketAddr ( { rtl_String* strDottedAddr=nullptr; oslSocketAddr Addr; - sal_Char* pszDottedAddr=nullptr; + char* pszDottedAddr=nullptr; if ( ustrDottedAddr != nullptr ) { @@ -501,7 +501,7 @@ oslSocketAddr SAL_CALL osl_createInetSocketAddr ( } oslSocketAddr osl_psz_createInetSocketAddr ( - const sal_Char* pszDottedAddr, + const char* pszDottedAddr, sal_Int32 Port) { oslSocketAddr pAddr = nullptr; @@ -590,7 +590,7 @@ struct oslAddrInfo }; } -static bool isFullQualifiedDomainName (const sal_Char *pHostName) +static bool isFullQualifiedDomainName (const char *pHostName) { /* a FQDN (aka 'hostname.domain.top_level_domain' ) * is a name which contains a dot '.' in it ( would @@ -599,9 +599,9 @@ static bool isFullQualifiedDomainName (const sal_Char *pHostName) return strchr( pHostName, int('.') ) != nullptr; } -static sal_Char* getFullQualifiedDomainName (const sal_Char *pHostName) +static char* getFullQualifiedDomainName (const char *pHostName) { - sal_Char *pFullQualifiedName = nullptr; + char *pFullQualifiedName = nullptr; if (isFullQualifiedDomainName(pHostName)) { @@ -619,7 +619,7 @@ static sal_Char* getFullQualifiedDomainName (const sal_Char *pHostName) struct oslHostAddrImpl { - sal_Char *pHostName; + char *pHostName; oslSocketAddr pSockAddr; }; @@ -628,7 +628,7 @@ static oslHostAddr addrinfoToHostAddr (const addrinfo* ai) if (!ai || !ai->ai_canonname || !ai->ai_addr) return nullptr; - sal_Char* cn = getFullQualifiedDomainName(ai->ai_canonname); + char* cn = getFullQualifiedDomainName(ai->ai_canonname); SAL_WARN_IF( !cn, "sal.osl", "couldn't get full qualified domain name" ); if (cn == nullptr) return nullptr; @@ -681,7 +681,7 @@ oslHostAddr SAL_CALL osl_createHostAddr ( { oslHostAddr HostAddr; rtl_String* strHostname=nullptr; - sal_Char* pszHostName=nullptr; + char* pszHostName=nullptr; if ( ustrHostname != nullptr ) { @@ -704,11 +704,11 @@ oslHostAddr SAL_CALL osl_createHostAddr ( } oslHostAddr osl_psz_createHostAddr ( - const sal_Char *pszHostname, + const char *pszHostname, const oslSocketAddr pAddr) { oslHostAddr pHostAddr; - sal_Char *cn; + char *cn; SAL_WARN_IF( !pszHostname, "sal.osl", "undefined hostname" ); SAL_WARN_IF( !pAddr, "sal.osl", "undefined address" ); @@ -738,7 +738,7 @@ oslHostAddr SAL_CALL osl_createHostAddrByName(rtl_uString *ustrHostname) { oslHostAddr HostAddr; rtl_String* strHostname=nullptr; - sal_Char* pszHostName=nullptr; + char* pszHostName=nullptr; if ( ustrHostname != nullptr ) { @@ -760,7 +760,7 @@ oslHostAddr SAL_CALL osl_createHostAddrByName(rtl_uString *ustrHostname) return HostAddr; } -oslHostAddr osl_psz_createHostAddrByName (const sal_Char *pszHostname) +oslHostAddr osl_psz_createHostAddrByName (const char *pszHostname) { oslAddrInfo aAddrInfo(pszHostname, /* isInet */ true); @@ -786,7 +786,7 @@ oslHostAddr SAL_CALL osl_createHostAddrByAddr (const oslSocketAddr pAddr) if (res != 0) return nullptr; - sal_Char *cn = getFullQualifiedDomainName(host); + char *cn = getFullQualifiedDomainName(host); SAL_WARN_IF( !cn, "sal.osl", "couldn't get full qualified domain name" ); if (cn == nullptr) return nullptr; @@ -832,12 +832,12 @@ void SAL_CALL osl_getHostnameOfHostAddr ( const oslHostAddr Addr, rtl_uString **ustrHostname) { - const sal_Char* pHostname = osl_psz_getHostnameOfHostAddr(Addr); + const char* pHostname = osl_psz_getHostnameOfHostAddr(Addr); rtl_uString_newFromAscii (ustrHostname, pHostname); } -const sal_Char* osl_psz_getHostnameOfHostAddr (const oslHostAddr pAddr) +const char* osl_psz_getHostnameOfHostAddr (const oslHostAddr pAddr) { if (pAddr) return pAddr->pHostName; @@ -868,7 +868,7 @@ void SAL_CALL osl_destroyHostAddr (oslHostAddr pAddr) oslSocketResult SAL_CALL osl_getLocalHostname(rtl_uString **ustrLocalHostname) { static auto const init = []() -> std::pair<oslSocketResult, OUString> { - sal_Char LocalHostname[256] = ""; + char LocalHostname[256] = ""; #ifdef SYSV struct utsname uts; @@ -894,7 +894,7 @@ oslSocketResult SAL_CALL osl_getLocalHostname(rtl_uString **ustrLocalHostname) /* no, determine it via dns */ Addr = osl_psz_createHostAddrByName(LocalHostname); - const sal_Char *pStr; + const char *pStr; if ((pStr = osl_psz_getHostnameOfHostAddr(Addr)) != nullptr) { strncpy(LocalHostname, pStr, sizeof( LocalHostname )); @@ -920,7 +920,7 @@ oslSocketAddr SAL_CALL osl_resolveHostname(rtl_uString *ustrHostname) { oslSocketAddr Addr; rtl_String* strHostname=nullptr; - sal_Char* pszHostName=nullptr; + char* pszHostName=nullptr; if ( ustrHostname != nullptr ) { @@ -942,7 +942,7 @@ oslSocketAddr SAL_CALL osl_resolveHostname(rtl_uString *ustrHostname) return Addr; } -oslSocketAddr osl_psz_resolveHostname(const sal_Char* pszHostname) +oslSocketAddr osl_psz_resolveHostname(const char* pszHostname) { struct oslHostAddrImpl *pAddr = osl_psz_createHostAddrByName(pszHostname); @@ -963,8 +963,8 @@ sal_Int32 SAL_CALL osl_getServicePort(rtl_uString *ustrServicename, rtl_uString sal_Int32 nPort; rtl_String* strServicename=nullptr; rtl_String* strProtocol=nullptr; - sal_Char* pszServiceName=nullptr; - sal_Char* pszProtocol=nullptr; + char* pszServiceName=nullptr; + char* pszProtocol=nullptr; if ( ustrServicename != nullptr ) { @@ -1001,8 +1001,8 @@ sal_Int32 SAL_CALL osl_getServicePort(rtl_uString *ustrServicename, rtl_uString return nPort; } -sal_Int32 osl_psz_getServicePort(const sal_Char* pszServicename, - const sal_Char* pszProtocol) +sal_Int32 osl_psz_getServicePort(const char* pszServicename, + const char* pszProtocol) { struct servent* ps; @@ -2075,7 +2075,7 @@ oslSocketType SAL_CALL osl_getSocketType(oslSocket pSocket) void SAL_CALL osl_getLastSocketErrorDescription(oslSocket Socket, rtl_uString **ustrError) { - sal_Char pszError[1024]; + char pszError[1024]; pszError[0] = '\0'; @@ -2084,7 +2084,7 @@ void SAL_CALL osl_getLastSocketErrorDescription(oslSocket Socket, rtl_uString ** rtl_uString_newFromAscii(ustrError,pszError); } -void osl_psz_getLastSocketErrorDescription(oslSocket pSocket, sal_Char* pBuffer, sal_uInt32 BufferSize) +void osl_psz_getLastSocketErrorDescription(oslSocket pSocket, char* pBuffer, sal_uInt32 BufferSize) { /* make sure pBuffer will be a zero-terminated string even when strncpy has to cut */ pBuffer[BufferSize-1]= '\0'; diff --git a/sal/osl/unx/sockimpl.hxx b/sal/osl/unx/sockimpl.hxx index 940c223fe778..1a9bc1f9ede2 100644 --- a/sal/osl/unx/sockimpl.hxx +++ b/sal/osl/unx/sockimpl.hxx @@ -47,7 +47,7 @@ struct oslSocketAddrImpl struct oslPipeImpl { int m_Socket; - sal_Char m_Name[sizeof sockaddr_un::sun_path]; + char m_Name[sizeof sockaddr_un::sun_path]; oslInterlockedCount m_nRefCount; bool m_bClosed; #if defined(CLOSESOCKET_DOESNT_WAKE_UP_ACCEPT) diff --git a/sal/osl/unx/uunxapi.cxx b/sal/osl/unx/uunxapi.cxx index aecfab6d85a0..e8901784c878 100644 --- a/sal/osl/unx/uunxapi.cxx +++ b/sal/osl/unx/uunxapi.cxx @@ -145,7 +145,7 @@ typedef void accessFilePathState; */ static OString macxp_resolveAliasAndConvert(OString const & p) { - sal_Char path[PATH_MAX]; + char path[PATH_MAX]; if (p.getLength() < PATH_MAX) { strcpy(path, p.getStr()); @@ -240,7 +240,7 @@ template<typename T> bool realpath_(const T& pstrFileName, T& ppstrResolvedName) if (bRet) { - ppstrResolvedName = fromOString<T>(OString(static_cast<sal_Char*>(rp))); + ppstrResolvedName = fromOString<T>(OString(rp)); } errno = saved_errno; diff --git a/sal/osl/w32/file_url.cxx b/sal/osl/w32/file_url.cxx index a5aba24248c4..a0cb52257b96 100644 --- a/sal/osl/w32/file_url.cxx +++ b/sal/osl/w32/file_url.cxx @@ -524,17 +524,17 @@ DWORD GetCaseCorrectPathName( static bool osl_decodeURL_( rtl_String* strUTF8, rtl_uString** pstrDecodedURL ) { - sal_Char *pBuffer; - const sal_Char *pSrcEnd; - const sal_Char *pSrc; - sal_Char *pDest; + char *pBuffer; + const char *pSrcEnd; + const char *pSrc; + char *pDest; sal_Int32 nSrcLen; bool bValidEncoded = true; /* Assume success */ /* The resulting decoded string length is shorter or equal to the source length */ nSrcLen = rtl_string_getLength(strUTF8); - pBuffer = static_cast<sal_Char*>(malloc((nSrcLen + 1) * sizeof(sal_Char))); + pBuffer = static_cast<char*>(malloc((nSrcLen + 1) * sizeof(char))); pDest = pBuffer; pSrc = rtl_string_getStr(strUTF8); @@ -547,15 +547,15 @@ static bool osl_decodeURL_( rtl_String* strUTF8, rtl_uString** pstrDecodedURL ) { case '%': { - sal_Char aToken[3]; - sal_Char aChar; + char aToken[3]; + char aChar; pSrc++; aToken[0] = *pSrc++; aToken[1] = *pSrc++; aToken[2] = 0; - aChar = static_cast<sal_Char>(strtoul( aToken, nullptr, 16 )); + aChar = static_cast<char>(strtoul( aToken, nullptr, 16 )); /* The chars are path delimiters and must not be encoded */ @@ -594,15 +594,15 @@ static void osl_encodeURL_( rtl_uString *strURL, rtl_String **pstrEncodedURL ) /* Encode non ascii characters within the URL */ rtl_String *strUTF8 = nullptr; - sal_Char *pszEncodedURL; - const sal_Char *pURLScan; - sal_Char *pURLDest; + char *pszEncodedURL; + const char *pURLScan; + char *pURLDest; sal_Int32 nURLScanLen; sal_Int32 nURLScanCount; rtl_uString2String( &strUTF8, rtl_uString_getStr( strURL ), rtl_uString_getLength( strURL ), RTL_TEXTENCODING_UTF8, OUSTRING_TO_OSTRING_CVTFLAGS ); - pszEncodedURL = static_cast<sal_Char*>(malloc( (rtl_string_getLength( strUTF8 ) * 3 + 1) * sizeof(sal_Char) )); + pszEncodedURL = static_cast<char*>(malloc( (rtl_string_getLength( strUTF8 ) * 3 + 1) * sizeof(char) )); assert(pszEncodedURL); // Don't handle OOM conditions pURLDest = pszEncodedURL; pURLScan = rtl_string_getStr( strUTF8 ); @@ -611,7 +611,7 @@ static void osl_encodeURL_( rtl_uString *strURL, rtl_String **pstrEncodedURL ) while ( nURLScanCount < nURLScanLen ) { - sal_Char cCurrent = *pURLScan; + char cCurrent = *pURLScan; switch ( cCurrent ) { default: diff --git a/sal/osl/w32/module.cxx b/sal/osl/w32/module.cxx index ece63feb9bc9..67eeb2df0f6d 100644 --- a/sal/osl/w32/module.cxx +++ b/sal/osl/w32/module.cxx @@ -86,7 +86,7 @@ oslModule SAL_CALL osl_loadModule(rtl_uString *strModuleName, sal_Int32 /*nRtldM return ret; } -oslModule SAL_CALL osl_loadModuleAscii(const sal_Char *pModuleName, sal_Int32 ) +oslModule SAL_CALL osl_loadModuleAscii(const char *pModuleName, sal_Int32 ) { HMODULE h; UINT errorMode = SetErrorMode(SEM_NOOPENFILEERRORBOX | SEM_FAILCRITICALERRORS); @@ -170,7 +170,7 @@ oslGenericFunction SAL_CALL osl_getFunctionSymbol( oslModule Module, rtl_uString } oslGenericFunction SAL_CALL -osl_getAsciiFunctionSymbol( oslModule Module, const sal_Char *pSymbol ) +osl_getAsciiFunctionSymbol( oslModule Module, const char *pSymbol ) { oslGenericFunction fncAddr = nullptr; diff --git a/sal/osl/w32/path_helper.cxx b/sal/osl/w32/path_helper.cxx index 294245a65525..9538254659dd 100644 --- a/sal/osl/w32/path_helper.cxx +++ b/sal/osl/w32/path_helper.cxx @@ -64,14 +64,14 @@ void osl_systemPathRemoveSeparator(/*inout*/ rtl_uString** ppustrPath) } // is [A-Za-z]:[/|\]\0 -const sal_Char* const LDP = ":"; -const sal_Char* const LDP_WITH_BACKSLASH = ":\\"; -const sal_Char* const LDP_WITH_SLASH = ":/"; +const char* const LDP = ":"; +const char* const LDP_WITH_BACKSLASH = ":\\"; +const char* const LDP_WITH_SLASH = ":/"; // degenerated case returned by the Windows FileOpen dialog // when someone enters for instance "x:filename", the Win32 // API accepts this case -const sal_Char* const LDP_WITH_DOT_BACKSLASH = ":.\\"; +const char* const LDP_WITH_DOT_BACKSLASH = ":.\\"; bool osl_systemPathIsLogicalDrivePattern(/*in*/ const rtl_uString* pustrPath) { diff --git a/sal/osl/w32/pipe.cxx b/sal/osl/w32/pipe.cxx index e5f33ff7c191..06a6bf82d98d 100644 --- a/sal/osl/w32/pipe.cxx +++ b/sal/osl/w32/pipe.cxx @@ -440,7 +440,7 @@ sal_Int32 SAL_CALL osl_writePipe(oslPipe pPipe, const void *pBuffer , sal_Int32 BytesToSend -= RetVal; BytesSend += RetVal; - pBuffer= static_cast< sal_Char const* >(pBuffer) + RetVal; + pBuffer= static_cast< char const* >(pBuffer) + RetVal; } return BytesSend; @@ -464,7 +464,7 @@ sal_Int32 SAL_CALL osl_readPipe(oslPipe pPipe, void *pBuffer, sal_Int32 n) BytesToRead -= RetVal; BytesRead += RetVal; - pBuffer= static_cast< sal_Char* >(pBuffer) + RetVal; + pBuffer= static_cast< char* >(pBuffer) + RetVal; } return BytesRead; } diff --git a/sal/osl/w32/profile.cxx b/sal/osl/w32/profile.cxx index e095da62ccad..17540f65e424 100644 --- a/sal/osl/w32/profile.cxx +++ b/sal/osl/w32/profile.cxx @@ -84,9 +84,9 @@ enum osl_TLockMode struct osl_TFile { HANDLE m_Handle; - sal_Char* m_pReadPtr; - sal_Char m_ReadBuf[512]; - sal_Char* m_pWriteBuf; + char* m_pReadPtr; + char m_ReadBuf[512]; + char* m_pWriteBuf; sal_uInt32 m_nWriteBufLen; sal_uInt32 m_nWriteBufFree; }; @@ -120,7 +120,7 @@ struct osl_TProfileImpl sal_uInt32 m_MaxLines; sal_uInt32 m_NoSections; sal_uInt32 m_MaxSections; - sal_Char** m_Lines; + char** m_Lines; rtl_uString *m_strFileName; osl_TProfileSection* m_Sections; }; @@ -133,22 +133,22 @@ static bool lockFile(const osl_TFile* pFile, osl_TLockMode eMode static bool rewindFile(osl_TFile* pFile, bool bTruncate); static osl_TStamp getFileStamp(osl_TFile* pFile); -static bool getLine(osl_TFile* pFile, sal_Char *pszLine, int MaxLen); -static bool putLine(osl_TFile* pFile, const sal_Char *pszLine); -static const sal_Char* stripBlanks(const sal_Char* String, sal_uInt32* pLen); -static const sal_Char* addLine(osl_TProfileImpl* pProfile, const sal_Char* Line); -static const sal_Char* insertLine(osl_TProfileImpl* pProfile, const sal_Char* Line, sal_uInt32 LineNo); +static bool getLine(osl_TFile* pFile, char *pszLine, int MaxLen); +static bool putLine(osl_TFile* pFile, const char *pszLine); +static const char* stripBlanks(const char* String, sal_uInt32* pLen); +static const char* addLine(osl_TProfileImpl* pProfile, const char* Line); +static const char* insertLine(osl_TProfileImpl* pProfile, const char* Line, sal_uInt32 LineNo); static void removeLine(osl_TProfileImpl* pProfile, sal_uInt32 LineNo); static void setEntry(osl_TProfileImpl* pProfile, osl_TProfileSection* pSection, sal_uInt32 NoEntry, sal_uInt32 Line, - const sal_Char* Entry, sal_uInt32 Len); + const char* Entry, sal_uInt32 Len); static bool addEntry(osl_TProfileImpl* pProfile, osl_TProfileSection *pSection, - int Line, const sal_Char* Entry, sal_uInt32 Len); + int Line, const char* Entry, sal_uInt32 Len); static void removeEntry(osl_TProfileSection *pSection, sal_uInt32 NoEntry); -static bool addSection(osl_TProfileImpl* pProfile, int Line, const sal_Char* Section, sal_uInt32 Len); +static bool addSection(osl_TProfileImpl* pProfile, int Line, const char* Section, sal_uInt32 Len); static void removeSection(osl_TProfileImpl* pProfile, osl_TProfileSection *pSection); -static osl_TProfileSection* findEntry(osl_TProfileImpl* pProfile, const sal_Char* Section, - const sal_Char* Entry, sal_uInt32 *pNoEntry); +static osl_TProfileSection* findEntry(osl_TProfileImpl* pProfile, const char* Section, + const char* Entry, sal_uInt32 *pNoEntry); static bool loadProfile(osl_TFile* pFile, osl_TProfileImpl* pProfile); static bool storeProfile(osl_TProfileImpl* pProfile, bool bCleanup); static osl_TProfileImpl* acquireProfile(oslProfile Profile, bool bWriteable); @@ -367,9 +367,9 @@ static bool writeProfileImpl(osl_TFile* pFile) namespace { // Use Unicode version of GetPrivateProfileString, to work with Multi-language paths DWORD GetPrivateProfileStringWrapper(const osl_TProfileImpl* pProfile, - const sal_Char* pszSection, const sal_Char* pszEntry, - sal_Char* pszString, sal_uInt32 MaxLen, - const sal_Char* pszDefault) + const char* pszSection, const char* pszEntry, + char* pszString, sal_uInt32 MaxLen, + const char* pszDefault) { OSL_ASSERT(pProfile && (!MaxLen || pszString)); @@ -409,8 +409,8 @@ DWORD GetPrivateProfileStringWrapper(const osl_TProfileImpl* pProfile, // Use Unicode version of WritePrivateProfileString, to work with Multi-language paths bool WritePrivateProfileStringWrapper(const osl_TProfileImpl* pProfile, - const sal_Char* pszSection, const sal_Char* pszEntry, - const sal_Char* pszString) + const char* pszSection, const char* pszEntry, + const char* pszString) { OSL_ASSERT(pProfile && pszSection); rtl_uString *pSection, *pEntry = nullptr, *pString = nullptr; @@ -444,12 +444,12 @@ bool WritePrivateProfileStringWrapper(const osl_TProfileImpl* pProfile, } sal_Bool SAL_CALL osl_readProfileString(oslProfile Profile, - const sal_Char* pszSection, const sal_Char* pszEntry, - sal_Char* pszString, sal_uInt32 MaxLen, - const sal_Char* pszDefault) + const char* pszSection, const char* pszEntry, + char* pszString, sal_uInt32 MaxLen, + const char* pszDefault) { sal_uInt32 NoEntry; - const sal_Char* pStr = nullptr; + const char* pStr = nullptr; osl_TProfileImpl* pProfile = nullptr; pProfile = acquireProfile(Profile, false); @@ -496,10 +496,10 @@ sal_Bool SAL_CALL osl_readProfileString(oslProfile Profile, } sal_Bool SAL_CALL osl_readProfileBool(oslProfile Profile, - const sal_Char* pszSection, const sal_Char* pszEntry, + const char* pszSection, const char* pszEntry, sal_Bool Default) { - sal_Char Line[32]; + char Line[32]; if (osl_readProfileString(Profile, pszSection, pszEntry, Line, sizeof(Line), "")) { @@ -518,12 +518,12 @@ sal_Bool SAL_CALL osl_readProfileBool(oslProfile Profile, } sal_uInt32 SAL_CALL osl_readProfileIdent(oslProfile Profile, - const sal_Char* pszSection, const sal_Char* pszEntry, - sal_uInt32 FirstId, const sal_Char* Strings[], + const char* pszSection, const char* pszEntry, + sal_uInt32 FirstId, const char* Strings[], sal_uInt32 Default) { sal_uInt32 i; - sal_Char Line[256]; + char Line[256]; if (osl_readProfileString(Profile, pszSection, pszEntry, Line, sizeof(Line), "")) { @@ -543,14 +543,14 @@ sal_uInt32 SAL_CALL osl_readProfileIdent(oslProfile Profile, } sal_Bool SAL_CALL osl_writeProfileString(oslProfile Profile, - const sal_Char* pszSection, const sal_Char* pszEntry, - const sal_Char* pszString) + const char* pszSection, const char* pszEntry, + const char* pszString) { sal_uInt32 i; bool bRet = false; sal_uInt32 NoEntry; - const sal_Char* pStr; - sal_Char Line[4096]; + const char* pStr; + char Line[4096]; osl_TProfileSection* pSec; osl_TProfileImpl* pProfile = nullptr; @@ -625,7 +625,7 @@ sal_Bool SAL_CALL osl_writeProfileString(oslProfile Profile, } sal_Bool SAL_CALL osl_writeProfileBool(oslProfile Profile, - const sal_Char* pszSection, const sal_Char* pszEntry, + const char* pszSection, const char* pszEntry, sal_Bool Value) { bool bRet = false; @@ -639,8 +639,8 @@ sal_Bool SAL_CALL osl_writeProfileBool(oslProfile Profile, } sal_Bool SAL_CALL osl_writeProfileIdent(oslProfile Profile, - const sal_Char* pszSection, const sal_Char* pszEntry, - sal_uInt32 FirstId, const sal_Char* Strings[], + const char* pszSection, const char* pszEntry, + sal_uInt32 FirstId, const char* Strings[], sal_uInt32 Value) { int i, n; @@ -657,7 +657,7 @@ sal_Bool SAL_CALL osl_writeProfileIdent(oslProfile Profile, } sal_Bool SAL_CALL osl_removeProfileEntry(oslProfile Profile, - const sal_Char *pszSection, const sal_Char *pszEntry) + const char *pszSection, const char *pszEntry) { sal_uInt32 NoEntry; osl_TProfileImpl* pProfile = nullptr; @@ -699,8 +699,8 @@ sal_Bool SAL_CALL osl_removeProfileEntry(oslProfile Profile, return bRet; } -sal_uInt32 SAL_CALL osl_getProfileSectionEntries(oslProfile Profile, const sal_Char *pszSection, - sal_Char* pszBuffer, sal_uInt32 MaxLen) +sal_uInt32 SAL_CALL osl_getProfileSectionEntries(oslProfile Profile, const char *pszSection, + char* pszBuffer, sal_uInt32 MaxLen) { sal_uInt32 i, n = 0; sal_uInt32 NoEntry; @@ -976,7 +976,7 @@ bool osl_getProfileName(rtl_uString* strPath, rtl_uString* strName, rtl_uString* return nError == osl_File_E_None; } -sal_uInt32 SAL_CALL osl_getProfileSections(oslProfile Profile, sal_Char* pszBuffer, sal_uInt32 MaxLen) +sal_uInt32 SAL_CALL osl_getProfileSections(oslProfile Profile, char* pszBuffer, sal_uInt32 MaxLen) { sal_uInt32 i, n = 0; osl_TProfileImpl* pProfile = acquireProfile(Profile, false); @@ -1167,12 +1167,12 @@ static bool rewindFile(osl_TFile* pFile, bool bTruncate) return true; } -static bool getLine(osl_TFile* pFile, sal_Char *pszLine, int MaxLen) +static bool getLine(osl_TFile* pFile, char *pszLine, int MaxLen) { DWORD Max; size_t Free; - sal_Char* pChr; - sal_Char* pLine = pszLine; + char* pChr; + char* pLine = pszLine; if (pFile->m_Handle == INVALID_HANDLE_VALUE) return false; @@ -1246,7 +1246,7 @@ static bool getLine(osl_TFile* pFile, sal_Char *pszLine, int MaxLen) return true; } -static bool putLine(osl_TFile* pFile, const sal_Char *pszLine) +static bool putLine(osl_TFile* pFile, const char *pszLine) { unsigned int Len = strlen(pszLine); @@ -1257,7 +1257,7 @@ static bool putLine(osl_TFile* pFile, const sal_Char *pszLine) if ( pFile->m_pWriteBuf == nullptr ) { - pFile->m_pWriteBuf = static_cast<sal_Char*>(malloc(Len+3)); + pFile->m_pWriteBuf = static_cast<char*>(malloc(Len+3)); pFile->m_nWriteBufLen = Len+3; pFile->m_nWriteBufFree = Len+3; } @@ -1265,9 +1265,9 @@ static bool putLine(osl_TFile* pFile, const sal_Char *pszLine) { if ( pFile->m_nWriteBufFree <= Len + 3 ) { - sal_Char* pTmp; + char* pTmp; - pTmp=static_cast<sal_Char*>(realloc(pFile->m_pWriteBuf,( ( pFile->m_nWriteBufLen + Len ) * 2) )); + pTmp=static_cast<char*>(realloc(pFile->m_pWriteBuf,( ( pFile->m_nWriteBufLen + Len ) * 2) )); if ( pTmp == nullptr ) { return false; @@ -1292,7 +1292,7 @@ static bool putLine(osl_TFile* pFile, const sal_Char *pszLine) /* platform specific end */ -static const sal_Char* stripBlanks(const sal_Char* String, sal_uInt32* pLen) +static const char* stripBlanks(const char* String, sal_uInt32* pLen) { if ( (pLen != nullptr) && ( *pLen != 0 ) ) { @@ -1312,14 +1312,14 @@ static const sal_Char* stripBlanks(const sal_Char* String, sal_uInt32* pLen) return String; } -static const sal_Char* addLine(osl_TProfileImpl* pProfile, const sal_Char* Line) +static const char* addLine(osl_TProfileImpl* pProfile, const char* Line) { if (pProfile->m_NoLines >= pProfile->m_MaxLines) { if (pProfile->m_Lines == nullptr) { pProfile->m_MaxLines = LINES_INI; - pProfile->m_Lines = static_cast<sal_Char **>(calloc(pProfile->m_MaxLines, sizeof(sal_Char *))); + pProfile->m_Lines = static_cast<char **>(calloc(pProfile->m_MaxLines, sizeof(char *))); } else { @@ -1327,7 +1327,7 @@ static const sal_Char* addLine(osl_TProfileImpl* pProfile, const sal_Char* Line) unsigned int oldmax=pProfile->m_MaxLines; pProfile->m_MaxLines += LINES_ADD; - if (auto p = static_cast<sal_Char **>(realloc(pProfile->m_Lines, pProfile->m_MaxLines * sizeof(sal_Char *)))) + if (auto p = static_cast<char **>(realloc(pProfile->m_Lines, pProfile->m_MaxLines * sizeof(char *)))) { pProfile->m_Lines = p; @@ -1361,25 +1361,25 @@ static const sal_Char* addLine(osl_TProfileImpl* pProfile, const sal_Char* Line) return pProfile->m_Lines[pProfile->m_NoLines - 1]; } -static const sal_Char* insertLine(osl_TProfileImpl* pProfile, const sal_Char* Line, sal_uInt32 LineNo) +static const char* insertLine(osl_TProfileImpl* pProfile, const char* Line, sal_uInt32 LineNo) { if (pProfile->m_NoLines >= pProfile->m_MaxLines) { if (pProfile->m_Lines == nullptr) { pProfile->m_MaxLines = LINES_INI; - pProfile->m_Lines = static_cast<sal_Char **>(calloc(pProfile->m_MaxLines, sizeof(sal_Char *))); + pProfile->m_Lines = static_cast<char **>(calloc(pProfile->m_MaxLines, sizeof(char *))); } else { pProfile->m_MaxLines += LINES_ADD; - if (auto p = static_cast<sal_Char**>( - realloc(pProfile->m_Lines, pProfile->m_MaxLines * sizeof(sal_Char*)))) + if (auto p = static_cast<char**>( + realloc(pProfile->m_Lines, pProfile->m_MaxLines * sizeof(char*)))) { pProfile->m_Lines = p; memset(&pProfile->m_Lines[pProfile->m_NoLines], 0, - (pProfile->m_MaxLines - pProfile->m_NoLines - 1) * sizeof(sal_Char*)); + (pProfile->m_MaxLines - pProfile->m_NoLines - 1) * sizeof(char*)); } else { @@ -1403,7 +1403,7 @@ static const sal_Char* insertLine(osl_TProfileImpl* pProfile, const sal_Char* Li sal_uInt32 i, n; memmove(&pProfile->m_Lines[LineNo + 1], &pProfile->m_Lines[LineNo], - (pProfile->m_NoLines - LineNo) * sizeof(sal_Char *)); + (pProfile->m_NoLines - LineNo) * sizeof(char *)); /* adjust line references */ for (i = 0; i < pProfile->m_NoSections; i++) @@ -1437,11 +1437,11 @@ static void removeLine(osl_TProfileImpl* pProfile, sal_uInt32 LineNo) sal_uInt32 i, n; memmove(&pProfile->m_Lines[LineNo], &pProfile->m_Lines[LineNo + 1], - (pProfile->m_NoLines - LineNo - 1) * sizeof(sal_Char *)); + (pProfile->m_NoLines - LineNo - 1) * sizeof(char *)); memset(&pProfile->m_Lines[pProfile->m_NoLines - 1], 0, - (pProfile->m_MaxLines - pProfile->m_NoLines) * sizeof(sal_Char*)); + (pProfile->m_MaxLines - pProfile->m_NoLines) * sizeof(char*)); /* adjust line references */ for (i = 0; i < pProfile->m_NoSections; i++) @@ -1469,7 +1469,7 @@ static void removeLine(osl_TProfileImpl* pProfile, sal_uInt32 LineNo) static void setEntry(osl_TProfileImpl* pProfile, osl_TProfileSection* pSection, sal_uInt32 NoEntry, sal_uInt32 Line, - const sal_Char* Entry, sal_uInt32 Len) + const char* Entry, sal_uInt32 Len) { Entry = stripBlanks(Entry, &Len); pSection->m_Entries[NoEntry].m_Line = Line; @@ -1480,7 +1480,7 @@ static void setEntry(osl_TProfileImpl* pProfile, osl_TProfileSection* pSection, } static bool addEntry(osl_TProfileImpl* pProfile, osl_TProfileSection *pSection, - int Line, const sal_Char* Entry, sal_uInt32 Len) + int Line, const char* Entry, sal_uInt32 Len) { if (pSection != nullptr) { @@ -1545,7 +1545,7 @@ static void removeEntry(osl_TProfileSection *pSection, sal_uInt32 NoEntry) return; } -static bool addSection(osl_TProfileImpl* pProfile, int Line, const sal_Char* Section, sal_uInt32 Len) +static bool addSection(osl_TProfileImpl* pProfile, int Line, const char* Section, sal_uInt32 Len) { if (pProfile->m_NoSections >= pProfile->m_MaxSections) { @@ -1631,8 +1631,8 @@ static void removeSection(osl_TProfileImpl* pProfile, osl_TProfileSection *pSect return; } -static osl_TProfileSection* findEntry(osl_TProfileImpl* pProfile, const sal_Char* Section, - const sal_Char* Entry, sal_uInt32 *pNoEntry) +static osl_TProfileSection* findEntry(osl_TProfileImpl* pProfile, const char* Section, + const char* Entry, sal_uInt32 *pNoEntry) { static sal_uInt32 Sect = 0; sal_uInt32 i, n; @@ -1666,7 +1666,7 @@ static osl_TProfileSection* findEntry(osl_TProfileImpl* pProfile, const sal_Char for (i = 0; i < pSec->m_NoEntries; i++) { - const sal_Char* pStr = &pProfile->m_Lines[pSec->m_Entries[i].m_Line] + const char* pStr = &pProfile->m_Lines[pSec->m_Entries[i].m_Line] [pSec->m_Entries[i].m_Offset]; if ((Len == pSec->m_Entries[i].m_Len) && (strnicmp(Entry, pStr, pSec->m_Entries[i].m_Len) @@ -1686,9 +1686,9 @@ static osl_TProfileSection* findEntry(osl_TProfileImpl* pProfile, const sal_Char static bool loadProfile(osl_TFile* pFile, osl_TProfileImpl* pProfile) { sal_uInt32 i; - sal_Char const * pStr; - sal_Char const * pChar; - sal_Char Line[4096]; + char const * pStr; + char const * pChar; + char Line[4096]; pProfile->m_NoLines = 0; pProfile->m_NoSections = 0; @@ -1996,9 +1996,9 @@ static bool releaseProfile(osl_TProfileImpl* pProfile) static bool lookupProfile(const sal_Unicode *strPath, const sal_Unicode *strFile, sal_Unicode *strProfile) { - sal_Char *pChr; - sal_Char Buffer[4096] = ""; - sal_Char Product[132] = ""; + char *pChr; + char Buffer[4096] = ""; + char Product[132] = ""; ::osl::LongPathBuffer< sal_Unicode > aPath( MAX_LONG_PATH ); aPath[0] = 0; @@ -2034,7 +2034,7 @@ static bool lookupProfile(const sal_Unicode *strPath, const sal_Unicode *strFile rtl_uString * strSVFallback = nullptr; rtl_uString * strSVLocation = nullptr; rtl_uString * strSVName = nullptr; - ::osl::LongPathBuffer< sal_Char > aDir( MAX_LONG_PATH ); + ::osl::LongPathBuffer< char > aDir( MAX_LONG_PATH ); oslProfile hProfile; rtl_uString_newFromAscii(&strSVFallback, SVERSION_FALLBACK); @@ -2183,7 +2183,7 @@ static bool lookupProfile(const sal_Unicode *strPath, const sal_Unicode *strFile } { - ::osl::LongPathBuffer< sal_Char > aTmpPath( MAX_LONG_PATH ); + ::osl::LongPathBuffer< char > aTmpPath( MAX_LONG_PATH ); WideCharToMultiByte(CP_ACP,0, o3tl::toW(aPath), -1, aTmpPath, aTmpPath.getBufSizeInSymbols(), nullptr, nullptr); @@ -2192,10 +2192,10 @@ static bool lookupProfile(const sal_Unicode *strPath, const sal_Unicode *strFile if (((access(aTmpPath, 0) < 0) && (nPos != -1)) || (*strPath == 0)) { - static const sal_Char *SubDirs[] = SVERSION_DIRS; + static const char *SubDirs[] = SVERSION_DIRS; unsigned i = 0; - sal_Char *pStr = aTmpPath + nPos; + char *pStr = aTmpPath + nPos; for (i = 0; i < SAL_N_ELEMENTS(SubDirs); i++) if (strnicmp(pStr + 1, SubDirs[i], strlen(SubDirs[i])) == 0) @@ -2232,7 +2232,7 @@ static bool lookupProfile(const sal_Unicode *strPath, const sal_Unicode *strFile copy_ustr_n(aPath + dwPathLen, strFile, rtl_ustr_getLength(strFile)+1); { - ::osl::LongPathBuffer< sal_Char > aTmpPath( MAX_LONG_PATH ); + ::osl::LongPathBuffer< char > aTmpPath( MAX_LONG_PATH ); WideCharToMultiByte(CP_ACP,0, o3tl::toW(aPath), -1, aTmpPath, aTmpPath.getBufSizeInSymbols(), nullptr, nullptr); @@ -2300,7 +2300,7 @@ static bool lookupProfile(const sal_Unicode *strPath, const sal_Unicode *strFile } else { - ::osl::LongPathBuffer< sal_Char > aTmpPath2( MAX_LONG_PATH ); + ::osl::LongPathBuffer< char > aTmpPath2( MAX_LONG_PATH ); int n; if ((n = WideCharToMultiByte( diff --git a/sal/osl/w32/socket.cxx b/sal/osl/w32/socket.cxx index e37910f5fd14..b0173357c187 100644 --- a/sal/osl/w32/socket.cxx +++ b/sal/osl/w32/socket.cxx @@ -609,7 +609,7 @@ oslSocketResult SAL_CALL osl_getLocalHostname (rtl_uString **strLocalHostname) static auto const init = []() -> std::pair<oslSocketResult, OUString> { sal_Unicode LocalHostname[256] = {0}; - sal_Char Host[256]= ""; + char Host[256]= ""; if (gethostname(Host, sizeof(Host)) == 0) { /* check if we have an FQDN; if not, try to determine it via dns first: */ @@ -1101,7 +1101,7 @@ sal_Int32 SAL_CALL osl_receiveSocket ( return osl_Socket_Error; return recv(pSocket->m_Socket, - static_cast<sal_Char*>(pBuffer), + static_cast<char*>(pBuffer), BytesToRead, MSG_FLAG_TO_NATIVE(Flag)); } @@ -1125,7 +1125,7 @@ sal_Int32 SAL_CALL osl_receiveFromSocket ( return osl_Socket_Error; return recvfrom(pSocket->m_Socket, - static_cast<sal_Char*>(pBuffer), + static_cast<char*>(pBuffer), BufferSize, MSG_FLAG_TO_NATIVE(Flag), pSystemSockAddr, @@ -1142,7 +1142,7 @@ sal_Int32 SAL_CALL osl_sendSocket ( return osl_Socket_Error; return send(pSocket->m_Socket, - static_cast<sal_Char const *>(pBuffer), + static_cast<char const *>(pBuffer), BytesToSend, MSG_FLAG_TO_NATIVE(Flag)); } @@ -1165,7 +1165,7 @@ sal_Int32 SAL_CALL osl_sendToSocket ( pSystemSockAddr = &(ReceiverAddr->m_sockaddr); return sendto(pSocket->m_Socket, - static_cast<sal_Char const *>(pBuffer), + static_cast<char const *>(pBuffer), BytesToSend, MSG_FLAG_TO_NATIVE(Flag), pSystemSockAddr, @@ -1358,7 +1358,7 @@ sal_Bool SAL_CALL osl_setSocketOption ( return(setsockopt(pSocket->m_Socket, OPTION_LEVEL_TO_NATIVE(Level), OPTION_TO_NATIVE(Option), - static_cast<sal_Char*>(pBuffer), + static_cast<char*>(pBuffer), BufferLen) == 0); } |