diff options
Diffstat (limited to 'ace/Dirent.inl')
-rw-r--r-- | ace/Dirent.inl | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/ace/Dirent.inl b/ace/Dirent.inl index 0a8f0b9e6e4..c75c79fd320 100644 --- a/ace/Dirent.inl +++ b/ace/Dirent.inl @@ -1,18 +1,15 @@ -// -*- C++ -*- -// +/* -*- C++ -*- */ // $Id$ #include "ace/Log_Msg.h" -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - ACE_INLINE int -ACE_Dirent::open (const ACE_TCHAR *dirname) +ACE_Dirent::open (const ACE_TCHAR *dirname) { // If the directory stream is already open, close it to prevent // possible resource leaks. - if (this->dirp_ != 0) + if (this->dirp_ != 0) { ACE_OS::closedir (this->dirp_); this->dirp_ = 0; @@ -26,38 +23,38 @@ ACE_Dirent::open (const ACE_TCHAR *dirname) return 0; } -ACE_INLINE +ACE_INLINE ACE_Dirent::ACE_Dirent (void) : dirp_ (0) { } -ACE_INLINE -ACE_Dirent::ACE_Dirent (const ACE_TCHAR *dirname) +ACE_INLINE +ACE_Dirent::ACE_Dirent (const ACE_TCHAR *dirname) : dirp_ (0) { if (this->open (dirname) == -1) ACE_ERROR ((LM_ERROR, - ACE_LIB_TEXT ("%p\n"), + ACE_LIB_TEXT ("%p\n"), ACE_LIB_TEXT ("ACE_Dirent::ACE_Dirent"))); } -ACE_INLINE +ACE_INLINE ACE_Dirent::~ACE_Dirent (void) { if (this->dirp_ != 0) ACE_OS::closedir (this->dirp_); } -ACE_INLINE ACE_DIRENT * +ACE_INLINE dirent * ACE_Dirent::read (void) { return this->dirp_ ? ACE_OS::readdir (this->dirp_) : 0; } ACE_INLINE int -ACE_Dirent::read (struct ACE_DIRENT *entry, - struct ACE_DIRENT **result) +ACE_Dirent::read (struct dirent *entry, + struct dirent **result) { return this->dirp_ ? ACE_OS::readdir_r (this->dirp_, entry, result) @@ -67,7 +64,7 @@ ACE_Dirent::read (struct ACE_DIRENT *entry, ACE_INLINE void ACE_Dirent::close (void) { - if (this->dirp_ != 0) + if (this->dirp_ != 0) { ACE_OS::closedir (this->dirp_); @@ -96,4 +93,3 @@ ACE_Dirent::tell (void) return this->dirp_ ? ACE_OS::telldir (this->dirp_) : 0; } -ACE_END_VERSIONED_NAMESPACE_DECL |