Commit 759b2e01 authored by skaller's avatar skaller

Fix comments to conform to style guide.

parent 9dab56c1
...@@ -78,6 +78,8 @@ ...@@ -78,6 +78,8 @@
typedef char check_msg_t_size typedef char check_msg_t_size
[sizeof (zmq::msg_t) == sizeof (zmq_msg_t) ? 1 : -1]; [sizeof (zmq::msg_t) == sizeof (zmq_msg_t) ? 1 : -1];
// Version.
void zmq_version (int *major_, int *minor_, int *patch_) void zmq_version (int *major_, int *minor_, int *patch_)
{ {
*major_ = ZMQ_VERSION_MAJOR; *major_ = ZMQ_VERSION_MAJOR;
...@@ -85,11 +87,20 @@ void zmq_version (int *major_, int *minor_, int *patch_) ...@@ -85,11 +87,20 @@ void zmq_version (int *major_, int *minor_, int *patch_)
*patch_ = ZMQ_VERSION_PATCH; *patch_ = ZMQ_VERSION_PATCH;
} }
// Errors.
const char *zmq_strerror (int errnum_) const char *zmq_strerror (int errnum_)
{ {
return zmq::errno_to_string (errnum_); return zmq::errno_to_string (errnum_);
} }
int zmq_errno ()
{
return errno;
}
// Contexts.
static zmq::ctx_t *inner_init (int io_threads_) static zmq::ctx_t *inner_init (int io_threads_)
{ {
if (io_threads_ < 0) { if (io_threads_ < 0) {
...@@ -180,6 +191,8 @@ int zmq_term (void *ctx_) ...@@ -180,6 +191,8 @@ int zmq_term (void *ctx_)
return rc; return rc;
} }
// Sockets.
void *zmq_socket (void *ctx_, int type_) void *zmq_socket (void *ctx_, int type_)
{ {
if (!ctx_ || !((zmq::ctx_t*) ctx_)->check_tag ()) { if (!ctx_ || !((zmq::ctx_t*) ctx_)->check_tag ()) {
...@@ -255,7 +268,8 @@ int zmq_connect (void *s_, const char *addr_) ...@@ -255,7 +268,8 @@ int zmq_connect (void *s_, const char *addr_)
return result; return result;
} }
// sending functions // Sending functions.
static int inner_sendmsg (zmq::socket_base_t *s_, zmq_msg_t *msg_, int flags_) static int inner_sendmsg (zmq::socket_base_t *s_, zmq_msg_t *msg_, int flags_)
{ {
int sz = (int) zmq_msg_size (msg_); int sz = (int) zmq_msg_size (msg_);
...@@ -303,7 +317,8 @@ int zmq_send (void *s_, const void *buf_, size_t len_, int flags_) ...@@ -303,7 +317,8 @@ int zmq_send (void *s_, const void *buf_, size_t len_, int flags_)
return rc; return rc;
} }
// receiving functions // Receiving functions.
static int inner_recvmsg (zmq::socket_base_t *s_, zmq_msg_t *msg_, int flags_) static int inner_recvmsg (zmq::socket_base_t *s_, zmq_msg_t *msg_, int flags_)
{ {
int rc = s_->recv ((zmq::msg_t*) msg_, flags_); int rc = s_->recv ((zmq::msg_t*) msg_, flags_);
...@@ -359,7 +374,8 @@ int zmq_recv (void *s_, void *buf_, size_t len_, int flags_) ...@@ -359,7 +374,8 @@ int zmq_recv (void *s_, void *buf_, size_t len_, int flags_)
return nbytes; return nbytes;
} }
// message manipulators // Message manipulators.
int zmq_msg_init (zmq_msg_t *msg_) int zmq_msg_init (zmq_msg_t *msg_)
{ {
return ((zmq::msg_t*) msg_)->init (); return ((zmq::msg_t*) msg_)->init ();
...@@ -420,6 +436,8 @@ int zmq_getmsgopt (zmq_msg_t *msg_, int option_, void *optval_, ...@@ -420,6 +436,8 @@ int zmq_getmsgopt (zmq_msg_t *msg_, int option_, void *optval_,
} }
} }
// Polling.
int zmq_poll (zmq_pollitem_t *items_, int nitems_, long timeout_) int zmq_poll (zmq_pollitem_t *items_, int nitems_, long timeout_)
{ {
#if defined ZMQ_POLL_BASED_ON_POLL #if defined ZMQ_POLL_BASED_ON_POLL
...@@ -772,11 +790,6 @@ int zmq_poll (zmq_pollitem_t *items_, int nitems_, long timeout_) ...@@ -772,11 +790,6 @@ int zmq_poll (zmq_pollitem_t *items_, int nitems_, long timeout_)
#endif #endif
} }
int zmq_errno ()
{
return errno;
}
#if defined ZMQ_POLL_BASED_ON_SELECT #if defined ZMQ_POLL_BASED_ON_SELECT
#undef ZMQ_POLL_BASED_ON_SELECT #undef ZMQ_POLL_BASED_ON_SELECT
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment