diff th_string.h @ 616:594f197f7005

Slight improvements to the almost non-existing Doxygen documentation.
author Matti Hamalainen <ccr@tnsp.org>
date Fri, 17 Jan 2020 03:18:40 +0200
parents 31720ede4b50
children a3d5ddbb6f16
line wrap: on
line diff
--- a/th_string.h	Fri Jan 17 00:01:55 2020 +0200
+++ b/th_string.h	Fri Jan 17 03:18:40 2020 +0200
@@ -42,17 +42,19 @@
 #define th_toupper(c)   toupper((int)(unsigned char) c)
 
 
-/** @def String trimming option flags for th_strdup_trim()
+/** @brief
+ * String trimming option flags for th_strdup_trim()
  */
 enum
 {
-    TH_TRIM_START    = 1,
-    TH_TRIM_END      = 2,
-    TH_TRIM_BOTH     = 3
+    TH_TRIM_START    = 1,  ///< Trim whitespace from start of the string
+    TH_TRIM_END      = 2,  ///< Trim whitespace from end of the string
+    TH_TRIM_BOTH     = 3,  ///< Trim whitespace from start and end of the string
 };
 
 
-/** @def Internal *printf() implementation flags
+/** @brief
+ * Internal *printf() implementation flags
  */
 enum
 {
@@ -72,18 +74,25 @@
 };
 
 
-/** @def Internal *printf() context structure
+/** @struct th_vprintf_ctx
+ * Internal printf() implementation context structure, contains state information
+ * used by the printf() code for "output" purposes.
  */
 typedef struct
 {
     char *buf;           ///< Resulting string buffer pointer (might not be used if printing to file or such)
-    size_t size, pos;    ///< Size of result string buffer, and current position in it
+    size_t size;         ///< Size of result string buffer
+    size_t pos;          ///< Current position in the buffer
     int ipos;            ///< Signed position
     void *data;          ///< Pointer to other data (for example a FILE pointer)
 } th_vprintf_ctx;
 
 
-/** @def putch() helper function typedef for internal printf() implementation
+/** @brief
+ * A putch() helper function typedef for internal printf() implementation
+ * @param[in,out] ctx pointer to internal printf() state context structure.
+ * @param[in] ch character to be outputted
+ * @returns the character @p ch cast to int or @c EOF in case of error
  */
 typedef int (*th_vprintf_putch)(th_vprintf_ctx *ctx, const char ch);