Skip to content

Commit c3e369b

Browse files
Merge pull request #4636 from corob-msft/bulk-fix-crt-acrolinx-31
Bulk fix CRT Acrolinx issues, 31 of 31
2 parents f288058 + 38005e4 commit c3e369b

File tree

9 files changed

+23
-25
lines changed

9 files changed

+23
-25
lines changed

docs/c-runtime-library/reference/wcsrtombs-s.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,17 +73,17 @@ The **`wcsrtombs_s`** function converts a string of wide characters pointed to b
7373

7474
- A null wide character is encountered
7575

76-
- A wide character that cannot be converted is encountered
76+
- A wide character that can't be converted is encountered
7777

7878
- The number of bytes stored in the *`mbstr`* buffer equals *`count`*.
7979

80-
The destination string is always null-terminated (even in the case of an error).
80+
The destination string is always null-terminated (even if there's an error).
8181

8282
If *`count`* is the special value [`_TRUNCATE`](../truncate.md), then **`wcsrtombs_s`** converts as much of the string as will fit into the destination buffer, while still leaving room for a null terminator.
8383

84-
If **`wcsrtombs_s`** successfully converts the source string, it puts the size in bytes of the converted string, including the null terminator, into `*pReturnValue` (provided *`pReturnValue`* is not `NULL`). This occurs even if the *`mbstr`* argument is `NULL` and provides a way to determine the required buffer size. Note that if *`mbstr`* is `NULL`, *`count`* is ignored.
84+
If **`wcsrtombs_s`** successfully converts the source string, it puts the size in bytes of the converted string, including the null terminator, into `*pReturnValue` (provided *`pReturnValue`* isn't `NULL`). The size is calculated even if the *`mbstr`* argument is `NULL`; it provides a way to determine the required buffer size. If *`mbstr`* is `NULL`, *`count`* is ignored.
8585

86-
If **`wcsrtombs_s`** encounters a wide character it cannot convert to a multibyte character, it puts -1 in *\*`pReturnValue`*, sets the destination buffer to an empty string, sets `errno` to `EILSEQ`, and returns `EILSEQ`.
86+
If **`wcsrtombs_s`** encounters a wide character it can't convert to a multibyte character, it puts -1 in *\*`pReturnValue`*, sets the destination buffer to an empty string, sets `errno` to `EILSEQ`, and returns `EILSEQ`.
8787

8888
If the sequences pointed to by *`wcstr`* and *`mbstr`* overlap, the behavior of **`wcsrtombs_s`** is undefined. **`wcsrtombs_s`** is affected by the LC_TYPE category of the current locale.
8989

docs/c-runtime-library/reference/wcsrtombs.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ The resulting converted multibyte character string's address location.
4141
Indirectly points to the location of the wide character string to be converted.
4242

4343
*`count`*\
44-
The number of character to be converted.
44+
The number of characters to be converted.
4545

4646
*`mbstate`*\
4747
A pointer to an `mbstate_t` conversion state object.
@@ -58,15 +58,15 @@ Thus, the multibyte character string at *`mbstr`* is null-terminated only if **`
5858

5959
The **`wcsrtombs`** function differs from [`wcstombs`, `_wcstombs_l`](wcstombs-wcstombs-l.md) by its restartability. The conversion state is stored in *`mbstate`* for subsequent calls to the same or other restartable functions. Results are undefined when mixing the use of restartable and nonrestartable functions. For example, an application would use `wcsrlen` rather than `wcsnlen`, if a subsequent call to **`wcsrtombs`** were used instead of `wcstombs`.
6060

61-
If the *`mbstr`* argument is `NULL`, **`wcsrtombs`** returns the required size in bytes of the destination string. If *`mbstate`* is null, the internal `mbstate_t` conversion state is used. If the character sequence *`wchar`* does not have a corresponding multibyte character representation, a -1 is returned and the `errno` is set to `EILSEQ`.
61+
If the *`mbstr`* argument is `NULL`, **`wcsrtombs`** returns the required size in bytes of the destination string. If *`mbstate`* is null, the internal `mbstate_t` conversion state is used. If the character sequence *`wchar`* doesn't have a corresponding multibyte character representation, a -1 is returned, and the `errno` is set to `EILSEQ`.
6262

6363
In C++, this function has a template overload that invokes the newer, secure counterpart of this function. For more information, see [Secure template overloads](../secure-template-overloads.md).
6464

6565
By default, this function's global state is scoped to the application. To change this behavior, see [Global state in the CRT](../global-state.md).
6666

6767
## Exceptions
6868

69-
The **`wcsrtombs`** function is multithread safe as long as no function in the current thread calls `setlocale` while this function is executing and the *`mbstate`* is not null.
69+
The **`wcsrtombs`** function is multithread safe as long as no function in the current thread calls `setlocale` while this function is executing and the *`mbstate`* isn't null.
7070

7171
## Example
7272

docs/c-runtime-library/reference/wcstombs-s-wcstombs-s-l.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,17 +89,17 @@ The **`wcstombs_s`** function converts a string of wide characters pointed to by
8989

9090
- A null wide character is encountered
9191

92-
- A wide character that cannot be converted is encountered
92+
- A wide character that can't be converted is encountered
9393

9494
- The number of bytes stored in the *`mbstr`* buffer equals *`count`*.
9595

96-
The destination string is always null-terminated (even in the case of an error).
96+
The destination string is always null-terminated (even if there's an error).
9797

9898
If *`count`* is the special value [`_TRUNCATE`](../truncate.md), then **`wcstombs_s`** converts as much of the string as will fit into the destination buffer, while still leaving room for a null terminator. If the string is truncated, the return value is `STRUNCATE`, and the conversion is considered successful.
9999

100-
If **`wcstombs_s`** successfully converts the source string, it puts the size in bytes of the converted string, including the null terminator, into *`*pReturnValue`* (provided *`pReturnValue`* is not `NULL`). This occurs even if the *`mbstr`* argument is `NULL` and provides a way to determine the required buffer size. Note that if *`mbstr`* is `NULL`, *`count`* is ignored.
100+
If **`wcstombs_s`** successfully converts the source string, it puts the size in bytes of the converted string, including the null terminator, into *`*pReturnValue`* (provided *`pReturnValue`* isn't `NULL`). The size is calculated even if the *`mbstr`* argument is `NULL`; it provides a way to determine the required buffer size. If *`mbstr`* is `NULL`, *`count`* is ignored.
101101

102-
If **`wcstombs_s`** encounters a wide character it cannot convert to a multibyte character, it puts 0 in *`*ReturnValue`*, sets the destination buffer to an empty string, sets `errno` to `EILSEQ`, and returns `EILSEQ`.
102+
If **`wcstombs_s`** encounters a wide character it can't convert to a multibyte character, it puts 0 in *`*ReturnValue`*, sets the destination buffer to an empty string, sets `errno` to `EILSEQ`, and returns `EILSEQ`.
103103

104104
If the sequences pointed to by *`wcstr`* and *`mbstr`* overlap, the behavior of **`wcstombs_s`** is undefined.
105105

docs/c-runtime-library/reference/wcstombs-wcstombs-l.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ If **`wcstombs`** successfully converts the multibyte string, it returns the num
6262

6363
## Remarks
6464

65-
The **`wcstombs`** function converts the wide-character string pointed to by *`wcstr`* to the corresponding multibyte characters and stores the results in the *`mbstr`* array. The *`count`* parameter indicates the maximum number of bytes that can be stored in the multibyte output string (that is, the size of *`mbstr`*). In general, it isn't known how many bytes will be required when converting a wide-character string. Some wide characters will require only one byte in the output string; others require two. If there are two bytes in the multibyte output string for every wide character in the input string (including the wide character `NULL`), the result is guaranteed to fit.
65+
The **`wcstombs`** function converts the wide-character string pointed to by *`wcstr`* to the corresponding multibyte characters and stores the results in the *`mbstr`* array. The *`count`* parameter indicates the maximum number of bytes that can be stored in the multibyte output string (that is, the size of *`mbstr`*). In general, it isn't known how many bytes will be required when converting a wide-character string. Some wide characters will require only a single byte in the output string; others require 2 bytes. If there are 2 bytes in the multibyte output string for every wide character in the input string (including the wide character `NULL`), the result is guaranteed to fit.
6666

6767
If **`wcstombs`** encounters the wide-character `NULL` character (L'\0') either before or when *`count`* occurs, it converts it to an 8-bit 0 and stops. Thus, the multibyte character string at *`mbstr`* is null-terminated only if **`wcstombs`** encounters a wide-character `NULL` character during conversion. If the sequences pointed to by *`wcstr`* and *`mbstr`* overlap, the behavior of **`wcstombs`** is undefined.
6868

docs/c-runtime-library/reference/wctrans.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,18 @@ A string that specifies one of the valid transformations.
2929

3030
## Return value
3131

32-
If the `LC_CTYPE` category of the current locale does not define a mapping whose name matches the property string *`property`*, the function returns zero. Otherwise, it returns a nonzero value suitable for use as the second argument to a subsequent call to [`towctrans`](towctrans.md).
32+
If the `LC_CTYPE` category of the current locale doesn't define a mapping whose name matches the property string *`property`*, the function returns zero. Otherwise, it returns a nonzero value suitable for use as the second argument to a subsequent call to [`towctrans`](towctrans.md).
3333

3434
## Remarks
3535

3636
This function determines a mapping from one set of character codes to another.
3737

38-
The following pairs of calls have the same behavior in all locales, but it is possible to define additional mappings even in the "C" locale:
38+
The following pairs of calls have the same behavior in all locales, but it's possible to define more mappings even in the "C" locale:
3939

4040
|Function|Same As|
4141
|--------------|-------------|
42-
|tolower(c)|towctrans(c, wctrans("towlower"))|
43-
|towupper(c)|towctrans(c, wctrans("toupper"))|
42+
|`tolower(c)`|`towctrans(c, wctrans("towlower"))`|
43+
|`towupper(c)`|`towctrans(c, wctrans("toupper"))`|
4444

4545
## Requirements
4646

docs/c-runtime-library/reference/wctype.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ If the `LC_CTYPE` category of the current locale doesn't define a classification
3232

3333
## Remarks
3434

35-
The function determines a classification rule for wide-character codes. The following pairs of calls have the same behavior in all locales (but an implementation can define additional classification rules even in the "C" locale):
35+
The function determines a classification rule for wide-character codes. The following pairs of calls have the same behavior in all locales (but an implementation can define more classification rules even in the "C" locale):
3636

3737
|Function|Same as|
3838
|--------------|-------------|

docs/c-runtime-library/reference/write.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Number of bytes.
3636

3737
## Return value
3838

39-
If successful, **`_write`** returns the number of bytes written. If the actual space remaining on the disk is less than the size of the buffer the function is trying to write to the disk, **`_write`** fails and doesn't flush any of the buffer's contents to the disk. A return value of -1 indicates an error. If invalid parameters are passed, this function invokes the invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, the function returns -1 and `errno` is set to one of three values: `EBADF`, which means the file descriptor is invalid or the file isn't opened for writing; `ENOSPC`, which means there isn't enough space left on the device for the operation; or `EINVAL`, which means that *`buffer`* was a null pointer or that an odd *`count`* of bytes was passed to be written to a file in Unicode mode.
39+
If successful, **`_write`** returns the number of bytes written. If the actual space remaining on the disk is less than the size of the buffer the function is trying to write to the disk, **`_write`** fails and doesn't flush any of the buffer's contents to the disk. A return value of -1 indicates an error. If invalid parameters are passed, this function invokes the invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, the function returns -1 and `errno` is set to one of three values: `EBADF`, which means the file descriptor is invalid or the file isn't opened for writing; `ENOSPC`, which means there isn't enough space left on the device for the operation; or `EINVAL`, which means that *`buffer`* was a null pointer, or that an odd *`count`* of bytes was passed in Unicode mode.
4040

4141
For more information about these and other return codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md).
4242

@@ -48,7 +48,7 @@ When the file is opened in Unicode translation mode—for example, if *`fd`* is
4848

4949
The **`_write`** function writes *`count`* bytes from *`buffer`* into the file associated with *`fd`*. The write operation begins at the current position of the file pointer (if any) associated with the given file. If the file is open for appending, the operation begins at the current end of the file. After the write operation, the file pointer is increased by the number of bytes written.
5050

51-
When writing to files opened in text mode, **`_write`** treats a CTRL+Z character as the logical end of file. When writing to a device, **`_write`** treats a CTRL+Z character in the buffer as an output terminator.
51+
When it writes to files opened in text mode, **`_write`** treats a CTRL+Z character as the logical end of file. When it writes to a device, **`_write`** treats a CTRL+Z character in the buffer as an output terminator.
5252

5353
By default, this function's global state is scoped to the application. To change this behavior, see [Global state in the CRT](../global-state.md).
5454

docs/c-runtime-library/reference/xor-eq.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,17 @@ ms.assetid: eca4b6b4-b77a-4d44-a09a-5a7e69fdb56c
1111
---
1212
# `xor_eq`
1313

14-
An alternative to the ^= operator.
14+
An alternative to the **`^=`** operator.
1515

1616
## Syntax
1717

1818
```C
19-
2019
#define xor_eq ^=
2120
```
2221
2322
## Remarks
2423
25-
The macro yields the operator ^=.
24+
The macro yields the operator **`^=`**.
2625
2726
## Example
2827

docs/c-runtime-library/reference/xor.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,17 @@ ms.assetid: 0fe9554b-d87b-4487-92ed-366c6dc21df2
1111
---
1212
# `xor`
1313

14-
An alternative to the ^ operator.
14+
An alternative to the **`^`** operator.
1515

1616
## Syntax
1717

1818
```C
19-
2019
#define xor ^
2120
```
2221
2322
## Remarks
2423
25-
The macro yields the operator ^.
24+
The macro yields the operator **`^`**.
2625
2726
## Example
2827

0 commit comments

Comments
 (0)