diff options
Diffstat (limited to 'tools/source/fsys/unx.cxx')
-rw-r--r-- | tools/source/fsys/unx.cxx | 82 |
1 files changed, 41 insertions, 41 deletions
diff --git a/tools/source/fsys/unx.cxx b/tools/source/fsys/unx.cxx index 13da80f6ccca..94e2ce5950a4 100644 --- a/tools/source/fsys/unx.cxx +++ b/tools/source/fsys/unx.cxx @@ -95,18 +95,18 @@ struct mymnttab #if defined(NETBSD) || defined(FREEBSD) || defined(MACOSX) -BOOL GetMountEntry(dev_t /* dev */, struct mymnttab * /* mytab */ ) +sal_Bool GetMountEntry(dev_t /* dev */, struct mymnttab * /* mytab */ ) { DBG_WARNING( "Sorry, not implemented: GetMountEntry" ); - return FALSE; + return sal_False; } #elif defined AIX -BOOL GetMountEntry(dev_t dev, struct mymnttab *mytab) +sal_Bool GetMountEntry(dev_t dev, struct mymnttab *mytab) { int bufsize; if (mntctl (MCTL_QUERY, sizeof bufsize, (char*) &bufsize)) - return FALSE; + return sal_False; char* buffer = (char *)malloc( bufsize * sizeof(char) ); if (mntctl (MCTL_QUERY, bufsize, buffer) != -1) @@ -127,40 +127,40 @@ BOOL GetMountEntry(dev_t dev, struct mymnttab *mytab) += vmt2dataptr((struct vmount*)vmt, VMT_OBJECT); mytab->mountdevice = dev; free( buffer ); - return TRUE; + return sal_True; } } free( buffer ); - return FALSE; + return sal_False; } #else -static BOOL GetMountEntry(dev_t dev, struct mymnttab *mytab) +static sal_Bool GetMountEntry(dev_t dev, struct mymnttab *mytab) { #if defined SOLARIS || defined SINIX FILE *fp = fopen (MNTTAB, "r"); if (! fp) - return FALSE; + return sal_False; struct mnttab mnt[1]; while (getmntent (fp, mnt) != -1) #elif defined SCO FILE *fp = fopen (MNTTAB, "r"); if (! fp) - return FALSE; + return sal_False; struct mnttab mnt[1]; while (fread (&mnt, sizeof mnt, 1, fp) > 0) #elif defined DECUNIX || defined AIX FILE *fp = NULL; if (! fp) - return FALSE; + return sal_False; struct mnttab mnt[1]; while ( 0 ) #else FILE *fp = setmntent (MOUNTED, "r"); if (! fp) - return FALSE; + return sal_False; struct mnttab *mnt; while ((mnt = getmntent (fp)) != NULL) #endif @@ -196,7 +196,7 @@ static BOOL GetMountEntry(dev_t dev, struct mymnttab *mytab) #else mytab->mymnttab_filesystem = "ext2"; //default ist case sensitiv unter unix #endif - return TRUE; + return sal_True; } # ifdef LINUX /* #61624# dito */ @@ -204,7 +204,7 @@ static BOOL GetMountEntry(dev_t dev, struct mymnttab *mytab) # else fclose (fp); # endif - return FALSE; + return sal_False; } #endif @@ -219,13 +219,13 @@ static BOOL GetMountEntry(dev_t dev, struct mymnttab *mytab) |* *************************************************************************/ -BOOL DirEntry::IsCaseSensitive( FSysPathStyle eFormatter ) const +sal_Bool DirEntry::IsCaseSensitive( FSysPathStyle eFormatter ) const { if (eFormatter==FSYS_STYLE_HOST) { #ifdef NETBSD - return TRUE; + return sal_True; #else struct stat buf; DirEntry aPath(*this); @@ -235,7 +235,7 @@ BOOL DirEntry::IsCaseSensitive( FSysPathStyle eFormatter ) const { if (aPath.Level() == 1) { - return TRUE; // ich bin unter UNIX, also ist der default im Zweifelsfall case sensitiv + return sal_True; // ich bin unter UNIX, also ist der default im Zweifelsfall case sensitiv } aPath = aPath [1]; } @@ -249,17 +249,17 @@ BOOL DirEntry::IsCaseSensitive( FSysPathStyle eFormatter ) const (fsmnt.mymnttab_filesystem.CompareTo("smb") ==COMPARE_EQUAL) || (fsmnt.mymnttab_filesystem.CompareTo("ncpfs")==COMPARE_EQUAL)) { - return FALSE; + return sal_False; } else { - return TRUE; + return sal_True; } #endif } else { - BOOL isCaseSensitive = TRUE; // ich bin unter UNIX, also ist der default im Zweifelsfall case sensitiv + sal_Bool isCaseSensitive = sal_True; // ich bin unter UNIX, also ist der default im Zweifelsfall case sensitiv switch ( eFormatter ) { case FSYS_STYLE_MAC: @@ -269,19 +269,19 @@ BOOL DirEntry::IsCaseSensitive( FSysPathStyle eFormatter ) const case FSYS_STYLE_NWFS: case FSYS_STYLE_HPFS: { - isCaseSensitive = FALSE; + isCaseSensitive = sal_False; break; } case FSYS_STYLE_SYSV: case FSYS_STYLE_BSD: case FSYS_STYLE_DETECT: { - isCaseSensitive = TRUE; + isCaseSensitive = sal_True; break; } default: { - isCaseSensitive = TRUE; // ich bin unter UNIX, also ist der default im Zweifelsfall case sensitiv + isCaseSensitive = sal_True; // ich bin unter UNIX, also ist der default im Zweifelsfall case sensitiv break; } } @@ -299,16 +299,16 @@ BOOL DirEntry::IsCaseSensitive( FSysPathStyle eFormatter ) const |* *************************************************************************/ -BOOL DirEntry::ToAbs() +sal_Bool DirEntry::ToAbs() { if ( FSYS_FLAG_VOLUME == eFlag ) { eFlag = FSYS_FLAG_ABSROOT; - return TRUE; + return sal_True; } if ( IsAbs() ) - return TRUE; + return sal_True; char sBuf[MAXPATHLEN + 1]; *this = DirEntry( String( getcwd( sBuf, MAXPATHLEN ), osl_getThreadTextEncoding() ) ) + *this; @@ -379,7 +379,7 @@ DirEntry DirEntry::GetDevice() const |* *************************************************************************/ -BOOL DirEntry::SetCWD( BOOL bSloppy ) const +sal_Bool DirEntry::SetCWD( sal_Bool bSloppy ) const { DBG_CHKTHIS( DirEntry, ImpCheckDirEntry ); @@ -387,31 +387,31 @@ BOOL DirEntry::SetCWD( BOOL bSloppy ) const ByteString aPath( GetFull(), osl_getThreadTextEncoding()); if ( !chdir( aPath.GetBuffer() ) ) { - return TRUE; + return sal_True; } else { if ( bSloppy && !chdir(aPath.GetBuffer()) ) { - return TRUE; + return sal_True; } else { - return FALSE; + return sal_False; } } } //------------------------------------------------------------------------- -USHORT DirReader_Impl::Init() +sal_uInt16 DirReader_Impl::Init() { return 0; } //------------------------------------------------------------------------- -USHORT DirReader_Impl::Read() +sal_uInt16 DirReader_Impl::Read() { if (!pDosDir) { @@ -420,7 +420,7 @@ USHORT DirReader_Impl::Read() if (!pDosDir) { - bReady = TRUE; + bReady = sal_True; return 0; } @@ -437,7 +437,7 @@ USHORT DirReader_Impl::Read() : FSYS_FLAG_NORMAL; DirEntry *pTemp = new DirEntry( ByteString(pDosEntry->d_name), eFlag, FSYS_STYLE_UNX ); if ( pParent ) - pTemp->ImpChangeParent( new DirEntry( *pParent ), FALSE); + pTemp->ImpChangeParent( new DirEntry( *pParent ), sal_False); FileStat aStat( *pTemp ); if ( ( ( ( pDir->eAttrMask & FSYS_KIND_DIR ) && ( aStat.IsKind( FSYS_KIND_DIR ) ) ) || @@ -457,7 +457,7 @@ USHORT DirReader_Impl::Read() } } else - bReady = TRUE; + bReady = sal_True; return 0; } @@ -490,7 +490,7 @@ FileStat::FileStat( const void *, const void * ): |* Letzte Aenderung MA 07.11.91 |* *************************************************************************/ -BOOL FileStat::Update( const DirEntry& rDirEntry, BOOL ) +sal_Bool FileStat::Update( const DirEntry& rDirEntry, sal_Bool ) { nSize = 0; @@ -507,7 +507,7 @@ BOOL FileStat::Update( const DirEntry& rDirEntry, BOOL ) if ( !rDirEntry.IsValid() ) { nError = FSYS_ERR_NOTEXISTS; - return FALSE; + return sal_False; } // Sonderbehandlung falls es sich um eine Root handelt @@ -515,7 +515,7 @@ BOOL FileStat::Update( const DirEntry& rDirEntry, BOOL ) { nKindFlags = FSYS_KIND_DIR; nError = FSYS_ERR_OK; - return TRUE; + return sal_True; } struct stat aStat; @@ -536,11 +536,11 @@ BOOL FileStat::Update( const DirEntry& rDirEntry, BOOL ) { nKindFlags = FSYS_KIND_WILD; nError = FSYS_ERR_OK; - return TRUE; + return sal_True; } nError = FSYS_ERR_NOTEXISTS; - return FALSE; + return sal_False; } nError = FSYS_ERR_OK; @@ -562,7 +562,7 @@ BOOL FileStat::Update( const DirEntry& rDirEntry, BOOL ) Unx2DateAndTime( aStat.st_mtime, aTimeModified, aDateModified ); Unx2DateAndTime( aStat.st_atime, aTimeAccessed, aDateAccessed ); - return TRUE; + return sal_True; } //==================================================================== @@ -654,7 +654,7 @@ ErrCode FileStat::QueryDiskSpace( const String &, BigInt &, BigInt & ) //========================================================================= -void FSysEnableSysErrorBox( BOOL ) +void FSysEnableSysErrorBox( sal_Bool ) { } |