[openrtm-commit:02258] r2865 - in branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil: ace/coil common win32/coil
openrtm @ openrtm.org
openrtm @ openrtm.org
2017年 1月 18日 (水) 16:36:47 JST
Author: sec_fukai
Date: 2017-01-18 16:36:47 +0900 (Wed, 18 Jan 2017)
New Revision: 2865
Modified:
branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/ace/coil/Condition.h
branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/ace/coil/Mutex.h
branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/ace/coil/Signal.h
branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/ace/coil/Task.h
branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/ace/coil/Time.h
branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/ace/coil/UUID.h
branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/ace/coil/atomic.h
branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/common/Logger.h
branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/win32/coil/Condition.h
branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/win32/coil/DynamicLib.h
branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/win32/coil/File.h
branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/win32/coil/Mutex.h
branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/win32/coil/OS.h
branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/win32/coil/Routing.h
branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/win32/coil/Signal.h
branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/win32/coil/Time.h
Log:
[compat,->DEV_IQ_2016]Delete extra spaces. refs #3809
Modified: branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/ace/coil/Condition.h
===================================================================
--- branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/ace/coil/Condition.h 2017-01-18 07:25:30 UTC (rev 2864)
+++ branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/ace/coil/Condition.h 2017-01-18 07:36:47 UTC (rev 2865)
@@ -22,13 +22,13 @@
#include <coil/config_coil.h>
#if defined (WIN32)
-#pragma warning( disable : 4244 )
-#pragma warning( disable : 4312 )
+#pragma warning( disable : 4244 )
+#pragma warning( disable : 4312 )
#endif
#include <ace/OS_NS_Thread.h>
#if defined (WIN32)
-#pragma warning( default : 4244 )
-#pragma warning( default : 4312 )
+#pragma warning( default : 4244 )
+#pragma warning( default : 4312 )
#endif
#include <coil/TimeValue.h>
#include <coil/Time.h>
Modified: branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/ace/coil/Mutex.h
===================================================================
--- branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/ace/coil/Mutex.h 2017-01-18 07:25:30 UTC (rev 2864)
+++ branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/ace/coil/Mutex.h 2017-01-18 07:36:47 UTC (rev 2865)
@@ -22,13 +22,13 @@
#include <coil/config_coil.h>
#if defined (WIN32)
-#pragma warning( disable : 4244 )
-#pragma warning( disable : 4312 )
+#pragma warning( disable : 4244 )
+#pragma warning( disable : 4312 )
#endif
#include <ace/OS_NS_Thread.h>
#if defined (WIN32)
-#pragma warning( default : 4244 )
-#pragma warning( default : 4312 )
+#pragma warning( default : 4244 )
+#pragma warning( default : 4312 )
#endif
namespace coil
Modified: branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/ace/coil/Signal.h
===================================================================
--- branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/ace/coil/Signal.h 2017-01-18 07:25:30 UTC (rev 2864)
+++ branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/ace/coil/Signal.h 2017-01-18 07:36:47 UTC (rev 2865)
@@ -20,13 +20,13 @@
#ifndef COIL_SIGNAL_H
#define COIL_SIGNAL_H
#if defined (WIN32)
-#pragma warning( disable : 4244 )
-#pragma warning( disable : 4312 )
+#pragma warning( disable : 4244 )
+#pragma warning( disable : 4312 )
#endif
#include <ace/Signal.h>
#if defined (WIN32)
-#pragma warning( default : 4244 )
-#pragma warning( default : 4312 )
+#pragma warning( default : 4244 )
+#pragma warning( default : 4312 )
#endif
namespace coil
Modified: branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/ace/coil/Task.h
===================================================================
--- branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/ace/coil/Task.h 2017-01-18 07:25:30 UTC (rev 2864)
+++ branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/ace/coil/Task.h 2017-01-18 07:36:47 UTC (rev 2865)
@@ -21,13 +21,13 @@
#include <coil/config_coil.h>
#if defined (WIN32)
-#pragma warning( disable : 4244 )
-#pragma warning( disable : 4312 )
+#pragma warning( disable : 4244 )
+#pragma warning( disable : 4312 )
#endif
#include <ace/Task.h>
#if defined (WIN32)
-#pragma warning( default : 4244 )
-#pragma warning( default : 4312 )
+#pragma warning( default : 4244 )
+#pragma warning( default : 4312 )
#endif
namespace coil
{
Modified: branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/ace/coil/Time.h
===================================================================
--- branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/ace/coil/Time.h 2017-01-18 07:25:30 UTC (rev 2864)
+++ branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/ace/coil/Time.h 2017-01-18 07:36:47 UTC (rev 2865)
@@ -22,15 +22,15 @@
#include <coil/config_coil.h>
#include <coil/TimeValue.h>
#if defined (WIN32)
-#pragma warning( disable : 4244 )
-#pragma warning( disable : 4312 )
+#pragma warning( disable : 4244 )
+#pragma warning( disable : 4312 )
#endif
#include <ace/OS_NS_sys_time.h>
#include <ace/OS_NS_unistd.h>
#include <ace/OS_NS_sys_select.h>
#if defined (WIN32)
-#pragma warning( default : 4244 )
-#pragma warning( default : 4312 )
+#pragma warning( default : 4244 )
+#pragma warning( default : 4312 )
#endif
namespace coil
Modified: branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/ace/coil/UUID.h
===================================================================
--- branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/ace/coil/UUID.h 2017-01-18 07:25:30 UTC (rev 2864)
+++ branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/ace/coil/UUID.h 2017-01-18 07:36:47 UTC (rev 2865)
@@ -22,13 +22,13 @@
#include <coil/config_coil.h>
#if defined (WIN32)
-#pragma warning( disable : 4244 )
-#pragma warning( disable : 4312 )
+#pragma warning( disable : 4244 )
+#pragma warning( disable : 4312 )
#endif
#include <ace/UUID.h>
#if defined (WIN32)
-#pragma warning( default : 4244 )
-#pragma warning( default : 4312 )
+#pragma warning( default : 4244 )
+#pragma warning( default : 4312 )
#endif
namespace coil
@@ -40,7 +40,7 @@
{
public:
UUID_Generator() : ACE_Utils::UUID_Generator() {}
-#ifndef ACE_5_6_1_OR_EARLIER
+#ifndef ACE_5_6_1_OR_EARLIER
coil::UUID*
generateUUID(ACE_UINT16 version = 0x0001, u_char variant = 0x80)
{
Modified: branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/ace/coil/atomic.h
===================================================================
--- branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/ace/coil/atomic.h 2017-01-18 07:25:30 UTC (rev 2864)
+++ branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/ace/coil/atomic.h 2017-01-18 07:36:47 UTC (rev 2865)
@@ -51,5 +51,5 @@
#define atomic_exchange_add(x, y) \
exchange_add(x, y, &__mutex)
-
+
#endif // COIL_ATOMIC_H
Modified: branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/common/Logger.h
===================================================================
--- branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/common/Logger.h 2017-01-18 07:25:30 UTC (rev 2864)
+++ branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/common/Logger.h 2017-01-18 07:36:47 UTC (rev 2865)
@@ -23,9 +23,9 @@
#include <coil/Mutex.h>
#include <coil/Guard.h>
-#include <limits.h>
#include <fstream>
#include <iostream>
+#include <limits.h>
#include <string>
#include <utility>
#include <vector>
Modified: branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/win32/coil/Condition.h
===================================================================
--- branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/win32/coil/Condition.h 2017-01-18 07:25:30 UTC (rev 2864)
+++ branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/win32/coil/Condition.h 2017-01-18 07:36:47 UTC (rev 2865)
@@ -32,26 +32,26 @@
{
// Number of waiting threads.
int waiters_count_;
-
+
// Serialize access to <waiters_count_>.
coil::Mutex waiters_count_lock_;
// Semaphore used to queue up threads waiting for the condition to
- // become signaled.
+ // become signaled.
HANDLE sema_;
-
+
// An auto-reset event used by the broadcast/signal thread to wait
// for all the waiting thread(s) to wake up and be released from the
- // semaphore.
+ // semaphore.
HANDLE waiters_done_;
-
+
// Keeps track of whether we were broadcasting or signaling. This
// allows us to optimize the code if we're just signaling.
size_t was_broadcast_;
} pthread_cond_t;
-
+
static int pthread_cond_init (pthread_cond_t *cv)
{
cv->waiters_count_ = 0;
@@ -59,7 +59,7 @@
cv->sema_ = ::CreateSemaphore (NULL, // no security
0, // initially 0
0x7fffffff, // max count
- NULL); // unnamed
+ NULL); // unnamed
cv->waiters_done_ = ::CreateEvent (NULL, // no security
FALSE, // auto-reset
FALSE, // non-signaled initially
@@ -239,7 +239,7 @@
*
* @endif
*/
- int pthread_cond_wait (coil::pthread_cond_t *cv,
+ int pthread_cond_wait (coil::pthread_cond_t *cv,
coil::Mutex *external_mutex, DWORD aMilliSecond)
{
DWORD result;
@@ -248,13 +248,13 @@
cv->waiters_count_lock_.lock();
cv->waiters_count_++;
cv->waiters_count_lock_.unlock();
-
+
// This call atomically releases the mutex and waits on the
// semaphore until <pthread_cond_signal> or <pthread_cond_broadcast>
// are called by another thread.
-// std::cout << "Before SignalObjectAndWait [wait with time(" << milliSecond
-// << ")]" << std::endl << std::flush ;
- result = SignalObjectAndWait (external_mutex->mutex_,
+// std::cout << "Before SignalObjectAndWait [wait with time(" << milliSecond
+// << ")]" << std::endl << std::flush ;
+ result = SignalObjectAndWait (external_mutex->mutex_,
cv->sema_, aMilliSecond, FALSE);
// char * p;
@@ -272,35 +272,35 @@
// p = "Other !?";
// break;
// }
-// std::cout << "After SignalObjectAndWait [wait with time("
-// << milliSecond << ")]"
+// std::cout << "After SignalObjectAndWait [wait with time("
+// << milliSecond << ")]"
// << " result(" << result << ":" << p << ")"
-// << std::endl << std::flush ;
+// << std::endl << std::flush ;
// Reacquire lock to avoid race conditions.
cv->waiters_count_lock_.lock();
-
+
// We're no longer waiting...
cv->waiters_count_--;
-
+
// Check to see if we're the last waiter after <pthread_cond_broadcast>.
int last_waiter = cv->was_broadcast_ && cv->waiters_count_ == 0;
cv->waiters_count_lock_.unlock();
-
+
// If we're the last waiter thread during this particular broadcast
// then let all the other threads proceed.
if (last_waiter) {
// This call atomically signals the <waiters_done_> event and
// waits until it can acquire the <external_mutex>. This is
// required to ensure fairness.
- DWORD result = SignalObjectAndWait (cv->waiters_done_,
- external_mutex->mutex_,
+ DWORD result = SignalObjectAndWait (cv->waiters_done_,
+ external_mutex->mutex_,
INFINITE, FALSE);
// std::cout << "result " << result << std::endl;
} else {
// Always regain the external mutex since that's the guarantee we
- // give to our callers.
+ // give to our callers.
::WaitForSingleObject (external_mutex->mutex_, 0);
}
return result;
@@ -330,12 +330,12 @@
cv->waiters_count_lock_.lock();
int have_waiters = cv->waiters_count_ > 0;
cv->waiters_count_lock_.unlock();
-
- // If there aren't any waiters, then this is a no-op.
+
+ // If there aren't any waiters, then this is a no-op.
if (have_waiters)
-// std::cout << "Before ReleaseSemaphore(1)" << std::endl << std::flush ;
+// std::cout << "Before ReleaseSemaphore(1)" << std::endl << std::flush ;
ReleaseSemaphore (cv->sema_, 1, 0);
-// std::cout << "After ReleaseSemaphore(1)" << std::endl << std::flush ;
+// std::cout << "After ReleaseSemaphore(1)" << std::endl << std::flush ;
return 0;
}
@@ -364,7 +364,7 @@
// consistent relative to each other.
cv->waiters_count_lock_.lock();
int have_waiters = 0;
-
+
if (cv->waiters_count_ > 0)
{
// We are broadcasting, even if there is just one waiter...
@@ -373,22 +373,22 @@
cv->was_broadcast_ = 1;
have_waiters = 1;
}
-
+
if (have_waiters)
{
// Wake up all the waiters atomically.
-// std::cout << "Before ReleaseSemaphore(" << cv->waiters_count_ << ")"
-// << std::endl << std::flush ;
+// std::cout << "Before ReleaseSemaphore(" << cv->waiters_count_ << ")"
+// << std::endl << std::flush ;
ReleaseSemaphore (cv->sema_, cv->waiters_count_, 0);
-// std::cout << "After ReleaseSemaphore(" << cv->waiters_count_ << ")"
-// << std::endl << std::flush ;
-
+// std::cout << "After ReleaseSemaphore(" << cv->waiters_count_ << ")"
+// << std::endl << std::flush ;
+
cv->waiters_count_lock_.unlock();
// Wait for all the awakened threads to acquire the counting
- // semaphore.
+ // semaphore.
WaitForSingleObject (cv->waiters_done_, INFINITE);
- // This assignment is okay, even without the <waiters_count_lock_> held
+ // This assignment is okay, even without the <waiters_count_lock_> held
// because no other waiter threads can wake up to access it.
cv->was_broadcast_ = 0;
}
Modified: branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/win32/coil/DynamicLib.h
===================================================================
--- branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/win32/coil/DynamicLib.h 2017-01-18 07:25:30 UTC (rev 2864)
+++ branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/win32/coil/DynamicLib.h 2017-01-18 07:36:47 UTC (rev 2865)
@@ -186,7 +186,7 @@
*
* @else
*
- * @brief Load of the Dynamic link library
+ * @brief Load of the Dynamic link library
*
* Load of the Dynamic link library.
*
@@ -213,7 +213,7 @@
*
* @else
*
- * @brief Unload of the Dynamic link library
+ * @brief Unload of the Dynamic link library
*
* Unload of the Dynamic link library.
*
@@ -288,9 +288,9 @@
*
* @endif
*/
- static int ForExternTest(void) {
+ static int ForExternTest(void) {
std::cout << "ForExternTest" << std::endl;
- return 0xdeadbeef;
+ return 0xdeadbeef;
}
Modified: branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/win32/coil/File.h
===================================================================
--- branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/win32/coil/File.h 2017-01-18 07:25:30 UTC (rev 2864)
+++ branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/win32/coil/File.h 2017-01-18 07:36:47 UTC (rev 2865)
@@ -86,7 +86,7 @@
dir_name = return_dirname;
}
}
- else
+ else
{
*(p+1) = '\0';
dir_name = return_dirname;
@@ -173,7 +173,7 @@
typedef unsigned int ino_t;
-
+
/*!
* @if jp
*
@@ -247,11 +247,11 @@
if (pos == std::string::npos)
{
path.push_back('\\'); // delim = '\'
- }
+ }
else
{
path.push_back('/'); // delim = '/'
- }
+ }
}
path.push_back('*'); // now path is "/dir/dir/../*"
@@ -319,7 +319,7 @@
strcpy_s(dir->entry.d_name, _MAX_PATH, dir->fd->cFileName);
dir->has_next = FindNextFileA(dir->h, dir->fd);
-
+
return &dir->entry;
}
@@ -388,7 +388,7 @@
*/
inline coil::vstring filelist(const char* path, const char* glob_str = "")
{
- struct dirent* ent;
+ struct dirent* ent;
coil::vstring flist;
bool has_glob(false);
@@ -397,7 +397,7 @@
DIR* dir_ptr(coil::opendir(path));
if (dir_ptr == 0) { return flist; }
-
+
while ((ent = coil::readdir(dir_ptr)) != 0)
{
bool match(true);
@@ -439,10 +439,10 @@
{
if (fname[i] != *globc) { match = false; }
}
-
+
// in the last fname character, if glob is not end,
// or *, fname is not matched.
- if (i + 1 == fname.size() &&
+ if (i + 1 == fname.size() &&
globc[1] != '\0' && globc[1] != '*') { match = false; }
}
}
Modified: branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/win32/coil/Mutex.h
===================================================================
--- branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/win32/coil/Mutex.h 2017-01-18 07:25:30 UTC (rev 2864)
+++ branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/win32/coil/Mutex.h 2017-01-18 07:36:47 UTC (rev 2865)
@@ -25,7 +25,7 @@
namespace coil
{
typedef HANDLE pthread_mutex_t;
-
+
/*!
* @if jp
*
@@ -64,7 +64,7 @@
explicit Mutex(const char * const name = 0)
{
SECURITY_DESCRIPTOR sd_buffer;
- ::InitializeSecurityDescriptor(&sd_buffer,
+ ::InitializeSecurityDescriptor(&sd_buffer,
SECURITY_DESCRIPTOR_REVISION);
::SetSecurityDescriptorDacl (&sd_buffer, TRUE, 0, FALSE);
m_Security_attr.nLength = sizeof(SECURITY_ATTRIBUTES);
@@ -92,7 +92,7 @@
*/
~Mutex()
{
- ::CloseHandle(mutex_);
+ ::CloseHandle(mutex_);
}
/*!
@@ -167,7 +167,7 @@
::ReleaseMutex(mutex_);
}
HANDLE mutex_;
-
+
private:
SECURITY_ATTRIBUTES m_Security_attr;
Modified: branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/win32/coil/OS.h
===================================================================
--- branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/win32/coil/OS.h 2017-01-18 07:25:30 UTC (rev 2864)
+++ branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/win32/coil/OS.h 2017-01-18 07:36:47 UTC (rev 2865)
@@ -101,7 +101,7 @@
{
os = "Windows CE %d.%d";
}
-
+
sprintf(name->release, os,
static_cast<int>(version_info.dwMajorVersion),
static_cast<int>(version_info.dwMinorVersion));
@@ -235,7 +235,7 @@
#define BADCH (int)'?'
#define BADARG (int)':'
#define EMSG ""
-
+
/*!
* @if jp
*
@@ -260,12 +260,12 @@
static char *place = EMSG; /* option letter processing */
const char *oli; /* option letter list index */
char *p;
-
+
if (optreset || !*place) { /* update scanning pointer */
optreset = 0;
/* Check that the scanning reached the last element. */
if (optind >= nargc)
- {
+ {
place = EMSG;
return(-1);
}
@@ -273,18 +273,18 @@
{
/* Check that the scanning reached the last element. */
if (optind >= nargc)
- {
+ {
place = EMSG;
return(-1);
}
place = nargv[optind];
/* Check that the first character of the element is '-'. */
if (*place != '-')
- {
+ {
/* When the head of the element is not '-', */
/* Scan the next element disregarding the element. */
optind++;
-
+
}
else
{
@@ -398,7 +398,7 @@
* @endif
*/
GetOpt(int argc, char* const argv[], const char* opt, int flag)
- : m_argc(argc), m_argv(argv), m_opt(opt),
+ : m_argc(argc), m_argv(argv), m_opt(opt),
m_flag(flag), optind(1), opterr(1), optopt(0)
{
@@ -472,7 +472,7 @@
int m_flag;
};
-
+
}; // namespace coil
#endif // COIL_OS_H
Modified: branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/win32/coil/Routing.h
===================================================================
--- branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/win32/coil/Routing.h 2017-01-18 07:25:30 UTC (rev 2864)
+++ branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/win32/coil/Routing.h 2017-01-18 07:36:47 UTC (rev 2865)
@@ -21,13 +21,13 @@
#define COIL_ROUTING_H
#include <string>
-
+
namespace coil
{
/*!
* @if jp
* @brief 宛先アドレスから利用されるエンドポイントアドレスを得る
- *
+ *
* 宛先アドレスを与えると、その際に利用されるエンドポイントのアドレス
* が返される。宛先アドレス dest_addr には、IPアドレスまたはFQDNホス
* ト名を与えることができる。宛先アドレスが到
@@ -37,7 +37,7 @@
* @param dest_addr 宛先アドレスまたはホスト名
* @param dest_if 宛先と通信を行う際に使用されるインターフェース名
* @return 成功 true, 失敗 false
- *
+ *
* @else
* @brief Getting network interface name from destination address
*
Modified: branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/win32/coil/Signal.h
===================================================================
--- branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/win32/coil/Signal.h 2017-01-18 07:25:30 UTC (rev 2864)
+++ branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/win32/coil/Signal.h 2017-01-18 07:36:47 UTC (rev 2865)
@@ -32,7 +32,7 @@
typedef void (*SignalHandler)(int);
typedef struct __sigset {
unsigned int __bits[_SIG_WORDS];
- } sigset_t;
+ } sigset_t;
/*!
* @if jp
@@ -94,7 +94,7 @@
*/
SignalAction(SignalHandler handle, int signum, sigset_t *mask = 0,
int flags = 0);
-
+
/*!
* @if jp
*
Modified: branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/win32/coil/Time.h
===================================================================
--- branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/win32/coil/Time.h 2017-01-18 07:25:30 UTC (rev 2864)
+++ branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/win32/coil/Time.h 2017-01-18 07:36:47 UTC (rev 2865)
@@ -100,25 +100,26 @@
// The WSAStartup function initiates use of the Winsock DLL by a process.
ver = MAKEWORD(2, 2);
iret = ::WSAStartup(ver, &wsa);
- if ( iret != 0 )
+ if ( iret != 0 )
{
return iret;
}
- // The socket function creates a socket that is bound to
+ // The socket function creates a socket that is bound to
// a specific transport service provider.
// It is assumed AF_INET because there is no AF_UNIX for Windows.
- ssoc = ::socket(AF_INET,
- SOCK_STREAM,
+ ssoc = ::socket(AF_INET,
+ SOCK_STREAM,
0);
- if (ssoc == INVALID_SOCKET) {
- iret = ::WSAGetLastError();
- ::WSACleanup();
- return iret;
- }
+ if (ssoc == INVALID_SOCKET)
+ {
+ iret = ::WSAGetLastError();
+ ::WSACleanup();
+ return iret;
+ }
- // Initialize fd_set.
+ // Initialize fd_set.
FD_ZERO(&mask);
// Register the reading socket.
FD_SET(ssoc, &mask);
@@ -126,16 +127,16 @@
tv.tv_sec = interval.sec();
tv.tv_usec = interval.usec();
iret = ::select(static_cast<int>(ssoc+1), &mask, NULL, NULL, &tv);
- if ( iret == SOCKET_ERROR )
- {
- iret = ::WSAGetLastError();
- // The closesocket function closes an existing socket.
- ::closesocket(ssoc);
- // The WSACleanup function terminates
- // use of the Winsock 2 DLL (Ws2_32.dll).
- ::WSACleanup();
- return iret;
- }
+ if ( iret == SOCKET_ERROR )
+ {
+ iret = ::WSAGetLastError();
+ // The closesocket function closes an existing socket.
+ ::closesocket(ssoc);
+ // The WSACleanup function terminates
+ // use of the Winsock 2 DLL (Ws2_32.dll).
+ ::WSACleanup();
+ return iret;
+ }
// The closesocket function closes an existing socket.
::closesocket(ssoc);
@@ -178,35 +179,36 @@
// The WSAStartup function initiates use of the Winsock DLL by a process.
ver = MAKEWORD(2, 2);
iret = ::WSAStartup(ver, &wsa);
- if ( iret != 0 )
- {
+ if ( iret != 0 )
+ {
return iret;
- }
+ }
- // The socket function creates a socket that is
+ // The socket function creates a socket that is
// bound to a specific transport service provider.
ssoc = ::socket(AF_INET, SOCK_STREAM, 0);
- if (ssoc == INVALID_SOCKET) {
- iret = ::WSAGetLastError();
- ::WSACleanup();
- return iret;
- }
+ if (ssoc == INVALID_SOCKET)
+ {
+ iret = ::WSAGetLastError();
+ ::WSACleanup();
+ return iret;
+ }
FD_ZERO(&mask);
FD_SET(ssoc, &mask);
-
+
tv.tv_sec = usec / 1000000;
tv.tv_usec = usec % 1000000;
iret = ::select(static_cast<int>(ssoc+1), &mask, NULL, NULL, &tv);
- if ( iret == SOCKET_ERROR )
- {
- iret = ::WSAGetLastError();
- // The closesocket function closes an existing socket.
- ::closesocket(ssoc);
- // The WSACleanup function terminates
- // use of the Winsock 2 DLL (Ws2_32.dll).
- ::WSACleanup();
- return iret;
- }
+ if ( iret == SOCKET_ERROR )
+ {
+ iret = ::WSAGetLastError();
+ // The closesocket function closes an existing socket.
+ ::closesocket(ssoc);
+ // The WSACleanup function terminates
+ // use of the Winsock 2 DLL (Ws2_32.dll).
+ ::WSACleanup();
+ return iret;
+ }
// The closesocket function closes an existing socket.
::closesocket(ssoc);
// The WSACleanup function terminates use of the Winsock 2 DLL (Ws2_32.dll).
More information about the openrtm-commit
mailing list