Skip to content

Commit c445b97

Browse files
committed
Bulk fix of CRT Acrolinx issues, 28 of N
1 parent 58265b4 commit c445b97

10 files changed

+24
-24
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,13 @@ Character to convert.
3030
3131
## Return value
3232
33-
**`__toascii`** converts the value of *`c`* to the 7-bit ASCII range and returns the result. There is no return value reserved to indicate an error.
33+
**`__toascii`** converts the value of *`c`* to the 7-bit ASCII range and returns the result. There's no return value reserved to indicate an error.
3434
3535
## Remarks
3636
3737
The **`__toascii`** routine converts the given character to an ASCII character by truncating it to the low-order 7 bits. No other transformation is applied.
3838
39-
The **`__toascii`** routine is defined as a macro unless the preprocessor macro `_CTYPE_DISABLE_MACROS` is defined. For backward compatibility, **`toascii`** is defined as a macro only when [`__STDC__`](../../preprocessor/predefined-macros.md) is not defined or is defined as 0; otherwise it is undefined.
39+
The **`__toascii`** routine is defined as a macro unless the preprocessor macro `_CTYPE_DISABLE_MACROS` is defined. For backward compatibility, **`toascii`** is defined as a macro only when [`__STDC__`](../../preprocessor/predefined-macros.md) isn't defined or is defined as 0; otherwise it's undefined.
4040
4141
## Requirements
4242

docs/c-runtime-library/reference/tolower-tolower-towlower-tolower-l-towlower-l.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,11 @@ Locale to use for locale-specific translation.
4646

4747
## Return value
4848

49-
Each of these routines converts a copy of *`c`* to lower case if the conversion is possible, and returns the result. There is no return value reserved to indicate an error.
49+
Each of these routines converts a copy of *`c`* to lower case if the conversion is possible, and returns the result. There's no return value reserved to indicate an error.
5050

5151
## Remarks
5252

53-
Each of these routines converts a given uppercase letter to a lowercase letter if it is possible and relevant. The case conversion of **`towlower`** is locale-specific. Only the characters relevant to the current locale are changed in case. The functions without the `_l` suffix use the currently set locale. The versions of these functions that have the `_l` suffix take the locale as a parameter and use that instead of the currently set locale. For more information, see [Locale](../locale.md).
53+
Each of these routines converts a given uppercase letter to a lowercase letter if it's possible and relevant. The case conversion of **`towlower`** is locale-specific. Only the characters relevant to the current locale are changed in case. The functions without the `_l` suffix use the currently set locale. The versions of these functions that have the `_l` suffix take the locale as a parameter and use that instead of the currently set locale. For more information, see [Locale](../locale.md).
5454

5555
In order for **`_tolower`** to give the expected results, [`__isascii`](isascii-isascii-iswascii.md) and [`isupper`](isupper-isupper-l-iswupper-iswupper-l.md) must both return nonzero.
5656

docs/c-runtime-library/reference/toupper-toupper-towupper-toupper-l-towupper-l.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ Locale to use.
4848

4949
Each of these routines converts a copy of *`c`*, if possible, and returns the result.
5050

51-
If *`c`* is a wide character for which `iswlower` is nonzero and there is a corresponding wide character for which [`iswupper`](isupper-isupper-l-iswupper-iswupper-l.md) is nonzero, **`towupper`** returns the corresponding wide character; otherwise, **`towupper`** returns *`c`* unchanged.
51+
If *`c`* is a wide character for which `iswlower` is nonzero and there's a corresponding wide character for which [`iswupper`](isupper-isupper-l-iswupper-iswupper-l.md) is nonzero, **`towupper`** returns the corresponding wide character; otherwise, **`towupper`** returns *`c`* unchanged.
5252

53-
There is no return value reserved to indicate an error.
53+
There's no return value reserved to indicate an error.
5454

5555
In order for **`toupper`** to give the expected results, [`__isascii`](isascii-isascii-iswascii.md) and [`islower`](islower-iswlower-islower-l-iswlower-l.md) must both return nonzero.
5656

docs/c-runtime-library/reference/trunc-truncf-truncl.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ The value to truncate.
3232
3333
## Return value
3434
35-
If successful, returns an integer value of *`x`*, rounded towards zero.
35+
If successful, the functions return an integer value of *`x`*, rounded towards zero.
3636
37-
Otherwise, may return one of the following:
37+
Otherwise, the functions may return one of the following values:
3838
3939
|Issue|Return|
4040
|-----------|------------|
@@ -50,7 +50,7 @@ Because C++ allows overloading, you can call overloads of **`trunc`** that take
5050
5151
If you use the \<tgmath.h> `trunc()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../tgmath.md) for details.
5252
53-
Because the largest floating-point values are exact integers, this function will not overflow on its own. However, you may cause the function to overflow by returning a value into an integer type.
53+
Because the largest floating-point values are exact integers, this function won't overflow on its own. However, you may cause the function to overflow by returning a value into an integer type.
5454
5555
You can also round down by implicitly converting from floating-point to integral; however, doing so is limited to the values that can be stored in the target type.
5656

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,21 +47,21 @@ The **`_tzset`** function uses the current setting of the environment variable *
4747
> [!NOTE]
4848
> Take care in computing the sign of the time difference. Because the time difference is the offset from local time to UTC (rather than the reverse), its sign may be the opposite of what you might intuitively expect. For time zones ahead of UTC, the time difference is negative; for those behind UTC, the difference is positive.
4949
50-
For example, to set the **`TZ`** environment variable to correspond to the current time zone in Germany, enter the following on the command line:
50+
For example, to set the **`TZ`** environment variable to correspond to the current time zone in Germany, enter this command on the command line:
5151
5252
> **set TZ=GST-1GDT**
5353
54-
This command uses GST to indicate German standard time, assumes that UTC is one hour behind Germany (or in other words, that Germany is one hour ahead of UTC), and assumes that Germany observes daylight-saving time.
54+
This command uses GST to indicate German standard time. It assumes that UTC is one hour behind Germany (or in other words, that Germany is one hour ahead of UTC). And, it assumes that Germany observes daylight-saving time.
5555
56-
If the **`TZ`** value is not set, **`_tzset`** attempts to use the time zone information specified by the operating system. In the Windows operating system, this information is specified in the Date/Time application in Control Panel. If **`_tzset`** cannot obtain this information, it uses PST8PDT by default, which signifies the Pacific Time zone.
56+
If the **`TZ`** value isn't set, **`_tzset`** attempts to use the time zone information specified by the operating system. In the Windows operating system, this information is specified in the Date/Time application in Control Panel. If **`_tzset`** can't obtain this information, it uses PST8PDT by default, which signifies the Pacific Time zone.
5757
5858
Based on the **`TZ`** environment variable value, the following values are assigned to the global variables `_daylight`, `_timezone`, and `_tzname` when **`_tzset`** is called:
5959
6060
|Global variable|Description|Default value|
6161
|---------------------|-----------------|-------------------|
6262
|`_daylight`|Nonzero value if a daylight-saving-time zone is specified in **`TZ`** setting; otherwise, 0.|1|
63-
|`_timezone`|Difference in seconds between local time and UTC.|28800 (28800 seconds equals 8 hours)|
64-
|`_tzname[0]`|String value of time-zone name from **`TZ`** environmental variable; empty if **`TZ`** has not been set.|PST|
63+
|`_timezone`|Difference in seconds between local time and UTC.|28800 (28,800 seconds equals 8 hours)|
64+
|`_tzname[0]`|String value of time-zone name from **`TZ`** environmental variable; empty if **`TZ`** hasn't been set.|PST|
6565
|`_tzname[1]`|String value of daylight-saving-time zone; empty if daylight-saving-time zone is omitted from **`TZ`** environmental variable.|PDT|
6666
6767
The default values shown in the preceding table for `_daylight` and the `_tzname` array correspond to "PST8PDT." If the DST zone is omitted from the **`TZ`** environmental variable, the value of `_daylight` is 0 and the [`_ftime`](ftime-ftime32-ftime64.md), [`gmtime`](gmtime-gmtime32-gmtime64.md), and [`localtime`](localtime-localtime32-localtime64.md) functions return 0 for their DST flags.

docs/c-runtime-library/reference/uncaught-exception.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ ms.assetid: 4d9b75c6-c9c7-4876-b761-ea9ab1925e96
1212
---
1313
# `__uncaught_exception`
1414

15-
Indicates whether one or more exceptions have been thrown, but have not yet been handled by the corresponding **`catch`** block of a [try-catch](../../cpp/try-throw-and-catch-statements-cpp.md) statement.
15+
Indicates whether one or more exceptions have been thrown, but haven't yet been handled by the corresponding **`catch`** block of a [try-catch](../../cpp/try-throw-and-catch-statements-cpp.md) statement.
1616

1717
## Syntax
1818

docs/c-runtime-library/reference/ungetc-nolock-ungetwc-nolock.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@ Pointer to `FILE` structure.
3737

3838
## Return value
3939

40-
If successful, each of these functions returns the character argument *`c`*. If *`c`* cannot be pushed back or if no character has been read, the input stream is unchanged and **`_ungetc_nolock`** returns `EOF`; **`_ungetwc_nolock`** returns `WEOF`. If *`stream`* is `NULL`, `EOF` or `WEOF` is returned and `errno` is set to `EINVAL`.
40+
If successful, each of these functions returns the character argument *`c`*. If *`c`* can't be pushed back or if no character has been read, the input stream is unchanged and **`_ungetc_nolock`** returns `EOF`; **`_ungetwc_nolock`** returns `WEOF`. If *`stream`* is `NULL`, `EOF` or `WEOF` is returned, and `errno` is set to `EINVAL`.
4141

4242
For information on these and other error codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md).
4343

4444
## Remarks
4545

46-
These functions are non-locking versions of `ungetc` and `ungetwc`. The versions with the `_nolock` suffix are identical except that they are not protected from interference by other threads. They may be faster since they do not incur the overhead of locking out other threads. Use these functions only in thread-safe contexts such as single-threaded applications or where the calling scope already handles thread isolation.
46+
These functions are non-locking versions of `ungetc` and `ungetwc`. The versions with the `_nolock` suffix are identical except that they aren't protected from interference by other threads. They may be faster since they don't incur the overhead of locking out other threads. Use these functions only in thread-safe contexts such as single-threaded applications or where the calling scope already handles thread isolation.
4747

4848
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).
4949

docs/c-runtime-library/reference/ungetc-ungetwc.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Pointer to `FILE` structure.
3737

3838
## Return value
3939

40-
If successful, each of these functions returns the character argument *`c`*. If *`c`* cannot be pushed back or if no character has been read, the input stream is unchanged and **`ungetc`** returns `EOF`; **`ungetwc`** returns `WEOF`. If *`stream`* is `NULL`, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, `EOF` or `WEOF` is returned and `errno` is set to `EINVAL`.
40+
If successful, each of these functions returns the character argument *`c`*. If *`c`* can't be pushed back or if no character has been read, the input stream is unchanged and **`ungetc`** returns `EOF`; **`ungetwc`** returns `WEOF`. If *`stream`* is `NULL`, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, `EOF` or `WEOF` is returned, and `errno` is set to `EINVAL`.
4141

4242
For information on these and other error codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md).
4343

@@ -47,7 +47,7 @@ The **`ungetc`** function pushes the character *`c`* back onto *`stream`* and cl
4747

4848
Characters placed on the stream by **`ungetc`** may be erased if `fflush`, [`fseek`](fseek-fseeki64.md), `fsetpos`, or [`rewind`](rewind.md) is called before the character is read from the stream. The file-position indicator will have the value it had before the characters were pushed back. The external storage corresponding to the stream is unchanged. On a successful **`ungetc`** call against a text stream, the file-position indicator is unspecified until all the pushed-back characters are read or discarded. On each successful **`ungetc`** call against a binary stream, the file-position indicator is decremented; if its value was 0 before a call, the value is undefined after the call.
4949

50-
Results are unpredictable if **`ungetc`** is called twice without a read or file-positioning operation between the two calls. After a call to `fscanf`, a call to **`ungetc`** may fail unless another read operation (such as `getc`) has been performed. This is because `fscanf` itself calls **`ungetc`**.
50+
Results are unpredictable if **`ungetc`** is called twice without a read or file-positioning operation between the two calls. After a call to `fscanf`, a call to **`ungetc`** may fail unless another read operation (such as `getc`) has been performed, because `fscanf` itself calls **`ungetc`**.
5151

5252
**`ungetwc`** is a wide-character version of **`ungetc`**. However, on each successful **`ungetwc`** call against a text or binary stream, the value of the file-position indicator is unspecified until all pushed-back characters are read or discarded.
5353

@@ -68,7 +68,7 @@ By default, this function's global state is scoped to the application. To change
6868
|**`ungetc`**|\<stdio.h>|
6969
|**`ungetwc`**|\<stdio.h> or \<wchar.h>|
7070

71-
The console is not supported in Universal Windows Platform (UWP) apps. The standard stream handles that are associated with the console, `stdin`, `stdout`, and `stderr`, must be redirected before C run-time functions can use them in UWP apps. For more compatibility information, see [Compatibility](../compatibility.md).
71+
The console isn't supported in Universal Windows Platform (UWP) apps. The standard stream handles that are associated with the console, `stdin`, `stdout`, and `stderr`, must be redirected before C run-time functions can use them in UWP apps. For more compatibility information, see [Compatibility](../compatibility.md).
7272

7373
## Example
7474

docs/c-runtime-library/reference/ungetch-ungetwch-ungetch-nolock-ungetwch-nolock.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,13 @@ Character to be pushed.
4141

4242
## Return value
4343

44-
Both functions return the character *`c`* if successful. If there is an error, **`_ungetch`** returns a value of `EOF` and **`_ungetwch`** returns `WEOF`.
44+
Both functions return the character *`c`* if successful. If there's an error, **`_ungetch`** returns a value of `EOF` and **`_ungetwch`** returns `WEOF`.
4545

4646
## Remarks
4747

48-
These functions push the character *`c`* back to the console, causing *`c`* to be the next character read by `_getch` or `_getche` (or `_getwch` or `_getwche`). **`_ungetch`** and **`_ungetwch`** fail if they are called more than once before the next read. The *`c`* argument may not be `EOF` (or `WEOF`).
48+
These functions push the character *`c`* back to the console, causing *`c`* to be the next character read by `_getch` or `_getche` (or `_getwch` or `_getwche`). **`_ungetch`** and **`_ungetwch`** fail if they're called more than once before the next read. The *`c`* argument may not be `EOF` (or `WEOF`).
4949

50-
The versions with the `_nolock` suffix are identical except that they are not protected from interference by other threads. They may be faster since they do not incur the overhead of locking out other threads. Use these functions only in thread-safe contexts such as single-threaded applications or where the calling scope already handles thread isolation.
50+
The versions with the `_nolock` suffix are identical except that they aren't protected from interference by other threads. They may be faster since they don't incur the overhead of locking out other threads. Use these functions only in thread-safe contexts such as single-threaded applications or where the calling scope already handles thread isolation.
5151

5252
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).
5353

docs/c-runtime-library/reference/unlock-file.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ File handle.
2929

3030
## Remarks
3131

32-
The **`_unlock_file`** function unlocks the file specified by *`file`*. Unlocking a file allows access to the file by other processes. This function should not be called unless `_lock_file` was previously called on the *`file`* pointer. Calling **`_unlock_file`** on a file that isn't locked may result in a deadlock. For an example, see [`_lock_file`](lock-file.md).
32+
The **`_unlock_file`** function unlocks the file specified by *`file`*. Unlocking a file allows access to the file by other processes. This function shouldn't be called unless `_lock_file` was previously called on the *`file`* pointer. Calling **`_unlock_file`** on a file that isn't locked may result in a deadlock. For an example, see [`_lock_file`](lock-file.md).
3333

3434
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).
3535

0 commit comments

Comments
 (0)