Skip to content

Commit 24d6b2b

Browse files
author
Colin Robertson
authored
Bulk fix: overhaul of keyword formatting, first pass - styled as code (#2896)
* Try new keyword formatting * Add alignas alignof
1 parent 58b6f68 commit 24d6b2b

424 files changed

Lines changed: 940 additions & 940 deletions

File tree

Some content is hidden

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

docs/atl-mfc-shared/basic-cstring-operations.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ CString cs("meow");
8585
wcout << (const wchar_t*) cs << endl;
8686
```
8787
88-
Without the cast, `cs` is treated as a `void*` and `wcout` prints the address of the object. This behavior is caused by subtle interactions between template argument deduction and overload resolution which are in themselves correct and conformant with the C++ standard.
88+
Without the cast, `cs` is treated as a **`void*`** and `wcout` prints the address of the object. This behavior is caused by subtle interactions between template argument deduction and overload resolution which are in themselves correct and conformant with the C++ standard.
8989
9090
## See also
9191

docs/atl-mfc-shared/memory-management-with-cstringt.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ms.assetid: 88b8342d-19b5-48c4-9cf6-e4c44cece21e
66
---
77
# Memory Management with CStringT
88

9-
Class [CStringT](../atl-mfc-shared/reference/cstringt-class.md) is a template class used to manipulate variable-length character strings. The memory to hold these strings is allocated and released through a string manager object, associated with each instance of `CStringT`. MFC and ATL provide default instantiations of `CStringT`, called `CString`, `CStringA`, and `CStringW`, which manipulate strings of different character types. These character types are of type TCHAR, **char**, and `wchar_t`, respectively. These default string types use a string manager that allocates memory from the process heap (in ATL) or the CRT heap (in MFC). For typical applications, this memory allocation scheme is sufficient. However, for code making intensive use of strings (or multithreaded code) the default memory managers may not perform optimally. This topic describes how to override the default memory management behavior of `CStringT`, creating allocators specifically optimized for the task at hand.
9+
Class [CStringT](../atl-mfc-shared/reference/cstringt-class.md) is a template class used to manipulate variable-length character strings. The memory to hold these strings is allocated and released through a string manager object, associated with each instance of `CStringT`. MFC and ATL provide default instantiations of `CStringT`, called `CString`, `CStringA`, and `CStringW`, which manipulate strings of different character types. These character types are of type TCHAR, **char**, and **`wchar_t`**, respectively. These default string types use a string manager that allocates memory from the process heap (in ATL) or the CRT heap (in MFC). For typical applications, this memory allocation scheme is sufficient. However, for code making intensive use of strings (or multithreaded code) the default memory managers may not perform optimally. This topic describes how to override the default memory management behavior of `CStringT`, creating allocators specifically optimized for the task at hand.
1010

1111
- [Implementation of a Custom String Manager (Basic Method)](../atl-mfc-shared/implementation-of-a-custom-string-manager-basic-method.md)
1212

docs/atl-mfc-shared/string-data-management.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ A `CString` object represents a sequence of a variable number of characters. `CS
3434

3535
## <a name="_core_unicode_and_mbcs_provide_portability"></a> Unicode and MBCS Provide Portability
3636

37-
With MFC version 3.0 and later, MFC, including `CString`, is enabled for both Unicode and multibyte character sets (MBCS). This support makes it easier for you to write portable applications that you can build for either Unicode or ANSI characters. To enable this portability, each character in a `CString` object is of type TCHAR, which is defined as `wchar_t` if you define the symbol _UNICODE when you build your application, or as `char` if not. A `wchar_t` character is 16 bits wide. MBCS is enabled if you build with the symbol _MBCS defined. MFC itself is built with either the _MBCS symbol (for the NAFX libraries) or the _UNICODE symbol (for the UAFX libraries) defined.
37+
With MFC version 3.0 and later, MFC, including `CString`, is enabled for both Unicode and multibyte character sets (MBCS). This support makes it easier for you to write portable applications that you can build for either Unicode or ANSI characters. To enable this portability, each character in a `CString` object is of type TCHAR, which is defined as **`wchar_t`** if you define the symbol _UNICODE when you build your application, or as **`char`** if not. A **`wchar_t`** character is 16 bits wide. MBCS is enabled if you build with the symbol _MBCS defined. MFC itself is built with either the _MBCS symbol (for the NAFX libraries) or the _UNICODE symbol (for the UAFX libraries) defined.
3838

3939
> [!NOTE]
4040
> The `CString` examples in this and the accompanying articles on strings show literal strings properly formatted for Unicode portability, using the _T macro, which translates the literal string to the form:

docs/atl-mfc-shared/unicode-and-multibyte-character-set-mbcs-support.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ helpviewer_keywords: ["MFC [C++], character set support", "MBCS [C++], strings a
77

88
Some languages, for example, Japanese and Chinese, have large character sets. To support programming for these markets, the Microsoft Foundation Class Library (MFC) enables two different approaches to handling large character sets:
99

10-
- [Unicode](#mfc-support-for-unicode-strings), `wchar_t` based wide-characters and strings encoded as UTF-16.
10+
- [Unicode](#mfc-support-for-unicode-strings), **`wchar_t`** based wide-characters and strings encoded as UTF-16.
1111

1212
- [Multibyte Character Sets (MBCS)](#mfc-support-for-mbcs-strings), **char** based single or double-byte characters and strings encoded in a locale-specific character set.
1313

@@ -29,7 +29,7 @@ These library, debugger, and DLL files are used to support Unicode in MFC:
2929

3030
(*version* represents the version number of the file; for example, '140' means version 14.0.)
3131

32-
`CString` is based on the TCHAR data type. If the symbol _UNICODE is defined for a build of your program, TCHAR is defined as type `wchar_t`, a 16-bit character encoding type. Otherwise, TCHAR is defined as **char**, the normal 8-bit character encoding. Therefore, under Unicode, a `CString` is composed of 16-bit characters. Without Unicode, it is composed of characters of type **char**.
32+
`CString` is based on the TCHAR data type. If the symbol _UNICODE is defined for a build of your program, TCHAR is defined as type **`wchar_t`**, a 16-bit character encoding type. Otherwise, TCHAR is defined as **char**, the normal 8-bit character encoding. Therefore, under Unicode, a `CString` is composed of 16-bit characters. Without Unicode, it is composed of characters of type **char**.
3333

3434
To complete Unicode programming of your application, you must also:
3535

@@ -77,7 +77,7 @@ Under DBCS, a given string can contain all single-byte ANSI characters, all doub
7777
7878
Generic-text function mappings for all of the run-time string-handling routines are discussed in [C Run-Time Library Reference](../c-runtime-library/c-run-time-library-reference.md). For a list, see [Internationalization](../c-runtime-library/internationalization.md).
7979

80-
Similarly, `CString` methods are implemented by using generic data type mappings. To enable both MBCS and Unicode, MFC uses TCHAR for **char** or `wchar_t`, LPTSTR for **char**<strong>\*</strong> or `wchar_t*`, and LPCTSTR for **const char**<strong>\*</strong> or `const wchar_t*`. These ensure the correct mappings for either MBCS or Unicode.
80+
Similarly, `CString` methods are implemented by using generic data type mappings. To enable both MBCS and Unicode, MFC uses TCHAR for **char** or **`wchar_t`**, LPTSTR for **char**<strong>\*</strong> or `wchar_t*`, and LPCTSTR for **const char**<strong>\*</strong> or `const wchar_t*`. These ensure the correct mappings for either MBCS or Unicode.
8181

8282
## See also
8383

docs/atl-mfc-shared/using-cstring.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ To use `CString`, include the `atlstr.h` header.
1212

1313
The `CString`, `CStringA`, and `CStringW` classes are specializations of a class template called [CStringT](../atl-mfc-shared/reference/cstringt-class.md) based on the type of character data they support.
1414

15-
A `CStringW` object contains the **wchar_t** type and supports Unicode strings. A `CStringA` object contains the **char** type, and supports single-byte and multi-byte (MBCS) strings. A `CString` object supports either the **char** type or the `wchar_t` type, depending on whether the MBCS symbol or the UNICODE symbol is defined at compile time.
15+
A `CStringW` object contains the **wchar_t** type and supports Unicode strings. A `CStringA` object contains the **char** type, and supports single-byte and multi-byte (MBCS) strings. A `CString` object supports either the **char** type or the **`wchar_t`** type, depending on whether the MBCS symbol or the UNICODE symbol is defined at compile time.
1616

1717
A `CString` object keeps character data in a `CStringData` object. `CString` accepts NULL-terminated C-style strings. `CString` tracks the string length for faster performance, but it also retains the NULL character in the stored character data to support conversion to LPCWSTR. `CString` includes the null terminator when it exports a C-style string. You can insert a NULL at other locations in a `CString`, but it may produce unexpected results.
1818

docs/atl/adding-a-property-to-the-control-atl-tutorial-part-3.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ ms.assetid: f775fe34-103b-4f07-9999-400e987ee030
1818

1919
1. Type `Sides` as the **Property Name**.
2020

21-
1. In the drop-down list of **Property Type**, select `short`.
21+
1. In the drop-down list of **Property Type**, select **`short`**.
2222

2323
1. Click **OK** to finish adding the property.
2424

docs/build/adding-references-in-visual-cpp-projects.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ The following properties are found on COM and .NET assembly references, and cann
149149

150150
- **Strong Name**
151151

152-
`true` if the referenced assembly has a strong name. A strong named assembly is uniquely versioned.
152+
**`true`** if the referenced assembly has a strong name. A strong named assembly is uniquely versioned.
153153

154154
- **Version**
155155

docs/build/cmakesettings-reference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ The `configurations` array contains all the configurations for a CMake project.
2424

2525
A `configuration` has these properties:
2626

27-
- `addressSanitizerEnabled`: if `true` compiles the program with Address Sanitizer (Experimental on Windows). On Linux, compile with -fno-omit-frame-pointer and compiler optimization level -Os or -Oo for best results.
27+
- `addressSanitizerEnabled`: if **`true`** compiles the program with Address Sanitizer (Experimental on Windows). On Linux, compile with -fno-omit-frame-pointer and compiler optimization level -Os or -Oo for best results.
2828
- `addressSanitizerRuntimeFlags`: runtime flags passed to AddressSanitizer via the ASAN_OPTIONS environment variable. Format: flag1=value:flag2=value2.
2929
- `buildCommandArgs`: specifies native build switches passed to CMake after --build --. For example, passing -v when using the Ninja generator forces Ninja to output command lines. See [Ninja command line arguments](#ninja) for more information on Ninja commands.
3030
- `buildRoot`: specifies the directory in which CMake generates build scripts for the chosen generator. Maps to **-DCMAKE_BINARY_DIR** switch and specifies where *CMakeCache.txt* will be created. If the folder does not exist, it is created. Supported macros include `${workspaceRoot}`, `${workspaceHash}`, `${projectFile}`, `${projectDir}`, `${thisFile}`, `${thisFileDir}`, `${name}`, `${generator}`, `${env.VARIABLE}`.

docs/build/common-visual-cpp-64-bit-migration-issues.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ ms.assetid: d17fb838-7513-4e2d-8b27-a1666f17ad76
88

99
When you use the Microsoft C++ compiler (MSVC) to create applications to run on a 64-bit Windows operating system, you should be aware of the following issues:
1010

11-
- An `int` and a `long` are 32-bit values on 64-bit Windows operating systems. For programs that you plan to compile for 64-bit platforms, you should be careful not to assign pointers to 32-bit variables. Pointers are 64-bit on 64-bit platforms, and you will truncate the pointer value if you assign it to a 32-bit variable.
11+
- An **`int`** and a **`long`** are 32-bit values on 64-bit Windows operating systems. For programs that you plan to compile for 64-bit platforms, you should be careful not to assign pointers to 32-bit variables. Pointers are 64-bit on 64-bit platforms, and you will truncate the pointer value if you assign it to a 32-bit variable.
1212

1313
- `size_t`, `time_t`, and `ptrdiff_t` are 64-bit values on 64-bit Windows operating systems.
1414

1515
- `time_t` is a 32-bit value on 32-bit Windows operating systems in Visual Studio 2005 and earlier. `time_t` is now a 64-bit integer by default. For more information, see [Time Management](../c-runtime-library/time-management.md).
1616

17-
You should be aware of where your code takes an `int` value and processes it as a `size_t` or `time_t` value. It is possible that the number could grow to be larger than a 32-bit number and data will be truncated when it is passed back to the `int` storage.
17+
You should be aware of where your code takes an **`int`** value and processes it as a `size_t` or `time_t` value. It is possible that the number could grow to be larger than a 32-bit number and data will be truncated when it is passed back to the **`int`** storage.
1818

19-
The %x (hex `int` format) `printf` modifier will not work as expected on a 64-bit Windows operating system. It will only operate on the first 32 bits of the value that is passed to it.
19+
The %x (hex **`int`** format) `printf` modifier will not work as expected on a 64-bit Windows operating system. It will only operate on the first 32 bits of the value that is passed to it.
2020

2121
- Use %I32x to display a 32-bit integral type in hex format.
2222

docs/build/configure-cmake-debugging-sessions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ In Visual Studio 2019 version 16.6, we added a new debug configuration of `type:
117117
Use the following options to separate your build machine (defined in CMakeSettings.json) from your remote debug machine.
118118

119119
- `remoteMachineName`: Remote debug machine. Only required if different than the build machine. Must have an existing entry in the [Connection Manager](../linux/connect-to-your-remote-linux-computer.md). Press **Ctrl+Space** to view a list of all existing remote connections.
120-
- `disableDeploy`: Defaults to `false`. Indicates whether build/debug separation is disabled. When `false`, this option allows build and debug to occur on two separate machines.
120+
- `disableDeploy`: Defaults to **`false`**. Indicates whether build/debug separation is disabled. When **`false`**, this option allows build and debug to occur on two separate machines.
121121
- `deployDirectory`: Full Unix path to the directory on `remoteMachineName` that the executable gets copied to.
122122
- `deploy`: An array of advanced deployment settings. You only need to configure these settings when you want more granular control over the deployment process. By default, only the files necessary for the process to debug get deployed to the remote debug machine.
123123
- `sourceMachine`: The machine from which the file or directory is copied. Press **Ctrl+Space** to view a list of all the remote connections stored in the Connection Manager. When building natively on WSL, this option is ignored.
@@ -204,7 +204,7 @@ The following options can be used when debugging on a remote system or WSL using
204204

205205
- `visualizerFile`: A [.natvis file](/visualstudio/debugger/create-custom-views-of-native-objects) to use when debugging this process. This option is incompatible with `gdb` pretty printing. Also set `showDisplayString` when you set this property.
206206

207-
- `showDisplayString`: A boolean that enables the display string when a `visualizerFile` is specified. Setting this option to `true` can cause slower performance during debugging.
207+
- `showDisplayString`: A boolean that enables the display string when a `visualizerFile` is specified. Setting this option to **`true`** can cause slower performance during debugging.
208208

209209
- `setupCommands`: One or more `gdb` command(s) to execute, to set up the underlying debugger.
210210

0 commit comments

Comments
 (0)