Skip to content

Commit 63ccde3

Browse files
author
Colin Robertson
committed
Fix all code blocks
1 parent 6c61e42 commit 63ccde3

File tree

708 files changed

+5815
-5879
lines changed

Some content is hidden

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

708 files changed

+5815
-5879
lines changed

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

+7-7
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ void abort( void );
3939
4040
**Microsoft Specific**
4141
42-
By default, when an app is built with the debug runtime library, the `abort` routine displays an error message before `SIGABRT` is raised. For console apps running in console mode, the message is sent to `STDERR`. Windows desktop apps and console apps running in windowed mode display the message in a message box. To suppress the message, use [_set_abort_behavior](../../c-runtime-library/reference/set-abort-behavior.md) to clear the `_WRITE_ABORT_MSG` flag. The message displayed depends on the version of the runtime environment used. For applications built by using the most recent versions of Visual C++, the message resembles this:
42+
By default, when an app is built with the debug runtime library, the `abort` routine displays an error message before `SIGABRT` is raised. For console apps running in console mode, the message is sent to `STDERR`. Windows desktop apps and console apps running in windowed mode display the message in a message box. To suppress the message, use [_set_abort_behavior](set-abort-behavior.md) to clear the `_WRITE_ABORT_MSG` flag. The message displayed depends on the version of the runtime environment used. For applications built by using the most recent versions of Visual C++, the message resembles this:
4343
4444
> R6010 - abort() has been called
4545
@@ -49,11 +49,11 @@ In previous versions of the C runtime library, this message was displayed:
4949
5050
When the program is compiled in debug mode, the message box displays options to **Abort**, **Retry**, or **Ignore**. If the user chooses **Abort**, the program terminates immediately and returns an exit code of 3. If the user chooses **Retry**, a debugger is invoked for just-in-time debugging, if available. If the user chooses **Ignore**, `abort` continues normal processing.
5151
52-
In both retail and debug builds, `abort` then checks whether an abort signal handler is set. If a non-default signal handler is set, `abort` calls `raise(SIGABRT)`. Use the [signal](../../c-runtime-library/reference/signal.md) function to associate an abort signal handler function with the `SIGABRT` signal. You can perform custom actions—for example, clean up resources or log information—and terminate the app with your own error code in the handler function. If no custom signal handler is defined, `abort` does not raise the `SIGABRT` signal.
52+
In both retail and debug builds, `abort` then checks whether an abort signal handler is set. If a non-default signal handler is set, `abort` calls `raise(SIGABRT)`. Use the [signal](signal.md) function to associate an abort signal handler function with the `SIGABRT` signal. You can perform custom actions—for example, clean up resources or log information—and terminate the app with your own error code in the handler function. If no custom signal handler is defined, `abort` does not raise the `SIGABRT` signal.
5353
5454
By default, in non-debug builds of desktop or console apps, `abort` then invokes the Windows Error Reporting Service mechanism (formerly known as Dr. Watson) to report failures to Microsoft. This behavior can be enabled or disabled by calling `_set_abort_behavior` and setting or masking the `_CALL_REPORTFAULT` flag. When the flag is set, Windows displays a message box that has text something like "A problem caused the program to stop working correctly." The user can choose to invoke a debugger with a **Debug** button, or choose the **Close program** button to terminate the app with an error code that's defined by the operating system.
5555
56-
If the Windows error reporting handler is not invoked, then `abort` calls [_exit](../../c-runtime-library/reference/exit-exit-exit.md) to terminate the process with exit code 3 and returns control to the parent process or the operating system. `_exit` does not flush stream buffers or do `atexit`/`_onexit` processing.
56+
If the Windows error reporting handler is not invoked, then `abort` calls [_exit](exit-exit-exit.md) to terminate the process with exit code 3 and returns control to the parent process or the operating system. `_exit` does not flush stream buffers or do `atexit`/`_onexit` processing.
5757
5858
For more information about CRT debugging, see [CRT Debugging Techniques](/visualstudio/debugger/crt-debugging-techniques).
5959
@@ -107,9 +107,9 @@ File could not be opened: No such file or directory
107107
[abort Function](../../c-language/abort-function-c.md)<br/>
108108
[Process and Environment Control](../../c-runtime-library/process-and-environment-control.md)<br/>
109109
[_exec, _wexec Functions](../../c-runtime-library/exec-wexec-functions.md)<br/>
110-
[exit, _Exit, _exit](../../c-runtime-library/reference/exit-exit-exit.md)<br/>
111-
[raise](../../c-runtime-library/reference/raise.md)<br/>
112-
[signal](../../c-runtime-library/reference/signal.md)<br/>
110+
[exit, _Exit, _exit](exit-exit-exit.md)<br/>
111+
[raise](raise.md)<br/>
112+
[signal](signal.md)<br/>
113113
[_spawn, _wspawn Functions](../../c-runtime-library/spawn-wspawn-functions.md)<br/>
114114
[_DEBUG](../../c-runtime-library/debug.md)<br/>
115-
[_set_abort_behavior](../../c-runtime-library/reference/set-abort-behavior.md)<br/>
115+
[_set_abort_behavior](set-abort-behavior.md)<br/>

docs/c-runtime-library/reference/abs-labs-llabs-abs64.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,6 @@ _abs64(_I64_MIN) returns 0x8000000000000000
126126

127127
[Data Conversion](../../c-runtime-library/data-conversion.md)<br/>
128128
[Floating-Point Support](../../c-runtime-library/floating-point-support.md)<br/>
129-
[_cabs](../../c-runtime-library/reference/cabs.md)<br/>
130-
[fabs, fabsf, fabsl](../../c-runtime-library/reference/fabs-fabsf-fabsl.md)<br/>
131-
[imaxabs](../../c-runtime-library/reference/imaxabs.md)<br/>
129+
[_cabs](cabs.md)<br/>
130+
[fabs, fabsf, fabsl](fabs-fabsf-fabsl.md)<br/>
131+
[imaxabs](imaxabs.md)<br/>

docs/c-runtime-library/reference/access-crt.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ manager: "ghogen"
2121
ms.workload: ["cplusplus"]
2222
---
2323
# access (CRT)
24-
This POSIX function is deprecated. Use the ISO C++ conformant [_access](../../c-runtime-library/reference/access-waccess.md) or security-enhanced [_access_s](../../c-runtime-library/reference/access-s-waccess-s.md) instead.
24+
This POSIX function is deprecated. Use the ISO C++ conformant [_access](access-waccess.md) or security-enhanced [_access_s](access-s-waccess-s.md) instead.

docs/c-runtime-library/reference/access-s-waccess-s.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ ms.workload: ["cplusplus"]
2222
---
2323
# _access_s, _waccess_s
2424

25-
Determines file read/write permissions. This is a version of [_access, _waccess](../../c-runtime-library/reference/access-waccess.md) with security enhancements as described in [Security Features in the CRT](../../c-runtime-library/security-features-in-the-crt.md).
25+
Determines file read/write permissions. This is a version of [_access, _waccess](access-waccess.md) with security enhancements as described in [Security Features in the CRT](../../c-runtime-library/security-features-in-the-crt.md).
2626

2727
## Syntax
2828

@@ -94,7 +94,7 @@ These functions validate their parameters. If *path* is `NULL` or *mode* does no
9494

9595
This example uses `_access_s` to check the file named crt_access_s.c to see whether it exists and whether writing is allowed.
9696

97-
```
97+
```C
9898
// crt_access_s.c
9999

100100
#include <io.h>
@@ -137,8 +137,8 @@ File crt_access_s.c does not have write permission.
137137
## See also
138138

139139
[File Handling](../../c-runtime-library/file-handling.md)<br/>
140-
[_access, _waccess](../../c-runtime-library/reference/access-waccess.md)<br/>
141-
[_chmod, _wchmod](../../c-runtime-library/reference/chmod-wchmod.md)<br/>
142-
[_fstat, _fstat32, _fstat64, _fstati64, _fstat32i64, _fstat64i32](../../c-runtime-library/reference/fstat-fstat32-fstat64-fstati64-fstat32i64-fstat64i32.md)<br/>
143-
[_open, _wopen](../../c-runtime-library/reference/open-wopen.md)<br/>
144-
[_stat, _wstat Functions](../../c-runtime-library/reference/stat-functions.md)<br/>
140+
[_access, _waccess](access-waccess.md)<br/>
141+
[_chmod, _wchmod](chmod-wchmod.md)<br/>
142+
[_fstat, _fstat32, _fstat64, _fstati64, _fstat32i64, _fstat64i32](fstat-fstat32-fstat64-fstati64-fstat32i64-fstat64i32.md)<br/>
143+
[_open, _wopen](open-wopen.md)<br/>
144+
[_stat, _wstat Functions](stat-functions.md)<br/>

docs/c-runtime-library/reference/access-waccess.md

+11-14
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ ms.workload: ["cplusplus"]
2222
---
2323
# _access, _waccess
2424

25-
Determines if a file is read-only or not. More secure versions are available; see [_access_s, _waccess_s](../../c-runtime-library/reference/access-s-waccess-s.md).
25+
Determines if a file is read-only or not. More secure versions are available; see [_access_s, _waccess_s](access-s-waccess-s.md).
2626

2727
## Syntax
2828

@@ -49,14 +49,11 @@ Read/write attribute.
4949

5050
Each function returns 0 if the file has the given mode. The function returns -1 if the named file does not exist or does not have the given mode; in this case, `errno` is set as shown in the following table.
5151

52-
`EACCES`
53-
Access denied: the file's permission setting does not allow specified access.
54-
55-
`ENOENT`
56-
File name or path not found.
57-
58-
`EINVAL`
59-
Invalid parameter.
52+
|||
53+
|-|-|
54+
`EACCES`|Access denied: the file's permission setting does not allow specified access.
55+
`ENOENT`|File name or path not found.
56+
`EINVAL`|Invalid parameter.
6057

6158
For more information about these and other return codes, see [_doserrno, errno, _sys_errlist, and _sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md).
6259

@@ -94,7 +91,7 @@ This function validates its parameters. If *path* is `NULL` or *mode* does not s
9491

9592
The following example uses `_access` to check the file named crt_ACCESS.C to see whether it exists and whether writing is allowed.
9693

97-
```
94+
```C
9895
// crt_access.c
9996
// compile with: /W1
10097
// This example uses _access to check the file named
@@ -127,7 +124,7 @@ File crt_ACCESS.C does not have write permission.
127124
## See also
128125

129126
[File Handling](../../c-runtime-library/file-handling.md)<br/>
130-
[_chmod, _wchmod](../../c-runtime-library/reference/chmod-wchmod.md)<br/>
131-
[_fstat, _fstat32, _fstat64, _fstati64, _fstat32i64, _fstat64i32](../../c-runtime-library/reference/fstat-fstat32-fstat64-fstati64-fstat32i64-fstat64i32.md)<br/>
132-
[_open, _wopen](../../c-runtime-library/reference/open-wopen.md)<br/>
133-
[_stat, _wstat Functions](../../c-runtime-library/reference/stat-functions.md)<br/>
127+
[_chmod, _wchmod](chmod-wchmod.md)<br/>
128+
[_fstat, _fstat32, _fstat64, _fstati64, _fstat32i64, _fstat64i32](fstat-fstat32-fstat64-fstati64-fstat32i64-fstat64i32.md)<br/>
129+
[_open, _wopen](open-wopen.md)<br/>
130+
[_stat, _wstat Functions](stat-functions.md)<br/>

docs/c-runtime-library/reference/acos-acosf-acosl.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,9 @@ Arccosine of 0.000000 = 1.570796
117117
## See also
118118

119119
[Floating-Point Support](../../c-runtime-library/floating-point-support.md)<br/>
120-
[asin, asinf, asinl](../../c-runtime-library/reference/asin-asinf-asinl.md)<br/>
121-
[atan, atanf, atanl, atan2, atan2f, atan2l](../../c-runtime-library/reference/atan-atanf-atanl-atan2-atan2f-atan2l.md)<br/>
122-
[cos, cosf, cosl](../../c-runtime-library/reference/cos-cosf-cosl.md)<br/>
123-
[_matherr](../../c-runtime-library/reference/matherr.md)<br/>
124-
[sin, sinf, sinl](../../c-runtime-library/reference/sin-sinf-sinl.md)<br/>
125-
[tan, tanf, tanl](../../c-runtime-library/reference/tan-tanf-tanl.md)<br/>
120+
[asin, asinf, asinl](asin-asinf-asinl.md)<br/>
121+
[atan, atanf, atanl, atan2, atan2f, atan2l](atan-atanf-atanl-atan2-atan2f-atan2l.md)<br/>
122+
[cos, cosf, cosl](cos-cosf-cosl.md)<br/>
123+
[_matherr](matherr.md)<br/>
124+
[sin, sinf, sinl](sin-sinf-sinl.md)<br/>
125+
[tan, tanf, tanl](tan-tanf-tanl.md)<br/>

docs/c-runtime-library/reference/acosh-acoshf-acoshl.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@ acosh( 1.324609 ) = 0.785398
9494
## See also
9595

9696
[Floating-Point Support](../../c-runtime-library/floating-point-support.md)<br/>
97-
[asinh, asinhf, asinhl](../../c-runtime-library/reference/asinh-asinhf-asinhl.md)<br/>
98-
[atanh, atanhf, atanhl](../../c-runtime-library/reference/atanh-atanhf-atanhl.md)<br/>
99-
[cosh, coshf, coshl](../../c-runtime-library/reference/cosh-coshf-coshl.md)<br/>
100-
[sinh, sinhf, sinhl](../../c-runtime-library/reference/sinh-sinhf-sinhl.md)<br/>
101-
[tanh, tanhf, tanhl](../../c-runtime-library/reference/tanh-tanhf-tanhl.md)<br/>
97+
[asinh, asinhf, asinhl](asinh-asinhf-asinhl.md)<br/>
98+
[atanh, atanhf, atanhl](atanh-atanhf-atanhl.md)<br/>
99+
[cosh, coshf, coshl](cosh-coshf-coshl.md)<br/>
100+
[sinh, sinhf, sinhl](sinh-sinhf-sinhl.md)<br/>
101+
[tanh, tanhf, tanhl](tanh-tanhf-tanhl.md)<br/>

docs/c-runtime-library/reference/aligned-free-dbg.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ ms.workload: ["cplusplus"]
2222
---
2323
# _aligned_free_dbg
2424

25-
Frees a block of memory that was allocated with [_aligned_malloc](../../c-runtime-library/reference/aligned-malloc.md) or [_aligned_offset_malloc](../../c-runtime-library/reference/aligned-offset-malloc.md) (debug only).
25+
Frees a block of memory that was allocated with [_aligned_malloc](aligned-malloc.md) or [_aligned_offset_malloc](aligned-offset-malloc.md) (debug only).
2626

2727
## Syntax
2828

@@ -39,7 +39,7 @@ A pointer to the memory block that was returned to the `_aligned_malloc` or `_al
3939

4040
## Remarks
4141

42-
The `_aligned_free_dbg` function is a debug version of the [_aligned_free](../../c-runtime-library/reference/aligned-free.md) function. When [_DEBUG](../../c-runtime-library/debug.md) is not defined, each call to `_aligned_free_dbg` is reduced to a call to `_aligned_free`. Both `_aligned_free` and `_aligned_free_dbg` free a memory block in the base heap, but `_aligned_free_dbg` accommodates a debugging feature: the ability to keep freed blocks in the heap's linked list to simulate low memory conditions.
42+
The `_aligned_free_dbg` function is a debug version of the [_aligned_free](aligned-free.md) function. When [_DEBUG](../../c-runtime-library/debug.md) is not defined, each call to `_aligned_free_dbg` is reduced to a call to `_aligned_free`. Both `_aligned_free` and `_aligned_free_dbg` free a memory block in the base heap, but `_aligned_free_dbg` accommodates a debugging feature: the ability to keep freed blocks in the heap's linked list to simulate low memory conditions.
4343

4444
`_aligned_free_dbg` performs a validity check on all specified files and block locations before performing the free operation. The application is not expected to provide this information. When a memory block is freed, the debug heap manager automatically checks the integrity of the buffers on either side of the user portion and issues an error report if overwriting has occurred. If the `_CRTDBG_DELAY_FREE_MEM_DF` bit field of the [_crtDbgFlag](../../c-runtime-library/crtdbgflag.md) flag is set, the freed block is filled with the value 0xDD, assigned the `_FREE_BLOCK` block type, and kept in the heap's linked list of memory blocks.
4545

docs/c-runtime-library/reference/aligned-free.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ ms.workload: ["cplusplus"]
2222
---
2323
# _aligned_free
2424

25-
Frees a block of memory that was allocated with [_aligned_malloc](../../c-runtime-library/reference/aligned-malloc.md) or [_aligned_offset_malloc](../../c-runtime-library/reference/aligned-offset-malloc.md).
25+
Frees a block of memory that was allocated with [_aligned_malloc](aligned-malloc.md) or [_aligned_offset_malloc](aligned-offset-malloc.md).
2626

2727
## Syntax
2828

@@ -41,7 +41,7 @@ A pointer to the memory block that was returned to the `_aligned_malloc` or `_al
4141

4242
`_aligned_free` is marked `__declspec(noalias)`, meaning that the function is guaranteed not to modify global variables. For more information, see [noalias](../../cpp/noalias.md).
4343

44-
This function does not validate its parameter, unlike the other _aligned CRT functions. If *memblock* is a `NULL` pointer, this function simply performs no actions. It does not change `errno` and it does not invoke the invalid parameter handler. If an error occurs in the function due to not using _aligned functions previously to allocate the block of memory or a misalignment of memory occurs due to some unforeseen calamity, the function generates a debug report from the [_RPT, _RPTF, _RPTW, _RPTFW Macros](../../c-runtime-library/reference/rpt-rptf-rptw-rptfw-macros.md).
44+
This function does not validate its parameter, unlike the other _aligned CRT functions. If *memblock* is a `NULL` pointer, this function simply performs no actions. It does not change `errno` and it does not invoke the invalid parameter handler. If an error occurs in the function due to not using _aligned functions previously to allocate the block of memory or a misalignment of memory occurs due to some unforeseen calamity, the function generates a debug report from the [_RPT, _RPTF, _RPTW, _RPTFW Macros](rpt-rptf-rptw-rptfw-macros.md).
4545

4646
## Requirements
4747

@@ -51,7 +51,7 @@ This function does not validate its parameter, unlike the other _aligned CRT fun
5151

5252
## Example
5353

54-
For more information, see [_aligned_malloc](../../c-runtime-library/reference/aligned-malloc.md).
54+
For more information, see [_aligned_malloc](aligned-malloc.md).
5555

5656
## See also
5757

docs/c-runtime-library/reference/aligned-malloc-dbg.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ A pointer to the memory block that was allocated or `NULL` if the operation fail
5555

5656
## Remarks
5757

58-
`_aligned_malloc_dbg` is a debug version of the [_aligned_malloc](../../c-runtime-library/reference/aligned-malloc.md) function. When [_DEBUG](../../c-runtime-library/debug.md) is not defined, each call to `_aligned_malloc_dbg` is reduced to a call to `_aligned_malloc`. Both `_aligned_malloc` and `_aligned_malloc_dbg` allocate a block of memory in the base heap, but `_aligned_malloc_dbg` offers several debugging features: buffers on either side of the user portion of the block to test for leaks, and *filename*/*linenumber* information to determine the origin of allocation requests.
58+
`_aligned_malloc_dbg` is a debug version of the [_aligned_malloc](aligned-malloc.md) function. When [_DEBUG](../../c-runtime-library/debug.md) is not defined, each call to `_aligned_malloc_dbg` is reduced to a call to `_aligned_malloc`. Both `_aligned_malloc` and `_aligned_malloc_dbg` allocate a block of memory in the base heap, but `_aligned_malloc_dbg` offers several debugging features: buffers on either side of the user portion of the block to test for leaks, and *filename*/*linenumber* information to determine the origin of allocation requests.
5959

6060
`_aligned_malloc_dbg` allocates the memory block with slightly more space than the requested *size*. The additional space is used by the debug heap manager to link the debug memory blocks and to provide the application with debug header information and overwrite buffers. When the block is allocated, the user portion of the block is filled with the value 0xCD and each of the overwrite buffers are filled with 0xFD.
6161

docs/c-runtime-library/reference/aligned-malloc.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ A pointer to the memory block that was allocated or `NULL` if the operation fail
4747

4848
## Remarks
4949

50-
`_aligned_malloc` is based on [malloc](../../c-runtime-library/reference/malloc.md).
50+
`_aligned_malloc` is based on [malloc](malloc.md).
5151

5252
`_aligned_malloc` is marked `__declspec(noalias)` and `__declspec(restrict)`, meaning that the function is guaranteed not to modify global variables and that the pointer returned is not aliased. For more information, see [noalias](../../cpp/noalias.md) and [restrict](../../cpp/restrict.md).
5353

@@ -61,7 +61,7 @@ This function sets `errno` to `ENOMEM` if the memory allocation failed or if the
6161

6262
## Example
6363

64-
```
64+
```C
6565
// crt_aligned_malloc.c
6666

6767
#include <malloc.h>

docs/c-runtime-library/reference/aligned-msize-dbg.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ Returns the size (in bytes) as an unsigned integer.
5353

5454
The *alignment* and *offset* values must be the same as the values passed to the function that allocated the block.
5555

56-
`_aligned_msize_dbg` is a debug version of the [_aligned_msize](../../c-runtime-library/reference/aligned-msize.md) function. When [_DEBUG](../../c-runtime-library/debug.md) is not defined, each call to `_aligned_msize_dbg` is reduced to a call to `_aligned_msize`. Both `_aligned_msize` and `_aligned_msize_dbg` calculate the size of a memory block in the base heap, but `_aligned_msize_dbg` adds a debugging feature: It includes the buffers on either side of the user portion of the memory block in the returned size.
56+
`_aligned_msize_dbg` is a debug version of the [_aligned_msize](aligned-msize.md) function. When [_DEBUG](../../c-runtime-library/debug.md) is not defined, each call to `_aligned_msize_dbg` is reduced to a call to `_aligned_msize`. Both `_aligned_msize` and `_aligned_msize_dbg` calculate the size of a memory block in the base heap, but `_aligned_msize_dbg` adds a debugging feature: It includes the buffers on either side of the user portion of the memory block in the returned size.
5757

5858
This function validates its parameter. If *memblock* is a null pointer or *alignment* is not a power of 2, `_msize` invokes an invalid parameter handler, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If the error is handled, the function sets `errno` to `EINVAL` and returns -1.
5959

0 commit comments

Comments
 (0)