Skip to content

Commit 5db8930

Browse files
committed
Merging changes synced from https://github.com/MicrosoftDocs/cpp-docs-pr (branch live)
2 parents e12a7ea + 6608f81 commit 5db8930

File tree

3 files changed

+35
-37
lines changed

3 files changed

+35
-37
lines changed

docs/c-runtime-library/crt-library-features.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,13 @@ Using the statically linked CRT implies that any state information saved by the
6565

6666
Because a DLL built by linking to a static CRT has its own CRT state, it isn't recommended to link statically to the CRT in a DLL unless the consequences of this are specifically desired and understood. For example, if you call [`_set_se_translator`](../c-runtime-library/reference/set-se-translator.md) in an executable that loads the DLL linked to its own static CRT, any hardware exceptions generated by the code in the DLL will not be caught by the translator, but hardware exceptions generated by code in the main executable will be caught.
6767

68-
If you're using the **`/clr`** compiler switch, your code will be linked with a static library, msvcmrt.lib. The static library provides a proxy between your managed code and the native CRT. You cannot use the statically linked CRT ( **`/MT`** or **`/MTd`** options) with **`/clr`**. Use the dynamically-linked libraries (**`/MD`** or **`/MDd`**) instead. The pure managed CRT libraries are deprecated in Visual Studio 2015 and unsupported in Visual Studio 2017.
68+
If you're using the **`/clr`** compiler switch, your code will be linked with a static library, `msvcmrt.lib`. The static library provides a proxy between your managed code and the native CRT. You cannot use the statically linked CRT ( **`/MT`** or **`/MTd`** options) with **`/clr`**. Use the dynamically-linked libraries (**`/MD`** or **`/MDd`**) instead. The pure managed CRT libraries are deprecated in Visual Studio 2015 and unsupported in Visual Studio 2017.
6969

7070
For more information on using the CRT with **`/clr`**, see [Mixed (Native and Managed) Assemblies](../dotnet/mixed-native-and-managed-assemblies.md).
7171

7272
To build a debug version of your application, the [`_DEBUG`](../c-runtime-library/debug.md) flag must be defined and the application must be linked with a debug version of one of these libraries. For more information about using the debug versions of the library files, see [CRT Debugging Techniques](/visualstudio/debugger/crt-debugging-techniques).
7373

74-
This version of the CRT isn't fully conformant with the C99 standard. In versions before Visual Studio 2019 version 16.8, the \<tgmath.h> header isn't supported. In all versions, the `CX_LIMITED_RANGE` and `FP_CONTRACT` pragma macros aren't supported. Certain elements such as the meaning of parameter specifiers in standard IO functions use legacy interpretations by default. You can use **`/Zc`** compiler conformance options and specify linker options to control some aspects of library conformance.
74+
This version of the CRT isn't fully conformant with the C99 standard. In versions before Visual Studio 2019 version 16.8, the `<tgmath.h>` header isn't supported. In all versions, the `CX_LIMITED_RANGE` and `FP_CONTRACT` pragma macros aren't supported. Certain elements such as the meaning of parameter specifiers in standard IO functions use legacy interpretations by default. You can use **`/Zc`** compiler conformance options and specify linker options to control some aspects of library conformance.
7575

7676
## C++ Standard Library `.lib` files
7777

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

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,8 @@ api_type: ["DLLExport"]
88
topic_type: ["apiref"]
99
f1_keywords: ["calloc"]
1010
helpviewer_keywords: ["memory allocation, arrays", "calloc function"]
11-
ms.assetid: 17bb79a1-98cf-4096-90cb-1f9365cd6829
1211
---
13-
# calloc
12+
# `calloc`
1413

1514
Allocates an array in memory with elements initialized to 0.
1615

@@ -25,43 +24,43 @@ void *calloc(
2524

2625
### Parameters
2726

28-
*number*<br/>
27+
*`number`*\
2928
Number of elements.
3029

31-
*size*<br/>
30+
*`size`*\
3231
Length in bytes of each element.
3332

3433
## Return Value
3534

36-
**calloc** returns a pointer to the allocated space. The storage space pointed to by the return value is guaranteed to be suitably aligned for storage of any type of object. To get a pointer to a type other than **`void`**, use a type cast on the return value.
35+
**`calloc`** returns a pointer to the allocated space. The storage space pointed to by the return value is guaranteed to be suitably aligned for storage of any type of object. To get a pointer to a type other than **`void`**, use a type cast on the return value.
3736

3837
## Remarks
3938

40-
The **calloc** function allocates storage space for an array of *number* elements, each of length *size* bytes. Each element is initialized to 0.
39+
The **`calloc`** function allocates storage space for an array of *`number`* elements, each of length *`size`* bytes. Each element is initialized to 0.
4140

42-
**calloc** sets **errno** to **ENOMEM** if a memory allocation fails or if the amount of memory requested exceeds **_HEAP_MAXREQ**. For information on this and other error codes, see [errno, _doserrno, _sys_errlist, and _sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md).
41+
**`calloc`** sets **`errno`** to **`ENOMEM`** if a memory allocation fails or if the amount of memory requested exceeds **`_HEAP_MAXREQ`**. For information on this and other error codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md).
4342

44-
In the Microsoft implementation, if *number* or *size* is zero, **calloc** returns a pointer to an allocated block of non-zero size. An attempt to read or write through the returned pointer leads to undefined behavior.
43+
In the Microsoft implementation, if *`number`* or *`size`* is zero, **`calloc`** returns a pointer to an allocated block of non-zero size. An attempt to read or write through the returned pointer leads to undefined behavior.
4544

46-
**calloc** uses the C++ [_set_new_mode](set-new-mode.md) function to set the *new handler mode*. The new handler mode indicates whether, on failure, **calloc** is to call the new handler routine as set by [_set_new_handler](set-new-handler.md). By default, **calloc** doesn't call the new handler routine on failure to allocate memory. You can override this default behavior so that, when **calloc** fails to allocate memory, it calls the new handler routine in the same way that the **`new`** operator does when it fails for the same reason. To override the default, call
45+
**`calloc`** uses the C++ [`_set_new_mode`](set-new-mode.md) function to set the *new handler mode*. The new handler mode indicates whether, on failure, **`calloc`** is to call the new handler routine as set by [`_set_new_handler`](set-new-handler.md). By default, **`calloc`** doesn't call the new handler routine on failure to allocate memory. You can override this default behavior so that, when **`calloc`** fails to allocate memory, it calls the new handler routine in the same way that the **`new`** operator does when it fails for the same reason. To override the default, call
4746

4847
```C
4948
_set_new_mode(1);
5049
```
5150
52-
early in your program, or link with *NEWMODE.OBJ* (see [Link Options](../../c-runtime-library/link-options.md)).
51+
early in your program, or link with *`NEWMODE.OBJ`* (see [Link Options](../../c-runtime-library/link-options.md)).
5352
54-
When the application is linked with a debug version of the C run-time libraries, **calloc** resolves to [_calloc_dbg](calloc-dbg.md). For more information about how the heap is managed during the debugging process, see [The CRT Debug Heap](/visualstudio/debugger/crt-debug-heap-details).
53+
When the application is linked with a debug version of the C run-time libraries, **`calloc`** resolves to [`_calloc_dbg`](calloc-dbg.md). For more information about how the heap is managed during the debugging process, see [The CRT Debug Heap](/visualstudio/debugger/crt-debug-heap-details).
5554
56-
**calloc** is marked `__declspec(noalias)` and `__declspec(restrict)`, meaning that the function is guaranteed not to modify global variables, and that the pointer returned isn't aliased. For more information, see [noalias](../../cpp/noalias.md) and [restrict](../../cpp/restrict.md).
55+
**`calloc`** is marked `__declspec(noalias)` and `__declspec(restrict)`, meaning that the function is guaranteed not to modify global variables, and that the pointer returned isn't aliased. For more information, see [`noalias`](../../cpp/noalias.md) and [`restrict`](../../cpp/restrict.md).
5756
5857
By default, this function's global state is scoped to the application. To change this, see [Global state in the CRT](../global-state.md).
5958
6059
## Requirements
6160
6261
|Routine|Required header|
6362
|-------------|---------------------|
64-
|**calloc**|\<stdlib.h> and \<malloc.h>|
63+
|**`calloc`**|`<stdlib.h>` and `<malloc.h>`|
6564
6665
For additional compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md).
6766
@@ -94,7 +93,7 @@ Allocated 40 long integers
9493

9594
## See also
9695

97-
[Memory Allocation](../../c-runtime-library/memory-allocation.md)<br/>
98-
[free](free.md)<br/>
99-
[malloc](malloc.md)<br/>
100-
[realloc](realloc.md)<br/>
96+
[Memory Allocation](../../c-runtime-library/memory-allocation.md)\
97+
[`free`](free.md)\
98+
[`malloc`](malloc.md)\
99+
[`realloc`](realloc.md)\

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

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,8 @@ api_type: ["DLLExport"]
88
topic_type: ["apiref"]
99
f1_keywords: ["logf", "logl", "_log10l", "log", "_logl", "log10f", "log10l", "log10"]
1010
helpviewer_keywords: ["calculating logarithms", "log10f function", "log10 function", "log function", "log10l function", "logl function", "logf function", "logarithms"]
11-
ms.assetid: 7adc77c2-04f7-4245-a980-21215563cfae
1211
---
13-
# log, logf, logl, log10, log10f, log10l
12+
# `log`, `logf`, `logl`, `log10`, `log10f`, `log10l`
1413

1514
Calculates logarithms.
1615

@@ -34,35 +33,35 @@ long double log10(long double x); // C++ only
3433
3534
### Parameters
3635
37-
*x*\
36+
*`x`*\
3837
Value whose logarithm is to be found.
3938
4039
## Return Value
4140
42-
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).
41+
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`).
4342
4443
|Input|SEH Exception|Matherr Exception|
4544
|-----------|-------------------|-----------------------|
46-
|± QNAN, IND|none|_DOMAIN|
47-
|± 0|ZERODIVIDE|_SING|
48-
|*x* < 0|INVALID|_DOMAIN|
45+
`QNAN`, `IND`|none|`_DOMAIN`|
46+
|± 0|`ZERODIVIDE`|`_SING`|
47+
|*`x < 0`*|`INVALID`|`_DOMAIN`|
4948
50-
**log** and **log10** have an implementation that uses Streaming SIMD Extensions 2 (SSE2). See [_set_SSE2_enable](set-sse2-enable.md) for information and restrictions on using the SSE2 implementation.
49+
**`log`** and **`log10`** have an implementation that uses Streaming SIMD Extensions 2 (SSE2). See [`_set_SSE2_enable`](set-sse2-enable.md) for information and restrictions on using the SSE2 implementation.
5150
5251
## Remarks
5352
54-
C++ allows overloading, so you can call overloads of **log** and **log10** that take and return **`float`** or **`long double`** values. In a C program, unless you're using the \<tgmath.h> macro to call this function, **log** and **log10** always take and return a **`double`**.
53+
C++ allows overloading, so you can call overloads of **`log`** and **`log10`** that take and return **`float`** or **`long double`** values. In a C program, unless you're using the `<tgmath.h>` macro to call this function, **`log`** and **`log10`** always take and return a **`double`**.
5554
56-
If you use the \<tgmath.h> `log()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../../c-runtime-library/tgmath.md) for details.
55+
If you use the `<tgmath.h> log()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../../c-runtime-library/tgmath.md) for details.
5756
5857
By default, this function's global state is scoped to the application. To change this, see [Global state in the CRT](../global-state.md).
5958
6059
## Requirements
6160
6261
|Routine|Required header|
6362
|-------------|---------------------|
64-
|**log**, **logf**, **logl**, **log10**, **log10f**, **log10l**|\<math.h>|
65-
|**log** macro | \<tgmath.h> |
63+
|**`log`**, **`logf`**, **`logl`**, **`log10`**, **`log10f`**, **`log10l`**|`<math.h>`|
64+
|**`log`** macro | `<tgmath.h>` |
6665
6766
For additional compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md).
6867
@@ -123,9 +122,9 @@ Log base 2 of 65536.000000 is 16.000000
123122

124123
## See also
125124

126-
[Floating-Point Support](../../c-runtime-library/floating-point-support.md) <br/>
127-
[exp, expf, expl](exp-expf.md) <br/>
128-
[_matherr](matherr.md) <br/>
129-
[pow, powf, powl](pow-powf-powl.md) <br/>
130-
[_CIlog](../../c-runtime-library/cilog.md) <br/>
131-
[_CIlog10](../../c-runtime-library/cilog10.md)<br/>
125+
[Floating-Point Support](../../c-runtime-library/floating-point-support.md) \
126+
[`exp`, `expf`, `expl`](exp-expf.md) \
127+
[`_matherr`](matherr.md) \
128+
[`pow`, `powf`, `powl`](pow-powf-powl.md) \
129+
[`_CIlog`](../../c-runtime-library/cilog.md) \
130+
[`_CIlog10`](../../c-runtime-library/cilog10.md)\

0 commit comments

Comments
 (0)