Mercurial > hg > th-libs
changeset 438:6245c825268b
More Doxygenization.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sun, 14 May 2017 13:13:30 +0300 |
parents | 96810a91eeb3 |
children | 9b5a6fb05565 |
files | th_string.h |
diffstat | 1 files changed, 15 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- 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);