summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorThomas Arnhold <thomas@arnhold.org>2012-02-18 20:41:41 +0100
committerThomas Arnhold <thomas@arnhold.org>2012-02-18 21:33:04 +0100
commitbb539e18daefa3cb182e34b7c3f36d486fb7f09a (patch)
treec4706e79254537c50fc0deaade8140d1e920e0f3 /sal
parente474431fd6663548c272032dcae4656abed94a89 (diff)
sal: remove dead code and empty lines
Diffstat (limited to 'sal')
-rw-r--r--sal/osl/w32/profile.cxx148
1 files changed, 0 insertions, 148 deletions
diff --git a/sal/osl/w32/profile.cxx b/sal/osl/w32/profile.cxx
index 84403846927d..c95b376fd106 100644
--- a/sal/osl/w32/profile.cxx
+++ b/sal/osl/w32/profile.cxx
@@ -103,8 +103,6 @@ typedef struct _osl_TFile
HANDLE m_Handle;
sal_Char* m_pReadPtr;
sal_Char m_ReadBuf[512];
-/* sal_Char* m_pWritePtr; */
-/* sal_Char m_WriteBuf[512]; */
sal_Char* m_pWriteBuf;
sal_uInt32 m_nWriteBufLen;
sal_uInt32 m_nWriteBufFree;
@@ -216,7 +214,6 @@ oslProfile SAL_CALL osl_openProfile(rtl_uString *strProfileName, sal_uInt32 Flag
#ifdef DEBUG_OSL_PROFILE
Flags=osl_Profile_FLUSHWRITE;
- // OSL_TRACE("opening '%s'\n",FileName);
if ( Flags == osl_Profile_DEFAULT )
{
OSL_TRACE("with osl_Profile_DEFAULT");
@@ -233,10 +230,6 @@ oslProfile SAL_CALL osl_openProfile(rtl_uString *strProfileName, sal_uInt32 Flag
{
OSL_TRACE("with osl_Profile_WRITELOCK");
}
-/* if ( Flags & osl_Profile_READWRITE ) */
-/* { */
-/* OSL_TRACE("with osl_Profile_READWRITE \n"); */
-/* } */
if ( Flags & osl_Profile_FLUSHWRITE )
{
OSL_TRACE("with osl_Profile_FLUSHWRITE");
@@ -260,7 +253,6 @@ oslProfile SAL_CALL osl_openProfile(rtl_uString *strProfileName, sal_uInt32 Flag
pProfile->m_Flags = Flags & FLG_USER;
osl_getSystemPathFromFileURL(strProfileName, &pProfile->m_strFileName);
-// rtl_uString_assign(&pProfile->m_strFileName, strProfileName);
if (Flags & (osl_Profile_READLOCK | osl_Profile_WRITELOCK | osl_Profile_FLUSHWRITE ))
pProfile->m_pFile = pFile;
@@ -305,9 +297,6 @@ sal_Bool SAL_CALL osl_closeProfile(oslProfile Profile)
{
if ( !( pProfile->m_Flags & osl_Profile_READLOCK ) && ( pProfile->m_Flags & FLG_MODIFIED ) )
{
-/* if (pProfile->m_pFile == NULL) */
-/* pProfile->m_pFile = openFileImpl(pProfile->m_Filename, sal_True); */
-
storeProfile(pProfile, sal_False);
}
}
@@ -349,13 +338,10 @@ sal_Bool SAL_CALL osl_closeProfile(oslProfile Profile)
}
if ( pProfile->m_Sections != 0 )
{
- /*osl_TProfileSection* pSections=pProfile->m_Sections;*/
for ( index = 0 ; index < pProfile->m_NoSections ; ++index )
{
if ( pProfile->m_Sections[index].m_Entries != 0 )
- {
free(pProfile->m_Sections[index].m_Entries);
- }
}
free(pProfile->m_Sections);
}
@@ -428,20 +414,13 @@ static sal_Bool writeProfileImpl(osl_TFile* pFile)
return sal_False;
}
-#ifdef DEBUG_OSL_PROFILE
-/* OSL_TRACE("File Buffer in writeProfileImpl '%s' size == '%i' '%i'(%i)\n",
- pFile->m_pWriteBuf,pFile->m_nWriteBufLen,strlen(pFile->m_pWriteBuf),pFile->m_nWriteBufLen - pFile->m_nWriteBufFree);*/
-#endif
-
bRet=WriteFile(pFile->m_Handle, pFile->m_pWriteBuf, pFile->m_nWriteBufLen - pFile->m_nWriteBufFree,&BytesWritten,NULL);
if ( bRet == 0 || BytesWritten <= 0 )
{
OSL_ENSURE(bRet,"WriteFile failed!!!");
-
OSL_TRACE("write failed '%s'",strerror(errno));
-/* OSL_TRACE("Out osl_writeProfileImpl() [write '%s']\n",strerror(errno));*/
return (sal_False);
}
@@ -480,7 +459,6 @@ sal_Bool SAL_CALL osl_readProfileString(oslProfile Profile,
OSL_TRACE("Out osl_readProfileString [pProfile==0]");
#endif
-
return (sal_False);
}
@@ -520,7 +498,6 @@ sal_Bool SAL_CALL osl_readProfileString(oslProfile Profile,
OSL_TRACE("Out osl_readProfileString [pStr==0]");
#endif
-
return (sal_False);
}
@@ -528,9 +505,6 @@ sal_Bool SAL_CALL osl_readProfileString(oslProfile Profile,
OSL_TRACE("Out osl_readProfileString [ok]");
#endif
-
-
-
return (sal_True);
}
@@ -1156,8 +1130,6 @@ sal_uInt32 SAL_CALL osl_getProfileSections(oslProfile Profile, sal_Char* pszBuff
}
-
-
/*****************************************************************************/
/* Static Module Functions */
/*****************************************************************************/
@@ -1208,64 +1180,11 @@ static sal_Bool lockFile(const osl_TFile* pFile, osl_TLockMode eMode)
}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
static osl_TFile* openFileImpl(rtl_uString * strFileName, oslProfileOption ProfileFlags )
{
osl_TFile* pFile = reinterpret_cast< osl_TFile*>( calloc( 1, sizeof(osl_TFile) ) );
sal_Bool bWriteable = sal_False;
-/* if ( ProfileFlags & ( osl_Profile_WRITELOCK | osl_Profile_FLUSHWRITE | osl_Profile_READWRITE ) )*/
if ( ProfileFlags & ( osl_Profile_WRITELOCK | osl_Profile_FLUSHWRITE ) )
{
#ifdef DEBUG_OSL_PROFILE
@@ -1312,21 +1231,11 @@ static osl_TFile* openFileImpl(rtl_uString * strFileName, oslProfileOption Profi
lockFile(pFile, bWriteable ? write_lock : read_lock);
}
- /* mfe: new WriteBuf obsolete */
-/* pFile->m_pWritePtr = pFile->m_Buf;*/
-/* pFile->m_pReadPtr = pFile->m_ReadBuf + sizeof(pFile->m_ReadBuf);*/
-
return (pFile);
}
-
-
-
-
-
-
static osl_TStamp closeFileImpl(osl_TFile* pFile)
{
osl_TStamp stamp = {0, 0};
@@ -1338,17 +1247,6 @@ static osl_TStamp closeFileImpl(osl_TFile* pFile)
if (pFile->m_Handle != INVALID_HANDLE_VALUE)
{
- /* mfe: new WriteBuf obsolete */
- /* we just closing the file here, DO NOT write, it has to be handled in higher levels */
-/* if (pFile->m_pWritePtr > pFile->m_Buf)*/
-/* {*/
-/* DWORD Bytes;*/
-
-/* WriteFile(pFile->m_Handle, pFile->m_WriteBuf,*/
-/* pFile->m_pWritePtr - pFile->m_WriteBuf,*/
-/* &Bytes, NULL);*/
-/* }*/
-
stamp = getFileStamp(pFile);
lockFile(pFile, un_lock);
@@ -1368,29 +1266,10 @@ static osl_TStamp closeFileImpl(osl_TFile* pFile)
}
-
-
-
-
-
-
static sal_Bool rewindFile(osl_TFile* pFile, sal_Bool bTruncate)
{
if (pFile->m_Handle != INVALID_HANDLE_VALUE)
{
- /* mfe: new WriteBuf obsolete */
- /* we just closing the file here, DO NOT write, it has to be handled in higher levels */
-/* if (pFile->m_pWritePtr > pFile->m_WriteBuf)*/
-/* {*/
-/* DWORD Bytes;*/
-
-/* WriteFile(pFile->m_Handle, pFile->m_WriteBuf,*/
-/* pFile->m_pWritePtr - pFile->m_WriteBuf,*/
-/* &Bytes, NULL);*/
-
-/* pFile->m_pWritePtr = pFile->m_WriteBuf;*/
-/* }*/
-
pFile->m_pReadPtr = pFile->m_ReadBuf + sizeof(pFile->m_ReadBuf);
SetFilePointer(pFile->m_Handle, 0, NULL, FILE_BEGIN);
@@ -1403,14 +1282,6 @@ static sal_Bool rewindFile(osl_TFile* pFile, sal_Bool bTruncate)
}
-
-
-
-
-
-
-
-
static sal_Bool getLine(osl_TFile* pFile, const sal_Char *pszLine, int MaxLen)
{
DWORD Max;
@@ -1491,14 +1362,6 @@ static sal_Bool getLine(osl_TFile* pFile, const sal_Char *pszLine, int MaxLen)
}
-
-
-
-
-
-
-
-
static sal_Bool putLine(osl_TFile* pFile, const sal_Char *pszLine)
{
unsigned int Len = strlen(pszLine);
@@ -1547,7 +1410,6 @@ static sal_Bool putLine(osl_TFile* pFile, const sal_Char *pszLine)
/* platform specific end */
-
static const sal_Char* stripBlanks(const sal_Char* String, sal_uInt32* pLen)
{
if ( (pLen != NULL) && ( *pLen != 0 ) )
@@ -1960,7 +1822,6 @@ static sal_Bool loadProfile(osl_TFile* pFile, osl_TProfileImpl* pProfile)
else
{
/* new section */
-
if (! addSection(pProfile, i, pStr + 1, pChar - pStr - 1))
return (sal_False);
}
@@ -1970,9 +1831,6 @@ static sal_Bool loadProfile(osl_TFile* pFile, osl_TProfileImpl* pProfile)
}
-
-
-
static sal_Bool storeProfile(osl_TProfileImpl* pProfile, sal_Bool bCleanup)
{
#ifdef TRACE_OSL_PROFILE
@@ -2025,9 +1883,6 @@ static sal_Bool storeProfile(osl_TProfileImpl* pProfile, sal_Bool bCleanup)
osl_ProfileSwapProfileNames(pProfile);
-/* free(pProfile->m_pFile);*/
-/* free(pTmpFile);*/
-
pProfile->m_pFile = openFileImpl(pProfile->m_strFileName,pProfile->m_Flags);
}
@@ -2169,7 +2024,6 @@ static osl_TProfileImpl* acquireProfile(oslProfile Profile, sal_Bool bWriteable)
if ( bWriteable )
{
-/* PFlags = osl_Profile_DEFAULT | osl_Profile_READWRITE; */
PFlags = osl_Profile_DEFAULT | osl_Profile_WRITELOCK;
}
else
@@ -2184,8 +2038,6 @@ static osl_TProfileImpl* acquireProfile(oslProfile Profile, sal_Bool bWriteable)
OSL_TRACE("AUTOOPEN MODE");
#endif
-
-
if ( ( pProfile = (osl_TProfileImpl*)osl_openProfile( NULL, PFlags ) ) != NULL )
{
pProfile->m_Flags |= FLG_AUTOOPEN;