*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
This commit is contained in:
maximius
2009-10-17 15:35:07 -07:00
parent f21f47005d
commit 26b5e033ff
2257 changed files with 750 additions and 103852 deletions
-22
View File
@@ -1,28 +1,21 @@
// $Id: FILE_Addr.cpp 80826 2008-03-04 14:51:23Z wotte $
#include "ace/FILE_Addr.h"
#include "ace/Lib_Find.h"
#include "ace/Log_Msg.h"
#include "ace/OS_NS_stdlib.h"
#include "ace/OS_NS_string.h"
#include "ace/os_include/sys/os_socket.h"
#if !defined (__ACE_INLINE__)
#include "ace/FILE_Addr.inl"
#endif /* __ACE_INLINE__ */
ACE_RCSID(ace, FILE_Addr, "$Id: FILE_Addr.cpp 80826 2008-03-04 14:51:23Z wotte $")
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
ACE_ALLOC_HOOK_DEFINE(ACE_FILE_Addr)
ACE_FILE_Addr::ACE_FILE_Addr (void)
: ACE_Addr (AF_FILE, sizeof this->filename_ / sizeof (ACE_TCHAR))
{
this->filename_[0] = '\0';
}
int
ACE_FILE_Addr::set (const ACE_FILE_Addr &sa)
{
@@ -41,12 +34,9 @@ ACE_FILE_Addr::set (const ACE_FILE_Addr &sa)
ACE_TEXT ("defaulting to current directory\n")));
this->filename_[0] = 0;
}
// Add the filename to the end
ACE_OS::strcat (this->filename_, ACE_TEXT ("ace-fileXXXXXX"));
#endif /* ACE_DEFAULT_TEMP_FILE */
if (ACE_OS::mktemp (this->filename_) == 0)
return -1;
this->base_set (AF_FILE,
@@ -55,20 +45,16 @@ ACE_FILE_Addr::set (const ACE_FILE_Addr &sa)
else
{
(void)ACE_OS::strsncpy (this->filename_, sa.filename_, sa.get_size ());
this->base_set (sa.get_type (), sa.get_size ());
}
return 0;
}
// Copy constructor.
ACE_FILE_Addr::ACE_FILE_Addr (const ACE_FILE_Addr &sa)
: ACE_Addr (AF_FILE, sizeof this->filename_)
{
this->set (sa);
}
int
ACE_FILE_Addr::set (const ACE_TCHAR *filename)
{
@@ -79,7 +65,6 @@ ACE_FILE_Addr::set (const ACE_TCHAR *filename)
sizeof this->filename_ / sizeof (ACE_TCHAR));
return 0;
}
ACE_FILE_Addr &
ACE_FILE_Addr::operator= (const ACE_FILE_Addr &sa)
{
@@ -87,35 +72,28 @@ ACE_FILE_Addr::operator= (const ACE_FILE_Addr &sa)
this->set (sa);
return *this;
}
// Create a ACE_Addr from a ACE_FILE pathname.
ACE_FILE_Addr::ACE_FILE_Addr (const ACE_TCHAR *filename)
{
this->set (filename);
}
int
ACE_FILE_Addr::addr_to_string (ACE_TCHAR *s, size_t len) const
{
ACE_OS::strsncpy (s, this->filename_, len);
return 0;
}
// Return the address.
void *
ACE_FILE_Addr::get_addr (void) const
{
return (void *)&this->filename_;
}
void
ACE_FILE_Addr::dump (void) const
{
#if defined (ACE_HAS_DUMP)
ACE_TRACE ("ACE_FILE_Addr::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("filename_ = %s"), this->filename_));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));