Skip to content

Commit fb52004

Browse files
US1907300 - add md code escapes to code elements - PR16 (#4127)
* US1907300 - add md code escapes to code elements - PR16 * US1907300 - add md code escapes to code elements - PR16 * changes after review
1 parent de44955 commit fb52004

12 files changed

Lines changed: 775 additions & 786 deletions

File tree

docs/c-runtime-library/process-and-environment-control.md

Lines changed: 54 additions & 55 deletions
Large diffs are not rendered by default.

docs/c-runtime-library/reference/chdir-wchdir.md

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,8 @@ api_type: ["DLLExport"]
88
topic_type: ["apiref"]
99
f1_keywords: ["tchdir", "_chdir", "_wchdir", "_tchdir", "wchdir"]
1010
helpviewer_keywords: ["_tchdir function", "_chdir function", "_wchdir function", "tchdir function", "wchdir function", "chdir function", "directories [C++], changing"]
11-
ms.assetid: 85e9393b-62ac-45d5-ab2a-fa2217f6152e
1211
---
13-
# _chdir, _wchdir
12+
# `_chdir`, `_wchdir`
1413

1514
Changes the current working directory.
1615

@@ -27,39 +26,39 @@ int _wchdir(
2726

2827
### Parameters
2928

30-
*dirname*<br/>
29+
*`dirname`*\
3130
Path of new working directory.
3231

3332
## Return Value
3433

35-
These functions return a value of 0 if successful. A return value of -1 indicates failure. If the specified path could not be found, **errno** is set to **ENOENT**. If *dirname* is **NULL**, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, **errno** is set to **EINVAL** and the function returns -1.
34+
These functions return a value of 0 if successful. A return value of -1 indicates failure. If the specified path couldn't be found, **`errno`** is set to **`ENOENT`**. If *`dirname`* is **`NULL`**, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, **`errno`** is set to **`EINVAL`** and the function returns -1.
3635

3736
## Remarks
3837

39-
The **_chdir** function changes the current working directory to the directory specified by *dirname*. The *dirname* parameter must refer to an existing directory. This function can change the current working directory on any drive. If a new drive letter is specified in *dirname*, the default drive letter is changed as well. For example, if A is the default drive letter and \BIN is the current working directory, the following call changes the current working directory for drive C and establishes C as the new default drive:
38+
The **`_chdir`** function changes the current working directory to the directory specified by *`dirname`*. The *`dirname`* parameter must refer to an existing directory. This function can change the current working directory on any drive. If a new drive letter is specified in *`dirname`*, the default drive letter is changed as well. For example, if A is the default drive letter and \BIN is the current working directory, the following call changes the current working directory for drive C and establishes C as the new default drive:
4039

4140
```C
4241
_chdir("c:\temp");
4342
```
4443
4544
When you use the optional backslash character (**`\`**) in paths, you must place two backslashes (**`\\`**) in a C string literal to represent a single backslash (**`\`**).
4645
47-
**_wchdir** is a wide-character version of **_chdir**; the *dirname* argument to **_wchdir** is a wide-character string. **_wchdir** and **_chdir** behave identically otherwise.
46+
**`_wchdir`** is a wide-character version of **`_chdir`**; the *`dirname`* argument to **`_wchdir`** is a wide-character string. **`_wchdir`** and **`_chdir`** behave identically otherwise.
4847
4948
By default, this function's global state is scoped to the application. To change this, see [Global state in the CRT](../global-state.md).
5049
5150
### Generic-Text Routine Mapping:
5251
53-
|Tchar.h routine|_UNICODE and _MBCS not defined|_MBCS defined|_UNICODE defined|
52+
|`Tchar.h` routine|`_UNICODE and _MBCS` not defined|`_MBCS` defined|`_UNICODE` defined|
5453
|---------------------|--------------------------------------|--------------------|-----------------------|
55-
|**_tchdir**|**_chdir**|**_chdir**|**_wchdir**|
54+
|**`_tchdir`**|**`_chdir`**|**`_chdir`**|**`_wchdir`**|
5655
5756
## Requirements
5857
5958
|Routine|Required header|Optional header|
6059
|-------------|---------------------|---------------------|
61-
|**_chdir**|\<direct.h>|\<errno.h>|
62-
|**_wchdir**|\<direct.h> or \<wchar.h>|\<errno.h>|
60+
|**`_chdir`**|`<direct.h>`|`<errno.h>`|
61+
|**`_wchdir`**|`<direct.h>` or `<wchar.h>`|`<errno.h>`|
6362
6463
For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md).
6564
@@ -124,7 +123,7 @@ Directory of c:\windows
124123

125124
## See also
126125

127-
[Directory Control](../../c-runtime-library/directory-control.md)<br/>
128-
[_mkdir, _wmkdir](mkdir-wmkdir.md)<br/>
129-
[_rmdir, _wrmdir](rmdir-wrmdir.md)<br/>
130-
[system, _wsystem](system-wsystem.md)<br/>
126+
[Directory Control](../../c-runtime-library/directory-control.md)\
127+
[`_mkdir`, `_wmkdir`](mkdir-wmkdir.md)\
128+
[`_rmdir`, `_wrmdir`](rmdir-wrmdir.md)\
129+
[`system`, `_wsystem`](system-wsystem.md)

docs/c-runtime-library/reference/fmod-fmodf.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,11 @@ Floating-point values.
4747
4848
## Return Value
4949
50-
**`fmod`** returns the floating-point remainder of *`x`* / *`y`*. If the value of *`y`* is 0.0, **`fmod`** returns a quiet NaN. For information about representation of a quiet NaN by the **`printf`** family, see [printf](printf-printf-l-wprintf-wprintf-l.md).
50+
**`fmod`** returns the floating-point remainder of `x / y`. If the value of *`y`* is 0.0, **`fmod`** returns a quiet `NaN`. For information about representation of a quiet `NaN` by the **`printf`** family, see [`printf`](printf-printf-l-wprintf-wprintf-l.md).
5151
5252
## Remarks
5353
54-
The **`fmod`** function calculates the floating-point remainder *f* of *`x`* / *`y`* such that *`x`* = *i* \* *`y`* + *`f`*, where *`i`* is an integer, *`f`* has the same sign as *`x`*, and the absolute value of *`f`* is less than the absolute value of *`y`*.
54+
The **`fmod`** function calculates the floating-point remainder *`f`* of `x / y` such that `x = i * y + f`, where *`i`* is an integer, *`f`* has the same sign as *`x`*, and the absolute value of *`f`* is less than the absolute value of *`y`*.
5555
5656
C++ allows overloading, so you can call overloads of **`fmod`** 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, **`fmod`** always takes two **`double`** arguments and returns a **`double`**.
5757

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

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,8 @@ api_type: ["DLLExport"]
88
topic_type: ["apiref"]
99
f1_keywords: ["free"]
1010
helpviewer_keywords: ["memory blocks, deallocating", "free function"]
11-
ms.assetid: 74ded9cf-1863-432e-9306-327a42080bb8
1211
---
13-
# free
12+
# `free`
1413

1514
Deallocates or frees a memory block.
1615

@@ -24,44 +23,44 @@ void free(
2423

2524
### Parameters
2625

27-
*memblock*<br/>
26+
*`memblock`*\
2827
Previously allocated memory block to be freed.
2928

3029
## Remarks
3130

32-
The **free** function deallocates a memory block (*memblock*) that was previously allocated by a call to **calloc**, **malloc**, or **realloc**. The number of freed bytes is equivalent to the number of bytes requested when the block was allocated (or reallocated, in the case of **realloc**). If *memblock* is **NULL**, the pointer is ignored and **free** immediately returns. Attempting to free an invalid pointer (a pointer to a memory block that was not allocated by **calloc**, **malloc**, or **realloc**) may affect subsequent allocation requests and cause errors.
31+
The **`free`** function deallocates a memory block (*`memblock`*) that was previously allocated by a call to **`calloc`**, **`malloc`**, or **`realloc`**. The number of freed bytes is equivalent to the number of bytes requested when the block was allocated (or reallocated, in the case of **`realloc`**). If *`memblock`* is **`NULL`**, the pointer is ignored and **`free`** immediately returns. Attempting to free an invalid pointer (a pointer to a memory block that wasn't allocated by **`calloc`**, **`malloc`**, or **`realloc`**) may affect subsequent allocation requests and cause errors.
3332

34-
If an error occurs in freeing the memory, **errno** is set with information from the operating system on the nature of the failure. For more information, see [errno, _doserrno, _sys_errlist, and _sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md).
33+
If an error occurs in freeing the memory, **`errno`** is set with information from the operating system on the nature of the failure. For more information, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md).
3534

36-
After a memory block has been freed, [_heapmin](heapmin.md) minimizes the amount of free memory on the heap by coalescing the unused regions and releasing them back to the operating system. Freed memory that is not released to the operating system is restored to the free pool and is available for allocation again.
35+
After a memory block has been freed, [`_heapmin`](heapmin.md) minimizes the amount of free memory on the heap by coalescing the unused regions and releasing them back to the operating system. Freed memory that isn't released to the operating system is restored to the free pool and is available for allocation again.
3736

38-
When the application is linked with a debug version of the C run-time libraries, **free** resolves to [_free_dbg](free-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).
37+
When the application is linked with a debug version of the C run-time libraries, **`free`** resolves to [`_free_dbg`](free-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).
3938

40-
**free** is marked `__declspec(noalias)`, meaning that the function is guaranteed not to modify global variables. For more information, see [noalias](../../cpp/noalias.md).
39+
**`free`** is marked `__declspec(noalias)`, meaning that the function is guaranteed not to modify global variables. For more information, see [`noalias`](../../cpp/noalias.md).
4140

42-
To free memory allocated with [_malloca](malloca.md), use [_freea](freea.md).
41+
To free memory allocated with [`_malloca`](malloca.md), use [`_freea`](freea.md).
4342

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

4645
## Requirements
4746

4847
|Function|Required header|
4948
|--------------|---------------------|
50-
|**free**|\<stdlib.h> and \<malloc.h>|
49+
|**`free`**|`<stdlib.h>` and `<malloc.h>`|
5150

5251
For additional compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md).
5352

5453
## Example
5554

56-
See the example for [malloc](malloc.md).
55+
See the example for [`malloc`](malloc.md).
5756

5857
## See also
5958

60-
[Memory Allocation](../../c-runtime-library/memory-allocation.md)<br/>
61-
[_alloca](alloca.md)<br/>
62-
[calloc](calloc.md)<br/>
63-
[malloc](malloc.md)<br/>
64-
[realloc](realloc.md)<br/>
65-
[_free_dbg](free-dbg.md)<br/>
66-
[_heapmin](heapmin.md)<br/>
67-
[_freea](freea.md)<br/>
59+
[Memory Allocation](../../c-runtime-library/memory-allocation.md)\
60+
[`_alloca`](alloca.md)\
61+
[`calloc`](calloc.md)\
62+
[`malloc`](malloc.md)\
63+
[`realloc`](realloc.md)\
64+
[`_free_dbg`](free-dbg.md)\
65+
[`_heapmin`](heapmin.md)\
66+
[`_freea`](freea.md)

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

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,8 @@ api_type: ["DLLExport"]
88
topic_type: ["apiref"]
99
f1_keywords: ["_getpid"]
1010
helpviewer_keywords: ["getpid function", "_getpid function", "process identification numbers"]
11-
ms.assetid: d3e13bae-9a0c-4f33-86d3-ec9df9519285
1211
---
13-
# _getpid
12+
# `_getpid`
1413

1514
Gets the process identification.
1615

@@ -29,13 +28,13 @@ Returns the process ID obtained from the system. There's no error return.
2928
3029
## Remarks
3130
32-
The **_getpid** function obtains the process ID from the system. The process ID uniquely identifies the calling process.
31+
The **`_getpid`** function obtains the process ID from the system. The process ID uniquely identifies the calling process.
3332
3433
## Requirements
3534
3635
|Routine|Required header|
3736
|-------------|---------------------|
38-
|**_getpid**|\<process.h>|
37+
|**`_getpid`**|`<process.h>`|
3938
4039
For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md).
4140
@@ -64,5 +63,5 @@ Process id: 3584
6463

6564
## See also
6665

67-
[Process and Environment Control](../../c-runtime-library/process-and-environment-control.md)<br/>
68-
[_mktemp, _wmktemp](mktemp-wmktemp.md)<br/>
66+
[Process and Environment Control](../../c-runtime-library/process-and-environment-control.md)\
67+
[`_mktemp`, `_wmktemp`](mktemp-wmktemp.md)

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

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,8 @@ api_type: ["DLLExport"]
88
topic_type: ["apiref"]
99
f1_keywords: ["msize", "_msize"]
1010
helpviewer_keywords: ["memory blocks", "msize function", "_msize function"]
11-
ms.assetid: 02b1f89e-d0d7-4f12-938a-9eeba48a0f88
1211
---
13-
# _msize
12+
# `_msize`
1413

1514
Returns the size of a memory block allocated in the heap.
1615

@@ -24,28 +23,28 @@ size_t _msize(
2423

2524
### Parameters
2625

27-
*memblock*<br/>
26+
*`memblock`*\
2827
Pointer to the memory block.
2928

3029
## Return Value
3130

32-
**_msize** returns the size (in bytes) as an unsigned integer.
31+
**`_msize`** returns the size (in bytes) as an unsigned integer.
3332

3433
## Remarks
3534

36-
The **_msize** function returns the size, in bytes, of the memory block allocated by a call to **calloc**, **malloc**, or **realloc**.
35+
The **`_msize`** function returns the size, in bytes, of the memory block allocated by a call to **`calloc`**, **`malloc`**, or **`realloc`**.
3736

38-
When the application is linked with a debug version of the C run-time libraries, **_msize** resolves to [_msize_dbg](msize-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).
37+
When the application is linked with a debug version of the C run-time libraries, **`_msize`** resolves to [`_msize_dbg`](msize-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).
3938

40-
This function validates its parameter. If *memblock* is a null pointer, **_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.
39+
This function validates its parameter. If *`memblock`* is a `NULL` pointer, **`_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.
4140

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

4443
## Requirements
4544

4645
|Routine|Required header|
4746
|-------------|---------------------|
48-
|**_msize**|\<malloc.h>|
47+
|**`_msize`**|`<malloc.h>`|
4948

5049
For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md).
5150

@@ -55,12 +54,12 @@ All versions of the [C run-time libraries](../../c-runtime-library/crt-library-f
5554

5655
## Example
5756

58-
See the example for [realloc](realloc.md).
57+
See the example for [`realloc`](realloc.md).
5958

6059
## See also
6160

62-
[Memory Allocation](../../c-runtime-library/memory-allocation.md)<br/>
63-
[calloc](calloc.md)<br/>
64-
[_expand](expand.md)<br/>
65-
[malloc](malloc.md)<br/>
66-
[realloc](realloc.md)<br/>
61+
[Memory Allocation](../../c-runtime-library/memory-allocation.md)\
62+
[`calloc`](calloc.md)\
63+
[`_expand`](expand.md)\
64+
[`malloc`](malloc.md)\
65+
[`realloc`](realloc.md)

docs/c-runtime-library/reference/security-init-cookie.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,8 @@ api_type: ["DLLExport"]
88
topic_type: ["apiref"]
99
f1_keywords: ["security_init_cookie", "__security_init_cookie"]
1010
helpviewer_keywords: ["security cookie [C++]", "__security_init_cookie function", "security_init_cookie function", "global security cookie"]
11-
ms.assetid: 32119905-0897-4a1c-84ca-bffd16c9b2af
1211
---
13-
# __security_init_cookie
12+
# `__security_init_cookie`
1413

1514
Initializes the global security cookie.
1615

@@ -24,9 +23,9 @@ void __security_init_cookie(void);
2423
2524
The global security cookie is used for buffer overrun protection in code compiled with [/GS (Buffer Security Check)](../../build/reference/gs-buffer-security-check.md) and in code that uses exception handling. On entry to an overrun-protected function, the cookie is put on the stack, and on exit, the value on the stack is compared with the global cookie. Any difference between them indicates that a buffer overrun has occurred and causes immediate termination of the program.
2625
27-
Normally, **__security_init_cookie** is called by the CRT when it is initialized. If you bypass CRT initialization—for example, if you use [/ENTRY](../../build/reference/entry-entry-point-symbol.md) to specify an entry-point—then you must call **__security_init_cookie** yourself. If **__security_init_cookie** is not called, the global security cookie is set to a default value and buffer overrun protection is compromised. Because an attacker can exploit this default cookie value to defeat the buffer overrun checks, we recommend that you always call **__security_init_cookie** when you define your own entry point.
26+
Normally, **`__security_init_cookie`** is called by the CRT when it's initialized. If you bypass CRT initialization—for example, if you use [`/ENTRY`](../../build/reference/entry-entry-point-symbol.md) to specify an entry-point—then you must call **`__security_init_cookie`** yourself. If **`__security_init_cookie`** isn't called, the global security cookie is set to a default value and buffer overrun protection is compromised. Because an attacker can exploit this default cookie value to defeat the buffer overrun checks, we recommend that you always call **`__security_init_cookie`** when you define your own entry point.
2827
29-
The call to **__security_init_cookie** must be made before any overrun-protected function is entered; otherwise a spurious buffer overrun will be detected. For more information, see [C Runtime Error R6035](../../error-messages/tool-errors/c-runtime-error-r6035.md).
28+
The call to **`__security_init_cookie`** must be made before any overrun-protected function is entered; otherwise a spurious buffer overrun will be detected. For more information, see [C Runtime Error R6035](../../error-messages/tool-errors/c-runtime-error-r6035.md).
3029
3130
## Example
3231
@@ -36,9 +35,9 @@ See the examples in [C Runtime Error R6035](../../error-messages/tool-errors/c-r
3635
3736
|Routine|Required header|
3837
|-------------|---------------------|
39-
|**__security_init_cookie**|\<process.h>|
38+
|**`__security_init_cookie`**|`<process.h>`|
4039
41-
**__security_init_cookie** is a Microsoft extension to the standard C Runtime Library. For compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md).
40+
**`__security_init_cookie`** is a Microsoft extension to the standard C Runtime Library. For compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md).
4241
4342
## See also
4443

0 commit comments

Comments
 (0)