* A wrapper for realloc(3). It calls \p exit(\p EXIT_FAILURE) on errors,
* i.e. there is no need to check the return value in the caller.
*
* A wrapper for realloc(3). It calls \p exit(\p EXIT_FAILURE) on errors,
* i.e. there is no need to check the return value in the caller.
*
- * \return A pointer to the newly allocated memory, which is suitably aligned
- * for any kind of variable and may be different from \a p.
+ * \return A pointer to newly allocated memory which is suitably aligned for
+ * any kind of variable and may be different from \a p.
- next_null = memchr(start, '\0', buf + size - start);
+ next_null = memchr(start, '\0', next_cr?
+ next_cr - start : buf + size - start);
tmp = strtoll(str, &endptr, 10);
if (errno == ERANGE && (tmp == LLONG_MAX || tmp == LLONG_MIN))
return -E_ATOI_OVERFLOW;
tmp = strtoll(str, &endptr, 10);
if (errno == ERANGE && (tmp == LLONG_MAX || tmp == LLONG_MIN))
return -E_ATOI_OVERFLOW;
src = s;
memset(&state, 0, sizeof(state));
num_wchars = mbsrtowcs(dest, &src, num_wchars, &state);
src = s;
memset(&state, 0, sizeof(state));
num_wchars = mbsrtowcs(dest, &src, num_wchars, &state);