本文整理汇总了C++中RTP_DEBUG_OUTPUT_INT函数的典型用法代码示例。如果您正苦于以下问题:C++ RTP_DEBUG_OUTPUT_INT函数的具体用法?C++ RTP_DEBUG_OUTPUT_INT怎么用?C++ RTP_DEBUG_OUTPUT_INT使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了RTP_DEBUG_OUTPUT_INT函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: rtp_wfile_setcwd
/*----------------------------------------------------------------------*
rtp_wfile_setcwd
*----------------------------------------------------------------------*/
int rtp_wfile_setcwd (unsigned short * name)
{
#if (_WIN32_WINNT) >= 0x0400
#ifdef RTP_DEBUG
int result;
/* ----------------------------------- */
/* Clear the error state by setting */
/* to 0. */
/* ----------------------------------- */
SetLastError (0);
#endif
name = _rtp_unicode_name_to_winname (name);
if (_wchdir ((const unsigned short *)name) != 0)
{
#ifdef RTP_DEBUG
result = GetLastError();
RTP_DEBUG_OUTPUT_STR("rtp_wfile_setcwd: error returned ");
RTP_DEBUG_OUTPUT_INT(result);
RTP_DEBUG_OUTPUT_STR(".\n");
#endif
return (-1);
}
return (0);
#endif
return (-1);
}
示例2: _rtp_sig_semaphore_clear
/*----------------------------------------------------------------------*
_rtp_sig_semaphore_clear
*----------------------------------------------------------------------*/
void _rtp_sig_semaphore_clear (RTP_HANDLE semHandle)
{
#ifdef LINUXTOBEIMPLEMENTED
DWORD result;
#ifdef RTP_DEBUG
int err;
/* ----------------------------------- */
/* Clear the error state by setting */
/* to 0. */
/* ----------------------------------- */
SetLastError (0);
#endif
while ((result = WaitForSingleObject((HANDLE)semHandle, 0)) == WAIT_OBJECT_0)
{
;
}
#ifdef RTP_DEBUG
if (result == WAIT_FAILED)
{
err = GetLastError();
RTP_DEBUG_OUTPUT_STR("rtp_sig_semaphore_clear: error returned ");
RTP_DEBUG_OUTPUT_INT(err);
RTP_DEBUG_OUTPUT_STR(".\n");
}
#endif
#endif
}
示例3: _rtp_sig_semaphore_wait
/*----------------------------------------------------------------------*
_rtp_sig_semaphore_wait
*----------------------------------------------------------------------*/
int _rtp_sig_semaphore_wait (RTP_HANDLE semHandle)
{
#ifdef LINUXTOBEIMPLEMENTED
#ifdef RTP_DEBUG
int err;
/* ----------------------------------- */
/* Clear the error state by setting */
/* to 0. */
/* ----------------------------------- */
SetLastError (0);
#endif
if (WaitForSingleObject((HANDLE)semHandle, INFINITE) == WAIT_FAILED)
{
#ifdef RTP_DEBUG
err = GetLastError();
RTP_DEBUG_OUTPUT_STR("rtp_sig_semaphore_wait: error returned ");
RTP_DEBUG_OUTPUT_INT(err);
RTP_DEBUG_OUTPUT_STR(".\n");
#endif
return (-1);
}
return (0);
#else
return (0);
#endif
}
示例4: rtp_net_socket_stream
/*----------------------------------------------------------------------*
rtp_net_socket_stream
*----------------------------------------------------------------------*/
int rtp_net_socket_stream (RTP_HANDLE *sockHandle)
{
int sock;
#ifdef RTP_DEBUG
int result;
/* ----------------------------------- */
/* Clear the error state by setting */
/* to 0. */
/* ----------------------------------- */
set_errno (0);
#endif
sock = socket(AF_INET, SOCK_STREAM, 0);
if (sock < 0)
{
*sockHandle = ((RTP_HANDLE)-1);
#ifdef RTP_DEBUG
result = xn_getlasterror();
RTP_DEBUG_OUTPUT_STR("rtp_net_socket_stream: error returned ");
RTP_DEBUG_OUTPUT_INT(result);
RTP_DEBUG_OUTPUT_STR(".\n");
#endif
return (-1);
}
*sockHandle = (RTP_HANDLE) sock;
return (0);
}
示例5: rtp_net_setkeepalive
/*----------------------------------------------------------------------*
rtp_net_setkeepalive
*----------------------------------------------------------------------*/
int rtp_net_setkeepalive (RTP_HANDLE sockHandle, unsigned int onBool)
{
#ifdef LINUXTOBEIMPLEMENTED
#ifdef RTP_DEBUG
int result;
/* ----------------------------------- */
/* Clear the error state by setting */
/* to 0. */
/* ----------------------------------- */
WSASetLastError (0);
#endif
if ( setsockopt((SOCKET) sockHandle, SOL_SOCKET, SO_KEEPALIVE, (char *) &onBool, sizeof (int)) == SOCKET_ERROR )
{
#ifdef RTP_DEBUG
result = WSAGetLastError();
RTP_DEBUG_OUTPUT_STR("rtp_net_setkeepalive: error returned ");
RTP_DEBUG_OUTPUT_INT(result);
RTP_DEBUG_OUTPUT_STR(".\n");
#endif
return (-1);
}
return (0);
#else
return (0);
#endif
}
示例6: rtp_net_getntoread
/*----------------------------------------------------------------------*
rtp_net_getntoread
*----------------------------------------------------------------------*/
int rtp_net_getntoread (RTP_HANDLE sockHandle, unsigned long * nToRead)
{
unsigned long arg;
#ifdef RTP_DEBUG
int result;
/* ----------------------------------- */
/* Clear the error state by setting */
/* to 0. */
/* ----------------------------------- */
set_errno (0);
#endif
if (ioctlsocket((int) sockHandle, FIONREAD, &arg) != 0)
{
#ifdef RTP_DEBUG
result = xn_getlasterror();
RTP_DEBUG_OUTPUT_STR("rtp_net_getntoread: error returned ");
RTP_DEBUG_OUTPUT_INT(result);
RTP_DEBUG_OUTPUT_STR(".\n");
#endif
return (-1);
}
*nToRead = arg;
return (0);
}
示例7: rtp_net_setblocking
/*----------------------------------------------------------------------*
rtp_net_setblocking
*----------------------------------------------------------------------*/
int rtp_net_setblocking (RTP_HANDLE sockHandle, unsigned int onBool)
{
unsigned long arg;
#ifdef RTP_DEBUG
int result;
/* ----------------------------------- */
/* Clear the error state by setting */
/* to 0. */
/* ----------------------------------- */
set_errno (0);
#endif
arg = (unsigned long)(!onBool);
if (ioctlsocket((int) sockHandle, FIONBIO, &arg) != 0)
{
#ifdef RTP_DEBUG
result = xn_getlasterror();
RTP_DEBUG_OUTPUT_STR("rtp_net_setblocking: error returned ");
RTP_DEBUG_OUTPUT_INT(result);
RTP_DEBUG_OUTPUT_STR(".\n");
#endif
return (-1);
}
return (0);
}
示例8: rtp_net_socket_datagram
/*----------------------------------------------------------------------*
rtp_net_socket_datagram
*----------------------------------------------------------------------*/
int rtp_net_socket_datagram (RTP_HANDLE *sockHandle)
{
int sock;
sock = socket(PF_INET, SOCK_DGRAM, 0);
if (sock == -1)
{
int errVal = _rtp_get_last_socket_error(sockHandle);
*sockHandle = ((RTP_HANDLE)-1);
#ifdef RTP_DEBUG
RTP_DEBUG_OUTPUT_STR("rtp_net_socket_datagram: error returned ");
RTP_DEBUG_OUTPUT_INT(errVal);
RTP_DEBUG_OUTPUT_STR(".\n");
#endif
return (-1);
}
*sockHandle = (RTP_HANDLE) sock;
rtpnetOpenSockets++;
return (0);
}
示例9: rtp_net_setmcastttl
/*----------------------------------------------------------------------*
rtp_net_setmcastttl
*----------------------------------------------------------------------*/
int rtp_net_setmcastttl(RTP_HANDLE sockHandle, int ttl)
{
#ifdef LINUXTOBEIMPLEMENTED
int result;
#ifdef RTP_DEBUG
/* ----------------------------------- */
/* Clear the error state by setting */
/* to 0. */
/* ----------------------------------- */
WSASetLastError (0);
#endif
result = setsockopt( sockHandle, IPPROTO_IP,
IP_MULTICAST_TTL, (char *) &ttl, sizeof (int));
if (result != 0)
{
#ifdef RTP_DEBUG
result = WSAGetLastError();
RTP_DEBUG_OUTPUT_STR("rtp_net_setmembership: error returned ");
RTP_DEBUG_OUTPUT_INT(result);
RTP_DEBUG_OUTPUT_STR(".\n");
#endif
return (-1);
}
return (0);
#else
return (0);
#endif
}
示例10: rtp_net_setmcastttl
/*----------------------------------------------------------------------*
rtp_net_setmcastttl
*----------------------------------------------------------------------*/
int rtp_net_setmcastttl(RTP_HANDLE sockHandle, int ttl)
{
int result;
#ifdef RTP_DEBUG
/* ----------------------------------- */
/* Clear the error state by setting */
/* to 0. */
/* ----------------------------------- */
set_errno (0);
#endif
result = setsockopt( sockHandle, IPPROTO_IP,
IP_MULTICAST_TTL, (char *) &ttl, sizeof (int));
if (result != 0)
{
#ifdef RTP_DEBUG
result = xn_getlasterror();
RTP_DEBUG_OUTPUT_STR("rtp_net_setmcastttl: error returned ");
RTP_DEBUG_OUTPUT_INT(result);
RTP_DEBUG_OUTPUT_STR(".\n");
#endif
return (-1);
}
return (0);
}
示例11: rtp_wfile_gnext
/*----------------------------------------------------------------------*
rtp_wfile_gnext
*----------------------------------------------------------------------*/
int rtp_wfile_gnext (void * dirobj)
{
#if (_WIN32_WINNT) >= 0x0400
#ifdef RTP_DEBUG
int result;
/* ----------------------------------- */
/* Clear the error state by setting */
/* to 0. */
/* ----------------------------------- */
SetLastError (0);
#endif
if (_wfindnext (((WFSOBJ *)dirobj)->handle, &(((WFSOBJ *)dirobj)->fsObject)) != 0)
{
#ifdef RTP_DEBUG
result = GetLastError();
RTP_DEBUG_OUTPUT_STR("rtp_wfile_gnext: error returned ");
RTP_DEBUG_OUTPUT_INT(result);
RTP_DEBUG_OUTPUT_STR(".\n");
#endif
return (-1);
}
return (0);
#endif
return (-1);
}
示例12: _rtp_sig_semaphore_alloc
/*----------------------------------------------------------------------*
_rtp_sig_semaphore_alloc
*----------------------------------------------------------------------*/
int _rtp_sig_semaphore_alloc (RTP_HANDLE *newSem, const char *name)
{
#ifdef LINUXTOBEIMPLEMENTED
HANDLE winSemaphore;
#ifdef RTP_DEBUG
int result;
/* ----------------------------------- */
/* Clear the error state by setting */
/* to 0. */
/* ----------------------------------- */
SetLastError (0);
#endif
if (!(winSemaphore = CreateSemaphore (NULL, 0, 10000, NULL)))
{
#ifdef RTP_DEBUG
result = GetLastError();
RTP_DEBUG_OUTPUT_STR("rtp_sig_semaphore_alloc: error returned ");
RTP_DEBUG_OUTPUT_INT(result);
RTP_DEBUG_OUTPUT_STR(".\n");
#endif
return(-1);
}
*newSem = (RTP_HANDLE)winSemaphore;
return(0);
#else
return(0);
#endif
}
示例13: rtp_net_getntoread
/*----------------------------------------------------------------------*
rtp_net_getntoread
*----------------------------------------------------------------------*/
int rtp_net_getntoread (RTP_HANDLE sockHandle, unsigned long * nToRead)
{
#ifdef LINUXTOBEIMPLEMENTED
u_long arg;
#ifdef RTP_DEBUG
int result;
/* ----------------------------------- */
/* Clear the error state by setting */
/* to 0. */
/* ----------------------------------- */
WSASetLastError (0);
#endif
if (ioctlsocket((SOCKET) sockHandle, FIONREAD, (u_long *) &arg) == SOCKET_ERROR)
{
#ifdef RTP_DEBUG
result = WSAGetLastError();
RTP_DEBUG_OUTPUT_STR("rtp_net_getntoread: error returned ");
RTP_DEBUG_OUTPUT_INT(result);
RTP_DEBUG_OUTPUT_STR(".\n");
#endif
return (-1);
}
*nToRead = arg;
return (0);
#else
return (0);
#endif
}
示例14: rtp_file_delete
/*----------------------------------------------------------------------*
rtp_file_delete
*----------------------------------------------------------------------*/
int rtp_file_delete (const char * name)
{
#ifdef RTP_DEBUG
/* ----------------------------------- */
/* Clear the error state by setting */
/* to 0. */
/* ----------------------------------- */
errno = 0;
#endif
if (unlink ((const char *)name) != 0)
{
#ifdef RTP_DEBUG
RTP_DEBUG_OUTPUT_STR("rtp_file_delete: error returned ");
RTP_DEBUG_OUTPUT_INT(errno);
RTP_DEBUG_OUTPUT_STR(".\n");
#endif
return (-1);
}
#ifdef RTP_DEBUG
RTP_DEBUG_OUTPUT_STR("rtp_file_delete: ");
RTP_DEBUG_OUTPUT_STR("...success");
RTP_DEBUG_OUTPUT_STR(".\n");
#endif
return (0);
}
示例15: rtp_wfile_pwd
/*----------------------------------------------------------------------*
rtp_wfile_pwd
*----------------------------------------------------------------------*/
int rtp_wfile_pwd (unsigned short * name, long size)
{
#if (_WIN32_WINNT) >= 0x0400
#ifdef RTP_DEBUG
int result;
/* ----------------------------------- */
/* Clear the error state by setting */
/* to 0. */
/* ----------------------------------- */
SetLastError (0);
#endif
if (_wgetcwd (name, (int)size) == NULL)
{
#ifdef RTP_DEBUG
result = GetLastError();
RTP_DEBUG_OUTPUT_STR("rtp_wfile_pwd: error returned ");
RTP_DEBUG_OUTPUT_INT(result);
RTP_DEBUG_OUTPUT_STR(".\n");
#endif
return (-1);
}
name = _rtp_unicode_winname_to_name (name);
return (0);
#endif
return (-1);
}