# HG changeset patch # User Matti Hamalainen # Date 1494756810 -10800 # Node ID 6245c825268b32d9f8933547ee7551a35c8328ef # Parent 96810a91eeb35d197a1999d29e05e0e7c3ba3fa0 More Doxygenization. diff -r 96810a91eeb3 -r 6245c825268b th_string.h --- a/th_string.h Wed May 10 21:01:27 2017 +0300 +++ b/th_string.h Sun May 14 13:13:30 2017 +0300 @@ -5,6 +5,8 @@ * * Please read file 'COPYING' for information on license and distribution. */ +/// @file +/// @brief String utility functions #ifndef TH_STRING_H #define TH_STRING_H @@ -17,7 +19,7 @@ extern "C" { #endif -/* Macros +/** @def String utility wrapper macros */ #define th_isalnum(c) isalnum((int)(unsigned char) c) #define th_isalpha(c) isalpha((int)(unsigned char) c) @@ -40,6 +42,8 @@ #define th_toupper(c) toupper((int)(unsigned char) c) +/** @def String trimming option flags for th_strdup_trim() + */ enum { TH_TRIM_START = 1, @@ -48,6 +52,8 @@ }; +/** @def Internal *printf() implementation flags + */ enum { TH_PF_NONE = 0x0000, @@ -66,15 +72,19 @@ }; +/** @def Internal *printf() context structure + */ typedef struct { - char *buf; - size_t size, pos; - int ipos; - void *data; + char *buf; ///< Resulting string buffer pointer (may not be used if printing to file or so) + size_t size, pos; ///< Size of result string buffer, and current position in it + int ipos; ///< Signed position + void *data; ///< Other data (for example FILE pointer) } th_vprintf_ctx; +/** @def putch() helper function typedef for pnternal printf() implementation + */ typedef int (*th_vprintf_putch)(th_vprintf_ctx *ctx, const char ch);