comparison common/strhelp.h @ 118:d6a74464430b

Fix doxygen documentation.
author Sascha Wilde <wilde@intevation.de>
date Sat, 22 Mar 2014 17:28:55 +0100
parents c602d8cfa619
children 702033705bb8
comparison
equal deleted inserted replaced
117:080660b2ce7d 118:d6a74464430b
1 #ifndef STRHELP_H 1 #ifndef STRHELP_H
2 #define STRHELP_H 2 #define STRHELP_H
3 /* @file Helper functions for c strings and memory management 3
4 * 4 /**
5 * strhelp contains terminating memory allocation functions and 5 * @file strhelp.h
6 * some conveniance functions to work with c strings or arrays 6 * @brief Helper functions for c strings and memory management
7 * of c strings. 7 * @details strhelp contains terminating memory allocation functions and
8 * some conveniance functions to work with c strings or arrays of c
9 * strings.
8 */ 10 */
11
9 void *xmalloc( size_t n ); 12 void *xmalloc( size_t n );
10 void *xrealloc( void *a, size_t n ); 13 void *xrealloc( void *a, size_t n );
11 void *xcalloc( size_t n, size_t m ); 14 void *xcalloc( size_t n, size_t m );
12 char *xstrndup( const char *string, const size_t len ); 15 char *xstrndup( const char *string, const size_t len );
13 16
14 /** 17 /**
15 * strv_length: 18 * @brief Returns the length of the given %NULL-terminated
16 * @str_array: a %NULL-terminated array of strings 19 * string array str_array.
17 * 20 * @param[in] str_array a %NULL-terminated array of strings
18 * Returns the length of the given %NULL-terminated 21 * @returns length of str_array.
19 * string array @str_array.
20 *
21 * Return value: length of @str_array.
22 *
23 */ 22 */
24 unsigned int strv_length (char **str_array); 23 unsigned int strv_length (char **str_array);
25 24
26 /* @brief append a string to a NULL terminated array of strings. 25 /**
26 * @brief append a string to a NULL terminated array of strings.
27 * 27 *
28 * @param[inout] array pointer to the NULL terminated list of string pointers. 28 * @param[inout] pArray pointer to the NULL terminated list of string pointers.
29 * @param[in] string pointer to the string to append to the list. 29 * @param[in] string pointer to the string to append to the list.
30 * @param[in] len length of the string to append to the list 30 * @param[in] len length of the string to append to the list
31 * */ 31 */
32 void strv_append (char ***pArray, const char *string, const size_t len); 32 void strv_append (char ***pArray, const char *string, const size_t len);
33 33
34 /* @brief append a string to another string. 34 /**
35 * @brief append a string to another string.
35 * 36 *
36 * @param[inout] pDst pointer to the string to be extended. 37 * @param[inout] pDst pointer to the string to be extended.
37 * @param[inout] dst_len length of the dst string. Will be modified. 38 * @param[inout] dst_len length of the dst string. Will be modified.
38 * @param[in] appendage pointer to the string to append. 39 * @param[in] appendage pointer to the string to append.
39 * @param[in] len length of the string to append. 40 * @param[in] len length of the string to append.
40 * */ 41 */
41 void str_append_str (char **pDst, size_t *dst_len, const char *appendage, 42 void str_append_str (char **pDst, size_t *dst_len, const char *appendage,
42 const size_t len); 43 const size_t len);
43 44
45 /**
46 * @brief Frees the given %NULL-terminated string array.
47 * @param[inout] str_array a %NULL-terminated array of strings
48 */
44 void strv_free (char **str_array); 49 void strv_free (char **str_array);
45 #endif 50 #endif

http://wald.intevation.org/projects/trustbridge/