Use consistent language for string termination (#806)
Avoid hyphen, prefer space: "null terminated"
This commit is contained in:
1 parent
f4ccf7bc8c
commit
2d8a6f91a9
16 files changed
+45
-45
No files matched your search
@@ -64,7 +64,7 @@ LIBCOM_API void * dbmfMalloc(size_t bytes);
|
||||
* \brief Duplicate a string.
|
||||
*
|
||||
* Create a copy of the input string.
|
||||
* \param str Pointer to the null-terminated string to be copied.
|
||||
* \param str Pointer to the null terminated string to be copied.
|
||||
* \return A pointer to the new copy, or NULL on failure.
|
||||
*/
|
||||
LIBCOM_API char * dbmfStrdup(const char *str);
|
||||
@@ -73,7 +73,7 @@ LIBCOM_API char * dbmfStrdup(const char *str);
|
||||
*
|
||||
* Copy at most len bytes of the input string into a new buffer. If no nil
|
||||
* terminator is seen in the first \c len bytes a nil terminator is added.
|
||||
* \param str Pointer to the null-terminated string to be copied.
|
||||
* \param str Pointer to the null terminated string to be copied.
|
||||
* \param len Max number of bytes to copy.
|
||||
* \return A pointer to the new string, or NULL on failure.
|
||||
*/
|
||||
@@ -81,7 +81,7 @@ LIBCOM_API char * dbmfStrndup(const char *str, size_t len);
|
||||
/**
|
||||
* \brief Concatenate three strings.
|
||||
|
||||
* Returns a pointer to a null-terminated string made by concatenating the
|
||||
* Returns a pointer to a null terminated string made by concatenating the
|
||||
* three input strings.
|
||||
* \param lhs Start string to which the others get concatenated to (left part).
|
||||
* \param mid Next string to be concatenated to the lhs (mid part).
|
||||
|
||||
Vendored
+1
-1
@@ -104,7 +104,7 @@ struct in_addr;
|
||||
* \return Pointer to the environment variable value string, or
|
||||
* NULL if no parameter value and default value was empty.
|
||||
*
|
||||
* \post A terminating nil will be written to pBuf.
|
||||
* \post A terminating '\0' will be written to pBuf to ensure it is null terminated.
|
||||
*/
|
||||
LIBCOM_API char * epicsStdCall
|
||||
envGetConfigParam(const ENV_PARAM *pParam, int bufDim, char *pBuf);
|
||||
|
||||
@@ -794,7 +794,7 @@ static void refer ( MAC_HANDLE *handle, MAC_ENTRY *entry, int level,
|
||||
r++;
|
||||
|
||||
/* translate name (may contain macro references); truncated
|
||||
quietly if too long but always guaranteed zero-terminated */
|
||||
quietly if too long but always guaranteed to be null terminated */
|
||||
trans( handle, entry, level + 1, macEnd, &r, &rn, rn + MAC_SIZE );
|
||||
refname[MAC_SIZE] = '\0';
|
||||
|
||||
|
||||
@@ -126,7 +126,7 @@ epicsStdCall macPutValue(
|
||||
* \brief Returns the value of a macro
|
||||
* \return Returns the length of the value string, <0 if undefined
|
||||
*
|
||||
* \c value will be zero-terminated if the length of the value is less than
|
||||
* \c value will be null terminated if the length of the value is less than
|
||||
* \c capacity. The return value is the number of characters copied to
|
||||
* \c value (see below for behavior if the macro is undefined). If \c capacity
|
||||
* is zero, no characters will be copied to \c value (which may be NULL)
|
||||
@@ -277,7 +277,7 @@ epicsStdCall macInstallMacros(
|
||||
* environment variables. It parses the string looking for such
|
||||
* references and passes them to macGetValue() for translation. It uses
|
||||
* malloc() to allocate space for the expanded string and returns a
|
||||
* pointer to this null-terminated string. It returns NULL if the source
|
||||
* pointer to this null terminated string. It returns NULL if the source
|
||||
* string contains any undefined references.
|
||||
*/
|
||||
LIBCOM_API char *
|
||||
|
||||
@@ -36,7 +36,7 @@ c) long macGetValue ( MAC_HANDLE *handle, char *name,
|
||||
char *value, long maxlen );
|
||||
|
||||
Returns up to maxlen characters of the value of macro "name". "value"
|
||||
will be zero-terminated if the length of the value is less than
|
||||
will be null terminated if the length of the value is less than
|
||||
maxlen. The function value will be the number of characters copied to
|
||||
"value" (see below for behavior if the macro is undefined). If maxlen
|
||||
is zero, no characters will be copied to "value" (which can be NULL)
|
||||
@@ -161,7 +161,7 @@ d) char *macEnvExpand( char *src );
|
||||
environment variables. It parses the string looking for such
|
||||
references and passes them to macGetValue() for translation. It uses
|
||||
malloc() to allocate space for the expanded string and returns a
|
||||
pointer to this null-terminated string. It returns NULL if the source
|
||||
pointer to this null terminated string. It returns NULL if the source
|
||||
string contains any undefined references.
|
||||
|
||||
e) char *macDefExpand( char *src, MAC_HANDLE *macros );
|
||||
|
||||
@@ -37,7 +37,7 @@ extern "C" {
|
||||
* \p inbuf and \p outbuf to point to the same buffer and \p outsize and \p inlen
|
||||
* be equal, thus performing the character translation in-place.
|
||||
*
|
||||
* \param outbuf buffer to copy string to. The resulting string will be zero-terminated as long as
|
||||
* \param outbuf buffer to copy string to. The resulting string will be null terminated as long as
|
||||
* \p outsize is non-zero.
|
||||
* \param outsize length of output buffer not including the null-terminator.
|
||||
* \param inbuf buffer to copy from. Null byte terminates the string.
|
||||
@@ -59,7 +59,7 @@ LIBCOM_API int epicsStrnRawFromEscaped(char *outbuf, size_t outsize,
|
||||
* All other non-printable characters appear in form `\xHH` where HH are two hex digits.
|
||||
* Non-printable characters are determined by the C runtime library’s isprint() function.
|
||||
*
|
||||
* \param outbuf buffer to copy string to. The resulting string will be zero-terminated as long as
|
||||
* \param outbuf buffer to copy string to. The resulting string will be null terminated as long as
|
||||
* @p outsize is non-zero.
|
||||
* \param outsize length of output buffer not including the null-terminator.
|
||||
* \param inbuf buffer to copy from. Null byte will not terminates the string.
|
||||
@@ -159,12 +159,12 @@ LIBCOM_API int epicsStrnGlobMatch(const char *str, size_t len, const char *patte
|
||||
*/
|
||||
LIBCOM_API char * epicsStrtok_r(char *s, const char *delim, char **lasts);
|
||||
|
||||
/** \brief Calculates a hash of a null-terminated string
|
||||
/** \brief Calculates a hash of a null terminated string
|
||||
*
|
||||
* Calculates a hash of a null-terminated string. Initial seed may be provided which
|
||||
* Calculates a hash of a null terminated string. Initial seed may be provided which
|
||||
* permits multiple strings to be combined into a single hash result.
|
||||
*
|
||||
*\param str null-terminated string
|
||||
*\param str null terminated string
|
||||
*\param seed Optionally provide seed to combine multiple strings in a single hash. Otherwise
|
||||
* set to 0.
|
||||
*
|
||||
|
||||
@@ -125,7 +125,7 @@ extern "C" {
|
||||
* correctly return the number of characters that would have been written when
|
||||
* the output gets truncated, it is not worth trying to fix this as long as
|
||||
* they return `size-1` instead; the resulting string must always be correctly
|
||||
* terminated with a zero byte.
|
||||
* null terminated.
|
||||
*
|
||||
* In some scenarios the epicsSnprintf() implementation may not provide the
|
||||
* correct C99 semantics for the return value when `size` is given as zero.
|
||||
|
||||
@@ -196,7 +196,7 @@ extern "C" {
|
||||
/** Finish generating a JSON array. */
|
||||
YAJL_API yajl_gen_status yajl_gen_array_close(yajl_gen hand);
|
||||
|
||||
/** Access the zero-terminated generator buffer. If incrementally
|
||||
/** Access the null terminated generator buffer. If incrementally
|
||||
* outputting JSON, one should call yajl_gen_clear() to clear the
|
||||
* buffer. This allows stream generation. */
|
||||
YAJL_API yajl_gen_status yajl_gen_get_buf(yajl_gen hand,
|
||||
|
||||
@@ -79,7 +79,7 @@ extern "C" {
|
||||
size_t numberLen);
|
||||
|
||||
/** Strings are returned as pointers into the JSON text when
|
||||
* possible. As a result they are _not_ zero-terminated. */
|
||||
* possible. As a result they are _not_ null terminated. */
|
||||
int (* yajl_string)(void * ctx, const unsigned char * stringVal,
|
||||
size_t stringLen);
|
||||
|
||||
|
||||
Reference in new issue
Block a user