From e99a863631254c1de750f82a731fc512537ddfdc Mon Sep 17 00:00:00 2001 From: Christos Houtouridis Date: Thu, 10 Oct 2019 20:38:13 +0300 Subject: [PATCH] Small doxygen related changes --- src/client.c | 4 ++-- src/core.c | 42 +++++++++++++++++++++--------------------- src/msg_impl.h | 18 +++++++++--------- 3 files changed, 32 insertions(+), 32 deletions(-) diff --git a/src/client.c b/src/client.c index 7027d93..591ef68 100644 --- a/src/client.c +++ b/src/client.c @@ -261,7 +261,7 @@ static void client (void) { } /*! - * pthread wrapper for \sa seeker() + * pthread wrapper for seeker() * @param ptr */ void* pthSeeker (void* ptr) { @@ -274,7 +274,7 @@ void* pthSeeker (void* ptr) { } /*! - * pthread wrapper for \sa client() + * pthread wrapper for client() * @param ptr */ void* pthClient (void* ptr) { diff --git a/src/core.c b/src/core.c index ff04d28..e3f86fb 100644 --- a/src/core.c +++ b/src/core.c @@ -38,8 +38,9 @@ static pthread_mutex_t lock_stats; //!< mutex for stats locking * in_addr_t to devAEM_t conversion utility function * @param in_addr Internet address (host byte order) * @return devAEM_t representation of the address - * @example - * @code{.c} + * @note + * for example: + * @code * devAEM_t dev = addr2devAEM (ntohl(clntAddr.sin_addr.s_addr)); * @endcode */ @@ -51,8 +52,9 @@ devAEM_t addr2devAEM (in_addr_t in_addr) { * devAEM_t to in_addr_t conversion utility function * @param dev devAEM_t address * @return Internet address (host byte order) - * @example - * @code{.c} + * @note + * for example: + * @code * sockaddr_in_t srvAddr; * srvAddr.sin_addr.s_addr = htonl (devAEM2addr (dev)); * @endcode @@ -121,7 +123,7 @@ status_t log_init (void) { * Logs incoming messages * @param msg Pointer to msg to log * @note - * This function depends on \sa settings.outLevel + * This function depends on settings.outLevel */ void log_msg_in (msg_t* msg) { if (settings.outLevel >= OUTLEVEL_1) { @@ -143,7 +145,7 @@ void log_msg_in (msg_t* msg) { * @param msg Pointer to msg to log * @param dev device that accepts the message * @note - * This function depends on \sa settings.outLevel + * This function depends on settings.outLevel */ void log_msg_out (msg_t* msg, devAEM_t dev) { if (settings.outLevel >= OUTLEVEL_1) { @@ -164,7 +166,7 @@ void log_msg_out (msg_t* msg, devAEM_t dev) { * Logs new messages * @param msg Pointer to msg to log * @note - * This function depends on \sa settings.outLevel + * This function depends on settings.outLevel */ void log_msg_new (msg_t* msg) { if (settings.outLevel >= OUTLEVEL_1) { @@ -389,7 +391,7 @@ status_t devList_init (devList_t* devList) { } /*! - * Returns an iterator for \sa devList AND \sa msg_t.recipients + * Returns an iterator for devList AND msg_t.recipients * @param dev The device to search * @return The iterator, namely the index to devList array in which is the \p dev */ @@ -464,27 +466,26 @@ mIter_t msgList_preInc (mIter_t* it) { * @return The iterator values */ mIter_t msgList_preDec (mIter_t* it) { - if (--*it < 0) *it = MSG_LIST_SIZE; + if (--*it < 0) *it = MSG_LIST_SIZE-1; return *it; } /*! * @param this Pointer to msgList to use - * @return An iterator to the first message of \sa MSG_LIST_SIZE + * @return An iterator to the first message of MSG_LIST_SIZE * of msgList.m[] * @note * As the msgList is a ring buffer we can not have a sensible end() iterator. - * end() will eventually merge with begin() when the size reaches \sa MSG_LIST_SIZE + * end() will eventually merge with begin() when the size reaches MSG_LIST_SIZE * For that reason in all of our loops through msgList we shall take a begin() - * iterator and loop using size as sentinel - * @example - * @code{.c} + * iterator and loop using size as sentinel for example: + * @code * mIter_t it = msgList_begin (&msgList); // get a message iterator * size_t size= msgList_size(&msgList); // get current msgList size * for (size_t i=0 ; ifirst; @@ -492,7 +493,7 @@ mIter_t msgList_begin (msgList_t* this) { /*! * @param this Pointer to msgList to use - * @return An iterator to the last inserted message of \sa MSG_LIST_SIZE + * @return An iterator to the last inserted message of MSG_LIST_SIZE * of msgList.m[] */ mIter_t msgList_last (msgList_t* this) { @@ -504,17 +505,16 @@ mIter_t msgList_last (msgList_t* this) { * @return The current used slots of msgList * @note * As the msgList is a ring buffer we can not have a sensible end() iterator. - * end() will eventually merge with begin() when the size reaches \sa MSG_LIST_SIZE + * end() will eventually merge with begin() when the size reaches MSG_LIST_SIZE * For that reason in all of our loops through msgList we shall take a begin() * iterator and loop using size as sentinel - * @example - * @code{.c} + * @code * mIter_t it = msgList_begin (&msgList); // get a message iterator * size_t size= msgList_size(&msgList); // get current msgList size * for (size_t i=0 ; isize; @@ -574,7 +574,7 @@ void msgList_release () { pthread_mutex_unlock (&lock_msgList); } /*! * Initialize statistics - * @param s Pointer to \sa stat_t struct to initialize + * @param s Pointer to stat_t struct to initialize * @return The status of the operation */ status_t stats_init (stats_t* s) { diff --git a/src/msg_impl.h b/src/msg_impl.h index 4b11229..8895cd6 100644 --- a/src/msg_impl.h +++ b/src/msg_impl.h @@ -151,16 +151,16 @@ typedef iter_t dIter_t; //!< device list iterator type * * Layout example: * - * msgList.m - * dev1 dev2 dev3 ... - * [ 0 ] [ ] [x] [ ] <-- x marks "message has been send" - * | [ 1 ] [x] [x] [ ] <-- x marks "message has been send" - * time | [ 2 ] - * [*1] | [ 3 ] ... - * \|/ - * ... + * msgList.m + * dev1 dev2 dev3 ... + * [ 0 ] [ ] [x] [ ] <-- x marks "message has been send" + * | [ 1 ] [x] [x] [ ] <-- x marks "message has been send" + * time | [ 2 ] + * [*1] | [ 3 ] ... + * \|/ + * ... * - * [MAX] + * [MAX] * * [*1]: msgList is actually implemented as a ring buffer so in that * content, "time is a loop".