fixes hard to use documentation in string.h

Sun, 03 Nov 2019 16:22:46 +0100

author
Mike Becker <universe@uap-core.de>
date
Sun, 03 Nov 2019 16:22:46 +0100
changeset 363
8175ba2b3bcb
parent 362
39cef8f37eb5
child 364
5577d6c27a33

fixes hard to use documentation in string.h

src/string.c file | annotate | diff | comparison | revisions
src/ucx/string.h file | annotate | diff | comparison | revisions
src/ucx/ucx.h file | annotate | diff | comparison | revisions
     1.1 --- a/src/string.c	Sun Nov 03 15:35:29 2019 +0100
     1.2 +++ b/src/string.c	Sun Nov 03 16:22:46 2019 +0100
     1.3 @@ -70,6 +70,8 @@
     1.4  
     1.5  
     1.6  size_t scstrnlen(size_t n, ...) {
     1.7 +    if (n == 0) return 0;
     1.8 +    
     1.9      va_list ap;
    1.10      va_start(ap, n);
    1.11      
     2.1 --- a/src/ucx/string.h	Sun Nov 03 15:35:29 2019 +0100
     2.2 +++ b/src/ucx/string.h	Sun Nov 03 16:22:46 2019 +0100
     2.3 @@ -83,6 +83,7 @@
     2.4  #ifdef	__cplusplus
     2.5  extern "C" {
     2.6  #endif
     2.7 +  
     2.8  /**
     2.9   * The UCX string structure.
    2.10   */
    2.11 @@ -112,7 +113,7 @@
    2.12  
    2.13  #ifdef __cplusplus
    2.14  /**
    2.15 - * One of two type adjustment functions that return a scstr_t.
    2.16 + * One of two type adjustment functions that return an scstr_t.
    2.17   * 
    2.18   * Used <b>internally</b> to convert a UCX string to an immutable UCX string.
    2.19   * 
    2.20 @@ -129,7 +130,7 @@
    2.21  }
    2.22  
    2.23  /**
    2.24 - * One of two type adjustment functions that return a scstr_t.
    2.25 + * One of two type adjustment functions that return an scstr_t.
    2.26   * 
    2.27   * Used <b>internally</b> to convert a UCX string to an immutable UCX string.
    2.28   * This variant is used, when the string is already immutable and no operation
    2.29 @@ -147,13 +148,13 @@
    2.30  /**
    2.31   * Converts a UCX string to an immutable UCX string (scstr_t).
    2.32   * @param str some UCX string
    2.33 - * @return the an immutable version of the provided string
    2.34 + * @return an immutable version of the provided string
    2.35   */
    2.36  #define SCSTR(s) s2scstr(s)
    2.37  #else
    2.38  
    2.39  /**
    2.40 - * One of two type adjustment functions that return a scstr_t.
    2.41 + * One of two type adjustment functions that return an scstr_t.
    2.42   * 
    2.43   * Used <b>internally</b> to convert a UCX string to an immutable UCX string.
    2.44   * This variant is used, when the string is already immutable and no operation
    2.45 @@ -167,7 +168,7 @@
    2.46  scstr_t ucx_sc2sc(scstr_t str);
    2.47  
    2.48  /**
    2.49 - * One of two type adjustment functions that return a scstr_t.
    2.50 + * One of two type adjustment functions that return an scstr_t.
    2.51   * 
    2.52   * Used <b>internally</b> to convert a UCX string to an immutable UCX string.
    2.53   * 
    2.54 @@ -182,7 +183,7 @@
    2.55  /**
    2.56   * Converts a UCX string to an immutable UCX string (scstr_t).
    2.57   * @param str some UCX string
    2.58 - * @return the an immutable version of the provided string
    2.59 + * @return an immutable version of the provided string
    2.60   */
    2.61  #define SCSTR(str) _Generic(str, sstr_t: ucx_ss2sc, scstr_t: ucx_sc2sc)(str)
    2.62  
    2.63 @@ -191,7 +192,7 @@
    2.64  /**
    2.65   * Converts a UCX string to an immutable UCX string (scstr_t).
    2.66   * @param str some UCX string
    2.67 - * @return the an immutable version of the provided string
    2.68 + * @return an immutable version of the provided string
    2.69   */
    2.70  #define SCSTR(str) __builtin_choose_expr( \
    2.71          __builtin_types_compatible_p(typeof(str), sstr_t), \
    2.72 @@ -244,8 +245,8 @@
    2.73   * 
    2.74   * The length is implicitly inferred by using a call to <code>strlen()</code>.
    2.75   *
    2.76 - * <b>Note:</b> the sstr_t will hold a <i>reference</i> to the C string. If you
    2.77 - * do want a copy, use sstrdup() on the return value of this function.
    2.78 + * <b>Note:</b> the sstr_t will share the specified pointer to the C string.
    2.79 + * If you do want a copy, use sstrdup() on the return value of this function.
    2.80   * 
    2.81   * If you need to wrap a constant string, use scstr().
    2.82   * 
    2.83 @@ -259,8 +260,8 @@
    2.84  /**
    2.85   * Creates a new sstr_t of the specified length based on a C string.
    2.86   *
    2.87 - * <b>Note:</b> the sstr_t will hold a <i>reference</i> to the C string. If you
    2.88 - * do want a copy, use sstrdup() on the return value of this function.
    2.89 + * <b>Note:</b> the sstr_t will share the specified pointer to the C string.
    2.90 + * If you do want a copy, use sstrdup() on the return value of this function.
    2.91   * 
    2.92   * If you need to wrap a constant string, use scstrn().
    2.93   * 
    2.94 @@ -278,8 +279,8 @@
    2.95   * 
    2.96   * The length is implicitly inferred by using a call to <code>strlen()</code>.
    2.97   *
    2.98 - * <b>Note:</b> the scstr_t will hold a <i>reference</i> to the C string. If you
    2.99 - * do want a copy, use scstrdup() on the return value of this function.
   2.100 + * <b>Note:</b> the scstr_t will share the specified pointer to the C string.
   2.101 + * If you do want a copy, use scstrdup() on the return value of this function.
   2.102   * 
   2.103   * @param cstring the C string to wrap
   2.104   * @return a new scstr_t containing the C string
   2.105 @@ -292,9 +293,8 @@
   2.106  /**
   2.107   * Creates a new scstr_t of the specified length based on a constant C string.
   2.108   *
   2.109 - * <b>Note:</b> the scstr_t will hold a <i>reference</i> to the C string. If you
   2.110 - * do want a copy, use scstrdup() on the return value of this function.
   2.111 - * 
   2.112 + * <b>Note:</b> the scstr_t will share the specified pointer to the C string.
   2.113 + * If you do want a copy, use scstrdup() on the return value of this function. * 
   2.114   * 
   2.115   * @param cstring  the C string to wrap
   2.116   * @param length   the length of the string
   2.117 @@ -305,21 +305,24 @@
   2.118  scstr_t scstrn(const char *cstring, size_t length);
   2.119  
   2.120  /**
   2.121 - * Returns the cumulated length of all specified strings.
   2.122 + * Returns the accumulated length of all specified strings.
   2.123   * 
   2.124 - * <b>Attention:</b> if the count argument does not match the count of the
   2.125 + * <b>Attention:</b> if the count argument is larger than the count of the
   2.126   * specified strings, the behavior is undefined.
   2.127   *
   2.128 - * @param count    the total number of specified strings (so at least 1)
   2.129 + * @param count    the total number of specified strings
   2.130   * @param ...      all strings
   2.131 - * @return the cumulated length of all strings
   2.132 + * @return the accumulated length of all strings
   2.133   */
   2.134  size_t scstrnlen(size_t count, ...);
   2.135  
   2.136  /**
   2.137 - * Alias for scstrnlen() which automatically converts the arguments.
   2.138 + * Returns the accumulated length of all specified strings.
   2.139   * 
   2.140 - * @param count    the total number of specified strings (so at least 1)
   2.141 + * <b>Attention:</b> if the count argument is larger than the count of the
   2.142 + * specified strings, the behavior is undefined.
   2.143 + * 
   2.144 + * @param count    the total number of specified strings
   2.145   * @param ...      all strings
   2.146   * @return the cumulated length of all strings
   2.147   */
   2.148 @@ -342,7 +345,13 @@
   2.149  sstr_t scstrcat(size_t count, scstr_t s1, ...);
   2.150  
   2.151  /**
   2.152 - * Alias for scstrcat() which automatically converts the arguments.
   2.153 + * Concatenates two or more strings.
   2.154 + * 
   2.155 + * The resulting string will be allocated by standard <code>malloc()</code>. 
   2.156 + * So developers <b>MUST</b> pass the sstr_t.ptr to <code>free()</code>.
   2.157 + * 
   2.158 + * The sstr_t.ptr of the return value will <i>always</i> be <code>NULL</code>-
   2.159 + * terminated.
   2.160   * 
   2.161   * @param count   the total number of strings to concatenate
   2.162   * @param s1      first string
   2.163 @@ -354,35 +363,47 @@
   2.164  /**
   2.165   * Concatenates two or more strings using a UcxAllocator.
   2.166   * 
   2.167 - * See scstrcat() for details.
   2.168 + * The resulting string must be freed by the allocators <code>free()</code>
   2.169 + * implementation.
   2.170 + * 
   2.171 + * The sstr_t.ptr of the return value will <i>always</i> be <code>NULL</code>-
   2.172 + * terminated.
   2.173   *
   2.174 - * @param a       the allocator to use
   2.175 + * @param alloc   the allocator to use
   2.176   * @param count   the total number of strings to concatenate
   2.177   * @param s1      first string
   2.178   * @param ...     all remaining strings
   2.179   * @return the concatenated string
   2.180 + * 
   2.181 + * @see scstrcat()
   2.182   */
   2.183 -sstr_t scstrcat_a(UcxAllocator *a, size_t count, scstr_t s1, ...);
   2.184 +sstr_t scstrcat_a(UcxAllocator *alloc, size_t count, scstr_t s1, ...);
   2.185  
   2.186  /**
   2.187 - * Alias for scstrcat_a() which automatically converts the arguments.
   2.188 + * Concatenates two or more strings using a UcxAllocator.
   2.189   * 
   2.190 - * See sstrcat() for details.
   2.191 + * The resulting string must be freed by the allocators <code>free()</code>
   2.192 + * implementation.
   2.193 + * 
   2.194 + * The sstr_t.ptr of the return value will <i>always</i> be <code>NULL</code>-
   2.195 + * terminated.
   2.196   *
   2.197 - * @param a       the allocator to use
   2.198 + * @param alloc   the allocator to use
   2.199   * @param count   the total number of strings to concatenate
   2.200   * @param s1      first string
   2.201   * @param ...     all remaining strings
   2.202   * @return the concatenated string
   2.203 + * 
   2.204 + * @see sstrcat()
   2.205   */
   2.206 -#define sstrcat_a(a, count, s1, ...) \
   2.207 -    scstrcat_a(a, count, SCSTR(s1), __VA_ARGS__)
   2.208 +#define sstrcat_a(alloc, count, s1, ...) \
   2.209 +    scstrcat_a(alloc, count, SCSTR(s1), __VA_ARGS__)
   2.210  
   2.211  /**
   2.212   * Returns a substring starting at the specified location.
   2.213   * 
   2.214   * <b>Attention:</b> the new string references the same memory area as the
   2.215 - * input string and will <b>NOT</b> be <code>NULL</code>-terminated.
   2.216 + * input string and is <b>NOT</b> required to be <code>NULL</code>-terminated.
   2.217   * Use sstrdup() to get a copy.
   2.218   * 
   2.219   * @param string input string
   2.220 @@ -395,10 +416,10 @@
   2.221  sstr_t sstrsubs(sstr_t string, size_t start);
   2.222  
   2.223  /**
   2.224 - * Returns a substring with a maximum length starting at the specified location.
   2.225 + * Returns a substring with the given length starting at the specified location.
   2.226   * 
   2.227   * <b>Attention:</b> the new string references the same memory area as the
   2.228 - * input string and will <b>NOT</b> be <code>NULL</code>-terminated.
   2.229 + * input string and is <b>NOT</b> required to be <code>NULL</code>-terminated.
   2.230   * Use sstrdup() to get a copy.
   2.231   * 
   2.232   * @param string input string
   2.233 @@ -417,7 +438,7 @@
   2.234   * location.
   2.235   * 
   2.236   * <b>Attention:</b> the new string references the same memory area as the
   2.237 - * input string and will <b>NOT</b> be <code>NULL</code>-terminated.
   2.238 +* input string and is <b>NOT</b> required to be <code>NULL</code>-terminated.
   2.239   * Use scstrdup() to get a copy.
   2.240   * 
   2.241   * @param string input string
   2.242 @@ -434,7 +455,7 @@
   2.243   * at the specified location.
   2.244   * 
   2.245   * <b>Attention:</b> the new string references the same memory area as the
   2.246 - * input string and will <b>NOT</b> be <code>NULL</code>-terminated.
   2.247 + * input string and is <b>NOT</b> required to be <code>NULL</code>-terminated.
   2.248   * Use scstrdup() to get a copy.
   2.249   * 
   2.250   * @param string input string
   2.251 @@ -522,7 +543,13 @@
   2.252  sstr_t scstrsstr(sstr_t string, scstr_t match);
   2.253  
   2.254  /**
   2.255 - * Alias for scstrsstr() which automatically converts the match string.
   2.256 + * Returns a substring starting at the location of the first occurrence of the
   2.257 + * specified string.
   2.258 + * 
   2.259 + * If the string does not contain the other string, an empty string is returned.
   2.260 + * 
   2.261 + * If <code>match</code> is an empty string, the complete <code>string</code> is
   2.262 + * returned.
   2.263   * 
   2.264   * @param string the string to be scanned
   2.265   * @param match  string containing the sequence of characters to match
   2.266 @@ -550,7 +577,13 @@
   2.267  scstr_t scstrscstr(scstr_t string, scstr_t match);
   2.268  
   2.269  /**
   2.270 - * Alias for scstrscstr() which automatically converts the match string.
   2.271 + * Returns an immutable substring starting at the location of the
   2.272 + * first occurrence of the specified immutable string.
   2.273 + * 
   2.274 + * If the string does not contain the other string, an empty string is returned.
   2.275 + * 
   2.276 + * If <code>match</code> is an empty string, the complete <code>string</code> is
   2.277 + * returned.
   2.278   * 
   2.279   * @param string the string to be scanned
   2.280   * @param match  string containing the sequence of characters to match
   2.281 @@ -595,6 +628,55 @@
   2.282   * delimiter.
   2.283   * 
   2.284   * <b>Attention:</b> The array pointer <b>AND</b> all sstr_t.ptr of the array
   2.285 + * items must be manually passed to <code>free()</code>. Use scstrsplit_a() with
   2.286 + * an allocator to managed memory, to avoid this.
   2.287 + *
   2.288 + * @param string the string to split
   2.289 + * @param delim  the delimiter string
   2.290 + * @param count  IN: the maximum size of the resulting array (0 = no limit),
   2.291 + *               OUT: the actual size of the array
   2.292 + * @return a sstr_t array containing the split strings or
   2.293 + * <code>NULL</code> on error
   2.294 + * 
   2.295 + * @see scstrsplit_a()
   2.296 + */
   2.297 +sstr_t* scstrsplit(scstr_t string, scstr_t delim, ssize_t *count);
   2.298 +
   2.299 +/**
   2.300 + * Splits a string into parts by using a delimiter string.
   2.301 + * 
   2.302 + * This function will return <code>NULL</code>, if one of the following happens:
   2.303 + * <ul>
   2.304 + *   <li>the string length is zero</li>
   2.305 + *   <li>the delimeter length is zero</li>
   2.306 + *   <li>the string equals the delimeter</li>
   2.307 + *   <li>memory allocation fails</li>
   2.308 + * </ul>
   2.309 + * 
   2.310 + * The integer referenced by <code>count</code> is used as input and determines
   2.311 + * the maximum size of the resulting array, i.e. the maximum count of splits to
   2.312 + * perform + 1.
   2.313 + * 
   2.314 + * The integer referenced by <code>count</code> is also used as output and is
   2.315 + * set to
   2.316 + * <ul>
   2.317 + *   <li>-2, on memory allocation errors</li>
   2.318 + *   <li>-1, if either the string or the delimiter is an empty string</li>
   2.319 + *   <li>0, if the string equals the delimiter</li>
   2.320 + *   <li>1, if the string does not contain the delimiter</li>
   2.321 + *   <li>the count of array items, otherwise</li>
   2.322 + * </ul>
   2.323 + * 
   2.324 + * If the string starts with the delimiter, the first item of the resulting
   2.325 + * array will be an empty string.
   2.326 + * 
   2.327 + * If the string ends with the delimiter and the maximum list size is not
   2.328 + * exceeded, the last array item will be an empty string.
   2.329 + * In case the list size would be exceeded, the last array item will be the
   2.330 + * remaining string after the last split, <i>including</i> the terminating
   2.331 + * delimiter.
   2.332 + * 
   2.333 + * <b>Attention:</b> The array pointer <b>AND</b> all sstr_t.ptr of the array
   2.334   * items must be manually passed to <code>free()</code>. Use sstrsplit_a() with
   2.335   * an allocator to managed memory, to avoid this.
   2.336   *
   2.337 @@ -605,20 +687,6 @@
   2.338   * @return a sstr_t array containing the split strings or
   2.339   * <code>NULL</code> on error
   2.340   * 
   2.341 - * @see scstrsplit_a()
   2.342 - */
   2.343 -sstr_t* scstrsplit(scstr_t string, scstr_t delim, ssize_t *count);
   2.344 -
   2.345 -/**
   2.346 - * Alias for scstrsplit() which automatically converts the arguments.
   2.347 - * 
   2.348 - * @param string the string to split
   2.349 - * @param delim  the delimiter string
   2.350 - * @param count  IN: the maximum size of the resulting array (0 = no limit),
   2.351 - *               OUT: the actual size of the array
   2.352 - * @return a sstr_t array containing the split strings or
   2.353 - * <code>NULL</code> on error
   2.354 - * 
   2.355   * @see sstrsplit_a()
   2.356   */
   2.357  #define sstrsplit(string, delim, count) \
   2.358 @@ -633,9 +701,6 @@
   2.359   * the sstr_t array itself are allocated by using the UcxAllocator.malloc()
   2.360   * function.
   2.361   * 
   2.362 - * <b>Note:</b> the allocator is not used for memory that is freed within the
   2.363 - * same call of this function (locally scoped variables).
   2.364 - * 
   2.365   * @param allocator the UcxAllocator used for allocating memory
   2.366   * @param string the string to split
   2.367   * @param delim  the delimiter string
   2.368 @@ -650,7 +715,13 @@
   2.369          ssize_t *count);
   2.370  
   2.371  /**
   2.372 - * Alias for scstrsplit_a() which automatically converts the arguments.
   2.373 + * Performing sstrsplit() using a UcxAllocator.
   2.374 + * 
   2.375 + * <i>Read the description of sstrsplit() for details.</i>
   2.376 + * 
   2.377 + * The memory for the sstr_t.ptr pointers of the array items and the memory for
   2.378 + * the sstr_t array itself are allocated by using the UcxAllocator.malloc()
   2.379 + * function.
   2.380   * 
   2.381   * @param allocator the UcxAllocator used for allocating memory
   2.382   * @param string the string to split
   2.383 @@ -680,7 +751,10 @@
   2.384  int scstrcmp(scstr_t s1, scstr_t s2);
   2.385  
   2.386  /**
   2.387 - * Alias for scstrcmp() which automatically converts its arguments.
   2.388 + * Compares two UCX strings with standard <code>memcmp()</code>.
   2.389 + * 
   2.390 + * At first it compares the sstr_t.length attribute of the two strings. The
   2.391 + * <code>memcmp()</code> function is called, if and only if the lengths match.
   2.392   * 
   2.393   * @param s1 the first string
   2.394   * @param s2 the second string
   2.395 @@ -706,7 +780,11 @@
   2.396  int scstrcasecmp(scstr_t s1, scstr_t s2);
   2.397  
   2.398  /**
   2.399 - * Alias for scstrcasecmp() which automatically converts the arguments.
   2.400 + * Compares two UCX strings ignoring the case.
   2.401 + * 
   2.402 + * At first it compares the sstr_t.length attribute of the two strings. If and
   2.403 + * only if the lengths match, both strings are compared char by char ignoring
   2.404 + * the case.
   2.405   * 
   2.406   * @param s1 the first string
   2.407   * @param s2 the second string
   2.408 @@ -733,7 +811,14 @@
   2.409  sstr_t scstrdup(scstr_t string);
   2.410  
   2.411  /**
   2.412 - * Alias for scstrdup() which automatically converts the argument.
   2.413 + * Creates a duplicate of the specified string.
   2.414 + * 
   2.415 + * The new sstr_t will contain a copy allocated by standard
   2.416 + * <code>malloc()</code>. So developers <b>MUST</b> pass the sstr_t.ptr to
   2.417 + * <code>free()</code>.
   2.418 + * 
   2.419 + * The sstr_t.ptr of the return value will <i>always</i> be <code>NULL</code>-
   2.420 + * terminated, regardless of the argument.
   2.421   * 
   2.422   * @param string the string to duplicate
   2.423   * @return a duplicate of the string
   2.424 @@ -760,7 +845,15 @@
   2.425  sstr_t scstrdup_a(UcxAllocator *allocator, scstr_t string);
   2.426  
   2.427  /**
   2.428 - * Alias for scstrdup_a() which automatically converts the argument.
   2.429 + * Creates a duplicate of the specified string using a UcxAllocator.
   2.430 + * 
   2.431 + * The new sstr_t will contain a copy allocated by the allocators
   2.432 + * UcxAllocator.malloc() function. So it is implementation depended, whether the
   2.433 + * returned sstr_t.ptr pointer must be passed to the allocators
   2.434 + * UcxAllocator.free() function manually.
   2.435 + * 
   2.436 + * The sstr_t.ptr of the return value will <i>always</i> be <code>NULL</code>-
   2.437 + * terminated, regardless of the argument.
   2.438   * 
   2.439   * @param allocator a valid instance of a UcxAllocator
   2.440   * @param string the string to duplicate
   2.441 @@ -810,6 +903,7 @@
   2.442  
   2.443  /**
   2.444   * Checks, if a string has a specific prefix.
   2.445 + * 
   2.446   * @param string the string to check
   2.447   * @param prefix the prefix the string should have
   2.448   * @return 1, if and only if the string has the specified prefix, 0 otherwise
   2.449 @@ -817,7 +911,7 @@
   2.450  int scstrprefix(scstr_t string, scstr_t prefix);
   2.451  
   2.452  /**
   2.453 - * Alias for scstrprefix() which automatically converts the arguments.
   2.454 + * Checks, if a string has a specific prefix.
   2.455   * 
   2.456   * @param string the string to check
   2.457   * @param prefix the prefix the string should have
   2.458 @@ -827,6 +921,7 @@
   2.459  
   2.460  /**
   2.461   * Checks, if a string has a specific suffix.
   2.462 + * 
   2.463   * @param string the string to check
   2.464   * @param suffix the suffix the string should have
   2.465   * @return 1, if and only if the string has the specified suffix, 0 otherwise
   2.466 @@ -834,7 +929,7 @@
   2.467  int scstrsuffix(scstr_t string, scstr_t suffix);
   2.468  
   2.469  /**
   2.470 - * Alias for scstrsuffix() which automatically converts the arguments.
   2.471 + * Checks, if a string has a specific suffix.
   2.472   *
   2.473   * @param string the string to check
   2.474   * @param suffix the suffix the string should have
   2.475 @@ -845,8 +940,8 @@
   2.476  /**
   2.477   * Returns a lower case version of a string.
   2.478   * 
   2.479 - * This function creates a duplicate of the input string, first. See the
   2.480 - * documentation of scstrdup() for the implications.
   2.481 + * This function creates a duplicate of the input string, first
   2.482 + * (see scstrdup()).
   2.483   * 
   2.484   * @param string the input string
   2.485   * @return the resulting lower case string
   2.486 @@ -855,7 +950,10 @@
   2.487  sstr_t scstrlower(scstr_t string);
   2.488  
   2.489  /**
   2.490 - * Alias for scstrlower() which automatically converts the argument.
   2.491 + * Returns a lower case version of a string.
   2.492 + * 
   2.493 + * This function creates a duplicate of the input string, first
   2.494 + * (see sstrdup()).
   2.495   * 
   2.496   * @param string the input string
   2.497   * @return the resulting lower case string
   2.498 @@ -865,8 +963,8 @@
   2.499  /**
   2.500   * Returns a lower case version of a string.
   2.501   * 
   2.502 - * This function creates a duplicate of the input string, first. See the
   2.503 - * documentation of scstrdup_a() for the implications.
   2.504 +  * This function creates a duplicate of the input string, first
   2.505 + * (see scstrdup_a()).
   2.506   * 
   2.507   * @param allocator the allocator used for duplicating the string
   2.508   * @param string the input string
   2.509 @@ -877,7 +975,10 @@
   2.510  
   2.511  
   2.512  /**
   2.513 - * Alias for scstrlower_a() which automatically converts the argument.
   2.514 + * Returns a lower case version of a string.
   2.515 + * 
   2.516 + * This function creates a duplicate of the input string, first
   2.517 + * (see sstrdup_a()).
   2.518   * 
   2.519   * @param allocator the allocator used for duplicating the string
   2.520   * @param string the input string
   2.521 @@ -888,8 +989,8 @@
   2.522  /**
   2.523   * Returns a upper case version of a string.
   2.524   * 
   2.525 - * This function creates a duplicate of the input string, first. See the
   2.526 - * documentation of scstrdup() for the implications.
   2.527 + * This function creates a duplicate of the input string, first
   2.528 + * (see scstrdup()).
   2.529   * 
   2.530   * @param string the input string
   2.531   * @return the resulting upper case string
   2.532 @@ -898,7 +999,10 @@
   2.533  sstr_t scstrupper(scstr_t string);
   2.534  
   2.535  /**
   2.536 - * Alias for scstrupper() which automatically converts the argument.
   2.537 + * Returns a upper case version of a string.
   2.538 + * 
   2.539 + * This function creates a duplicate of the input string, first
   2.540 + * (see sstrdup()).
   2.541   * 
   2.542   * @param string the input string
   2.543   * @return the resulting upper case string
   2.544 @@ -908,8 +1012,8 @@
   2.545  /**
   2.546   * Returns a upper case version of a string.
   2.547   * 
   2.548 - * This function creates a duplicate of the input string, first. See the
   2.549 - * documentation of scstrdup_a() for the implications.
   2.550 + * This function creates a duplicate of the input string, first
   2.551 + * (see scstrdup_a()).
   2.552   * 
   2.553   * @param allocator the allocator used for duplicating the string
   2.554   * @param string the input string
   2.555 @@ -919,7 +1023,10 @@
   2.556  sstr_t scstrupper_a(UcxAllocator *allocator, scstr_t string);
   2.557  
   2.558  /**
   2.559 - * Alias for scstrupper_a() which automatically converts the argument.
   2.560 + * Returns a upper case version of a string.
   2.561 + * 
   2.562 + * This function creates a duplicate of the input string, first
   2.563 + * (see sstrdup_a()).
   2.564   * 
   2.565   * @param allocator the allocator used for duplicating the string
   2.566   * @param string the input string
     3.1 --- a/src/ucx/ucx.h	Sun Nov 03 15:35:29 2019 +0100
     3.2 +++ b/src/ucx/ucx.h	Sun Nov 03 16:22:46 2019 +0100
     3.3 @@ -1,7 +1,7 @@
     3.4  /*
     3.5   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
     3.6   *
     3.7 - * Copyright 2019 Mike Becker, Olaf Wintermann All rights reserved.
     3.8 + * Copyright 2017 Mike Becker, Olaf Wintermann All rights reserved.
     3.9   *
    3.10   * Redistribution and use in source and binary forms, with or without
    3.11   * modification, are permitted provided that the following conditions are met:

mercurial