Skip to content

Commit 5886005

Browse files
authored
Merge pull request #4243 from MicrosoftDocs/main638023159343712646sync_temp
Repo sync for protected CLA branch
2 parents 4c0e735 + 3341a31 commit 5886005

File tree

235 files changed

+7764
-661
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

235 files changed

+7764
-661
lines changed

docs/c-runtime-library/reference/localtime-s-localtime32-s-localtime64-s.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ ms.assetid: 842d1dc7-d6f8-41d3-b340-108d4b90df54
1212
---
1313
# `localtime_s`, `_localtime32_s`, `_localtime64_s`
1414

15-
Converts a **`time_t`** time value to a **`tm`** structure, and corrects for the local time zone. These are versions of [`localtime`, `_localtime32`, `_localtime64`](localtime-localtime32-localtime64.md) with security enhancements as described in [Security features in the CRT](../security-features-in-the-crt.md).
15+
Converts a **`time_t`** time value to a **`tm`** structure, and corrects for the local time zone. These functions are versions of [`localtime`, `_localtime32`, `_localtime64`](localtime-localtime32-localtime64.md) with security enhancements as described in [Security features in the CRT](../security-features-in-the-crt.md).
1616

1717
## Syntax
1818

@@ -41,7 +41,7 @@ Pointer to the stored time.
4141

4242
## Return value
4343

44-
Zero if successful. The return value is an error code if there is a failure. Error codes are defined in *`Errno.h`*. For a listing of these errors, see [`errno`](../errno-doserrno-sys-errlist-and-sys-nerr.md).
44+
Zero if successful. The return value is an error code if there's a failure. Error codes are defined in *`Errno.h`*. For a listing of these errors, see [`errno`](../errno-doserrno-sys-errlist-and-sys-nerr.md).
4545

4646
### Error conditions
4747

@@ -51,20 +51,20 @@ Zero if successful. The return value is an error code if there is a failure. Err
5151
|Not `NULL` (points to valid memory)|`NULL`|`EINVAL`|All fields set to -1|Yes|
5252
|Not `NULL` (points to valid memory)|less than 0 or greater than `_MAX__TIME64_T`|`EINVAL`|All fields set to -1|No|
5353

54-
In the case of the first two error conditions, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, these functions set `errno` to `EINVAL` and return `EINVAL`.
54+
The first two error conditions invoke the invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, these functions set `errno` to `EINVAL` and return `EINVAL`.
5555

5656
## Remarks
5757

58-
The **`localtime_s`** function converts a time stored as a [`time_t`](../standard-types.md) value and stores the result in a structure of type [`tm`](../standard-types.md). The **`time_t`** value *`sourceTime`* represents the seconds elapsed since midnight (00:00:00), January 1, 1970, UTC. This value is usually obtained from the [`time`](time-time32-time64.md) function.
58+
The **`localtime_s`** function converts a time stored as a [`time_t`](../standard-types.md) value and stores the result in a structure of type [`tm`](../standard-types.md). The **`time_t`** value *`sourceTime`* represents the seconds elapsed since midnight (00:00:00), January 1, 1970, UTC. This value is often obtained from the [`time`](time-time32-time64.md) function.
5959

60-
**`localtime_s`** corrects for the local time zone if the user first sets the global environment variable **`TZ`**. When **`TZ`** is set, three other environment variables (**`_timezone`**, **`_daylight`**, and **`_tzname`**) are automatically set as well. If the **`TZ`** variable is not set, **`localtime_s`** attempts to use the time zone information specified in the Date/Time application in Control Panel. If this information cannot be obtained, PST8PDT, which signifies the Pacific time zone, is used by default. See [`_tzset`](tzset.md) for a description of these variables. **`TZ`** is a Microsoft extension and not part of the ANSI standard definition of **`localtime`**.
60+
**`localtime_s`** corrects for the local time zone if the user first sets the global environment variable **`TZ`**. When **`TZ`** is set, three other environment variables (**`_timezone`**, **`_daylight`**, and **`_tzname`**) are automatically set as well. If the **`TZ`** variable isn't set, **`localtime_s`** attempts to use the time zone information specified in the Date/Time application in Control Panel. If this information can't be obtained, PST8PDT, which signifies the Pacific time zone, is used by default. See [`_tzset`](tzset.md) for a description of these variables. **`TZ`** is a Microsoft extension and not part of the ANSI standard definition of **`localtime`**.
6161

6262
> [!NOTE]
6363
> The target environment should try to determine whether daylight saving time is in effect.
6464
6565
**`_localtime64_s`**, which uses the **`__time64_t`** structure, allows dates to be expressed up through 23:59:59, January 18, 3001, coordinated universal time (UTC), whereas **`_localtime32_s`** represents dates through 23:59:59 January 18, 2038, UTC.
6666

67-
**`localtime_s`** is an inline function which evaluates to **`_localtime64_s`**, and **`time_t`** is equivalent to **`__time64_t`**. If you need to force the compiler to interpret **`time_t`** as the old 32-bit **`time_t`**, you can define `_USE_32BIT_TIME_T`. Doing this will cause **`localtime_s`** to evaluate to **`_localtime32_s`**. This is not recommended because your application may fail after January 18, 2038, and it is not allowed on 64-bit platforms.
67+
**`localtime_s`** is an inline function that evaluates to **`_localtime64_s`**, and **`time_t`** is equivalent to **`__time64_t`**. If you need to force the compiler to interpret **`time_t`** as the old 32-bit **`time_t`**, you can define `_USE_32BIT_TIME_T`, which causes **`localtime_s`** to evaluate to **`_localtime32_s`**. We don't recommend `_USE_32BIT_TIME_T`, because your application may fail after January 18, 2038, and it isn't allowed on 64-bit platforms.
6868

6969
The fields of the structure type [`tm`](../standard-types.md) store the following values, each of which is an **`int`**.
7070

@@ -78,7 +78,7 @@ The fields of the structure type [`tm`](../standard-types.md) store the followin
7878
|**`tm_year`**|Year (current year minus 1900).|
7979
|**`tm_wday`**|Day of week (0 - 6; Sunday = 0).|
8080
|**`tm_yday`**|Day of year (0 - 365; January 1 = 0).|
81-
|**`tm_isdst`**|Positive value if daylight saving time is in effect; 0 if daylight saving time is not in effect; negative value if status of daylight saving time is unknown.|
81+
|**`tm_isdst`**|Positive value if daylight saving time is in effect; 0 if daylight saving time isn't in effect; negative value if status of daylight saving time is unknown.|
8282

8383
If the **`TZ`** environment variable is set, the C run-time library assumes rules appropriate to the United States for implementing the calculation of daylight saving time (DST).
8484

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ File handle.
2727
2828
## Remarks
2929
30-
The **`_lock_file`** function locks the `FILE` object specified by *`file`*. The underlying file is not locked by **`_lock_file`**. Use [`_unlock_file`](unlock-file.md) to release the lock on the file. Calls to **`_lock_file`** and **`_unlock_file`** must be matched in a thread.
30+
The **`_lock_file`** function locks the `FILE` object specified by *`file`*. The underlying file isn't locked by **`_lock_file`**. Use [`_unlock_file`](unlock-file.md) to release the lock on the file. Calls to **`_lock_file`** and **`_unlock_file`** must be matched in a thread.
3131
3232
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).
3333

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,26 +43,26 @@ Number of bytes to lock.
4343
|-|-|
4444
| `EACCES` | Locking violation (file already locked or unlocked). |
4545
| `EBADF` | Invalid file descriptor. |
46-
| `EDEADLOCK` | Locking violation. Returned when the `_LK_LOCK` or `_LK_RLCK` flag is specified and the file cannot be locked after 10 attempts. |
46+
| `EDEADLOCK` | Locking violation. Returned when the `_LK_LOCK` or `_LK_RLCK` flag is specified and the file can't be locked after 10 attempts. |
4747
| `EINVAL` | An invalid argument was given to **`_locking`**. |
4848

4949
If the failure is due to a bad parameter, such as an invalid file descriptor, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md).
5050

5151
## Remarks
5252

53-
The **`_locking`** function locks or unlocks *`nbytes`* bytes of the file specified by *`fd`*. Locking bytes in a file prevents access to those bytes by other processes. All locking or unlocking begins at the current position of the file pointer and proceeds for the next *`nbytes`* bytes. It is possible to lock bytes past end of file.
53+
The **`_locking`** function locks or unlocks *`nbytes`* bytes of the file specified by *`fd`*. Locking bytes in a file prevents access to those bytes by other processes. All locking or unlocking begins at the current position of the file pointer and proceeds for the next *`nbytes`* bytes. It's possible to lock bytes past end of file.
5454

5555
*`mode`* must be one of the following manifest constants, which are defined in Locking.h.
5656

5757
|*`mode`* value|Effect|
5858
|-|-|
59-
| `_LK_LOCK` | Locks the specified bytes. If the bytes cannot be locked, the program immediately tries again after 1 second. If, after 10 attempts, the bytes cannot be locked, the constant returns an error. |
60-
| `_LK_NBLCK` | Locks the specified bytes. If the bytes cannot be locked, the constant returns an error. |
59+
| `_LK_LOCK` | Locks the specified bytes. If the bytes can't be locked, the program immediately tries again after 1 second. If the bytes can't be locked after 10 attempts, the constant returns an error. |
60+
| `_LK_NBLCK` | Locks the specified bytes. If the bytes can't be locked, the constant returns an error. |
6161
| `_LK_NBRLCK` | Same as `_LK_NBLCK`. |
6262
| `_LK_RLCK` | Same as `_LK_LOCK`. |
6363
| `_LK_UNLCK` | Unlocks the specified bytes, which must have been previously locked. |
6464

65-
Multiple regions of a file that do not overlap can be locked. A region being unlocked must have been previously locked. **`_locking`** does not merge adjacent regions; if two locked regions are adjacent, each region must be unlocked separately. Regions should be locked only briefly and should be unlocked before closing a file or exiting the program.
65+
Multiple regions of a file that don't overlap can be locked. A region being unlocked must have been previously locked. **`_locking`** doesn't merge adjacent regions; if two locked regions are adjacent, each region must be unlocked separately. Regions should be locked only briefly and should be unlocked before closing a file or exiting the program.
6666

6767
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).
6868

docs/c-runtime-library/reference/log-logf-log10-log10f.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ Value whose logarithm is to be found.
4040
4141
The **`log`** functions return the natural logarithm (base *`e`*) of *`x`* if successful. The **`log10`** functions return the base-10 logarithm. If *`x`* is negative, these functions return an indefinite (`IND`), by default. If *`x`* is 0, they return infinity (`INF`).
4242
43-
|Input|SEH Exception|Matherr Exception|
43+
|Input|SEH Exception|`Matherr` Exception|
4444
|-----------|-------------------|-----------------------|
45-
`QNAN`, `IND`|none|`_DOMAIN`|
45+
|± QNAN, IND|none|`_DOMAIN`|
4646
|± 0|`ZERODIVIDE`|`_SING`|
4747
|*`x < 0`*|`INVALID`|`_DOMAIN`|
4848

docs/c-runtime-library/reference/log1p-log1pf-log1pl2.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,12 @@ Otherwise, may return one of the following values:
5151

5252
|Input|Result|SEH exception|errno|
5353
|-----------|------------|-------------------|-----------|
54-
|+inf|+inf|||
54+
|+INF|+INF|||
5555
|Denormals|Same as input|UNDERFLOW||
5656
|±0|Same as input|||
57-
|-1|-inf|DIVBYZERO|ERANGE|
58-
|< -1|nan|INVALID|EDOM|
59-
|-inf|nan|INVALID|EDOM|
57+
|-1|-INF|DIVBYZERO|ERANGE|
58+
|< -1|NaN|INVALID|EDOM|
59+
|-INF|NaN|INVALID|EDOM|
6060
|±SNaN|Same as input|INVALID||
6161
|±QNaN, indefinite|Same as input|||
6262

docs/c-runtime-library/reference/log2-log2f-log2l.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ The value to determine the base-2 logarithm of.
4545
4646
## Return value
4747
48-
On success, returns return log2 *`x`*.
48+
On success, the functions return the base-2 log of *`x`*.
4949
50-
Otherwise, may return one of the following values:
50+
Otherwise, the functions may return one of the following values:
5151
5252
|Issue|Return|
5353
|-----------|------------|

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,25 +33,25 @@ Value to be returned to `setjmp` call.
3333

3434
## Remarks
3535

36-
The **`longjmp`** function restores a stack environment and execution locale previously saved in *`env`* by `setjmp`. `setjmp` and **`longjmp`** provide a way to execute a nonlocal **`goto`**; they are typically used to pass execution control to error-handling or recovery code in a previously called routine without using the normal call and return conventions.
36+
The **`longjmp`** function restores a stack environment and execution locale previously saved in *`env`* by `setjmp`. `setjmp` and **`longjmp`** provide a way to execute a nonlocal **`goto`**; they're typically used to pass execution control to error-handling or recovery code in a previously called routine without using the normal call and return conventions.
3737

38-
A call to `setjmp` causes the current stack environment to be saved in *`env`*. A subsequent call to **`longjmp`** restores the saved environment and returns control to the point immediately following the corresponding `setjmp` call. Execution resumes as if *`value`* had just been returned by the `setjmp` call. The values of all variables (except register variables) that are accessible to the routine receiving control contain the values they had when **`longjmp`** was called. The values of register variables are unpredictable. The value returned by `setjmp` must be nonzero. If *`value`* is passed as 0, the value 1 is substituted in the actual return.
38+
A call to `setjmp` causes the current stack environment to be saved in *`env`*. A subsequent call to **`longjmp`** restores the saved environment and returns control to the point immediately following the corresponding `setjmp` call. Execution resumes as if *`value`* had been returned by the `setjmp` call. The values of all variables (except register variables) that are accessible to the routine receiving control contain the values they had when **`longjmp`** was called. The values of register variables are unpredictable. The value returned by `setjmp` must be nonzero. If *`value`* is passed as 0, the value 1 is substituted in the actual return.
3939

4040
**Microsoft Specific**
4141

42-
In Microsoft C++ code on Windows, **`longjmp`** uses the same stack-unwinding semantics as exception-handling code. It is safe to use in the same places that C++ exceptions can be raised. However, this usage is not portable, and comes with some important caveats.
42+
In Microsoft C++ code on Windows, **`longjmp`** uses the same stack-unwinding semantics as exception-handling code. It's safe to use in the same places that C++ exceptions can be raised. However, this usage isn't portable, and comes with some important caveats.
4343

4444
Only call **`longjmp`** before the function that called `setjmp` returns; otherwise the results are unpredictable.
4545

4646
Observe the following restrictions when using **`longjmp`**:
4747

48-
- Do not assume that the values of the register variables will remain the same. The values of register variables in the routine calling `setjmp` may not be restored to the proper values after **`longjmp`** is executed.
48+
- Don't assume that the values of the register variables will remain the same. The values of register variables in the routine calling `setjmp` may not be restored to the proper values after **`longjmp`** is executed.
4949

50-
- Do not use **`longjmp`** to transfer control out of an interrupt-handling routine unless the interrupt is caused by a floating-point exception. In this case, a program may return from an interrupt handler via **`longjmp`** if it first reinitializes the floating-point math package by calling [`_fpreset`](fpreset.md).
50+
- Don't use **`longjmp`** to transfer control out of an interrupt-handling routine unless the interrupt is caused by a floating-point exception. In this case, a program may return from an interrupt handler via **`longjmp`** if it first reinitializes the floating-point math package by calling [`_fpreset`](fpreset.md).
5151

52-
- Do not use **`longjmp`** to transfer control from a callback routine invoked directly or indirectly by Windows code.
52+
- Don't use **`longjmp`** to transfer control from a callback routine invoked directly or indirectly by Windows code.
5353

54-
- If the code is compiled by using **/EHs** or **/EHsc** and the function that contains the **`longjmp`** call is **`noexcept`** then local objects in that function may not be destructed during the stack unwind.
54+
- If the code is compiled by using **/EHs** or **/EHsc**, and the function that contains the **`longjmp`** call is **`noexcept`**, then local objects in that function may not be destructed during the stack unwind.
5555

5656
**END Microsoft Specific**
5757

docs/c-runtime-library/reference/lrint-lrintf-lrintl-llrint-llrintf-llrintl.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ Because C++ allows overloading, you can call overloads of **`lrint`** and **`llr
7979
8080
If you use the \<tgmath.h> `llrint()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../tgmath.md) for details.
8181
82-
If *`x`* does not represent the floating-point equivalent of an integral value, these functions raise `FE_INEXACT`.
82+
If *`x`* doesn't represent the floating-point equivalent of an integral value, these functions raise `FE_INEXACT`.
8383
8484
**Microsoft-specific**: When the result is outside the range of the return type, or when the parameter is a NaN or infinity, the return value is implementation defined. The Microsoft compiler returns a zero (0) value.
8585

docs/c-runtime-library/reference/lround-lroundf-lroundl-llround-llroundf-llroundl.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,13 @@ The floating-point value to round.
5959
6060
The **`lround`** and **`llround`** functions return the nearest **`long`** or **`long long`** integer to *`x`*. Halfway values are rounded away from zero, regardless of the setting of the floating-point rounding mode. There's no error return.
6161
62-
|Input|SEH Exception|Matherr Exception|
62+
|Input|SEH Exception|`Matherr` Exception|
6363
|-----------|-------------------|-----------------------|
6464
|± `QNAN`, `IND`|none|`_DOMAIN`|
6565
6666
## Remarks
6767
68-
Because C++ allows overloading, you can call overloads of **`lround`** or **`llround`** that take and return **`float`** and **`long double`** values. In a C program, unless you're using the \<tgmath.h> macro to call this function, **`lround`** and **`llround`** always take and return a **`double`**.
68+
Because C++ allows overloading, you can call **`lround`** or **`llround`** overloads that take and return **`float`** and **`long double`** values. In a C program, unless you're using the \<tgmath.h> macro to call this function, **`lround`** and **`llround`** always take and return a **`double`**.
6969
7070
If you use the \<tgmath.h> `lround()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../tgmath.md) for details.
7171

0 commit comments

Comments
 (0)