` value if you're using Visual Studio 2015, `v141` if you're using Visual Studio 2017, `v142` if you're using Visual Studio 2019 or `v143` if you're using Visual Studio 2022.)
```xml
Application
- v142
+ v143
```
@@ -162,10 +155,10 @@ An MSBuild project file is an XML file that contains a project root element (`
+
Debug
@@ -209,13 +202,9 @@ The application should display "Hello, from MSBuild!" in the console window.
MSBuild enables you to execute predefined build targets, apply user-defined properties, and use custom tools, events, and build steps. This section illustrates these tasks:
- Using MSBuild with build targets.
-
- Using MSBuild with build properties.
-
- Using MSBuild with the 64-bit compiler and tools.
-
- Using MSBuild with different toolsets.
-
- Adding MSBuild customizations.
### Using MSBuild with Build Targets
@@ -277,7 +266,10 @@ To rebuild your project with the Visual C++ 11.0 Windows XP toolset, enter this
MSBuild provides various ways to customize your build process. These articles show how to add custom build steps, tools, and events to your MSBuild project:
- [How to: Add a Custom Build Step to MSBuild Projects](how-to-add-a-custom-build-step-to-msbuild-projects.md)
-
- [How to: Add Custom Build Tools to MSBuild Projects](how-to-add-custom-build-tools-to-msbuild-projects.md)
-
- [How to: Use Build Events in MSBuild Projects](how-to-use-build-events-in-msbuild-projects.md)
+
+## See also
+
+- [vcpkg in MSBuild projects](/vcpkg/users/buildsystems/msbuild-integration)
+- [Tutorial: Install and use packages with MSBuild in Visual Studio](/vcpkg/get_started/get-started-msbuild)
diff --git a/docs/build/working-with-project-properties.md b/docs/build/working-with-project-properties.md
index 9a6b533a19..7f6b508708 100644
--- a/docs/build/working-with-project-properties.md
+++ b/docs/build/working-with-project-properties.md
@@ -1,35 +1,39 @@
---
-title: "Set C++ compiler and build properties in Visual Studio"
+title: "Set C++ Compiler and Build Properties in Visual Studio"
description: "Use the Visual Studio IDE to change C++ compiler and linker options and other build settings."
-ms.date: "07/17/2019"
+ms.date: 03/19/2025
+ms.topic: concept-article
helpviewer_keywords: ["project properties [C++], modifying", "properties [C++]", "Visual C++ projects, properties", "projects [C++], properties"]
-ms.assetid: 9b0d6f8b-7d4e-4e61-aa75-7d14944816cd
---
# Set compiler and build properties
-In the IDE, all information that's needed to build a project is exposed as *properties*. This information includes the application name, extension (such as DLL, LIB, EXE), compiler options, linker options, debugger settings, custom build steps, and many other things. Typically, you use *property pages* to view and modify these properties. To access the property pages, choose **Project** > **_project-name_ Properties** from the main menu, or right-click on the project node in **Solution Explorer** and choose **Properties**.
+In the Visual Studio IDE, you can view and edit the properties needed to compile and build a project. This information includes the application name, extension (such as DLL, LIB, EXE), compiler options, linker options, debugger settings, and custom build steps.
+
+You can view and modify these properties by using *property pages*. To access the property pages, choose **Project** > **_project-name_ Properties** from the main menu, or right-click on the project node in **Solution Explorer** and choose **Properties**.
## Default properties
-When you create a project, the system assigns values for various properties. The defaults vary somewhat depending on the kind of project and what options you choose in the app wizard. For example, an ATL project has properties related to MIDL files, but these properties are absent in a basic console application. The default properties are shown in the General pane in the Property Pages:
+When you create a project, the system assigns values for various properties. The defaults vary somewhat depending on the kind of project and what options you choose in the app wizard. For example, an Active Template Library (ATL) project has properties related to Microsoft Interface Definition Language (MIDL) files, but these properties are absent in a basic console application. The default properties are shown in the Advanced pane in the **Property Pages** window:
-
+:::image type="content" source="media/visual-c---project-defaults.png" alt-text="Screenshot of the Visual Studio project properties dialog box with the Advanced pane selected. Properties such as Use of MFC, Character Set, and so on are highlighted." lightbox="media/visual-c---project-defaults.png":::
-## Applying properties to build configurations and target platforms
+## Apply properties to build configurations and target platforms
-Some properties, such as the application name, apply to all build variations and target platforms, whether it's a debug or release build. But most properties are configuration-dependent. To generate the correct code, the compiler has to know both the specific platform the program will run on and which specific compiler options to use. So when you set a property, it's important to pay attention to which configuration and platform the new value should apply to. Should it apply only to Debug Win32 builds, or should it also apply to Debug ARM64 and Debug x64? For example, the **Optimization** property, by default, is set to **Maximize Speed (/O2)** in a Release configuration, but it's disabled in the Debug configuration.
+Some properties, such as the application name, apply to all build variations and target platforms, whether it's a debug or release build. But most properties are configuration-dependent. To generate the correct code, the compiler has to know both the specific platform the program runs on and which specific compiler options to use. So when you set a property, it's important to pay attention to which configuration and platform the new value should apply to. Should it apply only to Debug Win32 builds, or should it also apply to Debug ARM64 and Debug x64? For example, the **Optimization** property, by default, is set to **Maximize Speed (/O2)** in a Release configuration, but is disabled in the Debug configuration.
-You can always see and change the configuration and platform a property value should apply to. The following illustration shows the property pages with the configuration and platform information controls at the top. When the **Optimization** property is set here, it will apply only to Debug Win32 builds, the currently active configuration, as shown by the red arrows.
+You can always see and change the configuration and platform a property value should apply to. The following illustration shows the property pages with the configuration and platform information controls at the top. When the **Optimization** property is set here, it only applies to Debug Win32 builds, the currently active configuration, as shown by the red arrows.
-
+:::image type="complex" source="media/visual-c---property-pages-showing-active-configuration.png" alt-text="Screenshot of the Visual Studio Property Pages dialog.":::
+The page is open to C/C++, Optimization. The Optimization setting is set to Disabled (/Od), which is called out. An arrow calls out the relationship between the Configuration setting in the project property page, which is set to Active(Debug), and the setting in the Solution configuration dropdown on the toolbar, which is set to Debug. Another arrow calls out the relationship between the Platform setting in the project property page, which is set to Active(Win32), and the setting in the Solutions platform dropdown on the toolbar, which is set to x86.
+:::image-end:::
The following illustration shows the same project property page, but the configuration has been changed to Release. Note the different value for the Optimization property. Also note that the active configuration is still Debug. You can set properties for any configuration here; it doesn't have to be the active one.
-
+:::image type="content" source="media/visual-c---property-pages-showing-release-config.png" alt-text="Screenshot of the Visual Studio project Property Pages dialog. The Configuration dropdown is called out and is set to Release. The optimization setting is set to Maximize Speed slash O2.":::
## Target platforms
-*Target platform* refers to the kind of device and operating system that the executable will run on. You can build a project for more than one platform. The available target platforms for C++ projects depend on the kind of project. They include but aren't limited to Win32, x64, ARM, ARM64, Android, and iOS. The **x86** target platform that you might see in **Configuration Manager** is identical to **Win32** in native C++ projects. Win32 means 32-bit Windows and **x64** means 64-bit Windows. For more information about these two platforms, see [Running 32-bit applications](/windows/win32/WinProg64/running-32-bit-applications).
+*Target platform* refers to the kind of device and operating system that the executable runs on. You can build a project for more than one platform. The available target platforms for C++ projects depend on the kind of project. They include but aren't limited to Win32, x64, ARM, ARM64, Android, and iOS. The **x86** target platform that you might see in **Configuration Manager** is identical to **Win32** in native C++ projects. Win32 means 32-bit Windows and **x64** means 64-bit Windows. For more information about these two platforms, see [Running 32-bit applications](/windows/win32/WinProg64/running-32-bit-applications).
The **Any CPU** target platform value that you might see in **Configuration Manager** has no effect on native C++ projects. It's only relevant for C++/CLI and other .NET project types. For more information, see [`/CLRIMAGETYPE` (Specify Type of CLR Image)](reference/clrimagetype-specify-type-of-clr-image.md).
@@ -42,37 +46,39 @@ For more information about setting properties for a Debug build, see:
## C++ compiler and linker options
-C++ compiler and linker options are located under the **C/C++** and **Linker** nodes in the left pane under **Configuration Properties**. These options translate directly to command-line options that will be passed to the compiler. To read documentation about a specific option, select the option in the center pane and press **F1**. Or, you can browse documentation for all the options at [MSVC compiler options](reference/compiler-options.md) and [MSVC linker options](reference/linker-options.md).
+C++ compiler and linker options are located under the **C/C++** and **Linker** nodes in the left pane under **Configuration Properties**. These options translate directly to command-line options that are passed to the compiler. To read documentation about a specific option, select the option in the center pane and press **F1**. Or, you can browse documentation for all the options at [MSVC compiler options](reference/compiler-options.md) and [MSVC linker options](reference/linker-options.md).
The **Property Pages** dialog box shows only the property pages that are relevant to the current project. For example, if the project doesn't have an *`.idl`* file, the MIDL property page isn't displayed. For more information about the settings on each property page, see [Property Pages (C++)](reference/property-pages-visual-cpp.md).
## Directory and path values
-MSBuild supports the use of compile-time constants for certain string values, such as include directories and paths, called *macros*. A macro can refer to a value that's defined by Visual Studio or the MSBuild system, or to a user-defined value. Macros look like `$(macro-name)` or `%(item-macro-name)`. They're exposed in the property pages, where you can refer to and modify them by using the [Property Editor](#property_editor). Use macros instead of hard-coded values such as directory paths. Macros make it easier to share property settings between machines and between versions of Visual Studio. And, you can better ensure that your project settings participate correctly in [property inheritance](project-property-inheritance.md).
+MSBuild supports the use of compile-time constants for certain string values, such as include directories and paths, called *macros*. A macro can refer to a value that's defined by Visual Studio or the MSBuild system, or to a user-defined value. Macros look like `$(macro-name)` or `%(item-macro-name)`. They're exposed in the property pages, where you can refer to and modify them by using the [Property Editor](#property_editor). Use macros instead of hard-coded values such as directory paths. Macros make it easier to share property settings between machines and between versions of Visual Studio. You can also better ensure that your project settings participate correctly in [property inheritance](project-property-inheritance.md).
The following illustration shows the property pages for a Visual Studio C++ project. In the left pane, the **VC++ Directories** *rule* is selected, and the right pane lists the properties that are associated with that rule. The property values are often macros, such as `$(VC_SourcePath)`:
-
+:::image type="complex" source="media/project_property_pages_vc.png" alt-text="Screenshot of the Visual Studio Property Pages dialog for rules for various directories.":::
+The VC plus plus Directories page is open, which has properties for the VC++ Directories rules. An example rule is Source directories, which is set to $(VC_SourcePath). There are rules for the include directories, library directories, executable directories, and so on.
+:::image-end:::
You can use the [Property Editor](#property_editor) to view the values of all available macros.
### Predefined macros
-- **Global macros**:\
+- **Global macros**\
Global macros apply to all items in a project configuration. A global macro has the syntax `$(name)`. An example of a global macro is `$(VCInstallDir)`, which stores the root directory of your Visual Studio installation. A global macro corresponds to a `PropertyGroup` in MSBuild.
- **Item macros**\
- Item macros have the syntax `%(name)`. For a file, an item macro applies only to that file—for example, you can use `%(AdditionalIncludeDirectories)` to specify include directories that apply only to a particular file. This kind of item macro corresponds to an `ItemGroup` metadata in MSBuild. When it's used in the context of a project configuration, an item macro applies to all files of a certain type. For example, the C/C++ **Preprocessor Definitions** configuration property can take a `%(PreprocessorDefinitions)` item macro that applies to all .cpp files in the project. This kind of item macro corresponds to an `ItemDefinitionGroup` metadata in MSBuild. For more information, see [Item Definitions](/visualstudio/msbuild/item-definitions).
+ Item macros have the syntax `%(name)`. For a file, an item macro applies only to that file. For example, you can use `%(AdditionalIncludeDirectories)` to specify include directories that apply only to a particular file. This kind of item macro corresponds to an `ItemGroup` metadata in MSBuild. When used in the context of a project configuration, an item macro applies to all files of a certain type. For example, the C/C++ **Preprocessor Definitions** configuration property can take a `%(PreprocessorDefinitions)` item macro that applies to all .cpp files in the project. This kind of item macro corresponds to an `ItemDefinitionGroup` metadata in MSBuild. For more information, see [Item definitions](/visualstudio/msbuild/item-definitions).
### User-defined macros
-You can create *user-defined macros* to use as variables in project builds. For example, you could create a user-defined macro that provides a value to a custom build step or a custom build tool. A user-defined macro is a name/value pair. In a project file, use the `$(name)` notation to access the value.
+You can create *user-defined macros* to use as variables in project builds. For example, you could create a user-defined macro that provides a value to a custom build step or a custom build tool. A user-defined macro is a name-value pair. In a project file, use the `$(name)` notation to access the value.
A user-defined macro is stored in a property sheet. If your project doesn't already contain a property sheet, you can create one by following the steps under [Share or reuse Visual Studio project settings](create-reusable-property-configurations.md).
#### To create a user-defined macro
-1. Open the **Property Manager** window. (On the menu bar, choose **View** > **Property Manager** or **View** > **Other Windows** > **Property Manager**.) Open the shortcut menu for a property sheet (its name ends in *`.user`*) and then choose **Properties**. The **Property Pages** dialog box for that property sheet opens.
+1. Open the **Property Manager** window. On the menu bar, select **View** > **Other Windows** > **Property Manager**. Open the shortcut menu for a property sheet (its name ends in *`.user`*) and then choose **Properties**. The **Property Pages** dialog box for that property sheet opens.
1. In the left pane of the dialog box, select **User Macros**. In the right pane, choose the **Add Macro** button to open the **Add User Macro** dialog box.
@@ -82,28 +88,29 @@ A user-defined macro is stored in a property sheet. If your project doesn't alre
You can use the Property Editor to modify certain string properties and select macros as values. To access the Property Editor, select a property on a property page and then choose the down arrow button on the right. If the drop-down list contains **\**, then you can choose it to display the Property Editor for that property.
-
+:::image type="complex" source="media/property_editor_dropdown.png" alt-text="Screenshot of the Visual Studio project properties page for VC plus plus Directories.":::
+The Property Editor for the Include Directories setting is open. It shows the evaluated value for the Include Directories, which is C:\Program Files(x86)\Microsoft Visual Studio 14.0\VC\Include. It shows the two inherited values: $(VC_IncludePath) and $(WindowsSDK_IncludePath). A checkbox for 'Inherit from parent or project defaults' is selected.
+:::image-end:::
In the Property Editor, you can choose the **Macros** button to view the available macros and their current values. The following illustration shows the Property Editor for the **Additional Include Directories** property after the **Macros** button was chosen. When the **Inherit from parent or project defaults** check box is selected and you add a new value, it's appended to any values that are currently being inherited. If you clear the check box, your new value replaces the inherited values. In most cases, leave the check box selected.
-
+:::image type="complex" source="media/propertyeditorvc.png" alt-text="Screenshot of the Property Editor dialog after selecting the Macros button.":::
+The property editor for Include Directories is open. The evaluated value is displayed along with the inherited values. A listbox contains various macros and their values, such as $(CharacterSet) which is set to Unicode.
+:::image-end:::
## Add an include directory to the set of default directories
-When you add an include directory to a project, it's important not to override all the default directories. The correct way to add a directory is to append the new path, for example "`C:\MyNewIncludeDir\`", and then to Append the **`$(IncludePath)`** macro to the property value.
+When you add an include directory to a project, it's important not to override all the default directories. The correct way to add a directory is to append the new path, for example `C:\MyNewIncludeDir\`, and then to append the `$(IncludePath)` macro to the property value.
## Quickly browse and search all properties
The **All Options** property page (under the **Configuration Properties** > **C/C++** node in the **Property Pages** dialog box) provides a quick way to browse and search the properties that are available in the current context. It has a special search box and a simple syntax to help you filter results:
-No prefix:\
-Search in property names only (case-insensitive substring).
+- No prefix: Search in property names only (case-insensitive substring).
-'`/`' or '`-`':\
-Search only in compiler switches (case-insensitive prefix)
+- '`/`' or '`-`': Search only in compiler switches (case-insensitive prefix).
-`v`:\
-Search only in values (case-insensitive substring).
+- `v`: Search only in values (case-insensitive substring).
## Set environment variables for a build
@@ -115,19 +122,14 @@ In the left pane of the project's **Property Pages** dialog box, expand **Config
In the right pane, modify the **Environment** or **Merge Environment** project settings and then choose the **OK** button.
-## In this section
-
-[Share or reuse Visual Studio project settings](create-reusable-property-configurations.md)\
-How to create a *`.props`* file with custom build settings that can be shared or reused.
-
-[Project property inheritance](project-property-inheritance.md)\
-Describes the order of evaluation for the *`.props`*, *`.targets`*, *`.vcxproj`* files, and environment variables in the build process.
+## Articles in this section
-[Modify properties and targets without changing the project file](modify-project-properties-without-changing-project-file.md)\
-How to create temporary build settings without having to modify a project file.
+- [Share or reuse Visual Studio project settings](create-reusable-property-configurations.md)
+- [Property inheritance in Visual Studio projects](project-property-inheritance.md)
+- [Modify C++ project properties and targets without changing the project file](modify-project-properties-without-changing-project-file.md)
## See also
-[Visual Studio Projects - C++](creating-and-managing-visual-cpp-projects.md)\
-[`.vcxproj` and `.props` file structure](reference/vcxproj-file-structure.md)\
-[Property page XML files](reference/property-page-xml-files.md)
+- [Visual Studio projects - C++](creating-and-managing-visual-cpp-projects.md)
+- [`.vcxproj` and `.props` file structure](reference/vcxproj-file-structure.md)
+- [Property Page XML rule files](reference/property-page-xml-files.md)
diff --git a/docs/build/x64-calling-convention.md b/docs/build/x64-calling-convention.md
index c03fee57e9..abb153a846 100644
--- a/docs/build/x64-calling-convention.md
+++ b/docs/build/x64-calling-convention.md
@@ -1,19 +1,22 @@
---
-title: "x64 calling convention"
-description: "Learn about the details of the default x64 calling convention."
-ms.date: 05/17/2022
+title: "x64 Calling Convention"
+description: "Learn about the default x64 calling convention that one function uses to make calls into another function."
+ms.date: 03/19/2025
+ms.topic: concept-article
---
# x64 calling convention
-This section describes the standard processes and conventions that one function (the caller) uses to make calls into another function (the callee) in x64 code.
+This article describes the standard processes and conventions that one function (the caller) uses to make calls into another function (the callee) in x64 code.
+
+For more information about the `__vectorcall` calling convention, see [__vectorcall](../cpp/vectorcall.md).
## Calling convention defaults
-The x64 Application Binary Interface (ABI) uses a four-register fast-call calling convention by default. Space is allocated on the call stack as a shadow store for callees to save those registers.
+The x64 Application Binary Interface (ABI) uses a four-register, fast-call calling convention by default. Space is allocated on the call stack as a shadow store for callees to save those registers.
There's a strict one-to-one correspondence between a function call's arguments and the registers used for those arguments. Any argument that doesn't fit in 8 bytes, or isn't 1, 2, 4, or 8 bytes, must be passed by reference. A single argument is never spread across multiple registers.
-The x87 register stack is unused. It may be used by the callee, but consider it volatile across function calls. All floating point operations are done using the 16 XMM registers.
+The x87 register stack is unused. It might be used by the callee, but consider it volatile across function calls. All floating point operations are done using the 16 XMM registers.
Integer arguments are passed in registers RCX, RDX, R8, and R9. Floating point arguments are passed in XMM0L, XMM1L, XMM2L, and XMM3L. 16-byte arguments are passed by reference. Parameter passing is described in detail in [Parameter passing](#parameter-passing). These registers, and RAX, R10, R11, XMM4, and XMM5, are considered *volatile*, or potentially changed by a callee on return. Register usage is documented in detail in [x64 register usage](x64-software-conventions.md#x64-register-usage) and [Caller/callee saved registers](#callercallee-saved-registers).
@@ -25,13 +28,13 @@ Most structures are aligned to their natural alignment. The primary exceptions a
## Unwindability
-Leaf functions are functions that don't change any non-volatile registers. A non-leaf function may change non-volatile RSP, for example, by calling a function. Or, it could change RSP by allocating additional stack space for local variables. To recover non-volatile registers when an exception is handled, non-leaf functions are annotated with static data. The data describes how to properly unwind the function at an arbitrary instruction. This data is stored as *pdata*, or procedure data, which in turn refers to *xdata*, the exception handling data. The xdata contains the unwinding information, and can point to additional pdata or an exception handler function.
+Leaf functions are functions that don't change any nonvolatile registers. A nonleaf function might change nonvolatile RSP, for example, by calling a function. Or, it could change RSP by allocating more stack space for local variables. To recover nonvolatile registers when an exception is handled, nonleaf functions are annotated with static data. The data describes how to properly unwind the function at an arbitrary instruction. This data is stored as *pdata*, or procedure data, which in turn refers to *xdata*, the exception handling data. The xdata contains the unwinding information, and can point to additional pdata or an exception handler function.
Prologs and epilogs are highly restricted so that they can be properly described in xdata. The stack pointer must remain 16-byte aligned in any region of code that isn't part of an epilog or prolog, except within leaf functions. Leaf functions can be unwound simply by simulating a return, so pdata and xdata aren't required. For details about the proper structure of function prologs and epilogs, see [x64 prolog and epilog](../build/prolog-and-epilog.md). For more information about exception handling, and the exception handling and unwinding of pdata and xdata, see [x64 exception handling](../build/exception-handling-x64.md).
## Parameter passing
-By default, the x64 calling convention passes the first four arguments to a function in registers. The registers used for these arguments depend on the position and type of the argument. Remaining arguments get pushed on the stack in right-to-left order.
+By default, the x64 calling convention passes the first four arguments to a function in registers. The registers used for these arguments depend on the position and type of the argument. Remaining arguments get pushed on the stack in right-to-left order. All arguments passed on the stack are 8-byte aligned.
Integer valued arguments in the leftmost four positions are passed in left-to-right order in RCX, RDX, R8, and R9, respectively. The fifth and higher arguments are passed on the stack as previously described. All integer arguments in registers are right-justified, so the callee can ignore the upper bits of the register and access only the portion of the register necessary.
@@ -99,15 +102,15 @@ func2() { // RCX = 2, RDX = XMM1 = 1.0, and R8 = 7
## Return values
-A scalar return value that can fit into 64 bits, including the **`__m64`** type, is returned through RAX. Non-scalar types including floats, doubles, and vector types such as [`__m128`](../cpp/m128.md), [`__m128i`](../cpp/m128i.md), [`__m128d`](../cpp/m128d.md) are returned in XMM0. The state of unused bits in the value returned in RAX or XMM0 is undefined.
+A scalar return value that can fit into 64 bits, including the `__m64` type, is returned through RAX. Nonscalar types including floats, doubles, and vector types such as [`__m128`](../cpp/m128.md), [`__m128i`](../cpp/m128i.md), [`__m128d`](../cpp/m128d.md) are returned in XMM0. The state of unused bits in the value returned in RAX or XMM0 is undefined.
-User-defined types can be returned by value from global functions and static member functions. To return a user-defined type by value in RAX, it must have a length of 1, 2, 4, 8, 16, 32, or 64 bits. It must also have no user-defined constructor, destructor, or copy assignment operator. It can have no private or protected non-static data members, and no non-static data members of reference type. It can't have base classes or virtual functions. And, it can only have data members that also meet these requirements. (This definition is essentially the same as a C++03 POD type. Because the definition has changed in the C++11 standard, we don't recommend using `std::is_pod` for this test.) Otherwise, the caller must allocate memory for the return value and pass a pointer to it as the first argument. The remaining arguments are then shifted one argument to the right. The same pointer must be returned by the callee in RAX.
+User-defined types can be returned by value from global functions and static member functions. To return a user-defined type by value in RAX, it must have a length of 1, 2, 4, 8, 16, 32, or 64 bits. It must also have no user-defined constructor, destructor, or copy assignment operator. It can have no private or protected nonstatic data members, and no nonstatic data members of reference type. It can't have base classes or virtual functions. And, it can only have data members that also meet these requirements. This definition is essentially the same as a C++03 POD type. Because the definition has changed in the C++11 standard, we don't recommend using `std::is_pod` for this test. Otherwise, the caller must allocate memory for the return value and pass a pointer to it as the first argument. The remaining arguments are then shifted one argument to the right. The same pointer must be returned by the callee in RAX.
These examples show how parameters and return values are passed for functions with the specified declarations:
### Example of return value 1 - 64-bit result
-```Output
+```cpp
__int64 func1(int a, float b, int c, int d, int e);
// Caller passes a in RCX, b in XMM1, c in R8, d in R9, e pushed on stack,
// callee returns __int64 result in RAX.
@@ -115,7 +118,7 @@ __int64 func1(int a, float b, int c, int d, int e);
### Example of return value 2 - 128-bit result
-```Output
+```cpp
__m128 func2(float a, double b, int c, __m64 d);
// Caller passes a in XMM0, b in XMM1, c in R8, d in R9,
// callee returns __m128 result in XMM0.
@@ -123,7 +126,7 @@ __m128 func2(float a, double b, int c, __m64 d);
### Example of return value 3 - user type result by pointer
-```Output
+```cpp
struct Struct1 {
int j, k, l; // Struct1 exceeds 64 bits.
};
@@ -135,7 +138,7 @@ Struct1 func3(int a, double b, int c, float d);
### Example of return value 4 - user type result by value
-```Output
+```cpp
struct Struct2 {
int j, k; // Struct2 fits in 64 bits, and meets requirements for return by value.
};
@@ -166,7 +169,7 @@ The x87 FPU control word register gets set using the following standard values a
| Register\[bits] | Setting |
|-|-|
-| FPCSR\[0:6] | Exception masks all 1's (all exceptions masked) |
+| FPCSR\[0:6] | Exception masks all 1s (all exceptions masked) |
| FPCSR\[7] | Reserved - 0 |
| FPCSR\[8:9] | Precision Control - 10B (double precision) |
| FPCSR\[10:11] | Rounding control - 0 (round to nearest) |
@@ -174,7 +177,7 @@ The x87 FPU control word register gets set using the following standard values a
A callee that modifies any of the fields within FPCSR must restore them before returning to its caller. Furthermore, a caller that has modified any of these fields must restore them to their standard values before invoking a callee, unless by agreement the callee expects the modified values.
-There are two exceptions to the rules about the non-volatility of the control flags:
+There are two exceptions to the rules about the nonvolatility of the control flags:
- In functions where the documented purpose of the given function is to modify the nonvolatile FPCSR flags.
@@ -189,13 +192,13 @@ The nonvolatile portion is set to the following standard values at the start of
| Register\[bits] | Setting |
|-|-|
| MXCSR\[6] | Denormals are zeros - 0 |
-| MXCSR\[7:12] | Exception masks all 1's (all exceptions masked) |
+| MXCSR\[7:12] | Exception masks all 1s (all exceptions masked) |
| MXCSR\[13:14] | Rounding control - 0 (round to nearest) |
| MXCSR\[15] | Flush to zero for masked underflow - 0 (off) |
A callee that modifies any of the nonvolatile fields within MXCSR must restore them before returning to its caller. Furthermore, a caller that has modified any of these fields must restore them to their standard values before invoking a callee, unless by agreement the callee expects the modified values.
-There are two exceptions to the rules about the non-volatility of the control flags:
+There are two exceptions to the rules about the nonvolatility of the control flags:
- In functions where the documented purpose of the given function is to modify the nonvolatile MXCSR flags.
@@ -205,10 +208,10 @@ Make no assumptions about the MXCSR register's volatile portion state across a f
## setjmp/longjmp
-When you include setjmpex.h or setjmp.h, all calls to [`setjmp`](../c-runtime-library/reference/setjmp.md) or [`longjmp`](../c-runtime-library/reference/longjmp.md) result in an unwind that invokes destructors and **`__finally`** calls. This behavior differs from x86, where including setjmp.h results in **`__finally`** clauses and destructors not being invoked.
+When you include `setjmpex.h` or `setjmp.h`, all calls to [`setjmp`](../c-runtime-library/reference/setjmp.md) or [`longjmp`](../c-runtime-library/reference/longjmp.md) result in an unwind that invokes destructors and `__finally` calls. This behavior differs from x86, where including `setjmp.h` results in `__finally` clauses and destructors not being invoked.
-A call to `setjmp` preserves the current stack pointer, non-volatile registers, and MXCSR registers. Calls to `longjmp` return to the most recent `setjmp` call site and resets the stack pointer, non-volatile registers, and MXCSR registers, back to the state as preserved by the most recent `setjmp` call.
+A call to `setjmp` preserves the current stack pointer, nonvolatile registers, and MXCSR registers. Calls to `longjmp` return to the most recent `setjmp` call site and resets the stack pointer, nonvolatile registers, and MXCSR registers, back to the state as preserved by the most recent `setjmp` call.
## See also
-[x64 software conventions](../build/x64-software-conventions.md)
+- [Overview of x64 ABI conventions](../build/x64-software-conventions.md)
diff --git a/docs/build/x64-software-conventions.md b/docs/build/x64-software-conventions.md
index d1136eff59..fe644a1aa5 100644
--- a/docs/build/x64-software-conventions.md
+++ b/docs/build/x64-software-conventions.md
@@ -1,7 +1,7 @@
---
description: "Learn more about: x64 ABI conventions"
title: "x64 ABI conventions"
-ms.date: 04/21/2022
+ms.date: 03/28/2025
helpviewer_keywords: ["x64 coding conventions", "x64 abi", "Visual C++, x64 calling conventions"]
---
# Overview of x64 ABI conventions
@@ -11,13 +11,16 @@ This topic describes the basic application binary interface (ABI) for x64, the 6
## x64 calling conventions
Two important differences between x86 and x64 are:
+
- 64-bit addressing capability
- Sixteen 64-bit registers for general use.
-Given the expanded register set, x64 uses the [__fastcall](../cpp/fastcall.md) calling convention and a RISC-based exception-handling model.
+Given the expanded register set, x64 uses the [`__fastcall`](../cpp/fastcall.md) calling convention and a RISC-based exception-handling model.
The **`__fastcall`** convention uses registers for the first four arguments, and the stack frame to pass more arguments. For details on the x64 calling convention, including register usage, stack parameters, return values, and stack unwinding, see [x64 calling convention](x64-calling-convention.md).
+For more information on the `__vectorcall` calling convention, see [`__vectorcall`](../cpp/vectorcall.md).
+
## Enable x64 compiler optimization
The following compiler option helps you optimize your application for x64:
@@ -114,7 +117,7 @@ _declspec(align(2)) struct {
}
```
-
+:::image type="content" source="../build/media/vcamd_conv_ex_1_block.png" alt-text="Diagram showing the structure layout for example 1. The diagram shows 2 bytes of memory. Member a, a short, occupies bytes 0 through 1.":::
#### Example 2
@@ -128,7 +131,9 @@ _declspec(align(8)) struct {
}
```
-
+:::image type="complex" source="../build/media/vcamd_conv_ex_2_block.png" alt-text="Diagram showing the structure layout for example 2.":::
+The diagram shows 24 bytes of memory. Member a, an int, occupies bytes 0 through 3. The diagram shows padding for bytes 4 through 7. Member b, a double, occupies bytes 8 through 15. Member c, a short, occupies bytes 16 through 17. Bytes 18 through 23 are unused.
+:::image-end:::
#### Example 3
@@ -143,7 +148,9 @@ _declspec(align(4)) struct {
}
```
-
+:::image type="complex" source="../build/media/vcamd_conv_ex_3_block.png" alt-text="Diagram showing the structure layout for example 3.":::
+The diagram shows 12 bytes of memory. Member a, a char, occupies byte 0. Byte 1 is padding. Member b, a short, occupies bytes 2 through 4. Member c, a char, occupies byte 4. Bytes 5 through 7 are padding. Member d, an int, occupies bytes 8 through 11.
+:::image-end:::
#### Example 4
@@ -157,7 +164,9 @@ _declspec(align(8)) union {
}
```
-
+:::image type="complex" source="../build/media/vcamd_conv_ex_4_block.png" alt-text="Diagram showing the union layout for example 4.":::
+The diagram shows 8 bytes of memory. Member p, a char, occupies byte 0. Member s, a short, occupies bytes 0 through 1. Member l, a long, occupies bytes 0 through 3. Bytes 4 through 7 are padding.
+:::image-end:::
### Bitfields
@@ -209,7 +218,7 @@ On function exit and on function entry to C Runtime Library calls and Windows sy
## Stack usage
-For details on stack allocation, alignment, function types and stack frames on x64, see [x64 stack usage](stack-usage.md).
+For details on stack allocation, alignment, function types, and stack frames on x64, see [x64 stack usage](stack-usage.md).
## Prolog and epilog
diff --git a/docs/c-language/array-declarations.md b/docs/c-language/array-declarations.md
index bf6e678fa3..cf593aeb02 100644
--- a/docs/c-language/array-declarations.md
+++ b/docs/c-language/array-declarations.md
@@ -11,38 +11,38 @@ An "array declaration" names the array and specifies the type of its elements. I
## Syntax
-*declaration*:
- *declaration-specifiers* *init-declarator-list*opt **;**
+*`declaration`*:\
+ *`declaration-specifiers`* *`init-declarator-list`*opt **`;`**
-*init-declarator-list*:
- *init-declarator*
- *init-declarator-list* **,** *init-declarator*
+*`init-declarator-list`*:\
+ *`init-declarator`*\
+ *`init-declarator-list`* **`,`** *`init-declarator`*
-*init-declarator*:
- *declarator*
- *declarator* **=** *initializer*
+*`init-declarator`*:\
+ *`declarator`*\
+ *`declarator`* **`=`** *`initializer`*
-*declarator*:
- *pointer*opt *direct-declarator*
+*`declarator`*:\
+ *`pointer`*opt *`direct-declarator`*
-*direct-declarator*: /\* A function declarator \*/
- *direct-declarator* **[** *constant-expression*opt **]**
+*`direct-declarator`*:\
+ *`direct-declarator`* **`[`** *`constant-expression`*opt **`]`**
-Because *constant-expression* is optional, the syntax has two forms:
+Because *`constant-expression`* is optional, the syntax has two forms:
-- The first form defines an array variable. The *constant-expression* argument within the brackets specifies the number of elements in the array. The *constant-expression*, if present, must have integral type, and a value larger than zero. Each element has the type given by *type-specifier*, which can be any type except **`void`**. An array element cannot be a function type.
+- The first form defines an array variable. The *`constant-expression`* argument within the brackets specifies the number of elements in the array. The *`constant-expression`*, if present, must have integral type, and a value larger than zero. Each element has the type given by *`type-specifier`*, which can be any type except **`void`**. An array element can't be a function type.
-- The second form declares a variable that has been defined elsewhere. It omits the *constant-expression* argument in brackets, but not the brackets. You can use this form only if you previously have initialized the array, declared it as a parameter, or declared it as a reference to an array explicitly defined elsewhere in the program.
+- The second form declares a variable that has been defined elsewhere. It omits the *`constant-expression`* argument in brackets, but not the brackets. You can use this form only if you've previously initialized the array, declared it as a parameter, or declared it as a reference to an array that's explicitly defined elsewhere in the program.
-In both forms, *direct-declarator* names the variable and can modify the variable's type. The brackets (**[ ]**) following *direct-declarator* modify the declarator to an array type.
+In both forms, *`direct-declarator`* names the variable and can modify the variable's type. The brackets (**`[ ]`**) following *`direct-declarator`* modify the declarator to an array type.
Type qualifiers can appear in the declaration of an object of array type, but the qualifiers apply to the elements rather than the array itself.
You can declare an array of arrays (a "multidimensional" array) by following the array declarator with a list of bracketed constant expressions in this form:
-> *type-specifier* *declarator* **[** *constant-expression* **]** **[** *constant-expression* **]** ...
+> *`type-specifier`* *`declarator`* **`[`** *`constant-expression`* **`]`** **`[`** *`constant-expression`* **`]`** ...
-Each *constant-expression* in brackets defines the number of elements in a given dimension: two-dimensional arrays have two bracketed expressions, three-dimensional arrays have three, and so on. You can omit the first constant expression if you have initialized the array, declared it as a parameter, or declared it as a reference to an array explicitly defined elsewhere in the program.
+Each *`constant-expression`* in brackets defines the number of elements in a given dimension: two-dimensional arrays have two bracketed expressions, three-dimensional arrays have three, and so on. You can omit the first constant expression if you've initialized the array, declared it as a parameter, or declared it as a reference to an array explicitly defined elsewhere in the program.
You can define arrays of pointers to various types of objects by using complex declarators, as described in [Interpreting More Complex Declarators](../c-language/interpreting-more-complex-declarators.md).
@@ -52,7 +52,7 @@ Arrays are stored by row. For example, the following array consists of two rows
char A[2][3];
```
-The three columns of the first row are stored first, followed by the three columns of the second row. This means that the last subscript varies most quickly.
+The three columns of the first row are stored first, followed by the three columns of the second row. It means that the last subscript varies most quickly.
To refer to an individual element of an array, use a subscript expression, as described in [Postfix Operators](../c-language/postfix-operators.md).
@@ -72,7 +72,7 @@ struct {
} complex[100];
```
-This is a declaration of an array of structures. This array has 100 elements; each element is a structure containing two members.
+This example is a declaration of an array of structures. This array has 100 elements; each element is a structure containing two members.
```C
extern char *name[];
@@ -82,7 +82,7 @@ This statement declares the type and name of an array of pointers to **`char`**.
**Microsoft Specific**
-The type of integer required to hold the maximum size of an array is the size of **size_t**. Defined in the header file STDDEF.H, **size_t** is an **`unsigned int`** with the range 0x00000000 to 0x7CFFFFFF.
+The type of integer required to hold the maximum size of an array is the size of **`size_t`**.
**END Microsoft Specific**
diff --git a/docs/c-language/bitwise-shift-operators.md b/docs/c-language/bitwise-shift-operators.md
index 69596997f4..1e2d2e35de 100644
--- a/docs/c-language/bitwise-shift-operators.md
+++ b/docs/c-language/bitwise-shift-operators.md
@@ -11,14 +11,14 @@ The shift operators shift their first operand left (**`<<`**) or right (**`>>`**
## Syntax
-*shift-expression*:
- *additive-expression*
- *shift-expression* **`<<`** *additive-expression*
- *shift-expression* **`>>`** *additive-expression*
+*`shift-expression`*:\
+ *`additive-expression`*\
+ *`shift-expression`* **`<<`** *`additive-expression`*\
+ *`shift-expression`* **`>>`** *`additive-expression`*
Both operands must be integral values. These operators perform the usual arithmetic conversions; the type of the result is the type of the left operand after conversion.
-For leftward shifts, the vacated right bits are set to 0. For rightward shifts, the vacated left bits are filled based on the type of the first operand after conversion. If the type is **`unsigned`**, they are set to 0. Otherwise, they are filled with copies of the sign bit. For left-shift operators without overflow, the statement
+For leftward shifts, the vacated right bits are set to 0. For rightward shifts, the vacated left bits are filled based on the type of the first operand after conversion. If the type is **`unsigned`**, they're set to 0. Otherwise, they're filled with copies of the sign bit. For left-shift operators without overflow, the statement
```C
expr1 << expr2
@@ -34,7 +34,7 @@ is equivalent to division by 2expr2 if `expr1` is unsigned or has a n
The result of a shift operation is undefined if the second operand is negative, or if the right operand is greater than or equal to the width in bits of the promoted left operand.
-Since the conversions performed by the shift operators do not provide for overflow or underflow conditions, information may be lost if the result of a shift operation cannot be represented in the type of the first operand after conversion.
+Since the conversions performed by the shift operators don't provide for overflow or underflow conditions, information may be lost if the result of a shift operation can't be represented in the type of the first operand after conversion.
```C
unsigned int x, y, z;
diff --git a/docs/c-language/break-statement-c.md b/docs/c-language/break-statement-c.md
index 61b1167120..470da893c5 100644
--- a/docs/c-language/break-statement-c.md
+++ b/docs/c-language/break-statement-c.md
@@ -12,8 +12,8 @@ The **`break`** statement terminates the execution of the nearest enclosing **`d
## Syntax
-*jump-statement*:
- **break ;**
+*`jump-statement`*:\
+ **`break ;`**
The **`break`** statement is frequently used to terminate the processing of a particular case within a **`switch`** statement. Lack of an enclosing iterative or **`switch`** statement generates an error.
diff --git a/docs/c-language/c-abstract-declarators.md b/docs/c-language/c-abstract-declarators.md
index 2fcedeb2ec..3766b3dd90 100644
--- a/docs/c-language/c-abstract-declarators.md
+++ b/docs/c-language/c-abstract-declarators.md
@@ -7,7 +7,7 @@ ms.assetid: 6a556ad7-0555-421a-aa02-294d77cda8b5
---
# C Abstract Declarators
-An abstract declarator is a declarator without an identifier, consisting of one or more pointer, array, or function modifiers. The pointer modifier (\*) always precedes the identifier in a declarator; array (**[ ]**) and function ( **( )** ) modifiers follow the identifier. Knowing this, you can determine where the identifier would appear in an abstract declarator and interpret the declarator accordingly. See [Interpreting More Complex Declarators](../c-language/interpreting-more-complex-declarators.md) for additional information and examples of complex declarators. Generally **`typedef`** can be used to simplify declarators. See [Typedef Declarations](../c-language/typedef-declarations.md).
+An abstract declarator is a declarator without an identifier, consisting of one or more pointer, array, or function modifiers. The pointer modifier (**`*`**) always precedes the identifier in a declarator; array (**[ ]**) and function ( **( )** ) modifiers follow the identifier. Knowing this, you can determine where the identifier would appear in an abstract declarator and interpret the declarator accordingly. See [Interpreting More Complex Declarators](../c-language/interpreting-more-complex-declarators.md) for additional information and examples of complex declarators. Generally **`typedef`** can be used to simplify declarators. See [Typedef Declarations](../c-language/typedef-declarations.md).
Abstract declarators can be complex. Parentheses in a complex abstract declarator specify a particular interpretation, just as they do for the complex declarators in declarations.
diff --git a/docs/c-language/c-additive-operators.md b/docs/c-language/c-additive-operators.md
index f3f9aaa6f5..13d26b7238 100644
--- a/docs/c-language/c-additive-operators.md
+++ b/docs/c-language/c-additive-operators.md
@@ -7,22 +7,22 @@ ms.assetid: bb8ac205-b061-41fc-8dd4-dab87c8b900c
---
# C Additive Operators
-The additive operators perform addition (**+**) and subtraction (**-**).
+The additive operators perform addition (**`+`**) and subtraction (**`-`**).
## Syntax
-*additive-expression*:
- *multiplicative-expression*
- *additive-expression* **+** *multiplicative-expression*
- *additive-expression* **-** *multiplicative-expression*
+*`additive-expression`*:\
+ *`multiplicative-expression`*\
+ *`additive-expression`* **`+`** *`multiplicative-expression`*\
+ *`additive-expression`* **`-`** *`multiplicative-expression`*
> [!NOTE]
-> Although the syntax for *additive-expression* includes *multiplicative-expression*, this does not imply that expressions using multiplication are required. See the syntax in [C Language Syntax Summary](../c-language/c-language-syntax-summary.md), for *multiplicative-expression*, *cast-expression*, and *unary-expression*.
+> Although the syntax for *`additive-expression`* includes *`multiplicative-expression`*, this does not imply that expressions using multiplication are required. See the syntax in [C Language Syntax Summary](../c-language/c-language-syntax-summary.md), for *`multiplicative-expression`*, *cast-expression*, and *unary-expression*.
The operands can be integral or floating values. Some additive operations can also be performed on pointer values, as outlined under the discussion of each operator.
-The additive operators perform the usual arithmetic conversions on integral and floating operands. The type of the result is the type of the operands after conversion. Since the conversions performed by the additive operators do not provide for overflow or underflow conditions, information may be lost if the result of an additive operation cannot be represented in the type of the operands after conversion.
+The additive operators perform the usual arithmetic conversions on integral and floating operands. The type of the result is the type of the operands after conversion. Since the conversions performed by the additive operators don't provide for overflow or underflow conditions, information may be lost if the result of an additive operation isn't representable in the type of the operands after conversion.
## See also
-[Additive Operators: + and -](../cpp/additive-operators-plus-and.md)
+[Additive Operators: `+` and `-`](../cpp/additive-operators-plus-and.md)
diff --git a/docs/c-language/c-assignment-operators.md b/docs/c-language/c-assignment-operators.md
index f2f2ad8b85..c42d7402c8 100644
--- a/docs/c-language/c-assignment-operators.md
+++ b/docs/c-language/c-assignment-operators.md
@@ -7,7 +7,7 @@ ms.assetid: 11688dcb-c941-44e7-a636-3fc98e7dac40
---
# C Assignment Operators
-An assignment operation assigns the value of the right-hand operand to the storage location named by the left-hand operand. Therefore, the left-hand operand of an assignment operation must be a modifiable l-value. After the assignment, an assignment expression has the value of the left operand but is not an l-value.
+An assignment operation assigns the value of the right-hand operand to the storage location named by the left-hand operand. Therefore, the left-hand operand of an assignment operation must be a modifiable l-value. After the assignment, an assignment expression has the value of the left operand but isn't an l-value.
## Syntax
@@ -15,24 +15,24 @@ An assignment operation assigns the value of the right-hand operand to the stora
*`conditional-expression`*\
*`unary-expression`* *`assignment-operator`* *`assignment-expression`*
-*`assignment-operator`*: one of
+*`assignment-operator`*: one of\
**`=`** **`*=`** **`/=`** **`%=`** **`+=`** **`-=`** **`<<=`** **`>>=`** **`&=`** **`^=`** **`|=`**
The assignment operators in C can both transform and assign values in a single operation. C provides the following assignment operators:
-|Operator|Operation Performed|
-|--------------|-------------------------|
-|**`=`**|Simple assignment|
-|**`*=`**|Multiplication assignment|
-|**`/=`**|Division assignment|
-|**`%=`**|Remainder assignment|
-|**`+=`**|Addition assignment|
-|**`-=`**|Subtraction assignment|
-|**`<<=`**|Left-shift assignment|
-|**`>>=`**|Right-shift assignment|
-|**`&=`**|Bitwise-AND assignment|
-|**`^=`**|Bitwise-exclusive-OR assignment|
-|**`|=`**|Bitwise-inclusive-OR assignment|
+| Operator | Operation Performed |
+|---|---|
+| **`=`** | Simple assignment |
+| **`*=`** | Multiplication assignment |
+| **`/=`** | Division assignment |
+| **`%=`** | Remainder assignment |
+| **`+=`** | Addition assignment |
+| **`-=`** | Subtraction assignment |
+| **`<<=`** | Left-shift assignment |
+| **`>>=`** | Right-shift assignment |
+| **`&=`** | Bitwise-AND assignment |
+| **`^=`** | Bitwise-exclusive-OR assignment |
+| **` | =`** | Bitwise-inclusive-OR assignment |
In assignment, the type of the right-hand value is converted to the type of the left-hand value, and the value is stored in the left operand after the assignment has taken place. The left operand must not be an array, a function, or a constant. The specific conversion path, which depends on the two types, is outlined in detail in [Type Conversions](../c-language/type-conversions-c.md).
diff --git a/docs/c-language/c-bit-fields.md b/docs/c-language/c-bit-fields.md
index f581def8fc..ddd8fac1af 100644
--- a/docs/c-language/c-bit-fields.md
+++ b/docs/c-language/c-bit-fields.md
@@ -11,24 +11,24 @@ In addition to declarators for members of a structure or union, a structure decl
## Syntax
-*struct-declarator*:
- *declarator*
- *type-specifier* *declarator*opt **:** *constant-expression*
+*`struct-declarator`*:\
+ *`declarator`*\
+ *`type-specifier`* *`declarator`*opt **`:`** *`constant-expression`*
-The *constant-expression* specifies the width of the field in bits. The *type-specifier* for the `declarator` must be **`unsigned int`**, **`signed int`**, or **`int`**, and the *constant-expression* must be a nonnegative integer value. If the value is zero, the declaration has no `declarator`. Arrays of bit fields, pointers to bit fields, and functions returning bit fields are not allowed. The optional `declarator` names the bit field. Bit fields can only be declared as part of a structure. The address-of operator (**&**) cannot be applied to bit-field components.
+The *`constant-expression`* specifies the width of the field in bits. The *`type-specifier`* for the `declarator` must be **`unsigned int`**, **`signed int`**, or **`int`**, and the *`constant-expression`* must be a nonnegative integer value. If the value is zero, the declaration has no `declarator`. Arrays of bit fields, pointers to bit fields, and functions returning bit fields aren't allowed. The optional `declarator` names the bit field. Bit fields can only be declared as part of a structure. The address-of operator (**`&`**) can't be applied to bit-field components.
-Unnamed bit fields cannot be referenced, and their contents at run time are unpredictable. They can be used as "dummy" fields, for alignment purposes. An unnamed bit field whose width is specified as 0 guarantees that storage for the member following it in the *struct-declaration-list* begins on an **`int`** boundary.
+Unnamed bit fields can't be referenced, and their contents at run time are unpredictable. They can be used as "dummy" fields, for alignment purposes. An unnamed bit field whose width is specified as 0 guarantees that storage for the member following it in the *struct-declaration-list* begins on an **`int`** boundary.
-Bit fields must also be long enough to contain the bit pattern. For example, these two statements are not legal:
+The number of bits in a bit field must be less than or equal to the size of the underlying type. For example, these two statements aren't legal:
-```
+```C
short a:17; /* Illegal! */
int long y:33; /* Illegal! */
```
This example defines a two-dimensional array of structures named `screen`.
-```
+```C
struct
{
unsigned short icon : 8;
@@ -38,9 +38,9 @@ struct
} screen[25][80];
```
-The array contains 2,000 elements. Each element is an individual structure containing four bit-field members: `icon`, `color`, `underline`, and `blink`. The size of each structure is two bytes.
+The array contains 2,000 elements. Each element is an individual structure containing four bit-field members: `icon`, `color`, `underline`, and `blink`. The size of each structure is 2 bytes.
-Bit fields have the same semantics as the integer type. This means a bit field is used in expressions in exactly the same way as a variable of the same base type would be used, regardless of how many bits are in the bit field.
+Bit fields have the same semantics as the integer type. A bit field is used in expressions in exactly the same way as a variable of the same base type would be used. It doesn't matter how many bits are in the bit field.
**Microsoft Specific**
@@ -72,9 +72,9 @@ the bits of `test` would be arranged as follows:
cccccccb bbbbaaaa
```
-Since the 8086 family of processors stores the low byte of integer values before the high byte, the integer `0x01F2` above would be stored in physical memory as `0xF2` followed by `0x01`.
+Since the 8086 family of processors store the low byte of integer values before the high byte, the integer `0x01F2` would be stored in physical memory as `0xF2` followed by `0x01`.
-The ISO C99 standard lets an implementation choose whether a bit field may straddle two storage instances. Consider this structure, which stores four bit fields that total 64 bits:
+The ISO C99 standard lets an implementation choose whether a bit field may straddle two storage instances. Consider this structure, which stores bit fields that total 64 bits:
```C
struct
diff --git a/docs/c-language/c-character-constants.md b/docs/c-language/c-character-constants.md
index dc7bf20e97..e96fe00a6f 100644
--- a/docs/c-language/c-character-constants.md
+++ b/docs/c-language/c-character-constants.md
@@ -11,44 +11,35 @@ A "character constant" is formed by enclosing a single character from the repres
## Syntax
-*character-constant*:
-**'** *c-char-sequence* **'**
-
-**L'** *c-char-sequence* **'**
-
-*c-char-sequence*:
-*c-char*
-
-*c-char-sequence c-char*
-
-*c-char*:
-Any member of the source character set except the single quotation mark (**'**), backslash (**\\**), or newline character
-
-*escape-sequence*
-
-*escape-sequence*:
-*simple-escape-sequence*
-
-*octal-escape-sequence*
-
-*hexadecimal-escape-sequence*
-
-*simple-escape-sequence*: one of
-**\a \b \f \n \r \t \v**
-
-**\\' \\" \\\ \\?**
-
-*octal-escape-sequence*:
-**\\** *octal-digit*
-
-**\\** *octal-digit octal-digit*
-
-**\\** *octal-digit octal-digit octal-digit*
-
-*hexadecimal-escape-sequence*:
-**\x** *hexadecimal-digit*
-
-*hexadecimal-escape-sequence hexadecimal-digit*
+*`character-constant`*:\
+ **`'`** *`c-char-sequence`* **`'`**\
+ **`L'`** *`c-char-sequence`* **`'`**
+
+*`c-char-sequence`*:\
+ *`c-char`*\
+ *`c-char-sequence`* *`c-char`*
+
+*`c-char`*:\
+ Any member of the source character set except the single quotation mark (**`'`**), backslash (**`\`**), or newline character\
+ *`escape-sequence`*
+
+*`escape-sequence`*:\
+ *`simple-escape-sequence`*\
+ *`octal-escape-sequence`*\
+ *`hexadecimal-escape-sequence`*
+
+*`simple-escape-sequence`*: one of\
+ **`\a`** **`\b`** **`\f`** **`\n`** **`\r`** **`\t`** **`\v`**\
+ **`\'`** **`\"`** **`\\`** **`\?`**
+
+*`octal-escape-sequence`*:\
+ **`\`** *`octal-digit`*\
+ **`\`** *`octal-digit`* *`octal-digit`*\
+ **`\`** *`octal-digit`* *`octal-digit`* *`octal-digit`*
+
+*`hexadecimal-escape-sequence`*:\
+ **`\x`** *`hexadecimal-digit`*\
+ *`hexadecimal-escape-sequence`* *`hexadecimal-digit`*
## See also
diff --git a/docs/c-language/c-comments.md b/docs/c-language/c-comments.md
index ce00a770b2..aaa1c15a1e 100644
--- a/docs/c-language/c-comments.md
+++ b/docs/c-language/c-comments.md
@@ -7,9 +7,9 @@ ms.assetid: 0f5f2825-e673-49e7-8669-94e2f5294989
---
# C Comments
-A "comment" is a sequence of characters beginning with a forward slash/asterisk combination (/\*) that is treated as a single white-space character by the compiler and is otherwise ignored. A comment can include any combination of characters from the representable character set, including newline characters, but excluding the "end comment" delimiter (\*/). Comments can occupy more than one line but cannot be nested.
+A "comment" is a sequence of characters beginning with a forward slash/asterisk combination (/\*) that is treated as a single white-space character by the compiler and is otherwise ignored. A comment can include any combination of characters from the representable character set, including newline characters, but excluding the "end comment" delimiter (\*/). Comments can occupy more than one line but can't be nested.
-Comments can appear anywhere a white-space character is allowed. Since the compiler treats a comment as a single white-space character, you cannot include comments within tokens. The compiler ignores the characters in the comment.
+Comments can appear anywhere a white-space character is allowed. Since the compiler treats a comment as a single white-space character, you can't include comments within tokens. The compiler ignores the characters in the comment.
Use comments to document your code. This example is a comment accepted by the compiler:
@@ -32,7 +32,7 @@ You can choose to precede functions or program modules with a descriptive commen
*/
```
-Since comments cannot contain nested comments, this example causes an error:
+Since comments can't contain nested comments, this example causes an error:
```C
/* Comment out this routine for testing
@@ -51,13 +51,13 @@ While you can use comments to render certain lines of code inactive for test pur
**Microsoft Specific**
-The Microsoft compiler also supports single-line comments preceded by two forward slashes (__//__). These comments cannot extend to a second line.
+The Microsoft compiler also supports single-line comments preceded by two forward slashes (**`//`**). These comments can't extend to a second line.
```C
// This is a valid comment
```
-Comments beginning with two forward slashes (__//__) are terminated by the next newline character that is not preceded by an escape character. In the next example, the newline character is preceded by a backslash (**\\**), creating an "escape sequence." This escape sequence causes the compiler to treat the next line as part of the previous line. (For more information, see [Escape Sequences](../c-language/escape-sequences.md).)
+Comments beginning with two forward slashes (**`//`**) are terminated by the next newline character that isn't preceded by an escape character. In the next example, the newline character is preceded by a backslash (**`\`**), creating an "escape sequence." This escape sequence causes the compiler to treat the next line as part of the previous line. (For more information, see [Escape Sequences](../c-language/escape-sequences.md).)
```C
// my comment \
diff --git a/docs/c-language/c-enumeration-declarations.md b/docs/c-language/c-enumeration-declarations.md
index 6f9153022e..08d1312b46 100644
--- a/docs/c-language/c-enumeration-declarations.md
+++ b/docs/c-language/c-enumeration-declarations.md
@@ -103,7 +103,7 @@ enum BOOLEAN end_flag, match_flag; /* Two variables of type BOOLEAN */
This declaration can also be specified as
```C
-enum BOOLEAN { false, true } end_flag, match_flag;\
+enum BOOLEAN { false, true } end_flag, match_flag;
```
or as
@@ -133,4 +133,4 @@ enum { yes, no } response;
## See also
-[Enumerations](../cpp/enumerations-cpp.md)
+[Enumerations(C++)](../cpp/enumerations-cpp.md)
diff --git a/docs/c-language/c-extended-storage-class-attributes.md b/docs/c-language/c-extended-storage-class-attributes.md
index fc0a478032..544263691b 100644
--- a/docs/c-language/c-extended-storage-class-attributes.md
+++ b/docs/c-language/c-extended-storage-class-attributes.md
@@ -16,17 +16,17 @@ The extended attribute syntax for specifying storage-class information uses the
## Syntax
-*`storage-class-specifier`*:
+*`storage-class-specifier`*:\
**`__declspec (`** *`extended-decl-modifier-seq`* **`)`** /\* Microsoft-specific \*/
-*`extended-decl-modifier-seq`*: /\* Microsoft-specific \*/
- *`extended-decl-modifier`*opt
+*`extended-decl-modifier-seq`*: /\* Microsoft-specific \*/\
+ *`extended-decl-modifier`*opt\
*`extended-decl-modifier-seq`* *`extended-decl-modifier`*
-*`extended-decl-modifier`*: /\* Microsoft-specific \*/
- **`thread`**
- **`naked`**
- **`dllimport`**
+*`extended-decl-modifier`*: /\* Microsoft-specific \*/\
+ **`thread`**\
+ **`naked`**\
+ **`dllimport`**\
**`dllexport`**
White space separates the declaration modifiers. An *`extended-decl-modifier-seq`* can be empty; in this case, **`__declspec`** has no effect.
diff --git a/docs/c-language/c-floating-point-constants.md b/docs/c-language/c-floating-point-constants.md
index f95d294852..98876f7e43 100644
--- a/docs/c-language/c-floating-point-constants.md
+++ b/docs/c-language/c-floating-point-constants.md
@@ -10,26 +10,26 @@ A "floating-point constant" is a decimal number that represents a signed real nu
## Syntax
-*`floating-point-constant`*:
- *`fractional-constant`* *`exponent-part`*opt *`floating-suffix`*opt
+*`floating-point-constant`*:\
+ *`fractional-constant`* *`exponent-part`*opt *`floating-suffix`*opt\
*`digit-sequence`* *`exponent-part`* *`floating-suffix`*opt
-*`fractional-constant`*:
- *`digit-sequence`*opt **.** *`digit-sequence`*
+*`fractional-constant`*:\
+ *`digit-sequence`*opt **.** *`digit-sequence`*\
*`digit-sequence`* **.**
-*`exponent-part`*:
- **e** *`sign`*opt *`digit-sequence`*
+*`exponent-part`*:\
+ **e** *`sign`*opt *`digit-sequence`*\
**E** *`sign`*opt *`digit-sequence`*
-*`sign`*: one of
+*`sign`*: one of\
**`+`** **`-`**
-*`digit-sequence`*:
- *`digit`*
+*`digit-sequence`*:\
+ *`digit`*\
*`digit-sequence`* *`digit`*
-*`floating-suffix`*: one of
+*`floating-suffix`*: one of\
**`f`** **`l`** **`F`** **`L`**
You can omit either the digits before the decimal point (the integer portion of the value) or the digits after the decimal point (the fractional portion), but not both. You may leave out the decimal point only if you include an exponent. No white-space characters can separate the digits or characters of the constant.
diff --git a/docs/c-language/c-function-definitions.md b/docs/c-language/c-function-definitions.md
index e0808d1490..91f45c71fb 100644
--- a/docs/c-language/c-function-definitions.md
+++ b/docs/c-language/c-function-definitions.md
@@ -11,71 +11,71 @@ A function definition specifies the name of the function, the types and number o
## Syntax
-*translation-unit*:
- *external-declaration*
- *translation-unit* *external-declaration*
+*`translation-unit`*:\
+ *`external-declaration`* \
+ *`translation-unit`* *`external-declaration`*
-*external-declaration*: /\* Allowed only at external (file) scope \*/
- *function-definition*
- *declaration*
+*`external-declaration`*: /\* Allowed only at external (file) scope \*/\
+ *`function-definition`*\
+ *`declaration`*
-*function-definition*:
- *declaration-specifiers*opt *attribute-seq*opt *declarator* *declaration-list*opt *compound-statement*
+*`function-definition`*:\
+ *`declaration-specifiers`*opt *`attribute-seq`*opt *`declarator`* *`declaration-list`*opt *`compound-statement`*
-/\* *attribute-seq* is Microsoft-specific \*/
+/\* *`attribute-seq`* is Microsoft-specific \*/
Prototype parameters are:
-*declaration-specifiers*:
- *storage-class-specifier* *declaration-specifiers*opt
- *type-specifier* *declaration-specifiers*opt
- *type-qualifier* *declaration-specifiers*opt
+*`declaration-specifiers`*:\
+ *`storage-class-specifier`* *`declaration-specifiers`*opt \
+ *`type-specifier`* *`declaration-specifiers`*opt\
+ *`type-qualifier`* *`declaration-specifiers`*opt
-*declaration-list*:
- *declaration*
- *declaration-list* *declaration*
+*`declaration-list`*:\
+ *`declaration`*\
+ *`declaration-list`* *`declaration`*
-*declarator*:
- *pointer*opt *direct-declarator*
+*`declarator`*:\
+ *`pointer`*opt *`direct-declarator`*
-*direct-declarator*: /\* A function declarator \*/
- *direct-declarator* **(** *parameter-type-list* **)** /\* New-style declarator \*/
- *direct-declarator* **(** *identifier-list*opt **)** /\* Obsolete-style declarator \*/
+*`direct-declarator`*: /\* A function declarator \*/\
+ *`direct-declarator`* **`(`** *`parameter-type-list`* **`)`** /\* New-style declarator \*/\
+ *`direct-declarator`* **`(`** *`identifier-list`*opt **`)`** /\* Obsolete-style declarator \*/
The parameter list in a definition uses this syntax:
-*parameter-type-list*: /\* The parameter list \*/
- *parameter-list*
- *parameter-list* **, ...**
+*`parameter-type-list`*: /\* The parameter list \*/\
+ *`parameter-list`* \
+ *`parameter-list`* **`, ...`**
-*parameter-list*:
- *parameter-declaration*
- *parameter-list* **,** *parameter-declaration*
+*`parameter-list`*:\
+ *`parameter-declaration`*\
+ *`parameter-list`* **`,`** *`parameter-declaration`*
-*parameter-declaration*:
- *declaration-specifiers* *declarator*
- *declaration-specifiers* *abstract-declarator*opt
+*`parameter-declaration`*:\
+ *`declaration-specifiers`* *`declarator`*\
+ *`declaration-specifiers`* *`abstract-declarator`*opt
The parameter list in an old-style function definition uses this syntax:
-*identifier-list*: /\* Used in obsolete-style function definitions and declarations \*/
- *identifier*
- *identifier-list* **,** *identifier*
+*`identifier-list`*: /\* Used in obsolete-style function definitions and declarations \*/\
+ *`identifier`*\
+ *`identifier-list`* **`,`** *`identifier`*
The syntax for the function body is:
-*compound-statement*:
- **{** *declaration-list*opt *statement-list*opt **}**
+*`compound-statement`*:\
+ **`{`** *`declaration-list`*opt *`statement-list`*opt **`}`**
-The only storage-class specifiers that can modify a function declaration are **`extern`** and **`static`**. The **`extern`** specifier signifies that the function can be referenced from other files; that is, the function name is exported to the linker. The **`static`** specifier signifies that the function cannot be referenced from other files; that is, the name is not exported by the linker. If no storage class appears in a function definition, **`extern`** is assumed. In any case, the function is always visible from the definition point to the end of the file.
+The only storage-class specifiers that can modify a function declaration are **`extern`** and **`static`**. The **`extern`** specifier signifies that the function can be referenced from other files; that is, the function name is exported to the linker. The **`static`** specifier signifies that the function can't be referenced from other files; that is, the name isn't exported by the linker. If no storage class appears in a function definition, **`extern`** is assumed. In any case, the function is always visible from the definition point to the end of the file.
-The optional *declaration-specifiers* and mandatory *declarator* together specify the function's return type and name. The *declarator* is a combination of the identifier that names the function and the parentheses following the function name. The optional *attribute-seq* nonterminal is a Microsoft-specific feature defined in [Function Attributes](../c-language/function-attributes.md).
+The optional *`declaration-specifiers`* and mandatory *`declarator`* together specify the function's return type and name. The *`declarator`* is a combination of the identifier that names the function and the parentheses following the function name. The optional *`attribute-seq`* nonterminal is a Microsoft-specific feature defined in [Function Attributes](../c-language/function-attributes.md).
-The *direct-declarator* (in the *declarator* syntax) specifies the name of the function being defined and the identifiers of its parameters. If the *direct-declarator* includes a *parameter-type-list*, the list specifies the types of all the parameters. Such a declarator also serves as a function prototype for later calls to the function.
+The *`direct-declarator`* (in the *`declarator`* syntax) specifies the name of the function being defined and the identifiers of its parameters. If the *`direct-declarator`* includes a *`parameter-type-list`*, the list specifies the types of all the parameters. Such a declarator also serves as a function prototype for later calls to the function.
-A *declaration* in the *declaration-list* in function definitions cannot contain a *storage-class-specifier* other than **`register`**. The *type-specifier* in the *declaration-specifiers* syntax can be omitted only if the **`register`** storage class is specified for a value of **`int`** type.
+A *`declaration`* in the *`declaration-list`* in function definitions can't contain a *`storage-class-specifier`* other than **`register`**. The *`type-specifier`* in the *`declaration-specifiers`* syntax can be omitted only if the **`register`** storage class is specified for a value of **`int`** type.
-The *compound-statement* is the function body containing local variable declarations, references to externally declared items, and statements.
+The *`compound-statement`* is the function body containing local variable declarations, references to externally declared items, and statements.
The sections [Function Attributes](../c-language/function-attributes.md), [Storage Class](../c-language/storage-class.md), [Return Type](../c-language/return-type.md), [Parameters](../c-language/parameters.md), and [Function Body](../c-language/function-body.md) describe the components of the function definition in detail.
diff --git a/docs/c-language/c-identifiers.md b/docs/c-language/c-identifiers.md
index 4cc86b8a4c..56a44d534e 100644
--- a/docs/c-language/c-identifiers.md
+++ b/docs/c-language/c-identifiers.md
@@ -7,7 +7,7 @@ ms.assetid: d02edbbc-85a0-4118-997b-84ee6b972eb6
---
# C Identifiers
-"Identifiers" or "symbols" are the names you supply for variables, types, functions, and labels in your program. Identifier names must differ in spelling and case from any keywords. You cannot use keywords (either C or Microsoft) as identifiers; they are reserved for special use. You create an identifier by specifying it in the declaration of a variable, type, or function. In this example, `result` is an identifier for an integer variable, and `main` and `printf` are identifier names for functions.
+"Identifiers" or "symbols" are the names you supply for variables, types, functions, and labels in your program. Identifier names must differ in spelling and case from any keywords. You can't use keywords (either C or Microsoft) as identifiers; they're reserved for special use. You create an identifier by specifying it in the declaration of a variable, type, or function. In this example, `result` is an identifier for an integer variable, and `main` and `printf` are identifier names for functions.
```
#include
@@ -23,27 +23,27 @@ int main()
Once declared, you can use the identifier in later program statements to refer to the associated value.
-A special kind of identifier, called a statement label, can be used in **`goto`** statements. (Declarations are described in [Declarations and Types](../c-language/declarations-and-types.md) Statement labels are described in [The goto and Labeled Statements](../c-language/goto-and-labeled-statements-c.md).)
+A special variety of identifier, called a statement label, can be used in **`goto`** statements. (Declarations are described in [Declarations and Types](../c-language/declarations-and-types.md) Statement labels are described in [The goto and Labeled Statements](../c-language/goto-and-labeled-statements-c.md).)
## Syntax
-*identifier*:
- *nondigit*
- *identifier* *nondigit*
- *identifier* *digit*
+*`identifier`*:\
+ *`nondigit`*\
+ *`identifier`* *`nondigit`*\
+ *`identifier`* *`digit`*
-*nondigit*: one of
- **_ a b c d e f g h i j k l mn o p q r s t u v w x y z**
- **A B C D E F G H I J K L MN O P Q R S T U V W X Y Z**
+*`nondigit`*: one of\
+ **`_ a b c d e f g h i j k l m n o p q r s t u v w x y z`**\
+ **`A B C D E F G H I J K L M N O P Q R S T U V W X Y Z`**
-*digit*: one of
- **0 1 2 3 4 5 6 7 8 9**
+*`digit`*: one of\
+ **`0 1 2 3 4 5 6 7 8 9`**
-The first character of an identifier name must be a `nondigit` (that is, the first character must be an underscore or an uppercase or lowercase letter). ANSI allows six significant characters in an external identifier's name and 31 for names of internal (within a function) identifiers. External identifiers (ones declared at global scope or declared with storage class **`extern`**) may be subject to additional naming restrictions because these identifiers have to be processed by other software such as linkers.
+The first character of an identifier name must be a *`nondigit`* (that is, the first character must be an underscore or an uppercase or lowercase letter). ANSI allows six significant characters in an external identifier's name and 31 for names of internal (within a function) identifiers. External identifiers (ones declared at global scope or declared with storage class **`extern`**) may be subject to more naming restrictions because these identifiers have to be processed by other software such as linkers.
**Microsoft Specific**
-Although ANSI allows 6 significant characters in external identifier names and 31 for names of internal (within a function) identifiers, the Microsoft C compiler allows 247 characters in an internal or external identifier name. If you aren't concerned with ANSI compatibility, you can modify this default to a smaller or larger number using the /H (restrict length of external names) option.
+Although ANSI allows 6 significant characters in external identifier names and 31 for names of internal (within a function) identifiers, the Microsoft C compiler allows 247 characters in an internal or external identifier name. If you aren't concerned with ANSI compatibility, you can modify this default to use a smaller or larger number by specifying the [`/H` (restrict length of external names)](../build/reference/h-restrict-length-of-external-names.md) option.
**END Microsoft Specific**
@@ -58,7 +58,7 @@ aDD
**Microsoft Specific**
-Do not select names for identifiers that begin with two underscores or with an underscore followed by an uppercase letter. The ANSI C standard allows identifier names that begin with these character combinations to be reserved for compiler use. Identifiers with file-level scope should also not be named with an underscore and a lowercase letter as the first two letters. Identifier names that begin with these characters are also reserved. By convention, Microsoft uses an underscore and an uppercase letter to begin macro names and double underscores for Microsoft-specific keyword names. To avoid any naming conflicts, always select identifier names that do not begin with one or two underscores, or names that begin with an underscore followed by an uppercase letter.
+Don't select names for identifiers that begin with two underscores or with an underscore followed by an uppercase letter. The ANSI C standard allows identifier names that begin with these character combinations to be reserved for compiler use. Identifiers with file-level scope should also not be named with an underscore and a lowercase letter as the first two letters. Identifier names that begin with these characters are also reserved. By convention, Microsoft uses an underscore and an uppercase letter to begin macro names and double underscores for Microsoft-specific keyword names. To avoid any naming conflicts, always select identifier names that don't begin with one or two underscores, or names that begin with an underscore followed by an uppercase letter.
**END Microsoft Specific**
@@ -75,7 +75,7 @@ LastNum
**Microsoft Specific**
-Although identifiers in source files are case sensitive by default, symbols in object files are not. Microsoft C treats identifiers within a compilation unit as case sensitive.
+Although identifiers in source files are case sensitive by default, symbols in object files aren't. Microsoft C treats identifiers within a compilation unit as case sensitive.
The Microsoft linker is case sensitive. You must specify all identifiers consistently according to case.
@@ -83,7 +83,7 @@ The "source character set" is the set of legal characters that can appear in sou
**END Microsoft Specific**
-An identifier has "scope," which is the region of the program in which it is known, and "linkage," which determines whether the same name in another scope refers to the same identifier. These topics are explained in [Lifetime, Scope, Visibility, and Linkage](../c-language/lifetime-scope-visibility-and-linkage.md).
+An identifier has "scope," which is the region of the program in which it's known. It also has "linkage," which determines whether the same name in another scope refers to the same identifier. These terms are explained in [Lifetime, Scope, Visibility, and Linkage](../c-language/lifetime-scope-visibility-and-linkage.md).
## See also
diff --git a/docs/c-language/c-integer-constants.md b/docs/c-language/c-integer-constants.md
index d552935d9b..03a08c77ea 100644
--- a/docs/c-language/c-integer-constants.md
+++ b/docs/c-language/c-integer-constants.md
@@ -7,66 +7,66 @@ ms.assetid: fcf6b83c-2038-49ec-91ca-3d5ca1f83037
---
# C Integer Constants
-An *integer constant* is a decimal (base 10), octal (base 8), or hexadecimal (base 16) number that represents an integral value. Use integer constants to represent integer values that cannot be changed.
+An *integer constant* is a decimal (base 10), octal (base 8), or hexadecimal (base 16) number that represents an integral value. Use integer constants to represent integer values that can't be changed.
## Syntax
-*integer-constant*:
- *decimal-constant* *integer-suffix*opt
- *octal-constant* *integer-suffix*opt
- *hexadecimal-constant* *integer-suffix*opt
+*`integer-constant`*:\
+ *`decimal-constant`* *`integer-suffix`*opt\
+ *`octal-constant`* *`integer-suffix`*opt\
+ *`hexadecimal-constant`* *`integer-suffix`*opt
-*decimal-constant*:
- *nonzero-digit*
- *decimal-constant* *digit*
+*`decimal-constant`*:\
+ *`nonzero-digit`*\
+ *`decimal-constant`* *`digit`*
-*octal-constant*:
- **0**
- *octal-constant* *octal-digit*
+*`octal-constant`*:\
+ **`0`**\
+ *`octal-constant`* *`octal-digit`*
-*hexadecimal-constant*:
- *hexadecimal-prefix* *hexadecimal-digit*
- *hexadecimal-constant* *hexadecimal-digit*
+*`hexadecimal-constant`*:\
+ *`hexadecimal-prefix`* *`hexadecimal-digit`*\
+ *`hexadecimal-constant`* *`hexadecimal-digit`*
-*hexadecimal-prefix*: one of
- **0x** **0X**
+*`hexadecimal-prefix`*: one of\
+ **`0x`** **`0X`**
-*nonzero-digit*: one of
- **1 2 3 4 5 6 7 8 9**
+*`nonzero-digit`*: one of\
+ **`1 2 3 4 5 6 7 8 9`**
-*octal-digit*: one of
- **0 1 2 3 4 5 6 7**
+*`octal-digit`*: one of\
+ **`0 1 2 3 4 5 6 7`**
-*hexadecimal-digit*: one of
- **0 1 2 3 4 5 6 7 8 9**
- **a b c d e f**
- **A B C D E F**
+*`hexadecimal-digit`*: one of\
+ **`0 1 2 3 4 5 6 7 8 9`**\
+ **`a b c d e f`**\
+ **`A B C D E F`**
-*integer-suffix*:
- *unsigned-suffix* *long-suffix*opt
- *unsigned-suffix* *long-long-suffix*
- *unsigned-suffix* *64-bit-integer-suffix*
- *long-suffix* *unsigned-suffix*opt
- *long-long-suffix* *unsigned-suffix*opt
- *64-bit-integer-suffix*
+*`integer-suffix`*:\
+ *`unsigned-suffix`* *`long-suffix`*opt\
+ *`unsigned-suffix`* *`long-long-suffix`*\
+ *`unsigned-suffix`* *`64-bit-integer-suffix`*\
+ *`long-suffix`* *`unsigned-suffix`*opt\
+ *`long-long-suffix`* *`unsigned-suffix`*opt\
+ *`64-bit-integer-suffix`*
-*unsigned-suffix*: one of
- **u U**
+*`unsigned-suffix`*: one of\
+ **`u U`**
-*long-suffix*: one of
- **l L**
+*`long-suffix`*: one of\
+ **`l L`**
-*long-long-suffix*: one of
- **ll LL**
+*`long-long-suffix`*: one of\
+ **`ll LL`**
-*64-bit-integer-suffix*: one of
- **i64 I64**
+*`64-bit-integer-suffix`*: one of\
+ **`i64 I64`**
-The **i64** and **I64** suffixes are Microsoft-specific.
+The **`i64`** and **`I64`** suffixes are Microsoft-specific.
-Integer constants are positive unless they are preceded by a minus sign (**-**). The minus sign is interpreted as the unary arithmetic negation operator. (See [Unary Arithmetic Operators](../c-language/unary-arithmetic-operators.md) for information about this operator.)
+Integer constants are positive unless they're preceded by a minus sign (**`-`**). The minus sign is interpreted as the unary arithmetic negation operator. (See [Unary Arithmetic Operators](../c-language/unary-arithmetic-operators.md) for information about this operator.)
-If an integer constant begins with **0x** or **0X**, it is hexadecimal. If it begins with the digit **0**, it is octal. Otherwise, it is assumed to be decimal.
+If an integer constant begins with **`0x`** or **`0X`**, it's hexadecimal. If it begins with the digit **`0`**, it's octal. Otherwise, it's assumed to be decimal.
The following integer constants are equivalent:
diff --git a/docs/c-language/c-keywords.md b/docs/c-language/c-keywords.md
index 7ab089e397..37810945be 100644
--- a/docs/c-language/c-keywords.md
+++ b/docs/c-language/c-keywords.md
@@ -47,6 +47,8 @@ The C language uses the following keywords:
**`struct`**\
**`switch`**\
**`typedef`**\
+ **[`typeof`](typeof-c.md)**\
+ **[`typeof_unqual`](typeof-unqual-c.md)**\
**`union`**\
**`unsigned`**\
**`void`**\
@@ -67,12 +69,9 @@ The C language uses the following keywords:
:::column-end:::
:::row-end:::
-1 Keywords introduced in ISO C99.
-
-2 Keywords introduced in ISO C11.
-
-a Starting in Visual Studio 2019 version 16.8, these keywords are supported in code compiled as C when the **`/std:c11`** or **`/std:c17`** compiler options are specified.
-
+1 Keywords introduced in ISO C99.\
+2 Keywords introduced in ISO C11.\
+a Starting in Visual Studio 2019 version 16.8, these keywords are supported in code compiled as C when the **`/std:c11`** or **`/std:c17`** compiler options are specified.\
b Starting in Visual Studio 2019 version 16.8, these keywords are recognized but not supported by the compiler in code compiled as C when the **`/std:c11`** or **`/std:c17`** compiler options are specified.
You can't redefine keywords. However, you can specify text to replace keywords before compilation by using C [preprocessor directives](../preprocessor/preprocessor-directives.md).
@@ -105,6 +104,8 @@ The following keywords and special identifiers are recognized by the Microsoft C
:::column:::
**`__stdcall`**5\
**`__try`**5\
+ **[`__typeof__`](typeof-c.md)**\
+ **[`__typeof_unqual__`](typeof-unqual-c.md)**\
**`dllexport`**4\
**`dllimport`**4\
**`naked`**4\
@@ -113,17 +114,14 @@ The following keywords and special identifiers are recognized by the Microsoft C
:::column-end:::
:::row-end:::
-3 The **`__based`** keyword has limited uses for 32-bit and 64-bit target compilations.
-
-4 These are special identifiers when used with **`__declspec`**; their use in other contexts is unrestricted.
-
-5 For compatibility with previous versions, these keywords are available both with two leading underscores and a single leading underscore when Microsoft extensions are enabled.
-
+3 The **`__based`** keyword has limited uses for 32-bit and 64-bit target compilations.\
+4 These are special identifiers when used with **`__declspec`**; their use in other contexts is unrestricted.\
+5 For compatibility with previous versions, these keywords are available both with two leading underscores and a single leading underscore when Microsoft extensions are enabled.\
6 If you don't include , the Microsoft Visual C compiler maps **`static_assert`** to the C11 **`_Static_assert`** keyword.
-Microsoft extensions are enabled by default. To assist in creating portable code, you can disable Microsoft extensions by specifying the [/Za \(Disable language extensions)](../build/reference/za-ze-disable-language-extensions.md) option during compilation. When you use this option, some Microsoft-specific keywords are disabled.
+Microsoft extensions are enabled by default. To help create portable code, you can disable Microsoft extensions by specifying the [/Za \(Disable language extensions)](../build/reference/za-ze-disable-language-extensions.md) option during compilation. When you use this option, some Microsoft-specific keywords are disabled.
-When Microsoft extensions are enabled, you can use the keywords listed above in your programs. To conform to the language standard, most of these keywords are prefaced by a double underscore. The four exceptions, **`dllexport`**, **`dllimport`**, **`naked`**, and **`thread`**, are used only with **`__declspec`** and don't require a leading double underscore. For backward compatibility, single-underscore versions of the rest of the keywords are supported.
+When Microsoft extensions are enabled, you can use the keywords listed above in your programs. To conform to the language standard, most of these keywords have a leading double underscore. The four exceptions, **`dllexport`**, **`dllimport`**, **`naked`**, and **`thread`**, are used only with **`__declspec`** and don't require a leading double underscore. For backward compatibility, single-underscore versions of the rest of the keywords are supported.
## See also
diff --git a/docs/c-language/c-multiplicative-operators.md b/docs/c-language/c-multiplicative-operators.md
index 72b67af583..986ee8c86c 100644
--- a/docs/c-language/c-multiplicative-operators.md
+++ b/docs/c-language/c-multiplicative-operators.md
@@ -7,30 +7,30 @@ ms.assetid: 495471c9-319b-4eb4-bd97-039a025fd3a9
---
# C Multiplicative Operators
-The multiplicative operators perform multiplication (\*), division (**/**), and remainder (**%**) operations.
+The multiplicative operators perform multiplication (**`*`**), division (**`/`**), and remainder (**`%`**) operations.
## Syntax
-*multiplicative-expression*:
- *cast-expression*
- *multiplicative-expression* \* *cast-expression*
- *multiplicative-expression* **/** *cast-expression*
- *multiplicative-expression* **%** *cast-expression*
+*`multiplicative-expression`*:
+ *`cast-expression`*
+ *`multiplicative-expression`* **`*`** *`cast-expression`*
+ *`multiplicative-expression`* **`/`** *`cast-expression`*
+ *`multiplicative-expression`* **`%`** *`cast-expression`*
-The operands of the remainder operator (**%**) must be integral. The multiplication (\*) and division (**/**) operators can take integral- or floating-type operands; the types of the operands can be different.
+The operands of the remainder operator (**`%`**) must be integral. The multiplication (**`*`**) and division (**`/`**) operators can take integral- or floating-type operands; the types of the operands can be different.
The multiplicative operators perform the usual arithmetic conversions on the operands. The type of the result is the type of the operands after conversion.
> [!NOTE]
> Since the conversions performed by the multiplicative operators do not provide for overflow or underflow conditions, information may be lost if the result of a multiplicative operation cannot be represented in the type of the operands after conversion.
-The C multiplicative operators are described below:
+The C multiplicative operators are described in this table:
-|Operator|Description|
-|--------------|-----------------|
-|\*|The multiplication operator causes its two operands to be multiplied.|
-|**/**|The division operator causes the first operand to be divided by the second. If two integer operands are divided and the result is not an integer, it is truncated according to the following rules:
- The result of division by 0 is undefined according to the ANSI C standard. The Microsoft C compiler generates an error at compile time or run time.
- If both operands are positive or unsigned, the result is truncated toward 0.
- If either operand is negative, whether the result of the operation is the largest integer less than or equal to the algebraic quotient or is the smallest integer greater than or equal to the algebraic quotient is implementation defined. (See the Microsoft-specific section below.)|
-|**%**|The result of the remainder operator is the remainder when the first operand is divided by the second. When the division is inexact, the result is determined by the following rules:
- If the right operand is zero, the result is undefined.
- If both operands are positive or unsigned, the result is positive.
- If either operand is negative and the result is inexact, the result is implementation defined. (See the Microsoft-specific section below.)|
+| Operator | Description |
+|---|---|
+| **`*`** | The multiplication operator causes its two operands to be multiplied. |
+| **`/`** | The division operator causes the first operand to be divided by the second. If two integer operands are divided and the result isn't an integer, it's truncated according to the following rules:
- The result of division by 0 is undefined according to the ANSI C standard. The Microsoft C compiler generates an error at compile time or run time.
- If both operands are positive or unsigned, the result is truncated toward 0.
- If either operand is negative, whether the result of the operation is the largest integer less than or equal to the algebraic quotient, or is the smallest integer greater than or equal to the algebraic quotient, is implementation defined. (See the Microsoft-specific section.) |
+| **`%`** | The result of the remainder operator is the remainder when the first operand is divided by the second. When the division is inexact, the result is determined by the following rules:
- If the right operand is zero, the result is undefined.
- If both operands are positive or unsigned, the result is positive.
- If either operand is negative and the result is inexact, the result is implementation defined. (See the Microsoft-specific section.) |
### Microsoft-specific
@@ -40,28 +40,28 @@ If either operation is negative in division with the remainder operator, the res
## Examples
-The declarations shown below are used for the following examples:
+The declarations shown here are used for the following examples:
-```
+```c
int i = 10, j = 3, n;
double x = 2.0, y;
```
This statement uses the multiplication operator:
-```
+```c
y = x * i;
```
In this case, `x` is multiplied by `i` to give the value 20.0. The result has **`double`** type.
-```
+```c
n = i / j;
```
In this example, 10 is divided by 3. The result is truncated toward 0, yielding the integer value 3.
-```
+```c
n = i % j;
```
@@ -71,7 +71,7 @@ This statement assigns `n` the integer remainder, 1, when 10 is divided by 3.
The sign of the remainder is the same as the sign of the dividend. For example:
-```
+```c
50 % -6 = 2
-50 % 6 = -2
```
diff --git a/docs/c-language/c-postfix-increment-and-decrement-operators.md b/docs/c-language/c-postfix-increment-and-decrement-operators.md
index da10c1a8b0..a80001ce71 100644
--- a/docs/c-language/c-postfix-increment-and-decrement-operators.md
+++ b/docs/c-language/c-postfix-increment-and-decrement-operators.md
@@ -11,14 +11,14 @@ Operands of the postfix increment and decrement operators are scalar types that
## Syntax
-*postfix-expression*:
- *postfix-expression* **++**
- *postfix-expression* **--**
+*`postfix-expression`*:\
+ *`postfix-expression`* **`++`**\
+ *`postfix-expression`* **`--`**
The result of the postfix increment or decrement operation is the value of the operand. After the result is obtained, the value of the operand is incremented (or decremented). The following code illustrates the postfix increment operator.
-```
-if( var++ > 0 )
+```C
+if ( var++ > 0 )
*p++ = *q++;
```
diff --git a/docs/c-language/c-primary-expressions.md b/docs/c-language/c-primary-expressions.md
index 81a50ee115..b2939192a2 100644
--- a/docs/c-language/c-primary-expressions.md
+++ b/docs/c-language/c-primary-expressions.md
@@ -11,17 +11,17 @@ Primary expressions are the building blocks of more complex expressions. They ma
## Syntax
*`primary-expression`*:\
- *`identifier`*\
- *`constant`*\
- *`string-literal`*\
- **(** *`expression`* **)**\
- *`generic-selection`*
+ *`identifier`*\
+ *`constant`*\
+ *`string-literal`*\
+ **`(`** *`expression`* **`)`**\
+ *`generic-selection`*
-*expression*:\
- *`assignment-expression`*\
- *`expression`***,** *`assignment-expression`*
+*`expression`*:\
+ *`assignment-expression`*\
+ *`expression`* **`,`** *`assignment-expression`*
## See also
-[Generic selection](generic-selection.md)
+[Generic selection](generic-selection.md)\
[Operands and Expressions](../c-language/operands-and-expressions.md)
diff --git a/docs/c-language/c-relational-and-equality-operators.md b/docs/c-language/c-relational-and-equality-operators.md
index 7451821364..d0a1178103 100644
--- a/docs/c-language/c-relational-and-equality-operators.md
+++ b/docs/c-language/c-relational-and-equality-operators.md
@@ -7,21 +7,21 @@ ms.assetid: c89a3815-a65e-4e0d-8333-0e8dc7fdb30b
---
# C Relational and Equality Operators
-The binary relational and equality operators compare their first operand to their second operand to test the validity of the specified relationship. The result of a relational expression is 1 if the tested relationship is true and 0 if it is false. The type of the result is **`int`**.
+The binary relational and equality operators compare their first operand to their second operand to test the validity of the specified relationship. The result of a relational expression is 1 if the tested relationship is true and 0 if it's false. The type of the result is **`int`**.
-**Syntax**
+## Syntax
-*relational-expression*:
- *shift-expression*
- *relational-expression* **`<`** *shift-expression*
- *relational-expression* **`>`** *shift-expression*
- *relational-expression* **`<=`** *shift-expression*
- *relational-expression* **`>=`** *shift-expression*
+*`relational-expression`*:\
+ *`shift-expression`*\
+ *`relational-expression`* **`<`** *`shift-expression`*\
+ *`relational-expression`* **`>`** *`shift-expression`*\
+ *`relational-expression`* **`<=`** *`shift-expression`*\
+ *`relational-expression`* **`>=`** *`shift-expression`*
-*equality-expression*:
- *relational-expression*
- *equality-expression* **==** *relational-expression*
- *equality-expression* **!=** *relational-expression*
+*`equality-expression`*:\
+ *`relational-expression`*\
+ *`equality-expression`* **`==`** *`relational-expression`*\
+ *`equality-expression`* **`!=`** *`relational-expression`*
The relational and equality operators test the following relationships:
@@ -31,24 +31,24 @@ The relational and equality operators test the following relationships:
|**`>`**|First operand greater than second operand|
|**`<=`**|First operand less than or equal to second operand|
|**`>=`**|First operand greater than or equal to second operand|
-|**==**|First operand equal to second operand|
-|**!=**|First operand not equal to second operand|
+|**`==`**|First operand equal to second operand|
+|**`!=`**|First operand not equal to second operand|
-The first four operators in the list above have a higher precedence than the equality operators (`==` and `!=`). See the precedence information in the table [Precedence and Associativity of C Operators](../c-language/precedence-and-order-of-evaluation.md).
+The first four operators in the list have a higher precedence than the equality operators (**`==`** and **`!=`**). See the precedence information in the table [Precedence and Associativity of C Operators](../c-language/precedence-and-order-of-evaluation.md).
The operands can have integral, floating, or pointer type. The types of the operands can be different. Relational operators perform the usual arithmetic conversions on integral and floating type operands. In addition, you can use the following combinations of operand types with the relational and equality operators:
-- Both operands of any relational or equality operator can be pointers to the same type. For the equality (`==`) and inequality (`!=`) operators, the result of the comparison indicates whether the two pointers address the same memory location. For the other relational operators (**\<**, **>**, **\<**=, and **>**=), the result of the comparison indicates the relative position of the two memory addresses of the objects pointed to. Relational operators compare only offsets.
+- Both operands of any relational or equality operator can be pointers to the same type. For the equality (**`==`**) and inequality (**`!=`**) operators, the result of the comparison indicates whether the two pointers address the same memory location. For the other relational operators (**`<`**, **`>`**, **`<=`**, and **`>=`**), the result of the comparison indicates the relative position of the two memory addresses of the objects pointed to. Relational operators compare only offsets.
- Pointer comparison is defined only for parts of the same object. If the pointers refer to members of an array, the comparison is equivalent to comparison of the corresponding subscripts. The address of the first array element is "less than" the address of the last element. In the case of structures, pointers to structure members declared later are "greater than" pointers to members declared earlier in the structure. Pointers to the members of the same union are equal.
+ Pointer comparison is defined only for parts of the same object. If the pointers refer to members of an array, the comparison is equivalent to comparison of the corresponding subscripts. The address of the first array element is "less than" the address of the last element. For structures, pointers to structure members declared later are "greater than" pointers to members declared earlier in the structure. Pointers to the members of the same union are equal.
-- A pointer value can be compared to the constant value 0 for equality (`==`) or inequality (`!=`). A pointer with a value of 0 is called a "null" pointer; that is, it does not point to a valid memory location.
+- A pointer value can be compared to the constant value 0 for equality (**`==`**) or inequality (**`!=`**). A pointer with a value of 0 is called a "null" pointer; that is, it doesn't point to a valid memory location.
-- The equality operators follow the same rules as the relational operators, but permit additional possibilities: a pointer can be compared to a constant integral expression with value 0, or to a pointer to **`void`**. If two pointers are both null pointers, they compare as equal. Equality operators compare both segment and offset.
+- The equality operators follow the same rules as the relational operators, but permit more possibilities: a pointer can be compared to a constant integral expression with value 0, or to a pointer to **`void`**. If two pointers are both null pointers, they compare as equal. Equality operators compare both segment and offset.
## Examples
-The examples below illustrate relational and equality operators.
+These examples illustrate relational and equality operators.
```C
int x = 0, y = 0;
@@ -78,9 +78,9 @@ enum color { red, white, green } col;
.
```
-These statements declare an enumeration variable named `col` with the tag `color`. At any time, the variable may contain an integer value of 0, 1, or 2, which represents one of the elements of the enumeration set `color`: the color red, white, or green, respectively. If `col` contains 0 when the **`if`** statement is executed, any statements depending on the **`if`** will be executed.
+These statements declare an enumeration variable named `col` with the tag `color`. At any time, the variable may contain an integer value of 0, 1, or 2, which represents one of the elements of the enumeration set `color`: the color `red`, `white`, or `green`, respectively. If `col` contains 0 when the **`if`** statement is executed, any statements depending on the **`if`** will be executed.
## See also
-[Relational Operators: \<, >, \<=, and >=](../cpp/relational-operators-equal-and-equal.md)
-[Equality Operators: == and !=](../cpp/equality-operators-equal-equal-and-exclpt-equal.md)
+[Relational Operators: `<`, `>`, `<=`, and `>=`](../cpp/relational-operators-equal-and-equal.md)\
+[Equality Operators: `==` and `!=`](../cpp/equality-operators-equal-equal-and-exclpt-equal.md)
diff --git a/docs/c-language/c-storage-classes.md b/docs/c-language/c-storage-classes.md
index d558b04a56..7ad68fdbfb 100644
--- a/docs/c-language/c-storage-classes.md
+++ b/docs/c-language/c-storage-classes.md
@@ -9,25 +9,25 @@ ms.assetid: 893fb929-f7a9-43dc-a0b3-29cb1ef845c1
The "storage class" of a variable determines whether the item has a "global" or "local" lifetime. C calls these two lifetimes "static" and "automatic." An item with a global lifetime exists and has a value throughout the execution of the program. All functions have global lifetimes.
-Automatic variables, or variables with local lifetimes, are allocated new storage each time execution control passes to the block in which they are defined. When execution returns, the variables no longer have meaningful values.
+Automatic variables, or variables with local lifetimes, are allocated new storage each time execution control passes to the block in which they're defined. When execution returns, the variables no longer have meaningful values.
C provides the following storage-class specifiers:
## Syntax
-*storage-class-specifier*:
- **`auto`**
- **`register`**
- **`static`**
- **`extern`**
- **`typedef`**
- **`__declspec (`** *extended-decl-modifier-seq* **`)`** /\* Microsoft-specific \*/
+*`storage-class-specifier`*:\
+ **`auto`**\
+ **`register`**\
+ **`static`**\
+ **`extern`**\
+ **`typedef`**\
+ **`__declspec (`** *`extended-decl-modifier-seq`* **`)`** /\* Microsoft-specific \*/
-Except for **`__declspec`**, you can use only one *storage-class-specifier* in the *declaration-specifier* in a declaration. If no storage-class specification is made, declarations within a block create automatic objects.
+Except for **`__declspec`**, you can use only one *`storage-class-specifier`* in the *`declaration-specifier`* in a declaration. If no storage-class specification is made, declarations within a block create automatic objects.
Items declared with the **`auto`** or **`register`** specifier have local lifetimes. Items declared with the **`static`** or **`extern`** specifier have global lifetimes.
-Since **`typedef`** and **`__declspec`** are semantically different from the other four *storage-class-specifier* terminals, they are discussed separately. For specific information on **`typedef`**, see [`typedef` Declarations](../c-language/typedef-declarations.md). For specific information on **`__declspec`**, see [Extended Storage-Class Attributes](../c-language/c-extended-storage-class-attributes.md).
+Since **`typedef`** and **`__declspec`** are semantically different from the other four *`storage-class-specifier`* terminals, they're discussed separately. For specific information on **`typedef`**, see [`typedef` Declarations](../c-language/typedef-declarations.md). For specific information on **`__declspec`**, see [Extended Storage-Class Attributes](../c-language/c-extended-storage-class-attributes.md).
The placement of variable and function declarations within source files also affects storage class and visibility. Declarations outside all function definitions are said to appear at the "external level." Declarations within function definitions appear at the "internal level."
@@ -37,7 +37,7 @@ The exact meaning of each storage-class specifier depends on two factors:
- Whether the item being declared is a variable or a function
-[Storage-Class Specifiers for External-Level Declarations](../c-language/storage-class-specifiers-for-external-level-declarations.md) and [Storage-Class Specifiers for Internal-Level Declarations](../c-language/storage-class-specifiers-for-internal-level-declarations.md) describe the *storage-class-specifier* terminals in each kind of declaration and explain the default behavior when the *storage-class-specifier* is omitted from a variable. [Storage-Class Specifiers with Function Declarations](../c-language/storage-class-specifiers-with-function-declarations.md) discusses storage-class specifiers used with functions.
+[Storage-Class Specifiers for External-Level Declarations](../c-language/storage-class-specifiers-for-external-level-declarations.md) and [Storage-Class Specifiers for Internal-Level Declarations](../c-language/storage-class-specifiers-for-internal-level-declarations.md) describe the *`storage-class-specifier`* terminals in each kind of declaration and explain the default behavior when the *`storage-class-specifier`* is omitted from a variable. [Storage-Class Specifiers with Function Declarations](../c-language/storage-class-specifiers-with-function-declarations.md) discusses storage-class specifiers used with functions.
## See also
diff --git a/docs/c-language/c-string-literals.md b/docs/c-language/c-string-literals.md
index 247e0a3707..54b5432c76 100644
--- a/docs/c-language/c-string-literals.md
+++ b/docs/c-language/c-string-literals.md
@@ -7,33 +7,31 @@ ms.assetid: 4b05523e-49a2-4900-b21a-754350af3328
---
# C String Literals
-A "string literal" is a sequence of characters from the source character set enclosed in double quotation marks (**" "**). String literals are used to represent a sequence of characters which, taken together, form a null-terminated string. You must always prefix wide-string literals with the letter **L**.
+A "string literal" is a sequence of characters from the source character set enclosed in double quotation marks (**`" "`**). String literals are used to represent a sequence of characters, which taken together form a null-terminated string. You must always prefix wide-string literals with the letter **`L`**.
## Syntax
-*string-literal*:
- **"** *s-char-sequence*opt **"**
- **L"** *s-char-sequence*opt **"**
+*`string-literal`*:\
+ **`"`** *`s-char-sequence`*opt **`"`**\
+ **`L"`** *`s-char-sequence`*opt **`"`**
-*s-char-sequence*:
- *s-char*
+*`s-char-sequence`*:\
+ *`s-char`*\
+ *`s-char-sequence`* *`s-char`*
- *s-char-sequence* *s-char*
-
-*s-char*:
- any member of the source character set except the double quotation mark ("), backslash (\\), or newline character
-
- *escape-sequence*
+*`s-char`*:\
+ any member of the source character set except the double quotation mark (**`"`**), backslash (**`\`**), or newline character\
+ *`escape-sequence`*
## Remarks
-The example below is a simple string literal:
+This example is a simple string literal:
```C
char *amessage = "This is a string literal.";
```
-All escape codes listed in the [Escape Sequences](../c-language/escape-sequences.md) table are valid in string literals. To represent a double quotation mark in a string literal, use the escape sequence **\\"**. The single quotation mark (**'**) can be represented without an escape sequence. The backslash (**\\**) must be followed with a second backslash (**\\\\**) when it appears within a string. When a backslash appears at the end of a line, it is always interpreted as a line-continuation character.
+All escape codes listed in the [Escape Sequences](../c-language/escape-sequences.md) table are valid in string literals. To represent a double quotation mark in a string literal, use the escape sequence **`\"`**. The single quotation mark (**`'`**) can be represented without an escape sequence. The backslash (**`\`**) must be followed with a second backslash (**`\\`**) when it appears within a string. When a backslash appears at the end of a line, it's always interpreted as a line-continuation character.
## See also
diff --git a/docs/c-language/c-tokens.md b/docs/c-language/c-tokens.md
index 7e39df4144..d00556d9fa 100644
--- a/docs/c-language/c-tokens.md
+++ b/docs/c-language/c-tokens.md
@@ -7,27 +7,22 @@ ms.assetid: 05e5f6f1-b8ea-4f74-af17-c0b9b5dbd3b5
---
# C Tokens
-In a C source program, the basic element recognized by the compiler is the "token." A token is source-program text that the compiler does not break down into component elements.
+In a C source program, the basic element recognized by the compiler is the "token." A token is source-program text that the compiler doesn't break down into component elements.
## Syntax
-*token*:
-*keyword*
-
-*identifier*
-
-*constant*
-
-*string-literal*
-
-*operator*
-
-*punctuator*
+*`token`*:\
+ *`keyword`*\
+ *`identifier`*\
+ *`constant`*\
+ *`string-literal`*\
+ *`operator`*\
+ *`punctuator`*
> [!NOTE]
> See the introduction to [C Language Syntax Summary](../c-language/c-language-syntax-summary.md) for an explanation of the ANSI syntax conventions.
-The keywords, identifiers, constants, string literals, and operators described in this section are examples of tokens. Punctuation characters such as brackets (**[ ]**), braces (**{ }**), parentheses ( **( )** ), and commas (**,**) are also tokens.
+The keywords, identifiers, constants, string literals, and operators described in this section are examples of tokens. Punctuation characters such as brackets (**`[ ]`**), braces (**`{ }`**), parentheses ( **`( )`** ), and commas (**`,`**) are also tokens.
## See also
diff --git a/docs/c-language/c-type-specifiers.md b/docs/c-language/c-type-specifiers.md
index 0cffa4a1bd..a8ba159155 100644
--- a/docs/c-language/c-type-specifiers.md
+++ b/docs/c-language/c-type-specifiers.md
@@ -3,7 +3,6 @@ description: "Learn more about: C Type Specifiers"
title: "C Type Specifiers"
ms.date: "01/29/2018"
helpviewer_keywords: ["type specifiers, C", "specifiers, type"]
-ms.assetid: fbe13441-04c3-4829-b047-06d374adc2b6
---
# C Type Specifiers
@@ -11,23 +10,23 @@ Type specifiers in declarations define the type of a variable or function declar
## Syntax
-*type-specifier*:
- **`void`**
- **`char`**
- **`short`**
- **`int`**
- **`long`**
- **`float`**
- **`double`**
- **`signed`**
- **`unsigned`**
- *struct-or-union-specifier*
- *enum-specifier*
- *typedef-name*
+*`type-specifier`*:
+ **`void`**
+ **`char`**
+ **`short`**
+ **`int`**
+ **`long`**
+ **`float`**
+ **`double`**
+ **`signed`**
+ **`unsigned`**
+ *`struct-or-union-specifier`*
+ *`enum-specifier`*
+ *`typedef-name`*
-The **`signed char`**, **`signed int`**, **`signed short int`**, and **signed long int** types, together with their **`unsigned`** counterparts and **`enum`**, are called *integral* types. The **`float`**, **`double`**, and **`long double`** type specifiers are referred to as *floating* or *floating-point* types. You can use any integral or floating-point type specifier in a variable or function declaration. If a *type-specifier* is not provided in a declaration, it is taken to be **`int`**.
+The **`signed char`**, **`signed int`**, **`signed short int`**, and **signed long int** types, together with their **`unsigned`** counterparts and **`enum`**, are called *integral* types. The **`float`**, **`double`**, and **`long double`** type specifiers are referred to as *floating* or *floating-point* types. You can use any integral or floating-point type specifier in a variable or function declaration. Originally, if a *`type-specifier`* wasn't provided in a declaration, it was taken to be **`int`**. The Microsoft compiler no longer accepts default **`int`** declarations.
-The optional keywords **`signed`** and **`unsigned`** can precede or follow any of the integral types, except **`enum`**, and can also be used alone as type specifiers, in which case they are understood as **`signed int`** and **`unsigned int`**, respectively. When used alone, the keyword **`int`** is assumed to be **`signed`**. When used alone, the keywords **`long`** and **`short`** are understood as **long int** and **`short int`**.
+The optional keywords **`signed`** and **`unsigned`** can precede or follow any of the integral types, except **`enum`**, and can also be used alone as type specifiers, in which case they're understood as **`signed int`** and **`unsigned int`**, respectively. When used alone, the keyword **`int`** is assumed to be **`signed`**. When used alone, the keywords **`long`** and **`short`** are understood as **long int** and **`short int`**.
Enumeration types are considered basic types. Type specifiers for enumeration types are discussed in [Enumeration Declarations](../c-language/c-enumeration-declarations.md).
@@ -35,7 +34,7 @@ The keyword **`void`** has three uses: to specify a function return type, to spe
**Microsoft Specific**
-Type checking is now ANSI-conforming, which means that type **`short`** and type **`int`** are distinct types. For example, this is a redefinition in the Microsoft C compiler that was accepted by previous versions of the compiler.
+Type checking is now ANSI-conforming, which means that type **`short`** and type **`int`** are distinct types. For example, this sample shows a redefinition in the Microsoft C compiler that was accepted by previous versions of the compiler.
```C
int myfunc();
@@ -55,19 +54,21 @@ The Microsoft C compiler also generates warnings for differences in sign. For ex
```C
signed int *pi;
-unsigned int *pu
+unsigned int *pu;
pi = pu; /* Now generates warning */
```
-Type **`void`** expressions are evaluated for side effects. You cannot use the (nonexistent) value of an expression that has type **`void`** in any way, nor can you convert a **`void`** expression (by implicit or explicit conversion) to any type except **`void`**. If you do use an expression of any other type in a context where a **`void`** expression is required, its value is discarded.
+Type **`void`** expressions are evaluated for side effects. You can't use the (nonexistent) value of an expression that has type **`void`** in any way, nor can you convert a **`void`** expression (by implicit or explicit conversion) to any type except **`void`**. If you do use an expression of any other type in a context where a **`void`** expression is required, its value is discarded.
-To conform to the ANSI specification, void\*\* cannot be used as int\*\*. Only **`void`**\* can be used as a pointer to an unspecified type.
+To conform to the ANSI specification, `void**` can't be used as `int**`. Only `void*` can be used as a pointer to an unspecified type.
**END Microsoft Specific**
-You can create additional type specifiers with **`typedef`** declarations, as described in [Typedef Declarations](../c-language/typedef-declarations.md). See [Storage of Basic Types](../c-language/storage-of-basic-types.md) for information on the size of each type.
+You can create more type specifiers with **`typedef`** declarations, as described in [Typedef Declarations](../c-language/typedef-declarations.md). See [Storage of Basic Types](../c-language/storage-of-basic-types.md) for information on the size of each type.
## See also
-[Declarations and Types](../c-language/declarations-and-types.md)
+[Declarations and Types](../c-language/declarations-and-types.md)\
+[`typeof, __typeof__` (C23)](typeof-c.md)\
+[`typeof_unqual, __typeof_unqual__` (C23)](typeof-unqual-c.md)
\ No newline at end of file
diff --git a/docs/c-language/c-unary-operators.md b/docs/c-language/c-unary-operators.md
index 104e0f38ae..b62c8f56fc 100644
--- a/docs/c-language/c-unary-operators.md
+++ b/docs/c-language/c-unary-operators.md
@@ -11,21 +11,16 @@ Unary operators appear before their operand and associate from right to left.
## Syntax
-*unary-expression*:
-*postfix-expression*
-
-**++** *unary-expression*
-
-`--` *unary-expression*
-
-*unary-operator cast-expression*
-
-**`sizeof`** *unary-expression*
-
-**sizeof (** *type-name* **)**
-
-*unary-operator*: one of
-**& \* + -** `~` **!**
+*`unary-expression`*:\
+ *`postfix-expression`*\
+ **`++`** *`unary-expression`*\
+ **`--`** *`unary-expression`*\
+ *`unary-operator`* *`cast-expression`*\
+ **`sizeof`** *`unary-expression`*\
+ **`sizeof (`** *`type-name`* **`)`**
+
+*`unary-operator`*: one of\
+ **`&`** **`*`** **`+`** **`-`** **`~`** **`!`**
## See also
diff --git a/docs/c-language/cast-operators.md b/docs/c-language/cast-operators.md
index 57df56958f..237a207f9f 100644
--- a/docs/c-language/cast-operators.md
+++ b/docs/c-language/cast-operators.md
@@ -11,13 +11,12 @@ A type cast provides a method for explicit conversion of the type of an object i
## Syntax
-*cast-expression*:
-*unary-expression*
+*`cast-expression`*:\
+ *`unary-expression`*\
+ **`(`** *`type-name`* **`)`** *`cast-expression`*
-**(** *type-name* **)** *cast-expression*
-
-The compiler treats *cast-expression* as type *type-name* after a type cast has been made. Casts can be used to convert objects of any scalar type to or from any other scalar type. Explicit type casts are constrained by the same rules that determine the effects of implicit conversions, discussed in [Assignment Conversions](../c-language/assignment-conversions.md). Additional restraints on casts may result from the actual sizes or representation of specific types. See [Storage of Basic Types](../c-language/storage-of-basic-types.md) for information on actual sizes of integral types. For more information on type casts, see [Type-Cast Conversions](../c-language/type-cast-conversions.md).
+The compiler treats *`cast-expression`* as type *`type-name`* after a type cast has been made. Casts can be used to convert objects of any scalar type to or from any other scalar type. Explicit type casts are constrained by the same rules that determine the effects of implicit conversions, discussed in [Assignment Conversions](../c-language/assignment-conversions.md). Additional restraints on casts may result from the actual sizes or representation of specific types. See [Storage of Basic Types](../c-language/storage-of-basic-types.md) for information on actual sizes of integral types. For more information on type casts, see [Type-Cast Conversions](../c-language/type-cast-conversions.md).
## See also
-[Cast Operator: ()](../cpp/cast-operator-parens.md)
+[Cast Operator: `()`](../cpp/cast-operator-parens.md)
diff --git a/docs/c-language/compound-statement-c.md b/docs/c-language/compound-statement-c.md
index f3c48a567a..f395a11aa1 100644
--- a/docs/c-language/compound-statement-c.md
+++ b/docs/c-language/compound-statement-c.md
@@ -11,24 +11,24 @@ A compound statement (also called a "block") typically appears as the body of an
## Syntax
-*compound-statement*:
- **{** *declaration-list*opt *statement-list*opt **}**
+*`compound-statement`*:\
+ **`{`** *`declaration-list`*opt *`statement-list`*opt **`}`**
-*declaration-list*:
- *declaration*
- *declaration-list* *declaration*
+*`declaration-list`*:\
+ *`declaration`*\
+ *`declaration-list`* *`declaration`*
-*statement-list*:
- *statement*
- *statement-list* *statement*
+*`statement-list`*:\
+ *`statement`*\
+ *`statement-list`* *`statement`*
-If there are declarations, they must come before any statements. The scope of each identifier declared at the beginning of a compound statement extends from its declaration point to the end of the block. It is visible throughout the block unless a declaration of the same identifier exists in an inner block.
+If there are declarations, they must come before any statements. The scope of each identifier declared at the beginning of a compound statement extends from its declaration point to the end of the block. It's visible throughout the block unless a declaration of the same identifier exists in an inner block.
Identifiers in a compound statement are presumed **`auto`** unless explicitly declared otherwise with **`register`**, **`static`**, or **`extern`**, except functions, which can only be **`extern`**. You can leave off the **`extern`** specifier in function declarations and the function will still be **`extern`**.
-Storage is not allocated and initialization is not permitted if a variable or function is declared in a compound statement with storage class **`extern`**. The declaration refers to an external variable or function defined elsewhere.
+Storage isn't allocated and initialization isn't permitted if a variable or function is declared in a compound statement with storage class **`extern`**. The declaration refers to an external variable or function defined elsewhere.
-Variables declared in a block with the **`auto`** or **`register`** keyword are reallocated and, if necessary, initialized each time the compound statement is entered. These variables are not defined after the compound statement is exited. If a variable declared inside a block has the **`static`** attribute, the variable is initialized when program execution begins and keeps its value throughout the program. See [Storage Classes](../c-language/c-storage-classes.md) for information about **`static`**.
+Variables declared in a block with the **`auto`** or **`register`** keyword are reallocated and, if necessary, initialized each time the compound statement is entered. These variables are no longer defined after the compound statement is exited. If a variable declared inside a block has the **`static`** attribute, the variable is initialized when program execution begins and keeps its value throughout the program. See [Storage Classes](../c-language/c-storage-classes.md) for information about **`static`**.
This example illustrates a compound statement:
diff --git a/docs/c-language/conditional-expression-operator.md b/docs/c-language/conditional-expression-operator.md
index e427bcfc9f..4dfba70eff 100644
--- a/docs/c-language/conditional-expression-operator.md
+++ b/docs/c-language/conditional-expression-operator.md
@@ -7,33 +7,33 @@ ms.assetid: c4f1a5ca-0844-44a7-a384-eca584d4e3dd
---
# Conditional-Expression Operator
-C has one ternary operator: the conditional-expression operator (**? :**).
+C has one ternary operator: the conditional-expression operator (**`? :`**).
## Syntax
-*conditional-expression*:
- *logical-OR-expression*
- *logical-OR expression* **?** *expression* **:** *conditional-expression*
+*`conditional-expression`*:\
+ *`logical-OR-expression`*\
+ *`logical-OR-expression`* **`?`** *`expression`* **`:`** *`conditional-expression`*
-The *logical-OR-expression* must have integral, floating, or pointer type. It is evaluated in terms of its equivalence to 0. A sequence point follows *logical-OR-expression*. Evaluation of the operands proceeds as follows:
+The *`logical-OR-expression`* must have integral, floating, or pointer type. It's evaluated in terms of its equivalence to 0. A sequence point follows *`logical-OR-expression`*. Evaluation of the operands proceeds as follows:
-- If *logical-OR-expression* is not equal to 0, *expression* is evaluated. The result of evaluating the expression is given by the nonterminal *expression*. (This means *expression* is evaluated only if *logical-OR-expression* is true.)
+- If *`logical-OR-expression`* isn't equal to 0, *`expression`* is evaluated. The result of evaluating the expression is given by the nonterminal *`expression`*. (It means *`expression`* is evaluated only if *`logical-OR-expression`* is true.)
-- If *logical-OR-expression* equals 0, *conditional-expression* is evaluated. The result of the expression is the value of *conditional-expression*. (This means *conditional-expression* is evaluated only if *logical-OR-expression* is false.)
+- If *`logical-OR-expression`* equals 0, *`conditional-expression`* is evaluated. The result of the expression is the value of *`conditional-expression`*. (It means *`conditional-expression`* is evaluated only if *`logical-OR-expression`* is false.)
-Note that either *expression* or *conditional-expression* is evaluated, but not both.
+The effect is, either *`expression`* or *`conditional-expression`* is evaluated, but not both.
-The type of the result of a conditional operation depends on the type of the *expression* or *conditional-expression* operand, as follows:
+The type of the result of a conditional operation depends on the type of the *`expression`* or *`conditional-expression`* operand, as follows:
-- If *expression* or *conditional-expression* has integral or floating type (their types can be different), the operator performs the usual arithmetic conversions. The type of the result is the type of the operands after conversion.
+- If *`expression`* or *`conditional-expression`* has integral or floating type (their types can be different), the operator performs the usual arithmetic conversions. The type of the result is the type of the operands after conversion.
-- If both *expression* and *conditional-expression* have the same structure, union, or pointer type, the type of the result is the same structure, union, or pointer type.
+- If both *`expression`* and *`conditional-expression`* have the same structure, union, or pointer type, the type of the result is the same structure, union, or pointer type.
- If both operands have type **`void`**, the result has type **`void`**.
- If either operand is a pointer to an object of any type, and the other operand is a pointer to **`void`**, the pointer to the object is converted to a pointer to **`void`** and the result is a pointer to **`void`**.
-- If either *expression* or *conditional-expression* is a pointer and the other operand is a constant expression with the value 0, the type of the result is the pointer type.
+- If either *`expression`* or *`conditional-expression`* is a pointer and the other operand is a constant expression with the value 0, the type of the result is the pointer type.
In the type comparison for pointers, any type qualifiers (**`const`** or **`volatile`**) in the type to which the pointer points are insignificant, but the result type inherits the qualifiers from both components of the conditional.
@@ -41,13 +41,13 @@ In the type comparison for pointers, any type qualifiers (**`const`** or **`vola
The following examples show uses of the conditional operator:
-```
+```C
j = ( i < 0 ) ? ( -i ) : ( i );
```
This example assigns the absolute value of `i` to `j`. If `i` is less than 0, `-i` is assigned to `j`. If `i` is greater than or equal to 0, `i` is assigned to `j`.
-```cpp
+```C
void f1( void );
void f2( void );
int x;
@@ -62,4 +62,4 @@ In this example, two functions, `f1` and `f2`, and two variables, `x` and `y`, a
## See also
-[Conditional Operator: ? :](../cpp/conditional-operator-q.md)
+[Conditional Operator: `? :`](../cpp/conditional-operator-q.md)
diff --git a/docs/c-language/continue-statement-c.md b/docs/c-language/continue-statement-c.md
index 5cb99ac73d..7804883b74 100644
--- a/docs/c-language/continue-statement-c.md
+++ b/docs/c-language/continue-statement-c.md
@@ -11,7 +11,7 @@ The **`continue`** statement passes control to the next iteration of the nearest
## Syntax
-*`jump-statement`*:
+*`jump-statement`*:\
**`continue ;`**
The next iteration of a **`do`**, **`for`**, or **`while`** statement is determined as follows:
diff --git a/docs/c-language/conversions-to-and-from-pointer-types.md b/docs/c-language/conversions-to-and-from-pointer-types.md
index 6980b48742..f14c6a2fb7 100644
--- a/docs/c-language/conversions-to-and-from-pointer-types.md
+++ b/docs/c-language/conversions-to-and-from-pointer-types.md
@@ -11,11 +11,11 @@ A pointer to one type of value can be converted to a pointer to a different type
A pointer to **`void`** can be converted to or from a pointer to any type, without restriction or loss of information. If the result is converted back to the original type, the original pointer is recovered.
-If a pointer is converted to another pointer with the same type but having different or additional qualifiers, the new pointer is the same as the old except for restrictions imposed by the new qualifier.
+If a pointer is converted to another pointer with the same type but having different or extra qualifiers, the new pointer is the same as the old except for restrictions imposed by the new qualifier.
A pointer value can also be converted to an integral value. The conversion path depends on the size of the pointer and the size of the integral type, according to the following rules:
-- If the size of the pointer is greater than or equal to the size of the integral type, the pointer behaves like an unsigned value in the conversion, except that it cannot be converted to a floating value.
+- If the size of the pointer is greater than or equal to the size of the integral type, the pointer behaves like an unsigned value in the conversion, except that it can't be converted to a floating value.
- If the pointer is smaller than the integral type, the pointer is first converted to a pointer with the same size as the integral type, then converted to the integral type.
@@ -23,9 +23,9 @@ Conversely, an integral type can be converted to a pointer type according to the
- If the integral type is the same size as the pointer type, the conversion simply causes the integral value to be treated as a pointer (an unsigned integer).
-- If the size of the integral type is different from the size of the pointer type, the integral type is first converted to the size of the pointer, using the conversion paths given in the tables [Conversion from Signed Integral Types](../c-language/conversions-from-signed-integral-types.md) and [Conversion from Unsigned Integral Types](../c-language/conversions-from-unsigned-integral-types.md). It is then treated as a pointer value.
+- If the size of the integral type is different from the size of the pointer type, the integral type is first converted to the size of the pointer, using the conversion paths given in the tables [Conversion from Signed Integral Types](../c-language/conversions-from-signed-integral-types.md) and [Conversion from Unsigned Integral Types](../c-language/conversions-from-unsigned-integral-types.md). It's then treated as a pointer value.
-An integral constant expression with value 0 or such an expression cast to type **`void`** \* can be converted by a type cast, by assignment, or by comparison to a pointer of any type. This produces a null pointer that is equal to another null pointer of the same type, but this null pointer is not equal to any pointer to a function or to an object. Integers other than the constant 0 can be converted to pointer type, but the result is not portable.
+An integral constant expression with value 0 or such an expression cast to type `void*` can be converted by a type cast, by assignment, or by comparison to a pointer of any type. This operation produces a null pointer that's equal to another null pointer of the same type, but it isn't equal to any pointer to a function or to an object. Integers other than the constant 0 can be converted to pointer type, but the result isn't portable.
## See also
diff --git a/docs/c-language/cpp-integer-limits.md b/docs/c-language/cpp-integer-limits.md
index 82ebf2660e..c860fb2336 100644
--- a/docs/c-language/cpp-integer-limits.md
+++ b/docs/c-language/cpp-integer-limits.md
@@ -23,7 +23,7 @@ Microsoft C also permits the declaration of sized integer variables, which are i
|**UCHAR_MAX**|Maximum value for a variable of type **`unsigned char`**.|255 (0xff)|
|**CHAR_MIN**|Minimum value for a variable of type **`char`**.|-128; 0 if /J option used|
|**CHAR_MAX**|Maximum value for a variable of type **`char`**.|127; 255 if /J option used|
-|**MB_LEN_MAX**|Maximum number of bytes in a multicharacter constant.|5|
+|**MB_LEN_MAX**|Maximum number of bytes in a multibyte character.|5|
|**SHRT_MIN**|Minimum value for a variable of type **`short`**.|-32768|
|**SHRT_MAX**|Maximum value for a variable of type **`short`**.|32767|
|**USHRT_MAX**|Maximum value for a variable of type **`unsigned short`**.|65535 (0xffff)|
diff --git a/docs/c-language/declarators-and-variable-declarations.md b/docs/c-language/declarators-and-variable-declarations.md
index c6c50541cd..d8c27aab0a 100644
--- a/docs/c-language/declarators-and-variable-declarations.md
+++ b/docs/c-language/declarators-and-variable-declarations.md
@@ -35,22 +35,22 @@ You use declarators to declare arrays of values, pointers to values, and functio
## Syntax
-*`declarator`*:
+*`declarator`*:\
*`pointer`*opt *`direct-declarator`*
-*`direct-declarator`*:
- *`identifier`*
- **`(`** *`declarator`* **`)`**
- *`direct-declarator`* **`[`** *`constant-expression`*opt **`]`**
- *`direct-declarator`* **`(`** *`parameter-type-list`* **`)`**
+*`direct-declarator`*:\
+ *`identifier`*\
+ **`(`** *`declarator`* **`)`**\
+ *`direct-declarator`* **`[`** *`constant-expression`*opt **`]`**\
+ *`direct-declarator`* **`(`** *`parameter-type-list`* **`)`**\
*`direct-declarator`* **`(`** *`identifier-list`*opt **`)`**
-*`pointer`*:
- **`*`** *`type-qualifier-list`*opt
+*`pointer`*:\
+ **`*`** *`type-qualifier-list`*opt\
**`*`** *`type-qualifier-list`*opt *`pointer`*
-*`type-qualifier-list`*:
- *`type-qualifier`*
+*`type-qualifier-list`*:\
+ *`type-qualifier`*\
*`type-qualifier-list`* *`type-qualifier`*
> [!NOTE]
@@ -67,7 +67,7 @@ int list[20]; // Declares an array of 20 int values named list
char *cp; // Declares a pointer to a char value
double func( void ); // Declares a function named func, with no
// arguments, that returns a double value
-int *aptr[10] // Declares an array of 10 pointers
+int *aptr[10]; // Declares an array of 10 pointers
```
**Microsoft Specific**
diff --git a/docs/c-language/definitions-and-conventions.md b/docs/c-language/definitions-and-conventions.md
index 47dc3a7f24..672aee2222 100644
--- a/docs/c-language/definitions-and-conventions.md
+++ b/docs/c-language/definitions-and-conventions.md
@@ -1,11 +1,11 @@
---
description: "Learn more about: Definitions and Conventions"
title: "Definitions and Conventions"
-ms.date: "11/04/2016"
+ms.date: 01/23/2023
helpviewer_keywords: ["nonterminals definition"]
ms.assetid: f9b3cf5f-6a7c-4a10-9b18-9d4a43efdaeb
---
-# Definitions and Conventions
+# Definitions and conventions
Terminals are endpoints in a syntax definition. No other resolution is possible. Terminals include the set of reserved words and user-defined identifiers.
@@ -13,20 +13,20 @@ Nonterminals are placeholders in the syntax and are defined elsewhere in this sy
An optional component is indicated by the subscripted opt. For example,
-> **{** *expression*opt **}**
+> **`{`** *`expression`*opt **`}`**
indicates an optional expression enclosed in braces.
The syntax conventions use different font attributes for different components of the syntax. The symbols and fonts are as follows:
-|Attribute|Description|
-|---------------|-----------------|
-|*nonterminal*|Italic type indicates nonterminals.|
-|**`const`**|Terminals in bold type are literal reserved words and symbols that must be entered as shown. Characters in this context are always case sensitive.|
-|opt|Nonterminals followed by opt are always optional.|
-|default typeface|Characters in the set described or listed in this typeface can be used as terminals in C statements.|
+| Attribute | Description |
+|---|---|
+| *`nonterminal`* | Italic type indicates nonterminals. |
+| **`const`** | Terminals in bold monospace type are literal reserved words and symbols that must be entered as shown. Characters in this context are always case sensitive. |
+| opt | Nonterminals followed by opt are always optional. |
+| default typeface | Characters in the set described or listed in this typeface can be used as terminals in C statements. |
-A colon (**:**) following a nonterminal introduces its definition. Alternative definitions are listed on separate lines, except when prefaced with the words "one of."
+A colon (**`:`**) following a nonterminal introduces its definition. Alternative definitions are listed on separate lines, except when prefaced with the words "one of."
## See also
diff --git a/docs/c-language/demotion-of-integers.md b/docs/c-language/demotion-of-integers.md
index f64f4104f9..5cc14b1695 100644
--- a/docs/c-language/demotion-of-integers.md
+++ b/docs/c-language/demotion-of-integers.md
@@ -25,7 +25,7 @@ char y = (char)0x1234;
assigns the value 0x34 to `y`.
-When **`signed`** variables are converted to **`unsigned`** and vice-versa, the bit patterns remain the same. For example, casting -2 (0xFE) to an **`unsigned`** value yields 254 (also 0xFE).
+When **`signed`** variables are converted to **`unsigned`** and vice-versa, the bit patterns remain the same. For example, casting -2 (0xFFFFFFFE) to an **`unsigned int`** value yields 4294967294 (also 0xFFFFFFFE).
## See also
diff --git a/docs/c-language/do-while-statement-c.md b/docs/c-language/do-while-statement-c.md
index ca9fac1f5a..96fcb62925 100644
--- a/docs/c-language/do-while-statement-c.md
+++ b/docs/c-language/do-while-statement-c.md
@@ -6,26 +6,26 @@ f1_keywords: ["do"]
helpviewer_keywords: ["do-while keyword [C]"]
ms.assetid: f2ac20a6-10c7-4a08-b5e3-c3b3639dbeaf
---
-# do-while Statement (C)
+# `do-while` Statement (C)
-The *do-while* statement lets you repeat a statement or compound statement until a specified expression becomes false.
+The *`do-while`* statement lets you repeat a statement or compound statement until a specified expression becomes false.
## Syntax
-*iteration-statement*:
- **`do`** *statement* **while (** *expression* **) ;**
+*`iteration-statement`*:
+ **`do`** *`statement`* **`while (`** *`expression`* **`) ;`**
-The *expression* in a *do-while* statement is evaluated after the body of the loop is executed. Therefore, the body of the loop is always executed at least once.
+The *`expression`* in a *`do-while`* statement is evaluated after the body of the loop is executed. Therefore, the body of the loop is always executed at least once.
-The *expression* must have arithmetic or pointer type. Execution proceeds as follows:
+The *`expression`* must have arithmetic or pointer type. Execution proceeds as follows:
1. The statement body is executed.
-1. Next, *expression* is evaluated. If *expression* is false, the *do-while* statement terminates and control passes to the next statement in the program. If *expression* is true (nonzero), the process is repeated, beginning with step 1.
+1. Next, *`expression`* is evaluated. If *`expression`* is false, the *`do-while`* statement terminates and control passes to the next statement in the program. If *`expression`* is true (nonzero), the process is repeated, beginning with step 1.
-The *do-while* statement can also terminate when a **`break`**, **`goto`**, or **`return`** statement is executed within the statement body.
+The *`do-while`* statement can also terminate when a **`break`**, **`goto`**, or **`return`** statement is executed within the statement body.
-This is an example of the *do-while* statement:
+Here's an example of the *`do-while`* statement:
```C
do
@@ -35,8 +35,8 @@ do
} while ( x > 0 );
```
-In this *do-while* statement, the two statements `y = f( x );` and `x--;` are executed, regardless of the initial value of `x`. Then `x > 0` is evaluated. If `x` is greater than 0, the statement body is executed again and `x > 0` is reevaluated. The statement body is executed repeatedly as long as `x` remains greater than 0. Execution of the *do-while* statement terminates when `x` becomes 0 or negative. The body of the loop is executed at least once.
+In this *`do-while`* statement, the two statements `y = f( x );` and `x--;` are executed, regardless of the initial value of `x`. Then `x > 0` is evaluated. If `x` is greater than 0, the statement body is executed again, and `x > 0` is reevaluated. The statement body is executed repeatedly as long as `x` remains greater than 0. Execution of the *`do-while`* statement terminates when `x` becomes 0 or negative. The body of the loop is executed at least once.
## See also
-[do-while Statement (C++)](../cpp/do-while-statement-cpp.md)
+[`do-while` Statement (C++)](../cpp/do-while-statement-cpp.md)
diff --git a/docs/c-language/elements-of-c.md b/docs/c-language/elements-of-c.md
index e32b34331d..eee10f7ed6 100644
--- a/docs/c-language/elements-of-c.md
+++ b/docs/c-language/elements-of-c.md
@@ -29,7 +29,7 @@ The following topics are discussed:
The section also includes reference tables for [Trigraphs](../c-language/trigraphs.md), [Limits on Floating-Point Constants](../c-language/limits-on-floating-point-constants.md), [C and C++ Integer Limits](../c-language/cpp-integer-limits.md), and [Escape Sequences](../c-language/escape-sequences.md).
-Operators are symbols (both single characters and character combinations) that specify how values are to be manipulated. Each symbol is interpreted as a single unit, called a token. For more information, see [Operators](../c-language/c-operators.md).
+Operators (as both single characters and character combinations) are symbols that specify how values are to be manipulated. Each symbol is interpreted as a single unit, called a token. For more information, see [Operators](../c-language/c-operators.md).
## See also
diff --git a/docs/c-language/escape-sequences.md b/docs/c-language/escape-sequences.md
index 3b4b7b76a7..e1d271617f 100644
--- a/docs/c-language/escape-sequences.md
+++ b/docs/c-language/escape-sequences.md
@@ -34,7 +34,7 @@ Note that the question mark preceded by a backslash (**\\?**) specifies a litera
**Microsoft Specific**
-If a backslash precedes a character that does not appear in the table, the compiler handles the undefined character as the character itself. For example, `\c` is treated as an `c`.
+If a backslash precedes a character that does not appear in the table, the compiler handles the undefined character as the character itself. For example, `\c` is treated as a `c`.
**END Microsoft Specific**
diff --git a/docs/c-language/expression-statement-c.md b/docs/c-language/expression-statement-c.md
index 0ab152e397..36c21bc202 100644
--- a/docs/c-language/expression-statement-c.md
+++ b/docs/c-language/expression-statement-c.md
@@ -11,10 +11,10 @@ When an expression statement is executed, the expression is evaluated according
## Syntax
-*expression-statement*:
- *expression*opt **;**
+*`expression-statement`*:\
+ *`expression`*opt **`;`**
-All side effects from the expression evaluation are completed before the next statement is executed. An empty expression statement is called a null statement. See [The Null Statement](../c-language/null-statement-c.md) for more information.
+All side effects from the expression evaluation are completed before the next statement is executed. An empty expression statement is called a null statement. For more information, see [The Null Statement](../c-language/null-statement-c.md).
These examples demonstrate expression statements.
diff --git a/docs/c-language/extern-storage-class-specifier.md b/docs/c-language/extern-storage-class-specifier.md
index 749c6227ae..fc53268609 100644
--- a/docs/c-language/extern-storage-class-specifier.md
+++ b/docs/c-language/extern-storage-class-specifier.md
@@ -1,9 +1,8 @@
---
-description: "Learn more about: extern Storage-Class Specifier"
title: "extern Storage-Class Specifier"
+description: "Learn more about: extern Storage-Class Specifier"
ms.date: "07/10/2018"
helpviewer_keywords: ["extern keyword [C]", "storage class specifiers, extern", "extern keyword [C], storage class specifier", "external linkage, storage-class specifiers", "external linkage, extern modifier"]
-ms.assetid: 6e16d927-291f-49e4-986c-9d91a482a441
---
# extern Storage-Class Specifier
@@ -14,12 +13,11 @@ A variable declared with the **`extern`** storage-class specifier is a reference
This example illustrates internal- and external-level declarations:
```c
-
// Source1.c
int i = 1;
-// Source2. c
+// Source2.c
#include
@@ -49,7 +47,7 @@ void func(void)
}
```
-In this example, the variable `i` is defined in Source1.c with an initial value of 1. An **`extern`** declaration in Source2.c is makes 'i' visible in that file.
+In this example, the variable `i` is defined in Source1.c with an initial value of 1. An **`extern`** declaration in Source2.c makes 'i' visible in that file.
In the `func` function, the address of the global variable `i` is used to initialize the **`static`** pointer variable `external_i`. This works because the global variable has **`static`** lifetime, meaning its address does not change during program execution. Next, a variable `i` is defined within the scope of `func` as a local variable with initial value 16. This definition does not affect the value of the external-level `i`, which is hidden by the use of its name for the local variable. The value of the global `i` is now accessible only through the pointer `external_i`.
diff --git a/docs/c-language/external-definitions.md b/docs/c-language/external-definitions.md
index aeab60394f..59f3272830 100644
--- a/docs/c-language/external-definitions.md
+++ b/docs/c-language/external-definitions.md
@@ -7,16 +7,16 @@ ms.assetid: 41e37bfc-b360-43b1-9972-28af2d365b20
---
# External Definitions
-*translation-unit*:
- *external-declaration*
- *translation-unit* *external-declaration*
+*`translation-unit`*:\
+ *`external-declaration`* \
+ *`translation-unit`* *`external-declaration`*
-*external-declaration*: /\* Allowed only at external (file) scope \*/
- *function-definition*
- *declaration*
+*`external-declaration`*: /\* Allowed only at external (file) scope \*/\
+ *`function-definition`*\
+ *`declaration`*
-*function-definition*: /\* Declarator here is the function declarator \*/
- *declaration-specifiers*opt *declarator* *declaration-list*opt *compound-statement*
+*`function-definition`*: /\* This declarator is the function declarator \*/\
+ *`declaration-specifiers`*opt *`declarator`* *`declaration-list`*opt *`compound-statement`*
## See also
diff --git a/docs/c-language/for-statement-c.md b/docs/c-language/for-statement-c.md
index 67579fbef5..c92740feda 100644
--- a/docs/c-language/for-statement-c.md
+++ b/docs/c-language/for-statement-c.md
@@ -5,34 +5,34 @@ ms.date: "11/04/2016"
helpviewer_keywords: ["for keyword [C]"]
ms.assetid: 560a8de4-19db-4868-9f18-dbe51b17900d
---
-# for Statement (C)
+# `for` Statement (C)
The **`for`** statement lets you repeat a statement or compound statement a specified number of times. The body of a **`for`** statement is executed zero or more times until an optional condition becomes false. You can use optional expressions within the **`for`** statement to initialize and change values during the **`for`** statement's execution.
## Syntax
-*iteration-statement*:
- **`for`** **(** *init-expression*opt **;** *cond-expression*opt **;** *loop-expression*opt **)** *statement*
+*`iteration-statement`*:\
+ **`for`** **`(`** *`init-expression`*opt **`;`** *`cond-expression`*opt **`;`** *`loop-expression`*opt **`)`** *`statement`*
Execution of a **`for`** statement proceeds as follows:
-1. The *init-expression*, if any, is evaluated. This specifies the initialization for the loop. There is no restriction on the type of *init-expression*.
+1. The *`init-expression`*, if any, is evaluated. It specifies the initialization for the loop. There's no restriction on the type of *`init-expression`*.
-1. The *cond-expression*, if any, is evaluated. This expression must have arithmetic or pointer type. It is evaluated before each iteration. Three results are possible:
+1. The *`cond-expression`*, if any, is evaluated. This expression must have arithmetic or pointer type. It's evaluated before each iteration. Three results are possible:
- - If *cond-expression* is **`true`** (nonzero), *statement* is executed; then *loop-expression*, if any, is evaluated. The *loop-expression* is evaluated after each iteration. There is no restriction on its type. Side effects will execute in order. The process then begins again with the evaluation of *cond-expression*.
+ - If *`cond-expression`* is **`true`** (nonzero), *`statement`* is executed; then *`loop-expression`*, if any, is evaluated. The *`loop-expression`* is evaluated after each iteration. There's no restriction on its type. Side effects will execute in order. The process then begins again with the evaluation of *`cond-expression`*.
- - If *cond-expression* is omitted, *cond-expression* is considered true, and execution proceeds exactly as described in the previous paragraph. A **`for`** statement without a *cond-expression* argument terminates only when a **`break`** or **`return`** statement within the statement body is executed, or when a **`goto`** (to a labeled statement outside the **`for`** statement body) is executed.
+ - If *`cond-expression`* is omitted, *`cond-expression`* is considered true, and execution proceeds exactly as described in the previous paragraph. A **`for`** statement without a *`cond-expression`* argument terminates only when a **`break`** or **`return`** statement within the statement body is executed, or when a **`goto`** (to a labeled statement outside the **`for`** statement body) is executed.
- - If *cond-expression* is **`false`** (0), execution of the **`for`** statement terminates and control passes to the next statement in the program.
+ - If *`cond-expression`* is **`false`** (0), execution of the **`for`** statement terminates and control passes to the next statement in the program.
-A **`for`** statement also terminates when a **`break`**, **`goto`**, or **`return`** statement within the statement body is executed. A **`continue`** statement in a **`for`** loop causes *loop-expression* to be evaluated. When a **`break`** statement is executed inside a **`for`** loop, *loop-expression* is not evaluated or executed. This statement
+A **`for`** statement also terminates when a **`break`**, **`goto`**, or **`return`** statement within the statement body is executed. A **`continue`** statement in a **`for`** loop causes *`loop-expression`* to be evaluated. When a **`break`** statement is executed inside a **`for`** loop, *`loop-expression`* isn't evaluated or executed. This statement
```C
for( ; ; )
```
-is the customary way to produce an infinite loop which can only be exited with a **`break`**, **`goto`**, or **`return`** statement.
+is the customary way to produce an infinite loop, which can only be exited with a **`break`**, **`goto`**, or **`return`** statement.
## Example
diff --git a/docs/c-language/function-body.md b/docs/c-language/function-body.md
index aae08b367c..352ae7c97e 100644
--- a/docs/c-language/function-body.md
+++ b/docs/c-language/function-body.md
@@ -11,17 +11,17 @@ A *function body* is a compound statement containing the statements that specify
## Syntax
-*function-definition*:
- *declaration-specifiers*opt *attribute-seq*opt *declarator* *declaration-list*opt *compound-statement*
+*`function-definition`*:\
+ *`declaration-specifiers`*opt *`attribute-seq`*opt *`declarator`* *`declaration-list`*opt *`compound-statement`*
-/\* *attribute-seq* is Microsoft-specific \*/
+/\* *`attribute-seq`* is Microsoft-specific \*/
-*compound-statement*: /\* The function body \*/
- **{** *declaration-list*opt *statement-list*opt **}**
+*`compound-statement`*: /\* The function body \*/\
+ **`{`** *`declaration-list`*opt *`statement-list`*opt **`}`**
-Variables declared in a function body, known as *local variables*, have **`auto`** storage class unless otherwise specified. When the function is called, storage is created for the local variables and local initializations are performed. Execution control passes to the first statement in *compound-statement* and continues until a **`return`** statement is executed or the end of the function body is encountered. Control then returns to the point at which the function was called.
+Variables declared in a function body, known as *local variables*, have **`auto`** storage class unless otherwise specified. When the function is called, storage is created for the local variables, and local initializations are performed. Execution control passes to the first statement in *`compound-statement`* and continues until a **`return`** statement is executed or the end of the function body is encountered. Control then returns to the point at which the function was called.
-A **`return`** statement containing an expression must be executed if the function is to return a value. The return value of a function is undefined if no **`return`** statement is executed or if the **`return`** statement does not include an expression.
+A **`return`** statement containing an expression must be executed if the function is to return a value. The return value of a function is undefined if no **`return`** statement is executed or if the **`return`** statement doesn't include an expression.
## See also
diff --git a/docs/c-language/function-call-c.md b/docs/c-language/function-call-c.md
index dd14511130..8d977b1718 100644
--- a/docs/c-language/function-call-c.md
+++ b/docs/c-language/function-call-c.md
@@ -11,17 +11,17 @@ A *function call* is an expression that includes the name of the function being
## Syntax
-*postfix-expression*:
- *postfix-expression* **(** *argument-expression-list*opt **)**
+*`postfix-expression`*:\
+ *`postfix-expression`* **`(`** *`argument-expression-list`*opt **`)`**
-*argument-expression-list*:
- *assignment-expression*
- *argument-expression-list* **,** *assignment-expression*
+*`argument-expression-list`*:\
+ *`assignment-expression`*\
+ *`argument-expression-list`* **`,`** *`assignment-expression`*
-The *postfix-expression* must evaluate to a function address (for example, a function identifier or the value of a function pointer), and *argument-expression-list* is a list of expressions (separated by commas) whose values (the "arguments") are passed to the function. The *argument-expression-list* argument can be empty.
+The *`postfix-expression`* must evaluate to a function address (for example, a function identifier or the value of a function pointer), and *`argument-expression-list`* is a list of expressions (separated by commas) whose values (the "arguments") are passed to the function. The *`argument-expression-list`* argument can be empty.
-A function-call expression has the value and type of the function's return value. A function cannot return an object of array type. If the function's return type is **`void`** (that is, the function has been declared never to return a value), the function-call expression also has **`void`** type. (See [Function Calls](../c-language/function-calls.md) for more information.)
+A function-call expression has the value and type of the function's return value. A function can't return an object of array type. If the function's return type is **`void`** (that is, the function has been declared never to return a value), the function-call expression also has **`void`** type. For more information, see [Function Calls](../c-language/function-calls.md).
## See also
-[Function Call Operator: ()](../cpp/function-call-operator-parens.md)
+[Function Call Operator: `()`](../cpp/function-call-operator-parens.md)
diff --git a/docs/c-language/function-prototypes.md b/docs/c-language/function-prototypes.md
index 85a4cdeff4..01f8a0cbd6 100644
--- a/docs/c-language/function-prototypes.md
+++ b/docs/c-language/function-prototypes.md
@@ -11,32 +11,32 @@ A function declaration precedes the function definition and specifies the name,
## Syntax
-*declaration*:
- *declaration-specifiers* *attribute-seq*opt *init-declarator-list*opt **;**
+*`declaration`*:\
+ *`declaration-specifiers`* *`attribute-seq`*opt *`init-declarator-list`*opt **`;`**
-/\* *attribute-seq*opt is Microsoft-specific \*/
+/\* *`attribute-seq`*opt is Microsoft-specific \*/
-*declaration-specifiers*:
- *storage-class-specifier* *declaration-specifiers*opt
- *type-specifier* *declaration-specifiers*opt
- *type-qualifier* *declaration-specifiers*opt
+*`declaration-specifiers`*:\
+ *`storage-class-specifier`* *`declaration-specifiers`*opt \
+ *`type-specifier`* *`declaration-specifiers`*opt \
+ *`type-qualifier`* *`declaration-specifiers`*opt
-*init-declarator-list*:
- *init-declarator*
- *init-declarator-list* **,** *init-declarator*
+*`init-declarator-list`*:\
+ *`init-declarator`*\
+ *`init-declarator-list`* **`,`** *`init-declarator`*
-*init-declarator*:
- *declarator*
- *declarator* **=** *initializer*
+*`init-declarator`*:\
+ *`declarator`*\
+ *`declarator`* **`=`** *`initializer`*
-*declarator*:
- *pointer*opt *direct-declarator*
+*`declarator`*:\
+ *`pointer`*opt *`direct-declarator`*
-*direct-declarator*: /\* A function declarator \*/
- *direct-declarator* **(** *parameter-type-list* **)** /\* New-style declarator \*/
- *direct-declarator* **(** *identifier-list*opt **)** /\* Obsolete-style declarator \*/
+*`direct-declarator`*: /\* A function declarator \*/\
+ *`direct-declarator`* **`(`** *`parameter-type-list`* **`)`** /\* New-style declarator \*/\
+ *`direct-declarator`* **`(`** *`identifier-list`*opt **`)`** /\* Obsolete-style declarator \*/
-The prototype has the same form as the function definition, except that it is terminated by a semicolon immediately following the closing parenthesis and therefore has no body. In either case, the return type must agree with the return type specified in the function definition.
+The prototype has the same form as the function definition, except that it's terminated by a semicolon immediately following the closing parenthesis and therefore has no body. In either case, the return type must agree with the return type specified in the function definition.
Function prototypes have the following important uses:
@@ -48,7 +48,7 @@ Function prototypes have the following important uses:
- The parameter list is used to check that arguments in the function call match the parameters in the function definition.
-The converted type of each parameter determines the interpretation of the arguments that the function call places on the stack. A type mismatch between an argument and a parameter may cause the arguments on the stack to be misinterpreted. For example, on a 16-bit computer, if a 16-bit pointer is passed as an argument, then declared as a **`long`** parameter, the first 32 bits on the stack are interpreted as a **`long`** parameter. This error creates problems not only with the **`long`** parameter, but with any parameters that follow it. You can detect errors of this kind by declaring complete function prototypes for all functions.
+The converted type of each parameter determines the interpretation of the arguments that the function call places on the stack. A type mismatch between an argument and a parameter may cause the arguments on the stack to be misinterpreted. For example, on a 16-bit computer, if a 16-bit pointer is passed as an argument, then declared as a **`long`** parameter, the first 32 bits on the stack are interpreted as a **`long`** parameter. This error creates problems not only with the **`long`** parameter, but with all the subsequent parameters. You can detect errors of this kind by declaring complete function prototypes for all functions.
A prototype establishes the attributes of a function. Then, function calls that precede the function definition (or that occur in other source files) can be checked for argument-type and return-type mismatches. For example, if you specify the **`static`** storage-class specifier in a prototype, you must also specify the **`static`** storage class in the function definition.
@@ -73,7 +73,7 @@ struct S;
void func1( struct S * );
```
-Under **/Ze**, the tag is still entered at global scope.
+Under **`/Ze`**, the tag is still entered at global scope.
## See also
diff --git a/docs/c-language/goto-and-labeled-statements-c.md b/docs/c-language/goto-and-labeled-statements-c.md
index 799303884e..712deb1f11 100644
--- a/docs/c-language/goto-and-labeled-statements-c.md
+++ b/docs/c-language/goto-and-labeled-statements-c.md
@@ -6,27 +6,27 @@ f1_keywords: ["goto"]
helpviewer_keywords: ["labeled statement", "statements, labeled", "goto keyword [C]"]
ms.assetid: 3d0473dc-4b18-4fcc-9616-31a38499d7d7
---
-# goto and Labeled Statements (C)
+# `goto` and Labeled Statements (C)
The **`goto`** statement transfers control to a label. The given label must reside in the same function and can appear before only one statement in the same function.
## Syntax
-*statement*:
- *labeled-statement*
- *jump-statement*
+*`statement`*:\
+ *`labeled-statement`*\
+ *`jump-statement`*
-*jump-statement*:
- **`goto`** *identifier* **;**
+*`jump-statement`*:\
+ **`goto`** *`identifier`* **`;`**
-*labeled-statement*:
- *identifier* **:** *statement*
+*`labeled-statement`*:\
+ *`identifier`* **`:`** *`statement`*
A statement label is meaningful only to a **`goto`** statement; in any other context, a labeled statement is executed without regard to the label.
-A *jump-statement* must reside in the same function and can appear before only one statement in the same function. The set of *identifier* names following a **`goto`** has its own name space so the names do not interfere with other identifiers. Labels cannot be redeclared. See [Name Spaces](../c-language/name-spaces.md) for more information.
+A *`jump-statement`* must reside in the same function and can appear before only one statement in the same function. The set of *`identifier`* names following a **`goto`** has its own name space so the names don't interfere with other identifiers. Labels can't be redeclared. For more information, see [Name spaces](../c-language/name-spaces.md).
-It is good programming style to use the **`break`**, **`continue`**, and **`return`** statement in preference to **`goto`** whenever possible. Since the **`break`** statement only exits from one level of the loop, a **`goto`** may be necessary for exiting a loop from within a deeply nested loop.
+It's good programming style to use the **`break`**, **`continue`**, and **`return`** statement in preference to **`goto`** whenever possible. Since the **`break`** statement only exits from one level of the loop, a **`goto`** may be necessary for exiting a loop from within a deeply nested loop.
This example demonstrates the **`goto`** statement:
diff --git a/docs/c-language/if-statement-c.md b/docs/c-language/if-statement-c.md
index 068726e077..31ab134898 100644
--- a/docs/c-language/if-statement-c.md
+++ b/docs/c-language/if-statement-c.md
@@ -6,20 +6,19 @@ f1_keywords: ["else", "if"]
helpviewer_keywords: ["if keyword [C]", "else clauses", "else keyword [C]", "if keyword [C], if statement syntax", "nested statements"]
ms.assetid: d7fc16a0-fdbc-4f39-b596-76e1ca4ad4a5
---
-# if Statement (C)
+# `if` Statement (C)
The **`if`** statement controls conditional branching. The body of an **`if`** statement is executed if the value of the expression is nonzero. The syntax for the **`if`** statement has two forms.
## Syntax
-*selection-statement*:
-**if (** *expression* **)** *statement*
-
-**if (** *expression* **)** *statement* **`else`** *statement*
+*`selection-statement`*:\
+ **`if (`** *`expression`* **`)`** *`statement`*\
+ **`if (`** *`expression`* **`)`** *`statement`* **`else`** *`statement`*
In both forms of the **`if`** statement, the expressions, which can have any value except a structure, are evaluated, including all side effects.
-In the first form of the syntax, if *expression* is true (nonzero), *statement* is executed. If *expression* is false, *statement* is ignored. In the second form of syntax, which uses **`else`**, the second *statement* is executed if *expression* is false. With both forms, control then passes from the **`if`** statement to the next statement in the program unless one of the statements contains a **`break`**, **`continue`**, or **`goto`**.
+In the first form of the syntax, if *`expression`* is true (nonzero), *`statement`* is executed. If *`expression`* is false, *`statement`* is ignored. In the second form of syntax, which uses **`else`**, the second *`statement`* is executed if *`expression`* is false. With both forms, control then passes from the **`if`** statement to the next statement in the program unless one of the statements contains a **`break`**, **`continue`**, or **`goto`**.
The following are examples of the **`if`** statement:
@@ -33,7 +32,7 @@ else
}
```
-In this example, the statement `y = x/i;` is executed if `i` is greater than 0. If `i` is less than or equal to 0, `i` is assigned to `x` and `f( x )` is assigned to `y`. Note that the statement forming the **`if`** clause ends with a semicolon.
+In this example, the statement `y = x/i;` is executed if `i` is greater than 0. If `i` is less than or equal to 0, `i` is assigned to `x`, and `f( x )` is assigned to `y`. The statement forming the **`if`** clause ends with a semicolon.
When nesting **`if`** statements and **`else`** clauses, use braces to group the statements and clauses into compound statements that clarify your intent. If no braces are present, the compiler resolves ambiguities by associating each **`else`** with the closest **`if`** that lacks an **`else`**.
diff --git a/docs/c-language/index.yml b/docs/c-language/index.yml
index feb5f6855e..3f038a096b 100644
--- a/docs/c-language/index.yml
+++ b/docs/c-language/index.yml
@@ -5,6 +5,7 @@ summary: Learn to use C and the C runtime library.
metadata:
title: C docs - get started, tutorials, reference.
description: C programming reference for users of Microsoft C/C++ and Visual Studio.
+ ms.author: twhitney
ms.topic: landing-page
ms.date: 05/28/2020
ms.custom: intro-landing-hub
diff --git a/docs/c-language/initializing-aggregate-types.md b/docs/c-language/initializing-aggregate-types.md
index 4b1c2b7553..b842ad54b3 100644
--- a/docs/c-language/initializing-aggregate-types.md
+++ b/docs/c-language/initializing-aggregate-types.md
@@ -11,27 +11,27 @@ An *aggregate* type is a structure, union, or array type. If an aggregate type c
## Syntax
-*initializer*:
- **{** *initializer-list* **}** /* For aggregate initialization \*/
- **{** *initializer-list* **, }**
+*`initializer`*:\
+ **`{`** *`initializer-list`* **`}`** /* For aggregate initialization \*/\
+ **`{`** *`initializer-list`* **`, }`**
-*initializer-list*:
- *initializer*
- *initializer-list* **,** *initializer*
+*`initializer-list`*:\
+ *`initializer`*\
+ *`initializer-list`* **`,`** *`initializer`*
-The *initializer-list* is a list of initializers separated by commas. Each initializer in the list is either a constant expression or an initializer list. Therefore, initializer lists can be nested. This form is useful for initializing aggregate members of an aggregate type, as shown in the examples in this section. However, if the initializer for an automatic identifier is a single expression, it need not be a constant expression; it merely needs to have appropriate type for assignment to the identifier.
+The *`initializer-list`* is a list of initializers separated by commas. Each initializer in the list is either a constant expression or an initializer list. Therefore, initializer lists can be nested. This form is useful for initializing aggregate members of an aggregate type, as shown in the examples in this section. However, if the initializer for an automatic identifier is a single expression, it need not be a constant expression; it merely needs to have appropriate type for assignment to the identifier.
For each initializer list, the values of the constant expressions are assigned, in order, to the corresponding members of the aggregate variable.
-If *initializer-list* has fewer values than an aggregate type, the remaining members or elements of the aggregate type are initialized to 0. The initial value of an automatic identifier not explicitly initialized is undefined. If *initializer-list* has more values than an aggregate type, an error results. These rules apply to each embedded initializer list, as well as to the aggregate as a whole.
+If *`initializer-list`* has fewer values than an aggregate type, the remaining members or elements of the aggregate type are initialized to 0. The initial value of an automatic identifier not explicitly initialized is undefined. If *`initializer-list`* has more values than an aggregate type, an error results. These rules apply to each embedded initializer list, and to the aggregate as a whole.
-A structure's initializer is either an expression of the same type, or a list of initializers for its members enclosed in curly braces (**{ }**). Unnamed bit-field members are not initialized.
+A structure's initializer is either an expression of the same type, or a list of initializers for its members enclosed in curly braces (**`{ }`**). Unnamed bit-field members aren't initialized.
-When a union is initialized, *initializer-list* must be a single constant expression. The value of the constant expression is assigned to the first member of the union.
+When a union is initialized, *`initializer-list`* must be a single constant expression. The value of the constant expression is assigned to the first member of the union.
-If an array has unknown size, the number of initializers determines the size of the array, and its type becomes complete. There is no way to specify repetition of an initializer in C, or to initialize an element in the middle of an array without providing all preceding values as well. If you need this operation in your program, write the routine in assembly language.
+If an array has unknown size, the number of initializers determines the size of the array, and its type becomes complete. There's no way to specify repetition of an initializer in C, or to initialize an element in the middle of an array without providing all preceding values as well. If you need this operation in your program, write the routine in assembly language.
-Note that the number of initializers can set the size of the array:
+The number of initializers can set the size of the array:
```C
int x[ ] = { 0, 1, 2 }
@@ -41,7 +41,7 @@ If you specify the size and give the wrong number of initializers, however, the
**Microsoft Specific**
-The maximum size for an array is defined by **size_t**. Defined in the header file STDDEF.H, **size_t** is an **`unsigned int`** with the range 0x00000000 to 0x7CFFFFFF.
+The maximum size for an array is defined by **`size_t`**.
**END Microsoft Specific**
@@ -59,9 +59,9 @@ int P[4][3] =
};
```
-This statement declares `P` as a four-by-three array and initializes the elements of its first row to 1, the elements of its second row to 2, and so on through the fourth row. Note that the initializer list for the third and fourth rows contains commas after the last constant expression. The last initializer list (`{4, 4, 4,},`) is also followed by a comma. These extra commas are permitted but are not required; only commas that separate constant expressions from one another, and those that separate one initializer list from another, are required.
+This statement declares `P` as a four-by-three array and initializes the elements of its first row to 1, the elements of its second row to 2, and so on, through the fourth row. The initializer list for the third and fourth rows contains commas after the last constant expression. The last initializer list (`{4, 4, 4,},`) is also followed by a comma. These extra commas are permitted but aren't required. Only commas that separate constant expressions from one another, and commas that separate one initializer list from another, are required.
-If an aggregate member has no embedded initializer list, values are simply assigned, in order, to each member of the subaggregate. Therefore, the initialization in the previous example is equivalent to the following:
+If an aggregate member has no embedded initializer list, values are assigned, in order, to each member of the subaggregate. Therefore, the initialization in the previous example is equivalent to the following example:
```C
int P[4][3] =
@@ -70,7 +70,7 @@ int P[4][3] =
};
```
-Braces can also appear around individual initializers in the list and would help to clarify the example above.
+Braces can also appear around individual initializers in the list and would help to clarify the example.
When you initialize an aggregate variable, you must be careful to use braces and initializer lists properly. The following example illustrates the compiler's interpretation of braces in more detail:
@@ -97,7 +97,7 @@ In this example, `nlist` is declared as a 2-by-3 array of structures, each struc
1. The process continues until the end of the line, where the closing right brace ends initialization of `nlist[0]`.
-Row 2 assigns values to the second row of `nlist` in a similar way. Note that the outer sets of braces enclosing the initializers on rows 1 and 2 are required. The following construction, which omits the outer braces, would cause an error:
+Row 2 assigns values to the second row of `nlist` in a similar way. The outer sets of braces enclosing the initializers on rows 1 and 2 are required. The following construction, which omits the outer braces, would cause an error:
```C
triplet nlist[2][3] = /* THIS CAUSES AN ERROR */
@@ -124,7 +124,7 @@ struct list
};
```
-In the `list` structure above, the three elements in the first row of `m` are initialized to 4.0; the elements of the remaining row of `m` are initialized to 0.0 by default.
+In the `list` structure, the three elements in the first row of `m` are initialized to 4.0; the elements of the remaining row of `m` are initialized to 0.0 by default.
```C
union
diff --git a/docs/c-language/initializing-scalar-types.md b/docs/c-language/initializing-scalar-types.md
index ee4b75ca48..77c5673825 100644
--- a/docs/c-language/initializing-scalar-types.md
+++ b/docs/c-language/initializing-scalar-types.md
@@ -7,40 +7,40 @@ ms.assetid: 73c516f5-c3ad-4d56-ab3b-f2a82b621104
---
# Initializing Scalar Types
-When initializing scalar types, the value of the *`assignment-expression`* is assigned to the variable. The conversion rules for assignment apply. (See [Type Conversions](../c-language/type-conversions-c.md) for information on conversion rules.)
+When you initialize scalar types, the value of the *`assignment-expression`* is assigned to the variable. The conversion rules for assignment apply. (See [Type Conversions](../c-language/type-conversions-c.md) for information on conversion rules.)
## Syntax
-*`declaration`*:
- *`declaration-specifiers`* *`init-declarator-list`*opt **`;`**
+*`declaration`*:\
+ *`declaration-specifiers`* *`init-declarator-list`*opt **`;`**
-*`declaration-specifiers`*:
- *`storage-class-specifier`* *`declaration-specifiers`*opt
- *`type-specifier`* *`declaration-specifiers`*opt
- *`type-qualifier`* *`declaration-specifiers`*opt
+*`declaration-specifiers`*:\
+ *`storage-class-specifier`* *`declaration-specifiers`*opt \
+ *`type-specifier`* *`declaration-specifiers`*opt \
+ *`type-qualifier`* *`declaration-specifiers`*opt
-*`init-declarator-list`*:
- *`init-declarator`*
- *`init-declarator-list`* **`,`** *`init-declarator`*
+*`init-declarator-list`*:\
+ *`init-declarator`*\
+ *`init-declarator-list`* **`,`** *`init-declarator`*
-*`init-declarator`*:
- *`declarator`*
- *`declarator`* **`=`** *`initializer`* /\* For scalar initialization \*/
+*`init-declarator`*:\
+ *`declarator`*\
+ *`declarator`* **`=`** *`initializer`* /\* For scalar initialization \*/
-*`initializer`*:
- *`assignment-expression`*
+*`initializer`*:\
+ *`assignment-expression`*
-You can initialize variables of any type, provided that you obey the following rules:
+You can initialize variables of any type, as long as you obey the following rules:
-- Variables declared at the file-scope level can be initialized. If you do not explicitly initialize a variable at the external level, it is initialized to 0 by default.
+- Variables declared at the file-scope level can be initialized. If you don't explicitly initialize a variable at the external level, it's initialized to 0 by default.
-- A constant expression can be used to initialize any global variable declared with the **`static`** *`storage-class-specifier`*. Variables declared to be **`static`** are initialized when program execution begins. If you do not explicitly initialize a global **`static`** variable, it is initialized to 0 by default, and every member that has pointer type is assigned a null pointer.
+- A constant expression can be used to initialize any global variable declared with the **`static`** *`storage-class-specifier`*. Variables declared to be **`static`** are initialized when program execution begins. If you don't explicitly initialize a global **`static`** variable, it's initialized to 0 by default, and every member that has pointer type is assigned a null pointer.
-- Variables declared with the **`auto`** or **`register`** storage-class specifier are initialized each time execution control passes to the block in which they are declared. If you omit an initializer from the declaration of an **`auto`** or **`register`** variable, the initial value of the variable is undefined. For automatic and register values, the initializer is not restricted to being a constant; it can be any expression involving previously defined values, even function calls.
+- Variables declared with the **`auto`** or **`register`** storage-class specifier are initialized each time execution control passes to the block in which they're declared. If you omit an initializer from the declaration of an **`auto`** or **`register`** variable, the initial value of the variable is undefined. For automatic and register values, the initializer isn't restricted to being a constant; it can be any expression involving previously defined values, even function calls.
-- The initial values for external variable declarations and for all **`static`** variables, whether external or internal, must be constant expressions. (For more information, see [Constant Expressions](../c-language/c-constant-expressions.md).) Since the address of any externally declared or static variable is constant, it can be used to initialize an internally declared **`static`** pointer variable. However, the address of an **`auto`** variable cannot be used as a static initializer because it may be different for each execution of the block. You can use either constant or variable values to initialize **`auto`** and **`register`** variables.
+- The initial values for external variable declarations and for all **`static`** variables, whether external or internal, must be constant expressions. (For more information, see [Constant Expressions](../c-language/c-constant-expressions.md).) Since the address of any externally declared or static variable is constant, it can be used to initialize an internally declared **`static`** pointer variable. However, the address of an **`auto`** variable can't be used as a static initializer because it may be different for each execution of the block. You can use either constant or variable values to initialize **`auto`** and **`register`** variables.
-- If the declaration of an identifier has block scope, and the identifier has external linkage, the declaration cannot have an initialization.
+- If the declaration of an identifier has block scope, and the identifier has external linkage, the declaration can't have an initialization.
## Examples
@@ -62,7 +62,7 @@ The pointer `px` is initialized to 0, producing a "null" pointer.
const int c = (3 * 1024);
```
-This example uses a constant expression `(3 * 1024)` to initialize `c` to a constant value that cannot be modified because of the **`const`** keyword.
+This example uses a constant expression `(3 * 1024)` to initialize `c` to a constant value that can't be modified because of the **`const`** keyword.
```C
int *b = &x;
@@ -74,7 +74,7 @@ This statement initializes the pointer `b` with the address of another variable,
int *const a = &z;
```
-The pointer `a` is initialized with the address of a variable named `z`. However, since it is specified to be a **`const`**, the variable `a` can only be initialized, never modified. It always points to the same location.
+The pointer `a` is initialized with the address of a variable named `z`. However, since it's specified to be a **`const`**, the variable `a` can only be initialized, never modified. It always points to the same location.
```C
int GLOBAL ;
@@ -88,7 +88,7 @@ int function( void )
}
```
-The global variable `GLOBAL` is declared at the external level, so it has global lifetime. The local variable `LOCAL` has **`auto`** storage class and only has an address during the execution of the function in which it is declared. Therefore, attempting to initialize the **`static`** pointer variable `lp` with the address of `LOCAL` is not permitted. The **`static`** pointer variable `gp` can be initialized to the address of `GLOBAL` because that address is always the same. Similarly, `*rp` can be initialized because `rp` is a local variable and can have a non-constant initializer. Each time the block is entered, `LOCAL` has a new address, which is then assigned to `rp`.
+The global variable `GLOBAL` is declared at the external level, so it has global lifetime. The local variable `LOCAL` has **`auto`** storage class and only has an address during the execution of the function in which it's declared. Therefore, attempting to initialize the **`static`** pointer variable `lp` with the address of `LOCAL` isn't permitted. The **`static`** pointer variable `gp` can be initialized to the address of `GLOBAL` because that address is always the same. Similarly, `*rp` can be initialized because `rp` is a local variable and can have a non-constant initializer. Each time the block is entered, `LOCAL` has a new address, which is then assigned to `rp`.
## See also
diff --git a/docs/c-language/interpreting-more-complex-declarators.md b/docs/c-language/interpreting-more-complex-declarators.md
index d780d03e13..938504a381 100644
--- a/docs/c-language/interpreting-more-complex-declarators.md
+++ b/docs/c-language/interpreting-more-complex-declarators.md
@@ -47,31 +47,31 @@ In this example, the steps are numbered in order and can be interpreted as follo
The following examples illustrate other complex declarations and show how parentheses can affect the meaning of a declaration.
-```
+```C
int *var[5]; /* Array of pointers to int values */
```
The array modifier has higher priority than the pointer modifier, so `var` is declared to be an array. The pointer modifier applies to the type of the array elements; therefore, the array elements are pointers to **`int`** values.
-```
+```C
int (*var)[5]; /* Pointer to array of int values */
```
In this declaration for `var`, parentheses give the pointer modifier higher priority than the array modifier, and `var` is declared to be a pointer to an array of five **`int`** values.
-```
+```C
long *var( long, long ); /* Function returning pointer to long */
```
Function modifiers also have higher priority than pointer modifiers, so this declaration for `var` declares `var` to be a function returning a pointer to a **`long`** value. The function is declared to take two **`long`** values as arguments.
-```
+```C
long (*var)( long, long ); /* Pointer to function returning long */
```
This example is similar to the previous one. Parentheses give the pointer modifier higher priority than the function modifier, and `var` is declared to be a pointer to a function that returns a **`long`** value. Again, the function takes two **`long`** arguments.
-```
+```C
struct both /* Array of pointers to functions */
{ /* returning structures */
int a;
@@ -81,14 +81,14 @@ struct both /* Array of pointers to functions */
The elements of an array cannot be functions, but this declaration demonstrates how to declare an array of pointers to functions instead. In this example, `var` is declared to be an array of five pointers to functions that return structures with two members. The arguments to the functions are declared to be two structures with the same structure type, `both`. Note that the parentheses surrounding `*var[5]` are required. Without them, the declaration is an illegal attempt to declare an array of functions, as shown below:
-```
+```C
/* ILLEGAL */
struct both *var[5](struct both, struct both);
```
The following statement declares an array of pointers.
-```
+```C
unsigned int *(* const *name[5][10] ) ( void );
```
@@ -96,13 +96,13 @@ The `name` array has 50 elements organized in a multidimensional array. The elem
This next example is a function returning a pointer to an array of three **`double`** values.
-```
+```C
double ( *var( double (*)[3] ) )[3];
```
In this declaration, a function returns a pointer to an array, since functions returning arrays are illegal. Here `var` is declared to be a function returning a pointer to an array of three **`double`** values. The function `var` takes one argument. The argument, like the return value, is a pointer to an array of three **`double`** values. The argument type is given by a complex *abstract-declarator*. The parentheses around the asterisk in the argument type are required; without them, the argument type would be an array of three pointers to **`double`** values. For a discussion and examples of abstract declarators, see [Abstract Declarators](../c-language/c-abstract-declarators.md).
-```
+```C
union sign /* Array of arrays of pointers */
{ /* to pointers to unions */
int x;
@@ -112,7 +112,7 @@ union sign /* Array of arrays of pointers */
As the above example shows, a pointer can point to another pointer, and an array can contain arrays as elements. Here `var` is an array of five elements. Each element is a five-element array of pointers to pointers to unions with two members.
-```
+```C
union sign *(*var[5])[5]; /* Array of pointers to arrays
of pointers to unions */
```
diff --git a/docs/c-language/l-value-and-r-value-expressions.md b/docs/c-language/l-value-and-r-value-expressions.md
index 90ee531673..cca7a68bf2 100644
--- a/docs/c-language/l-value-and-r-value-expressions.md
+++ b/docs/c-language/l-value-and-r-value-expressions.md
@@ -7,9 +7,9 @@ ms.assetid: b790303e-ec6f-4d0d-bc55-df42da267172
---
# L-Value and R-Value Expressions
-Expressions that refer to memory locations are called "l-value" expressions. An l-value represents a storage region's "locator" value, or a "left" value, implying that it can appear on the left of the equal sign (**=**). L-values are often identifiers.
+Expressions that refer to memory locations are called "l-value" expressions. An l-value represents a storage region's "locator" value, or a "left" value, implying that it can appear on the left of the equal sign (**`=`**). L-values are often identifiers.
-Expressions referring to modifiable locations are called "modifiable l-values." A modifiable l-value cannot have an array type, an incomplete type, or a type with the **`const`** attribute. For structures and unions to be modifiable l-values, they must not have any members with the **`const`** attribute. The name of the identifier denotes a storage location, while the value of the variable is the value stored at that location.
+Expressions referring to modifiable locations are called "modifiable l-values." A modifiable l-value can't have an array type, an incomplete type, or a type with the **`const`** attribute. For structures and unions to be modifiable l-values, they must not have any members with the **`const`** attribute. The name of the identifier denotes a storage location, while the value of the variable is the value stored at that location.
An identifier is a modifiable l-value if it refers to a memory location and if its type is arithmetic, structure, union, or pointer. For example, if `ptr` is a pointer to a storage region, then `*ptr` is a modifiable l-value that designates the storage region to which `ptr` points.
@@ -17,11 +17,11 @@ Any of the following C expressions can be l-value expressions:
- An identifier of integral, floating, pointer, structure, or union type
-- A subscript (**[ ]**) expression that does not evaluate to an array
+- A subscript (**`[ ]`**) expression that doesn't evaluate to an array
-- A member-selection expression (**->** or **.**)
+- A member-selection expression (**`->`** or **`.`**)
-- A unary-indirection (\*) expression that does not refer to an array
+- A unary-indirection (**`*`**) expression that doesn't refer to an array
- An l-value expression in parentheses
@@ -31,7 +31,7 @@ The term "r-value" is sometimes used to describe the value of an expression and
**Microsoft Specific**
-Microsoft C includes an extension to the ANSI C standard that allows casts of l-values to be used as l-values, as long as the size of the object is not lengthened through the cast. (See [Type-Cast Conversions](../c-language/type-cast-conversions.md) for more information.) The following example illustrates this feature:
+Microsoft C includes an extension to the ANSI C standard that allows casts of l-values to be used as l-values, as long as the size of the object isn't lengthened through the cast. (For more information, see [Type-Cast Conversions](../c-language/type-cast-conversions.md).) The following example illustrates this feature:
```
char *p ;
diff --git a/docs/c-language/multidimensional-arrays-c.md b/docs/c-language/multidimensional-arrays-c.md
index 06fedbf4a4..3aa1d2768b 100644
--- a/docs/c-language/multidimensional-arrays-c.md
+++ b/docs/c-language/multidimensional-arrays-c.md
@@ -9,11 +9,11 @@ ms.assetid: 4ba5c360-1f17-4575-b370-45f62e1f2bc2
A subscript expression can also have multiple subscripts, as follows:
-```
-expression1 [ expression2 ] [ expression3 ] ...
+```c
+expression1 [ expression2 ] [ expression3 ] /*...*/ ;
```
-Subscript expressions associate from left to right. The leftmost subscript expression, *expression1* **[** *expression2* **]**, is evaluated first. The address that results from adding *expression1* and *expression2* forms a pointer expression; then *expression3* is added to this pointer expression to form a new pointer expression, and so on until the last subscript expression has been added. The indirection operator (\*) is applied after the last subscripted expression is evaluated, unless the final pointer value addresses an array type (see examples below).
+Subscript expressions associate from left to right. The leftmost subscript expression, `expression1[ expression2 ]`, is evaluated first. The address that results from adding `expression1` and `expression2` forms a pointer expression; then `expression3` is added to this pointer expression to form a new pointer expression, and so on, until the last subscript expression has been added. The indirection operator (**`*`**) is applied after the last subscripted expression is evaluated, unless the final pointer value addresses an array type.
Expressions with multiple subscripts refer to elements of "multidimensional arrays." A multidimensional array is an array whose elements are arrays. For example, the first element of a three-dimensional array is an array with two dimensions.
@@ -21,20 +21,20 @@ Expressions with multiple subscripts refer to elements of "multidimensional arra
For the following examples, an array named `prop` is declared with three elements, each of which is a 4-by-6 array of **`int`** values.
-```
+```c
int prop[3][4][6];
int i, *ip, (*ipp)[6];
```
A reference to the `prop` array looks like this:
-```
+```c
i = prop[0][0][1];
```
-The example above shows how to refer to the second individual **`int`** element of `prop`. Arrays are stored by row, so the last subscript varies most quickly; the expression `prop[0][0][2]` refers to the next (third) element of the array, and so on.
+The example shows how to refer to the second individual **`int`** element of `prop`. Arrays are stored by row, so the last subscript varies most quickly; the expression `prop[0][0][2]` refers to the next (third) element of the array, and so on.
-```
+```c
i = prop[2][1][3];
```
@@ -44,19 +44,19 @@ This statement is a more complex reference to an individual element of `prop`. T
1. The second subscript, `1`, is multiplied by the size of the 6-element **`int`** array and added to the address represented by `prop[2]`.
-1. Each element of the 6-element array is an **`int`** value, so the final subscript, `3`, is multiplied by the size of an **`int`** before it is added to `prop[2][1]`. The resulting pointer addresses the fourth element of the 6-element array.
+1. Each element of the 6-element array is an **`int`** value, so the final subscript, `3`, is multiplied by the size of an **`int`** before it's added to `prop[2][1]`. The resulting pointer addresses the fourth element of the 6-element array.
1. The indirection operator is applied to the pointer value. The result is the **`int`** element at that address.
-These next two examples show cases where the indirection operator is not applied.
+These next two examples show cases where the indirection operator isn't applied.
-```
+```c
ip = prop[2][1];
ipp = prop[2];
```
-In the first of these statements, the expression `prop[2][1]` is a valid reference to the three-dimensional array `prop`; it refers to a 6-element array (declared above). Since the pointer value addresses an array, the indirection operator is not applied.
+In the first of these statements, the expression `prop[2][1]` is a valid reference to the three-dimensional array `prop`; it refers to a 6-element array (declared previously). Since the pointer value addresses an array, the indirection operator isn't applied.
Similarly, the result of the expression `prop[2]` in the second statement `ipp = prop[2];` is a pointer value addressing a two-dimensional array.
diff --git a/docs/c-language/name-spaces.md b/docs/c-language/name-spaces.md
index f41ec42a2a..7d525866b3 100644
--- a/docs/c-language/name-spaces.md
+++ b/docs/c-language/name-spaces.md
@@ -14,19 +14,19 @@ The compiler sets up "name spaces" to distinguish between the identifiers used f
This list describes the name spaces used in C.
-Statement labels
+**Statement labels**\
Named statement labels are part of statements. Definitions of statement labels are always followed by a colon but are not part of **`case`** labels. Uses of statement labels always immediately follow the keyword **`goto`**. Statement labels do not have to be distinct from other names or from label names in other functions.
-Structure, union, and enumeration tags
+**Structure, union, and enumeration tags**\
These tags are part of structure, union, and enumeration type specifiers and, if present, always immediately follow the reserved words **`struct`**, **`union`**, or **`enum`**. The tag names must be distinct from all other structure, enumeration, or union tags with the same visibility.
-Members of structures or unions
+**Members of structures or unions**\
Member names are allocated in name spaces associated with each structure and union type. That is, the same identifier can be a component name in any number of structures or unions at the same time. Definitions of component names always occur within structure or union type specifiers. Uses of component names always immediately follow the member-selection operators (**->** and **.**). The name of a member must be unique within the structure or union, but it does not have to be distinct from other names in the program, including the names of members of different structures and unions, or the name of the structure itself.
-Ordinary identifiers
+**Ordinary identifiers**\
All other names fall into a name space that includes variables, functions (including formal parameters and local variables), and enumeration constants. Identifier names have nested visibility, so you can redefine them within blocks.
-Typedef names
+**Typedef names**\
Typedef names cannot be used as identifiers in the same scope.
For example, since structure tags, structure members, and variable names are in three different name spaces, the three items named `student` in this example do not conflict. The context of each item allows correct interpretation of each occurrence of `student` in the program. (For information about structures, see [Structure Declarations](../c-language/structure-declarations.md).)
diff --git a/docs/c-language/one-dimensional-arrays.md b/docs/c-language/one-dimensional-arrays.md
index d0bdc880cf..f436a95cb8 100644
--- a/docs/c-language/one-dimensional-arrays.md
+++ b/docs/c-language/one-dimensional-arrays.md
@@ -7,13 +7,11 @@ ms.assetid: e28536e5-3b77-46b5-97fd-9b938c771816
---
# One-Dimensional Arrays
-A postfix expression followed by an expression in square brackets (**[ ]**) is a subscripted representation of an element of an array object. A subscript expression represents the value at the address that is *expression* positions beyond *postfix-expression* when expressed as
+A postfix expression followed by an expression in square brackets (**`[ ]`**) is a subscripted representation of an element of an array object. A subscript expression represents the value at the address that is *`expression`* positions beyond *`postfix-expression`* when expressed as
-```
-postfix-expression [ expression ]
-```
+*`postfix-expression`* **`[`** *`expression`* **`]`**
-Usually, the value represented by *postfix-expression* is a pointer value, such as an array identifier, and *expression* is an integral value. However, all that is required syntactically is that one of the expressions be of pointer type and the other be of integral type. Thus the integral value could be in the *postfix-expression* position and the pointer value could be in the brackets in the *expression*, or "subscript," position. For example, this code is legal:
+Usually, the value represented by *`postfix-expression`* is a pointer value, such as an array identifier, and *`expression`* is an integral value. However, all that's required syntactically is that one of the expressions has pointer type and the other has integral type. The integral value could be in the *`postfix-expression`* position and the pointer value could be in the brackets in the *`expression`*, or "subscript," position. For example, this code is legal:
```c
// one_dimensional_arrays.c
@@ -24,18 +22,18 @@ int main() {
}
```
-Subscript expressions are generally used to refer to array elements, but you can apply a subscript to any pointer. Whatever the order of values, *expression* must be enclosed in brackets (**[ ]**).
+Subscript expressions are often used to refer to array elements, but you can apply a subscript to any pointer. Whatever the order of values, *`expression`* must be enclosed in brackets (**`[ ]`**).
-The subscript expression is evaluated by adding the integral value to the pointer value, then applying the indirection operator (\*) to the result. (See [Indirection and Address-of Operators](../c-language/indirection-and-address-of-operators.md) for a discussion of the indirection operator.) In effect, for a one-dimensional array, the following four expressions are equivalent, assuming that `a` is a pointer and `b` is an integer:
+The subscript expression is evaluated by adding the integral value to the pointer value, then applying the indirection operator (**`*`**) to the result. (See [Indirection and Address-of Operators](../c-language/indirection-and-address-of-operators.md) for a discussion of the indirection operator.) In effect, for a one-dimensional array, the following four expressions are equivalent, assuming that `a` is a pointer and `b` is an integer:
-```
+```c
a[b]
*(a + b)
*(b + a)
b[a]
```
-According to the conversion rules for the addition operator (given in [Additive Operators](../c-language/c-additive-operators.md)), the integral value is converted to an address offset by multiplying it by the length of the type addressed by the pointer.
+The conversion rules for the addition operator are given in [Additive Operators](../c-language/c-additive-operators.md)). To convert the integral value to an address offset, it's multiplied by the length of the type addressed by the pointer.
For example, suppose the identifier `line` refers to an array of **`int`** values. The following procedure is used to evaluate the subscript expression `line[ i ]`:
diff --git a/docs/c-language/overview-of-c-statements.md b/docs/c-language/overview-of-c-statements.md
index d3e6525bb3..8608b7ba86 100644
--- a/docs/c-language/overview-of-c-statements.md
+++ b/docs/c-language/overview-of-c-statements.md
@@ -11,28 +11,21 @@ C statements consist of tokens, expressions, and other statements. A statement t
## Syntax
-*statement*:
-[labeled-statement](../c-language/goto-and-labeled-statements-c.md)
-
-[compound-statement](../c-language/compound-statement-c.md)
-
-[expression-statement](../c-language/expression-statement-c.md)
-
-[selection-statement](../c-language/if-statement-c.md)
-
-[iteration-statement](../c-language/do-while-statement-c.md)
-
-[jump-statement](../c-language/break-statement-c.md)
-
-[try-except-statement](../c-language/try-except-statement-c.md) /* Microsoft-specific \*/
-
-[try-finally-statement](../c-language/try-finally-statement-c.md) /\* Microsoft-specific \*/
-
-Frequently the statement body is a "compound statement." A compound statement consists of other statements that can include keywords. The compound statement is delimited by braces (**{ }**). All other C statements end with a semicolon (**;**). The semicolon is a statement terminator.
+*`statement`*:\
+ [`labeled-statement`](../c-language/goto-and-labeled-statements-c.md)\
+ [`compound-statement`](../c-language/compound-statement-c.md)\
+ [`expression-statement`](../c-language/expression-statement-c.md)\
+ [`selection-statement`](../c-language/if-statement-c.md)\
+ [`iteration-statement`](../c-language/do-while-statement-c.md)\
+ [`jump-statement`](../c-language/break-statement-c.md)\
+ [`try-except-statement`](../c-language/try-except-statement-c.md) /\* Microsoft-specific \*/\
+ [`try-finally-statement`](../c-language/try-finally-statement-c.md) /\* Microsoft-specific \*/
+
+Frequently the statement body is a "compound statement." A compound statement consists of other statements that can include keywords. The compound statement is delimited by braces (**`{ }`**). All other C statements end with a semicolon (**`;`**). The semicolon is a statement terminator.
The expression statement contains a C expression that can contain the arithmetic or logical operators introduced in [Expressions and Assignments](../c-language/expressions-and-assignments.md). The null statement is an empty statement.
-Any C statement can begin with an identifying label consisting of a name and a colon. Since only the **`goto`** statement recognizes statement labels, statement labels are discussed with **`goto`**. See [The goto and Labeled Statements](../c-language/goto-and-labeled-statements-c.md) for more information.
+Any C statement can begin with an identifying label consisting of a name and a colon. Since only the **`goto`** statement recognizes statement labels, statement labels are discussed with **`goto`**. For more information, see [The goto and Labeled Statements](../c-language/goto-and-labeled-statements-c.md).
## See also
diff --git a/docs/c-language/overview-of-declarations.md b/docs/c-language/overview-of-declarations.md
index 8e99b63b82..131cec5c23 100644
--- a/docs/c-language/overview-of-declarations.md
+++ b/docs/c-language/overview-of-declarations.md
@@ -11,23 +11,23 @@ A "declaration" specifies the interpretation and attributes of a set of identifi
## Syntax
-*`declaration`*:
- *`declaration-specifiers`* *`attribute-seq`*opt *`init-declarator-list`*opt**`;`**
+*`declaration`*:\
+ *`declaration-specifiers`* *`attribute-seq`*opt *`init-declarator-list`*opt **`;`**
/\* *`attribute-seq`*opt is Microsoft-specific */
-*`declaration-specifiers`*:
- *`storage-class-specifier`* *`declaration-specifiers`*opt
- *`type-specifier`* *`declaration-specifiers`*opt
- *`type-qualifier`* *`declaration-specifiers`*opt
+*`declaration-specifiers`*:\
+ *`storage-class-specifier`* *`declaration-specifiers`*opt\
+ *`type-specifier`* *`declaration-specifiers`*opt\
+ *`type-qualifier`* *`declaration-specifiers`*opt
-*`init-declarator-list`*:
- *`init-declarator`*
- *`init-declarator-list`* **`,`** *`init-declarator`*
+*`init-declarator-list`*:\
+ *`init-declarator`*\
+ *`init-declarator-list`* **`,`** *`init-declarator`*
-*`init-declarator`*:
- *`declarator`*
- *`declarator`* **`=`** *`initializer`*
+*`init-declarator`*:\
+ *`declarator`*\
+ *`declarator`* **`=`** *`initializer`*
> [!NOTE]
> This syntax for *`declaration`* is not repeated in the following sections. Syntax in the following sections usually begins with the *`declarator`* nonterminal.
@@ -46,7 +46,7 @@ declares a variable named `fp` as a pointer to a nonmodifiable (**`const`**) **`
A declaration must have at least one declarator, or its type specifier must declare a structure tag, union tag, or members of an enumeration. Declarators provide any remaining information about an identifier. A declarator is an identifier that can be modified with brackets (**`[ ]`**), asterisks (`*`), or parentheses ( **`( )`** ) to declare an array, pointer, or function type, respectively. When you declare simple variables (such as character, integer, and floating-point items), or structures and unions of simple variables, the `declarator` is just an identifier. For more information on declarators, see [Declarators and Variable Declarations](../c-language/declarators-and-variable-declarations.md).
-All definitions are implicitly declarations, but not all declarations are definitions. For example, variable declarations that begin with the **`extern`** storage-class specifier are "referencing," rather than "defining" declarations. If an external variable is to be referred to before it's defined, or if it's defined in another source file from the one where it's used, an **`extern`** declaration is necessary. Storage is not allocated by "referencing" declarations, nor can variables be initialized in declarations.
+All definitions are implicitly declarations, but not all declarations are definitions. For example, variable declarations using the **`extern`** storage-class specifier are "referencing," rather than "defining" declarations. If an external variable is to be referred to before it's defined, or if it's defined in another source file from the one where it's used, an **`extern`** declaration is necessary. Storage isn't allocated by "referencing" declarations, nor can variables be initialized in declarations.
A storage class or a type (or both) is required in variable declarations. Except for **`__declspec`**, only one storage-class specifier is allowed in a declaration and not all storage-class specifiers are permitted in every context. The **`__declspec`** storage class is allowed with other storage-class specifiers, and it's allowed more than once. The storage-class specifier of a declaration affects how the declared item is stored and initialized, and which parts of a program can reference the item.
@@ -56,7 +56,7 @@ The location of the declaration within the source program and the presence or ab
Type specifiers provide some information about the data types of identifiers. The default type specifier is **`int`**. For more information, see [Type Specifiers](../c-language/c-type-specifiers.md). Type specifiers can also define type tags, structure and union component names, and enumeration constants. For more information, see [Enumeration Declarations](../c-language/c-enumeration-declarations.md), [Structure Declarations](../c-language/structure-declarations.md), and [Union Declarations](../c-language/union-declarations.md).
-There are two *`type-qualifier`* terminals: **`const`** and **`volatile`**. These qualifiers specify additional properties of types that are relevant only when accessing objects of that type through l-values. For more information on **`const`** and **`volatile`**, see [Type Qualifiers](../c-language/type-qualifiers.md). For a definition of l-values, see [L-Value and R-Value Expressions](../c-language/l-value-and-r-value-expressions.md).
+There are two *`type-qualifier`* terminals: **`const`** and **`volatile`**. These qualifiers specify extra properties of types that are relevant only when accessing objects of that type through l-values. For more information on **`const`** and **`volatile`**, see [Type Qualifiers](../c-language/type-qualifiers.md). For a definition of l-values, see [L-Value and R-Value Expressions](../c-language/l-value-and-r-value-expressions.md).
## See also
diff --git a/docs/c-language/parameters.md b/docs/c-language/parameters.md
index 8e5c6eefc2..cc504bb490 100644
--- a/docs/c-language/parameters.md
+++ b/docs/c-language/parameters.md
@@ -11,29 +11,29 @@ Arguments are names of values passed to a function by a function call. Parameter
## Syntax
-*`function-definition`*:
- *`declaration-specifiers`*opt *`attribute-seq`*opt *`declarator`* *`declaration-list`*opt *`compound-statement`*
+*`function-definition`*:\
+ *`declaration-specifiers`*opt *`attribute-seq`*opt *`declarator`* *`declaration-list`*opt *`compound-statement`*
/\* *`attribute-seq`* is Microsoft-specific \*/
-*`declarator`*:
- *`pointer`*opt *`direct-declarator`*
+*`declarator`*:\
+ *`pointer`*opt *`direct-declarator`*
-*`direct-declarator`*: /\* A function declarator \*/
- *`direct-declarator`* **`(`** *`parameter-type-list`* **`)`** /\* New-style declarator \*/
- *`direct-declarator`* **`(`** *`identifier-list`*opt **`)`** /\* Obsolete-style declarator \*/
+*`direct-declarator`*: /\* A function declarator \*/\
+ *`direct-declarator`* **`(`** *`parameter-type-list`* **`)`** /\* New-style declarator \*/\
+ *`direct-declarator`* **`(`** *`identifier-list`*opt **`)`** /\* Obsolete-style declarator \*/
-*`parameter-type-list`*: /\* The parameter list \*/
- *`parameter-list`*
- *`parameter-list`* **`, ...`**
+*`parameter-type-list`*: /\* The parameter list \*/\
+ *`parameter-list`* \
+ *`parameter-list`* **`, ...`**
-*`parameter-list`*:
- *`parameter-declaration`*
- *`parameter-list`* **`,`** *`parameter-declaration`*
+*`parameter-list`*:\
+ *`parameter-declaration`*\
+ *`parameter-list`* **`,`** *`parameter-declaration`*
-*`parameter-declaration`*:
- *`declaration-specifiers`* *`declarator`*
- *`declaration-specifiers`* *`abstract-declarator`*opt
+*`parameter-declaration`*:\
+ *`declaration-specifiers`* *`declarator`*\
+ *`declaration-specifiers`* *`abstract-declarator`*opt
The *`parameter-type-list`* is a sequence of parameter declarations separated by commas. The form of each parameter in a parameter list looks like this:
diff --git a/docs/c-language/pointer-declarations.md b/docs/c-language/pointer-declarations.md
index 022967a414..b189f3cd6f 100644
--- a/docs/c-language/pointer-declarations.md
+++ b/docs/c-language/pointer-declarations.md
@@ -11,64 +11,64 @@ A *pointer declaration* names a pointer variable and specifies the type of the o
## Syntax
-*declarator*:
- *pointer*opt *direct-declarator*
+*`declarator`*:\
+ *`pointer`*opt *`direct-declarator`*
-*direct-declarator*:
- *identifier*
- **(** *declarator* **)**
- *direct-declarator* **[** *constant-expression*opt **]**
- *direct-declarator* **(** *parameter-type-list* **)**
- *direct-declarator* **(** *identifier-list*opt **)**
+*`direct-declarator`*:\
+ *`identifier`*\
+ **`(`** *`declarator`* **`)`**\
+ *`direct-declarator`* **`[`** *`constant-expression`*opt **`]`**\
+ *`direct-declarator`* **`(`** *`parameter-type-list`* **`)`**\
+ *`direct-declarator`* **`(`** *`identifier-list`*opt **`)`**
-*pointer*:
- \* *type-qualifier-list*opt
- \* *type-qualifier-list*opt *pointer*
+*`pointer`*:\
+ **`*`** *`type-qualifier-list`*opt\
+ **`*`** *`type-qualifier-list`*opt *`pointer`*
-*type-qualifier-list*:
- *type-qualifier*
- *type-qualifier-list* *type-qualifier*
+*`type-qualifier-list`*:\
+ *`type-qualifier`*\
+ *`type-qualifier-list`* *`type-qualifier`*
-The *type-specifier* gives the type of the object, which can be any basic, structure, or union type. Pointer variables can also point to functions, arrays, and other pointers. (For information on declaring and interpreting more complex pointer types, refer to [Interpreting More Complex Declarators](../c-language/interpreting-more-complex-declarators.md).)
+The *`type-specifier`* gives the type of the object, which can be any basic, structure, or union type. Pointer variables can also point to functions, arrays, and other pointers. (For information on declaring and interpreting more complex pointer types, refer to [Interpreting More Complex Declarators](../c-language/interpreting-more-complex-declarators.md).)
-By making the *type-specifier* **`void`**, you can delay specification of the type to which the pointer refers. Such an item is referred to as a "pointer to **`void`**" and is written as `void *`. A variable declared as a pointer to *void* can be used to point to an object of any type. However, to perform most operations on the pointer or on the object to which it points, the type to which it points must be explicitly specified for each operation. (Variables of type **`char`** \* and type **`void`** \* are assignment-compatible without a type cast.) Such conversion can be accomplished with a type cast (see [Type-Cast Conversions](../c-language/type-cast-conversions.md) for more information).
+By making the *`type-specifier`* **`void`**, you can delay specification of the type to which the pointer refers. Such an item is referred to as a "pointer to **`void`**" and is written as `void *`. A variable declared as a pointer to **`void`** can be used to point to an object of any type. However, to perform most operations on the pointer or on the object to which it points, the type to which it points must be explicitly specified for each operation. (Variables of type `char *` and type `void *` are assignment-compatible without a type cast.) Such conversion can be accomplished with a type cast. For more information, see [Type-Cast Conversions](../c-language/type-cast-conversions.md).
-The *type-qualifier* can be either **`const`** or **`volatile`**, or both. These specify, respectively, that the pointer cannot be modified by the program itself (**`const`**), or that the pointer can legitimately be modified by some process beyond the control of the program (**`volatile`**). (See [Type Qualifiers](../c-language/type-qualifiers.md) for more information on **`const`** and **`volatile`**.)
+The *`type-qualifier`* can be either **`const`** or **`volatile`**, or both. These keywords specify, respectively, that the pointer can't be modified by the program itself (**`const`**), or that the pointer can legitimately be modified by some process beyond the control of the program (**`volatile`**). For more information on **`const`** and **`volatile`**, see [Type Qualifiers](../c-language/type-qualifiers.md).
-The *declarator* names the variable and can include a type modifier. For example, if *declarator* represents an array, the type of the pointer is modified to be a pointer to an array.
+The *`declarator`* names the variable and can include a type modifier. For example, if *`declarator`* represents an array, the type of the pointer is modified to be a pointer to an array.
-You can declare a pointer to a structure, union, or enumeration type before you define the structure, union, or enumeration type. You declare the pointer by using the structure or union tag as shown in the examples below. Such declarations are allowed because the compiler does not need to know the size of the structure or union to allocate space for the pointer variable.
+You can declare a pointer to a structure, union, or enumeration type before you define the structure, union, or enumeration type. You declare the pointer by using the structure or union tag as shown in the examples. Such declarations are allowed because the compiler doesn't need to know the size of the structure or union to allocate space for the pointer variable.
## Examples
The following examples illustrate pointer declarations.
-```
+```c
char *message; /* Declares a pointer variable named message */
```
-The *message* pointer points to a variable with **`char`** type.
+The `message` pointer points to a variable with **`char`** type.
-```
+```c
int *pointers[10]; /* Declares an array of pointers */
```
-The *pointers* array has 10 elements; each element is a pointer to a variable with **`int`** type.
+The `pointers` array has 10 elements; each element is a pointer to a variable with **`int`** type.
-```
+```c
int (*pointer)[10]; /* Declares a pointer to an array of 10 elements */
```
-The *pointer* variable points to an array with 10 elements. Each element in this array has **`int`** type.
+The `pointer` variable points to an array with 10 elements. Each element in this array has **`int`** type.
-```
+```c
int const *x; /* Declares a pointer variable, x,
to a constant value */
```
-The pointer *x* can be modified to point to a different **`int`** value, but the value to which it points cannot be modified.
+The pointer `x` can be modified to point to a different **`int`** value, but the value to which it points can't be modified.
-```
+```c
const int some_object = 5 ;
int other_object = 37;
int *const y = &fixed_object;
@@ -76,15 +76,15 @@ int volatile *const z = &some_object;
int *const volatile w = &some_object;
```
-The variable *y* in these declarations is declared as a constant pointer to an **`int`** value. The value it points to can be modified, but the pointer itself must always point to the same location: the address of *fixed_object*. Similarly, *z* is a constant pointer, but it is also declared to point to an **`int`** whose value cannot be modified by the program. The additional specifier **`volatile`** indicates that although the value of the **const int** pointed to by *z* cannot be modified by the program, it could legitimately be modified by a process running concurrently with the program. The declaration of *w* specifies that the program cannot change the value pointed to and that the program cannot modify the pointer.
+The variable `y` in these declarations is declared as a constant pointer to an **`int`** value. The value it points to can be modified, but the pointer itself must always point to the same location: the address of `fixed_object`. Similarly, `z` is a constant pointer, but it's also declared to point to an **`int`** whose value can't be modified by the program. The **`volatile`** specifier indicates that although the value of the `const int` pointed to by `z` can't be modified by the program, it could legitimately be modified by a process running concurrently with the program. The declaration of `w` specifies that the program can't change the value pointed to and that the program can't modify the pointer.
-```
+```c
struct list *next, *previous; /* Uses the tag for list */
```
-This example declares two pointer variables, *next* and *previous*, that point to the structure type *list*. This declaration can appear before the definition of the *list* structure type (see the next example), as long as the *list* type definition has the same visibility as the declaration.
+This example declares two pointer variables (`next` and `previous`) that point to the structure type `list`. This declaration can appear before the definition of the `list` structure type (see the next example), as long as the `list` type definition has the same visibility as the declaration.
-```
+```c
struct list
{
char *token;
@@ -93,9 +93,9 @@ struct list
} line;
```
-The variable *line* has the structure type named *list*. The *list* structure type has three members: the first member is a pointer to a **`char`** value, the second is an **`int`** value, and the third is a pointer to another *list* structure.
+The variable `line` has the structure type named `list`. The `list` structure type has three members: the first member is a pointer to a **`char`** value, the second is an **`int`** value, and the third is a pointer to another `list` structure.
-```
+```c
struct id
{
unsigned int id_no;
@@ -103,7 +103,7 @@ struct id
} record;
```
-The variable *record* has the structure type *id*. Note that *pname* is declared as a pointer to another structure type named *name*. This declaration can appear before the *name* type is defined.
+The variable `record` has the structure type `id`. `pname` is declared as a pointer to another structure type named `name`. This declaration can appear before the `name` type is defined.
## See also
diff --git a/docs/c-language/postfix-operators.md b/docs/c-language/postfix-operators.md
index a862e10827..9f2aa68269 100644
--- a/docs/c-language/postfix-operators.md
+++ b/docs/c-language/postfix-operators.md
@@ -11,14 +11,14 @@ The postfix operators have the highest precedence (the tightest binding) in expr
## Syntax
-*postfix-expression*:
- *primary-expression*
- *postfix-expression* **[** *expression* **]**
- *postfix-expression* **(** *argument-expression-list*opt **)**
- *postfix-expression* **.** *identifier*
- *postfix-expression* **->** *identifier*
- *postfix-expression* **++**
- *postfix-expression* **--**
+*`postfix-expression`*:\
+ *`primary-expression`*\
+ *`postfix-expression`* **`[`** *`expression`* **`]`**\
+ *`postfix-expression`* **`(`** *`argument-expression-list`*opt **`)`**\
+ *`postfix-expression`* **`.`** *`identifier`*\
+ *`postfix-expression`* **`->`** *`identifier`*\
+ *`postfix-expression`* **`++`**\
+ *`postfix-expression`* **`--`**
Operators in this precedence level are the array subscripts, function calls, structure and union members, and postfix increment and decrement operators.
diff --git a/docs/c-language/return-statement-c.md b/docs/c-language/return-statement-c.md
index 57eb60e450..e5f0d686d0 100644
--- a/docs/c-language/return-statement-c.md
+++ b/docs/c-language/return-statement-c.md
@@ -5,22 +5,22 @@ ms.date: "06/10/2020"
helpviewer_keywords: ["( ) parentheses in return statements"]
ms.assetid: 18cd82cf-f899-4b28-83ad-4eff353ddcb4
---
-# return Statement (C)
+# `return` Statement (C)
A **`return`** statement ends the execution of a function, and returns control to the calling function. Execution resumes in the calling function at the point immediately following the call. A **`return`** statement can return a value to the calling function. For more information, see [Return type](../c-language/return-type.md).
## Syntax
-> *jump-statement*:\
-> **`return`** *expression*opt **`;`**
+> *`jump-statement`*:\
+> **`return`** *`expression`*opt **`;`**
-The value of *expression*, if present, is returned to the calling function. If *expression* is omitted, the return value of the function is undefined. The expression, if present, is evaluated and then converted to the type returned by the function. When a **`return`** statement contains an expression in functions that have a **`void`** return type, the compiler generates a warning, and the expression isn't evaluated.
+The value of *`expression`*, if present, is returned to the calling function. If *`expression`* is omitted, the return value of the function is undefined. The expression, if present, is evaluated and then converted to the type returned by the function. When a **`return`** statement contains an expression in functions that have a **`void`** return type, the compiler generates a warning, and the expression isn't evaluated.
If no **`return`** statement appears in a function definition, control automatically returns to the calling function after the last statement of the called function is executed. In this case, the return value of the called function is undefined. If the function has a return type other than **`void`**, it's a serious bug, and the compiler prints a warning diagnostic message. If the function has a **`void`** return type, this behavior is okay, but may be considered poor style. Use a plain **`return`** statement to make your intent clear.
As a good engineering practice, always specify a return type for your functions. If a return value isn't required, declare the function to have **`void`** return type. If a return type isn't specified, the C compiler assumes a default return type of **`int`**.
-Many programmers use parentheses to enclose the *expression* argument of the **`return`** statement. However, C doesn't require the parentheses.
+Many programmers use parentheses to enclose the *`expression`* argument of the **`return`** statement. However, C doesn't require the parentheses.
The compiler may issue a warning diagnostic message about unreachable code if it finds any statements placed after the **`return`** statement.
diff --git a/docs/c-language/return-type.md b/docs/c-language/return-type.md
index 05297d66d1..653e79678b 100644
--- a/docs/c-language/return-type.md
+++ b/docs/c-language/return-type.md
@@ -7,41 +7,43 @@ ms.assetid: 3e5b8a97-b341-48c5-8be8-8986980ef586
---
# Return Type
-The return type of a function establishes the size and type of the value returned by the function and corresponds to the type-specifier in the syntax below:
+The return type of a function establishes the size and type of the value returned by the function. It corresponds to the *`type-specifier`* in the Syntax section:
## Syntax
-*function-definition*:
- *declaration-specifiers*opt *attribute-seq*opt *declarator* *declaration-list*opt *compound-statement*
-
-/\* *attribute-seq* is Microsoft-specific \*/
-
-*declaration-specifiers*:
- *storage-class-specifier* *declaration-specifiers*opt
- *type-specifier* *declaration-specifiers*opt
- *type-qualifier* *declaration-specifiers*opt
-
-*type-specifier*:
- **`void`**
- **`char`**
- **`short`**
- **`int`**
- **`__int8`** /\* Microsoft-specific \*/
- **`__int16`** /\* Microsoft-specific \*/
- **`__int32`** /\* Microsoft-specific \*/
- **`__int64`** /\* Microsoft-specific \*/
- **`long`**
- **`float`**
- **`double`**
- **`signed`**
- **`unsigned`**
- *struct-or-union-specifier*
- *enum-specifier*
- *typedef-name*
-
-The *type-specifier* can specify any fundamental, structure, or union type. If you do not include *type-specifier*, the return type **`int`** is assumed.
-
-The return type given in the function definition must match the return type in declarations of the function elsewhere in the program. A function returns a value when a **`return`** statement containing an expression is executed. The expression is evaluated, converted to the return value type if necessary, and returned to the point at which the function was called. If a function is declared with return type **`void`**, a return statement containing an expression generates a warning and the expression is not evaluated.
+*`function-definition`*:\
+ *`declaration-specifiers`*opt *`attribute-seq`*opt *`declarator`* *`declaration-list`*opt *`compound-statement`*
+
+/\* *`attribute-seq`* is Microsoft-specific \*/
+
+*`declaration-specifiers`*:\
+ *`storage-class-specifier`* *`declaration-specifiers`*opt\
+ *`type-specifier`* *`declaration-specifiers`*opt\
+ *`type-qualifier`* *`declaration-specifiers`*opt
+
+*`type-specifier`*:\
+ **`void`**\
+ **`char`**\
+ **`short`**\
+ **`int`**\
+ **`__int8`** /\* Microsoft-specific \*/\
+ **`__int16`** /\* Microsoft-specific \*/\
+ **`__int32`** /\* Microsoft-specific \*/\
+ **`__int64`** /\* Microsoft-specific \*/\
+ **`long`**\
+ **`long long`**\
+ **`float`**\
+ **`double`**\
+ **`long double`**\
+ **`signed`**\
+ **`unsigned`**\
+ *`struct-or-union-specifier`*\
+ *`enum-specifier`*\
+ *`typedef-name`*
+
+The *`type-specifier`* can specify any fundamental, structure, or union type.
+
+The return type given in the function definition must match the return type in declarations of the function elsewhere in the program. A function returns a value when a **`return`** statement containing an expression is executed. The expression is evaluated, converted to the return value type if necessary, and returned to the point at which the function was called. If a function is declared with return type **`void`**, a return statement containing an expression generates a warning, and the expression isn't evaluated.
The following examples illustrate function return values.
diff --git a/docs/c-language/scope-and-visibility.md b/docs/c-language/scope-and-visibility.md
index 179defafeb..72e07ffd0f 100644
--- a/docs/c-language/scope-and-visibility.md
+++ b/docs/c-language/scope-and-visibility.md
@@ -11,16 +11,16 @@ An identifier's "visibility" determines the portions of the program in which it
All identifiers except labels have their scope determined by the level at which the declaration occurs. The following rules for each kind of scope govern the visibility of identifiers within a program:
-File scope
+**File scope**\
The declarator or type specifier for an identifier with file scope appears outside any block or list of parameters and is accessible from any place in the translation unit after its declaration. Identifier names with file scope are often called "global" or "external." The scope of a global identifier begins at the point of its definition or declaration and terminates at the end of the translation unit.
-Function scope
+**Function scope**\
A label is the only kind of identifier that has function scope. A label is declared implicitly by its use in a statement. Label names must be unique within a function. (For more information about labels and label names, see [The goto and Labeled Statements](../c-language/goto-and-labeled-statements-c.md).)
-Block scope
+**Block scope**\
The declarator or type specifier for an identifier with block scope appears inside a block or within the list of formal parameter declarations in a function definition. It is visible only from the point of its declaration or definition to the end of the block containing its declaration or definition. Its scope is limited to that block and to any blocks nested in that block and ends at the curly brace that closes the associated block. Such identifiers are sometimes called "local variables."
-Function-prototype scope
+**Function-prototype scope**\
The declarator or type specifier for an identifier with function-prototype scope appears within the list of parameter declarations in a function prototype (not part of the function declaration). Its scope terminates at the end of the function declarator.
The appropriate declarations for making variables visible in other source files are described in [Storage Classes](../c-language/c-storage-classes.md). However, variables and functions declared at the external level with the **`static`** storage-class specifier are visible only within the source file in which they are defined. All other functions are globally visible.
diff --git a/docs/c-language/sequential-evaluation-operator.md b/docs/c-language/sequential-evaluation-operator.md
index 5860fb88f2..992ccf4363 100644
--- a/docs/c-language/sequential-evaluation-operator.md
+++ b/docs/c-language/sequential-evaluation-operator.md
@@ -11,27 +11,27 @@ The sequential-evaluation operator, also called the "comma operator," evaluates
## Syntax
-*expression*:
- *assignment-expression*
- *expression* **,** *assignment-expression*
+*`expression`*:\
+ *`assignment-expression`*\
+ *`expression`* **`,`** *`assignment-expression`*
-The left operand of the sequential-evaluation operator is evaluated as a **`void`** expression. The result of the operation has the same value and type as the right operand. Each operand can be of any type. The sequential-evaluation operator does not perform type conversions between its operands, and it does not yield an l-value. There is a sequence point after the first operand, which means all side effects from the evaluation of the left operand are completed before beginning evaluation of the right operand. See [Sequence Points](../c-language/c-sequence-points.md) for more information.
+The left operand of the sequential-evaluation operator (**`,`**) is evaluated as a **`void`** expression. The result of the operation has the same value and type as the right operand. Each operand can be of any type. The sequential-evaluation operator doesn't perform type conversions between its operands, and it doesn't yield an l-value. There's a sequence point after the first operand, which means all side effects from the evaluation of the left operand are completed before beginning evaluation of the right operand. For more information, see [Sequence Points](../c-language/c-sequence-points.md).
The sequential-evaluation operator is typically used to evaluate two or more expressions in contexts where only one expression is allowed.
-Commas can be used as separators in some contexts. However, you must be careful not to confuse the use of the comma as a separator with its use as an operator; the two uses are completely different.
+Commas can be used as separators in some contexts. However, you must be careful not to confuse the use of the comma as a separator with its use as an operator; the two uses are distinct.
## Example
This example illustrates the sequential-evaluation operator:
-```
+```c
for ( i = j = 1; i + j < 20; i += i, j-- );
```
In this example, each operand of the **`for`** statement's third expression is evaluated independently. The left operand `i += i` is evaluated first; then the right operand, `j--`, is evaluated.
-```
+```c
func_one( x, y + 2, z );
func_two( (x--, y + 2), z );
```
diff --git a/docs/c-language/simple-variable-declarations.md b/docs/c-language/simple-variable-declarations.md
index daaa215883..895313b298 100644
--- a/docs/c-language/simple-variable-declarations.md
+++ b/docs/c-language/simple-variable-declarations.md
@@ -13,27 +13,27 @@ Storage classes or types (or both) are required on variable declarations. Untype
## Syntax
-*declarator*:
- *pointer*opt *direct-declarator*
+*`declarator`*:\
+ *`pointer`*opt *`direct-declarator`*
-*direct-declarator*:
- *identifier*
+*`direct-declarator`*:\
+ *`identifier`*
-*identifier*:
- *nondigit*
- *identifier* *nondigit*
- *identifier* *digit*
+*`identifier`*:\
+ *`nondigit`*\
+ *`identifier`* *`nondigit`*\
+ *`identifier`* *`digit`*
For arithmetic, structure, union, enumerations, and void types, and for types represented by **`typedef`** names, simple declarators can be used in a declaration since the type specifier supplies all the typing information. Pointer, array, and function types require more complicated declarators.
-You can use a list of identifiers separated by commas (**,**) to specify several variables in the same declaration. All variables defined in the declaration have the same base type. For example:
+You can use a list of identifiers separated by commas (**`,`**) to specify several variables in the same declaration. All variables defined in the declaration have the same base type. For example:
```C
int x, y; /* Declares two simple variables of type int */
int const z = 1; /* Declares a constant value of type int */
```
-The variables `x` and `y` can hold any value in the set defined by the **`int`** type for a particular implementation. The simple object `z` is initialized to the value 1 and is not modifiable.
+The variables `x` and `y` can hold any value in the set defined by the **`int`** type for a particular implementation. The simple object `z` is initialized to the value 1 and isn't modifiable.
If the declaration of `z` was for an uninitialized static variable or was at file scope, it would receive an initial value of 0, and that value would be unmodifiable.
diff --git a/docs/c-language/source-files-and-source-programs.md b/docs/c-language/source-files-and-source-programs.md
index 225e7f01e5..240db4af66 100644
--- a/docs/c-language/source-files-and-source-programs.md
+++ b/docs/c-language/source-files-and-source-programs.md
@@ -11,13 +11,13 @@ A source program can be divided into one or more "source files," or "translation
## Syntax
-*translation-unit*:
- *external-declaration*
- *translation-unit* *external-declaration*
+*`translation-unit`*:\
+ *`external-declaration`* \
+ *`translation-unit`* *`external-declaration`*
-*external-declaration*:
- *function-definition*
- *declaration*
+*`external-declaration`*:\
+ *`function-definition`*\
+ *`declaration`*
[Overview of Declarations](../c-language/overview-of-declarations.md) gives the syntax for the `declaration` nonterminal, and the *Preprocessor Reference* explains how the [translation unit](../preprocessor/phases-of-translation.md) is processed.
@@ -26,9 +26,9 @@ A source program can be divided into one or more "source files," or "translation
The components of a translation unit are external declarations that include function definitions and identifier declarations. These declarations and definitions can be in source files, header files, libraries, and other files the program needs. You must compile each translation unit and link the resulting object files to make a program.
-A C "source program" is a collection of directives, pragmas, declarations, definitions, statement blocks, and functions. To be valid components of a Microsoft C program, each must have the syntax described in this book, although they can appear in any order in the program (subject to the rules outlined throughout this book). However, the location of these components in a program does affect how variables and functions can be used in a program. (See [Lifetime, Scope, Visibility, and Linkage](../c-language/lifetime-scope-visibility-and-linkage.md) for more information.)
+A C "source program" is a collection of directives, pragmas, declarations, definitions, statement blocks, and functions. To be valid components of a Microsoft C program, each must have the syntax described in this book, although they can appear in any order in the program (subject to the rules outlined throughout this book). However, the location of these components in a program does affect how variables and functions can be used in a program. For more information, see [Lifetime, Scope, Visibility, and Linkage](../c-language/lifetime-scope-visibility-and-linkage.md).
-Source files need not contain executable statements. For example, you may find it useful to place definitions of variables in one source file and then declare references to these variables in other source files that use them. This technique makes the definitions easy to find and update when necessary. For the same reason, constants and macros are often organized into separate files called "include files" or "header files" that can be referenced in source files as required. See the *Preprocessor Reference* for information about [macros](../preprocessor/macros-c-cpp.md) and [include files](../preprocessor/hash-include-directive-c-cpp.md).
+Source files don't have to contain executable statements. For example, you may find it useful to place definitions of variables in one source file and then declare references to these variables in other source files that use them. This technique makes the definitions easy to find and update when necessary. For the same reason, constants and macros are often organized into separate files called "include files" or "header files" that can be referenced in source files as required. See the *Preprocessor Reference* for information about [macros](../preprocessor/macros-c-cpp.md) and [include files](../preprocessor/hash-include-directive-c-cpp.md).
## See also
diff --git a/docs/c-language/static-assert-c.md b/docs/c-language/static-assert-c.md
index dc8ab22981..0890f6594b 100644
--- a/docs/c-language/static-assert-c.md
+++ b/docs/c-language/static-assert-c.md
@@ -78,5 +78,5 @@ Windows SDK 10.0.20348.0 (version 2104) or later. For more information on instal
## See also
[`_STATIC_ASSERT` Macro](../c-runtime-library/reference/static-assert-macro.md)\
-[`assert` macro and `_assert` and `_wassert` functions](../c-runtime-library/reference/assert-macro-assert-wassert.md)
+[`assert` macro and `_assert` and `_wassert` functions](../c-runtime-library/reference/assert-macro-assert-wassert.md)\
[`/std` (Specify language standard version)](../build/reference/std-specify-language-standard-version.md)
diff --git a/docs/c-language/storage-and-alignment-of-structures.md b/docs/c-language/storage-and-alignment-of-structures.md
index 1032e70a32..e48c280822 100644
--- a/docs/c-language/storage-and-alignment-of-structures.md
+++ b/docs/c-language/storage-and-alignment-of-structures.md
@@ -27,7 +27,7 @@ where *n* is the packing size expressed with the /Zp[*n*] option and *item* is t
To use the `pack` pragma to specify packing other than the packing specified on the command line for a particular structure, give the `pack` pragma, where the packing size is 1, 2, 4, 8, or 16, before the structure. To reinstate the packing given on the command line, specify the `pack` pragma with no arguments.
-Bit fields default to size **`long`** for the Microsoft C compiler. Structure members are aligned on the size of the type or the /Zp[*n*] size, whichever is smaller. The default size is 4.
+For the Microsoft C compiler, bit fields default to a size of 4 bytes, which is a **`long`** data type. Structure members are aligned on the size of the type or the /Zp[*n*] size, whichever is smaller.
**END Microsoft Specific**
diff --git a/docs/c-language/storage-class-specifiers-for-external-level-declarations.md b/docs/c-language/storage-class-specifiers-for-external-level-declarations.md
index 7eb9b1d56b..c4b93d2c53 100644
--- a/docs/c-language/storage-class-specifiers-for-external-level-declarations.md
+++ b/docs/c-language/storage-class-specifiers-for-external-level-declarations.md
@@ -51,6 +51,7 @@ The example below illustrates external declarations:
#include
extern int i; // Reference to i, defined below
+extern void other ( void ); // Reference to other(), defined in second source file
void next( void ); // Function prototype
int main()
diff --git a/docs/c-language/storage-class.md b/docs/c-language/storage-class.md
index 21c75e6b9c..273a8e7977 100644
--- a/docs/c-language/storage-class.md
+++ b/docs/c-language/storage-class.md
@@ -11,33 +11,33 @@ The storage-class specifier in a function definition gives the function either *
## Syntax
-*function-definition*:
- *declaration-specifiers*opt *attribute-seq*opt *declarator* *declaration-list*opt *compound-statement*
+*`function-definition`*:\
+ *`declaration-specifiers`*opt *`attribute-seq`*opt *`declarator`* *`declaration-list`*opt *`compound-statement`*
-/\* *attribute-seq* is Microsoft-specific \*/
+/\* *`attribute-seq`* is Microsoft-specific \*/
-*declaration-specifiers*:
- *storage-class-specifier* *declaration-specifiers*opt
- *type-specifier* *declaration-specifiers*opt
- *type-qualifier* *declaration-specifiers*opt
+*`declaration-specifiers`*:\
+ *`storage-class-specifier`* *`declaration-specifiers`*opt\
+ *`type-specifier`* *`declaration-specifiers`*opt\
+ *`type-qualifier`* *`declaration-specifiers`*opt
-*storage-class-specifier*: /\* For function definitions \*/
- **`extern`**
- **`static`**
+*`storage-class-specifier`*: /\* For function definitions \*/\
+ **`extern`**\
+ **`static`**
-If a function definition does not include a *storage-class-specifier*, the storage class defaults to **`extern`**. You can explicitly declare a function as **`extern`**, but it is not required.
+If a function definition doesn't include a *`storage-class-specifier`*, the storage class defaults to **`extern`**. You can explicitly declare a function as **`extern`**, but it isn't required.
-If the declaration of a function contains the *storage-class-specifier* **`extern`**, the identifier has the same linkage as any visible declaration of the identifier with file scope. If there is no visible declaration with file scope, the identifier has external linkage. If an identifier has file scope and no *storage-class-specifier*, the identifier has external linkage. External linkage means that each instance of the identifier denotes the same object or function. See [Lifetime, Scope, Visibility, and Linkage](../c-language/lifetime-scope-visibility-and-linkage.md) for more information about linkage and file scope.
+If the declaration of a function contains the *`storage-class-specifier`* **`extern`**, the identifier has the same linkage as any visible declaration of the identifier with file scope. If there's no visible declaration with file scope, the identifier has external linkage. If an identifier has file scope and no *`storage-class-specifier`*, the identifier has external linkage. External linkage means that each instance of the identifier denotes the same object or function. For more information about linkage and file scope, see [Lifetime, Scope, Visibility, and Linkage](../c-language/lifetime-scope-visibility-and-linkage.md).
Block-scope function declarations with a storage-class specifier other than **`extern`** generate errors.
-A function with **`static`** storage class is visible only in the source file in which it is defined. All other functions, whether they are given **`extern`** storage class explicitly or implicitly, are visible throughout all source files in the program. If **`static`** storage class is desired, it must be declared on the first occurrence of a declaration (if any) of the function, and on the definition of the function.
+A function with **`static`** storage class is visible only in the source file in which it's defined. All other functions, whether they're given **`extern`** storage class explicitly or implicitly, are visible throughout all source files in the program. If **`static`** storage class is desired, it must be declared on the first occurrence of a declaration (if any) of the function, and on the definition of the function.
**Microsoft Specific**
When the Microsoft extensions are enabled, a function originally declared without a storage class (or with **`extern`** storage class) is given **`static`** storage class if the function definition is in the same source file and if the definition explicitly specifies **`static`** storage class.
-When compiling with the /Ze compiler option, functions declared within a block using the **`extern`** keyword have global visibility. This is not true when compiling with /Za. This feature should not be relied upon if portability of source code is a consideration.
+When compiled with the /Ze compiler option, functions declared within a block using the **`extern`** keyword have global visibility, which isn't true when compiling with /Za. This feature shouldn't be relied upon if portability of source code is a consideration.
**END Microsoft Specific**
diff --git a/docs/c-language/structure-and-union-members.md b/docs/c-language/structure-and-union-members.md
index 98fbb1ef45..3660b1788f 100644
--- a/docs/c-language/structure-and-union-members.md
+++ b/docs/c-language/structure-and-union-members.md
@@ -9,36 +9,36 @@ ms.assetid: bb1fe304-af49-4f98-808d-afdc99b3e319
A "member-selection expression" refers to members of structures and unions. Such an expression has the value and type of the selected member.
-> *postfix-expression* **.** *identifier*\
-> *postfix-expression* **->** *identifier*
+> *`postfix-expression`* **`.`** *`identifier`*\
+> *`postfix-expression`* **`->`** *`identifier`*
This list describes the two forms of the member-selection expressions:
-1. In the first form, *postfix-expression* represents a value of **`struct`** or **`union`** type, and *identifier* names a member of the specified structure or union. The value of the operation is that of *identifier* and is an l-value if *postfix-expression* is an l-value. See [L-Value and R-Value Expressions](../c-language/l-value-and-r-value-expressions.md) for more information.
+1. In the first form, *`postfix-expression`* represents a value of **`struct`** or **`union`** type, and *`identifier`* names a member of the specified structure or union. The value of the operation is that of *`identifier`* and is an l-value if *`postfix-expression`* is an l-value. For more information, see [L-Value and R-Value Expressions](../c-language/l-value-and-r-value-expressions.md).
-1. In the second form, *postfix-expression* represents a pointer to a structure or union, and *identifier* names a member of the specified structure or union. The value is that of *identifier* and is an l-value.
+1. In the second form, *`postfix-expression`* represents a pointer to a structure or union, and *`identifier`* names a member of the specified structure or union. The value is that of *`identifier`* and is an l-value.
The two forms of member-selection expressions have similar effects.
-In fact, an expression involving the member-selection operator (**->**) is a shorthand version of an expression using the period (**.**) if the expression before the period consists of the indirection operator (\*) applied to a pointer value. Therefore,
+In fact, an expression involving the member-selection operator (**`->`**) is a shorthand version of an expression using the period (**`.`**) if the expression before the period consists of the indirection operator (**`*`**) applied to a pointer value. Therefore,
-```cpp
+```c
expression->identifier
```
is equivalent to
-```cpp
+```c
(*expression).identifier
```
-when *expression* is a pointer value.
+when `expression` is a pointer value.
## Examples
-The following examples refer to this structure declaration. For information about the indirection operator (\*) used in these examples, see [Indirection and Address-of Operators](../c-language/indirection-and-address-of-operators.md).
+The following examples refer to this structure declaration. For information about the indirection operator (**`*`**) used in these examples, see [Indirection and Address-of Operators](../c-language/indirection-and-address-of-operators.md).
-```
+```c
struct pair
{
int a;
@@ -49,19 +49,19 @@ struct pair
A member-selection expression for the `item` structure looks like this:
-```
+```c
item.sp = &item;
```
-In the example above, the address of the `item` structure is assigned to the `sp` member of the structure. This means that `item` contains a pointer to itself.
+In the example, the address of the `item` structure is assigned to the `sp` member of the structure. It means that `item` contains a pointer to itself.
-```
+```c
(item.sp)->a = 24;
```
-In this example, the pointer expression `item.sp` is used with the member-selection operator (**->**) to assign a value to the member `a`.
+In this example, the pointer expression `item.sp` is used with the member-selection operator (**`->`**) to assign a value to the member `a`.
-```
+```c
list[8].b = 12;
```
diff --git a/docs/c-language/structure-declarations.md b/docs/c-language/structure-declarations.md
index a1b6811b90..e0bc7d5492 100644
--- a/docs/c-language/structure-declarations.md
+++ b/docs/c-language/structure-declarations.md
@@ -11,45 +11,45 @@ A "structure declaration" names a type and specifies a sequence of variable valu
## Syntax
-*struct-or-union-specifier*:
- *struct-or-union* *identifier*opt **{** *struct-declaration-list* **}**
- *struct-or-union* *identifier*
+*`struct-or-union-specifier`*:\
+ *`struct-or-union`* *`identifier`*opt **`{`** *`struct-declaration-list`* **`}`**\
+ *`struct-or-union`* *`identifier`*
-*struct-or-union*:
- **`struct`**
- **`union`**
+*`struct-or-union`*:\
+ **`struct`**\
+ **`union`**
-*struct-declaration-list*:
- *struct-declaration*
- *struct-declaration-list* *struct-declaration*
+*`struct-declaration-list`*:\
+ *`struct-declaration`*\
+ *`struct-declaration-list`* *`struct-declaration`*
-*struct-declaration*:
- *specifier-qualifier-list* *struct-declarator-list* **;**
+*`struct-declaration`*:\
+ *`specifier-qualifier-list`* *`struct-declarator-list`* **`;`**
-*specifier-qualifier-list*:
- *type-specifier* *specifier-qualifier-list*opt
- *type-qualifier* *specifier-qualifier-list*opt
+*`specifier-qualifier-list`*:\
+ *`type-specifier`* *`specifier-qualifier-list`*opt\
+ *`type-qualifier`* *`specifier-qualifier-list`*opt
-*struct-declarator-list*:
- *struct-declarator* *struct-declarator-list* **,** *struct-declarator*
+*`struct-declarator-list`*:\
+ *`struct-declarator`* *`struct-declarator-list`* **`,`** *`struct-declarator`*
-*struct-declarator*:
- *declarator*
- *type-specifier* *declarator*opt **:** *constant-expression*
+*`struct-declarator`*:\
+ *`declarator`*\
+ *`type-specifier`* *`declarator`*opt **`:`** *`constant-expression`*
-The declaration of a structure type does not set aside space for a structure. It is only a template for later declarations of structure variables.
+The declaration of a structure type doesn't set aside space for a structure. It's only a template for later declarations of structure variables.
-A previously defined *identifier* (tag) can be used to refer to a structure type defined elsewhere. In this case, *struct-declaration-list* cannot be repeated as long as the definition is visible. Declarations of pointers to structures and typedefs for structure types can use the structure tag before the structure type is defined. However, the structure definition must be encountered prior to any actual use of the size of the fields. This is an incomplete definition of the type and the type tag. For this definition to be completed, a type definition must appear later in the same scope.
+A previously defined *`identifier`* (tag) can be used to refer to a structure type defined elsewhere. In this case, *`struct-declaration-list`* can't be repeated as long as the definition is visible. Declarations of pointers to structures and typedefs for structure types can use the structure tag before the structure type is defined. However, the structure definition must be encountered prior to any actual use of the size of the fields. This use is an incomplete definition of the type and the type tag. For this definition to be completed, a type definition must appear later in the same scope.
-The *struct-declaration-list* specifies the types and names of the structure members. A *struct-declaration-list* argument contains one or more variable or bit-field declarations.
+The *`struct-declaration-list`* specifies the types and names of the structure members. A *`struct-declaration-list`* argument contains one or more variable or bit-field declarations.
-Each variable declared in *struct-declaration-list* is defined as a member of the structure type. Variable declarations within *struct-declaration-list* have the same form as other variable declarations discussed in this section, except that the declarations cannot contain storage-class specifiers or initializers. The structure members can have any variable types except type **`void`**, an incomplete type, or a function type.
+Each variable declared in *`struct-declaration-list`* is defined as a member of the structure type. Variable declarations within *`struct-declaration-list`* have the same form as other variable declarations discussed in this section, except that the declarations can't contain storage-class specifiers or initializers. The structure members can have any variable types except type **`void`**, an incomplete type, or a function type.
-A member cannot be declared to have the type of the structure in which it appears. However, a member can be declared as a pointer to the structure type in which it appears as long as the structure type has a tag. This allows you to create linked lists of structures.
+A member can't be declared to have the type of the structure in which it appears. However, a member can be declared as a pointer to the structure type in which it appears as long as the structure type has a tag. It allows you to create linked lists of structures.
Structures follow the same scoping as other identifiers. Structure identifiers must be distinct from other structure, union, and enumeration tags with the same visibility.
-Each *struct-declaration* in a *struct-declaration-list* must be unique within the list. However, identifier names in a *struct-declaration-list* do not have to be distinct from ordinary variable names or from identifiers in other structure declaration lists.
+Each *`struct-declaration`* in a *`struct-declaration-list`* must be unique within the list. However, identifier names in a *`struct-declaration-list`* don't have to be distinct from ordinary variable names or from identifiers in other structure declaration lists.
Nested structures can also be accessed as though they were declared at the file-scope level. For example, given this declaration:
@@ -112,7 +112,7 @@ struct sample /* Defines a structure named x */
The first two members of the structure are a **`char`** variable and a pointer to a **`float`** value. The third member, `next`, is declared as a pointer to the structure type being defined (`sample`).
-Anonymous structures can be useful when the tag named is not needed. This is the case when one declaration defines all structure instances. For example:
+Anonymous structures can be useful when the tag name isn't needed, such as when one declaration defines all structure instances. For example:
```C
struct
@@ -137,13 +137,13 @@ struct somestruct
**Microsoft Specific**
-The compiler allows an unsized or zero-sized array as the last member of a structure. This can be useful if the size of a constant array differs when used in various situations. The declaration of such a structure looks like this:
+The compiler allows an unsized or zero-sized array as the last member of a structure. It's useful if the size of a constant array differs when used in various situations. The declaration of such a structure looks like this:
-**`struct`** *identifier* **{** *set-of-declarations* *type* array-name**\[]; };**
+**`struct`** *`identifier`* **`{`** *`set-of-declarations`* *`type`* *`array-name`* **`[]; };`**
-Unsized arrays can appear only as the last member of a structure. Structures containing unsized array declarations can be nested within other structures as long as no further members are declared in any enclosing structures. Arrays of such structures are not allowed. The **`sizeof`** operator, when applied to a variable of this type or to the type itself, assumes 0 for the size of the array.
+Unsized arrays can appear only as the last member of a structure. Structures containing unsized array declarations can be nested within other structures as long as no further members are declared in any enclosing structures. Arrays of such structures aren't allowed. The **`sizeof`** operator, when applied to a variable of this type or to the type itself, assumes 0 for the size of the array.
-Structure declarations can also be specified without a declarator when they are members of another structure or union. The field names are promoted into the enclosing structure. For example, a nameless structure looks like this:
+Structure declarations can also be specified without a declarator when they're members of another structure or union. The field names are promoted into the enclosing structure. For example, a nameless structure looks like this:
```C
struct s
@@ -161,7 +161,7 @@ struct s
p_s->b = 100; /* A reference to a field in the s structure */
```
-See [Structure and Union Members](../c-language/structure-and-union-members.md) for information about structure references.
+For more information about structure references, see [Structure and Union Members](../c-language/structure-and-union-members.md).
**END Microsoft Specific**
diff --git a/docs/c-language/summary-of-declarations.md b/docs/c-language/summary-of-declarations.md
index df8e11d520..117a5baaaa 100644
--- a/docs/c-language/summary-of-declarations.md
+++ b/docs/c-language/summary-of-declarations.md
@@ -4,7 +4,7 @@ description: "Learn about the standard C grammar for declarations as implemented
ms.date: 10/30/2020
ms.assetid: 53a5e9e5-1a33-40b5-9dea-7f669b479329
---
-# Summary of Declarations
+# Summary of declarations
*`declaration`*:\
*`declaration-specifiers`* *`attribute-seq`*opt1 *`init-declarator-list`*opt **`;`**\
@@ -209,7 +209,7 @@ ms.assetid: 53a5e9e5-1a33-40b5-9dea-7f669b479329
**`_Static_assert`** **`(`** *`constant-expression`* **`,`** *`string-literal`* **`)`** **`;`**
1 This grammar element is Microsoft-specific.\
-2 For more information about these elements, see [`__asm`](../assembler/inline/asm.md), [`__clrcall`](../cpp/clrcall.md), [`__stdcall`](../cpp/stdcall.md), [`__based`](../cpp/based-grammar.md), [`__fastcall`](../cpp/fastcall.md), [`__thiscall`](../cpp/thiscall.md), [`__cdecl`](../cpp/cdecl.md), [`__inline`](../cpp/inline-functions-cpp.md), and [`__vectorcall`](../cpp/vectorcall.md).
+2 For more information about these elements, see [`__asm`](../assembler/inline/asm.md), [`__clrcall`](../cpp/clrcall.md), [`__stdcall`](../cpp/stdcall.md), [`__based`](../cpp/based-grammar.md), [`__fastcall`](../cpp/fastcall.md), [`__thiscall`](../cpp/thiscall.md), [`__cdecl`](../cpp/cdecl.md), [`__inline`](../cpp/inline-functions-cpp.md), and [`__vectorcall`](../cpp/vectorcall.md).\
3 This style is obsolete.
## See also
diff --git a/docs/c-language/summary-of-statements.md b/docs/c-language/summary-of-statements.md
index be4e226df0..6e6e98aa36 100644
--- a/docs/c-language/summary-of-statements.md
+++ b/docs/c-language/summary-of-statements.md
@@ -6,56 +6,56 @@ ms.assetid: ce45d2fe-ec0e-459f-afb1-80ab6a7f0239
---
# Summary of C statements
-*`statement`*:
- *`labeled-statement`*
- *`compound-statement`*
- *`expression-statement`*
- *`selection-statement`*
- *`iteration-statement`*
- *`jump-statement`*
- *`try-except-statement`* /\* Microsoft-specific \*/
+*`statement`*:\
+ *`labeled-statement`*\
+ *`compound-statement`*\
+ *`expression-statement`*\
+ *`selection-statement`*\
+ *`iteration-statement`*\
+ *`jump-statement`*\
+ *`try-except-statement`* /\* Microsoft-specific \*/\
*`try-finally-statement`* /\* Microsoft-specific \*/
-*`jump-statement`*:
- **`goto`** *`identifier`* **`;`**
- **`continue ;`**
- **`break ;`**
- **`return`** *`expression`*opt **`;`**
+*`jump-statement`*:\
+ **`goto`** *`identifier`* **`;`**\
+ **`continue ;`**\
+ **`break ;`**\
+ **`return`** *`expression`*opt **`;`**\
**`__leave ;`** /\* Microsoft-specific1 \*/
-*`compound-statement`*:
+*`compound-statement`*:\
**`{`** *`declaration-list`*opt *`statement-list`*opt **`}`**
-*`declaration-list`*:
- *`declaration`*
+*`declaration-list`*:\
+ *`declaration`*\
*`declaration-list`* *`declaration`*
-*`statement-list`*:
- *`statement`*
+*`statement-list`*:\
+ *`statement`*\
*`statement-list`* *`statement`*
-*`expression-statement`*:
+*`expression-statement`*:\
*`expression`*opt **`;`**
-*`iteration-statement`*:
- **`while (`** *`expression`* **`)`** *`statement`*
- **`do`** *`statement`* **`while (`** *`expression`* **`) ;`**
+*`iteration-statement`*:\
+ **`while (`** *`expression`* **`)`** *`statement`*\
+ **`do`** *`statement`* **`while (`** *`expression`* **`) ;`**\
**`for (`** *`expression`*opt **`;`** *`expression`*opt **`;`** *`expression`*opt **`)`** *`statement`*
-*`selection-statement`*:
- **`if (`** *`expression`* **`)`** *`statement`*
- **`if (`** *`expression`* **`)`** *`statement`* **`else`** *`statement`*
+*`selection-statement`*:\
+ **`if (`** *`expression`* **`)`** *`statement`*\
+ **`if (`** *`expression`* **`)`** *`statement`* **`else`** *`statement`*\
**`switch (`** *`expression`* **`)`** *`statement`*
-*`labeled-statement`*:
- *`identifier`* **`:`** *`statement`*
- **`case`** *`constant-expression`* **`:`** *`statement`*
+*`labeled-statement`*:\
+ *`identifier`* **`:`** *`statement`*\
+ **`case`** *`constant-expression`* **`:`** *`statement`*\
**`default :`** *`statement`*
-*`try-except-statement`*: /\* Microsoft-specific \*/
+*`try-except-statement`*: /\* Microsoft-specific \*/\
**`__try`** *`compound-statement`* **`__except (`** *`expression`* **`)`** *`compound-statement`*
-*`try-finally-statement`*: /\* Microsoft-specific \*/
+*`try-finally-statement`*: /\* Microsoft-specific \*/\
**`__try`** *`compound-statement`* **`__finally`** *`compound-statement`*
1 The **`__leave`** keyword is only valid within the **`__try`** block of a *`try-except-statement`* or a *`try-finally-statement`*.
diff --git a/docs/c-language/switch-statement-c.md b/docs/c-language/switch-statement-c.md
index 414efdeed7..8f9394ed80 100644
--- a/docs/c-language/switch-statement-c.md
+++ b/docs/c-language/switch-statement-c.md
@@ -13,12 +13,12 @@ The **`switch`** and **`case`** statements help control complex conditional and
## Syntax
-> *`selection-statement`*:\
-> **`switch (`** *`expression`* **`)`** *`statement`*
+*`selection-statement`*:\
+ **`switch (`** *`expression`* **`)`** *`statement`*
-> *`labeled-statement`*:\
-> **`case`** *`constant-expression`* **`:`** *`statement`*\
-> **`default`** **`:`** *`statement`*
+*`labeled-statement`*:\
+ **`case`** *`constant-expression`* **`:`** *`statement`*\
+ **`default`** **`:`** *`statement`*
## Remarks
@@ -103,7 +103,7 @@ switch( c )
}
```
-In this example, if *constant-expression* equals any letter between `'a'` and `'f'`, the `convert_hex` function is called.
+In this example, if *`constant-expression`* equals any letter between `'a'` and `'f'`, the `convert_hex` function is called.
### Microsoft-specific
diff --git a/docs/c-language/toc.yml b/docs/c-language/toc.yml
index bdec148f7a..cfd26f82ed 100644
--- a/docs/c-language/toc.yml
+++ b/docs/c-language/toc.yml
@@ -171,6 +171,10 @@ items:
href: ../c-language/c-type-specifiers.md
- name: Data type specifiers and equivalents
href: ../c-language/data-type-specifiers-and-equivalents.md
+ - name: typeof
+ href: typeof-c.md
+ - name: typeof_unqual
+ href: typeof-unqual-c.md
- name: Type qualifiers
href: ../c-language/type-qualifiers.md
- name: Declarators and variable declarations
diff --git a/docs/c-language/type-cast-conversions.md b/docs/c-language/type-cast-conversions.md
index 925ddeba36..f73cde27f3 100644
--- a/docs/c-language/type-cast-conversions.md
+++ b/docs/c-language/type-cast-conversions.md
@@ -9,39 +9,39 @@ ms.assetid: 57ab5902-f12f-4326-a2f6-6282f1d4025a
You can use type casts to explicitly convert types.
-**Syntax**
+## Syntax
-*cast-expression*:
- *unary expression*
- **(** *type-name* **)** *cast-expression*
+*`cast-expression`*:\
+ *`unary-expression`*\
+ **`(`** *`type-name`* **`)`** *`cast-expression`*
-*type-name*:
- *specifier-qualifier-list* *abstract-declarator*opt
+*`type-name`*:\
+ *`specifier-qualifier-list`* *`abstract-declarator`*opt
-The *type-name* is a type and *cast-expression* is a value to be converted to that type. An expression with a type cast is not an l-value. The *cast-expression* is converted as though it had been assigned to a variable of type *type-name*. The conversion rules for assignments (outlined in [Assignment Conversions](../c-language/assignment-conversions.md)) apply to type casts as well. The following table shows the types that can be cast to any given type.
+The *`type-name`* is a type and *`cast-expression`* is a value to be converted to that type. An expression with a type cast isn't an l-value. The *`cast-expression`* is converted as though it had been assigned to a variable of type *`type-name`*. The conversion rules for assignments (outlined in [Assignment Conversions](../c-language/assignment-conversions.md)) apply to type casts as well. The following table shows the types that can be cast to any given type.
-### Legal Type Casts
+### Legal type casts
-|Destination Types|Potential Sources|
-|-----------------------|-----------------------|
-|Integral types|Any integer type or floating-point type, or pointer to an object|
-|Floating-point|Any arithmetic type|
-|A pointer to an object, or (**`void`** \*)|Any integer type, (**`void`** \*), a pointer to an object, or a function pointer|
-|Function pointer|Any integral type, a pointer to an object, or a function pointer|
-|A structure, union, or array|None|
-|Void type|Any type|
+| Destination Types | Potential Sources |
+|---|---|
+| Integral types | Any integer type or floating-point type, or pointer to an object |
+| Floating-point | Any arithmetic type |
+| A pointer to an object, or `void *` | Any integer type, `void *`, a pointer to an object, or a function pointer |
+| Function pointer | Any integral type, a pointer to an object, or a function pointer |
+| A structure, union, or array | None |
+| Void type | Any type |
-Any identifier can be cast to **`void`** type. However, if the type specified in a type-cast expression is not **`void`**, then the identifier being cast to that type cannot be a **`void`** expression. Any expression can be cast to **`void`**, but an expression of type **`void`** cannot be cast to any other type. For example, a function with **`void`** return type cannot have its return cast to another type.
+Any identifier can be cast to **`void`** type. However, if the type specified in a type-cast expression isn't **`void`**, then the identifier being cast to that type can't be a **`void`** expression. Any expression can be cast to **`void`**, but an expression of type **`void`** can't be cast to any other type. For example, a function with **`void`** return type can't have its return cast to another type.
-Note that a **`void`** \* expression has a type pointer to **`void`**, not type **`void`**. If an object is cast to **`void`** type, the resulting expression cannot be assigned to any item. Similarly, a type-cast object is not an acceptable l-value, so no assignment can be made to a type-cast object.
+A `void *` expression has a type pointer to **`void`**, not type **`void`**. If an object is cast to **`void`** type, the resulting expression can't be assigned to any item. Similarly, a type-cast object isn't an acceptable l-value, so no assignment can be made to a type-cast object.
**Microsoft Specific**
-A type cast can be an l-value expression as long as the size of the identifier does not change. For information on l-value expressions, see [L-Value and R-Value Expressions](../c-language/l-value-and-r-value-expressions.md).
+A type cast can be an l-value expression as long as the size of the identifier doesn't change. For information on l-value expressions, see [L-Value and R-Value Expressions](../c-language/l-value-and-r-value-expressions.md).
**END Microsoft Specific**
-You can convert an expression to type **`void`** with a cast, but the resulting expression can be used only where a value is not required. An object pointer converted to **`void`** \* and back to the original type will return to its original value.
+You can convert an expression to type **`void`** with a cast, but the resulting expression can be used only where a value isn't required. An object pointer converted to `void *` and back to the original type will return to its original value.
## See also
diff --git a/docs/c-language/typedef-declarations.md b/docs/c-language/typedef-declarations.md
index 898ab631bd..019f17fbdf 100644
--- a/docs/c-language/typedef-declarations.md
+++ b/docs/c-language/typedef-declarations.md
@@ -7,43 +7,43 @@ ms.assetid: e92a3b82-9269-4bc6-834a-6f431ccac83e
---
# Typedef Declarations
-A typedef declaration is a declaration with typedef as the storage class. The declarator becomes a new type. You can use typedef declarations to construct shorter or more meaningful names for types already defined by C or for types that you have declared. Typedef names allow you to encapsulate implementation details that may change.
+A typedef declaration is a declaration with typedef as the storage class. The declarator becomes a new type. You can use typedef declarations to construct shorter or more meaningful names for types already defined by C or for types that you've declared. Typedef names allow you to encapsulate implementation details that may change.
A typedef declaration is interpreted in the same way as a variable or function declaration, but the identifier, instead of assuming the type specified by the declaration, becomes a synonym for the type.
## Syntax
-*declaration*:
- *declaration-specifiers init-declarator-list*opt **;**
+*`declaration`*:\
+ *`declaration-specifiers`* *`init-declarator-list`*opt **`;`**
-*declaration-specifiers*:
- *storage-class-specifier declaration-specifiers*opt
- *type-specifier declaration-specifiers*opt
- *type-qualifier declaration-specifiers*opt
+*`declaration-specifiers`*:\
+ *`storage-class-specifier`* *`declaration-specifiers`*opt\
+ *`type-specifier`* *`declaration-specifiers`*opt\
+ *`type-qualifier`* *`declaration-specifiers`*opt
-*storage-class-specifier*:
- **`typedef`**
+*`storage-class-specifier`*:\
+ **`typedef`**
-*type-specifier*:
- **`void`**
- **`char`**
- **`short`**
- **`int`**
- **`long`**
- **`float`**
- **`double`**
- **`signed`**
- **`unsigned`**
- *struct-or-union-specifier*
- *enum-specifier*
- *typedef-name*
+*`type-specifier`*:\
+ **`void`**\
+ **`char`**\
+ **`short`**\
+ **`int`**\
+ **`long`**\
+ **`float`**\
+ **`double`**\
+ **`signed`**\
+ **`unsigned`**\
+ *`struct-or-union-specifier`*\
+ *`enum-specifier`*\
+ *`typedef-name`*
-*typedef-name*:
- *identifier*
+*`typedef-name`*:\
+ *`identifier`*
-Note that a typedef declaration does not create types. It creates synonyms for existing types, or names for types that could be specified in other ways. When a typedef name is used as a type specifier, it can be combined with certain type specifiers, but not others. Acceptable modifiers include **`const`** and **`volatile`**.
+A typedef declaration doesn't create new types. It creates synonyms for existing types, or names for types that could be specified in other ways. When a typedef name is used as a type specifier, it can be combined with certain type specifiers, but not others. Acceptable modifiers include **`const`** and **`volatile`**.
-Typedef names share the name space with ordinary identifiers (see [Name Spaces](../c-language/name-spaces.md) for more information). Therefore, a program can have a typedef name and a local-scope identifier by the same name. For example:
+Typedef names share the name space with ordinary identifiers. (For more information, see [Name Spaces](../c-language/name-spaces.md).) Therefore, a program can have a typedef name and a local-scope identifier by the same name. For example:
```C
typedef char FlagType;
@@ -58,7 +58,7 @@ int myproc( int )
}
```
-When declaring a local-scope identifier by the same name as a typedef, or when declaring a member of a structure or union in the same scope or in an inner scope, the type specifier must be specified. This example illustrates this constraint:
+When you declare a local-scope identifier by the same name as a typedef, or when you declare a member of a structure or union in the same scope or in an inner scope, you must also specify the type specifier. This example illustrates this constraint:
```C
typedef char FlagType;
@@ -71,7 +71,7 @@ To reuse the `FlagType` name for an identifier, a structure member, or a union m
const int FlagType; /* Type specifier required */
```
-It is not sufficient to say
+It isn't sufficient to say
```C
const FlagType; /* Incomplete specification */
@@ -83,7 +83,7 @@ because the `FlagType` is taken to be part of the type, not an identifier that i
int; /* Illegal declaration */
```
-You can declare any type with typedef, including pointer, function, and array types. You can declare a typedef name for a pointer to a structure or union type before you define the structure or union type, as long as the definition has the same visibility as the declaration.
+You can declare any type with **`typedef`**, including pointer, function, and array types. You can declare a typedef name for a pointer to a structure or union type before you define the structure or union type, as long as the definition has the same visibility as the declaration.
Typedef names can be used to improve code readability. All three of the following declarations of `signal` specify exactly the same type, the first without making use of any typedef names.
@@ -103,7 +103,7 @@ The following examples illustrate typedef declarations:
typedef int WHOLE; /* Declares WHOLE to be a synonym for int */
```
-Note that `WHOLE` could now be used in a variable declaration such as `WHOLE i;` or `const WHOLE i;`. However, the declaration `long WHOLE i;` would be illegal.
+For example, `WHOLE` could now be used in a variable declaration such as `WHOLE i;` or `const WHOLE i;`. However, the declaration `long WHOLE i;` would be illegal.
```C
typedef struct club
@@ -113,7 +113,7 @@ typedef struct club
} GROUP;
```
-This statement declares `GROUP` as a structure type with three members. Since a structure tag, `club`, is also specified, either the typedef name (`GROUP`) or the structure tag can be used in declarations. You must use the struct keyword with the tag, and you cannot use the struct keyword with the typedef name.
+This statement declares `GROUP` as a structure type with three members. Since a structure tag, `club`, is also specified, either the typedef name (`GROUP`) or the structure tag can be used in declarations. You must use the **`struct`** keyword with the tag, and you can't use the **`struct`** keyword with the typedef name.
```C
typedef GROUP *PG; /* Uses the previous typedef name
@@ -126,7 +126,7 @@ The type `PG` is declared as a pointer to the `GROUP` type, which in turn is def
typedef void DRAWF( int, int );
```
-This example provides the type `DRAWF` for a function returning no value and taking two int arguments. This means, for example, that the declaration
+This example provides the type `DRAWF` for a function returning no value and taking two int arguments. It means, for example, that the declaration
```C
DRAWF box;
diff --git a/docs/c-language/typeof-c.md b/docs/c-language/typeof-c.md
new file mode 100644
index 0000000000..1537669942
--- /dev/null
+++ b/docs/c-language/typeof-c.md
@@ -0,0 +1,59 @@
+---
+title: "typeof, __typeof__ (C23)"
+description: "Describes Microsoft Visual C23 typeof operator"
+ms.date: 02/06/2024
+helpviewer_keywords: ["typeof keyword [C]", "__typeof__ keyword [C]"]
+---
+# `typeof`, `__typeof__` (C23)
+
+New in the C23 standard, the **`typeof`** operator is a unary operator that returns the type of an expression. It can be used in type declarations, type casts, type checks, and so on. It gets the type of a variable, function, or any C expression.
+
+The **`__typeof__`** keyword is a Microsoft-specific extension that provides the same functionality as **`typeof`**. The `__typeof__` keyword differs from `typeof` only in that it's available when compiling for all versions of C (not just `/std:clatest`), and it may ease porting code between other compilers that support `__typeof__`.
+
+### `typeof` syntax
+
+```c
+typeof(type)
+typeof(constant-expression)
+__typeof__(constant-expression)
+```
+
+### `typeof` example
+
+This example uses `typeof()`, but the behavior is the same if you use `__typeof__`.
+
+```c
+// Compile with /std:clatest
+
+#include
+
+double func()
+{
+ 3.14;
+}
+
+#define POINTER(T) typeof(T*)
+
+int main()
+{
+ auto a = func(); // the type for a (double) is inferred, but requires initialization at point of declaration
+ typeof(func()) b; // the type for b is double, but didn't have to be initialized at point of declaration
+
+ // Some declarations using typeof
+ POINTER(int) p1 = NULL; // p1 is int*
+
+ typeof(double(void))* pFunc = func; // pFunc is a pointer to a function that takes no arguments and returns a double
+ printf("pFunc() returns %f\n", pFunc());
+
+ return 0;
+}
+```
+
+## Requirements
+
+Requires Visual Studio 17.9 or later, or `cl.exe` version 19.39.33428 or later.
+To use `typeof`, compile with [`/std:clatest`](../build/reference/std-specify-language-standard-version.md).
+
+## See also
+
+[`/std` (Specify Language Standard Version)](../build/reference/std-specify-language-standard-version.md)
diff --git a/docs/c-language/typeof-unqual-c.md b/docs/c-language/typeof-unqual-c.md
new file mode 100644
index 0000000000..7786d9ecb8
--- /dev/null
+++ b/docs/c-language/typeof-unqual-c.md
@@ -0,0 +1,57 @@
+---
+title: "typeof_unqual, __typeof_unqual__ (C23)"
+description: "Describes Microsoft Visual C23 typeof_unqual operator"
+ms.date: 02/06/2024
+helpviewer_keywords: ["typeof_unqual keyword [C]", "__typeof_unqual__ keyword [C]"]
+---
+# `typeof_unqual`, `__typeof_unqual__` (C23)
+
+New in the C23 standard, the **`typeof_unqual`** operator is a unary operator that returns the type of an expression after discarding qualifiers such as `const`, `volatile`, and `restrict`. It can be used in type declarations, type casts, type checks, and so on. It gets the type of a variable, function, or any C expression.
+
+The **`__typeof_unqual__`** keyword is a Microsoft-specific extension that provides the same functionality as **`typeof_unqual`**. The **`__typeof_unqual__`** keyword differs from `typeof_unqual` only in that it's available when compiling for all versions of C (not just `/std:clatest`), and it may ease porting code between other compilers that support `__typeof_unqual__`.
+
+### `typeof_unqual` syntax
+
+```c
+typeof_unqual(type)
+typeof_unqual(constant-expression)
+__typeof__unqual(constant-expression)
+```
+
+### `typeof_unqual` example
+
+This example uses `typeof_unqual()`, but the behavior is the same if you use `__typeof_unqual__`.
+
+```c
+// Compile with /std:clatest and /experimental:c11atomics
+#include
+
+// A function that takes an atomic int pointer, but uses a non-atomic copy of the value
+void func(_Atomic(int) * pAtomic)
+{
+ typeof_unqual(*pAtomic) local = *pAtomic;
+
+ // Use local non-atomic copy of value
+}
+
+int main()
+{
+ int* const cpVar1 = 2;
+ typeof_unqual(cpVar1) pVar2 = 3;
+ pVar2 = 4; // no error because pi is not const. cpVar1 = 4 would be an error.
+
+ _Atomic(int)i = 42;
+ func(&i);
+
+ return 0;
+}
+```
+
+## Requirements
+
+Requires Visual Studio 17.9 or later, or `cl.exe` version 19.39.33428 or later.
+To use `typeof_unqual`, compile with [`/std:clatest`](../build/reference/std-specify-language-standard-version.md).
+
+## See also
+
+[`/std` (Specify Language Standard Version)](../build/reference/std-specify-language-standard-version.md)
diff --git a/docs/c-language/union-declarations.md b/docs/c-language/union-declarations.md
index 03f8d046bc..7a0a0cd01e 100644
--- a/docs/c-language/union-declarations.md
+++ b/docs/c-language/union-declarations.md
@@ -5,42 +5,42 @@ ms.date: "11/04/2016"
helpviewer_keywords: ["unions", "union keyword [C], declarations", "variant records"]
ms.assetid: 978c6165-e0ae-4196-afa7-6d94e24f62f7
---
-# Union Declarations
+# `union` Declarations
A "union declaration" specifies a set of variable values and, optionally, a tag naming the union. The variable values are called "members" of the union and can have different types. Unions are similar to "variant records" in other languages.
## Syntax
-*struct-or-union-specifier*:
- *struct-or-union* *identifier*opt **{** *struct-declaration-list* **}**
- *struct-or-union* *identifier*
+*`struct-or-union-specifier`*:\
+ *`struct-or-union`* *`identifier`*opt **`{`** *`struct-declaration-list`* **`}`**\
+ *`struct-or-union`* *`identifier`*
-*struct-or-union*:
- **`struct`**
- **`union`**
+*`struct-or-union`*:\
+ **`struct`**\
+ **`union`**
-*struct-declaration-list*:
- *struct-declaration*
- *struct-declaration-list* *struct-declaration*
+*`struct-declaration-list`*:\
+ *`struct-declaration`*\
+ *`struct-declaration-list`* *`struct-declaration`*
The union content is defined to be
-*struct-declaration*:
- *specifier-qualifier-list* *struct-declarator-list* **;**
+*`struct-declaration`*:\
+ *`specifier-qualifier-list`* *`struct-declarator-list`* **`;`**
-*specifier-qualifier-list*:
- *type-specifier* *specifier-qualifier-list*opt
- *type-qualifier* *specifier-qualifier-list*opt
+*`specifier-qualifier-list`*:\
+ *`type-specifier`* *`specifier-qualifier-list`*opt \
+ *`type-qualifier`* *`specifier-qualifier-list`*opt
-*struct-declarator-list*:
- *struct-declarator*
- *struct-declarator-list* **,** *struct-declarator*
+*`struct-declarator-list`*:\
+ *`struct-declarator`*\
+ *`struct-declarator-list`* **`,`** *`struct-declarator`*
A variable with **`union`** type stores one of the values defined by that type. The same rules govern structure and union declarations. Unions can also have bit fields.
-Members of unions cannot have an incomplete type, type **`void`**, or function type. Therefore members cannot be an instance of the union but can be pointers to the union type being declared.
+Members of unions can't have an incomplete type, type **`void`**, or function type. Therefore members can't be an instance of the union but can be pointers to the union type being declared.
-A union type declaration is a template only. Memory is not reserved until the variable is declared.
+A union type declaration is a template only. Memory isn't reserved until the variable is declared.
> [!NOTE]
> If a union of two types is declared and one value is stored, but the union is accessed with the other type, the results are unreliable. For example, a union of **`float`** and **`int`** is declared. A **`float`** value is stored, but the program later accesses the value as an **`int`**. In such a situation, the value would depend on the internal storage of **`float`** values. The integer value would not be reliable.
@@ -75,13 +75,13 @@ The `screen` array contains 2,000 elements. Each element of the array is an indi
**Microsoft Specific**
-Nested unions can be declared anonymously when they are members of another structure or union. This is an example of a nameless union:
+Nested unions can be declared anonymously when they're members of another structure or union. Here's an example of a nameless union:
```C
struct str
{
int a, b;
- union / * Unnamed union */
+ union /* Unnamed union */
{
char c[4];
long l;
@@ -95,7 +95,7 @@ struct str
my_str.l == 0L; /* A reference to a field in the my_str union */
```
-Unions are often nested within a structure that includes a field giving the type of data contained in the union at any particular time. This is an example of a declaration for such a union:
+Unions are often nested within a structure that includes a field giving the type of data contained in the union at any particular time. Here's an example of a declaration for such a union:
```C
struct x
diff --git a/docs/c-language/while-statement-c.md b/docs/c-language/while-statement-c.md
index 462f57070c..5035e2c114 100644
--- a/docs/c-language/while-statement-c.md
+++ b/docs/c-language/while-statement-c.md
@@ -6,26 +6,26 @@ f1_keywords: ["while"]
helpviewer_keywords: ["while keyword [C]", "while keyword [C], syntax"]
ms.assetid: d0c970b8-12a9-4827-afb2-a051111834b7
---
-# while Statement (C)
+# `while` Statement (C)
The **`while`** statement lets you repeat a statement until a specified expression becomes false.
## Syntax
-*iteration-statement*:
- **while (** *expression* **)** *statement*
+*`iteration-statement`*:\
+ **`while (`** *`expression`* **`)`** *`statement`*
-The *expression* must have arithmetic or pointer type. Execution proceeds as follows:
+The *`expression`* must have arithmetic or pointer type. Execution proceeds as follows:
-1. The *expression* is evaluated.
+1. The *`expression`* is evaluated.
-1. If *expression* is initially false, the body of the **`while`** statement is never executed, and control passes from the **`while`** statement to the next statement in the program.
+1. If *`expression`* is initially false, the body of the **`while`** statement is never executed, and control passes from the **`while`** statement to the next statement in the program.
- If *expression* is true (nonzero), the body of the statement is executed and the process is repeated beginning at step 1.
+ If *`expression`* is true (nonzero), the body of the statement is executed and the process is repeated beginning at step 1.
The **`while`** statement can also terminate when a **`break`**, **`goto`**, or **`return`** within the statement body is executed. Use the **`continue`** statement to terminate an iteration without exiting the **`while`** loop. The **`continue`** statement passes control to the next iteration of the **`while`** statement.
-This is an example of the **`while`** statement:
+Here's an example of the **`while`** statement:
```C
while ( i >= 0 )
@@ -35,8 +35,8 @@ while ( i >= 0 )
}
```
-This example copies characters from `string2` to `string1`. If `i` is greater than or equal to 0, `string2[i]` is assigned to `string1[i]` and `i` is decremented. When `i` reaches or falls below 0, execution of the **`while`** statement terminates.
+This example copies characters from `string2` to `string1`. If `i` is greater than or equal to 0, then `string2[i]` is assigned to `string1[i]` and `i` is decremented. When `i` reaches or falls below 0, execution of the **`while`** statement terminates.
## See also
-[while Statement (C++)](../cpp/while-statement-cpp.md)
+[`while` Statement (C++)](../cpp/while-statement-cpp.md)
diff --git a/docs/c-runtime-library/buffer-manipulation.md b/docs/c-runtime-library/buffer-manipulation.md
index 21c4336737..7fce41ba6c 100644
--- a/docs/c-runtime-library/buffer-manipulation.md
+++ b/docs/c-runtime-library/buffer-manipulation.md
@@ -1,9 +1,8 @@
---
-description: "Learn more about: Buffer manipulation"
title: "Buffer manipulation"
-ms.date: "04/04/2018"
+description: "Learn more about: Buffer manipulation"
+ms.date: 04/04/2018
helpviewer_keywords: ["buffers, manipulation routines", "buffers"]
-ms.assetid: 164f4860-ce66-412c-8291-396fbd70f03e
---
# Buffer manipulation
@@ -13,17 +12,17 @@ Use these routines to work with areas of memory on a byte-by-byte basis.
| Routine | Use |
|---|---|
-| [`_memccpy`](./reference/memccpy.md) | Copy characters from one buffer to another until given character or given number of characters has been copied |
-| [`memchr`, `wmemchr`](./reference/memchr-wmemchr.md) | Return pointer to first occurrence, within specified number of characters, of given character in buffer |
-| [`memcmp`, `wmemcmp`](./reference/memcmp-wmemcmp.md) | Compare specified number of characters from two buffers |
-| [`memcpy`, `wmemcpy`](./reference/memcpy-wmemcpy.md), [`memcpy_s`, `wmemcpy_s`](./reference/memcpy-s-wmemcpy-s.md) | Copy specified number of characters from one buffer to another |
-| [`_memicmp`, `_memicmp_l`](./reference/memicmp-memicmp-l.md) | Compare specified number of characters from two buffers without regard to case |
-| [`memmove`, `wmemmove`](./reference/memmove-wmemmove.md),[`memmove_s`, `wmemmove_s`](./reference/memmove-s-wmemmove-s.md) | Copy specified number of characters from one buffer to another |
-| [`memset`, `wmemset`](./reference/memset-wmemset.md) | Use given character to initialize specified number of bytes in the buffer |
-| [`_swab`](./reference/swab.md) | Swap bytes of data and store them at specified location |
+| [`_memccpy`](reference/memccpy.md) | Copy characters from one buffer to another until given character or given number of characters has been copied |
+| [`memchr`, `wmemchr`](reference/memchr-wmemchr.md) | Return pointer to first occurrence, within specified number of characters, of given character in buffer |
+| [`memcmp`, `wmemcmp`](reference/memcmp-wmemcmp.md) | Compare specified number of characters from two buffers |
+| [`memcpy`, `wmemcpy`](reference/memcpy-wmemcpy.md), [`memcpy_s`, `wmemcpy_s`](reference/memcpy-s-wmemcpy-s.md) | Copy specified number of characters from one buffer to another |
+| [`_memicmp`, `_memicmp_l`](reference/memicmp-memicmp-l.md) | Compare specified number of characters from two buffers without regard to case |
+| [`memmove`, `wmemmove`](reference/memmove-wmemmove.md), [`memmove_s`, `wmemmove_s`](reference/memmove-s-wmemmove-s.md) | Copy specified number of characters from one buffer to another |
+| [`memset`, `wmemset`](reference/memset-wmemset.md) | Use given character to initialize specified number of bytes in the buffer |
+| [`_swab`](reference/swab.md) | Swap bytes of data and store them at specified location |
When the source and target areas overlap, only `memmove` is guaranteed to copy the full source properly.
## See also
-[Universal C runtime routines by category](./run-time-routines-by-category.md)
+[Universal C runtime routines by category](run-time-routines-by-category.md)
diff --git a/docs/c-runtime-library/byte-and-wide-streams.md b/docs/c-runtime-library/byte-and-wide-streams.md
index 634f4df7b8..8ef801bf6c 100644
--- a/docs/c-runtime-library/byte-and-wide-streams.md
+++ b/docs/c-runtime-library/byte-and-wide-streams.md
@@ -4,7 +4,6 @@ description: "An overview of byte streams in the Microsoft C runtime library."
ms.date: "11/04/2016"
ms.topic: "conceptual"
helpviewer_keywords: ["byte streams", "wide streams"]
-ms.assetid: 61ef0587-4cbc-4eb8-aae5-4c298dbbc6f9
---
# Byte and wide streams
@@ -12,7 +11,7 @@ A byte stream treats a file as a sequence of bytes. Within the program, the stre
By contrast, a wide stream treats a file as a sequence of generalized multibyte characters, which can have a broad range of encoding rules. (Text and binary files are still read and written as previously described.) Within the program, the stream looks like the corresponding sequence of wide characters. Conversions between the two representations occur within the Standard C Library. The conversion rules can, in principle, be altered by a call to [`setlocale`](./reference/setlocale-wsetlocale.md) that alters the category `LC_CTYPE`. Each wide stream determines its conversion rules at the time it becomes wide oriented, and retains these rules even if the category `LC_CTYPE` later changes.
-Positioning within a wide stream suffers the same limitations as for text steams. Moreover, the file-position indicator may well have to deal with a state-dependent encoding. Typically, it includes both a byte offset within the stream and an object of type `mbstate_t`. Thus, the only reliable way to obtain a file position within a wide stream is by calling [`fgetpos`](./reference/fgetpos.md), and the only reliable way to restore a position obtained this way is by calling [`fsetpos`](./reference/fsetpos.md).
+Positioning within a wide stream suffers the same limitations as for text streams. Moreover, the file-position indicator may well have to deal with a state-dependent encoding. Typically, it includes both a byte offset within the stream and an object of type `mbstate_t`. Thus, the only reliable way to obtain a file position within a wide stream is by calling [`fgetpos`](./reference/fgetpos.md), and the only reliable way to restore a position obtained this way is by calling [`fsetpos`](./reference/fsetpos.md).
## See also
diff --git a/docs/c-runtime-library/compatibility.md b/docs/c-runtime-library/compatibility.md
index e1c99c1d61..45f753bf02 100644
--- a/docs/c-runtime-library/compatibility.md
+++ b/docs/c-runtime-library/compatibility.md
@@ -33,6 +33,6 @@ Except as noted within the documentation for specific functions, the UCRT is com
| [UWP apps, the Windows Runtime, and the C runtime](./windows-store-apps-the-windows-runtime-and-the-c-run-time.md) | Describes when UCRT routines aren't compatible with Universal Windows apps or Microsoft Store apps. |
| [ANSI C conformance](./ansi-c-compliance.md) | Describes standard-conforming names in the UCRT. |
| [UNIX](./unix.md) | Provides guidelines for porting programs to UNIX. |
-| [Windows platforms (CRT)](./windows-platforms-crt.md) | Lists the operating systems that are the CRT supports. |
+| [Windows platforms (CRT)](./windows-platforms-crt.md) | Lists the operating systems that CRT supports. |
| [Backward compatibility](./backward-compatibility.md) | Describes how to map old CRT names to the new ones. |
| [C runtime (CRT) and C++ Standard Library (STL) `.lib` files](./crt-library-features.md) | Provides an overview of the CRT library (.lib) files and the associated compiler options. |
diff --git a/docs/c-runtime-library/control-flags.md b/docs/c-runtime-library/control-flags.md
index 69eb347a57..5ba1384bfc 100644
--- a/docs/c-runtime-library/control-flags.md
+++ b/docs/c-runtime-library/control-flags.md
@@ -8,7 +8,7 @@ ms.assetid: 8dbd24a5-0633-42d1-9771-776db338465f
---
# Control flags
-The debug version of the Microsoft C run-time library uses the following flags to control the heap allocation and reporting process. For more information, see [CRT debugging techniques](/visualstudio/debugger/crt-debugging-techniques).
+The debug version of the Microsoft C run-time library uses the following flags to control the heap allocation and reporting process. For more information, see [CRT debugging techniques](./crt-debugging-techniques.md).
| Flag | Description |
|---|---|
diff --git a/docs/c-runtime-library/crt-debug-heap-details.md b/docs/c-runtime-library/crt-debug-heap-details.md
new file mode 100644
index 0000000000..5a0d180c7d
--- /dev/null
+++ b/docs/c-runtime-library/crt-debug-heap-details.md
@@ -0,0 +1,325 @@
+---
+title: CRT debug heap details
+description: The debug heap provides powerful tools to help solve memory allocation problems. Learn about the tools and how they help with problems such as leaks and overruns.
+ms.date: 02/03/2023
+helpviewer_keywords:
+ - "debug heap, accessing"
+ - "heap functions"
+ - "_CRTDBG_CHECK_ALWAYS_DF macro"
+ - "_CrtMemDumpStatistics function"
+ - "debugging [C++], debug heap"
+ - "_CRT_BLOCK macro"
+ - "DBGINT.H file"
+ - "_CrtMemDumpAllObjectsSince function"
+ - "_crtBreakAlloc global variable"
+ - "_CrtMemState function"
+ - "_CLIENT_BLOCK macro"
+ - "_FREE_BLOCK block"
+ - "_CrtMemBlockHeader function"
+ - "heap state reporting functions"
+ - "_CRTDBG_ALLOC_MEM_DF macro"
+ - "_CrtSetBreakAlloc function"
+ - "memory blocks, allocation types on debug heap"
+ - "debugging [C++], CRT debug support"
+ - "debug heap, tracking heap allocation requests"
+ - "memory allocation, debug heap"
+ - "_NORMAL_BLOCK block"
+ - "crtBreakAlloc global variable"
+ - "_CrtDoForAllClientObjects function"
+ - "new operator, using debug heap from C++"
+ - "_CrtSetDumpClient function"
+ - "debugging [CRT], heap-related problems"
+ - "debug heap, solving memory allocation problems"
+ - "_CrtMemCheckpoint function"
+ - "debug builds, linking to debug heap"
+ - "_IGNORE_BLOCK block"
+ - "_crtDbgFlag function"
+ - "client blocks, specifying subtypes"
+ - "memory leaks, tracking"
+ - "_CrtSetDbgFlag function"
+ - "nBlockUse method"
+ - "memory leaks, CRT debug library functions"
+ - "_CRTDBG_DELAY_FREE_MEM_DF macro"
+ - "allocation request numbers"
+ - "_CRTDBG_LEAK_CHECK_DF macro"
+ - "debug heap"
+ - "memory, debugging"
+ - "_CrtReportBlockType function"
+ - "_CrtDumpMemoryLeaks function"
+ - "_CrtCheckMemory function"
+ - "debug heap, CRT"
+ - "memory blocks, free"
+ - "_BLOCK_TYPE macro"
+ - "debug heap, memory blocks"
+ - "heap allocation, debug"
+ - "debugging memory leaks"
+ - "_BLOCK_SUBTYPE macro"
+ - "debug heap, using from C++"
+ - "_CrtMemDifference function"
+ - "heap allocation, tracking requests"
+ - "debugging [Visual Studio], debug heap"
+ - "delete operator, using debug heap from C++"
+ - "blocks, types of on the debug heap"
+ - "_CRTDBG_CHECK_CRT_DF macro"
+ - "debug heap, reporting functions"
+---
+# CRT debug heap details
+
+The CRT debug heap and related functions provide many ways to track and debug memory management issues in your code. You can use it to find buffer overruns, and to track and report on memory allocations and memory state. It also has support for creating your own debug allocation functions for your unique app needs.
+
+## Find buffer overruns with debug heap
+
+Two of the most common and intractable problems that programmers encounter are overwriting the end of an allocated buffer and memory leaks (failing to free allocations after they're no longer needed). The debug heap provides powerful tools to solve memory allocation problems of this kind.
+
+The Debug versions of the heap functions call the standard or base versions used in Release builds. When you request a memory block, the debug heap manager allocates from the base heap a slightly larger block of memory than you requested and returns a pointer to your portion of that block. For example, suppose your application contains the call: `malloc( 10 )`. In a Release build, [`malloc`](./reference/malloc.md) would call the base heap allocation routine requesting an allocation of 10 bytes. In a Debug build, however, `malloc` would call [`_malloc_dbg`](./reference/malloc-dbg.md), which would then call the base heap allocation routine requesting an allocation of 10 bytes plus approximately 36 bytes of extra memory. All the resulting memory blocks in the debug heap are connected in a single linked list, ordered according to when they were allocated.
+
+The extra memory allocated by the debug heap routines is used for bookkeeping information. It has pointers that link debug memory blocks together, and small buffers on either side of your data to catch overwrites of the allocated region.
+
+Currently, the block header structure used to store the debug heap's bookkeeping information is declared in the `` header and defined in the `` CRT source file. Conceptually, it's similar to this structure:
+
+```cpp
+typedef struct _CrtMemBlockHeader
+{
+// Pointer to the block allocated just before this one:
+ _CrtMemBlockHeader* _block_header_next;
+// Pointer to the block allocated just after this one:
+ _CrtMemBlockHeader* _block_header_prev;
+ char const* _file_name;
+ int _line_number;
+
+ int _block_use; // Type of block
+ size_t _data_size; // Size of user block
+
+ long _request_number; // Allocation number
+// Buffer just before (lower than) the user's memory:
+ unsigned char _gap[no_mans_land_size];
+
+ // Followed by:
+ // unsigned char _data[_data_size];
+ // unsigned char _another_gap[no_mans_land_size];
+} _CrtMemBlockHeader;
+```
+
+The `no_mans_land` buffers on either side of the user data area of the block are currently 4 bytes in size, and are filled with a known byte value used by the debug heap routines to verify that the limits of the user's memory block haven't been overwritten. The debug heap also fills new memory blocks with a known value. If you elect to keep freed blocks in the heap's linked list, these freed blocks are also filled with a known value. Currently, the actual byte values used are as follows:
+
+|Code |Description |
+|---------|---------|
+|`no_mans_land` (0xFD) | The "no_mans_land" buffers on either side of the memory used by an application are currently filled with 0xFD. |
+|Freed blocks (0xDD) | The freed blocks kept unused in the debug heap's linked list when the `_CRTDBG_DELAY_FREE_MEM_DF` flag is set are currently filled with 0xDD. |
+|New objects (0xCD) | New objects are filled with 0xCD when they're allocated.|
+
+## Types of blocks on the debug heap
+
+Every memory block in the debug heap is assigned to one of five allocation types. These types are tracked and reported differently for purposes of leak detection and state reporting. You can specify a block's type by allocating it using a direct call to one of the debug heap allocation functions such as [`_malloc_dbg`](./reference/malloc-dbg.md). The five types of memory blocks in the debug heap (set in the `nBlockUse` member of the `_CrtMemBlockHeader` structure) are as follows:
+
+`_NORMAL_BLOCK`\
+A call to [`malloc`](./reference/malloc.md) or [`calloc`](./reference/calloc.md) creates a Normal block. If you intend to use Normal blocks only, and have no need for Client blocks, you may want to define [`_CRTDBG_MAP_ALLOC`](./crtdbg-map-alloc.md). `_CRTDBG_MAP_ALLOC` causes all heap allocation calls to be mapped to their debug equivalents in Debug builds. It allows storage of file name and line number information about each allocation call in the corresponding block header.
+
+`_CRT_BLOCK`\
+The memory blocks allocated internally by many run-time library functions are marked as CRT blocks so they can be handled separately. As a result, leak detection and other operations may remain unaffected by them. An allocation must never allocate, reallocate, or free any block of CRT type.
+
+`_CLIENT_BLOCK`\
+An application can keep special track of a given group of allocations for debugging purposes by allocating them as this type of memory block, using explicit calls to the debug heap functions. MFC, for example, allocates all `CObject` objects as Client blocks; other applications might keep different memory objects in Client blocks. Subtypes of Client blocks can also be specified for greater tracking granularity. To specify subtypes of Client blocks, shift the number left by 16 bits and `OR` it with `_CLIENT_BLOCK`. For example:
+
+```cpp
+#define MYSUBTYPE 4
+freedbg(pbData, _CLIENT_BLOCK|(MYSUBTYPE<<16));
+```
+
+A client-supplied hook function for dumping the objects stored in Client blocks can be installed using [`_CrtSetDumpClient`](./reference/crtsetdumpclient.md), and will then be called whenever a Client block is dumped by a debug function. Also, [`_CrtDoForAllClientObjects`](./reference/crtdoforallclientobjects.md) can be used to call a given function supplied by the application for every Client block in the debug heap.
+
+`_FREE_BLOCK`\
+Normally, blocks that are freed are removed from the list. To check that freed memory isn't written to, or to simulate low memory conditions, you can keep freed blocks on the linked list, marked as Free, and filled with a known byte value (currently 0xDD).
+
+`_IGNORE_BLOCK`\
+It's possible to turn off the debug heap operations for some interval. During this time, memory blocks are kept on the list, but are marked as Ignore blocks.
+
+To determine the type and subtype of a given block, use the function [`_CrtReportBlockType`](./reference/crtreportblocktype.md) and the macros `_BLOCK_TYPE` and `_BLOCK_SUBTYPE`. The macros are defined in `` as follows:
+
+```cpp
+#define _BLOCK_TYPE(block) (block & 0xFFFF)
+#define _BLOCK_SUBTYPE(block) (block >> 16 & 0xFFFF)
+```
+
+## Check for heap integrity and memory leaks
+
+Many of the debug heap's features must be accessed from within your code. The following section describes some of the features and how to use them.
+
+`_CrtCheckMemory`\
+You can use a call to [`_CrtCheckMemory`](./reference/crtcheckmemory.md), for example, to check the heap's integrity at any point. This function inspects every memory block in the heap. It verifies that the memory block header information is valid, and confirms that the buffers haven't been modified.
+
+`_CrtSetDbgFlag`\
+You can control how the debug heap keeps track of allocations using an internal flag, [`_crtDbgFlag`](./crtdbgflag.md), which can be read and set using the [`_CrtSetDbgFlag`](./reference/crtsetdbgflag.md) function. By changing this flag, you can instruct the debug heap to check for memory leaks when the program exits and report any leaks that are detected. Similarly, you can tell the heap to leave freed memory blocks in the linked list, to simulate low-memory situations. When the heap is checked, these freed blocks are inspected in their entirety to ensure that they haven't been disturbed.
+
+The `_crtDbgFlag` flag contains the following bit fields:
+
+| Bit field | Default value | Description |
+|---|---|---|
+| `_CRTDBG_ALLOC_MEM_DF` | On | Turns on debug allocation. When this bit is off, allocations remain chained together, but their block type is `_IGNORE_BLOCK`. |
+| `_CRTDBG_DELAY_FREE_MEM_DF` | Off | Prevents memory from actually being freed, as for simulating low-memory conditions. When this bit is on, freed blocks are kept in the debug heap's linked list but are marked as `_FREE_BLOCK` and filled with a special byte value. |
+| `_CRTDBG_CHECK_ALWAYS_DF` | Off | Causes `_CrtCheckMemory` to be called at every allocation and deallocation. Execution is slower, but it catches errors quickly. |
+| `_CRTDBG_CHECK_CRT_DF` | Off | Causes blocks marked as type `_CRT_BLOCK` to be included in leak-detection and state-difference operations. When this bit is off, the memory used internally by the run-time library is ignored during such operations. |
+| `_CRTDBG_LEAK_CHECK_DF` | Off | Causes leak checking to be performed at program exit via a call to `_CrtDumpMemoryLeaks`. An error report is generated if the application has failed to free all the memory that it allocated. |
+
+## Configure the debug heap
+
+All calls to heap functions such as `malloc`, `free`, `calloc`, `realloc`, `new`, and `delete` resolve to debug versions of those functions that operate in the debug heap. When you free a memory block, the debug heap automatically checks the integrity of the buffers on either side of your allocated area and issues an error report if overwriting has occurred.
+
+### To use the debug heap
+
+Link the debug build of your application with a debug version of the C runtime library.
+
+### To change one or more `_crtDbgFlag` bit fields and create a new state for the flag
+
+1. Call `_CrtSetDbgFlag` with the `newFlag` parameter set to `_CRTDBG_REPORT_FLAG` (to obtain the current `_crtDbgFlag` state) and store the returned value in a temporary variable.
+
+1. Turn on any bits by using a bitwise **`|`** operator ("or") on the temporary variable with the corresponding bitmasks (represented in the application code by manifest constants).
+
+1. Turn off the other bits by using a bitwise **`&`** operator ("and") on the variable with a bitwise **`~`** operator ("not" or complement) of the appropriate bitmasks.
+
+1. Call `_CrtSetDbgFlag` with the `newFlag` parameter set to the value stored in the temporary variable to create the new state for `_crtDbgFlag`.
+
+ For example, the following lines of code enable automatic leak detection and disable checks for blocks of type `_CRT_BLOCK`:
+
+ ```cpp
+ // Get current flag
+ int tmpFlag = _CrtSetDbgFlag( _CRTDBG_REPORT_FLAG );
+
+ // Turn on leak-checking bit.
+ tmpFlag |= _CRTDBG_LEAK_CHECK_DF;
+
+ // Turn off CRT block checking bit.
+ tmpFlag &= ~_CRTDBG_CHECK_CRT_DF;
+
+ // Set flag to the new value.
+ _CrtSetDbgFlag( tmpFlag );
+ ```
+
+## `new`, `delete`, and `_CLIENT_BLOCK` allocations in the C++ debug heap
+
+The debug versions of the C run-time library contain debug versions of the C++ `new` and `delete` operators. If you use the `_CLIENT_BLOCK` allocation type, you must call the debug version of the `new` operator directly or create macros that replace the `new` operator in debug mode, as shown in the following example:
+
+```cpp
+/* MyDbgNew.h
+ Defines global operator new to allocate from
+ client blocks
+*/
+
+#ifdef _DEBUG
+ #define DEBUG_CLIENTBLOCK new( _CLIENT_BLOCK, __FILE__, __LINE__)
+#else
+ #define DEBUG_CLIENTBLOCK
+#endif // _DEBUG
+
+/* MyApp.cpp
+ Use a default workspace for a Console Application to
+ * build a Debug version of this code
+*/
+
+#include "crtdbg.h"
+#include "mydbgnew.h"
+
+#ifdef _DEBUG
+#define new DEBUG_CLIENTBLOCK
+#endif
+
+int main( ) {
+ char *p1;
+ p1 = new char[40];
+ _CrtMemDumpAllObjectsSince( NULL );
+}
+```
+
+The Debug version of the `delete` operator works with all block types and requires no changes in your program when you compile a Release version.
+
+## Heap state reporting functions
+
+To capture a summary snapshot of the state of the heap at a given time, use the `_CrtMemState` structure defined in ``:
+
+```cpp
+typedef struct _CrtMemState
+{
+ // Pointer to the most recently allocated block:
+ struct _CrtMemBlockHeader * pBlockHeader;
+ // A counter for each of the 5 types of block:
+ size_t lCounts[_MAX_BLOCKS];
+ // Total bytes allocated in each block type:
+ size_t lSizes[_MAX_BLOCKS];
+ // The most bytes allocated at a time up to now:
+ size_t lHighWaterCount;
+ // The total bytes allocated at present:
+ size_t lTotalCount;
+} _CrtMemState;
+```
+
+This structure saves a pointer to the first (most recently allocated) block in the debug heap's linked list. Then, in two arrays, it records how many of each type of memory block (`_NORMAL_BLOCK`, `_CLIENT_BLOCK`, `_FREE_BLOCK`, and so on) are in the list and the number of bytes allocated in each type of block. Finally, it records the highest number of bytes allocated in the heap as a whole up to that point, and the number of bytes currently allocated.
+
+## Other CRT reporting functions
+
+The following functions report the state and contents of the heap, and use the information to help detect memory leaks and other problems.
+
+| Function | Description |
+|---|---|
+| [`_CrtMemCheckpoint`](./reference/crtmemcheckpoint.md) | Saves a snapshot of the heap in a `_CrtMemState` structure supplied by the application. |
+| [`_CrtMemDifference`](./reference/crtmemdifference.md) | Compares two memory state structures, saves the difference between them in a third state structure, and returns TRUE if the two states are different. |
+| [`_CrtMemDumpStatistics`](./reference/crtmemdumpstatistics.md) | Dumps a given `_CrtMemState` structure. The structure may contain a snapshot of the state of the debug heap at a given moment or the difference between two snapshots. |
+| [`_CrtMemDumpAllObjectsSince`](./reference/crtmemdumpallobjectssince.md) | Dumps information about all objects allocated since a given snapshot was taken of the heap or from the start of execution. Every time it dumps a `_CLIENT_BLOCK` block, it calls a hook function supplied by the application, if one has been installed using `_CrtSetDumpClient`. |
+| [`_CrtDumpMemoryLeaks`](./reference/crtdumpmemoryleaks.md) | Determines whether any memory leaks occurred since the start of program execution and, if so, dumps all allocated objects. Every time `_CrtDumpMemoryLeaks` dumps a `_CLIENT_BLOCK` block, it calls a hook function supplied by the application, if one has been installed using `_CrtSetDumpClient`. |
+
+## Track heap allocation requests
+
+Knowing the source file name and line number of an assert or reporting macro is often useful in locating the cause of a problem. The same isn't as likely to be true of heap allocation functions. While you can insert macros at many appropriate points in an application's logic tree, an allocation is often buried in a function that's called from many different places at many different times. The question isn't what line of code made a bad allocation. Instead, it's which one of the thousands of allocations made by that line of code was bad, and why.
+
+### Unique allocation request numbers and `_crtBreakAlloc`
+
+There's a simple way to identify the specific heap allocation call that went bad. It takes advantage of the unique allocation request number associated with each block in the debug heap. When information about a block is reported by one of the dump functions, this allocation request number is enclosed in braces. For example, `{36}`.
+
+Once you know the allocation request number of an improperly allocated block, you can pass this number to [`_CrtSetBreakAlloc`](./reference/crtsetbreakalloc.md) to create a breakpoint. Execution will break just before allocating the block and you can backtrack to determine what routine was responsible for the bad call. To avoid recompiling, you can accomplish the same thing in the debugger by setting `_crtBreakAlloc` to the allocation request number you're interested in.
+
+### Creating debug versions of your allocation routines
+
+A more complex approach is to create Debug versions of your own allocation routines, comparable to the `_dbg` versions of the [heap allocation functions](./debug-versions-of-heap-allocation-functions.md). You can then pass source file and line number arguments through to the underlying heap allocation routines, and you'll immediately be able to see where a bad allocation originated.
+
+For example, suppose your application contains a commonly used routine similar to the following example:
+
+```cpp
+int addNewRecord(struct RecStruct * prevRecord,
+ int recType, int recAccess)
+{
+ // ...code omitted through actual allocation...
+ if ((newRec = malloc(recSize)) == NULL)
+ // ... rest of routine omitted too ...
+}
+```
+
+In a header file, you could add code such as the following example:
+
+```cpp
+#ifdef _DEBUG
+#define addNewRecord(p, t, a) \
+ addNewRecord(p, t, a, __FILE__, __LINE__)
+#endif
+```
+
+Next, you could change the allocation in your record-creation routine as follows:
+
+```cpp
+int addNewRecord(struct RecStruct *prevRecord,
+ int recType, int recAccess
+#ifdef _DEBUG
+ , const char *srcFile, int srcLine
+#endif
+ )
+{
+ /* ... code omitted through actual allocation ... */
+ if ((newRec = _malloc_dbg(recSize, _NORMAL_BLOCK,
+ srcFile, scrLine)) == NULL)
+ /* ... rest of routine omitted too ... */
+}
+```
+
+Now the source file name and line number where `addNewRecord` was called will be stored in each resulting block allocated in the debug heap and will be reported when that block is examined.
+
+## See also
+
+[Debugging Native Code](/visualstudio/debugger/debugging-native-code)
diff --git a/docs/c-runtime-library/crt-debugging-techniques.md b/docs/c-runtime-library/crt-debugging-techniques.md
new file mode 100644
index 0000000000..39d625f0e1
--- /dev/null
+++ b/docs/c-runtime-library/crt-debugging-techniques.md
@@ -0,0 +1,173 @@
+---
+title: CRT debugging techniques
+description: There are various techniques you can use to debug a program that uses the C run-time (CRT) library. Use this article and its links to learn about such techniques.
+ms.custom: SEO-VS-2020
+ms.date: 02/03/2023
+f1_keywords:
+ - "c.runtime.debugging"
+helpviewer_keywords:
+ - "debugging [CRT]"
+ - "CRT, debugging"
+ - "debugging [C++], CRT debug support"
+---
+# CRT debugging techniques
+
+When you debug a program that uses the C run-time library, these debugging techniques might be useful.
+
+## CRT debug library use
+
+The C runtime (CRT) library provides extensive debugging support. To use one of the CRT debug libraries, you must link with [`/DEBUG`](/cpp/build/reference/debug-generate-debug-info) and compile with [`/MDd`, `/MTd`, or `/LDd`](../build/reference/md-mt-ld-use-run-time-library.md).
+
+The main definitions and macros for CRT debugging can be found in the`` header file.
+
+The functions in the CRT debug libraries are compiled with debug information ([/Z7, /Zd, /Zi, /ZI (Debug Information Format)](../build/reference/z7-zi-zi-debug-information-format.md)) and without optimization. Some functions contain assertions to verify parameters that are passed to them, and source code is provided. With this source code, you can step into CRT functions to confirm that the functions are working as you expect and check for bad parameters or memory states. (Some CRT technology is proprietary and doesn't provide source code for exception handling, floating point, and a few other routines.)
+
+For more information on the various run-time libraries you can use, see [C Run-Time Libraries](./crt-library-features.md).
+
+## Macros for reporting
+
+For debugging, you can use the `_RPTn` and `_RPTFn` macros, defined in``, to replace the use of `printf` statements. You don't need to enclose them in `#ifdef` directives, because they automatically disappear in your release build when `_DEBUG` isn't defined.
+
+| Macro | Description |
+|---|---|
+| `_RPT0`, `_RPT1`, `_RPT2`, `_RPT3`, `_RPT4` | Outputs a message string and zero to four arguments. For `_RPT1` through `_RPT4`, the message string serves as a printf-style formatting string for the arguments. |
+| `_RPTF0`, `_RPTF1`, `_RPTF2`, `_RPTF3`, `_RPTF4` | Same as `_RPTn`, but these macros also output the file name and line number where the macro is located. |
+
+Consider the following example:
+
+```cpp
+#ifdef _DEBUG
+ if ( someVar > MAX_SOMEVAR )
+ printf( "OVERFLOW! In NameOfThisFunc( ),
+ someVar=%d, otherVar=%d.\n",
+ someVar, otherVar );
+#endif
+```
+
+This code outputs the values of `someVar` and `otherVar` to `stdout`. You can use the following call to `_RPTF2` to report these same values and, additionally, the file name and line number:
+
+```cpp
+if (someVar > MAX_SOMEVAR) _RPTF2(_CRT_WARN, "In NameOfThisFunc( ), someVar= %d, otherVar= %d\n", someVar, otherVar );
+```
+
+Some applications may need debug reporting that the macros supplied with the C run-time library don't provide. For these cases, you can write a macro designed specifically to fit your own requirements. In one of your header files, for example, you could include code like the following to define a macro called `ALERT_IF2`:
+
+```cpp
+#ifndef _DEBUG /* For RELEASE builds */
+#define ALERT_IF2(expr, msg, arg1, arg2) do {} while (0)
+#else /* For DEBUG builds */
+#define ALERT_IF2(expr, msg, arg1, arg2) \
+ do { \
+ if ((expr) && \
+ (1 == _CrtDbgReport(_CRT_ERROR, \
+ __FILE__, __LINE__, msg, arg1, arg2))) \
+ _CrtDbgBreak( ); \
+ } while (0)
+#endif
+```
+
+One call to `ALERT_IF2` could do all the functions of the `printf` code:
+
+```cpp
+ALERT_IF2(someVar > MAX_SOMEVAR, "OVERFLOW! In NameOfThisFunc( ),
+someVar=%d, otherVar=%d.\n", someVar, otherVar );
+```
+
+You can easily change a custom macro to report more or less information to different destinations. This approach is useful as your debugging requirements evolve.
+
+## Debug hook function writing
+
+You can write several kinds of custom debug hook functions that allow you to insert your code into some predefined points inside the debugger's normal processing.
+
+### Client block hook functions
+
+If you want to validate or report the contents of the data stored in `_CLIENT_BLOCK` blocks, you can write a function specifically for this purpose. The function that you write must have a prototype similar to the following, as defined in``:
+
+```cpp
+void YourClientDump(void *, size_t)
+```
+
+In other words, your hook function should accept a `void` pointer to the beginning of the allocation block, together with a `size_t` type value indicating the size of the allocation, and return `void`. Otherwise, its contents are up to you.
+
+Once you've installed your hook function using [_CrtSetDumpClient](./reference/crtsetdumpclient.md), it will be called every time a `_CLIENT_BLOCK` block is dumped. You can then use [_CrtReportBlockType](./reference/crtreportblocktype.md) to get information on the type or subtype of dumped blocks.
+
+The pointer to your function that you pass to `_CrtSetDumpClient` is of type `_CRT_DUMP_CLIENT`, as defined in``:
+
+```cpp
+typedef void (__cdecl *_CRT_DUMP_CLIENT)
+ (void *, size_t);
+```
+
+### Allocation hook functions
+
+An allocation hook function, installed using [`_CrtSetAllocHook`](./reference/crtsetallochook.md), is called every time memory is allocated, reallocated, or freed. You can use this type of hook for many different purposes. Use it to test how an application handles insufficient memory situations, such as to examine allocation patterns, or log allocation information for later analysis.
+
+> [!NOTE]
+> Be aware of the restriction about using C runtime library functions in an allocation hook function, described in [Allocation hooks and crt memory allocations](#allocation-hooks-and-crt-memory-allocations).
+
+An allocation hook function should have a prototype like the following example:
+
+```cpp
+int YourAllocHook(int nAllocType, void *pvData,
+ size_t nSize, int nBlockUse, long lRequest,
+ const unsigned char * szFileName, int nLine )
+```
+
+The pointer that you pass to [`_CrtSetAllocHook`](./reference/crtsetallochook.md) is of type `_CRT_ALLOC_HOOK`, as defined in``:
+
+```cpp
+typedef int (__cdecl * _CRT_ALLOC_HOOK)
+ (int, void *, size_t, int, long, const unsigned char *, int);
+```
+
+When the run-time library calls your hook, the *`nAllocType`* argument indicates what allocation operation is about to be made (`_HOOK_ALLOC`, `_HOOK_REALLOC`, or `_HOOK_FREE`). In a free or in a reallocation, `pvData` has a pointer to the user article of the block about to be freed. However for an allocation, this pointer is null, because the allocation hasn't occurred. The remaining arguments contain the size of the allocation, its block type, a sequential request number, and a pointer to the file name. If available, the arguments also include the line number in which the allocation was made. After the hook function performs whatever analysis and other tasks its author wants, it must return either `TRUE`, indicating that the allocation operation can continue, or `FALSE`, indicating that the operation should fail. A simple hook of this type might check the amount of memory allocated so far, and return `FALSE` if that amount exceeded a small limit. The application would then experience the kind of allocation errors that would normally occur only when available memory was low. More complex hooks might keep track of allocation patterns, analyze memory use, or report when specific situations occur.
+
+### Allocation hooks and CRT memory allocations
+
+An important restriction on allocation hook functions is that they must explicitly ignore `_CRT_BLOCK` blocks. These blocks are the memory allocations made internally by C run-time library functions if they make any calls to C run-time library functions that allocate internal memory. You can ignore `_CRT_BLOCK` blocks by including the following code at the beginning of your allocation hook function:
+
+```cpp
+if ( nBlockUse == _CRT_BLOCK )
+ return( TRUE );
+```
+
+If your allocation hook doesn't ignore `_CRT_BLOCK` blocks, then any C run-time library function called in your hook can trap the program in an endless loop. For example, `printf` makes an internal allocation. If your hook code calls `printf`, then the resulting allocation will cause your hook to be called again, which will call `printf` again, and so on, until the stack overflows. If you need to report `_CRT_BLOCK` allocation operations, one way to circumvent this restriction is to use Windows API functions, rather than C run-time functions, for formatting and output. Because the Windows APIs don't use the C run-time library heap, they won't trap your allocation hook in an endless loop.
+
+If you examine the run-time library source files, you'll see that the default allocation hook function, `_CrtDefaultAllocHook` (which simply returns `TRUE`), is located in a separate file of its own, *`debug_heap_hook.cpp`*. If you want your allocation hook to be called even for the allocations made by the run-time startup code that is executed before your application's `main` function, you can replace this default function with one of your own, instead of using [`_CrtSetAllocHook`](./reference/crtsetallochook.md).
+
+### Report hook functions
+
+A report hook function, installed using [`_CrtSetReportHook`](./reference/crtsetreporthook.md), is called every time [`_CrtDbgReport`](./reference/crtdbgreport-crtdbgreportw.md) generates a debug report. You can use it, among other things, for filtering reports to focus on specific types of allocations. A report hook function should have a prototype like this example:
+
+```cpp
+int AppReportHook(int nRptType, char *szMsg, int *retVal);
+```
+
+The pointer that you pass to `_CrtSetReportHook` is of type `_CRT_REPORT_HOOK`, as defined in ``:
+
+```cpp
+typedef int (__cdecl *_CRT_REPORT_HOOK)(int, char *, int *);
+```
+
+When the run-time library calls your hook function, the *`nRptType`* argument contains the category of the report (`_CRT_WARN`, `_CRT_ERROR`, or `_CRT_ASSERT`), *`szMsg`* contains a pointer to a fully assembled report message string, and *`retVal`* specifies whether `_CrtDbgReport` should continue normal execution after generating the report or start the debugger. (A *`retVal`* value of zero continues execution, a value of 1 starts the debugger.)
+
+If the hook handles the message in question completely, so that no further reporting is required, it should return `TRUE`. If it returns `FALSE`, `_CrtDbgReport` will report the message normally.
+
+## In this section
+
+- [Debug versions of heap allocation functions](./debug-versions-of-heap-allocation-functions.md)
+
+ Discusses the special Debug versions of the heap allocation functions, including: how the CRT maps calls, the benefits of calling them explicitly, how to avoid conversion, tracking the separate types of allocations in client blocks, and the results of not defining `_DEBUG`.
+
+- [CRT debug heap details](./crt-debug-heap-details.md)
+
+ Describes memory management and the debug heap, the types of blocks on the debug heap, heap state reporting functions, and how to use the debug heap to track allocation requests.
+
+- [Find memory leaks using the CRT library](./find-memory-leaks-using-the-crt-library.md)
+
+ Covers techniques for detecting and isolating memory leaks by using the debugger and the C Run-Time Library.
+
+## See also
+
+- [Debugging Native Code](/visualstudio/debugger/debugging-native-code)
+- [Debugger Security](/visualstudio/debugger/debugger-security)
diff --git a/docs/c-runtime-library/crt-initialization.md b/docs/c-runtime-library/crt-initialization.md
index 705348bd86..b2971c1be1 100644
--- a/docs/c-runtime-library/crt-initialization.md
+++ b/docs/c-runtime-library/crt-initialization.md
@@ -4,7 +4,6 @@ description: "Describes how the CRT initializes global state in native code."
ms.topic: "conceptual"
ms.date: 08/02/2021
helpviewer_keywords: ["CRT initialization [C++]"]
-ms.assetid: e7979813-1856-4848-9639-f29c86b74ad7
---
# CRT initialization
@@ -16,9 +15,9 @@ It's possible, though not recommended, to take advantage of Microsoft-specific l
## Initializing a global object
-Consider the following code:
+Consider the following C++ code (C won't allow this code because it doesn't allow a function call in a constant expression).
-```C
+```cpp
int func(void)
{
return 3;
@@ -69,7 +68,6 @@ Offset Type Applied To Index Name
The CRT defines two pointers:
- `__xc_a` in `.CRT$XCA`
-
- `__xc_z` in `.CRT$XCZ`
Neither group has any other symbols defined except `__xc_a` and `__xc_z`.
@@ -88,7 +86,7 @@ The section should resemble this example:
__xc_z
```
-So, the CRT library uses both `__xc_a` and `__xc_z` to determine the start and end of the global initializers list because of the way in which they're laid out in memory after the image is loaded.
+The CRT library uses both `__xc_a` and `__xc_z` to determine the start and end of the global initializers list because of the way in which they're laid out in memory after the image is loaded.
## Linker features for initialization
@@ -112,4 +110,5 @@ The names `.CRT$XCT` and `.CRT$XCV` aren't used by either the compiler or the CR
## See also
+[`_initterm, _initterm_e`](./reference/initterm-initterm-e.md)\
[C runtime (CRT) and C++ Standard Library (STL) `.lib` files](./crt-library-features.md)
diff --git a/docs/c-runtime-library/crt-library-features.md b/docs/c-runtime-library/crt-library-features.md
index f0eda10039..165f509086 100644
--- a/docs/c-runtime-library/crt-library-features.md
+++ b/docs/c-runtime-library/crt-library-features.md
@@ -3,7 +3,6 @@ title: "C runtime (CRT) and C++ standard library (STL) lib files"
description: "List of Microsoft C runtime and C++ standard library (STL) lib files that you can link against and their associated compiler options and preprocessor directives."
ms.date: "3/5/2021"
ms.topic: "reference"
-ms.custom: contperf-fy21q3
helpviewer_keywords: ["MSVCR71.dll", "libraries [C++], multithreaded", "library files, run-time", "LIBCMT.lib", "LIBCP.lib", "LIBCPMT.lib", "run-time libraries, C", "CRT, release versions", "MSVCP71.dll", "LIBC.lib", "libraries [C++]", "libraries [C++], run-time", "linking [C++], libraries", "STL libraries", "Microsoft standard template libraries"]
---
# C runtime (CRT) and C++ standard library (STL) `.lib` files
@@ -74,7 +73,7 @@ If you're using the **`/clr`** compiler switch, your code will be linked with a
For more information on using the CRT with **`/clr`**, see [Mixed (Native and Managed) Assemblies](../dotnet/mixed-native-and-managed-assemblies.md).
-To build a debug version of your application, the [`_DEBUG`](./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).
+To build a debug version of your application, the [`_DEBUG`](./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](./crt-debugging-techniques.md).
This version of the CRT isn't fully conformant with the C99 standard. In versions before Visual Studio 2019 version 16.8, the `` 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.
diff --git a/docs/c-runtime-library/crtdbg-map-alloc.md b/docs/c-runtime-library/crtdbg-map-alloc.md
index b37fb5729e..b2b1cfec57 100644
--- a/docs/c-runtime-library/crtdbg-map-alloc.md
+++ b/docs/c-runtime-library/crtdbg-map-alloc.md
@@ -10,7 +10,7 @@ ms.assetid: 435242b8-caea-4063-b765-4a608200312b
When the `_CRTDBG_MAP_ALLOC` flag is defined in the debug version of an application, the base versions of the heap functions are directly mapped to their debug versions. The flag is used in Crtdbg.h to do the mapping. This flag is only available when the [`_DEBUG`](./debug.md) flag has been defined in the application.
-For more information about using the debug version versus the base version of a heap function, see [Using the debug version versus the base version](/visualstudio/debugger/debug-versions-of-heap-allocation-functions).
+For more information about using the debug version versus the base version of a heap function, see [Debug versions of heap allocation functions](./debug-versions-of-heap-allocation-functions.md).
## See also
diff --git a/docs/c-runtime-library/crtdbgflag.md b/docs/c-runtime-library/crtdbgflag.md
index 14c2ada306..6617f29a18 100644
--- a/docs/c-runtime-library/crtdbgflag.md
+++ b/docs/c-runtime-library/crtdbgflag.md
@@ -10,7 +10,7 @@ ms.assetid: 9e7adb47-8ab9-4e19-81d5-e2f237979973
The **`_crtDbgFlag`** flag consists of five bit-fields that control how memory allocations on the debug version of the heap are tracked, verified, reported, and dumped. The bit fields of the flag are set using the [`_CrtSetDbgFlag`](./reference/crtsetdbgflag.md) function. This flag and its bit fields are declared in Crtdbg.h. This flag is only available when the [`_DEBUG`](./debug.md) flag has been defined in the application.
-For more information about using this flag along with other debug functions, see [Heap state reporting functions](/visualstudio/debugger/crt-debug-heap-details).
+For more information about using this flag along with other debug functions, see [Heap state reporting functions](./crt-debug-heap-details.md#heap-state-reporting-functions).
## See also
diff --git a/docs/c-runtime-library/data-alignment.md b/docs/c-runtime-library/data-alignment.md
index e9c8d32d66..97b03773fb 100644
--- a/docs/c-runtime-library/data-alignment.md
+++ b/docs/c-runtime-library/data-alignment.md
@@ -1,10 +1,9 @@
---
-description: "Learn more about: Data Alignment"
title: "Data Alignment"
-ms.date: "11/04/2016"
+description: "Learn more about: Data Alignment"
+ms.date: 11/04/2016
f1_keywords: ["data.alignment"]
helpviewer_keywords: ["data alignment [C++]"]
-ms.assetid: 35ac3d2d-a4b3-421b-954f-b7372b1f18e1
---
# Data alignment
@@ -14,7 +13,7 @@ The following C run-time functions support data alignment.
| Routine | Use |
|---|---|
-| [`_aligned_free`](./reference/aligned-free.md) | Frees a block of memory that was allocated with [`_aligned_malloc`](./reference/aligned-malloc.md)or [`_aligned_offset_malloc`](./reference/aligned-offset-malloc.md). |
+| [`_aligned_free`](./reference/aligned-free.md) | Frees a block of memory that was allocated with [`_aligned_malloc`](./reference/aligned-malloc.md) or [`_aligned_offset_malloc`](./reference/aligned-offset-malloc.md). |
| [`_aligned_free_dbg`](./reference/aligned-free-dbg.md) | Frees a block of memory that was allocated with [`_aligned_malloc`](./reference/aligned-malloc.md) or [`_aligned_offset_malloc`](./reference/aligned-offset-malloc.md) (debug only). |
| [`_aligned_malloc`](./reference/aligned-malloc.md) | Allocates memory on a specified alignment boundary. |
| [`_aligned_malloc_dbg`](./reference/aligned-malloc-dbg.md) | Allocates memory on a specified alignment boundary with extra space for a debugging header and overwrite buffers (debug version only). |
diff --git a/docs/c-runtime-library/data-type-mappings.md b/docs/c-runtime-library/data-type-mappings.md
index 11190a2110..3ae69e97e5 100644
--- a/docs/c-runtime-library/data-type-mappings.md
+++ b/docs/c-runtime-library/data-type-mappings.md
@@ -18,7 +18,7 @@ For related information, see [Using TCHAR.H Data Types with _MBCS Code](../text/
|---|---|---|---|
| `_TCHAR` | **`char`** | **`char`** | **`wchar_t`** |
| `_tfinddata_t` | `_finddata_t` | `_finddata_t` | `_wfinddata_t` |
-| `_tfinddata64_t` | `__finddata64_t` | `__finddata64_t` | `__wfinddata64_t` |
+| `_tfinddata64_t` | `__finddata64_t` | `__finddata64_t` | `_wfinddata64_t` |
| `_tfinddatai64_t` | `_finddatai64_t` | `_finddatai64_t` | `_wfinddatai64_t` |
| `_TINT` | **`int`** | **`int`** | `wint_t` |
| `_TSCHAR` | **`signed char`** | **`signed char`** | **`wchar_t`** |
diff --git a/docs/c-runtime-library/debug-routines.md b/docs/c-runtime-library/debug-routines.md
index a6b32a239d..eb6d0ab2dd 100644
--- a/docs/c-runtime-library/debug-routines.md
+++ b/docs/c-runtime-library/debug-routines.md
@@ -20,7 +20,7 @@ The debug version of the C runtime library supplies many diagnostic services tha
## Debug versions of the C runtime library routines
-To use these routines, the [`_DEBUG`](./debug.md) flag must be defined. All of these routines do nothing in a retail build of an application. For more information on how to use the new debug routines, see [CRT debugging techniques](/visualstudio/debugger/crt-debugging-techniques).
+To use these routines, the [`_DEBUG`](./debug.md) flag must be defined. All of these routines do nothing in a retail build of an application. For more information on how to use the new debug routines, see [CRT debugging techniques](./crt-debugging-techniques.md).
| Routine | Use |
|--|--|
diff --git a/docs/c-runtime-library/debug-versions-of-heap-allocation-functions.md b/docs/c-runtime-library/debug-versions-of-heap-allocation-functions.md
new file mode 100644
index 0000000000..0a8e8bb967
--- /dev/null
+++ b/docs/c-runtime-library/debug-versions-of-heap-allocation-functions.md
@@ -0,0 +1,38 @@
+---
+title: Debug versions of heap allocation functions
+description: Use debug versions of heap allocation functions in the C run-time library. These functions have the same names as the release versions with _dbg appended.
+ms.date: 02/03/2023
+helpviewer_keywords:
+ - "_CRTDBG_MAP_ALLOC macro"
+ - "debugging [CRT], heap allocation functions"
+ - "debugging memory leaks, CRT debug library functions"
+ - "malloc function"
+ - "memory leaks, CRT debug library functions"
+ - "heap allocation, debug"
+ - "_malloc_dbg function"
+---
+# Debug versions of heap allocation functions
+
+The C runtime (CRT) library contains special Debug versions of the heap allocation functions. These functions have the same names as the Release versions with `_dbg` appended to them. This article describes the differences between the Release version of a CRT function and the `_dbg` version, using `malloc` and `_malloc_dbg` as examples.
+
+## Behavior in debug builds
+
+When [`_DEBUG`](./debug.md) is defined, the CRT maps all [`malloc`](./reference/malloc.md) calls to [`_malloc_dbg`](./reference/malloc-dbg.md). Therefore, you don't need to rewrite your code using `_malloc_dbg` instead of `malloc` to receive the benefits while debugging.
+
+You might want to call `_malloc_dbg` explicitly, however. Calling `_malloc_dbg` explicitly has some added benefits:
+
+- Tracking `_CLIENT_BLOCK` type allocations.
+
+- Storing the source file and line number where the allocation request occurred.
+
+If you don't want to convert your `malloc` calls to `_malloc_dbg`, you can obtain the source file information by defining [`_CRTDBG_MAP_ALLOC`](./crtdbg-map-alloc.md), which causes the preprocessor to directly map all calls to `malloc` to `_malloc_dbg` instead of relying on a wrapper around `malloc`.
+
+To track the separate types of allocations in client blocks, you must call `_malloc_dbg` directly and set the `blockType` parameter to `_CLIENT_BLOCK`.
+
+## Behavior in non-debug builds
+
+When `_DEBUG` isn't defined, calls to `malloc` aren't disturbed, calls to `_malloc_dbg` are resolved to `malloc`, the definition of [`_CRTDBG_MAP_ALLOC`](./crtdbg-map-alloc.md) is ignored, and source file information pertaining to the allocation request isn't provided. Because `malloc` doesn't have a block type parameter, requests for `_CLIENT_BLOCK` types are treated as standard allocations.
+
+## See also
+
+[CRT debugging techniques](./crt-debugging-techniques.md)
diff --git a/docs/c-runtime-library/debug.md b/docs/c-runtime-library/debug.md
index 3ef9ef98fd..049cce0df2 100644
--- a/docs/c-runtime-library/debug.md
+++ b/docs/c-runtime-library/debug.md
@@ -9,7 +9,7 @@ ms.assetid: a9901568-4846-4731-a404-399d947e2e7a
The compiler defines `_DEBUG` when you specify the /MTd or /MDd option. These options specify debug versions of the C run-time library.
-For more information, see [CRT debugging techniques](/visualstudio/debugger/crt-debugging-techniques).
+For more information, see [CRT debugging techniques](./crt-debugging-techniques.md).
## See also
diff --git a/docs/c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md b/docs/c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md
index b71050dc51..e614373d8c 100644
--- a/docs/c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md
+++ b/docs/c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md
@@ -2,10 +2,6 @@
description: "Learn more about: errno, _doserrno, _sys_errlist, and _sys_nerr"
title: "errno, _doserrno, _sys_errlist, and _sys_nerr"
ms.date: "11/04/2016"
-api_name: ["_errno"]
-api_location: ["msvcrt.dll"]
-api_type: ["DLLExport"]
-topic_type: ["apiref"]
f1_keywords: ["errno", "ERRNO/errno", "_doserrno", "ERRNO/_doserrno", "_sys_errlist", "STDLIB/_sys_errlist", "_sys_nerr", "STDLIB/_sys_nerr"]
helpviewer_keywords: ["error codes, printing", "sys_errlist global variable", "doserrno global variable", "errno global variable", "_doserrno global variable", "_sys_errlist global variable", "_sys_nerr global variable", "sys_nerr global variable"]
ms.assetid: adbec641-6d91-4e19-8398-9a34046bd369
diff --git a/docs/c-runtime-library/file-handling.md b/docs/c-runtime-library/file-handling.md
index 9ff1cf7924..661f7a0fb3 100644
--- a/docs/c-runtime-library/file-handling.md
+++ b/docs/c-runtime-library/file-handling.md
@@ -1,16 +1,15 @@
---
-description: "Learn more about: File Handling"
title: "File Handling"
-ms.date: "11/04/2016"
+description: "Learn more about: File Handling"
+ms.date: 11/04/2016
f1_keywords: ["c.files"]
helpviewer_keywords: ["files [C++], handling", "files [C++], opening", "files [C++], manipulating"]
-ms.assetid: 48119e2e-e94f-4602-b08b-b72440f731d8
---
# File handling
Use these routines to create, delete, and manipulate files and to set and check file-access permissions.
-The C run-time libraries have a 512 limit for the number of files that can be open at any one time. Attempting to open more than the maximum number of file descriptors or file streams causes program failure. Use [`_setmaxstdio`](./reference/setmaxstdio.md) to change this number.
+The C run-time libraries have a 512 limit for the number of files that can be open at any one time. Attempting to open more than the maximum number of file descriptors or file streams causes program failure. Use [`_setmaxstdio`](reference/setmaxstdio.md) to change this number.
## File-handling routines (file descriptor)
@@ -18,14 +17,14 @@ These routines operate on files designated by a file descriptor.
| Routine | Use |
|---|---|
-| [`_chsize`](./reference/chsize.md),[`_chsize_s`](./reference/chsize-s.md) | Change file size |
-| [`_filelength`, `_filelengthi64`](./reference/filelength-filelengthi64.md) | Get file length |
-| [`_fstat`, `_fstat32`, `_fstat64`, `_fstati64`, `_fstat32i64`, `_fstat64i32`](./reference/fstat-fstat32-fstat64-fstati64-fstat32i64-fstat64i32.md) | Get file-status information on descriptor |
-| [`_get_osfhandle`](./reference/get-osfhandle.md) | Return operating-system file handle associated with existing C run-time file descriptor |
-| [`_isatty`](./reference/isatty.md) | Check for character device |
-| [`_locking`](./reference/locking.md) | Lock areas of file |
-| [`_open_osfhandle`](./reference/open-osfhandle.md) | Associate C run-time file descriptor with existing operating-system file handle |
-| [`_setmode`](./reference/setmode.md) | Set file-translation mode |
+| [`_chsize`](reference/chsize.md), [`_chsize_s`](reference/chsize-s.md) | Change file size |
+| [`_filelength`, `_filelengthi64`](reference/filelength-filelengthi64.md) | Get file length |
+| [`_fstat`, `_fstat32`, `_fstat64`, `_fstati64`, `_fstat32i64`, `_fstat64i32`](reference/fstat-fstat32-fstat64-fstati64-fstat32i64-fstat64i32.md) | Get file-status information on descriptor |
+| [`_get_osfhandle`](reference/get-osfhandle.md) | Return operating-system file handle associated with existing C run-time file descriptor |
+| [`_isatty`](reference/isatty.md) | Check for character device |
+| [`_locking`](reference/locking.md) | Lock areas of file |
+| [`_open_osfhandle`](reference/open-osfhandle.md) | Associate C run-time file descriptor with existing operating-system file handle |
+| [`_setmode`](reference/setmode.md) | Set file-translation mode |
## File-Handling Routines (Path or Filename)
@@ -33,17 +32,17 @@ These routines operate on files specified by a path or filename.
| Routine | Use |
|---|---|
-| [`_access`, `_waccess`](./reference/access-waccess.md), [`_access_s`, `_waccess_s`](./reference/access-s-waccess-s.md) | Check file-permission setting |
-| [`_chmod`, `_wchmod`](./reference/chmod-wchmod.md) | Change file-permission setting |
-| [`_fullpath`, `_wfullpath`](./reference/fullpath-wfullpath.md) | Expand a relative path to its absolute path name |
-| [`_makepath`, `_wmakepath`](./reference/makepath-wmakepath.md), [`_makepath_s`, `_wmakepath_s`](./reference/makepath-s-wmakepath-s.md) | Merge path components into single, full path |
-| [`_mktemp`, `_wmktemp`](./reference/mktemp-wmktemp.md), [`_mktemp_s`, `_wmktemp_s`](./reference/mktemp-s-wmktemp-s.md) | Create unique filename |
-| [`remove`, `_wremove`](./reference/remove-wremove.md) | Delete file |
-| [`rename`, `_wrename`](./reference/rename-wrename.md) | Rename file |
-| [`_splitpath`, `_wsplitpath`](./reference/splitpath-wsplitpath.md), [`_splitpath_s`, `_wsplitpath_s`](./reference/splitpath-s-wsplitpath-s.md) | Parse path into components |
-| [`_stat`, `_stat64`, `_stati64`, `_wstat`, `_wstat64`, `_wstati64`](./reference/stat-functions.md) | Get file-status information on named file |
-| [`_umask`](./reference/umask.md), [`_umask_s`](./reference/umask-s.md) | Set default permission mask for new files created by program |
-| [`_unlink`, `_wunlink`](./reference/unlink-wunlink.md) | Delete file |
+| [`_access`, `_waccess`](reference/access-waccess.md), [`_access_s`, `_waccess_s`](reference/access-s-waccess-s.md) | Check file-permission setting |
+| [`_chmod`, `_wchmod`](reference/chmod-wchmod.md) | Change file-permission setting |
+| [`_fullpath`, `_wfullpath`](reference/fullpath-wfullpath.md) | Expand a relative path to its absolute path name |
+| [`_makepath`, `_wmakepath`](reference/makepath-wmakepath.md), [`_makepath_s`, `_wmakepath_s`](reference/makepath-s-wmakepath-s.md) | Merge path components into single, full path |
+| [`_mktemp`, `_wmktemp`](reference/mktemp-wmktemp.md), [`_mktemp_s`, `_wmktemp_s`](reference/mktemp-s-wmktemp-s.md) | Create unique filename |
+| [`remove`, `_wremove`](reference/remove-wremove.md) | Delete file |
+| [`rename`, `_wrename`](reference/rename-wrename.md) | Rename file |
+| [`_splitpath`, `_wsplitpath`](reference/splitpath-wsplitpath.md), [`_splitpath_s`, `_wsplitpath_s`](reference/splitpath-s-wsplitpath-s.md) | Parse path into components |
+| [`_stat`, `_stat64`, `_stati64`, `_wstat`, `_wstat64`, `_wstati64`](reference/stat-functions.md) | Get file-status information on named file |
+| [`_umask`](reference/umask.md), [`_umask_s`](reference/umask-s.md) | Set default permission mask for new files created by program |
+| [`_unlink`, `_wunlink`](reference/unlink-wunlink.md) | Delete file |
## File-Handling Routines (Open File)
@@ -51,32 +50,30 @@ These routines open files.
| Routine | Use |
|---|---|
-| [`fopen`, `_wfopen`](./reference/fopen-wfopen.md), [`fopen_s`, `_wfopen_s`](./reference/fopen-s-wfopen-s.md) | Opens a file and returns a pointer to the open file. |
-| [`_fsopen`, `_wfsopen`](./reference/fsopen-wfsopen.md) | Open a stream with file sharing and returns a pointer to the open file. |
-| [`_open`, `_wopen`](./reference/open-wopen.md) | Opens a file and returns a file descriptor to the opened file. |
-| [`_sopen`, `_wsopen`](./reference/sopen-wsopen.md), [`_sopen_s`, `_wsopen_s`](./reference/sopen-s-wsopen-s.md) | Open a file with file sharing and returns a file descriptor to the open file. |
-| [`_pipe`](./reference/pipe.md) | Creates a pipe for reading and writing. |
-| [`freopen`, `_wfreopen`](./reference/freopen-wfreopen.md), [`freopen_s`, `_wfreopen_s`](./reference/freopen-s-wfreopen-s.md) | Reassign a file pointer. |
+| [`fopen`, `_wfopen`](reference/fopen-wfopen.md), [`fopen_s`, `_wfopen_s`](reference/fopen-s-wfopen-s.md) | Opens a file and returns a pointer to the open file. |
+| [`_fsopen`, `_wfsopen`](reference/fsopen-wfsopen.md) | Open a stream with file sharing and returns a pointer to the open file. |
+| [`_open`, `_wopen`](reference/open-wopen.md) | Opens a file and returns a file descriptor to the opened file. |
+| [`_sopen`, `_wsopen`](reference/sopen-wsopen.md), [`_sopen_s`, `_wsopen_s`](reference/sopen-s-wsopen-s.md) | Open a file with file sharing and returns a file descriptor to the open file. |
+| [`_pipe`](reference/pipe.md) | Creates a pipe for reading and writing. |
+| [`freopen`, `_wfreopen`](reference/freopen-wfreopen.md), [`freopen_s`, `_wfreopen_s`](reference/freopen-s-wfreopen-s.md) | Reassign a file pointer. |
These routines provide a way to change the representation of the file between a `FILE` structure, a file descriptor, and a Win32 file handle.
| Routine | Use |
|---|---|
-| [`_fdopen`, `_wfdopen`](./reference/fdopen-wfdopen.md) | Associates a stream with a file that was previously opened for low-level I/O and returns a pointer to the open stream. |
-| [`_fileno`](./reference/fileno.md) | Gets the file descriptor associated with a stream. |
-| [`_get_osfhandle`](./reference/get-osfhandle.md) | Return operating-system file handle associated with existing C run-time file descriptor |
-| [`_open_osfhandle`](./reference/open-osfhandle.md) | Associates C run-time file descriptor with an existing operating-system file handle. |
+| [`_fdopen`, `_wfdopen`](reference/fdopen-wfdopen.md) | Associates a stream with a file that was previously opened for low-level I/O and returns a pointer to the open stream. |
+| [`_fileno`](reference/fileno.md) | Gets the file descriptor associated with a stream. |
+| [`_get_osfhandle`](reference/get-osfhandle.md) | Return operating-system file handle associated with existing C run-time file descriptor |
+| [`_open_osfhandle`](reference/open-osfhandle.md) | Associates C run-time file descriptor with an existing operating-system file handle. |
The following Win32 functions also open files and pipes:
- [`CreateFile`](/windows/win32/api/fileapi/nf-fileapi-createfilew)
-
- [`CreatePipe`](/windows/win32/api/namedpipeapi/nf-namedpipeapi-createpipe)
-
- [`CreateNamedPipe`](/windows/win32/api/winbase/nf-winbase-createnamedpipea)
## See also
-[Universal C runtime routines by category](./run-time-routines-by-category.md)\
-[Directory control](./directory-control.md)\
-[System calls](./system-calls.md)
+[Universal C runtime routines by category](run-time-routines-by-category.md)\
+[Directory control](directory-control.md)\
+[System calls](system-calls.md)
diff --git a/docs/c-runtime-library/filename-max.md b/docs/c-runtime-library/filename-max.md
index 71cd7fb0a3..81d0ddb93a 100644
--- a/docs/c-runtime-library/filename-max.md
+++ b/docs/c-runtime-library/filename-max.md
@@ -2,7 +2,7 @@
description: "Learn more about: FILENAME_MAX"
title: "FILENAME_MAX"
ms.date: "11/04/2016"
-f1_keywords: ["FILENAME_MAX"]
+f1_keywords: ["STDIO/FILENAME_MAX", "FILENAME_MAX"]
helpviewer_keywords: ["FILENAME_MAX constant"]
ms.assetid: fe368d24-3f31-42d6-859c-cbd84f446ee5
---
diff --git a/docs/c-runtime-library/filename-search-functions.md b/docs/c-runtime-library/filename-search-functions.md
index b11a46b69a..fd8726e2d6 100644
--- a/docs/c-runtime-library/filename-search-functions.md
+++ b/docs/c-runtime-library/filename-search-functions.md
@@ -81,7 +81,7 @@ Functions `_findfirst32i64`, `_findnext32i64`, `_wfindfirst32i64`, and `_wfindne
|---|---|---|
| `_finddata_t`, `_wfinddata_t` | `__time64_t` | `_fsize_t` |
| `_finddata32_t`, `_wfinddata32_t` | `__time32_t` | `_fsize_t` |
-| `__finddata64_t`, `__wfinddata64_t` | `__time64_t` | **`__int64`** |
+| `__finddata64_t`, `_wfinddata64_t` | `__time64_t` | **`__int64`** |
| `_finddata32i64_t`, `_wfinddata32i64_t` | `__time32_t` | **`__int64`** |
| `_finddata64i32_t`, `_wfinddata64i32_t` | `__time64_t` | `_fsize_t` |
diff --git a/docs/c-runtime-library/find-memory-leaks-using-the-crt-library.md b/docs/c-runtime-library/find-memory-leaks-using-the-crt-library.md
new file mode 100644
index 0000000000..1e78d27ce5
--- /dev/null
+++ b/docs/c-runtime-library/find-memory-leaks-using-the-crt-library.md
@@ -0,0 +1,285 @@
+---
+title: Find memory leaks with the CRT library
+description: Learn how the C/C++ debugger and C Run-time Library (CRT) can help find memory leaks. The techniques include memory-leak reports and comparing memory snapshots.
+ms.date: 02/03/2023
+helpviewer_keywords:
+ - breakpoints, on memory allocation
+ - _CrtMemState
+ - _CrtMemCheckpoint
+ - memory leaks
+ - _CrtMemDifference
+ - memory leaks, detecting and isolating
+ - _CrtDumpMemoryLeaks
+ - _CrtSetBreakAlloc
+ - _crtBreakAlloc
+ - _CrtSetReportMode
+ - memory, debugging
+ - _CrtMemDumpStatistics
+ - debugging memory leaks
+ - _CRTDBG_MAP_ALLOC
+ - _CrtSetDbgFlag
+---
+# Find memory leaks with the CRT library
+
+Memory leaks are among the most subtle and hard-to-detect bugs in C/C++ apps. Memory leaks result from the failure to correctly deallocate memory that was previously allocated. A small memory leak might not be noticed at first, but over time can cause symptoms ranging from poor performance to crashing when the app runs out of memory. A leaking app that uses up all available memory can cause other apps to crash, creating confusion as to which app is responsible. Even harmless memory leaks might indicate other problems that should be corrected.
+
+The Visual Studio debugger and C Run-time Library (CRT) can help you detect and identify memory leaks.
+
+## Enable memory leak detection
+
+The primary tools for detecting memory leaks are the C/C++ debugger and the CRT debug heap functions.
+
+To enable all the debug heap functions, include the following statements in your C++ program, in the following order:
+
+```cpp
+#define _CRTDBG_MAP_ALLOC
+#include
+#include
+```
+
+The `#define` statement maps a base version of the CRT heap functions to the corresponding debug version. If you leave out the `#define` statement, the memory leak dump will be [less detailed](#interpret-the-memory-leak-report).
+
+Including *crtdbg.h* maps the `malloc` and `free` functions to their debug versions, [`_malloc_dbg`](./reference/malloc-dbg.md) and [`_free_dbg`](./reference/free-dbg.md), which track memory allocation and deallocation. This mapping occurs only in debug builds, which have `_DEBUG`. Release builds use the ordinary `malloc` and `free` functions.
+
+After you've enabled the debug heap functions by using the preceding statements, place a call to [`_CrtDumpMemoryLeaks`](./reference/crtdumpmemoryleaks.md) before an app exit point to display a memory-leak report when the app exits.
+
+```cpp
+_CrtDumpMemoryLeaks();
+```
+
+If your app has several exits, you don't need to manually place `_CrtDumpMemoryLeaks` at every exit point. To cause an automatic call to `_CrtDumpMemoryLeaks` at each exit point, place a call to `_CrtSetDbgFlag` at the beginning of your app with the bit fields shown here:
+
+```cpp
+_CrtSetDbgFlag ( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF );
+```
+
+By default, `_CrtDumpMemoryLeaks` outputs the memory-leak report to the **Debug** pane of the **Output** window. If you use a library, the library might reset the output to another location.
+
+You can use `_CrtSetReportMode` to redirect the report to another location, or back to the **Output** window as shown here:
+
+```cpp
+_CrtSetReportMode( _CRT_WARN, _CRTDBG_MODE_DEBUG );
+```
+
+The following example shows a simple memory leak and displays memory leak information using `_CrtDumpMemoryLeaks();`.
+
+```cpp
+// debug_malloc.cpp
+// compile by using: cl /EHsc /W4 /D_DEBUG /MDd debug_malloc.cpp
+#define _CRTDBG_MAP_ALLOC
+#include
+#include
+#include
+
+int main()
+{
+ std::cout << "Hello World!\n";
+
+ int* x = (int*)malloc(sizeof(int));
+
+ *x = 7;
+
+ printf("%d\n", *x);
+
+ x = (int*)calloc(3, sizeof(int));
+ x[0] = 7;
+ x[1] = 77;
+ x[2] = 777;
+
+ printf("%d %d %d\n", x[0], x[1], x[2]);
+
+ _CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_DEBUG);
+ _CrtDumpMemoryLeaks();
+}
+```
+
+## Interpret the memory-leak report
+
+If your app doesn't define `_CRTDBG_MAP_ALLOC`, [_CrtDumpMemoryLeaks](./reference/crtdumpmemoryleaks.md) displays a memory-leak report that looks like:
+
+```cmd
+Detected memory leaks!
+Dumping objects ->
+{18} normal block at 0x00780E80, 64 bytes long.
+ Data: < > CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD
+Object dump complete.
+```
+
+If your app defines `_CRTDBG_MAP_ALLOC`, the memory-leak report looks like:
+
+```cmd
+Detected memory leaks!
+Dumping objects ->
+c:\users\username\documents\projects\leaktest\leaktest.cpp(20) : {18}
+normal block at 0x00780E80, 64 bytes long.
+ Data: < > CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD
+Object dump complete.
+```
+
+The second report shows the filename and line number where the leaked memory is first allocated.
+
+Whether or not you define `_CRTDBG_MAP_ALLOC`, the memory-leak report displays:
+
+- The memory allocation number, which is `18` in the example
+- The block type, `normal` in the example.
+- The hexadecimal memory location, `0x00780E80` in the example.
+- The size of the block, `64 bytes` in the example.
+- The first 16 bytes of data in the block, in hexadecimal form.
+
+Memory block types are *normal*, *client*, or *CRT*. A *normal block* is ordinary memory allocated by your program. A *client block* is a special type of memory block used by MFC programs for objects that require a destructor. The MFC `new` operator creates either a normal block or a client block, as appropriate for the object being created.
+
+A *CRT block* is allocated by the CRT library for its own use. The CRT library handles the deallocation for these blocks, so CRT blocks won't appear in the memory-leak report unless there are serious problems with the CRT library.
+
+There are two other types of memory blocks that never appear in memory-leak reports. A *free block* is memory that has been released, so by definition isn't leaked. An *ignore block* is memory that you've explicitly marked to exclude from the memory-leak report.
+
+The preceding techniques identify memory leaks for memory allocated using the standard CRT `malloc` function. If your program allocates memory using the C++ `new` operator, however, you may only see the filename and line number where `operator new` calls `_malloc_dbg` in the memory-leak report. To create a more useful memory-leak report, you can write a macro like the following to report the line that made the allocation:
+
+```cpp
+#ifdef _DEBUG
+ #define DBG_NEW new ( _NORMAL_BLOCK , __FILE__ , __LINE__ )
+ // Replace _NORMAL_BLOCK with _CLIENT_BLOCK if you want the
+ // allocations to be of _CLIENT_BLOCK type
+#else
+ #define DBG_NEW new
+#endif
+```
+
+Now you can replace the `new` operator by using the `DBG_NEW` macro in your code. In debug builds, `DBG_NEW` uses an overload of global `operator new` that takes extra parameters for the block type, file, and line number. The overload of `new` calls `_malloc_dbg` to record the extra information. The memory-leak reports show the filename and line number where the leaked objects were allocated. Release builds still use the default `new`. Here's an example of the technique:
+
+```cpp
+// debug_new.cpp
+// compile by using: cl /EHsc /W4 /D_DEBUG /MDd debug_new.cpp
+#define _CRTDBG_MAP_ALLOC
+#include
+#include
+
+#ifdef _DEBUG
+ #define DBG_NEW new ( _NORMAL_BLOCK , __FILE__ , __LINE__ )
+ // Replace _NORMAL_BLOCK with _CLIENT_BLOCK if you want the
+ // allocations to be of _CLIENT_BLOCK type
+#else
+ #define DBG_NEW new
+#endif
+
+struct Pod {
+ int x;
+};
+
+int main() {
+ Pod* pPod = DBG_NEW Pod;
+ pPod = DBG_NEW Pod; // Oops, leaked the original pPod!
+ delete pPod;
+
+ _CrtDumpMemoryLeaks();
+}
+```
+
+When you run this code in the Visual Studio debugger, the call to `_CrtDumpMemoryLeaks` generates a report in the **Output** window that looks similar to:
+
+```Output
+Detected memory leaks!
+Dumping objects ->
+c:\users\username\documents\projects\debug_new\debug_new.cpp(20) : {75}
+ normal block at 0x0098B8C8, 4 bytes long.
+ Data: < > CD CD CD CD
+Object dump complete.
+```
+
+This output reports that the leaked allocation was on line 20 of *debug_new.cpp*.
+
+>[!NOTE]
+>We don't recommend you create a preprocessor macro named `new`, or any other language keyword.
+
+## Set breakpoints on a memory allocation number
+
+The memory allocation number tells you when a leaked memory block was allocated. A block with a memory allocation number of 18, for example, is the 18th block of memory allocated during the run of the app. The CRT report counts all memory-block allocations during the run, including allocations by the CRT library and other libraries such as MFC. Therefore, memory allocation block number 18 probably isn't the 18th memory block allocated by your code.
+
+You can use the allocation number to set a breakpoint on the memory allocation.
+
+### To set a memory-allocation breakpoint using the Watch window
+
+1. Set a breakpoint near the start of your app, and start debugging.
+
+1. When the app pauses at the breakpoint, open a **Watch** window by selecting **Debug** > **Windows** > **Watch 1** (or **Watch 2**, **Watch 3**, or **Watch 4**).
+
+1. In the **Watch** window, type `_crtBreakAlloc` in the **Name** column.
+
+ If you're using the multithreaded DLL version of the CRT library (the /MD option), add the context operator: `{,,ucrtbased.dll}_crtBreakAlloc`
+
+ Make sure that debug symbols are loaded. Otherwise, `_crtBreakAlloc` is reported as *unidentified*.
+
+1. Press **Enter**.
+
+ The debugger evaluates the call and places the result in the **Value** column. This value is **-1** if you haven't set any breakpoints on memory allocations.
+
+1. In the **Value** column, replace the value with the allocation number of the memory allocation where you want the debugger to break.
+
+After you set a breakpoint on a memory-allocation number, continue to debug. Make sure to run under the same conditions, so the memory-allocation number doesn't change. When your program breaks at the specified memory allocation, use the **Call Stack** window and other debugger windows to determine the conditions under which the memory was allocated. Then, you can continue execution to observe what happens to the object and determine why it isn't correctly deallocated.
+
+Setting a data breakpoint on the object might also be helpful. For more information, see [Using breakpoints](/visualstudio/debugger/using-breakpoints).
+
+You can also set memory-allocation breakpoints in code. You can set:
+
+```cpp
+_crtBreakAlloc = 18;
+```
+
+ or:
+
+```cpp
+_CrtSetBreakAlloc(18);
+```
+
+## Compare memory states
+
+Another technique for locating memory leaks involves taking snapshots of the application's memory state at key points. To take a snapshot of the memory state at a given point in your application, create a `_CrtMemState` structure and pass it to the `_CrtMemCheckpoint` function.
+
+```cpp
+_CrtMemState s1;
+_CrtMemCheckpoint( &s1 );
+```
+
+The `_CrtMemCheckpoint` function fills in the structure with a snapshot of the current memory state.
+
+To output the contents of a `_CrtMemState` structure, pass the structure to the `_CrtMemDumpStatistics` function:
+
+```cpp
+_CrtMemDumpStatistics( &s1 );
+```
+
+`_CrtMemDumpStatistics` outputs a dump of memory state that looks like:
+
+```cmd
+0 bytes in 0 Free Blocks.
+0 bytes in 0 Normal Blocks.
+3071 bytes in 16 CRT Blocks.
+0 bytes in 0 Ignore Blocks.
+0 bytes in 0 Client Blocks.
+Largest number used: 3071 bytes.
+Total allocations: 3764 bytes.
+```
+
+To determine whether a memory leak has occurred in a section of code, you can take snapshots of the memory state before and after the section, and then use `_CrtMemDifference` to compare the two states:
+
+```cpp
+_CrtMemCheckpoint( &s1 );
+// memory allocations take place here
+_CrtMemCheckpoint( &s2 );
+
+if ( _CrtMemDifference( &s3, &s1, &s2) )
+ _CrtMemDumpStatistics( &s3 );
+```
+
+`_CrtMemDifference` compares the memory states `s1` and `s2` and returns a result in (`s3`) that is the difference between `s1` and `s2`.
+
+One technique for finding memory leaks begins by placing `_CrtMemCheckpoint` calls at the beginning and end of your app, then using `_CrtMemDifference` to compare the results. If `_CrtMemDifference` shows a memory leak, you can add more `_CrtMemCheckpoint` calls to divide your program using a binary search, until you've isolated the source of the leak.
+
+## False positives
+
+ `_CrtDumpMemoryLeaks` can give false indications of memory leaks if a library marks internal allocations as normal blocks instead of CRT blocks or client blocks. In that case, `_CrtDumpMemoryLeaks` is unable to tell the difference between user allocations and internal library allocations. If the global destructors for the library allocations run after the point where you call `_CrtDumpMemoryLeaks`, every internal library allocation is reported as a memory leak. Versions of the Standard Template Library earlier than Visual Studio .NET may cause `_CrtDumpMemoryLeaks` to report such false positives.
+
+## See also
+
+- [CRT debug heap details](./crt-debug-heap-details.md)
+- [Debugger security](/visualstudio/debugger/debugger-security)
+- [Debugging native code](/visualstudio/debugger/debugging-native-code)
diff --git a/docs/c-runtime-library/floating-point-support.md b/docs/c-runtime-library/floating-point-support.md
index 69a51ce7ce..7f4ac7bc98 100644
--- a/docs/c-runtime-library/floating-point-support.md
+++ b/docs/c-runtime-library/floating-point-support.md
@@ -11,7 +11,9 @@ The Universal C Runtime library (UCRT) provides many integral and floating-point
For ISO C Standard 11 (C11) and later, the `` header, in addition to including `` and ``, provides macros that invoke a corresponding math function based on the types of the parameters. See [Type-generic math](tgmath.md) for details.
-Many of the floating point math library functions have different implementations for different CPU architectures. For example, the 32-bit x86 CRT may have a different implementation than the 64-bit x64 CRT. In addition, some of the functions may have multiple implementations for a given CPU architecture. The most efficient implementation is selected dynamically at run-time depending on the instruction sets supported by the CPU. For example, in the 32-bit x86 CRT, some functions have both an x87 implementation and an SSE2 implementation. When running on a CPU that supports SSE2, the faster SSE2 implementation is used. When running on a CPU that doesn't support SSE2, the slower x87 implementation is used. Because different implementations of the math library functions may use different CPU instructions and different algorithms to produce their results, the functions may produce different results across CPUs. In most cases, the results are within +/-1 ULP of the correctly rounded result, but the actual results may vary across CPUs.
+Many of the floating-point math library functions have different implementations for different CPU architectures. For example, the 32-bit x86 CRT may have a different implementation than the 64-bit x64 CRT. In addition, some of the functions may have multiple implementations for a given CPU architecture. The most efficient implementation is selected dynamically at run-time depending on the instruction sets supported by the CPU. For example, in the 32-bit x86 CRT, some functions have both an x87 implementation and an SSE2 implementation. When running on a CPU that supports SSE2, the faster SSE2 implementation is used. When running on a CPU that doesn't support SSE2, the slower x87 implementation is used. Because different implementations of the math library functions may use different CPU instructions and different algorithms to produce their results, the functions may produce different results across CPUs. In most cases, the results are within +/-1 ULP of the correctly rounded result, but the actual results may vary across CPUs.
+
+Newer versions of the UCRT might improve the precision and accuracy of the floating-point math library functions. Since the UCRT is part of the Windows operating system, you might get different results for these functions on different operating system versions or between debug and release builds. Although it is not recommended, you can statically link to the UCRT to guarantee consistent results if you need these functions will produce identical results everywhere.
Previous 16-bit versions of Microsoft C/C++ and Microsoft Visual C++ supported the **`long double`** type as an 80-bit precision floating-point data type. In later versions of Visual C++, the **`long double`** data type is a 64-bit precision floating-point data type identical to the **`double`** type. The compiler treats **`long double`** and **`double`** as distinct types, but the **`long double`** functions are identical to their **`double`** counterparts. The CRT provides **`long double`** versions of the math functions for ISO C99 source code compatibility, but note that the binary representation may differ from other compilers.
@@ -79,7 +81,7 @@ Previous 16-bit versions of Microsoft C/C++ and Microsoft Visual C++ supported t
| [`imaxabs`](./reference/imaxabs.md) | Computes the absolute value of an integer type |
| [`imaxdiv`](./reference/imaxdiv.md) | Computes the quotient and the remainder of two integer values |
| [`isfinite`, `_finite`, `_finitef`](./reference/finite-finitef.md) | Determines whether a value is finite |
-| [`isgreater`, `isgreaterequal`, `isless`, `islessequal`, `islessgreater`, `isunordered`](./reference/floating-point-ordering.md) | Compare the order of two floating point values |
+| [`isgreater`, `isgreaterequal`, `isless`, `islessequal`, `islessgreater`, `isunordered`](./reference/floating-point-ordering.md) | Compare the order of two floating-point values |
| [`isinf`](./reference/isinf.md) | Determines whether a floating-point value is infinite |
| [`isnan`, `_isnan`, `_isnanf`](./reference/isnan-isnan-isnanf.md) | Tests a floating-point value for NaN |
| [`isnormal`](./reference/isnormal.md) | Tests whether a floating-point value is both finite and not subnormal |
diff --git a/docs/c-runtime-library/fopen-max-sys-open.md b/docs/c-runtime-library/fopen-max-sys-open.md
index 5fb01fb982..8076924089 100644
--- a/docs/c-runtime-library/fopen-max-sys-open.md
+++ b/docs/c-runtime-library/fopen-max-sys-open.md
@@ -2,7 +2,7 @@
description: "Learn more about: FOPEN_MAX, _SYS_OPEN"
title: "FOPEN_MAX, _SYS_OPEN"
ms.date: "11/04/2016"
-f1_keywords: ["_SYS_OPEN", "FOPEN_MAX"]
+f1_keywords: ["STDIO/_SYS_OPEN", "STDIO/FOPEN_MAX", "_SYS_OPEN", "FOPEN_MAX"]
helpviewer_keywords: ["SYS_OPEN constant", "_SYS_OPEN constant", "FOPEN_MAX constant", "files [C++], maximum open", "maximum number of files", "open files, maximum"]
ms.assetid: 39cf5196-250a-459d-ae90-ce3d99f79039
---
diff --git a/docs/c-runtime-library/format-specification-fields-scanf-and-wscanf-functions.md b/docs/c-runtime-library/format-specification-fields-scanf-and-wscanf-functions.md
index bf5994d104..ee57428b23 100644
--- a/docs/c-runtime-library/format-specification-fields-scanf-and-wscanf-functions.md
+++ b/docs/c-runtime-library/format-specification-fields-scanf-and-wscanf-functions.md
@@ -3,7 +3,6 @@ description: "Learn more about: Format specification fields: scanf and wscanf fu
title: "Format specification fields: scanf and wscanf functions"
ms.date: 05/13/2022
ms.topic: "reference"
-ms.custom: contperf-fy21q1
helpviewer_keywords: ["width, specifications in scanf function", "scanf format specifications", "scanf width specifications", "scanf type field characters", "type fields, scanf function", "format specification fields for scanf function", "type fields"]
---
# Format specification fields: `scanf` and `wscanf` functions
diff --git a/docs/c-runtime-library/format-specification-syntax-printf-and-wprintf-functions.md b/docs/c-runtime-library/format-specification-syntax-printf-and-wprintf-functions.md
index 361c713b02..7b8fe37495 100644
--- a/docs/c-runtime-library/format-specification-syntax-printf-and-wprintf-functions.md
+++ b/docs/c-runtime-library/format-specification-syntax-printf-and-wprintf-functions.md
@@ -65,7 +65,7 @@ Integer types such as `short`, `int`, `long`, `long long`, and their `unsigned`
| **`p`** | Pointer type | Display the argument as an address in hexadecimal digits. |
| **`s`** | String | When used with `printf` functions, specifies a single-byte or multi-byte character string; when used with `wprintf` functions, specifies a wide-character string. Characters are displayed up to the first null character or until the *precision* value is reached. |
| **`S`** | String | When used with `printf` functions, specifies a wide-character string; when used with `wprintf` functions, specifies a single-byte or multi-byte character string. Characters are displayed up to the first null character or until the *precision* value is reached. |
-| **`Z`** | `ANSI_STRING` or `UNICODE_STRING` structure | When the address of an [`ANSI_STRING`](/windows/win32/api/ntdef/ns-ntdef-string) or [`UNICODE_STRING`](/windows/win32/api/ntdef/ns-ntdef-_unicode_string) structure is passed as the argument, display the string contained in the buffer pointed to by the `Buffer` field of the structure. Use a *size* modifier prefix of **`w`** to specify a `UNICODE_STRING` argument—for example, `%wZ`. The `Length` field of the structure must be set to the length, in bytes, of the string. The `MaximumLength` field of the structure must be set to the length, in bytes, of the buffer.
Typically, the **`Z`** type character is used only in driver debugging functions that use a conversion specification, such as `dbgPrint` and `kdPrint`. |
+| **`Z`** | `ANSI_STRING` or `UNICODE_STRING` structure | **VS 2013 and earlier**
When the address of an [`ANSI_STRING`](/windows/win32/api/ntdef/ns-ntdef-string) or [`UNICODE_STRING`](/windows/win32/api/ntdef/ns-ntdef-_unicode_string) structure is passed as the argument, display the string contained in the buffer pointed to by the `Buffer` field of the structure. Use a *size* modifier prefix of **`w`** to specify a `UNICODE_STRING` argument—for example, `%wZ`. The `Length` field of the structure must be set to the length, in bytes, of the string. The `MaximumLength` field of the structure must be set to the length, in bytes, of the buffer.
**Universal C Runtime (UCRT)**
There is a known issue in the UCRT that is currently maintained for compatibility. Like the **`S`** specifier, the **`Z`** specifier without a size modifier prefix refers to a `UNICODE_STRING` when using a narrow printing function (like `printf`) and an `ANSI_STRING` when using a wide printing function (like `wprintf`).
Instead of **`Z`**, use **`hZ`** to specify an `ANSI_STRING`. **`wZ`** (or **`lZ`**) can still be used to specify a `UNICODE_STRING`.
Typically, the **`Z`** type character is used only in driver debugging functions that use a conversion specification, such as `dbgPrint` and `kdPrint`. |
In Visual Studio 2015 and later versions, if the argument that corresponds to a floating-point conversion specifier (**`a`**, **`A`**, **`e`**, **`E`**, **`f`**, **`F`**, **`g`**, **`G`**) is infinite, indefinite, or NaN, the formatted output conforms to the C99 standard. This table lists the formatted output:
diff --git a/docs/c-runtime-library/freeentry-usedentry.md b/docs/c-runtime-library/freeentry-usedentry.md
index c516f182ef..e6dd6248f6 100644
--- a/docs/c-runtime-library/freeentry-usedentry.md
+++ b/docs/c-runtime-library/freeentry-usedentry.md
@@ -2,7 +2,7 @@
description: "Learn more about: _FREEENTRY, _USEDENTRY"
title: "_FREEENTRY, _USEDENTRY"
ms.date: "11/04/2016"
-f1_keywords: ["USEDENTRY", "_USEDENTRY", "_FREEENTRY", "FREEENTRY"]
+f1_keywords: ["MALLOC/_USEDENTRY", "MALLOC/_FREEENTRY", "_USEDENTRY", "_FREEENTRY", "USEDENTRY", "FREEENTRY"]
helpviewer_keywords: ["_USEDENTRY constant", "_FREEENTRY constant", "FREEENTRY constant", "USEDENTRY constant"]
ms.assetid: 26f658e6-6846-4a4e-9984-262cfe392770
---
diff --git a/docs/c-runtime-library/fseek-lseek-constants.md b/docs/c-runtime-library/fseek-lseek-constants.md
index bcde2121b5..8218c3ace8 100644
--- a/docs/c-runtime-library/fseek-lseek-constants.md
+++ b/docs/c-runtime-library/fseek-lseek-constants.md
@@ -2,7 +2,7 @@
description: "Learn more about: fseek, _lseek Constants"
title: "fseek, _lseek Constants"
ms.date: "11/04/2016"
-f1_keywords: ["SEEK_END", "SEEK_SET", "SEEK_CUR"]
+f1_keywords: ["STDIO/SEEK_END", "STDIO/SEEK_SET", "STDIO/SEEK_CUR", "SEEK_END", "SEEK_SET", "SEEK_CUR"]
helpviewer_keywords: ["SEEK_SET constant", "SEEK_END constant", "SEEK_CUR constant"]
ms.assetid: 9deeb13e-5aa3-4c33-80d8-721c80a4de9d
---
diff --git a/docs/c-runtime-library/heap-constants.md b/docs/c-runtime-library/heap-constants.md
index efe4319949..71ae99a468 100644
--- a/docs/c-runtime-library/heap-constants.md
+++ b/docs/c-runtime-library/heap-constants.md
@@ -2,7 +2,7 @@
description: "Learn more about: Heap Constants"
title: "Heap Constants"
ms.date: "11/04/2016"
-f1_keywords: ["_HEAPBADPTR", "_HEAPEMPTY", "_HEAPBADBEGIN", "_HEAPOK", "_HEAPBADNODE", "_HEAPEND"]
+f1_keywords: ["MALLOC/_HEAPBADPTR", "MALLOC/_HEAPEMPTY", "MALLOC/_HEAPBADBEGIN", "MALLOC/_HEAPOK", "MALLOC/_HEAPBADNODE", "MALLOC/_HEAPEND", "_HEAPBADPTR", "_HEAPEMPTY", "_HEAPBADBEGIN", "_HEAPOK", "_HEAPBADNODE", "_HEAPEND"]
helpviewer_keywords: ["_HEAPOK constants", "_HEAPEND constants", "HEAPBADBEGIN constants", "_HEAPBADNODE constants", "HEAPBADNODE constants", "HEAPBADPTR constants", "_HEAPEMPTY constants", "HEAPEND constants", "HEAPOK constants", "HEAPEMPTY constants", "_HEAPBADBEGIN constants", "_HEAPBADPTR constants", "heap constants"]
ms.assetid: 3f751bb9-2dc4-486f-b5f5-9061c96d3754
---
diff --git a/docs/c-runtime-library/heap-maxreq.md b/docs/c-runtime-library/heap-maxreq.md
index 168783f841..e0b2918230 100644
--- a/docs/c-runtime-library/heap-maxreq.md
+++ b/docs/c-runtime-library/heap-maxreq.md
@@ -2,7 +2,7 @@
description: "Learn more about: _HEAP_MAXREQ"
title: "_HEAP_MAXREQ"
ms.date: "11/04/2016"
-f1_keywords: ["HEAP_MAXREQ", "_HEAP_MAXREQ"]
+f1_keywords: ["HEAP_MAXREQ", "MALLOC/_HEAP_MAXREQ", "_HEAP_MAXREQ"]
helpviewer_keywords: ["HEAP_MAXREQ constants", "_HEAP_MAXREQ constants", "heap constants"]
ms.assetid: c2dbc2ea-35ad-45d8-b459-d76ba0089ff7
---
diff --git a/docs/c-runtime-library/heapset.md b/docs/c-runtime-library/heapset.md
index 98b435fbb4..71dcd09725 100644
--- a/docs/c-runtime-library/heapset.md
+++ b/docs/c-runtime-library/heapset.md
@@ -1,6 +1,6 @@
---
-description: "Learn more about: _heapset"
title: "_heapset"
+description: "Learn more about: _heapset"
ms.date: "11/04/2016"
api_name: ["_heapset"]
api_location: ["msvcr90.dll", "msvcr80.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcrt.dll", "msvcr120.dll", "msvcr100.dll"]
@@ -8,7 +8,6 @@ api_type: ["DLLExport"]
topic_type: ["apiref"]
f1_keywords: ["_heapset", "heapset"]
helpviewer_keywords: ["checking heap", "heapset function", "heaps, checking", "debugging [CRT], heap-related problems", "_heapset function"]
-ms.assetid: 9667eeb0-55bc-4c19-af5f-d1fd0a142b3c
---
# `_heapset`
@@ -47,7 +46,7 @@ In addition, if an error occurs, **`_heapset`** sets `errno` to `ENOSYS`.
The **`_heapset`** function shows free memory locations or nodes that have been unintentionally overwritten.
-**`_heapset`** checks for minimal consistency on the heap and then sets each byte of the heap's free entries to the `fill` value. This known value shows which memory locations of the heap contain free nodes and which contain data that were unintentionally written to freed memory. If the operating system doesn't support **`_heapset`**(for example, Windows 98), the function returns `_HEAPOK` and sets `errno` to `ENOSYS`.
+**`_heapset`** checks for minimal consistency on the heap and then sets each byte of the heap's free entries to the `fill` value. This known value shows which memory locations of the heap contain free nodes and which contain data that were unintentionally written to freed memory. If the operating system doesn't support **`_heapset`** (for example, Windows 98), the function returns `_HEAPOK` and sets `errno` to `ENOSYS`.
## Requirements
diff --git a/docs/c-runtime-library/huge-val-huge.md b/docs/c-runtime-library/huge-val-huge.md
index 26ee64947d..98eaf2b2ea 100644
--- a/docs/c-runtime-library/huge-val-huge.md
+++ b/docs/c-runtime-library/huge-val-huge.md
@@ -6,7 +6,7 @@ api_name: ["_HUGE"]
api_location: ["msvcrt.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["_HUGE", "HUGE_VAL"]
+f1_keywords: ["CORECRT_MATH/HUGE_VAL", "CORECRT_MATH/HUGE_VALF", "CORECRT_MATH/HUGE_VALL", "CORECRT_MATH/HUGE", "CORECRT_MATH/_HUGE", "HUGE_VAL", "HUGE_VALF", "HUGE_VALL", "HUGE", "_HUGE"]
helpviewer_keywords: ["_HUGE constant", "HUGE_VAL constant", "double value"]
ms.assetid: 3f044b45-02cd-46b2-b1de-87fd0441dd6a
---
@@ -20,7 +20,7 @@ ms.assetid: 3f044b45-02cd-46b2-b1de-87fd0441dd6a
## Remarks
-`HUGE_VAL` is the largest representable double value. This value is returned by many run-time math functions when an error occurs. For some functions, -`HUGE_VAL` is returned. `HUGE_VAL` is defined as `_HUGE`, but run-time math functions return `HUGE_VAL`. You should also use `HUGE_VAL` in your code for consistency.
+`HUGE_VAL` is the largest representable double value. This value is returned by many run-time math functions when an error occurs. For some functions, `-HUGE_VAL` is returned. `HUGE_VAL` is defined as the result of a floating-point product that is guaranteed to overflow. `HUGE_VALF` and `HUGE_VALL` are the largest representable `float` and `long double` typed values, respectively. The internal value `_HUGE` and the synonymous `HUGE` are defined similarly, but run-time math functions return `HUGE_VAL`. You should also use `HUGE_VAL` in your code for consistency.
## See also
diff --git a/docs/c-runtime-library/internal-crt-globals-and-functions.md b/docs/c-runtime-library/internal-crt-globals-and-functions.md
index 8fa090cdd9..e9b6ae617b 100644
--- a/docs/c-runtime-library/internal-crt-globals-and-functions.md
+++ b/docs/c-runtime-library/internal-crt-globals-and-functions.md
@@ -2,12 +2,12 @@
description: "Learn more about: Internal CRT Globals and Functions"
title: "Internal CRT Globals and Functions"
ms.date: "1/14/2021"
-api_name: ["__acrt_iob_func", "__AdjustPointer", "_assert", "__badioinfo", "__BuildCatchObject", "__BuildCatchObjectHelper", "__C_specific_handler", "_calloc_base", "_chkesp", "__chkstk", "_chkstk", "_chvalidator", "_chvalidator_l", "_CIacos", "_CIasin", "_CIcosh", "_CIsinh", "_CItanh", "__clean_type_info_names_internal", "_commode", "_configure_narrow_argv", "_configure_wide_argv", "__conio_common_vcprintf", "__conio_common_vcprintf_p", "__conio_common_vcprintf_s", "__conio_common_vcscanf", "__conio_common_vcwprintf", "__conio_common_vcwprintf_p", "__conio_common_vcwprintf_s", "__conio_common_vcwscanf", "__CppXcptFilter", "__create_locale", "_crt_at_quick_exit", "_crt_atexit", "_crtAssertBusy", "_crtBreakAlloc", "__crtCompareStringA", "__crtCompareStringEx", "__crtCompareStringW", "__crtCreateEventExW", "__crtCreateSemaphoreExW", "__crtCreateSymbolicLinkW", "_crt_debugger_hook", "__crtEnumSystemLocalesEx", "__crtFlsAlloc", "__crtFlsFree", "__crtFlsGetValue", "__crtFlsSetValue", "_CrtGetCheckCount", "__crtGetDateFormatEx", "__crtGetFileInformationByHandleEx", "__crtGetLocaleInfoEx", "__crtGetShowWindowMode", "__crtGetTickCount64", "__crtGetTimeFormatEx", "__crtGetUserDefaultLocaleName", "__crtInitializeCriticalSectionEx", "__crtIsPackagedApp", "__crtIsValidLocaleName", "__crtLCMapStringA", "__crtLCMapStringEx", "_CrtSetCheckCount", "_CrtSetDbgBlockType", "__crtSetFileInformationByHandle", "__crtSetThreadStackGuarantee", "__crtSetUnhandledExceptionFilter", "__crtSleep", "__crtTerminateProcess", "__crtUnhandledException", "__CxxDetectRethrow", "__CxxExceptionFilter", "__CxxFrameHandler2", "__CxxFrameHandler3", "__CxxLongjmpUnwind", "__CxxQueryExceptionSize", "__CxxRegisterExceptionObject", "_CxxThrowException", "__CxxUnregisterExceptionObject", "__daylight", "_dclass", "__DestructExceptionObject", "__doserrno", "_dosmaperr", "_dpcomp", "_dsign", "__dstbias", "_dtest", "_EH_prolog", "_errno", "_except_handler2", "_except_handler4_common", "_except1", "_fdclass", "_fdpcomp", "_fdsign", "_fdtest", "_filbuf", "_FindAndUnlinkFrame", "_flsbuf", "__fpe_flt_rounds", "_FPE_Raise", "__fpecode", "__FrameUnwindFilter", "_fread_nolock_s", "_free_base", "__free_locale", "_freea_s", "_freefls", "_ftol", "__get_current_locale", "__get_flsindex", "_get_initial_narrow_environment", "_get_initial_wide_environment", "_get_narrow_winmain_command_line", "_get_stream_buffer_pointers", "__get_tlsindex", "_get_wide_winmain_command_line", "_Getdays", "_Getmonths", "__GetPlatformExceptionInfo", "_getptd", "_Gettnames", "_global_unwind2", "_inconsistency", "__initenv", "_initialize_lconv_for_unsigned_char", "_initialize_narrow_environment", "_initialize_wide_environment", "_initptd", "_invalid_parameter", "_invoke_watson", "__iob_func", "_IsExceptionObjectToBeDestroyed", "__lconv", "__lconv_init", "_ldclass", "_ldpcomp", "_ldsign", "_ldtest", "__libm_sse2_acos", "_libm_sse2_acos_precise", "__libm_sse2_acosf", "__libm_sse2_asin", "_libm_sse2_asin_precise", "__libm_sse2_asinf", "__libm_sse2_atan", "_libm_sse2_atan_precise", "__libm_sse2_atan2", "__libm_sse2_atanf", "__libm_sse2_cos", "_libm_sse2_cos_precise", "__libm_sse2_cosf", "__libm_sse2_exp", "_libm_sse2_exp_precise", "__libm_sse2_expf", "__libm_sse2_log", "_libm_sse2_log_precise", "__libm_sse2_log10", "_libm_sse2_log10_precise", "__libm_sse2_log10f", "__libm_sse2_logf", "__libm_sse2_pow", "_libm_sse2_pow_precise", "__libm_sse2_powf", "__libm_sse2_sin", "_libm_sse2_sin_precise", "__libm_sse2_sinf", "_libm_sse2_sqrt_precise", "__libm_sse2_tan", "_libm_sse2_tan_precise", "__libm_sse2_tanf", "_local_unwind4", "_lock_locales", "_longjmpex", "_malloc_base", "_mbctype", "_NLG_Dispatch2", "_NLG_Return", "_NLG_Return2", "__p___argc", "__p___argv", "__p___initenv", "__p___wargv", "__p___winitenv", "__p__acmdln", "__p__crtAssertBusy", "__p__crtBreakAlloc", "__p__crtDbgFlag", "__p__daylight", "__p__dstbias", "__p__environ", "__p__iob", "__p__mbcasemap", "__p__mbctype", "__p__pctype", "__p__pgmptr", "__p__pwctype", "__p__timezone", "__p__tzname", "__p__wcmdln", "__p__wenviron", "__p__wpgmptr", "_pctype", "__pioinfo", "_pwctype", "__pwctype_func", "__pxcptinfoptrs", "_query_app_type", "_realloc_base", "_register_thread_local_exe_atexit_callback", "__report_gsfailure", "__RTCastToVoid", "__RTtypeid", "_seh_filter_dll", "_seh_filter_exe", "_seh_longjmp_unwind", "_seh_longjmp_unwind4", "_set_malloc_crt_max_wait", "__setlc_active", "_SetWinRTOutOfMemoryExceptionCallback", "_sopen_dispatch", "__std_exception_copy", "__std_exception_destroy", "__std_type_info_destroy_list", "__std_type_info_name", "__stdio_common_vfprintf", "__stdio_common_vfprintf_p", "__stdio_common_vfprintf_s", "__stdio_common_vfscanf", "__stdio_common_vfwprintf", "__stdio_common_vfwprintf_p", "__stdio_common_vfwprintf_s", "__stdio_common_vfwscanf", "__stdio_common_vsnprintf_s", "__stdio_common_vsnwprintf_s", "__stdio_common_vsprintf", "__stdio_common_vsprintf_p", "__stdio_common_vsprintf_s", "__stdio_common_vsscanf", "__stdio_common_vswprintf", "__stdio_common_vswprintf_p", "__stdio_common_vswprintf_s", "__stdio_common_vswscanf", "_Strftime", "__STRINGTOLD", "__STRINGTOLD_L", "__strncnt", "__sys_errlist", "__sys_nerr", "__threadhandle", "__threadid", "__timezone", "__TypeMatch", "__tzname", "__unDName", "__unDNameEx", "__unDNameHelper", "__unguarded_readlc_active", "_unloaddll", "_unlock_locales", "_vacopy", "_ValidateExecute", "_ValidateRead", "_ValidateWrite", "_VCrtDbgReportA", "_VCrtDbgReportW", "_W_Getdays", "_W_Getmonths", "_W_Getnames", "_W_Gettnames", "_wassert", "_Wcsftime", "__wcsncnt", "__winitenv", "_wsopen_dispatch", "_Xbad_alloc", "_Xlength_error", "_o__CIacos", "_o__CIasin", "_o__CIcosh", "_o__CIsinh", "_o__CItanh", "_o__Getdays", "_o__Getmonths", "_o__Gettnames", "_o__Strftime", "_o__W_Getdays", "_o__W_Getmonths", "_o__Wcsftime", "_o___acrt_iob_func", "_o___conio_common_vcprintf", "_o___conio_common_vcprintf_p", "_o___conio_common_vcprintf_s", "_o___conio_common_vcscanf", "_o___conio_common_vcwprintf", "_o___conio_common_vcwprintf_p", "_o___conio_common_vcwprintf_s", "_o___conio_common_vcwscanf", "_o___fpe_flt_rounds", "_o___libm_sse2_acos", "_o___libm_sse2_acosf", "_o___libm_sse2_asin", "_o___libm_sse2_asinf", "_o___libm_sse2_atan", "_o___libm_sse2_atan2", "_o___libm_sse2_atanf", "_o___libm_sse2_cos", "_o___libm_sse2_cosf", "_o___libm_sse2_exp", "_o___libm_sse2_expf", "_o___libm_sse2_log", "_o___libm_sse2_log10", "_o___libm_sse2_log10f", "_o___libm_sse2_logf", "_o___libm_sse2_pow", "_o___libm_sse2_powf", "_o___libm_sse2_sin", "_o___libm_sse2_sinf", "_o___libm_sse2_tan", "_o___libm_sse2_tanf", "_o___p___argc", "_o___p___argv", "_o___p___wargv", "_o___p__acmdln", "_o___p__environ", "_o___p__mbcasemap", "_o___p__mbctype", "_o___p__pgmptr", "_o___p__wcmdln", "_o___p__wenviron", "_o___p__wpgmptr", "_o___pwctype_func", "_o___std_exception_copy", "_o___std_exception_destroy", "_o___std_type_info_destroy_list", "_o___stdio_common_vfprintf", "_o___stdio_common_vfprintf_p", "_o___stdio_common_vfprintf_s", "_o___stdio_common_vfscanf", "_o___stdio_common_vfwprintf", "_o___stdio_common_vfwprintf_p", "_o___stdio_common_vfwprintf_s", "_o___stdio_common_vfwscanf", "_o___stdio_common_vsnprintf_s", "_o___stdio_common_vsnwprintf_s", "_o___stdio_common_vsprintf", "_o___stdio_common_vsprintf_p", "_o___stdio_common_vsprintf_s", "_o___stdio_common_vsscanf", "_o___stdio_common_vswprintf", "_o___stdio_common_vswprintf_p", "_o___stdio_common_vswprintf_s", "_o___stdio_common_vswscanf", "_o___timezone", "_o___tzname", "_o__calloc_base", "_o__configure_narrow_argv", "_o__configure_wide_argv", "_o__crt_atexit", "_o__errno", "_o__except1", "_o__free_base", "_o__get_initial_narrow_environment", "_o__get_initial_wide_environment", "_o__get_narrow_winmain_command_line", "_o__get_stream_buffer_pointers", "_o__get_wide_winmain_command_line", "_o__initialize_narrow_environment", "_o__initialize_wide_environment", "_o__libm_sse2_acos_precise", "_o__libm_sse2_asin_precise", "_o__libm_sse2_atan_precise", "_o__libm_sse2_cos_precise", "_o__libm_sse2_exp_precise", "_o__libm_sse2_log10_precise", "_o__libm_sse2_log_precise", "_o__libm_sse2_pow_precise", "_o__libm_sse2_sin_precise", "_o__libm_sse2_sqrt_precise", "_o__libm_sse2_tan_precise", "_o__malloc_base", "_o__realloc_base", "_o__sopen_dispatch", "_o__wsopen_dispatch"]
+api_name: ["__acrt_iob_func", "__AdjustPointer", "__badioinfo", "__BuildCatchObject", "__BuildCatchObjectHelper", "__C_specific_handler", "_calloc_base", "_chkesp", "__chkstk", "_chkstk", "_chvalidator", "_chvalidator_l", "_CIacos", "_CIasin", "_CIcosh", "_CIsinh", "_CItanh", "__clean_type_info_names_internal", "_commode", "_configure_narrow_argv", "_configure_wide_argv", "__conio_common_vcprintf", "__conio_common_vcprintf_p", "__conio_common_vcprintf_s", "__conio_common_vcscanf", "__conio_common_vcwprintf", "__conio_common_vcwprintf_p", "__conio_common_vcwprintf_s", "__conio_common_vcwscanf", "__CppXcptFilter", "__create_locale", "_crt_at_quick_exit", "_crt_atexit", "_crtAssertBusy", "_crtBreakAlloc", "__crtCompareStringA", "__crtCompareStringEx", "__crtCompareStringW", "__crtCreateEventExW", "__crtCreateSemaphoreExW", "__crtCreateSymbolicLinkW", "_crt_debugger_hook", "__crtEnumSystemLocalesEx", "__crtFlsAlloc", "__crtFlsFree", "__crtFlsGetValue", "__crtFlsSetValue", "_CrtGetCheckCount", "__crtGetDateFormatEx", "__crtGetFileInformationByHandleEx", "__crtGetLocaleInfoEx", "__crtGetShowWindowMode", "__crtGetTickCount64", "__crtGetTimeFormatEx", "__crtGetUserDefaultLocaleName", "__crtInitializeCriticalSectionEx", "__crtIsPackagedApp", "__crtIsValidLocaleName", "__crtLCMapStringA", "__crtLCMapStringEx", "_CrtSetCheckCount", "_CrtSetDbgBlockType", "__crtSetFileInformationByHandle", "__crtSetThreadStackGuarantee", "__crtSetUnhandledExceptionFilter", "__crtSleep", "__crtTerminateProcess", "__crtUnhandledException", "__CxxDetectRethrow", "__CxxExceptionFilter", "__CxxFrameHandler2", "__CxxFrameHandler3", "__CxxLongjmpUnwind", "__CxxQueryExceptionSize", "__CxxRegisterExceptionObject", "_CxxThrowException", "__CxxUnregisterExceptionObject", "__DestructExceptionObject", "__doserrno", "_dosmaperr", "_EH_prolog", "_errno", "_except_handler", "_except_handler2", "_except_handler4_common", "_except1", "_filbuf", "_FindAndUnlinkFrame", "_flsbuf", "__fpe_flt_rounds", "_FPE_Raise", "__fpecode", "__FrameUnwindFilter", "_fread_nolock_s", "_free_base", "__free_locale", "_freea_s", "_freefls", "_ftol", "__get_current_locale", "__get_flsindex", "_get_initial_narrow_environment", "_get_initial_wide_environment", "_get_narrow_winmain_command_line", "_get_stream_buffer_pointers", "__get_tlsindex", "_get_wide_winmain_command_line", "_Getdays", "_Getmonths", "__GetPlatformExceptionInfo", "_getptd", "_Gettnames", "_global_unwind2", "_inconsistency", "__initenv", "_initialize_lconv_for_unsigned_char", "_initialize_narrow_environment", "_initialize_wide_environment", "_initptd", "_invalid_parameter", "_invoke_watson", "__iob_func", "_IsExceptionObjectToBeDestroyed", "__lconv", "__lconv_init", "__libm_sse2_acos", "_libm_sse2_acos_precise", "__libm_sse2_acosf", "__libm_sse2_asin", "_libm_sse2_asin_precise", "__libm_sse2_asinf", "__libm_sse2_atan", "_libm_sse2_atan_precise", "__libm_sse2_atan2", "__libm_sse2_atanf", "__libm_sse2_cos", "_libm_sse2_cos_precise", "__libm_sse2_cosf", "__libm_sse2_exp", "_libm_sse2_exp_precise", "__libm_sse2_expf", "__libm_sse2_log", "_libm_sse2_log_precise", "__libm_sse2_log10", "_libm_sse2_log10_precise", "__libm_sse2_log10f", "__libm_sse2_logf", "__libm_sse2_pow", "_libm_sse2_pow_precise", "__libm_sse2_powf", "__libm_sse2_sin", "_libm_sse2_sin_precise", "__libm_sse2_sinf", "_libm_sse2_sqrt_precise", "__libm_sse2_tan", "_libm_sse2_tan_precise", "__libm_sse2_tanf", "_local_unwind4", "_lock_locales", "_longjmpex", "_malloc_base", "_mbctype", "_NLG_Dispatch2", "_NLG_Return", "_NLG_Return2", "__p___argc", "__p___argv", "__p___initenv", "__p___wargv", "__p___winitenv", "__p__acmdln", "__p__crtAssertBusy", "__p__crtBreakAlloc", "__p__crtDbgFlag", "__p__daylight", "__p__dstbias", "__p__environ", "__p__iob", "__p__mbcasemap", "__p__mbctype", "__p__pctype", "__p__pgmptr", "__p__pwctype", "__p__timezone", "__p__tzname", "__p__wcmdln", "__p__wenviron", "__p__wpgmptr", "__pioinfo", "__pwctype_func", "__pxcptinfoptrs", "_query_app_type", "_realloc_base", "_register_thread_local_exe_atexit_callback", "__report_gsfailure", "__RTCastToVoid", "__RTtypeid", "_seh_filter_dll", "_seh_filter_exe", "_seh_longjmp_unwind", "_seh_longjmp_unwind4", "_set_malloc_crt_max_wait", "__setlc_active", "_SetWinRTOutOfMemoryExceptionCallback", "_sopen_dispatch", "__std_exception_copy", "__std_exception_destroy", "__std_type_info_destroy_list", "__std_type_info_name", "__stdio_common_vfprintf", "__stdio_common_vfprintf_p", "__stdio_common_vfprintf_s", "__stdio_common_vfscanf", "__stdio_common_vfwprintf", "__stdio_common_vfwprintf_p", "__stdio_common_vfwprintf_s", "__stdio_common_vfwscanf", "__stdio_common_vsnprintf_s", "__stdio_common_vsnwprintf_s", "__stdio_common_vsprintf", "__stdio_common_vsprintf_p", "__stdio_common_vsprintf_s", "__stdio_common_vsscanf", "__stdio_common_vswprintf", "__stdio_common_vswprintf_p", "__stdio_common_vswprintf_s", "__stdio_common_vswscanf", "_Strftime", "__STRINGTOLD", "__STRINGTOLD_L", "__strncnt", "__sys_errlist", "__sys_nerr", "__threadhandle", "__threadid", "__timezone", "__TypeMatch", "__tzname", "__unDName", "__unDNameEx", "__unDNameHelper", "__unguarded_readlc_active", "_unloaddll", "_unlock_locales", "_vacopy", "_ValidateExecute", "_ValidateRead", "_ValidateWrite", "_VCrtDbgReportA", "_VCrtDbgReportW", "_W_Getdays", "_W_Getmonths", "_W_Getnames", "_W_Gettnames", "_Wcsftime", "__wcsncnt", "__winitenv", "_wsopen_dispatch", "_Xbad_alloc", "_Xlength_error", "_o__CIacos", "_o__CIasin", "_o__CIcosh", "_o__CIsinh", "_o__CItanh", "_o__Getdays", "_o__Getmonths", "_o__Gettnames", "_o__Strftime", "_o__W_Getdays", "_o__W_Getmonths", "_o__Wcsftime", "_o___acrt_iob_func", "_o___conio_common_vcprintf", "_o___conio_common_vcprintf_p", "_o___conio_common_vcprintf_s", "_o___conio_common_vcscanf", "_o___conio_common_vcwprintf", "_o___conio_common_vcwprintf_p", "_o___conio_common_vcwprintf_s", "_o___conio_common_vcwscanf", "_o___fpe_flt_rounds", "_o___libm_sse2_acos", "_o___libm_sse2_acosf", "_o___libm_sse2_asin", "_o___libm_sse2_asinf", "_o___libm_sse2_atan", "_o___libm_sse2_atan2", "_o___libm_sse2_atanf", "_o___libm_sse2_cos", "_o___libm_sse2_cosf", "_o___libm_sse2_exp", "_o___libm_sse2_expf", "_o___libm_sse2_log", "_o___libm_sse2_log10", "_o___libm_sse2_log10f", "_o___libm_sse2_logf", "_o___libm_sse2_pow", "_o___libm_sse2_powf", "_o___libm_sse2_sin", "_o___libm_sse2_sinf", "_o___libm_sse2_tan", "_o___libm_sse2_tanf", "_o___p___argc", "_o___p___argv", "_o___p___wargv", "_o___p__acmdln", "_o___p__environ", "_o___p__mbcasemap", "_o___p__mbctype", "_o___p__pgmptr", "_o___p__wcmdln", "_o___p__wenviron", "_o___p__wpgmptr", "_o___pwctype_func", "_o___std_exception_copy", "_o___std_exception_destroy", "_o___std_type_info_destroy_list", "_o___stdio_common_vfprintf", "_o___stdio_common_vfprintf_p", "_o___stdio_common_vfprintf_s", "_o___stdio_common_vfscanf", "_o___stdio_common_vfwprintf", "_o___stdio_common_vfwprintf_p", "_o___stdio_common_vfwprintf_s", "_o___stdio_common_vfwscanf", "_o___stdio_common_vsnprintf_s", "_o___stdio_common_vsnwprintf_s", "_o___stdio_common_vsprintf", "_o___stdio_common_vsprintf_p", "_o___stdio_common_vsprintf_s", "_o___stdio_common_vsscanf", "_o___stdio_common_vswprintf", "_o___stdio_common_vswprintf_p", "_o___stdio_common_vswprintf_s", "_o___stdio_common_vswscanf", "_o___timezone", "_o___tzname", "_o__calloc_base", "_o__configure_narrow_argv", "_o__configure_wide_argv", "_o__crt_atexit", "_o__errno", "_o__except1", "_o__free_base", "_o__get_initial_narrow_environment", "_o__get_initial_wide_environment", "_o__get_narrow_winmain_command_line", "_o__get_stream_buffer_pointers", "_o__get_wide_winmain_command_line", "_o__initialize_narrow_environment", "_o__initialize_wide_environment", "_o__libm_sse2_acos_precise", "_o__libm_sse2_asin_precise", "_o__libm_sse2_atan_precise", "_o__libm_sse2_cos_precise", "_o__libm_sse2_exp_precise", "_o__libm_sse2_log10_precise", "_o__libm_sse2_log_precise", "_o__libm_sse2_pow_precise", "_o__libm_sse2_sin_precise", "_o__libm_sse2_sqrt_precise", "_o__libm_sse2_tan_precise", "_o__malloc_base", "_o__realloc_base", "_o__sopen_dispatch", "_o__wsopen_dispatch"]
api_location: ["api-ms-win-crt-math-l1-1-0.dll", "api-ms-win-crt-heap-l1-1-0.dll", "api-ms-win-crt-runtime-l1-1-0.dll", "api-ms-win-crt-stdio-l1-1-0.dll", "api-ms-win-crt-locale-l1-1-0.dll", "api-ms-win-core-crt-l1-1-0.dll", "api-ms-win-crt-time-l1-1-0.dll", "api-ms-win-crt-process-l1-1-0.dll", "api-ms-win-crt-multibyte-l1-1-0.dll", "api-ms-win-crt-string-l1-1-0.dll", "api-ms-win-crt-conio-l1-1-0.dll", "vcruntime140_app.dll", "msvcp140_app.dll", "ntdll.dll", "ntoskrnl.exe", "api-ms-win-crt-environment-l1-1-0.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["__acrt_iob_func", "__AdjustPointer", "__badioinfo", "__BuildCatchObject", "__BuildCatchObjectHelper", "__C_specific_handler", "_calloc_base", "_chkesp", "__chkstk", "_chkstk", "_chvalidator", "_chvalidator_l", "_CIacos", "_CIasin", "_CIcosh", "_CIsinh", "_CItanh", "__clean_type_info_names_internal", "_commode", "_configure_narrow_argv", "_configure_wide_argv", "__conio_common_vcprintf", "__conio_common_vcprintf_p", "__conio_common_vcprintf_s", "__conio_common_vcscanf", "__conio_common_vcwprintf", "__conio_common_vcwprintf_p", "__conio_common_vcwprintf_s", "__conio_common_vcwscanf", "__CppXcptFilter", "_crt_at_quick_exit", "_crt_atexit", "_crtAssertBusy", "_crtBreakAlloc", "__crtCompareStringA", "__crtCompareStringEx", "__crtCompareStringW", "__crtCreateEventExW", "__crtCreateSemaphoreExW", "__crtCreateSymbolicLinkW", "_crt_debugger_hook", "__crtEnumSystemLocalesEx", "__crtFlsAlloc", "__crtFlsFree", "__crtFlsGetValue", "__crtFlsSetValue", "_CrtGetCheckCount", "__crtGetDateFormatEx", "__crtGetFileInformationByHandleEx", "__crtGetLocaleInfoEx", "__crtGetShowWindowMode", "__crtGetTickCount64", "__crtGetTimeFormatEx", "__crtGetUserDefaultLocaleName", "__crtInitializeCriticalSectionEx", "__crtIsPackagedApp", "__crtIsValidLocaleName", "__crtLCMapStringA", "__crtLCMapStringEx", "_CrtSetCheckCount", "_CrtSetDbgBlockType", "__crtSetFileInformationByHandle", "__crtSetThreadStackGuarantee", "__crtSetUnhandledExceptionFilter", "__crtSleep", "__crtTerminateProcess", "__crtUnhandledException", "__CxxDetectRethrow", "__CxxExceptionFilter", "__CxxFrameHandler2", "__CxxFrameHandler3", "__CxxLongjmpUnwind", "__CxxQueryExceptionSize", "__CxxRegisterExceptionObject", "__CxxUnregisterExceptionObject", "__daylight", "__DestructExceptionObject", "__doserrno", "_dosmaperr", "_EH_prolog", "_errno", "_except_handler2", "_except_handler4_common", "_except1", "_filbuf", "_FindAndUnlinkFrame", "_flsbuf", "__fpe_flt_rounds", "_FPE_Raise", "__fpecode", "__FrameUnwindFilter", "_free_base", "_freea_s", "_freefls", "_ftol", "__get_flsindex", "_get_initial_narrow_environment", "_get_initial_wide_environment", "_get_narrow_winmain_command_line", "_get_stream_buffer_pointers", "__get_tlsindex", "_get_wide_winmain_command_line", "_Getdays", "_Getmonths", "__GetPlatformExceptionInfo", "_getptd", "_Gettnames", "_global_unwind2", "_inconsistency", "__initenv", "_initialize_lconv_for_unsigned_char", "_initialize_narrow_environment", "_initialize_wide_environment", "_initptd", "__iob_func", "_IsExceptionObjectToBeDestroyed", "__lconv", "__lconv_init", "__libm_sse2_acos", "_libm_sse2_acos_precise", "__libm_sse2_acosf", "__libm_sse2_asin", "_libm_sse2_asin_precise", "__libm_sse2_asinf", "__libm_sse2_atan", "_libm_sse2_atan_precise", "__libm_sse2_atan2", "__libm_sse2_atanf", "__libm_sse2_cos", "_libm_sse2_cos_precise", "__libm_sse2_cosf", "__libm_sse2_exp", "_libm_sse2_exp_precise", "__libm_sse2_expf", "__libm_sse2_log", "_libm_sse2_log_precise", "__libm_sse2_log10", "_libm_sse2_log10_precise", "__libm_sse2_log10f", "__libm_sse2_logf", "__libm_sse2_pow", "_libm_sse2_pow_precise", "__libm_sse2_powf", "__libm_sse2_sin", "_libm_sse2_sin_precise", "__libm_sse2_sinf", "_libm_sse2_sqrt_precise", "__libm_sse2_tan", "_libm_sse2_tan_precise", "__libm_sse2_tanf", "_local_unwind4", "_lock_locales", "_longjmpex", "_malloc_base", "_NLG_Dispatch2", "_NLG_Return", "_NLG_Return2", "__p___argc", "__p___argv", "__p___initenv", "__p___wargv", "__p___winitenv", "__p__acmdln", "__p__crtAssertBusy", "__p__crtBreakAlloc", "__p__crtDbgFlag", "__p__daylight", "__p__dstbias", "__p__environ", "__p__iob", "__p__mbcasemap", "__p__mbctype", "__p__pctype", "__p__pgmptr", "__p__pwctype", "__p__timezone", "__p__tzname", "__p__wcmdln", "__p__wenviron", "__p__wpgmptr", "__pioinfo", "_pwctype", "__pwctype_func", "__pxcptinfoptrs", "_query_app_type", "_realloc_base", "_register_thread_local_exe_atexit_callback", "__report_gsfailure", "__RTCastToVoid", "__RTtypeid", "_seh_longjmp_unwind", "_seh_longjmp_unwind4", "_set_malloc_crt_max_wait", "__setlc_active", "_SetWinRTOutOfMemoryExceptionCallback", "_sopen_dispatch", "__std_exception_copy", "__std_exception_destroy", "__std_type_info_destroy_list", "__stdio_common_vfprintf", "__stdio_common_vfprintf_p", "__stdio_common_vfprintf_s", "__stdio_common_vfscanf", "__stdio_common_vfwprintf", "__stdio_common_vfwprintf_p", "__stdio_common_vfwprintf_s", "__stdio_common_vfwscanf", "__stdio_common_vsnprintf_s", "__stdio_common_vsnwprintf_s", "__stdio_common_vsprintf", "__stdio_common_vsprintf_p", "__stdio_common_vsprintf_s", "__stdio_common_vsscanf", "__stdio_common_vswprintf", "__stdio_common_vswprintf_p", "__stdio_common_vswprintf_s", "__stdio_common_vswscanf", "_Strftime", "__STRINGTOLD", "__STRINGTOLD_L", "__strncnt", "__threadhandle", "__threadid", "__timezone", "__TypeMatch", "__tzname", "__unDName", "__unDNameEx", "__unDNameHelper", "__unguarded_readlc_active", "_unlock_locales", "_vacopy", "_ValidateExecute", "_ValidateRead", "_ValidateWrite", "_VCrtDbgReportA", "_VCrtDbgReportW", "_W_Getdays", "_W_Getmonths", "_W_Getnames", "_Wcsftime", "__wcsncnt", "__winitenv", "_wsopen_dispatch", "_Xbad_alloc", "_Xlength_error"]
-helpviewer_keywords: ["__acrt_iob_func", "__AdjustPointer", "_assert", "__badioinfo", "__BuildCatchObject", "__BuildCatchObjectHelper", "__C_specific_handler", "_calloc_base", "_chkesp", "__chkstk", "_chkstk", "_chvalidator", "_chvalidator_l", "_CIacos", "_CIasin", "_CIcosh", "_CIsinh", "_CItanh", "__clean_type_info_names_internal", "_commode", "_configure_narrow_argv", "_configure_wide_argv", "__conio_common_vcprintf", "__conio_common_vcprintf_p", "__conio_common_vcprintf_s", "__conio_common_vcscanf", "__conio_common_vcwprintf", "__conio_common_vcwprintf_p", "__conio_common_vcwprintf_s", "__conio_common_vcwscanf", "__CppXcptFilter", "__create_locale", "_crt_at_quick_exit", "_crt_atexit", "_crtAssertBusy", "_crtBreakAlloc", "__crtCompareStringA", "__crtCompareStringEx", "__crtCompareStringW", "__crtCreateEventExW", "__crtCreateSemaphoreExW", "__crtCreateSymbolicLinkW", "_crt_debugger_hook", "__crtEnumSystemLocalesEx", "__crtFlsAlloc", "__crtFlsFree", "__crtFlsGetValue", "__crtFlsSetValue", "_CrtGetCheckCount", "__crtGetDateFormatEx", "__crtGetFileInformationByHandleEx", "__crtGetLocaleInfoEx", "__crtGetShowWindowMode", "__crtGetTickCount64", "__crtGetTimeFormatEx", "__crtGetUserDefaultLocaleName", "__crtInitializeCriticalSectionEx", "__crtIsPackagedApp", "__crtIsValidLocaleName", "__crtLCMapStringA", "__crtLCMapStringEx", "_CrtSetCheckCount", "_CrtSetDbgBlockType", "__crtSetFileInformationByHandle", "__crtSetThreadStackGuarantee", "__crtSetUnhandledExceptionFilter", "__crtSleep", "__crtTerminateProcess", "__crtUnhandledException", "__CxxDetectRethrow", "__CxxExceptionFilter", "__CxxFrameHandler2", "__CxxFrameHandler3", "__CxxLongjmpUnwind", "__CxxQueryExceptionSize", "__CxxRegisterExceptionObject", "_CxxThrowException", "__CxxUnregisterExceptionObject", "__daylight", "_dclass", "__DestructExceptionObject", "__doserrno", "_dosmaperr", "_dpcomp", "_dsign", "__dstbias", "_dtest", "_EH_prolog", "_errno", "_except_handler2", "_except_handler4_common", "_except1", "_fdclass", "_fdpcomp", "_fdsign", "_fdtest", "_filbuf", "_FindAndUnlinkFrame", "_flsbuf", "__fpe_flt_rounds", "_FPE_Raise", "__fpecode", "__FrameUnwindFilter", "_fread_nolock_s", "_free_base", "__free_locale", "_freea_s", "_freefls", "_ftol", "__get_current_locale", "__get_flsindex", "_get_initial_narrow_environment", "_get_initial_wide_environment", "_get_narrow_winmain_command_line", "_get_stream_buffer_pointers", "__get_tlsindex", "_get_wide_winmain_command_line", "_Getdays", "_Getmonths", "__GetPlatformExceptionInfo", "_getptd", "_Gettnames", "_global_unwind2", "_inconsistency", "__initenv", "_initialize_lconv_for_unsigned_char", "_initialize_narrow_environment", "_initialize_wide_environment", "_initptd", "_invalid_parameter", "_invoke_watson", "__iob_func", "_IsExceptionObjectToBeDestroyed", "__lconv", "__lconv_init", "_ldclass", "_ldpcomp", "_ldsign", "_ldtest", "__libm_sse2_acos", "_libm_sse2_acos_precise", "__libm_sse2_acosf", "__libm_sse2_asin", "_libm_sse2_asin_precise", "__libm_sse2_asinf", "__libm_sse2_atan", "_libm_sse2_atan_precise", "__libm_sse2_atan2", "__libm_sse2_atanf", "__libm_sse2_cos", "_libm_sse2_cos_precise", "__libm_sse2_cosf", "__libm_sse2_exp", "_libm_sse2_exp_precise", "__libm_sse2_expf", "__libm_sse2_log", "_libm_sse2_log_precise", "__libm_sse2_log10", "_libm_sse2_log10_precise", "__libm_sse2_log10f", "__libm_sse2_logf", "__libm_sse2_pow", "_libm_sse2_pow_precise", "__libm_sse2_powf", "__libm_sse2_sin", "_libm_sse2_sin_precise", "__libm_sse2_sinf", "_libm_sse2_sqrt_precise", "__libm_sse2_tan", "_libm_sse2_tan_precise", "__libm_sse2_tanf", "_local_unwind4", "_lock_locales", "_longjmpex", "_malloc_base", "_mbctype", "_NLG_Dispatch2", "_NLG_Return", "_NLG_Return2", "__p___argc", "__p___argv", "__p___initenv", "__p___wargv", "__p___winitenv", "__p__acmdln", "__p__crtAssertBusy", "__p__crtBreakAlloc", "__p__crtDbgFlag", "__p__daylight", "__p__dstbias", "__p__environ", "__p__iob", "__p__mbcasemap", "__p__mbctype", "__p__pctype", "__p__pgmptr", "__p__pwctype", "__p__timezone", "__p__tzname", "__p__wcmdln", "__p__wenviron", "__p__wpgmptr", "_pctype", "__pioinfo", "_pwctype", "__pwctype_func", "__pxcptinfoptrs", "_query_app_type", "_realloc_base", "_register_thread_local_exe_atexit_callback", "__report_gsfailure", "__RTCastToVoid", "__RTtypeid", "_seh_filter_dll", "_seh_filter_exe", "_seh_longjmp_unwind", "_seh_longjmp_unwind4", "_set_malloc_crt_max_wait", "__setlc_active", "_SetWinRTOutOfMemoryExceptionCallback", "_sopen_dispatch", "__std_exception_copy", "__std_exception_destroy", "__std_type_info_destroy_list", "__stdio_common_vfprintf", "__stdio_common_vfprintf_p", "__stdio_common_vfprintf_s", "__stdio_common_vfscanf", "__stdio_common_vfwprintf", "__stdio_common_vfwprintf_p", "__stdio_common_vfwprintf_s", "__stdio_common_vfwscanf", "__stdio_common_vsnprintf_s", "__stdio_common_vsnwprintf_s", "__stdio_common_vsprintf", "__stdio_common_vsprintf_p", "__stdio_common_vsprintf_s", "__stdio_common_vsscanf", "__stdio_common_vswprintf", "__stdio_common_vswprintf_p", "__stdio_common_vswprintf_s", "__stdio_common_vswscanf", "_Strftime", "__STRINGTOLD", "__STRINGTOLD_L", "__strncnt", "__sys_errlist", "__sys_nerr", "__threadhandle", "__threadid", "__timezone", "__TypeMatch", "__tzname", "__unDName", "__unDNameEx", "__unDNameHelper", "__unguarded_readlc_active", "_unloaddll", "_unlock_locales", "_vacopy", "_ValidateExecute", "_ValidateRead", "_ValidateWrite", "_VCrtDbgReportA", "_VCrtDbgReportW", "_W_Getdays", "_W_Getmonths", "_W_Getnames", "_wassert", "_Wcsftime", "__wcsncnt", "__winitenv", "_wsopen_dispatch", "_Xbad_alloc", "_Xlength_error"]
+f1_keywords: ["CORECRT_WSTDIO/__acrt_iob_func", "EXCPT/__C_specific_handler", "CORECRT_MALLOC/_calloc_base", "CTYPE/_chvalidator", "CTYPE/_chvalidator_l", "STDIO/_commode", "CORECRT_STARTUP/_configure_narrow_argv", "CORECRT_STARTUP/_configure_wide_argv", "CONIO/__conio_common_vcprintf", "CONIO/__conio_common_vcprintf_p", "CONIO/__conio_common_vcprintf_s", "CONIO/__conio_common_vcscanf", "CONIO/__conio_common_vcwprintf", "CONIO/__conio_common_vcwprintf_p", "CONIO/__conio_common_vcwprintf_s", "CONIO/__conio_common_vcwscanf", "CORECRT_STARTUP/_crt_at_quick_exit", "CORECRT_STARTUP/_crt_atexit", "CRTDBG/_crtAssertBusy", "CRTDBG/_crtBreakAlloc", "STDLIB/__doserrno", "STDDEF/_errno", "EXCPT/_except_handler", "FLOAT/__fpe_flt_rounds", "FLOAT/__fpecode", "CORECRT_MALLOC/_free_base", "CORECRT_STARTUP/_get_initial_narrow_environment", "CORECRT_STARTUP/_get_initial_wide_environment", "CORECRT_STARTUP/_get_narrow_winmain_command_line", "CORECRT_STARTUP/_get_wide_winmain_command_line", "STDIO/_get_stream_buffer_pointers", "LOCALE/_Getdays", "LOCALE/_Getmonths", "LOCALE/_Gettnames", "CORECRT_STARTUP/_initialize_narrow_environment", "CORECRT_STARTUP/_initialize_wide_environment", "LOCALE/_lock_locales", "CORECRT_MALLOC/_malloc_base", "STDLIB/__p___argc", "STDLIB/__p___argv", "STDLIB/__p___wargv", "CORECRT_STARTUP/__p__acmdln", "CRTDBG/__p__crtBreakAlloc", "CRTDBG/__p__crtDbgFlag", "STDLIB/__p__environ", "MBCTYPE/__p__mbcasemap", "MBCTYPE/__p__mbctype", "STDLIB/__p__pgmptr", "CORECRT_STARTUP/__p__wcmdln", "STDLIB/__p__wenviron", "STDLIB/__p__wpgmptr", "CORECRT_WCTYPE/__pwctype_func", "SIGNAL/__pxcptinfoptrs", "CORECRT_STARTUP/_query_app_type", "CORECRT_MALLOC/_realloc_base", "PROCESS/_register_thread_local_exe_atexit_callback", "VCRUNTIME/__report_gsfailure", "RTTIDATA/__RTCastToVoid", "RTTIDATA/__RTtypeid", "CORECRT_IO/_sopen_dispatch", "VCRUNTIME_EXCEPTION/__std_exception_copy", "VCRUNTIME_EXCEPTION/__std_exception_destroy", "STDIO/__stdio_common_vfprintf", "STDIO/__stdio_common_vfprintf_p", "STDIO/__stdio_common_vfprintf_s", "STDIO/__stdio_common_vfscanf", "STDIO/__stdio_common_vfwprintf", "STDIO/__stdio_common_vfwprintf_p", "STDIO/__stdio_common_vfwprintf_s", "STDIO/__stdio_common_vfwscanf", "STDIO/__stdio_common_vsnprintf_s", "STDIO/__stdio_common_vsnwprintf_s", "STDIO/__stdio_common_vsprintf", "STDIO/__stdio_common_vsprintf_p", "STDIO/__stdio_common_vsprintf_s", "STDIO/__stdio_common_vsscanf", "STDIO/__stdio_common_vswprintf", "STDIO/__stdio_common_vswprintf_p", "STDIO/__stdio_common_vswprintf_s", "STDIO/__stdio_common_vswscanf", "LOCALE/_Strftime", "STRING/__strncnt", "STDDEF/__threadhandle", "STDDEF/__threadid", "TIME/__timezone", "TIME/__tzname", "LOCALE/_unlock_locales", "CRTDBG/_VCrtDbgReportA", "CRTDBG/_VCrtDbgReportW", "LOCALE/_W_Getdays", "LOCALE/_W_Getmonths", "LOCALE/_W_Getgnames", "LOCALE/_Wcsftime", "TCHAR/__wcsncnt", "CORECRT_WIO/_wsopen_dispatch", "__acrt_iob_func", "__AdjustPointer", "__badioinfo", "__BuildCatchObject", "__BuildCatchObjectHelper", "__C_specific_handler", "_calloc_base", "_chkesp", "__chkstk", "_chkstk", "_chvalidator", "_chvalidator_l", "_CIacos", "_CIasin", "_CIcosh", "_CIsinh", "_CItanh", "__clean_type_info_names_internal", "_commode", "_configure_narrow_argv", "_configure_wide_argv", "__conio_common_vcprintf", "__conio_common_vcprintf_p", "__conio_common_vcprintf_s", "__conio_common_vcscanf", "__conio_common_vcwprintf", "__conio_common_vcwprintf_p", "__conio_common_vcwprintf_s", "__conio_common_vcwscanf", "__CppXcptFilter", "_crt_at_quick_exit", "_crt_atexit", "_crtAssertBusy", "_crtBreakAlloc", "__crtCompareStringA", "__crtCompareStringEx", "__crtCompareStringW", "__crtCreateEventExW", "__crtCreateSemaphoreExW", "__crtCreateSymbolicLinkW", "_crt_debugger_hook", "__crtEnumSystemLocalesEx", "__crtFlsAlloc", "__crtFlsFree", "__crtFlsGetValue", "__crtFlsSetValue", "_CrtGetCheckCount", "__crtGetDateFormatEx", "__crtGetFileInformationByHandleEx", "__crtGetLocaleInfoEx", "__crtGetShowWindowMode", "__crtGetTickCount64", "__crtGetTimeFormatEx", "__crtGetUserDefaultLocaleName", "__crtInitializeCriticalSectionEx", "__crtIsPackagedApp", "__crtIsValidLocaleName", "__crtLCMapStringA", "__crtLCMapStringEx", "_CrtSetCheckCount", "_CrtSetDbgBlockType", "__crtSetFileInformationByHandle", "__crtSetThreadStackGuarantee", "__crtSetUnhandledExceptionFilter", "__crtSleep", "__crtTerminateProcess", "__crtUnhandledException", "__CxxDetectRethrow", "__CxxExceptionFilter", "__CxxFrameHandler2", "__CxxFrameHandler3", "__CxxLongjmpUnwind", "__CxxQueryExceptionSize", "__CxxRegisterExceptionObject", "__CxxUnregisterExceptionObject", "__DestructExceptionObject", "__doserrno", "_dosmaperr", "_EH_prolog", "_errno", "_except_handler", "_except_handler2", "_except_handler4_common", "_except1", "_filbuf", "_FindAndUnlinkFrame", "_flsbuf", "__fpe_flt_rounds", "_FPE_Raise", "__fpecode", "__FrameUnwindFilter", "_free_base", "_freea_s", "_freefls", "_ftol", "__get_flsindex", "_get_initial_narrow_environment", "_get_initial_wide_environment", "_get_narrow_winmain_command_line", "_get_stream_buffer_pointers", "__get_tlsindex", "_get_wide_winmain_command_line", "_Getdays", "_Getmonths", "__GetPlatformExceptionInfo", "_getptd", "_Gettnames", "_global_unwind2", "_inconsistency", "__initenv", "_initialize_lconv_for_unsigned_char", "_initialize_narrow_environment", "_initialize_wide_environment", "_initptd", "__iob_func", "_IsExceptionObjectToBeDestroyed", "__lconv", "__lconv_init", "__libm_sse2_acos", "_libm_sse2_acos_precise", "__libm_sse2_acosf", "__libm_sse2_asin", "_libm_sse2_asin_precise", "__libm_sse2_asinf", "__libm_sse2_atan", "_libm_sse2_atan_precise", "__libm_sse2_atan2", "__libm_sse2_atanf", "__libm_sse2_cos", "_libm_sse2_cos_precise", "__libm_sse2_cosf", "__libm_sse2_exp", "_libm_sse2_exp_precise", "__libm_sse2_expf", "__libm_sse2_log", "_libm_sse2_log_precise", "__libm_sse2_log10", "_libm_sse2_log10_precise", "__libm_sse2_log10f", "__libm_sse2_logf", "__libm_sse2_pow", "_libm_sse2_pow_precise", "__libm_sse2_powf", "__libm_sse2_sin", "_libm_sse2_sin_precise", "__libm_sse2_sinf", "_libm_sse2_sqrt_precise", "__libm_sse2_tan", "_libm_sse2_tan_precise", "__libm_sse2_tanf", "_local_unwind4", "_lock_locales", "_longjmpex", "_malloc_base", "_NLG_Dispatch2", "_NLG_Return", "_NLG_Return2", "__p___argc", "__p___argv", "__p___initenv", "__p___wargv", "__p___winitenv", "__p__acmdln", "__p__crtAssertBusy", "__p__crtBreakAlloc", "__p__crtDbgFlag", "__p__daylight", "__p__dstbias", "__p__environ", "__p__iob", "__p__mbcasemap", "__p__mbctype", "__p__pctype", "__p__pgmptr", "__p__pwctype", "__p__timezone", "__p__tzname", "__p__wcmdln", "__p__wenviron", "__p__wpgmptr", "__pioinfo", "__pwctype_func", "__pxcptinfoptrs", "_query_app_type", "_realloc_base", "_register_thread_local_exe_atexit_callback", "__report_gsfailure", "__RTCastToVoid", "__RTtypeid", "_seh_longjmp_unwind", "_seh_longjmp_unwind4", "_set_malloc_crt_max_wait", "__setlc_active", "_SetWinRTOutOfMemoryExceptionCallback", "_sopen_dispatch", "__std_exception_copy", "__std_exception_destroy", "__std_type_info_destroy_list", "__stdio_common_vfprintf", "__stdio_common_vfprintf_p", "__stdio_common_vfprintf_s", "__stdio_common_vfscanf", "__stdio_common_vfwprintf", "__stdio_common_vfwprintf_p", "__stdio_common_vfwprintf_s", "__stdio_common_vfwscanf", "__stdio_common_vsnprintf_s", "__stdio_common_vsnwprintf_s", "__stdio_common_vsprintf", "__stdio_common_vsprintf_p", "__stdio_common_vsprintf_s", "__stdio_common_vsscanf", "__stdio_common_vswprintf", "__stdio_common_vswprintf_p", "__stdio_common_vswprintf_s", "__stdio_common_vswscanf", "_Strftime", "__STRINGTOLD", "__STRINGTOLD_L", "__strncnt", "__threadhandle", "__threadid", "__timezone", "__TypeMatch", "__tzname", "__unDName", "__unDNameEx", "__unDNameHelper", "__unguarded_readlc_active", "_unlock_locales", "_vacopy", "_ValidateExecute", "_ValidateRead", "_ValidateWrite", "_VCrtDbgReportA", "_VCrtDbgReportW", "_W_Getdays", "_W_Getmonths", "_W_Getnames", "_W_Gettnames", "_Wcsftime", "__wcsncnt", "__winitenv", "_wsopen_dispatch", "_Xbad_alloc", "_Xlength_error"]
+helpviewer_keywords: ["__acrt_iob_func", "__AdjustPointer", "__badioinfo", "__BuildCatchObject", "__BuildCatchObjectHelper", "__C_specific_handler", "_calloc_base", "_chkesp", "__chkstk", "_chkstk", "_chvalidator", "_chvalidator_l", "_CIacos", "_CIasin", "_CIcosh", "_CIsinh", "_CItanh", "__clean_type_info_names_internal", "_commode", "_configure_narrow_argv", "_configure_wide_argv", "__conio_common_vcprintf", "__conio_common_vcprintf_p", "__conio_common_vcprintf_s", "__conio_common_vcscanf", "__conio_common_vcwprintf", "__conio_common_vcwprintf_p", "__conio_common_vcwprintf_s", "__conio_common_vcwscanf", "__CppXcptFilter", "__create_locale", "_crt_at_quick_exit", "_crt_atexit", "_crtAssertBusy", "_crtBreakAlloc", "__crtCompareStringA", "__crtCompareStringEx", "__crtCompareStringW", "__crtCreateEventExW", "__crtCreateSemaphoreExW", "__crtCreateSymbolicLinkW", "_crt_debugger_hook", "__crtEnumSystemLocalesEx", "__crtFlsAlloc", "__crtFlsFree", "__crtFlsGetValue", "__crtFlsSetValue", "_CrtGetCheckCount", "__crtGetDateFormatEx", "__crtGetFileInformationByHandleEx", "__crtGetLocaleInfoEx", "__crtGetShowWindowMode", "__crtGetTickCount64", "__crtGetTimeFormatEx", "__crtGetUserDefaultLocaleName", "__crtInitializeCriticalSectionEx", "__crtIsPackagedApp", "__crtIsValidLocaleName", "__crtLCMapStringA", "__crtLCMapStringEx", "_CrtSetCheckCount", "_CrtSetDbgBlockType", "__crtSetFileInformationByHandle", "__crtSetThreadStackGuarantee", "__crtSetUnhandledExceptionFilter", "__crtSleep", "__crtTerminateProcess", "__crtUnhandledException", "__CxxDetectRethrow", "__CxxExceptionFilter", "__CxxFrameHandler2", "__CxxFrameHandler3", "__CxxLongjmpUnwind", "__CxxQueryExceptionSize", "__CxxRegisterExceptionObject", "_CxxThrowException", "__CxxUnregisterExceptionObject", "__DestructExceptionObject", "__doserrno", "_dosmaperr", "_EH_prolog", "_errno", "_except_handler", "_except_handler2", "_except_handler4_common", "_except1", "_filbuf", "_FindAndUnlinkFrame", "_flsbuf", "__fpe_flt_rounds", "_FPE_Raise", "__fpecode", "__FrameUnwindFilter", "_fread_nolock_s", "_free_base", "__free_locale", "_freea_s", "_freefls", "_ftol", "__get_current_locale", "__get_flsindex", "_get_initial_narrow_environment", "_get_initial_wide_environment", "_get_narrow_winmain_command_line", "_get_stream_buffer_pointers", "__get_tlsindex", "_get_wide_winmain_command_line", "_Getdays", "_Getmonths", "__GetPlatformExceptionInfo", "_getptd", "_Gettnames", "_global_unwind2", "_inconsistency", "__initenv", "_initialize_lconv_for_unsigned_char", "_initialize_narrow_environment", "_initialize_wide_environment", "_initptd", "_invalid_parameter", "_invoke_watson", "__iob_func", "_IsExceptionObjectToBeDestroyed", "__lconv", "__lconv_init", "__libm_sse2_acos", "_libm_sse2_acos_precise", "__libm_sse2_acosf", "__libm_sse2_asin", "_libm_sse2_asin_precise", "__libm_sse2_asinf", "__libm_sse2_atan", "_libm_sse2_atan_precise", "__libm_sse2_atan2", "__libm_sse2_atanf", "__libm_sse2_cos", "_libm_sse2_cos_precise", "__libm_sse2_cosf", "__libm_sse2_exp", "_libm_sse2_exp_precise", "__libm_sse2_expf", "__libm_sse2_log", "_libm_sse2_log_precise", "__libm_sse2_log10", "_libm_sse2_log10_precise", "__libm_sse2_log10f", "__libm_sse2_logf", "__libm_sse2_pow", "_libm_sse2_pow_precise", "__libm_sse2_powf", "__libm_sse2_sin", "_libm_sse2_sin_precise", "__libm_sse2_sinf", "_libm_sse2_sqrt_precise", "__libm_sse2_tan", "_libm_sse2_tan_precise", "__libm_sse2_tanf", "_local_unwind4", "_lock_locales", "_longjmpex", "_malloc_base", "_mbctype", "_NLG_Dispatch2", "_NLG_Return", "_NLG_Return2", "__p___argc", "__p___argv", "__p___initenv", "__p___wargv", "__p___winitenv", "__p__acmdln", "__p__crtAssertBusy", "__p__crtBreakAlloc", "__p__crtDbgFlag", "__p__daylight", "__p__dstbias", "__p__environ", "__p__iob", "__p__mbcasemap", "__p__mbctype", "__p__pctype", "__p__pgmptr", "__p__pwctype", "__p__timezone", "__p__tzname", "__p__wcmdln", "__p__wenviron", "__p__wpgmptr", "__pioinfo", "__pwctype_func", "__pxcptinfoptrs", "_query_app_type", "_realloc_base", "_register_thread_local_exe_atexit_callback", "__report_gsfailure", "__RTCastToVoid", "__RTtypeid", "_seh_filter_dll", "_seh_filter_exe", "_seh_longjmp_unwind", "_seh_longjmp_unwind4", "_set_malloc_crt_max_wait", "__setlc_active", "_SetWinRTOutOfMemoryExceptionCallback", "_sopen_dispatch", "__std_exception_copy", "__std_exception_destroy", "__std_type_info_destroy_list", "__stdio_common_vfprintf", "__stdio_common_vfprintf_p", "__stdio_common_vfprintf_s", "__stdio_common_vfscanf", "__stdio_common_vfwprintf", "__stdio_common_vfwprintf_p", "__stdio_common_vfwprintf_s", "__stdio_common_vfwscanf", "__stdio_common_vsnprintf_s", "__stdio_common_vsnwprintf_s", "__stdio_common_vsprintf", "__stdio_common_vsprintf_p", "__stdio_common_vsprintf_s", "__stdio_common_vsscanf", "__stdio_common_vswprintf", "__stdio_common_vswprintf_p", "__stdio_common_vswprintf_s", "__stdio_common_vswscanf", "_Strftime", "__STRINGTOLD", "__STRINGTOLD_L", "__strncnt", "__sys_errlist", "__sys_nerr", "__threadhandle", "__threadid", "__timezone", "__TypeMatch", "__tzname", "__unDName", "__unDNameEx", "__unDNameHelper", "__unguarded_readlc_active", "_unloaddll", "_unlock_locales", "_vacopy", "_ValidateExecute", "_ValidateRead", "_ValidateWrite", "_VCrtDbgReportA", "_VCrtDbgReportW", "_W_Getdays", "_W_Getmonths", "_W_Getnames", "_W_Gettnames", "_Wcsftime", "__wcsncnt", "__winitenv", "_wsopen_dispatch", "_Xbad_alloc", "_Xlength_error"]
---
# Internal CRT globals and functions
@@ -40,10 +40,9 @@ These functions and function macros are used to implement the CRT and the C++ St
|---|
| `__acrt_iob_func` |
| `__AdjustPointer` |
-| `_assert` |
| `__BuildCatchObject` |
| `__BuildCatchObjectHelper` |
-| `__C_specific_handler` |
+| [`__C_specific_handler`](/windows/win32/devnotes/--c-specific-handler2) |
| `_calloc_base` |
| `_chkesp` |
| `__chkstk` |
@@ -125,27 +124,27 @@ These functions and function macros are used to implement the CRT and the C++ St
| `__CxxRegisterExceptionObject` |
| `_CxxThrowException` |
| `__CxxUnregisterExceptionObject` |
-| `__daylight` |
-| `_dclass` |
+| [`_dclass`](./reference/floating-point-primitives.md) |
| `__DestructExceptionObject` |
| [`__dllonexit`](./dllonexit.md) |
| `__doserrno` |
| `_dosmaperr` |
-| `_dpcomp` |
-| `_dsign` |
-| `__dstbias` |
-| `_dtest` |
+| [`_dpcomp`](./reference/floating-point-primitives.md) |
+| [`_dsign`](./reference/floating-point-primitives.md) |
+| [`__dstbias`](./reference/get-dstbias.md) |
+| [`_dtest`](./reference/floating-point-primitives.md) |
| `_EH_prolog` |
-| `_errno` |
+| [`_errno`](./errno-doserrno-sys-errlist-and-sys-nerr.md) |
+| `_except_handler` |
| `_except_handler2` |
| [`_except_handler3`](./except-handler3.md) |
| `_except_handler4_common` |
| `_except1` |
| [`_execute_onexit_table`](./execute-onexit-table-initialize-onexit-table-register-onexit-function.md) |
-| `_fdclass` |
-| `_fdpcomp` |
-| `_fdsign` |
-| `_fdtest` |
+| [`_fdclass`](./reference/floating-point-primitives.md) |
+| [`_fdpcomp`](./reference/floating-point-primitives.md) |
+| [`_fdsign`](./reference/floating-point-primitives.md) |
+| [`_fdtest`](./reference/floating-point-primitives.md) |
| `_filbuf` |
| `_FindAndUnlinkFrame` |
| `_flsbuf` |
@@ -188,10 +187,10 @@ These functions and function macros are used to implement the CRT and the C++ St
| [`___lc_collate_cp_func`](./lc-collate-cp-func.md) |
| [`___lc_locale_name_func`](./lc-locale-name-func.md) |
| `__lconv_init` |
-| `_ldclass` |
-| `_ldpcomp` |
-| `_ldsign` |
-| `_ldtest` |
+| [`_ldclass`](./reference/floating-point-primitives.md) |
+| [`_ldpcomp`](./reference/floating-point-primitives.md) |
+| [`_ldsign`](./reference/floating-point-primitives.md) |
+| [`_ldtest`](./reference/floating-point-primitives.md) |
| `__libm_sse2_acos` |
| `_libm_sse2_acos_precise` |
| `__libm_sse2_acosf` |
@@ -261,9 +260,9 @@ These functions and function macros are used to implement the CRT and the C++ St
| `__p__wcmdln` |
| `__p__wenviron` |
| `__p__wpgmptr` |
-| `_pctype` |
+| [`_pctype`](./pctype-pwctype-wctype-mbctype-mbcasemap.md) |
| [`__pctype_func`](./pctype-func.md) |
-| `_pwctype` |
+| [`_pwctype`](./pctype-pwctype-wctype-mbctype-mbcasemap.md) |
| `__pwctype_func` |
| `__pxcptinfoptrs` |
| `_query_app_type` |
@@ -336,7 +335,6 @@ These functions and function macros are used to implement the CRT and the C++ St
| `_W_Getmonths` |
| `_W_Getnames` |
| `_W_Gettnames` |
-| `_wassert` |
| `_Wcsftime` |
| `__wcsncnt` |
| [`__wgetmainargs`](./getmainargs-wgetmainargs.md) |
diff --git a/docs/c-runtime-library/internal-set-app-type.md b/docs/c-runtime-library/internal-set-app-type.md
index 6f3526048d..9faaf4a49e 100644
--- a/docs/c-runtime-library/internal-set-app-type.md
+++ b/docs/c-runtime-library/internal-set-app-type.md
@@ -12,7 +12,7 @@ ms.assetid: f0ac0f4d-70e6-4e96-9e43-eb9d1515490c
---
# `__set_app_type`
-Sets the current application type.
+Sets the current application type. This internal function is obsolete.
## Syntax
diff --git a/docs/c-runtime-library/iob.md b/docs/c-runtime-library/iob.md
index 6029c1d1f8..9341f6b617 100644
--- a/docs/c-runtime-library/iob.md
+++ b/docs/c-runtime-library/iob.md
@@ -1,14 +1,13 @@
---
description: "Learn more about: _iob"
title: "_iob"
-ms.date: "11/04/2016"
+ms.date: 07/10/2023
api_name: ["_iob"]
api_location: ["msvcrt.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
f1_keywords: ["_iob", "_IOB_ENTRIES", "STDIO/_IOB_ENTRIES"]
helpviewer_keywords: ["_iob global variable", "iob global variable"]
-ms.assetid: 008ed376-8078-4bbd-bc6c-0677c63d0ff1
---
# `_iob`
@@ -22,8 +21,12 @@ FILE _iob[_IOB_ENTRIES];
## Remarks
-`_IOB_ENTRIES` is defined as 3 in `stdio.h`.
+Starting with Visual Studio 2015, `_IOB_ENTRIES` is defined as 3 with the introduction of the Universal CRT.
+It was previously defined as 20.
+
+Defined in `stdio.h`.
## See also
-[Global variables](./global-variables.md)
+[Global variables](./global-variables.md)\
+[Introducing the Universal CRT](https://devblogs.microsoft.com/cppblog/introducing-the-universal-crt/)
diff --git a/docs/c-runtime-library/is-isw-routines.md b/docs/c-runtime-library/is-isw-routines.md
index ed95473112..749a96439b 100644
--- a/docs/c-runtime-library/is-isw-routines.md
+++ b/docs/c-runtime-library/is-isw-routines.md
@@ -1,6 +1,6 @@
---
-description: "Learn more about: is, isw Routines"
title: "is, isw Routines"
+description: "Learn more about: is, isw Routines"
ms.date: 01/11/2022
helpviewer_keywords: ["is routines", "isw routines"]
---
@@ -15,7 +15,7 @@ helpviewer_keywords: ["is routines", "isw routines"]
[`iscntrl`, `iswcntrl`, `_iscntrl_l`, `_iswcntrl_l`](./reference/iscntrl-iswcntrl-iscntrl-l-iswcntrl-l.md)\
[`iscsym`, `iscsymf`, `__iscsym`, `__iswcsym`, `__iscsymf`, `__iswcsymf`, `_iscsym_l`, `_iswcsym_l`, `_iscsymf_l`, `_iswcsymf_l`](./reference/iscsym-functions.md)\
[`_isctype`, `iswctype`, `_isctype_l`, `_iswctype_l`](./reference/isctype-iswctype-isctype-l-iswctype-l.md)\
- [`isdigit`, `iswdigit`, `_isdigit_l`, `_iswdigit_l`](./reference/isdigit-iswdigit-isdigit-l-iswdigit-l.md)
+ [`isdigit`, `iswdigit`, `_isdigit_l`, `_iswdigit_l`](./reference/isdigit-iswdigit-isdigit-l-iswdigit-l.md)\
[`isgraph`, `iswgraph`, `_isgraph_l`, `_iswgraph_l`](./reference/isgraph-iswgraph-isgraph-l-iswgraph-l.md)\
[`isleadbyte`, `_isleadbyte_l`](./reference/isleadbyte-isleadbyte-l.md)\
[`islower`, `iswlower`, `_islower_l`, `_iswlower_l`](./reference/islower-iswlower-islower-l-iswlower-l.md)\
diff --git a/docs/c-runtime-library/ismbc-routines.md b/docs/c-runtime-library/ismbc-routines.md
index 6de251be77..7c7a33362c 100644
--- a/docs/c-runtime-library/ismbc-routines.md
+++ b/docs/c-runtime-library/ismbc-routines.md
@@ -1,45 +1,40 @@
---
-description: "Learn more about: _ismbc Routines"
title: "_ismbc Routines"
+description: "Learn more about: _ismbc Routines"
ms.date: "11/04/2016"
-api_location: ["msvcr110.dll", "msvcr110_clr0400.dll", "msvcr100.dll", "msvcrt.dll", "msvcr90.dll", "msvcr120.dll", "msvcr80.dll"]
-api_type: ["DLLExport"]
-topic_type: ["apiref"]
-f1_keywords: ["_ismbc"]
helpviewer_keywords: ["ismbc routines", "_ismbc routines"]
-ms.assetid: b8995391-7857-4ac3-9a1e-de946eb4464d
---
# `_ismbc` routines
Each `_ismbc` routine tests a given multibyte character `c` for a particular condition.
-- [`_ismbcalnum`, `_ismbcalnum_l`, `_ismbcalpha`, `_ismbcalpha_l`, `_ismbcdigit`, `_ismbcdigit_l`](./reference/ismbcalnum-functions.md)\
-- [`_ismbcl0`, `_ismbcl0_l`, `_ismbcl1`, `_ismbcl1_l`, `_ismbcl2`, `_ismbcl2_l`](./reference/ismbcl0-ismbcl0-l-ismbcl1-ismbcl1-l-ismbcl2-ismbcl2-l.md)\
-- [`_ismbcgraph`, `_ismbcgraph_l`, `_ismbcprint`, `_ismbcprint_l`, `_ismbcpunct`, `_ismbcpunct_l`, `_ismbcblank`, `_ismbcblank_l`, `_ismbcspace`, `_ismbcspace_l`](./reference/ismbcgraph-functions.md)\
-- [`_ismbclegal`, `_ismbclegal_l`, `_ismbcsymbol`, `_ismbcsymbol_l`](./reference/ismbclegal-ismbclegal-l-ismbcsymbol-ismbcsymbol-l.md)\
-- [`_ismbchira`, `_ismbchira_l`, `_ismbckata`, `_ismbckata_l`](./reference/ismbchira-ismbchira-l-ismbckata-ismbckata-l.md)\
-- [`_ismbclower`, `_ismbclower_l`, `_ismbcupper`, `_ismbcupper_l`](./reference/ismbclower-ismbclower-l-ismbcupper-ismbcupper-l.md)
+- [`_ismbcalnum`, `_ismbcalnum_l`, `_ismbcalpha`, `_ismbcalpha_l`, `_ismbcdigit`, `_ismbcdigit_l`](reference/ismbcalnum-functions.md)
+- [`_ismbcl0`, `_ismbcl0_l`, `_ismbcl1`, `_ismbcl1_l`, `_ismbcl2`, `_ismbcl2_l`](reference/ismbcl0-ismbcl0-l-ismbcl1-ismbcl1-l-ismbcl2-ismbcl2-l.md)
+- [`_ismbcgraph`, `_ismbcgraph_l`, `_ismbcprint`, `_ismbcprint_l`, `_ismbcpunct`, `_ismbcpunct_l`, `_ismbcblank`, `_ismbcblank_l`, `_ismbcspace`, `_ismbcspace_l`](reference/ismbcgraph-functions.md)
+- [`_ismbclegal`, `_ismbclegal_l`, `_ismbcsymbol`, `_ismbcsymbol_l`](reference/ismbclegal-ismbclegal-l-ismbcsymbol-ismbcsymbol-l.md)
+- [`_ismbchira`, `_ismbchira_l`, `_ismbckata`, `_ismbckata_l`](reference/ismbchira-ismbchira-l-ismbckata-ismbckata-l.md)
+- [`_ismbclower`, `_ismbclower_l`, `_ismbcupper`, `_ismbcupper_l`](reference/ismbclower-ismbclower-l-ismbcupper-ismbcupper-l.md)
## Remarks
-The test result of each `_ismbc` routine depends on the multibyte code page in effect. Multibyte code pages have single-byte alphabetic characters. By default, the multibyte code page is set to the system-default ANSI code page obtained from the operating system at program startup. You can query or change the multibyte code page in use with [`_getmbcp`](./reference/getmbcp.md) or [`_setmbcp`](./reference/setmbcp.md), respectively.
+The test result of each `_ismbc` routine depends on the multibyte code page in effect. Multibyte code pages have single-byte alphabetic characters. By default, the multibyte code page is set to the system-default ANSI code page obtained from the operating system at program startup. You can query or change the multibyte code page in use with [`_getmbcp`](reference/getmbcp.md) or [`_setmbcp`](reference/setmbcp.md), respectively.
-The output value is affected by the `LC_CTYPE` category setting of the locale. For more information, see [`setlocale`](./reference/setlocale-wsetlocale.md). The versions of these functions without the `_l` suffix use the current locale for this locale-dependent behavior; the versions with the `_l` suffix are identical except that they use the locale parameter passed in instead.
+The output value is affected by the `LC_CTYPE` category setting of the locale. For more information, see [`setlocale`](reference/setlocale-wsetlocale.md). The versions of these functions without the `_l` suffix use the current locale for this locale-dependent behavior; the versions with the `_l` suffix are identical except that they use the locale parameter passed in instead.
| Routine | Test condition | Code page 932 example |
|---|---|---|
-| [`_ismbcalnum`, `_ismbcalnum_l`](./reference/ismbcalnum-functions.md) | Alphanumeric | Returns nonzero if and only if `c` is a single-byte representation of an ASCII English letter: See examples for `_ismbcdigit` and `_ismbcalpha`. |
-| [`_ismbcalpha`, `_ismbcalpha_l`](./reference/ismbcalnum-functions.md) | Alphabetic | Returns nonzero if and only if `c` is a single-byte representation of an ASCII English letter: See examples for `_ismbcupper` and `_ismbclower`; or a katakana letter: 0xA6<=`c`<=0xDF. |
-| [`_ismbcdigit`, `_ismbcdigit_l`](./reference/ismbcalnum-functions.md) | Digit | Returns nonzero if and only if `c` is a single-byte representation of an ASCII digit: 0x30<=`c`<=0x39. |
-| [`_ismbcgraph`, `_ismbcgraph_l`](./reference/ismbcgraph-functions.md) | Graphic | Returns nonzero if and only if `c` is a single-byte representation of any ASCII or katakana printable character except a white space ( ). See examples for `_ismbcdigit`, `_ismbcalpha`, and `_ismbcpunct`. |
-| [`_ismbclegal`, `_ismbclegal_l`](./reference/ismbclegal-ismbclegal-l-ismbcsymbol-ismbcsymbol-l.md) | Valid multibyte character | Returns nonzero if and only if the first byte of `c` is within ranges 0x81 - 0x9F or 0xE0 - 0xFC, while the second byte is within ranges 0x40 - 0x7E or 0x80 - FC. |
-| [`_ismbclower`, `_ismbclower_l`](./reference/ismbclower-ismbclower-l-ismbcupper-ismbcupper-l.md) | Lowercase alphabetic | Returns nonzero if and only if `c` is a single-byte representation of an ASCII lowercase English letter: 0x61<=`c`<=0x7A. |
-| [`_ismbcprint`, `_ismbcprint_l`](./reference/ismbcgraph-functions.md) | Printable | Returns nonzero if and only if `c` is a single-byte representation of any ASCII or katakana printable character including a white space ( ): See examples for `_ismbcspace`, `_ismbcdigit`, `_ismbcalpha`, and `_ismbcpunct`. |
-| [`_ismbcpunct`, `_ismbcpunct_l`](./reference/ismbcgraph-functions.md) | Punctuation | Returns nonzero if and only if `c` is a single-byte representation of any ASCII or katakana punctuation character. |
-| [`_ismbcblank`, `_ismbcblank_l`](./reference/ismbcgraph-functions.md) | Space or horizontal tab | Returns nonzero if and only if `c` is a single-byte representation of a space character or a horizontal tab character: `c`=0x20 or `c`=0x09. |
-| [`_ismbcspace`, `_ismbcspace_l`](./reference/ismbcgraph-functions.md) | Whitespace | Returns nonzero if and only if `c` is a white space character: `c`=0x20 or 0x09<=`c`<=0x0D. |
-| [`_ismbcsymbol`, `_ismbcsymbol_l`](./reference/ismbclegal-ismbclegal-l-ismbcsymbol-ismbcsymbol-l.md) | Multibyte symbol | Returns nonzero if and only if 0x8141<=`c`<=0x81AC. |
-| [`_ismbcupper`, `_ismbcupper_l`](./reference/ismbclower-ismbclower-l-ismbcupper-ismbcupper-l.md) | Uppercase alphabetic | Returns nonzero if and only if `c` is a single-byte representation of an ASCII uppercase English letter: 0x41<=`c`<=0x5A. |
+| [`_ismbcalnum`, `_ismbcalnum_l`](reference/ismbcalnum-functions.md) | Alphanumeric | Returns nonzero if and only if `c` is a single-byte representation of an ASCII English letter: See examples for `_ismbcdigit` and `_ismbcalpha`. |
+| [`_ismbcalpha`, `_ismbcalpha_l`](reference/ismbcalnum-functions.md) | Alphabetic | Returns nonzero if and only if `c` is a single-byte representation of an ASCII English letter: See examples for `_ismbcupper` and `_ismbclower`; or a katakana letter: 0xA6<=`c`<=0xDF. |
+| [`_ismbcdigit`, `_ismbcdigit_l`](reference/ismbcalnum-functions.md) | Digit | Returns nonzero if and only if `c` is a single-byte representation of an ASCII digit: 0x30<=`c`<=0x39. |
+| [`_ismbcgraph`, `_ismbcgraph_l`](reference/ismbcgraph-functions.md) | Graphic | Returns nonzero if and only if `c` is a single-byte representation of any ASCII or katakana printable character except a white space ( ). See examples for `_ismbcdigit`, `_ismbcalpha`, and `_ismbcpunct`. |
+| [`_ismbclegal`, `_ismbclegal_l`](reference/ismbclegal-ismbclegal-l-ismbcsymbol-ismbcsymbol-l.md) | Valid multibyte character | Returns nonzero if and only if the first byte of `c` is within ranges 0x81 - 0x9F or 0xE0 - 0xFC, while the second byte is within ranges 0x40 - 0x7E or 0x80 - FC. |
+| [`_ismbclower`, `_ismbclower_l`](reference/ismbclower-ismbclower-l-ismbcupper-ismbcupper-l.md) | Lowercase alphabetic | Returns nonzero if and only if `c` is a single-byte representation of an ASCII lowercase English letter: 0x61<=`c`<=0x7A. |
+| [`_ismbcprint`, `_ismbcprint_l`](reference/ismbcgraph-functions.md) | Printable | Returns nonzero if and only if `c` is a single-byte representation of any ASCII or katakana printable character including a white space ( ): See examples for `_ismbcspace`, `_ismbcdigit`, `_ismbcalpha`, and `_ismbcpunct`. |
+| [`_ismbcpunct`, `_ismbcpunct_l`](reference/ismbcgraph-functions.md) | Punctuation | Returns nonzero if and only if `c` is a single-byte representation of any ASCII or katakana punctuation character. |
+| [`_ismbcblank`, `_ismbcblank_l`](reference/ismbcgraph-functions.md) | Space or horizontal tab | Returns nonzero if and only if `c` is a single-byte representation of a space character or a horizontal tab character: `c`=0x20 or `c`=0x09. |
+| [`_ismbcspace`, `_ismbcspace_l`](reference/ismbcgraph-functions.md) | Whitespace | Returns nonzero if and only if `c` is a white space character: `c`=0x20 or 0x09<=`c`<=0x0D. |
+| [`_ismbcsymbol`, `_ismbcsymbol_l`](reference/ismbclegal-ismbclegal-l-ismbcsymbol-ismbcsymbol-l.md) | Multibyte symbol | Returns nonzero if and only if 0x8141<=`c`<=0x81AC. |
+| [`_ismbcupper`, `_ismbcupper_l`](reference/ismbclower-ismbclower-l-ismbcupper-ismbcupper-l.md) | Uppercase alphabetic | Returns nonzero if and only if `c` is a single-byte representation of an ASCII uppercase English letter: 0x41<=`c`<=0x5A. |
**Code Page 932 Specific**
@@ -47,18 +42,18 @@ The following routines are specific to code page 932.
| Routine | Test condition (code page 932 only) |
|---|---|
-| [`_ismbchira`, `_ismbchira_l`](./reference/ismbchira-ismbchira-l-ismbckata-ismbckata-l.md) | Double-byte Hiragana: 0x829F<=`c`<=0x82F1. |
-| [`_ismbckata`, `_ismbckata_l`](./reference/ismbchira-ismbchira-l-ismbckata-ismbckata-l.md) | Double-byte katakana: 0x8340<=`c`<=0x8396. |
-| [`_ismbcl0`, `_ismbcl0_l`](./reference/ismbcl0-ismbcl0-l-ismbcl1-ismbcl1-l-ismbcl2-ismbcl2-l.md) | JIS non-Kanji: 0x8140<=`c`<=0x889E. |
-| [`_ismbcl1`, `_ismbcl1_l`](./reference/ismbcl0-ismbcl0-l-ismbcl1-ismbcl1-l-ismbcl2-ismbcl2-l.md) | JIS level-1: 0x889F<=`c`<=0x9872. |
-| [`_ismbcl2`, `_ismbcl2_l`](./reference/ismbcl0-ismbcl0-l-ismbcl1-ismbcl1-l-ismbcl2-ismbcl2-l.md) | JIS level-2: 0x989F<=`c`<=0xEA9E. |
+| [`_ismbchira`, `_ismbchira_l`](reference/ismbchira-ismbchira-l-ismbckata-ismbckata-l.md) | Double-byte Hiragana: 0x829F<=`c`<=0x82F1. |
+| [`_ismbckata`, `_ismbckata_l`](reference/ismbchira-ismbchira-l-ismbckata-ismbckata-l.md) | Double-byte katakana: 0x8340<=`c`<=0x8396. |
+| [`_ismbcl0`, `_ismbcl0_l`](reference/ismbcl0-ismbcl0-l-ismbcl1-ismbcl1-l-ismbcl2-ismbcl2-l.md) | JIS non-Kanji: 0x8140<=`c`<=0x889E. |
+| [`_ismbcl1`, `_ismbcl1_l`](reference/ismbcl0-ismbcl0-l-ismbcl1-ismbcl1-l-ismbcl2-ismbcl2-l.md) | JIS level-1: 0x889F<=`c`<=0x9872. |
+| [`_ismbcl2`, `_ismbcl2_l`](reference/ismbcl0-ismbcl0-l-ismbcl1-ismbcl1-l-ismbcl2-ismbcl2-l.md) | JIS level-2: 0x989F<=`c`<=0xEA9E. |
-`_ismbcl0`, `_ismbcl1`, and `_ismbcl2` check that the specified value `c` matches the test conditions described in the preceding table, but don't check that `c` is a valid multibyte character. If the lower byte is in the ranges 0x00 - 0x3F, 0x7F, or 0xFD - 0xFF, these functions return a nonzero value, indicating that the character satisfies the test condition. Use [`_ismbbtrail`, `_ismbbtrail_l`](./reference/ismbbtrail-ismbbtrail-l.md) to test whether the multibyte character is defined.
+`_ismbcl0`, `_ismbcl1`, and `_ismbcl2` check that the specified value `c` matches the test conditions described in the preceding table, but don't check that `c` is a valid multibyte character. If the lower byte is in the ranges 0x00 - 0x3F, 0x7F, or 0xFD - 0xFF, these functions return a nonzero value, indicating that the character satisfies the test condition. Use [`_ismbbtrail`, `_ismbbtrail_l`](reference/ismbbtrail-ismbbtrail-l.md) to test whether the multibyte character is defined.
**END Code Page 932 Specific**
## See also
-[Character classification](./character-classification.md)\
-[`is`, `isw` routines](./is-isw-routines.md)\
-[`_ismbb` routines](./ismbb-routines.md)
+[Character classification](character-classification.md)\
+[`is`, `isw` routines](is-isw-routines.md)\
+[`_ismbb` routines](ismbb-routines.md)
diff --git a/docs/c-runtime-library/language-strings.md b/docs/c-runtime-library/language-strings.md
index c68c721c29..99b9af3a15 100644
--- a/docs/c-runtime-library/language-strings.md
+++ b/docs/c-runtime-library/language-strings.md
@@ -6,7 +6,7 @@ helpviewer_keywords: ["language strings"]
---
# Language strings
-The [`setlocale`](./reference/setlocale-wsetlocale.md) and [`_create_locale`](./reference/create-locale-wcreate-locale.md) functions can use the Windows NLS API supported languages on operating systems that don't use the Unicode code page. For a list of supported languages by operating system version, see [Appendix A: Product Behavior](/openspecs/windows_protocols/ms-lcid/a9eac961-e77d-41a6-90a5-ce1a8b0cdb9c) in \[MS-LCID]: Windows Language Code Identifier (LCID) Reference. The language string can be any of the values in the **Language** and **Language tag** columns of the list of supported languages. For example code that enumerates available locale names and related values, see [NLS: Name-based APIs Sample](/windows/win32/intl/nls--name-based-apis-sample).
+The [`setlocale`](reference/setlocale-wsetlocale.md) and [`_create_locale`](reference/create-locale-wcreate-locale.md) functions can use the Windows NLS API supported languages on operating systems that don't use the Unicode code page. For a list of supported languages by operating system version, see [Appendix A: Product Behavior](/openspecs/windows_protocols/ms-lcid/a9eac961-e77d-41a6-90a5-ce1a8b0cdb9c) in \[MS-LCID]: Windows Language Code Identifier (LCID) Reference. The language string can be any of the values in the **Language** and **Language tag** columns of the list of supported languages. For example code that enumerates available locale names and related values, see [NLS: Name-based APIs Sample](/windows/win32/intl/nls--name-based-apis-sample).
## Supported language strings
@@ -82,7 +82,7 @@ The Microsoft C run-time library implementation also supports these language str
## See also
-- [Locale names, Languages, and Country/Region strings](./locale-names-languages-and-country-region-strings.md)\
-- [Country/Region strings](./country-region-strings.md)\
-- [`setlocale`, `_wsetlocale`](./reference/setlocale-wsetlocale.md)\
-- [`_create_locale`, `_wcreate_locale`](./reference/create-locale-wcreate-locale.md)
+- [Locale names, Languages, and Country/Region strings](locale-names-languages-and-country-region-strings.md)
+- [Country/Region strings](country-region-strings.md)
+- [`setlocale`, `_wsetlocale`](reference/setlocale-wsetlocale.md)
+- [`_create_locale`, `_wcreate_locale`](reference/create-locale-wcreate-locale.md)
diff --git a/docs/c-runtime-library/lc-codepage-func.md b/docs/c-runtime-library/lc-codepage-func.md
index 26ce3e89fc..21d5dd5640 100644
--- a/docs/c-runtime-library/lc-codepage-func.md
+++ b/docs/c-runtime-library/lc-codepage-func.md
@@ -6,7 +6,7 @@ api_name: ["___lc_codepage_func", "_o____lc_codepage_func"]
api_location: ["msvcr120.dll", "msvcr110_clr0400.dll", "msvcr80.dll", "msvcr100.dll", "msvcr90.dll", "msvcr110.dll", "msvcrt.dll", "api-ms-win-crt-locale-l1-1-0.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["lc_codepage_func", "___lc_codepage_func"]
+f1_keywords: ["lc_codepage_func", "LOCALE/___lc_codepage_func", "___lc_codepage_func"]
helpviewer_keywords: ["___lc_codepage_func"]
ms.assetid: 6a663bd0-5a63-4a2f-9507-872ec1582aae
---
diff --git a/docs/c-runtime-library/lc-collate-cp-func.md b/docs/c-runtime-library/lc-collate-cp-func.md
index 7b3da7427e..e507776555 100644
--- a/docs/c-runtime-library/lc-collate-cp-func.md
+++ b/docs/c-runtime-library/lc-collate-cp-func.md
@@ -6,7 +6,7 @@ api_name: ["___lc_collate_cp_func", "_o____lc_collate_cp_func"]
api_location: ["msvcr120.dll", "msvcrt.dll", "msvcr100.dll", "msvcr80.dll", "msvcr110_clr0400.dll", "msvcr110.dll", "msvcr90.dll", "api-ms-win-crt-locale-l1-1-0.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["___lc_collate_cp_func"]
+f1_keywords: ["LOCALE/___lc_collate_cp_func", "___lc_collate_cp_func"]
helpviewer_keywords: ["___lc_collate_cp_func"]
ms.assetid: 46ccc084-7ac9-4e5d-9138-e12cb5845615
---
diff --git a/docs/c-runtime-library/lc-locale-name-func.md b/docs/c-runtime-library/lc-locale-name-func.md
index 4817722305..0fbf0416f2 100644
--- a/docs/c-runtime-library/lc-locale-name-func.md
+++ b/docs/c-runtime-library/lc-locale-name-func.md
@@ -6,7 +6,7 @@ api_name: ["___lc_locale_name_func", "_o____lc_locale_name_func"]
api_location: ["msvcrt.dll", "msvcr110.dll", "msvcr100.dll", "msvcr90.dll", "msvcr120.dll", "msvcr80.dll", "msvcr110_clr0400.dll", "api-ms-win-crt-locale-l1-1-0.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["___lc_locale_name_func"]
+f1_keywords: ["LOCALE/___lc_locale_name_func", "___lc_locale_name_func"]
helpviewer_keywords: ["___lc_locale_name_func"]
ms.assetid: ef858308-872e-43de-95e0-9b1b4084343e
---
diff --git a/docs/c-runtime-library/link-options.md b/docs/c-runtime-library/link-options.md
index 33a73b92de..7f27f9a178 100644
--- a/docs/c-runtime-library/link-options.md
+++ b/docs/c-runtime-library/link-options.md
@@ -1,27 +1,26 @@
---
-description: "Learn more about: Link Options"
-title: "Link Options"
+title: "Link options"
+description: "Learn more about: Link options"
ms.date: "11/04/2016"
helpviewer_keywords: ["nothrownew.obj", "newmode.obj", "noenv.obj", "psetargv.obj", "legacy_stdio_float_rounding.obj", "loosefpmath.obj", "smallheap.obj", "fp10.obj", "nochkclr.obj", "chkstk.obj", "pcommode.obj", "pnoenv.obj", "link options [C++]", "invalidcontinue.obj", "pnothrownew.obj", "pwsetargv.obj", "pinvalidcontinue.obj", "wsetargv.obj", "binmode.obj", "setargv.obj", "noarg.obj", "pnewmode.obj", "commode.obj", "pthreadlocale.obj", "pbinmode.obj", "threadlocale.obj", "pnoarg.obj"]
-ms.assetid: 05b5a77b-9dd1-494b-ae46-314598c770bb
---
# Link options
-The CRT lib directory includes several small object files that enable specific CRT features without any code change. These object files are called "link options" since you only have to add them to the linker command line to use them.
+The CRT lib directory includes several small object files that enable specific CRT features without code changes. These object files are called "link options" because you only have to add them to the linker command line to use them. To do this from Visual Studio, in the Solution Explorer right-click your project and choose **Properties**. Under **Configuration Properties**, choose **Linker** > **Input** > **Additional Dependencies** and specify the additional items to add to the link command line.
-CLR pure mode versions of these objects are deprecated in Visual Studio 2015 and unsupported in Visual Studio 2017. Use the regular versions for native and /clr code.
+CLR pure mode versions of these objects are deprecated in Visual Studio 2015 and unsupported in Visual Studio 2017. Use the regular versions for native and [`/clr`](../build/reference/clr-common-language-runtime-compilation.md) code.
| Native and /clr | Pure mode | Description |
|---|---|---|
-| `binmode.obj` | `pbinmode.obj` | Sets the default file-translation mode to binary. See [`_fmode`](./fmode.md). |
+| `binmode.obj` | `pbinmode.obj` | Sets the default file-translation mode to binary. See [`_fmode`](fmode.md). |
| `chkstk.obj` | n/a | Provides stack-checking and alloca support when not using the CRT. |
-| `commode.obj` | `pcommode.obj` | Sets the global commit flag to "commit". See [`fopen`, `_wfopen`](./reference/fopen-wfopen.md) and [`fopen_s`, `_wfopen_s`](./reference/fopen-s-wfopen-s.md). |
-| exe_initialize_mta.lib | n/a | Initializes the MTA apartment during EXE startup, which allows the use of COM objects in global smart pointers. Because this option leaks an MTA apartment reference during shutdown, don't use it for DLLs. Linking to this file is equivalent to including `combase.h` and defining `_EXE_INITIALIZE_MTA`. Using this link option adds [onecore.lib](/windows/win32/apiindex/windows-umbrella-libraries) to the default library list. If this effect is undesirable (such as using onecore_apiset.lib or other umbrella library), use [/NODEFAULTLIB](../build/reference/nodefaultlib-ignore-libraries.md) to override this behavior and provide an alternative. |
-| `fp10.obj` | n/a | Changes the default precision control to 64 bits. See [Math and floating-point support](./floating-point-support.md). |
+| `commode.obj` | `pcommode.obj` | Sets the global commit flag to "commit". See [`fopen`, `_wfopen`](reference/fopen-wfopen.md) and [`fopen_s`, `_wfopen_s`](reference/fopen-s-wfopen-s.md). |
+| `exe_initialize_mta.lib` | n/a | Initializes the MTA apartment during EXE startup, which allows the use of COM objects in global smart pointers. Because this option leaks an MTA apartment reference during shutdown, don't use it for DLLs. Linking to this file is equivalent to including `combase.h` and defining `_EXE_INITIALIZE_MTA`. Using this link option adds [`onecore.lib`](/windows/win32/apiindex/windows-umbrella-libraries) to the default library list. If this effect is undesirable (such as using onecore_apiset.lib or other umbrella library), use [`/NODEFAULTLIB`](../build/reference/nodefaultlib-ignore-libraries.md) to override this behavior and provide an alternative. |
+| `fp10.obj` | n/a | Changes the default precision control to 64 bits. See [Math and floating-point support](floating-point-support.md). |
| `invalidcontinue.obj` | `pinvalidcontinue.obj` | Sets a default invalid parameter handler that does nothing, meaning that invalid parameters passed to CRT functions will just set errno and return an error result. |
-| `legacy_stdio_float_rounding.obj` | n/a | The printing of floating-point values (for example, when using [`printf`](./reference/printf-printf-l-wprintf-wprintf-l.md)) with the Windows 10 19041 Universal C Runtime has been fixed. It now properly rounds exactly representable floating-point numbers, and respects the floating-point rounding requested by [`fesetround`](./reference/fegetround-fesetround2.md). This behavior update is available in Visual Studio 2019 version 16.2 and later. Legacy behavior is used in earlier versions of Visual Studio, or by providing this link option. |
+| `legacy_stdio_float_rounding.obj` | n/a | The printing of floating-point values (for example, when using [`printf`](reference/printf-printf-l-wprintf-wprintf-l.md)) with the Windows 10 19041 Universal C Runtime has been fixed. It now properly rounds exactly representable floating-point numbers, and respects the floating-point rounding requested by [`fesetround`](reference/fegetround-fesetround2.md). This behavior update is available in Visual Studio 2019 version 16.2 and later. Legacy behavior is used in earlier versions of Visual Studio, or by providing this link option. |
| `loosefpmath.obj` | n/a | Ensures that floating point code tolerates denormal values. |
-| `newmode.obj` | `pnewmode.obj` | Causes [`malloc`](./reference/malloc.md) to call the new handler on failure. See [`_set_new_mode`](./reference/set-new-mode.md), [`_set_new_handler`](./reference/set-new-handler.md), [`calloc`](./reference/calloc.md), and [`realloc`](./reference/realloc.md). |
+| `newmode.obj` | `pnewmode.obj` | Causes [`malloc`](reference/malloc.md) to call the new handler on failure. See [`_set_new_mode`](reference/set-new-mode.md), [`_set_new_handler`](reference/set-new-handler.md), [`calloc`](reference/calloc.md), and [`realloc`](reference/realloc.md). |
| `noarg.obj` | `pnoarg.obj` | Disables all processing of argc and argv. |
| `nochkclr.obj` | n/a | Does nothing. Remove from your project. |
| `noenv.obj` | `pnoenv.obj` | Disables the creation of a cached environment for the CRT. |
@@ -32,4 +31,4 @@ CLR pure mode versions of these objects are deprecated in Visual Studio 2015 and
## See also
-- [C runtime (CRT) and C++ Standard Library (STL) `.lib` files](./crt-library-features.md)
+- [C runtime (CRT) and C++ Standard Library (STL) `.lib` files](crt-library-features.md)
diff --git a/docs/c-runtime-library/locale-categories.md b/docs/c-runtime-library/locale-categories.md
index dde72bbca3..891ebbf4d1 100644
--- a/docs/c-runtime-library/locale-categories.md
+++ b/docs/c-runtime-library/locale-categories.md
@@ -2,7 +2,7 @@
description: "Learn more about: Locale Categories"
title: "Locale Categories"
ms.date: "11/04/2016"
-f1_keywords: ["LC_MAX", "LC_MIN", "LC_MONETARY", "LC_TIME", "LC_NUMERIC", "LC_COLLATE", "LC_CTYPE", "LC_ALL"]
+f1_keywords: ["LOCALE/LC_MAX", "LOCALE/LC_MIN", "LOCALE/LC_MONETARY", "LOCALE/LC_TIME", "LOCALE/LC_NUMERIC", "LOCALE/LC_COLLATE", "LOCALE/LC_CTYPE", "LOCALE/LC_ALL", "LC_MAX", "LC_MIN", "LC_MONETARY", "LC_TIME", "LC_NUMERIC", "LC_COLLATE", "LC_CTYPE", "LC_ALL"]
helpviewer_keywords: ["LC_MIN constant", "LC_MONETARY constant", "LC_CTYPE constant", "locale constants", "LC_MAX constant", "LC_ALL constant", "LC_TIME constant", "LC_NUMERIC constant", "LC_COLLATE constant"]
ms.assetid: 868f1493-fe5d-4722-acab-bfcd374a063a
---
diff --git a/docs/c-runtime-library/locale.md b/docs/c-runtime-library/locale.md
index f7ced3c342..5801ca774e 100644
--- a/docs/c-runtime-library/locale.md
+++ b/docs/c-runtime-library/locale.md
@@ -1,63 +1,63 @@
---
-description: "Learn more about: Locale"
title: "Locale"
-ms.date: "04/11/2018"
+description: "Learn more about: Locale"
+ms.date: 04/11/2018
f1_keywords: ["c.international"]
helpviewer_keywords: ["localization, locale", "country/region information", "language information routines", "setlocale function", "locale routines"]
---
# Locale
-*Locale* refers to country/region and language settings that you can use to customize your program. Some locale-dependent categories include the display formats for dates and monetary values. For more information, see [Locale categories](./locale-categories.md).
+*Locale* refers to country/region and language settings that you can use to customize your program. Some locale-dependent categories include the display formats for dates and monetary values. For more information, see [Locale categories](locale-categories.md).
-Use the [`setlocale`](./reference/setlocale-wsetlocale.md) function to change or query some or all of the current program or thread locale information while using functions without the **`_l`** suffix. The functions with the **`_l`** suffix will use the locale parameter passed in for their locale information during the execution of that specific function only. To create a locale for use with a function with a **`_l`** suffix, use [`_create_locale`](./reference/create-locale-wcreate-locale.md). To free this locale, use [`_free_locale`](./reference/free-locale.md). To get the current locale, use [`_get_current_locale`](./reference/get-current-locale.md).
+Use the [`setlocale`](reference/setlocale-wsetlocale.md) function to change or query some or all of the current program or thread locale information while using functions without the **`_l`** suffix. The functions with the **`_l`** suffix will use the locale parameter passed in for their locale information during the execution of that specific function only. To create a locale for use with a function with a **`_l`** suffix, use [`_create_locale`](reference/create-locale-wcreate-locale.md). To free this locale, use [`_free_locale`](reference/free-locale.md). To get the current locale, use [`_get_current_locale`](reference/get-current-locale.md).
-Use [`_configthreadlocale`](./reference/configthreadlocale.md) to control whether each thread has its own locale, or all threads in a program share the same locale. For more information, see [Locales and code pages](../text/locales-and-code-pages.md).
+Use [`_configthreadlocale`](reference/configthreadlocale.md) to control whether each thread has its own locale, or all threads in a program share the same locale. For more information, see [Locales and code pages](../text/locales-and-code-pages.md).
-More secure versions of the functions in the following table are available, indicated by the **`_s`** ("secure") suffix. For more information, see [Security features in the CRT](./security-features-in-the-crt.md).
+More secure versions of the functions in the following table are available, indicated by the **`_s`** ("secure") suffix. For more information, see [Security features in the CRT](security-features-in-the-crt.md).
## Locale-dependent routines
| Routine | Use | **`setlocale`** category setting dependence |
|---|---|---|
-| [`atof`, `_atof_l`, `_wtof`, `_wtof_l`](./reference/atof-atof-l-wtof-wtof-l.md) | Convert character to floating-point value | `LC_NUMERIC` |
-| [`atoi`, `_atoi_l`, `_wtoi`, `_wtoi_l`](./reference/atoi-atoi-l-wtoi-wtoi-l.md) | Convert character to integer value | `LC_NUMERIC` |
-| [`_atoi64`, `_atoi64_l`, `_wtoi64`, `_wtoi64_l`](./reference/atoi64-atoi64-l-wtoi64-wtoi64-l.md) | Convert character to 64-bit integer value | `LC_NUMERIC` |
-| [`atol`, `_atol_l`, `_wtol`, `_wtol_l`](./reference/atol-atol-l-wtol-wtol-l.md) | Convert character to long value | `LC_NUMERIC` |
-| [`_atodbl`, `_atodbl_l`, `_atoldbl`, `_atoldbl_l`, `_atoflt`, `_atoflt_l`](./reference/atodbl-atodbl-l-atoldbl-atoldbl-l-atoflt-atoflt-l.md) | Convert character to double-long value | `LC_NUMERIC` |
-| [`is`, `isw` routines](./is-isw-routines.md) | Test given integer for particular condition. | `LC_CTYPE` |
-| [`isleadbyte`, `_isleadbyte_l`](./reference/isleadbyte-isleadbyte-l.md) | Test for lead byte | `LC_CTYPE` |
-| [`localeconv`](./reference/localeconv.md) | Read appropriate values for formatting numeric quantities | `LC_MONETARY, LC_NUMERIC` |
-| [`MB_CUR_MAX`](./mb-cur-max.md) | Maximum length in bytes of any multibyte character in current locale (macro defined in `STDLIB.H`) | `LC_CTYPE` |
-| [`_mbccpy`, `_mbccpy_l`](./reference/mbccpy-mbccpy-l.md),[`_mbccpy_s`, `_mbccpy_s_l`](./reference/mbccpy-s-mbccpy-s-l.md) | Copy one multibyte character | `LC_CTYPE` |
-| [`_mbclen`, `mblen`, `_mblen_l`](./reference/mbclen-mblen-mblen-l.md) | Validate and return number of bytes in multibyte character | `LC_CTYPE` |
-| [`strlen`, `wcslen`, `_mbslen`, `_mbslen_l`, `_mbstrlen`, `_mbstrlen_l`](./reference/strlen-wcslen-mbslen-mbslen-l-mbstrlen-mbstrlen-l.md) | For multibyte-character strings: validate each character in string; return string length | `LC_CTYPE` |
-| [`mbstowcs`, `_mbstowcs_l`](./reference/mbstowcs-mbstowcs-l.md),[`mbstowcs_s`, `_mbstowcs_s_l`](./reference/mbstowcs-s-mbstowcs-s-l.md) | Convert sequence of multibyte characters to corresponding sequence of wide characters | `LC_CTYPE` |
-| [`mbtowc`, `_mbtowc_l`](./reference/mbtowc-mbtowc-l.md) | Convert multibyte character to corresponding wide character | `LC_CTYPE` |
-| [`printf`](./reference/printf-printf-l-wprintf-wprintf-l.md) functions | Write formatted output | `LC_NUMERIC` (determines radix character output) |
-| [`scanf`](./reference/scanf-scanf-l-wscanf-wscanf-l.md) functions | Read formatted input | `LC_NUMERIC` (determines radix character recognition) |
-| [`setlocale`, `_wsetlocale`](./reference/setlocale-wsetlocale.md) | Select locale for program | Not applicable |
-| [`strcoll`, `wcscoll`, `_mbscoll`, `_strcoll_l`, `_wcscoll_l`, `_mbscoll_l`](./reference/strcoll-wcscoll-mbscoll-strcoll-l-wcscoll-l-mbscoll-l.md) | Compare characters of two strings | `LC_COLLATE` |
-| [`_stricmp`, `_wcsicmp`, `_mbsicmp`, `_stricmp_l`, `_wcsicmp_l`, `_mbsicmp_l`](./reference/stricmp-wcsicmp-mbsicmp-stricmp-l-wcsicmp-l-mbsicmp-l.md) | Compare two strings without regard to case | `LC_CTYPE` |
-| [`_stricoll`, `_wcsicoll`, `_mbsicoll`, `_stricoll_l`, `_wcsicoll_l`, `_mbsicoll_l`](./reference/stricoll-wcsicoll-mbsicoll-stricoll-l-wcsicoll-l-mbsicoll-l.md) | Compare characters of two strings (case insensitive) | `LC_COLLATE` |
-| [`_strncoll`, `_wcsncoll`, `_mbsncoll`, `_strncoll_l`, `_wcsncoll_l`, `_mbsncoll_l`](./reference/strncoll-wcsncoll-mbsncoll-strncoll-l-wcsncoll-l-mbsncoll-l.md) | Compare first **`n`** characters of two strings | `LC_COLLATE` |
-| [`_strnicmp`, `_wcsnicmp`, `_mbsnicmp`, `_strnicmp_l`, `_wcsnicmp_l`, `_mbsnicmp_l`](./reference/strnicmp-wcsnicmp-mbsnicmp-strnicmp-l-wcsnicmp-l-mbsnicmp-l.md) | Compare characters of two strings without regard to case. | `LC_CTYPE` |
-| [`_strnicoll`, `_wcsnicoll`, `_mbsnicoll`, `_strnicoll_l`, `_wcsnicoll_l`, `_mbsnicoll_l`](./reference/strnicoll-wcsnicoll-mbsnicoll-strnicoll-l-wcsnicoll-l-mbsnicoll-l.md) | Compare first **`n`** characters of two strings (case insensitive) | `LC_COLLATE` |
-| [`strftime`, `wcsftime`, `_strftime_l`, `_wcsftime_l`](./reference/strftime-wcsftime-strftime-l-wcsftime-l.md) | Format date and time value according to supplied **`format`** argument | `LC_TIME` |
-| [`_strlwr`, `_wcslwr`, `_mbslwr`, `_strlwr_l`, `_wcslwr_l`, `_mbslwr_l`](./reference/strlwr-wcslwr-mbslwr-strlwr-l-wcslwr-l-mbslwr-l.md),[`_strlwr_s`, `_strlwr_s_l`, `_mbslwr_s`, `_mbslwr_s_l`, `_wcslwr_s`, `_wcslwr_s_l`](./reference/strlwr-s-strlwr-s-l-mbslwr-s-mbslwr-s-l-wcslwr-s-wcslwr-s-l.md) | Convert, in place, each uppercase letter in given string to lowercase | `LC_CTYPE` |
-| [`strtod`, `_strtod_l`, `wcstod`, `_wcstod_l`](./reference/strtod-strtod-l-wcstod-wcstod-l.md) | Convert character string to **`double`** value | `LC_NUMERIC` (determines radix character recognition) |
-| [`strtol`, `wcstol`, `_strtol_l`, `_wcstol_l`](./reference/strtol-wcstol-strtol-l-wcstol-l.md) | Convert character string to **`long`** value | `LC_NUMERIC` (determines radix character recognition) |
-| [`strtoul`, `_strtoul_l`, `wcstoul`, `_wcstoul_l`](./reference/strtoul-strtoul-l-wcstoul-wcstoul-l.md) | Convert character string to unsigned long value | `LC_NUMERIC` (determines radix character recognition) |
-| [`_strupr`, `_strupr_l`, `_mbsupr`, `_mbsupr_l`, `_wcsupr_l`, `_wcsupr`](./reference/strupr-strupr-l-mbsupr-mbsupr-l-wcsupr-l-wcsupr.md),[`_strupr_s`, `_strupr_s_l`, `_mbsupr_s`, `_mbsupr_s_l`, `_wcsupr_s`, `_wcsupr_s_l`](./reference/strupr-s-strupr-s-l-mbsupr-s-mbsupr-s-l-wcsupr-s-wcsupr-s-l.md) | Convert, in place, each lowercase letter in string to uppercase | `LC_CTYPE` |
-| [`strxfrm`, `wcsxfrm`, `_strxfrm_l`, `_wcsxfrm_l`](./reference/strxfrm-wcsxfrm-strxfrm-l-wcsxfrm-l.md) | Transform string into collated form according to locale | `LC_COLLATE` |
-| [`tolower`, `_tolower`, `towlower`, `_tolower_l`, `_towlower_l`](./reference/tolower-tolower-towlower-tolower-l-towlower-l.md),[`_mbctolower`, `_mbctolower_l`, `_mbctoupper`, `_mbctoupper_l`](./reference/mbctolower-mbctolower-l-mbctoupper-mbctoupper-l.md) | Convert given character to corresponding lowercase character | `LC_CTYPE` |
-| [`toupper`, `_toupper`, `towupper`, `_toupper_l`, `_towupper_l`](./reference/toupper-toupper-towupper-toupper-l-towupper-l.md),[`_mbctolower`, `_mbctolower_l`, `_mbctoupper`, `_mbctoupper_l`](./reference/mbctolower-mbctolower-l-mbctoupper-mbctoupper-l.md) | Convert given character to corresponding uppercase letter | `LC_CTYPE` |
-| [`wcstombs`, `_wcstombs_l`](./reference/wcstombs-wcstombs-l.md),[`wcstombs_s`, `_wcstombs_s_l`](./reference/wcstombs-s-wcstombs-s-l.md) | Convert sequence of wide characters to corresponding sequence of multibyte characters | `LC_CTYPE` |
-| [`wctomb`, `_wctomb_l`](./reference/wctomb-wctomb-l.md),[`wctomb_s`, `_wctomb_s_l`](./reference/wctomb-s-wctomb-s-l.md) | Convert wide character to corresponding multibyte character | `LC_CTYPE` |
+| [`atof`, `_atof_l`, `_wtof`, `_wtof_l`](reference/atof-atof-l-wtof-wtof-l.md) | Convert character to floating-point value | `LC_NUMERIC` |
+| [`atoi`, `_atoi_l`, `_wtoi`, `_wtoi_l`](reference/atoi-atoi-l-wtoi-wtoi-l.md) | Convert character to integer value | `LC_NUMERIC` |
+| [`_atoi64`, `_atoi64_l`, `_wtoi64`, `_wtoi64_l`](reference/atoi64-atoi64-l-wtoi64-wtoi64-l.md) | Convert character to 64-bit integer value | `LC_NUMERIC` |
+| [`atol`, `_atol_l`, `_wtol`, `_wtol_l`](reference/atol-atol-l-wtol-wtol-l.md) | Convert character to long value | `LC_NUMERIC` |
+| [`_atodbl`, `_atodbl_l`, `_atoldbl`, `_atoldbl_l`, `_atoflt`, `_atoflt_l`](reference/atodbl-atodbl-l-atoldbl-atoldbl-l-atoflt-atoflt-l.md) | Convert character to double-long value | `LC_NUMERIC` |
+| [`is`, `isw` routines](is-isw-routines.md) | Test given integer for particular condition. | `LC_CTYPE` |
+| [`isleadbyte`, `_isleadbyte_l`](reference/isleadbyte-isleadbyte-l.md) | Test for lead byte | `LC_CTYPE` |
+| [`localeconv`](reference/localeconv.md) | Read appropriate values for formatting numeric quantities | `LC_MONETARY, LC_NUMERIC` |
+| [`MB_CUR_MAX`](mb-cur-max.md) | Maximum length in bytes of any multibyte character in current locale (macro defined in `STDLIB.H`) | `LC_CTYPE` |
+| [`_mbccpy`, `_mbccpy_l`](reference/mbccpy-mbccpy-l.md), [`_mbccpy_s`, `_mbccpy_s_l`](reference/mbccpy-s-mbccpy-s-l.md) | Copy one multibyte character | `LC_CTYPE` |
+| [`_mbclen`, `mblen`, `_mblen_l`](reference/mbclen-mblen-mblen-l.md) | Validate and return number of bytes in multibyte character | `LC_CTYPE` |
+| [`strlen`, `wcslen`, `_mbslen`, `_mbslen_l`, `_mbstrlen`, `_mbstrlen_l`](reference/strlen-wcslen-mbslen-mbslen-l-mbstrlen-mbstrlen-l.md) | For multibyte-character strings: validate each character in string; return string length | `LC_CTYPE` |
+| [`mbstowcs`, `_mbstowcs_l`](reference/mbstowcs-mbstowcs-l.md), [`mbstowcs_s`, `_mbstowcs_s_l`](reference/mbstowcs-s-mbstowcs-s-l.md) | Convert sequence of multibyte characters to corresponding sequence of wide characters | `LC_CTYPE` |
+| [`mbtowc`, `_mbtowc_l`](reference/mbtowc-mbtowc-l.md) | Convert multibyte character to corresponding wide character | `LC_CTYPE` |
+| [`printf`](reference/printf-printf-l-wprintf-wprintf-l.md) functions | Write formatted output | `LC_NUMERIC` (determines radix character output) |
+| [`scanf`](reference/scanf-scanf-l-wscanf-wscanf-l.md) functions | Read formatted input | `LC_NUMERIC` (determines radix character recognition) |
+| [`setlocale`, `_wsetlocale`](reference/setlocale-wsetlocale.md) | Select locale for program | Not applicable |
+| [`strcoll`, `wcscoll`, `_mbscoll`, `_strcoll_l`, `_wcscoll_l`, `_mbscoll_l`](reference/strcoll-wcscoll-mbscoll-strcoll-l-wcscoll-l-mbscoll-l.md) | Compare characters of two strings | `LC_COLLATE` |
+| [`_stricmp`, `_wcsicmp`, `_mbsicmp`, `_stricmp_l`, `_wcsicmp_l`, `_mbsicmp_l`](reference/stricmp-wcsicmp-mbsicmp-stricmp-l-wcsicmp-l-mbsicmp-l.md) | Compare two strings without regard to case | `LC_CTYPE` |
+| [`_stricoll`, `_wcsicoll`, `_mbsicoll`, `_stricoll_l`, `_wcsicoll_l`, `_mbsicoll_l`](reference/stricoll-wcsicoll-mbsicoll-stricoll-l-wcsicoll-l-mbsicoll-l.md) | Compare characters of two strings (case insensitive) | `LC_COLLATE` |
+| [`_strncoll`, `_wcsncoll`, `_mbsncoll`, `_strncoll_l`, `_wcsncoll_l`, `_mbsncoll_l`](reference/strncoll-wcsncoll-mbsncoll-strncoll-l-wcsncoll-l-mbsncoll-l.md) | Compare first **`n`** characters of two strings | `LC_COLLATE` |
+| [`_strnicmp`, `_wcsnicmp`, `_mbsnicmp`, `_strnicmp_l`, `_wcsnicmp_l`, `_mbsnicmp_l`](reference/strnicmp-wcsnicmp-mbsnicmp-strnicmp-l-wcsnicmp-l-mbsnicmp-l.md) | Compare characters of two strings without regard to case. | `LC_CTYPE` |
+| [`_strnicoll`, `_wcsnicoll`, `_mbsnicoll`, `_strnicoll_l`, `_wcsnicoll_l`, `_mbsnicoll_l`](reference/strnicoll-wcsnicoll-mbsnicoll-strnicoll-l-wcsnicoll-l-mbsnicoll-l.md) | Compare first **`n`** characters of two strings (case insensitive) | `LC_COLLATE` |
+| [`strftime`, `wcsftime`, `_strftime_l`, `_wcsftime_l`](reference/strftime-wcsftime-strftime-l-wcsftime-l.md) | Format date and time value according to supplied **`format`** argument | `LC_TIME` |
+| [`_strlwr`, `_wcslwr`, `_mbslwr`, `_strlwr_l`, `_wcslwr_l`, `_mbslwr_l`](reference/strlwr-wcslwr-mbslwr-strlwr-l-wcslwr-l-mbslwr-l.md), [`_strlwr_s`, `_strlwr_s_l`, `_mbslwr_s`, `_mbslwr_s_l`, `_wcslwr_s`, `_wcslwr_s_l`](reference/strlwr-s-strlwr-s-l-mbslwr-s-mbslwr-s-l-wcslwr-s-wcslwr-s-l.md) | Convert, in place, each uppercase letter in given string to lowercase | `LC_CTYPE` |
+| [`strtod`, `_strtod_l`, `wcstod`, `_wcstod_l`](reference/strtod-strtod-l-wcstod-wcstod-l.md) | Convert character string to **`double`** value | `LC_NUMERIC` (determines radix character recognition) |
+| [`strtol`, `wcstol`, `_strtol_l`, `_wcstol_l`](reference/strtol-wcstol-strtol-l-wcstol-l.md) | Convert character string to **`long`** value | `LC_NUMERIC` (determines radix character recognition) |
+| [`strtoul`, `_strtoul_l`, `wcstoul`, `_wcstoul_l`](reference/strtoul-strtoul-l-wcstoul-wcstoul-l.md) | Convert character string to unsigned long value | `LC_NUMERIC` (determines radix character recognition) |
+| [`_strupr`, `_strupr_l`, `_mbsupr`, `_mbsupr_l`, `_wcsupr_l`, `_wcsupr`](reference/strupr-strupr-l-mbsupr-mbsupr-l-wcsupr-l-wcsupr.md), [`_strupr_s`, `_strupr_s_l`, `_mbsupr_s`, `_mbsupr_s_l`, `_wcsupr_s`, `_wcsupr_s_l`](reference/strupr-s-strupr-s-l-mbsupr-s-mbsupr-s-l-wcsupr-s-wcsupr-s-l.md) | Convert, in place, each lowercase letter in string to uppercase | `LC_CTYPE` |
+| [`strxfrm`, `wcsxfrm`, `_strxfrm_l`, `_wcsxfrm_l`](reference/strxfrm-wcsxfrm-strxfrm-l-wcsxfrm-l.md) | Transform string into collated form according to locale | `LC_COLLATE` |
+| [`tolower`, `_tolower`, `towlower`, `_tolower_l`, `_towlower_l`](reference/tolower-tolower-towlower-tolower-l-towlower-l.md), [`_mbctolower`, `_mbctolower_l`, `_mbctoupper`, `_mbctoupper_l`](reference/mbctolower-mbctolower-l-mbctoupper-mbctoupper-l.md) | Convert given character to corresponding lowercase character | `LC_CTYPE` |
+| [`toupper`, `_toupper`, `towupper`, `_toupper_l`, `_towupper_l`](reference/toupper-toupper-towupper-toupper-l-towupper-l.md), [`_mbctolower`, `_mbctolower_l`, `_mbctoupper`, `_mbctoupper_l`](reference/mbctolower-mbctolower-l-mbctoupper-mbctoupper-l.md) | Convert given character to corresponding uppercase letter | `LC_CTYPE` |
+| [`wcstombs`, `_wcstombs_l`](reference/wcstombs-wcstombs-l.md), [`wcstombs_s`, `_wcstombs_s_l`](reference/wcstombs-s-wcstombs-s-l.md) | Convert sequence of wide characters to corresponding sequence of multibyte characters | `LC_CTYPE` |
+| [`wctomb`, `_wctomb_l`](reference/wctomb-wctomb-l.md), [`wctomb_s`, `_wctomb_s_l`](reference/wctomb-s-wctomb-s-l.md) | Convert wide character to corresponding multibyte character | `LC_CTYPE` |
> [!NOTE]
-> For multibyte routines, the multibyte code page must be equivalent to the locale set with [`setlocale`](./reference/setlocale-wsetlocale.md). [`_setmbcp`](./reference/setmbcp.md), with an argument of `_MB_CP_LOCALE` makes the multibyte code page the same as the **`setlocale`** code page.
+> For multibyte routines, the multibyte code page must be equivalent to the locale set with [`setlocale`](reference/setlocale-wsetlocale.md). [`_setmbcp`](reference/setmbcp.md), with an argument of `_MB_CP_LOCALE` makes the multibyte code page the same as the **`setlocale`** code page.
## See also
-[Internationalization](./internationalization.md)\
-[Universal C runtime routines by category](./run-time-routines-by-category.md)
+[Internationalization](internationalization.md)\
+[Universal C runtime routines by category](run-time-routines-by-category.md)
diff --git a/docs/c-runtime-library/lock.md b/docs/c-runtime-library/lock.md
index 3efcf2aed8..19562f13ef 100644
--- a/docs/c-runtime-library/lock.md
+++ b/docs/c-runtime-library/lock.md
@@ -1,14 +1,13 @@
---
-description: "Learn more about: _lock"
title: "_lock"
-ms.date: "11/04/2016"
+description: "Learn more about: _lock"
+ms.date: 11/04/2016
api_name: ["_lock"]
api_location: ["msvcr110_clr0400.dll", "msvcr120.dll", "msvcr100.dll", "msvcr90.dll", "msvcr80.dll", "msvcr110.dll", "msvcrt.dll", "msvcr120_clr0400.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["lock", "_lock"]
+f1_keywords: ["_lock"]
helpviewer_keywords: ["lock function", "_lock function"]
-ms.assetid: 29f77c37-30de-4b3d-91b6-030216e645a6
---
# `_lock`
@@ -20,7 +19,7 @@ Acquires a multi-thread lock.
## Syntax
```cpp
-void __cdecl _lock
+void __cdecl _lock(
int locknum
);
```
diff --git a/docs/c-runtime-library/locking-constants.md b/docs/c-runtime-library/locking-constants.md
index b6ccc86e45..3951399044 100644
--- a/docs/c-runtime-library/locking-constants.md
+++ b/docs/c-runtime-library/locking-constants.md
@@ -2,7 +2,7 @@
description: "Learn more about: _locking Constants"
title: "_locking Constants"
ms.date: "11/04/2016"
-f1_keywords: ["_LK_RLCK", "_LK_NBLCK", "_LK_LOCK", "_LK_NBRLCK", "_LK_UNLCK"]
+f1_keywords: ["LOCKING/_LK_RLCK", "LOCKING/_LK_NBLCK", "LOCKING/_LK_LOCK", "LOCKING/_LK_NBRLCK", "LOCKING/_LK_UNLCK", "LOCKING/LK_RLCK", "LOCKING/LK_NBLCK", "LOCKING/LK_LOCK", "LOCKING/LK_NBRLCK", "LOCKING/LK_UNLCK", "_LK_RLCK", "_LK_NBLCK", "_LK_LOCK", "_LK_NBRLCK", "_LK_UNLCK", "LK_RLCK", "LK_NBLCK", "LK_LOCK", "LK_NBRLCK", "LK_UNLCK"]
helpviewer_keywords: ["LK_UNLCK constant", "LK_NBRLCK constant", "_LK_NBRLCK constant", "_LK_NBLCK constant", "_LK_LOCK constant", "LK_NBLCK constant", "_LK_UNLCK constant", "LK_RLCK constant", "_LK_RLCK constant", "LK_LOCK constant"]
ms.assetid: c3dc92c8-60e3-4d29-9f50-5d217627c8ad
---
diff --git a/docs/c-runtime-library/math-constants.md b/docs/c-runtime-library/math-constants.md
index cd7110f018..61b129659a 100644
--- a/docs/c-runtime-library/math-constants.md
+++ b/docs/c-runtime-library/math-constants.md
@@ -2,7 +2,7 @@
description: "Learn more about: Math Constants"
title: "Math Constants"
ms.date: "11/04/2016"
-f1_keywords: ["c.constants.math"]
+f1_keywords: ["c.constants.math", "_USE_MATH_DEFINES", "CORECRT_MATH_DEFINES/M_E", "CORECRT_MATH_DEFINES/M_LOG2E", "CORECRT_MATH_DEFINES/M_LOG10E", "CORECRT_MATH_DEFINES/M_LN2", "CORECRT_MATH_DEFINES/M_LN10", "CORECRT_MATH_DEFINES/M_PI", "CORECRT_MATH_DEFINES/M_PI_2", "CORECRT_MATH_DEFINES/M_PI_4", "CORECRT_MATH_DEFINES/M_1_PI", "CORECRT_MATH_DEFINES/M_2_PI", "CORECRT_MATH_DEFINES/M_2_SQRTPI", "CORECRT_MATH_DEFINES/M_SQRT2", "CORECRT_MATH_DEFINES/M_SQRT1_2", "M_E", "M_LOG2E", "M_LOG10E", "M_LN2", "M_LN10", "M_PI", "M_PI_2", "M_PI_4", "M_1_PI", "M_2_PI", "M_2_SQRTPI", "M_SQRT2", "M_SQRT1_2"]
helpviewer_keywords: ["M_PI constant", "M_PI_2 constant", "math constants", "M_2_PI constant", "M_1_PI constant", "M_E constant", "USE_MATH_DEFINES constant", "M_LOG2E constant", "M_LOG10E constant", "M_LN10 constant", "M_SQRT1_2 constant", "_USE_MATH_DEFINES constant", "M_PI_4 constant", "constants, math", "M_2_SQRTPI constant", "M_SQRT2 constant", "M_LN2 constant"]
ms.assetid: db533c3f-6ae8-4520-9d35-c8fabbef3529
---
diff --git a/docs/c-runtime-library/math-error-constants.md b/docs/c-runtime-library/math-error-constants.md
index 6b598ed388..78d4219229 100644
--- a/docs/c-runtime-library/math-error-constants.md
+++ b/docs/c-runtime-library/math-error-constants.md
@@ -2,7 +2,7 @@
description: "Learn more about: Math Error Constants"
title: "Math Error Constants"
ms.date: "11/04/2016"
-f1_keywords: ["_PLOSS", "_UNDERFLOW", "_TLOSS", "_SING", "_DOMAIN", "_OVERFLOW"]
+f1_keywords: ["CORECRT_MATH/_PLOSS", "CORECRT_MATH/_UNDERFLOW", "CORECRT_MATH/_TLOSS", "CORECRT_MATH/_SING", "CORECRT_MATH/_DOMAIN", "CORECRT_MATH/_OVERFLOW", "_PLOSS", "_UNDERFLOW", "_TLOSS", "_SING", "_DOMAIN", "_OVERFLOW"]
helpviewer_keywords: ["_TLOSS constant", "_SING constant", "PLOSS constant", "UNDERFLOW constant", "_UNDERFLOW constant", "_OVERFLOW constant", "DOMAIN constant", "OVERFLOW constant", "TLOSS constant", "SING constant", "_DOMAIN constant", "_PLOSS constant", "math error constants"]
ms.assetid: 4be933a6-674e-45a5-8ac9-090023542f5b
---
diff --git a/docs/c-runtime-library/mb-cur-max-func-mb-cur-max-l-func-p-mb-cur-max-mb-cur-max.md b/docs/c-runtime-library/mb-cur-max-func-mb-cur-max-l-func-p-mb-cur-max-mb-cur-max.md
index 538f6fc375..4c8ff5a4ab 100644
--- a/docs/c-runtime-library/mb-cur-max-func-mb-cur-max-l-func-p-mb-cur-max-mb-cur-max.md
+++ b/docs/c-runtime-library/mb-cur-max-func-mb-cur-max-l-func-p-mb-cur-max-mb-cur-max.md
@@ -6,7 +6,7 @@ api_name: ["___mb_cur_max_l_func", "__p___mb_cur_max", "___mb_cur_max_func", "__
api_location: ["msvcr110_clr0400.dll", "msvcr110.dll", "msvcr80.dll", "msvcr100.dll", "msvcrt.dll", "msvcr90.dll", "msvcr120.dll", "api-ms-win-crt-locale-l1-1-0.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["___mb_cur_max_func", "___mb_cur_max_l_func", "__p___mb_cur_max", "__mb_cur_max"]
+f1_keywords: ["STDLIB/___mb_cur_max_func", "STDLIB/___mb_cur_max_l_func", "STDLIB/__mb_cur_max", "___mb_cur_max_func", "___mb_cur_max_l_func", "__p___mb_cur_max", "__mb_cur_max"]
helpviewer_keywords: ["__mb_cur_max", "___mb_cur_max_func", "___mb_cur_max_l_func", "__p___mb_cur_max"]
ms.assetid: 60d36108-1ca7-45a6-8ce7-68a91f13e3a1
---
diff --git a/docs/c-runtime-library/new-operator-crt.md b/docs/c-runtime-library/new-operator-crt.md
index 161e0cee8b..c5273af0c4 100644
--- a/docs/c-runtime-library/new-operator-crt.md
+++ b/docs/c-runtime-library/new-operator-crt.md
@@ -5,7 +5,6 @@ ms.date: "11/04/2016"
api_location: ["msvcr110_clr0400.dll", "msvcr100.dll", "msvcr120.dll", "msvcr110.dll", "msvcr80.dll", "msvcr90.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["new[]"]
helpviewer_keywords: ["operator new[]", "vector new"]
ms.assetid: 79682f85-6889-40f6-b8f7-9eed5176ea35
---
diff --git a/docs/c-runtime-library/nolock-functions.md b/docs/c-runtime-library/nolock-functions.md
index 2f99d4430c..b231f2d923 100644
--- a/docs/c-runtime-library/nolock-functions.md
+++ b/docs/c-runtime-library/nolock-functions.md
@@ -1,53 +1,38 @@
---
-description: "Learn more about: _nolock Functions"
title: "_nolock Functions"
-ms.date: "11/04/2016"
+description: "Learn more about: _nolock Functions"
+ms.date: "04/14/2024"
helpviewer_keywords: ["_nolock functions", "nolock functions"]
-ms.assetid: 7d651d87-38d2-4303-9897-fdb5f7a3e899
---
# `_nolock` functions
-The `_nolock` functions are versions of I/O functions that don't perform any locking. They're provided for users requiring maximum performance. For more information, see [Multithreaded libraries performance](./multithreaded-libraries-performance.md).
+The `_nolock` functions are versions of I/O functions that don't perform any locking. They're provided for users requiring maximum performance. For more information, see [Multithreaded libraries performance](multithreaded-libraries-performance.md).
-Use _nolock functions only if your program is truly single-threaded or if it does its own locking.
+Use `_nolock` functions only if your program is truly single-threaded or if it does its own locking.
## No lock routines
-[`_fclose_nolock`](./reference/fclose-nolock.md)
-
-[`_fflush_nolock`](./reference/fflush-nolock.md)
-
-[`_fgetc_nolock`, `_fgetwc_nolock`](./reference/fgetc-nolock-fgetwc-nolock.md)
-
-[`_fread_nolock`](./reference/fread-nolock.md)
-
-[`_fseek_nolock`, `_fseeki64_nolock`](./reference/fseek-nolock-fseeki64-nolock.md)
-
-[`_ftell_nolock`, `_ftelli64_nolock`](./reference/ftell-nolock-ftelli64-nolock.md)
-
-[`_fwrite_nolock`](./reference/fwrite-nolock.md)
-
-[`_getc_nolock`, `_getwc_nolock`](./reference/getc-nolock-getwc-nolock.md)
-
-[`_getch_nolock`, `_getwch_nolock`](./reference/getch-nolock-getwch-nolock.md)
-
-[`_getchar_nolock`, `_getwchar_nolock`](./reference/getchar-nolock-getwchar-nolock.md)
-
-[`_getche_nolock`, `_getwche_nolock`](./reference/getche-nolock-getwche-nolock.md)
-
-[`_getdcwd_nolock`, `_wgetdcwd_nolock`](./reference/getdcwd-nolock-wgetdcwd-nolock.md)
-
-[`_putc_nolock`, `_putwc_nolock`](./reference/putc-nolock-putwc-nolock.md)
-
-[`_putch_nolock`, `_putwch_nolock`](./reference/putch-nolock-putwch-nolock.md)
-
-[`_putchar_nolock`, `_putwchar_nolock`](./reference/putchar-nolock-putwchar-nolock.md)
-
-[`_ungetc_nolock`, `_ungetwc_nolock`](./reference/ungetc-nolock-ungetwc-nolock.md)
-
-[`_ungetch_nolock`, `_ungetwch_nolock`](./reference/ungetch-ungetwch-ungetch-nolock-ungetwch-nolock.md)
+| Routine | Use |
+|---|---|
+| [`_fclose_nolock`](reference/fclose-nolock.md) | Closes a stream without locking |
+| [`_fflush_nolock`](reference/fflush-nolock.md) | Flushes a stream without locking |
+| [`_fgetc_nolock`, `_fgetwc_nolock`](reference/fgetc-nolock-fgetwc-nolock.md) | Reads a character from a stream without locking |
+| [`_fread_nolock`](reference/fread-nolock.md) | Reads data from a stream without locking |
+| [`_fseek_nolock`, `_fseeki64_nolock`](reference/fseek-nolock-fseeki64-nolock.md) | Moves the file pointer to a specified location without locking |
+| [`_ftell_nolock`, `_ftelli64_nolock`](reference/ftell-nolock-ftelli64-nolock.md) | Gets the current position of a file pointer without locking |
+| [`_fwrite_nolock`](reference/fwrite-nolock.md) | Writes data to a stream without locking |
+| [`_getc_nolock`, `_getwc_nolock`](reference/getc-nolock-getwc-nolock.md) | Reads a character from a stream without locking |
+| [`_getch_nolock`, `_getwch_nolock`](reference/getch-nolock-getwch-nolock.md) | Gets a character from the console without echo and without locking |
+| [`_getchar_nolock`, `_getwchar_nolock`](reference/getchar-nolock-getwchar-nolock.md) | Reads a character from the standard input without locking |
+| [`_getche_nolock`, `_getwche_nolock`](reference/getche-nolock-getwche-nolock.md) | Gets a character from the console with echo and without locking |
+| [`_getdcwd_nolock`, `_wgetdcwd_nolock`](reference/getdcwd-nolock-wgetdcwd-nolock.md) | Gets the full path of the current working directory on the specified drive |
+| [`_putc_nolock`, `_putwc_nolock`](reference/putc-nolock-putwc-nolock.md) | Writes a character to a stream without locking |
+| [`_putch_nolock`, `_putwch_nolock`](reference/putch-nolock-putwch-nolock.md) | Writes a character to the console without locking |
+| [`_putchar_nolock`, `_putwchar_nolock`](reference/putchar-nolock-putwchar-nolock.md) | Writes a character to `stdout` without locking |
+| [`_ungetc_nolock`, `_ungetwc_nolock`](reference/ungetc-nolock-ungetwc-nolock.md) | Pushes a character back onto the stream without locking |
+| [`_ungetch_nolock`, `_ungetwch_nolock`](reference/ungetch-ungetwch-ungetch-nolock-ungetwch-nolock.md) | Pushes back the last character that's read from the console without locking |
## See also
-[Input and output](./input-and-output.md)\
-[Universal C runtime routines by category](./run-time-routines-by-category.md)
+[Input and output](input-and-output.md)\
+[Universal C runtime routines by category](run-time-routines-by-category.md)
diff --git a/docs/c-runtime-library/p-commode.md b/docs/c-runtime-library/p-commode.md
index 6a5ad340aa..3367ece1ce 100644
--- a/docs/c-runtime-library/p-commode.md
+++ b/docs/c-runtime-library/p-commode.md
@@ -6,7 +6,7 @@ api_name: ["__p__commode", "_o___p__commode"]
api_location: ["msvcr110.dll", "msvcrt.dll", "msvcr120.dll", "msvcr90.dll", "msvcr100.dll", "msvcr80.dll", "msvcr110_clr0400.dll", "api-ms-win-crt-stdio-l1-1-0.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["__p__commode"]
+f1_keywords: ["STDIO/__p__commode", "__p__commode"]
helpviewer_keywords: ["__p__commode"]
ms.assetid: 4380acb8-e3e4-409c-a60f-6205ac5189ce
---
diff --git a/docs/c-runtime-library/p-fmode.md b/docs/c-runtime-library/p-fmode.md
index 27a57b4cac..ce214aea1b 100644
--- a/docs/c-runtime-library/p-fmode.md
+++ b/docs/c-runtime-library/p-fmode.md
@@ -6,7 +6,7 @@ api_name: ["__p__fmode", "_o___p__fmode"]
api_location: ["msvcr80.dll", "msvcr120.dll", "msvcr90.dll", "msvcrt.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr100.dll", "api-ms-win-crt-stdio-l1-1-0.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["__p__fmode"]
+f1_keywords: ["STDLIB/__p__fmode", "__p__fmode"]
helpviewer_keywords: ["__p__fmode"]
ms.assetid: 1daa1394-81eb-43aa-a71b-4cc6acf3207b
---
diff --git a/docs/c-runtime-library/pctype-func.md b/docs/c-runtime-library/pctype-func.md
index 60e628f381..e3918dc32f 100644
--- a/docs/c-runtime-library/pctype-func.md
+++ b/docs/c-runtime-library/pctype-func.md
@@ -6,7 +6,7 @@ api_name: ["__pctype_func", "_o___pctype_func"]
api_location: ["msvcrt.dll", "msvcr110_clr0400.dll", "msvcr110.dll", "msvcr120.dll", "msvcr90.dll", "msvcr100.dll", "msvcr80.dll", "api-ms-win-crt-locale-l1-1-0.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["__pctype_func"]
+f1_keywords: ["CORECRT_WCTYPE/__pctype_func", "__pctype_func"]
helpviewer_keywords: ["__pctype_func"]
ms.assetid: d52b8add-d07d-4516-a22f-e836cde0c57f
---
diff --git a/docs/c-runtime-library/printf-p-positional-parameters.md b/docs/c-runtime-library/printf-p-positional-parameters.md
index cb4ed9f1a4..4237a034ea 100644
--- a/docs/c-runtime-library/printf-p-positional-parameters.md
+++ b/docs/c-runtime-library/printf-p-positional-parameters.md
@@ -2,9 +2,6 @@
description: "Learn more about: printf_p Positional Parameters"
title: "printf_p Positional Parameters"
ms.date: "11/04/2016"
-api_location: ["msvcr120.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr90.dll", "msvcr80.dll", "msvcr100.dll"]
-api_type: ["DLLExport"]
-topic_type: ["apiref"]
helpviewer_keywords: ["_printf_p function, positional parameters", "printf_p function, positional parameters"]
ms.assetid: beb4fd85-a7aa-4665-9085-2c907a5b9ab0
---
diff --git a/docs/c-runtime-library/rand-max.md b/docs/c-runtime-library/rand-max.md
index 4fa2115b4e..532c58038c 100644
--- a/docs/c-runtime-library/rand-max.md
+++ b/docs/c-runtime-library/rand-max.md
@@ -2,7 +2,7 @@
description: "Learn more about: RAND_MAX"
title: "RAND_MAX"
ms.date: "11/04/2016"
-f1_keywords: ["RAND_MAX"]
+f1_keywords: ["STDLIB/RAND_MAX", "RAND_MAX"]
helpviewer_keywords: ["RAND_MAX constant"]
---
# `RAND_MAX`
diff --git a/docs/c-runtime-library/reference/abort.md b/docs/c-runtime-library/reference/abort.md
index 10cc8e6f7b..436a39de91 100644
--- a/docs/c-runtime-library/reference/abort.md
+++ b/docs/c-runtime-library/reference/abort.md
@@ -1,6 +1,6 @@
---
-description: "Learn more about: abort"
title: "abort"
+description: "Learn more about: abort"
ms.date: 07/07/2022
api_name: ["abort", "_o_abort"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-runtime-l1-1-0.dll"]
@@ -14,7 +14,7 @@ helpviewer_keywords: ["aborting current process", "abort function", "processes,
Aborts the current process and returns an error code.
> [!NOTE]
-> Do not use this method to shut down a Microsoft Store app or Universal Windows Platform (UWP) app, except in testing or debugging scenarios. Programmatic or UI ways to close a Store app are not permitted according to the [Microsoft Store policies](/legal/windows/agreements/store-policies). For more information, see [UWP app lifecycle](/windows/uwp/launch-resume/app-lifecycle).
+> Do not use this method to shut down a Microsoft Store app or Universal Windows Platform (UWP) app, except in testing or debugging scenarios. Programmatic or UI ways to close a Store app are not permitted according to the [Microsoft Store policies](/windows/apps/publish/store-policies). For more information, see [UWP app lifecycle](/windows/uwp/launch-resume/app-lifecycle).
## Syntax
@@ -48,7 +48,7 @@ If the Windows error reporting handler isn't invoked, then **`abort`** calls [`_
For Windows compatibility reasons, when **`abort`** calls `_exit`, it may invoke the Windows [`ExitProcess`](/windows/win32/api/processthreadsapi/nf-processthreadsapi-exitprocess) API, which in turn allows DLL termination routines to run. Destructors aren't run in the executable, but the same may not be true of DLLs loaded in the executable's process space. This behavior doesn't strictly conform to the C++ standard. To immediately terminate a process including any DLLs, use the Windows [`TerminateProcess`](/windows/desktop/api/processthreadsapi/nf-processthreadsapi-terminateprocess) API. You can also register an abort signal handler that invokes `TerminateProcess` for standard-compliant behavior. Compliant behavior may come at some cost in Windows compatibility.
-For more information about CRT debugging, see [CRT debugging techniques](/visualstudio/debugger/crt-debugging-techniques).
+For more information about CRT debugging, see [CRT debugging techniques](../crt-debugging-techniques.md).
**End Microsoft Specific**
@@ -71,8 +71,8 @@ The following program tries to open a file and aborts if the attempt fails.
// the abort function by attempting to open a file
// and aborts if the attempt fails.
-#include
-#include
+#include
+#include
int main( void )
{
diff --git a/docs/c-runtime-library/reference/access-s-waccess-s.md b/docs/c-runtime-library/reference/access-s-waccess-s.md
index 1f3fedc12e..c054b3b97d 100644
--- a/docs/c-runtime-library/reference/access-s-waccess-s.md
+++ b/docs/c-runtime-library/reference/access-s-waccess-s.md
@@ -1,19 +1,20 @@
---
-description: "Learn more about: _access_s, _waccess_s"
-title: "_access_s, _waccess_s"
+description: "Learn more about: _access_s, _waccess_s, _taccess_s"
+title: "_access_s, _waccess_s, _taccess_s"
ms.date: "4/2/2020"
-api_name: ["_access_s", "_waccess_s", "_o__access_s", "_o__waccess_s"]
+api_name: ["_access_s", "_waccess_s", "_taccess_s", "_o__access_s", "_o__waccess_s"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-filesystem-l1-1-0.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["waccess_s", "access_s", "_waccess_s", "_access_s"]
-helpviewer_keywords: ["access_s function", "taccess_s function", "_taccess_s function", "waccess_s function", "_access_s function", "_waccess_s function"]
-ms.assetid: fb3004fc-dcd3-4569-8b27-d817546e947e
+f1_keywords: ["waccess_s", "access_s", "_taccess_s"]
+helpviewer_keywords: ["access_s function", "waccess_s function", "_taccess_s function"]
---
-# `_access_s`, `_waccess_s`
+# `_access_s`, `_waccess_s`, `_taccess_s`
Determines file read/write permissions. These functions are versions of [`_access`, `_waccess`](access-waccess.md) with security enhancements as described in [Security features in the CRT](../security-features-in-the-crt.md).
+For `_taccess_s`, see [Generic-text function mappings](#generic-text-function-mappings).
+
## Syntax
```C
@@ -66,18 +67,20 @@ These functions validate their parameters. If *`path`* is `NULL` or *`mode`* doe
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).
-### Generic-text routine mappings
+### Generic-text function mappings
+
+The function in the `tchar.h` column maps to the function in the other columns depending on the character set that is defined at compile time.
-| Tchar.h routine | `_UNICODE` and `_MBCS` not defined | `_MBCS` defined | `_UNICODE` defined |
+| `tchar.h` function | `_UNICODE` and `_MBCS` not defined | `_MBCS` defined | `_UNICODE` defined |
|---|---|---|---|
-| `_taccess_s` | **`_access_s`** | **`_access_s`** | **`_waccess_s`** |
+| `_taccess_s` | `_access_s` | `_access_s` | `_waccess_s` |
## Requirements
| Routine | Required header | Optional header |
|---|---|---|
-| **`_access_s`** | \ | \ |
-| **`_waccess_s`** | \ or \ | \ |
+| **`_access_s`** | `` | `` |
+| **`_waccess_s`** | `` or `` | `` |
## Example
diff --git a/docs/c-runtime-library/reference/access-waccess.md b/docs/c-runtime-library/reference/access-waccess.md
index b6c08cc8bf..87cf212ca0 100644
--- a/docs/c-runtime-library/reference/access-waccess.md
+++ b/docs/c-runtime-library/reference/access-waccess.md
@@ -1,19 +1,20 @@
---
-description: "Learn more about: _access, _waccess"
title: "_access, _waccess"
+description: "Learn more about: _access, _waccess"
ms.date: "4/2/2020"
-api_name: ["_access", "_waccess", "_o__access", "_o__waccess"]
+api_name: ["_access", "_waccess", "t_access", "_o__access", "_o__waccess"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-filesystem-l1-1-0.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
f1_keywords: ["_waccess", "_access", "taccess", "waccess", "_taccess"]
helpviewer_keywords: ["access function", "_taccess function", "waccess function", "_access function", "_waccess function", "taccess function"]
-ms.assetid: ba34f745-85c3-49e5-a7d4-3590bd249dd3
---
-# `_access`, `_waccess`
+# `_access`, `_waccess`, `t_access`
Determines if a file is read-only or not. More secure versions are available; see [`_access_s`, `_waccess_s`](access-s-waccess-s.md).
+For `_taccess`, see [Generic-text function mappings](#generic-text-function-mappings).
+
## Syntax
```C
@@ -66,7 +67,7 @@ This function validates its parameters. If *`path`* is `NULL` or *`mode`* doesn'
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).
-### Generic-text routine mappings
+### Generic-text function mappings
| `Tchar.h` routine | `_UNICODE` and `_MBCS` not defined | `_MBCS` defined | `_UNICODE` defined |
|---|---|---|---|
@@ -89,9 +90,9 @@ The following example uses **`_access`** to check the file named *`crt_ACCESS.C`
// This example uses _access to check the file named
// crt_ACCESS.C to see if it exists and if writing is allowed.
-#include
-#include
-#include
+#include
+#include
+#include
int main( void )
{
diff --git a/docs/c-runtime-library/reference/aligned-free-dbg.md b/docs/c-runtime-library/reference/aligned-free-dbg.md
index 335eb7bcd7..1ef9d5fe97 100644
--- a/docs/c-runtime-library/reference/aligned-free-dbg.md
+++ b/docs/c-runtime-library/reference/aligned-free-dbg.md
@@ -35,7 +35,7 @@ The **`_aligned_free_dbg`** function is a debug version of the [`_aligned_free`]
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`](../errno-doserrno-sys-errlist-and-sys-nerr.md).
-For information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT debug heap details](/visualstudio/debugger/crt-debug-heap-details). For information about the allocation block types and how they're used, see [Types of blocks on the debug heap](/visualstudio/debugger/crt-debug-heap-details). For information about the differences between standard heap functions and their debug versions, see [Debug versions of heap allocation functions](/visualstudio/debugger/debug-versions-of-heap-allocation-functions).
+For information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT debug heap details](../crt-debug-heap-details.md). For information about the allocation block types and how they're used, see [Types of blocks on the debug heap](../crt-debug-heap-details.md#types-of-blocks-on-the-debug-heap). For information about the differences between standard heap functions and their debug versions, see [Debug versions of heap allocation functions](../debug-versions-of-heap-allocation-functions.md).
## Requirements
diff --git a/docs/c-runtime-library/reference/aligned-malloc-dbg.md b/docs/c-runtime-library/reference/aligned-malloc-dbg.md
index 3bd869b597..c9a59fa438 100644
--- a/docs/c-runtime-library/reference/aligned-malloc-dbg.md
+++ b/docs/c-runtime-library/reference/aligned-malloc-dbg.md
@@ -51,7 +51,7 @@ A pointer to the memory block that was allocated or `NULL` if the operation fail
**`_aligned_malloc_dbg`** sets `errno` to `ENOMEM` if a memory allocation fails or if the amount of memory needed (including the overhead mentioned previously) exceeds `_HEAP_MAXREQ`. For information about this and other error codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). Also, **`_aligned_malloc_dbg`** validates its parameters. If *`alignment`* isn't a power of 2 or *`size`* is zero, this function invokes the invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, this function returns `NULL` and sets `errno` to `EINVAL`.
-For information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT debug heap details](/visualstudio/debugger/crt-debug-heap-details). For information about the allocation block types and how they're used, see [Types of blocks on the debug heap](/visualstudio/debugger/crt-debug-heap-details). For information about the differences between standard heap functions and their debug versions, see [Debug versions of heap allocation functions](/visualstudio/debugger/debug-versions-of-heap-allocation-functions).
+For information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT debug heap details](../crt-debug-heap-details.md). For information about the allocation block types and how they're used, see [Types of blocks on the debug heap](../crt-debug-heap-details.md#types-of-blocks-on-the-debug-heap). For information about the differences between standard heap functions and their debug versions, see [Debug versions of heap allocation functions](../debug-versions-of-heap-allocation-functions.md).
## Requirements
diff --git a/docs/c-runtime-library/reference/aligned-msize-dbg.md b/docs/c-runtime-library/reference/aligned-msize-dbg.md
index 59c29a626b..ef2623a5e2 100644
--- a/docs/c-runtime-library/reference/aligned-msize-dbg.md
+++ b/docs/c-runtime-library/reference/aligned-msize-dbg.md
@@ -47,7 +47,7 @@ The *`alignment`* and *`offset`* values must be the same as the values passed to
This function validates its parameter. If *`memblock`* is a null pointer or *`alignment`* isn't a power of 2, `_msize` invokes an invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). If the error is handled, the function sets `errno` to `EINVAL` and returns -1.
-For information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT debug heap details](/visualstudio/debugger/crt-debug-heap-details). For information about the allocation block types and how they're used, see [Types of blocks on the debug heap](/visualstudio/debugger/crt-debug-heap-details). For information about the differences between standard heap functions and their debug versions, see [Debug versions of heap allocation functions](/visualstudio/debugger/debug-versions-of-heap-allocation-functions).
+For information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT debug heap details](../crt-debug-heap-details.md). For information about the allocation block types and how they're used, see [Types of blocks on the debug heap](../crt-debug-heap-details.md#types-of-blocks-on-the-debug-heap). For information about the differences between standard heap functions and their debug versions, see [Debug versions of heap allocation functions](../debug-versions-of-heap-allocation-functions.md).
## Requirements
diff --git a/docs/c-runtime-library/reference/aligned-msize.md b/docs/c-runtime-library/reference/aligned-msize.md
index 0a788ac236..62782ee251 100644
--- a/docs/c-runtime-library/reference/aligned-msize.md
+++ b/docs/c-runtime-library/reference/aligned-msize.md
@@ -43,7 +43,7 @@ Returns the size (in bytes) as an unsigned integer.
The **`_aligned_msize`** function returns the size, in bytes, of the memory block allocated by a call to [`_aligned_malloc`](aligned-malloc.md) or [`_aligned_realloc`](aligned-realloc.md). The *`alignment`* and *`offset`* values must be the same as the values passed to the function that allocated the block.
-When the application is linked with a debug version of the C run-time libraries, **`_aligned_msize`** resolves to [`_aligned_msize_dbg`](aligned-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).
+When the application is linked with a debug version of the C run-time libraries, **`_aligned_msize`** resolves to [`_aligned_msize_dbg`](aligned-msize-dbg.md). For more information about how the heap is managed during the debugging process, see [The CRT debug heap](../crt-debug-heap-details.md).
This function validates its parameter. If *`memblock`* is a null pointer or *`alignment`* isn't a power of 2, **`_aligned_msize`** invokes an invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). If the error is handled, the function sets `errno` to `EINVAL` and returns -1.
diff --git a/docs/c-runtime-library/reference/aligned-offset-malloc-dbg.md b/docs/c-runtime-library/reference/aligned-offset-malloc-dbg.md
index 1ba74be1cb..3eaa602cfb 100644
--- a/docs/c-runtime-library/reference/aligned-offset-malloc-dbg.md
+++ b/docs/c-runtime-library/reference/aligned-offset-malloc-dbg.md
@@ -59,9 +59,9 @@ A pointer to the memory block that was allocated or `NULL` if the operation fail
This function sets `errno` to `ENOMEM` if the memory allocation failed or if the requested size was greater than `_HEAP_MAXREQ`. For more information about `errno`, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). Also, `_aligned_offset_malloc` validates its parameters. If *`alignment`* isn't a power of 2, or if *`offset`* is non-zero and greater than or equal to *`size`*, this function invokes the invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, this function returns `NULL` and sets `errno` to `EINVAL`.
-For information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT debug heap details](/visualstudio/debugger/crt-debug-heap-details).
+For information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT debug heap details](../crt-debug-heap-details.md).
-For information about the allocation block types and how they're used, see [Types of blocks on the debug heap](/visualstudio/debugger/crt-debug-heap-details).
+For information about the allocation block types and how they're used, see [Types of blocks on the debug heap](../crt-debug-heap-details.md#types-of-blocks-on-the-debug-heap).
## Requirements
diff --git a/docs/c-runtime-library/reference/aligned-offset-realloc-dbg.md b/docs/c-runtime-library/reference/aligned-offset-realloc-dbg.md
index 1d15ec8793..b9292dae92 100644
--- a/docs/c-runtime-library/reference/aligned-offset-realloc-dbg.md
+++ b/docs/c-runtime-library/reference/aligned-offset-realloc-dbg.md
@@ -61,7 +61,7 @@ Like [`_aligned_offset_malloc`](aligned-offset-malloc.md), **`_aligned_offset_re
This function sets `errno` to `ENOMEM` if the memory allocation failed or if the requested size was greater than `_HEAP_MAXREQ`. For more information about `errno`, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). Also, **`_aligned_offset_realloc_dbg`** validates its parameters. If *`alignment`* isn't a power of 2 or if *`offset`* is non-zero and greater than or equal to *`size`*, this function invokes the invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, this function returns `NULL` and sets `errno` to `EINVAL`.
-For information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT debug heap details](/visualstudio/debugger/crt-debug-heap-details). For information about the allocation block types and how they're used, see [Types of blocks on the debug heap](/visualstudio/debugger/crt-debug-heap-details). For information about the differences between standard heap functions and their debug versions, see [Debug versions of heap allocation functions](/visualstudio/debugger/debug-versions-of-heap-allocation-functions).
+For information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT debug heap details](../crt-debug-heap-details.md). For information about the allocation block types and how they're used, see [Types of blocks on the debug heap](../crt-debug-heap-details.md#types-of-blocks-on-the-debug-heap). For information about the differences between standard heap functions and their debug versions, see [Debug versions of heap allocation functions](../debug-versions-of-heap-allocation-functions.md).
## Requirements
diff --git a/docs/c-runtime-library/reference/aligned-offset-recalloc-dbg.md b/docs/c-runtime-library/reference/aligned-offset-recalloc-dbg.md
index 5cb27e2cfe..34046b47a6 100644
--- a/docs/c-runtime-library/reference/aligned-offset-recalloc-dbg.md
+++ b/docs/c-runtime-library/reference/aligned-offset-recalloc-dbg.md
@@ -63,7 +63,7 @@ Line number in the source file where the realloc operation was requested or `NUL
This function sets `errno` to `ENOMEM` if the memory allocation failed or if the requested size (*`number`* * *`size`*) was greater than `_HEAP_MAXREQ`. For more information about `errno`, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). Also, **`_aligned_offset_recalloc_dbg`** validates its parameters. If *`alignment`* isn't a power of 2, or if *`offset`* is non-zero and greater than or equal to the requested *`size`*, this function invokes the invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, this function returns `NULL` and sets `errno` to `EINVAL`.
-For information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT debug heap details](/visualstudio/debugger/crt-debug-heap-details). For information about the allocation block types and how they're used, see [Types of blocks on the debug heap](/visualstudio/debugger/crt-debug-heap-details). For information about the differences between standard heap functions and their debug versions, see [Debug versions of heap allocation functions](/visualstudio/debugger/debug-versions-of-heap-allocation-functions).
+For information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT debug heap details](../crt-debug-heap-details.md). For information about the allocation block types and how they're used, see [Types of blocks on the debug heap](../crt-debug-heap-details.md#types-of-blocks-on-the-debug-heap). For information about the differences between standard heap functions and their debug versions, see [Debug versions of heap allocation functions](../debug-versions-of-heap-allocation-functions.md).
## Requirements
diff --git a/docs/c-runtime-library/reference/aligned-realloc-dbg.md b/docs/c-runtime-library/reference/aligned-realloc-dbg.md
index 046ed087e9..02f8a69c49 100644
--- a/docs/c-runtime-library/reference/aligned-realloc-dbg.md
+++ b/docs/c-runtime-library/reference/aligned-realloc-dbg.md
@@ -59,7 +59,7 @@ It's an error to reallocate memory and change the alignment of a block.
Also, **`_aligned_realloc_dbg`** validates its parameters. If *`alignment`* isn't a power of 2, this function invokes the invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, this function returns `NULL` and sets `errno` to `EINVAL`.
-For information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT debug heap details](/visualstudio/debugger/crt-debug-heap-details). For information about the allocation block types and how they're used, see [Types of blocks on the debug heap](/visualstudio/debugger/crt-debug-heap-details). For information about the differences between standard heap functions and their debug versions, see [Debug versions of heap allocation functions](/visualstudio/debugger/debug-versions-of-heap-allocation-functions).
+For information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT debug heap details](../crt-debug-heap-details.md). For information about the allocation block types and how they're used, see [Types of blocks on the debug heap](../crt-debug-heap-details.md#types-of-blocks-on-the-debug-heap). For information about the differences between standard heap functions and their debug versions, see [Debug versions of heap allocation functions](../debug-versions-of-heap-allocation-functions.md).
## Requirements
diff --git a/docs/c-runtime-library/reference/aligned-recalloc-dbg.md b/docs/c-runtime-library/reference/aligned-recalloc-dbg.md
index 40b3a04bb3..41d2154689 100644
--- a/docs/c-runtime-library/reference/aligned-recalloc-dbg.md
+++ b/docs/c-runtime-library/reference/aligned-recalloc-dbg.md
@@ -63,7 +63,7 @@ It's an error to reallocate memory and change the alignment of a block.
Also, **`_aligned_recalloc_dbg`** validates its parameters. If *`alignment`* isn't a power of 2, this function invokes the invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, this function returns `NULL` and sets `errno` to `EINVAL`.
-For information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT debug heap details](/visualstudio/debugger/crt-debug-heap-details). For information about the allocation block types and how they're used, see [Types of blocks on the debug heap](/visualstudio/debugger/crt-debug-heap-details). For information about the differences between standard heap functions and their debug versions, see [Debug versions of heap allocation functions](/visualstudio/debugger/debug-versions-of-heap-allocation-functions).
+For information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT debug heap details](../crt-debug-heap-details.md). For information about the allocation block types and how they're used, see [Types of blocks on the debug heap](../crt-debug-heap-details.md#types-of-blocks-on-the-debug-heap). For information about the differences between standard heap functions and their debug versions, see [Debug versions of heap allocation functions](../debug-versions-of-heap-allocation-functions.md).
## Requirements
diff --git a/docs/c-runtime-library/reference/and-eq.md b/docs/c-runtime-library/reference/and-eq.md
index eedfaa1408..b8844704b3 100644
--- a/docs/c-runtime-library/reference/and-eq.md
+++ b/docs/c-runtime-library/reference/and-eq.md
@@ -5,7 +5,7 @@ ms.date: "11/04/2016"
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["and_eq", "std.and_eq", "std::and_eq"]
+f1_keywords: ["ISO646/and_eq", "and_eq", "std.and_eq", "std::and_eq"]
helpviewer_keywords: ["and_eq macro"]
ms.assetid: 11091772-e359-4c2b-95c6-00841ac04354
---
diff --git a/docs/c-runtime-library/reference/and.md b/docs/c-runtime-library/reference/and.md
index 29068d62c8..efa2cca286 100644
--- a/docs/c-runtime-library/reference/and.md
+++ b/docs/c-runtime-library/reference/and.md
@@ -1,13 +1,12 @@
---
-description: "Learn more about: and"
title: "and"
+description: "Learn more about: and"
ms.date: "11/04/2016"
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["And", "std.and", "std::and"]
+f1_keywords: ["ISO646/and", "and", "std.and", "std::and"]
helpviewer_keywords: ["and macro"]
-ms.assetid: 2644ab57-8e1b-48f0-9021-cafe3e26bdc4
---
# `and`
@@ -16,7 +15,6 @@ An alternative to the && operator.
## Syntax
```C
-
#define and &&
```
diff --git a/docs/c-runtime-library/reference/assert-asserte-assert-expr-macros.md b/docs/c-runtime-library/reference/assert-asserte-assert-expr-macros.md
index 2067b8fa6a..d2d7395810 100644
--- a/docs/c-runtime-library/reference/assert-asserte-assert-expr-macros.md
+++ b/docs/c-runtime-library/reference/assert-asserte-assert-expr-macros.md
@@ -42,14 +42,14 @@ Because the `_ASSERTE` macro specifies the failed expression, and `_ASSERT_EXPR`
Unless you specify otherwise with the [`_CrtSetReportMode`](crtsetreportmode.md) and [`_CrtSetReportFile`](crtsetreportfile.md) functions, messages appear in a pop-up dialog box equivalent to setting:
```C
-_CrtSetReportMode(CRT_ASSERT, _CRTDBG_MODE_WNDW);
+_CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_WNDW);
```
`_CrtDbgReportW` generates the debug report and determines its destination or destinations, based on the current report mode or modes and file defined for the `_CRT_ASSERT` report type. By default, assertion failures and errors are directed to a debug message window. The [`_CrtSetReportMode`](crtsetreportmode.md) and [`_CrtSetReportFile`](crtsetreportfile.md) functions are used to define the destinations for each report type.
When the destination is a debug message window and the user selects the **Retry** button, `_CrtDbgReportW` returns 1, causing the `_ASSERT_EXPR`, `_ASSERT` and `_ASSERTE` macros to start the debugger if just-in-time (JIT) debugging is enabled.
-For more information about the reporting process, see the [`_CrtDbgReport`, `_CrtDbgReportW`](crtdbgreport-crtdbgreportw.md) function. For more information about resolving assertion failures and using these macros as a debugging error handling mechanism, see [Using macros for verification and reporting](/visualstudio/debugger/macros-for-reporting).
+For more information about the reporting process, see the [`_CrtDbgReport`, `_CrtDbgReportW`](crtdbgreport-crtdbgreportw.md) function. For more information about resolving assertion failures and using these macros as a debugging error handling mechanism, see [Macros for reporting](../crt-debugging-techniques.md#macros-for-reporting).
In addition to the `_ASSERT` macros, the [`assert`](assert-macro-assert-wassert.md) macro can be used to verify program logic. This macro is available in both the debug and release versions of the libraries. The [`_RPT`, `_RPTF`](rpt-rptf-rptw-rptfw-macros.md) debug macros are also available for generating a debug report, but they don't evaluate an expression. The `_RPT` macros generate a simple report. The `_RPTF` macros include the source file and line number where the report macro was called in the generated report. Wide character versions of these macros are available (`_RPTW`, `_RPTFW`). The wide character versions are identical to the narrow character versions except that wide character strings are used for all string parameters and output.
diff --git a/docs/c-runtime-library/reference/assert-macro-assert-wassert.md b/docs/c-runtime-library/reference/assert-macro-assert-wassert.md
index 4601d51fb1..116c8c986c 100644
--- a/docs/c-runtime-library/reference/assert-macro-assert-wassert.md
+++ b/docs/c-runtime-library/reference/assert-macro-assert-wassert.md
@@ -68,7 +68,7 @@ As a consequence of the above behavior, a dialog box is always displayed followi
| `Retry` | Break into debugger during `abort` | Break into debugger during `assert` |
| `Ignore` | Finish exiting via `abort` | Continue program as though `assert` didn't fire (may result in undefined behavior since preconditions of the calling code weren't met) |
-For more information about CRT debugging, see [CRT debugging techniques](/visualstudio/debugger/crt-debugging-techniques).
+For more information about CRT debugging, see [CRT debugging techniques](../crt-debugging-techniques.md).
The `_assert` and `_wassert` functions are internal CRT functions. They help minimize the code required in your object files to support assertions. We don't recommend that you call these functions directly.
diff --git a/docs/c-runtime-library/reference/atanh-atanhf-atanhl.md b/docs/c-runtime-library/reference/atanh-atanhf-atanhl.md
index 02b797f39a..b7ce5af41b 100644
--- a/docs/c-runtime-library/reference/atanh-atanhf-atanhl.md
+++ b/docs/c-runtime-library/reference/atanh-atanhf-atanhl.md
@@ -1,14 +1,13 @@
---
title: "atanh, atanhf, atanhl"
description: "API reference for atanh, atanhf, and atanhl; which calculate the inverse hyperbolic tangent of a floating-point value."
-ms.date: "08/31/2020"
+ms.date: 08/31/2020
api_name: ["atanhl", "atanhf", "atanh", "_o_atanh", "_o_atanhf", "_o_atanhl"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-math-l1-1-0.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
f1_keywords: ["atanhl", "atanhf", "atanh"]
-helpviewer_keywords: ["atanhf function", "atanhl function", "atanh funciton"]
-ms.assetid: 83a43b5b-2580-4461-854f-dc84236d9f32
+helpviewer_keywords: ["atanhf function", "atanhl function", "atanh function"]
---
# `atanh`, `atanhf`, `atanhl`
diff --git a/docs/c-runtime-library/reference/atoi-atoi-l-wtoi-wtoi-l.md b/docs/c-runtime-library/reference/atoi-atoi-l-wtoi-wtoi-l.md
index 917b291e28..4101aad9e3 100644
--- a/docs/c-runtime-library/reference/atoi-atoi-l-wtoi-wtoi-l.md
+++ b/docs/c-runtime-library/reference/atoi-atoi-l-wtoi-wtoi-l.md
@@ -53,7 +53,7 @@ These functions convert a character string to an integer value (**`atoi`** and *
The *`str`* argument to **`atoi`** and **`_wtoi`** has the following form:
-> [*`whitespace`*] [*`sign`*] [*`digits`*]]
+> [*`whitespace`*] [*`sign`*] [*`digits`*]
A *`whitespace`* consists of space or tab characters, which are ignored; *`sign`* is either plus (+) or minus (-); and *`digits`* are one or more digits.
diff --git a/docs/c-runtime-library/reference/atol-atol-l-wtol-wtol-l.md b/docs/c-runtime-library/reference/atol-atol-l-wtol-wtol-l.md
index bb6f755930..f724d15eaa 100644
--- a/docs/c-runtime-library/reference/atol-atol-l-wtol-wtol-l.md
+++ b/docs/c-runtime-library/reference/atol-atol-l-wtol-wtol-l.md
@@ -54,7 +54,7 @@ The input string is a sequence of characters that can be interpreted as a numeri
The *`str`* argument to **`atol`** has the following form:
-> [*`whitespace`*] [*`sign`*] [*`digits`*]]
+> [*`whitespace`*] [*`sign`*] [*`digits`*]
A *`whitespace`* consists of space or tab characters, which are ignored; *`sign`* is either plus (`+`) or minus (`-`); and *`digits`* are one or more digits.
diff --git a/docs/c-runtime-library/reference/bitand.md b/docs/c-runtime-library/reference/bitand.md
index 5735dced0c..0701824a21 100644
--- a/docs/c-runtime-library/reference/bitand.md
+++ b/docs/c-runtime-library/reference/bitand.md
@@ -1,13 +1,12 @@
---
-description: "Learn more about: bitand"
title: "bitand"
+description: "Learn more about: bitand"
ms.date: "11/04/2016"
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["std::bitand", "std.bitand", "bitand"]
+f1_keywords: ["std::bitand", "std.bitand", "ISO646/bitand", "bitand"]
helpviewer_keywords: ["bitand function"]
-ms.assetid: 279cf9b5-fac1-49de-b329-f1a31b3481fe
---
# `bitand`
@@ -16,7 +15,6 @@ An alternative to the & operator.
## Syntax
```C
-
#define bitand &
```
diff --git a/docs/c-runtime-library/reference/bitor.md b/docs/c-runtime-library/reference/bitor.md
index f0c717a7a5..8f2aaf236d 100644
--- a/docs/c-runtime-library/reference/bitor.md
+++ b/docs/c-runtime-library/reference/bitor.md
@@ -1,13 +1,12 @@
---
-description: "Learn more about: bitor"
title: "bitor"
+description: "Learn more about: bitor"
ms.date: "11/04/2016"
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["bitor", "std.bitor", "std::bitor"]
+f1_keywords: ["ISO646/bitor", "bitor", "std.bitor", "std::bitor"]
helpviewer_keywords: ["bitor function"]
-ms.assetid: 3c0a3711-9c74-41f2-b400-2f7797da30d1
---
# `bitor`
@@ -16,7 +15,6 @@ An alternative to the `|` operator.
## Syntax
```C
-
#define bitor |
```
diff --git a/docs/c-runtime-library/reference/byteswap-uint64-byteswap-ulong-byteswap-ushort.md b/docs/c-runtime-library/reference/byteswap-uint64-byteswap-ulong-byteswap-ushort.md
index 5c63829355..88af49e8eb 100644
--- a/docs/c-runtime-library/reference/byteswap-uint64-byteswap-ulong-byteswap-ushort.md
+++ b/docs/c-runtime-library/reference/byteswap-uint64-byteswap-ulong-byteswap-ushort.md
@@ -54,8 +54,8 @@ int main()
```
```Output
-byteswap of 102030405060708 = 807060504030201
-byteswap of 1020304 = 4030201
+byteswap of 0102030405060708 = 0807060504030201
+byteswap of 01020304 = 04030201
```
## See also
diff --git a/docs/c-runtime-library/reference/calloc-dbg.md b/docs/c-runtime-library/reference/calloc-dbg.md
index b480d041b1..fbff456b61 100644
--- a/docs/c-runtime-library/reference/calloc-dbg.md
+++ b/docs/c-runtime-library/reference/calloc-dbg.md
@@ -1,6 +1,6 @@
---
-description: "Learn more about: _calloc_dbg"
title: "_calloc_dbg"
+description: "Learn more about: _calloc_dbg"
ms.date: "11/04/2016"
api_name: ["_calloc_dbg"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll"]
@@ -8,7 +8,6 @@ api_type: ["DLLExport"]
topic_type: ["apiref"]
f1_keywords: ["_calloc_dbg", "calloc_dbg"]
helpviewer_keywords: ["_calloc_dbg function", "calloc_dbg function"]
-ms.assetid: 7f62c42b-eb9f-4de5-87d0-df57036c87de
---
# `_calloc_dbg`
@@ -37,7 +36,7 @@ Requested size of each memory block (bytes).
*`blockType`*\
Requested type of memory block: `_CLIENT_BLOCK` or `_NORMAL_BLOCK`.
-For information about the allocation block types and how they're used, see[Types of blocks on the debug heap](/visualstudio/debugger/crt-debug-heap-details).
+For information about the allocation block types and how they're used, see [Types of blocks on the debug heap](../crt-debug-heap-details.md#types-of-blocks-on-the-debug-heap).
*`filename`*\
Pointer to name of the source file that requested allocation operation or `NULL`.
@@ -65,7 +64,7 @@ On successful completion, this function returns a pointer to the user portion of
**`_calloc_dbg`** sets `errno` to `ENOMEM` if a memory allocation fails; `EINVAL` is returned if the amount of memory needed (including the overhead mentioned previously) exceeds `_HEAP_MAXREQ`. For information about this and other error codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md).
-For information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT debug heap details](/visualstudio/debugger/crt-debug-heap-details). For information about the differences between calling a standard heap function and the debug version, see [Debug versions of heap allocation functions](/visualstudio/debugger/debug-versions-of-heap-allocation-functions).
+For information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT debug heap details](../crt-debug-heap-details.md). For information about the differences between calling a standard heap function and the debug version, see [Debug versions of heap allocation functions](../debug-versions-of-heap-allocation-functions.md).
## Requirements
@@ -100,7 +99,7 @@ int main( void )
else
printf( "Problem allocating memory\n" );
- / _free_dbg must be called to free CLIENT type blocks
+ // _free_dbg must be called to free CLIENT type blocks
free( bufferN );
_free_dbg( bufferC, _CLIENT_BLOCK );
}
diff --git a/docs/c-runtime-library/reference/calloc.md b/docs/c-runtime-library/reference/calloc.md
index 1f52cec60d..eda1a8195f 100644
--- a/docs/c-runtime-library/reference/calloc.md
+++ b/docs/c-runtime-library/reference/calloc.md
@@ -50,7 +50,7 @@ _set_new_mode(1);
early in your program, or link with *`NEWMODE.OBJ`* (see [Link options](../link-options.md)).
-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).
+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](../crt-debug-heap-details.md).
**`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).
@@ -96,4 +96,4 @@ Allocated 40 long integers
[Memory allocation](../memory-allocation.md)\
[`free`](free.md)\
[`malloc`](malloc.md)\
-[`realloc`](realloc.md)\
+[`realloc`](realloc.md)
diff --git a/docs/c-runtime-library/reference/cgets-s-cgetws-s.md b/docs/c-runtime-library/reference/cgets-s-cgetws-s.md
index 8709404d4c..82de69ea28 100644
--- a/docs/c-runtime-library/reference/cgets-s-cgetws-s.md
+++ b/docs/c-runtime-library/reference/cgets-s-cgetws-s.md
@@ -1,6 +1,6 @@
---
-description: "Learn more about: _cgets_s, _cgetws_s"
title: "_cgets_s, _cgetws_s"
+description: "Learn more about: _cgets_s, _cgetws_s"
ms.date: "4/2/2020"
api_name: ["_cgetws_s", "_cgets_s", "_o__cgets_s", "_o__cgetws_s"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-conio-l1-1-0.dll"]
@@ -8,7 +8,6 @@ api_type: ["DLLExport"]
topic_type: ["apiref"]
f1_keywords: ["_cgets_s", "cgets_s", "cgetws_s", "_cgetws_s"]
helpviewer_keywords: ["strings [C++], getting from console", "console, getting strings from", "_cgets_s function", "cget_s function", "_cgetws_s function", "cgetws_s function"]
-ms.assetid: 38b74897-afe6-4dd9-a43f-36a3c0d72c5c
---
# `_cgets_s`, `_cgetws_s`
@@ -26,7 +25,7 @@ errno_t _cgets_s(
size_t *pSizeRead
);
errno_t _cgetws_s(
- wchar_t *buffer
+ wchar_t *buffer,
size_t numberOfElements,
size_t *pSizeRead
);
diff --git a/docs/c-runtime-library/reference/chdir-wchdir.md b/docs/c-runtime-library/reference/chdir-wchdir.md
index 1ceeb72ce8..d95f085350 100644
--- a/docs/c-runtime-library/reference/chdir-wchdir.md
+++ b/docs/c-runtime-library/reference/chdir-wchdir.md
@@ -78,7 +78,6 @@ For more compatibility information, see [Compatibility](../compatibility.md).
int main( int argc, char *argv[] )
{
-
if(_chdir( argv[1] ) )
{
switch (errno)
diff --git a/docs/c-runtime-library/reference/chmod-wchmod.md b/docs/c-runtime-library/reference/chmod-wchmod.md
index 327b83aee7..eb98e7289c 100644
--- a/docs/c-runtime-library/reference/chmod-wchmod.md
+++ b/docs/c-runtime-library/reference/chmod-wchmod.md
@@ -114,7 +114,6 @@ void set_mode_and_report(char * filename, int mask)
int main( void )
{
-
// Create or append to a file.
system( "echo /* End of file */ >> crt_chmod.c_input" );
diff --git a/docs/c-runtime-library/reference/compl.md b/docs/c-runtime-library/reference/compl.md
index af061c570c..290367a95d 100644
--- a/docs/c-runtime-library/reference/compl.md
+++ b/docs/c-runtime-library/reference/compl.md
@@ -6,7 +6,7 @@ api_name: ["compl"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["std::compl", "std.compl", "compl"]
+f1_keywords: ["std::compl", "std.compl", "ISO646/compl", "compl"]
helpviewer_keywords: ["compl function"]
ms.assetid: e03f6fb5-cb8b-4afa-99c0-905f4105fb34
---
diff --git a/docs/c-runtime-library/reference/controlfp-s.md b/docs/c-runtime-library/reference/controlfp-s.md
index d955dfb42e..8de3df8b7c 100644
--- a/docs/c-runtime-library/reference/controlfp-s.md
+++ b/docs/c-runtime-library/reference/controlfp-s.md
@@ -1,7 +1,7 @@
---
description: "Learn more about: _controlfp_s"
title: "_controlfp_s"
-ms.date: "4/2/2020"
+ms.date: 03/27/2025
api_name: ["_controlfp_s", "_o__controlfp_s"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-runtime-l1-1-0.dll"]
api_type: ["DLLExport"]
@@ -75,16 +75,23 @@ _controlfp_s(¤t_word, _DN_FLUSH, _MCW_DN);
// and x64 processors with SSE2 support. Ignored on other x86 platforms.
```
-On ARM platforms, the **`_controlfp_s`** function applies to the FPSCR register. On x64 architectures, only the SSE2 control word that's stored in the MXCSR register is affected. On Intel (x86) platforms, **`_controlfp_s`** affects the control words for both the x87 and the SSE2, if present. It's possible for the two control words to be inconsistent with each other (because of a previous call to [`__control87_2`](control87-controlfp-control87-2.md), for example); if there's an inconsistency between the two control words, **`_controlfp_s`** sets the `EM_AMBIGUOUS` flag in *`currentControl`*. It's a warning that the returned control word might not represent the state of both floating-point control words accurately.
+This function is ignored when you use [`/clr` (Common Language Runtime Compilation)](../../build/reference/clr-common-language-runtime-compilation.md) to compile because the common language runtime (CLR) only supports the default floating-point precision.
-On the ARM and x64 architectures, changing the infinity mode or the floating-point precision isn't supported. If the precision control mask is used on the x64 platform, the function raises an assertion and the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md).
+On x64, only the SSE2 control word stored in the MXCSR register is affected. Changing the infinity mode or the floating-point precision isn't supported. If the precision control mask is used on the x64 platform, the function raises an assertion and the invalid parameter handler is invoked as described in [Parameter validation](../parameter-validation.md).
-If the mask isn't set correctly, this function generates an invalid parameter exception, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, this function returns `EINVAL` and sets `errno` to `EINVAL`.
+On x86, **`_controlfp_s`** affects the control words for both the x87 and the SSE2, if present. It's possible for the two control words to be inconsistent with each other (because of a previous call to [`__control87_2`](control87-controlfp-control87-2.md), for example); if there's an inconsistency between the two control words, **`_controlfp_s`** sets the `EM_AMBIGUOUS` flag in *`currentControl`*. It's a warning that the returned control word might not represent the state of both floating-point control words accurately.
-This function is ignored when you use [`/clr` (Common Language Runtime Compilation)](../../build/reference/clr-common-language-runtime-compilation.md) to compile because the common language runtime (CLR) only supports the default floating-point precision.
+If the mask isn't set correctly, this function generates an invalid parameter exception, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, this function returns `EINVAL` and sets `errno` to `EINVAL`.
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).
+### Arm platforms
+
+- Changing the infinity mode or the floating-point precision isn't supported. If the precision control mask is used on the x64 platform, the function raises an assertion and the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md).
+- On ARM32 (discontinued), Windows doesn't support FP exceptions.
+- On ARM64, unmasking the whole `_MCW_EM` or any bits from it (`_EM_INEXACT`, `_EM_UNDERFLOW`, `_EM_OVERFLOW`, `_EM_ZERODIVIDE`, and `_EM_INVALID`) correctly change the FPCR register. Floating point exceptions raised by standard math functions, like Invalid operation from `std::acos`, are exempt from this behavior and can be ignored or raised properly depending on the FPCR register. For more information, see [Overview of ARM32 ABI Conventions](../../build/overview-of-arm-abi-conventions.md#floating-point-exceptions).
+- On ARM64EC, Windows catches processor floating-point exceptions and disables them in the FPCR register. This ensures consistent behavior across different processor variants.
+
### Mask constants and values
For the `_MCW_EM` mask, clearing it sets the exception, which allows the hardware exception; setting it hides the exception. If a `_EM_UNDERFLOW` or `_EM_OVERFLOW` occurs, no hardware exception is thrown until the next floating-point instruction is executed. To generate a hardware exception immediately after `_EM_UNDERFLOW` or `_EM_OVERFLOW`, call the `FWAIT MASM` instruction.
diff --git a/docs/c-runtime-library/reference/cputs-cputws.md b/docs/c-runtime-library/reference/cputs-cputws.md
index cf01b13749..5ffe5fe412 100644
--- a/docs/c-runtime-library/reference/cputs-cputws.md
+++ b/docs/c-runtime-library/reference/cputs-cputws.md
@@ -106,7 +106,6 @@ void wprint_to_console(wchar_t* wbuffer)
int main()
{
-
// String to print at console.
// Notice the \r (return) character.
char* buffer = "Hello world (courtesy of _cputs)!\r\n";
diff --git a/docs/c-runtime-library/reference/crtcheckmemory.md b/docs/c-runtime-library/reference/crtcheckmemory.md
index df206aa190..5c9ca5d58e 100644
--- a/docs/c-runtime-library/reference/crtcheckmemory.md
+++ b/docs/c-runtime-library/reference/crtcheckmemory.md
@@ -1,6 +1,6 @@
---
-description: "Learn more about: _CrtCheckMemory"
title: "_CrtCheckMemory"
+description: "Learn more about: _CrtCheckMemory"
ms.date: "11/04/2016"
api_name: ["_CrtCheckMemory"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll"]
@@ -8,7 +8,6 @@ api_type: ["DLLExport"]
topic_type: ["apiref"]
f1_keywords: ["CrtCheckMemory", "_CrtCheckMemory"]
helpviewer_keywords: ["_CrtCheckMemory function", "CrtCheckMemory function"]
-ms.assetid: 457cc72e-60fd-4177-ab5c-6ae26a420765
---
# `_CrtCheckMemory`
@@ -17,7 +16,6 @@ Confirms the integrity of the memory blocks allocated in the debug heap (debug v
## Syntax
```C
-
int _CrtCheckMemory( void );
```
@@ -37,7 +35,7 @@ Because this function returns `TRUE` or `FALSE`, it can be passed to one of the
_ASSERTE( _CrtCheckMemory( ) );
```
-For more information about how **`_CrtCheckMemory`** can be used with other debug functions, see [Heap state reporting functions](/visualstudio/debugger/crt-debug-heap-details). For an overview of memory management and the debug heap, see [CRT debug heap details](/visualstudio/debugger/crt-debug-heap-details).
+For more information about how **`_CrtCheckMemory`** can be used with other debug functions, see [Heap state reporting functions](../crt-debug-heap-details.md#heap-state-reporting-functions). For an overview of memory management and the debug heap, see [CRT debug heap details](../crt-debug-heap-details.md).
## Requirements
diff --git a/docs/c-runtime-library/reference/crtdbgbreak.md b/docs/c-runtime-library/reference/crtdbgbreak.md
index b3763e3cfa..057be6cfa3 100644
--- a/docs/c-runtime-library/reference/crtdbgbreak.md
+++ b/docs/c-runtime-library/reference/crtdbgbreak.md
@@ -28,7 +28,7 @@ There's no return value.
The **`_CrtDbgBreak`** function sets a debug breakpoint on the particular line of code where the function resides. This function is used in debug mode only and is dependent on `_DEBUG` being previously defined.
-For more information about using other hook-capable run-time functions and writing your own client-defined hook functions, see [Writing your own debug hook functions](/visualstudio/debugger/debug-hook-function-writing).
+For more information about using other hook-capable run-time functions and writing your own client-defined hook functions, see [Writing your own debug hook functions](../crt-debugging-techniques.md#debug-hook-function-writing).
## Requirements
diff --git a/docs/c-runtime-library/reference/crtdbgreport-crtdbgreportw.md b/docs/c-runtime-library/reference/crtdbgreport-crtdbgreportw.md
index 25218f6335..10ec08e428 100644
--- a/docs/c-runtime-library/reference/crtdbgreport-crtdbgreportw.md
+++ b/docs/c-runtime-library/reference/crtdbgreport-crtdbgreportw.md
@@ -80,7 +80,7 @@ The following table lists the available choices for the report mode or modes and
| `_CRTDBG_MODE_FILE` | `_CRTDBG_FILE_STDERR` | Writes message to `stderr`. |
| `_CRTDBG_MODE_FILE` | `_CRTDBG_FILE_STDOUT` | Writes message to `stdout`. |
-The report can be sent to one, two, or three destinations or to no destination at all. For more information about specifying the report mode or modes and report file, see the [`_CrtSetReportMode`](crtsetreportmode.md) and [`_CrtSetReportFile`](crtsetreportfile.md) functions. For more information about using the debug macros and reporting functions, see [Macros for reporting](/visualstudio/debugger/macros-for-reporting).
+The report can be sent to one, two, or three destinations or to no destination at all. For more information about specifying the report mode or modes and report file, see the [`_CrtSetReportMode`](crtsetreportmode.md) and [`_CrtSetReportFile`](crtsetreportfile.md) functions. For more information about using the debug macros and reporting functions, see [Macros for reporting](../crt-debugging-techniques.md#macros-for-reporting).
If your application needs more flexibility than that provided by **`_CrtDbgReport`** and **`_CrtDbgReportW`**, you can write your own reporting function and hook it into the C run-time library reporting mechanism by using the [`_CrtSetReportHook`](crtsetreporthook.md) function.
diff --git a/docs/c-runtime-library/reference/crtdoforallclientobjects.md b/docs/c-runtime-library/reference/crtdoforallclientobjects.md
index 9db4a22cfe..fdf8480c26 100644
--- a/docs/c-runtime-library/reference/crtdoforallclientobjects.md
+++ b/docs/c-runtime-library/reference/crtdoforallclientobjects.md
@@ -37,7 +37,7 @@ The **`_CrtDoForAllClientObjects`** function searches the heap's linked list for
If the `_CRTDBG_ALLOC_MEM_DF` bit field of the [`_crtDbgFlag`](../crtdbgflag.md) flag isn't turned on, **`_CrtDoForAllClientObjects`** immediately returns. When [`_DEBUG`](../debug.md) isn't defined, calls to **`_CrtDoForAllClientObjects`** are removed during preprocessing.
-For more information about the `_CLIENT_BLOCK` type and how it can be used by other debug functions, see [Types of blocks on the debug heap](/visualstudio/debugger/crt-debug-heap-details). For information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT debug heap details](/visualstudio/debugger/crt-debug-heap-details).
+For more information about the `_CLIENT_BLOCK` type and how it can be used by other debug functions, see [Types of blocks on the debug heap](../crt-debug-heap-details.md#types-of-blocks-on-the-debug-heap). For information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT debug heap details](../crt-debug-heap-details.md).
If *`pfn`* is `NULL`, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md) is set to `EINVAL` and the function returns.
@@ -55,5 +55,5 @@ For more compatibility information, see [Compatibility](../compatibility.md).
[Debug routines](../debug-routines.md)\
[`_CrtSetDbgFlag`](crtsetdbgflag.md)\
-[Heap state reporting functions](/visualstudio/debugger/crt-debug-heap-details)\
+[Heap state reporting functions](../crt-debug-heap-details.md#heap-state-reporting-functions)\
[`_CrtReportBlockType`](crtreportblocktype.md)
diff --git a/docs/c-runtime-library/reference/crtdumpmemoryleaks.md b/docs/c-runtime-library/reference/crtdumpmemoryleaks.md
index bbcc1210b6..28291b7a9c 100644
--- a/docs/c-runtime-library/reference/crtdumpmemoryleaks.md
+++ b/docs/c-runtime-library/reference/crtdumpmemoryleaks.md
@@ -1,6 +1,6 @@
---
-description: "Learn more about: _CrtDumpMemoryLeaks"
title: "_CrtDumpMemoryLeaks"
+description: "Learn more about: _CrtDumpMemoryLeaks"
ms.date: "11/04/2016"
api_name: ["_CrtDumpMemoryLeaks"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll"]
@@ -16,7 +16,6 @@ Dumps all the memory blocks in the debug heap when a memory leak has occurred (d
## Syntax
```C
-
int _CrtDumpMemoryLeaks( void );
```
@@ -34,7 +33,7 @@ The **`_CrtDumpMemoryLeaks`** function determines whether a memory leak has occu
By default, internal C run-time blocks (`_CRT_BLOCK`) aren't included in memory dump operations. The [`_CrtSetDbgFlag`](crtsetdbgflag.md) function can be used to turn on the `_CRTDBG_CHECK_CRT_DF` bit of **`_crtDbgFlag`** to include these blocks in the leak detection process.
-For more information about heap state functions and the **`_CrtMemState`** structure, see [Heap state reporting functions](/visualstudio/debugger/crt-debug-heap-details). For more information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT debug heap details](/visualstudio/debugger/crt-debug-heap-details).
+For more information about heap state functions and the **`_CrtMemState`** structure, see [Heap state reporting functions](../crt-debug-heap-details.md#heap-state-reporting-functions). For more information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT debug heap details](../crt-debug-heap-details.md).
## Requirements
diff --git a/docs/c-runtime-library/reference/crtgetallochook.md b/docs/c-runtime-library/reference/crtgetallochook.md
index f37adc40c3..44feae4b2f 100644
--- a/docs/c-runtime-library/reference/crtgetallochook.md
+++ b/docs/c-runtime-library/reference/crtgetallochook.md
@@ -28,7 +28,7 @@ Returns the currently defined allocation hook function.
**`_CrtGetAllocHook`** retrieves the current client-defined application hook function for the C run-time debug library memory allocation process.
-For more information about using other hook-capable run-time functions and writing your own client-defined hook functions, see [Debug hook function writing](/visualstudio/debugger/debug-hook-function-writing).
+For more information about using other hook-capable run-time functions and writing your own client-defined hook functions, see [Debug hook function writing](../crt-debugging-techniques.md#debug-hook-function-writing).
## Requirements
diff --git a/docs/c-runtime-library/reference/crtgetdumpclient.md b/docs/c-runtime-library/reference/crtgetdumpclient.md
index df55f8a428..5fb865da19 100644
--- a/docs/c-runtime-library/reference/crtgetdumpclient.md
+++ b/docs/c-runtime-library/reference/crtgetdumpclient.md
@@ -28,7 +28,7 @@ Returns the current dump routine.
The **`_CrtGetDumpClient`** function retrieves the current hook function for dumping objects stored in the `_CLIENT_BLOCK` memory blocks.
-For more information about using other hook-capable run-time functions and writing your own client-defined hook functions, see [Debug hook function writing](/visualstudio/debugger/debug-hook-function-writing).
+For more information about using other hook-capable run-time functions and writing your own client-defined hook functions, see [Debug hook function writing](../crt-debugging-techniques.md#debug-hook-function-writing).
## Requirements
diff --git a/docs/c-runtime-library/reference/crtgetreporthook.md b/docs/c-runtime-library/reference/crtgetreporthook.md
index 54f4867696..f1782c2533 100644
--- a/docs/c-runtime-library/reference/crtgetreporthook.md
+++ b/docs/c-runtime-library/reference/crtgetreporthook.md
@@ -28,7 +28,7 @@ Returns the current client-defined reporting function.
**`_CrtGetReportHook`** allows an application to retrieve the current reporting function for the C run-time debug library reporting process.
-For more information about using other hook-capable run-time functions and writing your own client-defined hook functions, see [Debug hook function writing](/visualstudio/debugger/debug-hook-function-writing).
+For more information about using other hook-capable run-time functions and writing your own client-defined hook functions, see [Debug hook function writing](../crt-debugging-techniques.md#debug-hook-function-writing).
## Requirements
diff --git a/docs/c-runtime-library/reference/crtismemoryblock.md b/docs/c-runtime-library/reference/crtismemoryblock.md
index 12a1f2e07a..367d8155be 100644
--- a/docs/c-runtime-library/reference/crtismemoryblock.md
+++ b/docs/c-runtime-library/reference/crtismemoryblock.md
@@ -60,7 +60,7 @@ _ASSERTE( _CrtIsMemoryBlock( userData, size, &requestNumber,
&filename, &linenumber ) );
```
-For more information about how **`_CrtIsMemoryBlock`** can be used with other debug functions and macros, see [Macros for reporting](/visualstudio/debugger/macros-for-reporting). For information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT debug heap details](/visualstudio/debugger/crt-debug-heap-details).
+For more information about how **`_CrtIsMemoryBlock`** can be used with other debug functions and macros, see [Macros for reporting](../crt-debugging-techniques.md#macros-for-reporting). For information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT debug heap details](../crt-debug-heap-details.md).
## Requirements
diff --git a/docs/c-runtime-library/reference/crtisvalidheappointer.md b/docs/c-runtime-library/reference/crtisvalidheappointer.md
index 40d24affff..8ed29e0417 100644
--- a/docs/c-runtime-library/reference/crtisvalidheappointer.md
+++ b/docs/c-runtime-library/reference/crtisvalidheappointer.md
@@ -40,7 +40,7 @@ Because this function returns `TRUE` or `FALSE`, it can be passed to one of the
_ASSERTE( _CrtIsValidHeapPointer( userData ) );
```
-For more information about how **`_CrtIsValidHeapPointer`** can be used with other debug functions and macros, see [Macros for reporting](/visualstudio/debugger/macros-for-reporting). For information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT debug heap details](/visualstudio/debugger/crt-debug-heap-details).
+For more information about how **`_CrtIsValidHeapPointer`** can be used with other debug functions and macros, see [Macros for reporting](../crt-debugging-techniques.md#macros-for-reporting). For information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT debug heap details](../crt-debug-heap-details.md).
## Requirements
diff --git a/docs/c-runtime-library/reference/crtisvalidpointer.md b/docs/c-runtime-library/reference/crtisvalidpointer.md
index 2ced5ae22b..202506f2c0 100644
--- a/docs/c-runtime-library/reference/crtisvalidpointer.md
+++ b/docs/c-runtime-library/reference/crtisvalidpointer.md
@@ -49,7 +49,7 @@ Because this function returns `TRUE` or `FALSE`, it can be passed to one of the
_ASSERTE( _CrtIsValidPointer( address, size, TRUE ) );
```
-For more information about how **`_CrtIsValidPointer`** can be used with other debug functions and macros, see [Macros for reporting](/visualstudio/debugger/macros-for-reporting). For information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT debug heap details](/visualstudio/debugger/crt-debug-heap-details).
+For more information about how **`_CrtIsValidPointer`** can be used with other debug functions and macros, see [Macros for reporting](../crt-debugging-techniques.md#macros-for-reporting). For information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT debug heap details](../crt-debug-heap-details.md).
## Requirements
diff --git a/docs/c-runtime-library/reference/crtmemcheckpoint.md b/docs/c-runtime-library/reference/crtmemcheckpoint.md
index d1d20858d9..9f5043ab22 100644
--- a/docs/c-runtime-library/reference/crtmemcheckpoint.md
+++ b/docs/c-runtime-library/reference/crtmemcheckpoint.md
@@ -33,7 +33,7 @@ The **`_CrtMemCheckpoint`** function creates a snapshot of the current state of
The application must pass a pointer to a previously allocated instance of the `_CrtMemState` structure, defined in Crtdbg.h, in the *`state`* parameter. If **`_CrtMemCheckpoint`** encounters an error during the checkpoint creation, the function generates a `_CRT_WARN` debug report describing the problem.
-For more information about heap state functions and the `_CrtMemState` structure, see [Heap state reporting functions](/visualstudio/debugger/crt-debug-heap-details). For more information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT debug heap details](/visualstudio/debugger/crt-debug-heap-details).
+For more information about heap state functions and the `_CrtMemState` structure, see [Heap state reporting functions](../crt-debug-heap-details.md#heap-state-reporting-functions). For more information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT debug heap details](../crt-debug-heap-details.md).
If *`state`* is `NULL`, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md) is set to `EINVAL` and the function returns.
diff --git a/docs/c-runtime-library/reference/crtmemdifference.md b/docs/c-runtime-library/reference/crtmemdifference.md
index 6b783c68b9..2424df0b3f 100644
--- a/docs/c-runtime-library/reference/crtmemdifference.md
+++ b/docs/c-runtime-library/reference/crtmemdifference.md
@@ -48,7 +48,7 @@ The **`_CrtMemDifference`** function compares *`oldState`* and *`newState`* and
By default, internal C run-time blocks (`_CRT_BLOCK`) aren't included in memory state operations. The [`_CrtSetDbgFlag`](crtsetdbgflag.md) function can be used to turn on the `_CRTDBG_CHECK_CRT_DF` bit of **`_crtDbgFlag`** to include these blocks in leak detection and other memory state operations. Freed memory blocks (`_FREE_BLOCK`) don't cause **`_CrtMemDifference`** to return `TRUE`.
-For more information about heap state functions and the **`_CrtMemState`** structure, see [Heap state reporting functions](/visualstudio/debugger/crt-debug-heap-details). For information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT debug heap details](/visualstudio/debugger/crt-debug-heap-details).
+For more information about heap state functions and the **`_CrtMemState`** structure, see [Heap state reporting functions](../crt-debug-heap-details.md#heap-state-reporting-functions). For information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT debug heap details](../crt-debug-heap-details.md).
## Requirements
@@ -63,4 +63,4 @@ For more compatibility information, see [Compatibility](../compatibility.md).
## See also
[Debug routines](../debug-routines.md)\
-[`_crtDbgFlag`](../crtdbgflag.md)\
+[`_crtDbgFlag`](../crtdbgflag.md)
diff --git a/docs/c-runtime-library/reference/crtmemdumpallobjectssince.md b/docs/c-runtime-library/reference/crtmemdumpallobjectssince.md
index 215b33d999..0f3b1f0fdd 100644
--- a/docs/c-runtime-library/reference/crtmemdumpallobjectssince.md
+++ b/docs/c-runtime-library/reference/crtmemdumpallobjectssince.md
@@ -35,7 +35,7 @@ The **`_CrtMemDumpAllObjectsSince`** function dumps the debug header information
If the application has installed a dump hook function by calling [`_CrtSetDumpClient`](crtsetdumpclient.md), then every time **`_CrtMemDumpAllObjectsSince`** dumps information about a `_CLIENT_BLOCK` type of block, it calls the application-supplied dump function as well. By default, internal C run-time blocks (`_CRT_BLOCK`) aren't included in memory dump operations. The [`_CrtSetDbgFlag`](crtsetdbgflag.md) function can be used to turn on the `_CRTDBG_CHECK_CRT_DF` bit of `_crtDbgFlag` to include these blocks. In addition, blocks marked as freed or ignored (`_FREE_BLOCK`, `_IGNORE_BLOCK`) aren't included in the memory dump.
-For more information about heap state functions and the `_CrtMemState` structure, see [Heap state reporting functions](/visualstudio/debugger/crt-debug-heap-details). For more information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT debug heap details](/visualstudio/debugger/crt-debug-heap-details).
+For more information about heap state functions and the `_CrtMemState` structure, see [Heap state reporting functions](../crt-debug-heap-details.md#heap-state-reporting-functions). For more information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT debug heap details](../crt-debug-heap-details.md).
## Requirements
diff --git a/docs/c-runtime-library/reference/crtmemdumpstatistics.md b/docs/c-runtime-library/reference/crtmemdumpstatistics.md
index 1015da2d9f..8c41b648eb 100644
--- a/docs/c-runtime-library/reference/crtmemdumpstatistics.md
+++ b/docs/c-runtime-library/reference/crtmemdumpstatistics.md
@@ -1,6 +1,6 @@
---
-description: "Learn more about: _CrtMemDumpStatistics"
title: "_CrtMemDumpStatistics"
+description: "Learn more about: _CrtMemDumpStatistics"
ms.date: "11/04/2016"
api_name: ["_CrtMemDumpStatistics"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll"]
@@ -8,7 +8,6 @@ api_type: ["DLLExport"]
topic_type: ["apiref"]
f1_keywords: ["CrtMemDumpStatistics", "_CrtMemDumpStatistics"]
helpviewer_keywords: ["_CrtMemDumpStatistics function", "CrtMemDumpStatistics function"]
-ms.assetid: 27b9d731-3184-4a2d-b9a7-6566ab28a9fe
---
# `_CrtMemDumpStatistics`
@@ -33,7 +32,7 @@ The **`_CrtMemDumpStatistics`** function dumps the debug header information for
The *`state`* parameter must be a pointer to a `_CrtMemState` structure that has been filled in by [`_CrtMemCheckpoint`](crtmemcheckpoint.md) or returned by [`_CrtMemDifference`](crtmemdifference.md) before **`_CrtMemDumpStatistics`** is called. If *`state`* is `NULL`, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, `errno` is set to `EINVAL`, and no action is taken. For more information, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md).
-For more information about heap state functions and the `_CrtMemState` structure, see [Heap state reporting functions](/visualstudio/debugger/crt-debug-heap-details). For more information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT debug heap details](/visualstudio/debugger/crt-debug-heap-details).
+For more information about heap state functions and the `_CrtMemState` structure, see [Heap state reporting functions](../crt-debug-heap-details.md#heap-state-reporting-functions). For more information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT debug heap details](../crt-debug-heap-details.md).
## Requirements
@@ -47,4 +46,4 @@ For more compatibility information, see [Compatibility](../compatibility.md).
## See also
-[Debug routines](../debug-routines.md)\
+[Debug routines](../debug-routines.md)
diff --git a/docs/c-runtime-library/reference/crtreportblocktype.md b/docs/c-runtime-library/reference/crtreportblocktype.md
index c433723ed3..e9c58f7c24 100644
--- a/docs/c-runtime-library/reference/crtreportblocktype.md
+++ b/docs/c-runtime-library/reference/crtreportblocktype.md
@@ -1,14 +1,13 @@
---
-description: "Learn more about: _CrtReportBlockType"
title: "_CrtReportBlockType"
-ms.date: "11/04/2016"
+description: "Learn more about: _CrtReportBlockType"
+ms.date: 11/04/2016
api_name: ["_CrtReportBlockType"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
f1_keywords: ["_CrtReportBlockType", "CrtReportBlockType"]
helpviewer_keywords: ["CrtReportBlockType function", "BLOCK_SUBTYPE macro", "_CrtReportBlockType function", "_BLOCK_TYPE macro", "_BLOCK_SUBTYPE macro", "BLOCK_TYPE macro"]
-ms.assetid: 0f4b9da7-bebb-4956-9541-b2581640ec6b
---
# `_CrtReportBlockType`
@@ -19,7 +18,7 @@ Returns the block type/subtype associated with a given debug heap block pointer.
```C
int _CrtReportBlockType(
const void * pBlock
-};
+);
```
### Parameters
@@ -35,7 +34,7 @@ When passed a valid debug heap pointer, the **`_CrtReportBlockType`** function r
To extract the type and subtype returned by **`_CrtReportBlockType`**, use the macros `_BLOCK_TYPE` and `_BLOCK_SUBTYPE` (both defined in Crtdbg.h) on the return value.
-For information about the allocation block types and how they're used, see [Types of blocks on the debug heap](/visualstudio/debugger/crt-debug-heap-details).
+For information about the allocation block types and how they're used, see [Types of blocks on the debug heap](../crt-debug-heap-details.md#types-of-blocks-on-the-debug-heap).
## Requirements
diff --git a/docs/c-runtime-library/reference/crtsetallochook.md b/docs/c-runtime-library/reference/crtsetallochook.md
index f17713841f..9219339783 100644
--- a/docs/c-runtime-library/reference/crtsetallochook.md
+++ b/docs/c-runtime-library/reference/crtsetallochook.md
@@ -53,7 +53,7 @@ When the hook function wants the main allocation process to continue as if the t
To clear the hook function, pass `NULL` to **`_CrtSetAllocHook`**.
-For more information about how **`_CrtSetAllocHook`** can be used with other memory management functions or how to write your own client-defined hook functions, see [Debug hook function writing](/visualstudio/debugger/debug-hook-function-writing).
+For more information about how **`_CrtSetAllocHook`** can be used with other memory management functions or how to write your own client-defined hook functions, see [Debug hook function writing](../crt-debugging-techniques.md#debug-hook-function-writing).
> [!NOTE]
> **`_CrtSetAllocHook`** is not supported under **/clr:pure**. The **/clr:pure** and **/clr:safe** compiler options are deprecated in Visual Studio 2015 and removed in Visual Studio 2017.
diff --git a/docs/c-runtime-library/reference/crtsetbreakalloc.md b/docs/c-runtime-library/reference/crtsetbreakalloc.md
index 0e402b09e0..dba54054c4 100644
--- a/docs/c-runtime-library/reference/crtsetbreakalloc.md
+++ b/docs/c-runtime-library/reference/crtsetbreakalloc.md
@@ -1,6 +1,6 @@
---
-description: "Learn more about: _CrtSetBreakAlloc"
title: "_CrtSetBreakAlloc"
+description: "Learn more about: _CrtSetBreakAlloc"
ms.date: "11/04/2016"
api_name: ["_CrtSetBreakAlloc"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll"]
@@ -8,7 +8,6 @@ api_type: ["DLLExport"]
topic_type: ["apiref"]
f1_keywords: ["CrtSetBreakAlloc", "_CrtSetBreakAlloc"]
helpviewer_keywords: ["CrtSetBreakAlloc function", "_CrtSetBreakAlloc function"]
-ms.assetid: 33bfc6af-a9ea-405b-a29f-1c2d4d9880a1
---
# `_CrtSetBreakAlloc`
@@ -37,7 +36,7 @@ Returns the previous object allocation order number that had a breakpoint set.
The object allocation order number is stored in the *`lRequest`* field of the `_CrtMemBlockHeader` structure, defined in Crtdbg.h. When information about a memory block is reported by one of the debug dump functions, this number is enclosed in braces, such as {36}.
-For more information about how **`_CrtSetBreakAlloc`** can be used with other memory management functions, see [Tracking heap allocation requests](/visualstudio/debugger/crt-debug-heap-details). For more information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT debug heap details](/visualstudio/debugger/crt-debug-heap-details).
+For more information about how **`_CrtSetBreakAlloc`** can be used with other memory management functions, see [Tracking heap allocation requests](../crt-debug-heap-details.md#track-heap-allocation-requests). For more information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT debug heap details](../crt-debug-heap-details.md).
## Requirements
@@ -99,4 +98,4 @@ int main( )
## See also
-[Debug routines](../debug-routines.md)\
+[Debug routines](../debug-routines.md)
diff --git a/docs/c-runtime-library/reference/crtsetdbgflag.md b/docs/c-runtime-library/reference/crtsetdbgflag.md
index c9ac357052..e65cc7cb4e 100644
--- a/docs/c-runtime-library/reference/crtsetdbgflag.md
+++ b/docs/c-runtime-library/reference/crtsetdbgflag.md
@@ -40,7 +40,7 @@ The **`_CrtSetDbgFlag`** function allows the application to control how the debu
When [`_DEBUG`](../debug.md) isn't defined, calls to **`_CrtSetDbgFlag`** are removed during preprocessing.
-The following table lists the bit fields for **`_crtDbgFlag`** and describes their behavior. Because setting the bits results in increased diagnostic output and reduced program execution speed, these bits aren't set (turned off) by default. For more information about these bit fields, see [Heap state reporting functions](/visualstudio/debugger/crt-debug-heap-details).
+The following table lists the bit fields for **`_crtDbgFlag`** and describes their behavior. Because setting the bits results in increased diagnostic output and reduced program execution speed, these bits aren't set (turned off) by default. For more information about these bit fields, see [Heap state reporting functions](../crt-debug-heap-details.md#heap-state-reporting-functions).
| Bit field | Default | Description |
|---|---|---|
@@ -117,7 +117,7 @@ tmpFlag &= ~_CRTDBG_CHECK_ALWAYS_DF;
_CrtSetDbgFlag( tmpFlag );
```
-For an overview of memory management and the debug heap, see [CRT debug heap details](/visualstudio/debugger/crt-debug-heap-details).
+For an overview of memory management and the debug heap, see [CRT debug heap details](../crt-debug-heap-details.md).
To disable a flag with the **`_CrtSetDbgFlag`** function, use a bitwise "and" (`&`) of the variable with the bitwise "not" (`~`) of the bitmask.
diff --git a/docs/c-runtime-library/reference/crtsetdebugfillthreshold.md b/docs/c-runtime-library/reference/crtsetdebugfillthreshold.md
index bd91d7fa57..b7ce8b7bbb 100644
--- a/docs/c-runtime-library/reference/crtsetdebugfillthreshold.md
+++ b/docs/c-runtime-library/reference/crtsetdebugfillthreshold.md
@@ -1,14 +1,13 @@
---
title: "_CrtSetDebugFillThreshold"
description: "Use the _CrtSetDebugFillThreshold function to set the maximum amount of buffer to fill in secure CRT functions."
-ms.date: "10/31/2019"
+ms.date: 04/10/2025
api_name: ["_CrtSetDebugFillThreshold"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
f1_keywords: ["_CrtSetDebugFillThreshold", "CrtSetDebugFillThreshold"]
helpviewer_keywords: ["debug, buffer-filling behavior", "CrtSetDebugFillThreshold function", "_CrtSetDebugFillThreshold function", "buffer-filling behavior", "0xFE"]
-ms.assetid: 6cb360e8-56ae-4248-b17f-e28aee3e0ed7
---
# `_CrtSetDebugFillThreshold`
@@ -38,58 +37,36 @@ The default threshold is `SIZE_T_MAX`.
Here's a list of the affected functions:
- [`asctime_s`, `_wasctime_s`](asctime-s-wasctime-s.md)
-
- [`_cgets_s`, `_cgetws_s`](cgets-s-cgetws-s.md)
-
- [`ctime_s`, `_ctime32_s`, `_ctime64_s`, `_wctime_s`, `_wctime32_s`, `_wctime64_s`](ctime-s-ctime32-s-ctime64-s-wctime-s-wctime32-s-wctime64-s.md)
-
- [`_ecvt_s`](ecvt-s.md)
-
- [`_fcvt_s`](fcvt-s.md)
-
- [`_gcvt_s`](gcvt-s.md)
-
- [`_itoa_s`, `_ltoa_s`, `_ultoa_s`, `_i64toa_s`, `_ui64toa_s`, `_itow_s`, `_ltow_s`, `_ultow_s`, `_i64tow_s`, `_ui64tow_s`](itoa-s-itow-s.md)
-
- [`_makepath_s`, `_wmakepath_s`](makepath-s-wmakepath-s.md)
-
- [`_mbsnbcat_s`, `_mbsnbcat_s_l`](mbsnbcat-s-mbsnbcat-s-l.md)
-
- [`_mbsnbcpy_s`, `_mbsnbcpy_s_l`](mbsnbcpy-s-mbsnbcpy-s-l.md)
-
- [`_mbsnbset_s`, `_mbsnbset_s_l`](mbsnbset-s-mbsnbset-s-l.md)
-
- [`_mktemp_s`, `_wmktemp_s`](makepath-s-wmakepath-s.md)
-
- [`_splitpath_s`, `_wsplitpath_s`](splitpath-s-wsplitpath-s.md)
-
- [`strcat_s`, `wcscat_s`, `_mbscat_s`](strcat-s-wcscat-s-mbscat-s.md)
-
- [`strcpy_s`, `wcscpy_s`, `_mbscpy_s`](strcpy-s-wcscpy-s-mbscpy-s.md)
-
- [`_strdate_s`, `_wstrdate_s`](strdate-s-wstrdate-s.md)
-
- [`strerror_s`, `_strerror_s`, `_wcserror_s`, `__wcserror_s`](strerror-s-strerror-s-wcserror-s-wcserror-s.md)
-
- [`_strlwr_s`, `_strlwr_s_l`, `_mbslwr_s`, `_mbslwr_s_l`, `_wcslwr_s`, `_wcslwr_s_l`](strlwr-s-strlwr-s-l-mbslwr-s-mbslwr-s-l-wcslwr-s-wcslwr-s-l.md)
-
- [`strncat_s`, `_strncat_s_l`, `wcsncat_s`, `_wcsncat_s_l`, `_mbsncat_s`, `_mbsncat_s_l`](strncat-s-strncat-s-l-wcsncat-s-wcsncat-s-l-mbsncat-s-mbsncat-s-l.md)
-
- [`strncpy_s`, `_strncpy_s_l`, `wcsncpy_s`, `_wcsncpy_s_l`, `_mbsncpy_s`, `_mbsncpy_s_l`](strncpy-s-strncpy-s-l-wcsncpy-s-wcsncpy-s-l-mbsncpy-s-mbsncpy-s-l.md)
-
- [`_strnset_s`, `_strnset_s_l`, `_wcsnset_s`, `_wcsnset_s_l`, `_mbsnset_s`, `_mbsnset_s_l`](strnset-s-strnset-s-l-wcsnset-s-wcsnset-s-l-mbsnset-s-mbsnset-s-l.md)
-
- [`_strset_s`, `_strset_s_l`, `_wcsset_s`, `_wcsset_s_l`, `_mbsset_s`, `_mbsset_s_l`](strset-s-strset-s-l-wcsset-s-wcsset-s-l-mbsset-s-mbsset-s-l.md)
-
- [`_strtime_s`, `_wstrtime_s`](strtime-s-wstrtime-s.md)
-
- [`_strupr_s`, `_strupr_s_l`, `_mbsupr_s`, `_mbsupr_s_l`, `_wcsupr_s`, `_wcsupr_s_l`](strupr-s-strupr-s-l-mbsupr-s-mbsupr-s-l-wcsupr-s-wcsupr-s-l.md)
-
+- [`vsnprintf_s`, `_vsnprintf_s`, `_vsnprintf_s_l`, `_vsnwprintf_s`, _vsnwpr`intf_s_l](vsnprintf-s-vsnprintf-s-vsnprintf-s-l-vsnwprintf-s-vsnwprintf-s-l.md)
+
## Requirements
| Routine | Required header |
|---|---|
-| **`_CrtSetDebugFillThreshold`** | \ |
+| **`_CrtSetDebugFillThreshold`** | `` |
This function is Microsoft-specific. For more compatibility information, see [Compatibility](../compatibility.md).
diff --git a/docs/c-runtime-library/reference/crtsetdumpclient.md b/docs/c-runtime-library/reference/crtsetdumpclient.md
index 220fadaa08..8d2590b289 100644
--- a/docs/c-runtime-library/reference/crtsetdumpclient.md
+++ b/docs/c-runtime-library/reference/crtsetdumpclient.md
@@ -45,7 +45,7 @@ The *`userPortion`* argument is a pointer to the beginning of the user data port
typedef void (__cdecl *_CRT_DUMP_CLIENT)( void *, size_t );
```
-For more information about functions that operate on `_CLIENT_BLOCK` type memory blocks, see [Client block hook functions](/visualstudio/debugger/client-block-hook-functions). The [`_CrtReportBlockType`](crtreportblocktype.md) function can be used to return information about block types and subtypes.
+For more information about functions that operate on `_CLIENT_BLOCK` type memory blocks, see [Client block hook functions](../crt-debugging-techniques.md#client-block-hook-functions). The [`_CrtReportBlockType`](crtreportblocktype.md) function can be used to return information about block types and subtypes.
## Requirements
diff --git a/docs/c-runtime-library/reference/crtsetreportfile.md b/docs/c-runtime-library/reference/crtsetreportfile.md
index 35b801e080..be7c2e89e1 100644
--- a/docs/c-runtime-library/reference/crtsetreportfile.md
+++ b/docs/c-runtime-library/reference/crtsetreportfile.md
@@ -1,6 +1,6 @@
---
-description: "Learn more about: _CrtSetReportFile"
title: "_CrtSetReportFile"
+description: "Learn more about: _CrtSetReportFile"
ms.date: "11/04/2016"
api_name: ["_CrtSetReportFile"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll"]
@@ -8,7 +8,6 @@ api_type: ["DLLExport"]
topic_type: ["apiref"]
f1_keywords: ["CrtSetReportFile", "_CrtSetReportFile"]
helpviewer_keywords: ["CrtSetReportFile function", "_CrtSetReportFile function"]
-ms.assetid: 3126537e-511b-44af-9c1c-0605265eabc4
---
# `_CrtSetReportFile`
@@ -91,4 +90,4 @@ The console isn't supported in Universal Windows Platform (UWP) apps. The standa
## See also
-[Debug routines](../debug-routines.md)\
+[Debug routines](../debug-routines.md)
diff --git a/docs/c-runtime-library/reference/crtsetreporthook.md b/docs/c-runtime-library/reference/crtsetreporthook.md
index 7b71a5eaa7..1938344e34 100644
--- a/docs/c-runtime-library/reference/crtsetreporthook.md
+++ b/docs/c-runtime-library/reference/crtsetreporthook.md
@@ -47,7 +47,7 @@ where *`reportType`* is the debug report type (`_CRT_WARN`, `_CRT_ERROR`, or `_C
If the client-defined reporting function completely handles the debug message such that no further reporting is required, then the function should return `TRUE`. When the function returns `FALSE`, `_CrtDbgReport` is called to generate the debug report using the current settings for the report type, mode, and file. In addition, by specifying the `_CrtDbgReport` return value in *`returnValue`*, the application can also control whether a debug break occurs. For a complete description of how the debug report is configured and generated, see `_CrtSetReportMode`, [`_CrtSetReportFile`](crtsetreportfile.md), and `_CrtDbgReport`.
-For more information about using other hook-capable run-time functions and writing your own client-defined hook functions, see [Debug hook function writing](/visualstudio/debugger/debug-hook-function-writing).
+For more information about using other hook-capable run-time functions and writing your own client-defined hook functions, see [Debug hook function writing](../crt-debugging-techniques.md#debug-hook-function-writing).
> [!NOTE]
> If your application is compiled with **/clr** and the reporting function is called after the application has exited main, the CLR will throw an exception if the reporting function calls any CRT functions.
diff --git a/docs/c-runtime-library/reference/ctime-s-ctime32-s-ctime64-s-wctime-s-wctime32-s-wctime64-s.md b/docs/c-runtime-library/reference/ctime-s-ctime32-s-ctime64-s-wctime-s-wctime32-s-wctime64-s.md
index ff9fcbd2f5..efbd48aaa0 100644
--- a/docs/c-runtime-library/reference/ctime-s-ctime32-s-ctime64-s-wctime-s-wctime32-s-wctime64-s.md
+++ b/docs/c-runtime-library/reference/ctime-s-ctime32-s-ctime64-s-wctime-s-wctime32-s-wctime64-s.md
@@ -109,7 +109,7 @@ Zero if successful. If there's a failure due to an invalid parameter, the invali
The **`ctime_s`** function converts a time value stored as a [`time_t`](../standard-types.md) structure into a character string. The *`sourceTime`* value is typically obtained from a call to [`time`](time-time32-time64.md), which returns the number of seconds elapsed since midnight (00:00:00), January 1, 1970, coordinated universal time (UTC). The return value string contains exactly 26 characters and has the form:
-`Wed Jan 02 02:03:55 1980\n\0`
+`Wed Jan 2 02:03:55 1980\n\0`
A 24-hour clock is used. All fields have a constant width. The new line character ('\n') and the null character ('\0') occupy the last two positions of the string.
diff --git a/docs/c-runtime-library/reference/cxxthrowexception.md b/docs/c-runtime-library/reference/cxxthrowexception.md
index 1bad3b4dd0..2a2a3b87b6 100644
--- a/docs/c-runtime-library/reference/cxxthrowexception.md
+++ b/docs/c-runtime-library/reference/cxxthrowexception.md
@@ -1,6 +1,6 @@
---
-description: "Learn more about: _CxxThrowException"
title: "_CxxThrowException"
+description: "Learn more about: _CxxThrowException"
ms.date: "11/04/2016"
api_name: ["_CxxThrowException"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll"]
@@ -8,7 +8,6 @@ api_type: ["DLLExport"]
topic_type: ["apiref"]
f1_keywords: ["CxxThrowException", "_CxxThrowException"]
helpviewer_keywords: ["_CxxThrowException function", "CxxThrowException function"]
-ms.assetid: 0b90bef5-b7d2-46e0-88e2-59e531e01a4d
---
# `_CxxThrowException`
@@ -18,7 +17,7 @@ Builds the exception record and calls the runtime environment to start processin
```C
extern "C" void __stdcall _CxxThrowException(
- void* pExceptionObject
+ void* pExceptionObject,
_ThrowInfo* pThrowInfo
);
```
diff --git a/docs/c-runtime-library/reference/dupenv-s-dbg-wdupenv-s-dbg.md b/docs/c-runtime-library/reference/dupenv-s-dbg-wdupenv-s-dbg.md
index 9fab3a0583..047aba34af 100644
--- a/docs/c-runtime-library/reference/dupenv-s-dbg-wdupenv-s-dbg.md
+++ b/docs/c-runtime-library/reference/dupenv-s-dbg-wdupenv-s-dbg.md
@@ -1,6 +1,6 @@
---
-description: "Learn more about: _dupenv_s_dbg, _wdupenv_s_dbg"
title: "_dupenv_s_dbg, _wdupenv_s_dbg"
+description: "Learn more about: _dupenv_s_dbg, _wdupenv_s_dbg"
ms.date: "11/04/2016"
api_name: ["_dupenv_s_dbg", "_wdupenv_s_dbg"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll"]
@@ -8,7 +8,6 @@ api_type: ["DLLExport"]
topic_type: ["apiref"]
f1_keywords: ["_tdupenv_s_dbg", "_dupenv_s_dbg", "_wdupenv_s_dbg"]
helpviewer_keywords: ["_tdupenv_s_dbg function", "dupenv_s_dbg function", "_wdupenv_s_dbg function", "environment variables", "tdupenv_s_dbg function", "wdupenv_s_dbg function", "_dupenv_s_dbg function"]
-ms.assetid: e3d81148-e24e-46d0-a21d-fd87b5e6256c
---
# `_dupenv_s_dbg`, `_wdupenv_s_dbg`
@@ -67,7 +66,7 @@ If these functions can't allocate enough memory, they set *`buffer`* to `NULL` a
The **`_dupenv_s_dbg`** and **`_wdupenv_s_dbg`** functions are identical to `_dupenv_s` and `_wdupenv_s` except that, when `_DEBUG` is defined, these functions use the debug version of [`malloc`](malloc.md), [`_malloc_dbg`](malloc-dbg.md), to allocate memory for the value of the environment variable. For information on the debugging features of `_malloc_dbg`, see [`_malloc_dbg`](malloc-dbg.md).
-You don't need to call these functions explicitly in most cases. Instead, you can define the flag `_CRTDBG_MAP_ALLOC`. When `_CRTDBG_MAP_ALLOC` is defined, calls to `_dupenv_s` and `_wdupenv_s` are remapped to **`_dupenv_s_dbg`** and **`_wdupenv_s_dbg`**, respectively, with the *`blockType`* set to `_NORMAL_BLOCK`. Thus, you don't need to call these functions explicitly unless you want to mark the heap blocks as `_CLIENT_BLOCK`. For more information on block types, see [Types of blocks on the debug heap](/visualstudio/debugger/crt-debug-heap-details).
+You don't need to call these functions explicitly in most cases. Instead, you can define the flag `_CRTDBG_MAP_ALLOC`. When `_CRTDBG_MAP_ALLOC` is defined, calls to `_dupenv_s` and `_wdupenv_s` are remapped to **`_dupenv_s_dbg`** and **`_wdupenv_s_dbg`**, respectively, with the *`blockType`* set to `_NORMAL_BLOCK`. Thus, you don't need to call these functions explicitly unless you want to mark the heap blocks as `_CLIENT_BLOCK`. For more information on block types, see [Types of blocks on the debug heap](../crt-debug-heap-details.md#types-of-blocks-on-the-debug-heap).
### Generic-text routine mappings
@@ -88,7 +87,7 @@ For more compatibility information, see [Compatibility](../compatibility.md).
```C
// crt_dupenv_s_dbg.c
-#include
+#include
#include
int main( void )
diff --git a/docs/c-runtime-library/reference/dupenv-s-wdupenv-s.md b/docs/c-runtime-library/reference/dupenv-s-wdupenv-s.md
index e0d4242db2..da9fb11032 100644
--- a/docs/c-runtime-library/reference/dupenv-s-wdupenv-s.md
+++ b/docs/c-runtime-library/reference/dupenv-s-wdupenv-s.md
@@ -1,6 +1,6 @@
---
-description: "Learn more about: _dupenv_s, _wdupenv_s"
title: "_dupenv_s, _wdupenv_s"
+description: "Learn more about: _dupenv_s, _wdupenv_s"
ms.date: "4/2/2020"
api_name: ["_dupenv_s", "_wdupenv_s", "_o__dupenv_s", "_o__wdupenv_s"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-environment-l1-1-0.dll"]
@@ -8,7 +8,6 @@ api_type: ["DLLExport"]
topic_type: ["apiref"]
f1_keywords: ["tdupenv_s", "_dupenv_s", "wdupenv_s", "dupenv_s", "_tdupenv_s", "_wdupenv_s"]
helpviewer_keywords: ["_dupenv_s function", "_tdupenv_s function", "_wdupenv_s function", "environment variables", "wdupenv_s function", "dupenv_s function", "tdupenv_s function"]
-ms.assetid: b729ecc2-a31d-4ccf-92a7-5accedb8f8c8
---
# `_dupenv_s`, `_wdupenv_s`
@@ -89,7 +88,7 @@ For more compatibility information, see [Compatibility](../compatibility.md).
```C
// crt_dupenv_s.c
-#include
+#include
int main( void )
{
diff --git a/docs/c-runtime-library/reference/exit-exit-exit.md b/docs/c-runtime-library/reference/exit-exit-exit.md
index 1ad98c4dc5..bcec154714 100644
--- a/docs/c-runtime-library/reference/exit-exit-exit.md
+++ b/docs/c-runtime-library/reference/exit-exit-exit.md
@@ -14,7 +14,7 @@ helpviewer_keywords: ["exit function", "_exit function", "processes, terminating
Terminates the calling process. The **`exit`** function terminates it after cleanup; **`_exit`** and **`_Exit`** terminate it immediately.
> [!NOTE]
-> Do not use this method to shut down a Universal Windows Platform (UWP) app, except in testing or debugging scenarios. Programmatic or UI ways to close a Store app are not permitted according to the [Microsoft Store policies](/legal/windows/agreements/store-policies). For more information, see [UWP app lifecycle](/windows/uwp/launch-resume/app-lifecycle). For more information about UWP apps, see [Universal Windows Platform documentation](https://developer.microsoft.com/windows/apps).
+> Do not use this method to shut down a Universal Windows Platform (UWP) app, except in testing or debugging scenarios. Programmatic or UI ways to close a Store app are not permitted according to the [Microsoft Store policies](/windows/apps/publish/store-policies). For more information, see [UWP app lifecycle](/windows/uwp/launch-resume/app-lifecycle). For more information about UWP apps, see [Universal Windows Platform documentation](https://developer.microsoft.com/windows/apps).
## Syntax
diff --git a/docs/c-runtime-library/reference/exp2-exp2f-exp2l.md b/docs/c-runtime-library/reference/exp2-exp2f-exp2l.md
index b2d84ff608..bf7a2e2893 100644
--- a/docs/c-runtime-library/reference/exp2-exp2f-exp2l.md
+++ b/docs/c-runtime-library/reference/exp2-exp2f-exp2l.md
@@ -8,7 +8,6 @@ api_type: ["DLLExport"]
topic_type: ["apiref"]
f1_keywords: ["exp2", "math/exp2", "exp2f", "math/exp2f", "exp2l", "math/exp2l"]
helpviewer_keywords: ["exp2 function", "exp2f function", "exp2l function"]
-ms.assetid: 526e3e10-201a-4610-a886-533f44ece344
---
# `exp2`, `exp2f`, `exp2l`
@@ -79,5 +78,5 @@ For more compatibility information, see [Compatibility](../compatibility.md).
## See also
[Alphabetical function reference](crt-alphabetical-function-reference.md)\
-[`exp`, `expf`, `expl`](exp-expf.md)
+[`exp`, `expf`, `expl`](exp-expf.md)\
[`log2`, `log2f`, `log2l`](log2-log2f-log2l.md)
diff --git a/docs/c-runtime-library/reference/expand-dbg.md b/docs/c-runtime-library/reference/expand-dbg.md
index 8e826cebfc..5998a4195c 100644
--- a/docs/c-runtime-library/reference/expand-dbg.md
+++ b/docs/c-runtime-library/reference/expand-dbg.md
@@ -57,7 +57,7 @@ The **`_expand_dbg`** function is a debug version of the _[`expand`](expand.md)
When *`newSize`* is greater than the original block size, the memory block is expanded. During an expansion, if the memory block can't be expanded to accommodate the requested size, `NULL` is returned. When *`newSize`* is less than the original block size, the memory block is contracted until the new size is obtained.
-For information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT debug heap details](/visualstudio/debugger/crt-debug-heap-details). For information about the allocation block types and how they're used, see [Types of blocks on the debug heap](/visualstudio/debugger/crt-debug-heap-details). For information about the differences between standard heap functions and debug versions, see [Debug versions of heap allocation functions](/visualstudio/debugger/debug-versions-of-heap-allocation-functions).
+For information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT debug heap details](../crt-debug-heap-details.md). For information about the allocation block types and how they're used, see [Types of blocks on the debug heap](../crt-debug-heap-details.md#types-of-blocks-on-the-debug-heap). For information about the differences between standard heap functions and debug versions, see [Debug versions of heap allocation functions](../debug-versions-of-heap-allocation-functions.md).
This function validates its parameters. If *`userData`* is a null pointer, or if size is greater than `_HEAP_MAXREQ`, this function invokes an invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, `errno` is set to `EINVAL` and the function returns `NULL`.
diff --git a/docs/c-runtime-library/reference/expand.md b/docs/c-runtime-library/reference/expand.md
index c3199ec7ce..dfcbe00e56 100644
--- a/docs/c-runtime-library/reference/expand.md
+++ b/docs/c-runtime-library/reference/expand.md
@@ -48,7 +48,7 @@ The **`_expand`** function changes the size of a previously allocated memory blo
> [!NOTE]
> On 64-bit platforms, **`_expand`** might not contract the block if the new size is less than the current size; in particular, if the block was less than 16K in size and therefore allocated in the Low Fragmentation Heap, **`_expand`** leaves the block unchanged and returns *`memblock`*.
-When the application is linked with a debug version of the C run-time libraries, **`_expand`** resolves to [`_expand_dbg`](expand-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).
+When the application is linked with a debug version of the C run-time libraries, **`_expand`** resolves to [`_expand_dbg`](expand-dbg.md). For more information about how the heap is managed during the debugging process, see [The CRT debug heap](../crt-debug-heap-details.md).
This function validates its parameters. If *`memblock`* is a null pointer, this function invokes an invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, `errno` is set to `EINVAL` and the function returns `NULL`. If *`size`* is greater than `_HEAP_MAXREQ`, `errno` is set to `ENOMEM`, and the function returns `NULL`.
diff --git a/docs/c-runtime-library/reference/fclose-nolock.md b/docs/c-runtime-library/reference/fclose-nolock.md
index ca205e0355..b03860a277 100644
--- a/docs/c-runtime-library/reference/fclose-nolock.md
+++ b/docs/c-runtime-library/reference/fclose-nolock.md
@@ -1,6 +1,6 @@
---
-description: "Learn more about: _fclose_nolock"
title: "_fclose_nolock"
+description: "Learn more about: _fclose_nolock"
ms.date: "4/2/2020"
api_name: ["_fclose_nolock", "_o__fclose_nolock"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-stdio-l1-1-0.dll"]
@@ -8,11 +8,10 @@ api_type: ["DLLExport"]
topic_type: ["apiref"]
f1_keywords: ["fclose_nolock", "_fclose_nolock"]
helpviewer_keywords: ["streams, closing", "fclose_nolock function", "_fclose_nolock function"]
-ms.assetid: b4af4392-5fc8-49bb-9fe2-ca7293d3ce04
---
# `_fclose_nolock`
-Closes a stream without thread-locking.
+Closes a stream without locking.
## Syntax
diff --git a/docs/c-runtime-library/reference/fdim-fdimf-fdiml.md b/docs/c-runtime-library/reference/fdim-fdimf-fdiml.md
index 652e9aaf6b..89145b12af 100644
--- a/docs/c-runtime-library/reference/fdim-fdimf-fdiml.md
+++ b/docs/c-runtime-library/reference/fdim-fdimf-fdiml.md
@@ -8,7 +8,6 @@ api_type: ["DLLExport"]
topic_type: ["apiref"]
f1_keywords: ["fdim", "fdimf", "fdiml", "math/fdim", "math/fdimf", "math/fdiml"]
helpviewer_keywords: ["fdim function", "fdimf function", "fdiml function"]
-ms.assetid: 2d4ac639-51e9-462d-84ab-fb03b06971a0
---
# `fdim`, `fdimf`, `fdiml`
@@ -93,4 +92,4 @@ For more compatibility information, see [Compatibility](../compatibility.md).
[Alphabetical function reference](crt-alphabetical-function-reference.md)\
[`fmax`, `fmaxf`, `fmaxl`](fmax-fmaxf-fmaxl.md)\
-[`abs`, `labs`, `llabs`, `_abs64`](abs-labs-llabs-abs64.md)\
+[`abs`, `labs`, `llabs`, `_abs64`](abs-labs-llabs-abs64.md)
diff --git a/docs/c-runtime-library/reference/fegetround-fesetround2.md b/docs/c-runtime-library/reference/fegetround-fesetround2.md
index 8a6a274159..d771b3c7d4 100644
--- a/docs/c-runtime-library/reference/fegetround-fesetround2.md
+++ b/docs/c-runtime-library/reference/fegetround-fesetround2.md
@@ -8,7 +8,6 @@ api_type: ["DLLExport"]
topic_type: ["apiref"]
f1_keywords: ["fegetround", "fesetround", "fenv/fegetround", "fenv/fesetround"]
helpviewer_keywords: ["fegetround function", "fesetround function"]
-ms.assetid: 596af00b-be2f-4f57-b2f5-460485f9ff0b
---
# `fegetround`, `fesetround`
@@ -18,10 +17,7 @@ Gets or sets the current floating-point rounding mode.
```C
int fegetround(void);
-
-int fesetround(
- int round_mode
-);
+int fesetround(int round_mode);
```
### Parameters
@@ -51,30 +47,29 @@ The default behavior of `FE_TONEAREST` is to round results midway between repres
The current rounding mode affects these operations:
- String conversions.
-
- The results of floating-point arithmetic operators outside of constant expressions.
-
- The library rounding functions, such as `rint` and `nearbyint`.
-
- Return values from standard library mathematical functions.
The current rounding mode doesn't affect these operations:
- The `trunc`, `ceil`, `floor`, and `lround` library functions.
-
- Floating-point to integer implicit casts and conversions, which always round towards zero.
-
- The results of floating-point arithmetic operators in constant expressions, which always round to the nearest value.
To use these functions, you must turn off floating-point optimizations that could prevent access by using the `#pragma fenv_access(on)` directive prior to the call. For more information, see [`fenv_access`](../../preprocessor/fenv-access.md).
+> [!IMPORTANT]
+> Prior to Windows 10 version 14393, `fenv.h` defined `FE_UPWARD = 0x0100` and `FE_DOWNWARD = 0x0200`. In Windows version 14393, this header was updated to address a bug in which some APIs would interpret `FE_UPWARD` as `FE_DOWNWARD`, and vice-versa. Starting in Windows version 14393, `FE_UPWARD = 0x0200` and `FE_DOWNWARD = 0x0100`, reversing their previous values.
+> If you compiled your app against an old Windows SDK version (this issue depends on SDK version, not OS version or VS version) you might encounter this issue. Update your app to target the latest Windows SDK so that the definitions of `FE_UPWARD` and `FE_DOWNWARD` are consistent with the Windows implementation. If you can't update your app to target a later Windows SDK, you can define `FE_UPWARD` as `0x0100` and `FE_DOWNWARD` as `0x0200` in your code.
+
## Requirements
| Function | C header | C++ header |
|---|---|---|
-| **`fegetround`**, **`fesetround`** | \ | \ |
+| **`fegetround`**, **`fesetround`** | `` | `` |
-For more compatibility information, see [Compatibility](../compatibility.md).
+For more information, see [Compatibility](../compatibility.md).
## See also
diff --git a/docs/c-runtime-library/reference/fflush-nolock.md b/docs/c-runtime-library/reference/fflush-nolock.md
index 2934639b30..4c83497bc9 100644
--- a/docs/c-runtime-library/reference/fflush-nolock.md
+++ b/docs/c-runtime-library/reference/fflush-nolock.md
@@ -1,6 +1,6 @@
---
-description: "Learn more about: _fflush_nolock"
title: "_fflush_nolock"
+description: "Learn more about: _fflush_nolock"
ms.date: "4/2/2020"
api_name: ["_fflush_nolock", "_o__fflush_nolock"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-stdio-l1-1-0.dll"]
@@ -8,11 +8,10 @@ api_type: ["DLLExport"]
topic_type: ["apiref"]
f1_keywords: ["fflush_nolock", "_fflush_nolock"]
helpviewer_keywords: ["fflush_nolock function", "_fflush_nolock function", "streams, flushing", "flushing"]
-ms.assetid: 5e33c4a1-b10c-4001-ad01-210757919291
---
# `_fflush_nolock`
-Flushes a stream without locking the thread.
+Flushes a stream without locking.
## Syntax
diff --git a/docs/c-runtime-library/reference/fgetc-nolock-fgetwc-nolock.md b/docs/c-runtime-library/reference/fgetc-nolock-fgetwc-nolock.md
index 6ef2d4d806..59604586b6 100644
--- a/docs/c-runtime-library/reference/fgetc-nolock-fgetwc-nolock.md
+++ b/docs/c-runtime-library/reference/fgetc-nolock-fgetwc-nolock.md
@@ -1,6 +1,6 @@
---
-description: "Learn more about: _fgetc_nolock, _fgetwc_nolock"
title: "_fgetc_nolock, _fgetwc_nolock"
+description: "Learn more about: _fgetc_nolock, _fgetwc_nolock"
ms.date: "4/2/2020"
api_name: ["_fgetc_nolock", "_fgetwc_nolock", "_o__fgetc_nolock", "_o__fgetwc_nolock"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-stdio-l1-1-0.dll"]
@@ -8,11 +8,10 @@ api_type: ["DLLExport"]
topic_type: ["apiref"]
f1_keywords: ["_fgetwc_nolock", "fgettc_nolock", "fgetwc_nolock", "_fgetc_nolock", "_fgettc_nolock", "fgetc_nolock"]
helpviewer_keywords: ["fgetc_nolock function", "fgetwc_nolock function", "_fgetwc_nolock function", "characters, reading", "_fgetc_nolock function", "streams, reading characters from", "fgettc_nolock function", "reading characters from streams", "_fgettc_nolock function"]
-ms.assetid: fb8e7c5b-4503-493a-879e-6a1db75aa114
---
# `_fgetc_nolock`, `_fgetwc_nolock`
-Reads a character from a stream without locking the thread.
+Reads a character from a stream without locking.
## Syntax
diff --git a/docs/c-runtime-library/reference/findfirst-functions.md b/docs/c-runtime-library/reference/findfirst-functions.md
index d34d13c777..dcfbffe363 100644
--- a/docs/c-runtime-library/reference/findfirst-functions.md
+++ b/docs/c-runtime-library/reference/findfirst-functions.md
@@ -72,7 +72,7 @@ intptr_t _wfindfirst64i32(
Target file specification (can include wildcard characters).
*`fileinfo`*\
-File information buffer.
+File information buffer. For more information about the `fileinfo` structs, see the Remarks in [Filename search functions](../filename-search-functions.md) and see [Data type mappings](../data-type-mappings.md). The structs are defined in the same header file as the function that uses them as a parameter.
## Return value
@@ -101,7 +101,7 @@ These functions use various forms of the **`_finddata_t`** structure for the *`f
The variations that use a 64-bit time type enable file-creation dates to be expressed up through 23:59:59, December 31, 3000, UTC. The ones that use 32-bit time types represent dates only through 23:59:59 January 18, 2038, UTC. Midnight, January 1, 1970, is the lower bound of the date range for all these functions.
-Unless you have a specific reason to use the versions that specify the time size explicitly, use **`_findfirst`** or **`_wfindfirst`** or, if you need to support file sizes larger than 3 GB, use **`_findfirsti64`** or **`_wfindfirsti64`**. All these functions use the 64-bit time type. In earlier versions, these functions used a 32-bit time type. If this change is a breaking change for an application, you might define `_USE_32BIT_TIME_T` to revert to the old behavior. If `_USE_32BIT_TIME_T` is defined, **`_findfirst`**, **`_finfirsti64`**, and their corresponding Unicode versions use a 32-bit time.
+Unless you have a specific reason to use the versions that specify the time size explicitly, use **`_findfirst`** or **`_wfindfirst`** or, if you need to support file sizes larger than 3 GB, use **`_findfirsti64`** or **`_wfindfirsti64`**. All these functions use the 64-bit time type. In earlier versions, these functions used a 32-bit time type. If this change is a breaking change for an application, you might define `_USE_32BIT_TIME_T` to revert to the old behavior. If `_USE_32BIT_TIME_T` is defined, **`_findfirst`**, **`_findfirsti64`**, and their corresponding Unicode versions use a 32-bit time.
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).
diff --git a/docs/c-runtime-library/reference/floating-point-ordering.md b/docs/c-runtime-library/reference/floating-point-ordering.md
index ece44b97be..acdf45961d 100644
--- a/docs/c-runtime-library/reference/floating-point-ordering.md
+++ b/docs/c-runtime-library/reference/floating-point-ordering.md
@@ -1,6 +1,6 @@
---
-description: "Learn more about: isgreater, isgreaterequal, isless, islessequal, islessgreater, isunordered"
title: "isgreater, isgreaterequal, isless, islessequal, islessgreater, isunordered"
+description: "Learn more about: isgreater, isgreaterequal, isless, islessequal, islessgreater, isunordered"
ms.date: "01/31/2019"
f1_keywords: ["isgreater", "math/isgreater", "isgreaterequal", "math/isgreaterequal", "isless", "math/isless", "islessequal", "math/islessequal", "islessgreater", "math/islessgreater", "isunordered", "math/isunordered"]
helpviewer_keywords: ["isgreater function", "isgreaterequal function", "isless function", "islessequal function", "islessgreater function", "isunordered function"]
@@ -43,7 +43,7 @@ int isunordered(
); /* C-only macro */
```
-```C++
+```cpp
template
inline bool isgreater(
FloatingType1 x,
diff --git a/docs/c-runtime-library/reference/fma-fmaf-fmal.md b/docs/c-runtime-library/reference/fma-fmaf-fmal.md
index 7838e4e7d1..5c1d6f5f4b 100644
--- a/docs/c-runtime-library/reference/fma-fmaf-fmal.md
+++ b/docs/c-runtime-library/reference/fma-fmaf-fmal.md
@@ -1,6 +1,6 @@
---
title: "fma, fmaf, fmal"
-description: "API reference for fma, fmaf, and fmal; which multiplies two values together, adds a third value, and then rounds the result, without losing any precision due to intermediary rounding."
+description: "API reference for fma, fmaf, and fmal; which multiplies two values together, adds a third value, and then rounds the result, while only losing a small amount of precision due to intermediary rounding."
ms.date: "9/1/2020"
api_name: ["fma", "fmaf", "fmal", "_o_fma", "_o_fmaf", "_o_fmal"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-math-l1-1-0.dll"]
@@ -12,7 +12,7 @@ ms.assetid: 584a6037-da1e-4e86-9f0c-97aae86de0c0
---
# `fma`, `fmaf`, `fmal`
-Multiplies two values together, adds a third value, and then rounds the result, without losing any precision due to intermediary rounding.
+Multiplies two values together, adds a third value, and then rounds the result, while only losing a small amount of precision due to intermediary rounding.
## Syntax
@@ -63,7 +63,7 @@ The value to add.
## Return value
-Returns `(x * y) + z`. The return value is then rounded using the current rounding format.
+Returns approximately `(x * y) + z`. The return value is then rounded using the current rounding format, although in many cases, it returns incorrectly rounded results and thus the value may be inexact by up to half an ulp from the correct value.
Otherwise, may return one of the following values:
diff --git a/docs/c-runtime-library/reference/fopen-s-wfopen-s.md b/docs/c-runtime-library/reference/fopen-s-wfopen-s.md
index 47072fb31b..6964db2b65 100644
--- a/docs/c-runtime-library/reference/fopen-s-wfopen-s.md
+++ b/docs/c-runtime-library/reference/fopen-s-wfopen-s.md
@@ -1,7 +1,7 @@
---
title: "fopen_s, _wfopen_s"
description: "Describes the API for `fopen_s` and `_wfopen_s`"
-ms.date: 05/18/2022
+ms.date: 04/27/2023
api_name: ["_wfopen_s", "fopen_s", "_o__wfopen_s", "_o_fopen_s"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-stdio-l1-1-0.dll"]
api_type: ["DLLExport"]
@@ -31,10 +31,10 @@ errno_t _wfopen_s(
### Parameters
*`pFile`*\
-A pointer to the file pointer that will receive the pointer to the opened file.
+A pointer to the file pointer that receives the pointer to the opened file.
*`filename`*\
-Filename.
+The name of the file to open.
*`mode`*\
Type of access permitted.
@@ -55,7 +55,7 @@ Zero if successful; an error code on failure. For more information about these e
The **`fopen_s`** and **`_wfopen_s`** functions can't open a file for sharing. If you need to share the file, use [`_fsopen` or `_wfsopen`](fsopen-wfsopen.md) with the appropriate sharing mode constant—for example, use `_SH_DENYNO` for read/write sharing.
-The **`fopen_s`** function opens the file that's specified by *`filename`*. **`_wfopen_s`** is a wide-character version of **`fopen_s`**; the arguments to **`_wfopen_s`** are wide-character strings. **`_wfopen_s`** and **`fopen_s`** behave identically otherwise.
+The **`fopen_s`** function opens the file specified by *`filename`*. **`_wfopen_s`** is a wide-character version of **`fopen_s`** and the arguments to **`_wfopen_s`** are wide-character strings. **`_wfopen_s`** and **`fopen_s`** behave identically, otherwise.
**`fopen_s`** accepts paths that are valid on the file system at the point of execution; UNC paths and paths that involve mapped network drives are accepted by **`fopen_s`** as long as the system that's executing the code has access to the share or mapped network drive at the time of execution. When you construct paths for **`fopen_s`**, don't make assumptions about the availability of drives, paths, or network shares in the execution environment. You can use either forward slashes (/) or backslashes (\\) as the directory separators in a path.
@@ -111,14 +111,14 @@ When the **`"r+"`**, **`"w+"`**, or **`"a+"`** access type is specified, both re
Starting in C11, you can append **`"x"`** to **`"w"`** or **`"w+"`** to cause the function fail if the file exists, instead of overwriting it.
-In addition to the values above, the following characters can be included in *`mode`* to specify the translation mode for newline characters:
+In addition to the previous values, the following characters can be included in *`mode`* to specify the translation mode for newline characters:
| *`mode`* modifier | Translation mode |
|--|--|
-| **`t`** | Open in text (translated) mode. |
+| **`t`** | Open in text (translated) mode. Carriage return-line feed (CR-LF) combinations are translated into single line feeds (LF) on input and LF characters are translated to CR-LF combinations on output. CTRL+Z is interpreted as an end-of-file character on input. |
| **`b`** | Open in binary (untranslated) mode; translations involving carriage-return and line feed characters are suppressed. |
-In text (translated) mode, `CTRL`+**Z** is interpreted as an end-of-file character on input. In files opened for reading/writing with **`"a+"`**, **`fopen_s`** checks for a `CTRL`+**Z** at the end of the file and removes it, if possible. It's removed because using [`fseek`](fseek-fseeki64.md) and [`ftell`](ftell-ftelli64.md) to move within a file that ends with a `CTRL`+**Z**, may cause **`fseek`** to behave improperly near the end of the file.
+In text (translated) mode, `CTRL`+**Z** is interpreted as an end-of-file character on input. For files opened for reading/writing with **`"a+"`**, **`fopen_s`** checks for a `CTRL`+**Z** at the end of the file and removes it, if possible. It's removed because using [`fseek`](fseek-fseeki64.md) and [`ftell`](ftell-ftelli64.md) to move within a file that ends with a `CTRL`+**Z**, may cause **`fseek`** to behave improperly near the end of the file.
Also, in text mode, carriage return/line feed (CRLF) combinations are translated into single line feed (LF) characters on input, and LF characters are translated to CRLF combinations on output. When a Unicode stream-I/O function operates in text mode (the default), the source or destination stream is assumed to be a sequence of multibyte characters. The Unicode stream-input functions convert multibyte characters to wide characters (as if by a call to the **`mbtowc`** function). For the same reason, the Unicode stream-output functions convert wide characters to multibyte characters (as if by a call to the **`wctomb`** function).
@@ -133,8 +133,8 @@ For more information about using text and binary modes in Unicode and multibyte
| **`N`** | Specifies that the file isn't inherited by child processes. |
| **`S`** | Specifies that caching is optimized for, but not restricted to, sequential access from disk. |
| **`R`** | Specifies that caching is optimized for, but not restricted to, random access from disk. |
-| **`t`** | Specifies a file as temporary. If possible, it isn't flushed to disk. |
-| **`D`** | Specifies a file as temporary. It's deleted when the last file pointer is closed. |
+| **`T`** | Specifies a file that isn't written to disk unless memory pressure requires it. |
+| **`D`** | Specifies a temporary file that is deleted when the last file pointer to it is closed. |
| **`ccs=UNICODE`** | Specifies UNICODE as the encoded character set to use for this file. Leave unspecified if you want ANSI encoding. |
| **`ccs=UTF-8`** | Specifies UTF-8 as the encoded character set to use for this file. Leave unspecified if you want ANSI encoding. |
| **`ccs=UTF-16LE`** | Specifies UTF-16LE as the encoded character set to use for this file. Leave unspecified if you want ANSI encoding. |
@@ -150,21 +150,27 @@ Valid characters for the *`mode`* string used in **`fopen_s`** and [`_fdopen`](f
| **`w`** | `_O_WRONLY` (usually `_O_WRONLY | _O_CREAT | _O_TRUNC`) |
| **`w+`** | `_O_RDWR` (usually **`_O_RDWR | _O_CREAT | _O_TRUNC`) |
| **`b`** | `_O_BINARY` |
-| **`t`** | `_O_TEXT` |
+| **`t`** | `_O_TEXT` (translated) |
| **`c`** | None |
| **`n`** | None |
-| **`S`** | `_O_SEQUENTIAL` |
-| **`R`** | `_O_RANDOM` |
-| **`t`** | `_O_SHORTLIVED` |
+| **`N`** | `_O_NOINHERIT` |
| **`D`** | `_O_TEMPORARY` |
+| **`R`** | `_O_RANDOM` |
+| **`S`** | `_O_SEQUENTIAL` |
+| **`T`** | `_O_SHORTLIVED` |
| **`ccs=UNICODE`** | `_O_WTEXT` |
| **`ccs=UTF-8`** | `_O_UTF8` |
| **`ccs=UTF-16LE`** | `_O_UTF16` |
-The **`c`**, **`n`**, and **`t`** *`mode`* options are Microsoft extensions for **`fopen_s`** and [`_fdopen`](fdopen-wfdopen.md) and shouldn't be used where you want ANSI portability.
+The **`c`**, **`n`**, **`R`**, **`S`**, **`t`**, **`T`**, and **`D`** *`mode`* options are Microsoft extensions for `fopen_s` and `_wfopen_s` and shouldn't be used when you want ANSI portability.
If you're using **`rb`** mode, memory mapped Win32 files might also be an option if you don't need to port your code, you expect to read much of the file, or you don't care about network performance.
+Regarding `T` and `D`:
+- `T` avoids writing the file to disk as long as memory pressure doesn't require it. For more information, see `FILE_ATTRIBUTE_TEMPORARY` in [File attribute constants](/windows/win32/fileio/file-attribute-constants), and also this blog post [It's only temporary](/archive/blogs/larryosterman/its-only-temporary).
+- `D` specifies a regular file that is written to disk. The difference is that it's automatically deleted when it's closed.
+You can combine `TD` to get both semantics.
+
## Requirements
| Function | Required header | C++ header |
diff --git a/docs/c-runtime-library/reference/fopen-wfopen.md b/docs/c-runtime-library/reference/fopen-wfopen.md
index 2a7036a39a..22d44f2421 100644
--- a/docs/c-runtime-library/reference/fopen-wfopen.md
+++ b/docs/c-runtime-library/reference/fopen-wfopen.md
@@ -1,7 +1,7 @@
---
-description: "Learn more about: fopen, _wfopen"
title: "fopen, _wfopen"
-ms.date: 05/18/2022
+description: "Learn more about: fopen, _wfopen"
+ms.date: 04/27/2023
api_name: ["_wfopen", "fopen", "_o__wfopen", "_o_fopen"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-stdio-l1-1-0.dll"]
api_type: ["DLLExport"]
@@ -42,9 +42,9 @@ For more information, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`
## Remarks
-The **`fopen`** function opens the file that is specified by *`filename`*. By default, a narrow *`filename`* string is interpreted using the ANSI codepage (`CP_ACP`). In Windows Desktop applications, it can be changed to the OEM codepage (`CP_OEMCP`) by using the [`SetFileApisToOEM`](/windows/win32/api/fileapi/nf-fileapi-setfileapistooem) function. You can use the [`AreFileApisANSI`](/windows/win32/api/fileapi/nf-fileapi-arefileapisansi) function to determine whether *`filename`* is interpreted using the ANSI or the system default OEM codepage. **`_wfopen`** is a wide-character version of **`fopen`**; the **`_wfopen`** arguments are wide-character strings. Otherwise, **`_wfopen`** and **`fopen`** behave identically. Just using **`_wfopen`** doesn't affect the coded character set that's used in the file stream.
+The **`fopen`** function opens the file specified by *`filename`*. By default, a narrow *`filename`* string is interpreted using the ANSI codepage (`CP_ACP`). In Windows Desktop applications, it can be changed to the OEM codepage (`CP_OEMCP`) by using the [`SetFileApisToOEM`](/windows/win32/api/fileapi/nf-fileapi-setfileapistooem) function. You can use the [`AreFileApisANSI`](/windows/win32/api/fileapi/nf-fileapi-arefileapisansi) function to determine whether *`filename`* is interpreted using the ANSI or the system default OEM codepage. **`_wfopen`** is a wide-character version of **`fopen`**; the **`_wfopen`** arguments are wide-character strings. Otherwise, **`_wfopen`** and **`fopen`** behave identically. Just using **`_wfopen`** doesn't affect the coded character set that's used in the file stream.
-**`fopen`** accepts paths that are valid on the file system at the point of execution; **`fopen`** accepts UNC paths and paths that involve mapped network drives as long as the system that executes the code has access to the share or mapped drive at the time of execution. When you construct paths for **`fopen`**, make sure that drives, paths, or network shares will be available in the execution environment. You can use either forward slashes (`/`) or backslashes (`\`) as the directory separators in a path.
+**`fopen`** accepts paths that are valid on the file system at the point of execution; **`fopen`** accepts UNC paths and paths that involve mapped network drives as long as the system that executes the code has access to the share or mapped drive at the time of execution. When you construct paths for **`fopen`**, make sure that drives, paths, or network shares are available in the execution environment. You can use either forward slashes (`/`) or backslashes (`\`) as the directory separators in a path.
Always check the return value to see whether the pointer is NULL before you perform any other operations on the file. If an error occurs, the global variable `errno` is set, and may be used to obtain specific error information. For more information, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md).
@@ -60,7 +60,7 @@ Allowed values for **`ccs`** encoding are `UNICODE`, **`UTF-8`**, and **`UTF-16L
When a file is opened in Unicode mode, input functions translate the data that's read from the file into UTF-16 data stored as type **`wchar_t`**. Functions that write to a file opened in Unicode mode expect buffers that contain UTF-16 data stored as type **`wchar_t`**. If the file is encoded as UTF-8, then UTF-16 data is translated into UTF-8 when it's written. The file's UTF-8-encoded content is translated into UTF-16 when it's read. An attempt to read or write an odd number of bytes in Unicode mode causes a [parameter validation](../parameter-validation.md) error. To read or write data that's stored in your program as UTF-8, use a text or binary file mode instead of a Unicode mode. You're responsible for any required encoding translation.
-If the file already exists and is opened for reading or appending, then any byte order mark (BOM) in the file determines the encoding. The BOM encoding takes precedence over the encoding that's specified by the **`ccs`** flag. The **`ccs`** encoding is only used when no BOM is present or the file is a new file.
+If the file already exists and is opened for reading or appending, then any byte order mark (BOM) in the file determines the encoding. The BOM encoding takes precedence over the encoding specified by the **`ccs`** flag. The **`ccs`** encoding is only used when no BOM is present or the file is a new file.
> [!NOTE]
> BOM detection only applies to files that are opened in Unicode mode (that is, by passing the **`ccs`** flag).
@@ -77,7 +77,7 @@ The following table summarizes the modes that are used for various **`ccs`** fla
Files opened for writing in Unicode mode have a BOM written to them automatically.
-If *`mode`* is **`a, ccs=encoding`** for some `encoding` value, **`fopen`** first tries to open the file by using both read and write access. If this action succeeds, the function reads the BOM to determine the encoding for the file. If it fails, the function uses the default encoding for the file. In either case, **`fopen`** will then reopen the file by using write-only access. (This behavior applies to **`"a"`** mode only, not to **`"a+"`** mode.)
+If *`mode`* is **`a, ccs=encoding`** for some `encoding` value, **`fopen`** first tries to open the file by using both read and write access. If this action succeeds, the function reads the BOM to determine the encoding for the file. If it fails, the function uses the default encoding for the file. In either case, **`fopen`** reopens the file using write-only access. (This behavior applies to **`"a"`** mode only, not to **`"a+"`** mode.)
### Generic-text routine mappings
@@ -106,7 +106,7 @@ In addition to the earlier values, the following characters can be appended to *
| *`mode`* modifier | Translation mode |
|--|--|
-| **`t`** | Open in text (translated) mode. |
+| **`t`** | Open in text (translated) mode. Carriage return-line feed (CR-LF) combinations are translated into single line feeds (LF) on input and LF characters are translated to CR-LF combinations on output. Also, CTRL+Z is interpreted as an end-of-file character on input. |
| **`b`** | Open in binary (untranslated) mode; translations involving carriage-return and line feed characters are suppressed. |
In text mode, `CTRL`+**Z** is interpreted as an EOF character on input. In files that are opened for reading/writing by using **`"a+"`**, **`fopen`** checks for a `CTRL`+**Z** at the end of the file and removes it, if it's possible. It's removed because using [`fseek`](fseek-fseeki64.md) and **`ftell`** to move within a file that ends with `CTRL`+**Z** may cause [`fseek`](fseek-fseeki64.md) to behave incorrectly near the end of the file.
@@ -127,8 +127,8 @@ The following options can be appended to *`mode`* to specify more behaviors.
| **`N`** | Specifies that the file isn't inherited by child processes. |
| **`S`** | Specifies that caching is optimized for, but not restricted to, sequential access from disk. |
| **`R`** | Specifies that caching is optimized for, but not restricted to, random access from disk. |
-| **`T`** | Specifies a file as temporary. If possible, it isn't flushed to disk. |
-| **`D`** | Specifies a file as temporary. It's deleted when the last file pointer is closed. |
+| **`T`** | Specifies a file that isn't written to disk unless memory pressure requires it. |
+| **`D`** | Specifies a temporary file that's deleted when the last file pointer to it is closed. |
| **`ccs=encoding`** | Specifies the encoded character set to use (one of **`UTF-8`**, **`UTF-16LE`**, or `UNICODE`) for this file. Leave unspecified if you want ANSI encoding. This flag is separated from flags that precede it by a comma (`,`). For example: `FILE *f = fopen("newfile.txt", "rt+, ccs=UTF-8");` |
Valid characters for the *`mode`* string that is used in **`fopen`** and **`_fdopen`** correspond to *`oflag`* arguments that are used in [`_open`](open-wopen.md) and [`_sopen`](sopen-wsopen.md), as follows.
@@ -136,16 +136,17 @@ Valid characters for the *`mode`* string that is used in **`fopen`** and **`_fdo
| Characters in *`mode`* string | Equivalent *`oflag`* value for `_open`/`_sopen` |
|--|--|
| **`a`** | `_O_WRONLY | _O_APPEND` (usually `_O_WRONLY | _O_CREAT | _O_APPEND`) |
-| **`a+`** | `_O_RDWR | _O_APPEND` (usually `_O_RDWR | _O_APPEND | _O_CREAT` ) |
+| **`a+`** | `_O_RDWR | _O_APPEND` (usually `_O_RDWR | _O_APPEND | _O_CREAT`) |
| **`r`** | `_O_RDONLY` |
| **`r+`** | `_O_RDWR` |
| **`w`** | `_O_WRONLY` (usually `_O_WRONLY | _O_CREAT | _O_TRUNC`) |
| **`w+`** | `_O_RDWR` (usually `_O_RDWR | _O_CREAT | _O_TRUNC`) |
| **`b`** | `_O_BINARY` |
-| **`t`** | `_O_TEXT` |
+| **`t`** | `_O_TEXT` (translated) |
| **`x`** | `_O_EXCL` |
| **`c`** | None |
| **`n`** | None |
+| **`N`** | `_O_NOINHERIT` |
| **`S`** | `_O_SEQUENTIAL` |
| **`R`** | `_O_RANDOM` |
| **`T`** | `_O_SHORTLIVED` |
@@ -156,6 +157,13 @@ Valid characters for the *`mode`* string that is used in **`fopen`** and **`_fdo
If you're using **`rb`** mode, you don't have to port your code, and if you expect to read most of a large file or aren't concerned about network performance, you might also consider whether to use memory mapped Win32 files as an option.
+Regarding `T` and `D`:
+- `T` avoids writing the file to disk as long as memory pressure doesn't require it. For more information, see `FILE_ATTRIBUTE_TEMPORARY` in [File attribute constants](/windows/win32/fileio/file-attribute-constants), and also this blog post [It's only temporary](/archive/blogs/larryosterman/its-only-temporary).
+- `D` specifies a regular file that is written to disk. The difference is that it's automatically deleted when it's closed.
+You can combine `TD` to get both semantics.
+
+The **`c`**, **`n`**, **`R`**, **`S`**, **`t`**, **`T`**, and **`D`** *`mode`* options are Microsoft extensions for `fopen` and `_wfopen` and shouldn't be used when you want ANSI portability.
+
## Requirements
| Function | Required header |
diff --git a/docs/c-runtime-library/reference/fprintf-fprintf-l-fwprintf-fwprintf-l.md b/docs/c-runtime-library/reference/fprintf-fprintf-l-fwprintf-fwprintf-l.md
index 184d2fc5e9..2d972d963a 100644
--- a/docs/c-runtime-library/reference/fprintf-fprintf-l-fwprintf-fwprintf-l.md
+++ b/docs/c-runtime-library/reference/fprintf-fprintf-l-fwprintf-fwprintf-l.md
@@ -1,18 +1,20 @@
---
-description: "Learn more about: fprintf, _fprintf_l, fwprintf, _fwprintf_l"
-title: "fprintf, _fprintf_l, fwprintf, _fwprintf_l"
+description: "Learn more about: fprintf, _fprintf_l, fwprintf, _ftprintf, _ftprintf_l"
+title: "fprintf, _fprintf_l, fwprintf, _fwprintf_l, _ftprintf, _ftprintf_l"
ms.date: "3/9/2021"
-api_name: ["fwprintf", "fprintf", "_fprintf_l", "_fwprintf_l"]
+api_name: ["fwprintf", "fprintf", "_fprintf_l", "_fwprintf_l", "_ftprintf", "_ftprintf_l"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["fprintf", "fwprintf", "_ftprintf"]
-helpviewer_keywords: ["_fwprintf_l function", "fprintf function", "fprintf_l function", "_fprintf_l function", "_ftprintf function", "fwprintf function", "ftprintf_l function", "ftprintf function", "_ftprintf_l function", "print formatted data to streams", "fwprintf_l function"]
+f1_keywords: ["fprintf", "fwprintf", "_ftprintf", "_fwprintf_l", "_ftprintf_l"]
+helpviewer_keywords: ["fprintf function", "fprintf_l function", "_fprintf_l function", "_ftprintf function", "fwprintf function", "ftprintf_l function", "ftprintf function", "print formatted data to streams", "fwprintf_l function", "_ftprintf_l function"]
---
-# `fprintf`, `_fprintf_l`, `fwprintf`, `_fwprintf_l`
+# `fprintf`, `_fprintf_l`, `fwprintf`, `_fwprintf_l`, `_ftprintf`, `_ftprintf_l`
Print formatted data to a stream. More secure versions of these functions are available; see [`fprintf_s`, `_fprintf_s_l`, `fwprintf_s`, `_fwprintf_s_l`](fprintf-s-fprintf-s-l-fwprintf-s-fwprintf-s-l.md).
+For `_ftprintf` and `_ftprintf_l`, see [Generic-text function mappings](#generic-text-function-mappings).
+
## Syntax
```C
@@ -73,12 +75,14 @@ The versions of these functions with the **`_l`** suffix are identical except th
>
> Starting in Windows 10 version 2004 (build 19041), the `printf` family of functions prints exactly representable floating point numbers according to the IEEE 754 rules for rounding. In previous versions of Windows, exactly representable floating point numbers ending in '5' would always round up. IEEE 754 states that they must round to the closest even digit (also known as "Banker's Rounding"). For example, both `printf("%1.0f", 1.5)` and `printf("%1.0f", 2.5)` should round to 2. Previously, 1.5 would round to 2 and 2.5 would round to 3. This change only affects exactly representable numbers. For example, 2.35 (which, when represented in memory, is closer to 2.35000000000000008) continues to round up to 2.4. Rounding done by these functions now also respects the floating point rounding mode set by [`fesetround`](fegetround-fesetround2.md). Previously, rounding always chose `FE_TONEAREST` behavior. This change only affects programs built using Visual Studio 2019 version 16.2 and later. To use the legacy floating point rounding behavior, link with ['legacy_stdio_float_rounding.obj`](../link-options.md).
-### Generic-text routine mappings
+### Generic-text function mappings
+
+The function in the `tchar.h` column maps to the function in the other columns depending on the character set that is defined at compile time.
-| `TCHAR.H` routine | `_UNICODE` and `_MBCS` not defined | `_MBCS` defined | `_UNICODE` defined |
+| `tchar.h` function | `_UNICODE` and `_MBCS` not defined | `_MBCS` defined | `_UNICODE` defined |
|---|---|---|---|
-| **`_ftprintf`** | **`fprintf`** | **`fprintf`** | **`fwprintf`** |
-| **`_ftprintf_l`** | **`_fprintf_l`** | **`_fprintf_l`** | **`_fwprintf_l`** |
+| `_ftprintf` | `fprintf` | `fprintf` | `fwprintf` |
+| `_ftprintf_l` | `_fprintf_l` | `_fprintf_l` | `_fwprintf_l` |
For more information, see [Format specification syntax](../format-specification-syntax-printf-and-wprintf-functions.md).
diff --git a/docs/c-runtime-library/reference/fprintf-p-fprintf-p-l-fwprintf-p-fwprintf-p-l.md b/docs/c-runtime-library/reference/fprintf-p-fprintf-p-l-fwprintf-p-fwprintf-p-l.md
index 877bf4a16d..8ed284f343 100644
--- a/docs/c-runtime-library/reference/fprintf-p-fprintf-p-l-fwprintf-p-fwprintf-p-l.md
+++ b/docs/c-runtime-library/reference/fprintf-p-fprintf-p-l-fwprintf-p-fwprintf-p-l.md
@@ -1,18 +1,20 @@
---
-description: "Learn more about: _fprintf_p, _fprintf_p_l, _fwprintf_p, _fwprintf_p_l"
+description: "Learn more about: _fprintf_p, _fprintf_p_l, _ftprintf_p, _ftprintf_p_l, _fwprintf_p, _fwprintf_p_l"
title: "_fprintf_p, _fprintf_p_l, _fwprintf_p, _fwprintf_p_l"
ms.date: "3/9/2021"
api_name: ["_fwprintf_p", "_fprintf_p_l", "_fwprintf_p_l", "_fprintf_p"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["_fprintf_p", "_ftprintf_p", "fwprintf_p", "_fwprintf_p", "fprintf_p", "ftprintf_p"]
-helpviewer_keywords: ["fprintf_p_l function", "fprintf_p function", "_fprintf_p_l function", "_fprintf_p function", "_ftprintf_p_l function", "streams, printing formatted data to", "_fwprintf_p function", "fwprintf_p function", "_ftprintf_p function", "_fwprintf_p_l function", "ftprintf_p function", "printing [C++], formatted data to streams", "ftprintf_p_l function", "fwprintf_p_l function"]
+f1_keywords: ["_fprintf_p", "_ftprintf_p", "_ftprintf_p_l", "fwprintf_p", "_fwprintf_p", "fprintf_p", "ftprintf_p", "_fwprintf_p_l"]
+helpviewer_keywords: ["fprintf_p_l function", "fprintf_p function", "_fprintf_p_l function", "_fprintf_p function", "_ftprintf_p function", "_ftprintf_p_l function", "streams, printing formatted data to", "_fwprintf_p function", "fwprintf_p function", "_fwprintf_p_l function", "ftprintf_p function", "printing [C++], formatted data to streams", "ftprintf_p_l function", "fwprintf_p_l function"]
---
-# `_fprintf_p`, `_fprintf_p_l`, `_fwprintf_p`, `_fwprintf_p_l`
+# `_fprintf_p`, `_fprintf_p_l`, `_ftprintf_p`, `_ftprintf_p_l`, `_fwprintf_p`, `_fwprintf_p_l`
Prints formatted data to a stream.
+For `_ftprintf_p` and `_ftprintf_p_l`, see [Generic-text function mappings](#generic-text-function-mappings).
+
## Syntax
```C
@@ -73,12 +75,14 @@ The versions of these functions with the `_l` suffix are identical except that t
Like the non-secure versions (see [`fprintf`, `_fprintf_l`, `fwprintf`, `_fwprintf_l`](fprintf-fprintf-l-fwprintf-fwprintf-l.md)), these functions validate their parameters and invoke the invalid parameter handler, as described in [Parameter validation](../parameter-validation.md), if either *`stream`* or *`format`* is a null pointer or if there are any unknown or badly formed formatting specifiers. If execution is allowed to continue, the functions return -1 and set `errno` to `EINVAL`.
-### Generic-text routine mappings
+### Generic-text function mappings
+
+The function in the `tchar.h` column maps to the function in the other columns depending on the character set that is defined at compile time.
-| Tchar.h routine | `_UNICODE` and `_MBCS` not defined | `_MBCS` defined | `_UNICODE` defined |
+| `tchar.h` function | `_UNICODE` and `_MBCS` not defined | `_MBCS` defined | `_UNICODE` defined |
|---|---|---|---|
-| `_ftprintf_p` | **`_fprintf_p`** | **`_fprintf_p`** | **`_fwprintf_p`** |
-| `_ftprintf_p_l` | **`_fprintf_p_l`** | **`_fprintf_p_l`** | **`_fwprintf_p_l`** |
+| `_ftprintf_p` | `_fprintf_p` | `_fprintf_p` | `_fwprintf_p` |
+| `_ftprintf_p_l` | `_fprintf_p_l` | `_fprintf_p_l` | `_fwprintf_p_l` |
For more information, see [Format specification syntax](../format-specification-syntax-printf-and-wprintf-functions.md).
@@ -86,8 +90,8 @@ For more information, see [Format specification syntax](../format-specification-
| Function | Required header |
|---|---|
-| **`_fprintf_p`**, **`_fprintf_p_l`** | \ |
-| **`_fwprintf_p`**, **`_fwprintf_p_l`** | \ or \ |
+| `_fprintf_p`, `_fprintf_p_l` | `` |
+| `_fwprintf_p`, `_fwprintf_p_l` | `` or `` |
For more compatibility information, see [Compatibility](../compatibility.md).
diff --git a/docs/c-runtime-library/reference/fprintf-s-fprintf-s-l-fwprintf-s-fwprintf-s-l.md b/docs/c-runtime-library/reference/fprintf-s-fprintf-s-l-fwprintf-s-fwprintf-s-l.md
index 9cdfdff5fc..225ec4abc7 100644
--- a/docs/c-runtime-library/reference/fprintf-s-fprintf-s-l-fwprintf-s-fwprintf-s-l.md
+++ b/docs/c-runtime-library/reference/fprintf-s-fprintf-s-l-fwprintf-s-fwprintf-s-l.md
@@ -1,18 +1,20 @@
---
-description: "Learn more about: fprintf_s, _fprintf_s_l, fwprintf_s, _fwprintf_s_l"
-title: "fprintf_s, _fprintf_s_l, fwprintf_s, _fwprintf_s_l"
+description: "Learn more about: fprintf_s, _fprintf_s_l, fwprintf_s, _fwprintf_s_l, _ftprintf_s, _ftprintf_s_l"
+title: "fprintf_s, _fprintf_s_l, fwprintf_s, _fwprintf_s_l, _ftprintf_s, _ftprintf_s_l"
ms.date: "3/9/2021"
-api_name: ["_fprintf_s_l", "fwprintf_s", "fprintf_s", "_fwprintf_s_l"]
+api_name: ["_fprintf_s_l", "fwprintf_s", "fprintf_s", "_fwprintf_s_l", "_ftprintf_s", "_ftprintf_s_l"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["_ftprintf_s", "fprintf_s", "fwprintf_s"]
-helpviewer_keywords: ["ftprintf_s_l function", "ftprintf_s function", "_fprintf_s_l function", "_ftprintf_s function", "_ftprintf_s_l function", "fwprintf_s_l function", "fwprintf_s function", "fprintf_s_l function", "fprintf_s function", "_fwprintf_s_l function", "print formatted data to streams"]
+f1_keywords: ["_ftprintf_s", "_ftprintf_s_l", "fprintf_s", "fwprintf_s", "_fwprintf_s_l", "_ftprintf", "_ftprintf_l"]
+helpviewer_keywords: ["ftprintf_s_l function", "ftprintf_s function", "_ftprintf_l function", "_fprintf_s_l function", "_ftprintf_s function", "_ftprintf_s_l function", "fwprintf_s_l function", "fwprintf_s function", "fprintf_s_l function", "fprintf_s function", "_fwprintf_s_l function", "_fwprintf_s_l function", "print formatted data to streams"]
---
-# `fprintf_s`, `_fprintf_s_l`, `fwprintf_s`, `_fwprintf_s_l`
+# `fprintf_s`, `_fprintf_s_l`, `fwprintf_s`, `_fwprintf_s_l`, `_ftprintf`, `_ftprintf_l`, `_ftprintf_s`, `_ftprintf_s_l`
Print formatted data to a stream. These functions are versions of [`fprintf`, `_fprintf_l`, `fwprintf`, `_fwprintf_l`](fprintf-fprintf-l-fwprintf-fwprintf-l.md) with security enhancements as described in [Security features in the CRT](../security-features-in-the-crt.md).
+For `_ftprintf_s` and `_ftprintf_s_l`, see [Generic-text function mappings](#generic-text-function-mappings).
+
## Syntax
```C
@@ -69,17 +71,18 @@ The versions of these functions with the **`_l`** suffix are identical except th
> [!IMPORTANT]
> Ensure that *`format`* is not a user-defined string.
>
->
> Starting in Windows 10 version 2004 (build 19041), the `printf` family of functions prints exactly representable floating point numbers according to the IEEE 754 rules for rounding. In previous versions of Windows, exactly representable floating point numbers ending in '5' would always round up. IEEE 754 states that they must round to the closest even digit (also known as "Banker's Rounding"). For example, both `printf("%1.0f", 1.5)` and `printf("%1.0f", 2.5)` should round to 2. Previously, 1.5 would round to 2 and 2.5 would round to 3. This change only affects exactly representable numbers. For example, 2.35 (which, when represented in memory, is closer to 2.35000000000000008) continues to round up to 2.4. Rounding done by these functions now also respects the floating point rounding mode set by [`fesetround`](fegetround-fesetround2.md). Previously, rounding always chose `FE_TONEAREST` behavior. This change only affects programs built using Visual Studio 2019 version 16.2 and later. To use the legacy floating point rounding behavior, link with ['legacy_stdio_float_rounding.obj`](../link-options.md).
Like the non-secure versions (see [`fprintf`, `_fprintf_l`, `fwprintf`, `_fwprintf_l`](fprintf-fprintf-l-fwprintf-fwprintf-l.md)), these functions validate their parameters and invoke the invalid parameter handler, as described in [Parameter validation](../parameter-validation.md), if either *`stream`* or *`format`* is a `NULL` pointer. The format string itself is also validated. If there are any unknown or badly formed formatting specifiers, these functions generate the invalid parameter exception. In all cases, If execution is allowed to continue, the functions return -1 and set `errno` to `EINVAL`. For more information about return codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md).
-### Generic-text routine mappings
+### Generic-text function mappings
+
+The function in the `tchar.h` column maps to the function in the other columns depending on the character set that is defined at compile time.
-| `TCHAR.H` routine | `_UNICODE` and `_MBCS` not defined | `_MBCS` defined | `_UNICODE` defined |
+| `tchar.h` function | `_UNICODE` and `_MBCS` not defined | `_MBCS` defined | `_UNICODE` defined |
|---|---|---|---|
-| **`_ftprintf_s`** | **`fprintf_s`** | **`fprintf_s`** | **`fwprintf_s`** |
-| **`_ftprintf_s_l`** | **`_fprintf_s_l`** | **`_fprintf_s_l`** | **`_fwprintf_s_l`** |
+| `_ftprintf_s` | `fprintf_s` | `fprintf_s` | `fwprintf_s` |
+| `_ftprintf_s_l` | `_fprintf_s_l` | `_fprintf_s_l` | `_fwprintf_s_l` |
For more information, see [Format specification syntax](../format-specification-syntax-printf-and-wprintf-functions.md).
diff --git a/docs/c-runtime-library/reference/fputc-nolock-fputwc-nolock.md b/docs/c-runtime-library/reference/fputc-nolock-fputwc-nolock.md
index b5e7c99d06..ded60efc1b 100644
--- a/docs/c-runtime-library/reference/fputc-nolock-fputwc-nolock.md
+++ b/docs/c-runtime-library/reference/fputc-nolock-fputwc-nolock.md
@@ -1,6 +1,6 @@
---
-description: "Learn more about: _fputc_nolock, _fputwc_nolock"
title: "_fputc_nolock, _fputwc_nolock"
+description: "Learn more about: _fputc_nolock, _fputwc_nolock"
ms.date: "4/2/2020"
api_name: ["_fputwc_nolock", "_fputc_nolock", "_o__fputc_nolock", "_o__fputwc_nolock"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-stdio-l1-1-0.dll"]
@@ -8,11 +8,10 @@ api_type: ["DLLExport"]
topic_type: ["apiref"]
f1_keywords: ["_fputc_nolock", "fputwc_nolock", "fputc_nolock", "fputtc_nolock", "_fputwc_nolock", "_fputtc_nolock"]
helpviewer_keywords: ["streams, writing characters to", "fputwc_nolock function", "fputtc_nolock function", "_fputc_nolock function", "fputc_nolock function", "_fputtc_nolock function", "_fputwc_nolock function"]
-ms.assetid: c63eb3ad-58fa-46d0-9249-9c25f815eab9
---
# `_fputc_nolock`, `_fputwc_nolock`
-Writes a character to a stream without locking the thread.
+Writes a character to a stream without locking.
## Syntax
diff --git a/docs/c-runtime-library/reference/fread-nolock-s2.md b/docs/c-runtime-library/reference/fread-nolock-s2.md
index e2d09bd776..f471494eae 100644
--- a/docs/c-runtime-library/reference/fread-nolock-s2.md
+++ b/docs/c-runtime-library/reference/fread-nolock-s2.md
@@ -1,17 +1,16 @@
---
-description: "Learn more about: _fread_nolock_s"
title: "_fread_nolock_s2"
+description: "Learn more about: _fread_nolock_s"
ms.date: "4/2/2020"
api_name: ["_fread_nolock_s", "_o__fread_nolock_s"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-stdio-l1-1-0.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
f1_keywords: ["_fread_nolock_s", "stdio/_fread_nolock_s"]
-ms.assetid: 5badb9ab-11df-4e17-8162-30bda2a4572e
---
# `_fread_nolock_s`
-Reads data from a stream, without locking other threads. This version of [`fread_nolock`](fread-nolock.md) has security enhancements, as described in [Security features in the CRT](../security-features-in-the-crt.md).
+Reads data from a stream without locking. This version of [`fread_nolock`](fread-nolock.md) has security enhancements, as described in [Security features in the CRT](../security-features-in-the-crt.md).
## Syntax
diff --git a/docs/c-runtime-library/reference/fread-nolock.md b/docs/c-runtime-library/reference/fread-nolock.md
index 33a87a6e60..44f32e0cac 100644
--- a/docs/c-runtime-library/reference/fread-nolock.md
+++ b/docs/c-runtime-library/reference/fread-nolock.md
@@ -1,6 +1,6 @@
---
-description: "Learn more about: _fread_nolock"
title: "_fread_nolock"
+description: "Learn more about: _fread_nolock"
ms.date: "4/2/2020"
api_name: ["_fread_nolock", "_o__fread_nolock"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-stdio-l1-1-0.dll"]
@@ -8,11 +8,10 @@ api_type: ["DLLExport"]
topic_type: ["apiref"]
f1_keywords: ["_fread_nolock", "fread_nolock"]
helpviewer_keywords: ["reading data [C++], from input streams", "data [C++], reading from input stream", "fread_nolock function", "_fread_nolock function", "streams [C++], reading data from"]
-ms.assetid: 60e4958b-1097-46f5-a77b-94af5e7dba40
---
# `_fread_nolock`
-Reads data from a stream, without locking other threads.
+Reads data from a stream without locking.
## Syntax
diff --git a/docs/c-runtime-library/reference/free-dbg.md b/docs/c-runtime-library/reference/free-dbg.md
index c431251202..49f863d551 100644
--- a/docs/c-runtime-library/reference/free-dbg.md
+++ b/docs/c-runtime-library/reference/free-dbg.md
@@ -39,7 +39,7 @@ The **`_free_dbg`** function is a debug version of the [`free`](free.md) functio
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`](../errno-doserrno-sys-errlist-and-sys-nerr.md).
-For information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT debug heap details](/visualstudio/debugger/crt-debug-heap-details). For information about the allocation block types and how they're used, see [Types of blocks on the debug heap](/visualstudio/debugger/crt-debug-heap-details). For information about the differences between calling a standard heap function and the debug version, see [Debug versions of heap allocation functions](/visualstudio/debugger/debug-versions-of-heap-allocation-functions).
+For information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT debug heap details](../crt-debug-heap-details.md). For information about the allocation block types and how they're used, see [Types of blocks on the debug heap](../crt-debug-heap-details.md#types-of-blocks-on-the-debug-heap). For information about the differences between calling a standard heap function and the debug version, see [Debug versions of heap allocation functions](../debug-versions-of-heap-allocation-functions.md).
## Requirements
diff --git a/docs/c-runtime-library/reference/free.md b/docs/c-runtime-library/reference/free.md
index 3bbb2120b1..0e9f412d04 100644
--- a/docs/c-runtime-library/reference/free.md
+++ b/docs/c-runtime-library/reference/free.md
@@ -34,7 +34,7 @@ If an error occurs in freeing the memory, `errno` is set with information from t
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.
-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).
+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](../crt-debug-heap-details.md).
**`free`** is marked `__declspec(noalias)`, meaning that the function is guaranteed not to modify global variables. For more information, see [`noalias`](../../cpp/noalias.md).
diff --git a/docs/c-runtime-library/reference/freea.md b/docs/c-runtime-library/reference/freea.md
index 7b383907e5..1e0aab4f41 100644
--- a/docs/c-runtime-library/reference/freea.md
+++ b/docs/c-runtime-library/reference/freea.md
@@ -41,7 +41,7 @@ If an error occurs in freeing the memory, `errno` is set with information from t
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.
-A call to **`_freea`** must accompany all calls to `_malloca`. It's also an error to call **`_freea`** twice on the same memory. When the application is linked with a debug version of the C run-time libraries, particularly with [`_malloc_dbg`](malloc-dbg.md) features enabled by defining `_CRTDBG_MAP_ALLOC`, it's easier to find missing or duplicated calls to **`_freea`**. For more information about how the heap is managed during the debugging process, see [The CRT debug heap](/visualstudio/debugger/crt-debug-heap-details).
+A call to **`_freea`** must accompany all calls to `_malloca`. It's also an error to call **`_freea`** twice on the same memory. When the application is linked with a debug version of the C run-time libraries, particularly with [`_malloc_dbg`](malloc-dbg.md) features enabled by defining `_CRTDBG_MAP_ALLOC`, it's easier to find missing or duplicated calls to **`_freea`**. For more information about how the heap is managed during the debugging process, see [The CRT debug heap](../crt-debug-heap-details.md).
**`_freea`** is marked `__declspec(noalias)`, meaning that the function is guaranteed not to modify global variables. For more information, see [`noalias`](../../cpp/noalias.md).
diff --git a/docs/c-runtime-library/reference/freopen-wfreopen.md b/docs/c-runtime-library/reference/freopen-wfreopen.md
index 7f4f99c2dc..79b74adb3f 100644
--- a/docs/c-runtime-library/reference/freopen-wfreopen.md
+++ b/docs/c-runtime-library/reference/freopen-wfreopen.md
@@ -1,6 +1,6 @@
---
-description: "Learn more about: freopen, _wfreopen"
title: "freopen, _wfreopen"
+description: "Learn more about: freopen, _wfreopen"
ms.date: "2/23/2021"
api_name: ["freopen", "_wfreopen", "_o__wfreopen", "_o_freopen"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-stdio-l1-1-0.dll"]
@@ -141,4 +141,4 @@ This will go to the file 'freopen.out'
[`_fileno`](fileno.md)\
[`fopen`, `_wfopen`](fopen-wfopen.md)\
[`_open`, `_wopen`](open-wopen.md)\
-[`_setmode`](setmode.md)\
+[`_setmode`](setmode.md)
diff --git a/docs/c-runtime-library/reference/fseek-nolock-fseeki64-nolock.md b/docs/c-runtime-library/reference/fseek-nolock-fseeki64-nolock.md
index 093ec08bc1..9df36b8acd 100644
--- a/docs/c-runtime-library/reference/fseek-nolock-fseeki64-nolock.md
+++ b/docs/c-runtime-library/reference/fseek-nolock-fseeki64-nolock.md
@@ -1,6 +1,6 @@
---
-description: "Learn more about: _fseek_nolock, _fseeki64_nolock"
title: "_fseek_nolock, _fseeki64_nolock"
+description: "Learn more about: _fseek_nolock, _fseeki64_nolock"
ms.date: "4/2/2020"
api_name: ["_fseek_nolock", "_fseeki64_nolock", "_o__fseek_nolock", "_o__fseeki64_nolock"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-stdio-l1-1-0.dll"]
@@ -8,11 +8,10 @@ api_type: ["DLLExport"]
topic_type: ["apiref"]
f1_keywords: ["_fseek_nolock", "_fseeki64_nolock", "fseek_nolock", "fseeki64_nolock"]
helpviewer_keywords: ["_fseek_nolock function", "fseeki64_nolock function", "file pointers [C++], moving", "fseek_nolock function", "_fseeki64_nolock function", "seek file pointers"]
-ms.assetid: 2dd4022e-b715-462b-b935-837561605a02
---
# `_fseek_nolock`, `_fseeki64_nolock`
-Moves the file pointer to a specified location.
+Moves the file pointer to a specified location without locking.
## Syntax
diff --git a/docs/c-runtime-library/reference/fsopen-wfsopen.md b/docs/c-runtime-library/reference/fsopen-wfsopen.md
index 2a36f1e840..5f2c003e22 100644
--- a/docs/c-runtime-library/reference/fsopen-wfsopen.md
+++ b/docs/c-runtime-library/reference/fsopen-wfsopen.md
@@ -1,14 +1,13 @@
---
description: "Learn more about: _fsopen, _wfsopen"
title: "_fsopen, _wfsopen"
-ms.date: "4/2/2020"
+ms.date: 4/27/2023
api_name: ["_wfsopen", "_fsopen", "_o__fsopen", "_o__wfsopen"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-stdio-l1-1-0.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
f1_keywords: ["wfsopen", "fsopen", "tfsopen", "_tfsopen", "_wfsopen", "_fsopen"]
helpviewer_keywords: ["opening files, streams", "fsopen function", "tfsopen function", "wfsopen function", "_fsopen function", "files [C++], opening", "_tfsopen function", "_wfsopen function", "file sharing [C++]"]
-ms.assetid: 5e4502ab-48a9-4bee-a263-ebac8d638dec
---
# `_fsopen`, `_wfsopen`
@@ -69,18 +68,24 @@ When a file is opened with the **"`a`"** or **"`a+`"** access type, all write op
|---|---|
| **`t`** | Opens a file in text (translated) mode. In this mode, carriage return-line feed (CR-LF) combinations are translated into single line feeds (LF) on input and LF characters are translated to CR-LF combinations on output. Also, CTRL+Z is interpreted as an end-of-file character on input. In files opened for reading or reading/writing, **`_fsopen`** checks for a CTRL+Z at the end of the file and removes it, if possible. It's removed because using [`fseek`](fseek-fseeki64.md) and [`ftell`](ftell-ftelli64.md) to move within a file that ends with a CTRL+Z might cause [`fseek`](fseek-fseeki64.md) to behave improperly near the end of the file. |
| **`b`** | Opens a file in binary (untranslated) mode; the above translations are suppressed. |
-| **`S`** | Specifies that caching is optimized for, but not restricted to, sequential access from disk. |
+| **`D`** | Specifies a temporary file that's deleted when the last file pointer to it is closed. |
| **`R`** | Specifies that caching is optimized for, but not restricted to, random access from disk. |
-| **`T`** | Specifies a file as temporary. If possible, it isn't flushed to disk. |
-| **`D`** | Specifies a file as temporary. It's deleted when the last file pointer is closed. |
+| **`S`** | Specifies that caching is optimized for, but not restricted to, sequential access from disk. |
+| **`T`** | Specifies a file that isn't written to disk unless memory pressure requires it. |
If **`t`** or **`b`** isn't given in *`mode`*, the translation mode is defined by the default-mode variable **`_fmode`**. If **`t`** or **`b`** is prefixed to the argument, the function fails and returns `NULL`. For a discussion of text and binary modes, see [Text and binary mode file I/O](../text-and-binary-mode-file-i-o.md).
+Regarding `T` and `D`:
+- `T` avoids writing the file to disk as long as memory pressure doesn't require it. For more information, see `FILE_ATTRIBUTE_TEMPORARY` in [File attribute constants](/windows/win32/fileio/file-attribute-constants), and also this blog post [It's only temporary](/archive/blogs/larryosterman/its-only-temporary).
+- `D` specifies a regular file that is written to disk. The difference is that it's automatically deleted when it's closed.
+You can combine `TD` to get both semantics.
+
+`_fsopen` and `_wfsopen` are Microsoft-specific variants of [`fopen`](fopen-wfopen.md). They aren't part of the ANSI standard. For a more portable and secure function, if you don't require file sharing, consider [`_wfopen_s` or `fopen_s`](fopen-s-wfopen-s.md).
+
The argument *`shflag`* is a constant expression consisting of one of the following manifest constants, defined in `Share.h`.
| Term | Definition |
|---|---|
-| `_SH_COMPAT` | Sets Compatibility mode for 16-bit applications. |
| `_SH_DENYNO` | Permits read and write access. |
| `_SH_DENYRD` | Denies read access to the file. |
| `_SH_DENYRW` | Denies read and write access to the file. |
diff --git a/docs/c-runtime-library/reference/fstat-fstat32-fstat64-fstati64-fstat32i64-fstat64i32.md b/docs/c-runtime-library/reference/fstat-fstat32-fstat64-fstati64-fstat32i64-fstat64i32.md
index c89869526a..41ce094bcc 100644
--- a/docs/c-runtime-library/reference/fstat-fstat32-fstat64-fstati64-fstat32i64-fstat64i32.md
+++ b/docs/c-runtime-library/reference/fstat-fstat32-fstat64-fstati64-fstat32i64-fstat64i32.md
@@ -22,11 +22,11 @@ int _fstat(
);
int _fstat32(
int fd,
- struct __stat32 *buffer
+ struct _stat32 *buffer
);
int _fstat64(
int fd,
- struct __stat64 *buffer
+ struct _stat64 *buffer
);
int _fstati64(
int fd,
@@ -73,7 +73,7 @@ If *`fd`* refers to a device, the **`st_atime`**, **`st_ctime`**, **`st_mtime`**
Because `Stat.h` uses the [`_dev_t`](../standard-types.md) type, which is defined in `Types.h`, you must include `Types.h` before `Stat.h` in your code.
-**`_fstat64`**, which uses the `__stat64` structure, allows file-creation dates to be expressed up through 23:59:59, December 31, 3000, UTC; whereas the other functions only represent dates through 23:59:59 January 18, 2038, UTC. The lower bound of the date range for all these functions is Midnight, January 1, 1970.
+**`_fstat64`**, which uses the `_stat64` structure, allows file-creation dates to be expressed up through 23:59:59, December 31, 3000, UTC; whereas the other functions only represent dates through 23:59:59 January 18, 2038, UTC. The lower bound of the date range for all these functions is Midnight, January 1, 1970.
Variations of these functions support 32-bit or 64-bit time types and 32-bit or 64-bit file lengths. The first numerical suffix (**`32`** or **`64`**) indicates the size of the time type used; the second suffix is either **`i32`** or **`i64`**, indicating whether the file size is represented as a 32-bit or 64-bit integer.
diff --git a/docs/c-runtime-library/reference/ftell-nolock-ftelli64-nolock.md b/docs/c-runtime-library/reference/ftell-nolock-ftelli64-nolock.md
index 1ea776edcf..7b8c51b173 100644
--- a/docs/c-runtime-library/reference/ftell-nolock-ftelli64-nolock.md
+++ b/docs/c-runtime-library/reference/ftell-nolock-ftelli64-nolock.md
@@ -1,6 +1,6 @@
---
-description: "Learn more about: _ftell_nolock, _ftelli64_nolock"
title: "_ftell_nolock, _ftelli64_nolock"
+description: "Learn more about: _ftell_nolock, _ftelli64_nolock"
ms.date: "4/2/2020"
api_name: ["_ftelli64_nolock", "_ftell_nolock", "_o__ftell_nolock", "_o__ftelli64_nolock"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-stdio-l1-1-0.dll"]
@@ -8,11 +8,10 @@ api_type: ["DLLExport"]
topic_type: ["apiref"]
f1_keywords: ["_ftelli64_nolock", "ftelli64_nolock", "ftell_nolock", "_ftell_nolock"]
helpviewer_keywords: ["ftelli64_nolock function", "_ftelli64_nolock function", "_ftell_nolock function", "ftell_nolock function", "file pointers [C++], getting current position"]
-ms.assetid: 84e68b0a-32f8-4c4a-90ad-3f2387685ede
---
# `_ftell_nolock`, `_ftelli64_nolock`
-Gets the current position of a file pointer, without locking the thread.
+Gets the current position of a file pointer without locking.
## Syntax
diff --git a/docs/c-runtime-library/reference/fullpath-dbg-wfullpath-dbg.md b/docs/c-runtime-library/reference/fullpath-dbg-wfullpath-dbg.md
index 40e95fd7f6..e611447e0b 100644
--- a/docs/c-runtime-library/reference/fullpath-dbg-wfullpath-dbg.md
+++ b/docs/c-runtime-library/reference/fullpath-dbg-wfullpath-dbg.md
@@ -63,7 +63,7 @@ Each function returns a pointer to a buffer containing the absolute path name (*
The **`_fullpath_dbg`** and **`_wfullpath_dbg`** functions are identical to `_fullpath` and `_wfullpath` except that, when `_DEBUG` is defined, these functions use the debug version of `malloc`, `_malloc_dbg`, to allocate memory if `NULL` is passed as the first parameter. For information on the debugging features of `_malloc_dbg`, see [`_malloc_dbg`](malloc-dbg.md).
-You don't need to call these functions explicitly in most cases. Instead, you can define the `_CRTDBG_MAP_ALLOC` flag. When `_CRTDBG_MAP_ALLOC` is defined, calls to `_fullpath` and `_wfullpath` are remapped to **`_fullpath_dbg`** and **`_wfullpath_dbg`**, respectively, with the *`blockType`* set to `_NORMAL_BLOCK`. Thus, you don't need to call these functions explicitly unless you want to mark the heap blocks as `_CLIENT_BLOCK`. For more information, see [Types of blocks on the debug heap](/visualstudio/debugger/crt-debug-heap-details).
+You don't need to call these functions explicitly in most cases. Instead, you can define the `_CRTDBG_MAP_ALLOC` flag. When `_CRTDBG_MAP_ALLOC` is defined, calls to `_fullpath` and `_wfullpath` are remapped to **`_fullpath_dbg`** and **`_wfullpath_dbg`**, respectively, with the *`blockType`* set to `_NORMAL_BLOCK`. Thus, you don't need to call these functions explicitly unless you want to mark the heap blocks as `_CLIENT_BLOCK`. For more information, see [Types of blocks on the debug heap](../crt-debug-heap-details.md#types-of-blocks-on-the-debug-heap).
### Generic-text routine mappings
@@ -84,4 +84,4 @@ For more compatibility information, see [Compatibility](../compatibility.md).
[File handling](../file-handling.md)\
[`_fullpath`, `_wfullpath`](fullpath-wfullpath.md)\
-[Debug versions of heap allocation functions](/visualstudio/debugger/debug-versions-of-heap-allocation-functions)
+[Debug versions of heap allocation functions](../debug-versions-of-heap-allocation-functions.md)
diff --git a/docs/c-runtime-library/reference/fwide.md b/docs/c-runtime-library/reference/fwide.md
index f21511e106..71113cfe48 100644
--- a/docs/c-runtime-library/reference/fwide.md
+++ b/docs/c-runtime-library/reference/fwide.md
@@ -1,14 +1,13 @@
---
-description: "Learn more about: fwide"
title: "fwide"
-ms.date: "11/04/2016"
+description: "Learn more about: fwide"
+ms.date: 11/04/2016
api_name: ["fwide"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
f1_keywords: ["fwide"]
helpviewer_keywords: ["fwide function"]
-ms.assetid: a4641f5b-d74f-4946-95d5-53a64610d28d
---
# `fwide`
@@ -19,7 +18,7 @@ Unimplemented.
```C
int fwide(
FILE *stream,
- int mode;
+ int mode
);
```
diff --git a/docs/c-runtime-library/reference/fwrite-nolock.md b/docs/c-runtime-library/reference/fwrite-nolock.md
index 524a968125..1f72d29198 100644
--- a/docs/c-runtime-library/reference/fwrite-nolock.md
+++ b/docs/c-runtime-library/reference/fwrite-nolock.md
@@ -1,6 +1,6 @@
---
-description: "Learn more about: _fwrite_nolock"
title: "_fwrite_nolock"
+description: "Learn more about: _fwrite_nolock"
ms.date: "4/2/2020"
api_name: ["_fwrite_nolock", "_o__fwrite_nolock"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-stdio-l1-1-0.dll"]
@@ -8,11 +8,10 @@ api_type: ["DLLExport"]
topic_type: ["apiref"]
f1_keywords: ["_fwrite_nolock", "fwrite_nolock"]
helpviewer_keywords: ["fwrite_nolock function", "streams, writing data to", "_fwrite_nolock function"]
-ms.assetid: 2b4ec6ce-742e-4615-8407-44a0a18ec1d7
---
# `_fwrite_nolock`
-Writes data to a stream, without locking the thread.
+Writes data to a stream without locking.
## Syntax
diff --git a/docs/c-runtime-library/reference/get-daylight.md b/docs/c-runtime-library/reference/get-daylight.md
index 5778e6cd40..6cba686071 100644
--- a/docs/c-runtime-library/reference/get-daylight.md
+++ b/docs/c-runtime-library/reference/get-daylight.md
@@ -6,7 +6,7 @@ api_name: ["__daylight", "_get_daylight", "_o___daylight", "_o__get_daylight"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-time-l1-1-0.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["get_daylight", "_get_daylight"]
+f1_keywords: ["TIME/_get_daylight", "_get_daylight", "get_daylight", "__daylight"]
helpviewer_keywords: ["get_daylight function", "daylight saving time offset", "_get_daylight function"]
ms.assetid: f85a6ba3-e187-4ca7-aed7-ffc694c8ac4c
---
diff --git a/docs/c-runtime-library/reference/get-timezone.md b/docs/c-runtime-library/reference/get-timezone.md
index 017c4d09ca..9b273ddf65 100644
--- a/docs/c-runtime-library/reference/get-timezone.md
+++ b/docs/c-runtime-library/reference/get-timezone.md
@@ -33,7 +33,7 @@ Zero if successful or an `errno` value if an error occurs.
## Remarks
-The **`_get_timezone`** function retrieves the difference in seconds between UTC and local time as an integer. The default value is 28,800 seconds, for Pacific Standard Time (eight hours behind UTC).
+The **`_get_timezone`** function retrieves the difference in seconds between UTC and local time as an integer. The default value is 28,800 seconds, for Pacific Standard Time (eight hours behind UTC). If you don't want the default value, call _tzset first to initialize the timezone.
If *`seconds`* is `NULL`, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, this function sets `errno` to `EINVAL` and returns `EINVAL`.
diff --git a/docs/c-runtime-library/reference/getc-nolock-getwc-nolock.md b/docs/c-runtime-library/reference/getc-nolock-getwc-nolock.md
index d825ec6c7b..f2ebc85b2a 100644
--- a/docs/c-runtime-library/reference/getc-nolock-getwc-nolock.md
+++ b/docs/c-runtime-library/reference/getc-nolock-getwc-nolock.md
@@ -1,6 +1,6 @@
---
-description: "Learn more about: _getc_nolock, _getwc_nolock"
title: "_getc_nolock, _getwc_nolock"
+description: "Learn more about: _getc_nolock, _getwc_nolock"
ms.date: "4/2/2020"
api_name: ["_getc_nolock", "_getwc_nolock", "_o__getc_nolock", "_o__getwc_nolock"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-stdio-l1-1-0.dll"]
@@ -8,11 +8,10 @@ api_type: ["DLLExport"]
topic_type: ["apiref"]
f1_keywords: ["getc_nolock", "_gettc_nolock", "_getc_nolock", "getwc_nolock", "gettc_nolock", "_getwc_nolock"]
helpviewer_keywords: ["characters, reading", "_getc_nolock function", "_getwc_nolock function", "getwc_nolock function", "streams, reading characters from", "reading characters from streams", "getc_nolock function", "gettc_nolock function", "_gettc_nolock function"]
-ms.assetid: eb37b272-e177-41c9-b077-12ce7ffd3b88
---
# `_getc_nolock`, `_getwc_nolock`
-Reads a character from a stream.
+Reads a character from a stream without locking.
## Syntax
diff --git a/docs/c-runtime-library/reference/getch-getwch.md b/docs/c-runtime-library/reference/getch-getwch.md
index f4108094b5..82d45dd775 100644
--- a/docs/c-runtime-library/reference/getch-getwch.md
+++ b/docs/c-runtime-library/reference/getch-getwch.md
@@ -1,7 +1,7 @@
---
title: "_getch, _getwch"
description: "API reference for _getch and _getwch; which get a character from the console without echo."
-ms.date: "4/2/2020"
+ms.date: "3/8/2023"
api_name: ["_getch", "_getwch", "_o__getch", "_o__getwch"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-conio-l1-1-0.dll"]
api_type: ["DLLExport"]
@@ -29,7 +29,7 @@ Returns the character read. There's no error return.
## Remarks
-The **`_getch`** and **`_getwch`** functions read a single character from the console without echoing the character. None of these functions can be used to read CTRL+C. To read a function key or arrow key, each function must be called twice. The first call returns `0` or `0xE0`. The second call returns the [key scan code](/previous-versions/visualstudio/visual-studio-6.0/aa299374(v=vs.60)).
+The **`_getch`** and **`_getwch`** functions read a single character from the console without echoing the character. To read a function key or arrow key, each function must be called twice. The first call returns `0` or `0xE0`. The second call returns the [key scan code](/previous-versions/visualstudio/visual-studio-6.0/aa299374(v=vs.60)).
These functions lock the calling thread and so are thread-safe. For non-locking versions, see [`_getch_nolock`, `_getwch_nolock`](getch-nolock-getwch-nolock.md).
diff --git a/docs/c-runtime-library/reference/getch-nolock-getwch-nolock.md b/docs/c-runtime-library/reference/getch-nolock-getwch-nolock.md
index 8c9b4a8a32..61bf1a4ace 100644
--- a/docs/c-runtime-library/reference/getch-nolock-getwch-nolock.md
+++ b/docs/c-runtime-library/reference/getch-nolock-getwch-nolock.md
@@ -1,6 +1,6 @@
---
title: "_getch_nolock, _getwch_nolock"
-description: "API reference for _getch_nolock, and _getwch_nolock; which get a character from the console without echo and without locking the thread."
+description: "Learn more about: _getch_nolock, _getwch_nolock"
ms.date: "4/2/2020"
api_name: ["_getwch_nolock", "_getch_nolock", "_o__getch_nolock", "_o__getwch_nolock"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-conio-l1-1-0.dll"]
@@ -8,11 +8,10 @@ api_type: ["DLLExport"]
topic_type: ["apiref"]
f1_keywords: ["_getch_nolock", "getwch_nolock", "getch_nolock", "_getwch_nolock", "_gettch_nolock", "gettch_nolock"]
helpviewer_keywords: ["characters, getting from console", "_getwch_nolock function", "_getch_nolock function", "getwch_nolock function", "_gettch_nolock function", "console, reading from", "getch_nolock function", "gettch_nolock function"]
-ms.assetid: 9d248546-26ca-482c-b0c6-55812a987e83
---
# `_getch_nolock`, `_getwch_nolock`
-Gets a character from the console without echo and without locking the thread.
+Gets a character from the console without echo and without locking.
> [!IMPORTANT]
> This API cannot be used in applications that execute in the Windows Runtime. For more information, see [CRT functions not supported in Universal Windows Platform apps](../../cppcx/crt-functions-not-supported-in-universal-windows-platform-apps.md).
diff --git a/docs/c-runtime-library/reference/getchar-nolock-getwchar-nolock.md b/docs/c-runtime-library/reference/getchar-nolock-getwchar-nolock.md
index aaf8bcf23a..2aba163479 100644
--- a/docs/c-runtime-library/reference/getchar-nolock-getwchar-nolock.md
+++ b/docs/c-runtime-library/reference/getchar-nolock-getwchar-nolock.md
@@ -1,6 +1,6 @@
---
-description: "Learn more about: _getchar_nolock, _getwchar_nolock"
title: "_getchar_nolock, _getwchar_nolock"
+description: "Learn more about: _getchar_nolock, _getwchar_nolock"
ms.date: "11/04/2016"
api_name: ["_getchar_nolock", "_getwchar_nolock"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll"]
@@ -8,11 +8,10 @@ api_type: ["DLLExport"]
topic_type: ["apiref"]
f1_keywords: ["getwchar_nolock", "_getwchar_nolock", "_getchar_nolock", "getchar_nolock"]
helpviewer_keywords: ["_getwchar_nolock function", "getwchar_nolock function", "characters, reading", "_getchar_nolock function", "getchar_nolock function", "standard input, reading from"]
-ms.assetid: dc49ba60-0647-4ae9-aa9a-a0618b1666de
---
# `_getchar_nolock`, `_getwchar_nolock`
-Reads a character from standard input.
+Reads a character from the standard input without locking.
## Syntax
diff --git a/docs/c-runtime-library/reference/getche-nolock-getwche-nolock.md b/docs/c-runtime-library/reference/getche-nolock-getwche-nolock.md
index 821f722335..c9c6b7ad6f 100644
--- a/docs/c-runtime-library/reference/getche-nolock-getwche-nolock.md
+++ b/docs/c-runtime-library/reference/getche-nolock-getwche-nolock.md
@@ -1,6 +1,6 @@
---
title: "_getche_nolock, _getwche_nolock"
-description: "API reference for _getche_nolock, and _getwche_nolock; which gets a character from the console, with echo and without locking the thread."
+description: "Learn more about: _getche_nolock, _getwche_nolock"
ms.date: "4/2/2020"
api_name: ["_getche_nolock", "_getwche_nolock", "_o__getche_nolock", "_o__getwche_nolock"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-conio-l1-1-0.dll"]
@@ -8,11 +8,10 @@ api_type: ["DLLExport"]
topic_type: ["apiref"]
f1_keywords: ["_getche_nolock", "_gettche_nolock", "_getwche_nolock", "getche_nolock", "getwche_nolock", "gettche_nolock"]
helpviewer_keywords: ["characters, getting from console", "_gettche_nolock function", "getwche_nolock function", "_getche_nolock function", "getche_nolock function", "console, reading from", "_getwche_nolock function", "gettche_nolock function"]
-ms.assetid: 9e853ad4-4d8a-4442-9ae5-da4b434f0b8c
---
# `_getche_nolock`, `_getwche_nolock`
-Gets a character from the console, with echo and without locking the thread.
+Gets a character from the console with echo and without locking.
> [!IMPORTANT]
> This API cannot be used in applications that execute in the Windows Runtime. For more information, see [CRT functions not supported in Universal Windows Platform apps](../../cppcx/crt-functions-not-supported-in-universal-windows-platform-apps.md).
diff --git a/docs/c-runtime-library/reference/getcwd-dbg-wgetcwd-dbg.md b/docs/c-runtime-library/reference/getcwd-dbg-wgetcwd-dbg.md
index d156f0fd4a..1a9d43dc61 100644
--- a/docs/c-runtime-library/reference/getcwd-dbg-wgetcwd-dbg.md
+++ b/docs/c-runtime-library/reference/getcwd-dbg-wgetcwd-dbg.md
@@ -60,7 +60,7 @@ For more information, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`
The **`_getcwd_dbg`** and **`_wgetcwd_dbg`** functions are identical to `_getcwd` and `_wgetcwd` except that, when `_DEBUG` is defined, these functions use the debug version of `malloc` and `_malloc_dbg` to allocate memory if `NULL` is passed as the first parameter. For more information, see [`_malloc_dbg`](malloc-dbg.md).
-You don't need to call these functions explicitly in most cases. Instead, you can define the `_CRTDBG_MAP_ALLOC` flag. When `_CRTDBG_MAP_ALLOC` is defined, calls to `_getcwd` and `_wgetcwd` are remapped to **`_getcwd_dbg`** and **`_wgetcwd_dbg`**, respectively, with the *`blockType`* set to `_NORMAL_BLOCK`. Thus, you don't need to call these functions explicitly unless you want to mark the heap blocks as `_CLIENT_BLOCK`. For more information, see [Types of blocks on the debug heap](/visualstudio/debugger/crt-debug-heap-details).
+You don't need to call these functions explicitly in most cases. Instead, you can define the `_CRTDBG_MAP_ALLOC` flag. When `_CRTDBG_MAP_ALLOC` is defined, calls to `_getcwd` and `_wgetcwd` are remapped to **`_getcwd_dbg`** and **`_wgetcwd_dbg`**, respectively, with the *`blockType`* set to `_NORMAL_BLOCK`. Thus, you don't need to call these functions explicitly unless you want to mark the heap blocks as `_CLIENT_BLOCK`. For more information, see [Types of blocks on the debug heap](../crt-debug-heap-details.md#types-of-blocks-on-the-debug-heap).
## Generic-text routine mapping
@@ -81,4 +81,4 @@ For more compatibility information, see [Compatibility](../compatibility.md).
[`_getcwd`, `_wgetcwd`](getcwd-wgetcwd.md)\
[Directory control](../directory-control.md)\
-[Debug versions of heap allocation functions](/visualstudio/debugger/debug-versions-of-heap-allocation-functions)
+[Debug versions of heap allocation functions](../debug-versions-of-heap-allocation-functions.md)
diff --git a/docs/c-runtime-library/reference/getdcwd-dbg-wgetdcwd-dbg.md b/docs/c-runtime-library/reference/getdcwd-dbg-wgetdcwd-dbg.md
index 1ecae36fed..4f3d1b56f7 100644
--- a/docs/c-runtime-library/reference/getdcwd-dbg-wgetdcwd-dbg.md
+++ b/docs/c-runtime-library/reference/getdcwd-dbg-wgetdcwd-dbg.md
@@ -63,7 +63,7 @@ Returns a pointer to *`buffer`*. A `NULL` return value indicates an error, and `
The **`_getdcwd_dbg`** and **`_wgetdcwd_dbg`** functions are identical to `_getdcwd` and `_wgetdcwd` except that, when `_DEBUG` is defined, these functions use the debug version of `malloc` and `_malloc_dbg` to allocate memory if `NULL` is passed as the *`buffer`* parameter. For more information, see [`_malloc_dbg`](malloc-dbg.md).
-You don't need to call these functions explicitly in most cases. Instead, you can define the `_CRTDBG_MAP_ALLOC` flag. When `_CRTDBG_MAP_ALLOC` is defined, calls to `_getdcwd` and `_wgetdcwd` are remapped to **`_getdcwd_dbg`** and **`_wgetdcwd_dbg`**, respectively, with the *`blockType`* set to `_NORMAL_BLOCK`. Thus, you don't need to call these functions explicitly unless you want to mark the heap blocks as `_CLIENT_BLOCK`. For more information, see [Types of blocks on the debug heap](/visualstudio/debugger/crt-debug-heap-details).
+You don't need to call these functions explicitly in most cases. Instead, you can define the `_CRTDBG_MAP_ALLOC` flag. When `_CRTDBG_MAP_ALLOC` is defined, calls to `_getdcwd` and `_wgetdcwd` are remapped to **`_getdcwd_dbg`** and **`_wgetdcwd_dbg`**, respectively, with the *`blockType`* set to `_NORMAL_BLOCK`. Thus, you don't need to call these functions explicitly unless you want to mark the heap blocks as `_CLIENT_BLOCK`. For more information, see [Types of blocks on the debug heap](../crt-debug-heap-details.md#types-of-blocks-on-the-debug-heap).
### Generic-text routine mappings
@@ -84,4 +84,4 @@ For more compatibility information, see [Compatibility](../compatibility.md).
[`_getdcwd`, `_wgetdcwd`](getdcwd-wgetdcwd.md)\
[Directory control](../directory-control.md)\
-[Debug versions of heap allocation functions](/visualstudio/debugger/debug-versions-of-heap-allocation-functions)
+[Debug versions of heap allocation functions](../debug-versions-of-heap-allocation-functions.md)
diff --git a/docs/c-runtime-library/reference/getdcwd-nolock-wgetdcwd-nolock.md b/docs/c-runtime-library/reference/getdcwd-nolock-wgetdcwd-nolock.md
index 1ee8358edb..b186869ad1 100644
--- a/docs/c-runtime-library/reference/getdcwd-nolock-wgetdcwd-nolock.md
+++ b/docs/c-runtime-library/reference/getdcwd-nolock-wgetdcwd-nolock.md
@@ -1,6 +1,6 @@
---
-description: "Learn more about: _getdcwd_nolock, _wgetdcwd_nolock"
title: "_getdcwd_nolock, _wgetdcwd_nolock"
+description: "Learn more about: _getdcwd_nolock, _wgetdcwd_nolock"
ms.date: "11/04/2016"
api_name: ["_wgetdcwd_nolock", "_getdcwd_nolock"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll"]
@@ -8,7 +8,6 @@ api_type: ["DLLExport"]
topic_type: ["apiref"]
f1_keywords: ["_wgetdcwd_nolock", "tgetdcwd_nolock", "wgetdcwd_nolock", "_getdcwd_nolock", "_tgetdcwd_nolock", "getdcwd_nolock"]
helpviewer_keywords: ["getdcwd_nolock function", "_tgetdcwd_nolock function", "working directory", "tgetdcwd_nolock function", "_getdcwd_nolock function", "current working directory", "wgetdcwd_nolock function", "_wgetdcwd_nolock function", "directories [C++], current working"]
-ms.assetid: d9bdf712-43f8-4173-8f9a-844e82beaa97
---
# `_getdcwd_nolock`, `_wgetdcwd_nolock`
diff --git a/docs/c-runtime-library/reference/gmtime-gmtime32-gmtime64.md b/docs/c-runtime-library/reference/gmtime-gmtime32-gmtime64.md
index 4baf83e371..1d0656b3f7 100644
--- a/docs/c-runtime-library/reference/gmtime-gmtime32-gmtime64.md
+++ b/docs/c-runtime-library/reference/gmtime-gmtime32-gmtime64.md
@@ -1,7 +1,7 @@
---
title: "gmtime, _gmtime32, _gmtime64"
description: "API reference for gmtime, _gmtime32, and _gmtime64, which convert a time_t value."
-ms.date: "10/27/2020"
+ms.date: 02/23/2024
api_name: ["_gmtime32", "gmtime", "_gmtime64", "_o__gmtime32", "_o__gmtime64"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-time-l1-1-0.dll"]
api_type: ["DLLExport"]
@@ -54,9 +54,6 @@ These functions validate their parameters. If *`sourceTime`* is a `NULL` pointer
The **`_gmtime32`** function breaks down the *`sourceTime`* value and stores it in a statically allocated structure of type `tm`, defined in `TIME.H`. The value of *`sourceTime`* is typically obtained from a call to the [`time`](time-time32-time64.md) function.
-> [!NOTE]
-> In most cases, the target environment tries to determine whether daylight savings time is in effect. The C run-time library assumes that the United States rules for implementing the calculation of Daylight Saving Time (DST) are used.
-
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).
## Requirements
diff --git a/docs/c-runtime-library/reference/gmtime-s-gmtime32-s-gmtime64-s.md b/docs/c-runtime-library/reference/gmtime-s-gmtime32-s-gmtime64-s.md
index 7db288694f..9151701714 100644
--- a/docs/c-runtime-library/reference/gmtime-s-gmtime32-s-gmtime64-s.md
+++ b/docs/c-runtime-library/reference/gmtime-s-gmtime32-s-gmtime64-s.md
@@ -1,7 +1,7 @@
---
description: "Learn more about: gmtime_s, _gmtime32_s, _gmtime64_s"
title: "gmtime_s, _gmtime32_s, _gmtime64_s"
-ms.date: "4/2/2020"
+ms.date: 02/23/2024
api_name: ["_gmtime32_s", "gmtime_s", "_gmtime64_s", "_o__gmtime32_s", "_o__gmtime64_s"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-time-l1-1-0.dll"]
api_type: ["DLLExport"]
@@ -56,9 +56,6 @@ The first two error conditions invoke the invalid parameter handler, as describe
The **`_gmtime32_s`** function breaks down the *`sourceTime`* value and stores it in a structure of type `tm`, defined in `Time.h`. The address of the structure is passed in *`tmDest`*. The value of *`sourceTime`* is often obtained from a call to the [`time`](time-time32-time64.md) function.
-> [!NOTE]
-> The target environment should try to determine whether daylight savings time is in effect. The C run-time library assumes the United States rules for implementing the calculation of daylight saving time .
-
Each of the structure fields is of type **`int`**, as shown in the following table.
| Field | Description |
diff --git a/docs/c-runtime-library/reference/heapchk.md b/docs/c-runtime-library/reference/heapchk.md
index 589d119aef..4e77c83690 100644
--- a/docs/c-runtime-library/reference/heapchk.md
+++ b/docs/c-runtime-library/reference/heapchk.md
@@ -1,6 +1,6 @@
---
-description: "Learn more about: _heapchk"
title: "_heapchk"
+description: "Learn more about: _heapchk"
ms.date: "4/2/2020"
api_name: ["_heapchk", "_o__heapchk"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-heap-l1-1-0.dll"]
@@ -8,7 +8,6 @@ api_type: ["DLLExport"]
topic_type: ["apiref"]
f1_keywords: ["_heapchk", "heapchk"]
helpviewer_keywords: ["debugging [CRT], heap-related problems", "consistency checking of heaps", "heapchk function", "heaps, checking consistency", "_heapchk function"]
-ms.assetid: 859619a5-1e35-4f02-9e09-11d9fa266ec0
---
# `_heapchk`
@@ -36,7 +35,7 @@ In addition, if an error occurs, **`_heapchk`** sets `errno` to `ENOSYS`.
## Remarks
-The **`_heapchk`** function helps debug heap-related problems by checking for minimal consistency of the heap. If the operating system doesn't support **`_heapchk`**(for example, Windows 98), the function returns `_HEAPOK` and sets `errno` to `ENOSYS`.
+The **`_heapchk`** function helps debug heap-related problems by checking for minimal consistency of the heap. If the operating system doesn't support **`_heapchk`** (for example, Windows 98), the function returns `_HEAPOK` and sets `errno` to `ENOSYS`.
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).
diff --git a/docs/c-runtime-library/reference/heapmin.md b/docs/c-runtime-library/reference/heapmin.md
index ffee2908c1..f5f5e5671a 100644
--- a/docs/c-runtime-library/reference/heapmin.md
+++ b/docs/c-runtime-library/reference/heapmin.md
@@ -1,6 +1,6 @@
---
-description: "Learn more about: _heapmin"
title: "_heapmin"
+description: "Learn more about: _heapmin"
ms.date: "4/2/2020"
api_name: ["_heapmin", "_o__heapmin"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-heap-l1-1-0.dll"]
@@ -8,7 +8,6 @@ api_type: ["DLLExport"]
topic_type: ["apiref"]
f1_keywords: ["_heapmin", "heapmin"]
helpviewer_keywords: ["heap memory", "minimizing heaps", "memory, releasing", "heaps, releasing unused memory", "_heapmin function", "heapmin function"]
-ms.assetid: c0bccdf6-2d14-4d7b-a7ff-d6a17bdb410f
---
# `_heapmin`
@@ -28,7 +27,7 @@ For more information about this and other return codes, see [`errno`, `_doserrno
## Remarks
-The **`_heapmin`** function minimizes the heap by releasing unused heap memory to the operating system. If the operating system doesn't support **`_heapmin`**(for example, Windows 98), the function returns -1 and sets `errno` to `ENOSYS`.
+The **`_heapmin`** function minimizes the heap by releasing unused heap memory to the operating system. If the operating system doesn't support **`_heapmin`** (for example, Windows 98), the function returns -1 and sets `errno` to `ENOSYS`.
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).
diff --git a/docs/c-runtime-library/reference/initterm-initterm-e.md b/docs/c-runtime-library/reference/initterm-initterm-e.md
index 27ef43bc02..3063706706 100644
--- a/docs/c-runtime-library/reference/initterm-initterm-e.md
+++ b/docs/c-runtime-library/reference/initterm-initterm-e.md
@@ -25,8 +25,8 @@ void __cdecl _initterm(
);
int __cdecl _initterm_e(
- PVFV *,
- PVFV *
+ PIFV *,
+ PIFV *
);
```
diff --git a/docs/c-runtime-library/reference/islower-iswlower-islower-l-iswlower-l.md b/docs/c-runtime-library/reference/islower-iswlower-islower-l-iswlower-l.md
index 02dded213e..f95d12c979 100644
--- a/docs/c-runtime-library/reference/islower-iswlower-islower-l-iswlower-l.md
+++ b/docs/c-runtime-library/reference/islower-iswlower-islower-l-iswlower-l.md
@@ -1,14 +1,13 @@
---
-description: "Learn more about: islower, iswlower, _islower_l, _iswlower_l"
title: "islower, iswlower, _islower_l, _iswlower_l"
-ms.date: "4/2/2020"
+description: "Learn more about: islower, iswlower, _islower_l, _iswlower_l"
+ms.date: 4/2/2020
api_name: ["iswlower", "_islower_l", "islower", "_iswlower_l", "_o_islower", "_o_iswlower"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-string-l1-1-0.dll", "ntoskrnl.exe"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
f1_keywords: ["_istlower", "islower", "_ismbclower_l", "_liswlower_l", "_istlower_l", "_iswlower_l", "_islower _l", "_islower_l", "iswlower"]
helpviewer_keywords: ["_islower _l function", "_ismbclower_l function", "islower function", "_iswlower_l function", "_liswlower_l function", "_istlower_l function", "istlower function", "_istlower function", "iswlower function", "_islower_l function"]
-ms.assetid: fcc3b70a-2b47-45fd-944d-e5c1942e6457
---
# `islower`, `iswlower`, `_islower_l`, `_iswlower_l`
@@ -54,7 +53,7 @@ The behavior of **`islower`** and **`_islower_l`** is undefined if *`c`* isn't E
| TCHAR.H routine | `_UNICODE` and `_MBCS` not defined | `_MBCS` defined | `_UNICODE` defined |
|---|---|---|---|
| `_istlower` | **`islower`** | [`_ismbclower`](ismbclower-ismbclower-l-ismbcupper-ismbcupper-l.md) | **`iswlower`** |
-| **`_istlower_l`** | `_islower _l` | [`_ismbclower_l`](ismbclower-ismbclower-l-ismbcupper-ismbcupper-l.md) | **`_liswlower_l`** |
+| **`_istlower_l`** | `_islower_l` | [`_ismbclower_l`](ismbclower-ismbclower-l-ismbcupper-ismbcupper-l.md) | **`_liswlower_l`** |
## Remarks
@@ -64,10 +63,10 @@ By default, this function's global state is scoped to the application. To change
| Routine | Required header |
|---|---|
-| **`islower`** | \ |
-| **`iswlower`** | \ or \ |
-| **`_islower_l`** | \ |
-| **`_swlower_l`** | \ or \ |
+| **`islower`** | `` |
+| **`iswlower`** | `` or `` |
+| **`_islower_l`** | `` |
+| **`_swlower_l`** | `` or `` |
For more compatibility information, see [Compatibility](../compatibility.md).
diff --git a/docs/c-runtime-library/reference/itoa-itow.md b/docs/c-runtime-library/reference/itoa-itow.md
index 48046135b6..1f03714208 100644
--- a/docs/c-runtime-library/reference/itoa-itow.md
+++ b/docs/c-runtime-library/reference/itoa-itow.md
@@ -8,7 +8,6 @@ api_type: ["DLLExport"]
topic_type: ["apiref"]
f1_keywords: ["_itoa", "_ltoa", "_ultoa", "_i64toa", "_ui64toa", "_itow", "_ltow", "_ultow", "_i64tow", "_ui64tow", "itoa", "ltoa", "ultoa", "i64toa", "ui64toa", "itow", "ltow", "ultow", "i64tow", "ui64tow", "itot", "_itot", "ltot", "_ltot", "ultot", "_ultot", "i64tot", "_i64tot", "ui64tot", "_ui64tot", "_MAX_ITOSTR_BASE16_COUNT", "_MAX_ITOSTR_BASE10_COUNT", "_MAX_ITOSTR_BASE8_COUNT", "_MAX_ITOSTR_BASE2_COUNT", "_MAX_LTOSTR_BASE16_COUNT", "_MAX_LTOSTR_BASE10_COUNT", "_MAX_LTOSTR_BASE8_COUNT", "_MAX_LTOSTR_BASE2_COUNT", "_MAX_ULTOSTR_BASE16_COUNT", "_MAX_ULTOSTR_BASE10_COUNT", "_MAX_ULTOSTR_BASE8_COUNT", "_MAX_ULTOSTR_BASE2_COUNT", "_MAX_I64TOSTR_BASE16_COUNT", "_MAX_I64TOSTR_BASE10_COUNT", "_MAX_I64TOSTR_BASE8_COUNT", "_MAX_I64TOSTR_BASE2_COUNT", "_MAX_U64TOSTR_BASE16_COUNT", "_MAX_U64TOSTR_BASE10_COUNT", "_MAX_U64TOSTR_BASE8_COUNT", "_MAX_U64TOSTR_BASE2_COUNT"]
helpviewer_keywords: ["_itot function", "ui64toa function", "_ui64toa function", "converting integers", "itot function", "_i64tow function", "_i64toa function", "_itow function", "ui64tow function", "integers, converting", "itoa function", "_ui64tow function", "i64tow function", "itow function", "i64toa function", "converting numbers, to strings", "_itoa function"]
-ms.assetid: 46592a00-77bb-4e73-98c0-bf629d96cea6
---
# `itoa`, `_itoa`, `ltoa`, `_ltoa`, `ultoa`, `_ultoa`, `_i64toa`, `_ui64toa`, `_itow`, `_ltow`, `_ultow`, `_i64tow`, `_ui64tow`
@@ -137,7 +136,7 @@ This example uses a conversion count macro to define a buffer large enough to co
int main()
{
wchar_t buffer[_MAX_U64TOSTR_BASE2_COUNT];
- std:wcout << _ui64tow(0xFFFFFFFFFFFFFFFFull, buffer, 2) << std::endl;
+ std::wcout << _ui64tow(0xFFFFFFFFFFFFFFFFull, buffer, 2) << std::endl;
}
```
diff --git a/docs/c-runtime-library/reference/kbhit.md b/docs/c-runtime-library/reference/kbhit.md
index e4f1f9cfb7..3d89e65caa 100644
--- a/docs/c-runtime-library/reference/kbhit.md
+++ b/docs/c-runtime-library/reference/kbhit.md
@@ -1,6 +1,6 @@
---
-description: "Learn more about: _kbhit"
title: "_kbhit"
+description: "Learn more about: _kbhit"
ms.date: "4/2/2020"
api_name: ["_kbhit", "_o__kbhit"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-stdio-l1-1-0.dll"]
@@ -8,7 +8,6 @@ api_type: ["DLLExport"]
topic_type: ["apiref"]
f1_keywords: ["_kbhit", "conio/_kbhit"]
helpviewer_keywords: ["keyboard input", "user input, checking for keyboard", "kbhit function", "console", "console, checking", "keyboards, keyboard input", "_kbhit function", "keyboards, checking input"]
-ms.assetid: e82a1cc9-bbec-4150-b678-a7e433220fe4
---
# `_kbhit`
@@ -20,7 +19,6 @@ Checks the console for keyboard input.
## Syntax
```C
-
int _kbhit( void );
```
diff --git a/docs/c-runtime-library/reference/log-logf-log10-log10f.md b/docs/c-runtime-library/reference/log-logf-log10-log10f.md
index 475f466870..4ff277f7b0 100644
--- a/docs/c-runtime-library/reference/log-logf-log10-log10f.md
+++ b/docs/c-runtime-library/reference/log-logf-log10-log10f.md
@@ -122,9 +122,9 @@ Log base 2 of 65536.000000 is 16.000000
## See also
-[Math and floating-point support](../floating-point-support.md) \
-[`exp`, `expf`, `expl`](exp-expf.md) \
-[`_matherr`](matherr.md) \
-[`pow`, `powf`, `powl`](pow-powf-powl.md) \
-[`_CIlog`](../cilog.md) \
-[`_CIlog10`](../cilog10.md)\
+[Math and floating-point support](../floating-point-support.md)\
+[`exp`, `expf`, `expl`](exp-expf.md)\
+[`_matherr`](matherr.md)\
+[`pow`, `powf`, `powl`](pow-powf-powl.md)\
+[`_CIlog`](../cilog.md)\
+[`_CIlog10`](../cilog10.md)
diff --git a/docs/c-runtime-library/reference/log1p-log1pf-log1pl2.md b/docs/c-runtime-library/reference/log1p-log1pf-log1pl2.md
index 9463d7bc03..4b73bb4062 100644
--- a/docs/c-runtime-library/reference/log1p-log1pf-log1pl2.md
+++ b/docs/c-runtime-library/reference/log1p-log1pf-log1pl2.md
@@ -1,14 +1,13 @@
---
title: "log1p, log1pf, log1pl2"
description: "API reference for log1p, log1pf, log1pl2; which compute the natural logarithm of 1 plus the specified value."
-ms.date: "9/1/2020"
+ms.date: "2/1/2023"
api_name: ["log1p", "log1pf", "log1pl", "_o_log1p", "_o_log1pf", "_o_log1pl"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-math-l1-1-0.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
f1_keywords: ["log1p", "log1pf", "log1pl", "math/log1p", "math/log1pf", "math/log1pl"]
helpviewer_keywords: ["log1p function", "log1pf function", "log1pl function"]
-ms.assetid: a40d965d-b4f6-42f4-ba27-2395546f7c12
---
# `log1p`, `log1pf`, `log1pl`
@@ -17,25 +16,14 @@ Computes the natural logarithm of 1 plus the specified value.
## Syntax
```C
-double log1p(
- double x
-);
-float log1pf(
- float x
-);
-long double log1pl(
- long double x
-);
+double log1p(double x);
+float log1pf(float x);
+long double log1pl(long double x);
#define log1p(X) // Requires C11 or higher
-float log1p(
- float x
-); //C++ only
-
-long double log1p(
- long double x
-); //C++ only
+float log1p(float x); //C++ only
+long double log1p(long double x); //C++ only
```
### Parameters
@@ -68,9 +56,9 @@ The **`log1p`** functions may be more accurate than using `log(x + 1)` when *`x`
Because C++ allows overloading, you can call overloads of **`log1p`** that take and return **`float`** and **`long double`** types. In a C program, unless you're using the \ macro to call this function, **`log1p`** always takes and returns a **`double`**.
-If you use the \ `log1p()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../tgmath.md) for details.
+If you use the `` `log1p()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../tgmath.md) for details.
-If *`x`* is a natural number, this function returns the logarithm of the factorial of (*`x`* - 1).
+Where *`x`* is a natural number, this function returns the base e logarithm of *`x`* + 1.
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).
@@ -78,8 +66,8 @@ By default, this function's global state is scoped to the application. To change
| Function | C header | C++ header |
|---|---|---|
-| **`log1p`**, **`log1pf`**, **`log1pl`** | \ | \ |
-| **`log1p`** macro | \ | |
+| **`log1p`**, **`log1pf`**, **`log1pl`** | `` | `` |
+| **`log1p`** macro | `` | |
For more compatibility information, see [Compatibility](../compatibility.md).
diff --git a/docs/c-runtime-library/reference/longjmp.md b/docs/c-runtime-library/reference/longjmp.md
index e94b1110c1..da78b65d11 100644
--- a/docs/c-runtime-library/reference/longjmp.md
+++ b/docs/c-runtime-library/reference/longjmp.md
@@ -1,6 +1,6 @@
---
-description: "Learn more about: longjmp"
title: "longjmp"
+description: "Learn more about: longjmp"
ms.date: "1/14/2021"
api_name: ["longjmp"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "ntoskrnl.exe"]
@@ -8,7 +8,6 @@ api_type: ["DLLExport"]
topic_type: ["apiref"]
f1_keywords: ["longjmp"]
helpviewer_keywords: ["restoring stack environment and execution locale", "longjmp function"]
-ms.assetid: 0e13670a-5130-45c1-ad69-6862505b7a2f
---
# `longjmp`
@@ -75,5 +74,5 @@ See the example for [`_fpreset`](fpreset.md).
## See also
-[Process and environment control](../process-and-environment-control.md)
+[Process and environment control](../process-and-environment-control.md)\
[`setjmp`](setjmp.md)
diff --git a/docs/c-runtime-library/reference/malloc-dbg.md b/docs/c-runtime-library/reference/malloc-dbg.md
index be297575b4..9de32b3c52 100644
--- a/docs/c-runtime-library/reference/malloc-dbg.md
+++ b/docs/c-runtime-library/reference/malloc-dbg.md
@@ -53,7 +53,7 @@ On successful completion, this function returns a pointer to the user portion of
**`_malloc_dbg`** sets `errno` to `ENOMEM` if a memory allocation fails or if the amount of memory needed (including the overhead mentioned previously) exceeds `_HEAP_MAXREQ`. For information about this and other error codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md).
-For information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT debug heap details](/visualstudio/debugger/crt-debug-heap-details). For information about the allocation block types and how they're used, see [Types of blocks on the debug heap](/visualstudio/debugger/crt-debug-heap-details). For information about the differences between standard heap functions and debug versions, see [Debug versions of heap allocation functions](/visualstudio/debugger/debug-versions-of-heap-allocation-functions).
+For information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT debug heap details](../crt-debug-heap-details.md). For information about the allocation block types and how they're used, see [Types of blocks on the debug heap](../crt-debug-heap-details.md#types-of-blocks-on-the-debug-heap). For information about the differences between standard heap functions and debug versions, see [Debug versions of heap allocation functions](../debug-versions-of-heap-allocation-functions.md).
## Requirements
diff --git a/docs/c-runtime-library/reference/malloc.md b/docs/c-runtime-library/reference/malloc.md
index c9590f0be7..959948becb 100644
--- a/docs/c-runtime-library/reference/malloc.md
+++ b/docs/c-runtime-library/reference/malloc.md
@@ -90,7 +90,7 @@ The startup code uses **`malloc`** to allocate storage for the **`_environ`**, *
The C++ [`_set_new_mode`](set-new-mode.md) function sets the new handler mode for **`malloc`**. The new handler mode indicates whether, on failure, **`malloc`** is to call the new handler routine as set by [`_set_new_handler`](set-new-handler.md). By default, **`malloc`** doesn't call the new handler routine on failure to allocate memory. You can override this default behavior so that, when **`malloc`** fails to allocate memory, **`malloc`** 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 `_set_new_mode(1)` early in your program, or link with `NEWMODE.OBJ` (see [Link options](../link-options.md)).
-When the application is linked with a debug version of the C run-time libraries, **`malloc`** resolves to [`_malloc_dbg`](malloc-dbg.md). For more information about how the heap is managed during the debugging process, see [CRT debug heap details](/visualstudio/debugger/crt-debug-heap-details).
+When the application is linked with a debug version of the C run-time libraries, **`malloc`** resolves to [`_malloc_dbg`](malloc-dbg.md). For more information about how the heap is managed during the debugging process, see [CRT debug heap details](../crt-debug-heap-details.md).
**`malloc`** is marked `__declspec(noalias)` and `__declspec(restrict)`. These attributes mean 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).
diff --git a/docs/c-runtime-library/reference/malloca.md b/docs/c-runtime-library/reference/malloca.md
index 9953a91657..56b67ffeb9 100644
--- a/docs/c-runtime-library/reference/malloca.md
+++ b/docs/c-runtime-library/reference/malloca.md
@@ -1,7 +1,7 @@
---
-description: "Learn more about: _malloca"
title: "_malloca"
-ms.date: "11/04/2016"
+description: "Learn more about: _malloca"
+ms.date: 11/04/2016
api_name: ["_malloca"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll"]
api_type: ["DLLExport"]
@@ -38,7 +38,7 @@ If *`size`* is greater than `_ALLOCA_S_THRESHOLD`, then **`_malloca`** attempts
There are restrictions to explicitly calling **`_malloca`** in an exception handler (EH). EH routines that run on x86-class processors operate in their own memory frame: They perform their tasks in memory space that isn't based on the current location of the stack pointer of the enclosing function. The most common implementations include Windows NT structured exception handling (SEH) and C++ catch clause expressions. Therefore, explicitly calling **`_malloca`** in any of the following scenarios results in program failure during the return to the calling EH routine:
-- Windows SEH exception filter expression: **`__except`** (`_malloca ()` )
+- Windows SEH exception filter expression: **`__except`** (`_malloca ()`)
- Windows SEH final exception handler: **`__finally`** {`_malloca ()` }
diff --git a/docs/c-runtime-library/reference/mbbtype-mbbtype-l.md b/docs/c-runtime-library/reference/mbbtype-mbbtype-l.md
index abff8af776..d3e9461cbe 100644
--- a/docs/c-runtime-library/reference/mbbtype-mbbtype-l.md
+++ b/docs/c-runtime-library/reference/mbbtype-mbbtype-l.md
@@ -50,9 +50,9 @@ The locale to use.
|---|---|---|---|
| Any value except 1 | Valid single byte or lead byte | `_MBC_SINGLE` (0) | Single byte (0x20 - 0x7E, 0xA1 - 0xDF) |
| Any value except 1 | Valid single byte or lead byte | `_MBC_LEAD` (1) | Lead byte of multibyte character (0x81 - 0x9F, 0xE0 - 0xFC) |
-| Any value except 1 | Valid single-byte or lead byte | `_MBC_ILLEGAL`
(-1) | Invalid character (any value except 0x20 - 0x7E, 0xA1 - 0xDF, 0x81 - 0x9F, 0xE0 - 0xFC |
+| Any value except 1 | Valid single-byte or lead byte | `_MBC_ILLEGAL` (-1) | Invalid character: not single or lead (0x00 - 0x1F, 0x7F, 0x80, 0xA0, 0xFD, 0xFE, 0xFF) |
| 1 | Valid trail byte | `_MBC_TRAIL` (2) | Trailing byte of multibyte character (0x40 - 0x7E, 0x80 - 0xFC) |
-| 1 | Valid trail byte | `_MBC_ILLEGAL`
(-1) | Invalid character (any value except 0x20 - 0x7E, 0xA1 - 0xDF, 0x81 - 0x9F, 0xE0 - 0xFC |
+| 1 | Valid trail byte | `_MBC_ILLEGAL` (-1) | Invalid character: not trailing (0x00 - 0x3F, 0x7F, 0xFD, 0xFE, 0xFF) |
## Remarks
diff --git a/docs/c-runtime-library/reference/mbrtowc.md b/docs/c-runtime-library/reference/mbrtowc.md
index b8634e50a7..7c64576e18 100644
--- a/docs/c-runtime-library/reference/mbrtowc.md
+++ b/docs/c-runtime-library/reference/mbrtowc.md
@@ -1,14 +1,13 @@
---
-description: "Learn more about: mbrtowc"
title: "mbrtowc"
-ms.date: "4/2/2020"
+description: "Learn more about: mbrtowc"
+ms.date: 4/2/2020
api_name: ["mbrtowc", "_o_mbrtowc"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-convert-l1-1-0.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
f1_keywords: ["mbrtowc"]
helpviewer_keywords: ["mbrtowc function"]
-ms.assetid: a1e87fcc-6de0-4ca1-bf26-508d28490286
---
# `mbrtowc`
@@ -100,7 +99,7 @@ int Sample(char* szIn, wchar_t* wcOut, int nMax)
szLocal = setlocale(LC_ALL, "French_Canada.1252");
if (!szLocal)
{
- printf("The fuction setlocale(LC_ALL, \"French_Canada.1252\") failed!\n");
+ printf("The function setlocale(LC_ALL, \"French_Canada.1252\") failed!\n");
return 1;
}
@@ -110,7 +109,7 @@ int Sample(char* szIn, wchar_t* wcOut, int nMax)
// from a previous call to setlocale.
if (_setmbcp(_MB_CP_SBCS) == -1)
{
- printf("The fuction _setmbcp(_MB_CP_SBCS) failed!");
+ printf("The function _setmbcp(_MB_CP_SBCS) failed!");
return 1;
}
diff --git a/docs/c-runtime-library/reference/mbsnbcoll-mbsnbcoll-l-mbsnbicoll-mbsnbicoll-l.md b/docs/c-runtime-library/reference/mbsnbcoll-mbsnbcoll-l-mbsnbicoll-mbsnbicoll-l.md
index 89e0fa5454..667ca6c6b9 100644
--- a/docs/c-runtime-library/reference/mbsnbcoll-mbsnbcoll-l-mbsnbicoll-mbsnbicoll-l.md
+++ b/docs/c-runtime-library/reference/mbsnbcoll-mbsnbcoll-l-mbsnbicoll-mbsnbicoll-l.md
@@ -84,7 +84,7 @@ By default, this function's global state is scoped to the application. To change
| Tchar.h routine | `_UNICODE` and `_MBCS` not defined | `_MBCS` defined | `_UNICODE` defined |
|---|---|---|---|
| `_tcsncoll` | [`_strncoll`](strncoll-wcsncoll-mbsncoll-strncoll-l-wcsncoll-l-mbsncoll-l.md) | **`_mbsnbcoll`** | [`_wcsncoll`](strncoll-wcsncoll-mbsncoll-strncoll-l-wcsncoll-l-mbsncoll-l.md) |
-| `_tcsncoll_l` | [`_strncoll`, `_wcsncoll`, `_mbsncoll`, `_strncoll_l`, `_wcsncoll_l`, `_mbsncoll_l`](strncoll-wcsncoll-mbsncoll-strncoll-l-wcsncoll-l-mbsncoll-l.md) | **`_mbsnbcoll_l`** | [`_wcsncoll_l`](strncoll-wcsncoll-mbsncoll-strncoll-l-wcsncoll-l-mbsncoll-l.md) |
+| `_tcsncoll_l` | [`_strncoll_l`](strncoll-wcsncoll-mbsncoll-strncoll-l-wcsncoll-l-mbsncoll-l.md) | **`_mbsnbcoll_l`** | [`_wcsncoll_l`](strncoll-wcsncoll-mbsncoll-strncoll-l-wcsncoll-l-mbsncoll-l.md) |
| `_tcsnicoll` | [`_strnicoll`](strnicoll-wcsnicoll-mbsnicoll-strnicoll-l-wcsnicoll-l-mbsnicoll-l.md) | **`_mbsnbicoll`** | [`_wcsnicoll`](strnicoll-wcsnicoll-mbsnicoll-strnicoll-l-wcsnicoll-l-mbsnicoll-l.md) |
| `_tcsnicoll_l` | [`_strnicoll_l`](strnicoll-wcsnicoll-mbsnicoll-strnicoll-l-wcsnicoll-l-mbsnicoll-l.md) | **`_mbsnbicoll_l`** | [`_wcsnicoll_l`](strnicoll-wcsnicoll-mbsnicoll-strnicoll-l-wcsnicoll-l-mbsnicoll-l.md) |
diff --git a/docs/c-runtime-library/reference/mbsnbset-s-mbsnbset-s-l.md b/docs/c-runtime-library/reference/mbsnbset-s-mbsnbset-s-l.md
index 903e87992a..9fa6a973f5 100644
--- a/docs/c-runtime-library/reference/mbsnbset-s-mbsnbset-s-l.md
+++ b/docs/c-runtime-library/reference/mbsnbset-s-mbsnbset-s-l.md
@@ -1,14 +1,13 @@
---
-description: "Learn more about: _mbsnbset_s, _mbsnbset_s_l"
title: "_mbsnbset_s, _mbsnbset_s_l"
-ms.date: "4/2/2020"
+description: "Learn more about: _mbsnbset_s, _mbsnbset_s_l"
+ms.date: 4/2/2020
api_name: ["_mbsnbset_s_l", "_mbsnbset_s", "_o__mbsnbset_s", "_o__mbsnbset_s_l"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-multibyte-l1-1-0.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
f1_keywords: ["mbsnbset_s", "_mbsnbset_s_l", "_mbsnbset_s", "mbsnbset_s_l"]
helpviewer_keywords: ["tcsnset_s function", "mbsnbset_s function", "mbsnbset_s_l function", "_mbsnbset_s_l function", "_tcsnset_s_l function", "_mbsnbset_s function", "_tcsnset_s function", "tcsnset_s_l function"]
-ms.assetid: 811f92c9-cc31-4bbd-8017-2d1bfc6fb96f
---
# `_mbsnbset_s`, `_mbsnbset_s_l`
@@ -90,14 +89,14 @@ By default, this function's global state is scoped to the application. To change
| Tchar.h routine | `_UNICODE` and `_MBCS` not defined | `_MBCS` defined | `_UNICODE` defined |
|---|---|---|---|
| `_tcsnset_s` | `_strnset_s` | **`_mbsnbset_s`** | `_wcsnset_s` |
-| `_tcsnset_s_l` | `_strnset_s _l` | **`_mbsnbset_s_l`** | `_wcsnset_s_l` |
+| `_tcsnset_s_l` | `_strnset_s_l` | **`_mbsnbset_s_l`** | `_wcsnset_s_l` |
## Requirements
| Routine | Required header |
|---|---|
-| **`_mbsnbset_s`** | \ |
-| **`_mbsnbset_s_l`** | \ |
+| **`_mbsnbset_s`** | `` |
+| **`_mbsnbset_s_l`** | `` |
For more compatibility information, see [Compatibility](../compatibility.md).
diff --git a/docs/c-runtime-library/reference/memcpy-wmemcpy.md b/docs/c-runtime-library/reference/memcpy-wmemcpy.md
index 6f9ff121ff..4572322b81 100644
--- a/docs/c-runtime-library/reference/memcpy-wmemcpy.md
+++ b/docs/c-runtime-library/reference/memcpy-wmemcpy.md
@@ -1,6 +1,6 @@
---
-description: "Learn more about: memcpy, wmemcpy"
title: "memcpy, wmemcpy"
+description: "Learn more about: memcpy, wmemcpy"
ms.date: "1/14/2021"
api_name: ["memcpy", "wmemcpy"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "ntoskrnl.exe"]
@@ -8,7 +8,6 @@ api_type: ["DLLExport"]
topic_type: ["apiref"]
f1_keywords: ["wmemcpy", "memcpy"]
helpviewer_keywords: ["wmemcpy function", "memcpy function"]
-ms.assetid: 34abb90b-bffb-46dc-a2f3-a5e9940839d6
---
# `memcpy`, `wmemcpy`
@@ -49,14 +48,14 @@ The value of *`dest`*.
**`memcpy`** copies *`count`* bytes from *`src`* to *`dest`*; **`wmemcpy`** copies *`count`* wide characters. If the source and destination regions overlap, the behavior of **`memcpy`** is undefined. Use **`memmove`** to handle overlapping regions.
> [!IMPORTANT]
-> Make sure that the destination buffer is the same size or larger than the source buffer. For more information, see [Avoiding buffer overruns](/windows/win32/SecBP/avoiding-buffer-overruns).
+> Make sure that the destination buffer is large enough to accommodate the number of copied characters. For more information, see [Avoiding buffer overruns](/windows/win32/SecBP/avoiding-buffer-overruns).
> [!IMPORTANT]
> Because so many buffer overruns, and thus potential security exploits, have been traced to improper usage of **`memcpy`**, this function is listed among the "banned" functions by the Security Development Lifecycle (SDL). You may observe that some VC++ library classes continue to use **`memcpy`**. Furthermore, you may observe that the VC++ compiler optimizer sometimes emits calls to **`memcpy`**. The Visual C++ product is developed in accordance with the SDL process, and thus usage of this banned function has been closely evaluated. In the case of library use of it, the calls have been carefully scrutinized to ensure that buffer overruns will not be allowed through these calls. In the case of the compiler, sometimes certain code patterns are recognized as identical to the pattern of **`memcpy`**, and are thus replaced with a call to the function. In such cases, the use of **`memcpy`** is no more unsafe than the original instructions would have been; they have simply been optimized to a call to the performance-tuned **`memcpy`** function. Just as the use of "safe" CRT functions doesn't guarantee safety (they just make it harder to be unsafe), the use of "banned" functions doesn't guarantee danger (they just require greater scrutiny to ensure safety).
>
> Because **`memcpy`** usage by the VC++ compiler and libraries has been so carefully scrutinized, these calls are permitted within code that otherwise conforms with the SDL. **`memcpy`** calls introduced in application source code only conform with the SDL when that use has been reviewed by security experts.
-The **`memcpy`** and **`wmemcpy`** functions are only deprecated if the constant `_CRT_SECURE_DEPRECATE_MEMORY` is defined before the include statement, as in the example below:
+The **`memcpy`** and **`wmemcpy`** functions are only deprecated if the constant `_CRT_SECURE_DEPRECATE_MEMORY` is defined before the `#include` statement, as in the following examples:
```C
#define _CRT_SECURE_DEPRECATE_MEMORY
@@ -92,4 +91,4 @@ See [`memmove`](memmove-wmemmove.md) for a sample of how to use **`memcpy`**.
[`memmove`, `wmemmove`](memmove-wmemmove.md)\
[`memset`, `wmemset`](memset-wmemset.md)\
[`strcpy_s`, `wcscpy_s`, `_mbscpy_s`](strcpy-s-wcscpy-s-mbscpy-s.md)\
-[`strncpy_s`, `_strncpy_s_l`, `wcsncpy_s`, `_wcsncpy_s_l`, `_mbsncpy_s`, `_mbsncpy_s_l`](strncpy-s-strncpy-s-l-wcsncpy-s-wcsncpy-s-l-mbsncpy-s-mbsncpy-s-l.md)\
+[`strncpy_s`, `_strncpy_s_l`, `wcsncpy_s`, `_wcsncpy_s_l`, `_mbsncpy_s`, `_mbsncpy_s_l`](strncpy-s-strncpy-s-l-wcsncpy-s-wcsncpy-s-l-mbsncpy-s-mbsncpy-s-l.md)
diff --git a/docs/c-runtime-library/reference/memmove-wmemmove.md b/docs/c-runtime-library/reference/memmove-wmemmove.md
index 4cce4c066c..00c3f732e4 100644
--- a/docs/c-runtime-library/reference/memmove-wmemmove.md
+++ b/docs/c-runtime-library/reference/memmove-wmemmove.md
@@ -1,6 +1,6 @@
---
-description: "Learn more about: memmove, wmemmove"
title: "memmove, wmemmove"
+description: "Learn more about: memmove, wmemmove"
ms.date: "1/14/2021"
api_name: ["memmove", "wmemmove"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ntdll.dll", "ucrtbase.dll", "ntoskrnl.exe"]
@@ -47,9 +47,9 @@ The value of *`dest`*.
Copies *`count`* bytes (**`memmove`**) or characters (**`wmemmove`**) from *`src`* to *`dest`*. If some portions of the source and the destination regions overlap, both functions ensure that the original source bytes in the overlapping region are copied before being overwritten.
-**Security Note** Make sure that the destination buffer is the same size or larger than the source buffer. For more information, see [Avoiding buffer overruns](/windows/win32/SecBP/avoiding-buffer-overruns).
+**Security Note** Make sure that the destination buffer is large enough to accommodate the number of moved characters. For more information, see [Avoiding buffer overruns](/windows/win32/SecBP/avoiding-buffer-overruns).
-The **`memmove`** and **`wmemmove`** functions will only be deprecated if the constant `_CRT_SECURE_DEPRECATE_MEMORY` is defined before the inclusion statement in order for the functions to be deprecated, such as in the example below:
+The **`memmove`** and **`wmemmove`** functions are only deprecated if the constant `_CRT_SECURE_DEPRECATE_MEMORY` is defined before the `#include` statement, as shown in the following example:
```C
#define _CRT_SECURE_DEPRECATE_MEMORY
@@ -114,4 +114,4 @@ New string: aaaabb
[`_memccpy`](memccpy.md)\
[`memcpy`, `wmemcpy`](memcpy-wmemcpy.md)\
[`strcpy`, `wcscpy`, `_mbscpy`](strcpy-wcscpy-mbscpy.md)\
-[`strncpy`, `_strncpy_l`, `wcsncpy`, `_wcsncpy_l`, `_mbsncpy`, `_mbsncpy_l`](strncpy-strncpy-l-wcsncpy-wcsncpy-l-mbsncpy-mbsncpy-l.md)\
+[`strncpy`, `_strncpy_l`, `wcsncpy`, `_wcsncpy_l`, `_mbsncpy`, `_mbsncpy_l`](strncpy-strncpy-l-wcsncpy-wcsncpy-l-mbsncpy-mbsncpy-l.md)
diff --git a/docs/c-runtime-library/reference/mkdir-wmkdir.md b/docs/c-runtime-library/reference/mkdir-wmkdir.md
index 43a9a54ba6..f01bf458e6 100644
--- a/docs/c-runtime-library/reference/mkdir-wmkdir.md
+++ b/docs/c-runtime-library/reference/mkdir-wmkdir.md
@@ -1,6 +1,6 @@
---
-description: "Learn more about: _mkdir, _wmkdir"
title: "_mkdir, _wmkdir"
+description: "Learn more about: _mkdir, _wmkdir"
ms.date: "4/2/2020"
api_name: ["_wmkdir", "_mkdir", "_o__mkdir", "_o__wmkdir"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-filesystem-l1-1-0.dll"]
@@ -8,7 +8,6 @@ api_type: ["DLLExport"]
topic_type: ["apiref"]
f1_keywords: ["_mkdir", "tmkdir", "_tmkdir", "wmkdir", "_wmkdir"]
helpviewer_keywords: ["_wmkdir function", "folders [C++], creating", "wmkdir function", "directories [C++], creating", "mkdir function", "tmkdir function", "_mkdir function", "_tmkdir function"]
-ms.assetid: 7f22d01d-63a5-4712-a6e7-d34878b2d840
---
# `_mkdir`, `_wmkdir`
@@ -17,7 +16,6 @@ Creates a new directory.
## Syntax
```C
-
int _mkdir(
const char *dirname
);
diff --git a/docs/c-runtime-library/reference/msize-dbg.md b/docs/c-runtime-library/reference/msize-dbg.md
index 41a1c38496..01ea05ea49 100644
--- a/docs/c-runtime-library/reference/msize-dbg.md
+++ b/docs/c-runtime-library/reference/msize-dbg.md
@@ -8,7 +8,6 @@ api_type: ["DLLExport"]
topic_type: ["apiref"]
f1_keywords: ["_msize_dbg", "msize_dbg"]
helpviewer_keywords: ["memory blocks", "_msize_dbg function", "msize_dbg function"]
-ms.assetid: a333f4b6-f8a2-4e61-bb69-cb34063b8cef
---
# `_msize_dbg`
@@ -39,15 +38,15 @@ On successful completion, **`_msize_dbg`** returns the size (in bytes) of the sp
**`_msize_dbg`** is a debug version of the _[`msize`](msize.md) function. When [`_DEBUG`](../debug.md) isn't defined, each call to **`_msize_dbg`** is reduced to a call to `_msize`. Both `_msize` and **`_msize_dbg`** calculate the size of a memory block in the base heap, but **`_msize_dbg`** adds two debugging features: It includes the buffers on either side of the user portion of the memory block in the returned size and it allows size calculations for specific block types.
-For information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT debug heap details](/visualstudio/debugger/crt-debug-heap-details). For information about the allocation block types and how they're used, see [Types of blocks on the debug heap](/visualstudio/debugger/crt-debug-heap-details). For information about the differences between standard heap functions and the debug versions, see [Debug versions of heap allocation functions](/visualstudio/debugger/debug-versions-of-heap-allocation-functions).
+For information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT debug heap details](../crt-debug-heap-details.md). For information about the allocation block types and how they're used, see [Types of blocks on the debug heap](../crt-debug-heap-details.md#types-of-blocks-on-the-debug-heap). For information about the differences between standard heap functions and the debug versions, see [Debug versions of heap allocation functions](../debug-versions-of-heap-allocation-functions.md).
-This function validates its parameter. If *`memblock`* is a null pointer, **`_msize_dbg`** invokes an invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). If the error is handled, the function sets `errno` to `EINVAL` and returns -1.
+This function validates its parameter. If *`memblock`* is a null pointer, **`_msize_dbg`** invokes an invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). If the error is handled, the function sets `errno` to `EINVAL` and returns -1 (18,446,744,073,709,551,615 unsigned).
## Requirements
| Routine | Required header |
|---|---|
-| **`_msize_dbg`** | \ |
+| **`_msize_dbg`** | `` |
For more compatibility information, see [Compatibility](../compatibility.md).
diff --git a/docs/c-runtime-library/reference/msize.md b/docs/c-runtime-library/reference/msize.md
index 7fb3e9a872..b5d1cad10b 100644
--- a/docs/c-runtime-library/reference/msize.md
+++ b/docs/c-runtime-library/reference/msize.md
@@ -1,7 +1,7 @@
---
description: "Learn more about: _msize"
title: "_msize"
-ms.date: "4/2/2020"
+ms.date: 07/26/2024
api_name: ["_msize", "_o__msize"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-heap-l1-1-0.dll"]
api_type: ["DLLExport"]
@@ -34,9 +34,9 @@ Pointer to the memory block.
The **`_msize`** function returns the size, in bytes, of the memory block allocated by a call to **`calloc`**, **`malloc`**, or **`realloc`**.
-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).
+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](../crt-debug-heap-details.md).
-This function validates its parameter. If *`memblock`* is a `NULL` pointer, **`_msize`** invokes an invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). If the error is handled, the function sets `errno` to `EINVAL` and returns -1.
+This function validates its parameter. If *`memblock`* is a `NULL` pointer, **`_msize`** invokes an invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). If the error is handled, the function sets `errno` to `EINVAL` and returns -1 (18,446,744,073,709,551,615 unsigned).
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).
diff --git a/docs/c-runtime-library/reference/nextafter-functions.md b/docs/c-runtime-library/reference/nextafter-functions.md
index da24da3c06..f4945d818e 100644
--- a/docs/c-runtime-library/reference/nextafter-functions.md
+++ b/docs/c-runtime-library/reference/nextafter-functions.md
@@ -56,7 +56,7 @@ The **`nextafter`** and **`nexttoward`** function families are equivalent, excep
Because C++ allows overloading, if you include `` you can call overloads of **`nextafter`** and **`nexttoward`** that return **`float`** and **`long double`** types. In a C program, unless you're using the `` macro to call this function, **`nextafter`** and **`nexttoward`** always return **`double`**.
-If you use the `nextafter` or `nexttoward`macro from ``, the type of the argument determines which version of the function is selected. See [Type-generic math](../tgmath.md) for details.
+If you use the `nextafter` or `nexttoward` macro from ``, the type of the argument determines which version of the function is selected. See [Type-generic math](../tgmath.md) for details.
The **`_nextafter`** and **`_nextafterf`** functions are Microsoft-specific. The **`_nextafterf`** function is only available when compiling for x64.
diff --git a/docs/c-runtime-library/reference/not-eq.md b/docs/c-runtime-library/reference/not-eq.md
index e4801590af..90877cd219 100644
--- a/docs/c-runtime-library/reference/not-eq.md
+++ b/docs/c-runtime-library/reference/not-eq.md
@@ -1,17 +1,16 @@
---
description: "Learn more about: not_eq"
title: "not_eq"
-ms.date: "11/04/2016"
+ms.date: 08/09/2024
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["not_eq", "std::not_eq", "std.not_eq"]
+f1_keywords: ["ISO646/not_eq", "not_eq", "std::not_eq", "std.not_eq"]
helpviewer_keywords: ["not_eq function"]
-ms.assetid: d87ad299-8b50-4393-a57f-06f70e1f23fb
---
# `not_eq`
-An alternative to the **`!=`** operator.
+An alternative spelling for the **`!=`** operator.
## Syntax
@@ -21,34 +20,40 @@ An alternative to the **`!=`** operator.
## Remarks
-The macro yields the operator **`!=`**.
+C++:
+- **`not_eq`** can be used as alternative to **`!=`**. The [`/permissive-`](../../build/reference/permissive-standards-conformance.md) or [`/Za`](../../build/reference/za-ze-disable-language-extensions.md) compiler option is required.
+- Including `` or `` is deprecated. You can use the alternative spelling without including any header files.
+- There's no alternative spelling for **`==`**.
+
+C:
+- **`not_eq`** is an alternative spelling for **`!=`**. It is provided as a macro in ``, which you must `#include`.
+- There's no alternative spelling for **`==`**.
## Example
```cpp
-// iso646_not_eq.cpp
// compile with: /EHsc
#include
#include
int main( )
{
- using namespace std;
- int a = 0, b = 1;
-
- if (a != b)
- cout << "a is not equal to b" << endl;
-
- if (a not_eq b)
- cout << "a is not equal to b" << endl;
+ int x = 1, y = 2;
+
+ // not_eq is available in C++ and C
+ // This example is for C++, so no header file is needed to use not_eq
+ // When compiling for C, #include to use not_eq
+ if (x not_eq y)
+ {
+ std::cout << "Not equal\n";
+ }
}
```
```Output
-a is not equal to b
-a is not equal to b
+Not equal
```
## Requirements
-**Header:** \
+**Header:** `` is necessary if you are compiling for C.
\ No newline at end of file
diff --git a/docs/c-runtime-library/reference/not.md b/docs/c-runtime-library/reference/not.md
index 79b2505646..a878828337 100644
--- a/docs/c-runtime-library/reference/not.md
+++ b/docs/c-runtime-library/reference/not.md
@@ -1,13 +1,12 @@
---
-description: "Learn more about: not"
title: "not"
+description: "Learn more about: not"
ms.date: "11/04/2016"
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["std::not", "std.not", "Not"]
+f1_keywords: ["std::not", "std.not", "ISO646/not", "not"]
helpviewer_keywords: ["not function"]
-ms.assetid: d2ddbd5c-33c0-4aff-8961-feac155b4ba1
---
# `not`
@@ -16,7 +15,6 @@ An alternative to the **`!`** operator.
## Syntax
```C
-
#define not !
```
diff --git a/docs/c-runtime-library/reference/open-osfhandle.md b/docs/c-runtime-library/reference/open-osfhandle.md
index cc52f6cf30..6ea534a28c 100644
--- a/docs/c-runtime-library/reference/open-osfhandle.md
+++ b/docs/c-runtime-library/reference/open-osfhandle.md
@@ -44,7 +44,7 @@ These manifest constants are defined in ``:
|--|--|
| `_O_APPEND` | Positions a file pointer to the end of the file before every write operation. |
| `_O_RDONLY` | Opens the file for reading only. |
-| `_O_TEXT` | Opens the file in text (translated) mode. |
+| `_O_TEXT` | Opens the file in ANSI text (translated) mode. |
| `_O_WTEXT` | Opens the file in Unicode (translated UTF-16) mode. |
The **`_open_osfhandle`** call transfers ownership of the Win32 file handle to the file descriptor. To close a file opened by using **`_open_osfhandle`**, call [`_close`](close.md). The underlying OS file handle is also closed by a call to **`_close`**. Don't call the Win32 function `CloseHandle` on the original handle. If the file descriptor is owned by a `FILE *` stream, then a call to [`fclose`](fclose-fcloseall.md) closes both the file descriptor and the underlying handle. In this case, don't call **`_close`** on the file descriptor or `CloseHandle` on the original handle.
diff --git a/docs/c-runtime-library/reference/open-wopen.md b/docs/c-runtime-library/reference/open-wopen.md
index 487b3a3f0b..6b72d3b25f 100644
--- a/docs/c-runtime-library/reference/open-wopen.md
+++ b/docs/c-runtime-library/reference/open-wopen.md
@@ -79,7 +79,7 @@ The **`_open`** function opens the file specified by *`filename`* and prepares i
| `_O_RDONLY` | Opens a file for reading only. Can't be specified with `_O_RDWR` or `_O_WRONLY`. |
| `_O_RDWR` | Opens a file for both reading and writing. Can't be specified with `_O_RDONLY` or `_O_WRONLY`. |
| `_O_SEQUENTIAL` | Specifies that caching is optimized for, but not restricted to, sequential access from disk. |
-| `_O_TEXT` | Opens a file in text (translated) mode. (For more information, see [Text and binary mode file I/O](../text-and-binary-mode-file-i-o.md) and [`fopen`](fopen-wfopen.md).) |
+| `_O_TEXT` | Opens a file in ANSI text (translated) mode. (For more information, see [Text and binary mode file I/O](../text-and-binary-mode-file-i-o.md) and [`fopen`](fopen-wfopen.md).) |
| `_O_TRUNC` | Opens a file and truncates it to zero length; the file must have write permission. Can't be specified with `_O_RDONLY`. `_O_TRUNC` used with `_O_CREAT` opens an existing file or creates a file. **Note:** The `_O_TRUNC` flag destroys the contents of the specified file. |
| `_O_WRONLY` | Opens a file for writing only. Can't be specified with `_O_RDONLY` or `_O_RDWR`. |
| `_O_U16TEXT` | Opens a file in Unicode UTF-16 mode. |
diff --git a/docs/c-runtime-library/reference/or-eq.md b/docs/c-runtime-library/reference/or-eq.md
index faccf4efc1..86d34f9fb7 100644
--- a/docs/c-runtime-library/reference/or-eq.md
+++ b/docs/c-runtime-library/reference/or-eq.md
@@ -1,13 +1,12 @@
---
-description: "Learn more about: or_eq"
title: "or_eq"
+description: "Learn more about: or_eq"
ms.date: "11/04/2016"
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["std::or_eq", "or_eq", "std.or_eq"]
+f1_keywords: ["std::or_eq", "ISO646/or_eq", "or_eq", "std.or_eq"]
helpviewer_keywords: ["or_eq function"]
-ms.assetid: 1eb92464-ed58-40d8-a30e-f0a6aa2f4318
---
# `or_eq`
@@ -16,7 +15,6 @@ An alternative to the `|=` operator.
## Syntax
```C
-
#define or_eq |=
```
diff --git a/docs/c-runtime-library/reference/or.md b/docs/c-runtime-library/reference/or.md
index 4f0035c61e..43c77e35ed 100644
--- a/docs/c-runtime-library/reference/or.md
+++ b/docs/c-runtime-library/reference/or.md
@@ -5,7 +5,7 @@ ms.date: "11/04/2016"
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["std::or", "std.or", "Or"]
+f1_keywords: ["std::or", "std.or", "ISO646/or", "or"]
helpviewer_keywords: ["or function"]
ms.assetid: 6523b3ac-0a18-44ec-9e9a-b9bab8525ead
---
diff --git a/docs/c-runtime-library/reference/pipe.md b/docs/c-runtime-library/reference/pipe.md
index de49769314..084b7d4666 100644
--- a/docs/c-runtime-library/reference/pipe.md
+++ b/docs/c-runtime-library/reference/pipe.md
@@ -59,7 +59,7 @@ The standard output descriptor of `PROGRAM1` is attached to the pipe's write des
The **`_pipe`** function returns two file descriptors to the pipe in the *`pfds`* argument. The element *`pfds`*[0] contains the read descriptor, and the element *`pfds`*[1] contains the write descriptor. Pipe file descriptors are used in the same way as other file descriptors. (The low-level input and output functions **`_read`** and **`_write`** can read from and write to a pipe.) To detect the end-of-pipe condition, check for a **`_read`** request that returns 0 as the number of bytes read.
-The *`psize`* argument specifies the amount of memory, in bytes, to reserve for the pipe. The *`textmode`* argument specifies the translation mode for the pipe. The manifest constant `_O_TEXT` specifies a text translation, and the constant `_O_BINARY` specifies binary translation. (See [`fopen`, `_wfopen`](fopen-wfopen.md) for a description of text and binary modes.) If the *`textmode`* argument is 0, **`_pipe`** uses the default translation mode that's specified by the default-mode variable [`_fmode`](../fmode.md).
+The *`psize`* argument specifies the amount of memory, in bytes, to reserve for the pipe. The *`textmode`* argument specifies the translation mode for the pipe. The manifest constant `_O_TEXT` specifies an ANSI text translation, and the constant `_O_BINARY` specifies binary translation. (See [`fopen`, `_wfopen`](fopen-wfopen.md) for a description of text and binary modes.) If the *`textmode`* argument is 0, **`_pipe`** uses the default translation mode that's specified by the default-mode variable [`_fmode`](../fmode.md).
In multithreaded programs, no locking is performed. The file descriptors that are returned are newly opened and shouldn't be referenced by any thread until after the **`_pipe`** call is complete.
@@ -105,7 +105,6 @@ enum PIPES { READ, WRITE }; /* Constants 0 and 1 for READ and WRITE */
int main( int argc, char *argv[] )
{
-
int fdpipe[2];
char hstr[20];
int pid, problem, c;
diff --git a/docs/c-runtime-library/reference/popen-wpopen.md b/docs/c-runtime-library/reference/popen-wpopen.md
index 0684bfa70c..251723ea13 100644
--- a/docs/c-runtime-library/reference/popen-wpopen.md
+++ b/docs/c-runtime-library/reference/popen-wpopen.md
@@ -1,14 +1,13 @@
---
title: "_popen, _wpopen"
description: "A reference for the Microsoft C runtime (CRT) library functions _popen and _wpopen."
-ms.date: "4/2/2020"
+ms.date: "1/25/2023"
api_name: ["_popen", "_wpopen", "_o__popen", "_o__wpopen"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-stdio-l1-1-0.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
f1_keywords: ["tpopen", "popen", "wpopen", "_popen", "_wpopen", "_tpopen"]
helpviewer_keywords: ["tpopen function", "pipes, creating", "_popen function", "_tpopen function", "popen function", "wpopen function", "_wpopen function"]
-ms.assetid: eb718ff2-c87d-4bd4-bd2e-ba317c3d6973
no-loc: [_popen, _wpopen, _tpopen, _doserrno, errno, _sys_errlist, _sys_nerr, EINVAL]
---
# `_popen`, `_wpopen`
@@ -85,7 +84,7 @@ All versions of the [C run-time libraries](../crt-library-features.md).
## Example
```C
-// crt_popen.c
+// popen.c
/* This program uses _popen and _pclose to receive a
* stream of text from a system process.
*/
@@ -93,36 +92,39 @@ All versions of the [C run-time libraries](../crt-library-features.md).
#include
#include
-int main( void )
+int main(void)
{
-
- char psBuffer[128];
- FILE *pPipe;
-
- /* Run DIR so that it writes its output to a pipe. Open this
- * pipe with read text attribute so that we can read it
- * like a text file.
- */
-
- if( (pPipe = _popen( "dir *.c /on /p", "rt" )) == NULL )
- exit( 1 );
-
- /* Read pipe until end of file, or an error occurs. */
-
- while(fgets(psBuffer, 128, pPipe))
- {
- puts(psBuffer);
- }
-
- /* Close pipe and print return value of pPipe. */
- if (feof( pPipe))
- {
- printf( "\nProcess returned %d\n", _pclose( pPipe ) );
- }
- else
- {
- printf( "Error: Failed to read the pipe to the end.\n");
- }
+ char psBuffer[128];
+ FILE* pPipe;
+
+ /* Run DIR so that it writes its output to a pipe. Open this
+ * pipe with read text attribute so that we can read it
+ * like a text file.
+ */
+
+ if ((pPipe = _popen("dir *.c /on /p", "rt")) == NULL)
+ {
+ exit(1);
+ }
+
+ /* Read pipe until end of file, or an error occurs. */
+
+ while (fgets(psBuffer, 128, pPipe))
+ {
+ puts(psBuffer);
+ }
+
+ int endOfFileVal = feof(pPipe);
+ int closeReturnVal = _pclose(pPipe);
+
+ if (endOfFileVal)
+ {
+ printf("\nProcess returned %d\n", closeReturnVal);
+ }
+ else
+ {
+ printf("Error: Failed to read the pipe to the end.\n");
+ }
}
```
diff --git a/docs/c-runtime-library/reference/posix-write.md b/docs/c-runtime-library/reference/posix-write.md
index a67ee891fb..7c80fce32a 100644
--- a/docs/c-runtime-library/reference/posix-write.md
+++ b/docs/c-runtime-library/reference/posix-write.md
@@ -6,7 +6,7 @@ api_name: ["write"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["write"]
+f1_keywords: ["CORECRT_IO/write", "write"]
helpviewer_keywords: ["write function"]
ms.assetid: 1cbf112e-b9ef-4df6-993a-83abd4213acd
---
diff --git a/docs/c-runtime-library/reference/putc-nolock-putwc-nolock.md b/docs/c-runtime-library/reference/putc-nolock-putwc-nolock.md
index 2cac422792..6c629ae81f 100644
--- a/docs/c-runtime-library/reference/putc-nolock-putwc-nolock.md
+++ b/docs/c-runtime-library/reference/putc-nolock-putwc-nolock.md
@@ -1,6 +1,6 @@
---
-description: "Learn more about: _putc_nolock, _putwc_nolock"
title: "_putc_nolock, _putwc_nolock"
+description: "Learn more about: _putc_nolock, _putwc_nolock"
ms.date: "4/2/2020"
api_name: ["_putc_nolock", "_putwc_nolock", "_o__putc_nolock", "_o__putwc_nolock"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-stdio-l1-1-0.dll"]
@@ -8,11 +8,10 @@ api_type: ["DLLExport"]
topic_type: ["apiref"]
f1_keywords: ["_puttc_nolock", "puttc_nolock", "putwc_nolock", "_putwc_nolock", "_putc_nolock", "putc_nolock"]
helpviewer_keywords: ["puttc_nolock function", "putc_nolock function", "_putc_nolock function", "streams, writing characters to", "characters, writing", "putwc_nolock function", "_puttc_nolock function", "_putwc_nolock function"]
-ms.assetid: 3cfc7f21-c9e8-4b7f-b0fb-af0d4d85e7e1
---
# `_putc_nolock`, `_putwc_nolock`
-Writes a character to a stream without locking the thread.
+Writes a character to a stream without locking.
## Syntax
diff --git a/docs/c-runtime-library/reference/putch-nolock-putwch-nolock.md b/docs/c-runtime-library/reference/putch-nolock-putwch-nolock.md
index b3e11e0e26..d97eb45b18 100644
--- a/docs/c-runtime-library/reference/putch-nolock-putwch-nolock.md
+++ b/docs/c-runtime-library/reference/putch-nolock-putwch-nolock.md
@@ -1,6 +1,6 @@
---
-description: "Learn more about: _putch_nolock, _putwch_nolock"
title: "_putch_nolock, _putwch_nolock"
+description: "Learn more about: _putch_nolock, _putwch_nolock"
ms.date: "4/2/2020"
api_name: ["_putwch_nolock", "_putch_nolock", "_o__putch_nolock", "_o__putwch_nolock"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-conio-l1-1-0.dll"]
@@ -8,11 +8,10 @@ api_type: ["DLLExport"]
topic_type: ["apiref"]
f1_keywords: ["_putch_nolock", "_puttch_nolock", "putch_nolock", "putwch_nolock", "_putwch_nolock"]
helpviewer_keywords: ["putwch_nolock function", "puttch_nolock function", "characters, writing", "putch_nolock function", "_putch_nolock function", "_puttch_nolock function", "console, writing characters to", "_putwch_nolock function"]
-ms.assetid: edbc811d-bac6-47fa-a872-fe4f3a1590b0
---
# `_putch_nolock`, `_putwch_nolock`
-Writes a character to the console without locking the thread.
+Writes a character to the console without locking.
> [!IMPORTANT]
> This API cannot be used in applications that execute in the Windows Runtime. For more information, see [CRT functions not supported in Universal Windows Platform apps](../../cppcx/crt-functions-not-supported-in-universal-windows-platform-apps.md).
diff --git a/docs/c-runtime-library/reference/putchar-nolock-putwchar-nolock.md b/docs/c-runtime-library/reference/putchar-nolock-putwchar-nolock.md
index 4748670c50..6fe752c348 100644
--- a/docs/c-runtime-library/reference/putchar-nolock-putwchar-nolock.md
+++ b/docs/c-runtime-library/reference/putchar-nolock-putwchar-nolock.md
@@ -1,6 +1,6 @@
---
-description: "Learn more about: _putchar_nolock, _putwchar_nolock"
title: "_putchar_nolock, _putwchar_nolock"
+description: "Learn more about: _putchar_nolock, _putwchar_nolock"
ms.date: "11/04/2016"
api_name: ["_putchar_nolock", "_putwchar_nolock"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll"]
@@ -8,11 +8,10 @@ api_type: ["DLLExport"]
topic_type: ["apiref"]
f1_keywords: ["putwchar_nolock", "_puttchar_nolock", "_putchar_nolock", "_putwchar_nolock", "putchar_nolock"]
helpviewer_keywords: ["_puttchar_nolock function", "putchar_nolock function", "characters, writing", "standard output, writing to", "putwchar_nolock function", "_putchar_nolock function", "_putwchar_nolock function", "puttchar_nolock function"]
-ms.assetid: 9ac68092-bfc3-4352-b486-c3e780220575
---
# `_putchar_nolock`, `_putwchar_nolock`
-Writes a character to `stdout` without locking the thread.
+Writes a character to `stdout` without locking.
## Syntax
diff --git a/docs/c-runtime-library/reference/putenv-s-wputenv-s.md b/docs/c-runtime-library/reference/putenv-s-wputenv-s.md
index 31b8fd94bb..6437099f5c 100644
--- a/docs/c-runtime-library/reference/putenv-s-wputenv-s.md
+++ b/docs/c-runtime-library/reference/putenv-s-wputenv-s.md
@@ -1,21 +1,23 @@
---
description: "Learn more about: _putenv_s, _wputenv_s"
-title: "_putenv_s, _wputenv_s"
+title: "_putenv_s, _wputenv_s, _tputenv_s"
ms.date: "4/2/2020"
-api_name: ["_wputenv_s", "_putenv_s", "_o__putenv_s", "_o__wputenv_s"]
+api_name: ["_wputenv_s", "_putenv_s", "_tputenv_s", "_o__putenv_s", "_o__wputenv_s"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-environment-l1-1-0.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["putenv_s", "wputenv_s", "_wputenv_s", "_putenv_s"]
-helpviewer_keywords: ["wputenv_s function", "_putenv_s function", "environment variables, deleting", "putenv_s function", "_wputenv_s function", "environment variables, creating", "environment variables, modifying"]
+f1_keywords: ["putenv_s", "wputenv_s", "_wputenv_s", "_putenv_s", "_tputenv_s"]
+helpviewer_keywords: ["wputenv_s function", "_putenv_s function", "environment variables, deleting", "putenv_s function", "_wputenv_s function", "environment variables, creating", "environment variables, modifying", "_tputenv_s function"]
---
-# `_putenv_s`, `_wputenv_s`
+# `_putenv_s`, `_wputenv_s`, `_tputenv_s`
Creates, modifies, or removes environment variables. These functions are versions of [`_putenv`, `_wputenv`](putenv-wputenv.md) that have security enhancements, as described in [Security features in the CRT](../security-features-in-the-crt.md).
> [!IMPORTANT]
> This API cannot be used in applications that execute in the Windows Runtime. For more information, see [CRT functions not supported in Universal Windows Platform apps](../../cppcx/crt-functions-not-supported-in-universal-windows-platform-apps.md).
+For `_tputenv_s`, see [Generic-text function mappings](#generic-text-function-mappings).
+
## Syntax
```C
@@ -56,11 +58,13 @@ The **`_putenv_s`** function adds new environment variables or modifies the valu
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).
-### Generic-text routine mappings
+### Generic-text function mappings
+
+The function in the `tchar.h` column maps to the function in the other columns depending on the character set that is defined at compile time.
-| `TCHAR.H` routine | `_UNICODE` and `_MBCS` not defined | `_MBCS` defined | `_UNICODE` defined |
+| `tchar.h` function | `_UNICODE` and `_MBCS` not defined | `_MBCS` defined | `_UNICODE` defined |
|---|---|---|---|
-| `_tputenv_s` | **`_putenv_s`** | **`_putenv_s`** | **`_wputenv_s`** |
+| `_tputenv_s` | `_putenv_s` | `_putenv_s` | `_wputenv_s` |
*`varname`* is the name of the environment variable to be added or modified and *`value_string`* is the variable's value. If *`varname`* is already part of the environment, its value is replaced by *`value_string`*; otherwise, the new *`varname`* variable and its *`value_string`* are added to the environment. You can remove a variable from the environment by specifying an empty string (that is, `""`) for *`value_string`*.
diff --git a/docs/c-runtime-library/reference/qsort.md b/docs/c-runtime-library/reference/qsort.md
index b465c704a9..9364fefb82 100644
--- a/docs/c-runtime-library/reference/qsort.md
+++ b/docs/c-runtime-library/reference/qsort.md
@@ -1,7 +1,7 @@
---
title: "qsort"
description: "Describes the Microsoft C runtime quick sort API `qsort`"
-ms.date: "10/23/2020"
+ms.date: "8/2/2023"
api_name: ["qsort", "_o_qsort"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ntdll.dll", "ucrtbase.dll", "api-ms-win-crt-utility-l1-1-0.dll", "ntoskrnl.exe"]
api_type: ["DLLExport"]
@@ -45,7 +45,7 @@ The **`qsort`** function implements a quick-sort algorithm to sort an array of *
**`qsort`** calls the *`compare`* routine one or more times during the sort, and passes pointers to two array elements on each call. If *`compare`* indicates two elements are the same, their order in the resulting sorted array is unspecified.
```C
-compare( (void *) & elem1, (void *) & elem2 );
+compare(const void *elem1, const void *elem2);
```
The routine compares the elements and returns one of the following values.
diff --git a/docs/c-runtime-library/reference/raise.md b/docs/c-runtime-library/reference/raise.md
index 2b33716eae..e3fe3e05b6 100644
--- a/docs/c-runtime-library/reference/raise.md
+++ b/docs/c-runtime-library/reference/raise.md
@@ -14,7 +14,7 @@ helpviewer_keywords: ["signals, sending to executing programs", "raise function"
Sends a signal to the executing program.
> [!NOTE]
-> Do not use this method to shut down a Microsoft Store app, except in testing or debugging scenarios. Programmatic or UI ways to close a Store app are not permitted according to the [Microsoft Store policies](/legal/windows/agreements/store-policies). For more information, see [UWP app lifecycle](/windows/uwp/launch-resume/app-lifecycle).
+> Do not use this method to shut down a Microsoft Store app, except in testing or debugging scenarios. Programmatic or UI ways to close a Store app are not permitted according to the [Microsoft Store policies](/windows/apps/publish/store-policies). For more information, see [UWP app lifecycle](/windows/uwp/launch-resume/app-lifecycle).
## Syntax
diff --git a/docs/c-runtime-library/reference/read.md b/docs/c-runtime-library/reference/read.md
index ad0fc6fd92..2e7096eca6 100644
--- a/docs/c-runtime-library/reference/read.md
+++ b/docs/c-runtime-library/reference/read.md
@@ -1,6 +1,6 @@
---
-description: "Learn more about: _read"
title: "_read"
+description: "Learn more about: _read"
ms.date: "4/2/2020"
api_name: ["_read", "_o__read"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-stdio-l1-1-0.dll"]
@@ -123,4 +123,4 @@ Read 19 bytes from file
[`_creat`, `_wcreat`](creat-wcreat.md)\
[`fread`](fread.md)\
[`_open`, `_wopen`](open-wopen.md)\
-[`_write`](write.md)\
+[`_write`](write.md)
diff --git a/docs/c-runtime-library/reference/realloc-dbg.md b/docs/c-runtime-library/reference/realloc-dbg.md
index ed270641f3..7fe5026780 100644
--- a/docs/c-runtime-library/reference/realloc-dbg.md
+++ b/docs/c-runtime-library/reference/realloc-dbg.md
@@ -57,7 +57,7 @@ On successful completion, this function either returns a pointer to the user por
**`_realloc_dbg`** sets `errno` to `ENOMEM` if a memory allocation fails or if the amount of memory needed (including the overhead mentioned previously) exceeds `_HEAP_MAXREQ`. For information about this and other error codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md).
-For information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT debug heap details](/visualstudio/debugger/crt-debug-heap-details). For information about the allocation block types and how they're used, see [Types of blocks on the debug heap](/visualstudio/debugger/crt-debug-heap-details). For information about the differences between standard heap functions and debug versions, see [Debug versions of heap allocation functions](/visualstudio/debugger/debug-versions-of-heap-allocation-functions).
+For information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT debug heap details](../crt-debug-heap-details.md). For information about the allocation block types and how they're used, see [Types of blocks on the debug heap](../crt-debug-heap-details.md#types-of-blocks-on-the-debug-heap). For information about the differences between standard heap functions and debug versions, see [Debug versions of heap allocation functions](../debug-versions-of-heap-allocation-functions.md).
## Requirements
diff --git a/docs/c-runtime-library/reference/realloc.md b/docs/c-runtime-library/reference/realloc.md
index 34e26c19e9..164743a684 100644
--- a/docs/c-runtime-library/reference/realloc.md
+++ b/docs/c-runtime-library/reference/realloc.md
@@ -60,7 +60,7 @@ _set_new_mode(1);
early in ones program, or link with NEWMODE.OBJ (see [Link options](../link-options.md)).
-When the application is linked with a debug version of the C run-time libraries, **`realloc`** resolves to [`_realloc_dbg`](realloc-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).
+When the application is linked with a debug version of the C run-time libraries, **`realloc`** resolves to [`_realloc_dbg`](realloc-dbg.md). For more information about how the heap is managed during the debugging process, see [The CRT debug heap](../crt-debug-heap-details.md).
**`realloc`** 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).
diff --git a/docs/c-runtime-library/reference/recalloc-dbg.md b/docs/c-runtime-library/reference/recalloc-dbg.md
index dc7477217e..66707f8e61 100644
--- a/docs/c-runtime-library/reference/recalloc-dbg.md
+++ b/docs/c-runtime-library/reference/recalloc-dbg.md
@@ -41,7 +41,7 @@ Requested size of each memory block (bytes).
*`blockType`*\
Requested type of memory block: `_CLIENT_BLOCK` or `_NORMAL_BLOCK`.
-For information about the allocation block types and how they're used, see [Types of blocks on the debug heap](/visualstudio/debugger/crt-debug-heap-details).
+For information about the allocation block types and how they're used, see [Types of blocks on the debug heap](../crt-debug-heap-details.md#types-of-blocks-on-the-debug-heap).
*`filename`*\
Pointer to name of the source file that requested allocation operation or `NULL`.
@@ -63,7 +63,7 @@ On successful completion, this function either returns a pointer to the user por
**`_recalloc_dbg`** sets `errno` to `ENOMEM` if a memory allocation fails; `EINVAL` is returned if the amount of memory needed (including the overhead mentioned previously) exceeds `_HEAP_MAXREQ`. For information about this and other error codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md).
-For information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT debug heap details](/visualstudio/debugger/crt-debug-heap-details). For information about the differences between standard heap functions and debug versions, see [Debug versions of heap allocation functions](/visualstudio/debugger/debug-versions-of-heap-allocation-functions).
+For information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT debug heap details](../crt-debug-heap-details.md). For information about the differences between standard heap functions and debug versions, see [Debug versions of heap allocation functions](../debug-versions-of-heap-allocation-functions.md).
## Requirements
diff --git a/docs/c-runtime-library/reference/recalloc.md b/docs/c-runtime-library/reference/recalloc.md
index 395363ff12..09cd09dea3 100644
--- a/docs/c-runtime-library/reference/recalloc.md
+++ b/docs/c-runtime-library/reference/recalloc.md
@@ -1,6 +1,6 @@
---
-description: "Learn more about: _recalloc"
title: "_recalloc"
+description: "Learn more about: _recalloc"
ms.date: "4/2/2020"
api_name: ["_recalloc", "_o__recalloc"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-heap-l1-1-0.dll"]
@@ -8,7 +8,6 @@ api_type: ["DLLExport"]
topic_type: ["apiref"]
f1_keywords: ["_recalloc", "recalloc"]
helpviewer_keywords: ["_recalloc function", "recalloc function"]
-ms.assetid: 1db8305a-3f03-418c-8844-bf9149f63046
---
# `_recalloc`
@@ -18,7 +17,7 @@ A combination of `realloc` and `calloc`. Reallocates an array in memory and init
```C
void *_recalloc(
- void *memblock
+ void *memblock,
size_t num,
size_t size
);
@@ -61,7 +60,7 @@ _set_new_mode(1);
early in the program, or link with NEWMODE.OBJ.
-When the application is linked with a debug version of the C run-time libraries, **`_recalloc`** resolves to [`_recalloc_dbg`](recalloc-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).
+When the application is linked with a debug version of the C run-time libraries, **`_recalloc`** resolves to [`_recalloc_dbg`](recalloc-dbg.md). For more information about how the heap is managed during the debugging process, see [The CRT debug heap](../crt-debug-heap-details.md).
**`_recalloc`** 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).
diff --git a/docs/c-runtime-library/reference/remquo-remquof-remquol.md b/docs/c-runtime-library/reference/remquo-remquof-remquol.md
index 9aa9613702..f6236f9679 100644
--- a/docs/c-runtime-library/reference/remquo-remquof-remquol.md
+++ b/docs/c-runtime-library/reference/remquo-remquof-remquol.md
@@ -8,7 +8,6 @@ api_type: ["DLLExport"]
topic_type: ["apiref"]
f1_keywords: ["remquof", "remquol", "remquo"]
helpviewer_keywords: ["remquol function", "remquof function", "remquo function"]
-ms.assetid: a1d3cb8b-8027-4cd3-8deb-04eb17f299fc
---
# `remquo`, `remquof`, `remquol`
@@ -43,7 +42,7 @@ A pointer to an integer to store a value that has the sign and approximate magni
## Remarks
-The **`remquo`** function calculates the floating-point remainder `f` of *`x`* / *`y`* such that *`x`* = `n` \* *`y`* + `f`*, where `n` is an integer, `f` has the same sign as *`x`*, and the absolute value of `f` is less than the absolute value of *`y`*.
+The **`remquo`** function calculates the floating-point remainder `f` of *`x`* / *`y`* such that *`x`* = `n` \* *`y`* + *`f`*, where `n` is an integer, `f` has the same sign as *`x`*, and the absolute value of `f` is less than the absolute value of *`y`*.
C++ allows overloading, so you can call overloads of **`remquo`** that take and return **`float`** or **`long double`** values. In a C program, unless you're using the \ macro to call this function, **`remquo`** always takes two **`double`** arguments and returns a **`double`**.
diff --git a/docs/c-runtime-library/reference/rmtmp.md b/docs/c-runtime-library/reference/rmtmp.md
index 857dc4c035..7fac6abd1a 100644
--- a/docs/c-runtime-library/reference/rmtmp.md
+++ b/docs/c-runtime-library/reference/rmtmp.md
@@ -1,6 +1,6 @@
---
-description: "Learn more about: _rmtmp"
title: "_rmtmp"
+description: "Learn more about: _rmtmp"
ms.date: "4/2/2020"
api_name: ["_rmtmp", "_o__rmtmp"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-stdio-l1-1-0.dll"]
@@ -8,7 +8,6 @@ api_type: ["DLLExport"]
topic_type: ["apiref"]
f1_keywords: ["_rmtmp"]
helpviewer_keywords: ["removing temporary files", "_rmtmp function", "files [C++], temporary", "rmtmp function", "files [C++], removing", "temporary files [C++], removing"]
-ms.assetid: 7419501e-2587-4f2a-b469-0dca07f84736
---
# `_rmtmp`
@@ -17,7 +16,6 @@ Removes temporary files.
## Syntax
```C
-
int _rmtmp( void );
```
diff --git a/docs/c-runtime-library/reference/rotl-rotl64-rotr-rotr64.md b/docs/c-runtime-library/reference/rotl-rotl64-rotr-rotr64.md
index dfdbaae96f..c095e8cada 100644
--- a/docs/c-runtime-library/reference/rotl-rotl64-rotr-rotr64.md
+++ b/docs/c-runtime-library/reference/rotl-rotl64-rotr-rotr64.md
@@ -8,7 +8,6 @@ api_type: ["DLLExport"]
topic_type: ["apiref"]
f1_keywords: ["_rotr64", "rotl64", "_rotl64", "rotr64", "rotr", "_rotr", "_rotl", "rotl"]
helpviewer_keywords: ["rotl64 function", "_rotl function", "rotr function", "rotr64 function", "_rotr function", "rotl function", "_rotl64 function", "rotating bits", "_rotr64 function", "bits, rotating"]
-ms.assetid: cfce439b-366f-4584-8ab1-d527b13fcfc6
---
# `_rotl`, `_rotl64`, `_rotr`, `_rotr64`
@@ -17,7 +16,6 @@ Rotates bits to the left (**`_rotl`**) or right (**`_rotr`**).
## Syntax
```C
-
unsigned int _rotl(
unsigned int value,
int shift
diff --git a/docs/c-runtime-library/reference/rpt-rptf-rptw-rptfw-macros.md b/docs/c-runtime-library/reference/rpt-rptf-rptw-rptfw-macros.md
index e8c4e0bcf0..e143c539a1 100644
--- a/docs/c-runtime-library/reference/rpt-rptf-rptw-rptfw-macros.md
+++ b/docs/c-runtime-library/reference/rpt-rptf-rptw-rptfw-macros.md
@@ -69,7 +69,7 @@ If an `_RPT` macro is called, and `_CrtSetReportMode` and `_CrtSetReportFile` ha
| `_CRT_ERROR` | A pop-up window. Same as if `_CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_WNDW);` had been specified. |
| `_CRT_ASSERT` | Same as `_CRT_ERROR`. |
-When the destination is a debug message window and the user chooses the **Retry** button, `_CrtDbgReport` or `_CrtDbgReportW` returns 1. This return value causes these macros to start the debugger, if just-in-time (JIT) debugging is enabled. For more information about using these macros as a debugging error handling mechanism, see [Using macros for verification and reporting](/visualstudio/debugger/macros-for-reporting).
+When the destination is a debug message window and the user chooses the **Retry** button, `_CrtDbgReport` or `_CrtDbgReportW` returns 1. This return value causes these macros to start the debugger, if just-in-time (JIT) debugging is enabled. For more information about using these macros as a debugging error handling mechanism, see [Macros for reporting](../crt-debugging-techniques.md#macros-for-reporting).
Two other macros exist that generate a debug report. The [`_ASSERT`](assert-asserte-assert-expr-macros.md) macro generates a report, but only when its expression argument evaluates to `FALSE`. [`_ASSERTE`](assert-asserte-assert-expr-macros.md) is exactly like `_ASSERT`, but includes the failed expression in the generated report.
diff --git a/docs/c-runtime-library/reference/rtc-numerrors.md b/docs/c-runtime-library/reference/rtc-numerrors.md
index d512c8f402..f2428d8e7a 100644
--- a/docs/c-runtime-library/reference/rtc-numerrors.md
+++ b/docs/c-runtime-library/reference/rtc-numerrors.md
@@ -1,6 +1,6 @@
---
-description: "Learn more about: _RTC_NumErrors"
title: "_RTC_NumErrors"
+description: "Learn more about: _RTC_NumErrors"
ms.date: "11/04/2016"
api_name: ["_RTC_NumErrors"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll"]
@@ -8,7 +8,6 @@ api_type: ["DLLExport"]
topic_type: ["apiref"]
f1_keywords: ["_RTC_NumErrors", "RTC_NumErrors"]
helpviewer_keywords: ["run-time errors", "_RTC_NumErrors function", "RTC_NumErrors function"]
-ms.assetid: 7e82adae-38e2-4f8b-bc0b-37bda8109fd1
---
# `_RTC_NumErrors`
@@ -17,7 +16,6 @@ Returns the total number of errors that can be detected by run-time error checks
## Syntax
```C
-
int _RTC_NumErrors( void );
```
diff --git a/docs/c-runtime-library/reference/set-abort-behavior.md b/docs/c-runtime-library/reference/set-abort-behavior.md
index 1abfb48f28..957edb7430 100644
--- a/docs/c-runtime-library/reference/set-abort-behavior.md
+++ b/docs/c-runtime-library/reference/set-abort-behavior.md
@@ -14,7 +14,7 @@ helpviewer_keywords: ["aborting programs", "_set_abort_behavior function", "set_
Specifies the action to be taken when a program is abnormally terminated.
> [!NOTE]
-> Do not use the [`abort`](abort.md) function to shut down a Microsoft Store app, except in testing or debugging scenarios. Programmatic or UI ways to close a Store app are not permitted according to the [Microsoft Store policies](/legal/windows/agreements/store-policies). For more information, see [UWP app lifecycle](/windows/uwp/launch-resume/app-lifecycle).
+> Do not use the [`abort`](abort.md) function to shut down a Microsoft Store app, except in testing or debugging scenarios. Programmatic or UI ways to close a Store app are not permitted according to the [Microsoft Store policies](/windows/apps/publish/store-policies). For more information, see [UWP app lifecycle](/windows/uwp/launch-resume/app-lifecycle).
## Syntax
diff --git a/docs/c-runtime-library/reference/set-se-translator.md b/docs/c-runtime-library/reference/set-se-translator.md
index d695b3975d..a52026c5df 100644
--- a/docs/c-runtime-library/reference/set-se-translator.md
+++ b/docs/c-runtime-library/reference/set-se-translator.md
@@ -1,6 +1,6 @@
---
-description: "Learn more about: _set_se_translator"
title: "_set_se_translator"
+description: "Learn more about: _set_se_translator"
ms.date: "1/14/2021"
api_name: ["_set_se_translator"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll"]
@@ -212,4 +212,4 @@ Caught SE_Exception, error c0000094
[`set_terminate`](set-terminate-crt.md)\
[`set_unexpected`](set-unexpected-crt.md)\
[`terminate`](terminate-crt.md)\
-[`unexpected`](unexpected-crt.md)\
+[`unexpected`](unexpected-crt.md)
diff --git a/docs/c-runtime-library/reference/set-unexpected-crt.md b/docs/c-runtime-library/reference/set-unexpected-crt.md
index c6bc98683d..8b5ee60a84 100644
--- a/docs/c-runtime-library/reference/set-unexpected-crt.md
+++ b/docs/c-runtime-library/reference/set-unexpected-crt.md
@@ -1,6 +1,6 @@
---
-description: "Learn more about: set_unexpected (CRT)"
title: "set_unexpected (CRT)"
+description: "Learn more about: set_unexpected (CRT)"
ms.date: "1/14/2021"
api_name: ["set_unexpected"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll"]
@@ -8,7 +8,6 @@ api_type: ["DLLExport"]
topic_type: ["apiref"]
f1_keywords: ["set_unexpected"]
helpviewer_keywords: ["set_unexpected function", "unexpected function", "exception handling, termination"]
-ms.assetid: ebcef032-4771-48e5-88aa-2a1ab8750aa6
---
# `set_unexpected` (CRT)
@@ -62,4 +61,4 @@ For more compatibility information, see [Compatibility](../compatibility.md).
[`_get_unexpected`](get-unexpected.md)\
[`set_terminate`](set-terminate-crt.md)\
[`terminate`](terminate-crt.md)\
-[`unexpected`](unexpected-crt.md)\
+[`unexpected`](unexpected-crt.md)
diff --git a/docs/c-runtime-library/reference/setlocale-wsetlocale.md b/docs/c-runtime-library/reference/setlocale-wsetlocale.md
index 59d994dc06..99991d91a3 100644
--- a/docs/c-runtime-library/reference/setlocale-wsetlocale.md
+++ b/docs/c-runtime-library/reference/setlocale-wsetlocale.md
@@ -1,7 +1,7 @@
---
title: "setlocale, _wsetlocale"
description: "Describes the Microsoft C runtime (CRT) library functions setlocale and _wsetlocale."
-ms.date: 05/05/2022
+ms.date: 01/04/2024
api_name: ["_wsetlocale", "setlocale", "_o__wsetlocale", "_o_setlocale"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-locale-l1-1-0.dll"]
api_type: ["DLLExport"]
@@ -12,7 +12,7 @@ no-loc: [setlocale, _wsetlocale]
---
# `setlocale`, `_wsetlocale`
-Sets or retrieves the run-time locale.
+Set or retrieve the run-time locale.
## Syntax
@@ -21,6 +21,7 @@ char *setlocale(
int category,
const char *locale
);
+
wchar_t *_wsetlocale(
int category,
const wchar_t *locale
@@ -38,10 +39,19 @@ Locale specifier.
## Return value
If a valid *`locale`* and *`category`* are given, the functions return a pointer to the string associated with the specified *`locale`* and *`category`*.
+If the *`locale`* argument is `NULL`, the functions return the current locale.
+
+If an invalid argument is passed to either function, the return value is `NULL`.
+The behavior for invalid arguments is as follows:
-If the *`locale`* or *`category`* isn't valid, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, each function sets `errno` to `EINVAL`, and returns `NULL`.
+|Function | Invalid parameter | Invalid handler invoked as described in [Parameter validation](../parameter-validation.md)| Sets `errno` |
+|---------|---------|---------|
+| `setlocale` | *`category`* | yes | yes |
+| `setlocale` | *`locale`* | no | no |
+| `_wsetlocale` | *`category`* | yes | yes |
+| `_wsetlocale` | *`locale`* | no | no |
-The call
+The call:
```C
setlocale( LC_ALL, "en-US" );
@@ -77,7 +87,7 @@ The *`category`* argument specifies the parts of a program's locale information
| `LC_COLLATE` | The `strcoll`, `_stricoll`, `wcscoll`, `_wcsicoll`, `strxfrm`, `_strncoll`, `_strnicoll`, `_wcsncoll`, `_wcsnicoll`, and `wcsxfrm` functions. |
| `LC_CTYPE` | The character-handling functions (except `isdigit`, `isxdigit`, `mbstowcs`, and `mbtowc`, which are unaffected). |
| `LC_MONETARY` | Monetary-formatting information returned by the `localeconv` function. |
-| `LC_NUMERIC` | Decimal-point character for the formatted output routines (such as `printf`), for the data-conversion routines, and for the non-monetary formatting information returned by `localeconv`. In addition to the decimal-point character, `LC_NUMERIC` sets the thousands separator and the grouping control string returned by [`localeconv`](localeconv.md). |
+| `LC_NUMERIC` | Decimal-point character for the formatted output routines (such as `printf`), for the data-conversion routines, and for the nonmonetary formatting information returned by `localeconv`. In addition to the decimal-point character, `LC_NUMERIC` sets the thousands separator and the grouping control string returned by [`localeconv`](localeconv.md). |
| `LC_TIME` | The `strftime` and `wcsftime` functions. |
This function validates the category parameter. If the category parameter isn't one of the values given in the previous table, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, the function sets `errno` to `EINVAL` and returns `NULL`.
@@ -172,7 +182,7 @@ The function [`_configthreadlocale`](configthreadlocale.md) is used to control w
## UTF-8 support
-Starting in Windows 10 version 1803 (10.0.17134.0), the Universal C Runtime supports using a UTF-8 code page. The change means that `char` strings passed to C runtime functions can expect strings in the UTF-8 encoding. To enable UTF-8 mode, use `".UTF8"` as the code page when using **`setlocale`**. For example, `setlocale(LC_ALL, ".UTF8")` will use the current default Windows ANSI code page (ACP) for the locale and UTF-8 for the code page.
+Starting in Windows 10 version 1803 (10.0.17134.0), the Universal C Runtime supports using a UTF-8 code page. The change means that `char` strings passed to C runtime functions can expect strings in the UTF-8 encoding. To enable UTF-8 mode, use `".UTF8"` as the code page when using **`setlocale`**. For example, `setlocale(LC_ALL, ".UTF8")` uses the current default Windows ANSI code page (ACP) for the locale and UTF-8 for the code page.
The string to specify UTF-8 mode is:
@@ -191,7 +201,7 @@ The following examples show how to specify the UTF-8 string:
After calling `setlocale(LC_ALL, ".UTF8")`, you may pass "😊" to `mbtowcs` and it will be properly translated to a `wchar_t` string. Previously, there wasn't a locale setting available to do this translation.
-UTF-8 mode is also enabled for functions that have historically translated `char` strings using the default Windows ANSI code page (ACP). For example, calling [`_mkdir("😊")`](../reference/mkdir-wmkdir.md) while using a UTF-8 code page will correctly produce a directory with that emoji as the folder name, instead of requiring the ACP to be changed to UTF-8 before running your program. Likewise, calling [`_getcwd()`](../reference/getcwd-wgetcwd.md) in that folder will return a UTF-8 encoded string. For compatibility, the ACP is still used if the C locale code page isn't set to UTF-8.
+UTF-8 mode is also enabled for functions that have historically translated `char` strings using the default Windows ANSI code page (ACP). For example, calling [`_mkdir("😊")`](../reference/mkdir-wmkdir.md) while using a UTF-8 code page will correctly produce a directory with that emoji as the folder name, instead of requiring the ACP to be changed to UTF-8 before running your program. Likewise, calling [`_getcwd()`](../reference/getcwd-wgetcwd.md) in that folder returns a UTF-8 encoded string. For compatibility, the ACP is still used if the C locale code page isn't set to UTF-8.
The following aspects of the C Runtime can't use UTF-8 because they're set during program startup and must use the default Windows ANSI code page (ACP): [`__argv`](../argc-argv-wargv.md), [`_acmdln`](../acmdln-tcmdln-wcmdln.md), and [`_pgmptr`](../pgmptr-wpgmptr.md).
@@ -248,9 +258,8 @@ int get_date(unsigned char* str)
return 0;
}
-// This thread sets its locale to the argument
-// and prints the date.
-uintptr_t __stdcall SecondThreadFunc( void* pArguments )
+// This thread sets its locale to the argument and prints the date.
+unsigned __stdcall SecondThreadFunc(void* pArguments)
{
unsigned char str[BUFF_SIZE];
char * locale = (char *)pArguments;
@@ -288,7 +297,7 @@ int main()
// Create the second thread with a German locale.
// Our thread function takes an argument of the locale to use.
hThread = (HANDLE)_beginthreadex( NULL, 0, &SecondThreadFunc,
- "de-DE", 0, &threadID );
+ (void*)"de-DE", 0, &threadID );
if (get_date(str) == 0)
{
@@ -306,10 +315,10 @@ int main()
```Output
The thread locale is now set to en-US.
-The time in en-US locale is: 'Wednesday, May 12, 2004'
+The date in en-US locale is: 'Thursday, January 4, 2024'
The thread locale is now set to de-DE.
-The time in de-DE locale is: 'Mittwoch, 12. Mai 2004'
+The date in de-DE locale is: 'Donnerstag, 4. Januar 2024'
```
## See also
diff --git a/docs/c-runtime-library/reference/setmode.md b/docs/c-runtime-library/reference/setmode.md
index 6cf30c8844..009bc3bdff 100644
--- a/docs/c-runtime-library/reference/setmode.md
+++ b/docs/c-runtime-library/reference/setmode.md
@@ -41,7 +41,7 @@ For more information about these and other return codes, see [`errno`, `_doserrn
## Remarks
-The **`_setmode`** function sets to *`mode`* the translation mode of the file given by *`fd`*. Passing `_O_TEXT` as *`mode`* sets text (that is, translated) mode. Carriage return-line feed (CR-LF) combinations are translated into a single line feed character on input. Line feed characters are translated into CR-LF combinations on output. Passing `_O_BINARY` sets binary (untranslated) mode, in which these translations are suppressed.
+The **`_setmode`** function sets to *`mode`* the translation mode of the file given by *`fd`*. Passing `_O_TEXT` as *`mode`* sets ANSI text (that is, translated) mode. Carriage return-line feed (CR-LF) combinations are translated into a single line feed character on input. Line feed characters are translated into CR-LF combinations on output. Passing `_O_BINARY` sets binary (untranslated) mode, in which these translations are suppressed.
You can also pass `_O_U16TEXT`, `_O_U8TEXT`, or `_O_WTEXT` to enable Unicode mode, as demonstrated in the second example later in this document.
diff --git a/docs/c-runtime-library/reference/signal.md b/docs/c-runtime-library/reference/signal.md
index 5c04a53d90..ad4bd650a1 100644
--- a/docs/c-runtime-library/reference/signal.md
+++ b/docs/c-runtime-library/reference/signal.md
@@ -14,7 +14,7 @@ helpviewer_keywords: ["signal function"]
Sets interrupt signal handling.
> [!IMPORTANT]
-> Do not use this method to shut down a Microsoft Store app, except in testing or debugging scenarios. Programmatic or UI ways to close a Store app are not permitted according to the [Microsoft Store policies](/legal/windows/agreements/store-policies). For more information, see [UWP app lifecycle](/windows/uwp/launch-resume/app-lifecycle).
+> Do not use this method to shut down a Microsoft Store app, except in testing or debugging scenarios. Programmatic or UI ways to close a Store app are not permitted according to the [Microsoft Store policies](/windows/apps/publish/store-policies). For more information, see [UWP app lifecycle](/windows/uwp/launch-resume/app-lifecycle).
## Syntax
@@ -56,7 +56,7 @@ By default, **`signal`** terminates the calling program with exit code 3, regard
> [!NOTE]
> `SIGINT` is not supported for any Win32 application. When a CTRL+C interrupt occurs, Win32 operating systems generate a new thread to specifically handle that interrupt. This can cause a single-thread application, such as one in UNIX, to become multithreaded and cause unexpected behavior.
-The *`func`* argument is an address to a signal handler that you write, or to one of the predefined constants `SIG_DFL` or `SIG_IGN`, which are also defined in SIGNAL.H. If *`func`* is a function, it's installed as the signal handler for the given signal. The signal handler's prototype requires one formal argument, *`sig`*, of type **`int`**. The operating system provides the actual argument through *`sig`* when an interrupt occurs; the argument is the signal that generated the interrupt. Therefore, you can use the six manifest constants (listed in the preceding table) in your signal handler to determine which interrupt occurred and take appropriate action. For example, you can call **`signal`** twice to assign the same handler to two different signals, and then test the *`sig`* argument in the handler to take different actions based on the signal received.
+The *`func`* argument is an address to a signal handler that you write, or to one of the predefined [signal action constants](../signal-action-constants.md) `SIG_DFL` or `SIG_IGN`, which are also defined in SIGNAL.H. If *`func`* is a function, it's installed as the signal handler for the given signal. The signal handler's prototype requires one formal argument, *`sig`*, of type **`int`**. The operating system provides the actual argument through *`sig`* when an interrupt occurs; the argument is the signal that generated the interrupt. Therefore, you can use the six manifest constants (listed in the preceding table) in your signal handler to determine which interrupt occurred and take appropriate action. For example, you can call **`signal`** twice to assign the same handler to two different signals, and then test the *`sig`* argument in the handler to take different actions based on the signal received.
If you're testing for floating-point exceptions (`SIGFPE`), *`func`* points to a function that takes an optional second argument that is one of several manifest constants, defined in `FLOAT.H`, of the form `FPE_xxx`. When a `SIGFPE` signal occurs, you can test the value of the second argument to determine the kind of floating-point exception, and then take appropriate action. This argument and its possible values are Microsoft extensions.
diff --git a/docs/c-runtime-library/reference/sin-sinf-sinl.md b/docs/c-runtime-library/reference/sin-sinf-sinl.md
index 82e1d8745b..841be1e4a4 100644
--- a/docs/c-runtime-library/reference/sin-sinf-sinl.md
+++ b/docs/c-runtime-library/reference/sin-sinf-sinl.md
@@ -96,4 +96,4 @@ cos( 1.570796 ) = 0.000000
[`atan`, `atanf`, `atanl`, `atan2`, `atan2f`, `atan2l`](atan-atanf-atanl-atan2-atan2f-atan2l.md)\
[`cos`, `cosf`, `cosl`](cos-cosf-cosl.md)\
[`tan`, `tanf`, `tanl`](tan-tanf-tanl.md)\
-[`_CIsin`](../cisin.md)\
+[`_CIsin`](../cisin.md)
diff --git a/docs/c-runtime-library/reference/snprintf-s-snprintf-s-l-snwprintf-s-snwprintf-s-l.md b/docs/c-runtime-library/reference/snprintf-s-snprintf-s-l-snwprintf-s-snwprintf-s-l.md
index a187f9cac4..548a9fccf6 100644
--- a/docs/c-runtime-library/reference/snprintf-s-snprintf-s-l-snwprintf-s-snwprintf-s-l.md
+++ b/docs/c-runtime-library/reference/snprintf-s-snprintf-s-l-snwprintf-s-snwprintf-s-l.md
@@ -1,7 +1,7 @@
---
description: "Learn more about: _snprintf_s, _snprintf_s_l, _snwprintf_s, _snwprintf_s_l"
title: "_snprintf_s, _snprintf_s_l, _snwprintf_s, _snwprintf_s_l"
-ms.date: "3/9/2021"
+ms.date: 06/27/2023
api_name: ["_snprintf_s", "_snprintf_s_l", "_snwprintf_s", "_snwprintf_s_l"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "ntoskrnl.exe"]
api_type: ["DLLExport"]
@@ -11,7 +11,7 @@ helpviewer_keywords: ["_snprintf_s_l function", "_snwprintf_s_l function", "_snt
---
# `_snprintf_s`, `_snprintf_s_l`, `_snwprintf_s`, `_snwprintf_s_l`
-Writes formatted data to a string. These functions are versions of [`snprintf`, `_snprintf`, `_snprintf_l`, `_snwprintf`, `_snwprintf_l`](snprintf-snprintf-snprintf-l-snwprintf-snwprintf-l.md) with security enhancements as described in [Security features in the CRT](../security-features-in-the-crt.md).
+Writes formatted data to a string. These functions are versions of [`snprintf`, `_snprintf`, `_snprintf_l`, `_snwprintf`, `_snwprintf_l`](snprintf-snprintf-snprintf-l-snwprintf-snwprintf-l.md) with security enhancements described in [Security features in the CRT](../security-features-in-the-crt.md).
## Syntax
@@ -23,6 +23,7 @@ int _snprintf_s(
const char *format [,
argument] ...
);
+
int _snprintf_s_l(
char *buffer,
size_t sizeOfBuffer,
@@ -31,6 +32,7 @@ int _snprintf_s_l(
_locale_t locale [,
argument] ...
);
+
int _snwprintf_s(
wchar_t *buffer,
size_t sizeOfBuffer,
@@ -38,6 +40,7 @@ int _snwprintf_s(
const wchar_t *format [,
argument] ...
);
+
int _snwprintf_s_l(
wchar_t *buffer,
size_t sizeOfBuffer,
@@ -46,6 +49,7 @@ int _snwprintf_s_l(
_locale_t locale [,
argument] ...
);
+
template
int _snprintf_s(
char (&buffer)[size],
@@ -53,6 +57,7 @@ int _snprintf_s(
const char *format [,
argument] ...
); // C++ only
+
template
int _snwprintf_s(
wchar_t (&buffer)[size],
@@ -68,10 +73,10 @@ int _snwprintf_s(
Storage location for the output.
*`sizeOfBuffer`*\
-The size of the storage location for output. Size in **`bytes`** for **`_snprintf_s`** or size in **`words`** for **`_snwprintf_s`**.
+The size of the storage location for output. Size in **bytes** for the functions that take `char`, and **words** for those that take `wchar_t`.
*`count`*\
-Maximum number of characters to store, or [`_TRUNCATE`](../truncate.md).
+Maximum number of characters to write. For the functions that take `wchar_t`, it's the maximum number of wide characters to write. Or [`_TRUNCATE`](../truncate.md).
*`format`*\
Format-control string.
@@ -84,27 +89,46 @@ The locale to use.
## Return value
-**`_snprintf_s`** returns the number of characters stored in *`buffer`*, not counting the terminating null character. **`_snwprintf_s`** returns the number of wide characters stored in *`buffer`*, not counting the terminating null wide character.
+The number of characters written, not including the terminating `NULL`. A negative value is returned if an output error occurs. See [Behavior summary](#behavior-summary) for details.
-If the storage required to store the data and a terminating null exceeds *`sizeOfBuffer`*, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution continues after the invalid parameter handler, these functions set *`buffer`* to an empty string, set `errno` to `ERANGE`, and return -1.
+## Remarks
-If *`buffer`* or *`format`* is a `NULL` pointer, or if *`count`* is less than or equal to zero, the invalid parameter handler is invoked. If execution is allowed to continue, these functions set `errno` to `EINVAL` and return -1.
+The **`_snprintf_s`** function formats and stores *`count`* or fewer characters in *`buffer`* and appends a terminating `NULL`. Each argument (if any) is converted and output according to the corresponding format specification in *`format`*. The formatting is consistent with the **`printf`** family of functions; see [Format specification syntax: `printf` and `wprintf` functions](../format-specification-syntax-printf-and-wprintf-functions.md). If copying occurs between strings that overlap, the behavior is undefined.
-For information about these and other error codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md).
+### Behavior summary
-## Remarks
+For the following table:
-The **`_snprintf_s`** function formats and stores *`count`* or fewer characters in *`buffer`* and appends a terminating null. Each argument (if any) is converted and output according to the corresponding format specification in *`format`*. The formatting is consistent with the **`printf`** family of functions; see [Format specification syntax: `printf` and `wprintf` functions](../format-specification-syntax-printf-and-wprintf-functions.md). If copying occurs between strings that overlap, the behavior is undefined.
+-Let `len` be the size of the formatted data. If the function takes a `char` buffer, the size is in bytes. If the function takes a `wchar_t` buffer, the size specifies the number of 16-bit words.
+- Characters refer to `char` characters for functions that take a `char` buffer, and to `wchar_t` characters for functions that take a `wchar_t` buffer.
+- For more information about the invalid parameter handler, see [Parameter Validation](../../c-runtime-library/parameter-validation.md).
-If *`count`* is [`_TRUNCATE`](../truncate.md), then **`_snprintf_s`** writes as much of the string as will fit in *`buffer`* while leaving room for a terminating null. If the entire string (with terminating null) fits in *`buffer`*, then **`_snprintf_s`** returns the number of characters written (not including the terminating null); otherwise, **`_snprintf_s`** returns -1 to indicate that truncation occurred.
+| Condition | Behavior | Return value | `errno` | Invokes invalid parameter handler |
+|--|--|--|--|--|
+| Success | Writes the characters into the buffer using the specified format string.| The number of characters written, not including the terminating `NULL`. | N/A | No |
+| Encoding error during formatting | If processing string specifier `s`, `S`, or `Z`, format specification processing stops. | -1 | `EILSEQ` (42) | No |
+| Encoding error during formatting | If processing character specifier `c` or `C`, the invalid character is skipped. The number of characters written isn't incremented for the skipped character, nor is any data written for it. Processing the format specification continues after skipping the specifier with the encoding error. | The number of characters written, not including the terminating `NULL`. | `EILSEQ` (42) | No |
+| `buffer == NULL` and `sizeOfBuffer == 0` and `count == 0` | No data is written. | 0 | N/A | No |
+| `buffer == NULL` and either `sizeOfBuffer != 0` or `count != 0` | If execution continues after invalid parameter handler executes, sets `errno` and returns a negative value. | -1 | `EINVAL` (22) | Yes |
+| `buffer != NULL` and `sizeOfBuffer == 0` | No data is written. | -1 | `EINVAL` (22) | Yes |
+| `count == 0`| A `NULL` is placed at the beginning of the buffer. | -1 | N/A | No |
+| `count < 0`| Unsafe: the value is treated as unsigned, likely creating a large value that results in overwriting the memory that follows the buffer. | The number of characters written, not including the terminating `NULL`. | N/A | No |
+| `count < sizeOfBuffer` and `len <= count` | All of the data is written and a terminating `NULL` is appended. | The number of characters written. | N/A | No |
+| `count < sizeOfBuffer` and `len > count` | The first *`count`* characters are written and a terminating `NULL` is appended. | -1 | N/A | No |
+| `count >= sizeOfBuffer` and `len < sizeOfBuffer` | All of the data is written with a terminating `NULL`. | The number of characters written. | N/A | No |
+| `count >= sizeOfBuffer` and `len >= sizeOfBuffer` and `count != _TRUNCATE` | If execution continues after invalid parameter handler executes, sets `errno`, sets `buffer[0] == NULL`, and returns a negative value. | -1 | `ERANGE` (34) | Yes |
+| `count == _TRUNCATE` and `len >= sizeOfBuffer` | Writes as much of the string as fits in *`buffer`* and a terminating `NULL`. | -1 | N/A | No |
+| `count == _TRUNCATE` and `len < sizeOfBuffer` | Writes the entire string into *`buffer`* with a terminating `NULL`. | Number of characters written, not including the terminating `NULL`. | N/A | No |
+| `format == NULL` | No data is written. If execution continues after invalid parameter handler executes, sets `errno` and returns a negative value. | -1 | `EINVAL` (22) | Yes |
+
+For information about these and other error codes, see [`_doserrno`, `errno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md).
> [!IMPORTANT]
> Ensure that *`format`* is not a user-defined string.
>
->
> Starting in Windows 10 version 2004 (build 19041), the `printf` family of functions prints exactly representable floating point numbers according to the IEEE 754 rules for rounding. In previous versions of Windows, exactly representable floating point numbers ending in '5' would always round up. IEEE 754 states that they must round to the closest even digit (also known as "Banker's Rounding"). For example, both `printf("%1.0f", 1.5)` and `printf("%1.0f", 2.5)` should round to 2. Previously, 1.5 would round to 2 and 2.5 would round to 3. This change only affects exactly representable numbers. For example, 2.35 (which, when represented in memory, is closer to 2.35000000000000008) continues to round up to 2.4. Rounding done by these functions now also respects the floating point rounding mode set by [`fesetround`](fegetround-fesetround2.md). Previously, rounding always chose `FE_TONEAREST` behavior. This change only affects programs built using Visual Studio 2019 version 16.2 and later. To use the legacy floating point rounding behavior, link with ['legacy_stdio_float_rounding.obj`](../link-options.md).
-**`_snwprintf_s`** is a wide-character version of **`_snprintf_s`**; the pointer arguments to **`_snwprintf_s`** are wide-character strings. Detection of encoding errors in **`_snwprintf_s`** might differ from the detection in **`_snprintf_s`**. **`_snwprintf_s`**, like **`swprintf_s`**, writes output to a string rather than to a destination of type `FILE`.
+**`_snwprintf_s`** is a wide-character version of **`_snprintf_s`**; the pointer arguments to **`_snwprintf_s`** are wide-character strings. Detection of encoding errors in **`_snwprintf_s`** might differ from that in **`_snprintf_s`**. **`_snwprintf_s`**, like **`swprintf_s`**, writes output to a string rather than to a destination of type **`FILE`**.
The versions of these functions with the **`_l`** suffix are identical except that they use the locale parameter passed in instead of the current thread locale.
@@ -112,17 +136,17 @@ In C++, using these functions is simplified by template overloads; the overloads
### Generic-text routine mappings
-| `Tchar.h` routine | `_UNICODE` and `_MBCS` not defined | `_MBCS` defined | `_UNICODE` defined |
+|`Tchar.h` routine|`_UNICODE` and `_MBCS` not defined|`_MBCS` defined|`_UNICODE` defined|
|---|---|---|---|
-| `_sntprintf_s` | **`_snprintf_s`** | **`_snprintf_s`** | **`_snwprintf_s`** |
-| `_sntprintf_s_l` | **`_snprintf_s_l`** | **`_snprintf_s_l`** | **`_snwprintf_s_l`** |
+|**`_sntprintf_s`**|**`_snprintf_s`**|**`_snprintf_s`**|**`_snwprintf_s`**|
+|**`_sntprintf_s_l`**|**`_snprintf_s_l`**|**`_snprintf_s_l`**|**`_snwprintf_s_l`**|
## Requirements
-| Routine | Required header |
+|Routine|Required header|
|---|---|
-| **`_snprintf_s`**, **`_snprintf_s_l`** | `` |
-| **`_snwprintf_s`**, **`_snwprintf_s_l`** | `` or `` |
+|**`_snprintf_s`**, **`_snprintf_s_l`**|``|
+|**`_snwprintf_s`**, **`_snwprintf_s_l`**|`` or ``|
For more compatibility information, see [Compatibility](../compatibility.md).
diff --git a/docs/c-runtime-library/reference/snprintf-snprintf-snprintf-l-snwprintf-snwprintf-l.md b/docs/c-runtime-library/reference/snprintf-snprintf-snprintf-l-snwprintf-snwprintf-l.md
index 0d5234db5d..6043ec459e 100644
--- a/docs/c-runtime-library/reference/snprintf-snprintf-snprintf-l-snwprintf-snwprintf-l.md
+++ b/docs/c-runtime-library/reference/snprintf-snprintf-snprintf-l-snwprintf-snwprintf-l.md
@@ -1,7 +1,7 @@
---
title: "snprintf, _snprintf, _snprintf_l, _snwprintf, _snwprintf_l"
description: "API reference for snprintf, _snprintf, _snprintf_l, _snwprintf, and _snwprintf_; which write formatted data to a string."
-ms.date: "3/9/2021"
+ms.date: 06/27/2023
api_name: ["_snwprintf", "_snprintf", "_snprintf_l", "_snwprintf_l", "snprintf"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "ntoskrnl.exe"]
api_type: ["DLLExport"]
@@ -22,12 +22,14 @@ int snprintf(
const char *format [,
argument] ...
);
+
int _snprintf(
char *buffer,
size_t count,
const char *format [,
argument] ...
);
+
int _snprintf_l(
char *buffer,
size_t count,
@@ -35,12 +37,14 @@ int _snprintf_l(
_locale_t locale [,
argument] ...
);
+
int _snwprintf(
wchar_t *buffer,
size_t count,
const wchar_t *format [,
argument] ...
);
+
int _snwprintf_l(
wchar_t *buffer,
size_t count,
@@ -48,6 +52,7 @@ int _snwprintf_l(
_locale_t locale [,
argument] ...
);
+
template
int _snprintf(
char (&buffer)[size],
@@ -55,6 +60,7 @@ int _snprintf(
const char *format [,
argument] ...
); // C++ only
+
template
int _snprintf_l(
char (&buffer)[size],
@@ -63,6 +69,7 @@ int _snprintf_l(
_locale_t locale [,
argument] ...
); // C++ only
+
template
int _snwprintf(
wchar_t (&buffer)[size],
@@ -70,6 +77,7 @@ int _snwprintf(
const wchar_t *format [,
argument] ...
); // C++ only
+
template
int _snwprintf_l(
wchar_t (&buffer)[size],
@@ -86,7 +94,7 @@ int _snwprintf_l(
Storage location for the output.
*`count`*\
-Maximum number of characters to store.
+Maximum number of characters to write. For the functions that take `wchar_t`, it's the maximum number of wide characters to write.
*`format`*\
Format-control string.
@@ -95,37 +103,61 @@ Format-control string.
Optional arguments.
*`locale`*\
-The locale to use.
+The locale to use to format the output.
For more information, see [Format specification syntax: `printf` and `wprintf` functions](../format-specification-syntax-printf-and-wprintf-functions.md).
## Return value
-Let **`len`** be the length of the formatted data string, not including the terminating null. Both **`len`** and **`count`** are the number of characters for **`snprintf`** and **`_snprintf`**, and the number of wide characters for **`_snwprintf`**.
+The number of characters that which would have been written to the buffer if `count` was ignored. The count doesn't include the terminating `NULL` character.
+
+Let **`len`** be the length of the formatted data string, not including the terminating `NULL`.\
+For all functions, if `len < count`, then **`len`** characters are stored in *`buffer`*, a null-terminator is appended, and the number of characters written, not including the terminating `NULL`, is returned.
-For all functions, if **`len`** < *`count`*, **`len`** characters are stored in *`buffer`*, a null-terminator is appended, and **`len`** is returned.
+The wide character versions of these functions return the number of wide characters written, not including the terminating `NULL`.
-The **`snprintf`** function truncates the output when **`len`** is greater than or equal to *`count`*, by placing a null-terminator at `buffer[count-1]`. The value returned is **`len`**, the number of characters that would have been output if *`count`* was large enough. The **`snprintf`** function returns a negative value if an encoding error occurs.
+See [Behavior summary](#behavior-summary) for details.
-For all functions other than **`snprintf`**, if **`len`** = *`count`*, **`len`** characters are stored in *`buffer`*, no null-terminator is appended, and **`len`** is returned. If **`len`** > *`count`*, *`count`* characters are stored in *`buffer`*, no null-terminator is appended, and a negative value is returned.
+## Remarks
-If *`buffer`* is a null pointer and *`count`* is zero, **`len`** is returned as the count of characters required to format the output, not including the terminating null. To make a successful call with the same *`argument`* and *`locale`* parameters, allocate a buffer holding at least **`len`** + 1 characters.
+Beginning with the UCRT in Visual Studio 2015 and Windows 10, **`snprintf`** is no longer identical to **`_snprintf`**. The **`snprintf`** behavior is now C99 standard conformant. The difference is that if you run out of buffer, `snprintf` null-terminates the end of the buffer and returns the number of characters that would have been required whereas `_snprintf` doesn't null-terminate the buffer and returns -1. Also, `_snprintf()` includes one more character in the output because it doesn't null-terminate the buffer.
-If *`buffer`* is a null pointer and *`count`* is nonzero, or if *`format`* is a null pointer, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, these functions return -1 and set `errno` to `EINVAL`.
+- **`snprintf`** and the **`_snprintf`** family of functions format and store *`count`* or fewer characters in *`buffer`*.
+- **`snprintf`** always stores a terminating `NULL` character, truncating the output if necessary.
+- If **`snprintf`** returns a value > *`count`* - 1, the output has been truncated.
+- The **`_snprintf`** family of functions only appends a terminating `NULL` character if the formatted string length is strictly less than *`count`* characters.
+- Each *`argument`* (if any) is converted and is output according to the corresponding format specification in *`format`*. The format consists of ordinary characters and has the same form and function as the *`format`* argument for [`printf`](printf-printf-l-wprintf-wprintf-l.md). If copying occurs between strings that overlap, the behavior is undefined.
-For information about these and other error codes, see [`errno`, `_doserrno`, `_sys_errlist, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md).
+### Behavior summary
-## Remarks
+For the following table:
-The **`snprintf`** function and the **`_snprintf`** family of functions format and store *`count`* or fewer characters in *`buffer`*. The **`snprintf`** function always stores a terminating null character, truncating the output if necessary. The **`_snprintf`** family of functions only appends a terminating null character if the formatted string length is strictly less than *`count`* characters. Each *`argument`* (if any) is converted and is output according to the corresponding format specification in *`format`*. The format consists of ordinary characters and has the same form and function as the *`format`* argument for [`printf`](printf-printf-l-wprintf-wprintf-l.md). If copying occurs between strings that overlap, the behavior is undefined.
+- Let `sizeOfBuffer` be the size of `buffer`. If the function takes a `char` buffer, the size is in bytes. If the function takes a `wchar_t` buffer, the size specifies the number of 16-bit words.
+- Let `len` be the size of the formatted data. If the function takes a `char` buffer, the size is in bytes. If the function takes a `wchar_t` buffer, the size specifies the number of 16-bit words.
+- Characters refer to `char` characters for functions that take a `char` buffer, and to `wchar_t` characters for functions that take a `wchar_t` buffer.
+- For more information about the invalid parameter handler, see [Parameter Validation](../../c-runtime-library/parameter-validation.md).
+
+| Condition | Behavior | Return value | `errno` | Invokes invalid parameter handler |
+|--|--|--|--|--|
+| Success | Writes the characters into the buffer using the specified format string. | The number of characters written. | N/A | No |
+| Encoding error during formatting | If processing string specifier `s`, `S`, or `Z`, format specification processing stops, a `NULL` is placed at the beginning of the buffer. | -1 | `EILSEQ` (42) | No |
+| Encoding error during formatting | If processing character specifier `c` or `C`, the invalid character is skipped. The number of characters written isn't incremented for the skipped character, nor is any data written for it. Processing the format specification continues after skipping the specifier with the encoding error. | The number of characters written, not including the terminating `NULL`. | `EILSEQ` (42) | No |
+| `buffer == NULL` and `count != 0` | If execution continues after invalid parameter handler executes, sets `errno` and returns a negative value. | -1 | `EINVAL` (22) | Yes |
+| `count == 0` | The number of characters that would have been written, not including the terminating `NULL`. You can use this result to allocate sufficient buffer space for the string and a terminating `NULL`, and then call the function again to fill the buffer. | N/A | No |
+| `count < 0`| Unsafe: the value is treated as unsigned, likely creating a large value that results in overwriting the memory that follows the buffer. | The number of characters written | N/A | No |
+| `count < sizeOfBuffer` and `len <= count` | All of the data is written and a terminating `NULL` is appended. | The number of characters written, not including the terminating `NULL`. | N/A | No |
+| `count < sizeOfBuffer` and `len > count` | The first *`count-1`* characters are written followed by a null-terminator. | The number of characters that would have been written had `count` matched the number of characters to output, not including the null-terminator. | N/A | No |
+| `count >= sizeOfBuffer` and `len < sizeOfBuffer` | All of the data is written with a terminating `NULL`. | The number of characters written, not including the terminating `NULL`. | N/A | No |
+| `count >= sizeOfBuffer` and `len >= sizeOfBuffer` | Unsafe: Overwrites the memory that follows the buffer. | The number of characters written, not including the terminating `NULL`. | N/A | No |
+| `format == NULL` | No data is written. If execution continues after invalid parameter handler executes, sets `errno` and returns a negative value. | -1 | `EINVAL` (22) | Yes |
+
+For information about these and other error codes, see [`_doserrno`, `errno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md).
> [!IMPORTANT]
> Ensure that *`format`* is not a user-defined string. Because the **`_snprintf`** functions do not guarantee null termination—in particular, when the return value is *`count`*—make sure that they are followed by code that adds the null terminator. For more information, see [Avoiding buffer overruns](/windows/win32/SecBP/avoiding-buffer-overruns).
>
> Starting in Windows 10 version 2004 (build 19041), the `printf` family of functions prints exactly representable floating point numbers according to the IEEE 754 rules for rounding. In previous versions of Windows, exactly representable floating point numbers ending in '5' would always round up. IEEE 754 states that they must round to the closest even digit (also known as "Banker's Rounding"). For example, both `printf("%1.0f", 1.5)` and `printf("%1.0f", 2.5)` should round to 2. Previously, 1.5 would round to 2 and 2.5 would round to 3. This change only affects exactly representable numbers. For example, 2.35 (which, when represented in memory, is closer to 2.35000000000000008) continues to round up to 2.4. Rounding done by these functions now also respects the floating point rounding mode set by [`fesetround`](fegetround-fesetround2.md). Previously, rounding always chose `FE_TONEAREST` behavior. This change only affects programs built using Visual Studio 2019 version 16.2 and later. To use the legacy floating point rounding behavior, link with [`legacy_stdio_float_rounding.obj`](../link-options.md).
-Beginning with the UCRT in Visual Studio 2015 and Windows 10, **`snprintf`** is no longer identical to **`_snprintf`**. The **`snprintf`** function behavior is now C99 standard conformant.
-
**`_snwprintf`** is a wide-character version of **`_snprintf`**; the pointer arguments to **`_snwprintf`** are wide-character strings. Detection of encoding errors in **`_snwprintf`** might differ from the detection in **`_snprintf`**. **`_snwprintf`**, just like **`swprintf`**, writes output to a string instead of a destination of type `FILE`.
The versions of these functions that have the **`_l`** suffix are identical except that they use the locale parameter passed in instead of the current thread locale.
diff --git a/docs/c-runtime-library/reference/sopen-s-wsopen-s.md b/docs/c-runtime-library/reference/sopen-s-wsopen-s.md
index d6e46d00ef..04f2bd984a 100644
--- a/docs/c-runtime-library/reference/sopen-s-wsopen-s.md
+++ b/docs/c-runtime-library/reference/sopen-s-wsopen-s.md
@@ -1,6 +1,6 @@
---
-description: "Learn more about: _sopen_s, _wsopen_s"
title: "_sopen_s, _wsopen_s"
+description: "Learn more about: _sopen_s, _wsopen_s"
ms.date: 05/18/2022
api_name: ["_sopen_s", "_wsopen_s", "_o__sopen_s", "_o__wsopen_s"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-stdio-l1-1-0.dll"]
@@ -8,7 +8,6 @@ api_type: ["DLLExport"]
topic_type: ["apiref"]
f1_keywords: ["CORECRT_IO/_sopen_s", "CORECRT_WIO/_wsopen_s", "TCHAR/_tsopen_s", "_sopen_s", "_wsopen_s", "_tsopen_s", "sopen_s", "wsopen_s"]
helpviewer_keywords: ["sopen_s function", "_wsopen_s function", "wsopen_s function", "opening files, for sharing", "files [C++], opening", "_sopen_s function", "files [C++], sharing"]
-ms.assetid: 059a0084-d08c-4973-9174-55e391b72aa2
---
# `_sopen_s`, `_wsopen_s`
@@ -29,7 +28,7 @@ errno_t _wsopen_s(
const wchar_t *filename,
int oflag,
int shflag,
- int pmode,
+ int pmode
);
```
@@ -95,7 +94,7 @@ The integer expression *`oflag`* is formed by combining one or more manifest con
| `_O_RDONLY` | Opens a file for reading only. Can't be specified with `_O_RDWR` or `_O_WRONLY`. |
| `_O_RDWR` | Opens a file for both reading and writing. Can't be specified with `_O_RDONLY` or `_O_WRONLY`. |
| `_O_SEQUENTIAL` | Specifies that caching is optimized for, but not restricted to, sequential access from disk. |
-| `_O_TEXT` | Opens a file in text (translated) mode. (For more information, see [Text and binary mode file I/O](../text-and-binary-mode-file-i-o.md) and [`fopen`](fopen-wfopen.md).) |
+| `_O_TEXT` | Opens a file in ANSI text (translated) mode. (For more information, see [Text and binary mode file I/O](../text-and-binary-mode-file-i-o.md) and [`fopen`](fopen-wfopen.md).) |
| `_O_TRUNC` | Opens a file and truncates it to zero length; the file must have write permission. Can't be specified with `_O_RDONLY`. `_O_TRUNC` used with `_O_CREAT` opens an existing file or creates a file. **Note:** The `_O_TRUNC` flag destroys the contents of the specified file. |
| `_O_WRONLY` | Opens a file for writing only. Can't be specified with `_O_RDONLY` or `_O_RDWR`. |
| `_O_U16TEXT` | Opens a file in Unicode UTF-16 mode. |
diff --git a/docs/c-runtime-library/reference/sopen-wsopen.md b/docs/c-runtime-library/reference/sopen-wsopen.md
index 9df104ac25..c3e9b3a0aa 100644
--- a/docs/c-runtime-library/reference/sopen-wsopen.md
+++ b/docs/c-runtime-library/reference/sopen-wsopen.md
@@ -88,7 +88,7 @@ The integer expression *`oflag`* is formed by combining one or more of the follo
| `_O_RDONLY` | Opens a file for reading only. Can't be specified with `_O_RDWR` or `_O_WRONLY`. |
| `_O_RDWR` | Opens a file for both reading and writing. Can't be specified with `_O_RDONLY` or `_O_WRONLY`. |
| `_O_SEQUENTIAL` | Specifies that caching is optimized for, but not restricted to, sequential access from disk. |
-| `_O_TEXT` | Opens a file in text (translated) mode. (For more information, see [Text and binary mode file I/O](../text-and-binary-mode-file-i-o.md) and [`fopen`](fopen-wfopen.md).) |
+| `_O_TEXT` | Opens a file in ANSI text (translated) mode. (For more information, see [Text and binary mode file I/O](../text-and-binary-mode-file-i-o.md) and [`fopen`](fopen-wfopen.md).) |
| `_O_TRUNC` | Opens a file and truncates it to zero length; the file must have write permission. Can't be specified with `_O_RDONLY`. `_O_TRUNC` used with `_O_CREAT` opens an existing file or creates a file. **Note:** The `_O_TRUNC` flag destroys the contents of the specified file. |
| `_O_WRONLY` | Opens a file for writing only. Can't be specified with `_O_RDONLY` or `_O_RDWR`. |
| `_O_U16TEXT` | Opens a file in Unicode UTF-16 mode. |
diff --git a/docs/c-runtime-library/reference/splitpath-wsplitpath.md b/docs/c-runtime-library/reference/splitpath-wsplitpath.md
index 216a8c9caa..f11ecc1e6d 100644
--- a/docs/c-runtime-library/reference/splitpath-wsplitpath.md
+++ b/docs/c-runtime-library/reference/splitpath-wsplitpath.md
@@ -1,18 +1,17 @@
---
-description: "Learn more about: _splitpath, _wsplitpath"
title: "_splitpath, _wsplitpath"
-ms.date: "4/2/2020"
+description: "Learn more about: _splitpath, _wsplitpath"
+ms.date: 11/30/2023
api_name: ["_wsplitpath", "_splitpath", "_o__splitpath", "_o__wsplitpath"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-filesystem-l1-1-0.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
f1_keywords: ["wsplitpath", "_splitpath", "splitpath", "_wsplitpath", "_tsplitpath"]
helpviewer_keywords: ["_splitpath function", "pathnames", "wsplitpath function", "splitpath function", "_wsplitpath function", "tsplitpath function", "path names", "_tsplitpath function"]
-ms.assetid: 32bd76b5-1385-4ee8-a64c-abcb541cd2e4
---
# `_splitpath`, `_wsplitpath`
-Break a path name into components. More secure versions of these functions are available, see [`_splitpath_s`, `_wsplitpath_s`](splitpath-s-wsplitpath-s.md).
+Break a path into components. For more secure versions of these functions are available, see [`_splitpath_s`, `_wsplitpath_s`](splitpath-s-wsplitpath-s.md).
## Syntax
@@ -42,19 +41,19 @@ Full path.
Drive letter, followed by a colon (**:**). You can pass `NULL` for this parameter if you don't need the drive letter.
*`dir`*\
-Directory path, including trailing slash. Forward slashes ( **/** ), backslashes ( **\\** ), or both may be used. You can pass `NULL` for this parameter if you don't need the directory path.
+Directory path, including trailing slash. Forward slashes (`/`), backslashes (`\`), or both may be used. Pass `NULL` for this parameter if you don't need the directory path.
*`fname`*\
-Base filename (no extension). You can pass `NULL` for this parameter if you don't need the filename.
+Base filename (no extension). Pass `NULL` for this parameter if you don't need the filename.
*`ext`*\
-Filename extension, including leading period (**.**). You can pass `NULL` for this parameter if you don't need the filename extension.
+Filename extension, including leading period (`.`). Pass `NULL` for this parameter if you don't need the filename extension.
## Remarks
The **`_splitpath`** function breaks a path into its four components. **`_splitpath`** automatically handles multibyte-character string arguments as appropriate, recognizing multibyte-character sequences according to the multibyte code page currently in use. **`_wsplitpath`** is a wide-character version of **`_splitpath`**; the arguments to **`_wsplitpath`** are wide-character strings. These functions behave identically otherwise.
-**Security Note** These functions incur a potential threat brought about by a buffer overrun problem. Buffer overrun problems are a frequent method of system attack, resulting in an unwarranted elevation of privilege. For more information, see [Avoiding buffer overruns](/windows/win32/SecBP/avoiding-buffer-overruns). More secure versions of these functions are available; see [`_splitpath_s`, `_wsplitpath_s`](splitpath-s-wsplitpath-s.md).
+**Security Note** These functions are subject to buffer overrun. Buffer overrun problems are a frequent method of system attack, resulting in an unwarranted elevation of privilege. For more information, see [Avoiding buffer overruns](/windows/win32/SecBP/avoiding-buffer-overruns). More secure versions of these functions are available; see [`_splitpath_s`, `_wsplitpath_s`](splitpath-s-wsplitpath-s.md).
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).
@@ -81,7 +80,7 @@ If the full path doesn't contain a component (for example, a filename), **`_spli
You can pass `NULL` to **`_splitpath`** for any parameter other than *`path`* that you don't need.
-If *`path`* is `NULL`, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, `errno` is set to `EINVAL` and the function returns `EINVAL`.
+If *`path`* is `NULL`, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, `errno` is set to `EINVAL`.
## Requirements
diff --git a/docs/c-runtime-library/reference/sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md b/docs/c-runtime-library/reference/sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md
index 8fadaa493f..960c47657c 100644
--- a/docs/c-runtime-library/reference/sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md
+++ b/docs/c-runtime-library/reference/sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md
@@ -1,15 +1,15 @@
---
-description: "Learn more about: sprintf, _sprintf_l, swprintf, _swprintf_l, __swprintf_l"
+description: "Learn more about: sprintf, _sprintf_l, swprintf, _swprintf, _swprintf_l, __swprintf_l"
title: "sprintf, _sprintf_l, swprintf, _swprintf_l, __swprintf_l"
ms.date: "3/9/2021"
-api_name: ["__swprintf_l", "sprintf", "_sprintf_l", "_swprintf_l", "swprintf"]
+api_name: ["__swprintf_l", "sprintf", "_sprintf_l", "_swprintf_l", "swprintf", "_swprintf"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ntdll.dll", "ucrtbase.dll", "ntoskrnl.exe"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["_stprintf_l", "__swprintf_l", "sprintf_l", "swprintf", "_sprintf_l", "sprintf", "_stprintf", "stprintf_l"]
-helpviewer_keywords: ["_swprintf_l function", "_stprintf function", "__swprintf_l function", "stprintf function", "sprintf function", "_sprintf_l function", "_stprintf_l function", "swprintf function", "strings [C++], writing to", "_CRT_NON_CONFORMING_SWPRINTFS", "swprintf_l function", "stprintf_l function", "sprintf_l function", "formatted text [C++]"]
+f1_keywords: ["_stprintf_l", "__swprintf_l", "sprintf_l", "_swprintf", "swprintf", "_sprintf_l", "sprintf", "_stprintf", "stprintf_l"]
+helpviewer_keywords: ["_swprintf_l function", "_stprintf function", "__swprintf_l function", "stprintf function", "sprintf function", "_sprintf_l function", "_stprintf_l function", "swprintf function", "_swprintf function", "strings [C++], writing to", "_CRT_NON_CONFORMING_SWPRINTFS", "swprintf_l function", "stprintf_l function", "sprintf_l function", "formatted text [C++]"]
---
-# `sprintf`, `_sprintf_l`, `swprintf`, `_swprintf_l`, `__swprintf_l`
+# `sprintf`, `_sprintf_l`, `swprintf`, `_swprintf`, `_swprintf_l`, `__swprintf_l`
Write formatted data to a string. More secure versions of some of these functions are available; see [`sprintf_s`, `_sprintf_s_l`, `swprintf_s`, `_swprintf_s_l`](sprintf-s-sprintf-s-l-swprintf-s-swprintf-s-l.md). The secure versions of **`swprintf`** and **`_swprintf_l`** take the size of the buffer as a parameter.
@@ -21,18 +21,27 @@ int sprintf(
const char *format [,
argument] ...
);
+
int _sprintf_l(
char *buffer,
const char *format,
_locale_t locale [,
argument] ...
);
+
int swprintf(
wchar_t *buffer,
size_t count,
const wchar_t *format [,
argument]...
);
+
+int _swprintf(
+ wchar_t *buffer,
+ const wchar_t *format [,
+ argument]...
+);
+
int _swprintf_l(
wchar_t *buffer,
size_t count,
@@ -40,18 +49,21 @@ int _swprintf_l(
_locale_t locale [,
argument] ...
);
+
int __swprintf_l(
wchar_t *buffer,
const wchar_t *format,
_locale_t locale [,
argument] ...
);
+
template
int sprintf(
char (&buffer)[size],
const char *format [,
argument] ...
); // C++ only
+
template
int _sprintf_l(
char (&buffer)[size],
@@ -91,13 +103,13 @@ The number of characters written, or -1 if an error occurred. If *`buffer`* or *
The **`sprintf`** function formats and stores a series of characters and values in *`buffer`*. Each *`argument`* (if any) is converted and output according to the corresponding format specification in *`format`*. The format consists of ordinary characters and has the same form and function as the *`format`* argument for [`printf`](printf-printf-l-wprintf-wprintf-l.md). A null character is appended after the last character written. If copying occurs between strings that overlap, the behavior is undefined.
> [!IMPORTANT]
-> Using **`sprintf`**, there is no way to limit the number of characters written, which means that code using **`sprintf`** is susceptible to buffer overruns. Consider using the related function [`_snprintf`](snprintf-snprintf-snprintf-l-snwprintf-snwprintf-l.md), which specifies a maximum number of characters to write to *`buffer`*, or use [`_scprintf`](scprintf-scprintf-l-scwprintf-scwprintf-l.md) to determine how large a buffer is required. Also, ensure that *`format`* is not a user-defined string.
+> Using **`sprintf`**, there is no way to limit the number of characters written, which means that code using **`sprintf`** is susceptible to buffer overruns. Consider using the related function [`snprintf`](snprintf-snprintf-snprintf-l-snwprintf-snwprintf-l.md), which specifies a maximum number of characters to write to *`buffer`*, or use [`_scprintf`](scprintf-scprintf-l-scwprintf-scwprintf-l.md) to determine how large a buffer is required. Also, ensure that *`format`* is not a user-defined string.
>
> Starting in Windows 10 version 2004 (build 19041), the `printf` family of functions prints exactly representable floating point numbers according to the IEEE 754 rules for rounding. In previous versions of Windows, exactly representable floating point numbers ending in '5' would always round up. IEEE 754 states that they must round to the closest even digit (also known as "Banker's Rounding"). For example, both `printf("%1.0f", 1.5)` and `printf("%1.0f", 2.5)` should round to 2. Previously, 1.5 would round to 2 and 2.5 would round to 3. This change only affects exactly representable numbers. For example, 2.35 (which, when represented in memory, is closer to 2.35000000000000008) continues to round up to 2.4. Rounding done by these functions now also respects the floating point rounding mode set by [`fesetround`](fegetround-fesetround2.md). Previously, rounding always chose `FE_TONEAREST` behavior. This change only affects programs built using Visual Studio 2019 version 16.2 and later. To use the legacy floating point rounding behavior, link with ['legacy_stdio_float_rounding.obj`](../link-options.md).
**`swprintf`** is a wide-character version of **`sprintf`**; the pointer arguments to **`swprintf`** are wide-character strings. Detection of encoding errors in **`swprintf`** may differ from **`sprintf`**. **`swprintf`** and **`fwprintf`** behave identically except **`swprintf`** writes output to a string rather than to a destination of type `FILE`, and **`swprintf`** requires the *`count`* parameter to specify the maximum number of characters to write. The versions of these functions with the **`_l`** suffix are identical except they use the locale parameter passed in instead of the current thread locale.
-**`swprintf`** conforms to the ISO C Standard, which requires the second parameter, *`count`*, of type **`size_t`**. To force the old nonstandard behavior, define `_CRT_NON_CONFORMING_SWPRINTFS`. In a future version, the old behavior may be removed, so code should be changed to use the new conformant behavior.
+Before the signature for `swprintf` was standardized, a version shipped in an older Microsoft C runtime library that didn't take the character count parameter. The older version is still available in the Microsoft C runtime library, but it's deprecated and was renamed `_swprintf()`. For code that was written against the older signature, define `_CRT_NON_CONFORMING_SWPRINTFS`, which maps calls to `swprintf` to `_swprintf`. In a future version, the old behavior may be removed, so code should be changed to use the new conformant behavior.
In C++, these functions have template overloads that invoke the newer, secure counterparts of these functions. For more information, see [Secure template overloads](../secure-template-overloads.md).
@@ -113,7 +125,7 @@ In C++, these functions have template overloads that invoke the newer, secure co
| Routine | Required header |
|---|---|
| **`sprintf`**, **`_sprintf_l`** | `` |
-| **`swprintf`**, **`_swprintf_l`** | `` or `` |
+| **`swprintf`**, **`_swprintf`**, **`_swprintf_l`** | `` or `` |
For more compatibility information, see [Compatibility](../compatibility.md).
diff --git a/docs/c-runtime-library/reference/sqrt-sqrtf-sqrtl.md b/docs/c-runtime-library/reference/sqrt-sqrtf-sqrtl.md
index a54fed2e1a..ef2221147e 100644
--- a/docs/c-runtime-library/reference/sqrt-sqrtf-sqrtl.md
+++ b/docs/c-runtime-library/reference/sqrt-sqrtf-sqrtl.md
@@ -97,4 +97,4 @@ The square root of 45.35 is 6.73
[`exp`, `expf`, `expl`](exp-expf.md)\
[`log`, `logf`, `log10`, `log10f`](log-logf-log10-log10f.md)\
[`pow`, `powf`, `powl`](pow-powf-powl.md)\
-[`_CIsqrt`](../cisqrt.md)\
+[`_CIsqrt`](../cisqrt.md)
diff --git a/docs/c-runtime-library/reference/stat-functions.md b/docs/c-runtime-library/reference/stat-functions.md
index 8d0c3eaa7b..b1a5efc58f 100644
--- a/docs/c-runtime-library/reference/stat-functions.md
+++ b/docs/c-runtime-library/reference/stat-functions.md
@@ -1,14 +1,13 @@
---
-description: "Learn more about: _stat, _stat32, _stat64, _stati64, _stat32i64, _stat64i32, _wstat, _wstat32, _wstat64, _wstati64, _wstat32i64, _wstat64i32"
title: "_stat, _stat32, _stat64, _stati64, _stat32i64, _stat64i32, _wstat, _wstat32, _wstat64, _wstati64, _wstat32i64, _wstat64i32"
-ms.date: "4/2/2020"
+description: "Learn more about: _stat, _stat32, _stat64, _stati64, _stat32i64, _stat64i32, _wstat, _wstat32, _wstat64, _wstati64, _wstat32i64, _wstat64i32"
+ms.date: "5/25/2023"
api_name: ["_wstat64", "_stati64", "_stat32", "_stat32i64", "_stat", "_wstati64", "_wstat32", "_wstat64i32", "_wstat", "_stat64", "_stat64i32", "_wstat32i64", "_o__stat32", "_o__stat32i64", "_o__stat64", "_o__stat64i32", "_o__wstat32", "_o__wstat32i64", "_o__wstat64", "_o__wstat64i32"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-filesystem-l1-1-0.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["tstat32", "tstat", "_tstat64i32", "tstati64", "_wstat64", "_wstat32", "wstati64", "tstat64", "_stati64", "_wstat", "wstat64i32", "stat32i64", "tstat32i64", "_tstat", "_wstati64", "_tstati64", "_wstat32i64", "wstat32", "_wstat64i32", "_stat", "_tstat32", "stat64i32", "wstat64", "stat", "_stat32i64", "_stat32", "stati64", "wstat", "_stat64i32", "stat32", "_tstat32i64", "tstat64i32", "_tstat64", "_stat64", "stat/_stat", "stat/_stat32", "stat/_stat64", "stat/_stati64", "stat/_stat32i64", "stat/_stat64i32", "stat/_wstat", "stat/_wstat32", "stat/_wstat64", "stat/_wstati64", "stat/_wstat32i64", "stat/_wstat64i32"]
+f1_keywords: ["stat/_stat", "stat/_stat32", "stat/_stat32i64", "stat/_stat64", "stat/_stat64i32", "stat/_stati64", "stat/__stat64", "TCHAR/_tstat", "TCHAR/_tstat32", "TCHAR/_tstat32i64", "TCHAR/_tstat64", "TCHAR/_tstat64i32", "TCHAR/_tstati64", "stat/_wstat", "stat/_wstat32", "stat/_wstat32i64", "stat/_wstat64", "stat/_wstat64i32", "stat/_wstati64", "_stat", "_stat32", "_stat32i64", "_stat64", "_stat64i32", "_stati64", "__stat64", "_tstat", "_tstat32", "_tstat32i64", "_tstat64", "_tstat64i32", "_tstati64", "_wstat", "_wstat32", "_wstat32i64", "_wstat64", "_wstat64i32", "_wstati64", "stat", "stat32", "stat32i64", "stat64", "stat64i32", "stati64", "tstat", "tstat32", "tstat32i64", "tstat64", "tstat64i32", "tstati64", "wstat", "wstat32", "wstat32i64", "wstat64", "wstat64i32", "wstati64"]
helpviewer_keywords: ["files [C++], status information", "_stat function", "_wstat function", "_stat64i32 function", "tstat function", "_tstat64i32 function", "_stati64 function", "_stat64 function", "tstati64 function", "wstati64 function", "wstat64 function", "_wstat64i32 function", "_tstat32i64 function", "_stat32i64 function", "stat function", "status of files", "_tstat32 function", "tstat64 function", "_wstat64 function", "_tstat function", "_stat32 function", "wstat function", "_wstat32i64 function", "_tstati64 function", "_wstat32 function", "stat64 function", "stati64 function", "_wstati64 function", "_tstat64 function", "files [C++], getting status information"]
-ms.assetid: 99a75ae6-ff26-47ad-af70-5ea7e17226a5
---
# `_stat`, `_stat32`, `_stat64`, `_stati64`, `_stat32i64`, `_stat64i32`, `_wstat`, `_wstat32`, `_wstat64`, `_wstati64`, `_wstat32i64`, `_wstat64i32`
@@ -95,6 +94,7 @@ Variations of these functions support 32-bit or 64-bit time types, and 32-bit or
> [!NOTE]
> **`_wstat`** does not work with Windows Vista symbolic links. In these cases, **`_wstat`** will always report a file size of 0. **`_stat`** does work correctly with symbolic links.
+> The `_stat` family of functions use `CreateFile` in Visual Studio 2015, instead of `FindFirstFile` as in Visual Studio 2013 and earlier. This means that `_stat` on a path ending with a slash succeeds if the path refers to a directory, as opposed to before when the function would error with `errno` set to `ENOENT`.
This function validates its parameters. If either *`path`* or *`buffer`* is `NULL`, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md).
diff --git a/docs/c-runtime-library/reference/strcoll-wcscoll-mbscoll-strcoll-l-wcscoll-l-mbscoll-l.md b/docs/c-runtime-library/reference/strcoll-wcscoll-mbscoll-strcoll-l-wcscoll-l-mbscoll-l.md
index 8ff8111b4e..653c50ba6f 100644
--- a/docs/c-runtime-library/reference/strcoll-wcscoll-mbscoll-strcoll-l-wcscoll-l-mbscoll-l.md
+++ b/docs/c-runtime-library/reference/strcoll-wcscoll-mbscoll-strcoll-l-wcscoll-l-mbscoll-l.md
@@ -6,7 +6,7 @@ api_name: ["wcscoll", "_mbscoll", "_mbscoll_l", "strcoll", "_strcoll_l", "_wcsco
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-multibyte-l1-1-0.dll", "api-ms-win-crt-string-l1-1-0.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["wcscoll", "_mbscoll", "_tcscoll", "_ftcscoll"]
+f1_keywords: ["STRING/strcoll", "CORECRT_WSTRING/wcscoll", "MBSTRING/_mbscoll", "TCHAR/_tcscoll", "TCHAR/_ftcscoll", "STRING/_strcoll_l", "CORECRT_WSTRING/_wcscoll_l", "MBSTRING/_mbscoll_l", "TCHAR/_tcscoll_l", "strcoll", "wcscoll", "_mbscoll", "_tcscoll", "_ftcscoll", "_strcoll_l", "_wcscoll_l", "_mbscoll_l", "_tcscoll_l"]
helpviewer_keywords: ["code pages, using for string comparisons", "mbscoll function", "wcscoll_l function", "ftcscoll function", "wcscoll function", "_strcoll_l function", "tcscoll function", "_ftcscoll function", "_tcscoll function", "_wcscoll_l function", "_mbscoll function", "strcoll_l function", "strcoll functions", "strings [C++], comparing by code page"]
ms.assetid: 900a7540-c7ec-4c2f-b292-7a85f63e3fe8
---
diff --git a/docs/c-runtime-library/reference/strdec-wcsdec-mbsdec-mbsdec-l.md b/docs/c-runtime-library/reference/strdec-wcsdec-mbsdec-mbsdec-l.md
index 6cb2d80b62..2321d881fb 100644
--- a/docs/c-runtime-library/reference/strdec-wcsdec-mbsdec-mbsdec-l.md
+++ b/docs/c-runtime-library/reference/strdec-wcsdec-mbsdec-mbsdec-l.md
@@ -15,7 +15,7 @@ ms.assetid: ae37c223-800f-48a9-ae8e-38c8d20af2dd
Moves a string pointer back one character.
> [!IMPORTANT]
-> **`mbsdec`** and **`mbsdec_l`** cannot be used in applications that execute in the Windows Runtime. For more information, see [CRT functions not supported in Universal Windows Platform apps](../../cppcx/crt-functions-not-supported-in-universal-windows-platform-apps.md).
+> **`_mbsdec`** and **`_mbsdec_l`** cannot be used in applications that execute in the Windows Runtime. For more information, see [CRT functions not supported in Universal Windows Platform apps](../../cppcx/crt-functions-not-supported-in-universal-windows-platform-apps.md).
## Syntax
diff --git a/docs/c-runtime-library/reference/strdup-dbg-wcsdup-dbg.md b/docs/c-runtime-library/reference/strdup-dbg-wcsdup-dbg.md
index 07f652b47c..7f5a94682a 100644
--- a/docs/c-runtime-library/reference/strdup-dbg-wcsdup-dbg.md
+++ b/docs/c-runtime-library/reference/strdup-dbg-wcsdup-dbg.md
@@ -53,7 +53,7 @@ Each of these functions returns a pointer to the storage location for the copied
The **`_strdup_dbg`** and **`_wcsdup_dbg`** functions are identical to `_strdup` and `_wcsdup` except that, when `_DEBUG` is defined, these functions use the debug version of `malloc`, `_malloc_dbg`, to allocate memory for the duplicated string. For information on the debugging features of `_malloc_dbg`, see [`_malloc_dbg`](malloc-dbg.md).
-You don't need to call these functions explicitly in most cases. Instead, you can define the flag `_CRTDBG_MAP_ALLOC`. When `_CRTDBG_MAP_ALLOC` is defined, calls to `_strdup` and `_wcsdup` are remapped to **`_strdup_dbg`** and **`_wcsdup_dbg`**, respectively, with the *`blockType`* set to `_NORMAL_BLOCK`. Thus, you don't need to call these functions explicitly unless you want to mark the heap blocks as `_CLIENT_BLOCK`. For more information on block types, see [Types of blocks on the debug heap](/visualstudio/debugger/crt-debug-heap-details).
+You don't need to call these functions explicitly in most cases. Instead, you can define the flag `_CRTDBG_MAP_ALLOC`. When `_CRTDBG_MAP_ALLOC` is defined, calls to `_strdup` and `_wcsdup` are remapped to **`_strdup_dbg`** and **`_wcsdup_dbg`**, respectively, with the *`blockType`* set to `_NORMAL_BLOCK`. Thus, you don't need to call these functions explicitly unless you want to mark the heap blocks as `_CLIENT_BLOCK`. For more information on block types, see [Types of blocks on the debug heap](../crt-debug-heap-details.md#types-of-blocks-on-the-debug-heap).
### Generic-text routine mappings
@@ -77,4 +77,4 @@ All debug versions of the [C run-time libraries](../crt-library-features.md).
[String manipulation](../string-manipulation-crt.md)\
[`_strdup`, `_wcsdup`, `_mbsdup`](strdup-wcsdup-mbsdup.md)\
-[Debug versions of heap allocation functions](/visualstudio/debugger/debug-versions-of-heap-allocation-functions)
+[Debug versions of heap allocation functions](../debug-versions-of-heap-allocation-functions.md)
diff --git a/docs/c-runtime-library/reference/strerror-s-strerror-s-wcserror-s-wcserror-s.md b/docs/c-runtime-library/reference/strerror-s-strerror-s-wcserror-s-wcserror-s.md
index eb0c5010b0..e0cb870b10 100644
--- a/docs/c-runtime-library/reference/strerror-s-strerror-s-wcserror-s-wcserror-s.md
+++ b/docs/c-runtime-library/reference/strerror-s-strerror-s-wcserror-s-wcserror-s.md
@@ -1,14 +1,13 @@
---
title: "strerror_s, _strerror_s, _wcserror_s, __wcserror_s"
description: "Functions with security enhancements to get a system error message or print a user-supplied error message."
-ms.date: "09/25/2020"
+ms.date: 05/31/2023
api_name: ["__wcserror_s", "_strerror_s", "_wcserror_s", "strerror_s", "_o__strerror_s", "_o__wcserror_s", "_o_strerror_s"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-runtime-l1-1-0.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
f1_keywords: ["wcserror_s", "__wcserror_s", "_tcserror_s", "_wcserror_s", "tcserror_s", "strerror_s", "_strerror_s"]
helpviewer_keywords: ["__wcserror_s function", "error messages, printing", "tcserror_s function", "printing error messages", "strerror_s function", "_wcserror_s function", "_tcserror_s function", "_strerror_s function", "wcserror_s function", "error messages, getting"]
-ms.assetid: 9e5b15a0-efe1-4586-b7e3-e1d7c31a03d6
---
# `strerror_s`, `_strerror_s`, `_wcserror_s`, `__wcserror_s`
@@ -104,9 +103,9 @@ if (( _access( "datafile",2 )) == -1 )
}
```
-If *`strErrMsg`* is `NULL`, **`_strerror_s`** returns a string in *`buffer`* that contains the system error message for the last library call that produced an error. The error-message string is terminated by the newline character ('\n'). If *`strErrMsg`* isn't equal to `NULL`, then **`_strerror_s`** returns a string in *`buffer`* that contains (in order) your string message, a colon, a space, the system error message for the last library call that produced an error, and a newline character. Your string message can be, at most, 94 characters long.
+If *`strErrMsg`* is `NULL`, **`_strerror_s`** returns a string in *`buffer`* that contains the system error message for the last library call that produced an error. If *`strErrMsg`* isn't equal to `NULL`, then **`_strerror_s`** returns a string in *`buffer`* that contains (in order) your string message, a colon, a space, the system error message for the last library call that produced an error. Your string message can be, at most, 94 characters long.
-These functions truncate the error message if its length exceeds the size of the buffer - 1. The resulting string in *`buffer`* will always be null-terminated.
+These functions truncate the error message if its length exceeds the size of the buffer - 1. The resulting string in *`buffer`* is always null-terminated.
The actual error number for **`_strerror_s`** is stored in the variable [`errno`](../errno-doserrno-sys-errlist-and-sys-nerr.md). The system error messages are accessed through the variable [`_sys_errlist`](../errno-doserrno-sys-errlist-and-sys-nerr.md), which is an array of messages ordered by error number. **`_strerror_s`** accesses the appropriate error message by using the `errno` value as an index to the variable `_sys_errlist`. The value of the variable [`_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md) is defined as the maximum number of elements in the `_sys_errlist` array. To produce accurate results, call **`_strerror_s`** immediately after a library routine return with an error. Otherwise, subsequent calls to **`strerror_s`** or **`_strerror_s`** can overwrite the `errno` value.
diff --git a/docs/c-runtime-library/reference/strerror-strerror-wcserror-wcserror.md b/docs/c-runtime-library/reference/strerror-strerror-wcserror-wcserror.md
index 38efb38503..234fd6914f 100644
--- a/docs/c-runtime-library/reference/strerror-strerror-wcserror-wcserror.md
+++ b/docs/c-runtime-library/reference/strerror-strerror-wcserror-wcserror.md
@@ -1,14 +1,13 @@
---
title: "strerror, _strerror, _wcserror, __wcserror"
description: "Describes the Microsoft C Runtime Library (CRT) functions strerror, _strerror, _wcserror, and __wcserror."
-ms.date: "4/2/2020"
+ms.date: "5/31/2023"
api_name: ["strerror", "_strerror", "_wcserror", "__wcserror", "_o___wcserror", "_o__strerror", "_o__wcserror", "_o_strerror"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-runtime-l1-1-0.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
f1_keywords: ["__sys_errlist", "wcserror", "_strerror", "__wcserror", "strerror", "__sys_nerr", "_tcserror", "_wcserror", "tcserror"]
helpviewer_keywords: ["strerror function", "_strerror function", "__sys_errlist", "wcserror function", "error messages, printing", "__sys_nerr", "tcserror function", "printing error messages", "_wcserror function", "_tcserror function", "__wcserror function", "error messages, getting"]
-ms.assetid: 27b72255-f627-43c0-8836-bcda8b003e14
---
# `strerror`, `_strerror`, `_wcserror`, `__wcserror`
@@ -51,7 +50,7 @@ if (( _access( "datafile", 2 )) == -1 )
fprintf( stderr, _strerror(NULL) );
```
-If *`strErrMsg`* is passed as `NULL`, **`_strerror`** returns a pointer to a string. It contains the system error message for the last library call that produced an error. The error-message string is terminated by the newline character ('\n'). When *`strErrMsg`* isn't `NULL`, the string contains, in order: your *`strErrMsg`* string, a colon, a space, the system error message, and a newline character. Your string message can be, at most, 94 characters long, in either narrow (**`_strerror`**) or wide (**`__wcserror`**) characters.
+If *`strErrMsg`* is passed as `NULL`, **`_strerror`** returns a pointer to a string. It contains the system error message for the last library call that produced an error. If you call `__wcserror`, the error-message string is terminated by the newline character (`'\n'`). The other functions don't add `'\n'`. When *`strErrMsg`* isn't `NULL`, the string contains, in order: your *`strErrMsg`* string, a colon, a space, the system error message. Your string message can be, at most, 94 characters long, in either narrow (**`_strerror`**) or wide (**`__wcserror`**) characters.
The actual error number for **`_strerror`** is stored in the variable [`errno`](../errno-doserrno-sys-errlist-and-sys-nerr.md). To produce accurate results, call **`_strerror`** immediately after a library routine returns an error. Otherwise, later calls to library routines may overwrite the `errno` value.
diff --git a/docs/c-runtime-library/reference/stricoll-wcsicoll-mbsicoll-stricoll-l-wcsicoll-l-mbsicoll-l.md b/docs/c-runtime-library/reference/stricoll-wcsicoll-mbsicoll-stricoll-l-wcsicoll-l-mbsicoll-l.md
index 0ffb8ffde9..c5ed7b742d 100644
--- a/docs/c-runtime-library/reference/stricoll-wcsicoll-mbsicoll-stricoll-l-wcsicoll-l-mbsicoll-l.md
+++ b/docs/c-runtime-library/reference/stricoll-wcsicoll-mbsicoll-stricoll-l-wcsicoll-l-mbsicoll-l.md
@@ -6,7 +6,7 @@ api_name: ["_mbsicoll_l", "_stricoll_l", "_mbsicoll", "_wcsicoll_l", "_wcsicoll"
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-multibyte-l1-1-0.dll", "api-ms-win-crt-string-l1-1-0.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["stricoll", "_stricoll", "_wcsicoll", "mbsicoll_l", "_mbsicoll", "_ftcsicoll", "wcsicoll_l", "_tcsicoll", "mbsicoll", "stricoll_l"]
+f1_keywords: ["STRING/_stricoll", "CORECRT_WSTRING/_wcsicoll", "MBSTRING/_mbsicoll", "TCHAR/_tcsicoll", "TCHAR/_ftcsicoll", "STRING/_stricoll_l", "CORECRT_WSTRING/_wcsicoll_l", "MBSTRING/_mbsicoll_l", "TCHAR/_tcsicoll_l", "_stricoll", "_wcsicoll", "_mbsicoll", "_tcsicoll", "_ftcsicoll", "_stricoll_l", "_wcsicoll_l", "_mbsicoll_l", "_tcsicoll_l", "stricoll", "mbsicoll", "stricoll_l", "wcsicoll_l", "mbsicoll_l"]
helpviewer_keywords: ["code pages, using for string comparisons", "_ftcsicoll function", "_mbsicoll_l function", "_mbsicoll function", "mbsicoll function", "stricoll function", "tcsicoll function", "string comparison [C++], culture-specific", "_tcsicoll function", "_stricoll function", "_stricoll_l function", "_wcsicoll function", "mbsicoll_l function", "stricoll_l function", "strings [C++], comparing by code page", "ftcsicoll function"]
ms.assetid: 8ec93016-5a49-49d2-930f-721566661d82
---
diff --git a/docs/c-runtime-library/reference/strncat-strncat-l-wcsncat-wcsncat-l-mbsncat-mbsncat-l.md b/docs/c-runtime-library/reference/strncat-strncat-l-wcsncat-wcsncat-l-mbsncat-mbsncat-l.md
index 3ca626efc4..53ae6ad1df 100644
--- a/docs/c-runtime-library/reference/strncat-strncat-l-wcsncat-wcsncat-l-mbsncat-mbsncat-l.md
+++ b/docs/c-runtime-library/reference/strncat-strncat-l-wcsncat-wcsncat-l-mbsncat-mbsncat-l.md
@@ -1,6 +1,6 @@
---
-description: "Learn more about: strncat, _strncat_l, wcsncat, _wcsncat_l, _mbsncat, _mbsncat_l"
title: "strncat, _strncat_l, wcsncat, _wcsncat_l, _mbsncat, _mbsncat_l"
+description: "Learn more about: strncat, _strncat_l, wcsncat, _wcsncat_l, _mbsncat, _mbsncat_l"
ms.date: "1/20/2021"
api_name: ["strncat", "_strncat_l", "_mbsncat", "_mbsncat_l", "wcsncat", "wcsncat_l", "_o__mbsncat", "_o__mbsncat_l"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-multibyte-l1-1-0.dll", "api-ms-win-crt-string-l1-1-0.dll", "ntoskrnl.exe"]
@@ -184,4 +184,4 @@ You can see that `BadAppend` caused a buffer overrun.
[`_strset`, `_strset_l`, `_wcsset`, `_wcsset_l`, `_mbsset`, `_mbsset_l`](strset-strset-l-wcsset-wcsset-l-mbsset-mbsset-l.md)\
[`strspn`, `wcsspn`, `_mbsspn`, `_mbsspn_l`](strspn-wcsspn-mbsspn-mbsspn-l.md)\
[Locale](../locale.md)\
-[Interpretation of multibyte-character sequences](../interpretation-of-multibyte-character-sequences.md)\
+[Interpretation of multibyte-character sequences](../interpretation-of-multibyte-character-sequences.md)
diff --git a/docs/c-runtime-library/reference/strncnt-wcsncnt-mbsnbcnt-mbsnbcnt-l-mbsnccnt-mbsnccnt-l.md b/docs/c-runtime-library/reference/strncnt-wcsncnt-mbsnbcnt-mbsnbcnt-l-mbsnccnt-mbsnccnt-l.md
index 4ca437d019..2c9cdcfed2 100644
--- a/docs/c-runtime-library/reference/strncnt-wcsncnt-mbsnbcnt-mbsnbcnt-l-mbsnccnt-mbsnccnt-l.md
+++ b/docs/c-runtime-library/reference/strncnt-wcsncnt-mbsnbcnt-mbsnbcnt-l-mbsnccnt-mbsnccnt-l.md
@@ -1,6 +1,6 @@
---
-description: "Learn more about: _strncnt, _wcsncnt, _mbsnbcnt, _mbsnbcnt_l, _mbsnccnt, _mbsnccnt_l"
title: "_strncnt, _wcsncnt, _mbsnbcnt, _mbsnbcnt_l, _mbsnccnt, _mbsnccnt_l"
+description: "Learn more about: _strncnt, _wcsncnt, _mbsnbcnt, _mbsnbcnt_l, _mbsnccnt, _mbsnccnt_l"
ms.date: "4/2/2020"
api_name: ["_mbsnbcnt_l", "_mbsnccnt", "_wcsncnt", "_strncnt", "_mbsnccnt_l", "_mbsnbcnt", "_o__mbsnbcnt", "_o__mbsnbcnt_l", "_o__mbsnccnt", "_o__mbsnccnt_l"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-multibyte-l1-1-0.dll"]
@@ -8,7 +8,6 @@ api_type: ["DLLExport"]
topic_type: ["apiref"]
f1_keywords: ["_mbsnbcnt", "wcsncnt", "_tcsnbcnt", "_mbsnccnt", "_ftcsnbcnt", "mbsnbcnt", "strncnt", "mbsnbcnt_l", "mbsnccnt_l", "mbsnccnt", "_strncnt", "_wcsncnt"]
helpviewer_keywords: ["_strncnt function", "_mbsnbcnt function", "_mbsnbcnt_l function", "_mbsnccnt_l function", "mbsnbcnt_l function", "mbsnbcnt function", "tcsnbcnt function", "mbsnccnt_l function", "strncnt function", "_tcsnbcnt function", "mbsnccnt function", "wcsncnt function", "_mbsnccnt function", "_wcsncnt function"]
-ms.assetid: 2a022e9e-a307-4acb-a66b-e56e5357f848
---
# `_strncnt`, `_wcsncnt`, `_mbsnbcnt`, `_mbsnbcnt_l`, `_mbsnccnt`, `_mbsnccnt_l`
@@ -105,8 +104,8 @@ For more compatibility information, see [Compatibility](../compatibility.md).
```C
// crt_mbsnbcnt.c
-#include
-#include
+#include
+#include
int main( void )
{
diff --git a/docs/c-runtime-library/reference/strncoll-wcsncoll-mbsncoll-strncoll-l-wcsncoll-l-mbsncoll-l.md b/docs/c-runtime-library/reference/strncoll-wcsncoll-mbsncoll-strncoll-l-wcsncoll-l-mbsncoll-l.md
index 962ce66151..7e9c9b6a52 100644
--- a/docs/c-runtime-library/reference/strncoll-wcsncoll-mbsncoll-strncoll-l-wcsncoll-l-mbsncoll-l.md
+++ b/docs/c-runtime-library/reference/strncoll-wcsncoll-mbsncoll-strncoll-l-wcsncoll-l-mbsncoll-l.md
@@ -6,7 +6,7 @@ api_name: ["_strncoll", "_mbsncoll_l", "_wcsncoll", "_wcsncoll_l", "_mbsncoll",
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-multibyte-l1-1-0.dll", "api-ms-win-crt-string-l1-1-0.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["mbsncoll_l", "strncoll", "_wcsncoll", "_tcsnccoll", "_ftcsnccoll", "wcsncoll", "_mbsncoll", "wcsncoll_l", "strncoll_l", "_ftcsncoll", "_strncoll", "_tcsncoll", "mbsncoll"]
+f1_keywords: ["STRING/_strncoll", "MBSTRING/_mbsncoll", "CORECRT_WSTRING/_wcsncoll", "TCHAR/_tcsncoll", "TCHAR/_tcsnccoll", "TCHAR/_ftcsncoll", "TCHAR/_ftcsnccoll", "STRING/_strncoll_l", "MBSTRING/_mbsncoll_l", "CORECRT_WSTRING/_wcsncoll_l", "TCHAR/_tcsncoll_l", "_strncoll", "_mbsncoll", "_wcsncoll", "_tcsncoll", "_tcsnccoll", "_ftcsncoll", "_ftcsnccoll", "_strncoll_l", "_mbsncoll_l", "_wcsncoll_l", "_tcsncoll_l", "strncoll", "mbsncoll", "wcsncoll", "tcsncoll", "tcsnccoll", "ftcsncoll", "ftcsnccoll", "strncoll_l", "mbsncoll_l", "wcsncoll_l", "tcsncoll_l"]
helpviewer_keywords: ["_strncoll_l function", "code pages, using for string comparisons", "_strncoll function", "_mbsncoll function", "ftcsncoll function", "strncoll function", "_ftcsncoll function", "strncoll_l function", "wcsncoll function", "mbsncoll function", "_tcsncoll function", "_tcsnccoll function", "wcsncoll_l function", "tcsnccoll function", "mbsncoll_l function", "_mbsncoll_l function", "tcsncoll function", "_wcsncoll function", "strings [C++], comparing by code page", "_ftcsnccoll function", "ftcsnccoll function", "_wcsncoll_l function"]
ms.assetid: e659a5a4-8afe-4033-8e72-17ffd4bdd8e9
---
diff --git a/docs/c-runtime-library/reference/strncpy-s-strncpy-s-l-wcsncpy-s-wcsncpy-s-l-mbsncpy-s-mbsncpy-s-l.md b/docs/c-runtime-library/reference/strncpy-s-strncpy-s-l-wcsncpy-s-wcsncpy-s-l-mbsncpy-s-mbsncpy-s-l.md
index ddf9483e51..784bbae4d5 100644
--- a/docs/c-runtime-library/reference/strncpy-s-strncpy-s-l-wcsncpy-s-wcsncpy-s-l-mbsncpy-s-mbsncpy-s-l.md
+++ b/docs/c-runtime-library/reference/strncpy-s-strncpy-s-l-wcsncpy-s-wcsncpy-s-l-mbsncpy-s-mbsncpy-s-l.md
@@ -1,22 +1,23 @@
---
description: "Learn more about: strncpy_s, _strncpy_s_l, wcsncpy_s, _wcsncpy_s_l, _mbsncpy_s, _mbsncpy_s_l"
-title: "strncpy_s, _strncpy_s_l, wcsncpy_s, _wcsncpy_s_l, _mbsncpy_s, _mbsncpy_s_l"
+title: "strncpy_s, _strncpy_s_l, wcsncpy_s, _wcsncpy_s_l, _mbsncpy_s, _mbsncpy_s_l, _tcsncpy_s, _tcsncpy_s_l, _tcsnccpy_s, _tcsnccpy_s_l"
ms.date: "4/2/2020"
-api_name: ["_mbsncpy_s_l", "wcsncpy_s", "_strncpy_s_l", "strncpy_s", "_mbsncpy_s", "_wcsncpy_s_l", "_o__mbsncpy_s", "_o__mbsncpy_s_l", "_o_strncpy_s", "_o_wcsncpy_s"]
+api_name: ["_mbsncpy_s_l", "wcsncpy_s", "_strncpy_s_l", "strncpy_s", "_mbsncpy_s", "_wcsncpy_s_l", "_o__mbsncpy_s", "_o__mbsncpy_s_l", "_o_strncpy_s", "_o_wcsncpy_s", "_tcsnccpy_s", "_tcsnccpy_s_l", "_tcsncpy_s", "_tcsncpy_s_l"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-multibyte-l1-1-0.dll", "api-ms-win-crt-string-l1-1-0.dll", "ntoskrnl.exe"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["_tcsncpy_s", "_wcsncpy_s_l", "strncpy_s", "_strncpy_s_l", "wcsncpy_s", "_tcsncpy_s_l"]
-helpviewer_keywords: ["_wcsncpy_s_l function", "_mbsnbcpy_s function", "_tcsncpy_s_l function", "mbsncpy_s function", "strncpy_s_l function", "_strncpy_s_l function", "strncpy_s function", "mbsncpy_s_l function", "wcsncpy_s function", "copying strings", "strings [C++], copying", "_mbsnbcpy_s_l function", "_tcsncpy_s function", "wcsncpy_s_l function"]
-ms.assetid: a971c800-94d1-4d88-92f3-a2fe236a4546
+f1_keywords: ["_tcsncpy_s", "_wcsncpy_s_l", "strncpy_s", "_strncpy_s_l", "wcsncpy_s", "_tcsncpy_s_l", "_tcsnccpy_s", "_tcsnccpy_s_l"]
+helpviewer_keywords: ["_wcsncpy_s_l function", "_mbsnbcpy_s function", "_tcsncpy_s_l function", "mbsncpy_s function", "strncpy_s_l function", "_strncpy_s_l function", "strncpy_s function", "mbsncpy_s_l function", "wcsncpy_s function", "_tcsnccpy_s function", "copying strings", "strings [C++], copying", "_mbsnbcpy_s_l function", "_tcsncpy_s function", "wcsncpy_s_l function", "_tcsnccpy_s_l function"]
---
-# `strncpy_s`, `_strncpy_s_l`, `wcsncpy_s`, `_wcsncpy_s_l`, `_mbsncpy_s`, `_mbsncpy_s_l`
+# `strncpy_s`, `_strncpy_s_l`, `wcsncpy_s`, `_wcsncpy_s_l`, `_mbsncpy_s`, `_mbsncpy_s_l`, `_tcsncpy_s`, `_tcsncpy_s_l`, `_tcsnccpy_s`, `_tcsnccpy_s_l`
Copies characters of one string to another. These versions of [`strncpy`, `_strncpy_l`, `wcsncpy`, `_wcsncpy_l`, `_mbsncpy`, `_mbsncpy_l`](strncpy-strncpy-l-wcsncpy-wcsncpy-l-mbsncpy-mbsncpy-l.md) have security enhancements, as described in [Security features in the CRT](../security-features-in-the-crt.md).
> [!IMPORTANT]
> **`_mbsncpy_s`** and **`_mbsncpy_s_l`** cannot be used in applications that execute in the Windows Runtime. For more information, see [CRT functions not supported in Universal Windows Platform apps](../../cppcx/crt-functions-not-supported-in-universal-windows-platform-apps.md).
+For `_tcsnccpy_s`, `_tcsnccpy_s_l`, `_tcsnccpy_s`, and `_tcsnccpy_s_l` see [Generic-text function mappings](#generic-text-function-mappings).
+
## Syntax
```C
@@ -168,12 +169,16 @@ The debug library versions of these functions first fill the buffer with 0xFE. T
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).
-### Generic-text routine mappings
+### Generic-text function mappings
+
+The function in the `tchar.h` column maps to the function in the other columns depending on the character set that is defined at compile time.
-| `TCHAR.H` routine | `_UNICODE` and `_MBCS` not defined | `_MBCS` defined | `_UNICODE` defined |
+| `tchar.h` routine | `_UNICODE` and `_MBCS` not defined | `_MBCS` defined | `_UNICODE` defined |
|---|---|---|---|
| `_tcsncpy_s` | **`strncpy_s`** | **`_mbsnbcpy_s`** | **`wcsncpy_s`** |
| `_tcsncpy_s_l` | **`_strncpy_s_l`** | **`_mbsnbcpy_s_l`** | **`_wcsncpy_s_l`** |
+| `_tcsnccpy_s` | **`strncpy_s`** | **`_mbsncpy_s`** | **`_wcsncpy_s`** |
+| `_tcsnccpy_s_l` | **`_strncpy_s_l`** | **`_mbsncpy_s_l`** | **`_wcsncpy_s_l`** |
> [!NOTE]
> **`_strncpy_s_l`**, **`_wcsncpy_s_l`** and **`_mbsncpy_s_l`** have no locale dependence. They're provided just for `_tcsncpy_s_l` and aren't intended to be called directly.
diff --git a/docs/c-runtime-library/reference/strnicoll-wcsnicoll-mbsnicoll-strnicoll-l-wcsnicoll-l-mbsnicoll-l.md b/docs/c-runtime-library/reference/strnicoll-wcsnicoll-mbsnicoll-strnicoll-l-wcsnicoll-l-mbsnicoll-l.md
index a45259ea86..b529a0df1b 100644
--- a/docs/c-runtime-library/reference/strnicoll-wcsnicoll-mbsnicoll-strnicoll-l-wcsnicoll-l-mbsnicoll-l.md
+++ b/docs/c-runtime-library/reference/strnicoll-wcsnicoll-mbsnicoll-strnicoll-l-wcsnicoll-l-mbsnicoll-l.md
@@ -6,7 +6,7 @@ api_name: ["_mbsnicoll_l", "_mbsnicoll", "_wcsnicoll_l", "_strnicoll", "_strnico
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-multibyte-l1-1-0.dll", "api-ms-win-crt-string-l1-1-0.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["wcshicoll_l", "_ftcsncicoll", "strnicoll_l", "_wcsnicoll", "mbsnicoll_l", "_strnicoll", "mbsnicoll", "_ftcsnicoll", "wcsnicoll", "_tcsnicoll", "_mbsnicoll", "strinicoll", "_tcsncicoll"]
+f1_keywords: ["STRING/_strnicoll", "MBSTRING/_mbsnicoll", "CORECRT_WSTRING/_wcsnicoll", "TCHAR/_tcsnicoll", "TCHAR/_tcsncicoll", "TCHAR/_ftcsncicoll", "TCHAR/_ftcsnicoll", "STRING/_strnicoll_l", "MBSTRING/_mbsnicoll_l", "CORECRT_WSTRING/_wcsnicoll_l", "TCHAR/_tcsnicoll_l", "_strnicoll", "_mbsnicoll", "_wcsnicoll", "_tcsnicoll", "_tcsncicoll", "_ftcsncicoll", "_ftcsnicoll", "_strnicoll_l", "_mbsnicoll_l", "_wcsnicoll_l", "_tcsnicoll_l", "strnicoll", "mbsnicoll", "wcsnicoll", "tcsnicoll", "tcsncicoll", "ftcsncicoll", "ftcsnicoll", "strnicoll_l", "mbsnicoll_l", "wcsnicoll_l", "tcsnicoll_l"]
helpviewer_keywords: ["code pages, using for string comparisons", "ftcsncicoll function", "mbsnicoll_l function", "_ftcsnicoll function", "mbsnicoll function", "_tcsnicoll function", "_wcsnicoll_l function", "_mbsnicoll function", "tcsncicoll function", "strnicoll function", "_ftcsncicoll function", "wcsnicoll_l function", "_mbsnicoll_l function", "_tcsncicoll function", "strnicoll_l function", "wcsnicoll function", "_strnicoll_l function", "_wcsnicoll function", "ftcsnicoll function", "strings [C++], comparing by code page", "tcsnicoll function", "_strnicoll function"]
ms.assetid: abf0c569-725b-428d-9ff2-924f430104b4
---
diff --git a/docs/c-runtime-library/reference/strnset-s-strnset-s-l-wcsnset-s-wcsnset-s-l-mbsnset-s-mbsnset-s-l.md b/docs/c-runtime-library/reference/strnset-s-strnset-s-l-wcsnset-s-wcsnset-s-l-mbsnset-s-mbsnset-s-l.md
index 61f514871a..e7d55e8de2 100644
--- a/docs/c-runtime-library/reference/strnset-s-strnset-s-l-wcsnset-s-wcsnset-s-l-mbsnset-s-mbsnset-s-l.md
+++ b/docs/c-runtime-library/reference/strnset-s-strnset-s-l-wcsnset-s-wcsnset-s-l-mbsnset-s-mbsnset-s-l.md
@@ -1,22 +1,23 @@
---
description: "Learn more about: _strnset_s, _strnset_s_l, _wcsnset_s, _wcsnset_s_l, _mbsnset_s, _mbsnset_s_l"
-title: "_strnset_s, _strnset_s_l, _wcsnset_s, _wcsnset_s_l, _mbsnset_s, _mbsnset_s_l"
+title: "_strnset_s, _strnset_s_l, _wcsnset_s, _wcsnset_s_l, _mbsnset_s, _mbsnset_s_l, _tcsnset_s, _tcsncset_s, _tcsncset_s_l"
ms.date: "4/2/2020"
-api_name: ["_mbsnset_s_l", "_strnset_s", "_mbsnset_s", "_strnset_s_l", "_wcsnset_s_l", "_wcsnset_s", "_o__mbsnset_s", "_o__mbsnset_s_l", "_o__strnset_s", "_o__wcsnset_s"]
+api_name: ["_mbsnset_s_l", "_strnset_s", "_mbsnset_s", "_strnset_s_l", "_wcsnset_s_l", "_wcsnset_s", "_o__mbsnset_s", "_o__mbsnset_s_l", "_o__strnset_s", "_o__wcsnset_s", "_tcsncset_s", "_tcsncset_s_l", "_tcsnset_s"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-multibyte-l1-1-0.dll", "api-ms-win-crt-string-l1-1-0.dll", "ntoskrnl.exe"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["_mbsnset_s_l", "wcsnset_s", "_tcsnset_s_l", "_wcsnset_s", "_mbsnset_s", "_wcsnset_s_l", "_strnset_s_l", "strnset_s_l", "_tcsnset_s", "_strnset_s", "strnset_s", "mbsnset_s_l", "mbsnset_s", "wcsnset_s_l"]
-helpviewer_keywords: ["tcsnset_s function", "mbsnset_s_l function", "initializing characters", "wcsnset_s function", "mbsnset_s function", "_tcsnset_s_l function", "_strnset_s_l function", "_mbsnset_s function", "strnset_s_l function", "_tcsnset_s function", "_strnset_s function", "tcsnset_s_l function", "_mbsnset_s_l function", "strnset_s function", "_wcsnset_s function"]
-ms.assetid: 9cf1b321-b5cb-4469-b285-4c07cfbd8813
+f1_keywords: ["_mbsnset_s_l", "wcsnset_s", "_tcsnset_s", "_tcsnset_s_l", "_wcsnset_s", "_mbsnset_s", "_wcsnset_s_l", "_strnset_s_l", "strnset_s_l", "_strnset_s", "strnset_s", "mbsnset_s_l", "mbsnset_s", "wcsnset_s_l", "_tcsncset_s", "_tcsncset_s_l"]
+helpviewer_keywords: ["tcsnset_s function", "mbsnset_s_l function", "initializing characters", "wcsnset_s function", "mbsnset_s function", "_tcsnset_s function", "_tcsnset_s_l function", "_strnset_s_l function", "_mbsnset_s function", "strnset_s_l function", "_strnset_s function", "tcsnset_s_l function", "_mbsnset_s_l function", "strnset_s function", "_wcsnset_s function", "_tcsncset_s function", "_tcsncset_s_l function"]
---
-# `_strnset_s`, `_strnset_s_l`, `_wcsnset_s`, `_wcsnset_s_l`, `_mbsnset_s`, `_mbsnset_s_l`
+# `_strnset_s`, `_strnset_s_l`, `_wcsnset_s`, `_wcsnset_s_l`, `_mbsnset_s`, `_mbsnset_s_l`, `_tcsnset_s`, `_tcsncset_s`, `_tcsncset_s_l`
Initializes characters of a string to a given character. These versions of [`_strnset`, `_strnset_l`, `_wcsnset`, `_wcsnset_l`, `_mbsnset`, `_mbsnset_l`](strnset-strnset-l-wcsnset-wcsnset-l-mbsnset-mbsnset-l.md) have security enhancements, as described in [Security features in the CRT](../security-features-in-the-crt.md).
> [!IMPORTANT]
> **`_mbsnset_s`** and **`_mbsnset_s_l`** cannot be used in applications that execute in the Windows Runtime. For more information, see [CRT functions not supported in Universal Windows Platform apps](../../cppcx/crt-functions-not-supported-in-universal-windows-platform-apps.md).
+For `_tcsnset_s`, `_tcsnset_s_l`, `_tcsncset_s`, and `_tcsncset_s_l` see [Generic-text function mappings](#generic-text-function-mappings).
+
## Syntax
```C
@@ -92,26 +93,30 @@ These functions set, at most, the first *`count`* characters of *`str`* to *`c`*
The output value is affected by the setting of the `LC_CTYPE` category setting of the locale. For more information, see [`setlocale`](setlocale-wsetlocale.md). The versions of these functions without the `_l` suffix use the current locale for this locale-dependent behavior; the versions with the `_l` suffix are identical except that they use the locale parameter passed in instead. For more information, see [Locale](../locale.md).
-The debug library versions of these functions first fill the buffer with 0xFE. To disable this behavior, use [`_CrtSetDebugFillThreshold`](crtsetdebugfillthreshold.md).
+The debug library versions of these functions first fill the buffer with `0xFE`. To disable this behavior, use [`_CrtSetDebugFillThreshold`](crtsetdebugfillthreshold.md).
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).
-### Generic-text routine mappings
+### Generic-text function mappings
+
+The function in the `tchar.h` column maps to the function in the other columns depending on the character set that is defined at compile time.
-| TCHAR.H routine | `_UNICODE` and `_MBCS` not defined | `_MBCS` defined | `_UNICODE` defined |
+| `tchar.h` function | `_UNICODE` and `_MBCS` not defined | `_MBCS` defined | `_UNICODE` defined |
|---|---|---|---|
-| `_tcsnset_s` | **`_strnset_s`** | **`_mbsnbset_s`** | **`_wcsnset_s`** |
-| `_tcsnset_s_l` | **`_strnset_s_l`** | **`_mbsnbset_s_l`** | **`_wcsnset_s_l`** |
+| `_tcsnset_s` | `_strnset_s` | `_mbsnbset_s` | `_wcsnset_s` |
+| `_tcsnset_s_l` | `_strnset_s_l` | `_mbsnbset_s_l` | `_wcsnset_s_l` |
+| `_tcsncset_s` | `_strnset_s` | `_mbsnset_s` | `_wcsnset_s` |
+| `_tcsncset_s_l` | `_strnset_s_l` | `_mbsnset_s_l` | `_wcsnset_s_l` |
## Requirements
| Routine | Required header |
|---|---|
-| **`_strnset_s`** | \ |
-| **`_strnset_s_l`** | \ |
-| **`_wcsnset_s`** | \ or \ |
-| **`_wcsnset_s_l`** | \ |
-| **`_mbsnset_s`**, **`_mbsnset_s_l`** | \ |
+| **`_strnset_s`** | `` |
+| **`_strnset_s_l`** | `` |
+| **`_wcsnset_s`** | `` or `` |
+| **`_wcsnset_s_l`** | `` |
+| **`_mbsnset_s`**, **`_mbsnset_s_l`** | `` |
For more compatibility information, see [Compatibility](../compatibility.md).
diff --git a/docs/c-runtime-library/reference/strrchr-wcsrchr-mbsrchr-mbsrchr-l.md b/docs/c-runtime-library/reference/strrchr-wcsrchr-mbsrchr-mbsrchr-l.md
index 90ada77650..9c8d760c68 100644
--- a/docs/c-runtime-library/reference/strrchr-wcsrchr-mbsrchr-mbsrchr-l.md
+++ b/docs/c-runtime-library/reference/strrchr-wcsrchr-mbsrchr-mbsrchr-l.md
@@ -1,6 +1,6 @@
---
-description: "Learn more about: strrchr, wcsrchr, _mbsrchr, _mbsrchr_l"
title: "strrchr, wcsrchr, _mbsrchr, _mbsrchr_l"
+description: "Learn more about: strrchr, wcsrchr, _mbsrchr, _mbsrchr_l"
ms.date: "4/2/2020"
api_name: ["strrchr", "wcsrchr", "_mbsrchr", "_mbsrchr_l", "_o__mbsrchr", "_o__mbsrchr_l"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ntdll.dll", "ucrtbase.dll", "api-ms-win-crt-multibyte-l1-1-0.dll", "ntoskrnl.exe"]
@@ -131,4 +131,4 @@ For an example of using **`strrchr`**, see [`strchr`](strchr-wcschr-mbschr-mbsch
[`strcspn`, `wcscspn`, `_mbscspn`, `_mbscspn_l`](strcspn-wcscspn-mbscspn-mbscspn-l.md)\
[`_strnicmp`, `_wcsnicmp`, `_mbsnicmp`, `_strnicmp_l`, `_wcsnicmp_l`, `_mbsnicmp_l`](strnicmp-wcsnicmp-mbsnicmp-strnicmp-l-wcsnicmp-l-mbsnicmp-l.md)\
[`strpbrk`, `wcspbrk`, `_mbspbrk`, `_mbspbrk_l`](strpbrk-wcspbrk-mbspbrk-mbspbrk-l.md)\
-[`strspn`, `wcsspn`, `_mbsspn`, `_mbsspn_l`](strspn-wcsspn-mbsspn-mbsspn-l.md)\
+[`strspn`, `wcsspn`, `_mbsspn`, `_mbsspn_l`](strspn-wcsspn-mbsspn-mbsspn-l.md)
diff --git a/docs/c-runtime-library/reference/strtoimax-strtoimax-l-wcstoimax-wcstoimax-l.md b/docs/c-runtime-library/reference/strtoimax-strtoimax-l-wcstoimax-wcstoimax-l.md
index c6bcf88b3f..288b4dcce8 100644
--- a/docs/c-runtime-library/reference/strtoimax-strtoimax-l-wcstoimax-wcstoimax-l.md
+++ b/docs/c-runtime-library/reference/strtoimax-strtoimax-l-wcstoimax-wcstoimax-l.md
@@ -1,14 +1,13 @@
---
-description: "Learn more about: strtoimax, _strtoimax_l, wcstoimax, _wcstoimax_l"
title: "strtoimax, _strtoimax_l, wcstoimax, _wcstoimax_l"
-ms.date: "11/04/2016"
+description: "Learn more about: strtoimax, _strtoimax_l, wcstoimax, _wcstoimax_l"
+ms.date: 11/04/2016
api_name: ["wcstoimax", "_wcstoimax_l", "_strtoimax_l", "strtoimax"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-convert-l1-1-0.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
f1_keywords: ["wcstoimax", "_tcstoimax", "strtoimax", "_wcstoimax_l", "_strtoimax_l", "_tcstoimax_l"]
-helpviewer_keywords: ["strtoimax funciton", "conversion functions", "_strtoimax_l function", "_wcstoimax_l function", "wcstoimax function"]
-ms.assetid: 4530d3dc-aaac-4a76-b7cf-29ae3c98d0ae
+helpviewer_keywords: ["strtoimax function", "conversion functions", "_strtoimax_l function", "_wcstoimax_l function", "wcstoimax function"]
---
# `strtoimax`, `_strtoimax_l`, `wcstoimax`, `_wcstoimax_l`
diff --git a/docs/c-runtime-library/reference/strtok-s-strtok-s-l-wcstok-s-wcstok-s-l-mbstok-s-mbstok-s-l.md b/docs/c-runtime-library/reference/strtok-s-strtok-s-l-wcstok-s-wcstok-s-l-mbstok-s-mbstok-s-l.md
index 991ab61e98..4f0db782fa 100644
--- a/docs/c-runtime-library/reference/strtok-s-strtok-s-l-wcstok-s-wcstok-s-l-mbstok-s-mbstok-s-l.md
+++ b/docs/c-runtime-library/reference/strtok-s-strtok-s-l-wcstok-s-wcstok-s-l-mbstok-s-mbstok-s-l.md
@@ -6,7 +6,7 @@ api_name: ["_wcstok_s_l", "_mbstok_s_l", "_mbstok_s", "strtok_s", "wcstok_s", "_
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-multibyte-l1-1-0.dll", "api-ms-win-crt-string-l1-1-0.dll", "ntoskrnl.exe"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["_tcstok_s_l", "_wcstok_s_l", "_tcstok_s", "_mbstok_s_l", "strtok_s", "wcstok_s", "_mbstok_s", "_strtok_s_l"]
+f1_keywords: ["STRING/strtok_s", "TCHAR/_strtok_s_l", "MBSTRING/_mbstok_s", "MBSTRING/_mbstok_s_l", "CORECRT_WSTRING/wcstok_s", "TCHAR/_wcstok_s_l", "TCHAR/_tcstok_s", "TCHAR/_tcstok_s_l", "strtok_s", "_strtok_s_l", "_mbstok_s", "_mbstok_s_l", "wcstok_s", "_wcstok_s_l", "_tcstok_s", "_tcstok_s_l"]
helpviewer_keywords: ["_strtok_s_l function", "_mbstok_s_l function", "strings [C++], searching", "mbstok_s_l function", "wcstok_s_l function", "_wcstok_s_l function", "_tcstok_s function", "_tcstok_s_l function", "strtok_s_l function", "wcstok_s function", "tokens, finding in strings", "mbstok_s function", "_mbstok_s function", "strtok_s function"]
ms.assetid: 7696c972-f83b-4617-8c82-95973e9fdb46
---
diff --git a/docs/c-runtime-library/reference/strtok-strtok-l-wcstok-wcstok-l-mbstok-mbstok-l.md b/docs/c-runtime-library/reference/strtok-strtok-l-wcstok-wcstok-l-mbstok-mbstok-l.md
index 891aa00f0d..00ad10086c 100644
--- a/docs/c-runtime-library/reference/strtok-strtok-l-wcstok-wcstok-l-mbstok-mbstok-l.md
+++ b/docs/c-runtime-library/reference/strtok-strtok-l-wcstok-wcstok-l-mbstok-mbstok-l.md
@@ -6,7 +6,7 @@ api_name: ["_mbstok_l", "_mbstok", "wcstok", "_mbstok", "strtok", "_wcstok_l", "
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-multibyte-l1-1-0.dll", "api-ms-win-crt-string-l1-1-0.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["_mbstok", "strtok", "_tcstok", "wcstok"]
+f1_keywords: ["STRING/strtok", "TCHAR/_strtok_l", "MBSTRING/_mbstok", "MBSTRING/_mbstok_l", "CORECRT_WSTRING/wcstok", "TCHAR/_wcstok_l", "TCHAR/_tcstok", "TCHAR/_tcstok_l", "strtok", "strtok_l", "_mbstok", "_mbstok_l", "wcstok", "_wcstok_l", "_tcstok", "_tcstok_l"]
helpviewer_keywords: ["mbstok_l function", "strings [C++], searching", "tcstok function", "_tcstok function", "_strtok_l function", "strtok function", "mbstok function", "wcstok_l function", "_mbstok function", "tcstok_l function", "tokens, finding in strings", "_mbstok_l function", "wcstok function", "_wcstok_l function", "_tcstok_l function", "strtok_l function"]
ms.assetid: 904cb734-f0d7-4d77-ba81-4791ddf461ae
---
@@ -24,12 +24,12 @@ char *strtok(
char *strToken,
const char *strDelimit
);
-char *strtok_l(
+char *_strtok_l(
char *strToken,
const char *strDelimit,
_locale_t locale
);
-wchar_t *wcstok(
+wchar_t *wcstok( /* Non-standard, define _CRT_NON_CONFORMING_WCSTOK to use */
wchar_t *strToken,
const wchar_t *strDelimit
);
@@ -38,7 +38,7 @@ wchar_t *wcstok(
const wchar_t *strDelimit,
wchar_t **context
);
-wchar_t *wcstok_l(
+wchar_t *_wcstok_l(
wchar_t *strToken,
const wchar_t *strDelimit,
_locale_t locale
diff --git a/docs/c-runtime-library/reference/strtol-wcstol-strtol-l-wcstol-l.md b/docs/c-runtime-library/reference/strtol-wcstol-strtol-l-wcstol-l.md
index 01f3d1880b..4ae62a70e1 100644
--- a/docs/c-runtime-library/reference/strtol-wcstol-strtol-l-wcstol-l.md
+++ b/docs/c-runtime-library/reference/strtol-wcstol-strtol-l-wcstol-l.md
@@ -6,7 +6,7 @@ api_name: ["strtol", "wcstol", "_strtol_l", "_wcstol_l", "_o__strtol_l", "_o__wc
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-convert-l1-1-0.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["_wcstol_l", "strtol", "_tcstol", "wcstol", "_strtol_l", "_tcstol_l"]
+f1_keywords: ["STDLIB/strtol", "STDLIB/_strtol_l", "CORECRT_WSTDLIB/wcstol", "CORECRT_WSTDLIB/_wcstol_l", "TCHAR/_tcstol", "TCHAR/_tcstol_l", "strtol", "_strtol_l", "wcstol", "_wcstol_l", "_tcstol", "_tcstol_l"]
helpviewer_keywords: ["wcstol function", "wcstol_l function", "_tcstol function", "string conversion, to integers", "tcstol function", "strtol_l function", "_wcstol_l function", "_strtol_l function", "strtol function"]
no-loc: [strtol, wcstol, _strtol_l, _wcstol_l, LONG_MAX, LONG_MIN, errno, ERANGE, EINVAL, LC_NUMERIC, _tcstol, _tcstol_l, localeconv, setlocale, _wsetlocale, strtod, _strtod_l, wcstod, _wcstod_l, strtoll, _strtoll_l, wcstoll, _wcstoll_l, strtoul, _strtoul_l, wcstoul, _wcstoul_l, atof, _atof_l, _wtof, _wtof_l]
---
diff --git a/docs/c-runtime-library/reference/strtold-strtold-l-wcstold-wcstold-l.md b/docs/c-runtime-library/reference/strtold-strtold-l-wcstold-wcstold-l.md
index 3825ba2770..e24182d5b5 100644
--- a/docs/c-runtime-library/reference/strtold-strtold-l-wcstold-wcstold-l.md
+++ b/docs/c-runtime-library/reference/strtold-strtold-l-wcstold-wcstold-l.md
@@ -6,7 +6,7 @@ api_name: ["wcstold", "strtold", "_strtold_l", "_wcstold_l", "_o__strtold_l", "_
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-convert-l1-1-0.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["_tcstold_l", "_wcstold_l", "_tcstold", "strtold", "_strtold_l", "wcstold"]
+f1_keywords: ["STDLIB/strtold", "STDLIB/_strtold_l", "CORECRT_WSTDLIB/wcstold", "CORECRT_WSTDLIB/_wcstold_l", "TCHAR/_tcstold", "TCHAR/_tcstold_l", "strtold", "_strtold_l", "wcstold", "_wcstold_l", "_tcstold", "_tcstold_l"]
ms.assetid: 928c0c9a-bc49-445b-8822-100eb5954115
---
# `strtold`, `_strtold_l`, `wcstold`, `_wcstold_l`
diff --git a/docs/c-runtime-library/reference/strtoll-strtoll-l-wcstoll-wcstoll-l.md b/docs/c-runtime-library/reference/strtoll-strtoll-l-wcstoll-wcstoll-l.md
index d2cb4475f8..0460b9509d 100644
--- a/docs/c-runtime-library/reference/strtoll-strtoll-l-wcstoll-wcstoll-l.md
+++ b/docs/c-runtime-library/reference/strtoll-strtoll-l-wcstoll-wcstoll-l.md
@@ -6,7 +6,7 @@ api_name: ["strtoll", "wcstoll", "_strtoll_l", "_wcstoll_l", "_o__strtoll_l", "_
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-convert-l1-1-0.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["_strtoll_l", "_tcstoll_l", "_tcstoll", "_wcstoll_l", "strtoll", "wcstoll"]
+f1_keywords: ["STDLIB/strtoll", "STDLIB/_strtoll_l", "CORECRT_WSTDLIB/wcstoll", "CORECRT_WSTDLIB/_wcstoll_l", "TCHAR/_tcstoll", "TCHAR/_tcstoll_l", "strtoll", "_strtoll_l", "wcstoll", "_wcstoll_l", "_tcstoll", "_tcstoll_l"]
helpviewer_keywords: ["_tcstoll_l function", "_wcstoll_l function", "strtoll function", "wcstoll function", "_tcstoll function", "_strtoll_l function"]
ms.assetid: e2d05dcf-d3b2-4291-9e60-dee77e540fd7
---
diff --git a/docs/c-runtime-library/reference/strtoul-strtoul-l-wcstoul-wcstoul-l.md b/docs/c-runtime-library/reference/strtoul-strtoul-l-wcstoul-wcstoul-l.md
index 62e45135ec..7584413c40 100644
--- a/docs/c-runtime-library/reference/strtoul-strtoul-l-wcstoul-wcstoul-l.md
+++ b/docs/c-runtime-library/reference/strtoul-strtoul-l-wcstoul-wcstoul-l.md
@@ -6,7 +6,7 @@ api_name: ["_wcstoul_l", "_strtoul_l", "strtoul", "wcstoul", "_o__strtoul_l", "_
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-convert-l1-1-0.dll", "ntoskrnl.exe"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["strtoul", "_tcstoul", "wcstoul"]
+f1_keywords: ["STDLIB/strtoul", "STDLIB/_strtoul_l", "CORECRT_WSTDLIB/wcstoul", "CORECRT_WSTDLIB/_wcstoul_l", "TCHAR/_tcstoul", "TCHAR/_tcstoul_l", "strtoul", "_strtoul_l", "wcstoul", "_wcstoul_l", "_tcstoul", "_tcstoul_l"]
helpviewer_keywords: ["_wcstoul_l function", "_tcstoul function", "_strtoul_l function", "string conversion, to integers", "wcstoul function", "strtoul function", "wcstoul_l function", "strtoul_l function", "tcstoul function"]
---
# `strtoul`, `_strtoul_l`, `wcstoul`, `_wcstoul_l`
diff --git a/docs/c-runtime-library/reference/strtoull-strtoull-l-wcstoull-wcstoull-l.md b/docs/c-runtime-library/reference/strtoull-strtoull-l-wcstoull-wcstoull-l.md
index bfe3fcdaec..58bde7c901 100644
--- a/docs/c-runtime-library/reference/strtoull-strtoull-l-wcstoull-wcstoull-l.md
+++ b/docs/c-runtime-library/reference/strtoull-strtoull-l-wcstoull-wcstoull-l.md
@@ -6,7 +6,7 @@ api_name: ["_strtoull_l", "_wcstoull_l", "strtoull", "wcstoull", "_o__strtoull_l
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-convert-l1-1-0.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["_wcstoull_l", "_tcstoull", "_tcstoull_l", "wcstoull", "_strtoull_l", "strtoull"]
+f1_keywords: ["STDLIB/strtoull", "STDLIB/_strtoull_l", "CORECRT_WSTDLIB/wcstoull", "CORECRT_WSTDLIB/_wcstoull_l", "TCHAR/_tcstoull", "TCHAR/_tcstoull_l", "strtoull", "_strtoull_l", "wcstoull", "_wcstoull_l", "_tcstoull", "_tcstoull_l"]
helpviewer_keywords: ["strtoull function", "_tcstoull_l function", "_tcstoull function", "_wcstoull_l function", "_strtoull_l function", "wcstoull function"]
ms.assetid: 36dac1cc-e901-40a0-8802-63562d6d01df
---
diff --git a/docs/c-runtime-library/reference/strtoumax-strtoumax-l-wcstoumax-wcstoumax-l.md b/docs/c-runtime-library/reference/strtoumax-strtoumax-l-wcstoumax-wcstoumax-l.md
index 1375351b56..39b89feffc 100644
--- a/docs/c-runtime-library/reference/strtoumax-strtoumax-l-wcstoumax-wcstoumax-l.md
+++ b/docs/c-runtime-library/reference/strtoumax-strtoumax-l-wcstoumax-wcstoumax-l.md
@@ -6,7 +6,7 @@ api_name: ["_wcstoumax_l", "_strtoumax_l", "wcstoumax", "strtoumax"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-convert-l1-1-0.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["wcstoumax", "_tcstoumax", "_strtoumax_l", "_wcstoumax_l", "_tcstoumax_l", "strtoumax"]
+f1_keywords: ["INTTYPES/strtoumax", "INTTYPES/_strtoumax_l", "INTTYPES/wcstoumax", "INTTYPES/_wcstoumax_l", "TCHAR/_tcstoumax", "TCHAR/_tcstoumax_l", "strtoumax", "_strtoumax_l", "wcstoumax", "_wcstoumax_l", "_tcstoumax", "_tcstoumax_l"]
helpviewer_keywords: ["_strtoumax_l function", "conversion functions", "wcstoumax function", "_wcstoumax_l function", "strtoumax function"]
ms.assetid: 566769f9-495b-4508-b9c6-02217a578897
---
@@ -88,10 +88,7 @@ A *`whitespace`* may consist of space and tab characters, which are ignored. *`d
| Routine | Required header |
|---|---|
-| **`strtoumax`** | \ |
-| **`wcstoumax`** | \ or \ |
-| **`_strtoumax_l`** | \ |
-| **`_wcstoumax_l`** | \ or \ |
+| **`strtoumax`**, **`wcstoumax`**, **`_strtoumax_l`**, **`_wcstoumax_l`** | \ |
For more compatibility information, see [Compatibility](../compatibility.md).
diff --git a/docs/c-runtime-library/reference/strupr-s-strupr-s-l-mbsupr-s-mbsupr-s-l-wcsupr-s-wcsupr-s-l.md b/docs/c-runtime-library/reference/strupr-s-strupr-s-l-mbsupr-s-mbsupr-s-l-wcsupr-s-wcsupr-s-l.md
index d4617bb2cd..9f490cf61e 100644
--- a/docs/c-runtime-library/reference/strupr-s-strupr-s-l-mbsupr-s-mbsupr-s-l-wcsupr-s-wcsupr-s-l.md
+++ b/docs/c-runtime-library/reference/strupr-s-strupr-s-l-mbsupr-s-mbsupr-s-l-wcsupr-s-wcsupr-s-l.md
@@ -6,7 +6,7 @@ api_name: ["_strupr_s", "_strupr_s_l", "_mbsupr_s", "_wcsupr_s_l", "_mbsupr_s_l"
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-multibyte-l1-1-0.dll", "api-ms-win-crt-string-l1-1-0.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["strupr_s", "mbsupr_s", "wcsupr_s", "_mbsupr_s_l", "mbsupr_s_l", "wcsupr_s_l", "_wcsupr_s", "_tcsupr_s_l", "_mbsupr_s", "_tcsupr_s", "strupr_s_l", "_wcsupr_s_l", "_strupr_s", "_strupr_s_l"]
+f1_keywords: ["_strupr_s", "_strupr_s_l", "_mbsupr_s", "_mbsupr_s_l", "_wcsupr_s", "_wcsupr_s_l", "_tcsupr_s", "_tcsupr_s_l"]
helpviewer_keywords: ["mbsupr_s_l function", "strupr_s_l function", "_wcsupr_s_l function", "_tcsupr_s_l function", "mbsupr_s function", "_wcsupr_s function", "uppercase, converting strings to", "tcsupr_s function", "string conversion [C++], case", "strupr_s function", "wcsupr_s_l function", "_mbsupr_s function", "_mbsupr_s_l function", "_strupr_s_l function", "tcsupr_s_l function", "strings [C++], case", "converting case, CRT functions", "_tcsupr_s function", "strings [C++], converting case", "_strupr_s function", "wcsupr_s function"]
ms.assetid: 82d3a273-9f6f-4a26-9560-919d891e4581
---
diff --git a/docs/c-runtime-library/reference/strupr-strupr-l-mbsupr-mbsupr-l-wcsupr-l-wcsupr.md b/docs/c-runtime-library/reference/strupr-strupr-l-mbsupr-mbsupr-l-wcsupr-l-wcsupr.md
index b4bb9137be..3e7ba39f46 100644
--- a/docs/c-runtime-library/reference/strupr-strupr-l-mbsupr-mbsupr-l-wcsupr-l-wcsupr.md
+++ b/docs/c-runtime-library/reference/strupr-strupr-l-mbsupr-mbsupr-l-wcsupr-l-wcsupr.md
@@ -6,7 +6,7 @@ api_name: ["_mbsupr_l", "_mbsupr", "_strupr_l", "_wcsupr", "_wcsupr_l", "_strupr
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ntoskrnl.exe", "ucrtbase.dll", "api-ms-win-crt-multibyte-l1-1-0.dll", "api-ms-win-crt-string-l1-1-0.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["_mbsupr", "_ftcsupr", "mbsupr", "_tcsupr", "strupr_l", "_fstrupr", "_strupr", "mbsupr_l", "_wcsupr"]
+f1_keywords: ["STRING/_strupr", "STRING/_strupr_l", "MBSTRING/_mbsupr", "MBSTRING/_mbsupr_l", "CORECRT_WSTRING/_wcsupr", "CORECRT_WSTRING/_wcsupr_l", "TCHAR/_tcsupr", "TCHAR/_tcsupr_l", "_strupr", "_strupr_l", "_mbsupr", "_mbsupr_l", "_wcsupr", "_wcsupr_l", "_tcsupr", "_tcsupr_l", "_ftcsupr", "_fstrupr"]
helpviewer_keywords: ["tcsupr_l function", "mbsupr function", "strupr function", "uppercase, converting strings to", "wcsupr function", "_wcsupr function", "string conversion [C++], case", "ftcsupr function", "_ftcsupr function", "_wcsupr_l function", "wcsupr_l function", "strings [C++], case", "tcsupr function", "_tcsupr_l function", "_fstrupr function", "_strupr_l function", "_mbsupr_l function", "converting case, CRT functions", "fstrupr function", "mbsupr_l function", "strupr_l function", "_strupr function", "_mbsupr function", "_tcsupr function", "strings [C++], converting case"]
ms.assetid: caac8f16-c233-41b6-91ce-575ec7061b77
---
diff --git a/docs/c-runtime-library/reference/strupr-wcsupr.md b/docs/c-runtime-library/reference/strupr-wcsupr.md
index b11235455a..1b25726e49 100644
--- a/docs/c-runtime-library/reference/strupr-wcsupr.md
+++ b/docs/c-runtime-library/reference/strupr-wcsupr.md
@@ -6,7 +6,7 @@ api_name: ["strupr", "wcsupr"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["strupr", "wcsupr"]
+f1_keywords: ["STRING/strupr", "CORECRT_WSTRING/wcsupr", "strupr", "wcsupr"]
helpviewer_keywords: ["strupr function", "wcsupr function"]
ms.assetid: 17dfe1cd-3b09-4702-9f89-2207f44953e6
---
diff --git a/docs/c-runtime-library/reference/strxfrm-wcsxfrm-strxfrm-l-wcsxfrm-l.md b/docs/c-runtime-library/reference/strxfrm-wcsxfrm-strxfrm-l-wcsxfrm-l.md
index 4b8d2bb8c0..793aca693f 100644
--- a/docs/c-runtime-library/reference/strxfrm-wcsxfrm-strxfrm-l-wcsxfrm-l.md
+++ b/docs/c-runtime-library/reference/strxfrm-wcsxfrm-strxfrm-l-wcsxfrm-l.md
@@ -6,7 +6,7 @@ api_name: ["strxfrm", "_wcsxfrm_l", "_strxfrm_l", "wcsxfrm", "_o__strxfrm_l", "_
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-string-l1-1-0.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["strxfrm", "_tcsxfrm", "wcsxfrm"]
+f1_keywords: ["STRING/strxfrm", "STRING/_strxfrm_l", "CORECRT_WSTRING/wcsxfrm", "CORECRT_WSTRING/_wcsxfrm_l", "TCHAR/_tcsxfrm", "TCHAR/_tcsxfrm_l", "strxfrm", "_strxfrm_l", "wcsxfrm", "_wcsxfrm_l", "_tcsxfrm", "_tcsxfrm_l"]
helpviewer_keywords: ["strxfrm_l function", "_tcsxfrm function", "_strxfrm_l function", "strxfrm function", "wcsxfrm_l function", "wcsxfrm function", "string comparison [C++], transforming strings", "tcsxfrm function", "strings [C++], comparing locale", "_wcsxfrm_l function"]
ms.assetid: 6ba8e1f6-4484-49aa-83b8-bc2373187d9e
---
diff --git a/docs/c-runtime-library/reference/swab.md b/docs/c-runtime-library/reference/swab.md
index a6c0d0509d..2eb748ef51 100644
--- a/docs/c-runtime-library/reference/swab.md
+++ b/docs/c-runtime-library/reference/swab.md
@@ -6,7 +6,7 @@ api_name: ["_swab", "stdlib/_swab", "_o__swab"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-utility-l1-1-0.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["_swab", "stdlib/_swab"]
+f1_keywords: ["STDLIB/_swab", "_swab"]
helpviewer_keywords: ["_swab function", "swapping bytes", "swab function", "bytes, swapping"]
ms.assetid: 017142f2-050c-4f6a-8b49-6b094f58ec94
---
diff --git a/docs/c-runtime-library/reference/system-wsystem.md b/docs/c-runtime-library/reference/system-wsystem.md
index 23ad8b3f09..7afde9d491 100644
--- a/docs/c-runtime-library/reference/system-wsystem.md
+++ b/docs/c-runtime-library/reference/system-wsystem.md
@@ -6,7 +6,7 @@ api_name: ["system", "_wsystem", "_o__wsystem", "_o_system"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-runtime-l1-1-0.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["_tsystem", "_wsystem"]
+f1_keywords: ["PROCESS/system", "CORECRT_WPROCESS/_wsystem", "TCHAR/_tsystem", "system", "_wsystem", "_tsystem"]
helpviewer_keywords: ["_wsystem function", "wsystem function", "tsystem function", "_tsystem function", "system function", "commands, executing", "command interpreter"]
ms.assetid: 7d3df2b6-f742-49ce-bf52-012b0aee3df5
---
diff --git a/docs/c-runtime-library/reference/tan-tanf-tanl.md b/docs/c-runtime-library/reference/tan-tanf-tanl.md
index fa32e9e62c..815d0b95a9 100644
--- a/docs/c-runtime-library/reference/tan-tanf-tanl.md
+++ b/docs/c-runtime-library/reference/tan-tanf-tanl.md
@@ -6,8 +6,8 @@ api_name: ["tan", "tanf", "tanl", "_o_tan", "_o_tanf"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-math-l1-1-0.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["tan", "tanf", "_tanl", "tanl"]
-helpviewer_keywords: ["tanl function", "_tanl function", "tan function", "calculating tangents", "tangent", "tanf function", "trigonometric functions"]
+f1_keywords: ["CORECRT_MATH/tan", "CORECRT_MATH/tanf", "CORECRT_MATH/tanl", "tan", "tanf", "tanl"]
+helpviewer_keywords: ["tanl function", "tan function", "calculating tangents", "tangent", "tanf function", "trigonometric functions"]
ms.assetid: 36cc0ce8-9c80-4653-b354-ddb3b378b6bd
---
# `tan`, `tanf`, `tanl`
diff --git a/docs/c-runtime-library/reference/tanh-tanhf-tanhl.md b/docs/c-runtime-library/reference/tanh-tanhf-tanhl.md
index 863eade0ca..de71ee3178 100644
--- a/docs/c-runtime-library/reference/tanh-tanhf-tanhl.md
+++ b/docs/c-runtime-library/reference/tanh-tanhf-tanhl.md
@@ -6,8 +6,8 @@ api_name: ["tanh", "tanhf", "tanhl", "_o_tanh", "_o_tanhf"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-math-l1-1-0.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["tanh", "tanhf", "tanhl", "_tanhl"]
-helpviewer_keywords: ["tanhl function", "_tanhl function", "tanh function", "tanhf function", "trigonometric functions", "hyperbolic functions"]
+f1_keywords: ["CORECRT_MATH/tanh", "CORECRT_MATH/tanhf", "CORECRT_MATH/tanhl", "tanh", "tanhf", "tanhl"]
+helpviewer_keywords: ["tanhl function", "tanh function", "tanhf function", "trigonometric functions", "hyperbolic functions"]
---
# `tanh`, `tanhf`, `tanhl`
diff --git a/docs/c-runtime-library/reference/tell-telli64.md b/docs/c-runtime-library/reference/tell-telli64.md
index fe9aa210f2..9e7cc0ff45 100644
--- a/docs/c-runtime-library/reference/tell-telli64.md
+++ b/docs/c-runtime-library/reference/tell-telli64.md
@@ -6,7 +6,7 @@ api_name: ["_telli64", "_tell", "_o__tell", "_o__telli64"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-stdio-l1-1-0.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["telli64", "_telli64", "_tell"]
+f1_keywords: ["CORECRT_IO/_tell", "CORECRT_IO/_telli64", "_tell", "_telli64"]
helpviewer_keywords: ["tell function", "file pointers [C++], getting", "_tell function", "file pointers [C++]", "telli64 function", "_telli64 function"]
ms.assetid: 1500e8f9-8fec-4253-9eec-ec66125dfc9b
---
diff --git a/docs/c-runtime-library/reference/tell.md b/docs/c-runtime-library/reference/tell.md
index 3422228a26..3c48b55f02 100644
--- a/docs/c-runtime-library/reference/tell.md
+++ b/docs/c-runtime-library/reference/tell.md
@@ -6,7 +6,7 @@ api_name: ["tell"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["tell"]
+f1_keywords: ["CORECRT_IO/tell", "tell"]
helpviewer_keywords: ["tell function"]
ms.assetid: 3a92a40d-f472-4545-a493-f57c340ee798
---
diff --git a/docs/c-runtime-library/reference/tempnam-dbg-wtempnam-dbg.md b/docs/c-runtime-library/reference/tempnam-dbg-wtempnam-dbg.md
index e06b583cc8..296d21e43e 100644
--- a/docs/c-runtime-library/reference/tempnam-dbg-wtempnam-dbg.md
+++ b/docs/c-runtime-library/reference/tempnam-dbg-wtempnam-dbg.md
@@ -6,7 +6,7 @@ api_name: ["_wtempnam_dbg", "_tempnam_dbg"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["wtempnam_dbg", "tempnam_dbg", "_tempnam_dbg", "_wtempnam_dbg"]
+f1_keywords: ["CRTDBG/_tempnam_dbg", "CRTDBG/_wtempnam_dbg", "_tempnam_dbg", "_wtempnam_dbg"]
helpviewer_keywords: ["file names [C++], creating temporary", "tempnam_dbg function", "temporary files, creating", "file names [C++], temporary", "wtempnam_dbg function", "_tempnam_dbg function", "_wtempnam_dbg function"]
ms.assetid: e3760bb4-bb01-4808-b689-2c45af56a170
---
@@ -61,7 +61,7 @@ Each function returns a pointer to the name generated or `NULL` if there's a fai
The **`_tempnam_dbg`** and **`_wtempnam_dbg`** functions are identical to `_tempnam` and `_wtempnam` except that, when `_DEBUG` is defined, these functions use the debug version of `malloc` and `_malloc_dbg`, to allocate memory if `NULL` is passed as the first parameter. For more information, see [`_malloc_dbg`](malloc-dbg.md).
-You don't need to call these functions explicitly in most cases. Instead, you can define the flag `_CRTDBG_MAP_ALLOC`. When `_CRTDBG_MAP_ALLOC` is defined, calls to `_tempnam` and `_wtempnam` are remapped to **`_tempnam_dbg`** and **`_wtempnam_dbg`**, respectively, with the *`blockType`* set to `_NORMAL_BLOCK`. Thus, you don't need to call these functions explicitly unless you want to mark the heap blocks as `_CLIENT_BLOCK`. For more information, see [Types of blocks on the debug heap](/visualstudio/debugger/crt-debug-heap-details).
+You don't need to call these functions explicitly in most cases. Instead, you can define the flag `_CRTDBG_MAP_ALLOC`. When `_CRTDBG_MAP_ALLOC` is defined, calls to `_tempnam` and `_wtempnam` are remapped to **`_tempnam_dbg`** and **`_wtempnam_dbg`**, respectively, with the *`blockType`* set to `_NORMAL_BLOCK`. Thus, you don't need to call these functions explicitly unless you want to mark the heap blocks as `_CLIENT_BLOCK`. For more information, see [Types of blocks on the debug heap](../crt-debug-heap-details.md#types-of-blocks-on-the-debug-heap).
### Generic-text routine mappings
@@ -81,4 +81,4 @@ For more compatibility information, see [Compatibility](../compatibility.md).
[`_tempnam`, `_wtempnam`, `tmpnam`, `_wtmpnam`](tempnam-wtempnam-tmpnam-wtmpnam.md)\
[Stream I/O](../stream-i-o.md)\
-[Debug versions of heap allocation functions](/visualstudio/debugger/debug-versions-of-heap-allocation-functions)
+[Debug versions of heap allocation functions](../debug-versions-of-heap-allocation-functions.md)
diff --git a/docs/c-runtime-library/reference/tempnam-wtempnam-tmpnam-wtmpnam.md b/docs/c-runtime-library/reference/tempnam-wtempnam-tmpnam-wtmpnam.md
index f7c406980f..10e1de817a 100644
--- a/docs/c-runtime-library/reference/tempnam-wtempnam-tmpnam-wtmpnam.md
+++ b/docs/c-runtime-library/reference/tempnam-wtempnam-tmpnam-wtmpnam.md
@@ -6,7 +6,7 @@ api_name: ["_wtempnam", "_wtmpnam", "tmpnam", "_tempnam"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-stdio-l1-1-0.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["wtempnam", "_wtmpnam", "wtmpnam", "tmpnam", "_wtempnam", "_tempnam"]
+f1_keywords: ["STDIO/tmpnam", "STDIO/_tempnam", "CORECRT_WSTDIO/_wtmpnam", "CORECRT_WSTDIO/_wtempnam", "TCHAR/_ttmpnam", "TCHAR/_ttempnam", "tmpnam", "_tempnam", "_wtmpnam", "_wtempnam", "_ttmpnam", "_ttempnam"]
helpviewer_keywords: ["wtempnam function", "file names [C++], creating temporary", "_tempnam function", "ttmpnam function", "tmpnam function", "tempnam function", "wtmpnam function", "temporary files, creating", "file names [C++], temporary", "_ttmpnam function", "_wtmpnam function", "_wtempnam function"]
ms.assetid: 3ce75f0f-5e30-42a6-9791-8d7cbfe70fca
---
diff --git a/docs/c-runtime-library/reference/tempnam.md b/docs/c-runtime-library/reference/tempnam.md
index 01d002181d..230f6c67c2 100644
--- a/docs/c-runtime-library/reference/tempnam.md
+++ b/docs/c-runtime-library/reference/tempnam.md
@@ -6,7 +6,7 @@ api_name: ["tempnam"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["tempnam"]
+f1_keywords: ["STDIO/tempnam", "tempnam"]
helpviewer_keywords: ["tempnam function"]
ms.assetid: 42446733-f131-470f-b4d0-96918becab11
---
diff --git a/docs/c-runtime-library/reference/terminate-crt.md b/docs/c-runtime-library/reference/terminate-crt.md
index 5cea25a23b..cda2e499e5 100644
--- a/docs/c-runtime-library/reference/terminate-crt.md
+++ b/docs/c-runtime-library/reference/terminate-crt.md
@@ -6,7 +6,7 @@ api_name: ["terminate", "_o_terminate"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-runtime-l1-1-0.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["terminate"]
+f1_keywords: ["CORECRT_TERMINATE/terminate", "EH/terminate", "terminate"]
helpviewer_keywords: ["terminate function", "exception handling, termination"]
ms.assetid: 90e67402-08e9-4b2a-962c-66a8afd3ccb4
---
diff --git a/docs/c-runtime-library/reference/tgamma-tgammaf-tgammal.md b/docs/c-runtime-library/reference/tgamma-tgammaf-tgammal.md
index b6b48deac2..eb9595efd4 100644
--- a/docs/c-runtime-library/reference/tgamma-tgammaf-tgammal.md
+++ b/docs/c-runtime-library/reference/tgamma-tgammaf-tgammal.md
@@ -6,7 +6,7 @@ api_name: ["tgamma", "tgammaf", "tgammal", "_o_tgamma", "_o_tgammaf", "_o_tgamma
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-math-l1-1-0.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["tgamma", "tgammaf", "tgammal", "math/tgamma", "math/tgammaf", "math/tgammal"]
+f1_keywords: ["CORECRT_MATH/tgamma", "CORECRT_MATH/tgammaf", "CORECRT_MATH/tgammal", "tgamma", "tgammaf", "tgammal"]
helpviewer_keywords: ["tgamma function", "tgammaf function", "tgammal function"]
ms.assetid: f1bd2681-8af2-48a9-919d-5358fd068acd
---
diff --git a/docs/c-runtime-library/reference/time-time32-time64.md b/docs/c-runtime-library/reference/time-time32-time64.md
index 2d90eaae99..782e7aa835 100644
--- a/docs/c-runtime-library/reference/time-time32-time64.md
+++ b/docs/c-runtime-library/reference/time-time32-time64.md
@@ -6,7 +6,7 @@ api_name: ["time", "_time64", "_time32"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-time-l1-1-0.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["time", "_time64", "time/time", "time/_time32", "time/_time64", "_time32"]
+f1_keywords: ["TIME/time", "TIME/_time32", "TIME/_time64", "time", "_time32", "_time64"]
helpviewer_keywords: ["time32 function", "_time32 function", "_time64 function", "time functions", "system time", "time64 function"]
ms.assetid: 280e00f2-2b93-4ece-94cd-e048484c6cc7
---
diff --git a/docs/c-runtime-library/reference/timespec-get-timespec32-get-timespec64-get1.md b/docs/c-runtime-library/reference/timespec-get-timespec32-get-timespec64-get1.md
index 48983cf8df..e14e404ae6 100644
--- a/docs/c-runtime-library/reference/timespec-get-timespec32-get-timespec64-get1.md
+++ b/docs/c-runtime-library/reference/timespec-get-timespec32-get-timespec64-get1.md
@@ -6,7 +6,7 @@ api_name: ["timespec_get", "_timespec32_get", "_timespec64_get", "_o__timespec32
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-time-l1-1-0.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["timespec_get", "_timespec32_get", "_timespec64_get", "time/timespec_get", "time/_timespec32_get", "time/_timespec64_get", "timespec", "_timespec32", "_timespec64"]
+f1_keywords: ["TIME/timespec_get", "TIME/_timespec32_get", "TIME/_timespec64_get", "TIME/timespec", "TIME/_timespec32", "TIME/_timespec64", "timespec_get", "_timespec32_get", "_timespec64_get", "timespec", "_timespec32", "_timespec64"]
helpviewer_keywords: ["timespec_get function", "_timespec32_get function", "_timespec64_get function"]
ms.assetid: ed757258-b4f2-4c1d-a91b-22ea6ffce4ab
---
diff --git a/docs/c-runtime-library/reference/tmpfile-s.md b/docs/c-runtime-library/reference/tmpfile-s.md
index eacbfabb8f..d71b77dcea 100644
--- a/docs/c-runtime-library/reference/tmpfile-s.md
+++ b/docs/c-runtime-library/reference/tmpfile-s.md
@@ -6,7 +6,7 @@ api_name: ["tmpfile_s", "_o_tmpfile_s"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-stdio-l1-1-0.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["tmpfile_s"]
+f1_keywords: ["STDIO/tmpfile_s", "tmpfile_s"]
helpviewer_keywords: ["temporary files", "tmpfile_s function", "temporary files, creating"]
ms.assetid: 50879c69-215e-425a-a2a3-8b5467121eae
---
diff --git a/docs/c-runtime-library/reference/tmpfile.md b/docs/c-runtime-library/reference/tmpfile.md
index 0f1d2eaea0..53f2b59e95 100644
--- a/docs/c-runtime-library/reference/tmpfile.md
+++ b/docs/c-runtime-library/reference/tmpfile.md
@@ -6,7 +6,7 @@ api_name: ["tmpfile"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-stdio-l1-1-0.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["tmpfile"]
+f1_keywords: ["STDIO/tmpfile", "tmpfile"]
helpviewer_keywords: ["temporary files", "tmpfile function", "temporary files, creating"]
ms.assetid: c4a4dc24-70da-438d-ae4e-98352d88e375
---
diff --git a/docs/c-runtime-library/reference/tmpnam-s-wtmpnam-s.md b/docs/c-runtime-library/reference/tmpnam-s-wtmpnam-s.md
index 2078465d5a..bb547ff8fe 100644
--- a/docs/c-runtime-library/reference/tmpnam-s-wtmpnam-s.md
+++ b/docs/c-runtime-library/reference/tmpnam-s-wtmpnam-s.md
@@ -6,7 +6,7 @@ api_name: ["tmpnam_s", "_wtmpnam_s", "_o__wtmpnam_s", "_o_tmpnam_s"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-stdio-l1-1-0.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["tmpnam_s", "_wtmpnam_s", "L_tmpnam_s"]
+f1_keywords: ["STDIO/tmpnam_s", "CORECRT_WSTDIO/_wtmpnam_s", "TCHAR/_ttmpnam_s", "STDIO/L_tmpnam_s", "tmpnam_s", "_wtmpnam_s", "_ttmpnam_s", "L_tmpnam_s"]
helpviewer_keywords: ["tmpnam_s function", "file names [C++], creating temporary", "_wtmpnam_s function", "L_tmpnam_s constant", "temporary files, creating", "file names [C++], temporary", "wtmpnam_s function"]
ms.assetid: e70d76dc-49f5-4aee-bfa2-f1baa2bcd29f
---
diff --git a/docs/c-runtime-library/reference/toascii-toascii.md b/docs/c-runtime-library/reference/toascii-toascii.md
index 89431498f4..590d1ddca7 100644
--- a/docs/c-runtime-library/reference/toascii-toascii.md
+++ b/docs/c-runtime-library/reference/toascii-toascii.md
@@ -6,7 +6,7 @@ api_name: ["__toascii"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-convert-l1-1-0.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["__toascii", "toascii", "ctype/toascii", "ctype/__toascii"]
+f1_keywords: ["CTYPE/toascii", "CTYPE/__toascii", "__toascii", "toascii"]
helpviewer_keywords: ["toascii function", "string conversion, to ASCII characters", "__toascii function", "ASCII characters, converting to"]
ms.assetid: a07c0608-b0e2-4da2-a20c-7b64d6a9b77c
---
diff --git a/docs/c-runtime-library/reference/tolower-tolower-towlower-tolower-l-towlower-l.md b/docs/c-runtime-library/reference/tolower-tolower-towlower-tolower-l-towlower-l.md
index 928e27355d..1bdcdc5a05 100644
--- a/docs/c-runtime-library/reference/tolower-tolower-towlower-tolower-l-towlower-l.md
+++ b/docs/c-runtime-library/reference/tolower-tolower-towlower-tolower-l-towlower-l.md
@@ -6,7 +6,7 @@ api_name: ["_tolower_l", "towlower", "tolower", "_tolower", "_towlower_l", "_o__
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ntdll.dll", "ucrtbase.dll", "api-ms-win-crt-string-l1-1-0.dll", "ntoskrnl.exe"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["_totlower", "tolower", "_tolower", "towlower"]
+f1_keywords: ["CTYPE/tolower", "CTYPE/_tolower", "CTYPE/_tolower_l", "CORECRT_WCTYPE/towlower", "CORECRT_WCTYPE/_towlower_l", "TCHAR/_totlower", "TCHAR/_totlower_l", "tolower", "_tolower", "_tolower_l", "towlower", "_towlower_l", "_totlower", "_totlower_l"]
helpviewer_keywords: ["tolower_l function", "_tolower_l function", "totlower function", "string conversion, to different characters", "lowercase, converting to", "tolower function", "string conversion, case", "towlower function", "_tolower function", "_totlower function", "towlower_l function", "case, converting", "characters, converting", "_towlower_l function"]
ms.assetid: 86e0fc02-94ae-4472-9631-bf8e96f67b92
---
diff --git a/docs/c-runtime-library/reference/toupper-toupper-towupper-toupper-l-towupper-l.md b/docs/c-runtime-library/reference/toupper-toupper-towupper-toupper-l-towupper-l.md
index 780a9e7375..0e89d73c47 100644
--- a/docs/c-runtime-library/reference/toupper-toupper-towupper-toupper-l-towupper-l.md
+++ b/docs/c-runtime-library/reference/toupper-toupper-towupper-toupper-l-towupper-l.md
@@ -6,9 +6,8 @@ api_name: ["_toupper_l", "towupper", "toupper", "_towupper_l", "_toupper", "_o__
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-string-l1-1-0.dll", "ntoskrnl.exe"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["towupper", "_toupper", "_totupper", "toupper"]
+f1_keywords: ["CTYPE/toupper", "CTYPE/_toupper", "CTYPE/_toupper_l", "CORECRT_WCTYPE/towupper", "CORECRT_WCTYPE/_towupper_l", "TCHAR/_totupper", "TCHAR/_totupper_l", "toupper", "_toupper", "_toupper_l", "towupper", "_towupper_l", "_totupper", "_totupper_l"]
helpviewer_keywords: ["_toupper function", "towupper function", "uppercase, converting strings to", "totupper function", "string conversion, to different characters", "towupper_l function", "toupper_l function", "string conversion, case", "_toupper_l function", "_towupper_l function", "_totupper function", "case, converting", "characters, converting", "toupper function"]
-ms.assetid: cdef1b0f-b19c-4d11-b7d2-cf6334c9b6cc
---
# `toupper`, `_toupper`, `towupper`, `_toupper_l`, `_towupper_l`
@@ -52,19 +51,17 @@ If *`c`* is a wide character for which `iswlower` is nonzero and there's a corre
There's no return value reserved to indicate an error.
-In order for **`toupper`** to give the expected results, [`__isascii`](isascii-isascii-iswascii.md) and [`islower`](islower-iswlower-islower-l-iswlower-l.md) must both return nonzero.
-
## Remarks
Each of these routines converts a given lowercase letter to an uppercase letter if possible and appropriate. The case conversion of **`towupper`** is locale-specific. Only the characters relevant to the current locale are changed in case. The functions without the `_l` suffix use the currently set locale. The versions of these functions with the `_l` suffix take the locale as a parameter and use that instead of the currently set locale. For more information, see [Locale](../locale.md).
-In order for **`toupper`** to give the expected results, [`__isascii`](isascii-isascii-iswascii.md) and [`isupper`](isupper-isupper-l-iswupper-iswupper-l.md) must both return nonzero.
+For **`toupper`** to give the expected results, [`__isascii`](isascii-isascii-iswascii.md) must return nonzero.
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).
### Generic-text routine mappings
-| TCHAR.H routine | `_UNICODE` and `_MBCS` not defined | `_MBCS` defined | `_UNICODE` defined |
+| `TCHAR.H` routine | `_UNICODE` and `_MBCS` not defined | `_MBCS` defined | `_UNICODE` defined |
|---|---|---|---|
| `_totupper` | **`toupper`** | **`_mbctoupper`** | **`towupper`** |
| `_totupper_l` | **`_toupper_l`** | **`_mbctoupper_l`** | **`_towupper_l`** |
diff --git a/docs/c-runtime-library/reference/towctrans.md b/docs/c-runtime-library/reference/towctrans.md
index 1b3094f66c..6cf88abded 100644
--- a/docs/c-runtime-library/reference/towctrans.md
+++ b/docs/c-runtime-library/reference/towctrans.md
@@ -6,7 +6,7 @@ api_name: ["towctrans"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-string-l1-1-0.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["towctrans"]
+f1_keywords: ["WCTYPE/towctrans", "towctrans"]
helpviewer_keywords: ["towctrans function"]
ms.assetid: 1ed1e70d-7b31-490f-a7d9-42564b5924ca
---
diff --git a/docs/c-runtime-library/reference/trunc-truncf-truncl.md b/docs/c-runtime-library/reference/trunc-truncf-truncl.md
index df5fa620e2..19c7bc0414 100644
--- a/docs/c-runtime-library/reference/trunc-truncf-truncl.md
+++ b/docs/c-runtime-library/reference/trunc-truncf-truncl.md
@@ -6,7 +6,7 @@ api_name: ["trunc", "truncf", "truncl"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-math-l1-1-0.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["trunc", "truncf", "truncl", "math/trunc", "math/truncf", "math/truncl"]
+f1_keywords: ["CORECRT_MATH/trunc", "CORECRT_MATH/truncf", "CORECRT_MATH/truncl", "math/trunc", "math/truncf", "math/truncl", "trunc", "truncf", "truncl"]
helpviewer_keywords: ["trunc function", "truncf function", "truncl function"]
ms.assetid: de2038ac-ac0b-483e-870c-e8992dcd4fd0
---
diff --git a/docs/c-runtime-library/reference/tzset.md b/docs/c-runtime-library/reference/tzset.md
index 6779735a34..23fcafc53d 100644
--- a/docs/c-runtime-library/reference/tzset.md
+++ b/docs/c-runtime-library/reference/tzset.md
@@ -6,7 +6,7 @@ api_name: ["_tzset", "_o__tzset"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-time-l1-1-0.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["_tzset"]
+f1_keywords: ["TIME/_tzset", "_tzset"]
helpviewer_keywords: ["_tzset function", "time environment variables", "environment variables, setting time"]
ms.assetid: 3f6ed537-b414-444d-b272-5dd377481930
---
diff --git a/docs/c-runtime-library/reference/uncaught-exception.md b/docs/c-runtime-library/reference/uncaught-exception.md
index 82ee1ebcc4..52c7a6c349 100644
--- a/docs/c-runtime-library/reference/uncaught-exception.md
+++ b/docs/c-runtime-library/reference/uncaught-exception.md
@@ -6,7 +6,7 @@ api_name: ["__uncaught_exception"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["__uncaught_exception"]
+f1_keywords: ["EH/__uncaught_exception"]
helpviewer_keywords: ["__uncaught_exception"]
ms.assetid: 4d9b75c6-c9c7-4876-b761-ea9ab1925e96
---
diff --git a/docs/c-runtime-library/reference/unexpected-crt.md b/docs/c-runtime-library/reference/unexpected-crt.md
index 68940b40b5..a1fabd706f 100644
--- a/docs/c-runtime-library/reference/unexpected-crt.md
+++ b/docs/c-runtime-library/reference/unexpected-crt.md
@@ -6,7 +6,7 @@ api_name: ["unexpected"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["unexpected"]
+f1_keywords: ["EH/unexpected"]
helpviewer_keywords: ["unexpected function"]
ms.assetid: 2f873763-15ad-4556-a924-dcf28f2b52b4
---
diff --git a/docs/c-runtime-library/reference/ungetc-nolock-ungetwc-nolock.md b/docs/c-runtime-library/reference/ungetc-nolock-ungetwc-nolock.md
index 035231ecb0..eba0a2a049 100644
--- a/docs/c-runtime-library/reference/ungetc-nolock-ungetwc-nolock.md
+++ b/docs/c-runtime-library/reference/ungetc-nolock-ungetwc-nolock.md
@@ -1,18 +1,17 @@
---
-description: "Learn more about: _ungetc_nolock, _ungetwc_nolock"
title: "_ungetc_nolock, _ungetwc_nolock"
+description: "Learn more about: _ungetc_nolock, _ungetwc_nolock"
ms.date: "4/2/2020"
api_name: ["_ungetwc_nolock", "_ungetc_nolock", "_o__ungetc_nolock", "_o__ungetwc_nolock"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-stdio-l1-1-0.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["_ungettc_nolock", "ungetwc_nolock", "ungetc_nolock", "_ungetc_nolock", "_ungetwc_nolock"]
+f1_keywords: ["STDIO/_ungetc_nolock", "CORECRT_WSTDIO/_ungetwc_nolock", "TCHAR/_ungettc_nolock", "_ungetc_nolock", "_ungetwc_nolock", "_ungettc_nolock"]
helpviewer_keywords: ["_ungettc_nolock function", "_ungetwc_nolock function", "characters, pushing back onto stream", "_ungetc_nolock function", "ungetwc_nolock function", "ungettc_nolock function", "ungetc_nolock function"]
-ms.assetid: aa02d5c2-1be1-46d2-a8c4-b61269e9d465
---
# `_ungetc_nolock`, `_ungetwc_nolock`
-Pushes a character back onto the stream.
+Pushes a character back onto the stream without locking.
## Syntax
diff --git a/docs/c-runtime-library/reference/ungetc-ungetwc.md b/docs/c-runtime-library/reference/ungetc-ungetwc.md
index c0ccaa5cc3..fe97a8b26f 100644
--- a/docs/c-runtime-library/reference/ungetc-ungetwc.md
+++ b/docs/c-runtime-library/reference/ungetc-ungetwc.md
@@ -6,7 +6,7 @@ api_name: ["ungetwc", "ungetc", "_o_ungetc", "_o_ungetwc"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-stdio-l1-1-0.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["_ungettc", "ungetwc", "ungetc"]
+f1_keywords: ["STDIO/ungetc", "CORECRT_WSTDIO/ungetwc", "TCHAR/_ungettc", "ungetc", "ungetwc", "_ungettc"]
helpviewer_keywords: ["ungetwc function", "ungettc function", "characters, pushing back onto stream", "_ungettc function", "ungetc function"]
ms.assetid: e0754f3a-b4c6-408f-90c7-e6387b830d84
---
diff --git a/docs/c-runtime-library/reference/ungetch-ungetwch-ungetch-nolock-ungetwch-nolock.md b/docs/c-runtime-library/reference/ungetch-ungetwch-ungetch-nolock-ungetwch-nolock.md
index 8daa37df83..5c15bfbf42 100644
--- a/docs/c-runtime-library/reference/ungetch-ungetwch-ungetch-nolock-ungetwch-nolock.md
+++ b/docs/c-runtime-library/reference/ungetch-ungetwch-ungetch-nolock-ungetwch-nolock.md
@@ -1,14 +1,13 @@
---
-description: "Learn more about: _ungetch, _ungetwch, _ungetch_nolock, _ungetwch_nolock"
title: "_ungetch, _ungetwch, _ungetch_nolock, _ungetwch_nolock"
+description: "Learn more about: _ungetch, _ungetwch, _ungetch_nolock, _ungetwch_nolock"
ms.date: "4/2/2020"
api_name: ["_ungetch_nolock", "_ungetwch_nolock", "_ungetwch", "_ungetch", "_o__ungetch", "_o__ungetch_nolock", "_o__ungetwch", "_o__ungetwch_nolock"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-conio-l1-1-0.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["_ungetch_nolock", "ungetwch", "ungetch_nolock", "_ungetwch", "ungetwch_nolock", "_ungetch", "_ungettch_nolock", "_ungettch", "_ungetwch_nolock"]
+f1_keywords: ["CONIO/_ungetch", "CONIO/_ungetch_nolock", "CORECRT_WCONIO/_ungetwch", "CORECRT_WCONIO/_ungetwch_nolock", "TCHAR/_ungettch", "TCHAR/_ungettch_nolock", "_ungetch", "_ungetch_nolock", "_ungetwch", "_ungetwch_nolock", "_ungettch", "_ungettch_nolock"]
helpviewer_keywords: ["_ungetch function", "ungetwch function", "characters, pushing back to console", "_ungettch_nolock function", "ungettch function", "_ungettch function", "ungetch_nolock function", "ungettch_nolock function", "_ungetwch_nolock function", "_ungetch_nolock function", "ungetwch_nolock function", "_ungetwch function"]
-ms.assetid: 70ae71c6-228c-4883-a57d-de6d5f873825
---
# `_ungetch`, `_ungetwch`, `_ungetch_nolock`, `_ungetwch_nolock`
diff --git a/docs/c-runtime-library/reference/ungetch.md b/docs/c-runtime-library/reference/ungetch.md
index eff10668ec..668a233b35 100644
--- a/docs/c-runtime-library/reference/ungetch.md
+++ b/docs/c-runtime-library/reference/ungetch.md
@@ -6,7 +6,7 @@ api_name: ["ungetch"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["ungetch"]
+f1_keywords: ["CONIO/ungetch", "ungetch"]
helpviewer_keywords: ["ungetch function"]
ms.assetid: 6921232f-6317-41cd-948b-91d56a11bc0e
---
diff --git a/docs/c-runtime-library/reference/unlink-wunlink.md b/docs/c-runtime-library/reference/unlink-wunlink.md
index 93226faab7..2a0dba15a7 100644
--- a/docs/c-runtime-library/reference/unlink-wunlink.md
+++ b/docs/c-runtime-library/reference/unlink-wunlink.md
@@ -6,7 +6,7 @@ api_name: ["_unlink", "_wunlink", "_o__unlink", "_o__wunlink"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-filesystem-l1-1-0.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["_tunlink", "_unlink", "wunlink", "_wunlink"]
+f1_keywords: ["CORECRT_IO/_unlink", "CORECRT_WIO/_wunlink", "TCHAR/_tunlink", "_unlink", "_wunlink", "_tunlink"]
helpviewer_keywords: ["files [C++], deleting", "_wunlink function", "wunlink function", "unlink function", "_unlink function", "tunlink function", "files [C++], removing", "_tunlink function"]
ms.assetid: 5e4f5f1b-1e99-4391-9b18-9ac63c32fae8
---
diff --git a/docs/c-runtime-library/reference/unlink.md b/docs/c-runtime-library/reference/unlink.md
index 94c5dbba50..58c351ba3a 100644
--- a/docs/c-runtime-library/reference/unlink.md
+++ b/docs/c-runtime-library/reference/unlink.md
@@ -6,7 +6,7 @@ api_name: ["unlink"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["unlink"]
+f1_keywords: ["CORECRT_IO/unlink", "unlink"]
helpviewer_keywords: ["unlink function"]
ms.assetid: 2cd82055-5770-48be-88ee-4b2c70541c46
---
diff --git a/docs/c-runtime-library/reference/unlock-file.md b/docs/c-runtime-library/reference/unlock-file.md
index de108f995f..af13c9ba9f 100644
--- a/docs/c-runtime-library/reference/unlock-file.md
+++ b/docs/c-runtime-library/reference/unlock-file.md
@@ -6,7 +6,7 @@ api_name: ["_unlock_file", "_o__unlock_file"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-filesystem-l1-1-0.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["_unlock_file", "unlock_file"]
+f1_keywords: ["STDIO/_unlock_file", "_unlock_file"]
helpviewer_keywords: ["files [C++], unlocking", "unlock_file function", "_unlock_file function", "unlocking files"]
ms.assetid: cf380a51-6d3a-4f38-bd64-2d4fb57b4369
---
diff --git a/docs/c-runtime-library/reference/utime-utime32-utime64-wutime-wutime32-wutime64.md b/docs/c-runtime-library/reference/utime-utime32-utime64-wutime-wutime32-wutime64.md
index 422b257bc2..d5a82ee0b6 100644
--- a/docs/c-runtime-library/reference/utime-utime32-utime64-wutime-wutime32-wutime64.md
+++ b/docs/c-runtime-library/reference/utime-utime32-utime64-wutime-wutime32-wutime64.md
@@ -6,7 +6,7 @@ api_name: ["_utime64", "_utime", "_wutime", "_wutime64", "_wutime32", "_utime32"
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-time-l1-1-0.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["_tutime", "_utime64", "wutime", "utime32", "wutime64", "_utime", "wutime32", "_wutime", "utime", "utime64", "_wutime64", "_utime32", "_tutime64", "_wutime32"]
+f1_keywords: ["UTIME/_utime", "UTIME/_utime32", "UTIME/_utime64", "UTIME/_wutime", "UTIME/_wutime32", "UTIME/_wutime64", "TCHAR/_tutime", "TCHAR/_tutime32", "TCHAR/_tutime64", "_utime", "_utime32", "_utime64", "_wutime", "_wutime32", "_wutime64", "_tutime", "_tutime32", "_tutime64"]
helpviewer_keywords: ["tutime function", "utime32 function", "utime64 function", "_utime function", "_tutime32 function", "time [C++], file modification", "wutime function", "_wutime function", "_wutime32 function", "_tutime64 function", "_tutime function", "files [C++], modification time", "_wutime64 function", "_utime32 function", "utime function", "_utime64 function", "wutime64 function", "wutime32 function", "tutime64 function", "tutime32 function"]
ms.assetid: 8d482d40-19b9-4591-bfee-5d7f601d1a9e
---
@@ -77,7 +77,7 @@ The **`_utimbuf`** structure stores file access and modification times used by *
| **`actime`** | Time of file access |
| **`modtime`** | Time of file modification |
-Specific versions of the `_utimbuf` structure (`_utimebuf32` and `__utimbuf64`) are defined using the 32-bit and 64-bit versions of the time type. These structures are used in the 32-bit and 64-bit specific versions of this function. `_utimbuf` itself by default uses a 64-bit time type unless `_USE_32BIT_TIME_T` is defined.
+Specific versions of the `_utimbuf` structure (`__utimbuf32` and `__utimbuf64`) are defined using the 32-bit and 64-bit versions of the time type. These structures are used in the 32-bit and 64-bit specific versions of this function. `_utimbuf` itself by default uses a 64-bit time type unless `_USE_32BIT_TIME_T` is defined.
`_utime` is identical to `_futime` except that the *`filename`* argument of **`_utime`** is a filename or a path to a file, rather than a file descriptor of an open file.
diff --git a/docs/c-runtime-library/reference/va-arg-va-copy-va-end-va-start.md b/docs/c-runtime-library/reference/va-arg-va-copy-va-end-va-start.md
index 95bc6590d0..a8f051d5ae 100644
--- a/docs/c-runtime-library/reference/va-arg-va-copy-va-end-va-start.md
+++ b/docs/c-runtime-library/reference/va-arg-va-copy-va-end-va-start.md
@@ -6,7 +6,7 @@ api_name: ["va_arg", "va_end", "va_copy", "va_start"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["va_arg", "va_start", "va_list", "va_alist", "va_dcl", "va_copy", "va_end"]
+f1_keywords: ["STDARG/va_arg", "STDARG/va_copy", "STDARG/va_end", "VADEFS/va_list", "STDARG/va_start", "va_alist", "va_arg", "va_copy", "va_dcl", "va_end", "va_list", "va_start"]
helpviewer_keywords: ["variable argument lists, accessing", "va_start macro", "va_arg macro", "va_end macro", "arguments [C++], argument lists", "va_list macro", "va_dcl macro", "va_alist macro", "va_copy macro"]
ms.assetid: a700dbbd-bfe5-4077-87b6-3a07af74a907
---
diff --git a/docs/c-runtime-library/reference/vcprintf-p-vcprintf-p-l-vcwprintf-p-vcwprintf-p-l.md b/docs/c-runtime-library/reference/vcprintf-p-vcprintf-p-l-vcwprintf-p-vcwprintf-p-l.md
index 9820f20c84..5a40fed9d7 100644
--- a/docs/c-runtime-library/reference/vcprintf-p-vcprintf-p-l-vcwprintf-p-vcwprintf-p-l.md
+++ b/docs/c-runtime-library/reference/vcprintf-p-vcprintf-p-l-vcwprintf-p-vcwprintf-p-l.md
@@ -6,7 +6,7 @@ api_name: ["_vcprintf_p", "_vcwprintf_p_l", "_vcprintf_p_l", "_vcwprintf_p"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["vcwprintf_p", "vcprintf_p_l", "_vcprintf_p", "_vcprintf_p_l", "vcwprintf_p_l", "vcprintf_p", "_vcwprintf_p", "_vcwprintf_p_l"]
+f1_keywords: ["CONIO/_vcprintf_p", "CONIO/_vcprintf_p_l", "CORECRT_WCONIO/_vcwprintf_p", "CORECRT_WCONIO/_vcwprintf_p_l", "TCHAR/_vtcprintf_p", "TCHAR/_vtcprintf_p_l", "_vcprintf_p", "_vcprintf_p_l", "_vcwprintf_p", "_vcwprintf_p_l", "_vtcprintf_p", "_vtcprintf_p_l"]
helpviewer_keywords: ["_vtcprintf_p_l function", "vcprintf_p_l function", "_vcprintf_p_l function", "vtcprintf_p_l function", "vcprintf_p function", "_vcwprintf_p function", "_vcprintf_p function", "vcwprintf_p function", "vcwprintf_p_l function", "vtcprintf_p function", "_vcwprintf_p_l function", "_vtcprintf_p function"]
---
# `_vcprintf_p`, `_vcprintf_p_l`, `_vcwprintf_p`, `_vcwprintf_p_l`
diff --git a/docs/c-runtime-library/reference/vcprintf-s-vcprintf-s-l-vcwprintf-s-vcwprintf-s-l.md b/docs/c-runtime-library/reference/vcprintf-s-vcprintf-s-l-vcwprintf-s-vcwprintf-s-l.md
index 4cb308d94f..5c37e0a97a 100644
--- a/docs/c-runtime-library/reference/vcprintf-s-vcprintf-s-l-vcwprintf-s-vcwprintf-s-l.md
+++ b/docs/c-runtime-library/reference/vcprintf-s-vcprintf-s-l-vcwprintf-s-vcwprintf-s-l.md
@@ -6,7 +6,7 @@ api_name: ["_vcprintf_s", "_vcprintf_s_l", "_vcwprintf_s", "_vcwprintf_s_l"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["vcprintf_s", "vcwprintf_s_l", "_vcwprintf_s", "_vcwprintf_s_l", "_vcprintf_s_l", "_vtcprintf_s", "vcwprintf_s", "vcprintf_s_l", "_vcprintf_s"]
+f1_keywords: ["CONIO/_vcprintf_s", "CONIO/_vcprintf_s_l", "CORECRT_WCONIO/_vcwprintf_s", "CORECRT_WCONIO/_vcwprintf_s_l", "TCHAR/_vtcprintf_s", "TCHAR/_vtcprintf_s_l", "_vcprintf_s", "_vcprintf_s_l", "_vcwprintf_s", "_vcwprintf_s_l", "_vtcprintf_s", "_vtcprintf_s_l"]
helpviewer_keywords: ["_vtcprintf_s_l function", "_vcwprintf_s_l function", "_vtcprintf_s function", "vtcprintf_s_l function", "vcprintf_s_l function", "_vcprintf_s function", "_vcwprintf_s function", "vcwprintf_s_l function", "vcwprintf_s function", "vcprintf_s function", "_vcprintf_s_l function", "vtcprintf_s function", "formatted text [C++]"]
---
# `_vcprintf_s`, `_vcprintf_s_l`, `_vcwprintf_s`, `_vcwprintf_s_l`
@@ -19,21 +19,21 @@ Writes formatted output to the console by using a pointer to a list of arguments
## Syntax
```C
-int _vcprintf(
- const char* format,
+int _vcprintf_s(
+ char const* const format,
va_list argptr
);
-int _vcprintf(
- const char* format,
+int _vcprintf_s_l(
+ char const* const format,
_locale_t locale,
va_list argptr
);
int _vcwprintf_s(
- const wchar_t* format,
+ wchar_t const* const format,
va_list argptr
);
int _vcwprintf_s_l(
- const wchar_t* format,
+ wchar_t const* const format,
_locale_t locale,
va_list argptr
);
diff --git a/docs/c-runtime-library/reference/vcprintf-vcprintf-l-vcwprintf-vcwprintf-l.md b/docs/c-runtime-library/reference/vcprintf-vcprintf-l-vcwprintf-vcwprintf-l.md
index 7d9c4d1807..48dc1f6a5f 100644
--- a/docs/c-runtime-library/reference/vcprintf-vcprintf-l-vcwprintf-vcwprintf-l.md
+++ b/docs/c-runtime-library/reference/vcprintf-vcprintf-l-vcwprintf-vcwprintf-l.md
@@ -6,7 +6,7 @@ api_name: ["_vcwprintf", "_vcprintf_l", "_vcwprintf_l", "_vcprintf"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["_vcwprintf_l", "_vtcprintf", "vcwprintf", "_vcwprintf", "vcprintf_l", "_vcprintf_l", "_vcprintf", "vcprintf", "vcwprintf_l"]
+f1_keywords: ["CONIO/_vcprintf", "CONIO/_vcprintf_l", "CORECRT_WCONIO/_vcwprintf", "CORECRT_WCONIO/_vcwprintf_l", "TCHAR/_vtcprintf", "TCHAR/_vtcprintf_l", "_vcprintf", "_vcprintf_l", "_vcwprintf", "_vcwprintf_l", "_vtcprintf", "_vtcprintf_l"]
helpviewer_keywords: ["vcwprintf function", "_vcwprintf_l function", "_vcprintf function", "_vcprintf_l function", "vtcprintf_l function", "vcprintf function", "vcprintf_l function", "_vtcprintf function", "_vcwprintf function", "_vtcprintf_l function", "vcwprintf_l function", "vtcprintf function", "formatted text [C++]"]
---
# `_vcprintf`, `_vcprintf_l`, `_vcwprintf`, `_vcwprintf_l`
diff --git a/docs/c-runtime-library/reference/vfprintf-p-vfprintf-p-l-vfwprintf-p-vfwprintf-p-l.md b/docs/c-runtime-library/reference/vfprintf-p-vfprintf-p-l-vfwprintf-p-vfwprintf-p-l.md
index c7236e7ba8..0d8c50f0a3 100644
--- a/docs/c-runtime-library/reference/vfprintf-p-vfprintf-p-l-vfwprintf-p-vfwprintf-p-l.md
+++ b/docs/c-runtime-library/reference/vfprintf-p-vfprintf-p-l-vfwprintf-p-vfwprintf-p-l.md
@@ -6,7 +6,7 @@ api_name: ["_vfprintf_p", "_vfwprintf_p", "_vfprintf_p_l", "_vfwprintf_p_l"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["_vfwprintf_p_l", "_vfprintf_p", "vfwprintf_p_l", "vfwprintf_p", "vfprintf_p_l", "_vfwprintf_p", "_vftprintf_p", "_vfprintf_p_l", "vfprintf_p"]
+f1_keywords: ["STDIO/_vfprintf_p", "STDIO/_vfprintf_p_l", "CORECRT_WSTDIO/_vfwprintf_p", "CORECRT_WSTDIO/_vfwprintf_p_l", "TCHAR/_vftprintf_p", "TCHAR/_vftprintf_p_l", "_vfprintf_p", "_vfprintf_p_l", "_vfwprintf_p", "_vfwprintf_p_l", "_vftprintf_p", "_vftprintf_p_l"]
helpviewer_keywords: ["vfprintf_p_l function", "_vftprintf_p_l function", "_vfprintf_p function", "vfprintf_p function", "vftprintf_p_l function", "_vfprintf_p_l function", "_vftprintf_p function", "_vfwprintf_p_l function", "vfwprintf_p_l function", "_vfwprintf_p function", "vftprintf_p function", "formatted text [C++]", "vfwprintf_p function"]
---
# `_vfprintf_p`, `_vfprintf_p_l`, `_vfwprintf_p`, `_vfwprintf_p_l`
diff --git a/docs/c-runtime-library/reference/vfprintf-s-vfprintf-s-l-vfwprintf-s-vfwprintf-s-l.md b/docs/c-runtime-library/reference/vfprintf-s-vfprintf-s-l-vfwprintf-s-vfwprintf-s-l.md
index 02016e4921..ffb2bfde12 100644
--- a/docs/c-runtime-library/reference/vfprintf-s-vfprintf-s-l-vfwprintf-s-vfwprintf-s-l.md
+++ b/docs/c-runtime-library/reference/vfprintf-s-vfprintf-s-l-vfwprintf-s-vfwprintf-s-l.md
@@ -6,7 +6,7 @@ api_name: ["vfwprintf_s", "_vfprintf_s_l", "vfprintf_s", "_vfwprintf_s_l"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["_vftprintf_s", "vfwprintf_s", "vfprintf_s"]
+f1_keywords: ["STDIO/vfprintf_s", "STDIO/_vfprintf_s_l", "CORECRT_WSTDIO/vfwprintf_s", "CORECRT_WSTDIO/_vfwprintf_s_l", "TCHAR/_vftprintf_s", "TCHAR/_vftprintf_s_l", "vfprintf_s", "_vfprintf_s_l", "vfwprintf_s", "_vfwprintf_s_l", "_vftprintf_s", "_vftprintf_s_l"]
helpviewer_keywords: ["vfprintf_s_l function", "vfwprintf_s_l function", "vfwprintf_s function", "_vfprintf_s_l function", "_vfwprintf_s_l function", "vftprintf_s_l function", "vfprintf_s function", "_vftprintf_s_l function", "formatted text [C++]", "_vftprintf_s function"]
---
# `vfprintf_s`, `_vfprintf_s_l`, `vfwprintf_s`, `_vfwprintf_s_l`
diff --git a/docs/c-runtime-library/reference/vfprintf-vfprintf-l-vfwprintf-vfwprintf-l.md b/docs/c-runtime-library/reference/vfprintf-vfprintf-l-vfwprintf-vfwprintf-l.md
index 74b46fb124..f4860772c9 100644
--- a/docs/c-runtime-library/reference/vfprintf-vfprintf-l-vfwprintf-vfwprintf-l.md
+++ b/docs/c-runtime-library/reference/vfprintf-vfprintf-l-vfwprintf-vfwprintf-l.md
@@ -6,7 +6,7 @@ api_name: ["_vfprintf_l", "vfprintf", "vfwprintf", "_vfwprintf_l"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["vfwprintf", "_vftprintf", "vfprintf"]
+f1_keywords: ["STDIO/vfprintf", "STDIO/_vfprintf_l", "CORECRT_WSTDIO/vfwprintf", "CORECRT_WSTDIO/_vfwprintf_l", "TCHAR/_vftprintf", "TCHAR/_vftprintf_l", "vfprintf", "_vfprintf_l", "vfwprintf", "_vfwprintf_l", "_vftprintf", "_vftprintf_l"]
helpviewer_keywords: ["_vfwprintf_l function", "_vftprintf function", "vfprintf function", "_vftprintf_l function", "vfprintf_l function", "vftprintf_l function", "vfwprintf_l function", "vftprintf function", "vfwprintf function", "_vfprintf_l function", "formatted text [C++]"]
---
# `vfprintf`, `_vfprintf_l`, `vfwprintf`, `_vfwprintf_l`
diff --git a/docs/c-runtime-library/reference/vfscanf-s-vfwscanf-s.md b/docs/c-runtime-library/reference/vfscanf-s-vfwscanf-s.md
index 86e6bca7b3..4f1a7f8930 100644
--- a/docs/c-runtime-library/reference/vfscanf-s-vfwscanf-s.md
+++ b/docs/c-runtime-library/reference/vfscanf-s-vfwscanf-s.md
@@ -6,7 +6,7 @@ api_name: ["vfscanf_s", "vfwscanf_s"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["vfscanf_s", "vfwscanf_s", "_vftscanf_s"]
+f1_keywords: ["STDIO/vfscanf_s", "CORECRT_WSTDIO/vfwscanf_s", "TCHAR/_vftscanf_s", "vfscanf_s", "vfwscanf_s", "_vftscanf_s"]
ms.assetid: 9b0133f0-9a18-4581-b24b-3b72683ad432
---
# `vfscanf_s`, `vfwscanf_s`
diff --git a/docs/c-runtime-library/reference/vfscanf-vfwscanf.md b/docs/c-runtime-library/reference/vfscanf-vfwscanf.md
index 00213ccfee..152140dd56 100644
--- a/docs/c-runtime-library/reference/vfscanf-vfwscanf.md
+++ b/docs/c-runtime-library/reference/vfscanf-vfwscanf.md
@@ -6,7 +6,7 @@ api_name: ["vfwscanf", "vfscanf"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["vfwscanf", "_vftscanf", "vfscanf"]
+f1_keywords: ["STDIO/vfscanf", "CORECRT_WSTDIO/vfwscanf", "TCHAR/_vftscanf", "vfscanf", "vfwscanf", "_vftscanf"]
ms.assetid: c06450ef-03f1-4d24-a8ac-d2dd98847918
---
# `vfscanf`, `vfwscanf`
diff --git a/docs/c-runtime-library/reference/vprintf-p-vprintf-p-l-vwprintf-p-vwprintf-p-l.md b/docs/c-runtime-library/reference/vprintf-p-vprintf-p-l-vwprintf-p-vwprintf-p-l.md
index 10c9938909..e3ea98113a 100644
--- a/docs/c-runtime-library/reference/vprintf-p-vprintf-p-l-vwprintf-p-vwprintf-p-l.md
+++ b/docs/c-runtime-library/reference/vprintf-p-vprintf-p-l-vwprintf-p-vwprintf-p-l.md
@@ -6,7 +6,7 @@ api_name: ["_vwprintf_p", "_vprintf_p", "_vprintf_p_l", "_vwprintf_p_l"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["_vwprintf_p_l", "vprintf_p", "_vprintf_p_l", "_vwprintf_p", "vprintf_p_l", "vwprintf_p_l", "vwprintf_p", "vtprintf_p", "_vtprintf_p", "_vprintf_p"]
+f1_keywords: ["STDIO/_vprintf_p", "STDIO/_vprintf_p_l", "CORECRT_WSTDIO/_vwprintf_p","CORECRT_WSTDIO/_vwprintf_p_l", "TCHAR/_vtprintf_p", "TCHAR/_vtprintf_p_l", "_vprintf_p", "_vprintf_p_l", "_vwprintf_p", "_vwprintf_p_l", "_vtprintf_p", "_vtprintf_p_l"]
helpviewer_keywords: ["_vtprintf_p_l function", "_vtprintf_p function", "vtprintf_p function", "_vwprintf_p function", "_vwprintf_p_l function", "_vprintf_p function", "_vprintf_p_l function", "vprintf_p_l function", "vwprintf_p function", "vprintf_p function", "vtprintf_p_l function", "vwprintf_p_l function", "formatted text [C++]"]
---
# `_vprintf_p`, `_vprintf_p_l`, `_vwprintf_p`, `_vwprintf_p_l`
diff --git a/docs/c-runtime-library/reference/vprintf-s-vprintf-s-l-vwprintf-s-vwprintf-s-l.md b/docs/c-runtime-library/reference/vprintf-s-vprintf-s-l-vwprintf-s-vwprintf-s-l.md
index 8d0723df48..9b7f90e5ef 100644
--- a/docs/c-runtime-library/reference/vprintf-s-vprintf-s-l-vwprintf-s-vwprintf-s-l.md
+++ b/docs/c-runtime-library/reference/vprintf-s-vprintf-s-l-vwprintf-s-vwprintf-s-l.md
@@ -6,7 +6,7 @@ api_name: ["_vwprintf_s_l", "vwprintf_s", "_vprintf_s_l", "vprintf_s"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["vprintf_s", "vwprintf_s", "_vtprintf_s"]
+f1_keywords: ["STDIO/vprintf_s", "STDIO/_vprintf_s_l", "CORECRT_WSTDIO/vwprintf_s", "CORECRT_WSTDIO/_vwprintf_s_l", "TCHAR/_vtprintf_s", "TCHAR/_vtprintf_s_l", "vprintf_s", "_vprintf_s_l", "vwprintf_s", "_vwprintf_s_l", "_vtprintf_s", "_vtprintf_s_l"]
helpviewer_keywords: ["vwprintf_s_l function", "_vwprintf_s_l function", "vwprintf_s function", "_vtprintf_s_l function", "vprintf_s_l function", "vtprintf_s_l function", "_vtprintf_s function", "vtprintf_s function", "_vprintf_s_l function", "formatted text [C++]", "vprintf_s function"]
---
# `vprintf_s`, `_vprintf_s_l`, `vwprintf_s`, `_vwprintf_s_l`
diff --git a/docs/c-runtime-library/reference/vprintf-vprintf-l-vwprintf-vwprintf-l.md b/docs/c-runtime-library/reference/vprintf-vprintf-l-vwprintf-vwprintf-l.md
index 06c7ce852b..4575ef26d7 100644
--- a/docs/c-runtime-library/reference/vprintf-vprintf-l-vwprintf-vwprintf-l.md
+++ b/docs/c-runtime-library/reference/vprintf-vprintf-l-vwprintf-vwprintf-l.md
@@ -6,7 +6,7 @@ api_name: ["vprintf", "_vwprintf_l", "_vprintf_l", "vwprintf"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["vwprintf", "_vtprintf"]
+f1_keywords: ["STDIO/vprintf", "STDIO/_vprintf_l", "CORECRT_WSTDIO/vwprintf", "CORECRT_WSTDIO/_vwprintf_l", "TCHAR/_vtprintf", "TCHAR/_vtprintf_l", "vprintf", "_vprintf_l", "vwprintf", "_vwprintf_l", "_vtprintf", "_vtprintf_l"]
helpviewer_keywords: ["vwprintf function", "_vwprintf_l function", "vwprintf_l function", "_vtprintf function", "vtprintf_l function", "vprintf function", "_vprintf_l function", "vprintf_l function", "vtprintf function", "_vtprintf_l function", "formatted text [C++]"]
---
# `vprintf`, `_vprintf_l`, `vwprintf`, `_vwprintf_l`
diff --git a/docs/c-runtime-library/reference/vscanf-s-vwscanf-s.md b/docs/c-runtime-library/reference/vscanf-s-vwscanf-s.md
index ab7868f6b8..4494f96ba1 100644
--- a/docs/c-runtime-library/reference/vscanf-s-vwscanf-s.md
+++ b/docs/c-runtime-library/reference/vscanf-s-vwscanf-s.md
@@ -6,7 +6,7 @@ api_name: ["vscanf_s", "vwscanf_s"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["_vtscanf_s", "vscanf_s", "vwscanf_s"]
+f1_keywords: ["STDIO/vscanf_s", "CORECRT_WSTDIO/vwscanf_s", "TCHAR/_vtscanf_s", "vscanf_s", "vwscanf_s", "_vtscanf_s"]
ms.assetid: 23a1c383-5b01-4887-93ce-534a1e38ed93
---
# `vscanf_s`, `vwscanf_s`
diff --git a/docs/c-runtime-library/reference/vscanf-vwscanf.md b/docs/c-runtime-library/reference/vscanf-vwscanf.md
index 08abfd22f6..043913e4b2 100644
--- a/docs/c-runtime-library/reference/vscanf-vwscanf.md
+++ b/docs/c-runtime-library/reference/vscanf-vwscanf.md
@@ -6,7 +6,7 @@ api_name: ["vscanf", "vwscanf"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["vscanf", "vwscanf", "_vtscanf"]
+f1_keywords: ["STDIO/vscanf", "CORECRT_WSTDIO/vwscanf", "TCHAR/_vtscanf", "vscanf", "vwscanf", "_vtscanf"]
ms.assetid: d1df595b-11bc-4682-9441-a92616301e3b
---
# `vscanf`, `vwscanf`
diff --git a/docs/c-runtime-library/reference/vscprintf-p-vscprintf-p-l-vscwprintf-p-vscwprintf-p-l.md b/docs/c-runtime-library/reference/vscprintf-p-vscprintf-p-l-vscwprintf-p-vscwprintf-p-l.md
index ea69b12acc..6f6910fcf6 100644
--- a/docs/c-runtime-library/reference/vscprintf-p-vscprintf-p-l-vscwprintf-p-vscwprintf-p-l.md
+++ b/docs/c-runtime-library/reference/vscprintf-p-vscprintf-p-l-vscwprintf-p-vscwprintf-p-l.md
@@ -1,12 +1,12 @@
---
-description: "Learn more about: _vscprintf_p, _vscprintf_p_l, _vscwprintf_p, _vscwprintf_p_l"
title: "_vscprintf_p, _vscprintf_p_l, _vscwprintf_p, _vscwprintf_p_l"
+description: "Learn more about: _vscprintf_p, _vscprintf_p_l, _vscwprintf_p, _vscwprintf_p_l"
ms.date: "10/21/2021"
api_name: ["_vscprintf_p_l", "_vscprintf_p", "_vscwprintf_p_l", "_vscwprintf_p"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["_vscprintf_p", "_vscprintf_p_l", "vscwprintf_p", "vscprintf_p", "vscwprintf_p_l", "_vscwprintf_p_l", "vscprintf_p_l", "_vscwprintf_p"]
+f1_keywords: ["STDIO/_vscprintf_p", "STDIO/_vscprintf_p_l", "CORECRT_WSTDIO/_vscwprintf_p", "CORECRT_WSTDIO/_vscwprintf_p_l", "TCHAR/_vsctprintf_p", "TCHAR/_vsctprintf_p_l", "_vscprintf_p", "_vscprintf_p_l", "_vscwprintf_p", "_vscwprintf_p_l", "_vsctprintf_p", "_vsctprintf_p_l"]
helpviewer_keywords: ["vscprintf_p function", "_vsctprintf_p_l function", "vscwprintf_p_l function", "_vscwprintf_p_l function", "_vscprintf_p function", "vsctprintf_p function", "_vscprintf_p_l function", "_vscwprintf_p function", "vscwprintf_p function", "vsctprintf_p_l function", "_vsctprintf_p function", "vscprintf_p_l function"]
---
# `_vscprintf_p`, `_vscprintf_p_l`, `_vscwprintf_p`, `_vscwprintf_p_l`
@@ -59,6 +59,9 @@ These functions differ from **`_vscprintf`** and **`_vscwprintf`** only in that
The versions of these functions with the **`_l`** suffix are identical except that they use the locale parameter passed in instead of the current thread locale.
+Return Value is the size of the formatted data. If the function takes a `char` buffer, the size is in bytes. If the function takes a `wchar_t` buffer, the size specifies the number of 16-bit words.
+Characters refer to `char` characters for functions that take a `char` buffer, and to `wchar_t` characters for functions that take a `wchar_t` buffer.
+
If *`format`* is a null pointer, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, the functions return -1 and set `errno` to `EINVAL`.
> [!IMPORTANT]
@@ -89,4 +92,4 @@ See the example for [`vsprintf`](vsprintf-vsprintf-l-vswprintf-vswprintf-l-vswpr
[`vprintf` functions](../vprintf-functions.md)\
[`_scprintf_p`, `_scprintf_p_l`, `_scwprintf_p`, `_scwprintf_p_l`](scprintf-p-scprintf-p-l-scwprintf-p-scwprintf-p-l.md)\
-[`_vscprintf`, `_vscprintf_l`, `_vscwprintf`, `_vscwprintf_l`](vscprintf-vscprintf-l-vscwprintf-vscwprintf-l.md)\
+[`_vscprintf`, `_vscprintf_l`, `_vscwprintf`, `_vscwprintf_l`](vscprintf-vscprintf-l-vscwprintf-vscwprintf-l.md)
diff --git a/docs/c-runtime-library/reference/vscprintf-vscprintf-l-vscwprintf-vscwprintf-l.md b/docs/c-runtime-library/reference/vscprintf-vscprintf-l-vscwprintf-vscwprintf-l.md
index e02f6cdb18..ac02613e06 100644
--- a/docs/c-runtime-library/reference/vscprintf-vscprintf-l-vscwprintf-vscwprintf-l.md
+++ b/docs/c-runtime-library/reference/vscprintf-vscprintf-l-vscwprintf-vscwprintf-l.md
@@ -6,7 +6,7 @@ api_name: ["_vscprintf", "_vscprintf_l", "_vscwprintf_l", "_vscwprintf"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["vscprintf_l", "vscwpeintf", "_vscwprintf", "_vsctprintf", "_vscprintf", "vscwprintf_l", "vscprintf", "_vscwprintf_l"]
+f1_keywords: ["STDIO/_vscprintf", "STDIO/_vscprintf_l", "CORECRT_WSTDIO/_vscwprintf", "CORECRT_WSTDIO/_vscwprintf_l", "TCHAR/_vsctprintf", "TCHAR/_vsctprintf_l", "_vscprintf", "_vscprintf_l", "_vscwprintf", "_vscwprintf_l", "_vsctprintf", "_vsctprintf_l"]
helpviewer_keywords: ["vsctprintf function", "_vscprintf_l function", "_vsctprintf_l function", "_vsctprintf function", "_vscwprintf_l function", "vscwprintf_l function", "_vscprintf function", "_vscwprintf function", "vscwprintf function", "vsctprintf_l function", "formatted text [C++]", "vscprintf function", "vscprintf_l function"]
---
# `_vscprintf`, `_vscprintf_l`, `_vscwprintf`, `_vscwprintf_l`
@@ -59,6 +59,9 @@ If *`format`* is a null pointer, the invalid parameter handler is invoked, as de
## Remarks
+Return Value is the size of the formatted data. If the function takes a `char` buffer, the size is in bytes. If the function takes a `wchar_t` buffer, the size specifies the number of 16-bit words.
+Characters refer to `char` characters for functions that take a `char` buffer, and to `wchar_t` characters for functions that take a `wchar_t` buffer.
+
Each *`argument`* (if any) is converted according to the corresponding format specification in *`format`*. The format consists of ordinary characters and has the same form and function as the *`format`* argument for [`printf`](printf-printf-l-wprintf-wprintf-l.md).
> [!IMPORTANT]
diff --git a/docs/c-runtime-library/reference/vsnprintf-s-vsnprintf-s-vsnprintf-s-l-vsnwprintf-s-vsnwprintf-s-l.md b/docs/c-runtime-library/reference/vsnprintf-s-vsnprintf-s-vsnprintf-s-l-vsnwprintf-s-vsnwprintf-s-l.md
index 653f4225c7..096bc62882 100644
--- a/docs/c-runtime-library/reference/vsnprintf-s-vsnprintf-s-vsnprintf-s-l-vsnwprintf-s-vsnwprintf-s-l.md
+++ b/docs/c-runtime-library/reference/vsnprintf-s-vsnprintf-s-vsnprintf-s-l-vsnwprintf-s-vsnwprintf-s-l.md
@@ -1,12 +1,12 @@
---
description: "Learn more about: vsnprintf_s, _vsnprintf_s, _vsnprintf_s_l, _vsnwprintf_s, _vsnwprintf_s_l"
title: "vsnprintf_s, _vsnprintf_s, _vsnprintf_s_l, _vsnwprintf_s, _vsnwprintf_s_l"
-ms.date: 09/29/2022
+ms.date: 06/27/2023
api_name: ["_vsnwprintf_s", "_vsnwprintf_s_l", "_vsnprintf_s", "vsnprintf_s", "_vsnprintf_s_l"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ntdll.dll", "ucrtbase.dll", "ntoskrnl.exe"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["_vsnprintf_s", "_vsntprintf_s", "_vsnwprintf_s"]
+f1_keywords: ["STDIO/vsnprintf_s", "STDIO/_vsnprintf_s", "CORECRT_WSTDIO/_vsnwprintf_s", "TCHAR/_vsntprintf_s", "STDIO/_vsnprintf_s_l", "CORECRT_WSTDIO/_vsnwprintf_s_l", "TCHAR/_vsntprintf_s_l", "vsnprintf_s", "_vsnprintf_s", "_vsnwprintf_s", "_vsntprintf_s", "_vsnprintf_s_l", "_vsnwprintf_s_l", "_vsntprintf_s_l"]
helpviewer_keywords: ["vsnwprintf_s function", "_vsntprintf_s function", "_vsntprintf_s_l function", "vsntprintf_s function", "vsnwprintf_s_l function", "vsnprintf_s_l function", "vsntprintf_s_l function", "_vsnwprintf_s_l function", "_vsnprintf_s function", "vsnprintf_s function", "_vsnprintf_s_l function", "_vsnwprintf_s function", "formatted text [C++]"]
---
# `vsnprintf_s`, `_vsnprintf_s`, `_vsnprintf_s_l`, `_vsnwprintf_s`, `_vsnwprintf_s_l`
@@ -23,6 +23,7 @@ int vsnprintf_s(
const char *format,
va_list argptr
);
+
int _vsnprintf_s(
char *buffer,
size_t sizeOfBuffer,
@@ -30,6 +31,7 @@ int _vsnprintf_s(
const char *format,
va_list argptr
);
+
int _vsnprintf_s_l(
char *buffer,
size_t sizeOfBuffer,
@@ -38,6 +40,7 @@ int _vsnprintf_s_l(
_locale_t locale,
va_list argptr
);
+
int _vsnwprintf_s(
wchar_t *buffer,
size_t sizeOfBuffer,
@@ -45,6 +48,7 @@ int _vsnwprintf_s(
const wchar_t *format,
va_list argptr
);
+
int _vsnwprintf_s_l(
wchar_t *buffer,
size_t sizeOfBuffer,
@@ -53,6 +57,7 @@ int _vsnwprintf_s_l(
_locale_t locale,
va_list argptr
);
+
template
int _vsnprintf_s(
char (&buffer)[size],
@@ -60,6 +65,7 @@ int _vsnprintf_s(
const char *format,
va_list argptr
); // C++ only
+
template
int _vsnwprintf_s(
wchar_t (&buffer)[size],
@@ -75,10 +81,10 @@ int _vsnwprintf_s(
Storage location for output.
*`sizeOfBuffer`*\
-The size of the *`buffer`* for output, as the character count.
+The size of the *`buffer`* for output. Size in **bytes** for the functions that take `char`, and **words** for those that take `wchar_t`.
*`count`*\
-Maximum number of characters to write (not including the terminating null), or [`_TRUNCATE`](../truncate.md).
+Maximum number of characters to write not including the terminating `NULL`. For the functions that take `wchar_t`, it's the number of wide characters to write. Or [`_TRUNCATE`](../truncate.md).
*`format`*\
Format specification.
@@ -87,51 +93,61 @@ Format specification.
Pointer to list of arguments.
*`locale`*\
-The locale to use.
+The locale to use when formatting the output.
For more information, see [Format specifications](../format-specification-syntax-printf-and-wprintf-functions.md).
## Return value
-**`vsnprintf_s`**, **`_vsnprintf_s`** and **`_vsnwprintf_s`** return the number of characters written, not including the terminating null, or a negative value if either truncation of the data or an output error occurs.
-
-* If *`count`* is less than *`sizeOfBuffer`* and the number of characters of data is less than or equal to *`count`*, or *`count`* is [`_TRUNCATE`](../truncate.md) and the number of characters of data is less than *`sizeOfBuffer`*, then all of the data is written and the number of characters is returned.
-
-* If *`count`* is less than *`sizeOfBuffer`* but the data exceeds *`count`* characters, then the first *`count`* characters are written. Truncation of the remaining data occurs and -1 is returned without invoking the invalid parameter handler.
+The number of characters written, not including the terminating `NULL`, or a negative value if an output error occurs.
-* If *`count`* is [`_TRUNCATE`](../truncate.md) and the number of characters of data equals or exceeds *`sizeOfBuffer`*, then as much of the string as will fit in *`buffer`* (with terminating null) is written. Truncation of the remaining data occurs and -1 is returned without invoking the invalid parameter handler.
-
-* If *`count`* is equal to or exceeds *`sizeOfBuffer`* but the number of characters of data is less than *`sizeOfBuffer`*, then all of the data is written (with terminating null) and the number of characters is returned.
-
-* If *`count`* and the number of characters of data both equal or exceed *`sizeOfBuffer`*, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution continues after the invalid parameter handler, these functions set *`buffer`* to an empty string, set `errno` to `ERANGE`, and return -1.
-
-* If *`buffer`* or *`format`* is a `NULL` pointer, or if *`count`* is less than or equal to zero, the invalid parameter handler is invoked. If execution is allowed to continue, these functions set `errno` to `EINVAL` and return -1.
-
-### Error conditions
-
-| Condition | Return value | `errno` |
-|---|---|---|
-| *`buffer`* is `NULL` | -1 | `EINVAL` |
-| *`format`* is `NULL` | -1 | `EINVAL` |
-| *`count`* <= 0 | -1 | `EINVAL` |
-| *`sizeOfBuffer`* too small (and *`count`* != `_TRUNCATE`) | -1 (and *`buffer`* set to an empty string) | `ERANGE` |
+See [Behavior summary](#behavior-summary) for details.
## Remarks
-**`vsnprintf_s`** is identical to **`_vsnprintf_s`**. **`vsnprintf_s`** is included for conformance to the ANSI standard. **`_vnsprintf`** is retained for backward compatibility.
+Each of these functions takes a pointer to an argument list, then formats and writes up to *`count`* characters of the given data to the memory pointed to by *`buffer`* and appends a terminating `NULL`.
-Each of these functions takes a pointer to an argument list, then formats and writes up to *`count`* characters of the given data to the memory pointed to by *`buffer`* and appends a terminating null.
-
-If *`count`* is [`_TRUNCATE`](../truncate.md), then these functions write as much of the string as will fit in *`buffer`* while leaving room for a terminating null. If the entire string (with terminating null) fits in *`buffer`*, then these functions return the number of characters written (not including the terminating null); otherwise, these functions return -1 to indicate that truncation occurred.
+In debug builds, the remaining `sizeOfBuffer` bytes following the terminating `NULL` are filled with 'xFE' as described in [`_CrtSetDebugFillThreshold`](crtsetdebugfillthreshold.md).
The versions of these functions with the **`_l`** suffix are identical except that they use the locale parameter passed in instead of the current thread locale.
+**`vsnprintf_s`** is identical to **`_vsnprintf_s`** and is included for conformance to the ANSI standard. **`_vnsprintf`** is retained for backward compatibility.
+
+### Behavior summary
+
+For the following table:
+
+- Let `len` be the size of the formatted data. If the function takes a `char` buffer, the size is in bytes. If the function takes a `wchar_t` buffer, the size specifies the number of 16-bit words.
+- Characters refer to `char` characters for functions that take a `char` buffer, and to `wchar_t` characters for functions that take a `wchar_t` buffer.
+- For more information about the invalid parameter handler, see [Parameter Validation](../../c-runtime-library/parameter-validation.md).
+
+| Condition | Behavior | Return value | `errno` | Invokes invalid parameter handler|
+|--|--|--|--|--|
+| Success | Writes the characters into the buffer using the specified format string | The number of characters written | N/A | No |
+| Encoding error during formatting | If processing string specifier `s`, `S`, or `Z`, format specification processing stops. | -1 | `EILSEQ (42)` | No |
+| Encoding error during formatting | If processing character specifier `c` or `C`, the invalid character is skipped. The number of characters written isn't incremented for the skipped character, nor is any data written for it. Processing the format specification continues after skipping the specifier with the encoding error. | The number of characters written, not including the terminating `NULL`. | `EILSEQ (42)` | No |
+| `buffer == NULL` and `sizeOfBuffer == 0` and `count == 0` | No data is written. | 0 | N/A | No |
+| `buffer == NULL` and either `sizeOfBuffer != 0` or `count != 0` | If execution continues after invalid parameter handler executes, sets `errno` and returns a negative value.| -1 | `EINVAL` (22) | Yes |
+| `buffer != NULL` and `sizeOfBuffer == 0` | No data is written. If execution continues after invalid parameter handler executes, sets `errno` and returns a negative value. | -1 | `EINVAL` (22) | Yes |
+| `buffer != NULL` and `sizeOfBuffer != 0` and `count == 0` | The buffer is `NULL` terminated. | -1 | N/A | No |
+| `count == 0`| Doesn't write any data and returns the number of characters that would have been written, not including the terminating `NULL`. | The number of characters that would have been written not including the terminating `NULL`. | N/A | No |
+| `count < 0` | Unsafe: the value is treated as unsigned, likely creating a large value that results in overwriting the memory that follows the buffer. | The number of characters written, not including the terminating `NULL`. | N/A | No |
+| `count < sizeOfBuffer` and `len <= count` | All of the data is written and a terminating `NULL` is appended. | The number of characters written. | N/A | No |
+| `count < sizeOfBuffer` and `len > count` | The first *`count`* characters are written. | -1 | N/A | No |
+| `count >= sizeOfBuffer` and `len < sizeOfBuffer` | All of the data is written with a terminating `NULL`. | The number of characters written, not including the terminating `NULL`. | N/A | No |
+| `count >= sizeOfBuffer` and `len >= sizeOfBuffer` and `count != _TRUNCATE` | If execution continues after invalid parameter handler executes, sets `errno`, sets `buffer[0] == NULL`, and returns a negative value. | -1 | `ERANGE` (34) | Yes |
+| `count == _TRUNCATE` and `len >= sizeOfBuffer` | Writes as much of the string as fits in *`buffer`*, including the terminating `NULL`. | -1 | N/A | No |
+| `count == _TRUNCATE` and `len < sizeOfBuffer` | Writes the entire string into *`buffer`* with terminating `NULL`. | Number of characters written. | N/A | No |
+| `format == NULL` | No data is written. If execution continues after invalid parameter handler executes, sets `errno` and returns a negative value. | -1 | `EINVAL` (22) | Yes |
+
+For information about these and other error codes, see [`_doserrno`, `errno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md).
+
> [!IMPORTANT]
> Ensure that *`format`* is not a user-defined string. For more information, see [Avoiding buffer overruns](/windows/win32/SecBP/avoiding-buffer-overruns).
> Starting in Windows 10 version 2004 (build 19041), the `printf` family of functions prints exactly representable floating point numbers according to the IEEE 754 rules for rounding. In previous versions of Windows, exactly representable floating point numbers ending in '5' would always round up. IEEE 754 states that they must round to the closest even digit (also known as "Banker's Rounding"). For example, both `printf("%1.0f", 1.5)` and `printf("%1.0f", 2.5)` should round to 2. Previously, 1.5 would round to 2 and 2.5 would round to 3. This change only affects exactly representable numbers. For example, 2.35 (which, when represented in memory, is closer to 2.35000000000000008) continues to round up to 2.4. Rounding done by these functions now also respects the floating point rounding mode set by [`fesetround`](fegetround-fesetround2.md). Previously, rounding always chose `FE_TONEAREST` behavior. This change only affects programs built using Visual Studio 2019 version 16.2 and later. To use the legacy floating point rounding behavior, link with ['legacy_stdio_float_rounding.obj`](../link-options.md).
> [!NOTE]
-> To ensure that there is room for the terminating null, be sure that *`count`* is strictly less than the buffer length, or use `_TRUNCATE`.
+> To ensure that there is room for the terminating `NULL`, be sure that *`count`* is strictly less than the buffer length, or use `_TRUNCATE`.
In C++, using these functions is simplified by template overloads; the overloads can infer buffer length automatically (eliminating the need to specify a size argument) and they can automatically replace older, non-secure functions with their newer, secure counterparts. For more information, see [Secure template overloads](../secure-template-overloads.md).
@@ -196,4 +212,4 @@ nSize: -1, buff: Hi there!
[`fprintf`, `_fprintf_l`, `fwprintf`, `_fwprintf_l`](fprintf-fprintf-l-fwprintf-fwprintf-l.md)\
[`printf`, `_printf_l`, `wprintf`, `_wprintf_l`](printf-printf-l-wprintf-wprintf-l.md)\
[`sprintf`, `_sprintf_l`, `swprintf`, `_swprintf_l`, `__swprintf_l`](sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md)\
-[`va_arg`, `va_copy`, `va_end`, `va_start`](va-arg-va-copy-va-end-va-start.md)\
+[`va_arg`, `va_copy`, `va_end`, `va_start`](va-arg-va-copy-va-end-va-start.md)
diff --git a/docs/c-runtime-library/reference/vsnprintf-vsnprintf-vsnprintf-l-vsnwprintf-vsnwprintf-l.md b/docs/c-runtime-library/reference/vsnprintf-vsnprintf-vsnprintf-l-vsnwprintf-vsnwprintf-l.md
index b0fc829b06..1f94c8f59a 100644
--- a/docs/c-runtime-library/reference/vsnprintf-vsnprintf-vsnprintf-l-vsnwprintf-vsnwprintf-l.md
+++ b/docs/c-runtime-library/reference/vsnprintf-vsnprintf-vsnprintf-l-vsnwprintf-vsnwprintf-l.md
@@ -1,12 +1,12 @@
---
title: "vsnprintf, _vsnprintf, _vsnprintf_l, _vsnwprintf, _vsnwprintf_l"
description: "API reference for vsnprintf, _vsnprintf, _vsnprintf_l, _vsnwprintf, and _vsnwprintf_l; which write formatted output using a pointer to a list of arguments."
-ms.date: "3/9/2021"
+ms.date: 06/27/2023
api_name: ["_vsnprintf", "_vsnprintf_l", "_vsnwprintf", "_vsnwprintf_l", "_vsnprintf", "_vsnprintf;", "vsnprintf; _vsnprintf", "_vsnwprintf;", "_vsnprintf_l;", "_vsnwprintf_l;"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ntoskrnl.exe", "ucrtbase.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["_vsnprintf", "_vsnwprintf", "_vsntprintf", "vsnprintf", "stdio/vsnprintf", "stdio/_vsnprintf", "stdio/_vsnprintf_l", "stdio/_vsnwprintf", "stdio/_vsnwprintf_l", "_vsnprintf_l", "_vsnwprintf_l"]
+f1_keywords: ["STDIO/vsnprintf", "STDIO/_vsnprintf", "CORECRT_WSTDIO/_vsnwprintf", "TCHAR/_vsntprintf", "STDIO/_vsnprintf_l", "CORECRT_WSTDIO/_vsnwprintf_l", "TCHAR/_vsntprintf_l", "vsnprintf", "_vsnprintf", "_vsnwprintf", "_vsntprintf", "_vsnprintf_l", "_vsnwprintf_l", "_vsntprintf_l"]
helpviewer_keywords: ["vsntprintf function", "_vsnwprintf_l function", "vsnwprintf_l function", "vsntprintf_l function", "_vsntprintf function", "_vsnprintf_l function", "vsnprintf function", "_vsntprintf_l function", "vsnprintf_l function", "_vsnwprintf function", "_vsnprintf function", "formatted text [C++]", "vsnwprintf function"]
---
# `vsnprintf`, `_vsnprintf`, `_vsnprintf_l`, `_vsnwprintf`, `_vsnwprintf_l`
@@ -22,12 +22,14 @@ int vsnprintf(
const char *format,
va_list argptr
);
+
int _vsnprintf(
char *buffer,
size_t count,
const char *format,
va_list argptr
);
+
int _vsnprintf_l(
char *buffer,
size_t count,
@@ -35,12 +37,14 @@ int _vsnprintf_l(
_locale_t locale,
va_list argptr
);
+
int _vsnwprintf(
wchar_t *buffer,
size_t count,
const wchar_t *format,
va_list argptr
);
+
int _vsnwprintf_l(
wchar_t *buffer,
size_t count,
@@ -48,6 +52,7 @@ int _vsnwprintf_l(
_locale_t locale,
va_list argptr
);
+
template
int vsnprintf(
char (&buffer)[size],
@@ -55,6 +60,7 @@ int vsnprintf(
const char *format,
va_list argptr
); // C++ only
+
template
int _vsnprintf(
char (&buffer)[size],
@@ -62,6 +68,7 @@ int _vsnprintf(
const char *format,
va_list argptr
); // C++ only
+
template
int _vsnprintf_l(
char (&buffer)[size],
@@ -70,6 +77,7 @@ int _vsnprintf_l(
_locale_t locale,
va_list argptr
); // C++ only
+
template
int _vsnwprintf(
wchar_t (&buffer)[size],
@@ -77,6 +85,7 @@ int _vsnwprintf(
const wchar_t *format,
va_list argptr
); // C++ only
+
template
int _vsnwprintf_l(
wchar_t (&buffer)[size],
@@ -93,7 +102,7 @@ int _vsnwprintf_l(
Storage location for output.
*`count`*\
-Maximum number of characters to write.
+Maximum number of characters to write. For the functions that take `wchar_t`, it's the number of wide characters to write.
*`format`*\
Format specification.
@@ -108,19 +117,15 @@ For more information, see [Format specification syntax](../format-specification-
## Return value
-The **`vsnprintf`** function returns the number of characters that are written, not counting the terminating null character. If the buffer size specified by *`count`* isn't sufficiently large to contain the output specified by *`format`* and *`argptr`*, the return value of **`vsnprintf`** is the number of characters that would be written, not counting the null character, if *`count`* were sufficiently large. If the return value is greater than *`count`* - 1, the output has been truncated. A return value of -1 indicates that an encoding error has occurred.
-
-Both **`_vsnprintf`** and **`_vsnwprintf`** functions return the number of characters written if the number of characters to write is less than or equal to *`count`*. If the number of characters to write is greater than *`count`*, these functions return -1 indicating that output has been truncated.
-
-The value returned by all these functions doesn't include the terminating null, whether one is written or not.
+The number of characters written, not including the terminating `NULL`, or a negative value if an output error occurs.
-- If *`count`* is zero and *`buffer`* is `NULL`, the value returned is the number of characters the functions would write. The value doesn't take into account a terminating `NULL`. You can use this result to allocate sufficient buffer space for the string and a terminating null, and then call the function again to fill the buffer.
-- If *`count`* is zero but *`buffer`* isn't `NULL`, nothing is written and the function returns `-1`.
-- If *`format`* is `NULL`, or if *`buffer`* is `NULL` and *`count`* isn't equal to zero, these functions invoke the invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, these functions return -1 and set `errno` to `EINVAL`.
+See [Behavior summary](#behavior-summary) for details.
## Remarks
-Each of these functions takes a pointer to an argument list, then formats the data, and writes up to *`count`* characters to the memory pointed to by *`buffer`*. The **`vsnprintf`** function always writes a null terminator, even if it truncates the output. When you use **`_vsnprintf`** and **`_vsnwprintf`**, the buffer is null-terminated only if there's room at the end (that is, if the number of characters to write is less than *`count`*).
+Each of these functions takes a pointer to an argument list, then formats the data, and writes up to *`count`* characters to the memory pointed to by *`buffer`*. The **`vsnprintf`** function always writes a null terminator, even if it truncates the output. When you use **`_vsnprintf`** and **`_vsnwprintf`**, the buffer is null-terminated only if there's room at the end (that is, if the number of characters to write is less than *`count`*).
+
+Beginning with the UCRT in Visual Studio 2015 and Windows 10, **`vsnprintf`** is no longer identical to **`_vsnprintf`**. The **`vsnprintf`** function conforms to the C99 standard; **`_vsnprintf`** is kept for backward compatibility with older code. The difference is that if you run out of buffer, `vsnprintf` null-terminates the end of the buffer and returns the number of characters that would have been required, while `_vsnprintf` doesn't null-terminate the buffer and returns -1. Also, `_vsnprintf()` includes one more character in the output because it doesn't null-terminate the buffer.
> [!IMPORTANT]
> To prevent certain kinds of security risks, ensure that *`format`* isn't a user-defined string. For more information, see [Avoiding buffer overruns](/windows/win32/SecBP/avoiding-buffer-overruns).
@@ -129,14 +134,38 @@ Each of these functions takes a pointer to an argument list, then formats the da
> [!NOTE]
> To ensure that there's room for the terminating null when calling **`_vsnprintf`**, **`_vsnprintf_l`**, **`_vsnwprintf`** and **`_vsnwprintf_l`**, be sure that *`count`* is strictly less than the buffer length and initialize the buffer to null prior to calling the function.
>
-> Because **`vsnprintf`** always writes the terminating null, the *`count`* parameter may be equal to the size of the buffer.
-
-Beginning with the UCRT in Visual Studio 2015 and Windows 10, **`vsnprintf`** is no longer identical to **`_vsnprintf`**. The **`vsnprintf`** function conforms to the C99 standard; **`_vnsprintf`** is kept for backward compatibility with older Visual Studio code.
+> Because **`vsnprintf`** always writes a terminating null, the *`count`* parameter may be equal to the size of the buffer.
The versions of these functions with the **`_l`** suffix are identical except that they use the locale parameter passed in instead of the current thread locale.
In C++, these functions have template overloads that invoke the newer, secure counterparts of these functions. For more information, see [Secure template overloads](../secure-template-overloads.md).
+### Behavior summary
+
+For the following table:
+
+- Let `sizeOfBuffer` be the size of `buffer`. If the function takes a `char` buffer, the size is in bytes. If the function takes a `wchar_t` buffer, the size specifies the number of 16-bit words.
+- Let `len` be the size of the formatted data. If the function takes a `char` buffer, the size is in bytes. If the function takes a `wchar_t` buffer, the size specifies the number of 16-bit words.
+- Characters refer to `char` characters for functions that take a `char` buffer, and to `wchar_t` characters for functions that take a `wchar_t` buffer.
+- For more information about the invalid parameter handler, see [Parameter Validation](../../c-runtime-library/parameter-validation.md).
+
+| Condition | Behavior | Return value | `errno` | Invokes invalid parameter handler|
+|--|--|--|--|--|
+| Success | Writes the characters into the buffer using the specified format string. | The number of characters written, not counting the terminating null character. | N/A | No |
+| Encoding error during formatting | If processing string specifier `s`, `S`, or `Z`, format specification processing stops. | -1 | `EILSEQ` (42) | No |
+| Encoding error during formatting | If processing character specifier `c` or `C`, the invalid character is skipped. The number of characters written isn't incremented for the skipped character, nor is any data written for it. Processing the format specification continues after skipping the specifier with the encoding error. | The number of characters written, not including the terminating `NULL`. | `EILSEQ` (42) | No |
+| `buffer == NULL` and `count != 0` | If execution continues after invalid parameter handler executes, sets `errno` and returns a negative value.| -1 | `EINVAL` (22) | Yes |
+| `buffer == NULL` and `count == 0` | No data is written | The number of characters that would have been written, not including the terminating `NULL`. You can use this result to allocate sufficient buffer space for the string and a terminating `NULL`, and then call the function again to fill the buffer. | N/A | No |
+| `count == 0` | No data is written | -1 | `ERANGE` (34) | No |
+| `count < 0`| Unsafe: the value is treated as unsigned, likely creating a large value that results in overwriting the memory that follows the buffer. | The number of characters written. | N/A | No |
+| `count < sizeOfBuffer` and `len <= count` | All of the data is written and a terminating `NULL` is appended. | The number of characters written, not including the terminating `NULL`. | N/A | No |
+| `count < sizeOfBuffer` and `len > count` | The first *`count-1`* characters are written followed by a null-terminator. | The number of characters that would have been written had `count` matched the number of characters to output, not including the null-terminator. | N/A | No |
+| `count >= sizeOfBuffer` and `len < sizeOfBuffer` | All of the data is written with a terminating `NULL`. | The number of characters written, not including the terminating `NULL`. | N/A | No |
+| `count >= sizeOfBuffer` and `len >= sizeOfBuffer` | Unsafe: overwrites the memory that follows the buffer. | The number of characters written, not including the terminating `NULL`. | N/A | No |
+| `format == NULL` | No data is written. If execution continues after invalid parameter handler executes, sets `errno` and returns a negative value. | -1 | `EINVAL` (22) | Yes |
+
+For information about these and other error codes, see [`_doserrno`, `errno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md).
+
### Generic-text routine mappings
| `TCHAR.H` routine | `_UNICODE` and `_MBCS` not defined | `_MBCS` defined | `_UNICODE` defined |
diff --git a/docs/c-runtime-library/reference/vsprintf-p-vsprintf-p-l-vswprintf-p-vswprintf-p-l.md b/docs/c-runtime-library/reference/vsprintf-p-vsprintf-p-l-vswprintf-p-vswprintf-p-l.md
index 7f67d33cd2..75116027f6 100644
--- a/docs/c-runtime-library/reference/vsprintf-p-vsprintf-p-l-vswprintf-p-vswprintf-p-l.md
+++ b/docs/c-runtime-library/reference/vsprintf-p-vsprintf-p-l-vswprintf-p-vswprintf-p-l.md
@@ -6,7 +6,7 @@ api_name: ["_vsprintf_p", "_vswprintf_p", "_vsprintf_p_l", "_vswprintf_p_l"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["vsprintf_p", "_vswprintf_p", "_vstprintf_p", "vswprintf_p", "_vsprintf_p", "vstprintf_p"]
+f1_keywords: ["STDIO/_vsprintf_p", "CORECRT_WSTDIO/_vswprintf_p", "TCHAR/_vstprintf_p", "STDIO/_vsprintf_p_l", "CORECRT_WSTDIO/_vswprintf_p_l", "TCHAR/_vstprintf_p_l", "_vsprintf_p", "_vswprintf_p", "_vstprintf_p", "_vsprintf_p_l", "_vswprintf_p_l", "_vstprintf_p_l"]
helpviewer_keywords: ["vstprintf_p_l function", "_vsprintf_p_l function", "_vstprintf_p function", "vsprintf_p_l function", "_vswprintf_p function", "vswprintf_p function", "vsprintf_p function", "vswprintf_p_l function", "_vswprintf_p_l function", "vstprintf_p function", "formatted text [C++]", "_vsprintf_p function", "_vstprintf_p_l function"]
---
# `_vsprintf_p`, `_vsprintf_p_l`, `_vswprintf_p`, `_vswprintf_p_l`
@@ -66,7 +66,9 @@ The locale to use.
## Return value
-**`_vsprintf_p`** and **`_vswprintf_p`** return the number of characters written, not including the terminating null character, or a negative value if an output error occurs.
+**`_vsprintf_p`** and **`_vswprintf_p`** return the number of characters written, not including the terminating `NULL` character, or a negative value if an output error occurs.
+If the *`buffer`* is a `NULL` pointer and *`sizeInBytes`* or *`count`* are zero, functions return the number of characters that would have been written not including the terminating `NULL`.
+If the *`buffer`* is valid and *`sizeInBytes`* or *`count`* are zero, returns -1.
## Remarks
@@ -76,7 +78,7 @@ These functions differ from the `vsprintf_s` and `vswprintf_s` only in that they
The versions of these functions with the `_l` suffix are identical except that they use the locale parameter passed in instead of the current thread locale.
-If the *`buffer`* or *`format`* parameters are `NULL` pointers, if count is zero, or if the format string contains invalid formatting characters, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, the functions return -1 and set `errno` to `EINVAL`.
+If the *`buffer`* or *`format`* parameters are `NULL` pointers, or if the format string contains invalid formatting characters, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, the functions return -1 and set `errno` to `EINVAL`.
> [!IMPORTANT]
> Starting in Windows 10 version 2004 (build 19041), the `printf` family of functions prints exactly representable floating point numbers according to the IEEE 754 rules for rounding. In previous versions of Windows, exactly representable floating point numbers ending in '5' would always round up. IEEE 754 states that they must round to the closest even digit (also known as "Banker's Rounding"). For example, both `printf("%1.0f", 1.5)` and `printf("%1.0f", 2.5)` should round to 2. Previously, 1.5 would round to 2 and 2.5 would round to 3. This change only affects exactly representable numbers. For example, 2.35 (which, when represented in memory, is closer to 2.35000000000000008) continues to round up to 2.4. Rounding done by these functions now also respects the floating point rounding mode set by [`fesetround`](fegetround-fesetround2.md). Previously, rounding always chose `FE_TONEAREST` behavior. This change only affects programs built using Visual Studio 2019 version 16.2 and later. To use the legacy floating point rounding behavior, link with ['legacy_stdio_float_rounding.obj`](../link-options.md).
diff --git a/docs/c-runtime-library/reference/vsprintf-s-vsprintf-s-l-vswprintf-s-vswprintf-s-l.md b/docs/c-runtime-library/reference/vsprintf-s-vsprintf-s-l-vswprintf-s-vswprintf-s-l.md
index 645a187387..991b132063 100644
--- a/docs/c-runtime-library/reference/vsprintf-s-vsprintf-s-l-vswprintf-s-vswprintf-s-l.md
+++ b/docs/c-runtime-library/reference/vsprintf-s-vsprintf-s-l-vswprintf-s-vswprintf-s-l.md
@@ -1,18 +1,20 @@
---
description: "Learn more about: vsprintf_s, _vsprintf_s_l, vswprintf_s, _vswprintf_s_l"
-title: "vsprintf_s, _vsprintf_s_l, vswprintf_s, _vswprintf_s_l"
+title: "vsprintf_s, _vsprintf_s_l, vswprintf_s, _vswprintf_s_l, _vstprintf_s, _vstprintf_s_l"
ms.date: "3/9/2021"
-api_name: ["_vswprintf_s_l", "vsprintf_s", "vswprintf_s", "_vsprintf_s_l"]
+api_name: ["_vswprintf_s_l", "vsprintf_s", "vswprintf_s", "_vsprintf_s_l", _vstprintf_s, _vstprintf_s_l]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "ntoskrnl.exe"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["vswprintf_s", "vsprintf_s", "_vstprintf_s"]
+f1_keywords: ["CORECRT_WSTDIO/vswprintf_s", "STDIO/vsprintf_s", "TCHAR/_vstprintf_s", "vswprintf_s", "vsprintf_s", "_vstprintf_s", "_vstprintf_s_l", "_vswprintf_s_l"]
helpviewer_keywords: ["_vstprintf_s_l function", "vsprintf_s_l function", "_vstprintf_s function", "vswprintf_s function", "vstprintf_s function", "vstprintf_s_l function", "vswprintf_s_l function", "vsprintf_s function", "_vsprintf_s_l function", "formatted text [C++]", "_vswprintf_s_l function"]
---
-# `vsprintf_s`, `_vsprintf_s_l`, `vswprintf_s`, `_vswprintf_s_l`
+# `vsprintf_s`, `_vsprintf_s_l`, `vswprintf_s`, `_vswprintf_s_l`, `_vstprintf_s`, `_vstprintf_s_l`
Write formatted output using a pointer to a list of arguments. These functions are versions of [`vsprintf`, `_vsprintf_l`, `vswprintf`, `_vswprintf_l`, \`__vswprintf_l`](vsprintf-vsprintf-l-vswprintf-vswprintf-l-vswprintf-l.md) with security enhancements as described in [Security features in the CRT](../security-features-in-the-crt.md).
+For `_vstprintf_s` and `_vstprintf_s_l`, see [Generic-text function mappings](#generic-text-function-mappings).
+
## Syntax
```C
@@ -94,12 +96,14 @@ In C++, using these functions is simplified by template overloads. The overloads
> [!IMPORTANT]
> Starting in Windows 10 version 2004 (build 19041), the `printf` family of functions prints exactly representable floating point numbers according to the IEEE 754 rules for rounding. In previous versions of Windows, exactly representable floating point numbers ending in '5' would always round up. IEEE 754 states that they must round to the closest even digit (also known as "Banker's Rounding"). For example, both `printf("%1.0f", 1.5)` and `printf("%1.0f", 2.5)` should round to 2. Previously, 1.5 would round to 2 and 2.5 would round to 3. This change only affects exactly representable numbers. For example, 2.35 (which, when represented in memory, is closer to 2.35000000000000008) continues to round up to 2.4. Rounding done by these functions now also respects the floating point rounding mode set by [`fesetround`](fegetround-fesetround2.md). Previously, rounding always chose `FE_TONEAREST` behavior. This change only affects programs built using Visual Studio 2019 version 16.2 and later. To use the legacy floating point rounding behavior, link with ['legacy_stdio_float_rounding.obj`](../link-options.md).
-### Generic-text routine mappings
+### Generic-text function mappings
+
+The function in the `tchar.h` column maps to the function in the other columns depending on the character set that is defined at compile time.
-| `TCHAR.H` routine | `_UNICODE` and `_MBCS` not defined | `_MBCS` defined | `_UNICODE` defined |
+| `tchar.h` function | `_UNICODE` and `_MBCS` not defined | `_MBCS` defined | `_UNICODE` defined |
|---|---|---|---|
-| `_vstprintf_s` | **`vsprintf_s`** | **`vsprintf_s`** | **`vswprintf_s`** |
-| `_vstprintf_s_l` | **`_vsprintf_s_l`** | **`_vsprintf_s_l`** | **`_vswprintf_s_l`** |
+| `_vstprintf_s` | `vsprintf_s` | `vsprintf_s` | `vswprintf_s` |
+| `_vstprintf_s_l` | `_vsprintf_s_l` | `_vsprintf_s_l` | `_vswprintf_s_l` |
## Requirements
diff --git a/docs/c-runtime-library/reference/vsprintf-vsprintf-l-vswprintf-vswprintf-l-vswprintf-l.md b/docs/c-runtime-library/reference/vsprintf-vsprintf-l-vswprintf-vswprintf-l-vswprintf-l.md
index acaff8c14f..b3296103ad 100644
--- a/docs/c-runtime-library/reference/vsprintf-vsprintf-l-vswprintf-vswprintf-l-vswprintf-l.md
+++ b/docs/c-runtime-library/reference/vsprintf-vsprintf-l-vswprintf-vswprintf-l-vswprintf-l.md
@@ -6,7 +6,7 @@ api_name: ["_vswprintf_l", "_vsprintf_l", "vsprintf", "vswprintf", "__vswprintf_
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "ntoskrnl.exe"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["vstprintf", "vswprintf", "_vstprintf", "vsprintf", "__vswprintf_l", "_vsprintf_l", "_vswprintf_l", "vswprintf_l"]
+f1_keywords: ["CORECRT_WSTDIO/vswprintf", "TCHAR/_vstprintf", "STDIO/vsprintf", "CORECRT_WSTDIO/__vswprintf_l", "STDIO/_vsprintf_l", "CORECRT_WSTDIO/_vswprintf_l", "vswprintf", "_vstprintf", "vsprintf", "__vswprintf_l", "_vsprintf_l", "_vswprintf_l"]
helpviewer_keywords: ["__vswprintf_l function", "_vstprintf_l function", "formatted text", "vstprintf_l function", "_vswprintf_l function", "vsprintf_l function", "buffers, avoiding overruns", "buffer overruns", "vswprintf_l function", "buffers, buffer overruns", "vstprintf function", "_vsprintf_l function", "vswprintf function", "vsprintf function", "_vstprintf function"]
---
# `vsprintf`, `_vsprintf_l`, `vswprintf`, `_vswprintf_l`, `__vswprintf_l`
@@ -95,6 +95,10 @@ The locale to use.
**`vsprintf`** and **`vswprintf`** return the number of characters written, not including the terminating `NULL` character, or a negative value if an output error occurs. If *`buffer`* or *`format`* is a `NULL` pointer, these functions invoke the invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, these functions return -1 and set `errno` to `EINVAL`.
+If *`buffer`* is a `NULL` pointer and *`count`* is zero, **`vswprintf`** and **`_vswprintf_l`** return the number of characters that would have been written not including the terminating NULL.
+
+If *`buffer`* is valid and *`count`* is zero, **`vswprintf`** and **`_vswprintf_l`** return -1. The contents of *`buffer`* are unchanged.
+
For information on these and other error codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md).
## Remarks
diff --git a/docs/c-runtime-library/reference/vsscanf-s-vswscanf-s.md b/docs/c-runtime-library/reference/vsscanf-s-vswscanf-s.md
index e95d0c4ded..2ba236d426 100644
--- a/docs/c-runtime-library/reference/vsscanf-s-vswscanf-s.md
+++ b/docs/c-runtime-library/reference/vsscanf-s-vswscanf-s.md
@@ -6,7 +6,7 @@ api_name: ["vswscanf_s", "vsscanf_s"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["vsscanf_s", "vswscanf_s", "_vstscanf_s"]
+f1_keywords: ["STDIO/vsscanf_s", "CORECRT_WSTDIO/vswscanf_s", "TCHAR/_vstscanf_s", "vsscanf_s", "vswscanf_s", "_vstscanf_s"]
ms.assetid: 7b732e68-c6f4-4579-8917-122f5a7876e1
---
# `vsscanf_s`, `vswscanf_s`
diff --git a/docs/c-runtime-library/reference/vsscanf-vswscanf.md b/docs/c-runtime-library/reference/vsscanf-vswscanf.md
index 1619260259..456e5cf8ad 100644
--- a/docs/c-runtime-library/reference/vsscanf-vswscanf.md
+++ b/docs/c-runtime-library/reference/vsscanf-vswscanf.md
@@ -6,7 +6,7 @@ api_name: ["vsscanf", "vswscanf"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["_vstscanf", "vsscanf", "vswscanf"]
+f1_keywords: ["TCHAR/_vstscanf", "STDIO/vsscanf", "CORECRT_WSTDIO/vswscanf", "_vstscanf", "vsscanf", "vswscanf"]
helpviewer_keywords: ["vswscanf function", "vsscanf function"]
ms.assetid: e96180f2-df46-423d-b4eb-0a49ab819bde
---
diff --git a/docs/c-runtime-library/reference/wcrtomb-s.md b/docs/c-runtime-library/reference/wcrtomb-s.md
index 2b0e08a740..3f0b1ca8b4 100644
--- a/docs/c-runtime-library/reference/wcrtomb-s.md
+++ b/docs/c-runtime-library/reference/wcrtomb-s.md
@@ -6,7 +6,7 @@ api_name: ["wcrtomb_s", "_o_wcrtomb_s"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-convert-l1-1-0.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["wcrtomb_s"]
+f1_keywords: ["WCHAR/wcrtomb_s", "wcrtomb_s"]
helpviewer_keywords: ["wide characters, converting", "wcrtomb_s function", "multibyte characters", "characters, converting"]
ms.assetid: 9a8a1bd0-1d60-463d-a3a2-d83525eaf656
---
diff --git a/docs/c-runtime-library/reference/wcrtomb.md b/docs/c-runtime-library/reference/wcrtomb.md
index 6c9c7dc649..a88c83cdbe 100644
--- a/docs/c-runtime-library/reference/wcrtomb.md
+++ b/docs/c-runtime-library/reference/wcrtomb.md
@@ -6,7 +6,7 @@ api_name: ["wcrtomb", "_o_wcrtomb"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-convert-l1-1-0.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["wcrtomb"]
+f1_keywords: ["WCHAR/wcrtomb", "wcrtomb"]
helpviewer_keywords: ["wide characters, converting", "wcrtomb function", "multibyte characters", "characters, converting"]
ms.assetid: 717f1b21-2705-4b7f-b6d0-82adc5224340
---
diff --git a/docs/c-runtime-library/reference/wcsicoll.md b/docs/c-runtime-library/reference/wcsicoll.md
index 7a4e304b18..5e73d3af12 100644
--- a/docs/c-runtime-library/reference/wcsicoll.md
+++ b/docs/c-runtime-library/reference/wcsicoll.md
@@ -6,7 +6,7 @@ api_name: ["wcsicoll"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["wcsicoll"]
+f1_keywords: ["CORECRT_WSTRING/wcsicoll", "wcsicoll"]
helpviewer_keywords: ["wcsicoll function"]
ms.assetid: d049022d-cf60-467f-842b-9a508d9aeaff
---
diff --git a/docs/c-runtime-library/reference/wcsrtombs-s.md b/docs/c-runtime-library/reference/wcsrtombs-s.md
index 3ddf2f5a79..a56efa3cd5 100644
--- a/docs/c-runtime-library/reference/wcsrtombs-s.md
+++ b/docs/c-runtime-library/reference/wcsrtombs-s.md
@@ -6,7 +6,7 @@ api_name: ["wcsrtombs_s", "_o_wcsrtombs_s"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-convert-l1-1-0.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["wcsrtombs_s"]
+f1_keywords: ["WCHAR/wcsrtombs_s", "wcsrtombs_s"]
helpviewer_keywords: ["string conversion, wide characters", "wcsrtombs_s function", "wide characters, strings"]
ms.assetid: 9dccb766-113c-44bb-9b04-07a634dddec8
---
diff --git a/docs/c-runtime-library/reference/wcsrtombs.md b/docs/c-runtime-library/reference/wcsrtombs.md
index e0bce3824a..9df3eb44ee 100644
--- a/docs/c-runtime-library/reference/wcsrtombs.md
+++ b/docs/c-runtime-library/reference/wcsrtombs.md
@@ -6,7 +6,7 @@ api_name: ["wcsrtombs", "_o_wcsrtombs"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-convert-l1-1-0.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["wcsrtombs"]
+f1_keywords: ["WCHAR/wcsrtombs", "wcsrtombs"]
helpviewer_keywords: ["wcsrtombs function", "string conversion, wide characters", "wide characters, strings"]
ms.assetid: a8d21fec-0d36-4085-9d81-9b1c61c7259d
---
diff --git a/docs/c-runtime-library/reference/wcstombs-s-wcstombs-s-l.md b/docs/c-runtime-library/reference/wcstombs-s-wcstombs-s-l.md
index 2053407d85..058ddb9ccb 100644
--- a/docs/c-runtime-library/reference/wcstombs-s-wcstombs-s-l.md
+++ b/docs/c-runtime-library/reference/wcstombs-s-wcstombs-s-l.md
@@ -6,7 +6,7 @@ api_name: ["_wcstombs_s_l", "wcstombs_s", "_o__wcstombs_s_l", "_o_wcstombs_s"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-convert-l1-1-0.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["wcstombs_s", "_wcstombs_s_l"]
+f1_keywords: ["STDLIB/wcstombs_s", "STDLIB/_wcstombs_s_l", "wcstombs_s", "_wcstombs_s_l"]
helpviewer_keywords: ["wcstombs_s function", "string conversion, wide characters", "wide characters, converting", "_wcstombs_s_l function", "wcstombs_s_l function", "characters, converting", "string conversion, multibyte character strings"]
---
# `wcstombs_s`, `_wcstombs_s_l`
diff --git a/docs/c-runtime-library/reference/wcstombs-wcstombs-l.md b/docs/c-runtime-library/reference/wcstombs-wcstombs-l.md
index 1b7b95d0f4..cd259d2102 100644
--- a/docs/c-runtime-library/reference/wcstombs-wcstombs-l.md
+++ b/docs/c-runtime-library/reference/wcstombs-wcstombs-l.md
@@ -6,7 +6,7 @@ api_name: ["wcstombs", "_wcstombs_l", "_o__wcstombs_l", "_o_wcstombs"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-convert-l1-1-0.dll", "ntoskrnl.exe"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["wcstombs", "_wcstombs_l"]
+f1_keywords: ["STDLIB/wcstombs", "STDLIB/_wcstombs_l", "wcstombs", "_wcstombs_l"]
helpviewer_keywords: ["_wcstombs_l function", "wcstombs function", "string conversion, wide characters", "wide characters, converting", "wcstombs_l function", "characters, converting", "string conversion, multibyte character strings"]
---
# `wcstombs`, `_wcstombs_l`
@@ -64,6 +64,8 @@ If **`wcstombs`** successfully converts the multibyte string, it returns the num
The **`wcstombs`** function converts the wide-character string pointed to by *`wcstr`* to the corresponding multibyte characters and stores the results in the *`mbstr`* array. The *`count`* parameter indicates the maximum number of bytes that can be stored in the multibyte output string (that is, the size of *`mbstr`*). In general, it isn't known how many bytes will be required when converting a wide-character string. Some wide characters will require only a single byte in the output string; others require 2 bytes. If there are 2 bytes in the multibyte output string for every wide character in the input string (including the wide character `NULL`), the result is guaranteed to fit.
+Starting in Windows 10 version 1803 (10.0.17134.0), the Universal C Runtime supports using a UTF-8 code page. Use `wcstombs(NULL, wcstr, 0)` to get the correct size that you'll need for the conversion because assuming that you'll need two bytes for every wide character may not be enough. For more information about UTF-8 support, see [UTF-8 support](setlocale-wsetlocale.md)
+
If **`wcstombs`** encounters the wide-character `NULL` character (L'\0') either before or when *`count`* occurs, it converts it to an 8-bit 0 and stops. Thus, the multibyte character string at *`mbstr`* is null-terminated only if **`wcstombs`** encounters a wide-character `NULL` character during conversion. If the sequences pointed to by *`wcstr`* and *`mbstr`* overlap, the behavior of **`wcstombs`** is undefined.
If the *`mbstr`* argument is `NULL`, **`wcstombs`** returns the required size in bytes of the destination string.
diff --git a/docs/c-runtime-library/reference/wctob.md b/docs/c-runtime-library/reference/wctob.md
index 14158180c1..70b552de85 100644
--- a/docs/c-runtime-library/reference/wctob.md
+++ b/docs/c-runtime-library/reference/wctob.md
@@ -6,7 +6,7 @@ api_name: ["wctob", "_o_wctob"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-convert-l1-1-0.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["wctob"]
+f1_keywords: ["WCHAR/wctob", "wctob"]
helpviewer_keywords: ["wide characters, converting", "wctob function", "characters, converting"]
ms.assetid: 46aec98b-c2f2-4e9d-9d89-7db99ba8a9a6
---
diff --git a/docs/c-runtime-library/reference/wctomb-s-wctomb-s-l.md b/docs/c-runtime-library/reference/wctomb-s-wctomb-s-l.md
index 3f81370a72..5158493a59 100644
--- a/docs/c-runtime-library/reference/wctomb-s-wctomb-s-l.md
+++ b/docs/c-runtime-library/reference/wctomb-s-wctomb-s-l.md
@@ -6,7 +6,7 @@ api_name: ["_wctomb_s_l", "wctomb_s", "_o__wctomb_s_l", "_o_wctomb_s"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-convert-l1-1-0.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["wctomb_s", "_wctomb_s_l"]
+f1_keywords: ["STDLIB/wctomb_s", "STDLIB/_wctomb_s_l", "wctomb_s", "_wctomb_s_l"]
helpviewer_keywords: ["wctomb_s function", "wctomb_s_l function", "string conversion, wide characters", "wide characters, converting", "_wctomb_s_l function", "characters, converting", "string conversion, multibyte character strings"]
ms.assetid: 7e94a888-deed-4dbd-b5e9-d4a0455538b8
---
@@ -44,7 +44,7 @@ The address of a multibyte character.
Size of the buffer *`mbchar`*.
*`wchar`*\
-A wide character.
+The wide character to convert.
*`locale`*\
The locale to use.
@@ -60,9 +60,11 @@ Error Conditions
| `NULL` | >0 | `EINVAL` | not modified |
| any | >`INT_MAX` | `EINVAL` | not modified |
| any | too small | `EINVAL` | not modified |
-
+
If any of the above error conditions occurs, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, `wctomb` returns `EINVAL` and sets `errno` to `EINVAL`.
+The return value [`EILSEQ`](../errno-constants.md) indicates that the value passed via the parameter `wchar` is not a valid wide character.
+
## Remarks
The **`wctomb_s`** function converts its *`wchar`* argument to the corresponding multibyte character and stores the result at *`mbchar`*. You can call the function from any point in any program.
diff --git a/docs/c-runtime-library/reference/wctomb-wctomb-l.md b/docs/c-runtime-library/reference/wctomb-wctomb-l.md
index 25e7712a3a..003b081d84 100644
--- a/docs/c-runtime-library/reference/wctomb-wctomb-l.md
+++ b/docs/c-runtime-library/reference/wctomb-wctomb-l.md
@@ -6,7 +6,7 @@ api_name: ["_wctomb_l", "wctomb", "_o__wctomb_l", "_o_wctomb"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-convert-l1-1-0.dll", "ntoskrnl.exe"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["wctomb"]
+f1_keywords: ["STDLIB/wctomb", "STDLIB/_wctomb_l", "wctomb", "_wctomb_l"]
helpviewer_keywords: ["string conversion, wide characters", "wide characters, converting", "_wctomb_l function", "wctomb function", "wctomb_l function", "characters, converting", "string conversion, multibyte character strings"]
ms.assetid: 4a543f0e-5516-4d81-8ff2-3c5206f02ed5
---
diff --git a/docs/c-runtime-library/reference/wctrans.md b/docs/c-runtime-library/reference/wctrans.md
index d48a6e8f04..7bcac2489a 100644
--- a/docs/c-runtime-library/reference/wctrans.md
+++ b/docs/c-runtime-library/reference/wctrans.md
@@ -6,7 +6,7 @@ api_name: ["wctrans"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-convert-l1-1-0.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["wctrans"]
+f1_keywords: ["WCTYPE/wctrans", "wctrans"]
helpviewer_keywords: ["character codes, wctrans", "characters, codes", "characters, converting", "wctrans function"]
ms.assetid: 215404bf-6d60-489c-9ae9-880e6b586162
---
diff --git a/docs/c-runtime-library/reference/wctype.md b/docs/c-runtime-library/reference/wctype.md
index 220f93f169..123b547d78 100644
--- a/docs/c-runtime-library/reference/wctype.md
+++ b/docs/c-runtime-library/reference/wctype.md
@@ -6,7 +6,7 @@ api_name: ["wctype"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-string-l1-1-0.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["wctype"]
+f1_keywords: ["WCTYPE/wctype", "wctype"]
helpviewer_keywords: ["wctype function", "wide characters"]
---
# `wctype`
diff --git a/docs/c-runtime-library/reference/write.md b/docs/c-runtime-library/reference/write.md
index 41956272df..f21ee87c4d 100644
--- a/docs/c-runtime-library/reference/write.md
+++ b/docs/c-runtime-library/reference/write.md
@@ -6,7 +6,7 @@ api_name: ["_write", "_o__write"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-stdio-l1-1-0.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["_write"]
+f1_keywords: ["CORECRT_IO/_write", "_write"]
helpviewer_keywords: ["_write function", "write function", "files [C++], writing to"]
---
# `_write`
diff --git a/docs/c-runtime-library/reference/xor-eq.md b/docs/c-runtime-library/reference/xor-eq.md
index 5c8ee16037..4a9898a2c2 100644
--- a/docs/c-runtime-library/reference/xor-eq.md
+++ b/docs/c-runtime-library/reference/xor-eq.md
@@ -5,7 +5,7 @@ ms.date: "11/04/2016"
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["std.xor_eq", "xor_eq", "std::xor_eq"]
+f1_keywords: ["std.xor_eq", "xor_eq", "std::xor_eq", "ISO646/xor_eq"]
helpviewer_keywords: ["xor_eq function"]
ms.assetid: eca4b6b4-b77a-4d44-a09a-5a7e69fdb56c
---
diff --git a/docs/c-runtime-library/reference/xor.md b/docs/c-runtime-library/reference/xor.md
index 44770cb21e..1bc78efb8d 100644
--- a/docs/c-runtime-library/reference/xor.md
+++ b/docs/c-runtime-library/reference/xor.md
@@ -5,7 +5,7 @@ ms.date: "11/04/2016"
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["std::xor", "std.xor"]
+f1_keywords: ["std::xor", "std.xor", "ISO646/xor"]
helpviewer_keywords: ["xor function"]
ms.assetid: 0fe9554b-d87b-4487-92ed-366c6dc21df2
---
@@ -39,7 +39,7 @@ int main( )
result= a ^ b;
cout << result << endl;
- result= a xor_eq b;
+ result= a xor b;
cout << result << endl;
}
```
diff --git a/docs/c-runtime-library/reference/y0-y1-yn.md b/docs/c-runtime-library/reference/y0-y1-yn.md
index 762f4bfd37..6b3d311152 100644
--- a/docs/c-runtime-library/reference/y0-y1-yn.md
+++ b/docs/c-runtime-library/reference/y0-y1-yn.md
@@ -6,7 +6,7 @@ api_name: ["y1", "yn", "y0"]
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["yn", "y1", "y0"]
+f1_keywords: ["CORECRT_MATH/yn", "CORECRT_MATH/y1", "CORECRT_MATH/y0", "yn", "y1", "y0"]
helpviewer_keywords: ["y0 function", "y1 function", "yn function"]
ms.assetid: e14215f3-53d4-4ae8-816e-4c1ec2019316
---
diff --git a/docs/c-runtime-library/routine-mappings.md b/docs/c-runtime-library/routine-mappings.md
index 64d52861ae..087515c0cd 100644
--- a/docs/c-runtime-library/routine-mappings.md
+++ b/docs/c-runtime-library/routine-mappings.md
@@ -1,19 +1,21 @@
---
-description: "Learn more about: Routine Mappings"
-title: "Routine Mappings"
+description: "Learn more about: Microsoft specific generic-text functions and the CRT functions they map to."
+title: "Generic-text function mappings"
ms.date: "11/04/2016"
-helpviewer_keywords: ["_tWinMain", "TCHAR.H data types, list of routine mappings", "generic-text mappings"]
-ms.assetid: 38f33d3b-0f7b-430d-8a4f-75e27c6f1c42
+ms.author: twhitney
+api_name: ["foo",]
+f1_keywords: ["_cgetts", "_cgetts_s", "_cputts", "_fgettc", "_fgettchar", "_fgetts", "_fputtc", "_fputtchar", "_fputts", "_ftscanf", "_ftscanf_s", "_gettc", "_gettch", "_gettchar", "_gettche", "_getts", "_getts_s", "_istalnum", "_istalpha", "_istascii", "_istcntrl", "_istdigit", "_istgraph", "_istlead", "_istleadbyte", "_istlegal", "_istlower", "_istprint", "_istpunct", "_istspace", "_istupper", "_istxdigit", "_itot", "_itot_s", "_ltot", "_ltot_s", "_puttc", "_puttch", "_puttchar", "_putts", "_sctprintf", "_sntprintf", "_sntprintf_s", "_sntscanf", "_sntscanf_s", "_stprintf", "_stprintf_s", "_stscanf", "_stscanf_s", "_taccess", "_tasctime", "_tasctime_s", "_tccmp", "_tccpy", "_tccpy_s", "_tchdir", "_tclen", "_tchmod", "_tcprintf", "_tcprintf_s", "_tcreat", "_tcscanf", "_tcscanf_s", "_tcscat", "_tcscat_s", "_tcschr", "_tcsclen", "_tcsclen_s", "_tcscmp", "_tcscoll", "_tcscpy", "_tcscpy_s", "_tcscspn", "_tcsdec", "_tcsdup", "_tcserror", "_tcserror_s", "_tcsftime", "_tcsicmp", "_tcsicoll", "_tcsinc", "_tcslen", "_tcslwr", "_tcslwr_s", "_tcsnbcnt", "_tcsncat", "_tcsncat_s", "_tcsnccat", "_tcsnccmp", "_tcsnccmp_s", "_tcsnccoll", "_tcsncmp", "_tcsnccnt", "_tcsnccpy", "_tcsncicmp", "_tcsncicoll", "_tcsncpy", "_tcsncset", "_tcsnextc", "_tcsnicmp", "_tcsnicoll", "_tcsninc", "_tcsnccnt", "_tcsnset", "_tcspbrk", "_tcsspnp", "_tcsrchr", "_tcsrev", "_tcsset", "_tcsspn", "_tcsstr", "_tcstod", "_tcstoi64", "_tcstok", "_tcstok_s", "_tcstol", "_tcstoui64", "_tcstoul", "_tcsupr", "_tcsupr_s", "_tcsxfrm", "_tctime", "_tctime_s", "_tctime32", "_tctime32_s", "_tctime64", "_tctime64_s", "_texecl", "_texecle", "_texeclp", "_texeclpe", "_texecv", "_texecve", "_texecvp", "_texecvpe", "_tfdopen", "_tfindfirst", "_tfindnext", "_tfindnext32", "_tfindnext64", "_tfindnexti64", "_tfindnexti6432", "_tfindnext32i64", "_tfopen", "_tfopen_s", "_tfreopen", "_tfreopen_s", "_tfsopen", "_tfullpath", "_tgetcwd", "_tgetdcwd", "_tgetenv", "_tgetenv_s", "_tmain", "_tmakepath", "_tmakepath_s", "_tmkdir", "_tmktemp", "_tmktemp_s", "_topen", "_topen_s", "_totlower", "_totupper", "_tperror", "_tpopen", "_tprintf", "_tprintf_s", "_tputenv", "_tremove", "_trename", "_trmdir", "_tsearchenv", "_tsearchenv_s", "_tscanf", "_tscanf_s", "_tsetlocale", "_tsopen", "_tsopen_s", "_tspawnl", "_tspawnle", "_tspawnlp", "_tspawnlpe", "_tspawnv", "_tspawnve", "_tspawnvp", "_tspawnvpe", "_tsplitpath", "_tstat", "_tstat32", "_tstati32", "_tstat64", "_tstati64", "_tstof", "_tstoi", "_tstoi64", "_tstol", "_tstrdate", "_tstrdate_s", "_tstrtime", "_tstrtime_s", "_tsystem", "_ttempnam", "_ttmpnam", "_ttmpnam_s", "_ttoi", "_ttoi64", "_ttol", "_tunlink", "_tutime", "_tutime32", "_tutime64", "_tWinMain", "_ui64tot", "_ui64tot_s", "_ultot", "_ultot_s", "_ungettc", "_ungettch", "_vftprintf", "_vftprintf_s", "_vsctprintf", "_vsctprintf_s", "_vsntprintf", "_vsntprintf_s", "_vstprintf", "_vtprintf", "_vtprintf_s"]
+helpviewer_keywords: ["_tWinMain", "TCHAR.H functions, list of generic-text function mappings", "generic-text mappings", "_cgetts function", "_cgetts_s function", "_cputts function", "_fgettc function", "_fgettchar function", "_fgetts function", "_fputtc function", "_fputtchar function", "_fputts function", "_ftscanf function", "_ftscanf_s function", "_gettc function", "_gettch function", "_gettchar function", "_gettche function", "_getts function", "_getts_s function", "_istalnum function", "_istalpha function", "_istascii function", "_istcntrl function", "_istdigit function", "_istgraph function", "_istlead function", "_istleadbyte function", "_istlegal function", "_istlower function", "_istprint function", "_istpunct function", "_istspace function", "_istupper function", "_istxdigit function", "_itot function", "_itot_s function", "_ltot function", "_ltot_s function", "_puttc function", "_puttch function", "_puttchar function", "_putts function", "_sctprintf function", "_sntprintf function", "_sntprintf_s function", "_sntscanf function", "_sntscanf_s function", "_stprintf function", "_stprintf_s function", "_stscanf function", "_stscanf_s function", "_taccess function", "_tasctime function", "_tasctime_s function", "_tccmp function", "_tccpy function", "_tccpy_s function", "_tchdir function", "_tclen function", "_tchmod function", "_tcprintf function", "_tcprintf_s function", "_tcreat function", "_tcscanf function", "_tcscanf_s function", "_tcscat function", "_tcscat_s function", "_tcschr function", "_tcsclen function", "_tcsclen_s function", "_tcscmp function", "_tcscoll function", "_tcscpy function", "_tcscpy_s function", "_tcscspn function", "_tcsdec function", "_tcsdup function", "_tcserror function", "_tcserror_s function", "_tcsftime function", "_tcsicmp function", "_tcsicoll function", "_tcsinc function", "_tcslen function", "_tcslwr function", "_tcslwr_s function", "_tcsnbcnt function", "_tcsncat function", "_tcsncat_s function", "_tcsnccat function", "_tcsnccmp function", "_tcsnccmp_s function", "_tcsnccoll function", "_tcsncmp function", "_tcsnccnt function", "_tcsnccpy function", "_tcsncicmp function", "_tcsncicoll function", "_tcsncpy function", "_tcsncset function", "_tcsnextc function", "_tcsnicmp function", "_tcsnicoll function", "_tcsninc function", "_tcsnccnt function", "_tcsnset function", "_tcspbrk function", "_tcsspnp function", "_tcsrchr function", "_tcsrev function", "_tcsset function", "_tcsspn function", "_tcsstr function", "_tcstod function", "_tcstoi64 function", "_tcstok function", "_tcstok_s function", "_tcstol function", "_tcstoui64 function", "_tcstoul function", "_tcsupr function", "_tcsupr_s function", "_tcsxfrm function", "_tctime function", "_tctime_s function", "_tctime32 function", "_tctime32_s function", "_tctime64 function", "_tctime64_s function", "_texecl function", "_texecle function", "_texeclp function", "_texeclpe function", "_texecv function", "_texecve function", "_texecvp function", "_texecvpe function", "_tfdopen function", "_tfindfirst function", "_tfindnext function", "_tfindnext32 function", "_tfindnext64 function", "_tfindnexti64 function", "_tfindnexti6432 function", "_tfindnext32i64 function", "_tfopen function", "_tfopen_s function", "_tfreopen function", "_tfreopen_s function", "_tfsopen function", "_tfullpath function", "_tgetcwd function", "_tgetdcwd function", "_tgetenv function", "_tgetenv_s function", "_tmain function", "_tmakepath function", "_tmakepath_s function", "_tmkdir function", "_tmktemp function", "_tmktemp_s function", "_topen function", "_topen_s function", "_totlower function", "_totupper function", "_tperror function", "_tpopen function", "_tprintf function", "_tprintf_s function", "_tputenv function", "_tremove function", "_trename function", "_trmdir function", "_tsearchenv function", "_tsearchenv_s function", "_tscanf function", "_tscanf_s function", "_tsetlocale function", "_tsopen function", "_tsopen_s function", "_tspawnl function", "_tspawnle function", "_tspawnlp function", "_tspawnlpe function", "_tspawnv function", "_tspawnve function", "_tspawnvp function", "_tspawnvpe function", "_tsplitpath function", "_tstat function", "_tstat32 function", "_tstati32 function", "_tstat64 function", "_tstati64 function", "_tstof function", "_tstoi function", "_tstoi64 function", "_tstol function", "_tstrdate function", "_tstrdate_s function", "_tstrtime function", "_tstrtime_s function", "_tsystem function", "_ttempnam function", "_ttmpnam function", "_ttmpnam_s function", "_ttoi function", "_ttoi64 function", "_ttol function", "_tunlink function", "_tutime function", "_tutime32 function", "_tutime64 function", "_tWinMain function", "_ui64tot function", "_ui64tot_s function", "_ultot function", "_ultot_s function", "_ungettc function", "_ungettch function", "_vftprintf function", "_vftprintf_s function", "_vsctprintf function", "_vsctprintf_s function", "_vsntprintf function", "_vsntprintf_s function", "_vstprintf function", "_vtprintf function", "_vtprintf_s function"]
---
-# Routine mappings
+# Generic-text function mappings
-The generic-text routine mappings are defined in TCHAR.H. `_tccpy` and `_tclen` map to functions in the MBCS model; they're mapped to macros or inline functions in the SBCS and Unicode models for completeness. For information on a generic text routine, see the help article about the corresponding `SBCS`-, `_MBCS`-, or `_UNICODE`-related routine.
+The generic-text routine mappings are defined in `TCHAR.H`. `_tccpy` and `_tclen` map to functions in the MBCS model; they're mapped to macros or inline functions in the SBCS and Unicode models for completeness. For information on a generic text routine, see the help article about the corresponding `SBCS`-, `_MBCS`-, or `_UNICODE`-related routine.
More specific information about individual routines listed in the left column in the following table isn't available in this documentation. However, you can easily look up the information on a corresponding `SBCS`-, `_MBCS`-, or `_UNICODE`-related routine. Use the **Search** command on the **Help** menu to look up any generic-text routine listed below.
For related information, see [Generic-text mappings in tchar.h](../text/generic-text-mappings-in-tchar-h.md).
-### Generic-text routine mappings
+### Function mappings
| Generic-text routine name | `SBCS` (`_UNICODE` and `MBCS` not defined) | `_MBCS` defined | `_UNICODE` defined |
|---|---|---|---|
@@ -27,6 +29,7 @@ For related information, see [Generic-text mappings in tchar.h](../text/generic-
| `_fputtchar` | `_fputchar` | `_fputchar` | `_fputwchar` |
| `_fputts` | `fputs` | `fputs` | `fputws` |
| `_ftprintf` | `fprintf` | `fprintf` | `fwprintf` |
+| `_ftprintf_l` | `_fprintf_l` | `_fprintf_l` | `_fwprintf_l` |
| `_ftprintf_s` | `fprintf_s` | `fprintf_s` | `fwprintf_s` |
| `_ftscanf` | `fscanf` | `fscanf` | `fwscanf` |
| `_ftscanf_s` | `fscanf_s` | `fscanf_s` | `fwscanf_s` |
diff --git a/docs/c-runtime-library/rtdynamiccast.md b/docs/c-runtime-library/rtdynamiccast.md
index c50aa99300..791143e7c0 100644
--- a/docs/c-runtime-library/rtdynamiccast.md
+++ b/docs/c-runtime-library/rtdynamiccast.md
@@ -6,9 +6,8 @@ api_name: ["__RTDynamicCast"]
api_location: ["msvcr90.dll", "msvcr110.dll", "msvcr120.dll", "msvcrt.dll", "msvcr100.dll", "msvcr80.dll", "msvcr110_clr0400.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["__RTDynamicCast"]
+f1_keywords: ["RTTIDATA/__RTDynamicCast", "__RTDynamicCast"]
helpviewer_keywords: ["__RTDynamicCast"]
-ms.assetid: 56aa2d7a-aa47-46ef-830d-e37175611239
---
# `__RTDynamicCast`
@@ -17,13 +16,13 @@ Runtime implementation of the [`dynamic_cast`](../cpp/dynamic-cast-operator.md)
## Syntax
```cpp
-PVOID __RTDynamicCast (
+PVOID __RTDynamicCast(
PVOID inptr,
LONG VfDelta,
PVOID SrcType,
PVOID TargetType,
BOOL isReference
- ) throw(...)
+) throw(...)
```
#### Parameters
@@ -45,7 +44,7 @@ Intended result of cast.
## Return value
-Pointer to the appropriate subobject, if successful; otherwise, `NULL`.
+Pointer to the appropriate subobject if successful; otherwise, `NULL`.
## Exceptions
@@ -59,4 +58,4 @@ Converts `inptr` to an object of type `TargetType`. The type of `inptr` must be
| Routine | Required header |
|---|---|
-| **`__RTDynamicCast`** | `` |
+| **`__RTDynamicCast`** | `` |
diff --git a/docs/c-runtime-library/sbcs-and-mbcs-data-types.md b/docs/c-runtime-library/sbcs-and-mbcs-data-types.md
index 6e97523932..71473d9c2b 100644
--- a/docs/c-runtime-library/sbcs-and-mbcs-data-types.md
+++ b/docs/c-runtime-library/sbcs-and-mbcs-data-types.md
@@ -3,7 +3,7 @@ title: "SBCS and MBCS Data Types"
description: "How to represent single and multibyte characters in the Microsoft C runtime."
ms.topic: "conceptual"
ms.date: "04/11/2018"
-f1_keywords: ["MBCS", "SBCS"]
+f1_keywords: ["_MBCS", "MBCS", "SBCS"]
helpviewer_keywords: ["SBCS and MBCS data types", "data types [C], MBCS and SBCS"]
ms.assetid: 4c3ef9da-e397-48d4-800e-49dba36db171
---
diff --git a/docs/c-runtime-library/security-features-in-the-crt.md b/docs/c-runtime-library/security-features-in-the-crt.md
index 1953ede658..06117a37fd 100644
--- a/docs/c-runtime-library/security-features-in-the-crt.md
+++ b/docs/c-runtime-library/security-features-in-the-crt.md
@@ -3,9 +3,8 @@ title: "Security Features in the CRT"
description: "An overview of secure CRT functions in the Microsoft C runtime."
ms.date: "09/29/2020"
ms.topic: "conceptual"
-f1_keywords: ["_CRT_SECURE_NO_DEPRECATE", "_CRT_NONSTDC_NO_WARNINGS", "_CRT_SECURE_NO_WARNINGS"]
+f1_keywords: ["_CRT_SECURE_NO_DEPRECATE", "_CRT_NONSTDC_NO_DEPRECATE", "_CRT_NONSTDC_NO_WARNINGS", "_CRT_SECURE_NO_WARNINGS"]
helpviewer_keywords: ["security deprecation warnings [C++]", "CRT_NONSTDC_NO_DEPRECATE", "buffers [C++], buffer overruns", "deprecation warnings (security-related), disabling", "_CRT_NONSTDC_NO_WARNINGS", "security [CRT]", "_CRT_SECURE_NO_WARNINGS", "_CRT_NONSTDC_NO_DEPRECATE", "_CRT_SECURE_NO_DEPRECATE", "security-enhanced CRT", "CRT_SECURE_NO_WARNINGS", "CRT_SECURE_NO_DEPRECATE", "deprecation warnings (security-related)", "buffer overruns", "CRT_NONSTDC_NO_WARNINGS", "CRT, security enhancements", "parameters [C++], validation"]
-ms.assetid: d9568b08-9514-49cd-b3dc-2454ded195a3
---
# Security Features in the CRT
@@ -19,7 +18,7 @@ For example, the `strcpy` function can't tell if the string it copies is too lar
## Eliminating deprecation warnings
-There are several ways to eliminate deprecation warnings for the older, less secure functions. The simplest is simply to define `_CRT_SECURE_NO_WARNINGS` or use the [`warning`](../preprocessor/warning.md) pragma. Either will disable deprecation warnings, but the security issues that caused the warnings still exist. It's better to leave deprecation warnings enabled and take advantage of the new CRT security features.
+There are several ways to eliminate deprecation warnings for the older, less secure functions. The simplest is simply to define `_CRT_SECURE_NO_WARNINGS` or use the [`warning`](../preprocessor/warning.md) pragma. Either disables deprecation warnings, but the security issues that caused the warnings still exist. It's better to leave deprecation warnings enabled and take advantage of the new CRT security features.
In C++, the easiest way to eliminate the deprecation warnings is to use [Secure template overloads](./secure-template-overloads.md). The overloads eliminate deprecation warnings in many cases. They replace calls to deprecated functions with calls to secure versions of the functions. For example, consider this deprecated call to `strcpy`:
@@ -54,13 +53,15 @@ Some of the security features include:
You must pass the buffer size to any secure function that writes to a buffer. The secure versions validate that the buffer is large enough before writing to it. The validation helps avoid dangerous buffer overrun errors that could allow malicious code to execute. These functions usually return an `errno` error code and invoke the invalid parameter handler if the size of the buffer is too small. Functions that read from input buffers, such as `gets`, have secure versions that require you to specify a maximum size.
+ The debug versions of *some* security-enhanced CRT functions fill the buffer passed to them with a special character (0xFE). This fill character helps to find cases where the incorrect size was passed to the function. Unfortunately, it also reduces performance. To improve performance, use **`_CrtSetDebugFillThreshold`** to disable buffer-filling. For more information, and a list of functions that have this behavior, see [`_CrtSetDebugFillThreshold`](./reference/crtsetdebugfillthreshold.md).
+
- **Null termination**
- Some functions that left potentially non-terminated strings have secure versions, which ensure that strings are properly null-terminated.
+ Some functions that left potentially nonterminated strings have secure versions, which ensure that strings are properly null-terminated.
- **Enhanced error reporting**
- The secure functions return error codes with more error information than was available with the pre-existing functions. The secure functions and many of the pre-existing functions now set `errno` and often return an `errno` code type as well, to provide better error reporting.
+ The secure functions return error codes with more error information than was available with the preexisting functions. The secure functions and many of the preexisting functions now set `errno` and often return an `errno` code type as well, to provide better error reporting.
- **Filesystem security**
diff --git a/docs/c-runtime-library/set-app-type.md b/docs/c-runtime-library/set-app-type.md
index 7b644d6bc7..6b7666c279 100644
--- a/docs/c-runtime-library/set-app-type.md
+++ b/docs/c-runtime-library/set-app-type.md
@@ -6,7 +6,7 @@ api_name: ["_set_app_type", "_o__set_app_type"]
api_location: ["api-ms-win-crt-runtime-l1-1-0.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["_set_app_type", "corecrt_startup/_set_app_type"]
+f1_keywords: ["_set_app_type", "corecrt_startup/_set_app_type", "corecrt_startup/_crt_app_type", "corecrt_startup/_crt_unknown_app", "corecrt_startup/_crt_console_app", "corecrt_startup/_crt_gui_app"]
ms.assetid: 1e7fe786-b587-4116-8c05-f7d762350100
---
# `_set_app_type`
diff --git a/docs/c-runtime-library/setvbuf-constants.md b/docs/c-runtime-library/setvbuf-constants.md
index a9a6965f71..06386d05fb 100644
--- a/docs/c-runtime-library/setvbuf-constants.md
+++ b/docs/c-runtime-library/setvbuf-constants.md
@@ -2,7 +2,7 @@
description: "Learn more about: setvbuf Constants"
title: "setvbuf Constants"
ms.date: "11/04/2016"
-f1_keywords: ["_IOFBF", "_IONBF", "_IOLBF"]
+f1_keywords: ["STDIO/_IOFBF", "STDIO/_IONBF", "STDIO/_IOLBF", "_IOFBF", "_IONBF", "_IOLBF"]
helpviewer_keywords: ["_IOFBF constant", "IOFBF constant", "IONBF constant", "_IOLBF constant", "IOLBF constant", "_IONBF constant"]
ms.assetid: a6ec4dd5-1f24-498c-871a-e874cd28d33c
---
diff --git a/docs/c-runtime-library/sharing-constants.md b/docs/c-runtime-library/sharing-constants.md
index 887ae56c88..11c84f2d81 100644
--- a/docs/c-runtime-library/sharing-constants.md
+++ b/docs/c-runtime-library/sharing-constants.md
@@ -2,8 +2,8 @@
description: "Learn more about: Sharing Constants"
title: "Sharing Constants"
ms.date: "11/04/2016"
-f1_keywords: ["_SH_DENYNO", "_SH_DENYRD", "_SH_DENYRW", "_SH_DENYWR", "_SH_COMPAT"]
-helpviewer_keywords: ["_SH_DENYRW constant", "SH_DENYRD constant", "_SH_COMPAT constant", "_SH_DENYRD constant", "SH_DENYRW constant", "sharing constants", "SH_DENYNO constant", "_SH_DENYWR constant", "SH_DENYWR constant", "_SH_DENYNO constant", "SH_COMPAT constant"]
+f1_keywords: ["CORECRT_SHARE/_SH_DENYNO", "CORECRT_SHARE/_SH_DENYRD", "CORECRT_SHARE/_SH_DENYRW", "CORECRT_SHARE/_SH_DENYWR", "CORECRT_SHARE/_SH_SECURE", "_SH_DENYNO", "_SH_DENYRD", "_SH_DENYRW", "_SH_DENYWR", "_SH_SECURE"]
+helpviewer_keywords: ["_SH_DENYRW constant", "SH_DENYRD constant", "_SH_SECURE constant", "_SH_DENYRD constant", "SH_DENYRW constant", "sharing constants", "SH_DENYNO constant", "_SH_DENYWR constant", "SH_DENYWR constant", "_SH_DENYNO constant", "SH_SECURE constant"]
ms.assetid: 95fadc3a-55dc-473d-98b5-e8211900465d
---
# Sharing constants
diff --git a/docs/c-runtime-library/signal-action-constants.md b/docs/c-runtime-library/signal-action-constants.md
index 13bbfc980c..17d063de1c 100644
--- a/docs/c-runtime-library/signal-action-constants.md
+++ b/docs/c-runtime-library/signal-action-constants.md
@@ -2,7 +2,7 @@
description: "Learn more about: signal Action Constants"
title: "signal Action Constants"
ms.date: "11/04/2016"
-f1_keywords: ["SIG_IGN", "SIG_DFL"]
+f1_keywords: ["SIGNAL/SIG_IGN", "SIGNAL/SIG_DFL", "SIGNAL/SIG_GET", "SIGNAL/SIG_SGE", "SIGNAL/SIG_ACK", "SIGNAL/SIG_ERR", "SIG_IGN", "SIG_DFL", "SIG_GET", "SIG_SGE", "SIG_ACK", "SIG_ERR"]
helpviewer_keywords: ["signal action constants", "SIG_IGN constant", "SIG_DFL constant"]
ms.assetid: c3cb4f15-d39e-4d9d-84f9-0d33e3eb5993
---
@@ -24,6 +24,7 @@ The `func` argument must be either a function address or one of the manifest con
|---|---|
| `SIG_DFL` | Uses system-default response. If the calling program uses stream I/O, buffers created by the run-time library aren't flushed. |
| `SIG_IGN` | Ignores interrupt signal. This value should never be given for `SIGFPE`, since the floating-point state of the process is left undefined. |
+| `SIG_GET` | Returns the current value of the signal. |
| `SIG_SGE` | Indicates an error occurred in the signal. |
| `SIG_ACK` | Indicates an acknowledgment was received. |
| `SIG_ERR` | A return type from a signal indicating an error has occurred. |
diff --git a/docs/c-runtime-library/signal-constants.md b/docs/c-runtime-library/signal-constants.md
index 0618aab2a5..24d35116ca 100644
--- a/docs/c-runtime-library/signal-constants.md
+++ b/docs/c-runtime-library/signal-constants.md
@@ -2,7 +2,7 @@
description: "Learn more about: signal Constants"
title: "signal Constants"
ms.date: "11/04/2016"
-f1_keywords: ["SIGTERM", "SIGFPE", "SIGABRT", "SIGILL", "SIGINT", "SIGSEGV"]
+f1_keywords: ["SIGNAL/SIGTERM", "SIGNAL/SIGFPE", "SIGNAL/SIGABRT", "SIGNAL/SIGILL", "SIGNAL/SIGINT", "SIGNAL/SIGSEGV", "SIGNAL/SIGABRT_COMPAT", "SIGTERM", "SIGFPE", "SIGABRT", "SIGILL", "SIGINT", "SIGSEGV", "SIGABRT_COMPAT"]
helpviewer_keywords: ["SIGTERM constant", "SIGABRT constant", "SIGSEGV constant", "SIGFPE constant", "SIGINT constant", "signal constants", "SIGILL constant"]
ms.assetid: a3b39281-dae7-4e44-8d68-e6a610c669dd
---
@@ -21,7 +21,7 @@ The `sig` argument must be one of the manifest constants listed below (defined i
| Constant | Description |
|---|---|
| `SIGABRT` | Abnormal termination. The default action terminates the calling program with exit code 3. |
-| `SIGABRT_COMPAT` | Same as `SIGABRT`. For compatibility with other platforms. |
+| `SIGABRT_COMPAT` | Same meaning as `SIGABRT`. For compatibility with other platforms. |
| `SIGFPE` | Floating-point error, such as overflow, division by zero, or invalid operation. The default action terminates the calling program. |
| `SIGILL` | Illegal instruction. The default action terminates the calling program. |
| `SIGINT` | CTRL+C interrupt. The default action terminates the calling program with exit code 3. |
diff --git a/docs/c-runtime-library/spawn-constants.md b/docs/c-runtime-library/spawn-constants.md
index b31b2decbf..0be2e3c4d4 100644
--- a/docs/c-runtime-library/spawn-constants.md
+++ b/docs/c-runtime-library/spawn-constants.md
@@ -2,7 +2,7 @@
description: "Learn more about: spawn Constants"
title: "spawn Constants"
ms.date: "11/04/2016"
-f1_keywords: ["_P_NOWAIT", "_P_OVERLAY", "_P_WAIT", "_P_DETACH", "_P_NOWAITO"]
+f1_keywords: ["PROCESS/_P_NOWAIT", "PROCESS/_P_OVERLAY", "PROCESS/_P_WAIT", "PROCESS/_P_DETACH", "PROCESS/_P_NOWAITO", "_P_NOWAIT", "_P_OVERLAY", "_P_WAIT", "_P_DETACH", "_P_NOWAITO"]
helpviewer_keywords: ["_P_OVERLAY constant", "P_DETACH constant", "P_OVERLAY constant", "P_NOWAIT constant", "_P_DETACH constant", "_P_NOWAIT constant", "_P_NOWAITO constant", "P_NOWAITO constant", "spawn constants", "P_WAIT constant", "_P_WAIT constant"]
ms.assetid: e0533e88-d362-46fc-b53c-5f193226d879
---
diff --git a/docs/c-runtime-library/spawn-wspawn-functions.md b/docs/c-runtime-library/spawn-wspawn-functions.md
index e05d4f3657..97667c5c00 100644
--- a/docs/c-runtime-library/spawn-wspawn-functions.md
+++ b/docs/c-runtime-library/spawn-wspawn-functions.md
@@ -2,9 +2,6 @@
description: "Learn more about: _spawn, _wspawn Functions"
title: "_spawn, _wspawn Functions"
ms.date: "11/04/2016"
-api_location: ["msvcr80.dll", "msvcr110_clr0400.dll", "msvcr110.dll", "msvcrt.dll", "msvcr120.dll", "msvcr100.dll", "msvcr90.dll"]
-api_type: ["DLLExport"]
-topic_type: ["apiref"]
f1_keywords: ["_spawn", "_tspawnlp", "_tspawnlpe", "_tspawnve", "_tspawnvp", "_tspawnvpe", "_tspawnl", "spawn", "_tspawnv", "_tspawnle", "wspawn"]
helpviewer_keywords: ["_tspawnve function", "_spawn functions", "_tspawnlpe function", "tspawnvpe function", "processes, creating", "tspawnve function", "_tspawnvp function", "spawn functions", "tspawnl function", "tspawnlp function", "_tspawnvpe function", "_tspawnl function", "tspawnvp function", "tspawnv function", "processes, executing new", "_tspawnv function", "tspawnle function", "process creation", "_tspawnlp function", "tspawnlpe function", "_tspawnle function"]
---
@@ -12,20 +9,14 @@ helpviewer_keywords: ["_tspawnve function", "_spawn functions", "_tspawnlpe func
Each of the `_spawn` functions creates and executes a new process:
-:::row:::
- :::column span="":::
- [`_spawnl`, `_wspawnl`](./reference/spawnl-wspawnl.md)\
- [`_spawnle`, `_wspawnle`](./reference/spawnle-wspawnle.md)\
- [`_spawnlp`, `_wspawnlp`](./reference/spawnlp-wspawnlp.md)\
- [`_spawnlpe`, `_wspawnlpe`](./reference/spawnlpe-wspawnlpe.md)
- :::column-end:::
- :::column span="":::
- [`_spawnv`, `_wspawnv`](./reference/spawnv-wspawnv.md)\
- [`_spawnve`, `_wspawnve`](./reference/spawnve-wspawnve.md)\
- [`_spawnvp`, `_wspawnvp`](./reference/spawnvp-wspawnvp.md)\
- [`_spawnvpe`, `_wspawnvpe`](./reference/spawnvpe-wspawnvpe.md)
- :::column-end:::
-:::row-end:::
+[`_spawnl`, `_wspawnl`](./reference/spawnl-wspawnl.md)\
+[`_spawnle`, `_wspawnle`](./reference/spawnle-wspawnle.md)\
+[`_spawnlp`, `_wspawnlp`](./reference/spawnlp-wspawnlp.md)\
+[`_spawnlpe`, `_wspawnlpe`](./reference/spawnlpe-wspawnlpe.md)\
+[`_spawnv`, `_wspawnv`](./reference/spawnv-wspawnv.md)\
+[`_spawnve`, `_wspawnve`](./reference/spawnve-wspawnve.md)\
+[`_spawnvp`, `_wspawnvp`](./reference/spawnvp-wspawnvp.md)\
+[`_spawnvpe`, `_wspawnvpe`](./reference/spawnvpe-wspawnvpe.md)
The letters at the end of the function name determine the variation.
diff --git a/docs/c-runtime-library/standard-types.md b/docs/c-runtime-library/standard-types.md
index 31a35b082c..f5e544a7d2 100644
--- a/docs/c-runtime-library/standard-types.md
+++ b/docs/c-runtime-library/standard-types.md
@@ -1,9 +1,9 @@
---
description: "Learn more about: Standard Types"
title: "Standard Types"
-ms.date: "11/04/2016"
-f1_keywords: ["__time64_t", "_diskfree_t", "_CRT_DUMP_CLIENT", "_fsize_t", "__timeb64", "File", "__utimeb64", "jmp_buf", "__finddata64_t", "_wfinddata_t", "_finddata_t", "utimbuf64", "wint_t", "wctrans_t", "wctype_t", "_HFILE", "_secerr_handler_func", "clock_t", "fpos_t", "_dev_t", "time64_t", "wfinddata64_t", "stat64", "ldiv_t", "_EXCEPTION_POINTERS", "terminate_function", "size_t", "timeb64", "tm", "_HEAPINFO", "unexpected_function", "_CrtMemState", "_se_translator_function", "sig_atomic_t", "_CRT_REPORT_HOOK", "_complex", "_w_finddatai64_t", "_timeb", "_onexit_t", "_RTC_ErrorNumber", "lconv", "_PNH", "_off_t", "ptrdiff_t", "time_t", "_FPIEEE_RECORD", "_exception", "__w_finddata64_t", "__stat64", "_utimbuf", "__utimbuf64", "div_t", "_CRT_ALLOC_HOOK", "int8_t", "uint8_t", "int16_t", "uint16_t", "int32_t", "uint32_t", "int64_t", "int_least8_t", "uint_least8_t", "int_least16_t", "uint_least16_t", "int_least32_t", "uint_least32_t", "int_least64_t", "uint_least64_t", "int_fast8_t", "uint_fast8_t", "int_fast16_t", "uint_fast16_t", "int_fast32_t", "uint_fast32_t", "int_fast64_t", "uint_fast64_t", "intmax_t", "uintmax_t"]
-helpviewer_keywords: ["__timeb64 type", "tm type", "clock_t type", "intptr_t type", "diskfree_t type", "wctype_t type", "CRT_DUMP_CLIENT type", "sig_atomic_t type", "_PNH type", "time_t type", "wfinddata_t type", "timeb64", "CRT, standard types", "wint_t type", "_RTC_ErrorNumber type", "_diskfree_t type", "_dev_t type", "_wfinddata_t type", "HFILE type", "__utimbuf64 type", "div_t type", "_onexit_t type", "_secerr_handler_func type", "FPIEEE_RECORD type", "HEAPINFO type", "PNH type", "_CRT_ALLOC_HOOK type", "_se_translater_function type", "va_list type", "wctrans_t type", "secerr_handler_func type", "_locale_t type", "timeb type", "lconv type", "utimbuf type", "dev_t type", "unexpected_function typedef", "_complex type", "_off_t type", "off_t type", "RTC_ErrorNumber type", "_FPIEEE_RECORD type", "exception type", "_CRT_REPORT_HOOK type", "_HEAPINFO type", "ldiv_t type", "terminate_function type", "uintptr_t type", "_CRT_DUMP_CLIENT type", "_utimbuf type", "wfinddatai64_t type", "fpos_t type", "wchar_t type", "CRT_ALLOC_HOOK type", "_HFILE type", "__time64_t type", "_timeb type", "CrtMemState type", "__finddata64_t type", "_exception type", "stat type", "onexit_t type", "FILE constant", "_stat type", "finddata_t type", "__wfinddata64_t type", "ptrdiff_t type", "complex types", "_wfinddatai64_t type", "_EXCEPTION_POINTERS type", "jmp_buf type", "se_translater_function type", "size_t type", "EXCEPTION_POINTERS type", "__stat64 type", "_fsize_t type", "CRT_REPORT_HOOK type", "_finddata_t type"]
+ms.date: 01/26/2023
+f1_keywords: ["CORECRT_IO/__finddata64_t", "CORECRT_IO/_finddata_t", "CORECRT_MATH/_complex", "CORECRT_MATH/_exception", "CORECRT_STARTUP/_EXCEPTION_POINTERS", "CORECRT_STARTUP/_onexit_t", "CORECRT_TERMINATE/terminate_function", "CORECRT_WIO/_fsize_t", "CORECRT_WIO/_wfinddata_t", "CORECRT_WIO/_wfinddata64_t", "CORECRT_WIO/_wfinddatai64_t", "CORECRT_WSTDIO/FILE", "CORECRT_WTIME/tm", "CORECRT/__time64_t", "CORECRT/time_t", "CORECRT/wctype_t", "CORECRT/wint_t", "CRTDBG/_CRT_ALLOC_HOOK", "CRTDBG/_CRT_DUMP_CLIENT", "CRTDBG/_CRT_REPORT_HOOK", "CRTDBG/_CrtMemState", "CRTDBG/_HFILE", "DIRECT/_diskfree_t", "EH/_se_translator_function", "EH/unexpected_function", "FPIEEE/_FPIEEE_RECORD", "LOCALE/lconv", "MALLOC/_HEAPINFO", "NEW/_PNH", "RTCAPI/_RTC_ErrorNumber", "SETJMP/jmp_buf", "SIGNAL/sig_atomic_t", "STDINT/int_fast16_t", "STDINT/int_fast32_t", "STDINT/int_fast64_t", "STDINT/int_fast8_t", "STDINT/int_least16_t", "STDINT/int_least32_t", "STDINT/int_least64_t", "STDINT/int_least8_t", "STDINT/int16_t", "STDINT/int32_t", "STDINT/int64_t", "STDINT/int8_t", "STDINT/intmax_t", "STDINT/uint_fast16_t", "STDINT/uint_fast32_t", "STDINT/uint_fast64_t", "STDINT/uint_fast8_t", "STDINT/uint_least16_t", "STDINT/uint_least32_t", "STDINT/uint_least64_t", "STDINT/uint_least8_t", "STDINT/uint16_t", "STDINT/uint32_t", "STDINT/uint64_t", "STDINT/uint8_t", "STDINT/uintmax_t", "STDIO/fpos_t", "STDLIB/div_t", "STDLIB/ldiv_t", "TIME/clock_t", "TIMEB/__timeb64", "TIMEB/_timeb", "TYPES/_dev_t", "TYPES/_off_t", "UTIME/__utimbuf64", "UTIME/_utimbuf", "VCRUNTIME/ptrdiff_t", "VCRUNTIME/size_t", "WCTYPE/wctrans_t", "__finddata64_t", "_finddata_t", "_complex", "_exception", "_EXCEPTION_POINTERS", "_onexit_t", "terminate_function", "_fsize_t", "_wfinddata_t", "_wfinddata64_t", "_wfinddatai64_t", "FILE", "tm", "__time64_t", "time_t", "wctype_t", "wint_t", "_CRT_ALLOC_HOOK", "_CRT_DUMP_CLIENT", "_CRT_REPORT_HOOK", "_CrtMemState", "_HFILE", "_diskfree_t", "_se_translator_function", "unexpected_function", "_FPIEEE_RECORD", "lconv", "_HEAPINFO", "_PNH", "_RTC_ErrorNumber", "jmp_buf", "sig_atomic_t", "int_fast16_t", "int_fast32_t", "int_fast64_t", "int_fast8_t", "int_least16_t", "int_least32_t", "int_least64_t", "int_least8_t", "int16_t", "int32_t", "int64_t", "int8_t", "intmax_t", "uint_fast16_t", "uint_fast32_t", "uint_fast64_t", "uint_fast8_t", "uint_least16_t", "uint_least32_t", "uint_least64_t", "uint_least8_t", "uint16_t", "uint32_t", "uint64_t", "uint8_t", "uintmax_t", "fpos_t", "div_t", "ldiv_t", "clock_t", "__timeb64", "_timeb", "_dev_t", "_off_t", "__utimbuf64", "_utimbuf", "ptrdiff_t", "size_t", "wctrans_t"]
+helpviewer_keywords: ["__timeb64 type", "tm type", "clock_t type", "intptr_t type", "diskfree_t type", "wctype_t type", "CRT_DUMP_CLIENT type", "sig_atomic_t type", "_PNH type", "time_t type", "wfinddata_t type", "timeb64", "CRT, standard types", "wint_t type", "_RTC_ErrorNumber type", "_diskfree_t type", "_dev_t type", "_wfinddata_t type", "HFILE type", "__utimbuf64 type", "div_t type", "_onexit_t type", "_secerr_handler_func type", "FPIEEE_RECORD type", "HEAPINFO type", "PNH type", "_CRT_ALLOC_HOOK type", "_se_translater_function type", "va_list type", "wctrans_t type", "secerr_handler_func type", "_locale_t type", "timeb type", "lconv type", "utimbuf type", "dev_t type", "unexpected_function typedef", "_complex type", "_off_t type", "off_t type", "RTC_ErrorNumber type", "_FPIEEE_RECORD type", "exception type", "_CRT_REPORT_HOOK type", "_HEAPINFO type", "ldiv_t type", "terminate_function type", "uintptr_t type", "_CRT_DUMP_CLIENT type", "_utimbuf type", "wfinddatai64_t type", "fpos_t type", "wchar_t type", "CRT_ALLOC_HOOK type", "_HFILE type", "__time64_t type", "_timeb type", "CrtMemState type", "__finddata64_t type", "_exception type", "stat type", "onexit_t type", "FILE constant", "_stat type", "finddata_t type", "_wfinddata64_t type", "ptrdiff_t type", "complex types", "_wfinddatai64_t type", "_EXCEPTION_POINTERS type", "jmp_buf type", "se_translater_function type", "size_t type", "EXCEPTION_POINTERS type", "__stat64 type", "_fsize_t type", "CRT_REPORT_HOOK type", "_finddata_t type"]
ms.assetid: 23312dd2-4a6a-4d70-9b48-2a5d0d8c9f28
---
# Standard types
@@ -43,7 +43,7 @@ The Microsoft run-time library defines the following standard types and typedefs
| `_exception` structure | Stores error information for [`_matherr`](./reference/matherr.md). | `MATH.H` |
| `_EXCEPTION_POINTERS` | Contains an exception record. For more information, see [`EXCEPTION_POINTERS`](/windows/win32/api/winnt/ns-winnt-exception_pointers). | `FPIEEE.H` |
| `FILE` structure | Stores information about current state of stream; used in all stream I/O operations. | `STDIO.H` |
-| `_finddata_t`, `_wfinddata_t`, `_finddata32_t`, `_wfinddata32_t`, `_finddatai64_t`, `_wfinddatai64_t`, `__finddata64_t`, `__wfinddata64_t`, `__finddata32i64_t`, `__wfinddata32i64_t`, `__finddata64i32_t`, `__wfinddata64i32_t` structures | Store file-attribute information returned by [`_findfirst`, `_wfindfirst`, and related functions](./reference/findfirst-functions.md) and [`_findnext`, `_wfindnext` and related functions](./reference/findnext-functions.md). See [Filename search functions](./filename-search-functions.md) for information on structure members. | `IO.H`, `WCHAR.H` |
+| `_finddata_t`, `_wfinddata_t`, `_finddata32_t`, `_wfinddata32_t`, `_finddatai64_t`, `_wfinddatai64_t`, `__finddata64_t`, `_wfinddata64_t`, `__finddata32i64_t`, `__wfinddata32i64_t`, `__finddata64i32_t`, `__wfinddata64i32_t` structures | Store file-attribute information returned by [`_findfirst`, `_wfindfirst`, and related functions](./reference/findfirst-functions.md) and [`_findnext`, `_wfindnext` and related functions](./reference/findnext-functions.md). See [Filename search functions](./filename-search-functions.md) for information on structure members. | `IO.H`, `WCHAR.H` |
| `_FPIEEE_RECORD` structure | Contains information pertaining to IEEE floating-point exception; passed to user-defined trap handler by [`_fpieee_flt`](./reference/fpieee-flt.md). | `FPIEEE.H` |
| `fpos_t` (`long integer`, **`__int64`**, or structure, depending on the target platform) | Used by [`fgetpos`](./reference/fgetpos.md) and [`fsetpos`](./reference/fsetpos.md) to record information for uniquely specifying every position within a file. | `STDIO.H` |
| `_fsize_t` (`unsigned long integer`) | Used to represent the size of a file. | `IO.H`,
`WCHAR.H` |
diff --git a/docs/c-runtime-library/stat-structure-st-mode-field-constants.md b/docs/c-runtime-library/stat-structure-st-mode-field-constants.md
index 8adc48ed74..2447bd7997 100644
--- a/docs/c-runtime-library/stat-structure-st-mode-field-constants.md
+++ b/docs/c-runtime-library/stat-structure-st-mode-field-constants.md
@@ -2,7 +2,7 @@
description: "Learn more about: _stat Structure st_mode Field Constants"
title: "_stat Structure st_mode Field Constants"
ms.date: "11/04/2016"
-f1_keywords: ["S_IFCHR", "S_IFDIR", "_S_IWRITE", "S_IFMT", "_S_IFDIR", "_S_IREAD", "S_IEXEC", "_S_IEXEC", "_S_IFMT", "S_IWRITE", "S_IFREG", "S_IREAD", "_S_IFCHR", "_S_IFREG"]
+f1_keywords: ["STAT/S_IFCHR", "STAT/S_IFDIR", "STAT/_S_IWRITE", "STAT/S_IFMT", "STAT/_S_IFDIR", "STAT/_S_IREAD", "STAT/S_IEXEC", "STAT/_S_IEXEC", "STAT/_S_IFMT", "STAT/S_IWRITE", "STAT/S_IFREG", "STAT/S_IREAD", "STAT/_S_IFCHR", "STAT/_S_IFREG", "S_IFCHR", "S_IFDIR", "_S_IWRITE", "S_IFMT", "_S_IFDIR", "_S_IREAD", "S_IEXEC", "_S_IEXEC", "_S_IFMT", "S_IWRITE", "S_IFREG", "S_IREAD", "_S_IFCHR", "_S_IFREG"]
helpviewer_keywords: ["S_IFDIR constant", "stat structure", "S_IWRITE constant", "S_IEXEC constant", "_S_IFREG constant", "S_IREAD constant", "stat structure, constants", "_S_IFMT constant", "st_mode field constants", "S_IFMT constant", "_S_IEXEC constant", "_S_IWRITE constant", "_S_IFDIR constant", "S_IFREG constant", "S_IFCHR constant", "_S_IREAD constant", "_S_IFCHR constant"]
ms.assetid: fd462004-7563-4766-8443-30b0a86174b6
---
diff --git a/docs/c-runtime-library/stdin-stdout-stderr.md b/docs/c-runtime-library/stdin-stdout-stderr.md
index 583eb8c47d..b88b099b36 100644
--- a/docs/c-runtime-library/stdin-stdout-stderr.md
+++ b/docs/c-runtime-library/stdin-stdout-stderr.md
@@ -1,20 +1,18 @@
---
-description: "Learn more about: stdin, stdout, stderr"
+description: "Learn more about the definitions of: stdin, stdout, stderr"
title: "stdin, stdout, stderr"
-ms.date: "10/23/2018"
-f1_keywords: ["stdin", "stderr", "stdout"]
+ms.date: "7/24/2023"
+f1_keywords: ["CORECRT_WSTDIO/stdin", "CORECRT_WSTDIO/stderr", "CORECRT_WSTDIO/stdout", "stdin", "stderr", "stdout"]
helpviewer_keywords: ["stdout function", "standard output stream", "standard error stream", "stdin function", "standard input stream", "stderr function"]
-ms.assetid: badd4735-596d-4498-857c-ec8b7e670e4c
---
# `stdin`, `stdout`, `stderr`
## Syntax
```C
-FILE *stdin;
-FILE *stdout;
-FILE *stderr;
-#include
+#define stdin /* implementation defined */
+#define stdout /* implementation defined */
+#define stderr /* implementation defined */
```
## Remarks
diff --git a/docs/c-runtime-library/strcoll-functions.md b/docs/c-runtime-library/strcoll-functions.md
index 4bd33814e5..9677b6a42e 100644
--- a/docs/c-runtime-library/strcoll-functions.md
+++ b/docs/c-runtime-library/strcoll-functions.md
@@ -2,10 +2,6 @@
description: "Learn more about: strcoll Functions"
title: "strcoll Functions"
ms.date: "11/04/2016"
-api_location: ["msvcr120.dll", "msvcr110_clr0400.dll", "msvcr90.dll", "msvcr80.dll", "msvcr100.dll", "msvcr110.dll"]
-api_type: ["DLLExport"]
-topic_type: ["apiref"]
-f1_keywords: ["strcoll"]
helpviewer_keywords: ["code pages, using for string comparisons", "string comparison [C++], culture-specific", "strcoll functions", "strings [C++], comparing by code page"]
ms.assetid: c09eeff3-8aba-4cfb-a524-752436d85573
---
diff --git a/docs/c-runtime-library/stream-i-o.md b/docs/c-runtime-library/stream-i-o.md
index 180ecf2b1f..e91fcfdda2 100644
--- a/docs/c-runtime-library/stream-i-o.md
+++ b/docs/c-runtime-library/stream-i-o.md
@@ -1,9 +1,8 @@
---
-description: "Learn more about: Stream I/O"
title: "Stream I/O"
-ms.date: "11/04/2016"
+description: "Learn more about: Stream I/O"
+ms.date: 11/04/2016
helpviewer_keywords: ["I/O routines, stream I/O", "I/O [CRT], stream", "stream I/O"]
-ms.assetid: dc7874d3-a91b-456a-9015-4748bb358217
---
# Stream I/O
@@ -13,61 +12,61 @@ These functions process data in different sizes and formats, from single charact
| Routine | Use |
|---|---|
-| [`clearerr`](./reference/clearerr.md), [`clearerr_s`](./reference/clearerr-s.md) | Clear error indicator for stream |
-| [`fclose`](./reference/fclose-fcloseall.md) | Close stream |
-| [`_fcloseall`](./reference/fclose-fcloseall.md) | Close all open streams except **`stdin`**, **`stdout`**, and **`stderr`** |
-| [`_fdopen`, `wfdopen`](./reference/fdopen-wfdopen.md) | Associate stream with file descriptor of open file |
-| [`feof`](./reference/feof.md) | Test for end of file on stream |
-| [`ferror`](./reference/ferror.md) | Test for error on stream |
-| [`fflush`](./reference/fflush.md) | Flush stream to buffer or storage device |
-| [`fgetc`, `fgetwc`](./reference/fgetc-fgetwc.md) | Read character from stream (function versions of **`getc`** and **`getwc`**) |
-| [`_fgetchar`, `_fgetwchar`](./reference/fgetc-fgetwc.md) | Read character from **`stdin`** (function versions of **`getchar`** and **`getwchar`**) |
-| [`fgetpos`](./reference/fgetpos.md) | Get position indicator of stream |
-| [`fgets`, `fgetws`](./reference/fgets-fgetws.md) | Read string from stream |
-| [`_fileno`](./reference/fileno.md) | Get file descriptor associated with stream |
-| [`_flushall`](./reference/flushall.md) | Flush all streams to buffer or storage device |
-| [`fopen`, `_wfopen`](./reference/fopen-wfopen.md), [`fopen_s`, `_wfopen_s`](./reference/fopen-s-wfopen-s.md) | Open stream |
-| [`fprintf`, `_fprintf_l`, `fwprintf`, `_fwprintf_l`](./reference/fprintf-fprintf-l-fwprintf-fwprintf-l.md), [`fprintf_s`, `_fprintf_s_l`, `fwprintf_s`, `_fwprintf_s_l`](./reference/fprintf-s-fprintf-s-l-fwprintf-s-fwprintf-s-l.md) | Write formatted data to stream |
-| [`fputc`, `fputwc`](./reference/fputc-fputwc.md) | Write a character to a stream (function versions of **`putc`** and **`putwc`**) |
-| [`_fputchar`, `_fputwchar`](./reference/fputc-fputwc.md) | Write character to **`stdout`** (function versions of **`putchar`** and **`putwchar`**) |
-| [`fputs`, `fputws`](./reference/fputs-fputws.md) | Write string to stream |
-| [`fread`](./reference/fread.md) | Read unformatted data from stream |
-| [`freopen`, `_wfreopen`](./reference/freopen-wfreopen.md), [`freopen_s`, `_wfreopen_s`](./reference/freopen-s-wfreopen-s.md) | Reassign `FILE` stream pointer to new file or device |
-| [`fscanf`, `fwscanf`](./reference/fscanf-fscanf-l-fwscanf-fwscanf-l.md), [`fscanf_s`, `_fscanf_s_l`, `fwscanf_s`, `_fwscanf_s_l`](./reference/fscanf-s-fscanf-s-l-fwscanf-s-fwscanf-s-l.md) | Read formatted data from stream |
-| [`fseek`, `_fseeki64`](./reference/fseek-fseeki64.md) | Move file position to given location |
-| [`fsetpos`](./reference/fsetpos.md) | Set position indicator of stream |
-| [`_fsopen`, `_wfsopen`](./reference/fsopen-wfsopen.md) | Open stream with file sharing |
-| [`ftell`, `_ftelli64`](./reference/ftell-ftelli64.md) | Get current file position |
-| [`fwrite`](./reference/fwrite.md) | Write unformatted data items to stream |
-| [`getc`, `getwc`](./reference/getc-getwc.md) | Read character from stream (macro versions of **`fgetc`** and **`fgetwc`**) |
-| [`getchar`, `getwchar`](./reference/getc-getwc.md) | Read character from **`stdin`** (macro versions of **`fgetchar`** and **`fgetwchar`**) |
-| [`_getmaxstdio`](./reference/getmaxstdio.md) | Returns the number of simultaneously open files permitted at the stream I/O level. |
-| [`gets_s`, `_getws_s`](./reference/gets-s-getws-s.md) | Read line from **`stdin`** |
-| [`_getw`](./reference/getw.md) | Read binary **`int`** from stream |
-| [`printf`, `_printf_l`, `wprintf`, `_wprintf_l`](./reference/printf-printf-l-wprintf-wprintf-l.md),[`printf_s`, `_printf_s_l`, `wprintf_s`, `_wprintf_s_l`](./reference/printf-s-printf-s-l-wprintf-s-wprintf-s-l.md) | Write formatted data to **`stdout`** |
-| [`putc`, `putwc`](./reference/putc-putwc.md) | Write character to a stream (macro versions of **`fputc`** and **`fputwc`**) |
-| [`putchar`, `putwchar`](./reference/putc-putwc.md) | Write character to **`stdout`** (macro versions of **`fputchar`** and **`fputwchar`**) |
-| [`puts`, `_putws`](./reference/puts-putws.md) | Write line to stream |
-| [`_putw`](./reference/putw.md) | Write binary **`int`** to stream |
-| [`rewind`](./reference/rewind.md) | Move file position to beginning of stream |
-| [`_rmtmp`](./reference/rmtmp.md) | Remove temporary files created by **`tmpfile`** |
-| [`scanf`, `_scanf_l`, `wscanf`, `_wscanf_l`](./reference/scanf-scanf-l-wscanf-wscanf-l.md),[`scanf_s`, `_scanf_s_l`, `wscanf_s`, `_wscanf_s_l`](./reference/scanf-s-scanf-s-l-wscanf-s-wscanf-s-l.md) | Read formatted data from **`stdin`** |
-| [`setbuf`](./reference/setbuf.md) | Control stream buffering |
-| [`_setmaxstdio`](./reference/setmaxstdio.md) | Set a maximum for the number of simultaneously open files at the stream I/O level. |
-| [`setvbuf`](./reference/setvbuf.md) | Control stream buffering and buffer size |
-| [`_snprintf`, `_snwprintf`](./reference/snprintf-snprintf-snprintf-l-snwprintf-snwprintf-l.md), [`_snprintf_s`, `_snprintf_s_l`, `_snwprintf_s`, `_snwprintf_s_l`](./reference/snprintf-s-snprintf-s-l-snwprintf-s-snwprintf-s-l.md) | Write formatted data of specified length to string |
-| [`_snscanf`, `_snwscanf`](./reference/snscanf-snscanf-l-snwscanf-snwscanf-l.md), [`_snscanf_s`, `_snscanf_s_l`, `_snwscanf_s`, `_snwscanf_s_l`](./reference/snscanf-s-snscanf-s-l-snwscanf-s-snwscanf-s-l.md) | Read formatted data of a specified length from the standard input stream. |
-| [`sprintf`, `swprintf`](./reference/sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md), [`sprintf_s`, `_sprintf_s_l`, `swprintf_s`, `_swprintf_s_l`](./reference/sprintf-s-sprintf-s-l-swprintf-s-swprintf-s-l.md) | Write formatted data to string |
-| [`sscanf`, `swscanf`](./reference/sscanf-sscanf-l-swscanf-swscanf-l.md), [`sscanf_s`, _sscanf_s_l, `swscanf_s`, `_swscanf_s_l`](./reference/sscanf-s-sscanf-s-l-swscanf-s-swscanf-s-l.md) | Read formatted data from string |
-| [`_tempnam`, `_wtempnam`](./reference/tempnam-wtempnam-tmpnam-wtmpnam.md) | Generate temporary filename in given directory |
-| [`tmpfile`](./reference/tmpfile.md), [`tmpfile_s`](./reference/tmpfile-s.md) | Create temporary file |
-| [`tmpnam`, `_wtmpnam`](./reference/tempnam-wtempnam-tmpnam-wtmpnam.md), [`tmpnam_s`, `_wtmpnam_s`](./reference/tmpnam-s-wtmpnam-s.md) | Generate temporary filename |
-| [`ungetc`, `ungetwc`](./reference/ungetc-ungetwc.md) | Push character back onto stream |
-| [`_vcprintf`, `_vcwprintf`](./reference/vcprintf-vcprintf-l-vcwprintf-vcwprintf-l.md), [`_vcprintf_s`, `_vcprintf_s_l`, `_vcwprintf_s`, `_vcwprintf_s_l`](./reference/vcprintf-s-vcprintf-s-l-vcwprintf-s-vcwprintf-s-l.md) | Write formatted data to the console. |
-| [`vfprintf`, `vfwprintf`](./reference/vfprintf-vfprintf-l-vfwprintf-vfwprintf-l.md), [`vfprintf_s`, `_vfprintf_s_l`, `vfwprintf_s`, `_vfwprintf_s_l`](./reference/vfprintf-s-vfprintf-s-l-vfwprintf-s-vfwprintf-s-l.md) | Write formatted data to stream |
-| [`vprintf`, `vwprintf`](./reference/vprintf-vprintf-l-vwprintf-vwprintf-l.md), [`vprintf_s`, `_vprintf_s_l`, `vwprintf_s`, `_vwprintf_s_l`](./reference/vprintf-s-vprintf-s-l-vwprintf-s-vwprintf-s-l.md) | Write formatted data to **`stdout`** |
-| [`_vsnprintf`, `_vsnwprintf`](./reference/vsnprintf-vsnprintf-vsnprintf-l-vsnwprintf-vsnwprintf-l.md), [`vsnprintf_s`, `_vsnprintf_s`, `_vsnprintf_s_l`, `_vsnwprintf_s`, `_vsnwprintf_s_l`](./reference/vsnprintf-s-vsnprintf-s-vsnprintf-s-l-vsnwprintf-s-vsnwprintf-s-l.md) | Write formatted data of specified length to buffer |
-| [`vsprintf`, `vswprintf`](./reference/vsprintf-vsprintf-l-vswprintf-vswprintf-l-vswprintf-l.md), [`vsprintf_s`, `_vsprintf_s_l`, `vswprintf_s`, `_vswprintf_s_l`](./reference/vsprintf-s-vsprintf-s-l-vswprintf-s-vswprintf-s-l.md) | Write formatted data to buffer |
+| [`clearerr`](reference/clearerr.md), [`clearerr_s`](reference/clearerr-s.md) | Clear error indicator for stream |
+| [`fclose`](reference/fclose-fcloseall.md) | Close stream |
+| [`_fcloseall`](reference/fclose-fcloseall.md) | Close all open streams except **`stdin`**, **`stdout`**, and **`stderr`** |
+| [`_fdopen`, `wfdopen`](reference/fdopen-wfdopen.md) | Associate stream with file descriptor of open file |
+| [`feof`](reference/feof.md) | Test for end of file on stream |
+| [`ferror`](reference/ferror.md) | Test for error on stream |
+| [`fflush`](reference/fflush.md) | Flush stream to buffer or storage device |
+| [`fgetc`, `fgetwc`](reference/fgetc-fgetwc.md) | Read character from stream (function versions of **`getc`** and **`getwc`**) |
+| [`_fgetchar`, `_fgetwchar`](reference/fgetc-fgetwc.md) | Read character from **`stdin`** (function versions of **`getchar`** and **`getwchar`**) |
+| [`fgetpos`](reference/fgetpos.md) | Get position indicator of stream |
+| [`fgets`, `fgetws`](reference/fgets-fgetws.md) | Read string from stream |
+| [`_fileno`](reference/fileno.md) | Get file descriptor associated with stream |
+| [`_flushall`](reference/flushall.md) | Flush all streams to buffer or storage device |
+| [`fopen`, `_wfopen`](reference/fopen-wfopen.md), [`fopen_s`, `_wfopen_s`](reference/fopen-s-wfopen-s.md) | Open stream |
+| [`fprintf`, `_fprintf_l`, `fwprintf`, `_fwprintf_l`](reference/fprintf-fprintf-l-fwprintf-fwprintf-l.md), [`fprintf_s`, `_fprintf_s_l`, `fwprintf_s`, `_fwprintf_s_l`](reference/fprintf-s-fprintf-s-l-fwprintf-s-fwprintf-s-l.md) | Write formatted data to stream |
+| [`fputc`, `fputwc`](reference/fputc-fputwc.md) | Write a character to a stream (function versions of **`putc`** and **`putwc`**) |
+| [`_fputchar`, `_fputwchar`](reference/fputc-fputwc.md) | Write character to **`stdout`** (function versions of **`putchar`** and **`putwchar`**) |
+| [`fputs`, `fputws`](reference/fputs-fputws.md) | Write string to stream |
+| [`fread`](reference/fread.md) | Read unformatted data from stream |
+| [`freopen`, `_wfreopen`](reference/freopen-wfreopen.md), [`freopen_s`, `_wfreopen_s`](reference/freopen-s-wfreopen-s.md) | Reassign `FILE` stream pointer to new file or device |
+| [`fscanf`, `fwscanf`](reference/fscanf-fscanf-l-fwscanf-fwscanf-l.md), [`fscanf_s`, `_fscanf_s_l`, `fwscanf_s`, `_fwscanf_s_l`](reference/fscanf-s-fscanf-s-l-fwscanf-s-fwscanf-s-l.md) | Read formatted data from stream |
+| [`fseek`, `_fseeki64`](reference/fseek-fseeki64.md) | Move file position to given location |
+| [`fsetpos`](reference/fsetpos.md) | Set position indicator of stream |
+| [`_fsopen`, `_wfsopen`](reference/fsopen-wfsopen.md) | Open stream with file sharing |
+| [`ftell`, `_ftelli64`](reference/ftell-ftelli64.md) | Get current file position |
+| [`fwrite`](reference/fwrite.md) | Write unformatted data items to stream |
+| [`getc`, `getwc`](reference/getc-getwc.md) | Read character from stream (macro versions of **`fgetc`** and **`fgetwc`**) |
+| [`getchar`, `getwchar`](reference/getc-getwc.md) | Read character from **`stdin`** (macro versions of **`fgetchar`** and **`fgetwchar`**) |
+| [`_getmaxstdio`](reference/getmaxstdio.md) | Returns the number of simultaneously open files permitted at the stream I/O level. |
+| [`gets_s`, `_getws_s`](reference/gets-s-getws-s.md) | Read line from **`stdin`** |
+| [`_getw`](reference/getw.md) | Read binary **`int`** from stream |
+| [`printf`, `_printf_l`, `wprintf`, `_wprintf_l`](reference/printf-printf-l-wprintf-wprintf-l.md), [`printf_s`, `_printf_s_l`, `wprintf_s`, `_wprintf_s_l`](reference/printf-s-printf-s-l-wprintf-s-wprintf-s-l.md) | Write formatted data to **`stdout`** |
+| [`putc`, `putwc`](reference/putc-putwc.md) | Write character to a stream (macro versions of **`fputc`** and **`fputwc`**) |
+| [`putchar`, `putwchar`](reference/putc-putwc.md) | Write character to **`stdout`** (macro versions of **`fputchar`** and **`fputwchar`**) |
+| [`puts`, `_putws`](reference/puts-putws.md) | Write line to stream |
+| [`_putw`](reference/putw.md) | Write binary **`int`** to stream |
+| [`rewind`](reference/rewind.md) | Move file position to beginning of stream |
+| [`_rmtmp`](reference/rmtmp.md) | Remove temporary files created by **`tmpfile`** |
+| [`scanf`, `_scanf_l`, `wscanf`, `_wscanf_l`](reference/scanf-scanf-l-wscanf-wscanf-l.md), [`scanf_s`, `_scanf_s_l`, `wscanf_s`, `_wscanf_s_l`](reference/scanf-s-scanf-s-l-wscanf-s-wscanf-s-l.md) | Read formatted data from **`stdin`** |
+| [`setbuf`](reference/setbuf.md) | Control stream buffering |
+| [`_setmaxstdio`](reference/setmaxstdio.md) | Set a maximum for the number of simultaneously open files at the stream I/O level. |
+| [`setvbuf`](reference/setvbuf.md) | Control stream buffering and buffer size |
+| [`_snprintf`, `_snwprintf`](reference/snprintf-snprintf-snprintf-l-snwprintf-snwprintf-l.md), [`_snprintf_s`, `_snprintf_s_l`, `_snwprintf_s`, `_snwprintf_s_l`](reference/snprintf-s-snprintf-s-l-snwprintf-s-snwprintf-s-l.md) | Write formatted data of specified length to string |
+| [`_snscanf`, `_snwscanf`](reference/snscanf-snscanf-l-snwscanf-snwscanf-l.md), [`_snscanf_s`, `_snscanf_s_l`, `_snwscanf_s`, `_snwscanf_s_l`](reference/snscanf-s-snscanf-s-l-snwscanf-s-snwscanf-s-l.md) | Read formatted data of a specified length from the standard input stream. |
+| [`sprintf`, `swprintf`](reference/sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md), [`sprintf_s`, `_sprintf_s_l`, `swprintf_s`, `_swprintf_s_l`](reference/sprintf-s-sprintf-s-l-swprintf-s-swprintf-s-l.md) | Write formatted data to string |
+| [`sscanf`, `swscanf`](reference/sscanf-sscanf-l-swscanf-swscanf-l.md), [`sscanf_s`, _sscanf_s_l, `swscanf_s`, `_swscanf_s_l`](reference/sscanf-s-sscanf-s-l-swscanf-s-swscanf-s-l.md) | Read formatted data from string |
+| [`_tempnam`, `_wtempnam`](reference/tempnam-wtempnam-tmpnam-wtmpnam.md) | Generate temporary filename in given directory |
+| [`tmpfile`](reference/tmpfile.md), [`tmpfile_s`](reference/tmpfile-s.md) | Create temporary file |
+| [`tmpnam`, `_wtmpnam`](reference/tempnam-wtempnam-tmpnam-wtmpnam.md), [`tmpnam_s`, `_wtmpnam_s`](reference/tmpnam-s-wtmpnam-s.md) | Generate temporary filename |
+| [`ungetc`, `ungetwc`](reference/ungetc-ungetwc.md) | Push character back onto stream |
+| [`_vcprintf`, `_vcwprintf`](reference/vcprintf-vcprintf-l-vcwprintf-vcwprintf-l.md), [`_vcprintf_s`, `_vcprintf_s_l`, `_vcwprintf_s`, `_vcwprintf_s_l`](reference/vcprintf-s-vcprintf-s-l-vcwprintf-s-vcwprintf-s-l.md) | Write formatted data to the console. |
+| [`vfprintf`, `vfwprintf`](reference/vfprintf-vfprintf-l-vfwprintf-vfwprintf-l.md), [`vfprintf_s`, `_vfprintf_s_l`, `vfwprintf_s`, `_vfwprintf_s_l`](reference/vfprintf-s-vfprintf-s-l-vfwprintf-s-vfwprintf-s-l.md) | Write formatted data to stream |
+| [`vprintf`, `vwprintf`](reference/vprintf-vprintf-l-vwprintf-vwprintf-l.md), [`vprintf_s`, `_vprintf_s_l`, `vwprintf_s`, `_vwprintf_s_l`](reference/vprintf-s-vprintf-s-l-vwprintf-s-vwprintf-s-l.md) | Write formatted data to **`stdout`** |
+| [`_vsnprintf`, `_vsnwprintf`](reference/vsnprintf-vsnprintf-vsnprintf-l-vsnwprintf-vsnwprintf-l.md), [`vsnprintf_s`, `_vsnprintf_s`, `_vsnprintf_s_l`, `_vsnwprintf_s`, `_vsnwprintf_s_l`](reference/vsnprintf-s-vsnprintf-s-vsnprintf-s-l-vsnwprintf-s-vsnwprintf-s-l.md) | Write formatted data of specified length to buffer |
+| [`vsprintf`, `vswprintf`](reference/vsprintf-vsprintf-l-vswprintf-vswprintf-l-vswprintf-l.md), [`vsprintf_s`, `_vsprintf_s_l`, `vswprintf_s`, `_vswprintf_s_l`](reference/vsprintf-s-vsprintf-s-l-vswprintf-s-vswprintf-s-l.md) | Write formatted data to buffer |
When a program begins execution, the startup code automatically opens several streams: standard input (pointed to by **`stdin`**), standard output (pointed to by **`stdout`**), and standard error (pointed to by **`stderr`**). These streams are directed to the console (keyboard and screen) by default. Use **`freopen`** to redirect **`stdin`**, **`stdout`**, or **`stderr`** to a disk file or a device.
@@ -76,16 +75,15 @@ Files opened using the stream routines are buffered by default. The **`stdout`**
There are two ways to commit buffer contents to disk:
- Link with the file COMMODE.OBJ to set a global commit flag. The default setting of the global flag is **`n`**, for "no-commit."
-
- Set the mode flag to **`c`** with **`fopen`** or **`_fdopen`**.
Any file specifically opened with either the **`c`** or the **`n`** flag behaves according to the flag, regardless of the state of the global commit/no-commit flag.
-If your program doesn't explicitly close a stream, the stream is automatically closed when the program terminates. However, you should close a stream when your program finishes with it, as the number of streams that can be open at one time is limited. See [`_setmaxstdio`](./reference/setmaxstdio.md) for information on this limit.
+If your program doesn't explicitly close a stream, the stream is automatically closed when the program terminates. However, you should close a stream when your program finishes with it, as the number of streams that can be open at one time is limited. See [`_setmaxstdio`](reference/setmaxstdio.md) for information on this limit.
Input can follow output directly only with an intervening call to **`fflush`** or to a file-positioning function (**`fseek`**, **`fsetpos`**, or **`rewind`**). Input can be followed by output without an intervening call to a file-positioning function, if the input operation encounters the end of the file.
## See also
-[Input and output](./input-and-output.md)\
-[Universal C runtime routines by category](./run-time-routines-by-category.md)
+[Input and output](input-and-output.md)\
+[Universal C runtime routines by category](run-time-routines-by-category.md)
diff --git a/docs/c-runtime-library/string-to-numeric-value-functions.md b/docs/c-runtime-library/string-to-numeric-value-functions.md
index 4696bac91c..2bc2e86709 100644
--- a/docs/c-runtime-library/string-to-numeric-value-functions.md
+++ b/docs/c-runtime-library/string-to-numeric-value-functions.md
@@ -2,10 +2,6 @@
description: "Learn more about: String to numeric value functions"
title: "String to numeric value functions"
ms.date: 05/18/2022
-api_location: ["msvcr80.dll", "msvcr110.dll", "msvcr120.dll", "msvcr100.dll", "msvcr110_clr0400.dll", "msvcr90.dll"]
-api_type: ["DLLExport"]
-topic_type: ["apiref"]
-f1_keywords: ["_tcstoi64"]
helpviewer_keywords: ["parsing, numeric strings", "string conversion, to numeric values"]
ms.assetid: 11cbd9ce-033b-4914-bf66-029070e7e385
---
diff --git a/docs/c-runtime-library/text-and-binary-mode-file-i-o.md b/docs/c-runtime-library/text-and-binary-mode-file-i-o.md
index 7a3cde2713..f21bfaef2a 100644
--- a/docs/c-runtime-library/text-and-binary-mode-file-i-o.md
+++ b/docs/c-runtime-library/text-and-binary-mode-file-i-o.md
@@ -11,7 +11,7 @@ File I/O operations take place in one of two translation modes, *text* or *binar
- Retain the current default setting and specify the alternative mode only when you open selected files.
-- Use the function [`_set_fmode`](./reference/set-fmode.md) to change the default mode for newly opened files. Use [`_get_fmode`](./reference/get-fmode.md) to find the current default mode. The initial default setting is text mode (`_O_TEXT`).
+- Use the function [`_set_fmode`](./reference/set-fmode.md) to change the default mode for newly opened files. Use [`_get_fmode`](./reference/get-fmode.md) to find the current default mode. The initial default setting is ANSI text mode (`_O_TEXT`).
- Change the default translation mode directly by setting the global variable [`_fmode`](./fmode.md) in your program. The function `_set_fmode` sets the value of this variable, but it can also be set directly.
diff --git a/docs/c-runtime-library/time-management.md b/docs/c-runtime-library/time-management.md
index 784c4b009a..619798b3cc 100644
--- a/docs/c-runtime-library/time-management.md
+++ b/docs/c-runtime-library/time-management.md
@@ -1,42 +1,42 @@
---
-description: "Learn more about: Time Management"
title: "Time Management"
-ms.date: "11/04/2016"
+description: "Learn more about: Time Management"
+ms.date: 11/04/2016
helpviewer_keywords: ["dates, run-time library members", "time, time management", "date functions", "time functions"]
---
# Time management
Use these functions to get the current time and convert, adjust, and store it as necessary. The current time is the system time.
-The **`_ftime`** and **`localtime`** routines use the **`TZ`** environment variable. If **`TZ`** isn't set, the run-time library attempts to use the time-zone information specified by the operating system. If this information is unavailable, these functions use the default value of PST8PDT. For more information on **`TZ`**, see [`_tzset`](./reference/tzset.md); also see [`_daylight`, `timezone`, and `_tzname`](./daylight-dstbias-timezone-and-tzname.md).
+The **`_ftime`** and **`localtime`** routines use the **`TZ`** environment variable. If **`TZ`** isn't set, the run-time library attempts to use the time-zone information specified by the operating system. If this information is unavailable, these functions use the default value of PST8PDT. For more information on **`TZ`**, see [`_tzset`](reference/tzset.md); also see [`_daylight`, `timezone`, and `_tzname`](daylight-dstbias-timezone-and-tzname.md).
### Time routines
| Function | Use |
|---|---|
-| [`asctime`, `_wasctime`](./reference/asctime-wasctime.md), [`asctime_s`, `_wasctime_s`](./reference/asctime-s-wasctime-s.md) | Convert time from type **`struct tm`** to character string. The versions of these functions with the **`_s`** suffix are more secure. |
-| [`clock`](./reference/clock.md) | Return elapsed wall-clock time for process. |
-| [`ctime`, `_ctime32`, `_ctime64`, `_wctime`, `_wctime32`, `_wctime64`](./reference/ctime-ctime32-ctime64-wctime-wctime32-wctime64.md), [`_ctime_s`, `_ctime32_s`, `_ctime64_s`, `_wctime_s`, `_wctime32_s`, `_wctime64_s`](./reference/ctime-s-ctime32-s-ctime64-s-wctime-s-wctime32-s-wctime64-s.md) | Convert time from type **`time_t`**, **`__time32_t`** or **`__time64_t`** to character string. The versions of these functions with the **`_s`** suffix are more secure. |
-| [`difftime`, `_difftime32`, `_difftime64`](./reference/difftime-difftime32-difftime64.md) | Compute difference between two times. |
-| [`_ftime`, `_ftime32`, `_ftime64`](./reference/ftime-ftime32-ftime64.md),[`_ftime_s`, `_ftime32_s`, _ftime64_s](./reference/ftime-s-ftime32-s-ftime64-s.md) | Store current system time in variable of type **`struct _timeb`** or type **`struct __timeb64`** The versions of these functions with the **`_s`** suffix are more secure. |
-| [`_futime`, `_futime32`, `_futime64`](./reference/futime-futime32-futime64.md) | Set modification time on open file |
-| [`gmtime`, `_gmtime32`, `_gmtime64`](./reference/gmtime-gmtime32-gmtime64.md), [`gmtime_s`, `_gmtime32_s`, `_gmtime64_s`](./reference/gmtime-s-gmtime32-s-gmtime64-s.md) | Convert time from type **`time_t`** to **`struct tm`** or from type **`__time64_t`** to **`struct tm`**. The versions of these functions with the **`_s`** suffix are more secure. |
-| [`localtime`, `_localtime32`, `_localtime64`](./reference/localtime-localtime32-localtime64.md), [`localtime_s`, `_localtime32_s`, `_localtime64_s`](./reference/localtime-s-localtime32-s-localtime64-s.md) | Convert time from type **`time_t`** to **`struct tm`** or from type **`__time64_t`** to **`struct tm`** with local correction. The versions of these functions with the **`_s`** suffix are more secure. |
-| [`_mkgmtime`, `_mkgmtime32`, `_mkgmtime64`](./reference/mkgmtime-mkgmtime32-mkgmtime64.md) | Convert time to calendar value in Greenwich Mean Time. |
-| [`mktime`, `_mktime32`, `_mktime64`](./reference/mktime-mktime32-mktime64.md) | Convert time to calendar value. |
-| [`_strdate`, `_wstrdate`](./reference/strdate-wstrdate.md), [`_strdate_s`, `_wstrdate_s`](./reference/strdate-s-wstrdate-s.md) | Return current system date as string. The versions of these functions with the **`_s`** suffix are more secure. |
-| [`strftime`, `wcsftime`, `_strftime_l`, `_wcsftime_l`](./reference/strftime-wcsftime-strftime-l-wcsftime-l.md) | Format date-and-time string for international use. |
-| [`_strtime`, `_wstrtime`](./reference/strtime-wstrtime.md), [`_strtime_s`, `_wstrtime_s`](./reference/strtime-s-wstrtime-s.md) | Return current system time as string. The versions of these functions with the **`_s`** suffix are more secure. |
-| [`time`, `_time32`, `_time64`](./reference/time-time32-time64.md) | Get current system time as type **`time_t`**, **`__time32_t`** or as type **`__time64_t`**. |
-| [`_tzset`](./reference/tzset.md) | Set external time variables from environment time variable **`TZ`**. |
-| [`_utime`, `_utime32`, `_utime64`, `_wutime`, `_wutime32`, `_wutime64`](./reference/utime-utime32-utime64-wutime-wutime32-wutime64.md) | Set modification time for specified file using either current time or time value stored in structure. |
+| [`asctime`, `_wasctime`](reference/asctime-wasctime.md), [`asctime_s`, `_wasctime_s`](reference/asctime-s-wasctime-s.md) | Convert time from type **`struct tm`** to character string. The versions of these functions with the **`_s`** suffix are more secure. |
+| [`clock`](reference/clock.md) | Return elapsed wall-clock time for process. |
+| [`ctime`, `_ctime32`, `_ctime64`, `_wctime`, `_wctime32`, `_wctime64`](reference/ctime-ctime32-ctime64-wctime-wctime32-wctime64.md), [`_ctime_s`, `_ctime32_s`, `_ctime64_s`, `_wctime_s`, `_wctime32_s`, `_wctime64_s`](reference/ctime-s-ctime32-s-ctime64-s-wctime-s-wctime32-s-wctime64-s.md) | Convert time from type **`time_t`**, **`__time32_t`** or **`__time64_t`** to character string. The versions of these functions with the **`_s`** suffix are more secure. |
+| [`difftime`, `_difftime32`, `_difftime64`](reference/difftime-difftime32-difftime64.md) | Compute difference between two times. |
+| [`_ftime`, `_ftime32`, `_ftime64`](reference/ftime-ftime32-ftime64.md), [`_ftime_s`, `_ftime32_s`, _ftime64_s](reference/ftime-s-ftime32-s-ftime64-s.md) | Store current system time in variable of type **`struct _timeb`** or type **`struct __timeb64`** The versions of these functions with the **`_s`** suffix are more secure. |
+| [`_futime`, `_futime32`, `_futime64`](reference/futime-futime32-futime64.md) | Set modification time on open file |
+| [`gmtime`, `_gmtime32`, `_gmtime64`](reference/gmtime-gmtime32-gmtime64.md), [`gmtime_s`, `_gmtime32_s`, `_gmtime64_s`](reference/gmtime-s-gmtime32-s-gmtime64-s.md) | Convert time from type **`time_t`** to **`struct tm`** or from type **`__time64_t`** to **`struct tm`**. The versions of these functions with the **`_s`** suffix are more secure. |
+| [`localtime`, `_localtime32`, `_localtime64`](reference/localtime-localtime32-localtime64.md), [`localtime_s`, `_localtime32_s`, `_localtime64_s`](reference/localtime-s-localtime32-s-localtime64-s.md) | Convert time from type **`time_t`** to **`struct tm`** or from type **`__time64_t`** to **`struct tm`** with local correction. The versions of these functions with the **`_s`** suffix are more secure. |
+| [`_mkgmtime`, `_mkgmtime32`, `_mkgmtime64`](reference/mkgmtime-mkgmtime32-mkgmtime64.md) | Convert time to calendar value in Greenwich Mean Time. |
+| [`mktime`, `_mktime32`, `_mktime64`](reference/mktime-mktime32-mktime64.md) | Convert time to calendar value. |
+| [`_strdate`, `_wstrdate`](reference/strdate-wstrdate.md), [`_strdate_s`, `_wstrdate_s`](reference/strdate-s-wstrdate-s.md) | Return current system date as string. The versions of these functions with the **`_s`** suffix are more secure. |
+| [`strftime`, `wcsftime`, `_strftime_l`, `_wcsftime_l`](reference/strftime-wcsftime-strftime-l-wcsftime-l.md) | Format date-and-time string for international use. |
+| [`_strtime`, `_wstrtime`](reference/strtime-wstrtime.md), [`_strtime_s`, `_wstrtime_s`](reference/strtime-s-wstrtime-s.md) | Return current system time as string. The versions of these functions with the **`_s`** suffix are more secure. |
+| [`time`, `_time32`, `_time64`](reference/time-time32-time64.md) | Get current system time as type **`time_t`**, **`__time32_t`** or as type **`__time64_t`**. |
+| [`_tzset`](reference/tzset.md) | Set external time variables from environment time variable **`TZ`**. |
+| [`_utime`, `_utime32`, `_utime64`, `_wutime`, `_wutime32`, `_wutime64`](reference/utime-utime32-utime64-wutime-wutime32-wutime64.md) | Set modification time for specified file using either current time or time value stored in structure. |
> [!NOTE]
> In all versions of Microsoft C/C++ except Microsoft C/C++ version 7.0, and in all versions of Visual C++, the time function returns the current time as the number of seconds elapsed since midnight on January 1, 1970. In Microsoft C/C++ version 7.0, **`time`** returned the current time as the number of seconds elapsed since midnight on December 31, 1899.
> [!NOTE]
-> In versions of Visual C++ and Microsoft C/C++ before Visual Studio 2005, **`time_t`** was a **`long int`** (32 bits) and hence could not be used for dates past 3:14:07 January 19, 2038, UTC. **`time_t`** is now equivalent to **`__time64_t`** by default, but defining `_USE_32BIT_TIME_T` changes **`time_t`** to **`__time32_t`** and forces many time functions to call versions that take the 32-bit **`time_t`**. For more information, see [Standard types](./standard-types.md) and comments in the documentation for the individual time functions.
+> In versions of Visual C++ and Microsoft C/C++ before Visual Studio 2005, **`time_t`** was a **`long int`** (32 bits) and hence could not be used for dates past 3:14:07 January 19, 2038, UTC. **`time_t`** is now equivalent to **`__time64_t`** by default, but defining `_USE_32BIT_TIME_T` changes **`time_t`** to **`__time32_t`** and forces many time functions to call versions that take the 32-bit **`time_t`**. For more information, see [Standard types](standard-types.md) and comments in the documentation for the individual time functions.
## See also
-[Universal C runtime routines by category](./run-time-routines-by-category.md)
+[Universal C runtime routines by category](run-time-routines-by-category.md)
diff --git a/docs/c-runtime-library/tmp-max-l-tmpnam.md b/docs/c-runtime-library/tmp-max-l-tmpnam.md
index 53fda9f1b3..7e323d2ed0 100644
--- a/docs/c-runtime-library/tmp-max-l-tmpnam.md
+++ b/docs/c-runtime-library/tmp-max-l-tmpnam.md
@@ -2,7 +2,7 @@
description: "Learn more about: TMP_MAX, L_tmpnam"
title: "TMP_MAX, L_tmpnam"
ms.date: "11/04/2016"
-f1_keywords: ["TMP_MAX", "L_tmpnam"]
+f1_keywords: ["STDIO/TMP_MAX", "STDIO/TMP_MAX_S", "STDIO/_TMP_MAX_S", "STDIO/L_tmpnam", "TMP_MAX", "TMP_MAX_S", "_TMP_MAX_S", "L_tmpnam"]
helpviewer_keywords: ["temporary files, length", "L_tmpnam constant", "TMP_MAX constant"]
ms.assetid: ab19fd0c-b5b7-49f7-b23d-da9dfbcf0c1f
---
@@ -16,7 +16,7 @@ ms.assetid: ab19fd0c-b5b7-49f7-b23d-da9dfbcf0c1f
## Remarks
-`TMP_MAX` is the maximum number of unique filenames that the `tmpnam` function can generate. `L_tmpnam` is the length of temporary filenames generated by `tmpnam`.
+`TMP_MAX` is the maximum number of unique filenames that the `tmpnam` function can generate. `L_tmpnam` is the length of temporary filenames generated by `tmpnam`. For more information, see [`_tempnam`, `_wtempnam`, `tmpnam`, `_wtmpnam`](./reference/tempnam-wtempnam-tmpnam-wtmpnam.md). `TMP_MAX_S` and `_TMP_MAX_S` are synonyms of `TMP_MAX` for use with the related secure functions [`tmpnam_s`, `_wtmpnam_s`](./reference/tmpnam-s-wtmpnam-s.md).
## See also
diff --git a/docs/c-runtime-library/to-functions.md b/docs/c-runtime-library/to-functions.md
index 6aaf88b769..3cd86e5a53 100644
--- a/docs/c-runtime-library/to-functions.md
+++ b/docs/c-runtime-library/to-functions.md
@@ -1,13 +1,8 @@
---
description: "Learn more about: to Functions"
title: "to Functions"
-ms.date: "11/04/2016"
-api_location: ["msvcr120.dll", "msvcr90.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr80.dll", "msvcr100.dll"]
-api_type: ["DLLExport"]
-topic_type: ["apiref"]
-f1_keywords: ["To"]
+ms.date: 06/15/2023
helpviewer_keywords: ["to functions", "string conversion, to different characters", "string conversion, case", "lowercase, converting strings", "uppercase, converting strings", "case, converting", "characters, converting"]
-ms.assetid: f636a4c6-8c9f-4be2-baac-064f9dbae300
---
# `to` functions
@@ -31,28 +26,24 @@ The **`to`** functions and macro conversions are as follows.
| `_toupper` | `_toupper` | Converts `c` to uppercase |
| `towupper` | None | Converts c to corresponding wide-character uppercase letter |
-To use the function versions of the **`to`** routines that are also defined as macros, either remove the macro definitions with `#undef` directives or don't include CTYPE.H. If you use the /Za compiler option, the compiler uses the function version of `toupper` or `tolower`. Declarations of the `toupper` and `tolower` functions are in STDLIB.H.
+To use the function versions of the **`to`** routines that are also defined as macros, either remove the macro definitions with `#undef` directives or don't include `CTYPE.H`. If you use the /Za compiler option, the compiler uses the function version of `toupper` or `tolower`. Declarations of the `toupper` and `tolower` functions are in `STDLIB.H`.
The `__toascii` routine sets all but the low-order 7 bits of `c` to 0, so that the converted value represents a character in the ASCII character set. If `c` already represents an ASCII character, `c` is unchanged.
The `tolower` and `toupper` routines:
- Are dependent on the `LC_CTYPE` category of the current locale (`tolower` calls `isupper` and `toupper` calls `islower`).
-
- Convert `c` if `c` represents a convertible letter of the appropriate case in the current locale and the opposite case exists for that locale. Otherwise, `c` is unchanged.
The `_tolower` and `_toupper` routines:
- Are locale-independent, much faster versions of `tolower` and **toupper.**
-
- Can be used only when **isascii(**`c`**)** and either **isupper(**`c`**)** or **islower(**`c`**)**, respectively, are nonzero.
-
- Have undefined results if `c` isn't an ASCII letter of the appropriate case for converting.
The `towlower` and `towupper` functions return a converted copy of `c` if and only if both of the following conditions are nonzero. Otherwise, `c` is unchanged.
- `c` is a wide character of the appropriate case (that is, for which `iswupper` or **iswlower,** respectively, is nonzero).
-
- There's a corresponding wide character of the target case (that is, for which `iswlower` or **iswupper,** respectively, is nonzero).
## Example
@@ -67,8 +58,9 @@ The `towlower` and `towupper` functions return a converted copy of `c` if and on
#include
#include
+#include
-char msg[] = "Some of THESE letters are Capitals.";
+char msg[] = "Some of THESE letters are Uppercase.";
char *p;
int main( void )
@@ -89,12 +81,12 @@ int main( void )
```
```Output
-Some of THESE letters are Capitals.
-sOME OF these LETTERS ARE cAPITALS.
+Some of THESE letters are Uppercase.
+sOME OF these LETTERS ARE uPPERCASE.
```
## See also
[Data conversion](./data-conversion.md)\
-[Locale](./locale.md)\
+[`Locale`](./locale.md)\
[`is`, `isw` routines](./is-isw-routines.md)
diff --git a/docs/c-runtime-library/toc.yml b/docs/c-runtime-library/toc.yml
index fbcbac882f..4eb9c708b3 100644
--- a/docs/c-runtime-library/toc.yml
+++ b/docs/c-runtime-library/toc.yml
@@ -36,6 +36,17 @@ items:
href: ../c-runtime-library/stream-states.md
- name: Recommendations for choosing between functions and macros
href: ../c-runtime-library/recommendations-for-choosing-between-functions-and-macros.md
+ - name: CRT debugging
+ items:
+ - name: CRT debugging techniques
+ href: ../c-runtime-library/crt-debugging-techniques.md
+ - name: CRT debug heap details
+ href: ../c-runtime-library/crt-debug-heap-details.md
+ - name: Debug versions of heap allocation functions
+ href: ../c-runtime-library/debug-versions-of-heap-allocation-functions.md
+ - name: Find memory leaks using the CRT library
+ href: ../c-runtime-library/find-memory-leaks-using-the-crt-library.md
+ href: ../c-runtime-library/type-checking-crt.md
- name: Type checking (CRT)
href: ../c-runtime-library/type-checking-crt.md
- name: Direction flag
@@ -374,7 +385,7 @@ items:
href: ../c-runtime-library/data-type-mappings.md
- name: Constant and global variable mappings
href: ../c-runtime-library/constant-and-global-variable-mappings.md
- - name: Routine mappings
+ - name: Generic-text function mappings
href: ../c-runtime-library/routine-mappings.md
- name: Locale names, languages, and country-region strings
expanded: false
@@ -464,9 +475,9 @@ items:
href: ../c-runtime-library/reference/abs-labs-llabs-abs64.md
- name: access (CRT)
href: ../c-runtime-library/reference/access-crt.md
- - name: _access, _waccess
+ - name: _access, _waccess, taccess_s
href: ../c-runtime-library/reference/access-waccess.md
- - name: _access_s, _waccess_s
+ - name: _access_s, _waccess_s, _taccess_s
href: ../c-runtime-library/reference/access-s-waccess-s.md
- name: acos, acosf, acosl
href: ../c-runtime-library/reference/acos-acosf-acosl.md
@@ -934,11 +945,11 @@ items:
href: ../c-runtime-library/reference/fpieee-flt.md
- name: _fpreset
href: ../c-runtime-library/reference/fpreset.md
- - name: fprintf, _fprintf_l, fwprintf, _fwprintf_l
+ - name: fprintf, _fprintf_l, fwprintf, _fwprintf_l, _ftprintf, _ftprintf_l
href: ../c-runtime-library/reference/fprintf-fprintf-l-fwprintf-fwprintf-l.md
- - name: _fprintf_p, _fprintf_p_l, _fwprintf_p, _fwprintf_p_l
+ - name: _fprintf_p, _fprintf_p_l, _ftprintf_p, _ftprintf_p_l, _fwprintf_p, _fwprintf_p_l
href: ../c-runtime-library/reference/fprintf-p-fprintf-p-l-fwprintf-p-fwprintf-p-l.md
- - name: fprintf_s, _fprintf_s_l, fwprintf_s, _fwprintf_s_l
+ - name: fprintf_s, _fprintf_s_l, fwprintf_s, _fwprintf_s_l, _ftprintf, _ftprintf_l, _ftprintf_s, _ftprintf_s_l
href: ../c-runtime-library/reference/fprintf-s-fprintf-s-l-fwprintf-s-fwprintf-s-l.md
- name: fputc, fputwc
href: ../c-runtime-library/reference/fputc-fputwc.md
@@ -1446,7 +1457,7 @@ items:
href: ../c-runtime-library/reference/putenv.md
- name: _putenv, _wputenv
href: ../c-runtime-library/reference/putenv-wputenv.md
- - name: _putenv_s, _wputenv_s
+ - name: _putenv_s, _wputenv_s, _tputenv_s
href: ../c-runtime-library/reference/putenv-s-wputenv-s.md
- name: puts, _putws
href: ../c-runtime-library/reference/puts-putws.md
@@ -1726,7 +1737,7 @@ items:
href: ../c-runtime-library/reference/strncoll-wcsncoll-mbsncoll-strncoll-l-wcsncoll-l-mbsncoll-l.md
- name: strncpy, _strncpy_l, wcsncpy, _wcsncpy_l, _mbsncpy, _mbsncpy_l
href: ../c-runtime-library/reference/strncpy-strncpy-l-wcsncpy-wcsncpy-l-mbsncpy-mbsncpy-l.md
- - name: strncpy_s, _strncpy_s_l, wcsncpy_s, _wcsncpy_s_l, _mbsncpy_s, _mbsncpy_s_l
+ - name: strncpy_s, _strncpy_s_l, wcsncpy_s, _wcsncpy_s_l, _mbsncpy_s, _mbsncpy_s_l, _tcsncpy_s, _tcsncpy_s_l, _tcsnccpy_s, _tcsnccpy_s_l
href: ../c-runtime-library/reference/strncpy-s-strncpy-s-l-wcsncpy-s-wcsncpy-s-l-mbsncpy-s-mbsncpy-s-l.md
- name: _strnextc, _wcsnextc, _mbsnextc, _mbsnextc_l
href: ../c-runtime-library/reference/strnextc-wcsnextc-mbsnextc-mbsnextc-l.md
@@ -1744,7 +1755,7 @@ items:
href: ../c-runtime-library/reference/strnset-wcsnset.md
- name: _strnset, _strnset_l, _wcsnset, _wcsnset_l, _mbsnset, _mbsnset_l
href: ../c-runtime-library/reference/strnset-strnset-l-wcsnset-wcsnset-l-mbsnset-mbsnset-l.md
- - name: _strnset_s, _strnset_s_l, _wcsnset_s, _wcsnset_s_l, _mbsnset_s, _mbsnset_s_l
+ - name: _strnset_s, _strnset_s_l, _wcsnset_s, _wcsnset_s_l, _mbsnset_s, _mbsnset_s_l, _tcsnset_s, _tcsncset_s, _tcsncset_s_l
href: ../c-runtime-library/reference/strnset-s-strnset-s-l-wcsnset-s-wcsnset-s-l-mbsnset-s-mbsnset-s-l.md
- name: strpbrk, wcspbrk, _mbspbrk, _mbspbrk_l
href: ../c-runtime-library/reference/strpbrk-wcspbrk-mbspbrk-mbspbrk-l.md
@@ -1918,7 +1929,7 @@ items:
href: ../c-runtime-library/reference/vsprintf-vsprintf-l-vswprintf-vswprintf-l-vswprintf-l.md
- name: _vsprintf_p, _vsprintf_p_l, _vswprintf_p, _vswprintf_p_l
href: ../c-runtime-library/reference/vsprintf-p-vsprintf-p-l-vswprintf-p-vswprintf-p-l.md
- - name: vsprintf_s, _vsprintf_s_l, vswprintf_s, _vswprintf_s_l
+ - name: vsprintf_s, _vsprintf_s_l, vswprintf_s, _vswprintf_s_l, _vstprintf_s, _vstprintf_s_l
href: ../c-runtime-library/reference/vsprintf-s-vsprintf-s-l-vswprintf-s-vswprintf-s-l.md
- name: vsscanf, vswscanf
href: ../c-runtime-library/reference/vsscanf-vswscanf.md
diff --git a/docs/c-runtime-library/translation-mode-constants.md b/docs/c-runtime-library/translation-mode-constants.md
index a9059f68cc..b50e64e560 100644
--- a/docs/c-runtime-library/translation-mode-constants.md
+++ b/docs/c-runtime-library/translation-mode-constants.md
@@ -2,8 +2,8 @@
description: "Learn more about: Translation Mode Constants"
title: "Translation Mode Constants"
ms.date: "11/04/2016"
-f1_keywords: ["_O_BINARY", "_O_TEXT", "_O_RAW"]
-helpviewer_keywords: ["O_BINARY constant", "O_TEXT constant", "O_RAW constant", "_O_TEXT constant", "_O_RAW constant", "translation constants", "_O_BINARY constant", "translation, constants", "translation, modes", "translation modes (file I/O)"]
+f1_keywords: ["FCNTL/_O_BINARY", "FCNTL/_O_TEXT", "FCNTL/_O_WTEXT", "FCNTL/_O_U16TEXT", "FCNTL/_O_U8TEXT", "FCNTL/_O_RAW", "_O_BINARY", "_O_TEXT", "_O_WTEXT", "_O_U16TEXT", "_O_U8TEXT", "_O_RAW"]
+helpviewer_keywords: ["_O_BINARY constant", "_O_TEXT constant", "_O_WTEXT constant", "_O_U16TEXT constant", "_O_U8TEXT constant", "_O_RAW constant", "translation constants", "translation, constants", "translation, modes", "translation modes (file I/O)"]
ms.assetid: a5993bf4-7e7a-47f9-83c3-e46332b85579
---
# Translation mode constants
@@ -16,13 +16,16 @@ ms.assetid: a5993bf4-7e7a-47f9-83c3-e46332b85579
## Remarks
-The `_O_BINARY` and `_O_TEXT` manifest constants determine the translation mode for files (`_open` and `_sopen`) or the translation mode for streams (`_setmode`).
+The `_O_BINARY`, `_O_TEXT`, `_O_WTEXT`, `_O_U16TEXT`, and `_O_U8TEXT` manifest constants determine the translation mode for files (`_open` and `_sopen`) or the translation mode for streams (`_setmode`).
The allowed values are:
| Value | Description |
|---|---|
-| `_O_TEXT` | Opens file in text (translated) mode. Carriage return-line feed (CR-LF) combinations are translated into a single line feed (LF) on input. Line feed characters are translated into CR-LF combinations on output. Also, CTRL+Z is interpreted as an end-of-file character on input. In files opened for reading, and for reading and writing, `fopen` checks for CTRL+Z at the end of the file and removes it, if possible. It's removed because using the `fseek` and `ftell` functions to move within a file ending with CTRL+Z may cause `fseek` to behave improperly near the end of the file. |
+| `_O_TEXT` | Opens file in ANSI text (translated) mode. Carriage return-line feed (CR-LF) combinations are translated into a single line feed (LF) on input. Line feed characters are translated into CR-LF combinations on output. Also, CTRL+Z is interpreted as an end-of-file character on input. In files opened for reading, and for reading and writing, `fopen` checks for CTRL+Z at the end of the file and removes it, if possible. It's removed because using the `fseek` and `ftell` functions to move within a file ending with CTRL+Z may cause `fseek` to behave improperly near the end of the file. |
+| `_O_WTEXT` | Opens file in UTF-16 text (translated) mode. The wide-character versions of the text translations of `_O_TEXT` are supported. |
+| `_O_U16TEXT` | Opens file in UTF-16 no BOM text (translated) mode. The wide-character versions of the text translations of `_O_TEXT` are supported. |
+| `_O_U8TEXT` | Opens file in UTF-8 no BOM text (translated) mode. The text translations of `_O_TEXT` are supported. |
| `_O_BINARY` | Opens file in binary (untranslated) mode. The above translations are suppressed. |
| `_O_RAW` | Same as `_O_BINARY`. Supported for C 2.0 compatibility. |
diff --git a/docs/c-runtime-library/truncate.md b/docs/c-runtime-library/truncate.md
index 72c947882c..cb8dffc0d7 100644
--- a/docs/c-runtime-library/truncate.md
+++ b/docs/c-runtime-library/truncate.md
@@ -2,7 +2,7 @@
description: "Learn more about: _TRUNCATE"
title: "_TRUNCATE"
ms.date: "11/04/2016"
-f1_keywords: ["_TRUNCATE", "TRUNCATE"]
+f1_keywords: ["_TRUNCATE", "CORECRT/_TRUNCATE"]
helpviewer_keywords: ["TRUNCATE constant", "_TRUNCATE constant"]
---
# `_TRUNCATE`
diff --git a/docs/c-runtime-library/unicode-the-wide-character-set.md b/docs/c-runtime-library/unicode-the-wide-character-set.md
index a45fbb30f3..9fbde6648e 100644
--- a/docs/c-runtime-library/unicode-the-wide-character-set.md
+++ b/docs/c-runtime-library/unicode-the-wide-character-set.md
@@ -8,7 +8,7 @@ ms.assetid: b6a05a21-59a5-4d30-8c85-2dbe185f7a74
---
# Unicode: The wide-character set
-A wide character is a 2-byte multilingual character code. Any character in use in modern computing worldwide, including technical symbols and special publishing characters, can be represented according to the Unicode specification as a wide character. Developed and maintained by a large consortium that includes Microsoft, the Unicode standard is now widely accepted.
+A wide character is a 2-byte multilingual character code. Any character in use in modern computing worldwide, including technical symbols and special publishing characters, can be represented according to the Unicode specification as one or more wide characters. Developed and maintained by a large consortium that includes Microsoft, the Unicode standard is now widely accepted.
A wide character is of type **`wchar_t`**. A wide-character string is represented as a **`wchar_t[]`** array. You point to the array with a `wchar_t*` pointer.
diff --git a/docs/c-runtime-library/vprintf-functions.md b/docs/c-runtime-library/vprintf-functions.md
index dc0fa7b150..6119ea7428 100644
--- a/docs/c-runtime-library/vprintf-functions.md
+++ b/docs/c-runtime-library/vprintf-functions.md
@@ -1,13 +1,8 @@
---
-description: "Learn more about: vprintf Functions"
title: "vprintf Functions"
+description: "Learn more about: vprintf Functions"
ms.date: "11/04/2016"
-api_location: ["msvcr110.dll", "msvcr120.dll", "msvcr90.dll", "msvcr100.dll", "msvcr110_clr0400.dll", "msvcr80.dll"]
-api_type: ["DLLExport"]
-topic_type: ["apiref"]
-f1_keywords: ["vprintf"]
-helpviewer_keywords: ["vprintf function", "formatted text [C++]"]
-ms.assetid: 02ac7c51-eab1-4bf0-bf4c-77065e3fa744
+helpviewer_keywords: ["vprintf functions", "formatted text [C++]"]
---
# `vprintf` functions
@@ -21,7 +16,7 @@ Each of the `vprintf` functions takes a pointer to an argument list, then format
[`_vprintf_p`, `_vprintf_p_l`, `_vwprintf_p`, `_vwprintf_p_l`](./reference/vprintf-p-vprintf-p-l-vwprintf-p-vwprintf-p-l.md)\
[`vprintf_s`, `_vprintf_s_l`, `vwprintf_s`, `_vwprintf_s_l`](./reference/vprintf-s-vprintf-s-l-vwprintf-s-vwprintf-s-l.md)\
[`_vscprintf`, `_vscprintf_l`, `_vscwprintf`, `_vscwprintf_l`](./reference/vscprintf-vscprintf-l-vscwprintf-vscwprintf-l.md)\
-[`_vsnprintf`, `_vsnwprintf`](./reference/vsnprintf-vsnprintf-vsnprintf-l-vsnwprintf-vsnwprintf-l.md)
+[`_vsnprintf`, `_vsnwprintf`](./reference/vsnprintf-vsnprintf-vsnprintf-l-vsnwprintf-vsnwprintf-l.md)\
[`vsprintf`, `vswprintf`](./reference/vsprintf-vsprintf-l-vswprintf-vswprintf-l-vswprintf-l.md)\
[`_vsprintf_p`, `_vsprintf_p_l`, `_vswprintf_p`, `_vswprintf_p_l`](./reference/vsprintf-p-vsprintf-p-l-vswprintf-p-vswprintf-p-l.md)\
[`vsprintf_s`, `_vsprintf_s_l`, `vswprintf_s`, `_vswprintf_s_l`](./reference/vsprintf-s-vsprintf-s-l-vswprintf-s-vswprintf-s-l.md)
diff --git a/docs/c-runtime-library/wait-child-wait-grandchild.md b/docs/c-runtime-library/wait-child-wait-grandchild.md
index 4ed46ab60f..26a92d87ec 100644
--- a/docs/c-runtime-library/wait-child-wait-grandchild.md
+++ b/docs/c-runtime-library/wait-child-wait-grandchild.md
@@ -2,7 +2,7 @@
description: "Learn more about: _WAIT_CHILD, _WAIT_GRANDCHILD"
title: "_WAIT_CHILD, _WAIT_GRANDCHILD"
ms.date: "11/04/2016"
-f1_keywords: ["_WAIT_GRANDCHILD", "WAIT_CHILD", "WAIT_GRANDCHILD", "_WAIT_CHILD"]
+f1_keywords: ["PROCESS/_WAIT_CHILD", "PROCESS/_WAIT_GRANDCHILD", "_WAIT_CHILD", "_WAIT_GRANDCHILD"]
helpviewer_keywords: ["WAIT_CHILD constant", "WAIT_GRANDCHILD constant", "_WAIT_CHILD constant", "_WAIT_GRANDCHILD constant"]
ms.assetid: 7acd96fa-d118-4339-bb00-e5afaf286945
---
diff --git a/docs/c-runtime-library/wchar-max.md b/docs/c-runtime-library/wchar-max.md
index b38df5c1f5..2cc4f93793 100644
--- a/docs/c-runtime-library/wchar-max.md
+++ b/docs/c-runtime-library/wchar-max.md
@@ -2,7 +2,7 @@
description: "Learn more about: WCHAR_MAX"
title: "WCHAR_MAX"
ms.date: "11/04/2016"
-f1_keywords: ["WCHAR_MAX"]
+f1_keywords: ["WCHAR/WCHAR_MAX", "WCHAR_MAX"]
helpviewer_keywords: ["WCHAR_MAX constant"]
ms.assetid: 2b5f8bfd-9098-47fc-be8f-598a0c975ed4
---
diff --git a/docs/c-runtime-library/wchar-min.md b/docs/c-runtime-library/wchar-min.md
index b003e74503..5aaeae92ae 100644
--- a/docs/c-runtime-library/wchar-min.md
+++ b/docs/c-runtime-library/wchar-min.md
@@ -2,7 +2,7 @@
description: "Learn more about: WCHAR_MIN"
title: "WCHAR_MIN"
ms.date: "11/04/2016"
-f1_keywords: ["WCHAR_MIN"]
+f1_keywords: ["WCHAR/WCHAR_MIN", "WCHAR_MIN"]
helpviewer_keywords: ["WCHAR_MIN constant"]
ms.assetid: f2d192d7-4412-483f-9839-c29e4f174b83
---
diff --git a/docs/cloud/cloud-and-web-programming-in-visual-cpp.md b/docs/cloud/cloud-and-web-programming-in-visual-cpp.md
index 8ae34ccfbc..f2c9b0519b 100644
--- a/docs/cloud/cloud-and-web-programming-in-visual-cpp.md
+++ b/docs/cloud/cloud-and-web-programming-in-visual-cpp.md
@@ -1,8 +1,7 @@
---
-description: "Learn more about: Cloud and Web Programming in Visual C++"
title: "Cloud and Web Programming in Visual C++"
+description: "Learn more about: Cloud and Web Programming in Visual C++"
ms.date: "05/14/2019"
-ms.assetid: b63611f1-9723-44d0-ba7f-c3ebef341313
ms.topic: "overview"
ms.custom: intro-overview
---
@@ -43,7 +42,7 @@ In C++, you have several options for connecting to the web and the cloud.
- [Windows::Web::Http::HttpClient](/uwp/api/windows.web.http.httpclient)
- A Windows Runtime HTTP client class modeled on the .NET Framework class of the same name in the System.Web namespace. `HttpClient` fully supports asynchronous upload and download over HTTP, and pipeline filters that enable the insertion of custom HTTP handlers into the pipeline. The Windows SDK includes sample filters for metered networks, OAuth authentication, and more. For apps that target only Universal Windows Platform, we recommend that you use the `Windows::Web:HttpClient` class.
+ A Windows Runtime HTTP client class modeled on the .NET Framework class of the same name in the System.Web namespace. `HttpClient` fully supports asynchronous upload and download over HTTP, and pipeline filters that enable the insertion of custom HTTP handlers into the pipeline. The Windows SDK includes sample filters for metered networks, OAuth authentication, and more. For apps that target only Universal Windows Platform, we recommend that you use the `Windows::Web::Http::HttpClient` class.
- [IXMLHTTPRequest2 interface](/windows/win32/api/msxml6/nn-msxml6-ixmlhttprequest2)
@@ -55,6 +54,6 @@ In C++, you have several options for connecting to the web and the cloud.
## See also
-[C++ in Visual Studio](../overview/visual-cpp-in-visual-studio.md)
-[Microsoft Azure C and C++ Developer Center](https://azure.microsoft.com/develop/cpp/)
+[C++ in Visual Studio](../overview/visual-cpp-in-visual-studio.md)\
+[Microsoft Azure C and C++ Developer Center](https://azure.microsoft.com/develop/cpp/)\
[Networks and web services (UWP)](/windows/uwp/networking/)
diff --git a/docs/code-quality/annotating-locking-behavior.md b/docs/code-quality/annotating-locking-behavior.md
index ddf60a045a..a362074bad 100644
--- a/docs/code-quality/annotating-locking-behavior.md
+++ b/docs/code-quality/annotating-locking-behavior.md
@@ -33,9 +33,9 @@ ms.assetid: 07769c25-9b97-4ab7-b175-d1c450308d7a
To avoid concurrency bugs in your multithreaded program, always follow an appropriate locking discipline and use SAL annotations.
-Concurrency bugs are notoriously hard to reproduce, diagnose, and debug because they're non-deterministic. Reasoning about thread interleaving is difficult at best, and becomes impractical when you're designing a body of code that has more than a few threads. Therefore, it's good practice to follow a locking discipline in your multithreaded programs. For example, obeying a lock order while acquiring multiple locks helps avoid deadlocks, and acquiring the proper guarding lock before accessing a shared resource helps prevent race conditions.
+Concurrency bugs are notoriously hard to reproduce, diagnose, and debug because they're nondeterministic. Reasoning about thread interleaving is difficult at best, and becomes impractical when you're designing a body of code that has more than a few threads. Therefore, it's good practice to follow a locking discipline in your multithreaded programs. For example, obeying a lock order while acquiring multiple locks helps avoid deadlocks, and acquiring the proper guarding lock before accessing a shared resource helps prevent race conditions.
-Unfortunately, seemingly simple locking rules can be surprisingly hard to follow in practice. A fundamental limitation in today's programming languages and compilers is that they do not directly support the specification and analysis of concurrency requirements. Programmers have to rely on informal code comments to express their intentions about how they use locks.
+Unfortunately, seemingly simple locking rules can be surprisingly hard to follow in practice. A fundamental limitation in today's programming languages and compilers is that they don't directly support the specification and analysis of concurrency requirements. Programmers have to rely on informal code comments to express their intentions about how they use locks.
Concurrency SAL annotations are designed to help you specify locking side effects, locking responsibility, data guardianship, lock order hierarchy, and other expected locking behavior. By making implicit rules explicit, SAL concurrency annotations provide a consistent way for you to document how your code uses locking rules. Concurrency annotations also enhance the ability of code analysis tools to find race conditions, deadlocks, mismatched synchronization operations, and other subtle concurrency errors.
@@ -64,10 +64,10 @@ The following table lists the locking annotations.
|`_Acquires_nonreentrant_lock_(expr)`|The lock that's named by `expr` is acquired. An error is reported if the lock is already held.|
|`_Acquires_shared_lock_(expr)`|Annotates a function and indicates that in post state the function increments by one the shared lock count of the lock object that's named by `expr`.|
|`_Create_lock_level_(name)`|A statement that declares the symbol `name` to be a lock level so that it may be used in the annotations `_Has_Lock_level_` and `_Lock_level_order_`.|
-|`_Has_lock_kind_(kind)`|Annotates any object to refine the type information of a resource object. Sometimes a common type is used for different kinds of resources and the overloaded type isn't sufficient to distinguish the semantic requirements among various resources. Here's a list of pre-defined `kind` parameters:
`_Lock_kind_mutex_`
Lock kind ID for mutexes.
`_Lock_kind_event_`
Lock kind ID for events.
`_Lock_kind_semaphore_`
Lock kind ID for semaphores.
`_Lock_kind_spin_lock_`
Lock kind ID for spin locks.
`_Lock_kind_critical_section_`
Lock kind ID for critical sections.|
+|`_Has_lock_kind_(kind)`|Annotates any object to refine the type information of a resource object. Sometimes a common type is used for different kinds of resources and the overloaded type isn't sufficient to distinguish the semantic requirements among various resources. Here's a list of predefined `kind` parameters:
`_Lock_kind_mutex_`
Lock kind ID for mutexes.
`_Lock_kind_event_`
Lock kind ID for events.
`_Lock_kind_semaphore_`
Lock kind ID for semaphores.
`_Lock_kind_spin_lock_`
Lock kind ID for spin locks.
`_Lock_kind_critical_section_`
Lock kind ID for critical sections.|
|`_Has_lock_level_(name)`|Annotates a lock object and gives it the lock level of `name`.|
|`_Lock_level_order_(name1, name2)`|A statement that gives the lock ordering between `name1` and `name2`. Locks that have level `name1` must be acquired before locks that have level `name2`.|
-|`_Post_same_lock_(expr1, expr2)`|Annotates a function and indicates that in post state the two locks, `expr1` and `expr2`, are treated as if they're the same lock object.|
+|`_Post_same_lock_(dst, src)`|Annotates a function and indicates that in post state the two locks, `dst` and `src`, are treated as if they're the same lock object, by applying lock properties from `src` to `dst`.|
|`_Releases_exclusive_lock_(expr)`|Annotates a function and indicates that in post state the function decrements by one the exclusive lock count of the lock object that's named by `expr`.|
|`_Releases_lock_(expr)`|Annotates a function and indicates that in post state the function decrements by one the lock count of the lock object that's named by `expr`.|
|`_Releases_nonreentrant_lock_(expr)`|The lock that's named by `expr` is released. An error is reported if the lock isn't currently held.|
@@ -97,17 +97,17 @@ The following table lists the annotations for shared data access.
|----------------|-----------------|
|`_Guarded_by_(expr)`|Annotates a variable and indicates that whenever the variable is accessed, the lock count of the lock object that's named by `expr` is at least one.|
|`_Interlocked_`|Annotates a variable and is equivalent to `_Guarded_by_(_Global_interlock_)`.|
-|`_Interlocked_operand_`|The annotated function parameter is the target operand of one of the various Interlocked functions. Those operands must have specific additional properties.|
+|`_Interlocked_operand_`|The annotated function parameter is the target operand of one of the various Interlocked functions. Those operands must have other specific properties.|
|`_Write_guarded_by_(expr)`|Annotates a variable and indicates that whenever the variable is modified, the lock count of the lock object that's named by `expr` is at least one.|
## Smart Lock and RAII Annotations
-Smart locks typically wrap native locks and manage their lifetime. The following table lists annotations that can be used with smart locks and RAII coding patterns with support for `move` semantics.
+Smart locks typically wrap native locks and manage their lifetime. The following table lists annotations that can be used with smart locks and Resource Acquisition Is Initialization (RAII) coding patterns with support for `move` semantics.
|Annotation|Description|
|----------------|-----------------|
-|`_Analysis_assume_smart_lock_acquired_(lock)`|Tells the analyzer to assume that a smart lock has been acquired. This annotation expects a reference lock type as its parameter.|
-|`_Analysis_assume_smart_lock_released_(lock)`|Tells the analyzer to assume that a smart lock has been released. This annotation expects a reference lock type as its parameter.|
+|`_Analysis_assume_smart_lock_acquired_(lock)`|Tells the analyzer to assume that a smart lock was acquired. This annotation expects a reference lock type as its parameter.|
+|`_Analysis_assume_smart_lock_released_(lock)`|Tells the analyzer to assume that a smart lock was released. This annotation expects a reference lock type as its parameter.|
|`_Moves_lock_(target, source)`|Describes a `move constructor` operation, which transfers lock state from the `source` object to the `target`. The `target` is considered a newly constructed object, so any state it had before is lost and replaced by the `source` state. The `source` is also reset to a clean state with no lock counts or aliasing target, but aliases pointing to it remain unchanged.|
|`_Replaces_lock_(target, source)`|Describes `move assignment operator` semantics where the target lock is released before transferring the state from the source. You can regard it as a combination of `_Moves_lock_(target, source)` preceded by a `_Releases_lock_(target)`.|
|`_Swaps_locks_(left, right)`|Describes the standard `swap` behavior, which assumes that objects `left` and `right` exchange their state. The state exchanged includes lock count and aliasing target, if present. Aliases that point to the `left` and `right` objects remain unchanged.|
diff --git a/docs/code-quality/annotating-structs-and-classes.md b/docs/code-quality/annotating-structs-and-classes.md
index 32669912be..1c19f33cdd 100644
--- a/docs/code-quality/annotating-structs-and-classes.md
+++ b/docs/code-quality/annotating-structs-and-classes.md
@@ -1,6 +1,6 @@
---
-description: "Learn more about: Annotating Structs and Classes"
title: Annotating Structs and Classes
+description: "Learn more about: Annotating Structs and Classes"
ms.date: 06/28/2019
ms.topic: "conceptual"
f1_keywords:
@@ -19,7 +19,6 @@ f1_keywords:
- "_Field_size_full_"
- "_Field_size_full_opt_"
- "_Field_z_"
-ms.assetid: b8278a4a-c86e-4845-aa2a-70da21a1dd52
---
# Annotating Structs and Classes
@@ -52,13 +51,11 @@ You can annotate struct and class members by using annotations that act like inv
Applies to struct or class declaration. Indicates that a valid object of that type may be larger than the declared type, with the number of bytes being specified by `size`. For example:
```cpp
-
typedef _Struct_size_bytes_(nSize)
struct MyStruct {
size_t nSize;
...
};
-
```
The buffer size in bytes of a parameter `pM` of type `MyStruct *` is then taken to be:
diff --git a/docs/code-quality/best-practices-and-examples-sal.md b/docs/code-quality/best-practices-and-examples-sal.md
index ad53857311..320b8100d3 100644
--- a/docs/code-quality/best-practices-and-examples-sal.md
+++ b/docs/code-quality/best-practices-and-examples-sal.md
@@ -1,7 +1,7 @@
---
description: "Learn more about: Best practices and examples (SAL)"
title: Best practices and examples (SAL)
-ms.date: 01/27/2022
+ms.date: 03/30/2023
ms.topic: "conceptual"
---
# Best practices and examples (SAL)
@@ -10,7 +10,7 @@ Here are some ways to get the most out of the Source Code Annotation Language (S
## `_In_`
-If the function is supposed to write to the element, use `_Inout_` instead of `_In_`. This is particularly relevant in cases of automated conversion from older macros to SAL. Prior to SAL, many programmers used macros as comments—macros that were named `IN`, `OUT`, `IN_OUT`, or variants of these names. Although we recommend that you convert these macros to SAL, we also urge you to be careful when you convert them because the code might have changed since the original prototype was written and the old macro might no longer reflect what the code does. Be especially careful about the `OPTIONAL` comment macro because it's frequently placed incorrectly—for example, on the wrong side of a comma.
+If the function is supposed to write to the element, use `_Inout_` instead of `_In_`. This is relevant in cases of automated conversion from older macros to SAL. Prior to SAL, many programmers used macros as comments—macros that were named `IN`, `OUT`, `IN_OUT`, or variants of these names. Although we recommend that you convert these macros to SAL, we also urge you to be careful when you convert them because the code might have changed since the original prototype was written and the old macro might no longer reflect what the code does. Be especially careful about the `OPTIONAL` comment macro because it's frequently placed incorrectly—for example, on the wrong side of a comma.
```cpp
#include
@@ -25,7 +25,10 @@ void Func1(_In_ int *p1)
}
// Correct
-void Func2(_Inout_ PCHAR p1)
+// _Out_opt_ because the function tolerates NULL as a valid argument, i.e.
+// no error is returned. If the function didn't check p1 for NULL, then
+// _Out_ would be the better choice
+void Func2(_Out_opt_ PCHAR p1)
{
if (p1 == NULL)
return;
@@ -36,7 +39,7 @@ void Func2(_Inout_ PCHAR p1)
## `_opt_`
-If the caller isn't allowed to pass in a null pointer, use `_In_` or `_Out_` instead of `_In_opt_` or `_Out_opt_`. This applies even to a function that checks its parameters and returns an error if it is `NULL` when it shouldn't be. Although having a function check its parameter for unexpected `NULL` and return gracefully is a good defensive coding practice, it doesn't mean that the parameter annotation can be of an optional type (`_*Xxx*_opt_`).
+If the caller isn't allowed to pass in a null pointer, use `_In_` or `_Out_` instead of `_In_opt_` or `_Out_opt_`. This applies even to a function that checks its parameters and returns an error if it's `NULL` when it shouldn't be. Although having a function check its parameter for unexpected `NULL` and return gracefully is a good defensive coding practice, it doesn't mean that the parameter annotation can be of an optional type (`_*Xxx*_opt_`).
```cpp
#include
@@ -56,7 +59,7 @@ void Func2(_Out_ int *p1)
## `_Pre_defensive_` and `_Post_defensive_`
-If a function appears at a trust boundary, we recommend that you use the `_Pre_defensive_` annotation. The "defensive" modifier modifies certain annotations to indicate that, at the point of call, the interface should be checked strictly, but in the implementation body it should assume that incorrect parameters might be passed. In that case, `_In_ _Pre_defensive_` is preferred at a trust boundary to indicate that although a caller will get an error if it attempts to pass `NULL`, the function body will be analyzed as if the parameter might be `NULL`, and any attempts to de-reference the pointer without first checking it for `NULL` will be flagged. A `_Post_defensive_` annotation is also available, for use in callbacks where the trusted party is assumed to be the caller and the untrusted code is the called code.
+If a function appears at a trust boundary, we recommend that you use the `_Pre_defensive_` annotation. The "defensive" modifier modifies certain annotations to indicate that, at the point of call, the interface should be checked strictly, but in the implementation body it should assume that incorrect parameters might be passed. In that case, `_In_ _Pre_defensive_` is preferred at a trust boundary to indicate that although a caller gets an error if it attempts to pass `NULL`, the function body is analyzed as if the parameter might be `NULL`, and any attempts to dereference the pointer without first checking it for `NULL` are flagged. A `_Post_defensive_` annotation is also available, for use in callbacks where the trusted party is assumed to be the caller and the untrusted code is the called code.
## `_Out_writes_`
@@ -71,7 +74,7 @@ void Func1(_Out_writes_(size) CHAR *pb,
);
```
-The annotation `_Out_writes_` signifies that you have a buffer. It has `cb` bytes allocated, with the first byte initialized on exit. This annotation isn't strictly wrong and it's helpful to express the allocated size. However, it doesn't tell how many elements are initialized by the function.
+The annotation `_Out_writes_` signifies that you have a buffer. It has `cb` bytes allocated, with the first byte initialized on exit. This annotation isn't strictly wrong and it's helpful to express the allocated size. However, it doesn't tell how many elements the function initializes.
The next example shows three correct ways to fully specify the exact size of the initialized portion of the buffer.
@@ -204,7 +207,7 @@ BOOL WINAPI TryEnterCriticalSection(
## Reference variable
-For a reference variable, the previous version of SAL used the implied pointer as the annotation target and required the addition of a `__deref` to annotations that attached to a reference variable. This version uses the object itself and doesn't require the additional `_Deref_`.
+For a reference variable, the previous version of SAL used the implied pointer as the annotation target and required the addition of a `__deref` to annotations that attached to a reference variable. This version uses the object itself and doesn't require `_Deref_`.
```cpp
#include
diff --git a/docs/code-quality/build-reliable-secure-programs.md b/docs/code-quality/build-reliable-secure-programs.md
new file mode 100644
index 0000000000..83f1605db1
--- /dev/null
+++ b/docs/code-quality/build-reliable-secure-programs.md
@@ -0,0 +1,456 @@
+---
+title: Build reliable and secure C++ programs
+description: "Learn more about: Building reliable and secure C++ programs by applying NISTIR 8397 guidelines."
+ms.date: 04/25/2025
+ms.topic: "conceptual"
+---
+
+# Build reliable and secure C++ programs
+
+The United States government publication [NISTIR 8397: Guidelines on Minimum Standards for Developer Verification of Software](https://nvlpubs.nist.gov/nistpubs/ir/2021/NIST.IR.8397.pdf) contains excellent guidance on how to build reliable and secure software in any programming language.
+
+This document follows the same structure as NISTIR 8397. Each section:
+- summarizes how to use Microsoft developer products for C++ and other languages to meet that section's security needs, and
+- provides guidance to get the most value in each area.
+
+## 2.1 Threat modeling
+
+**Summary**
+
+Threat modeling is a valuable process, especially when applied in a way that scales to meet your development needs and that reduces noise.
+
+**Recommendations**
+
+Threat modeling should be one part of your dynamic Security Development Lifecycle (SDL). We suggest that for your product as a whole, for a specific feature, or for a major design or implementation change:
+
+- Have a solid, dynamic SDL that allows for early engagement with developer teams and rightsizing of approach.
+- Apply threat modeling in a targeted way. Apply threat modeling to all features, but tactically start with exposed, complex or critical features. Do apply it regularly instead as part of a top-down product review.
+- Apply threat modeling early (as with all security requirements), when there's still opportunity to change the design. Also, threat models serve as an input to other processes, such as attack surface reduction or designing for security. Threat models that are created later are at best "surveys" for pen test (penetration testing) or areas that need security testing such as fuzzing. After you create a baseline threat model, plan to continue iterating on it as the attack surface changes.
+- Use asset inventory and compliance to appropriately track what makes up a product, and track security artifacts (including threat models) along with the assets they apply to. This approach enables better automated risk assessment and focusing of security efforts on the specific components or features that change.
+- **In Azure**, the Microsoft Threat Modeling Tool was updated in 2022 for Azure development. For more information, see [Microsoft Threat Modeling Tool overview - Azure](/azure/security/develop/threat-modeling-tool)
+
+**Supporting factors and practices**
+
+To properly apply threat modeling and avoid underuse/overuse, we have found that the following core concepts need to be addressed first.
+
+*Development approach*
+
+First, understand the team's development approach. For teams with agile development workflows that push dozens of changes to production daily, it's not practical or reasonable to require a threat model update for every functional change. Instead, from the start when writing a feature's functional requirements, consider including a security requirements questionnaire. The questionnaire should focus on specific questions about the feature to determine what future aspects of your SDL apply. For example:
+- Does the feature make a major change in design of how we provide customer isolation in a multitenant environment? If so, consider performing a full threat model.
+- Does a new feature allow file uploads? If so, perhaps what's more appropriate is a web application security assessment.
+- Is this change primarily just a functional UI change? If so, perhaps nothing is needed beyond your traditional automated tooling.
+
+The security questionnaire results inform which SDL techniques to tie to which unit of development. It also informs development partners of the feature's SDL timelines, so they can collaborate at the right times.
+
+*Product inventory*
+
+Second, maintain a strong asset inventory of the products you're tasked with assessing. Products are growing in complexity. It's common to write software for connected devices that have:
+- sensors (such as passenger rail and vehicles),
+- bus-based networks that talk to other components in the vehicle (such as CANBUS or PROFIBUS),
+- wireless/cellular/Bluetooth for communication with customer devices and cloud back ends,
+- machine learning in the cloud feeding back into the device or a fleet management application,
+- and more.
+
+In such complex products, threat modeling is critical. Having a strong asset inventory lets you view the entire product stack to see the complete picture, and to see the key places that need to be evaluated for how a new or changed feature impacts product security.
+
+*Granularity and integration*
+
+Establish systems to measure compliance using clear metrics.
+- Regularly measure compliance for feature level development. Feature compliance generally should be measured with higher frequency and smaller granularity, sometimes even on the developer's system or at code commit/merge time.
+- Periodically evaluate security for the broader product in which a feature or component is being consumed. Broader evaluations typically are done with lower frequency and broader granularity, such as at module or system testing time.
+
+*Scale*
+
+Keep a proper asset inventory system that captures and preserves security artifacts and the output of threat model reviews. Having a clear inventory lets you evaluate review outputs for patterns, and make intelligent decisions on how to refine the product security program regularly.
+
+Try to combine requirements-phase security questionnaires, threat modeling results, security assessment results, and results from automated tools. Combining them enables you to automate a viewpoint of relative risk of a given product, ideally as a "dashboard," to inform your security teams what to focus on to get the best value out of the threat modeling.
+
+## 2.2 Automated testing
+
+**Summary**
+
+Automated tests are an important way to ensure the quality and safety of your code. They're an integral piece in supporting other areas mentioned in this document, such as Threat Modeling. When paired with other secure coding practices, they help to protect against bugs and vulnerabilities being introduced into the codebase.
+
+**Key attributes**
+
+Tests should be reliable, consistent, and isolated. These tests should cover as much of the code as possible. All new features and bug fixes should have corresponding tests to ensure the long-term security and reliability of the code when possible. Run automated tests regularly and in as many environments as possible, to ensure they get run and that they cover all areas:
+
+- The first place they should run is on the machine that is making the changes. Running tests is most easily done within the IDE that is being used for editing, or as a script on the command line as the developer makes the changes.
+- The next place they should run is as part of the pull request commit/merge process.
+- The last place to run tests is as part of a Continuous Integration and Continuous Deployment (CI/CD) pipeline, or on your release candidate builds.
+
+The scope of the tests should increase at each step, with the last step providing full coverage for anything the other steps might miss.
+
+**Continuous use and maintenance**
+
+Test reliability is an important part of maintaining the effectiveness of the testing suite. Test failures should be assigned and investigated, with potential security issues getting high priority and getting updated within a prompt and predetermined timeframe. Ignoring test failures shouldn't be a common practice, but should require strong justification and approval. Test failures due to issues within the test suite itself should be treated the same as other failures, to prevent a lapse in coverage in which product issues could be missed.
+
+**Kinds of tests, especially unit tests**
+
+There are several types of automated tests, and while not all are applicable to all applications, a good test suite contains a selection of several different types. Code Based Test Cases such as unit tests are the most common and most integral, being applicable to all applications and intentionally covering as many code paths as possible for correctness. These tests should be small, quick, and not affect the state of the machine, so that the full suite of tests can be run quickly and often. If possible, run tests on many machines that have different hardware setups to catch problems that aren't reproducible on a single type of machine.
+
+**Visual Studio**
+
+Visual Studio Test Explorer natively supports many of the most popular C++ testing frameworks, and has options to install extensions for more frameworks. This flexibility is helpful for running a subset of tests covering the code you're working on, and makes it easy to debug test failures as they arise. Visual Studio also makes it easy to set up new test suites for existing projects, and provides helpful tools such as CodeLens to make it easier to manage these tests. For more information about writing, running, and managing C/C++ tests with Visual Studio, see [Write unit tests for C/C++ - Visual Studio (Windows)](/visualstudio/test/writing-unit-tests-for-c-cpp).
+
+**In Azure and GitHub CI/CD**
+
+Tests that do deeper verification and take longer to run, such as static analysis, component detection, and so on, are good candidates for pull request testing or continuous integration testing. Azure DevOps and GitHub [Actions](https://docs.github.com/en/actions) make it easy to run validations automatically and block code checkins if a validation fails. Automated enforcement helps ensure that all code being checked in is secure based on these more rigorous checks being run. Azure Pipelines and Azure DevOps Build Validation are described here:
+
+- [Git branch policies and settings - Azure Repos](/azure/devops/repos/git/branch-policies#build-validation)
+- [Defining the mergeability of pull requests | GitHub Docs](https://docs.github.com/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests)
+
+## 2.3 Code-based, or static, analysis
+
+**Summary** Static code/binary analysis should be enabled by default, to be secure by default. Static analysis analyzes a program for required safety and security policies at the time it's being built, not at execution time when an exploit can occur on the customer's machine. Static analysis can analyze the program in source code form or in compiled executable form.
+
+**Recommendations** Microsoft recommends that you:
+
+- Enable static analysis for all C++ programs, for both the input source code (before compilation) and the executable binaries (after compilation). "Enable" might mean to run analysis during each build on the developer's machine, or as a separate build to inspect the code later or as a checkin requirement.
+- Incorporate static analysis into CI pipelines as a form of testing.
+- Static analysis by definition comes with false positives, and be prepared to incorporate that fact into your quality feedback loop. Be quick to enable all low-false-positive warnings up front. Then be proactive to gradually increase the number of rules for which your code base compiles warning-clean as you regularly add more rules that flag important bugs at the expense of gradually higher false positives (initially, before the code base has been cleaned for those rules too).
+- Always use the latest supported versions of Visual Studio, and set up your engineering environment to quickly consume the latest patch releases as soon as they become available, without delaying to the next development stage/cycle.
+
+**Key tools** Be aware of and use the following:
+
+- [Code analysis documentation - C++ and .NET](/visualstudio/code-quality/)
+- [`/analyze` - Visual C++ compiler](../build/reference/analyze-code-analysis.md)
+- [`/W4` and `/WX` - Visual C++ compiler](../build/reference/compiler-option-warning-level.md)
+- [Use the C++ Core Guidelines Checkers](using-the-cpp-core-guidelines-checkers.md)
+- [CodeQL | GitHub](https://codeql.github.com/)
+- [Binskim user guide | GitHub](https://github.com/microsoft/binskim/blob/main/docs/UserGuide.md)
+- See also (Windows only): [SAL annotations](../c-runtime-library/sal-annotations.md)
+
+Notes:
+
+- `/analyze` enables static analysis of C++ code at compile time to identify critical security and reliability code vulnerabilities. It should be enabled throughout a C++ program's entire development timeline. Start by enabling at least the "Microsoft Native Recommended" by default as a minimum baseline. Then consult the documentation for how to specify more rules, especially the C++ Core Guidelines rules, as required by your engineering policies. The source code Static Analysis capability is available in both the Visual C++ IDE and in the command-line Build Tools.
+- `/W4` and `/WX` should be enabled wherever possible, to ensure you compile your code cleanly at high warning levels (`W4`) and treat warnings as errors that must be fixed (`WX`). These options enable finding uninitialized data errors that other static analysis tools can't check, because the errors only become visible after the compiler back-end performs interprocedural analysis and inlining.
+- BinSkim binary analysis ensures that projects enable a broad range of security features. BinSkim generates PDBs and other outputs that make it easier to verify chain-of-custody and to respond efficiently to security issues. Microsoft recommends running the BinSkim tool to analyze all executable binaries (`.sys`, `.dll` or `.exe`) produced for or consumed by your programs. The BinSkim User Guide includes a list of supported security standards. Microsoft recommends that you fix all issues reported as "errors" by the BinSkim tool. Issues reported as "warnings" should be evaluated selectively, because resolving them can have performance implications or might not be necessary.
+
+**In Azure and GitHub CI/CD** Microsoft recommends always enabling source code and binary static analysis in release CI/CD scenarios. Run source analysis immediately on the local developer's machine, or at least for every commit or pull request, to catch source bugs as early as possible and minimize overall costs. Binary level bugs tend to be introduced more slowly, so it might be sufficient to run binary analysis in less frequent prerelease CI/CD scenarios (such as nightly or weekly builds).
+
+## 2.4 Review for hardcoded secrets
+
+**Summary**
+
+Don't hardcode secrets within software. You can find and remove secrets from the source code efficiently by using reliable tools that can scan your entire source code base. Once you find secrets, move them to a safe place following the guideline for secure storage and use of secrets.
+
+**Problem**
+
+"Secrets" means entities that establish identity and provide access to resources, or that are used to sign or encrypt sensitive data. Examples include passwords, storage keys, connection strings, and private keys. It's tempting to keep secrets in the software product so they can be readily obtained when needed by the software. However, these hardcoded secrets can lead to severe or catastrophic security incidents as they're easily discovered and can be used to compromise your service and data.
+
+**Prevention**
+
+Secrets hardcoded in source code (as plain text or encrypted blob) are a security vulnerability. Here are general guidelines on how to avoid secrets in the source code:
+
+- Use a precheckin tool to scan and catch potential hardcoded secrets in code prior submitting to source control.
+- Don't put clear text credentials in source code or configuration files.
+- Don't store clear text credentials in SharePoint, OneNote, file shares, and so on. Or share them via email, IM, and so on.
+- Don't encrypt a secret with an easily discoverable decryption key. For example, don't store a PFX file along with a file that contains its password.
+- Don't encrypt a secret with a weak decryption. For example, don't encrypt a PFX file with a weak or common password.
+- Avoid putting encrypted credentials in source code. Instead, use placeholders in your source, and let your deployment system replace them with secrets from approved stores.
+- Apply the same principles to secrets in environments such as testing, staging, and so on, as you do in production deployments. Adversaries often target nonproduction systems as they're less well managed, then use them to pivot into production.
+- Don't share secrets between deployments (for example, testing, staging, production).
+
+While not directly related to hardcoded secrets, also remember securing secrets for your test, development, and production:
+
+- Rotate your secrets periodically and whenever they might have been exposed. Having a demonstrated ability to rotate/redeploy secrets is evidence of a secure system. More notably, the absence of this capability is even stronger evidence of an inevitable vulnerability.
+- Don't give in to the common developer rationale that "my test credentials don't create risk." In practice, they nearly always do.
+- Consider moving away from secrets (for example, passwords, bearer keys) entirely in preference of RBAC/identity-driven solutions as a good engineering solution that can sidestep secret mismanagement entirely.
+
+**Detection**
+
+Legacy components of your product might contain hidden hardcoded secrets in their source code. Sometimes secrets from developers' desktop machines can creep into remote branch and merge into the release branch, leaking secrets unintentionally. To discover secrets that might be hiding in your source code, you can use tools that can scan your code for hardcoded secrets:
+
+- [Microsoft sarif-pattern-matcher tool](https://github.com/microsoft/sarif-pattern-matcher)
+
+**Remediation**
+
+When credentials are found in your source code, the immediate urgent need is to invalidate the exposed key and perform a risk analysis based on exposure. Even if your system needs to stay running, you can enable a secret manager for remediation using these steps:
+
+1. If remediation allows switching over to managed identities, or requires dropping in a secret manager such as Azure Key Vault (AKV), do that first. Then redeploy with the updated identity or key.
+1. Invalidate the exposed secret.
+1. Perform auditing/risk assessment of potential damage due to compromise.
+
+To safeguard cryptographic keys and other secrets used by cloud apps and services, use [Azure Key Vault](https://azure.microsoft.com/products/key-vault) with an appropriate access policy.
+
+If an exposure compromises certain customer data/PII, it might require other compliance/reporting requirements.
+
+Remove the now-invalidated secrets from your source code, and replace them with alternative methods that don't expose the secrets directly in your source code. Look for opportunities to eliminate secrets where possible by using tools like Azure AD. You can update your authentication methods to take advantage of managed identities via Azure Active Directory). Only use approved stores to store and manage secrets such as Azure Key Vault (AKV). For more information, see:
+
+- [Azure AD: Implementing autorotation using Azure Active Directory](https://eng.ms/docs/products/onecert-certificates-key-vault-and-dsms/key-vault-dsms/autorotationandecr/scenarios/aad)
+
+**Azure DevOps (AzDO)**
+
+AzDO users can scan their code through GitHub Advanced Security for Azure DevOps (GHAzDO). GHAzDO also allows users to prevent secret exposures by enabling Push Protection on their repositories, catching potential exposures before they're ever leaked. For more information on how to detect hardcoded secrets in code in Azure DevOps, see *Secret Scanning for GitHub Advanced Security for Azure DevOps* in each of the following links:
+
+- [GitHub advanced security for Azure DevOps](https://azure.microsoft.com/products/devops/github-advanced-security)
+- [Secret Scanning for GitHub Advanced Security for Azure DevOps](/azure/devops/repos/security/github-advanced-security-secret-scanning)
+- [Microsoft Defender for DevOps Preview](https://www.microsoft.com/security/business/cloud-security/microsoft-defender-devops)
+
+**In GitHub**
+
+Secret scanning is available on GitHub.com in two forms:
+
+- *Secret scanning alerts for partners.* Runs automatically on all public repositories. Any strings that match patterns that were provided by secret scanning partners are reported directly to the relevant partner.
+- *Secret scanning alerts for users.* You can enable and configure extra scanning for repositories owned by organizations that use GitHub Enterprise Cloud and have a license for GitHub Advanced Security. These tools also support private and internal repositories.
+
+GitHub provides known patterns of secrets for partners and users that can be configured to meet your needs. For more information, please see:
+
+- [Secret scanning patterns](https://docs.github.com/en/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-user-alerts)
+- [About secret scanning in GitHub](https://docs.github.com/en/enterprise-cloud@latest/code-security/secret-scanning/about-secret-scanning)
+
+> [!NOTE]
+> GitHub Advanced Security for Azure DevOps brings the same secret scanning, dependency scanning and CodeQL code scanning solutions already available for GitHub users and natively integrates them into Azure DevOps to protect your Azure Repos and Pipelines.
+
+**Additional resources**
+
+- [Credential Scanning | Microsoft Code With Engineering Playbook](https://microsoft.github.io/code-with-engineering-playbook/CI-CD/dev-sec-ops/secrets-management/credential_scanning/).
+- [detect-secrets: Credential scanning tool | GitHub](https://microsoft.github.io/code-with-engineering-playbook/CI-CD/dev-sec-ops/secrets-management/recipes/detect-secrets/) - an aptly named module for detecting secrets within a code base.
+- [Running detect-secrets in Azure Pipelines](https://microsoft.github.io/code-with-engineering-playbook/CI-CD/dev-sec-ops/secrets-management/recipes/detect-secrets-ado/).
+- [Git-secrets | GitHub awslabs](https://github.com/awslabs/git-secrets) - prevents you from committing passwords and other sensitive information to a git repository.
+- [Secrets Management | Microsoft Code with Engineering Playbook](https://microsoft.github.io/code-with-engineering-playbook/CI-CD/dev-sec-ops/secrets-management/) - provides general guidelines on how secrets should be managed.
+
+## 2.5 Run with language- and OS-provided checks and protection
+
+**Summary**
+
+Binary hardening is done by applying compile-time security controls. These include mitigations that:
+- prevent exploitable vulnerabilities in code,
+- enable runtime detections that trigger security defenses on exploitation, and
+- enable data production and archiving to help limit the damage caused by security incidents.
+
+Binary consumers must opt into Windows security features to gain the full benefit of hardening.
+
+Microsoft provides a set of facilities specific to C++ projects to help developers write and ship safer and more secure code. C++ developers should also adhere to security standards common to languages that generate executable code. Microsoft maintains BinSkim, a public OSS binary checker that helps enforce use of many protections described in this section. For more information about BinSkim, see [Binskim user guide | GitHub](https://github.com/microsoft/binskim/blob/main/docs/UserGuide.md)
+
+Binary-level controls differ according to where they're applied in the engineering process. You should distinguish among compiler and linker options that: are strictly compile time, alter code generation with run-time overhead, and alter code generation to achieve compatibility with OS protections.
+
+Developer settings should prefer to enable as much static analysis as possible, enable production of private data to accelerate debugging, and so on. Release builds should be tuned to an appropriate combination of security, performance, and other code generation concerns. Release processes must be configured to properly generate and manage public vs. privately consumed build data (for example, public vs. private symbols).
+
+**Stay current: Always use up-to-date compilers and tools**
+
+Compile all code with current toolsets to benefit from up-to-date language support, static analysis, code generation and security controls. Because compilers impact every generated component, the potential for regression on tool update is relatively high. Using outdated compilers creates a particular risk for corrective action while responding to a security incident, because teams might not have enough time to upgrade compilers. Microsoft recommends that teams develop the facility to regularly refresh and test compiler updates.
+
+**Use secure development methods, language versions, frameworks/APIs**
+
+Code should utilize development methodologies, language versions, framework, APIs, and so on, that minimize risk by fostering safety and simplicity in C++, including:
+
+- See [C++ Core Guidelines' Guideline Support Library (GSL)](https://github.com/isocpp/CppCoreGuidelines) for guidance to write modern, safe, and consistent C++ code that follows best practices and avoids common pitfalls.
+- See [Microsoft GSL implementation](https://github.com/microsoft/GSL) for functions and types that the C++ Core Guidelines suggest you use.
+- Resource-safe C++ containers, C runtime library (CRT) memory overflow protections: Prefer [`std::vector`](../standard-library/vector-class.md) and [`std::string`](../standard-library/string.md), which are resource-safe. If you must use C data, use the [secure versions of CRT functions](../c-runtime-library/security-features-in-the-crt.md), which are designed to help prevent memory corruption due to buffer misuse and undefined language behaviors.
+- The [SafeInt library](../safeint/safeint-library.md) protects against integer overflow in mathematical and comparison operations.
+
+**Consume secure dependencies**
+
+Binaries shouldn't link to insecure libraries and dependencies. Development teams should track all external dependencies and resolve CVEs/identified security vulnerabilities in these components by updating to more secure versions when subject to those vulnerabilities.
+
+**Maximize code provenance guarantees and efficiency of security response**
+
+Compilation should enable strong code provenance guarantees to help detect and prevent introduction of backdoors and other malicious code. The resulting data, also critical to debugging and investigation, should be archived for all software releases to drive efficient security response if they're compromised. The following compiler switches generate information that is critical to a security response:
+
+- [`/ZH:SHA_SHA256` in Visual C++](../build/reference/zh.md) - Ensures that a cryptographically secure algorithm is used to generate all PDB source file hashes.
+- [`/Zi`, `/ZI` (Debug Information Format) in Visual C++](../build/reference/z7-zi-zi-debug-information-format.md) - In addition to publishing stripped symbols for collecting crash data and other public use scenarios, ensure that builds produce and archive private PDBs for all released binaries. Binary analysis tools require full symbols to verify whether many security mitigations were enabled at compile-time. Private symbols are critical in security response, and lower debugging and investigation costs when engineers are racing to assess and limit damage when an exploit happens.
+- [`/SOURCELINK` in Visual C++ Linker - Include Sourcelink file in PDB](../build/reference/sourcelink.md): Source link is a language- and source-control agnostic system providing source debugging for binaries. Source debugging greatly increases the efficiency the range of prerelease security validations and post-release incident response.
+
+**Enable compiler errors to prevent issues at code authoring time**
+
+Compilation should enable security-relevant compiler checks as breaking errors, for example:
+- [`/sdl` in Visual C++ - Enable additional security checks](https://aka.ms/AdditionalSecurityChecks) elevates many security-relevant warnings into errors and enables advanced secure code-generation features.
+- [BinSkim BA2007.EnableCriticalCompilerWarnings | GitHub](https://github.com/microsoft/binskim/blob/main/src/BinSkim.Rules/PERules/BA2007.EnableCriticalCompilerWarnings.cs) maintains a list of Microsoft-recommended C/C++ compiler warnings that should always be enabled and elevated to errors.
+
+**Mark binaries as compatible with OS runtime security mitigations**
+
+Compiler and linker settings should opt into code generation features that detect and mitigate malicious code execution, including:
+- Stack corruption prevention
+ - [`/SAFESEH` - Image has safe exception handlers](https://aka.ms/SafeExceptionHandlers) - Produces a table of the image's safe exception handlers for x86 binaries.
+ - [`/GS` - Buffer Security Check](https://aka.ms/BufferSecurityCheck) - Detects some buffer overruns that overwrite return addresses, exception handler addresses or certain types of parameters.
+- Position independent code execution
+ - [`/DYNAMICBASE` - Use Address Space Layout Randomization](https://aka.ms/ASLR) - Generates executable images that can be randomly rebased at load time.
+ - [`/HIGHENTROPVA` and `/LARGEADDRESSAWARE` - Support 64-bit ASLR, and Handle large addresses](https://aka.ms/HEVA) - Enables use of entire 64-bit address space for image rebasing.
+- Code flow integrity
+ - [`/guard:cf` - Enable Control Flow Guard](https://aka.ms/ControlFlowGuard) - Inserts runtime verifications for indirect call targets.
+ - [`/CETCOMPAT` - CET shadow stack compatible](https://aka.ms/CETShadowStack) - Marks an executable image as compatible with Microsoft's implementation of Intel's [Control-flow Enforcement Technology (CET)](https://www.intel.com/content/www/us/en/developer/articles/technical/technical-look-control-flow-enforcement-technology.html) Shadow Stack feature.
+ - [`/guard:ehcont` - Enable EH continuation metadata](../build/reference/guard-enable-eh-continuation-metadata.md) - Generates a list of safe relative virtual addresses (RVA) of all exception handling continuation targets.
+- Data execution prevention
+ - [`/NXCOMPAT` - Compatible with Data Execution Prevention](https://aka.ms/DataExecutionPrevention) - Marks a 32-bit executable image as compatible with the [Windows Data Execution Prevention (DEP)](https://support.microsoft.com/topic/what-is-data-execution-prevention-dep-60dabc2b-90db-45fc-9b18-512419135817) feature. 64-bit builds are compatible with DEP by default.)
+
+**Prevent sensitive information disclosure**
+
+Compiler settings should opt into sensitive information discovery prevention. In recent years, researchers have uncovered unintended information leakage that originates with hardware features such as speculative execution.
+
+At the software level, confidential data might be transmitted to attackers if unexpectedly leaked. Failure to zero-initialize buffers and other buffer misuse might leak private confidential data to attackers that call trusted API. This class of problem best handled by enabling extra static analysis and using secure resource containers as described previously.
+
+- [`/Qspectre` - Mitigate speculative execution side-channel attacks](https://aka.ms/SpectreMitigations) - Inserts barrier instructions that help prevent the disclosure of sensitive data produced by speculative execution. These mitigations should be enabled for code that stores sensitive data in memory and operates across a trust boundary. Microsoft always recommends measuring performance impact against appropriate benchmarks when enabling Spectre-mitigations due to the possibility of introducing runtime checks in performance-critical blocks or loops. These code paths can disable mitigations via the [`spectre(nomitigation)`](../cpp/spectre.md) `declspec` modifier. Projects that enable `/Qspectre` should also link to libraries that are also compiled with these mitigations, including the Microsoft runtime libraries.
+
+## 2.6 Black box test cases
+
+**Summary**
+
+Black box tests don't rely on knowing the tested component's inner workings. Black box tests are designed to test the end-to-end functionality of the features in the product at any layer or level. Black box tests can be functional tests, UI tests, performance tests, and integration tests. Black box tests are valuable for measuring general reliability and functional correctness, and ensuring that the product behaves as expected.
+
+**Relation to other sections**
+
+These types of requirement-based tests are useful for validating the assumptions made in the Threat Model and covering potential threats as brought up in that section. These tests are useful for testing the integration between separate components of the product, especially ones that are across trust boundaries as described in the threat model. Black box test cases are also useful for testing all kinds of edge cases for user input validation. Testing known edge cases and error cases are both useful. Fuzzing is also useful to test less obvious cases.
+
+**Automation and regression**
+
+Run these tests regularly, and compare the results to previous runs to catch breaking changes or performance regressions. Also, running these tests on many different machines and installation setups can help cover any issues that might arise from different architectures or setup changes.
+
+**Crash dumps**
+
+These tests help find issues with reliability, being able to test many different scenarios that might run into crashes, hangs, deadlocks, and so on. By collecting crash dumps as part of test failures, you can import the dumps directly into Visual Studio to further investigate what parts of the code are hitting these issues. If you run functional tests from within Visual Studio, you can easily replicate and debug failures by seeing exactly where inside the black box the test fails, and you can test fixes quickly.
+
+To get started with debugging tests, see [Debug unit tests with Test Explorer - Visual Studio (Windows)](/visualstudio/test/debug-unit-tests-with-test-explorer)
+
+**In Azure**
+
+Azure DevOps can also help manage and validate these tests with the use of Test Plans. These tests can be used to ensure approval with manual validation, and to run automated tests associated with product requirements. More information on Azure Test Plans and using them to run automated testing can be found here:
+- [What is Azure Test Plans? Manual, exploratory, and automated test tools. - Azure Test Plans](/azure/devops/test/overview)
+- [Run automated tests from test plans - Azure Test Plans](/azure/devops/test/run-automated-tests-from-test-hub)
+
+## 2.7 Code-based test cases
+
+**Summary**
+
+Code-based test cases are an integral part of maintaining the security and reliability of your product. These tests should be small and fast and shouldn't have an impact on each other so they can be run in parallel. Code-based tests are easy for developers to run locally on their development machine anytime they make changes to the code without worrying about slowing down their development cycle.
+
+**Types, and relation to other sections**
+
+Common types of code-based test cases include:
+- unit tests,
+- parameterized tests to cover functions with multiple input types,
+- component tests to keep each test component separate, and
+- mock testing to validate parts of the code that communicate with other services, without expanding the scope of the test to include those services themselves.
+
+These tests are based on the internal code that is written, whereas black box tests are based on the external functional requirements of the product.
+
+**Goal**
+
+Through these tests, the goal is to achieve a high level of test coverage over your code. You should actively track this coverage and where gaps exist. As you add more tests that exercise more code paths, the overall confidence in your code's security and reliability increases.
+
+**Visual Studio**
+
+The test explorer tools in Visual Studio make it easy to run these tests frequently and get feedback on pass/fail rates and failure locations quickly. Many of the test frameworks also support CodeLens features to see the test status at the location of the test itself, making adding and maintaining the suite of tests easier. The Test Explorer also makes managing these tests easy, allowing for test groups, custom test playlists, filtering, sorting, searching, and more.
+
+For more information, see:
+
+- [Unit testing fundamentals - Visual Studio (Windows)](/visualstudio/test/unit-test-basics) - an introduction and overview
+- [Run unit tests with Test Explorer - Visual Studio (Windows)](/visualstudio/test/run-unit-tests-with-test-explorer#group-and-filter-the-test-list) - a deeper look at what's available to help manage the potentially large set of unit tests with the Test Explorer
+
+Visual Studio also comes with tools for tracking the code coverage. These tools enable you to ensure that code changes you make are covered by existing tests, or to add new tests to cover new and untested code paths. The tools also show the code coverage percentage to ensure it's maintained above a target level for confidence in overall code quality.
+
+For information about these tools, see [Code coverage testing - Visual Studio (Windows)](/visualstudio/test/using-code-coverage-to-determine-how-much-code-is-being-tested)
+
+**In Azure**
+
+Azure DevOps can also help in tracking code coverage results for the whole product as part of the build pipeline process. For more information, see [Review code coverage - Azure Pipelines](/azure/devops/pipelines/test/review-code-coverage-results).
+
+## 2.8 Historical test cases
+
+**Summary**
+
+Historical test cases, also known as regression test cases, prevent old issues from resurfacing again and increase the overall test coverage of the product. You should ensure that when a bug is fixed the project also adds a corresponding test case. Over time, as fixes are made, the overall robustness of the testing suite will keep improving, giving better assurances of reliability and security.
+
+**Key qualities, and relation to other sections**
+
+Since they test for bug regressions, these tests should be quick and easy to run, so they can run alongside the [Code Based Test Cases](#27-code-based-test-cases) and contribute to the overall code coverage of the product. Along with this, using real examples from customers to inspire new test cases is a great way to improve coverage and quality of tests.
+
+**Visual Studio**
+
+Visual Studio lets you easily add tests to the suite while making the changes to fix the bug, and quickly run the tests and code coverage to ensure all new cases get considered. Referencing the bug ID from your issue tracking system in your code where you write the test is a good way to connect regression tests to the corresponding issues. Prefer to use Azure Boards and test plans together with Visual Studio:
+- to associate tests, test cases, and issues; and
+- to track of all aspects of an issue and its corresponding tests.
+
+For more information, see:
+- [Associate automated tests with test cases - Azure Test Plans](/azure/devops/test/associate-automated-test-with-test-case)
+- [Link work items to other objects - Azure DevOps](/azure/devops/organizations/notifications/add-links-to-work-items)
+
+Eventually, integrating these tests into the unit testing area that is supposed to cover the code section helps keep the test suite organized and easier to manage. You can use the Test Explorer's test grouping to effectively track the tests that belong together. For more information, see [Run unit tests with Test Explorer - Visual Studio (Windows)](/visualstudio/test/run-unit-tests-with-test-explorer#group-and-filter-the-test-list)
+
+## 2.9 Fuzzing
+
+**Summary**
+Fuzzing (also known as fuzz testing) is an automated software testing technique that involves providing invalid, unexpected, or random data as input to a program. The program is then monitored for exceptions such as crashes, failing built-in or compiler injected code assertions and potential memory leaks.
+
+**Guidance**
+
+Use fuzzing on all software that might process untrusted inputs that an attacker could control. If you're building a new application and its associated test suite, include fuzzing for key modules as early as possible. Running fuzzing for the first time on a piece of software nearly always uncovers actual vulnerabilities that were previously unknown. Once you start fuzzing, never stop.
+
+**Relation to other sections**
+
+When fuzzing reports a failure, it always naturally provides a reproducible test case that demonstrates the bug. This test case can be reproduced, resolved, and then added to the Historical Test Cases.
+
+When using both sanitizers such as [Address Sanitizer (ASan)](../sanitizers/asan.md) and fuzzing:
+- First run your normal tests with sanitizers enabled to see if there are issues, then once the code is sanitizer-clean start fuzzing.
+- For C or C++, there are compilers that automate injection of runtime assertions and meta-data that enable ASan. When compiled for ASan, the resulting binaries link with a runtime library that can precisely diagnose [15+ categories of memory safety errors](../sanitizers/asan.md#error-types) with zero false positives. For C or C++ when you have source, use [LibFuzzer](https://www.llvm.org/docs/LibFuzzer.html), which requires ASan to be enabled first.
+- For libraries written in Java, C#, Python, Rust, and so on, use the [AFL++ framework](https://aflplus.plus/).
+
+**Key qualities**
+
+- Fuzzing finds vulnerabilities often missed by static program analysis, exhaustive feature testing and manual code inspection.
+- Fuzzing is an effective way to find security and reliability bugs in software, so much so that the [Microsoft Security Development Lifecycle](https://www.microsoft.com/securityengineering/sdl/) requires fuzzing at every untrusted interface of every product (see also Threat Modeling).
+- Always use fuzzing for software that might process untrusted inputs.
+- Fuzzing is effective for standalone applications with large data parsers.
+
+**Azure and GitHub CI/CD**
+
+Modify your build(s) to support continuous creation of executables that use LibFuzzer or AFL++. You can add extra computing resources required for fuzzing at services like OSS-Fuzz.
+
+## 2.10 Web Application Scanning
+
+**Summary**
+
+Within the scope of Microsoft Visual C++ on Windows, Microsoft recommends:
+
+- Prefer TypeScript, JavaScript, and ASP.NET for web applications.
+- Don't write web extensions in C++. Microsoft has deprecated ActiveX.
+- When code is compiled to Emscripten/WASM, it's no longer C++ and other tools apply.
+- Microsoft provides [RESTler, a stateful REST API fuzzer](https://github.com/microsoft/restler-fuzzer).
+
+**Overview and key qualities**
+
+A web application scanner explores a web application by crawling through its web pages and examines it for security vulnerabilities. This crawl involves the automatic generation of malicious inputs and evaluation of the application's responses. Critically, web application scanning must cover/support:
+
+- Catalogs all web apps in your network, including new and unknown ones, and scales from a handful of apps to thousands.
+- Deep scanning for software versions, SOAP and REST API services and APIs used by mobile devices.
+- Insertion of security primitives into application development and deployment in DevOps environments. These primitives work with the crawler.
+- Malware detection.
+
+## 2.11 Check Included Software Components
+
+**Summary**
+
+Handle your C++ code the same as code written in other programming languages, and apply any Software Composition Analysis (SCA) and Origin Analysis (OA) tooling adopted by your company to your C++ code. Workflows and security scanning should be designed as part of CI/CD (continuous integration and continuous delivery) systems.
+
+**Upstream defense**
+
+To mitigate the risk of attacks on upstream dependencies, third party sources/components should be stored on an enterprise-controlled asset, against which SCA and OA tools are run.
+- Tools should scan and alert when vulnerabilities are identified (including public databases) such as: [Home | CVE](https://www.cve.org/)
+- Run static analysis on all software components included in your application/repo to identify vulnerable code patterns.
+
+**Dependency defense**
+
+Perform and maintain an audit of dependencies to validate that all such occurrences are accounted for and covered by your SCA and OA tools.
+- Components should be regularly audited and updated to the latest verified versions.
+- Package feed dependencies.
+- SCA/OA tools cover and audit all package dependencies that come from a single feed.
+
+**SBOM**
+
+Produce an SBOM (software bill of materials) with your product listing all dependencies such as:
+- origin (for example, URL (Uniform Resource Locator))
+- version
+- consistency (for example, SHA-256 source hash), and other means for validating consistency such as deterministic builds.
+- Require and audit SBOM files in software dependencies or produced as part of a build including OSS (open-source software).
+- Microsoft is standardizing on and recommends [SPDX (Software Package Data Exchange) version 2.2 or later | Linux Foundation](https://spdx.dev/specifications/) as the SBOM document format.
+- Build determinism can be used to independently produce bit-wise identical binaries and provide independent verifications of integrity:
+ - First-party or third-party attestation of reproducibility
+ - Other techniques such as binary signing via a trusted certificate source can also provide some assurances of binary integrity.
+
+**Additional resources**
+
+Microsoft solutions include the following guidance and products:
+- [Microsoft Supply Chain Platform | Microsoft](https://www.microsoft.com/microsoft-cloud/solutions/microsoft-supply-chain-platform)
+- [Secure your software supply chain | GitHub Security](https://github.com/features/security/software-supply-chain)
+- [vcpkg](/vcpkg/) - vcpkg private registries allow redirection of OSS acquisition to Enterprise-controlled resources for acquiring sources for a dependency, to minimize risk of upstream or over-the-wire attacks.
diff --git a/docs/code-quality/c26132.md b/docs/code-quality/c26132.md
new file mode 100644
index 0000000000..390903a605
--- /dev/null
+++ b/docs/code-quality/c26132.md
@@ -0,0 +1,73 @@
+---
+title: Warning C26132
+description: Documentation on static analysis warning C26132
+author: Rastaban
+ms.author: philc
+ms.service: visual-cpp
+ms.topic: article
+ms.date: 02/11/2025
+---
+# Warning C26132
+
+> Variable '*variable name*' should be protected by '*lock 1*', but '*lock 2*' is held instead. Possible annotation mismatch.
+
+The analyzer issues Warning C26132 when it detects that a lock, which is annotated to protect a value, isn't held while accessing the value. However, a related lock is held. The code may be thread-safe, so you might need to update the annotations.
+
+This diagnostic usually doesn't indicate a bug in the code, but rather a mismatch between the annotations and the actual locking behavior. If so, the diagnostic should be resolved as there may be other static analysis issues that aren't being reported due to the inconsistent annotations.
+
+## Examples
+
+In the following example, C26132 is emitted when `data` is used.
+
+ The annotation specifies that `customLock01` should protect the variable `data`, but `CustomLockAcquire` is responsible for acquiring the related lock `customLock01->cs`.
+
+```cpp
+#include
+struct CustomLock
+{
+ int cs; // "Critical Section" lock
+};
+
+_Acquires_exclusive_lock_(criticalSection->cs) // notice the `->` indirection
+void CustomLockAcquire(CustomLock* criticalSection);
+
+_Releases_lock_(criticalSection->cs) // notice the `->` indirection
+void CustomLockRelease(CustomLock* criticalSection);
+
+// global lock
+CustomLock customLock01;
+
+void Initialize(_Guarded_by_(customLock01) int* data)
+{
+ CustomLockAcquire(&customLock01);
+ *data = 1; // C26132
+ CustomLockRelease(&customLock01);
+}
+```
+
+In this example, the `Initialize` function is thread-safe and behaves as designed, but that design isn't correctly reflected in the concurrency SAL annotations. Fix by adjusting the annotations on the custom locking functions to use `criticalSection` rather than `criticalSection->cs`. The warning could also be fixed by changing the `_Guarded_by_` annotation from `customLock01` to `customLock01.cs`.
+
+```cpp
+#include
+struct CustomLock
+{
+ int cs; // "Critical Section" lock
+};
+
+_Acquires_exclusive_lock_(criticalSection)
+void CustomLockAcquire(CustomLock* criticalSection);
+
+_Releases_lock_(criticalSection)
+void CustomLockRelease(CustomLock* criticalSection);
+
+// global lock
+CustomLock customLock01;
+
+void Initialize(_Guarded_by_(customLock01) int* data)
+{
+ CustomLockAcquire(&customLock01);
+ *data = 1;
+ CustomLockRelease(&customLock01);
+}
+```
+
diff --git a/docs/code-quality/c26133.md b/docs/code-quality/c26133.md
new file mode 100644
index 0000000000..0074674044
--- /dev/null
+++ b/docs/code-quality/c26133.md
@@ -0,0 +1,76 @@
+---
+title: Warning C26133
+description: Documentation on static analysis warning C26133
+author: Rastaban
+ms.author: philc
+ms.service: visual-cpp
+ms.topic: article
+ms.date: 02/19/2025
+---
+# Warning C26133
+
+> Caller failing to hold lock '*lock 1*' before calling function '*function name*', but '*lock 2*' is held instead. Possible annotation mismatch.
+
+Warning C26133 is issued when the analyzer detects that the lock required to call a function isn't held when the function is called. However, another lock that appears to be related is held. It's possible the code is thread-safe, and the annotations need to be updated.
+
+This diagnostic usually doesn't indicate a bug in the code, but rather a mismatch between the annotations and the actual locking behavior. If so, the diagnostic should be resolved as there may be other static analysis issues that aren't being reported due to the inconsistent annotations.
+
+## Examples
+
+In the following example, C26133 is emitted when `DoTaskWithCustomLock` is called.
+
+> warning C26133: Caller failing to hold lock 'customLock01' before calling function 'DoTaskWithCustomLock', but '(&customLock01)->cs' is held instead. Possible annotation mismatch.
+
+```cpp
+#include
+
+struct CustomLock
+{
+ int cs; // "Critical Section"
+};
+
+_Acquires_exclusive_lock_(criticalSection->cs) // notice the `->` indirection
+void CustomLockAcquire(CustomLock* criticalSection);
+
+_Releases_lock_(criticalSection->cs) // notice the `->` indirection
+void CustomLockRelease(CustomLock* criticalSection);
+
+CustomLock customLock01;
+
+_Requires_lock_held_(customLock01) void DoTaskWithCustomLock();
+
+void DoTask()
+{
+ CustomLockAcquire(&customLock01);
+ DoTaskWithCustomLock(); // C26133
+ CustomLockRelease(&customLock01);
+}
+```
+
+In this example, the `DoTask` function is thread-safe and behaves as designed, but that design isn't correctly reflected in the concurrency SAL annotations. Fix by adjusting the annotations on the custom locking functions to use `criticalSection` rather than `criticalSection->cs`. The warning could also be fixed by changing the `_Requires_lock_held_` annotation from `customLock01` to `customLock01.cs`.
+
+```cpp
+#include
+
+struct CustomLock
+{
+ int cs; // "Critical Section"
+};
+
+_Acquires_exclusive_lock_(criticalSection)
+void CustomLockAcquire(CustomLock* criticalSection);
+
+_Releases_lock_(criticalSection)
+void CustomLockRelease(CustomLock* criticalSection);
+
+CustomLock customLock01;
+
+_Requires_lock_held_(customLock01) void DoTaskWithCustomLock();
+
+void DoTask()
+{
+ CustomLockAcquire(&customLock01);
+ DoTaskWithCustomLock();
+ CustomLockRelease(&customLock01);
+}
+```
\ No newline at end of file
diff --git a/docs/code-quality/c26135.md b/docs/code-quality/c26135.md
index bbd4c04054..96db147d01 100644
--- a/docs/code-quality/c26135.md
+++ b/docs/code-quality/c26135.md
@@ -25,14 +25,14 @@ typedef struct _DATA
void MyEnter(DATA* p)
{
// Warning C26135:
- // Missing side effect annotation _Acquires_lock_(&p->cs)
+ // Missing side effect annotation _Acquires_lock_(p->cs)
EnterCriticalSection(&p->cs);
}
void MyLeave(DATA* p)
{
// warning C26135:
- // Missing side effect annotation _Releases_lock_(&p->cs)
+ // Missing side effect annotation _Releases_lock_(p->cs)
LeaveCriticalSection(&p->cs);
}
```
diff --git a/docs/code-quality/c26401.md b/docs/code-quality/c26401.md
index ef45225be5..023338c378 100644
--- a/docs/code-quality/c26401.md
+++ b/docs/code-quality/c26401.md
@@ -63,7 +63,7 @@ public:
ref_count_--;
if (ref_count_ == 0)
{
- [[gsl::suppress(i.11)]]
+ [[gsl::suppress("i.11")]]
delete this;
}
}
diff --git a/docs/code-quality/c26409.md b/docs/code-quality/c26409.md
index 8939a08776..a0dc4a4f3d 100644
--- a/docs/code-quality/c26409.md
+++ b/docs/code-quality/c26409.md
@@ -1,10 +1,9 @@
---
-description: "Learn more about CppCoreCheck rule C26409: avoid explicit new and delete."
title: Warning C26409
+description: "Learn more about CppCoreCheck rule C26409: avoid explicit new and delete."
ms.date: 12/14/2020
f1_keywords: ["C26409", "NO_NEW_DELETE"]
helpviewer_keywords: ["C26409"]
-ms.assetid: a3b3a229-d566-4be3-bd28-2876ccc8dc37
---
# Warning C26409
@@ -13,7 +12,7 @@ ms.assetid: a3b3a229-d566-4be3-bd28-2876ccc8dc37
Even if code is clean of calls to `malloc` and `free`, we still suggest that you consider better options than explicit use of operators [`new` and `delete`](../cpp/new-and-delete-operators.md).
**C++ Core Guidelines**:\
-[R.11: Avoid calling new and delete explicitly](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#r11-avoid-calling-new-and-delete-explicitly)
+[R.11: Avoid calling `new` and `delete` explicitly](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#r11-avoid-calling-new-and-delete-explicitly)
The ultimate fix is to use smart pointers and appropriate factory functions, such as [`std::make_unique`](../standard-library/memory-functions.md#make_unique).
@@ -49,7 +48,7 @@ public:
ref_count_--;
if (ref_count_ == 0)
{
- [[gsl::suppress(i.11)]]
+ [[gsl::suppress("i.11")]]
delete this;
}
}
diff --git a/docs/code-quality/c26414.md b/docs/code-quality/c26414.md
index 471b69d1d9..d33427adcb 100644
--- a/docs/code-quality/c26414.md
+++ b/docs/code-quality/c26414.md
@@ -4,14 +4,13 @@ description: "Reference for Visual Studio C++ Core Guidelines code analysis warn
ms.date: 01/29/2020
f1_keywords: ["C26414", "RESET_LOCAL_SMART_PTR"]
helpviewer_keywords: ["C26414"]
-ms.assetid: dd875d0c-6752-4491-a533-3e8831795fbc
---
# Warning C26414
> "Move, copy, reassign or reset a local smart pointer."
**C++ Core Guidelines**:\
-[R.5: Prefer scoped objects, don't heap-allocate unnecessarily](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rr-scoped)
+[R.5: Prefer scoped objects, don't heap-allocate unnecessarily](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#r5-prefer-scoped-objects-dont-heap-allocate-unnecessarily)
Smart pointers are convenient for dynamic resource management, but they're not always necessary. For example, it may be easier and more efficient to manage a local dynamic buffer by using a standard container. You may not need dynamic allocation at all for single objects, for example, if they never outlive their creator function. They can be replaced with local variables. Smart pointers become handy when a scenario requires a change of ownership. For example, when you reassign a dynamic resource multiple times, or in multiple paths. They're also useful for resources obtained from external code. And, when smart pointers are used to extend the lifetime of a resource.
diff --git a/docs/code-quality/c26430.md b/docs/code-quality/c26430.md
index ca0a31cf88..230352b2e9 100644
--- a/docs/code-quality/c26430.md
+++ b/docs/code-quality/c26430.md
@@ -27,8 +27,6 @@ A variable is marked as checked for null when it's used in the following context
- in non-bitwise logical operations;
- in comparison operations where one operand is a constant expression that evaluates to zero.
-The rule doesn't have full data flow tracking. It can produce incorrect results in cases where indirect checks are used (such as when an intermediate variable holds a null value and is later used in a comparison).
-
Implicit null checks are assumed when a pointer value is assigned from:
- an allocation performed with throwing `operator new`;
@@ -67,3 +65,36 @@ void merge_states(gsl::not_null left, gsl::not_null `If you define or delete any default operation in the type 'type-name', define or delete them all (c.21).`
**C++ Core Guidelines**:\
-[C.21: If you define or =delete any default operation, define or =delete them all](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#c21-if-you-define-or-delete-any-default-operation-define-or-delete-them-all)
+[C.21: If you define or `=delete` any copy, move, or destructor function, define or `=delete` them all](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#c21-if-you-define-or-delete-any-copy-move-or-destructor-function-define-or-delete-them-all)
Special operations such as constructors are assumed to alter the behavior of types so they rely more on language mechanisms to automatically enforce specific scenarios. The canonical example is resource management. If you explicitly define, default, or delete any of these special operations, it signals you want to avoid any special handling of a type. It's inconsistent to leave the other operations unspecified, that is, implicitly defined as deleted by the compiler.
diff --git a/docs/code-quality/c26434.md b/docs/code-quality/c26434.md
index 7db222af1a..0bdfe9d173 100644
--- a/docs/code-quality/c26434.md
+++ b/docs/code-quality/c26434.md
@@ -4,7 +4,6 @@ description: "Microsoft C++ Code Analysis warning C26434 for the C++ Core Guidel
ms.date: 08/21/2020
f1_keywords: ["C26434", "DONT_HIDE_METHODS"]
helpviewer_keywords: ["C26434"]
-ms.assetid: 7f66477f-da66-444a-a6e3-44513d7d7e31
---
# Warning C26434
@@ -44,5 +43,4 @@ struct Derived : Base
void not_virtual() noexcept {} // C26434, hides a non-virtual function
virtual void not_virtual(int i) noexcept {} // C26434, and parameters ignored
};
-
```
diff --git a/docs/code-quality/c26435.md b/docs/code-quality/c26435.md
index f66dacda9a..ab4ec78c93 100644
--- a/docs/code-quality/c26435.md
+++ b/docs/code-quality/c26435.md
@@ -7,7 +7,7 @@ helpviewer_keywords: ["C26435"]
---
# Warning C26435
-> Function '*symbol*' should specify exactly one of 'virtual', 'override', or 'final' (c.128)
+> The virtual function '*symbol*' should specify exactly one of 'virtual', 'override', or 'final' (c.128)
## C++ Core Guidelines
@@ -41,6 +41,9 @@ public:
void Draw() override final { // C26435, only 'final' is necessary.
//...
}
+ virtual void DrawCircumference() final { // C26435, should be neither 'virtual' nor 'final'.
+ //...
+ }
};
```
diff --git a/docs/code-quality/c26437.md b/docs/code-quality/c26437.md
index f617e904ca..2f96db0776 100644
--- a/docs/code-quality/c26437.md
+++ b/docs/code-quality/c26437.md
@@ -1,19 +1,18 @@
---
-description: "Learn more about: Warning C26437 DONT_SLICE"
title: Warning C26437
-ms.date: 10/07/2019
+description: "Learn more about: Warning C26437 DONT_SLICE"
+ms.date: 05/17/2023
f1_keywords: ["C26437", "DONT_SLICE"]
helpviewer_keywords: ["C26437"]
-ms.assetid: ed2f55bc-a6d8-4cc4-8069-5c96e581a96a
---
# Warning C26437
> Do not slice.
**C++ Core Guidelines**:
-[ES.63: Don't slice](https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#Res-slice)
+[ES.63: Don't slice](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#es63-dont-slice)
-[Slicing](https://en.wikipedia.org/wiki/Object_slicing) is allowed by the compiler and can be viewed as a special case of a dangerous implicit cast. Even if it's done intentionally and doesn't lead to immediate issues, it's still highly discouraged. It makes code unmaintainable, by forcing extra requirements on related data types. It's especially true if types are polymorphic or involve resource management.
+The language allows [slicing](https://en.wikipedia.org/wiki/Object_slicing) and can be viewed as a special case of a dangerous implicit cast. Even if it's done intentionally and doesn't lead to immediate issues, it's still highly discouraged. It makes code harder to change, by forcing extra requirements on related data types. It's especially true if types are polymorphic or involve resource management.
## Remarks
@@ -23,10 +22,9 @@ The rule also flags cases where an assignment doesn't involve real data slicing
## Example
-Slicing points to outdated interface:
+In the next code example, we read `id_ex`, but the caller of the function will only get a slice of the object:
```cpp
-interface
struct id {
int value;
};
@@ -45,7 +43,7 @@ bool read_id(stream &s, id &v) {
}
```
-Slicing points to outdated interface - corrected:
+To fix the issue, update the function to use the correct types:
```cpp
// ...
diff --git a/docs/code-quality/c26439.md b/docs/code-quality/c26439.md
index 8bfaa4bb5a..85e7499a1e 100644
--- a/docs/code-quality/c26439.md
+++ b/docs/code-quality/c26439.md
@@ -1,41 +1,40 @@
---
title: Warning C26439
-ms.date: 11/15/2017
+description: CppCoreCheck rule C26439 that enforces C++ Core Guidelines F.6
+ms.date: 05/17/2023
f1_keywords: ["C26439", "SPECIAL_NOEXCEPT"]
helpviewer_keywords: ["C26439"]
-ms.assetid: 9df2a1b0-ea94-4884-9d28-c1522ec33a1b
-description: CppCoreCheck rule C26439 that enforces C++ Core Guidelines F.6
---
# Warning C26439
> This kind of function may not throw. Declare it 'noexcept'.
-[**C++ Core Guidelines** F.6](https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#f6-if-your-function-may-not-throw-declare-it-noexcept): If your function may not throw, declare it noexcept
+[F.6: If your function must not throw, declare it `noexcept`](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#f6-if-your-function-must-not-throw-declare-it-noexcept)
+
+Some operations should never throw exceptions. Their implementations should be reliable and should handle possible errors conditions gracefully. They shouldn't use exceptions to indicate failure. This rule flags cases where such operations aren't explicitly marked as `noexcept`, which means that they may throw exceptions and consumers can't make assumptions about its reliability.
+
+It's important for these functions to be reliable as they're often used as building blocks to implement functions with [exception safety guarantees](https://en.cppreference.com/w/cpp/language/exceptions). A move constructor that throws will force Standard Template Library (STL) containers to fall back to copy operations, reducing runtime performance.
-Some kinds of operations should never cause exceptions. Their implementations should be reliable and should handle possible errors conditions gracefully. They should never use exceptions to indicate failure. This rule flags cases where such operations aren't explicitly marked as `noexcept`, which means that they may throw exceptions and can't convey assumptions about their reliability.
+Code analysis name: `SPECIAL_NOEXCEPT`
## Remarks
- Special kinds of operations:
- destructors;
- - default constructors;
- move constructors and move assignment operators;
- standard functions with move semantics: `std::move` and `std::swap`.
-- Non-standard and outdated specifiers like `throw()` or `declspec(nothrow)` aren't equivalent to `noexcept`.
+- Nonstandard and outdated specifiers like `throw()` or `declspec(nothrow)` aren't equivalent to `noexcept`.
- Explicit specifiers `noexcept(false)` and `noexcept(true)` are respected appropriately.
-- The warning may still appear for operations that are marked as `constexpr`. This check may change in future releases.
-
## Example
-All functions except the destructor will warn because they're missing noexcept.
+The tool warns on all functions except the destructor because they're missing `noexcept`.
```cpp
struct S
{
- S() {} // C26455, Default constructor may not throw. Declare it 'noexcept'
~S() {}
S(S&& s) {/*impl*/} // C26439, This kind of function may not throw. Declare it 'noexcept' (f.6)
@@ -46,12 +45,11 @@ struct S
};
```
-With noexcept decorating the same structure, all warnings are removed.
+With `noexcept` decorating the same structure, all warnings are removed.
```cpp
struct S
{
- S() noexcept {}
~S() {}
S(S&& s) noexcept {/*impl*/}
@@ -61,3 +59,8 @@ struct S
S& operator=(const S& s) noexcept {/*impl*/}
};
```
+
+## See also
+
+[C26455](c26455.md)\
+[F.6: If your function must not throw, declare it `noexcept`](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#f6-if-your-function-must-not-throw-declare-it-noexcept)
diff --git a/docs/code-quality/c26441.md b/docs/code-quality/c26441.md
index 0230d446bb..c2f5dc91b8 100644
--- a/docs/code-quality/c26441.md
+++ b/docs/code-quality/c26441.md
@@ -1,60 +1,68 @@
---
-description: "Learn more about: Warning C26441 NO_UNNAMED_GUARDS"
title: Warning C26441
-ms.date: 11/15/2017
+description: "Learn more about: Warning C26441 NO_UNNAMED_GUARDS."
+ms.date: 5/11/2023
f1_keywords: ["C26441", "NO_UNNAMED_GUARDS"]
helpviewer_keywords: ["C26441"]
-ms.assetid: f923c422-ed01-4644-b40b-93f15fc5bb93
---
# Warning C26441
> Guard objects must be named (cp.44)
-**C++ Core Guidelines**:
-[CP.44](https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#cp44-remember-to-name-your-lock_guards-and-unique_locks): Remember to name your lock_guards and unique_locks
+## C++ Core Guidelines
-The standard library provides a few useful classes that help to control concurrent access to resources. Objects of such types lock exclusive access during their lifetime. Lifetime management implies that every lock object must be named. That is, it must have a clearly defined lifetime that spans through the period in which access operations are executed. So, failing to assign a lock object to a variable is a mistake that effectively disables the locking mechanism (because temporary variables are transient). This rule tries to catch simple cases of such unintended behavior.
+[CP.44: Remember to name your `lock_guard`s and `unique_lock`s](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#cp44-remember-to-name-your-lock_guards-and-unique_locks)
## Remarks
-- Only standard lock types are tracked: `std::scoped_lock`, `std::unique_lock`, and `std::lock_quard`.
+The standard library provides locks to help control concurrent access to resources during their lifetime. When you declare a lock object without a name, the compiler creates a temporary object that's immediately destructed rather than one that lives to the end of the enclosing scope. So, failure to assign a lock object to a variable is a mistake that effectively disables the locking mechanism (because temporary variables are transient). This rule catches simple cases of such unintended behavior.
-- Only simple calls to constructors are analyzed. More complex initializer expressions may lead to inaccurate results, but it's an unusual scenario.
+This diagnostic only analyzes the standard lock types `std::scoped_lock`, `std::unique_lock`, and `std::lock_guard`. Warning [C26444](c26444.md) covers other unnamed RAII types.
-- Locks passed as arguments to function calls or returned as results of function calls are ignored.
+The analyzer only analyzes simple calls to constructors. More complex initializer expressions may lead to inaccurate results in the form of missed warnings. The analyzer ignores locks passed as arguments to function calls or returned from function calls. It's unable to determine if those locks are deliberately trying to protect that function call or if their [lifetime should be extended](https://abseil.io/tips/107). To provide similar protection for types returned by a function call, annotate them with `[[nodiscard]]`. You can also annotate constructors with `[[nodiscard]]` to avoid unnamed objects of that type:
-- Locks created as temporaries but assigned to named references to extend their lifetime are ignored.
+```cpp
+struct X { [[nodiscard]] X(); };
+
+void f() {
+ X{}; // warning C4834
+}
+```
+
+ The analyzer ignores locks created as temporaries but assigned to named references to extend their lifetime.
Code analysis name: `NO_UNNAMED_GUARDS`
## Example
-Missing scoped variable:
+In this example, the name of the scoped lock is missing.
```cpp
-void print_diagnostic(gsl::string_span<> text)
+void print_diagnostic(std::string_view text)
{
auto stream = get_diagnostic_stream();
if (stream)
{
std::lock_guard{ diagnostic_mutex_ }; // C26441
write_line(stream, text);
- // ...
}
}
```
-Missing scoped variable, corrected:
+To fix the error, give a name to the lock, which extends its lifetime.
```cpp
-void print_diagnostic(gsl::string_span<> text)
+void print_diagnostic(std::string_view text)
{
auto stream = get_diagnostic_stream();
if (stream)
{
std::lock_guard lock{ diagnostic_mutex_ };
write_line(stream, text);
- // ...
}
}
```
+
+## See also
+
+[C26444](C26444.md)
diff --git a/docs/code-quality/c26444.md b/docs/code-quality/c26444.md
index bad8c2812a..cc020442fe 100644
--- a/docs/code-quality/c26444.md
+++ b/docs/code-quality/c26444.md
@@ -1,53 +1,49 @@
---
-description: "Learn more about: Warning C26444 NO_UNNAMED_RAII_OBJECTS"
title: Warning C26444
-ms.date: 01/18/2017
+description: "Learn more about: Warning C26444 NO_UNNAMED_RAII_OBJECTS."
+ms.date: 05/11/2023
f1_keywords: ["C26444", "NO_UNNAMED_RAII_OBJECTS"]
helpviewer_keywords: ["C26444"]
---
# Warning C26444
-> Avoid unnamed objects with custom construction and destruction.
+> Don't try to declare a local variable with no name (es.84).
## C++ Core Guidelines
-[ES.84: Don't (try to) declare a local variable with no name](https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#Res-noname)
+[ES.84: Don't try to declare a local variable with no name](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#es84-dont-try-to-declare-a-local-variable-with-no-name)
-Unnamed (that is, temporary) objects with non-trivial behavior may point to either (a) inefficient code that allocates and immediately throws away resources or (b) to the code that unintentionally ignores non-primitive data. Sometimes it may also indicate plainly wrong declaration.
+An unnamed variable declaration creates a temporary object that is discarded at the end of the statement. Such temporary objects with nontrivial behavior may point to either inefficient code that allocates and immediately throws away resources or to the code that unintentionally ignores nonprimitive data. Sometimes it may also indicate plainly wrong declaration.
-## Notes
+## Remarks
-- This rule detects types with non-deleted destructors. Keep in mind that destructors can be compiler generated.
-- The warning can flag code that isn't compiler generated and that invokes either a non-default constructor of a RAII type or a function that returns an object of such type. This warning helps to detect ignored call results in addition to wrong declarations.
+- This rule detects types with a hand-written destructor or a compiler-generated destructor that transitively calls a hand-written destructor.
+- This rule can flag code that invokes a nontrivial constructor of an RAII type.
- The logic skips temporaries if they're used in higher-level expressions. One example is temporaries that are passed as arguments or used to invoke a function.
-- The standard library implementation may have different versions of destruction logic for some types (for example, containers). This can produce noisy warnings on debug builds because it's customary to ignore iterators returned from calls like [`std::vector::insert`](../standard-library/vector-class.md#insert). While such warnings aren't actionable in most cases, they're legitimate in pointing to the place where some non-obvious work is done in temporary objects.
Code analysis name: `NO_UNNAMED_RAII_OBJECTS`
-## Example: Ignored call result
+## Examples
```cpp
-std::string ToTraceMessage(State &state);
-void SaveState(State &state)
+struct A { A(int i); ~A(); };
+void Foo()
{
- // ...
- ToTraceMessage(state); // C26444, should we do something with the result of this call?
+ A{42}; // warning C26444: Don't try to declare a local variable with no name (es.84).
}
+```
-Example: Ignored call result - fixed.
-std::cerr << ToTraceMessage(state);
+To fix the issue, convert the temporary object to a local.
-Example: Unexpected lifetime.
-void SplitCache()
+```cpp
+struct A { A(int i); ~A(); };
+void Foo()
{
- gsl::finally([] { RestoreCache(); }); // C26444, RestoreCache is invoked immediately!
- //...
+ A guard{42}; // OK.
}
-
-Example: Unexpected lifetime - fixed.
-const auto _ = gsl::finally([] { RestoreCache(); });
```
## See also
-[ES.84: Don't (try to) declare a local variable with no name](https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md)
+[C26441](C26441.md)\
+[ES.84: Don't try to declare a local variable with no name](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#es84-dont-try-to-declare-a-local-variable-with-no-name)
diff --git a/docs/code-quality/c26449.md b/docs/code-quality/c26449.md
index 4dce008f58..85de9ef0c3 100644
--- a/docs/code-quality/c26449.md
+++ b/docs/code-quality/c26449.md
@@ -1,7 +1,7 @@
---
-description: "Learn more about: Warning C26449 NO_SPAN_FROM_TEMPORARY"
title: Warning C26449
-ms.date: 03/22/2018
+description: "Learn more about: Warning C26449 NO_SPAN_FROM_TEMPORARY."
+ms.date: 05/11/2023
f1_keywords: ["C26449", "NO_SPAN_FROM_TEMPORARY"]
helpviewer_keywords: ["C26449"]
---
@@ -9,9 +9,11 @@ helpviewer_keywords: ["C26449"]
> `gsl::span` or `std::string_view` created from a temporary will be invalid when the temporary is invalidated (gsl.view)
-C++ Core Guidelines: [GSL.view: Views](https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#gslview-views).
+C++ Core Guidelines: [GSL.view: Views](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#gslview-views).
-Spans and views are convenient and lightweight types that allow you to reference memory buffers. But they must be used carefully: while their interface looks similar to standard containers, their behavior is more like the behavior of pointers and references. They don't own data and must never be constructed from temporary buffers. This check focuses on cases where source data is temporary, while a span or view isn't. There's another check that handles a slightly different scenario involving span references: [C26445 NO_SPAN_REF](c26445.md). Both rules can help to avoid subtle but dangerous mistakes made when legacy code gets modernized and adopts spans or views.
+Spans and views are convenient and lightweight types that allow you to reference memory buffers. But they must be used carefully: while their interface looks similar to standard containers, their behavior is more like the behavior of pointers and references. They don't own data and must never be constructed from temporary buffers. This check focuses on cases where source data is temporary, while a span or view isn't. This rule can help to avoid subtle but dangerous mistakes made when legacy code gets modernized and adopts spans or views. There's another check that handles a slightly different scenario involving span references: [C26445 NO_SPAN_REF](c26445.md).
+
+Consider using [C26815](c26815.md) and [C26816](c26816.md). Those warnings are more general versions of this warning.
## Remarks
@@ -38,7 +40,7 @@ Subtle difference in result types:
gsl::span get_seed_sequence() noexcept;
// Returns a generated collection. Doesn't own new data.
-const std::vector get_next_sequence(gsl::span);
+std::vector get_next_sequence(gsl::span);
void run_batch()
{
@@ -50,3 +52,9 @@ void run_batch()
}
}
```
+
+To fix the issue, make sure the view is created from an object that lives at least as long as the view itself. Sometimes a solution can be achieved by copying the data, other times some APIs need to be redesigned to share a reference to an object that lives long enough instead of returning a temporary copy.
+
+## See also
+[C26815](c26815.md)\
+[C26816](c26816.md)
\ No newline at end of file
diff --git a/docs/code-quality/c26450.md b/docs/code-quality/c26450.md
index 7fc48fb269..66044efb23 100644
--- a/docs/code-quality/c26450.md
+++ b/docs/code-quality/c26450.md
@@ -1,23 +1,23 @@
---
-description: "Learn more about: Arithmetic overflow: '%operator%' operation causes overflow at compile time. Use a wider type to store the operands"
title: Warning C26450
-ms.date: 01/08/2017
+description: "Describes the causes of MSVC code analysis warning C26450 and how to fix it."
+ms.date: 05/11/2023
f1_keywords: ["C26450", "RESULT_OF_ARITHMETIC_OPERATION_PROVABLY_LOSSY"]
helpviewer_keywords: ["C26450"]
---
# Warning C26450
->Arithmetic overflow: '*operator*' operation causes overflow at compile time. Use a wider type to store the operands (io.1)
+> Arithmetic overflow: '*operator*' operation causes overflow at compile time. Use a wider type to store the operands (io.1)
## Remarks
This warning indicates that an arithmetic operation was provably lossy at compile time. It can be asserted when the operands are all compile-time constants. Currently, we check left shift, multiplication, addition, and subtraction operations for such overflows.
-Warning C4307 is a similar check in the Microsoft C++ compiler.
+Warning [C4307](../error-messages/compiler-warnings/compiler-warning-level-2-c4307.md) is a similar check in the Microsoft C++ compiler.
Code analysis name: `RESULT_OF_ARITHMETIC_OPERATION_PROVABLY_LOSSY`
-## Example 1
+## Examples
```cpp
int multiply()
@@ -36,59 +36,15 @@ long long multiply()
{
const int a = INT_MAX;
const int b = 2;
- long long c = (long long)a * b; // OK
- return c;
-}
-```
-
-## Example 2
-
-```cpp
-int add()
-{
- const int a = INT_MAX;
- const int b = 2;
- int c = a + b; // C26450 reported here
- return c;
-}
-```
-
-To correct this warning, use the following code:
-
-```cpp
-long long add()
-{
- const int a = INT_MAX;
- const int b = 2;
- long long c = (long long)a + b; // OK
- return c;
-}
-```
-
-## Example 3
-
-```cpp
-int subtract()
-{
- const int a = -INT_MAX;
- const int b = 2;
- int c = a - b; // C26450 reported here
- return c;
-}
-```
-
-To correct this warning, use the following code.
-
-```cpp
-long long subtract()
-{
- const int a = -INT_MAX;
- const int b = 2;
- long long c = (long long)a - b; // OK
+ long long c = static_cast(a) * b; // OK
return c;
}
```
## See also
-[ES.103: Don't overflow](https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#Res-overflow)
+[C26451](c26451.md)\
+[C26452](c26452.md)\
+[C26453](c26453.md)\
+[C26454](c26454.md)\
+[ES.103: Don't overflow](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#es103-dont-overflow)
diff --git a/docs/code-quality/c26451.md b/docs/code-quality/c26451.md
index 2c2af3a147..0067e42718 100644
--- a/docs/code-quality/c26451.md
+++ b/docs/code-quality/c26451.md
@@ -1,7 +1,7 @@
---
title: Warning C26451
description: "Describes the causes of MSVC code analysis warning C26451, and shows how to fix it."
-ms.date: 07/15/2020
+ms.date: 05/11/2023
f1_keywords: ["C26451", "RESULT_OF_ARITHMETIC_OPERATION_CAST_TO_LARGER_SIZE"]
helpviewer_keywords: ["C26451"]
---
@@ -17,14 +17,14 @@ Code analysis detects when an integral value gets shifted left, multiplied, adde
Code analysis name: `RESULT_OF_ARITHMETIC_OPERATION_CAST_TO_LARGER_SIZE`
-## Example 1
+## Examples
The following code generates this warning:
```cpp
void leftshift(int i) noexcept
{
- unsigned __int64 x;
+ unsigned long long x;
x = i << 31; // C26451 reported here
// code
@@ -36,55 +36,17 @@ To correct this warning, use the following code:
```cpp
void leftshift(int i) noexcept
{
- unsigned __int64 x;
- x = static_cast(i) << 31; // OK
+ unsigned long long x;
+ x = static_cast(i) << 31; // OK
// code
}
```
-## Example 2
-
-```cpp
-void somefunc(__int64 /* y */) noexcept
-{}
-
-void callsomefunc(int x) noexcept
-{
- somefunc(x * 2); // C26451 reported here
-}
-```
-
-To correct this warning, use the following code:
-
-```cpp
-void callsomefunc(int x) noexcept
-{
- somefunc(static_cast<__int64>(x) * 2); // OK
-}
-```
-
-## Example 3
-
-```cpp
-__int64 add(int x) noexcept
-{
- constexpr auto value = 2;
- return x += value; // C26451 reported here
-}
-```
-
-To correct this warning, use the following code:
-
-```cpp
-__int64 add(int x) noexcept
-{
- constexpr auto value = 2;
- const __int64 y = static_cast<__int64>(x) + value; // OK
- return y;
-}
-```
-
## See also
-- [ES.103: Don't overflow](https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#Res-overflow)
+[C26450](c26450.md)\
+[C26452](c26452.md)\
+[C26453](c26453.md)\
+[C26454](c26454.md)\
+[ES.103: Don't overflow](https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#Res-overflow)
diff --git a/docs/code-quality/c26452.md b/docs/code-quality/c26452.md
index 6d54b5b539..0f529f60ce 100644
--- a/docs/code-quality/c26452.md
+++ b/docs/code-quality/c26452.md
@@ -13,14 +13,14 @@ helpviewer_keywords: ["C26452"]
This warning indicates the shift count is negative, or greater than or equal to the number of bits in the shifted operand. Either case results in undefined behavior.
-Warning C4293 is a similar check in the Microsoft C++ compiler.
+Warning [C4293](../error-messages/compiler-warnings/compiler-warning-level-1-c4293.md) is a similar check in the Microsoft C++ compiler.
Code analysis name: `SHIFT_COUNT_NEGATIVE_OR_TOO_BIG`
## Example
```cpp
-unsigned __int64 combine(unsigned lo, unsigned hi)
+unsigned long long combine(unsigned lo, unsigned hi)
{
return (hi << 32) | lo; // C26252 here
}
@@ -29,7 +29,7 @@ unsigned __int64 combine(unsigned lo, unsigned hi)
To correct this warning, use the following code:
```cpp
-unsigned __int64 combine(unsigned lo, unsigned hi)
+unsigned long long combine(unsigned lo, unsigned hi)
{
return (static_cast(hi) << 32) | lo; // OK
}
@@ -37,4 +37,9 @@ unsigned __int64 combine(unsigned lo, unsigned hi)
## See also
-[ES.102: Use signed types for arithmetic](https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#Res-unsigned)
+[C26450](c26450.md)\
+[C26451](c26451.md)\
+[C26453](c26453.md)\
+[C26454](c26454.md)\
+[ES.101: Use unsigned types for bit manipulation](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#es101-use-unsigned-types-for-bit-manipulation)\
+[ES.102: Use signed types for arithmetic](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#es102-use-signed-types-for-arithmetic)
diff --git a/docs/code-quality/c26453.md b/docs/code-quality/c26453.md
index 5c2a61ce75..32a7064209 100644
--- a/docs/code-quality/c26453.md
+++ b/docs/code-quality/c26453.md
@@ -1,7 +1,7 @@
---
title: Warning C26453
description: "Describes the causes of MSVC code analysis warning C26453, and shows how to fix it."
-ms.date: 07/15/2020
+ms.date: 05/11/2023
f1_keywords: ["C26453", "LEFTSHIFT_NEGATIVE_SIGNED_NUMBER"]
helpviewer_keywords: ["C26453"]
---
@@ -11,7 +11,7 @@ helpviewer_keywords: ["C26453"]
## Remarks
-This warning indicates the code left shifts a negative signed integral value, which is non-portable and triggers implementation defined behavior.
+This warning indicates the code left shifts a negative signed integral value, which is nonportable and triggers implementation defined behavior.
Code analysis name: `LEFTSHIFT_NEGATIVE_SIGNED_NUMBER`
@@ -31,7 +31,7 @@ To correct this warning, use the following code:
```cpp
void leftshift(int shiftCount)
{
- const auto result = static_cast(-1) << shiftCount; // OK
+ const auto result = ~0u << shiftCount; // OK
// code
}
@@ -39,4 +39,9 @@ void leftshift(int shiftCount)
## See also
-[ES.102: Use signed types for arithmetic](https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#Res-unsigned)
+[C26450](c26450.md)\
+[C26451](c26451.md)\
+[C26452](c26452.md)\
+[C26454](c26454.md)\
+[ES.101: Use unsigned types for bit manipulation](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#es101-use-unsigned-types-for-bit-manipulation)\
+[ES.102: Use signed types for arithmetic](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#es102-use-signed-types-for-arithmetic)
diff --git a/docs/code-quality/c26454.md b/docs/code-quality/c26454.md
index 4610dc5cb6..77b21092ec 100644
--- a/docs/code-quality/c26454.md
+++ b/docs/code-quality/c26454.md
@@ -1,6 +1,6 @@
---
-description: "Learn more about: Arithmetic overflow: 'operator' operation produces a negative unsigned result at compile time"
title: Warning C26454
+description: "Learn more about: Arithmetic overflow: 'operator' operation produces a negative unsigned result at compile time"
ms.date: 01/08/2017
f1_keywords: ["C26454", "RESULT_OF_ARITHMETIC_OPERATION_NEGATIVE_UNSIGNED"]
helpviewer_keywords: ["C26454"]
@@ -37,4 +37,8 @@ unsigned int negativeunsigned()
## See also
-[ES.106: Don't try to avoid negative values by using unsigned](https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#Res-nonnegative)
+[C26450](c26450.md)\
+[C26451](c26451.md)\
+[C26452](c26452.md)\
+[C26453](c26453.md)\
+[ES.106: Don't try to avoid negative values by using `unsigned`](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#es106-dont-try-to-avoid-negative-values-by-using-unsigned)
diff --git a/docs/code-quality/c26455.md b/docs/code-quality/c26455.md
index 51501d72b9..617f0cedd5 100644
--- a/docs/code-quality/c26455.md
+++ b/docs/code-quality/c26455.md
@@ -1,10 +1,9 @@
---
-description: "Learn more about the C26455 DEFAULT_CTOR_NOEXCEPT C++ Core Guidelines Checker warning. Default constructors shouldn't do anything that can throw."
title: Warning C26455
+description: "Learn more about the C26455 DEFAULT_CTOR_NOEXCEPT"
ms.date: 04/29/2022
f1_keywords: ["C26455", "DEFAULT_CTOR_NOEXCEPT"]
helpviewer_keywords: ["C26455"]
-ms.assetid: 27e86063-d969-49d8-8912-dcc2dc57249f
author: kylereedmsft
ms.author: kylereed
ms.custom: kr2b-contr-experiment
@@ -13,7 +12,7 @@ ms.custom: kr2b-contr-experiment
> Default constructor should not throw. Declare it '`noexcept`' (f.6)
-The C++ Core Guidelines suggest that default constructors shouldn't do anything that can throw. If the default constructor is allowed to throw, operations such as move and swap will also throw which is undesirable because move and swap should always succeed. Parameterized constructors may throw.
+The C++ Core Guidelines suggest that default constructors shouldn't do anything that can throw. When the default constructor can throw, all code that relies on a properly instantiated object may also throw.
## Remarks
@@ -23,4 +22,5 @@ Code analysis name: `DEFAULT_CTOR_NOEXCEPT`
## See also
-- [C++ Core Guideline F.6](https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#Rf-noexcept)
+[C26439](./c26439.md)\
+[F.6: If your function must not throw, declare it `noexcept`](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#f6-if-your-function-must-not-throw-declare-it-noexcept)
diff --git a/docs/code-quality/c26459.md b/docs/code-quality/c26459.md
new file mode 100644
index 0000000000..0bd5855921
--- /dev/null
+++ b/docs/code-quality/c26459.md
@@ -0,0 +1,43 @@
+---
+description: "Learn more about: Warning C26459"
+title: Warning C26459
+ms.date: 4/10/2024
+f1_keywords: ["C26459", "NO_RAW_POINTER_IN_STL_RANGE_CHECKED"]
+helpviewer_keywords: ["C26459"]
+---
+# Warning C26459
+
+> You called an STL function '%function%' with a raw pointer parameter at position '%position%' that may be unsafe - this relies on the caller to check that the passed values are correct. Consider wrapping your range in a gsl::span and pass as a span iterator (stl.1)
+
+## Remarks
+
+Out of bound writes are one of the leading causes of remote code execution vulnerabilities. One remedy is to use bounds checked data structures like `gsl::span`. This warning identifies cases where Standard Template Library (STL) algorithms operate on raw pointers as output ranges. Raw pointers aren't bounds checked. To prevent vulnerabilities, use `gsl::span` instead.
+
+Code analysis name: `NO_RAW_POINTER_IN_STL_RANGE_CHECKED`
+
+## Example
+
+The following code demonstrates undefined behavior because there isn't any bounds checking and `copy_if` writes beyond the provided storage.
+
+```cpp
+void f()
+{
+ std::vector myints = { 10, 20, 30, 40, 50, 60, 70 };
+ int mydestinationArr[7] = { 10, 20, 80 };
+
+ std::copy_if(myints.begin(), myints.end(), mydestinationArr, [](int i) { return !(i<0); }); // Warning: C26459
+}
+```
+
+To fix the warning, use `gsl::span` to make sure the output range is bounds checked:
+
+```cpp
+void f()
+{
+ std::vector myints = { 10, 20, 30, 40, 50, 60, 70 };
+ int mydestinationArr[7] = { 10, 20, 80 };
+ gsl::span mySpan{mydestinationArr};
+
+ std::copy_if(myints.begin(), myints.end(), mySpan.begin(), [](int i) { return !(i<0); }); // No warning
+}
+```
\ No newline at end of file
diff --git a/docs/code-quality/c26460.md b/docs/code-quality/c26460.md
index b85910ae52..2307b0d592 100644
--- a/docs/code-quality/c26460.md
+++ b/docs/code-quality/c26460.md
@@ -24,7 +24,6 @@ struct MyStruct
void MemberFn2();
};
-
void Function1_Helper(const MyStruct&);
void Function1(MyStruct& myStruct) // C26460, see comments below.
{
diff --git a/docs/code-quality/c26478.md b/docs/code-quality/c26478.md
index 23d897a01c..ddaff2f01b 100644
--- a/docs/code-quality/c26478.md
+++ b/docs/code-quality/c26478.md
@@ -1,7 +1,7 @@
---
-description: "Learn more about: Warning C26478: Don't use std::move on constant variables. (es.56)"
title: Warning C26478
-ms.date: 07/15/2019
+description: "Learn more about: Warning C26478: Don't use std::move on constant variables. (es.56)"
+ms.date: 10/12/2023
f1_keywords: ["C26478", "NO_MOVE_OP_ON_CONST"]
helpviewer_keywords: ["C26478"]
---
@@ -13,11 +13,11 @@ helpviewer_keywords: ["C26478"]
This warning is to indicate that the use of `std::move` not consistent with how `std::move` is intended to be used.
-When called on a `const` object, `std::move` returns a copy of the object, which is likely not the developer's intent.
+Because `const` objects can't be moved, calling `std::move` on them has no effect. This pattern can result in unintended copies.
Code analysis name: `NO_MOVE_OP_ON_CONST`
-## Example 1
+## Example
```cpp
struct node
@@ -33,23 +33,8 @@ void foo(const node& n)
}
```
-An assignment operator or using the passed in parameter will prevent this warning from being issued and will adequately serve the developer's use case.
-
-## Example 2
-
-```cpp
-struct s;
-
-template
-void bar(T t){};
-
-void foo()
-{
- const s s1;
- bar(std::move(s1)); // C26478 reported here
-}
-```
+To fix the issue, remove the redundant `std::move`.
## See also
-[ES.56 - Write std::move() only when you need to explicitly move an object to another scope](https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#es56-write-stdmove-only-when-you-need-to-explicitly-move-an-object-to-another-scope)
+[ES.56: Write `std::move()` only when you need to explicitly move an object to another scope](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#es56-write-stdmove-only-when-you-need-to-explicitly-move-an-object-to-another-scope)
diff --git a/docs/code-quality/c26479.md b/docs/code-quality/c26479.md
new file mode 100644
index 0000000000..4612d6fea0
--- /dev/null
+++ b/docs/code-quality/c26479.md
@@ -0,0 +1,42 @@
+---
+title: Warning C26479
+description: "Learn more about: Warning C26479: Don't use std::move to return a local variable. (f.48)"
+ms.date: 10/12/2023
+f1_keywords: ["C26479", "NO_MOVE_RET_ON_LOCALS"]
+helpviewer_keywords: ["C26479"]
+---
+# Warning C26479
+
+> Don't use std::move to return a local variable. (f.48)
+
+## Remarks
+
+The `return` statement is the last use of a local variable, so the compiler uses move semantics to return it whenever possible.
+Adding a `std::move` is redundant in this scenario. Moreover, redundant `std::move`s can prevent copy elision.
+
+Code analysis name: `NO_MOVE_RET_ON_LOCALS`
+
+## Example 1
+
+```cpp
+S foo()
+{
+ S local1{};
+ return std::move(local1); // Warning: C26479
+}
+```
+
+To fix this issue, remove the redundant `std::move`:
+
+```cpp
+S foo()
+{
+ S local1{};
+ return local1; // No warning
+}
+```
+
+## See also
+
+[F.48: Don't `return std::move(local)`](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#f48-dont-return-stdmovelocal)\
+[ES.56: Write `std::move()` only when you need to explicitly move an object to another scope](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#es56-write-stdmove-only-when-you-need-to-explicitly-move-an-object-to-another-scope)
diff --git a/docs/code-quality/c26483.md b/docs/code-quality/c26483.md
index ea4c10c6b9..5e031b2448 100644
--- a/docs/code-quality/c26483.md
+++ b/docs/code-quality/c26483.md
@@ -1,9 +1,9 @@
---
title: Warning C26483
+description: CppCoreCheck rule C26483 that enforces C++ Core Guidelines Bounds.2
ms.date: 03/22/2018
f1_keywords: ["C26483", "STATIC_INDEX_OUT_OF_RANGE"]
helpviewer_keywords: ["C26483"]
-description: CppCoreCheck rule C26483 that enforces C++ Core Guidelines Bounds.2
---
# Warning C26483
@@ -24,5 +24,4 @@ void function()
int arr2[] { 1, 2, 3 };
arr2[3] = 4; // C26483, 3 is outside the bounds of the array
}
-
```
diff --git a/docs/code-quality/c26488.md b/docs/code-quality/c26488.md
index b3ae0ce888..a54608facb 100644
--- a/docs/code-quality/c26488.md
+++ b/docs/code-quality/c26488.md
@@ -1,10 +1,9 @@
---
-description: "Learn more about: Warning C26488 LIFETIMES_DEREF_NULL_POINTER"
title: Warning C26488
+description: "Learn more about: Warning C26488 LIFETIMES_DEREF_NULL_POINTER"
ms.date: 12/14/2018
f1_keywords: ["C26488", "LIFETIMES_DEREF_NULL_POINTER"]
helpviewer_keywords: ["C26488"]
-ms.assetid: 2ade0d31-f259-49de-8676-cce6092fabfc
author: kylereedmsft
ms.author: kylereed
---
@@ -28,9 +27,9 @@ void ex1()
The Lifetime guidelines from the C++ core guidelines outline a contract that code can follow which will enable more thorough static memory leak and dangling pointer detection. The basic ideas behind the guidelines are:
-1) Never dereference an invalid (dangling) or known-null pointer
-2) Never return (either formal return or out parameter) any pointer from a function.
-3) Never pass an invalid (dangling) pointer to any function.
+1. Never dereference an invalid (dangling) or known-null pointer.
+1. Never return (either formal return or out parameter) any pointer from a function.
+1. Never pass an invalid (dangling) pointer to any function.
## See also
diff --git a/docs/code-quality/c26489.md b/docs/code-quality/c26489.md
index 2f252dc766..85df9e569a 100644
--- a/docs/code-quality/c26489.md
+++ b/docs/code-quality/c26489.md
@@ -1,10 +1,9 @@
---
-description: "Learn more about: Warning C26489 LIFETIMES_DEREF_INVALID_POINTER"
title: Warning C26489
+description: "Learn more about: Warning C26489 LIFETIMES_DEREF_INVALID_POINTER"
ms.date: 12/14/2018
f1_keywords: ["C26489", "LIFETIMES_DEREF_INVALID_POINTER"]
helpviewer_keywords: ["C26489"]
-ms.assetid: 15983d4f-f615-42e7-8521-ee094b87d066
author: kylereedmsft
ms.author: kylereed
---
@@ -30,9 +29,9 @@ int ex1()
The Lifetime guidelines from the C++ core guidelines outline a contract that code can follow which will enable more thorough static memory leak and dangling pointer detection. The basic ideas behind the guidelines are:
-1) Never dereference an invalid (dangling) or known-null pointer
-2) Never return (either formal return or out parameter) any pointer from a function.
-3) Never pass an invalid (dangling) pointer to any function.
+1. Never dereference an invalid (dangling) or known-null pointer.
+1. Never return (either formal return or out parameter) any pointer from a function.
+1. Never pass an invalid (dangling) pointer to any function.
## See also
diff --git a/docs/code-quality/c26494.md b/docs/code-quality/c26494.md
index 41cfa16b20..7ed21fb002 100644
--- a/docs/code-quality/c26494.md
+++ b/docs/code-quality/c26494.md
@@ -1,6 +1,6 @@
---
-description: "Learn more about: Warning C26494 VAR_USE_BEFORE_INIT"
title: Warning C26494
+description: "Learn more about: Warning C26494 VAR_USE_BEFORE_INIT."
ms.date: 03/22/2018
f1_keywords: ["C26494", "VAR_USE_BEFORE_INIT"]
helpviewer_keywords: ["C26494"]
@@ -9,9 +9,9 @@ helpviewer_keywords: ["C26494"]
> Variable '*variable*' is uninitialized. Always initialize an object.
-## See also
+## Remarks
-[C++ Core Guidelines Type.5](https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#SS-type).
+This check requires local variables to be initialized at the declaration or in the following statement.
## Example
@@ -23,3 +23,19 @@ void function()
std::cout << myVal; // C6001
}
```
+
+To fix the issue, initialize the variable at the declaration.
+
+```cpp
+#include
+void function()
+{
+ int myVal{};
+ std::cout << myVal;
+}
+```
+
+## See also
+
+[ES.20: Always initialize an object](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#es20-always-initialize-an-object)\
+[Pro.safety: Type-safety profile](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#prosafety-type-safety-profile)
diff --git a/docs/code-quality/c26495.md b/docs/code-quality/c26495.md
index f433277553..f99e5697b8 100644
--- a/docs/code-quality/c26495.md
+++ b/docs/code-quality/c26495.md
@@ -1,9 +1,9 @@
---
title: Warning C26495
-ms.date: 08/18/2022
+description: "CppCoreCheck rule that enforces C++ Core Guidelines Type.6."
+ms.date: 05/11/2023
f1_keywords: ["C26495", "MEMBER_UNINIT", "__WARNING_MEMBER_UNINIT"]
helpviewer_keywords: ["C26495"]
-description: CppCoreCheck rule that enforces C++ Core Guidelines Type.6
---
# Warning C26495
@@ -13,7 +13,9 @@ description: CppCoreCheck rule that enforces C++ Core Guidelines Type.6
A member variable isn't initialized by a constructor or by an initializer. Make sure all variables are initialized by the end of construction. For more information, see C++ Core Guidelines [Type.6](https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#SS-type) and [C.48](https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#c48-prefer-in-class-initializers-to-member-initializers-in-constructors-for-constant-initializers).
-Code analysis name: MEMBER_UNINIT
+This check is intra-procedural. Whenever there's a function call to a nonconst member function, the check assumes that this member function initializes all of the members. This heuristic can result in missed errors and is in place to avoid false positive results. Moreover, when a member is passed by nonconst reference to a function, the check assumes that the function initializes the member.
+
+Code analysis name: `MEMBER_UNINIT`
## Example
@@ -36,3 +38,7 @@ struct MyStruct
MyStruct() {} // no warning, MyStruct::value is set via default member initialization
};
```
+
+## See also
+
+[C26494](c26494.md)
\ No newline at end of file
diff --git a/docs/code-quality/c26498.md b/docs/code-quality/c26498.md
index 064ef2b92d..e495372145 100644
--- a/docs/code-quality/c26498.md
+++ b/docs/code-quality/c26498.md
@@ -1,6 +1,6 @@
---
-description: "Learn more about: Warning C26498 USE_CONSTEXPR_FOR_FUNCTIONCALL"
title: Warning C26498
+description: "Learn more about: Warning C26498 USE_CONSTEXPR_FOR_FUNCTIONCALL"
ms.date: 08/18/2020
f1_keywords: ["C26498", "USE_CONSTEXPR_FOR_FUNCTIONCALL"]
helpviewer_keywords: ["C26498"]
@@ -9,15 +9,17 @@ helpviewer_keywords: ["C26498"]
> The function '*function*' is constexpr, mark variable '*variable*' constexpr if compile-time evaluation is desired (con.5)
-This rule helps to enforce Con.5 from the [C++ Core Guidelines](https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#con5-use-constexpr-for-values-that-can-be-computed-at-compile-time): use constexpr for values that can be computed at compile time.
+This rule helps to enforce [Con.5: Use `constexpr` for values that can be computed at compile time](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#con5-use-constexpr-for-values-that-can-be-computed-at-compile-time) in the C++ Core Guidelines.
## Remarks
The warning is triggered by assigning the result of a **`constexpr`** function to any non-**`constexpr`** variable whose value doesn't change after the initial assignment.
+Code analysis name: `USE_CONSTEXPR_FOR_FUNCTIONCALL`
+
## Example
-This sample code shows where C26498 may appear, and how to avoid it:
+This sample code shows where C26498 may appear:
```cpp
constexpr int getMyValue()
@@ -34,3 +36,28 @@ void foo()
val3 = val3 * val2;
}
```
+
+To fix the issues, mark `val1` and `val2` **`constexpr`**:
+
+```cpp
+constexpr int getMyValue()
+{
+ return 1;
+}
+
+void foo()
+{
+ constexpr int val0 = getMyValue(); // OK
+ constexpr int val1 = getMyValue(); // OK
+ constexpr int val2 = getMyValue(); // OK
+ int val3 = getMyValue(); // OK
+ val3 = val3 * val2;
+}
+```
+
+
+## See also
+
+[C26497](c26407.md)\
+[C26814](c26814.md)\
+[Con.5: Use `constexpr` for values that can be computed at compile time](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#con5-use-constexpr-for-values-that-can-be-computed-at-compile-time)
diff --git a/docs/code-quality/c26800.md b/docs/code-quality/c26800.md
index 9e0328095e..1052f0f0db 100644
--- a/docs/code-quality/c26800.md
+++ b/docs/code-quality/c26800.md
@@ -1,6 +1,6 @@
---
-description: "Learn more about: Warning C26800"
title: Warning C26800
+description: "Learn more about: Warning C26800"
ms.date: 01/14/2019
f1_keywords: ["C26800", "USE_OF_A_MOVED_FROM_OBJECT"]
helpviewer_keywords: ["C26800"]
@@ -11,13 +11,42 @@ helpviewer_keywords: ["C26800"]
## Remarks
-Warning C26800 is triggered when variable is used after it has been moved from. A variable is considered moved from after it was passed to a function as rvalue reference. There are some legitimate exceptions for uses such as assignment, destruction, and some state resetting functions such as `std::vector::clear`.
+Warning C26800 is triggered when a variable is used after it has been moved from. A variable is considered moved from after it's passed to a function as rvalue reference. There are some exceptions for assignment, destruction, and some state resetting functions such as `std::vector::clear`. After using a state resetting function, we're free to use the variable. This check only reasons about the local variables.
+
+The following methods are considered state resetting methods:
+- Functions with the following case-insensitive substring in their name: `clear`, `clean`, `reset`, `free`, `destroy`, `release`, `dealloc`, `assign`
+- Overloaded assignment operators, destructor
+
+This check respects the `std::swap` operation:
+
+```cpp
+void f() {
+ Y y1, y2;
+ consume(std::move(y1));
+ std::swap(y1, y2);
+ y1.method(); // OK, valid after swap.
+ y2.method(); // warning C26800
+}
+```
+
+The check also supports the `try_emplace` operations in STL that conditionally move its argument:
+
+```cpp
+int g() {
+ std::map m;
+ Y val;
+ auto emplRes = m.try_emplace(1, std::move(val));
+ if (!emplRes.second) {
+ val.method(); // No C26800, val was not moved because the insertion did not happen.
+ }
+}
+```
Code analysis name: `USE_OF_A_MOVED_FROM_OBJECT`
## Examples
-The following code will generate C26800.
+The following code generates C26800.
```cpp
#include