diff options
author | maximius <none@none> | 2009-10-17 15:35:07 -0700 |
---|---|---|
committer | maximius <none@none> | 2009-10-17 15:35:07 -0700 |
commit | 26b5e033ffde3d161382fc9addbfa99738379641 (patch) | |
tree | a344f369ca32945f787a02dee35c3dbe342bed7e /dep/ACE_wrappers/ace/FILE.cpp | |
parent | f21f47005dcb6b76e1abc9f35fbcd03eed191bff (diff) |
*Massive cleanup (\n\n -> \n, *\n -> \n, cleanup for(...) to for (...), and some other cleanups by hand)
*Fix a possible crash in Spell::DoAllEffectOnTarget
--HG--
branch : trunk
Diffstat (limited to 'dep/ACE_wrappers/ace/FILE.cpp')
-rw-r--r-- | dep/ACE_wrappers/ace/FILE.cpp | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/dep/ACE_wrappers/ace/FILE.cpp b/dep/ACE_wrappers/ace/FILE.cpp index 50b6342bc89..3f4c02b6dcf 100644 --- a/dep/ACE_wrappers/ace/FILE.cpp +++ b/dep/ACE_wrappers/ace/FILE.cpp @@ -1,23 +1,15 @@ // $Id: FILE.cpp 80826 2008-03-04 14:51:23Z wotte $ - /* Defines the member functions for the base class of the ACE_IO_SAP ACE_FILE abstraction. */ - #include "ace/FILE.h" - #include "ace/OS_NS_unistd.h" #include "ace/OS_NS_sys_stat.h" - #if !defined (__ACE_INLINE__) #include "ace/FILE.inl" #endif /* __ACE_INLINE__ */ - ACE_RCSID(ace, FILE, "$Id: FILE.cpp 80826 2008-03-04 14:51:23Z wotte $") - ACE_BEGIN_VERSIONED_NAMESPACE_DECL - ACE_ALLOC_HOOK_DEFINE(ACE_FILE) - void ACE_FILE::dump (void) const { @@ -26,22 +18,17 @@ ACE_FILE::dump (void) const ACE_IO_SAP::dump (); #endif /* ACE_HAS_DUMP */ } - // This is the do-nothing constructor. - ACE_FILE::ACE_FILE (void) { ACE_TRACE ("ACE_FILE::ACE_FILE"); } - // Close the file - int ACE_FILE::close (void) { ACE_TRACE ("ACE_FILE::close"); int result = 0; - if (this->get_handle () != ACE_INVALID_HANDLE) { result = ACE_OS::close (this->get_handle ()); @@ -49,65 +36,52 @@ ACE_FILE::close (void) } return result; } - int ACE_FILE::get_info (ACE_FILE_Info *finfo) { ACE_TRACE ("ACE_FILE::get_info"); ACE_stat filestatus; - int const result = ACE_OS::fstat (this->get_handle (), &filestatus); - if (result == 0) { finfo->mode_ = filestatus.st_mode; finfo->nlink_ = filestatus.st_nlink; finfo->size_ = filestatus.st_size; } - return result; } - int ACE_FILE::get_info (ACE_FILE_Info &finfo) { ACE_TRACE ("ACE_FILE::get_info"); - return this->get_info (&finfo); } - int ACE_FILE::truncate (ACE_OFF_T length) { ACE_TRACE ("ACE_FILE::truncate"); return ACE_OS::ftruncate (this->get_handle (), length); } - ACE_OFF_T ACE_FILE::seek (ACE_OFF_T offset, int startpos) { return ACE_OS::lseek (this->get_handle (), offset, startpos); } - ACE_OFF_T ACE_FILE::tell (void) { ACE_TRACE ("ACE_FILE::tell"); return ACE_OS::lseek (this->get_handle (), 0, SEEK_CUR); } - // Return the local endpoint address. - int ACE_FILE::get_local_addr (ACE_Addr &addr) const { ACE_TRACE ("ACE_FILE::get_local_addr"); - // Perform the downcast since <addr> had better be an // <ACE_FILE_Addr>. ACE_FILE_Addr *file_addr = dynamic_cast<ACE_FILE_Addr *> (&addr); - if (file_addr == 0) return -1; else @@ -116,33 +90,25 @@ ACE_FILE::get_local_addr (ACE_Addr &addr) const return 0; } } - // Return the same result as <get_local_addr>. - int ACE_FILE::get_remote_addr (ACE_Addr &addr) const { ACE_TRACE ("ACE_FILE::get_remote_addr"); - return this->get_local_addr (addr); } - int ACE_FILE::remove (void) { ACE_TRACE ("ACE_FILE::remove"); - this->close (); return ACE_OS::unlink (this->addr_.get_path_name ()); } - int ACE_FILE::unlink (void) { ACE_TRACE ("ACE_FILE::unlink"); - return ACE_OS::unlink (this->addr_.get_path_name ()); } - ACE_END_VERSIONED_NAMESPACE_DECL |