+
- *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 cb2d216b87..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 (__//__). If you compile with /Za (ANSI standard), these comments generate errors. 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
- *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 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-from-signed-integral-types.md b/docs/c-language/conversions-from-signed-integral-types.md
index 12027dad24..607b431457 100644
--- a/docs/c-language/conversions-from-signed-integral-types.md
+++ b/docs/c-language/conversions-from-signed-integral-types.md
@@ -1,13 +1,13 @@
---
description: "Learn more about: Conversions from signed integral types"
title: "Conversions from signed integral types"
-ms.date: "10/02/2019"
+ms.date: 12/06/2022
helpviewer_keywords: ["integral conversions, from signed", "integers, converting", "conversions [C++], integral", "data type conversion [C++], signed and unsigned integers", "type conversion [C++], signed and unsigned integers"]
ms.assetid: 5eea32f8-8b14-413d-acac-c063b3d118d7
---
# Conversions from signed integral types
-When a signed integer is converted to an integer or a floating-point type, if the original value is representable in the result type, the value is unchanged.
+When a signed integer is converted to an integer or a floating-point type, the value is unchanged if it's representable in the result type.
When a signed integer is converted to an integer of greater size, the value is sign-extended. When converted to an integer of smaller size, the high-order bits are truncated. The result is interpreted using the result type, as shown in this example:
@@ -19,7 +19,7 @@ u = i;
printf_s( "%hu\n", u ); // Prints 65533
```
-When converting a signed integer to a floating-point type, if the original value isn't representable exactly in the result type, the result is the next higher or lower representable value.
+When the compiler converts a signed integer to a floating-point type, if the original value isn't representable exactly in the result type, the result is the next higher or lower representable value.
For information about the sizes of integral and floating-point types, see [Storage of basic types](../c-language/storage-of-basic-types.md).
@@ -33,48 +33,48 @@ In the Microsoft compiler, **`int`** and **`long`** are distinct but equivalent
## Table of conversions from signed integral types
-|From|To|Method|
-|----------|--------|------------|
-|**`char`**1|**`short`**|Sign-extend|
-|**`char`**|**`long`**|Sign-extend|
-|**`char`**|**`long long`**|Sign-extend|
-|**`char`**|**`unsigned char`**|Preserve pattern; high-order bit loses function as sign bit|
-|**`char`**|**`unsigned short`**|Sign-extend to **`short`**; convert **`short`** to **`unsigned short`**|
-|**`char`**|**`unsigned long`**|Sign-extend to **`long`**; convert **`long`** to **`unsigned long`**|
-|**`char`**|**`unsigned long long`**|Sign-extend to **`long long`**; convert **`long long`** to **`unsigned long long`**|
-|**`char`**|**`float`**|Sign-extend to **`long`**; convert **`long`** to **`float`**|
-|**`char`**|**`double`**|Sign-extend to **`long`**; convert **`long`** to **`double`**|
-|**`char`**|**`long double`**|Sign-extend to **`long`**; convert **`long`** to **`double`**|
-|**`short`**|**`char`**|Preserve low-order byte|
-|**`short`**|**`long`**|Sign-extend|
-|**`short`**|**`long long`**|Sign-extend|
-|**`short`**|**`unsigned char`**|Preserve low-order byte|
-|**`short`**|**`unsigned short`**|Preserve bit pattern; high-order bit loses function as sign bit|
-|**`short`**|**`unsigned long`**|Sign-extend to **`long`**; convert **`long`** to **`unsigned long`**|
-|**`short`**|**`unsigned long long`**|Sign-extend to **`long long`**; convert **`long long`** to **`unsigned long long`**|
-|**`short`**|**`float`**|Sign-extend to **`long`**; convert **`long`** to **`float`**|
-|**`short`**|**`double`**|Sign-extend to **`long`**; convert **`long`** to **`double`**|
-|**`short`**|**`long double`**|Sign-extend to **`long`**; convert **`long`** to **`double`**|
-|**`long`**|**`char`**|Preserve low-order byte|
-|**`long`**|**`short`**|Preserve low-order word|
-|**`long`**|**`long long`**|Sign-extend|
-|**`long`**|**`unsigned char`**|Preserve low-order byte|
-|**`long`**|**`unsigned short`**|Preserve low-order word|
-|**`long`**|**`unsigned long`**|Preserve bit pattern; high-order bit loses function as sign bit|
-|**`long`**|**`unsigned long long`**|Sign-extend to **`long long`**; convert **`long long`** to **`unsigned long long`**|
-|**`long`**|**`float`**|Represent as **`float`**. If **`long`** can't be represented exactly, some precision is lost.|
-|**`long`**|**`double`**|Represent as **`double`**. If **`long`** can't be represented exactly as a **`double`**, some precision is lost.|
-|**`long`**|**`long double`**|Represent as **`double`**. If **`long`** can't be represented exactly as a **`double`**, some precision is lost.|
-|**`long long`**|**`char`**|Preserve low-order byte|
-|**`long long`**|**`short`**|Preserve low-order word|
-|**`long long`**|**`long`**|Preserve low-order dword|
-|**`long long`**|**`unsigned char`**|Preserve low-order byte|
-|**`long long`**|**`unsigned short`**|Preserve low-order word|
-|**`long long`**|**`unsigned long`**|Preserve low-order dword|
-|**`long long`**|**`unsigned long long`**|Preserve bit pattern; high-order bit loses function as sign bit|
-|**`long long`**|**`float`**|Represent as **`float`**. If **`long long`** can't be represented exactly, some precision is lost.|
-|**`long long`**|**`double`**|Represent as **`double`**. If **`long long`** can't be represented exactly as a **`double`**, some precision is lost.|
-|**`long long`**|**`long double`**|Represent as **`double`**. If **`long long`** can't be represented exactly as a **`double`**, some precision is lost.|
+| From | To | Method |
+|---|---|---|
+| **`char`**1 | **`short`** | Sign-extend |
+| **`char`** | **`long`** | Sign-extend |
+| **`char`** | **`long long`** | Sign-extend |
+| **`char`** | **`unsigned char`** | Preserve pattern; high-order bit loses function as sign bit |
+| **`char`** | **`unsigned short`** | Sign-extend to **`short`**; convert **`short`** to **`unsigned short`** |
+| **`char`** | **`unsigned long`** | Sign-extend to **`long`**; convert **`long`** to **`unsigned long`** |
+| **`char`** | **`unsigned long long`** | Sign-extend to **`long long`**; convert **`long long`** to **`unsigned long long`** |
+| **`char`** | **`float`** | Represent exactly as **`float`** |
+| **`char`** | **`double`** | Represent exactly as **`double`** |
+| **`char`** | **`long double`** | Represent exactly as **`long double`** |
+| **`short`** | **`char`** | Preserve low-order byte |
+| **`short`** | **`long`** | Sign-extend |
+| **`short`** | **`long long`** | Sign-extend |
+| **`short`** | **`unsigned char`** | Preserve low-order byte |
+| **`short`** | **`unsigned short`** | Preserve bit pattern; high-order bit loses function as sign bit |
+| **`short`** | **`unsigned long`** | Sign-extend to **`long`**; convert **`long`** to **`unsigned long`** |
+| **`short`** | **`unsigned long long`** | Sign-extend to **`long long`**; convert **`long long`** to **`unsigned long long`** |
+| **`short`** | **`float`** | Represent exactly as **`float`** |
+| **`short`** | **`double`** | Represent exactly as **`double`** |
+| **`short`** | **`long double`** | Represent exactly as **`long double`** |
+| **`long`** | **`char`** | Preserve low-order byte |
+| **`long`** | **`short`** | Preserve low-order word |
+| **`long`** | **`long long`** | Sign-extend |
+| **`long`** | **`unsigned char`** | Preserve low-order byte |
+| **`long`** | **`unsigned short`** | Preserve low-order word |
+| **`long`** | **`unsigned long`** | Preserve bit pattern; high-order bit loses function as sign bit |
+| **`long`** | **`unsigned long long`** | Sign-extend to **`long long`**; convert **`long long`** to **`unsigned long long`** |
+| **`long`** | **`float`** | Represent as **`float`**. If **`long`** can't be represented exactly, some precision is lost. |
+| **`long`** | **`double`** | Represent exactly as **`double`** |
+| **`long`** | **`long double`** | Represent exactly as **`long double`** |
+| **`long long`** | **`char`** | Preserve low-order byte |
+| **`long long`** | **`short`** | Preserve low-order word |
+| **`long long`** | **`long`** | Preserve low-order dword |
+| **`long long`** | **`unsigned char`** | Preserve low-order byte |
+| **`long long`** | **`unsigned short`** | Preserve low-order word |
+| **`long long`** | **`unsigned long`** | Preserve low-order dword |
+| **`long long`** | **`unsigned long long`** | Preserve bit pattern; high-order bit loses function as sign bit |
+| **`long long`** | **`float`** | Represent as **`float`**. If **`long long`** can't be represented exactly, some precision is lost. |
+| **`long long`** | **`double`** | Represent as **`double`**. If **`long long`** can't be represented exactly as a **`double`**, some precision is lost. |
+| **`long long`** | **`long double`** | Represent as **`double`**. If **`long long`** can't be represented exactly as a **`double`**, some precision is lost. |
1 All **`char`** entries assume that the **`char`** type is signed by default.
diff --git a/docs/c-language/conversions-from-unsigned-integral-types.md b/docs/c-language/conversions-from-unsigned-integral-types.md
index df5f8de764..4330ab6851 100644
--- a/docs/c-language/conversions-from-unsigned-integral-types.md
+++ b/docs/c-language/conversions-from-unsigned-integral-types.md
@@ -1,7 +1,7 @@
---
description: "Learn more about: Conversions from unsigned integral types"
title: "Conversions from unsigned integral types"
-ms.date: "10/02/2019"
+ms.date: 12/06/2022
helpviewer_keywords: ["integers, converting", "type casts, involving integers", "data type conversion [C++], signed and unsigned integers", "type conversion [C++], signed and unsigned integers", "integral conversions, from unsigned"]
ms.assetid: 60fb7e10-bff9-4a13-8a48-e19f25a36a02
---
@@ -9,7 +9,7 @@ ms.assetid: 60fb7e10-bff9-4a13-8a48-e19f25a36a02
When an unsigned integer is converted to an integer or floating-point type, if the original value is representable in the result type the value is unchanged.
-When converting an unsigned integer to an integer of greater size, the value is zero-extended. When converting to an integer of smaller size, the high-order bits are truncated. The result is interpreted using the result type, as shown in this example.
+When the compiler converts an unsigned integer to an integer of greater size, the value is zero-extended. When converted to an integer of smaller size, the high-order bits are truncated. The result is interpreted using the result type, as shown in this example:
```C
unsigned k = 65533;
@@ -19,7 +19,7 @@ j = k;
printf_s( "%hd\n", j ); // Prints -3
```
-When converting an unsigned integer to a floating-point type, if the original value can't be represented exactly in the result type, the result is the next higher or lower representable value.
+When the compiler converts an unsigned integer to a floating-point type, if the original value isn't representable exactly in the result type, the result is the next higher or lower representable value.
See [Storage of basic types](../c-language/storage-of-basic-types.md) for information about the sizes of integral and floating-point types.
@@ -33,48 +33,48 @@ The following table summarizes conversions from unsigned integral types.
## Table of conversions from unsigned integral types
-|From|To|Method|
-|----------|--------|------------|
-|**`unsigned char`**|**`char`**|Preserve bit pattern; high-order bit becomes sign bit|
-|**`unsigned char`**|**`short`**|Zero-extend|
-|**`unsigned char`**|**`long`**|Zero-extend|
-|**`unsigned char`**|**`long long`**|Zero-extend|
-|**`unsigned char`**|**`unsigned short`**|Zero-extend|
-|**`unsigned char`**|**`unsigned long`**|Zero-extend|
-|**`unsigned char`**|**`unsigned long long`**|Zero-extend|
-|**`unsigned char`**|**`float`**|Convert to **`long`**; convert **`long`** to **`float`**|
-|**`unsigned char`**|**`double`**|Convert to **`long`**; convert **`long`** to **`double`**|
-|**`unsigned char`**|**`long double`**|Convert to **`long`**; convert **`long`** to **`double`**|
-|**`unsigned short`**|**`char`**|Preserve low-order byte|
-|**`unsigned short`**|**`short`**|Preserve bit pattern; high-order bit becomes sign bit|
-|**`unsigned short`**|**`long`**|Zero-extend|
-|**`unsigned short`**|**`long long`**|Zero-extend|
-|**`unsigned short`**|**`unsigned char`**|Preserve low-order byte|
-|**`unsigned short`**|**`unsigned long`**|Zero-extend|
-|**`unsigned short`**|**`unsigned long long`**|Zero-extend|
-|**`unsigned short`**|**`float`**|Convert to **`long`**; convert **`long`** to **`float`**|
-|**`unsigned short`**|**`double`**|Convert to **`long`**; convert **`long`** to **`double`**|
-|**`unsigned short`**|**`long double`**|Convert to **`long`**; convert **`long`** to **`double`**|
-|**`unsigned long`**|**`char`**|Preserve low-order byte|
-|**`unsigned long`**|**`short`**|Preserve low-order word|
-|**`unsigned long`**|**`long`**|Preserve bit pattern; high-order bit becomes sign bit|
-|**`unsigned long`**|**`long long`**|Zero-extend|
-|**`unsigned long`**|**`unsigned char`**|Preserve low-order byte|
-|**`unsigned long`**|**`unsigned short`**|Preserve low-order word|
-|**`unsigned long`**|**`unsigned long long`**|Zero-extend|
-|**`unsigned long`**|**`float`**|Convert to **`long`**; convert **`long`** to **`float`**|
-|**`unsigned long`**|**`double`**|Convert directly to **`double`**|
-|**`unsigned long`**|**`long double`**|Convert to **`long`**; convert **`long`** to **`double`**|
-|**`unsigned long long`**|**`char`**|Preserve low-order byte|
-|**`unsigned long long`**|**`short`**|Preserve low-order word|
-|**`unsigned long long`**|**`long`**|Preserve low-order dword|
-|**`unsigned long long`**|**`long long`**|Preserve bit pattern; high-order bit becomes sign bit|
-|**`unsigned long long`**|**`unsigned char`**|Preserve low-order byte|
-|**`unsigned long long`**|**`unsigned short`**|Preserve low-order word|
-|**`unsigned long long`**|**`unsigned long`**|Preserve low-order dword|
-|**`unsigned long long`**|**`float`**|Convert to **`long`**; convert **`long`** to **`float`**|
-|**`unsigned long long`**|**`double`**|Convert directly to **`double`**|
-|**`unsigned long long`**|**`long double`**|Convert to **`long`**; convert **`long`** to **`double`**|
+| From | To | Method |
+|---|---|---|
+| **`unsigned char`** | **`char`** | Preserve bit pattern; high-order bit becomes sign bit |
+| **`unsigned char`** | **`short`** | Zero-extend |
+| **`unsigned char`** | **`long`** | Zero-extend |
+| **`unsigned char`** | **`long long`** | Zero-extend |
+| **`unsigned char`** | **`unsigned short`** | Zero-extend |
+| **`unsigned char`** | **`unsigned long`** | Zero-extend |
+| **`unsigned char`** | **`unsigned long long`** | Zero-extend |
+| **`unsigned char`** | **`float`** | Convert exactly to **`float`** |
+| **`unsigned char`** | **`double`** | Convert exactly to **`double`** |
+| **`unsigned char`** | **`long double`** | Convert exactly to **`long double`** |
+| **`unsigned short`** | **`char`** | Preserve low-order byte |
+| **`unsigned short`** | **`short`** | Preserve bit pattern; high-order bit becomes sign bit |
+| **`unsigned short`** | **`long`** | Zero-extend |
+| **`unsigned short`** | **`long long`** | Zero-extend |
+| **`unsigned short`** | **`unsigned char`** | Preserve low-order byte |
+| **`unsigned short`** | **`unsigned long`** | Zero-extend |
+| **`unsigned short`** | **`unsigned long long`** | Zero-extend |
+| **`unsigned short`** | **`float`** | Convert exactly to **`float`** |
+| **`unsigned short`** | **`double`** | Convert exactly to **`double`** |
+| **`unsigned short`** | **`long double`** | Convert exactly to **`long double`** |
+| **`unsigned long`** | **`char`** | Preserve low-order byte |
+| **`unsigned long`** | **`short`** | Preserve low-order word |
+| **`unsigned long`** | **`long`** | Preserve bit pattern; high-order bit becomes sign bit |
+| **`unsigned long`** | **`long long`** | Zero-extend |
+| **`unsigned long`** | **`unsigned char`** | Preserve low-order byte |
+| **`unsigned long`** | **`unsigned short`** | Preserve low-order word |
+| **`unsigned long`** | **`unsigned long long`** | Zero-extend |
+| **`unsigned long`** | **`float`** | Convert to nearest representable **`float`** |
+| **`unsigned long`** | **`double`** | Convert exactly to **`double`** |
+| **`unsigned long`** | **`long double`** | Convert exactly to **`long double`** |
+| **`unsigned long long`** | **`char`** | Preserve low-order byte |
+| **`unsigned long long`** | **`short`** | Preserve low-order word |
+| **`unsigned long long`** | **`long`** | Preserve low-order dword |
+| **`unsigned long long`** | **`long long`** | Preserve bit pattern; high-order bit becomes sign bit |
+| **`unsigned long long`** | **`unsigned char`** | Preserve low-order byte |
+| **`unsigned long long`** | **`unsigned short`** | Preserve low-order word |
+| **`unsigned long long`** | **`unsigned long`** | Preserve low-order dword |
+| **`unsigned long long`** | **`float`** | Convert to nearest representable **`float`** |
+| **`unsigned long long`** | **`double`** | Convert to nearest representable **`double`** |
+| **`unsigned long long`** | **`long double`** | Convert to nearest representable **`long double`** |
## See also
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
- *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/generic-selection.md b/docs/c-language/generic-selection.md
index f5c1edd6c3..2e9872209a 100644
--- a/docs/c-language/generic-selection.md
+++ b/docs/c-language/generic-selection.md
@@ -67,7 +67,6 @@ int main()
/* Output:
Type name: double
*/
-
```
## Requirements
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
- *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/system-function.md b/docs/c-language/system-function.md
index 95609210cf..35ef3def66 100644
--- a/docs/c-language/system-function.md
+++ b/docs/c-language/system-function.md
@@ -9,9 +9,9 @@ ms.assetid: 0786ccdc-20cd-4d96-b3d8-3230507c3066
**ANSI 4.10.4.5** The contents and mode of execution of the string by the **system** function
-The **system** function executes an internal operating system command, or an .EXE, .COM (.CMD in Windows NT) or .BAT file from within a C program rather than from the command line.
+The **system** function executes an internal operating system command, or an .EXE, .COM, .CMD, or .BAT file from within a C program rather than from the command line.
-The system function finds the command interpreter, which is typically CMD.EXE in the Windows NT operating system or COMMAND.COM in Windows. The system function then passes the argument string to the command interpreter.
+The system function finds the command interpreter, which is typically CMD.EXE in the Windows operating system. The system function then passes the argument string to the command interpreter.
For more information, see [system, _wsystem](../c-runtime-library/reference/system-wsystem.md).
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
- *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/32-bit-windows-time-date-formats.md b/docs/c-runtime-library/32-bit-windows-time-date-formats.md
index bb77e184b1..dfe8f3f72e 100644
--- a/docs/c-runtime-library/32-bit-windows-time-date-formats.md
+++ b/docs/c-runtime-library/32-bit-windows-time-date-formats.md
@@ -6,27 +6,27 @@ f1_keywords: ["vc.time"]
helpviewer_keywords: ["32-bit Windows"]
ms.assetid: ef1589db-84d7-4b24-8799-7c7a22cfe2bf
---
-# 32-Bit Windows Time/Date Formats
+# 32-Bit Windows time/date formats
The file time and the date are stored individually, using unsigned integers as bit fields. File time and date are packed as follows:
### Time
-|Bit position:|0 1 2 3 4|5 6 7 8 9 A|B C D E F|
-|-------------------|-----------------------|---------------------------|-----------------------|
-|Length:|5|6|5|
-|Contents:|hours|minutes|2-second increments|
-|Value Range:|0-23|0-59|0-29 in 2-second intervals|
+| Bit position: | 0 1 2 3 4 | 5 6 7 8 9 A | B C D E F |
+|---|---|---|---|
+| Length: | 5 | 6 | 5 |
+| Contents: | hours | minutes | 2-second increments |
+| Value Range: | 0-23 | 0-59 | 0-29 in 2-second intervals |
### Date
-|Bit position:|0 1 2 3 4 5 6|7 8 9 A|B C D E F|
-|-------------------|-------------------------------|-------------------|-----------------------|
-|Length:|7|4|5|
-|Contents:|year|month|day|
-|Value Range:|0-119|1-12|1-31|
-||(relative to 1980)|||
+| Bit position: | 0 1 2 3 4 5 6 | 7 8 9 A | B C D E F |
+|---|---|---|---|
+| Length: | 7 | 4 | 5 |
+| Contents: | year | month | day |
+| Value Range: | 0-119 | 1-12 | 1-31 |
+| | (relative to 1980) | | |
## See also
-[Global Constants](../c-runtime-library/global-constants.md)
+[Global constants](./global-constants.md)
diff --git a/docs/c-runtime-library/a-sample-generic-text-program.md b/docs/c-runtime-library/a-sample-generic-text-program.md
index 0cf11e3a3d..95628a223a 100644
--- a/docs/c-runtime-library/a-sample-generic-text-program.md
+++ b/docs/c-runtime-library/a-sample-generic-text-program.md
@@ -5,7 +5,7 @@ ms.date: "11/04/2016"
helpviewer_keywords: ["_TCHAR type", "mappings, TCHAR.H data types", "generic-text example [CRT]", "TCHAR type", "TCHAR.H data types, mapping"]
ms.assetid: a03de0db-8118-4bd9-a03f-640e8dfc5ed3
---
-# A Sample Generic-Text Program
+# A sample generic-text program
**Microsoft Specific**
@@ -87,7 +87,7 @@ int __cdecl main(int argc, char **argv, char **envp)
}
```
-If `_UNICODE` has been defined, GENTEXT.C maps to the following Unicode version of the program. For more information about using `wmain` in Unicode programs as a replacement for `main`, see [Using wmain](../c-language/using-wmain.md) in *C Language Reference*.
+If `_UNICODE` has been defined, GENTEXT.C maps to the following Unicode version of the program. For more information about using `wmain` in Unicode programs as a replacement for `main`, see [Using `wmain`](../c-language/using-wmain.md) in *C Language Reference*.
```C
// crt_unicgtxt.c
@@ -125,7 +125,7 @@ int __cdecl wmain(int argc, wchar_t **argv, wchar_t **envp)
}
```
-If neither `_MBCS` nor `_UNICODE` has been defined, GENTEXT.C maps to single-byte ASCII code, as follows:
+If `_MBCS` or `_UNICODE` hasn't been defined, GENTEXT.C maps to single-byte ASCII code, as follows:
```C
// crt_sbcsgtxt.c
@@ -166,8 +166,8 @@ int __cdecl main(int argc, char **argv, char **envp)
## See also
-[Generic-Text Mappings](../c-runtime-library/generic-text-mappings.md)
-[Data Type Mappings](../c-runtime-library/data-type-mappings.md)
-[Constant and Global Variable Mappings](../c-runtime-library/constant-and-global-variable-mappings.md)
-[Routine Mappings](../c-runtime-library/routine-mappings.md)
-[Using Generic-Text Mappings](../c-runtime-library/using-generic-text-mappings.md)
+[Generic-text mappings](./generic-text-mappings.md)\
+[Data type mappings](./data-type-mappings.md)\
+[Constant and global variable mappings](./constant-and-global-variable-mappings.md)\
+[Routine mappings](./routine-mappings.md)\
+[Using generic-text mappings](./using-generic-text-mappings.md)
diff --git a/docs/c-runtime-library/abnormal-termination.md b/docs/c-runtime-library/abnormal-termination.md
index 7bbfc9cb6a..f513fc45d1 100644
--- a/docs/c-runtime-library/abnormal-termination.md
+++ b/docs/c-runtime-library/abnormal-termination.md
@@ -6,11 +6,11 @@ api_name: ["_abnormal_termination"]
api_location: ["msvcr110.dll", "msvcr110_clr0400.dll", "msvcr90.dll", "msvcr120.dll", "msvcrt.dll", "msvcr80.dll", "msvcr100.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
-f1_keywords: ["_abnormal_termination"]
+f1_keywords: ["_abnormal_termination", "EXCPT/_abnormal_termination"]
helpviewer_keywords: ["_abnormal_termination"]
ms.assetid: 952970a4-9586-4c3d-807a-db729448c91c
---
-# _abnormal_termination
+# `_abnormal_termination`
Indicates whether the **`__finally`** block of a [try-finally statement](../cpp/try-finally-statement.md) is entered while the system is executing an internal list of termination handlers.
@@ -21,19 +21,19 @@ int _abnormal_termination(
);
```
-## Return Value
+## Return value
-**`true`** if the system is *unwinding* the stack; otherwise, **`false`**.
+**`true`** if the system is unwinding the stack; otherwise, **`false`**.
## Remarks
-This is an internal function used to manage unwinding exceptions, and is not intended to be called from user code.
+**`_abnormal_termination`** is an internal function used to manage unwinding exceptions, and isn't intended to be called from user code.
## Requirements
-|Routine|Required header|
-|-------------|---------------------|
-|_abnormal_termination|excpt.h|
+| Routine | Required header |
+|---|---|
+| **`_abnormal_termination`** | `
-[Global Constants](../c-runtime-library/global-constants.md)
+[Stream I/O](./stream-i-o.md)\
+[Global constants](./global-constants.md)
diff --git a/docs/c-runtime-library/byte-and-wide-streams.md b/docs/c-runtime-library/byte-and-wide-streams.md
index 840a11276c..8ef801bf6c 100644
--- a/docs/c-runtime-library/byte-and-wide-streams.md
+++ b/docs/c-runtime-library/byte-and-wide-streams.md
@@ -3,19 +3,17 @@ title: "Byte and Wide Streams"
description: "An overview of byte streams in the Microsoft C runtime library."
ms.date: "11/04/2016"
ms.topic: "conceptual"
-f1_keywords: ["Byte and Wide Streams"]
helpviewer_keywords: ["byte streams", "wide streams"]
-ms.assetid: 61ef0587-4cbc-4eb8-aae5-4c298dbbc6f9
---
-# Byte and Wide Streams
+# Byte and wide streams
A byte stream treats a file as a sequence of bytes. Within the program, the stream is the identical sequence of bytes.
-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](../c-runtime-library/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` subsequently changes.
+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](../c-runtime-library/reference/fgetpos.md), and the only reliable way to restore a position obtained this way is by calling [fsetpos](../c-runtime-library/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
-[Files and Streams](../c-runtime-library/files-and-streams.md)
-[setlocale, _wsetlocale](../c-runtime-library/reference/setlocale-wsetlocale.md)
+[Files and streams](./files-and-streams.md)\
+[`setlocale`, `_wsetlocale`](./reference/setlocale-wsetlocale.md)
diff --git a/docs/c-runtime-library/byte-classification.md b/docs/c-runtime-library/byte-classification.md
index d42e37c2df..46fd6bbbac 100644
--- a/docs/c-runtime-library/byte-classification.md
+++ b/docs/c-runtime-library/byte-classification.md
@@ -8,7 +8,7 @@ ms.assetid: 1cb52d71-fb0c-46ca-aad7-6472c1103370
---
# Byte classification
-Each of these routines tests a specified byte of a multibyte character for satisfaction of a condition. Except where specified otherwise, the output value is affected by the setting of the `LC_CTYPE` category setting of the locale. For more information, see [`setlocale`](../c-runtime-library/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.
+Each of these routines tests a specified byte of a multibyte character for satisfaction of a condition. Except where specified otherwise, the output value is affected by the setting of 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.
> [!NOTE]
> By definition, the ASCII characters between 0 and 127 are a subset of all multibyte-character sets. For example, the Japanese katakana character set includes ASCII as well as non-ASCII characters.
@@ -19,26 +19,26 @@ The predefined constants in the following table are defined in `
+*`buffer`*\
Storage location for data.
-## Return Value
+## Return value
-`_cgets` and `_cgetws` return a pointer to the start of the string, at `buffer[2]`. If `buffer` is **NULL**, these functions invoke the invalid parameter handler, as described in [Parameter Validation](../c-runtime-library/parameter-validation.md). If execution is allowed to continue, they return **NULL** and set `errno` to `EINVAL`.
+**`_cgets`** and **`_cgetws`** return a pointer to the start of the string, at `buffer[2]`. If *`buffer`* is `NULL`, these functions invoke the invalid parameter handler, as described in [Parameter validation](./parameter-validation.md). If execution is allowed to continue, they return `NULL` and set `errno` to `EINVAL`.
## Remarks
-These functions read a string of characters from the console and store the string and its length in the location pointed to by `buffer`. The `buffer` parameter must be a pointer to a character array. The first element of the array, `buffer[0]`, must contain the maximum length (in characters) of the string to be read. The array must contain enough elements to hold the string, a terminating null character ('\0'), and 2 additional bytes. The function reads characters until a carriage return-line feed (CR-LF) combination or the specified number of characters is read. The string is stored starting at `buffer[2]`. If the function reads a CR-LF, it stores the null character ('\0'). The function then stores the actual length of the string in the second array element, `buffer[1]`.
+These functions read a string of characters from the console and store the string and its length in the location pointed to by *`buffer`*. The *`buffer`* parameter must be a pointer to a character array. The first element of the array, `buffer[0]`, must contain the maximum length (in characters) of the string to be read. The array must contain enough elements to hold the string, a terminating null character ('\0'), and 2 extra bytes. The function reads characters until a carriage return-line feed (CR-LF) combination or the specified number of characters is read. The string is stored starting at `buffer[2]`. If the function reads a CR-LF, it stores the null character ('\0'). The function then stores the actual length of the string in the second array element, `buffer[1]`.
-Because all editing keys are active when `_cgets` or `_cgetws` is called while in a console window, pressing the F3 key repeats the last entered entry.
+Because all editing keys are active when **`_cgets`** or **`_cgetws`** is called while in a console window, pressing the F3 key repeats the last entered entry.
-In C++, these functions have template overloads that invoke the newer, secure counterparts of these functions. For more information, see [Secure Template Overloads](../c-runtime-library/secure-template-overloads.md).
+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).
-By default, this function's global state is scoped to the application. To change this, see [Global state in the CRT](global-state.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 routine mappings
-|Tchar.h routine|_UNICODE and _MBCS not defined|_MBCS defined|_UNICODE defined|
-|---------------------|--------------------------------------|--------------------|-----------------------|
-|`_cgetts`|`_cgets`|`_cgets`|`_cgetws`|
+| Tchar.h routine | `_UNICODE` and `_MBCS` not defined | `_MBCS` defined | `_UNICODE` defined |
+|---|---|---|---|
+| `_cgetts` | **`_cgets`** | **`_cgets`** | **`_cgetws`** |
## Requirements
-|Routine|Required header|
-|-------------|---------------------|
-|`_cgets`|\
-[_getch, _getwch](../c-runtime-library/reference/getch-getwch.md)
+[Console and port I/O](./console-and-port-i-o.md)\
+[`_getch`, `_getwch`](./reference/getch-getwch.md)
diff --git a/docs/c-runtime-library/character-classification.md b/docs/c-runtime-library/character-classification.md
index db0eff2bc3..3a040c99cc 100644
--- a/docs/c-runtime-library/character-classification.md
+++ b/docs/c-runtime-library/character-classification.md
@@ -6,11 +6,11 @@ f1_keywords: ["c.types.character"]
helpviewer_keywords: ["character classification routines", "characters, testing"]
ms.assetid: 3b6c8f0b-9701-407a-b384-9086698773f5
---
-# Character Classification
+# Character classification
-Each of these routines tests a specified single-byte character, wide character, or multibyte character for satisfaction of a condition. (By definition, the ASCII character set between 0 and 127 are a subset of all multibyte-character sets. For example, Japanese katakana includes ASCII as well as non-ASCII characters.)
+Each of these routines tests a specified single-byte character, wide character, or multibyte character for satisfaction of a condition. (By definition, the ASCII character set between 0 and 127 are a subset of all multibyte-character sets. For example, Japanese katakana includes both ASCII and non-ASCII characters.)
-The test conditions are affected by the setting of the **LC_CTYPE** category setting of the locale; see [setlocale](../c-runtime-library/reference/setlocale-wsetlocale.md) for more information. 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 test conditions are affected by the setting of 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.
Generally these routines execute faster than tests you might write and should be favored over. For example, the following code executes slower than a call to `isalpha(c)`:
@@ -19,36 +19,36 @@ if ((c >= 'A') && (c <= 'Z')) || ((c >= 'a') && (c <= 'z'))
return TRUE;
```
-## Character-Classification Routines
-
-|Routine|Character test condition|
-|-------------|------------------------------|
-|[isalnum, iswalnum, _isalnum_l, _iswalnum_l](../c-runtime-library/reference/isalnum-iswalnum-isalnum-l-iswalnum-l.md), [_ismbcalnum, _ismbcalnum_l, _ismbcalpha, _ismbcalpha_l, _ismbcdigit, _ismbcdigit_l](../c-runtime-library/reference/ismbcalnum-functions.md)|Alphanumeric|
-|[_ismbcalnum, _ismbcalnum_l, _ismbcalpha, _ismbcalpha_l, _ismbcdigit, _ismbcdigit_l](../c-runtime-library/reference/ismbcalnum-functions.md)|Multibyte alphanumeric|
-|[isalpha, iswalpha, _isalpha_l, _iswalpha_l](../c-runtime-library/reference/isalpha-iswalpha-isalpha-l-iswalpha-l.md), [_ismbcalnum, _ismbcalnum_l, _ismbcalpha, _ismbcalpha_l, _ismbcdigit, _ismbcdigit_l](../c-runtime-library/reference/ismbcalnum-functions.md)|Alphabetic|
-|[isascii, __isascii, iswascii](../c-runtime-library/reference/isascii-isascii-iswascii.md)|ASCII|
-|[isblank, iswblank, _isblank_l, _iswblank_l](../c-runtime-library/reference/isblank-iswblank-isblank-l-iswblank-l.md), [_ismbcsblank, _ismbcsblank_l](../c-runtime-library/reference/ismbcgraph-functions.md)|Blank (space or horizontal tab)|
-|[iscntrl, iswcntrl, _iscntrl_l, _iswcntrl_l](../c-runtime-library/reference/iscntrl-iswcntrl-iscntrl-l-iswcntrl-l.md)|Control|
-|[iscsym, iscsymf, __iscsym, \__iswcsym, \__iscsymf, \__iswcsymf, _iscsym_l, _iswcsym_l, _iscsymf_l, _iswcsymf_l](../c-runtime-library/reference/iscsym-functions.md)|Letter, underscore, or digit|
-|[iscsym, iscsymf, __iscsym, \__iswcsym, \__iscsymf, \__iswcsymf, _iscsym_l, _iswcsym_l, _iscsymf_l, _iswcsymf_l](../c-runtime-library/reference/iscsym-functions.md)|Letter or underscore|
-|[isdigit, iswdigit, _isdigit_l, _iswdigit_l](../c-runtime-library/reference/isdigit-iswdigit-isdigit-l-iswdigit-l.md), [_ismbcalnum, _ismbcalnum_l, _ismbcalpha, _ismbcalpha_l, _ismbcdigit, _ismbcdigit_l](../c-runtime-library/reference/ismbcalnum-functions.md)|Decimal digit|
-|[isgraph, iswgraph, _isgraph_l, _iswgraph_l](../c-runtime-library/reference/isgraph-iswgraph-isgraph-l-iswgraph-l.md), [_ismbcgraph, _ismbcgraph_l, _ismbcprint, _ismbcprint_l, _ismbcpunct, _ismbcpunct_l, _ismbcblank, _ismbcblank_l, _ismbcspace, _ismbcspace_l](../c-runtime-library/reference/ismbcgraph-functions.md)|Printable other than space|
-|[islower, iswlower, _islower_l, _iswlower_l](../c-runtime-library/reference/islower-iswlower-islower-l-iswlower-l.md), [_ismbclower, _ismbclower_l, _ismbcupper, _ismbcupper_l](../c-runtime-library/reference/ismbclower-ismbclower-l-ismbcupper-ismbcupper-l.md)|Lowercase|
-|[_ismbchira, _ismbchira_l, _ismbckata, _ismbckata_l](../c-runtime-library/reference/ismbchira-ismbchira-l-ismbckata-ismbckata-l.md)|Hiragana|
-|[_ismbchira, _ismbchira_l, _ismbckata, _ismbckata_l](../c-runtime-library/reference/ismbchira-ismbchira-l-ismbckata-ismbckata-l.md)|Katakana|
-|[_ismbclegal, _ismbclegal_l, _ismbcsymbol, _ismbcsymbol_l](../c-runtime-library/reference/ismbclegal-ismbclegal-l-ismbcsymbol-ismbcsymbol-l.md)|Legal multibyte character|
-|[_ismbcl0, _ismbcl0_l, _ismbcl1, _ismbcl1_l, _ismbcl2, _ismbcl2_l](../c-runtime-library/reference/ismbcl0-ismbcl0-l-ismbcl1-ismbcl1-l-ismbcl2-ismbcl2-l.md)|Japan-level 0 multibyte character|
-|[_ismbcl0, _ismbcl0_l, _ismbcl1, _ismbcl1_l, _ismbcl2, _ismbcl2_l](../c-runtime-library/reference/ismbcl0-ismbcl0-l-ismbcl1-ismbcl1-l-ismbcl2-ismbcl2-l.md)|Japan-level 1 multibyte character|
-|[_ismbcl0, _ismbcl0_l, _ismbcl1, _ismbcl1_l, _ismbcl2, _ismbcl2_l](../c-runtime-library/reference/ismbcl0-ismbcl0-l-ismbcl1-ismbcl1-l-ismbcl2-ismbcl2-l.md)|Japan-level 2 multibyte character|
-|[_ismbclegal, _ismbclegal_l, _ismbcsymbol, _ismbcsymbol_l](../c-runtime-library/reference/ismbclegal-ismbclegal-l-ismbcsymbol-ismbcsymbol-l.md)|Non-alphanumeric multibyte character|
-|[isprint, iswprint, _isprint_l, _iswprint_l](../c-runtime-library/reference/isprint-iswprint-isprint-l-iswprint-l.md), [_ismbcgraph, _ismbcgraph_l, _ismbcprint, _ismbcprint_l, _ismbcpunct, _ismbcpunct_l, _ismbcblank, _ismbcblank_l, _ismbcspace, _ismbcspace_l](../c-runtime-library/reference/ismbcgraph-functions.md)|Printable|
-|[ispunct, iswpunct, _ispunct_l, _iswpunct_l](../c-runtime-library/reference/ispunct-iswpunct-ispunct-l-iswpunct-l.md), [_ismbcgraph, _ismbcgraph_l, _ismbcprint, _ismbcprint_l, _ismbcpunct, _ismbcpunct_l, _ismbcblank, _ismbcblank_l, _ismbcspace, _ismbcspace_l](../c-runtime-library/reference/ismbcgraph-functions.md)|Punctuation|
-|[isspace, iswspace, _isspace_l, _iswspace_l](../c-runtime-library/reference/isspace-iswspace-isspace-l-iswspace-l.md), [_ismbcgraph, _ismbcgraph_l, _ismbcprint, _ismbcprint_l, _ismbcpunct, _ismbcpunct_l, _ismbcblank, _ismbcblank_l, _ismbcspace, _ismbcspace_l](../c-runtime-library/reference/ismbcgraph-functions.md)|White-space|
-|[isupper, iswupper](../c-runtime-library/reference/isupper-isupper-l-iswupper-iswupper-l.md), [_ismbclower, _ismbclower_l, _ismbcupper, _ismbcupper_l](../c-runtime-library/reference/ismbclower-ismbclower-l-ismbcupper-ismbcupper-l.md)|Uppercase|
-|[_isctype, iswctype, _isctype_l, _iswctype_l](../c-runtime-library/reference/isctype-iswctype-isctype-l-iswctype-l.md)|Property specified by *desc* argument|
-|[isxdigit, iswxdigit, _isxdigit_l, _iswxdigit_l](../c-runtime-library/reference/isxdigit-iswxdigit-isxdigit-l-iswxdigit-l.md)|Hexadecimal digit|
-|[_mbclen, mblen, _mblen_l](../c-runtime-library/reference/mbclen-mblen-mblen-l.md)|Return length of valid multibyte character; result depends on **LC_CTYPE** category setting of current locale|
+## Character-classification routines
+
+| Routine | Character test condition |
+|---|---|
+| [`isalnum`, `iswalnum`, `_isalnum_l`, `_iswalnum_l`](./reference/isalnum-iswalnum-isalnum-l-iswalnum-l.md), [`_ismbcalnum`, `_ismbcalnum_l`, `_ismbcalpha`, `_ismbcalpha_l`, `_ismbcdigit`, `_ismbcdigit_l`](./reference/ismbcalnum-functions.md) | Alphanumeric |
+| [`_ismbcalnum`, `_ismbcalnum_l`, `_ismbcalpha`, `_ismbcalpha_l`, `_ismbcdigit`, `_ismbcdigit_l`](./reference/ismbcalnum-functions.md) | Multibyte alphanumeric |
+| [`isalpha`, `iswalpha`, `_isalpha_l`, `_iswalpha_l`](./reference/isalpha-iswalpha-isalpha-l-iswalpha-l.md), [`_ismbcalnum`, `_ismbcalnum_l`, `_ismbcalpha`, `_ismbcalpha_l`, `_ismbcdigit`, `_ismbcdigit_l`](./reference/ismbcalnum-functions.md) | Alphabetic |
+| [`isascii`, `__isascii`, `iswascii`](./reference/isascii-isascii-iswascii.md) | ASCII |
+| [`isblank`, `iswblank`, `_isblank_l`, `_iswblank_l`](./reference/isblank-iswblank-isblank-l-iswblank-l.md), [`_ismbcsblank`, `_ismbcsblank_l`](./reference/ismbcgraph-functions.md) | Blank (space or horizontal tab) |
+| [`iscntrl`, `iswcntrl`, `_iscntrl_l`, `_iswcntrl_l`](./reference/iscntrl-iswcntrl-iscntrl-l-iswcntrl-l.md) | Control |
+| [`iscsym`, `iscsymf`, `__iscsym`, `__iswcsym`, `__iscsymf`, `__iswcsymf`, `_iscsym_l`, `_iswcsym_l`, `_iscsymf_l`, `_iswcsymf_l`](./reference/iscsym-functions.md) | Letter, underscore, or digit |
+| [`iscsym`, `iscsymf`, `__iscsym`, `__iswcsym`, `__iscsymf`, `__iswcsymf`, `_iscsym_l`, `_iswcsym_l`, `_iscsymf_l`, `_iswcsymf_l`](./reference/iscsym-functions.md) | Letter or underscore |
+| [`isdigit`, `iswdigit`, `_isdigit_l`, `_iswdigit_l`](./reference/isdigit-iswdigit-isdigit-l-iswdigit-l.md), [`_ismbcalnum`, `_ismbcalnum_l`, `_ismbcalpha`, `_ismbcalpha_l`, `_ismbcdigit`, `_ismbcdigit_l`](./reference/ismbcalnum-functions.md) | Decimal digit |
+| [`isgraph`, `iswgraph`, `_isgraph_l`, `_iswgraph_l`](./reference/isgraph-iswgraph-isgraph-l-iswgraph-l.md), [`_ismbcgraph`, `_ismbcgraph_l`, `_ismbcprint`, `_ismbcprint_l`, `_ismbcpunct`, `_ismbcpunct_l`, `_ismbcblank`, `_ismbcblank_l`, `_ismbcspace`, `_ismbcspace_l`](./reference/ismbcgraph-functions.md) | Printable other than space |
+| [`islower`, `iswlower`, `_islower_l`, `_iswlower_l`](./reference/islower-iswlower-islower-l-iswlower-l.md), [`_ismbclower`, `_ismbclower_l`, `_ismbcupper`, `_ismbcupper_l`](./reference/ismbclower-ismbclower-l-ismbcupper-ismbcupper-l.md) | Lowercase |
+| [`_ismbchira`, `_ismbchira_l`, `_ismbckata`, `_ismbckata_l`](./reference/ismbchira-ismbchira-l-ismbckata-ismbckata-l.md) | Hiragana |
+| [`_ismbchira`, `_ismbchira_l`, `_ismbckata`, `_ismbckata_l`](./reference/ismbchira-ismbchira-l-ismbckata-ismbckata-l.md) | Katakana |
+| [`_ismbclegal`, `_ismbclegal_l`, `_ismbcsymbol`, `_ismbcsymbol_l`](./reference/ismbclegal-ismbclegal-l-ismbcsymbol-ismbcsymbol-l.md) | Legal multibyte character |
+| [`_ismbcl0`, `_ismbcl0_l`, `_ismbcl1`, `_ismbcl1_l`, `_ismbcl2`, `_ismbcl2_l`](./reference/ismbcl0-ismbcl0-l-ismbcl1-ismbcl1-l-ismbcl2-ismbcl2-l.md) | Japan-level 0 multibyte character |
+| [`_ismbcl0`, `_ismbcl0_l`, `_ismbcl1`, `_ismbcl1_l`, `_ismbcl2`, `_ismbcl2_l`](./reference/ismbcl0-ismbcl0-l-ismbcl1-ismbcl1-l-ismbcl2-ismbcl2-l.md) | Japan-level 1 multibyte character |
+| [`_ismbcl0`, `_ismbcl0_l`, `_ismbcl1`, `_ismbcl1_l`, `_ismbcl2`, `_ismbcl2_l`](./reference/ismbcl0-ismbcl0-l-ismbcl1-ismbcl1-l-ismbcl2-ismbcl2-l.md) | Japan-level 2 multibyte character |
+| [`_ismbclegal`, `_ismbclegal_l`, `_ismbcsymbol`, `_ismbcsymbol_l`](./reference/ismbclegal-ismbclegal-l-ismbcsymbol-ismbcsymbol-l.md) | Non-alphanumeric multibyte character |
+| [`isprint`, `iswprint`, `_isprint_l`, `_iswprint_l`](./reference/isprint-iswprint-isprint-l-iswprint-l.md), [`_ismbcgraph`, `_ismbcgraph_l`, `_ismbcprint`, `_ismbcprint_l`, `_ismbcpunct`, `_ismbcpunct_l`, `_ismbcblank`, `_ismbcblank_l`, `_ismbcspace`, `_ismbcspace_l`](./reference/ismbcgraph-functions.md) | Printable |
+| [`ispunct`, `iswpunct`, `_ispunct_l`, `_iswpunct_l`](./reference/ispunct-iswpunct-ispunct-l-iswpunct-l.md), [`_ismbcgraph`, `_ismbcgraph_l`, `_ismbcprint`, `_ismbcprint_l`, `_ismbcpunct`, `_ismbcpunct_l`, `_ismbcblank`, `_ismbcblank_l`, `_ismbcspace`, `_ismbcspace_l`](./reference/ismbcgraph-functions.md) | Punctuation |
+| [`isspace`, `iswspace`, `_isspace_l`, `_iswspace_l`](./reference/isspace-iswspace-isspace-l-iswspace-l.md), [`_ismbcgraph`, `_ismbcgraph_l`, `_ismbcprint`, `_ismbcprint_l`, `_ismbcpunct`, `_ismbcpunct_l`, `_ismbcblank`, `_ismbcblank_l`, `_ismbcspace`, `_ismbcspace_l`](./reference/ismbcgraph-functions.md) | White-space |
+| [`isupper`, `iswupper`](./reference/isupper-isupper-l-iswupper-iswupper-l.md), [`_ismbclower`, `_ismbclower_l`, `_ismbcupper`, `_ismbcupper_l`](./reference/ismbclower-ismbclower-l-ismbcupper-ismbcupper-l.md) | Uppercase |
+| [`_isctype`, `iswctype`, `_isctype_l`, `_iswctype_l`](./reference/isctype-iswctype-isctype-l-iswctype-l.md) | Property specified by *`desc`* argument |
+| [`isxdigit`, `iswxdigit`, `_isxdigit_l`, `_iswxdigit_l`](./reference/isxdigit-iswxdigit-isxdigit-l-iswxdigit-l.md) | Hexadecimal digit |
+| [`_mbclen`, `mblen`, `_mblen_l`](./reference/mbclen-mblen-mblen-l.md) | Return length of valid multibyte character; result depends on `LC_CTYPE` category setting of current locale |
## See also
-[Universal C runtime routines by category](../c-runtime-library/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/ciatan.md b/docs/c-runtime-library/ciatan.md
index 73494e71d9..35d6549103 100644
--- a/docs/c-runtime-library/ciatan.md
+++ b/docs/c-runtime-library/ciatan.md
@@ -3,14 +3,14 @@ description: "Learn more about: _CIatan"
title: "_CIatan"
ms.date: "4/2/2020"
api_name: ["_CIatan", "_o__CIatan"]
-api_location: ["msvcr120.dll", "msvcr110.dll", "msvcrt.dll", "msvcr80.dll", "msvcr100.dll", "msvcr90.dll", "msvcr110_clr0400.dll", "api-ms-win-crt-math-l1-1-0.dll", "api-ms-win-crt-private-l1-1-0.dll"]
+api_location: ["msvcr120.dll", "msvcr110.dll", "msvcrt.dll", "msvcr80.dll", "msvcr100.dll", "msvcr90.dll", "msvcr110_clr0400.dll", "api-ms-win-crt-math-l1-1-0.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
f1_keywords: ["_CIatan", "CIatan"]
helpviewer_keywords: ["CIatan intrinsic", "_CIatan intrinsic"]
ms.assetid: 3baa0429-fe46-4bab-8b00-868e2186dc8c
---
-# _CIatan
+# `_CIatan`
Calculates the arctangent of the top value on the stack.
@@ -26,7 +26,7 @@ This version of the `atan` function has a specialized calling convention that th
The resulting value is pushed onto the top of the stack.
-By default, this function's global state is scoped to the application. To change this, see [Global state in the CRT](global-state.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).
## Requirements
@@ -34,5 +34,5 @@ By default, this function's global state is scoped to the application. To change
## See also
-[Alphabetical Function Reference](../c-runtime-library/reference/crt-alphabetical-function-reference.md)
-[atan, atanf, atanl, atan2, atan2f, atan2l](../c-runtime-library/reference/atan-atanf-atanl-atan2-atan2f-atan2l.md)
+[Alphabetical function reference](./reference/crt-alphabetical-function-reference.md)\
+[`atan`, `atanf`, `atanl`, `atan2`, `atan2f`, `atan2l`](./reference/atan-atanf-atanl-atan2-atan2f-atan2l.md)
diff --git a/docs/c-runtime-library/ciatan2.md b/docs/c-runtime-library/ciatan2.md
index 832d7261ac..d0f9ab04c6 100644
--- a/docs/c-runtime-library/ciatan2.md
+++ b/docs/c-runtime-library/ciatan2.md
@@ -3,16 +3,16 @@ description: "Learn more about: _CIatan2"
title: "_CIatan2"
ms.date: "4/2/2020"
api_name: ["_CIatan2", "_o__CIatan2"]
-api_location: ["msvcr80.dll", "msvcrt.dll", "msvcr120.dll", "msvcr110_clr0400.dll", "msvcr110.dll", "msvcr100.dll", "msvcr90.dll", "api-ms-win-crt-math-l1-1-0.dll", "api-ms-win-crt-private-l1-1-0.dll"]
+api_location: ["msvcr80.dll", "msvcrt.dll", "msvcr120.dll", "msvcr110_clr0400.dll", "msvcr110.dll", "msvcr100.dll", "msvcr90.dll", "api-ms-win-crt-math-l1-1-0.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
f1_keywords: ["CIatan2", "_CIatan2"]
helpviewer_keywords: ["_CIatan2 intrinsic", "CIatan2 intrinsic"]
ms.assetid: 31f8cc78-b79f-4576-b73b-8add18e08680
---
-# _CIatan2
+# `_CIatan2`
-Calculates the arctangent of *x* / *y* where *x* and *y* are values on the top of the stack.
+Calculates the arctangent of *`x`* / *`y`* where *`x`* and *`y`* are values on the top of the stack.
## Syntax
@@ -26,7 +26,7 @@ This version of the `atan2` function has a specialized calling convention that t
The resulting value is pushed onto the top of the stack.
-By default, this function's global state is scoped to the application. To change this, see [Global state in the CRT](global-state.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).
## Requirements
@@ -34,5 +34,5 @@ By default, this function's global state is scoped to the application. To change
## See also
-[Alphabetical Function Reference](../c-runtime-library/reference/crt-alphabetical-function-reference.md)
-[atan, atanf, atanl, atan2, atan2f, atan2l](../c-runtime-library/reference/atan-atanf-atanl-atan2-atan2f-atan2l.md)
+[Alphabetical function reference](./reference/crt-alphabetical-function-reference.md)\
+[`atan`, `atanf`, `atanl`, `atan2`, `atan2f`, `atan2l`](./reference/atan-atanf-atanl-atan2-atan2f-atan2l.md)
diff --git a/docs/c-runtime-library/cicos.md b/docs/c-runtime-library/cicos.md
index e9e4751094..d84df02680 100644
--- a/docs/c-runtime-library/cicos.md
+++ b/docs/c-runtime-library/cicos.md
@@ -3,14 +3,14 @@ description: "Learn more about: _CIcos"
title: "_CIcos"
ms.date: "4/2/2020"
api_name: ["_CIcos", "_o__CIcos"]
-api_location: ["msvcr90.dll", "msvcrt.dll", "msvcr120.dll", "msvcr100.dll", "msvcr80.dll", "msvcr110_clr0400.dll", "msvcr110.dll", "api-ms-win-crt-math-l1-1-0.dll", "api-ms-win-crt-private-l1-1-0.dll"]
+api_location: ["msvcr90.dll", "msvcrt.dll", "msvcr120.dll", "msvcr100.dll", "msvcr80.dll", "msvcr110_clr0400.dll", "msvcr110.dll", "api-ms-win-crt-math-l1-1-0.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
f1_keywords: ["CIcos", "_CIcos"]
helpviewer_keywords: ["_CIcos intrinsic", "CIcos intrinsic"]
ms.assetid: 6fc203fb-66f3-4ead-9784-f85833c26f1b
---
-# _CIcos
+# `_CIcos`
Calculates the cosine of the top value in the floating-point stack.
@@ -22,11 +22,11 @@ void __cdecl _CIcos();
## Remarks
-This version of the [cos](../c-runtime-library/reference/cos-cosf-cosl.md) function has a specialized calling convention that the compiler understands. It speeds up the execution because it prevents copies from being generated and helps with register allocation.
+This version of the [`cos`](./reference/cos-cosf-cosl.md) function has a specialized calling convention that the compiler understands. It speeds up the execution because it prevents copies from being generated and helps with register allocation.
The resulting value is pushed onto the top of the floating-point stack.
-By default, this function's global state is scoped to the application. To change this, see [Global state in the CRT](global-state.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).
## Requirements
@@ -34,5 +34,5 @@ By default, this function's global state is scoped to the application. To change
## See also
-[Alphabetical Function Reference](../c-runtime-library/reference/crt-alphabetical-function-reference.md)
-[cos, cosf, cosl](../c-runtime-library/reference/cos-cosf-cosl.md)
+[Alphabetical function reference](./reference/crt-alphabetical-function-reference.md)\
+[`cos`, `cosf`, `cosl`](./reference/cos-cosf-cosl.md)
diff --git a/docs/c-runtime-library/ciexp.md b/docs/c-runtime-library/ciexp.md
index 9b2004f03a..0fd7e1227a 100644
--- a/docs/c-runtime-library/ciexp.md
+++ b/docs/c-runtime-library/ciexp.md
@@ -3,14 +3,14 @@ description: "Learn more about: _CIexp"
title: "_CIexp"
ms.date: "4/2/2020"
api_name: ["_CIexp", "_o__CIexp"]
-api_location: ["msvcr120.dll", "msvcr80.dll", "msvcr110.dll", "msvcr100.dll", "msvcrt.dll", "msvcr110_clr0400.dll", "msvcr90.dll", "api-ms-win-crt-math-l1-1-0.dll", "api-ms-win-crt-private-l1-1-0.dll"]
+api_location: ["msvcr120.dll", "msvcr80.dll", "msvcr110.dll", "msvcr100.dll", "msvcrt.dll", "msvcr110_clr0400.dll", "msvcr90.dll", "api-ms-win-crt-math-l1-1-0.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
f1_keywords: ["CIexp", "_CIexp"]
helpviewer_keywords: ["CIexp intrinsic", "_CIexp intrinsic"]
ms.assetid: f8a3e3b7-fa57-41a3-9983-6c81914cbb55
---
-# _CIexp
+# `_CIexp`
Calculates the exponential of the top value on the stack.
@@ -26,7 +26,7 @@ This version of the `exp` function has a specialized calling convention that the
The resulting value is pushed onto the top of the stack.
-By default, this function's global state is scoped to the application. To change this, see [Global state in the CRT](global-state.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).
## Requirements
@@ -34,5 +34,5 @@ By default, this function's global state is scoped to the application. To change
## See also
-[Alphabetical Function Reference](../c-runtime-library/reference/crt-alphabetical-function-reference.md)
-[exp, expf, expl](../c-runtime-library/reference/exp-expf.md)
+[Alphabetical function reference](./reference/crt-alphabetical-function-reference.md)\
+[`exp`, `expf`, `expl`](./reference/exp-expf.md)
diff --git a/docs/c-runtime-library/cifmod.md b/docs/c-runtime-library/cifmod.md
index 3637973196..660a17bcb9 100644
--- a/docs/c-runtime-library/cifmod.md
+++ b/docs/c-runtime-library/cifmod.md
@@ -3,14 +3,14 @@ description: "Learn more about: _CIfmod"
title: "_CIfmod"
ms.date: "4/2/2020"
api_name: ["_CIfmod", "_o__CIfmod"]
-api_location: ["msvcrt.dll", "msvcr110_clr0400.dll", "msvcr100.dll", "msvcr80.dll", "msvcr90.dll", "msvcr120.dll", "msvcr110.dll", "api-ms-win-crt-math-l1-1-0.dll", "api-ms-win-crt-private-l1-1-0.dll"]
+api_location: ["msvcrt.dll", "msvcr110_clr0400.dll", "msvcr100.dll", "msvcr80.dll", "msvcr90.dll", "msvcr120.dll", "msvcr110.dll", "api-ms-win-crt-math-l1-1-0.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
f1_keywords: ["_CIfmod", "CIfmod"]
helpviewer_keywords: ["CIfmod intrinsic", "_CIfmod intrinsic"]
ms.assetid: 7c050653-7ec6-4810-b3a7-7a0057ea65ed
---
-# _CIfmod
+# `_CIfmod`
Calculates the floating-point remainder of the top two values on the stack.
@@ -26,7 +26,7 @@ This version of the `fmod` function has a specialized calling convention that th
The resulting value is pushed onto the top of the stack.
-By default, this function's global state is scoped to the application. To change this, see [Global state in the CRT](global-state.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).
## Requirements
@@ -34,5 +34,5 @@ By default, this function's global state is scoped to the application. To change
## See also
-[Alphabetical Function Reference](../c-runtime-library/reference/crt-alphabetical-function-reference.md)
-[fmod, fmodf](../c-runtime-library/reference/fmod-fmodf.md)
+[Alphabetical function reference](./reference/crt-alphabetical-function-reference.md)\
+[`fmod`, `fmodf`](./reference/fmod-fmodf.md)
diff --git a/docs/c-runtime-library/cilog.md b/docs/c-runtime-library/cilog.md
index 5071a255eb..229d1fb834 100644
--- a/docs/c-runtime-library/cilog.md
+++ b/docs/c-runtime-library/cilog.md
@@ -3,14 +3,14 @@ description: "Learn more about: _CIlog"
title: "_CIlog"
ms.date: "4/2/2020"
api_name: ["_CIlog", "_o__CIlog"]
-api_location: ["msvcr90.dll", "msvcr120.dll", "msvcr80.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr100.dll", "msvcrt.dll", "api-ms-win-crt-math-l1-1-0.dll", "api-ms-win-crt-private-l1-1-0.dll"]
+api_location: ["msvcr90.dll", "msvcr120.dll", "msvcr80.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr100.dll", "msvcrt.dll", "api-ms-win-crt-math-l1-1-0.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
f1_keywords: ["_CIlog", "CIlog"]
helpviewer_keywords: ["_CIlog intrinsic", "CIlog intrinsic"]
ms.assetid: 23503854-ddaa-4fe0-a4a3-7fbb3a43bdec
---
-# _CIlog
+# `_CIlog`
Calculates the natural logarithm of the top value in the stack.
@@ -26,7 +26,7 @@ This version of the `log` function has a specialized calling convention that the
The resulting value is pushed onto the top of the stack.
-By default, this function's global state is scoped to the application. To change this, see [Global state in the CRT](global-state.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).
## Requirements
@@ -34,5 +34,5 @@ By default, this function's global state is scoped to the application. To change
## See also
-[Alphabetical Function Reference](../c-runtime-library/reference/crt-alphabetical-function-reference.md)
-[log, logf, log10, log10f](../c-runtime-library/reference/log-logf-log10-log10f.md)
+[Alphabetical function reference](./reference/crt-alphabetical-function-reference.md)\
+[`log`, `logf`, `log10`, `log10f`](./reference/log-logf-log10-log10f.md)
diff --git a/docs/c-runtime-library/cilog10.md b/docs/c-runtime-library/cilog10.md
index be7c4fcf92..1c1447da3b 100644
--- a/docs/c-runtime-library/cilog10.md
+++ b/docs/c-runtime-library/cilog10.md
@@ -3,14 +3,14 @@ description: "Learn more about: _CIlog10"
title: "_CIlog10"
ms.date: "4/2/2020"
api_name: ["_CIlog10", "_o__CIlog10"]
-api_location: ["msvcr100.dll", "msvcr120.dll", "msvcr80.dll", "msvcr90.dll", "msvcr110_clr0400.dll", "msvcrt.dll", "msvcr110.dll", "api-ms-win-crt-math-l1-1-0.dll", "api-ms-win-crt-private-l1-1-0.dll"]
+api_location: ["msvcr100.dll", "msvcr120.dll", "msvcr80.dll", "msvcr90.dll", "msvcr110_clr0400.dll", "msvcrt.dll", "msvcr110.dll", "api-ms-win-crt-math-l1-1-0.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
f1_keywords: ["CIlog10", "_CIlog10"]
helpviewer_keywords: ["_CIlog10 intrinsic", "CIlog10 intrinsic"]
ms.assetid: 05d7fcaa-3cff-4cc5-8d44-015e7cacba24
---
-# _CIlog10
+# `_CIlog10`
Performs a `log10` operation on the top value in the stack.
@@ -26,7 +26,7 @@ This version of the `log10` function has a specialized calling convention that t
The resulting value is pushed onto the top of the stack.
-By default, this function's global state is scoped to the application. To change this, see [Global state in the CRT](global-state.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).
## Requirements
@@ -34,5 +34,5 @@ By default, this function's global state is scoped to the application. To change
## See also
-[Alphabetical Function Reference](../c-runtime-library/reference/crt-alphabetical-function-reference.md)
-[log, logf, log10, log10f](../c-runtime-library/reference/log-logf-log10-log10f.md)
+[Alphabetical function reference](./reference/crt-alphabetical-function-reference.md)\
+[`log`, `logf`, `log10`, `log10f`](./reference/log-logf-log10-log10f.md)
diff --git a/docs/c-runtime-library/cipow.md b/docs/c-runtime-library/cipow.md
index e375a887d1..6fe366afca 100644
--- a/docs/c-runtime-library/cipow.md
+++ b/docs/c-runtime-library/cipow.md
@@ -3,16 +3,16 @@ description: "Learn more about: _CIpow"
title: "_CIpow"
ms.date: "4/2/2020"
api_name: ["_CIpow", "_o__CIpow"]
-api_location: ["msvcr100.dll", "msvcr110.dll", "msvcr120.dll", "msvcr80.dll", "msvcr110_clr0400.dll", "msvcrt.dll", "msvcr90.dll", "api-ms-win-crt-math-l1-1-0.dll", "api-ms-win-crt-private-l1-1-0.dll"]
+api_location: ["msvcr100.dll", "msvcr110.dll", "msvcr120.dll", "msvcr80.dll", "msvcr110_clr0400.dll", "msvcrt.dll", "msvcr90.dll", "api-ms-win-crt-math-l1-1-0.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
f1_keywords: ["CIpow", "_CIpow"]
helpviewer_keywords: ["CIpow intrinsic", "_CIpow intrinsic"]
ms.assetid: 477aaf0c-ac58-4252-89dd-9f3e35d47536
---
-# _CIpow
+# `_CIpow`
-Calculates *x* raised to the *y* power based on the top values in the stack.
+Calculates *`x`* raised to the *`y`* power based on the top values in the stack.
## Syntax
@@ -26,7 +26,7 @@ This version of the `pow` function has a specialized calling convention that the
The resulting value is pushed onto the top of the stack.
-By default, this function's global state is scoped to the application. To change this, see [Global state in the CRT](global-state.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).
## Requirements
@@ -34,5 +34,5 @@ By default, this function's global state is scoped to the application. To change
## See also
-[Alphabetical Function Reference](../c-runtime-library/reference/crt-alphabetical-function-reference.md)
-[pow, powf, powl](../c-runtime-library/reference/pow-powf-powl.md)
+[Alphabetical function reference](./reference/crt-alphabetical-function-reference.md)\
+[`pow`, `powf`, `powl`](./reference/pow-powf-powl.md)
diff --git a/docs/c-runtime-library/cisin.md b/docs/c-runtime-library/cisin.md
index 10b73f0b9b..6eb5cf8f26 100644
--- a/docs/c-runtime-library/cisin.md
+++ b/docs/c-runtime-library/cisin.md
@@ -3,14 +3,14 @@ description: "Learn more about: _CIsin"
title: "_CIsin"
ms.date: "4/2/2020"
api_name: ["_CIsin", "_o__CIsin"]
-api_location: ["msvcr80.dll", "msvcr100.dll", "msvcrt.dll", "msvcr110.dll", "msvcr120.dll", "msvcr90.dll", "msvcr110_clr0400.dll", "api-ms-win-crt-math-l1-1-0.dll", "api-ms-win-crt-private-l1-1-0.dll"]
+api_location: ["msvcr80.dll", "msvcr100.dll", "msvcrt.dll", "msvcr110.dll", "msvcr120.dll", "msvcr90.dll", "msvcr110_clr0400.dll", "api-ms-win-crt-math-l1-1-0.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
f1_keywords: ["CIsin", "_CIsin"]
helpviewer_keywords: ["_CIsin intrinsic", "CIsin intrinsic"]
ms.assetid: f215f39a-2341-4f1c-ba8e-cb522451ceb2
---
-# _CIsin
+# `_CIsin`
Calculates the sine of the top value in the floating-point stack.
@@ -22,11 +22,11 @@ void __cdecl _CIsin();
## Remarks
-This intrinsic version of the [sin](../c-runtime-library/reference/sin-sinf-sinl.md) function has a specialized calling convention that the compiler understands. It speeds up the execution because it prevents copies from being generated and helps with register allocation.
+This intrinsic version of the [`sin`](./reference/sin-sinf-sinl.md) function has a specialized calling convention that the compiler understands. It speeds up the execution because it prevents copies from being generated and helps with register allocation.
The resulting value is pushed onto the top of the floating-point stack.
-By default, this function's global state is scoped to the application. To change this, see [Global state in the CRT](global-state.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).
## Requirements
@@ -34,5 +34,5 @@ By default, this function's global state is scoped to the application. To change
## See also
-[Alphabetical Function Reference](../c-runtime-library/reference/crt-alphabetical-function-reference.md)
-[sin, sinf, sinl](../c-runtime-library/reference/sin-sinf-sinl.md)
+[Alphabetical function reference](./reference/crt-alphabetical-function-reference.md)\
+[`sin`, `sinf`, `sinl`](./reference/sin-sinf-sinl.md)
diff --git a/docs/c-runtime-library/cisqrt.md b/docs/c-runtime-library/cisqrt.md
index a45c65c4c3..ab5f5e0a72 100644
--- a/docs/c-runtime-library/cisqrt.md
+++ b/docs/c-runtime-library/cisqrt.md
@@ -3,14 +3,14 @@ description: "Learn more about: _CIsqrt"
title: "_CIsqrt"
ms.date: "4/2/2020"
api_name: ["_CIsqrt", "_o__CIsqrt"]
-api_location: ["msvcr90.dll", "msvcr80.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcrt.dll", "msvcr110.dll", "msvcr100.dll", "api-ms-win-crt-math-l1-1-0.dll", "api-ms-win-crt-private-l1-1-0.dll"]
+api_location: ["msvcr90.dll", "msvcr80.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcrt.dll", "msvcr110.dll", "msvcr100.dll", "api-ms-win-crt-math-l1-1-0.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
f1_keywords: ["_CIsqrt", "CIsqrt"]
helpviewer_keywords: ["CIsqrt intrinsic", "_CIsqrt intrinsic"]
ms.assetid: 663548ea-398c-48ee-8397-a787c6ebb937
---
-# _CIsqrt
+# `_CIsqrt`
Calculates the square root of the top value in the stack.
@@ -26,7 +26,7 @@ This version of the `sqrt` function has a specialized calling convention that th
The resulting value is pushed onto the top of the stack.
-By default, this function's global state is scoped to the application. To change this, see [Global state in the CRT](global-state.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).
## Requirements
@@ -34,5 +34,5 @@ By default, this function's global state is scoped to the application. To change
## See also
-[Alphabetical Function Reference](../c-runtime-library/reference/crt-alphabetical-function-reference.md)
-[sqrt, sqrtf, sqrtl](../c-runtime-library/reference/sqrt-sqrtf-sqrtl.md)
+[Alphabetical function reference](./reference/crt-alphabetical-function-reference.md)\
+[`sqrt`, `sqrtf`, `sqrtl`](./reference/sqrt-sqrtf-sqrtl.md)
diff --git a/docs/c-runtime-library/citan.md b/docs/c-runtime-library/citan.md
index efd56c6653..25708828fe 100644
--- a/docs/c-runtime-library/citan.md
+++ b/docs/c-runtime-library/citan.md
@@ -3,14 +3,14 @@ description: "Learn more about: _CItan"
title: "_CItan"
ms.date: "4/2/2020"
api_name: ["_CItan", "_o__CItan"]
-api_location: ["msvcr100.dll", "msvcr110_clr0400.dll", "msvcr80.dll", "msvcrt.dll", "msvcr110.dll", "msvcr90.dll", "msvcr120.dll", "api-ms-win-crt-math-l1-1-0.dll", "api-ms-win-crt-private-l1-1-0.dll"]
+api_location: ["msvcr100.dll", "msvcr110_clr0400.dll", "msvcr80.dll", "msvcrt.dll", "msvcr110.dll", "msvcr90.dll", "msvcr120.dll", "api-ms-win-crt-math-l1-1-0.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
f1_keywords: ["_CItan", "CItan"]
helpviewer_keywords: ["CItan intrinsic", "_CItan intrinsic"]
ms.assetid: d1ea3113-50a2-45a6-b6bc-680fcdcc0928
---
-# _CItan
+# `_CItan`
Calculates the tangent of the top value on the floating-point stack.
@@ -22,11 +22,11 @@ void __cdecl _CItan();
## Remarks
-This version of the [tan](../c-runtime-library/reference/tan-tanf-tanl.md) function has a specialized calling convention that the compiler understands. The function speeds up the execution because it prevents copies from being generated and helps with register allocation.
+This version of the [`tan`](./reference/tan-tanf-tanl.md) function has a specialized calling convention that the compiler understands. The function speeds up the execution because it prevents copies from being generated and helps with register allocation.
The resulting value is pushed onto the top of the floating-point stack.
-By default, this function's global state is scoped to the application. To change this, see [Global state in the CRT](global-state.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).
## Requirements
@@ -34,5 +34,5 @@ By default, this function's global state is scoped to the application. To change
## See also
-[Alphabetical Function Reference](../c-runtime-library/reference/crt-alphabetical-function-reference.md)
-[tan, tanf, tanl](../c-runtime-library/reference/tan-tanf-tanl.md)
+[Alphabetical function reference](./reference/crt-alphabetical-function-reference.md)\
+[`tan`, `tanf`, `tanl`](./reference/tan-tanf-tanl.md)
diff --git a/docs/c-runtime-library/clocks-per-sec-clk-tck.md b/docs/c-runtime-library/clocks-per-sec-clk-tck.md
index 4c16e39eb3..927a19ef92 100644
--- a/docs/c-runtime-library/clocks-per-sec-clk-tck.md
+++ b/docs/c-runtime-library/clocks-per-sec-clk-tck.md
@@ -2,15 +2,15 @@
description: "Learn more about: CLOCKS_PER_SEC, CLK_TCK"
title: "CLOCKS_PER_SEC, CLK_TCK"
ms.date: "11/04/2016"
-f1_keywords: ["CLOCKS_PER_SEC", "CLK_TCK"]
+f1_keywords: ["CLOCKS_PER_SEC", "TIME/CLOCKS_PER_SEC", "CLK_TCK", "TIME/CLK_TCK"]
helpviewer_keywords: ["CLOCKS_PER_SEC", "CLK_TCK constant"]
ms.assetid: bc285106-383d-44cb-91bf-276ad7de57bf
---
-# CLOCKS_PER_SEC, CLK_TCK
+# `CLOCKS_PER_SEC`, `CLK_TCK`
## Syntax
-```
+```C
#include
-[Global Constants](../c-runtime-library/global-constants.md)
+[`clock`](./reference/clock.md)\
+[Global constants](./global-constants.md)
diff --git a/docs/c-runtime-library/code-pages.md b/docs/c-runtime-library/code-pages.md
index 677ae94612..e61fe0e5ee 100644
--- a/docs/c-runtime-library/code-pages.md
+++ b/docs/c-runtime-library/code-pages.md
@@ -6,7 +6,7 @@ ms.date: "11/04/2016"
helpviewer_keywords: ["character sets [C++], code pages", "ANSI [C++], code pages", "system-default code page", "multibyte code pages [C++]", "localization [C++], code pages", "code pages [C++], types of", "locale code pages [C++]"]
ms.assetid: 4a26fc42-185a-4add-98bf-a7b314ae6186
---
-# Code Pages
+# Code pages
A *code page* is a character set, which can include numbers, punctuation marks, and other glyphs. Different languages and locales may use different code pages. For example, ANSI code page 1252 is used for English and most European languages; OEM code page 932 is used for Japanese Kanji.
@@ -14,7 +14,7 @@ A code page can be represented in a table as a mapping of characters to single-b
The Microsoft runtime library uses the following types of code pages:
-- System-default ANSI code page. By default, at startup the runtime system automatically sets the multibyte code page to the system-default ANSI code page, which is obtained from the operating system. The call:
+- System-default ANSI code page. By default, at startup, the runtime system automatically sets the multibyte code page to the system-default ANSI code page, which is obtained from the operating system. The call:
```C
setlocale ( LC_ALL, "" );
@@ -22,13 +22,13 @@ The Microsoft runtime library uses the following types of code pages:
also sets the locale to the system-default ANSI code page.
-- Locale code page. The behavior of a number of run-time routines is dependent on the current locale setting, which includes the locale code page. (For more information, see [Locale-Dependent Routines](../c-runtime-library/locale.md).) By default, all locale-dependent routines in the Microsoft run-time library use the code page that corresponds to the "C" locale. At run time, you can change or query the locale code page in use with a call to [setlocale](../c-runtime-library/reference/setlocale-wsetlocale.md).
+- Locale code page. The behavior of several run-time routines is dependent on the current locale setting, which includes the locale code page. (For more information, see [Locale](./locale.md).) By default, all locale-dependent routines in the Microsoft run-time library use the code page that corresponds to the "C" locale. At run time, you can change or query the locale code page in use with a call to [`setlocale`](./reference/setlocale-wsetlocale.md).
-- Multibyte code page. The behavior of most of the multibyte-character routines in the run-time library depends on the current multibyte code page setting. By default, these routines use the system-default ANSI code page. At run-time you can query and change the multibyte code page with [_getmbcp](../c-runtime-library/reference/getmbcp.md) and [_setmbcp](../c-runtime-library/reference/setmbcp.md), respectively.
+- Multibyte code page. The behavior of most of the multibyte-character routines in the run-time library depends on the current multibyte code page setting. By default, these routines use the system-default ANSI code page. At run-time you can query and change the multibyte code page with [`_getmbcp`](./reference/getmbcp.md) and [`_setmbcp`](./reference/setmbcp.md), respectively.
-- The "C" locale is defined by ANSI to correspond to the locale in which C programs have traditionally executed. The code page for the "C" locale ("C" code page) corresponds to the ASCII character set. For example, in the "C" locale, **islower** returns true for the values 0x61 - 0x7A only. In another locale, **islower** may return `true` for these and other values, as defined by that locale.
+- The "C" locale is defined by ANSI to correspond to the locale in which C programs have traditionally executed. The code page for the "C" locale ("C" code page) corresponds to the ASCII character set. For example, in the "C" locale, `islower` returns true for the values 0x61 - 0x7A only. In another locale, `islower` may return `true` for these and other values, as defined by that locale.
## See also
-[Internationalization](../c-runtime-library/internationalization.md)\
-[Universal C runtime routines by category](../c-runtime-library/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/commit-to-disk-constants.md b/docs/c-runtime-library/commit-to-disk-constants.md
index 5ab2a097bc..9b0fd03de3 100644
--- a/docs/c-runtime-library/commit-to-disk-constants.md
+++ b/docs/c-runtime-library/commit-to-disk-constants.md
@@ -6,13 +6,13 @@ f1_keywords: ["vc.constants"]
helpviewer_keywords: ["commit-to-disk constants"]
ms.assetid: 0b903b23-b4fa-431e-a937-51d95f695ecf
---
-# Commit-To-Disk Constants
+# Commit-to-disk constants
**Microsoft Specific**
## Syntax
-```
+```C
#include
-[_fdopen, _wfdopen](../c-runtime-library/reference/fdopen-wfdopen.md)
-[fopen, _wfopen](../c-runtime-library/reference/fopen-wfopen.md)
-[Global Constants](../c-runtime-library/global-constants.md)
+[Stream I/O](./stream-i-o.md)\
+[`_fdopen`, `_wfdopen`](./reference/fdopen-wfdopen.md)\
+[`fopen`, `_wfopen`](./reference/fopen-wfopen.md)\
+[Global constants](./global-constants.md)
diff --git a/docs/c-runtime-library/compatibility.md b/docs/c-runtime-library/compatibility.md
index 124a06492e..45f753bf02 100644
--- a/docs/c-runtime-library/compatibility.md
+++ b/docs/c-runtime-library/compatibility.md
@@ -20,19 +20,19 @@ The UCRT also implements a large subset of the POSIX.1 (ISO/IEC 9945-1:1996, the
Functions specific to the Microsoft implementation of Visual C++ are found in the vcruntime library. Many of these functions are for internal use and can't be called by user code. Some are documented for use in debugging and implementation compatibility.
-The C++ standard reserves names that begin with an underscore in the global namespace to the implementation. Both the POSIX functions and Microsoft-specific runtime library functions are in the global namespace, but aren't part of the standard C runtime library. That's why the preferred Microsoft implementations of these functions have a leading underscore. For portability, the UCRT also supports the default names, but the Microsoft C++ compiler issues a deprecation warning when code that uses them is compiled. Only the default names are deprecated, not the functions themselves. To suppress the warning, define `_CRT_NONSTDC_NO_WARNINGS` before including any headers in code that uses the original POSIX names. Because the C standard doesn't allow non-standard names in header files, by default [`/std:c11`](../build/reference/std-specify-language-standard-version.md) and [`/std:c17`](../build/reference/std-specify-language-standard-version.md) don't expose the default names for POSIX functions, types, and macros. If these names are necessary, define `_CRT_DECLARE_NONSTDC_NAMES` to expose them.
+The C++ standard reserves names that begin with an underscore in the global namespace to the implementation. Both the POSIX functions and Microsoft-specific runtime library functions are in the global namespace, but aren't part of the standard C runtime library. It's why the preferred Microsoft implementations of these functions have a leading underscore. For portability, the UCRT also supports the default names, but the Microsoft C++ compiler issues a deprecation warning when code that uses them is compiled. Only the default names are deprecated, not the functions themselves. To suppress the warning, define `_CRT_NONSTDC_NO_WARNINGS` before including any headers in code that uses the original POSIX names. Because the C standard doesn't allow non-standard names in header files, by default [`/std:c11`](../build/reference/std-specify-language-standard-version.md) and [`/std:c17`](../build/reference/std-specify-language-standard-version.md) don't expose the default names for POSIX functions, types, and macros. If these names are necessary, define `_CRT_DECLARE_NONSTDC_NAMES` to expose them.
-Certain functions in the standard C library have a history of unsafe usage, because of misused parameters and unchecked buffers. These functions are often the source of security issues in code. Microsoft created a set of safer versions of these functions that verify parameter usage. They invoke the invalid parameter handler when an issue is detected at runtime. By default, the Microsoft C++ compiler issues a deprecation warning when a function is used that has a safer variant available. When you compile your code as C++, you can define `_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES` as 1 to eliminate most warnings. This macro enables template overloads to call the safer variants while maintaining portable source code. To suppress the warning, define `_CRT_SECURE_NO_WARNINGS` before including any headers in code that uses these functions. For more information, see [Security Features in the CRT](../c-runtime-library/security-features-in-the-crt.md).
+Certain functions in the standard C library have a history of unsafe usage, because of misused parameters and unchecked buffers. These functions are often the source of security issues in code. Microsoft created a set of safer versions of these functions that verify parameter usage. They invoke the invalid parameter handler when an issue is detected at runtime. By default, the Microsoft C++ compiler issues a deprecation warning when a function is used that has a safer variant available. When you compile your code as C++, you can define `_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES` as 1 to eliminate most warnings. This macro enables template overloads to call the safer variants while maintaining portable source code. To suppress the warning, define `_CRT_SECURE_NO_WARNINGS` before including any headers in code that uses these functions. For more information, see [Security features in the CRT](./security-features-in-the-crt.md).
Except as noted within the documentation for specific functions, the UCRT is compatible with the Windows API. Certain functions aren't supported in Windows Store or Universal Windows Platform ([UWP](/uwp)) apps. These functions are listed in [CRT functions not supported in Universal Windows Platform apps](../cppcx/crt-functions-not-supported-in-universal-windows-platform-apps.md).
-## Related Articles
+## Related articles
-|Title|Description|
-|-----------|-----------------|
-|[UWP Apps, the Windows Runtime, and the C runtime](../c-runtime-library/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](../c-runtime-library/ansi-c-compliance.md)|Describes standard-conforming names in the UCRT.|
-|[UNIX](../c-runtime-library/unix.md)|Provides guidelines for porting programs to UNIX.|
-|[Windows Platforms (CRT)](../c-runtime-library/windows-platforms-crt.md)|Lists the operating systems that are the CRT supports.|
-|[Backward Compatibility](../c-runtime-library/backward-compatibility.md)|Describes how to map old CRT names to the new ones.|
-|[C runtime (CRT) and C++ Standard Library (STL) `.lib` files](../c-runtime-library/crt-library-features.md)|Provides an overview of the CRT library (.lib) files and the associated compiler options.|
+| Title | Description |
+|---|---|
+| [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 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/complex-math-support.md b/docs/c-runtime-library/complex-math-support.md
index c158dc5752..218495fa17 100644
--- a/docs/c-runtime-library/complex-math-support.md
+++ b/docs/c-runtime-library/complex-math-support.md
@@ -7,23 +7,23 @@ helpviewer_keywords: ["complex numbers, math routines", "math routines", "comple
---
# C complex math support
-The Microsoft C Runtime library (CRT) provides complex math library functions, including all of those required by ISO C99. The compiler doesn't directly support a **`complex`** or **`_Complex`** keyword, therefore the Microsoft implementation uses structure types to represent complex numbers.
+The Microsoft C Runtime library (CRT) provides complex math library functions, including all of the ones required by ISO C99. The compiler doesn't directly support a **`complex`** or **`_Complex`** keyword, therefore the Microsoft implementation uses structure types to represent complex numbers.
-These functions are implemented to balance performance with correctness. Because producing the correctly rounded result may be prohibitively expensive, these functions are designed to efficiently produce a close approximation to the correctly rounded result. In most cases, the result produced is within +/-1 ulp of the correctly rounded result, though there may be cases where there's greater inaccuracy.
+These functions are implemented to balance performance with correctness. Because producing the correctly rounded result may be prohibitively expensive, these functions are designed to efficiently produce a close approximation to the correctly rounded result. In most cases, the result produced is within +/-1 unit of least precision (ULP) of the correctly rounded result, though there may be cases where there's greater inaccuracy.
-The complex math routines rely on the floating point math library functions for their implementation. These 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.
+The complex math routines rely on the floating point math library functions for their implementation. These 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.
## Types used in complex math
The Microsoft implementation of the `complex.h` header defines these types as equivalents for the C99 standard native complex types:
-|Standard type|Microsoft type|
-|-|-|
-|**`float complex`** or **`float _Complex`**|**`_Fcomplex`**|
-|**`double complex`** or **`double _Complex`**|**`_Dcomplex`**|
-|**`long double complex`** or **`long double _Complex`**|**`_Lcomplex`**|
+| Standard type | Microsoft type |
+|---|---|
+| **`float complex`** or **`float _Complex`** | **`_Fcomplex`** |
+| **`double complex`** or **`double _Complex`** | **`_Dcomplex`** |
+| **`long double complex`** or **`long double _Complex`** | **`_Lcomplex`** |
-The `math.h` header defines a separate type, **`struct _complex`**, used for the [`_cabs`](../c-runtime-library/reference/cabs.md) function. The **`struct _complex`** type isn't used by the equivalent complex math functions [`cabs`, `cabsf`, `cabsl`](../c-runtime-library/reference/cabs-cabsf-cabsl.md).
+The `math.h` header defines a separate type, **`struct _complex`**, used for the [`_cabs`](./reference/cabs.md) function. The **`struct _complex`** type isn't used by the equivalent complex math functions [`cabs`, `cabsf`, `cabsl`](./reference/cabs-cabsf-cabsl.md).
## Complex constants and macros
@@ -31,64 +31,64 @@ The `math.h` header defines a separate type, **`struct _complex`**, used for the
## Trigonometric functions
-|Function|Description|
-|-|-|
-|[`cacos`, `cacosf`, `cacosl`](../c-runtime-library/reference/cacos-cacosf-cacosl.md)|Compute the complex arc cosine of a complex number|
-|[`casin`, `casinf`, `casinl`](../c-runtime-library/reference/casin-casinf-casinl.md)|Compute the complex arc sine of a complex number|
-|[`catan`, `catanf`, `catanl`](../c-runtime-library/reference/catan-catanf-catanl.md)|Compute the complex arc tangent of a complex number|
-|[`ccos`, `ccosf`, `ccosl`](../c-runtime-library/reference/ccos-ccosf-ccosl.md)|Compute the complex cosine of a complex number|
-|[`csin`, `csinf`, `csinl`](../c-runtime-library/reference/csin-csinf-csinl.md)|Compute the complex sine of a complex number|
-|[`ctan`, `ctanf`, `ctanl`](../c-runtime-library/reference/ctan-ctanf-ctanl.md)|Compute the complex tangent of a complex number|
+| Function | Description |
+|---|---|
+| [`cacos`, `cacosf`, `cacosl`](./reference/cacos-cacosf-cacosl.md) | Compute the complex arc cosine of a complex number |
+| [`casin`, `casinf`, `casinl`](./reference/casin-casinf-casinl.md) | Compute the complex arc sine of a complex number |
+| [`catan`, `catanf`, `catanl`](./reference/catan-catanf-catanl.md) | Compute the complex arc tangent of a complex number |
+| [`ccos`, `ccosf`, `ccosl`](./reference/ccos-ccosf-ccosl.md) | Compute the complex cosine of a complex number |
+| [`csin`, `csinf`, `csinl`](./reference/csin-csinf-csinl.md) | Compute the complex sine of a complex number |
+| [`ctan`, `ctanf`, `ctanl`](./reference/ctan-ctanf-ctanl.md) | Compute the complex tangent of a complex number |
## Hyperbolic functions
-|Function|Description|
-|-|-|
-|[`cacosh`, `cacoshf`, `cacoshl`](../c-runtime-library/reference/cacosh-cacoshf-cacoshl.md)|Compute the complex arc hyperbolic cosine of a complex number|
-|[`casinh`, `casinhf`, `casinhl`](../c-runtime-library/reference/casinh-casinhf-casinhl.md)|Compute the complex arc hyperbolic sine of a complex number|
-|[`catanh`, `catanhf`, `catanhl`](../c-runtime-library/reference/catanh-catanhf-catanhl.md)|Compute the complex arc hyperbolic tangent of a complex number|
-|[`ccosh`, `ccoshf`, `ccoshl`](../c-runtime-library/reference/ccosh-ccoshf-ccoshl.md)|Compute the complex hyperbolic cosine of a complex number|
-|[`csinh`, `csinhf`, `csinhl`](../c-runtime-library/reference/csinh-csinhf-csinhl.md)|Compute the complex hyperbolic sine of a complex number|
-|[`ctanh`, `ctanhf`, `ctanhl`](../c-runtime-library/reference/ctanh-ctanhf-ctanhl.md)|Compute the complex hyperbolic tangent of a complex number|
+| Function | Description |
+|---|---|
+| [`cacosh`, `cacoshf`, `cacoshl`](./reference/cacosh-cacoshf-cacoshl.md) | Compute the complex arc hyperbolic cosine of a complex number |
+| [`casinh`, `casinhf`, `casinhl`](./reference/casinh-casinhf-casinhl.md) | Compute the complex arc hyperbolic sine of a complex number |
+| [`catanh`, `catanhf`, `catanhl`](./reference/catanh-catanhf-catanhl.md) | Compute the complex arc hyperbolic tangent of a complex number |
+| [`ccosh`, `ccoshf`, `ccoshl`](./reference/ccosh-ccoshf-ccoshl.md) | Compute the complex hyperbolic cosine of a complex number |
+| [`csinh`, `csinhf`, `csinhl`](./reference/csinh-csinhf-csinhl.md) | Compute the complex hyperbolic sine of a complex number |
+| [`ctanh`, `ctanhf`, `ctanhl`](./reference/ctanh-ctanhf-ctanhl.md) | Compute the complex hyperbolic tangent of a complex number |
## Exponential and logarithmic functions
-|Function|Description|
-|-|-|
-|[`cexp`, `cexpf`, `cexpl`](../c-runtime-library/reference/cexp-cexpf-cexpl.md)|Compute the complex base-*e* exponential of a complex number|
-|[`clog`, `clogf`, `clogl`](../c-runtime-library/reference/clog-clogf-clogl.md)|Compute the complex natural (base-*e*) logarithm of a complex number|
-|[`clog10`, `clog10f`, `clog10l`](../c-runtime-library/reference/clog10-clog10f-clog10l.md)|Compute the complex base-10 logarithm of a complex number|
+| Function | Description |
+|---|---|
+| [`cexp`, `cexpf`, `cexpl`](./reference/cexp-cexpf-cexpl.md) | Compute the complex base-*e* exponential of a complex number |
+| [`clog`, `clogf`, `clogl`](./reference/clog-clogf-clogl.md) | Compute the complex natural (base-*e*) logarithm of a complex number |
+| [`clog10`, `clog10f`, `clog10l`](./reference/clog10-clog10f-clog10l.md) | Compute the complex base-10 logarithm of a complex number |
## Power and absolute-value functions
-|Function|Description|
-|-|-|
-|[`cabs`, `cabsf`, `cabsl`](../c-runtime-library/reference/cabs-cabsf-cabsl.md)|Compute the complex absolute value (also called the norm, modulus, or magnitude) of a complex number|
-|[`cpow`, `cpowf`, `cpowl`](../c-runtime-library/reference/cpow-cpowf-cpowl.md)|Compute the complex power function xy|
-|[`csqrt`, `csqrtf`, `csqrtl`](../c-runtime-library/reference/csqrt-csqrtf-csqrtl.md)|Compute the complex square root of a complex number|
+| Function | Description |
+|---|---|
+| [`cabs`, `cabsf`, `cabsl`](./reference/cabs-cabsf-cabsl.md) | Compute the complex absolute value (also called the norm, modulus, or magnitude) of a complex number |
+| [`cpow`, `cpowf`, `cpowl`](./reference/cpow-cpowf-cpowl.md) | Compute the complex power function |
+| [`csqrt`, `csqrtf`, `csqrtl`](./reference/csqrt-csqrtf-csqrtl.md) | Compute the complex square root of a complex number |
## Manipulation functions
-|Function|Description|
-|-|-|
-|[`_Cbuild`, `_FCbuild`, `_LCbuild`](../c-runtime-library/reference/cbuild-fcbuild-lcbuild.md)|Construct a complex number from real and imaginary parts|
-|[`carg`, `cargf`, `cargl`](../c-runtime-library/reference/carg-cargf-cargl.md)|Compute the argument (also called the phase angle) of a complex number|
-|[`cimag`, `cimagf`, `cimagl`](../c-runtime-library/reference/cimag-cimagf-cimagl.md)|Compute the imaginary part of a complex number|
-|[`conj`, `conjf`, `conjl`](../c-runtime-library/reference/conj-conjf-conjl.md)|Compute the complex conjugate of a complex number|
-|[`cproj`, `cprojf`, `cprojl`](../c-runtime-library/reference/cproj-cprojf-cprojl.md)|Compute a projection of a complex number onto the Riemann sphere|
-|[`creal`, `crealf`, `creall`](../c-runtime-library/reference/creal-crealf-creall.md)|Compute the real part of a complex number|
-|[`norm`, `normf`, `norml`](../c-runtime-library/reference/norm-normf-norml1.md)|Compute the squared magnitude of a complex number|
+| Function | Description |
+|---|---|
+| [`_Cbuild`, `_FCbuild`, `_LCbuild`](./reference/cbuild-fcbuild-lcbuild.md) | Construct a complex number from real and imaginary parts |
+| [`carg`, `cargf`, `cargl`](./reference/carg-cargf-cargl.md) | Compute the argument (also called the phase angle) of a complex number |
+| [`cimag`, `cimagf`, `cimagl`](./reference/cimag-cimagf-cimagl.md) | Compute the imaginary part of a complex number |
+| [`conj`, `conjf`, `conjl`](./reference/conj-conjf-conjl.md) | Compute the complex conjugate of a complex number |
+| [`cproj`, `cprojf`, `cprojl`](./reference/cproj-cprojf-cprojl.md) | Compute a projection of a complex number onto the Riemann sphere |
+| [`creal`, `crealf`, `creall`](./reference/creal-crealf-creall.md) | Compute the real part of a complex number |
+| [`norm`, `normf`, `norml`](./reference/norm-normf-norml1.md) | Compute the squared magnitude of a complex number |
## Operation functions
Because complex numbers aren't a native type in the Microsoft compiler, the standard arithmetic operators aren't defined on complex types. For convenience, these complex math library functions are provided to enable limited manipulation of complex numbers in user code:
-|Function|Description|
-|-|-|
-|[`_Cmulcc`, `_FCmulcc`, `_LCmulcc`](../c-runtime-library/reference/cmulcc-fcmulcc-lcmulcc.md)|Multiply two complex numbers|
-|[`_Cmulcr`, `_FCmulcr`, `_LCmulcr`](../c-runtime-library/reference/cmulcr-fcmulcr-lcmulcr.md)|Multiply a complex and a floating-point number|
+| Function | Description |
+|---|---|
+| [`_Cmulcc`, `_FCmulcc`, `_LCmulcc`](./reference/cmulcc-fcmulcc-lcmulcc.md) | Multiply two complex numbers |
+| [`_Cmulcr`, `_FCmulcr`, `_LCmulcr`](./reference/cmulcr-fcmulcr-lcmulcr.md) | Multiply a complex and a floating-point number |
## See also
[Type-generic math](tgmath.md)\
-[Universal C runtime routines by category](../c-runtime-library/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/console-and-port-i-o.md b/docs/c-runtime-library/console-and-port-i-o.md
index 311cc2eebf..df8063f300 100644
--- a/docs/c-runtime-library/console-and-port-i-o.md
+++ b/docs/c-runtime-library/console-and-port-i-o.md
@@ -4,31 +4,31 @@ title: "Console and Port I/O"
ms.date: "11/04/2016"
helpviewer_keywords: ["routines, console and port I/O", "routines", "ports, I/O routines", "I/O [CRT], console", "I/O [CRT], port", "I/O routines, console and port I/O"]
---
-# Console and Port I/O
+# Console and port I/O
-These routines read and write on your console or on the specified port. The console I/O routines aren't compatible with stream I/O or low-level I/O library routines. The console or port doesn't have to be opened or closed before I/O is performed, so there are no open or close routines in this category. In the Windows operating systems, the output from these functions is always directed to the console and can’t be redirected.
+These routines read and write on your console or on the specified port. The console I/O routines aren't compatible with stream I/O or low-level I/O library routines. The console or port doesn't have to be opened or closed before I/O is performed, so there are no open or close routines in this category. In the Windows operating systems, the output from these functions is always directed to the console and can't be redirected.
-## Console and Port I/O Routines
+## Console and port I/O routines
-|Routine|Use|
-|-------------|---------|
-|[`_cgets`, `_cgetws`](../c-runtime-library/cgets-cgetws.md), [`_cgets_s`, `_cgetws_s`](../c-runtime-library/reference/cgets-s-cgetws-s.md)|Read string from console|
-|[`_cprintf`, `_cwprintf`](../c-runtime-library/reference/cprintf-cprintf-l-cwprintf-cwprintf-l.md), [`_cprintf_s`, `_cprintf_s_l`, `_cwprintf_s`, `_cwprintf_s_l`](../c-runtime-library/reference/cprintf-s-cprintf-s-l-cwprintf-s-cwprintf-s-l.md)|Write formatted data to console|
-|[`_cputs`](../c-runtime-library/reference/cputs-cputws.md)|Write string to console|
-|[`_cscanf`, `_cwscanf`](../c-runtime-library/reference/cscanf-cscanf-l-cwscanf-cwscanf-l.md), [`_cscanf_s`, `_cscanf_s_l`, `_cwscanf_s`, `_cwscanf_s_l`](../c-runtime-library/reference/cscanf-s-cscanf-s-l-cwscanf-s-cwscanf-s-l.md)|Read formatted data from console|
-|[`_getch`, `_getwch`](../c-runtime-library/reference/getch-getwch.md)|Read character from console|
-|[`_getche`, `_getwche`](../c-runtime-library/reference/getch-getwch.md)|Read character from console and echo it|
-|[`_inp`](../c-runtime-library/inp-inpw-inpd.md)|Read one byte from specified I/O port|
-|[`_inpd`](../c-runtime-library/inp-inpw-inpd.md)|Read double word from specified I/O port|
-|[`_inpw`](../c-runtime-library/inp-inpw-inpd.md)|Read 2-byte word from specified I/O port|
-|[`_kbhit`](../c-runtime-library/reference/kbhit.md)|Check for keystroke at console; use before attempting to read from console|
-|[`_outp`](../c-runtime-library/outp-outpw-outpd.md)|Write one byte to specified I/O port|
-|[`_outpd`](../c-runtime-library/outp-outpw-outpd.md)|Write double word to specified I/O port|
-|[`_outpw`](../c-runtime-library/outp-outpw-outpd.md)|Write word to specified I/O port|
-|[`_putch`, `_putwch`](../c-runtime-library/reference/putch-putwch.md)|Write character to console|
-|[`_ungetch`, `_ungetwch`](../c-runtime-library/reference/ungetch-ungetwch-ungetch-nolock-ungetwch-nolock.md)|"Unget" last character read from console so it becomes next character read|
+| Routine | Use |
+|---|---|
+| [`_cgets`, `_cgetws`](./cgets-cgetws.md), [`_cgets_s`, `_cgetws_s`](./reference/cgets-s-cgetws-s.md) | Read string from console |
+| [`_cprintf`, `_cwprintf`](./reference/cprintf-cprintf-l-cwprintf-cwprintf-l.md), [`_cprintf_s`, `_cprintf_s_l`, `_cwprintf_s`, `_cwprintf_s_l`](./reference/cprintf-s-cprintf-s-l-cwprintf-s-cwprintf-s-l.md) | Write formatted data to console |
+| [`_cputs`](./reference/cputs-cputws.md) | Write string to console |
+| [`_cscanf`, `_cwscanf`](./reference/cscanf-cscanf-l-cwscanf-cwscanf-l.md), [`_cscanf_s`, `_cscanf_s_l`, `_cwscanf_s`, `_cwscanf_s_l`](./reference/cscanf-s-cscanf-s-l-cwscanf-s-cwscanf-s-l.md) | Read formatted data from console |
+| [`_getch`, `_getwch`](./reference/getch-getwch.md) | Read character from console |
+| [`_getche`, `_getwche`](./reference/getch-getwch.md) | Read character from console and echo it |
+| [`_inp`](./inp-inpw-inpd.md) | Read a byte from the specified I/O port |
+| [`_inpd`](./inp-inpw-inpd.md) | Read double word from specified I/O port |
+| [`_inpw`](./inp-inpw-inpd.md) | Read 2-byte word from specified I/O port |
+| [`_kbhit`](./reference/kbhit.md) | Check for keystroke at console; use before attempting to read from console |
+| [`_outp`](./outp-outpw-outpd.md) | Write a byte to the specified I/O port |
+| [`_outpd`](./outp-outpw-outpd.md) | Write double word to specified I/O port |
+| [`_outpw`](./outp-outpw-outpd.md) | Write word to specified I/O port |
+| [`_putch`, `_putwch`](./reference/putch-putwch.md) | Write character to console |
+| [`_ungetch`, `_ungetwch`](./reference/ungetch-ungetwch-ungetch-nolock-ungetwch-nolock.md) | "Unget" last character read from console so it becomes next character read |
## See also
-[Input and Output](../c-runtime-library/input-and-output.md)\
-[Universal C runtime routines by category](../c-runtime-library/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/constant-and-global-variable-mappings.md b/docs/c-runtime-library/constant-and-global-variable-mappings.md
index 1a99b8b921..92f33e1dd7 100644
--- a/docs/c-runtime-library/constant-and-global-variable-mappings.md
+++ b/docs/c-runtime-library/constant-and-global-variable-mappings.md
@@ -2,26 +2,26 @@
description: "Learn more about: Constant and Global Variable Mappings"
title: "Constant and Global Variable Mappings"
ms.date: "11/04/2016"
-f1_keywords: ["_tenviron", "_TEOF", "_tfinddata_t"]
-helpviewer_keywords: ["tfinddatat function", "tenviron function", "TEOF type", "_TEOF type", "generic-text mappings", "_tenviron function", "_tfinddata_t function"]
+f1_keywords: ["_tenviron", "TCHAR/_tenviron", "_TEOF", "TCHAR/_TEOF", "_tpgmptr", "TCHAR/_tpgmptr"]
+helpviewer_keywords: ["_tenviron global constant", "_TEOF global constant", "_tpgmptr global constant"]
ms.assetid: 3af4fd3e-9ed5-4ed9-96fd-7031e5126fd1
---
-# Constant and Global Variable Mappings
+# Constant and global variable mappings
These generic-text constant, global variable, and standard-type mappings are defined in TCHAR.H and depend on whether the constant `_UNICODE` or `_MBCS` has been defined in your program.
-### Generic-Text Constant and Global Variable Mappings
+### Generic-text constant and global variable mappings
-|Generic-text - object name|SBCS (_UNICODE, _MBCS not defined)|_MBCS defined|_UNICODE defined|
-|----------------------------------|--------------------------------------------|--------------------|-----------------------|
-|`_TEOF`|`EOF`|`EOF`|`WEOF`|
-|`_tenviron`|`_environ`|`_environ`|`_wenviron`|
-|`_tpgmptr`|`_pgmptr`|`_pgmptr`|`_wpgmptr`|
+| Generic-text - object name | SBCS (`_UNICODE`, `_MBCS` not defined) | `_MBCS` defined | `_UNICODE` defined |
+|---|---|---|---|
+| `_TEOF` | `EOF` | `EOF` | `WEOF` |
+| `_tenviron` | `_environ` | `_environ` | `_wenviron` |
+| `_tpgmptr` | `_pgmptr` | `_pgmptr` | `_wpgmptr` |
## See also
-[Generic-Text Mappings](../c-runtime-library/generic-text-mappings.md)
-[Data Type Mappings](../c-runtime-library/data-type-mappings.md)
-[Routine Mappings](../c-runtime-library/routine-mappings.md)
-[A Sample Generic-Text Program](../c-runtime-library/a-sample-generic-text-program.md)
-[Using Generic-Text Mappings](../c-runtime-library/using-generic-text-mappings.md)
+[Generic-text mappings](./generic-text-mappings.md)\
+[Data type mappings](./data-type-mappings.md)\
+[Routine mappings](./routine-mappings.md)\
+[A sample generic-text program](./a-sample-generic-text-program.md)\
+[Using generic-text mappings](./using-generic-text-mappings.md)
diff --git a/docs/c-runtime-library/control-flags.md b/docs/c-runtime-library/control-flags.md
index 39bd64088d..5ba1384bfc 100644
--- a/docs/c-runtime-library/control-flags.md
+++ b/docs/c-runtime-library/control-flags.md
@@ -6,18 +6,18 @@ f1_keywords: ["c.flags"]
helpviewer_keywords: ["flags, control", "heap allocation, control flags", "debug heap, control flags"]
ms.assetid: 8dbd24a5-0633-42d1-9771-776db338465f
---
-# Control Flags
+# 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|
-|----------|-----------------|
-|[_CRTDBG_MAP_ALLOC](../c-runtime-library/crtdbg-map-alloc.md)|Maps the base heap functions to their debug version counterparts|
-|[_DEBUG](../c-runtime-library/debug.md)|Enables the use of the debugging versions of the run-time functions|
-|[_crtDbgFlag](../c-runtime-library/crtdbgflag.md)|Controls how the debug heap manager tracks allocations|
+| Flag | Description |
+|---|---|
+| [`_CRTDBG_MAP_ALLOC`](./crtdbg-map-alloc.md) | Maps the base heap functions to their debug version counterparts |
+| [`_DEBUG`](./debug.md) | Enables the use of the debugging versions of the run-time functions |
+| [`_crtDbgFlag`](./crtdbgflag.md) | Controls how the debug heap manager tracks allocations |
-These flags can be defined with a /D command-line option or with a `#define` directive. When the flag is defined with `#define`, the directive must appear before the header file include statement for the routine declarations.
+These flags can be defined with a /D command-line option or with a `#define` directive. When the flag is defined with `#define`, the directive must appear before the header file `#include` directive for the routine declarations.
## See also
-[Global Variables and Standard Types](../c-runtime-library/global-variables-and-standard-types.md)
+[Global variables and standard types](./global-variables-and-standard-types.md)
diff --git a/docs/c-runtime-library/controlling-streams.md b/docs/c-runtime-library/controlling-streams.md
index 995d1e12d5..7bdf6321eb 100644
--- a/docs/c-runtime-library/controlling-streams.md
+++ b/docs/c-runtime-library/controlling-streams.md
@@ -3,15 +3,14 @@ title: "Controlling Streams"
description: "An overview of working with streams in the Microsoft C runtime library."
ms.date: "11/04/2016"
ms.topic: "conceptual"
-f1_keywords: ["Controlling Streams"]
helpviewer_keywords: ["streams, controlling", "controlling streams", "streams"]
ms.assetid: 267e9013-9afc-45f6-91e3-ca093230d9d9
---
-# Controlling Streams
+# Controlling streams
-[fopen](../c-runtime-library/reference/fopen-wfopen.md) returns the address of an object of type `FILE`. You use this address as the `stream` argument to several library functions to perform various operations on an open file. For a byte stream, all input takes place as if each character is read by calling [fgetc](../c-runtime-library/reference/fgetc-fgetwc.md), and all output takes place as if each character is written by calling [fputc](../c-runtime-library/reference/fputc-fputwc.md). For a wide stream, all input takes place as if each character is read by calling [fgetwc](../c-runtime-library/reference/fgetc-fgetwc.md), and all output takes place as if each character is written by calling [fputwc](../c-runtime-library/reference/fputc-fputwc.md).
+[`fopen`](./reference/fopen-wfopen.md) returns the address of an object of type `FILE`. You use this address as the `stream` argument to several library functions to perform various operations on an open file. For a byte stream, all input takes place as if each character is read by calling [`fgetc`](./reference/fgetc-fgetwc.md). All output takes place as if each character is written by calling [`fputc`](./reference/fputc-fputwc.md). For a wide stream, all input takes place as if each character is read by calling [`fgetwc`](./reference/fgetc-fgetwc.md). All output takes place as if each character is written by calling [`fputwc`](./reference/fputc-fputwc.md).
-You can close a file by calling [fclose](../c-runtime-library/reference/fclose-fcloseall.md), after which the address of the `FILE` object is invalid.
+You can close a file by calling [`fclose`](./reference/fclose-fcloseall.md), after which the address of the `FILE` object is invalid.
A `FILE` object stores the state of a stream, including:
@@ -21,14 +20,14 @@ A `FILE` object stores the state of a stream, including:
- A file-position indicator specifies the next byte in the stream to read or write, if the file can support positioning requests.
-- A [stream state](../c-runtime-library/stream-states.md) specifies whether the stream will accept reads and/or writes and whether the stream is unbound, byte oriented, or wide oriented.
+- A [stream state](./stream-states.md) specifies whether the stream will accept reads and/or writes and whether the stream is unbound, byte oriented, or wide oriented.
-- A conversion state remembers the state of any partly assembled or generated generalized multibyte character, as well as any shift state for the sequence of bytes in the file).
+- A conversion state remembers the state of any partly assembled or generated generalized multibyte character, and any shift state for the sequence of bytes in the file).
-- A file buffer specifies the address and size of an array object that library functions can use to improve the performance of read and write operations to the stream.
+- A file buffer specifies the address and size of an array object. Library functions can use it to improve the performance of read and write operations to the stream.
-Do not alter any value stored in a `FILE` object or in a file buffer that you specify for use with that object. You cannot copy a `FILE` object and portably use the address of the copy as a `stream` argument to a library function.
+Don't alter any value stored in a `FILE` object or in a file buffer that you specify for use with that object. You can't copy a `FILE` object and portably use the address of the copy as a `stream` argument to a library function.
## See also
-[Files and Streams](../c-runtime-library/files-and-streams.md)
+[Files and streams](./files-and-streams.md)
diff --git a/docs/c-runtime-library/country-region-strings.md b/docs/c-runtime-library/country-region-strings.md
index 2f44a1e86a..30b8889911 100644
--- a/docs/c-runtime-library/country-region-strings.md
+++ b/docs/c-runtime-library/country-region-strings.md
@@ -4,45 +4,45 @@ description: "Learn more about: Country/Region Strings"
ms.date: "1/29/2020"
helpviewer_keywords: ["country/region strings"]
---
-# Country/Region Strings
+# Country/region strings
Country and region strings can be combined with a language string to create a locale specification for the `setlocale`, `_wsetlocale`, `_create_locale`, and `_wcreate_locale` functions.
For lists of country and region names that are supported by various Windows operating system versions, see the **Language**, **Location**, and **Language tag** columns of the table in [Appendix A: Product Behavior](/openspecs/windows_protocols/ms-lcid/a9eac961-e77d-41a6-90a5-ce1a8b0cdb9c) in \[MS-LCID]: Windows Language Code Identifier (LCID) Reference. For an example of code that enumerates available locale names and related values, see [NLS: Name-based APIs Sample](/windows/win32/intl/nls--name-based-apis-sample).
-## Additional supported country and region strings
+## Other supported country and region strings
-The Microsoft C run-time library implementation also supports the following additional country/region strings and abbreviations:
+The Microsoft C run-time library implementation also supports the following country/region strings and abbreviations:
-|Country/region string|Abbreviation|Equivalent locale name|
-|----------------------------|------------------|----------------------------|
-|`america`|`USA`|`en-US`|
-|`britain`|`GBR`|`en-GB`|
-|`china`|`CHN`|`zh-CN`|
-|`czech`|`CZE`|`cs-CZ`|
-|`england`|`GBR`|`en-GB`|
-|`great britain`|`GBR`|`en-GB`|
-|`holland`|`NLD`|`nl-NL`|
-|`hong-kong`|`HKG`|`zh-HK`|
-|`new-zealand`|`NZL`|`en-NZ`|
-|`nz`|`NZL`|`en-NZ`|
-|`pr china`|`CHN`|`zh-CN`|
-|`pr-china`|`CHN`|`zh-CN`|
-|`puerto-rico`|`PRI`|`es-PR`|
-|`slovak`|`SVK`|`sk-SK`|
-|`south africa`|`ZAF`|`af-ZA`|
-|`south korea`|`KOR`|`ko-KR`|
-|`south-africa`|`ZAF`|`af-ZA`|
-|`south-korea`|`KOR`|`ko-KR`|
-|`trinidad & tobago`|`TTO`|`en-TT`|
-|`uk`|`GBR`|`en-GB`|
-|`united-kingdom`|`GBR`|`en-GB`|
-|`united-states`|`USA`|`en-US`|
-|`us`|`USA`|`en-US`|
+| Country/region string | Abbreviation | Equivalent locale name |
+|---|---|---|
+| `america` | `USA` | `en-US` |
+| `britain` | `GBR` | `en-GB` |
+| `china` | `CHN` | `zh-CN` |
+| `czech` | `CZE` | `cs-CZ` |
+| `england` | `GBR` | `en-GB` |
+| `great britain` | `GBR` | `en-GB` |
+| `holland` | `NLD` | `nl-NL` |
+| `hong-kong` | `HKG` | `zh-HK` |
+| `new-zealand` | `NZL` | `en-NZ` |
+| `nz` | `NZL` | `en-NZ` |
+| `pr china` | `CHN` | `zh-CN` |
+| `pr-china` | `CHN` | `zh-CN` |
+| `puerto-rico` | `PRI` | `es-PR` |
+| `slovak` | `SVK` | `sk-SK` |
+| `south africa` | `ZAF` | `af-ZA` |
+| `south korea` | `KOR` | `ko-KR` |
+| `south-africa` | `ZAF` | `af-ZA` |
+| `south-korea` | `KOR` | `ko-KR` |
+| `trinidad & tobago` | `TTO` | `en-TT` |
+| `uk` | `GBR` | `en-GB` |
+| `united-kingdom` | `GBR` | `en-GB` |
+| `united-states` | `USA` | `en-US` |
+| `us` | `USA` | `en-US` |
## See also
-[Locale Names, Languages, and Country/Region Strings](../c-runtime-library/locale-names-languages-and-country-region-strings.md)
-[Language Strings](../c-runtime-library/language-strings.md)
-[`setlocale`, `_wsetlocale`](../c-runtime-library/reference/setlocale-wsetlocale.md)
-[`_create_locale`, `_wcreate_locale`](../c-runtime-library/reference/create-locale-wcreate-locale.md)
+[Locale names, Languages, and Country/Region strings](./locale-names-languages-and-country-region-strings.md)\
+[Language strings](./language-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/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 `
-Locale identifier. The locale provides a context for the string mapping or sort key generation. An application can use the `MAKELCID` macro to create a locale identifier.
+*`Locale`*\
+The locale identifier. The locale provides a context for the string mapping or sort key generation. An application can use the `MAKELCID` macro to create a locale identifier.
-*dwMapFlags*
+*`dwMapFlags`*\
The type of transformation to be used during string mapping or sort key generation.
-*lpSrcStr*
+*`lpSrcStr`*\
Pointer to a source string that the function maps or uses for sort key generation. This parameter is assumed to be a Unicode string.
-*cchSrc*
+*`cchSrc`*\
Size, in characters, of the string pointed to by the `lpSrcStr` parameter. This count can include the null terminator, or not include it.
-A `cchSrc` value of -1 specifies that the string pointed to by `lpSrcStr` is null-terminated. If this is the case, and this function is being used in its string-mapping mode, the function calculates the string's length itself, and null-terminates the mapped string stored into `*lpDestStr`.
+A `cchSrc` value of -1 specifies that the string pointed to by `lpSrcStr` is null-terminated. If so, and this function is being used in its string-mapping mode, the function calculates the string's length itself, and null-terminates the mapped string stored into `*lpDestStr`.
-*lpDestStr*
+*`lpDestStr`*\
Long pointer to a buffer into which the function stores the mapped string or sort key.
-*cchDest*
+*`cchDest`*\
Size, in characters, of the buffer pointed to by `lpDestStr`.
-## Return Value
+## Return value
If the value of `cchDest` is nonzero, the number of characters, or bytes if `LCMAP_SORTKEY` is specified, written to the buffer indicates success. This count includes room for a null terminator.
@@ -58,10 +58,10 @@ Zero indicates failure. To get extended error information, call the `GetLastErro
## Remarks
-If `cchSrc` is greater than zero and `lpSrcStr` is a null-terminated string, `__crtLCMapStringW` sets `cchSrc` to the length of the string. Then `__crtLCMapStringW` calls the wide string (Unicode) version of the `LCMapString` function with the specified parameters. For more information about the parameters and return value of this function, see the [LCMapString](/windows/win32/api/winnls/nf-winnls-lcmapstringw).
+If `cchSrc` is greater than zero and `lpSrcStr` is a null-terminated string, **`__crtLCMapStringW`** sets `cchSrc` to the length of the string. Then **`__crtLCMapStringW`** calls the wide string (Unicode) version of the `LCMapString` function with the specified parameters. For more information about the parameters and return value of this function, see the [`LCMapString`](/windows/win32/api/winnls/nf-winnls-lcmapstringw).
## Requirements
-|Routine|Required header|
-|-------------|---------------------|
-|__crtLCMapStringW|awint.h|
+| Routine | Required header |
+|---|---|
+| **`__crtLCMapStringW`** | `
+*`pExcept`*\
Exception record that is passed to the possible **`catch`** statements.
-*pRN*
+*`pRN`*\
Dynamic information about the stack frame that is used to handle the exception. For more information, see ehdata.h.
-*pContext*
+*`pContext`*\
Context. (Not used on Intel processors.)
-*pDC*
+*`pDC`*\
Additional information about the function entry and stack frame.
-## Return Value
+## Return value
One of the *filter expression* values used by the [try-except Statement](../cpp/try-except-statement.md).
@@ -47,6 +47,6 @@ One of the *filter expression* values used by the [try-except Statement](../cpp/
## Requirements
-|Routine|Required header|
-|-------------|---------------------|
-|__CxxFrameHandler|excpt.h, ehdata.h|
+| Routine | Required header |
+|---|---|
+| **`__CxxFrameHandler`** | `
+[Universal C runtime routines by category](./run-time-routines-by-category.md)
diff --git a/docs/c-runtime-library/data-conversion.md b/docs/c-runtime-library/data-conversion.md
index 080128dfe8..5c3c7b5b61 100644
--- a/docs/c-runtime-library/data-conversion.md
+++ b/docs/c-runtime-library/data-conversion.md
@@ -5,51 +5,51 @@ ms.date: "03/21/2018"
f1_keywords: ["c.conversions"]
helpviewer_keywords: ["data conversion routines [C++]", "converting data"]
---
-# Data Conversion
+# Data conversion
-These routines convert data from one form to another. Generally these routines execute faster than conversions you might write. Each routine that begins with a *to* prefix is implemented as a function and as a macro. See [Choosing Between Functions and Macros](../c-runtime-library/recommendations-for-choosing-between-functions-and-macros.md) for information about choosing an implementation.
+These routines convert data from one form to another. Generally these routines execute faster than conversions you might write. Each routine that begins with a `to` prefix is implemented as a function and as a macro. See [Recommendations for choosing between functions and macros](./recommendations-for-choosing-between-functions-and-macros.md) for information about choosing an implementation.
## Data-conversion routines
-|Routine|Use|
-|-------------|---------|
-|[`abs`](../c-runtime-library/reference/abs-labs-llabs-abs64.md)|Find absolute value of integer|
-|[`atof`, `_atof_l`](../c-runtime-library/reference/atof-atof-l-wtof-wtof-l.md)|Convert string to **`float`**|
-|[`atoi`, `_atoi_l`](../c-runtime-library/reference/atoi-atoi-l-wtoi-wtoi-l.md)|Convert string to **`int`**|
-|[`_atoi64`, `_atoi64_l`](../c-runtime-library/reference/atoi64-atoi64-l-wtoi64-wtoi64-l.md)|Convert string to **`__int64`** or **`long long`**|
-|[`atol`, `_atol_l`](../c-runtime-library/reference/atol-atol-l-wtol-wtol-l.md)|Convert string to **`long`**|
-|[`c16rtomb`, `c32rtomb`](../c-runtime-library/reference/c16rtomb-c32rtomb1.md)|Convert UTF-16 or UTF-32 character to equivalent multibyte character|
-|[`_ecvt`](../c-runtime-library/reference/ecvt.md), [`_ecvt_s`](../c-runtime-library/reference/ecvt-s.md)|Convert **`double`** to string of specified length|
-|[`_fcvt`](../c-runtime-library/reference/fcvt.md), [`_fcvt_s`](../c-runtime-library/reference/fcvt-s.md)|Convert **`double`** to string with specified number of digits following decimal point|
-|[`_gcvt`](../c-runtime-library/reference/gcvt.md), [`_gcvt_s`](../c-runtime-library/reference/gcvt-s.md)|Convert **`double`** number to string; store string in buffer|
-|[`_itoa`, `_ltoa`, `_ultoa`, `_i64toa`, `_ui64toa`, `_itow`, `_ltow`, `ultow`, `_i64tow`, `_ui64tow`](../c-runtime-library/reference/itoa-itow.md), [`_itoa_s`, `_ltoa_s`, `_ultoa_s`, `_i64toa_s`, `_ui64toa_s`, `_itow_s`, `_ltow_s`, `_ultow_s`, `_i64tow_s`, `_ui64tow_s`](../c-runtime-library/reference/itoa-s-itow-s.md)|Convert integer types to string|
-|[`labs`](../c-runtime-library/reference/abs-labs-llabs-abs64.md)|Find absolute value of **`long`** integer|
-|[`llabs`](../c-runtime-library/reference/abs-labs-llabs-abs64.md)|Find absolute value of **`long long`** integer|
-|[`_mbbtombc`, `_mbbtombc_l`](../c-runtime-library/reference/mbbtombc-mbbtombc-l.md)|Convert 1-byte multibyte character to corresponding 2-byte multibyte character|
-|[`_mbcjistojms`, `_mbcjistojms_l`, `_mbcjmstojis`, `_mbcjmstojis_l`](../c-runtime-library/reference/mbcjistojms-mbcjistojms-l-mbcjmstojis-mbcjmstojis-l.md)|Convert Japan Industry Standard (JIS) character to Japan Microsoft (JMS) character|
-|[`_mbcjistojms`, `_mbcjistojms_l`, `_mbcjmstojis`, `_mbcjmstojis_l`](../c-runtime-library/reference/mbcjistojms-mbcjistojms-l-mbcjmstojis-mbcjmstojis-l.md)|Convert JMS character to JIS character|
-|[`_mbctohira`, `_mbctohira_l`, `_mbctokata`, `_mbctokata_l`](../c-runtime-library/reference/mbctohira-mbctohira-l-mbctokata-mbctokata-l.md)|Convert multibyte character to 1-byte hiragana code|
-|[`_mbctohira`, `_mbctohira_l`, `_mbctokata`, `_mbctokata_l`](../c-runtime-library/reference/mbctohira-mbctohira-l-mbctokata-mbctokata-l.md)|Convert multibyte character to 1-byte katakana code|
-|[`_mbctombb`, `_mbctombb_l`](../c-runtime-library/reference/mbctombb-mbctombb-l.md)|Convert 2-byte multibyte character to corresponding 1-byte multibyte character|
-|[`mbrtoc16`, `mbrtoc32`](../c-runtime-library/reference/mbrtoc16-mbrtoc323.md)|Convert multibyte character to equivalent UTF-16 or UTF-32 character|
-|[`mbstowcs`, `_mbstowcs_l`](../c-runtime-library/reference/mbstowcs-mbstowcs-l.md), [`mbstowcs_s`, `_mbstowcs_s_l`](../c-runtime-library/reference/mbstowcs-s-mbstowcs-s-l.md)|Convert sequence of multibyte characters to corresponding sequence of wide characters|
-|[`mbtowc`, `_mbtowc_l`](../c-runtime-library/reference/mbtowc-mbtowc-l.md)|Convert multibyte character to corresponding wide character|
-|[`strtod`, `_strtod_l`, `wcstod`, `_wcstod_l`](../c-runtime-library/reference/strtod-strtod-l-wcstod-wcstod-l.md)|Convert string to **`double`**|
-|[`strtol`, `wcstol`, `_strtol_l`, `_wcstol_l`](../c-runtime-library/reference/strtol-wcstol-strtol-l-wcstol-l.md)|Convert string to **`long`** integer|
-|[`strtoul`, `_strtoul_l`, `wcstoul`, `_wcstoul_l`](../c-runtime-library/reference/strtoul-strtoul-l-wcstoul-wcstoul-l.md)|Convert string to **`unsigned long`** integer|
-|[`strxfrm`, `wcsxfrm`, `_strxfrm_l`, `_wcsxfrm_l`](../c-runtime-library/reference/strxfrm-wcsxfrm-strxfrm-l-wcsxfrm-l.md)|Transform string into collated form based on locale-specific information|
-|[`toascii`, `__toascii`](../c-runtime-library/reference/toascii-toascii.md)|Convert character to ASCII code|
-|[`tolower`, `_tolower`, `towlower`, `_tolower_l`, `_towlower_l`](../c-runtime-library/reference/tolower-tolower-towlower-tolower-l-towlower-l.md), [`_mbctolower`, `_mbctolower_l`, `_mbctoupper`, `_mbctoupper_l`](../c-runtime-library/reference/mbctolower-mbctolower-l-mbctoupper-mbctoupper-l.md)|Test character and convert to lowercase if currently uppercase|
-|[`tolower`, `_tolower`, `towlower`, `_tolower_l`, `_towlower_l`](../c-runtime-library/reference/tolower-tolower-towlower-tolower-l-towlower-l.md)|Convert character to lowercase unconditionally|
-|[`toupper`, `_toupper`, `towupper`, `_toupper_l`, `_towupper_l`](../c-runtime-library/reference/toupper-toupper-towupper-toupper-l-towupper-l.md), [`_mbctolower`, `_mbctolower_l`, `_mbctoupper`, `_mbctoupper_l`](../c-runtime-library/reference/mbctolower-mbctolower-l-mbctoupper-mbctoupper-l.md)|Test character and convert to uppercase if currently lowercase|
-|[`toupper`, `_toupper`, `towupper`, `_toupper_l`, `_towupper_l`](../c-runtime-library/reference/toupper-toupper-towupper-toupper-l-towupper-l.md)|Convert character to uppercase unconditionally|
-|[`wcstombs`, `_wcstombs_l`](../c-runtime-library/reference/wcstombs-wcstombs-l.md), [`wcstombs_s`, `_wcstombs_s_l`](../c-runtime-library/reference/wcstombs-s-wcstombs-s-l.md)|Convert sequence of wide characters to corresponding sequence of multibyte characters|
-|[`wctomb`, `_wctomb_l`](../c-runtime-library/reference/wctomb-wctomb-l.md), [`wctomb_s`, `_wctomb_s_l`](../c-runtime-library/reference/wctomb-s-wctomb-s-l.md)|Convert wide character to corresponding multibyte character|
-|[`_wtof`, `_wtof_l`](../c-runtime-library/reference/atof-atof-l-wtof-wtof-l.md)|Convert wide-character string to a **`double`**|
-|[`_wtoi`, `_wtoi_l`](../c-runtime-library/reference/atoi-atoi-l-wtoi-wtoi-l.md)|Convert wide-character string to **`int`**|
-|[`_wtoi64`, `_wtoi64_l`](../c-runtime-library/reference/atoi64-atoi64-l-wtoi64-wtoi64-l.md)|Convert wide-character string to **`__int64`** or **`long long`**|
-|[`_wtol`, `_wtol_l`](../c-runtime-library/reference/atol-atol-l-wtol-wtol-l.md)|Convert wide-character string to **`long`**|
+| Routine | Use |
+|---|---|
+| [`abs`](./reference/abs-labs-llabs-abs64.md) | Find absolute value of integer |
+| [`atof`, `_atof_l`](./reference/atof-atof-l-wtof-wtof-l.md) | Convert string to **`float`** |
+| [`atoi`, `_atoi_l`](./reference/atoi-atoi-l-wtoi-wtoi-l.md) | Convert string to **`int`** |
+| [`_atoi64`, `_atoi64_l`](./reference/atoi64-atoi64-l-wtoi64-wtoi64-l.md) | Convert string to **`__int64`** or **`long long`** |
+| [`atol`, `_atol_l`](./reference/atol-atol-l-wtol-wtol-l.md) | Convert string to **`long`** |
+| [`c16rtomb`, `c32rtomb`](./reference/c16rtomb-c32rtomb1.md) | Convert UTF-16 or UTF-32 character to equivalent multibyte character |
+| [`_ecvt`](./reference/ecvt.md), [`_ecvt_s`](./reference/ecvt-s.md) | Convert **`double`** to string of specified length |
+| [`_fcvt`](./reference/fcvt.md), [`_fcvt_s`](./reference/fcvt-s.md) | Convert **`double`** to string with specified number of digits following decimal point |
+| [`_gcvt`](./reference/gcvt.md), [`_gcvt_s`](./reference/gcvt-s.md) | Convert **`double`** number to string; store string in buffer |
+| [`_itoa`, `_ltoa`, `_ultoa`, `_i64toa`, `_ui64toa`, `_itow`, `_ltow`, `ultow`, `_i64tow`, `_ui64tow`](./reference/itoa-itow.md), [`_itoa_s`, `_ltoa_s`, `_ultoa_s`, `_i64toa_s`, `_ui64toa_s`, `_itow_s`, `_ltow_s`, `_ultow_s`, `_i64tow_s`, `_ui64tow_s`](./reference/itoa-s-itow-s.md) | Convert integer types to string |
+| [`labs`](./reference/abs-labs-llabs-abs64.md) | Find absolute value of **`long`** integer |
+| [`llabs`](./reference/abs-labs-llabs-abs64.md) | Find absolute value of **`long long`** integer |
+| [`_mbbtombc`, `_mbbtombc_l`](./reference/mbbtombc-mbbtombc-l.md) | Convert 1-byte multibyte character to corresponding 2-byte multibyte character |
+| [`_mbcjistojms`, `_mbcjistojms_l`, `_mbcjmstojis`, `_mbcjmstojis_l`](./reference/mbcjistojms-mbcjistojms-l-mbcjmstojis-mbcjmstojis-l.md) | Convert Japan Industry Standard (JIS) character to Japan Microsoft (JMS) character |
+| [`_mbcjistojms`, `_mbcjistojms_l`, `_mbcjmstojis`, `_mbcjmstojis_l`](./reference/mbcjistojms-mbcjistojms-l-mbcjmstojis-mbcjmstojis-l.md) | Convert JMS character to JIS character |
+| [`_mbctohira`, `_mbctohira_l`, `_mbctokata`, `_mbctokata_l`](./reference/mbctohira-mbctohira-l-mbctokata-mbctokata-l.md) | Convert multibyte character to 1-byte hiragana code |
+| [`_mbctohira`, `_mbctohira_l`, `_mbctokata`, `_mbctokata_l`](./reference/mbctohira-mbctohira-l-mbctokata-mbctokata-l.md) | Convert multibyte character to 1-byte katakana code |
+| [`_mbctombb`, `_mbctombb_l`](./reference/mbctombb-mbctombb-l.md) | Convert 2-byte multibyte character to corresponding 1-byte multibyte character |
+| [`mbrtoc16`, `mbrtoc32`](./reference/mbrtoc16-mbrtoc323.md) | Convert multibyte character to equivalent UTF-16 or UTF-32 character |
+| [`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 |
+| [`mbtowc`, `_mbtowc_l`](./reference/mbtowc-mbtowc-l.md) | Convert multibyte character to corresponding wide character |
+| [`strtod`, `_strtod_l`, `wcstod`, `_wcstod_l`](./reference/strtod-strtod-l-wcstod-wcstod-l.md) | Convert string to **`double`** |
+| [`strtol`, `wcstol`, `_strtol_l`, `_wcstol_l`](./reference/strtol-wcstol-strtol-l-wcstol-l.md) | Convert string to **`long`** integer |
+| [`strtoul`, `_strtoul_l`, `wcstoul`, `_wcstoul_l`](./reference/strtoul-strtoul-l-wcstoul-wcstoul-l.md) | Convert string to **`unsigned long`** integer |
+| [`strxfrm`, `wcsxfrm`, `_strxfrm_l`, `_wcsxfrm_l`](./reference/strxfrm-wcsxfrm-strxfrm-l-wcsxfrm-l.md) | Transform string into collated form based on locale-specific information |
+| [`toascii`, `__toascii`](./reference/toascii-toascii.md) | Convert character to ASCII code |
+| [`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) | Test character and convert to lowercase if currently uppercase |
+| [`tolower`, `_tolower`, `towlower`, `_tolower_l`, `_towlower_l`](./reference/tolower-tolower-towlower-tolower-l-towlower-l.md) | Convert character to lowercase unconditionally |
+| [`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) | Test character and convert to uppercase if currently lowercase |
+| [`toupper`, `_toupper`, `towupper`, `_toupper_l`, `_towupper_l`](./reference/toupper-toupper-towupper-toupper-l-towupper-l.md) | Convert character to uppercase unconditionally |
+| [`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 |
+| [`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 |
+| [`_wtof`, `_wtof_l`](./reference/atof-atof-l-wtof-wtof-l.md) | Convert wide-character string to a **`double`** |
+| [`_wtoi`, `_wtoi_l`](./reference/atoi-atoi-l-wtoi-wtoi-l.md) | Convert wide-character string to **`int`** |
+| [`_wtoi64`, `_wtoi64_l`](./reference/atoi64-atoi64-l-wtoi64-wtoi64-l.md) | Convert wide-character string to **`__int64`** or **`long long`** |
+| [`_wtol`, `_wtol_l`](./reference/atol-atol-l-wtol-wtol-l.md) | Convert wide-character string to **`long`** |
## See also
-[Universal C runtime routines by category](../c-runtime-library/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/data-type-constants.md b/docs/c-runtime-library/data-type-constants.md
index e69c292b9b..1c631e5b87 100644
--- a/docs/c-runtime-library/data-type-constants.md
+++ b/docs/c-runtime-library/data-type-constants.md
@@ -2,10 +2,10 @@
description: "Learn more about: Data Type Constants"
title: "Data Type Constants"
ms.date: "06/25/2018"
-f1_keywords: ["FLT_MIN", "SHRT_MAX", "CHAR_MIN", "MB_LEN_MAX", "DBL_EPSILON", "SHRT_MIN", "_FLT_RADIX", "FLT_DIG", "FLT_MAX_10_EXP", "FLT_MANT_DIG", "DBL_MAX_EXP", "SCHAR_MIN", "SCHAR_MAX", "DBL_MIN", "FLT_MIN_10_EXP", "_DBL_ROUNDS", "USHRT_MAX", "FLT_MAX_EXP", "LONG_MAX", "DBL_MAX", "DBL_DIG", "FLT_MIN_EXP", "INT_MIN", "DBL_MIN_10_EXP", "CHAR_BIT", "INT_MAX", "ULONG_MAX", "DBL_MIN_EXP", "LONG_MIN", "_FLT_ROUNDS", "DBL_MANT_DIG", "_DBL_RADIX", "CHAR_MAX", "FLT_MAX", "DBL_MAX_10_EXP", "UCHAR_MAX", "FLT_EPSILON", "UINT_MAX", "LLONG_MIN", "LLONG_MAX", "ULLONG_MAX", "_I8_MIN", "_I8_MAX", "_UI8_MAX", "_I16_MIN", "_I16_MAX", "_UI16_MAX", "_I32_MIN", "_I32_MAX", "_UI32_MAX", "_I64_MIN", "_I64_MAX", "_UI64_MAX", "_I128_MIN", "_I128_MAX", "_UI128_MAX", "SIZE_MAX", "RSIZE_MAX", "LDBL_DIG", "LDBL_EPSILON", "LDBL_HAS_SUBNORM", "LDBL_MANT_DIG", "LDBL_MAX", "LDBL_MAX_10_EXP", "LDBL_MAX_EXP", "LDBL_MIN", "LDBL_MIN_10_EXP", "LDBL_MIN_EXP", "_LDBL_RADIX", "LDBL_TRUE_MIN", "DECIMAL_DIG"]
+f1_keywords: ["CHAR_BIT", "SCHAR_MIN", "SCHAR_MAX", "UCHAR_MAX", "CHAR_MIN", "CHAR_MAX", "MB_LEN_MAX", "SHRT_MIN", "SHRT_MAX", "USHRT_MAX", "INT_MIN", "INT_MAX", "UINT_MAX", "LONG_MIN", "LONG_MAX", "ULONG_MAX", "LLONG_MIN", "LLONG_MAX", "ULLONG_MAX", "_I8_MIN", "_I8_MAX", "_UI8_MAX", "_I16_MIN", "_I16_MAX", "_UI16_MAX", "_I32_MIN", "_I32_MAX", "_UI32_MAX", "_I64_MIN", "_I64_MAX", "_UI64_MAX", "_I128_MIN", "_I128_MAX", "_UI128_MAX", "SIZE_MAX", "RSIZE_MAX", "LIMITS/CHAR_BIT", "LIMITS/SCHAR_MIN", "LIMITS/SCHAR_MAX", "LIMITS/UCHAR_MAX", "LIMITS/CHAR_MIN", "LIMITS/CHAR_MAX", "LIMITS/MB_LEN_MAX", "LIMITS/SHRT_MIN", "LIMITS/SHRT_MAX", "LIMITS/USHRT_MAX", "LIMITS/INT_MIN", "LIMITS/INT_MAX", "LIMITS/UINT_MAX", "LIMITS/LONG_MIN", "LIMITS/LONG_MAX", "LIMITS/ULONG_MAX", "LIMITS/LLONG_MIN", "LIMITS/LLONG_MAX", "LIMITS/ULLONG_MAX", "LIMITS/_I8_MIN", "LIMITS/_I8_MAX", "LIMITS/_UI8_MAX", "LIMITS/_I16_MIN", "LIMITS/_I16_MAX", "LIMITS/_UI16_MAX", "LIMITS/_I32_MIN", "LIMITS/_I32_MAX", "LIMITS/_UI32_MAX", "LIMITS/_I64_MIN", "LIMITS/_I64_MAX", "LIMITS/_UI64_MAX", "LIMITS/_I128_MIN", "LIMITS/_I128_MAX", "LIMITS/_UI128_MAX", "LIMITS/SIZE_MAX", "LIMITS/RSIZE_MAX", "DBL_DECIMAL_DIG", "DBL_DIG", "DBL_EPSILON", "DBL_HAS_SUBNORM", "DBL_MANT_DIG", "DBL_MAX", "DBL_MAX_10_EXP", "DBL_MAX_EXP", "DBL_MIN", "DBL_MIN_10_EXP", "DBL_MIN_EXP", "_DBL_RADIX", "DBL_TRUE_MIN", "FLT_DECIMAL_DIG", "FLT_DIG", "FLT_EPSILON", "FLT_HAS_SUBNORM", "FLT_MANT_DIG", "FLT_MAX", "FLT_MAX_10_EXP", "FLT_MAX_EXP", "FLT_MIN", "FLT_MIN_10_EXP", "FLT_MIN_EXP", "FLT_RADIX", "FLT_TRUE_MIN", "LDBL_DIG", "LDBL_EPSILON", "LDBL_HAS_SUBNORM", "LDBL_MANT_DIG", "LDBL_MAX", "LDBL_MAX_10_EXP", "LDBL_MAX_EXP", "LDBL_MIN", "LDBL_MIN_10_EXP", "LDBL_MIN_EXP", "_LDBL_RADIX", "LDBL_TRUE_MIN", "DECIMAL_DIG", "FLOAT/DBL_DECIMAL_DIG", "FLOAT/DBL_DIG", "FLOAT/DBL_EPSILON", "FLOAT/DBL_HAS_SUBNORM", "FLOAT/DBL_MANT_DIG", "FLOAT/DBL_MAX", "FLOAT/DBL_MAX_10_EXP", "FLOAT/DBL_MAX_EXP", "FLOAT/DBL_MIN", "FLOAT/DBL_MIN_10_EXP", "FLOAT/DBL_MIN_EXP", "FLOAT/_DBL_RADIX", "FLOAT/DBL_TRUE_MIN", "FLOAT/FLT_DECIMAL_DIG", "FLOAT/FLT_DIG", "FLOAT/FLT_EPSILON", "FLOAT/FLT_HAS_SUBNORM", "FLOAT/FLT_MANT_DIG", "FLOAT/FLT_MAX", "FLOAT/FLT_MAX_10_EXP", "FLOAT/FLT_MAX_EXP", "FLOAT/FLT_MIN", "FLOAT/FLT_MIN_10_EXP", "FLOAT/FLT_MIN_EXP", "FLOAT/FLT_RADIX", "FLOAT/FLT_TRUE_MIN", "FLOAT/LDBL_DIG", "FLOAT/LDBL_EPSILON", "FLOAT/LDBL_HAS_SUBNORM", "FLOAT/LDBL_MANT_DIG", "FLOAT/LDBL_MAX", "FLOAT/LDBL_MAX_10_EXP", "FLOAT/LDBL_MAX_EXP", "FLOAT/LDBL_MIN", "FLOAT/LDBL_MIN_10_EXP", "FLOAT/LDBL_MIN_EXP", "FLOAT/_LDBL_RADIX", "FLOAT/LDBL_TRUE_MIN", "FLOAT/DECIMAL_DIG"]
helpviewer_keywords: ["DBL_MAX_EXP constant", "_DBL_RADIX constant", "FLT_MIN_EXP constant", "DBL_EPSILON constant", "INT_MIN constant", "FLT_EPSILON constant", "DBL_MANT_DIG constant", "_FLT_RADIX constant", "DBL_MIN constant", "USHRT_MAX constant", "FLT_MAX_10_EXP constant", "_FLT_ROUNDS constant", "data type constants [C++]", "_DBL_ROUNDS constant", "CHAR_MAX constant", "FLT_MAX_EXP constant", "FLT_MIN constant", "CHAR_MIN constant", "FLT_MIN_10_EXP constant", "DBL_MIN_EXP constant", "SCHAR_MAX constant", "FLT_RADIX constant", "CHAR_BIT constant", "UCHAR_MAX constant", "DBL_RADIX constant", "FLT_ROUNDS constant", "LONG_MIN constant", "SHRT_MAX constant", "LONG_MAX constant", "DBL_MAX_10_EXP constant", "DBL_MIN_10_EXP constant", "INT_MAX constant", "constants [C++], data type", "ULONG_MAX constant", "FLT_DIG constant", "MB_LEN_MAX constant", "DBL_DIG constant", "SHRT_MIN constant", "DBL_MAX constant", "DBL_ROUNDS constant", "FLT_MAX constant", "UINT_MAX constant", "FLT_MANT_DIG constant", "SCHAR_MIN constant", "LLONG_MIN constant", "LLONG_MAX constant", "ULLONG_MAX constant", "_I8_MIN constant", "_I8_MAX constant", "_UI8_MAX constant", "_I16_MIN constant", "_I16_MAX constant", "_UI16_MAX constant", "_I32_MIN constant", "_I32_MAX constant", "_UI32_MAX constant", "_I64_MIN constant", "_I64_MAX constant", "_UI64_MAX constant", "_I128_MIN constant", "_I128_MAX constant", "_UI128_MAX constant", "SIZE_MAX constant", "RSIZE_MAX constant"]
---
-# Data Type Constants
+# Data type constants
Data type constants are implementation-dependent ranges of values allowed for integral and floating-point data types.
@@ -20,44 +20,44 @@ These constants give the ranges for the integral data types. To use these consta
> [!NOTE]
> The [`/J`](../build/reference/j-default-char-type-is-unsigned.md) compiler option changes the default **`char`** type from **`signed char`** to **`unsigned char`**.
-|Constant|Value|Description|
-|--------------|-----------|-------------|
-|**`CHAR_BIT`**|8|Number of bits in a **`char`**|
-|**`SCHAR_MIN`**|(-128)|Minimum **`signed char`** value|
-|**`SCHAR_MAX`**|127|Maximum **`signed char`** value|
-|**`UCHAR_MAX`**|255 (0xff)|Maximum **`unsigned char`** value|
-|**`CHAR_MIN`**|(-128) (0 if **`/J`** option used)|Minimum **`char`** value|
-|**`CHAR_MAX`**|127 (255 if **`/J`** option used)|Maximum **`char`** value|
-|**`MB_LEN_MAX`**|5|Maximum number of bytes in multibyte **`char`**|
-|**`SHRT_MIN`**|-32768|Minimum **`signed short`** value|
-|**`SHRT_MAX`**|32767|Maximum **`signed short`** value|
-|**`USHRT_MAX`**|65535 (0xffff)|Maximum **`unsigned short`** value|
-|**`INT_MIN`**|(-2147483647 - 1)|Minimum **`signed int`** value|
-|**`INT_MAX`**|2147483647|Maximum **`signed int`** value|
-|**`UINT_MAX`**|4294967295 (0xffffffff)|Maximum **`unsigned int`** value|
-|**`LONG_MIN`**|(-2147483647L - 1)|Minimum **`signed long`** value|
-|**`LONG_MAX`**|2147483647L|Maximum **`signed long`** value|
-|**`ULONG_MAX`**|4294967295UL (0xfffffffful)|Maximum **`unsigned long`** value|
-|**`LLONG_MIN`**|(-9223372036854775807LL - 1)|Minimum **`signed long long`** or **`__int64`** value|
-|**`LLONG_MAX`**|9223372036854775807LL|Maximum **`signed long long`** or **`__int64`** value|
-|**`ULLONG_MAX`**|0xffffffffffffffffull|Maximum **`unsigned long long`** value|
-|**`_I8_MIN`**|(-127i8 - 1)|Minimum signed 8-bit value|
-|**`_I8_MAX`**|127i8|Maximum signed 8-bit value|
-|**`_UI8_MAX`**|0xffui8|Maximum unsigned 8-bit value|
-|**`_I16_MIN`**|(-32767i16 - 1)|Minimum signed 16-bit value|
-|**`_I16_MAX`**|32767i16|Maximum signed 16-bit value|
-|**`_UI16_MAX`**|0xffffui16|Maximum unsigned 16-bit value|
-|**`_I32_MIN`**|(-2147483647i32 - 1)|Minimum signed 32-bit value|
-|**`_I32_MAX`**|2147483647i32|Maximum signed 32-bit value|
-|**`_UI32_MAX`**|0xffffffffui32|Maximum unsigned 32-bit value|
-|**`_I64_MIN`**|(-9223372036854775807 - 1)|Minimum signed 64-bit value|
-|**`_I64_MAX`**|9223372036854775807|Maximum signed 64-bit value|
-|**`_UI64_MAX`**|0xffffffffffffffffui64|Maximum unsigned 64-bit value|
-|**`_I128_MIN`**|(-170141183460469231731687303715884105727i128 - 1)|Minimum signed 128-bit value|
-|**`_I128_MAX`**|170141183460469231731687303715884105727i128|Maximum signed 128-bit value|
-|**`_UI128_MAX`**|0xffffffffffffffffffffffffffffffffui128|Maximum unsigned 128-bit value|
-|**`SIZE_MAX`**|same as **`_UI64_MAX`** if **`_WIN64`** is defined, or **`UINT_MAX`**|Maximum native integer size|
-|**`RSIZE_MAX`**|same as (**`SIZE_MAX`** >> 1)|Maximum secure library integer size|
+| Constant | Value | Description |
+|---|---|---|
+| `CHAR_BIT` | 8 | Number of bits in a **`char`** |
+| `SCHAR_MIN` | (-128) | Minimum **`signed char`** value |
+| `SCHAR_MAX` | 127 | Maximum **`signed char`** value |
+| `UCHAR_MAX` | 255 (0xff) | Maximum **`unsigned char`** value |
+| `CHAR_MIN` | (-128) (0 if **`/J`** option used) | Minimum **`char`** value |
+| `CHAR_MAX` | 127 (255 if **`/J`** option used) | Maximum **`char`** value |
+| `MB_LEN_MAX` | 5 | Maximum number of bytes in multibyte **`char`** |
+| `SHRT_MIN` | -32768 | Minimum **`signed short`** value |
+| `SHRT_MAX` | 32767 | Maximum **`signed short`** value |
+| `USHRT_MAX` | 65535 (0xffff) | Maximum **`unsigned short`** value |
+| `INT_MIN` | (-2147483647 - 1) | Minimum **`signed int`** value |
+| `INT_MAX` | 2147483647 | Maximum **`signed int`** value |
+| `UINT_MAX` | 4294967295 (0xffffffff) | Maximum **`unsigned int`** value |
+| `LONG_MIN` | (-2147483647L - 1) | Minimum **`signed long`** value |
+| `LONG_MAX` | 2147483647L | Maximum **`signed long`** value |
+| `ULONG_MAX` | 4294967295UL (0xfffffffful) | Maximum **`unsigned long`** value |
+| `LLONG_MIN` | (-9223372036854775807LL - 1) | Minimum **`signed long long`** or **`__int64`** value |
+| `LLONG_MAX` | 9223372036854775807LL | Maximum **`signed long long`** or **`__int64`** value |
+| `ULLONG_MAX` | 0xffffffffffffffffull | Maximum **`unsigned long long`** value |
+| `_I8_MIN` | (-127i8 - 1) | Minimum signed 8-bit value |
+| `_I8_MAX` | 127i8 | Maximum signed 8-bit value |
+| `_UI8_MAX` | 0xffui8 | Maximum unsigned 8-bit value |
+| `_I16_MIN` | (-32767i16 - 1) | Minimum signed 16-bit value |
+| `_I16_MAX` | 32767i16 | Maximum signed 16-bit value |
+| `_UI16_MAX` | 0xffffui16 | Maximum unsigned 16-bit value |
+| `_I32_MIN` | (-2147483647i32 - 1) | Minimum signed 32-bit value |
+| `_I32_MAX` | 2147483647i32 | Maximum signed 32-bit value |
+| `_UI32_MAX` | 0xffffffffui32 | Maximum unsigned 32-bit value |
+| `_I64_MIN` | (-9223372036854775807 - 1) | Minimum signed 64-bit value |
+| `_I64_MAX` | 9223372036854775807 | Maximum signed 64-bit value |
+| `_UI64_MAX` | 0xffffffffffffffffui64 | Maximum unsigned 64-bit value |
+| `_I128_MIN` | (-170141183460469231731687303715884105727i128 - 1) | Minimum signed 128-bit value |
+| `_I128_MAX` | 170141183460469231731687303715884105727i128 | Maximum signed 128-bit value |
+| `_UI128_MAX` | 0xffffffffffffffffffffffffffffffffui128 | Maximum unsigned 128-bit value |
+| `SIZE_MAX` | same as `_UI64_MAX` if `_WIN64` is defined, or `UINT_MAX` | Maximum native integer size |
+| `RSIZE_MAX` | same as (`SIZE_MAX` >> 1) | Maximum secure library integer size |
## Floating-point type constants
@@ -67,48 +67,48 @@ The following constants give the range and other characteristics of the **`long
#include
data type name|SBCS (_UNICODE,
_MBCS not
defined)|_MBCS
defined|_UNICODE
defined|
-|--------------------------------------|----------------------------------------------------|------------------------|---------------------------|
-|`_TCHAR`|**`char`**|**`char`**|**`wchar_t`**|
-|`_tfinddata_t`|`_finddata_t`|`_finddata_t`|`_wfinddata_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`**|
-|`_TUCHAR`|**`unsigned char`**|**`unsigned char`**|**`wchar_t`**|
-|`_TXCHAR`|**`char`**|**`unsigned char`**|**`wchar_t`**|
-|`_T` or `_TEXT`|No effect (removed by preprocessor)|No effect (removed by preprocessor)|`L` (converts following character or string to its Unicode counterpart)|
+| Generic-text
data type name | SBCS (_UNICODE,
_MBCS not
defined) | _MBCS
defined | _UNICODE
defined |
+|---|---|---|---|
+| `_TCHAR` | **`char`** | **`char`** | **`wchar_t`** |
+| `_tfinddata_t` | `_finddata_t` | `_finddata_t` | `_wfinddata_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`** |
+| `_TUCHAR` | **`unsigned char`** | **`unsigned char`** | **`wchar_t`** |
+| `_TXCHAR` | **`char`** | **`unsigned char`** | **`wchar_t`** |
+| `_T` or `_TEXT` | No effect (removed by preprocessor) | No effect (removed by preprocessor) | `L` (converts following character or string to its Unicode counterpart) |
## See also
-[Generic-Text Mappings](../c-runtime-library/generic-text-mappings.md)
-[Constant and Global Variable Mappings](../c-runtime-library/constant-and-global-variable-mappings.md)
-[Routine Mappings](../c-runtime-library/routine-mappings.md)
-[A Sample Generic-Text Program](../c-runtime-library/a-sample-generic-text-program.md)
-[Using Generic-Text Mappings](../c-runtime-library/using-generic-text-mappings.md)
+[Generic-text mappings](./generic-text-mappings.md)\
+[Constant and global variable mappings](./constant-and-global-variable-mappings.md)\
+[Routine mappings](./routine-mappings.md)\
+[A sample generic-text program](./a-sample-generic-text-program.md)\
+[Using generic-text mappings](./using-generic-text-mappings.md)
diff --git a/docs/c-runtime-library/daylight-dstbias-timezone-and-tzname.md b/docs/c-runtime-library/daylight-dstbias-timezone-and-tzname.md
index 3ce1b9c440..997a01c0ef 100644
--- a/docs/c-runtime-library/daylight-dstbias-timezone-and-tzname.md
+++ b/docs/c-runtime-library/daylight-dstbias-timezone-and-tzname.md
@@ -2,26 +2,26 @@
description: "Learn more about: _daylight, _dstbias, _timezone, and _tzname"
title: "_daylight, _dstbias, _timezone, and _tzname"
ms.date: "11/04/2016"
-f1_keywords: ["tzname", "_timezone", "timezone", "_daylight", "_tzname", "daylight"]
-helpviewer_keywords: ["time zones", "time adjustments", "timezone variables", "_tzname function", "_daylight function", "_timezone function", "daylight function", "local time adjustments", "timezone function", "tzname function", "time-zone variables"]
+f1_keywords: ["_daylight", "TIME/_daylight", "_dstbias", "TIME/_dstbias", "_timezone", "TIME/_timezone", "_tzname", "TIME/_tzname"]
+helpviewer_keywords: ["time zones", "time adjustments", "timezone variables", "_daylight global variable", "_dstbias global variable", "_timezone global variable", "_tzname global variable", "local time adjustments", "time-zone variables"]
ms.assetid: d06c7292-6b99-4aba-b284-16a96570c856
---
-# _daylight, _dstbias, _timezone, and _tzname
+# `_daylight`, `_dstbias`, `_timezone`, and `_tzname`
-`_daylight`, `_dstbias`, `_timezone`, and `_tzname` are used in some time and date routines to make local-time adjustments. These global variables have been deprecated for the more secure functional versions, which should be used in place of the global variables.
+**`_daylight`**, **`_dstbias`**, **`_timezone`**, and **`_tzname`** are used in some time and date routines to make local-time adjustments. These global variables have been deprecated for the more secure functional versions, which should be used in place of the global variables.
-|Global variable|Functional equivalent|
-|---------------------|---------------------------|
-|`_daylight`|[_get_daylight](../c-runtime-library/reference/get-daylight.md)|
-|`_dstbias`|[_get_dstbias](../c-runtime-library/reference/get-dstbias.md)|
-|`_timezone`|[_get_timezone](../c-runtime-library/reference/get-timezone.md)|
-|`_tzname`|[_get_tzname](../c-runtime-library/reference/get-tzname.md)|
+| Global variable | Functional equivalent |
+|---|---|
+| **`_daylight`** | [`_get_daylight`](./reference/get-daylight.md) |
+| **`_dstbias`** | [`_get_dstbias`](./reference/get-dstbias.md) |
+| **`_timezone`** | [`_get_timezone`](./reference/get-timezone.md) |
+| **`_tzname`** | [`_get_tzname`](./reference/get-tzname.md) |
-They are declared in Time.h as follows.
+They're declared in Time.h as follows.
## Syntax
-```
+```C
extern int _daylight;
extern int _dstbias;
extern long _timezone;
@@ -30,20 +30,20 @@ extern char *_tzname[2];
## Remarks
-On a call to `_ftime`, `localtime`, or `_tzset`, the values of `_daylight`, `_dstbias`, `_timezone`, and `_tzname` are determined from the value of the `TZ` environment variable. If you do not explicitly set the value of `TZ`, `_tzname[0]` and `_tzname[1]` contain the default settings of "PST" and "PDT" respectively. The time-manipulation functions ([_tzset](../c-runtime-library/reference/tzset.md), [_ftime](../c-runtime-library/reference/ftime-ftime32-ftime64.md), and [localtime](../c-runtime-library/reference/localtime-localtime32-localtime64.md)) attempt to set the values of `_daylight`, `_dstbias` and `_timezone` by querying the operating system for the default value of each variable. The time-zone global variable values are shown in the following table.
+On a call to `_ftime`, `localtime`, or `_tzset`, the values of **`_daylight`**, **`_dstbias`**, **`_timezone`**, and **`_tzname`** are determined from the value of the `TZ` environment variable. If you don't explicitly set the value of `TZ`, `_tzname[0]` and `_tzname[1]` contain the default settings of "PST" and "PDT" respectively. The time-manipulation functions ([`_tzset`](./reference/tzset.md), [`_ftime`](./reference/ftime-ftime32-ftime64.md), and [`localtime`](./reference/localtime-localtime32-localtime64.md)) attempt to set the values of **`_daylight`**, **`_dstbias`** and **`_timezone`** by querying the operating system for the default value of each variable. The time-zone global variable values are shown in the following table.
-|Variable|Value|
-|--------------|-----------|
-|`_daylight`|Nonzero if daylight saving time (DST) zone is specified in `TZ` or determined from the operating system; otherwise, 0. The default value is 1.|
-|`_dstbias`|Offset for daylight saving time.|
-|`_timezone`|Difference in seconds between coordinated universal time and local time. The default value is 28,800.|
-|`_tzname[0]`|Time-zone name derived from the `TZ` environment variable. The default value is "PST".|
-|`_tzname[1]`|DST zone name derived from the `TZ` environment variable. The default value is "PDT" (Pacific daylight time).|
+| Variable | Value |
+|---|---|
+| **`_daylight`** | Nonzero if daylight saving time (DST) zone is specified in `TZ` or determined from the operating system; otherwise, 0. The default value is 1. |
+| **`_dstbias`** | Offset for daylight saving time. |
+| **`_timezone`** | Difference in seconds between coordinated universal time and local time. The default value is 28,800. |
+| `_tzname[0]` | Time-zone name derived from the `TZ` environment variable. The default value is "PST". |
+| `_tzname[1]` | DST zone name derived from the `TZ` environment variable. The default value is "PDT" (Pacific daylight time). |
## See also
-[Global Variables](../c-runtime-library/global-variables.md)
-[_get_daylight](../c-runtime-library/reference/get-daylight.md)
-[_get_dstbias](../c-runtime-library/reference/get-dstbias.md)
-[_get_timezone](../c-runtime-library/reference/get-timezone.md)
-[_get_tzname](../c-runtime-library/reference/get-tzname.md)
+[Global variables](./global-variables.md)\
+[`_get_daylight`](./reference/get-daylight.md)\
+[`_get_dstbias`](./reference/get-dstbias.md)\
+[`_get_timezone`](./reference/get-timezone.md)\
+[`_get_tzname`](./reference/get-tzname.md)
diff --git a/docs/c-runtime-library/debug-routines.md b/docs/c-runtime-library/debug-routines.md
index 4678751db2..eb6d0ab2dd 100644
--- a/docs/c-runtime-library/debug-routines.md
+++ b/docs/c-runtime-library/debug-routines.md
@@ -20,120 +20,120 @@ 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](../c-runtime-library/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 |
|--|--|
-| [`_ASSERT`](../c-runtime-library/reference/assert-asserte-assert-expr-macros.md) | Evaluate an expression and generates a debug report when the result is FALSE |
-| [`_ASSERTE`](../c-runtime-library/reference/assert-asserte-assert-expr-macros.md) | Similar to **`_ASSERT`**, but includes the failed expression in the generated report |
-| [`_CrtCheckMemory`](../c-runtime-library/reference/crtcheckmemory.md) | Confirm the integrity of the memory blocks allocated on the debug heap |
-| [`_CrtDbgBreak`](../c-runtime-library/reference/crtdbgbreak.md) | Sets a break point. |
-| [`_CrtDbgReport`, `_CrtDbgReportW`](../c-runtime-library/reference/crtdbgreport-crtdbgreportw.md) | Generate a debug report with a user message and send the report to three possible destinations |
-| [`_CrtDoForAllClientObjects`](../c-runtime-library/reference/crtdoforallclientobjects.md) | Call an application-supplied function for all `_CLIENT_BLOCK` types on the heap |
-| [`_CrtDumpMemoryLeaks`](../c-runtime-library/reference/crtdumpmemoryleaks.md) | Dump all of the memory blocks on the debug heap when a significant memory leak has occurred |
-| [`_CrtIsMemoryBlock`](../c-runtime-library/reference/crtismemoryblock.md) | Verify that a specified memory block is located within the local heap and that it has a valid debug heap block type identifier |
-| [`_CrtIsValidHeapPointer`](../c-runtime-library/reference/crtisvalidheappointer.md) | Verifies that a specified pointer is in the local heap |
-| [`_CrtIsValidPointer`](../c-runtime-library/reference/crtisvalidpointer.md) | Verify that a specified memory range is valid for reading and writing |
-| [`_CrtMemCheckpoint`](../c-runtime-library/reference/crtmemcheckpoint.md) | Obtain the current state of the debug heap and store it in an application-supplied `_CrtMemState` structure |
-| [`_CrtMemDifference`](../c-runtime-library/reference/crtmemdifference.md) | Compare two memory states for significant differences and return the results |
-| [`_CrtMemDumpAllObjectsSince`](../c-runtime-library/reference/crtmemdumpallobjectssince.md) | Dump information about objects on the heap since a specified checkpoint was taken or from the start of program execution |
-| [`_CrtMemDumpStatistics`](../c-runtime-library/reference/crtmemdumpstatistics.md) | Dump the debug header information for a specified memory state in a user-readable form |
-| [`_CrtReportBlockType`](../c-runtime-library/reference/crtreportblocktype.md) | Returns the block type/subtype associated with a given debug heap block pointer. |
-| [`_CrtSetAllocHook`](../c-runtime-library/reference/crtsetallochook.md) | Install a client-defined allocation function by hooking it into the C run-time debug memory allocation process |
-| [`_CrtSetBreakAlloc`](../c-runtime-library/reference/crtsetbreakalloc.md) | Set a breakpoint on a specified object allocation order number |
-| [`_CrtSetDbgFlag`](../c-runtime-library/reference/crtsetdbgflag.md) | Retrieve or modify the state of the `_crtDbgFlag` flag to control the allocation behavior of the debug heap manager |
-| [`_CrtSetDumpClient`](../c-runtime-library/reference/crtsetdumpclient.md) | Install an application-defined function that is called every time a debug dump function is called to dump `_CLIENT_BLOCK` type memory blocks |
-| [`_CrtSetReportFile`](../c-runtime-library/reference/crtsetreportfile.md) | Identify the file or stream to be used as a destination for a specific report type by `_CrtDbgReport` |
-| [`_CrtSetReportHook`](../c-runtime-library/reference/crtsetreporthook.md) | Install a client-defined reporting function by hooking it into the C run-time debug reporting process |
-| [`_CrtSetReportHook2`, `_CrtSetReportHookW2`](../c-runtime-library/reference/crtsetreporthook2-crtsetreporthookw2.md) | Installs or uninstalls a client-defined reporting function by hooking it into the C run-time debug reporting process. |
-| [`_CrtSetReportMode`](../c-runtime-library/reference/crtsetreportmode.md) | Specify the general destination(s) for a specific report type generated by `_CrtDbgReport` |
-| [`_RPT[0,1,2,3,4]`](../c-runtime-library/reference/rpt-rptf-rptw-rptfw-macros.md) | Track the application's progress by generating a debug report by calling `_CrtDbgReport` with a format string and a variable number of arguments. Provides no source file and line number information. |
-| [`_RPTF[0,1,2,3,4]`](../c-runtime-library/reference/rpt-rptf-rptw-rptfw-macros.md) | Similar to the `_RPTn` macros, but provides the source file name and line number where the report request originated |
-| [`_calloc_dbg`](../c-runtime-library/reference/calloc-dbg.md) | Allocate a specified number of memory blocks on the heap with additional space for a debugging header and overwrite buffers |
-| [`_expand_dbg`](../c-runtime-library/reference/expand-dbg.md) | Resize a specified block of memory on the heap by expanding or contracting the block |
-| [`_free_dbg`](../c-runtime-library/reference/free-dbg.md) | Free a block of memory on the heap |
-| [`_fullpath_dbg`, `_wfullpath_dbg`](../c-runtime-library/reference/fullpath-dbg-wfullpath-dbg.md) | Create an absolute or full path name for the specified relative path name, using [`_malloc_dbg`](../c-runtime-library/reference/malloc-dbg.md) to allocate memory. |
-| [`_getcwd_dbg`, `_wgetcwd_dbg`](../c-runtime-library/reference/getcwd-dbg-wgetcwd-dbg.md) | Get the current working directory, using [`_malloc_dbg`](../c-runtime-library/reference/malloc-dbg.md) to allocate memory. |
-| [`_malloc_dbg`](../c-runtime-library/reference/malloc-dbg.md) | Allocate a block of memory on the heap with additional space for a debugging header and overwrite buffers |
-| [`_msize_dbg`](../c-runtime-library/reference/msize-dbg.md) | Calculate the size of a block of memory on the heap |
-| [`_realloc_dbg`](../c-runtime-library/reference/realloc-dbg.md) | Reallocate a specified block of memory on the heap by moving and/or resizing the block |
-| [`_strdup_dbg`, `_wcsdup_dbg`](../c-runtime-library/reference/strdup-dbg-wcsdup-dbg.md) | Duplicates a string, using [`_malloc_dbg`](../c-runtime-library/reference/malloc-dbg.md) to allocate memory. |
-| [`_tempnam_dbg`, `_wtempnam_dbg`](../c-runtime-library/reference/tempnam-dbg-wtempnam-dbg.md) | Generate names you can use to create temporary files, using [`_malloc_dbg`](../c-runtime-library/reference/malloc-dbg.md) to allocate memory. |
-
-## C runtime routines that are not available in source code form
-
-The debugger can be used to step through the source code for most of the C runtime routines during the debugging process. However, Microsoft considers some technology to be proprietary and, therefore, does not provide the source code for a subset of these routines. Most of these routines belong to either the exception handling or floating-point processing groups, but a few others are included as well. The following table lists these routines.
+| [`_ASSERT`](./reference/assert-asserte-assert-expr-macros.md) | Evaluate an expression and generates a debug report when the result is `FALSE` |
+| [`_ASSERTE`](./reference/assert-asserte-assert-expr-macros.md) | Similar to `_ASSERT`, but includes the failed expression in the generated report |
+| [`_CrtCheckMemory`](./reference/crtcheckmemory.md) | Confirm the integrity of the memory blocks allocated on the debug heap |
+| [`_CrtDbgBreak`](./reference/crtdbgbreak.md) | Sets a break point. |
+| [`_CrtDbgReport`, `_CrtDbgReportW`](./reference/crtdbgreport-crtdbgreportw.md) | Generate a debug report with a user message and send the report to three possible destinations |
+| [`_CrtDoForAllClientObjects`](./reference/crtdoforallclientobjects.md) | Call an application-supplied function for all `_CLIENT_BLOCK` types on the heap |
+| [`_CrtDumpMemoryLeaks`](./reference/crtdumpmemoryleaks.md) | Dump all of the memory blocks on the debug heap when a significant memory leak has occurred |
+| [`_CrtIsMemoryBlock`](./reference/crtismemoryblock.md) | Verify that a specified memory block is located within the local heap and that it has a valid debug heap block type identifier |
+| [`_CrtIsValidHeapPointer`](./reference/crtisvalidheappointer.md) | Verifies that a specified pointer is in the local heap |
+| [`_CrtIsValidPointer`](./reference/crtisvalidpointer.md) | Verify that a specified memory range is valid for reading and writing |
+| [`_CrtMemCheckpoint`](./reference/crtmemcheckpoint.md) | Obtain the current state of the debug heap and store it in an application-supplied `_CrtMemState` structure |
+| [`_CrtMemDifference`](./reference/crtmemdifference.md) | Compare two memory states for significant differences and return the results |
+| [`_CrtMemDumpAllObjectsSince`](./reference/crtmemdumpallobjectssince.md) | Dump information about objects on the heap since a specified checkpoint was taken or from the start of program execution |
+| [`_CrtMemDumpStatistics`](./reference/crtmemdumpstatistics.md) | Dump the debug header information for a specified memory state in a user-readable form |
+| [`_CrtReportBlockType`](./reference/crtreportblocktype.md) | Returns the block type/subtype associated with a given debug heap block pointer. |
+| [`_CrtSetAllocHook`](./reference/crtsetallochook.md) | Install a client-defined allocation function by hooking it into the C run-time debug memory allocation process |
+| [`_CrtSetBreakAlloc`](./reference/crtsetbreakalloc.md) | Set a breakpoint on a specified object allocation order number |
+| [`_CrtSetDbgFlag`](./reference/crtsetdbgflag.md) | Retrieve or modify the state of the `_crtDbgFlag` flag to control the allocation behavior of the debug heap manager |
+| [`_CrtSetDumpClient`](./reference/crtsetdumpclient.md) | Install an application-defined function that is called every time a debug dump function is called to dump `_CLIENT_BLOCK` type memory blocks |
+| [`_CrtSetReportFile`](./reference/crtsetreportfile.md) | Identify the file or stream to be used as a destination for a specific report type by `_CrtDbgReport` |
+| [`_CrtSetReportHook`](./reference/crtsetreporthook.md) | Install a client-defined reporting function by hooking it into the C run-time debug reporting process |
+| [`_CrtSetReportHook2`, `_CrtSetReportHookW2`](./reference/crtsetreporthook2-crtsetreporthookw2.md) | Installs or uninstalls a client-defined reporting function by hooking it into the C run-time debug reporting process. |
+| [`_CrtSetReportMode`](./reference/crtsetreportmode.md) | Specify the general destination(s) for a specific report type generated by `_CrtDbgReport` |
+| [`_RPT[0,1,2,3,4]`](./reference/rpt-rptf-rptw-rptfw-macros.md) | Track the application's progress by generating a debug report by calling `_CrtDbgReport` with a format string and a variable number of arguments. Provides no source file and line number information. |
+| [`_RPTF[0,1,2,3,4]`](./reference/rpt-rptf-rptw-rptfw-macros.md) | Similar to the `_RPTn` macros, but provides the source file name and line number where the report request originated |
+| [`_calloc_dbg`](./reference/calloc-dbg.md) | Allocate a specified number of memory blocks on the heap with extra space for a debugging header and overwrite buffers |
+| [`_expand_dbg`](./reference/expand-dbg.md) | Resize a specified block of memory on the heap by expanding or contracting the block |
+| [`_free_dbg`](./reference/free-dbg.md) | Free a block of memory on the heap |
+| [`_fullpath_dbg`, `_wfullpath_dbg`](./reference/fullpath-dbg-wfullpath-dbg.md) | Create an absolute or full path name for the specified relative path name, using [`_malloc_dbg`](./reference/malloc-dbg.md) to allocate memory. |
+| [`_getcwd_dbg`, `_wgetcwd_dbg`](./reference/getcwd-dbg-wgetcwd-dbg.md) | Get the current working directory, using [`_malloc_dbg`](./reference/malloc-dbg.md) to allocate memory. |
+| [`_malloc_dbg`](./reference/malloc-dbg.md) | Allocate a block of memory on the heap with extra space for a debugging header and overwrite buffers |
+| [`_msize_dbg`](./reference/msize-dbg.md) | Calculate the size of a block of memory on the heap |
+| [`_realloc_dbg`](./reference/realloc-dbg.md) | Reallocate a specified block of memory on the heap by moving and/or resizing the block |
+| [`_strdup_dbg`, `_wcsdup_dbg`](./reference/strdup-dbg-wcsdup-dbg.md) | Duplicates a string, using [`_malloc_dbg`](./reference/malloc-dbg.md) to allocate memory. |
+| [`_tempnam_dbg`, `_wtempnam_dbg`](./reference/tempnam-dbg-wtempnam-dbg.md) | Generate names you can use to create temporary files, using [`_malloc_dbg`](./reference/malloc-dbg.md) to allocate memory. |
+
+## C runtime routines that aren't available in source code form
+
+The debugger can be used to step through the source code for most of the C runtime routines during the debugging process. However, Microsoft considers some technology to be proprietary and, therefore, doesn't provide the source code for a subset of these routines. Most of these routines belong to either the exception handling or floating-point processing groups, but a few others are included as well. The following table lists these routines.
:::row:::
:::column span="":::
- [`acos`](../c-runtime-library/reference/acos-acosf-acosl.md)\
- [`acosh`](../c-runtime-library/reference/acosh-acoshf-acoshl.md)\
- [`asin`](../c-runtime-library/reference/asin-asinf-asinl.md)\
- [`asinh`](../c-runtime-library/reference/asinh-asinhf-asinhl.md)\
- [`atan`, `atan2`](../c-runtime-library/reference/atan-atanf-atanl-atan2-atan2f-atan2l.md)\
- [`atanh`](../c-runtime-library/reference/atanh-atanhf-atanhl.md)\
- [`Bessel functions`](../c-runtime-library/reference/bessel-functions-j0-j1-jn-y0-y1-yn.md)\
- [`_cabs`](../c-runtime-library/reference/cabs.md)\
- [`ceil`](../c-runtime-library/reference/ceil-ceilf-ceill.md)\
- [`_chgsign`](../c-runtime-library/reference/chgsign-chgsignf-chgsignl.md)\
- [`_clear87`, `_clearfp`](../c-runtime-library/reference/clear87-clearfp.md)\
- [`_control87`, `_controlfp`](../c-runtime-library/reference/control87-controlfp-control87-2.md)
+ [`acos`](./reference/acos-acosf-acosl.md)\
+ [`acosh`](./reference/acosh-acoshf-acoshl.md)\
+ [`asin`](./reference/asin-asinf-asinl.md)\
+ [`asinh`](./reference/asinh-asinhf-asinhl.md)\
+ [`atan`, `atan2`](./reference/atan-atanf-atanl-atan2-atan2f-atan2l.md)\
+ [`atanh`](./reference/atanh-atanhf-atanhl.md)\
+ [`Bessel functions`](./reference/bessel-functions-j0-j1-jn-y0-y1-yn.md)\
+ [`_cabs`](./reference/cabs.md)\
+ [`ceil`](./reference/ceil-ceilf-ceill.md)\
+ [`_chgsign`](./reference/chgsign-chgsignf-chgsignl.md)\
+ [`_clear87`, `_clearfp`](./reference/clear87-clearfp.md)\
+ [`_control87`, `_controlfp`](./reference/control87-controlfp-control87-2.md)
:::column-end:::
:::column span="":::
- [`copysign`](../c-runtime-library/reference/copysign-copysignf-copysignl-copysign-copysignf-copysignl.md)\
- [`cos`](../c-runtime-library/reference/cos-cosf-cosl.md)\
- [`cosh`](../c-runtime-library/reference/cosh-coshf-coshl.md)\
- [`Exp`](../c-runtime-library/reference/exp-expf.md)\
- [`fabs`](../c-runtime-library/reference/fabs-fabsf-fabsl.md)\
- [`_finite`](../c-runtime-library/reference/finite-finitef.md)\
- [`floor`](../c-runtime-library/reference/floor-floorf-floorl.md)\
- [`fmod`](../c-runtime-library/reference/fmod-fmodf.md)\
- [`_fpclass`](../c-runtime-library/reference/fpclass-fpclassf.md)\
- [`_fpieee_flt`](../c-runtime-library/reference/fpieee-flt.md)\
- [`_fpreset`](../c-runtime-library/reference/fpreset.md)\
- [`frexp`](../c-runtime-library/reference/frexp.md)
+ [`copysign`](./reference/copysign-copysignf-copysignl-copysign-copysignf-copysignl.md)\
+ [`cos`](./reference/cos-cosf-cosl.md)\
+ [`cosh`](./reference/cosh-coshf-coshl.md)\
+ [`Exp`](./reference/exp-expf.md)\
+ [`fabs`](./reference/fabs-fabsf-fabsl.md)\
+ [`_finite`](./reference/finite-finitef.md)\
+ [`floor`](./reference/floor-floorf-floorl.md)\
+ [`fmod`](./reference/fmod-fmodf.md)\
+ [`_fpclass`](./reference/fpclass-fpclassf.md)\
+ [`_fpieee_flt`](./reference/fpieee-flt.md)\
+ [`_fpreset`](./reference/fpreset.md)\
+ [`frexp`](./reference/frexp.md)
:::column-end:::
:::column span="":::
- [`_hypot`](../c-runtime-library/reference/hypot-hypotf-hypotl-hypot-hypotf-hypotl.md)\
- [`_isnan`](../c-runtime-library/reference/isnan-isnan-isnanf.md)\
- [`ldexp`](../c-runtime-library/reference/ldexp.md)\
- [`log`](../c-runtime-library/reference/log-logf-log10-log10f.md)\
- [`_logb`](../c-runtime-library/reference/logb-logbf-logbl-logb-logbf.md)\
- [`log10`](../c-runtime-library/reference/log-logf-log10-log10f.md)\
- [`longjmp`](../c-runtime-library/reference/longjmp.md)\
- [`_matherr`](../c-runtime-library/reference/matherr.md)\
- [`modf`](../c-runtime-library/reference/modf-modff-modfl.md)\
- [`_nextafter`](../c-runtime-library/reference/nextafter-functions.md)\
- [`pow`](../c-runtime-library/reference/pow-powf-powl.md)\
- [`printf_s`](../c-runtime-library/reference/printf-s-printf-s-l-wprintf-s-wprintf-s-l.md)
+ [`_hypot`](./reference/hypot-hypotf-hypotl-hypot-hypotf-hypotl.md)\
+ [`_isnan`](./reference/isnan-isnan-isnanf.md)\
+ [`ldexp`](./reference/ldexp.md)\
+ [`log`](./reference/log-logf-log10-log10f.md)\
+ [`_logb`](./reference/logb-logbf-logbl-logb-logbf.md)\
+ [`log10`](./reference/log-logf-log10-log10f.md)\
+ [`longjmp`](./reference/longjmp.md)\
+ [`_matherr`](./reference/matherr.md)\
+ [`modf`](./reference/modf-modff-modfl.md)\
+ [`_nextafter`](./reference/nextafter-functions.md)\
+ [`pow`](./reference/pow-powf-powl.md)\
+ [`printf_s`](./reference/printf-s-printf-s-l-wprintf-s-wprintf-s-l.md)
:::column-end:::
:::column span="":::
- [`printf`](../c-runtime-library/reference/printf-printf-l-wprintf-wprintf-l.md)\
- [`_scalb`](../c-runtime-library/reference/scalb.md)\
- [`scanf_s`](../c-runtime-library/reference/scanf-s-scanf-s-l-wscanf-s-wscanf-s-l.md)\
- [`scanf`](../c-runtime-library/reference/scanf-scanf-l-wscanf-wscanf-l.md)\
- [`setjmp`](../c-runtime-library/reference/setjmp.md)\
- [`sin`](../c-runtime-library/reference/sin-sinf-sinl.md)\
- [`sinh`](../c-runtime-library/reference/sinh-sinhf-sinhl.md)\
- [`sqrt`](../c-runtime-library/reference/sqrt-sqrtf-sqrtl.md)\
- [`_status87`, `_statusfp`](../c-runtime-library/reference/status87-statusfp-statusfp2.md)\
- [`tan`](../c-runtime-library/reference/tan-tanf-tanl.md)\
- [`tanh`](../c-runtime-library/reference/tanh-tanhf-tanhl.md)
+ [`printf`](./reference/printf-printf-l-wprintf-wprintf-l.md)\
+ [`_scalb`](./reference/scalb.md)\
+ [`scanf_s`](./reference/scanf-s-scanf-s-l-wscanf-s-wscanf-s-l.md)\
+ [`scanf`](./reference/scanf-scanf-l-wscanf-wscanf-l.md)\
+ [`setjmp`](./reference/setjmp.md)\
+ [`sin`](./reference/sin-sinf-sinl.md)\
+ [`sinh`](./reference/sinh-sinhf-sinhl.md)\
+ [`sqrt`](./reference/sqrt-sqrtf-sqrtl.md)\
+ [`_status87`, `_statusfp`](./reference/status87-statusfp-statusfp2.md)\
+ [`tan`](./reference/tan-tanf-tanl.md)\
+ [`tanh`](./reference/tanh-tanhf-tanhl.md)
:::column-end:::
:::row-end:::
-Although source code is available for most of the **printf** and **scanf** routines, they make an internal call to another routine for which source code is not provided.
+Although source code is available for most of the `printf` and `scanf` routines, they make an internal call to another routine for which source code isn't provided.
## Routines that behave differently in a debug build of an application
-Some C run-time functions and C++ operators behave differently when called from a debug build of an application. (Note that a debug build of an application can be done by either defining the `_DEBUG` flag or by linking with a debug version of the C run-time library.) The behavioral differences usually consist of extra features or information provided by the routine to support the debugging process. The following table lists these routines.
+Some C run-time functions and C++ operators behave differently when called from a debug build of an application. (You can create a debug build of an application by either defining the `_DEBUG` flag or by linking with a debug version of the C run-time library.) The behavioral differences usually consist of extra features or information provided by the routine to support the debugging process. The following table lists these routines.
:::row:::
:::column span="":::
- C [`abort`](../c-runtime-library/reference/abort.md) routine
+ C [`abort`](./reference/abort.md) routine
:::column-end:::
:::column span="":::
- C [`assert`](../c-runtime-library/reference/assert-macro-assert-wassert.md) routine
+ C [`assert`](./reference/assert-macro-assert-wassert.md) routine
:::column-end:::
:::column span="":::
C++ [`delete`](../cpp/delete-operator-cpp.md) operator
@@ -145,5 +145,5 @@ Some C run-time functions and C++ operators behave differently when called from
## See also
-[Universal C runtime routines by category](../c-runtime-library/run-time-routines-by-category.md)
-[Run-Time Error Checking](../c-runtime-library/run-time-error-checking.md)
+[Universal C runtime routines by category](./run-time-routines-by-category.md)\
+[Runtime error checking](./run-time-error-checking.md)
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 2841c3d3c8..049cce0df2 100644
--- a/docs/c-runtime-library/debug.md
+++ b/docs/c-runtime-library/debug.md
@@ -5,12 +5,12 @@ ms.date: "11/04/2016"
helpviewer_keywords: ["DEBUG macro", "_DEBUG macro"]
ms.assetid: a9901568-4846-4731-a404-399d947e2e7a
---
-# _DEBUG
+# `_DEBUG`
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
-[Control Flags](../c-runtime-library/control-flags.md)
+[Control flags](./control-flags.md)
diff --git a/docs/c-runtime-library/delete-operator-crt.md b/docs/c-runtime-library/delete-operator-crt.md
index 1303e9b1b3..bbafce6e44 100644
--- a/docs/c-runtime-library/delete-operator-crt.md
+++ b/docs/c-runtime-library/delete-operator-crt.md
@@ -9,6 +9,6 @@ f1_keywords: ["delete[]"]
helpviewer_keywords: ["operator delete[]", "vector delete"]
ms.assetid: e91bd0df-3815-40ca-950a-67b470518aed
---
-# operator delete(CRT)
+# `operator delete` (CRT)
-Beginning in Visual Studio 2013, the Universal C Runtime (UCRT) no longer supports the C++-specific operator new and operator delete functions. These are now part of the C++ Standard Library. For more information, see [new and delete operators](../cpp/new-and-delete-operators.md) and [delete operator](../cpp/delete-operator-cpp.md) in the C++ Language Reference.
+Beginning in Visual Studio 2013, the Universal C Runtime (UCRT) no longer supports the C++-specific `operator new` and `operator delete` functions. These functions are now part of the C++ Standard Library. For more information, see [`new` and `delete` operators](../cpp/new-and-delete-operators.md) and [`delete` operator](../cpp/delete-operator-cpp.md) in the C++ Language Reference.
diff --git a/docs/c-runtime-library/direction-flag.md b/docs/c-runtime-library/direction-flag.md
index 4c0e30c576..1acd9cfb5f 100644
--- a/docs/c-runtime-library/direction-flag.md
+++ b/docs/c-runtime-library/direction-flag.md
@@ -6,14 +6,14 @@ ms.topic: "conceptual"
helpviewer_keywords: ["direction flag"]
ms.assetid: 0836b4af-dbbb-4ab8-a4b2-156f2e2099e2
---
-# Direction Flag
+# Direction flag
-The direction flag is a CPU flag specific to all Intel x86-compatible CPUs. It applies to all assembly instructions that use the REP (repeat) prefix, such as MOVS, MOVSD, MOVSW, and others. Addresses provided to applicable instructions are increased if the direction flag is cleared.
+The direction flag is a CPU flag specific to all Intel x86-compatible CPUs. It applies to all assembly instructions that use the `REP` (repeat) prefix, such as `MOVS`, `MOVSD`, `MOVSW`, and others. Addresses provided to applicable instructions are increased if the direction flag is cleared.
-The C run-time routines assume that the direction flag is cleared. If you are using other functions with the C run-time functions, you must ensure that the other functions leave the direction flag alone or restore it to its original condition. Expecting the direction flag to be clear upon entry makes the run-time code faster and more efficient.
+The C run-time routines assume that the direction flag is cleared. If you're using other functions with the C run-time functions, you must ensure that the other functions leave the direction flag alone or restore it to its original condition. Expecting the direction flag to be clear upon entry makes the run-time code faster and more efficient.
The C Run-Time library functions, such as the string-manipulation and buffer-manipulation routines, expect the direction flag to be clear.
## See also
-[C runtime (CRT) and C++ Standard Library (STL) `.lib` files](../c-runtime-library/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/directory-control.md b/docs/c-runtime-library/directory-control.md
index c9c32901a1..9f47f3871d 100644
--- a/docs/c-runtime-library/directory-control.md
+++ b/docs/c-runtime-library/directory-control.md
@@ -5,27 +5,27 @@ ms.date: "11/04/2016"
helpviewer_keywords: ["controls [C++], directory", "directory control routines"]
ms.assetid: a72dcf6f-f366-4d20-8850-0e19cc53ca18
---
-# Directory Control
+# Directory control
These routines access, modify, and obtain information about the directory structure.
-## Directory-Control Routines
+## Directory-control routines
-|Routine|Use|
-|-------------|---------|
-|[_chdir, _wchdir](../c-runtime-library/reference/chdir-wchdir.md)|Change current working directory|
-|[_chdrive](../c-runtime-library/reference/chdrive.md)|Change current drive|
-|[_getcwd, _wgetcwd](../c-runtime-library/reference/getcwd-wgetcwd.md)|Get current working directory for default drive|
-|[_getdcwd, _wgetdcwd](../c-runtime-library/reference/getdcwd-wgetdcwd.md)|Get current working directory for specified drive|
-|[_getdiskfree](../c-runtime-library/reference/getdiskfree.md)|Populates a **_diskfree_t** structure with information about a disk drive.|
-|[_getdrive](../c-runtime-library/reference/getdrive.md)|Get current (default) drive|
-|[_getdrives](../c-runtime-library/reference/getdrives.md)|Returns a bitmask representing the currently available disk drives.|
-|[_mkdir, _wmkdir](../c-runtime-library/reference/mkdir-wmkdir.md)|Make new directory|
-|[_rmdir, _wrmdir](../c-runtime-library/reference/rmdir-wrmdir.md)|Remove directory|
-|[_searchenv, _wsearchenv](../c-runtime-library/reference/searchenv-wsearchenv.md), [_searchenv_s, _wsearchenv_s](../c-runtime-library/reference/searchenv-s-wsearchenv-s.md)|Search for given file on specified paths|
+| Routine | Use |
+|---|---|
+| [`_chdir`, `_wchdir`](./reference/chdir-wchdir.md) | Change current working directory |
+| [`_chdrive`](./reference/chdrive.md) | Change current drive |
+| [`_getcwd`, `_wgetcwd`](./reference/getcwd-wgetcwd.md) | Get current working directory for default drive |
+| [`_getdcwd`, `_wgetdcwd`](./reference/getdcwd-wgetdcwd.md) | Get current working directory for specified drive |
+| [`_getdiskfree`](./reference/getdiskfree.md) | Populates a `_diskfree_t` structure with information about a disk drive. |
+| [`_getdrive`](./reference/getdrive.md) | Get current (default) drive |
+| [`_getdrives`](./reference/getdrives.md) | Returns a bitmask representing the currently available disk drives. |
+| [`_mkdir`, `_wmkdir`](./reference/mkdir-wmkdir.md) | Make new directory |
+| [`_rmdir`, `_wrmdir`](./reference/rmdir-wrmdir.md) | Remove directory |
+| [`_searchenv`, `_wsearchenv`](./reference/searchenv-wsearchenv.md), [`_searchenv_s`, `_wsearchenv_s`](./reference/searchenv-s-wsearchenv-s.md) | Search for given file on specified paths |
## See also
-[Universal C runtime routines by category](../c-runtime-library/run-time-routines-by-category.md)
-[File Handling](../c-runtime-library/file-handling.md)
-[System Calls](../c-runtime-library/system-calls.md)
+[Universal C runtime routines by category](./run-time-routines-by-category.md)\
+[File handling](./file-handling.md)\
+[System calls](./system-calls.md)
diff --git a/docs/c-runtime-library/dllonexit.md b/docs/c-runtime-library/dllonexit.md
index fc8f8fc4a0..8cadda4ee4 100644
--- a/docs/c-runtime-library/dllonexit.md
+++ b/docs/c-runtime-library/dllonexit.md
@@ -10,37 +10,38 @@ f1_keywords: ["__dllonexit"]
helpviewer_keywords: ["__dllonexit"]
ms.assetid: 708f2ceb-f95c-46b0-a58d-d68b3fa36f12
---
-# __dllonexit
+# `__dllonexit`
Registers a routine to be called at exit time.
## Syntax
-```
-_onexit_t __dllonexit( _onexit_t func,
+```C
+_onexit_t __dllonexit(
+ _onexit_t func,
_PVFV ** pbegin,
_PVFV ** pend
- )
+ );
```
#### Parameters
-*func*
+*`func`*\
Pointer to a function to be executed upon exit.
-*pbegin*
+*`pbegin`*\
Pointer to a variable that points to the beginning of a list of functions to execute on detach.
-*pend*
+*`pend`*\
Pointer to variable that points to the end of a list of functions to execute on detach.
-## Return Value
+## Return value
-If successful, a pointer to the user’s function. Otherwise, a **NULL** pointer.
+If successful, a pointer to the user's function. Otherwise, a `NULL` pointer.
## Remarks
-The `__dllonexit` function is analogous to the [_onexit](../c-runtime-library/reference/onexit-onexit-m.md) function except that the global variables used by that function are not visible to this routine. Instead of global variables, this function uses the `pbegin` and `pend` parameters.
+The `__dllonexit` function is analogous to the [`_onexit`](./reference/onexit-onexit-m.md) function except that the global variables used by that function aren't visible to this routine. Instead of global variables, this function uses the `pbegin` and `pend` parameters.
The `_onexit` and `atexit` functions in a DLL linked with MSVCRT.LIB must maintain their own atexit/_onexit list. This routine is the worker that gets called by such DLLs.
@@ -48,10 +49,10 @@ The `_PVFV` type is defined as `typedef void (__cdecl *_PVFV)(void)`.
## Requirements
-|Routine|Required file|
-|-------------|-------------------|
-|__dllonexit|onexit.c|
+| Routine | Required file |
+|---|---|
+| **`__dllonexit`** | `onexit.c` |
## See also
-[_onexit, _onexit_m](../c-runtime-library/reference/onexit-onexit-m.md)
+[`_onexit`, `_onexit_m`](./reference/onexit-onexit-m.md)
diff --git a/docs/c-runtime-library/environ-wenviron.md b/docs/c-runtime-library/environ-wenviron.md
index 6ce08781f4..8411febc71 100644
--- a/docs/c-runtime-library/environ-wenviron.md
+++ b/docs/c-runtime-library/environ-wenviron.md
@@ -2,20 +2,20 @@
description: "Learn more about: _environ, _wenviron"
title: "_environ, _wenviron"
ms.date: "11/04/2016"
-f1_keywords: ["environ", "wenviron", "_wenviron", "_environ"]
-helpviewer_keywords: ["environ function", "_environ function", "_wenviron function", "process environment", "wenviron function"]
+f1_keywords: ["_environ", "STDLIB/_environ", "_wenviron", "STDLIB/_wenviron"]
+helpviewer_keywords: ["_environ global variable", "_wenviron global variable", "process environment"]
ms.assetid: 7e639962-6536-47cd-8095-0cbe44a56e03
---
-# _environ, _wenviron
+# `_environ`, `_wenviron`
-The `_environ` variable is a pointer to an array of pointers to the multibyte-character strings that constitute the process environment. This global variable has been deprecated for the more secure functional versions [getenv_s, _wgetenv_s](../c-runtime-library/reference/getenv-s-wgetenv-s.md) and [_putenv_s, _wputenv_s](../c-runtime-library/reference/putenv-s-wputenv-s.md), which should be used in place of the global variable. `_environ` is declared in Stdlib.h.
+The `_environ` variable is a pointer to an array of pointers to the multibyte-character strings that constitute the process environment. This global variable has been deprecated for the more secure functional versions [`getenv_s`, `_wgetenv_s`](./reference/getenv-s-wgetenv-s.md) and [`_putenv_s`, `_wputenv_s`](./reference/putenv-s-wputenv-s.md), which should be used in place of the global variable. `_environ` is declared in Stdlib.h.
> [!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).
## Syntax
-```
+```C
extern char **_environ;
```
@@ -29,15 +29,15 @@ In a program that uses the `main` function, `_environ` is initialized at program
The `_wenviron` variable, declared in Stdlib.h as:
-```
+```C
extern wchar_t **_wenviron;
```
is a wide-character version of `_environ`. In a program that uses the `wmain` function, `_wenviron` is initialized at program startup according to settings taken from the operating-system environment.
-In a program that uses `main`, `_wenviron` is initially **NULL** because the environment is composed of multibyte-character strings. On the first call to `_wgetenv` or `_wputenv`, a corresponding wide-character string environment is created and is pointed to by `_wenviron`.
+In a program that uses `main`, `_wenviron` is initially `NULL` because the environment is composed of multibyte-character strings. On the first call to `_wgetenv` or `_wputenv`, a corresponding wide-character string environment is created and is pointed to by `_wenviron`.
-Similarly, in a program that uses `wmain`, `_environ` is initially **NULL** because the environment is composed of wide-character strings. On the first call to `_getenv` or `_putenv`, a corresponding multibyte-character string environment is created and is pointed to by `_environ`.
+Similarly, in a program that uses `wmain`, `_environ` is initially `NULL` because the environment is composed of wide-character strings. On the first call to `_getenv` or `_putenv`, a corresponding multibyte-character string environment is created and is pointed to by `_environ`.
When two copies of the environment (MBCS and Unicode) exist simultaneously in a program, the run-time system must maintain both copies, resulting in slower execution time. For example, whenever you call `_putenv`, a call to `_wputenv` is also executed automatically, so that the two environment strings correspond.
@@ -46,9 +46,9 @@ When two copies of the environment (MBCS and Unicode) exist simultaneously in a
Polling `_environ` in a Unicode context is meaningless when [/MD](../build/reference/md-mt-ld-use-run-time-library.md) or `/MDd` linkage is used. For the CRT DLL, the type (wide or multibyte) of the program is unknown. Only the multibyte type is created because that is the most likely scenario.
-The following pseudo-code illustrates how this can happen.
+The following pseudo-code illustrates how this creation can happen.
-```
+```C
int i, j;
i = _wputenv( "env_var_x=string1" ); // results in the implicit call:
// putenv ("env_var_z=string1")
@@ -56,14 +56,14 @@ j = _wputenv( "env_var_y=string2" ); // also results in implicit call:
// putenv("env_var_z=string2")
```
-In the notation used for this example, the character strings are not C string literals; rather, they are placeholders that represent Unicode environment string literals in the `_wputenv` call and multibyte environment strings in the `putenv` call. The character placeholders '`x`' and '`y`' in the two distinct Unicode environment strings do not map uniquely to characters in the current MBCS. Instead, both map to some MBCS character '`z`' that is the default result of the attempt to convert the strings.
+In the notation used for this example, the character strings aren't C string literals; rather, they're placeholders that represent Unicode environment string literals in the `_wputenv` call and multibyte environment strings in the `putenv` call. The character placeholders '`x`' and '`y`' in the two distinct Unicode environment strings don't map uniquely to characters in the current MBCS. Instead, both map to some MBCS character '`z`' that is the default result of the attempt to convert the strings.
Thus, in the multibyte environment, the value of "`env_var_z`" after the first implicit call to `putenv` would be "`string1`", but this value would be overwritten on the second implicit call to `putenv`, when the value of "`env_var_z`" is set to "`string2`". The Unicode environment (in `_wenviron`) and the multibyte environment (in `_environ`) would therefore differ following this series of calls.
## See also
-[Global Variables](../c-runtime-library/global-variables.md)
-[getenv, _wgetenv](../c-runtime-library/reference/getenv-wgetenv.md)
-[getenv_s, _wgetenv_s](../c-runtime-library/reference/getenv-s-wgetenv-s.md)
-[_putenv, _wputenv](../c-runtime-library/reference/putenv-wputenv.md)
-[_putenv_s, _wputenv_s](../c-runtime-library/reference/putenv-s-wputenv-s.md)
+[Global variables](./global-variables.md)\
+[`getenv`, `_wgetenv`](./reference/getenv-wgetenv.md)\
+[`getenv_s`, `_wgetenv_s`](./reference/getenv-s-wgetenv-s.md)\
+[`_putenv`, `_wputenv`](./reference/putenv-wputenv.md)\
+[`_putenv_s`, `_wputenv_s`](./reference/putenv-s-wputenv-s.md)
diff --git a/docs/c-runtime-library/environmental-constants.md b/docs/c-runtime-library/environmental-constants.md
index 01f29009a0..bc19ee30a5 100644
--- a/docs/c-runtime-library/environmental-constants.md
+++ b/docs/c-runtime-library/environmental-constants.md
@@ -5,22 +5,22 @@ ms.date: "11/04/2016"
helpviewer_keywords: ["MAX_ENV constant", "_MAX_ENV constant"]
ms.assetid: 5224f540-231c-47aa-be9a-467efd1db281
---
-# Environmental Constants
+# Environmental constants
## Syntax
-```
+```C
#include
-[ungetc, ungetwc](../c-runtime-library/reference/ungetc-ungetwc.md)
-[scanf, _scanf_l, wscanf, _wscanf_l](../c-runtime-library/reference/scanf-scanf-l-wscanf-wscanf-l.md)
-[fflush](../c-runtime-library/reference/fflush.md)
-[fclose, _fcloseall](../c-runtime-library/reference/fclose-fcloseall.md)
-[_ungetch, _ungetwch, _ungetch_nolock, _ungetwch_nolock](../c-runtime-library/reference/ungetch-ungetwch-ungetch-nolock-ungetwch-nolock.md)
-[_putch, _putwch](../c-runtime-library/reference/putch-putwch.md)
-[isascii, __isascii, iswascii](../c-runtime-library/reference/isascii-isascii-iswascii.md)
-[Global Constants](../c-runtime-library/global-constants.md)
+[`putc`, `putwc`](./reference/putc-putwc.md)\
+[`ungetc`, `ungetwc`](./reference/ungetc-ungetwc.md)\
+[`scanf`, `_scanf_l`, `wscanf`, `_wscanf_l`](./reference/scanf-scanf-l-wscanf-wscanf-l.md)\
+[`fflush`](./reference/fflush.md)\
+[`fclose`, `_fcloseall`](./reference/fclose-fcloseall.md)\
+[`_ungetch`, `_ungetwch`, `_ungetch_nolock`, `_ungetwch_nolock`](./reference/ungetch-ungetwch-ungetch-nolock-ungetwch-nolock.md)\
+[`_putch`, `_putwch`](./reference/putch-putwch.md)\
+[`isascii`, `__isascii`, `iswascii`](./reference/isascii-isascii-iswascii.md)\
+[Global constants](./global-constants.md)
diff --git a/docs/c-runtime-library/errno-constants.md b/docs/c-runtime-library/errno-constants.md
index 71d58bb108..57db146f7b 100644
--- a/docs/c-runtime-library/errno-constants.md
+++ b/docs/c-runtime-library/errno-constants.md
@@ -15,31 +15,31 @@ helpviewer_keywords: ["E2BIG constant", "EACCES constant", "EAGAIN constant", "E
## Remarks
-The **`errno`** constants are values assigned to [`errno`](../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md) in the event of various error conditions.
+The `errno` constants are values assigned to [`errno`](./errno-doserrno-sys-errlist-and-sys-nerr.md) for various error conditions.
-`ERRNO.H` contains the definitions of the **`errno`** values. However, not all the definitions given in `ERRNO.H` are used in 32-bit Windows operating systems. Some of the values in `ERRNO.H` are present to maintain compatibility with the UNIX family of operating systems. The **`errno`** values in a 32-bit Windows operating system are a subset of the values for **`errno`** in UNIX systems.
+`ERRNO.H` contains the definitions of the `errno` values. However, not all the definitions given in `ERRNO.H` are used in 32-bit Windows operating systems. Some of the values in `ERRNO.H` are present to maintain compatibility with the UNIX family of operating systems. The `errno` values in a 32-bit Windows operating system are a subset of the values for `errno` in UNIX systems.
-The **`errno`** value isn't necessarily the same as the actual error code returned by a system call from the Windows operating system. To access the actual operating system error code, use the [`_doserrno`](../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md) variable, which contains this value.
+The `errno` value isn't necessarily the same as the actual error code returned by a system call from the Windows operating system. To access the actual operating system error code, use the [`_doserrno`](./errno-doserrno-sys-errlist-and-sys-nerr.md) variable, which contains this value.
-The following **`errno`** values are supported:
+The following `errno` values are supported:
| Constant | Description | Value |
|--|--|--|
| `E2BIG` | Argument list too long. | 7 |
-| `EACCES` | Permission denied. The file's permission setting does not allow the specified access. This error signifies that an attempt was made to access a file (or, in some cases, a directory) in a way that is incompatible with the file's attributes.
For example, the error can occur when an attempt is made to read from a file that is not open, to open an existing read-only file for writing, or to open a directory instead of a file. Under MS-DOS operating system versions 3.0 and later, `EACCES` may also indicate a locking or sharing violation.
The error can also occur in an attempt to rename a file or directory or to remove an existing directory. | 13 |
-| `EAGAIN` | No more processes or not enough memory or maximum nesting level reached. An attempt to create a new process failed because there are no more process slots, or there is not enough memory, or the maximum nesting level has been reached. | 11 |
-| `EBADF` | Bad file number. There are two possible causes: 1) The specified file descriptor is not a valid value or does not refer to an open file. 2) An attempt was made to write to a file or device opened for read-only access. | 9 |
+| `EACCES` | Permission denied. The file's permission setting doesn't allow the specified access. An attempt was made to access a file (or, in some cases, a directory) in a way that's incompatible with the file's attributes.
For example, the error can occur when an attempt is made to read from a file that isn't open. Or, on an attempt to open an existing read-only file for writing, or to open a directory instead of a file. Under MS-DOS operating system versions 3.0 and later, `EACCES` may also indicate a locking or sharing violation.
The error can also occur in an attempt to rename a file or directory or to remove an existing directory. | 13 |
+| `EAGAIN` | No more processes or not enough memory or maximum nesting level reached. An attempt to create a new process failed because there are no more process slots, or there isn't enough memory, or the maximum nesting level has been reached. | 11 |
+| `EBADF` | Bad file number. There are two possible causes: 1) The specified file descriptor isn't a valid value or doesn't refer to an open file. 2) An attempt was made to write to a file or device opened for read-only access. | 9 |
| `EBUSY` | Device or resource busy. | 16 |
| `ECHILD` | No spawned processes. | 10 |
| `EDEADLK` | Resource deadlock would occur. | 36 |
| `EDEADLOCK` | Same as `EDEADLK` for compatibility with older Microsoft C versions. | 36 |
-| `EDOM` | Math argument. The argument to a math function is not in the domain of the function. | 33 |
+| `EDOM` | Math argument. The argument to a math function isn't in the domain of the function. | 33 |
| `EEXIST` | Files exists. An attempt has been made to create a file that already exists. For example, the `_O_CREAT` and `_O_EXCL` flags are specified in an `_open` call, but the named file already exists. | 17 |
| `EFAULT` | Bad address. | 14 |
| `EFBIG` | File too large. | 27 |
| `EILSEQ` | Illegal sequence of bytes (for example, in an `MBCS` string). | 42 |
| `EINTR` | Interrupted function. | 4 |
-| `EINVAL` | Invalid argument. An invalid value was given for one of the arguments to a function. For example, the value given for the origin when positioning a file pointer (by means of a call to `fseek`) is before the beginning of the file. | 22 |
+| `EINVAL` | Invalid argument. An invalid value was given for one of the arguments to a function. For example, the value given for the origin when positioning a file pointer (by a call to `fseek`) is before the beginning of the file. | 22 |
| `EIO` | I/O error. | 5 |
| `EISDIR` | Is a directory. | 21 |
| `EMFILE` | Too many open files. No more file descriptors are available, so no more files can be opened. | 24 |
@@ -47,10 +47,10 @@ The following **`errno`** values are supported:
| `ENAMETOOLONG` | Filename too long. | 38 |
| `ENFILE` | Too many files open in system. | 23 |
| `ENODEV` | No such device. | 19 |
-| `ENOENT` | No such file or directory. The specified file or directory does not exist or cannot be found. This message can occur whenever a specified file does not exist or a component of a path does not specify an existing directory. | 2 |
-| `ENOEXEC` | Exec format error. An attempt was made to execute a file that is not executable or that has an invalid executable-file format. | 8 |
+| `ENOENT` | No such file or directory. The specified file or directory doesn't exist or can't be found. This message can occur whenever a specified file doesn't exist or a component of a path doesn't specify an existing directory. | 2 |
+| `ENOEXEC` | Exec format error. An attempt was made to execute a file that isn't executable or that has an invalid executable-file format. | 8 |
| `ENOLCK` | No locks available. | 39 |
-| `ENOMEM` | Not enough memory is available for the attempted operator. For example, this message can occur when insufficient memory is available to execute a child process, or when the allocation request in a `_getcwd` call cannot be satisfied. | 12 |
+| `ENOMEM` | Not enough memory is available for the attempted operator. For example, this message can occur when insufficient memory is available to execute a child process, or when the allocation request in a `_getcwd` call can't be satisfied. | 12 |
| `ENOSPC` | No space left on device. No more space for writing is available on the device (for example, when the disk is full). | 28 |
| `ENOSYS` | Function not supported. | 40 |
| `ENOTDIR` | Not a directory. | 20 |
@@ -64,7 +64,7 @@ The following **`errno`** values are supported:
| `ESPIPE` | Invalid seek. | 29 |
| `ESRCH` | No such process. | 3 |
| `EXDEV` | Cross-device link. An attempt was made to move a file to a different device (using the `rename` function). | 18 |
-| `STRUNCATE` | A string copy or concatenation resulted in a truncated string. See [`_TRUNCATE`](../c-runtime-library/truncate.md). | 80 |
+| `STRUNCATE` | A string copy or concatenation resulted in a truncated string. See [`_TRUNCATE`](./truncate.md). | 80 |
The following values are supported for compatibility with POSIX:
@@ -114,4 +114,4 @@ The following values are supported for compatibility with POSIX:
## See also
-[Global constants](../c-runtime-library/global-constants.md)
+[Global constants](./global-constants.md)
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 fa0c677d3f..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,11 +2,7 @@
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: ["_sys_errlist", "errno", "_sys_nerr", "_doserrno"]
+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
---
@@ -16,7 +12,7 @@ Global macros that hold error codes that are set during program execution, and s
## Syntax
-```
+```C
#define errno (*_errno())
#define _doserrno (*__doserrno())
#define _sys_errlist (__sys_errlist())
@@ -25,39 +21,39 @@ Global macros that hold error codes that are set during program execution, and s
## Remarks
-Both `errno` and `_doserrno` are set to 0 by the runtime during program startup. `errno` is set on an error in a system-level call. Because `errno` holds the value for the last call that set it, this value may be changed by succeeding calls. Run-time library calls that set `errno` on an error do not clear `errno` on success. Always clear `errno` by calling `_set_errno(0)` immediately before a call that may set it, and check it immediately after the call.
+Both **`errno`** and **`_doserrno`** are set to 0 by the runtime during program startup. **`errno`** is set on an error in a system-level call. Because **`errno`** holds the value for the last call that set it, this value may be changed by succeeding calls. Run-time library calls that set **`errno`** on an error don't clear **`errno`** on success. Always clear **`errno`** by calling `_set_errno(0)` immediately before a call that may set it, and check it immediately after the call.
-On an error, `errno` is not necessarily set to the same value as the error code returned by a system call. For I/O operations, `_doserrno` stores the operating-system error-code equivalents of `errno` codes. For most non-I/O operations, the value of `_doserrno` is not set.
+On an error, **`errno`** isn't necessarily set to the same value as the error code returned by a system call. For I/O operations, **`_doserrno`** stores the operating-system error-code equivalents of **`errno`** codes. For most non-I/O operations, the value of **`_doserrno`** isn't set.
-Each `errno` value is associated with an error message in `_sys_errlist` that can be printed by using one of the [`perror`](../c-runtime-library/reference/perror-wperror.md) functions, or stored in a string by using one of the [`strerror`](../c-runtime-library/reference/strerror-strerror-wcserror-wcserror.md) or [`strerror_s`](../c-runtime-library/reference/strerror-s-strerror-s-wcserror-s-wcserror-s.md) functions. The `perror` and `strerror` functions use the `_sys_errlist` array and `_sys_nerr`—the number of elements in `_sys_errlist`—to process error information. Direct access to `_sys_errlist` and `_sys_nerr` is deprecated for code-security reasons. We recommend that you use the more secure, functional versions instead of the global macros, as shown here:
+Each **`errno`** value is associated with an error message in **`_sys_errlist`** that can be printed by using one of the [`perror`](./reference/perror-wperror.md) functions, or stored in a string by using one of the [`strerror`](./reference/strerror-strerror-wcserror-wcserror.md) or [`strerror_s`](./reference/strerror-s-strerror-s-wcserror-s-wcserror-s.md) functions. The `perror` and `strerror` functions use the **`_sys_errlist`** array and **`_sys_nerr`**—the number of elements in **`_sys_errlist`**—to process error information. Direct access to **`_sys_errlist`** and **`_sys_nerr`** is deprecated for code-security reasons. We recommend that you use the more secure, functional versions instead of the global macros, as shown here:
-|Global Macro|Functional Equivalents|
-|------------------|----------------------------|
-|`_doserrno`|[`_get_doserrno`](../c-runtime-library/reference/get-doserrno.md), [`_set_doserrno`](../c-runtime-library/reference/set-doserrno.md)|
-|`errno`|[`_get_errno`](../c-runtime-library/reference/get-errno.md), [`_set_errno`](../c-runtime-library/reference/set-errno.md)|
-|`_sys_errlist`, `_sys_nerr`|[`strerror_s`, `_strerror_s`, `_wcserror_s`, `__wcserror_s`](../c-runtime-library/reference/strerror-s-strerror-s-wcserror-s-wcserror-s.md)|
+| Global macro | Functional equivalents |
+|---|---|
+| **`_doserrno`** | [`_get_doserrno`](./reference/get-doserrno.md), [`_set_doserrno`](./reference/set-doserrno.md) |
+| **`errno`** | [`_get_errno`](./reference/get-errno.md), [`_set_errno`](./reference/set-errno.md) |
+| **`_sys_errlist`**, **`_sys_nerr`** | [`strerror_s`, `_strerror_s`, `_wcserror_s`, `__wcserror_s`](./reference/strerror-s-strerror-s-wcserror-s-wcserror-s.md) |
-Library math routines set `errno` by calling [`_matherr`](../c-runtime-library/reference/matherr.md). To handle math errors differently, write your own routine according to the `_matherr` reference description and name it `_matherr`.
+Library math routines set **`errno`** by calling [`_matherr`](./reference/matherr.md). To handle math errors differently, write your own routine according to the `_matherr` reference description and name it `_matherr`.
-All `errno` values are predefined constants in `
-[`errno` Constants](../c-runtime-library/errno-constants.md)
-[`perror`, `_wperror`](../c-runtime-library/reference/perror-wperror.md)
-[`strerror`, `_strerror`, `_wcserror`, `__wcserror`](../c-runtime-library/reference/strerror-strerror-wcserror-wcserror.md)
-[`strerror_s`, `_strerror_s`, `_wcserror_s`, `__wcserror_s`](../c-runtime-library/reference/strerror-s-strerror-s-wcserror-s-wcserror-s.md)
-[`_get_doserrno`](../c-runtime-library/reference/get-doserrno.md)
-[`_set_doserrno`](../c-runtime-library/reference/set-doserrno.md)
-[`_get_errno`](../c-runtime-library/reference/get-errno.md)
-[`_set_errno`](../c-runtime-library/reference/set-errno.md)
+[Global variables](./global-variables.md)\
+[`errno` constants](./errno-constants.md)\
+[`perror`, `_wperror`](./reference/perror-wperror.md)\
+[`strerror`, `_strerror`, `_wcserror`, `__wcserror`](./reference/strerror-strerror-wcserror-wcserror.md)\
+[`strerror_s`, `_strerror_s`, `_wcserror_s`, `__wcserror_s`](./reference/strerror-s-strerror-s-wcserror-s-wcserror-s.md)\
+[`_get_doserrno`](./reference/get-doserrno.md)\
+[`_set_doserrno`](./reference/set-doserrno.md)\
+[`_get_errno`](./reference/get-errno.md)\
+[`_set_errno`](./reference/set-errno.md)
diff --git a/docs/c-runtime-library/error-handling-crt.md b/docs/c-runtime-library/error-handling-crt.md
index e031657626..e2eca821d5 100644
--- a/docs/c-runtime-library/error-handling-crt.md
+++ b/docs/c-runtime-library/error-handling-crt.md
@@ -11,18 +11,18 @@ Use these routines to handle program errors.
## Error-handling routines
-|Routine|Use|
-|-------------|---------|
-|[assert](../c-runtime-library/reference/assert-macro-assert-wassert.md) macro|Test for programming logic errors; available in both the release and debug versions of the run-time library.|
-|[_ASSERT, _ASSERTE](../c-runtime-library/reference/assert-asserte-assert-expr-macros.md) macros|Similar to **assert**, but only available in the debug versions of the run-time library.|
-|[clearerr](../c-runtime-library/reference/clearerr.md)|Reset error indicator. Calling **rewind** or closing a stream also resets the error indicator.|
-|[_eof](../c-runtime-library/reference/eof.md)|Check for end of file in low-level I/O.|
-|[feof](../c-runtime-library/reference/feof.md)|Test for end of file. End of file is also indicated when **_read** returns 0.|
-|[ferror](../c-runtime-library/reference/ferror.md)|Test for stream I/O errors.|
-|[_RPT, _RPTF](../c-runtime-library/reference/rpt-rptf-rptw-rptfw-macros.md) macros|Generate a report similar to **printf**, but only available in the debug versions of the run-time library.|
-|[_set_error_mode](../c-runtime-library/reference/set-error-mode.md)|Modifies **__error_mode** to determine a non-default location where the C run time writes an error message for an error that will possibly end the program.|
-|[_set_purecall_handler](../c-runtime-library/reference/get-purecall-handler-set-purecall-handler.md)|Sets the handler for a pure virtual function call.|
+| Routine | Use |
+|---|---|
+| [`assert`](./reference/assert-macro-assert-wassert.md) macro | Test for programming logic errors; available in both the release and debug versions of the run-time library. |
+| [`_ASSERT`, `_ASSERTE`](./reference/assert-asserte-assert-expr-macros.md) macros | Similar to `assert`, but only available in the debug versions of the run-time library. |
+| [`clearerr`](./reference/clearerr.md) | Reset error indicator. Calling `rewind` or closing a stream also resets the error indicator. |
+| [`_eof`](./reference/eof.md) | Check for end of file in low-level I/O. |
+| [`feof`](./reference/feof.md) | Test for end of file. End of file is also indicated when `_read` returns 0. |
+| [`ferror`](./reference/ferror.md) | Test for stream I/O errors. |
+| [`_RPT`, `_RPTF`](./reference/rpt-rptf-rptw-rptfw-macros.md) macros | Generate a report similar to `printf`, but only available in the debug versions of the run-time library. |
+| [`_set_error_mode`](./reference/set-error-mode.md) | Modifies `__error_mode` to determine a non-default location where the C run time writes an error message for an error that will possibly end the program. |
+| [`_set_purecall_handler`](./reference/get-purecall-handler-set-purecall-handler.md) | Sets the handler for a pure virtual function call. |
## See also
-- [Universal C runtime routines by category](../c-runtime-library/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/except-handler3.md b/docs/c-runtime-library/except-handler3.md
index 0e1ce4b6bf..c40b47cbad 100644
--- a/docs/c-runtime-library/except-handler3.md
+++ b/docs/c-runtime-library/except-handler3.md
@@ -3,20 +3,20 @@ description: "Learn more about: _except_handler3"
title: "_except_handler3"
ms.date: "1/14/2021"
api_name: ["_except_handler3"]
-api_location: ["msvcrt.dll", "msvcr90.dll", "msvcr80.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr100.dll", "msvcr110.dll", "api-ms-win-crt-private-l1-1-0.dll"]
+api_location: ["msvcrt.dll", "msvcr90.dll", "msvcr80.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr100.dll", "msvcr110.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
f1_keywords: ["_except_handler3", "except_handler3"]
helpviewer_keywords: ["_except_handler3 function", "except_handler3 function"]
ms.assetid: b0c64898-0ae5-48b7-9724-80135a0813e2
---
-# _except_handler3
+# `_except_handler3`
Internal CRT function. Used by a framework to find the appropriate exception handler to process the current exception.
## Syntax
-```
+```C
int _except_handler3(
PEXCEPTION_RECORD exception_record,
PEXCEPTION_REGISTRATION registration,
@@ -27,26 +27,26 @@ int _except_handler3(
#### Parameters
-*exception_record*
+*`exception_record`*\
[in] Information about the specific exception.
-*registration*
+*`registration`*\
[in] The record that indicates which scope table should be used to find the exception handler.
-*context*
+*`context`*\
[in] Reserved.
-*dispatcher*
+*`dispatcher`*\
[in] Reserved.
-## Return Value
+## Return value
If an exception should be dismissed, returns `DISPOSITION_DISMISS`. If the exception should be passed up a level to the encapsulating exception handlers, returns `DISPOSITION_CONTINUE_SEARCH`.
## Remarks
-If this method finds an appropriate exception handler, it passes the exception to the handler. In this situation, this method does not return to the code that called it and the return value is irrelevant.
+If this method finds an appropriate exception handler, it passes the exception to the handler. In this situation, this method doesn't return to the code that called it and the return value is irrelevant.
## See also
-[Alphabetical Function Reference](../c-runtime-library/reference/crt-alphabetical-function-reference.md)
+[Alphabetical function reference](./reference/crt-alphabetical-function-reference.md)
diff --git a/docs/c-runtime-library/exception-handling-constants.md b/docs/c-runtime-library/exception-handling-constants.md
index 6bdc7e4748..3ea54bfa93 100644
--- a/docs/c-runtime-library/exception-handling-constants.md
+++ b/docs/c-runtime-library/exception-handling-constants.md
@@ -2,14 +2,14 @@
description: "Learn more about: Exception-Handling Constants"
title: "Exception-Handling Constants"
ms.date: "11/04/2016"
-f1_keywords: ["EXCEPTION_CONTINUE_SEARCH", "EXCEPTION_CONTINUE_EXECUTION", "EXCEPTION_EXECUTE_HANDLER"]
+f1_keywords: ["EXCEPTION_CONTINUE_SEARCH", "EXCEPTION_CONTINUE_EXECUTION", "EXCEPTION_EXECUTE_HANDLER", "EXCPT/EXCEPTION_CONTINUE_SEARCH", "EXCPT/EXCEPTION_CONTINUE_EXECUTION", "EXCPT/EXCEPTION_EXECUTE_HANDLER"]
helpviewer_keywords: ["exception handling, constants", "EXCEPTION_CONTINUE_SEARCH constant", "EXCEPTION_EXECUTE_HANDLER constant", "EXCEPTION_CONTINUE_EXECUTION constant", "EH constants"]
ms.assetid: e1870f41-be9e-46a3-a2ea-830dfbaa18fb
---
-# Exception-Handling Constants
+# Exception-handling constants
The constant `EXCEPTION_CONTINUE_SEARCH`, `EXCEPTION_CONTINUE_EXECUTION`, or `EXCEPTION_EXECUTE_HANDLER` is returned when an exception occurs during execution of the guarded section of a **try-except** statement. The return value determines how the exception is handled. For more information, see [try-except Statement](../cpp/try-except-statement.md) in the *C++ Language Reference*.
## See also
-[Global Constants](../c-runtime-library/global-constants.md)
+[Global constants](./global-constants.md)
diff --git a/docs/c-runtime-library/exception-handling-routines.md b/docs/c-runtime-library/exception-handling-routines.md
index 1de3f22da4..c9755f8bf9 100644
--- a/docs/c-runtime-library/exception-handling-routines.md
+++ b/docs/c-runtime-library/exception-handling-routines.md
@@ -6,20 +6,20 @@ f1_keywords: ["c.exceptions"]
helpviewer_keywords: ["exception handling, routines"]
ms.assetid: f60548c6-850a-4e1e-a79b-a2a6a541ab62
---
-# Exception Handling Routines
+# Exception handling routines
Use the C++ exception-handling functions to recover from unexpected events during program execution.
-## Exception-Handling Functions
+## Exception-handling functions
-|Function|Use|
-|--------------|---------|
-|[_set_se_translator](../c-runtime-library/reference/set-se-translator.md)|Handle Win32 exceptions (C structured exceptions) as C++ typed exceptions|
-|[set_terminate](../c-runtime-library/reference/set-terminate-crt.md)|Install your own termination routine to be called by **terminate**|
-|[set_unexpected](../c-runtime-library/reference/set-unexpected-crt.md)|Install your own termination function to be called by **unexpected**|
-|[terminate](../c-runtime-library/reference/terminate-crt.md)|Called automatically under certain circumstances after exception is thrown. The **terminate** function calls **abort** or a function you specify using **set_terminate**|
-|[unexpected](../c-runtime-library/reference/unexpected-crt.md)|Calls **terminate** or a function you specify using **set_unexpected**. The **unexpected** function is not used in current Microsoft C++ exception-handling implementation|
+| Function | Use |
+|---|---|
+| [`_set_se_translator`](./reference/set-se-translator.md) | Handle Win32 exceptions (C structured exceptions) as C++ typed exceptions |
+| [`set_terminate`](./reference/set-terminate-crt.md) | Install your own termination routine to be called by `terminate` |
+| [`set_unexpected`](./reference/set-unexpected-crt.md) | Install your own termination function to be called by `unexpected` |
+| [`terminate`](./reference/terminate-crt.md) | Called automatically under certain circumstances after exception is thrown. The `terminate` function calls `abort` or a function you specify using `set_terminate` |
+| [`unexpected`](./reference/unexpected-crt.md) | Calls `terminate` or a function you specify using `set_unexpected`. The `unexpected` function isn't used in current Microsoft C++ exception-handling implementation |
## See also
-[Universal C runtime routines by category](../c-runtime-library/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/exec-wexec-functions.md b/docs/c-runtime-library/exec-wexec-functions.md
index 7227f245fc..9b9921f56f 100644
--- a/docs/c-runtime-library/exec-wexec-functions.md
+++ b/docs/c-runtime-library/exec-wexec-functions.md
@@ -14,48 +14,48 @@ Each function in this family loads and executes a new process:
:::row:::
:::column span="":::
- [`_execl`, `_wexecl`](../c-runtime-library/reference/execl-wexecl.md)\
- [`_execv`, `_wexecv`](../c-runtime-library/reference/execv-wexecv.md)\
- [`_execle`, `_wexecle`](../c-runtime-library/reference/execle-wexecle.md)
+ [`_execl`, `_wexecl`](./reference/execl-wexecl.md)\
+ [`_execv`, `_wexecv`](./reference/execv-wexecv.md)\
+ [`_execle`, `_wexecle`](./reference/execle-wexecle.md)
:::column-end:::
:::column span="":::
- [`_execve`, `_wexecve`](../c-runtime-library/reference/execve-wexecve.md)\
- [`_execlp`, `_wexeclp`](../c-runtime-library/reference/execlp-wexeclp.md)\
- [`_execvp`, `_wexecvp`](../c-runtime-library/reference/execvp-wexecvp.md)
+ [`_execve`, `_wexecve`](./reference/execve-wexecve.md)\
+ [`_execlp`, `_wexeclp`](./reference/execlp-wexeclp.md)\
+ [`_execvp`, `_wexecvp`](./reference/execvp-wexecvp.md)
:::column-end:::
:::column span="":::
- [`_execlpe`, `_wexeclpe`](../c-runtime-library/reference/execlpe-wexeclpe.md)\
- [`_execvpe`, `_wexecvpe`](../c-runtime-library/reference/execvpe-wexecvpe.md)
+ [`_execlpe`, `_wexeclpe`](./reference/execlpe-wexeclpe.md)\
+ [`_execvpe`, `_wexecvpe`](./reference/execvpe-wexecvpe.md)
:::column-end:::
:::row-end:::
The letter at the end of the function name determines the variation.
-|_exec function suffix|Description|
-|----------------------------|-----------------|
-|`e`|`envp`, array of pointers to environment settings, is passed to the new process.|
-|`l`|Command-line arguments are passed individually to `_exec` function. Typically used when the number of parameters to the new process is known in advance.|
-|`p`|`PATH` environment variable is used to find the file to execute.|
-|`v`|`argv`, array of pointers to command-line arguments, is passed to `_exec`. Typically used when the number of parameters to the new process is variable.|
+| `_exec` function suffix | Description |
+|---|---|
+| `e` | `envp`, array of pointers to environment settings, is passed to the new process. |
+| `l` | Command-line arguments are passed individually to `_exec` function. Typically used when the number of parameters to the new process is known in advance. |
+| `p` | `PATH` environment variable is used to find the file to execute. |
+| `v` | `argv`, array of pointers to command-line arguments, is passed to `_exec`. Typically used when the number of parameters to the new process is variable. |
## Remarks
Each `_exec` function loads and executes a new process. All `_exec` functions use the same operating-system function ([`CreateProcess`](/windows/win32/api/processthreadsapi/nf-processthreadsapi-createprocessw)). The `_exec` functions automatically handle multibyte-character string arguments as appropriate, recognizing multibyte-character sequences according to the multibyte code page currently in use. The `_wexec` functions are wide-character versions of the `_exec` functions. The `_wexec` functions behave identically to their `_exec` family counterparts except that they don't handle multibyte-character strings.
-### Generic-Text Routine Mappings
+### Generic-text routine mappings
-|`Tchar.h` routine|`_UNICODE and _MBCS` not defined|`_MBCS` defined|`_UNICODE` defined|
-|---------------------|--------------------------------------|--------------------|-----------------------|
-|`_texecl`|`_execl`|`_execl`|`_wexecl`|
-|`_texecle`|`_execle`|`_execle`|`_wexecle`|
-|`_texeclp`|`_execlp`|`_execlp`|`_wexeclp`|
-|`_texeclpe`|`_execlpe`|`_execlpe`|`_wexeclpe`|
-|`_texecv`|`_execv`|`_execv`|`_wexecv`|
-|`_texecve`|`_execve`|`_execve`|`_wexecve`|
-|`_texecvp`|`_execvp`|`_execvp`|`_wexecvp`|
-|`_texecvpe`|`_execvpe`|`_execvpe`|`_wexecvpe`|
+| `Tchar.h` routine | `_UNICODE` and `_MBCS` not defined | `_MBCS` defined | `_UNICODE` defined |
+|---|---|---|---|
+| `_texecl` | **`_execl`** | **`_execl`** | **`_wexecl`** |
+| `_texecle` | **`_execle`** | **`_execle`** | **`_wexecle`** |
+| `_texeclp` | **`_execlp`** | **`_execlp`** | **`_wexeclp`** |
+| `_texeclpe` | **`_execlpe`** | **`_execlpe`** | **`_wexeclpe`** |
+| `_texecv` | **`_execv`** | **`_execv`** | **`_wexecv`** |
+| `_texecve` | **`_execve`** | **`_execve`** | **`_wexecve`** |
+| `_texecvp` | **`_execvp`** | **`_execvp`** | **`_wexecvp`** |
+| `_texecvpe` | **`_execvpe`** | **`_execvpe`** | **`_wexecvpe`** |
-The `cmdname` parameter specifies the file to be executed as the new process. It can specify a full path (from the root), a partial path (from the current working directory), or a file name. If `cmdname` doesn't have a file name extension or doesn't end with a period (.), the `_exec` function searches for the named file. If the search is unsuccessful, it tries the same base name with the .com file name extension and then with the .exe, .bat, and .cmd file name extensions. If `cmdname` has a file name extension, only that extension is used in the search. If `cmdname` ends with a period, the `_exec` function searches for `cmdname` with no file name extension. `_execlp`, `_execlpe`, `_execvp`, and `_execvpe` search for `cmdname` (using the same procedures) in the directories specified by the `PATH` environment variable. If `cmdname` contains a drive specifier or any slashes (that is, if it's a relative path), the `_exec` call searches only for the specified file; the path isn't searched.
+The `cmdname` parameter specifies the file to be executed as the new process. It can specify a full path (from the root), a partial path (from the current working directory), or a file name. If `cmdname` doesn't have a file name extension or doesn't end with a period (.), the `_exec` function searches for the named file. If the search is unsuccessful, it tries the same base name with the .com file name extension and then with the .exe, .bat, and .cmd file name extensions. If `cmdname` has a file name extension, only that extension is used in the search. If `cmdname` ends with a period, the `_exec` function searches for `cmdname` with no file name extension. **`_execlp`**, **`_execlpe`**, **`_execvp`**, and **`_execvpe`** search for `cmdname` (using the same procedures) in the directories specified by the `PATH` environment variable. If `cmdname` contains a drive specifier or any slashes (that is, if it's a relative path), the `_exec` call searches only for the specified file; the path isn't searched.
Parameters are passed to the new process by giving one or more pointers to character strings as parameters in the `_exec` call. These character strings form the parameter list for the new process. The combined length of the inherited environment settings and the strings forming the parameter list for the new process must not exceed 32 kilobytes. The terminating `NULL` character (`\0`) for each string isn't included in the count, but space characters (inserted automatically to separate the parameters) are counted.
@@ -65,19 +65,19 @@ Parameters are passed to the new process by giving one or more pointers to chara
> [!IMPORTANT]
> Do not pass user input to `_exec` without explicitly checking its content. `_exec` will result in a call to [`CreateProcess`](/windows/win32/api/processthreadsapi/nf-processthreadsapi-createprocessw) so keep in mind that unqualified path names could lead to potential security vulnerabilities.
-The `_exec` functions validate their parameters. If expected parameters are null pointers, empty strings, or omitted, the `_exec` functions invoke the invalid parameter handler as described in [Parameter Validation](../c-runtime-library/parameter-validation.md). If execution is allowed to continue, these functions set `errno` to `EINVAL` and return -1. No new process is executed.
+The `_exec` functions validate their parameters. If expected parameters are null pointers, empty strings, or omitted, the `_exec` functions invoke the invalid parameter handler as described in [Parameter validation](./parameter-validation.md). If execution is allowed to continue, these functions set `errno` to `EINVAL` and return -1. No new process is executed.
-The argument pointers can be passed as separate parameters (in `_execl`, `_execle`, `_execlp`, and `_execlpe`) or as an array of pointers (in `_execv`, `_execve`, `_execvp`, and `_execvpe`). At least one parameter, `arg0`, must be passed to the new process; this parameter is `argv[0]` of the new process. Usually, this parameter is a copy of `cmdname`. (A different value doesn't produce an error.)
+The argument pointers can be passed as separate parameters (in **`_execl`**, **`_execle`**, **`_execlp`**, and **`_execlpe`**) or as an array of pointers (in **`_execv`**, **`_execve`**, **`_execvp`**, and **`_execvpe`**). At least one parameter, `arg0`, must be passed to the new process; this parameter is `argv[0]` of the new process. Usually, this parameter is a copy of `cmdname`. (A different value doesn't produce an error.)
-The `_execl`, `_execle`, `_execlp`, and `_execlpe` calls are typically used when the number of parameters is known in advance. The parameter `arg0` is usually a pointer to `cmdname`. The parameters `arg1` through `argn` point to the character strings forming the new parameter list. A null pointer must follow `argn` to mark the end of the parameter list.
+The **`_execl`**, **`_execle`**, **`_execlp`**, and **`_execlpe`** calls are typically used when the number of parameters is known in advance. The parameter `arg0` is usually a pointer to `cmdname`. The parameters `arg1` through `argn` point to the character strings forming the new parameter list. A null pointer must follow `argn` to mark the end of the parameter list.
-The `_execv`, `_execve`, `_execvp`, and `_execvpe` calls are useful when the number of parameters to the new process is variable. Pointers to the parameters are passed as an array, `argv`. The parameter `argv[0]` is usually a pointer to `cmdname`. The parameters `argv[1]` through `argv[n]` point to the character strings forming the new parameter list. The parameter `argv[n+1]` must be a **`NULL`** pointer to mark the end of the parameter list.
+The **`_execv`**, **`_execve`**, **`_execvp`**, and **`_execvpe`** calls are useful when the number of parameters to the new process is variable. Pointers to the parameters are passed as an array, `argv`. The parameter `argv[0]` is usually a pointer to `cmdname`. The parameters `argv[1]` through `argv[n]` point to the character strings forming the new parameter list. The parameter `argv[n+1]` must be a `NULL` pointer to mark the end of the parameter list.
-Files that are open when an `_exec` call is made remain open in the new process. In `_execl`, `_execlp`, `_execv`, and `_execvp` calls, the new process inherits the environment of the calling process. `_execle`, `_execlpe`, `_execve`, and `_execvpe` calls alter the environment for the new process by passing a list of environment settings through the `envp` parameter. `envp` is an array of character pointers, each element of which (except for the final element) points to a null-terminated string defining an environment variable. Such a string usually has the form `NAME=value` where `NAME` is the name of an environment variable and `value` is the string value to which that variable is set. (Note that `value` isn't enclosed in double quotation marks.) The final element of the `envp` array should be **`NULL`**. When `envp` itself is **`NULL`**, the new process inherits the environment settings of the calling process.
+Files that are open when an `_exec` call is made remain open in the new process. In **`_execl`**, **`_execlp`**, **`_execv`**, and **`_execvp`** calls, the new process inherits the environment of the calling process. **`_execle`**, **`_execlpe`**, **`_execve`**, and **`_execvpe`** calls alter the environment for the new process by passing a list of environment settings through the `envp` parameter. `envp` is an array of character pointers, each element of which (except for the final element) points to a null-terminated string defining an environment variable. Such a string usually has the form `NAME=value` where `NAME` is the name of an environment variable and `value` is the string value to which that variable is set. (The `value` isn't enclosed in double quotation marks.) The final element of the `envp` array should be `NULL`. When `envp` itself is `NULL`, the new process inherits the environment settings of the calling process.
A program executed with one of the `_exec` functions is always loaded into memory as if the maximum allocation field in the program's .exe file header were set to the default value of `0xFFFFH`.
-The `_exec` calls don't preserve the translation modes of open files. If the new process must use files inherited from the calling process, use the [`_setmode`](../c-runtime-library/reference/setmode.md) routine to set the translation mode of these files to the desired mode. You must explicitly flush (using `fflush` or `_flushall`) or close any stream before the `_exec` function call. Signal settings aren't preserved in new processes that are created by calls to `_exec` routines. The signal settings are reset to the default in the new process.
+The `_exec` calls don't preserve the translation modes of open files. If the new process must use files inherited from the calling process, use the [`_setmode`](./reference/setmode.md) routine to set the translation mode of these files to the desired mode. You must explicitly flush (using `fflush` or `_flushall`) or close any stream before the `_exec` function call. Signal settings aren't preserved in new processes that are created by calls to `_exec` routines. The signal settings are reset to the default in the new process.
## Example
@@ -193,10 +193,10 @@ int main( int ac, char* av[] )
## See also
-[Process and Environment Control](../c-runtime-library/process-and-environment-control.md)\
-[`abort`](../c-runtime-library/reference/abort.md)\
-[`atexit`](../c-runtime-library/reference/atexit.md)\
-[`exit`, `_Exit`, `_exit`](../c-runtime-library/reference/exit-exit-exit.md)\
-[`_onexit`, `_onexit_m`](../c-runtime-library/reference/onexit-onexit-m.md)\
-[`_spawn`, `_wspawn` Functions](../c-runtime-library/spawn-wspawn-functions.md)\
-[`system`, `_wsystem`](../c-runtime-library/reference/system-wsystem.md)
+[Process and environment control](./process-and-environment-control.md)\
+[`abort`](./reference/abort.md)\
+[`atexit`](./reference/atexit.md)\
+[`exit`, `_Exit`, `_exit`](./reference/exit-exit-exit.md)\
+[`_onexit`, `_onexit_m`](./reference/onexit-onexit-m.md)\
+[`_spawn`, `_wspawn` functions](./spawn-wspawn-functions.md)\
+[`system`, `_wsystem`](./reference/system-wsystem.md)
diff --git a/docs/c-runtime-library/execute-onexit-table-initialize-onexit-table-register-onexit-function.md b/docs/c-runtime-library/execute-onexit-table-initialize-onexit-table-register-onexit-function.md
index c142484008..d03b81c389 100644
--- a/docs/c-runtime-library/execute-onexit-table-initialize-onexit-table-register-onexit-function.md
+++ b/docs/c-runtime-library/execute-onexit-table-initialize-onexit-table-register-onexit-function.md
@@ -3,20 +3,20 @@ description: "Learn more about: _execute_onexit_table, _initialize_onexit_table,
title: "_execute_onexit_table, _initialize_onexit_table, _register_onexit_function"
ms.date: "4/2/2020"
api_name: ["_execute_onexit_table", "_initialize_onexit_table", "_register_onexit_function", "_o__execute_onexit_table", "_o__initialize_onexit_table", "_o__register_onexit_function"]
-api_location: ["api-ms-win-crt-runtime-l1-1-0.dll", "api-ms-win-crt-private-l1-1-0.dll"]
+api_location: ["api-ms-win-crt-runtime-l1-1-0.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
f1_keywords: ["_execute_onexit_table", "process/_execute_onexit_table", "_initialize_onexit_table", "process/_initialize_onexit_table", "_register_onexit_function", "process/_register_onexit_function"]
helpviewer_keywords: ["_execute_onexit_table function", "_initialize_onexit_table function", "_register_onexit_function function"]
ms.assetid: ad9e4149-d4ad-4fdf-aaaf-cf786fcb4473
---
-# _execute_onexit_table, _initialize_onexit_table, _register_onexit_function
+# `_execute_onexit_table`, `_initialize_onexit_table`, `_register_onexit_function`
Manages the routines to be called at exit time.
## Syntax
-```
+```C
int _initialize_onexit_table(
_onexit_table_t* table
);
@@ -33,38 +33,38 @@ int _execute_onexit_table(
#### Parameters
-*table*
-[in, out] Pointer to the onexit function table.
+*`table`*\
+[in, out] Pointer to the `onexit` function table.
-*function*
-[in] Pointer to a function to add to the onexit function table.
+*`function`*\
+[in] Pointer to a function to add to the `onexit` function table.
-## Return Value
+## Return value
-If successful, returns 0. Otherwise, returns a negative value.
+If successful, the function returns 0. Otherwise, it returns a negative value.
## Remarks
-These functions are infrastructure implementation details used to support the C runtime, and should not be called directly from your code. The C runtime uses an *onexit function table* to represent the sequence of functions registered by calls to `atexit`, `at_quick_exit`, and `_onexit`. The onexit function table data structure is an opaque implementation detail of the C runtime; the order and meaning of its data members may change. They should not be inspected by external code.
+These functions are infrastructure implementation details used to support the C runtime, and shouldn't be called directly from your code. The C runtime uses an `onexit` function table to represent the sequence of functions registered by calls to `atexit`, `at_quick_exit`, and `_onexit`. The `onexit` function table data structure is an opaque implementation detail of the C runtime; the order and meaning of its data members may change. They shouldn't be inspected by external code.
-The `_initialize_onexit_table` function initializes the onexit function table to its initial value. This function must be called before the onexit function table is passed to either `_register_onexit_function` or `_execute_onexit_table`.
+The **`_initialize_onexit_table`** function initializes the `onexit` function table to its initial value. This function must be called before the `onexit` function table is passed to either **`_register_onexit_function`** or **`_execute_onexit_table`**.
-The `_register_onexit_function` function appends a function to the end of the onexit function table.
+The **`_register_onexit_function`** function appends a function to the end of the `onexit` function table.
-The `_execute_onexit_table` function executes all of the functions in the onexit function table, clears the table, and then returns. After a call to `_execute_onexit_table`, the table is in a non-valid state; it must be reinitialized by a call to `_initialize_onexit_table` before it is used again.
+The **`_execute_onexit_table`** function executes all of the functions in the `onexit` function table, clears the table, and then returns. After a call to **`_execute_onexit_table`**, the table is in a non-valid state; it must be reinitialized by a call to **`_initialize_onexit_table`** before it's used again.
-By default, this function's global state is scoped to the application. To change this, see [Global state in the CRT](global-state.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).
## Requirements
-|Routine|Required header|
-|-------------|---------------------|
-|`_initialize_onexit_table function`, `_register_onexit_function`, `_execute_onexit_table`|C, C++: \
-[exit, _Exit, _exit](../c-runtime-library/reference/exit-exit-exit.md)
-[_onexit, _onexit_m](../c-runtime-library/reference/onexit-onexit-m.md)
+[`atexit`](./reference/atexit.md)\
+[`exit`, `_Exit`, `_exit`](./reference/exit-exit-exit.md)\
+[`_onexit`, `_onexit_m`](./reference/onexit-onexit-m.md)
diff --git a/docs/c-runtime-library/exit-success-exit-failure.md b/docs/c-runtime-library/exit-success-exit-failure.md
index af56fa001c..ddedc9aa4c 100644
--- a/docs/c-runtime-library/exit-success-exit-failure.md
+++ b/docs/c-runtime-library/exit-success-exit-failure.md
@@ -2,7 +2,7 @@
description: "Learn more about: EXIT_SUCCESS, EXIT_FAILURE"
title: "EXIT_SUCCESS, EXIT_FAILURE"
ms.date: "06/25/2018"
-f1_keywords: ["EXIT_FAILURE", "EXIT_SUCCESS"]
+f1_keywords: ["EXIT_FAILURE", "EXIT_SUCCESS", "STDLIB/EXIT_FAILURE", "STDLIB/EXIT_SUCCESS"]
helpviewer_keywords: ["EXIT_SUCCESS constant", "EXIT_FAILURE constant"]
---
# `EXIT_SUCCESS`, `EXIT_FAILURE`
@@ -15,13 +15,13 @@ helpviewer_keywords: ["EXIT_SUCCESS constant", "EXIT_FAILURE constant"]
## Remarks
-These are arguments for the [`exit`](reference/exit-exit-exit.md) and [`_exit`](reference/exit-exit-exit.md) functions, and the return values for the [`atexit`](reference/atexit.md) and [`_onexit`](reference/onexit-onexit-m.md) functions.
+The **`EXIT_SUCCESS`** and `EXIT_FAILURE` constants are arguments for the [`exit`](reference/exit-exit-exit.md) and [`_exit`](reference/exit-exit-exit.md) functions, and the return values for the [`atexit`](reference/atexit.md) and [`_onexit`](reference/onexit-onexit-m.md) functions.
-|Constant|Defined value|
-|-|-|
-|`EXIT_SUCCESS`|0|
-|`EXIT_FAILURE`|1|
+| Constant | Defined value |
+|---|---|
+| **`EXIT_SUCCESS`** | 0 |
+| **`EXIT_FAILURE`** | 1 |
## See also
-[Global Constants](../c-runtime-library/global-constants.md)
+[Global constants](./global-constants.md)
diff --git a/docs/c-runtime-library/file-attribute-constants.md b/docs/c-runtime-library/file-attribute-constants.md
index be625bb0b8..a7d89dbfd8 100644
--- a/docs/c-runtime-library/file-attribute-constants.md
+++ b/docs/c-runtime-library/file-attribute-constants.md
@@ -2,15 +2,15 @@
description: "Learn more about: File Attribute Constants"
title: "File Attribute Constants"
ms.date: "11/04/2016"
-f1_keywords: ["A_HIDDEN", "_A_NORMAL", "_A_SUBDIR", "_A_RDONLY", "A_NORMAL", "A_SUBDIR", "_A_SYSTEM", "c.constants.file", "_A_HIDDEN", "A_RDONLY", "_A_ARCH", "A_ARCH"]
+f1_keywords: ["_A_ARCH", "_A_HIDDEN", "_A_NORMAL", "_A_RDONLY", "_A_SUBDIR", "_A_SYSTEM", "CORECRT_IO/_A_ARCH", "CORECRT_IO/_A_HIDDEN", "CORECRT_IO/_A_NORMAL", "CORECRT_IO/_A_RDONLY", "CORECRT_IO/_A_SUBDIR", "CORECRT_IO/_A_SYSTEM", "c.constants.file"]
helpviewer_keywords: ["constants [C++], file attributes", "file attribute constants [C++]", "_A_SYSTEM constant", "files [C++], file attribute constants", "_A_SUBDIR constant", "_A_ARCH constant", "_A_NORMAL constant", "_A_HIDDEN constant", "_A_RDONLY constant"]
ms.assetid: 8dc8ccb9-99f5-446b-876c-7ebecc2f764f
---
-# File Attribute Constants
+# File attribute constants
## Syntax
-```
+```C
#include
-[Global Constants](../c-runtime-library/global-constants.md)
+[Filename search functions](./filename-search-functions.md)\
+[Global constants](./global-constants.md)
diff --git a/docs/c-runtime-library/file-constants.md b/docs/c-runtime-library/file-constants.md
index 0e8b4eca68..2d129f4ee1 100644
--- a/docs/c-runtime-library/file-constants.md
+++ b/docs/c-runtime-library/file-constants.md
@@ -2,36 +2,36 @@
description: "Learn more about: File Constants"
title: "File Constants"
ms.date: "11/04/2016"
-f1_keywords: ["_O_EXCL", "_O_RDWR", "_O_APPEND", "_O_RDONLY", "_O_TRUNC", "_O_CREAT", "_O_WRONLY"]
+f1_keywords: ["_O_APPEND", "_O_CREAT", "_O_EXCL", "_O_RDONLY", "_O_RDWR", "_O_TRUNC", "_O_WRONLY", "FCNTL/_O_APPEND", "FCNTL/_O_CREAT", "FCNTL/_O_EXCL", "FCNTL/_O_RDONLY", "FCNTL/_O_RDWR", "FCNTL/_O_TRUNC", "FCNTL/_O_WRONLY"]
helpviewer_keywords: ["_O_RDWR constant", "O_EXCL constant", "O_RDWR constant", "O_WRONLY constant", "O_APPEND constant", "O_CREAT constant", "_O_CREAT constant", "_O_APPEND constant", "_O_EXCL constant", "O_TRUNC constant", "_O_RDONLY constant", "_O_TRUNC constant", "O_RDONLY constant", "_O_WRONLY constant"]
ms.assetid: c8fa5548-9ac2-4217-801d-eb45e86f2fa4
---
-# File Constants
+# File constants
## Syntax
-```
+```C
#include
-[_sopen, _wsopen](../c-runtime-library/reference/sopen-wsopen.md)
-[Global Constants](../c-runtime-library/global-constants.md)
+[`_open`, `_wopen`](./reference/open-wopen.md)\
+[`_sopen`, `_wsopen`](./reference/sopen-wsopen.md)\
+[Global constants](./global-constants.md)
diff --git a/docs/c-runtime-library/file-handling.md b/docs/c-runtime-library/file-handling.md
index 5da950aeef..661f7a0fb3 100644
--- a/docs/c-runtime-library/file-handling.md
+++ b/docs/c-runtime-library/file-handling.md
@@ -1,82 +1,79 @@
---
-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
+# 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`](../c-runtime-library/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)
+## File-handling routines (file descriptor)
These routines operate on files designated by a file descriptor.
-|Routine|Use|
-|-------------|---------|
-|[`_chsize`](../c-runtime-library/reference/chsize.md),[`_chsize_s`](../c-runtime-library/reference/chsize-s.md)|Change file size|
-|[`_filelength`, `_filelengthi64`](../c-runtime-library/reference/filelength-filelengthi64.md)|Get file length|
-|[`_fstat`, `_fstat32`, `_fstat64`, `_fstati64`, `_fstat32i64`, `_fstat64i32`](../c-runtime-library/reference/fstat-fstat32-fstat64-fstati64-fstat32i64-fstat64i32.md)|Get file-status information on descriptor|
-|[`_get_osfhandle`](../c-runtime-library/reference/get-osfhandle.md)|Return operating-system file handle associated with existing C run-time file descriptor|
-|[`_isatty`](../c-runtime-library/reference/isatty.md)|Check for character device|
-|[`_locking`](../c-runtime-library/reference/locking.md)|Lock areas of file|
-|[`_open_osfhandle`](../c-runtime-library/reference/open-osfhandle.md)|Associate C run-time file descriptor with existing operating-system file handle|
-|[`_setmode`](../c-runtime-library/reference/setmode.md)|Set file-translation mode|
+| 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 |
## File-Handling Routines (Path or Filename)
These routines operate on files specified by a path or filename.
-|Routine|Use|
-|-------------|---------|
-|[`_access`, `_waccess`](../c-runtime-library/reference/access-waccess.md), [`_access_s`, `_waccess_s`](../c-runtime-library/reference/access-s-waccess-s.md)|Check file-permission setting|
-|[`_chmod`, `_wchmod`](../c-runtime-library/reference/chmod-wchmod.md)|Change file-permission setting|
-|[`_fullpath`, `_wfullpath`](../c-runtime-library/reference/fullpath-wfullpath.md)|Expand a relative path to its absolute path name|
-|[`_makepath`, `_wmakepath`](../c-runtime-library/reference/makepath-wmakepath.md), [`_makepath_s`, `_wmakepath_s`](../c-runtime-library/reference/makepath-s-wmakepath-s.md)|Merge path components into single, full path|
-|[`_mktemp`, `_wmktemp`](../c-runtime-library/reference/mktemp-wmktemp.md), [`_mktemp_s`, `_wmktemp_s`](../c-runtime-library/reference/mktemp-s-wmktemp-s.md)|Create unique filename|
-|[`remove`, `_wremove`](../c-runtime-library/reference/remove-wremove.md)|Delete file|
-|[`rename`, `_wrename`](../c-runtime-library/reference/rename-wrename.md)|Rename file|
-|[`_splitpath`, `_wsplitpath`](../c-runtime-library/reference/splitpath-wsplitpath.md), [`_splitpath_s`, `_wsplitpath_s`](../c-runtime-library/reference/splitpath-s-wsplitpath-s.md)|Parse path into components|
-|[`_stat`, `_stat64`, `_stati64`, `_wstat`, `_wstat64`, `_wstati64`](../c-runtime-library/reference/stat-functions.md)|Get file-status information on named file|
-|[`_umask`](../c-runtime-library/reference/umask.md), [`_umask_s`](../c-runtime-library/reference/umask-s.md)|Set default permission mask for new files created by program|
-|[`_unlink`, `_wunlink`](../c-runtime-library/reference/unlink-wunlink.md)|Delete file|
+| 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 |
## File-Handling Routines (Open File)
These routines open files.
-|Routine|Use|
-|-------------|---------|
-|[`fopen`, `_wfopen`](../c-runtime-library/reference/fopen-wfopen.md), [`fopen_s`, `_wfopen_s`](../c-runtime-library/reference/fopen-s-wfopen-s.md)|Opens a file and returns a pointer to the open file.|
-|[`_fsopen`, `_wfsopen`](../c-runtime-library/reference/fsopen-wfsopen.md)|Open a stream with file sharing and returns a pointer to the open file.|
-|[`_open`, `_wopen`](../c-runtime-library/reference/open-wopen.md)|Opens a file and returns a file descriptor to the opened file.|
-|[`_sopen`, `_wsopen`](../c-runtime-library/reference/sopen-wsopen.md), [`_sopen_s`, `_wsopen_s`](../c-runtime-library/reference/sopen-s-wsopen-s.md)|Open a file with file sharing and returns a file descriptor to the open file.|
-|[`_pipe`](../c-runtime-library/reference/pipe.md)|Creates a pipe for reading and writing.|
-|[`freopen`, `_wfreopen`](../c-runtime-library/reference/freopen-wfreopen.md), [`freopen_s`, `_wfreopen_s`](../c-runtime-library/reference/freopen-s-wfreopen-s.md)|Reassign a file pointer.|
+| 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. |
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`](../c-runtime-library/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`](../c-runtime-library/reference/fileno.md)|Gets the file descriptor associated with a stream.|
-|[`_get_osfhandle`](../c-runtime-library/reference/get-osfhandle.md)|Return operating-system file handle associated with existing C run-time file descriptor|
-|[`_open_osfhandle`](../c-runtime-library/reference/open-osfhandle.md)|Associates C run-time file descriptor with an existing operating-system 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. |
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](../c-runtime-library/run-time-routines-by-category.md)
-[Directory Control](../c-runtime-library/directory-control.md)
-[System Calls](../c-runtime-library/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/file-permission-constants.md b/docs/c-runtime-library/file-permission-constants.md
index 2e82e29c60..cf52032484 100644
--- a/docs/c-runtime-library/file-permission-constants.md
+++ b/docs/c-runtime-library/file-permission-constants.md
@@ -5,11 +5,11 @@ ms.date: "11/04/2016"
helpviewer_keywords: ["S_IWRITE constant", "constants [C++], file attributes", "S_IREAD constant", "file permissions [C++]", "_S_IWRITE constant", "_S_IREAD constant"]
ms.assetid: 593cad33-31d1-44d2-8941-8af7d210c88c
---
-# File Permission Constants
+# File permission constants
## Syntax
-```
+```C
#include
-[_sopen, _wsopen](../c-runtime-library/reference/sopen-wsopen.md)
-[_umask](../c-runtime-library/reference/umask.md)
-[Standard Types](../c-runtime-library/standard-types.md)
-[Global Constants](../c-runtime-library/global-constants.md)
+[`_open`, `_wopen`](./reference/open-wopen.md)\
+[`_sopen`, `_wsopen`](./reference/sopen-wsopen.md)\
+[`_umask`](./reference/umask.md)\
+[Standard types](./standard-types.md)\
+[Global constants](./global-constants.md)
diff --git a/docs/c-runtime-library/file-read-write-access-constants.md b/docs/c-runtime-library/file-read-write-access-constants.md
index 61bd190803..ebb65e68dd 100644
--- a/docs/c-runtime-library/file-read-write-access-constants.md
+++ b/docs/c-runtime-library/file-read-write-access-constants.md
@@ -5,36 +5,36 @@ ms.date: "11/04/2016"
helpviewer_keywords: ["read/write access constants", "write access constants", "access constants for file read/write", "constants [C++], file attributes", "file read/write access constants"]
ms.assetid: 56cd1d22-39a5-4fcf-bea2-7046d249e8ee
---
-# File Read/Write Access Constants
+# File read/write access constants
## Syntax
-```
+```C
#include
-[fopen, _wfopen](../c-runtime-library/reference/fopen-wfopen.md)
-[freopen, _wfreopen](../c-runtime-library/reference/freopen-wfreopen.md)
-[_fsopen, _wfsopen](../c-runtime-library/reference/fsopen-wfsopen.md)
-[_popen, _wpopen](../c-runtime-library/reference/popen-wpopen.md)
-[Global Constants](../c-runtime-library/global-constants.md)
+[`_fdopen`, `_wfdopen`](./reference/fdopen-wfdopen.md)\
+[`fopen`, `_wfopen`](./reference/fopen-wfopen.md)\
+[`freopen`, `_wfreopen`](./reference/freopen-wfreopen.md)\
+[`_fsopen`, `_wfsopen`](./reference/fsopen-wfsopen.md)\
+[`_popen`, `_wpopen`](./reference/popen-wpopen.md)\
+[Global constants](./global-constants.md)
diff --git a/docs/c-runtime-library/file-translation-constants.md b/docs/c-runtime-library/file-translation-constants.md
index 92f8263ea7..74ecd23f24 100644
--- a/docs/c-runtime-library/file-translation-constants.md
+++ b/docs/c-runtime-library/file-translation-constants.md
@@ -5,11 +5,11 @@ ms.date: "11/04/2016"
helpviewer_keywords: ["translation constants", "file translation [C++], constants", "translation, file translation constants", "translation, constants", "constants [C++], file translation mode", "file translation [C++]"]
ms.assetid: 49b13bf3-442e-4d19-878b-bd1029fa666a
---
-# File Translation Constants
+# File translation constants
## Syntax
-```
+```C
#include
-[fopen, _wfopen](../c-runtime-library/reference/fopen-wfopen.md)
-[freopen, _wfreopen](../c-runtime-library/reference/freopen-wfreopen.md)
-[_fsopen, _wfsopen](../c-runtime-library/reference/fsopen-wfsopen.md)
-[Global Constants](../c-runtime-library/global-constants.md)
+[`_fdopen`, `_wfdopen`](./reference/fdopen-wfdopen.md)\
+[`fopen`, `_wfopen`](./reference/fopen-wfopen.md)\
+[`freopen`, `_wfreopen`](./reference/freopen-wfreopen.md)\
+[`_fsopen`, `_wfsopen`](./reference/fsopen-wfsopen.md)\
+[Global constants](./global-constants.md)
diff --git a/docs/c-runtime-library/filename-max.md b/docs/c-runtime-library/filename-max.md
index 15923f7b07..81d0ddb93a 100644
--- a/docs/c-runtime-library/filename-max.md
+++ b/docs/c-runtime-library/filename-max.md
@@ -2,21 +2,21 @@
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
---
-# FILENAME_MAX
+# `FILENAME_MAX`
The maximum permissible length for a `filename` string buffer size.
## Syntax
-```
+```C
#include
-[Global Constants](../c-runtime-library/global-constants.md)
+[Path field limits](./path-field-limits.md)\
+[Global constants](./global-constants.md)
diff --git a/docs/c-runtime-library/filename-search-functions.md b/docs/c-runtime-library/filename-search-functions.md
index b3d10297dd..fd8726e2d6 100644
--- a/docs/c-runtime-library/filename-search-functions.md
+++ b/docs/c-runtime-library/filename-search-functions.md
@@ -7,15 +7,15 @@ api_type: ["DLLExport"]
topic_type: ["apiref"]
helpviewer_keywords: ["file names [C++], searching for", "_find function", "wfind function", "find function", "_wfind function"]
---
-# Filename Search Functions
+# Filename search functions
These functions search for and close searches for specified file names:
-- [`_findnext`, `_wfindnext`](../c-runtime-library/reference/findnext-functions.md)
+- [`_findnext`, `_wfindnext`](./reference/findnext-functions.md)
-- [`_findfirst`, `_wfindfirst`](../c-runtime-library/reference/findfirst-functions.md)
+- [`_findfirst`, `_wfindfirst`](./reference/findfirst-functions.md)
-- [`_findclose`](../c-runtime-library/reference/findclose.md)
+- [`_findclose`](./reference/findclose.md)
## Remarks
@@ -27,7 +27,7 @@ The functions return file information in a `_finddata_t` structure, which is def
File attribute.
`time_t time_create`\
-Time of file creation (`-1L` for FAT file systems). This time is stored in UTC format. To convert to the local time, use [`localtime_s`](../c-runtime-library/reference/localtime-s-localtime32-s-localtime64-s.md).
+Time of file creation (`-1L` for FAT file systems). This time is stored in UTC format. To convert to the local time, use [`localtime_s`](./reference/localtime-s-localtime32-s-localtime64-s.md).
`time_t time_access`\
Time of the last file access (`-1L` for FAT file systems). This time is stored in UTC format. To convert to the local time, use `localtime_s`.
@@ -45,19 +45,19 @@ In file systems that don't support the creation and last access times of a file,
`_MAX_PATH` is defined in `Stdlib.h` as 260 bytes.
-You can’t specify target attributes (such as `_A_RDONLY`) to limit the find operation. These attributes are returned in the `attrib` field of the `_finddata_t` structure and can have the following values (defined in `IO.h`). Users shouldn't rely on these being the only values possible for the `attrib` field.
+You can't specify target attributes (such as `_A_RDONLY`) to limit the find operation. These attributes are returned in the `attrib` field of the `_finddata_t` structure and can have the following values (defined in `IO.h`). Users shouldn't rely on these attributes being the only values possible for the `attrib` field.
`_A_ARCH`\
Archive. Set whenever the file is changed and cleared by the **`BACKUP`** command. Value: `0x20`.
`_A_HIDDEN`\
-Hidden file. Not generally seen with the `DIR` command, unless you use the **`/AH`** option. Returns information about normal files and files that have this attribute. Value: `0x02`.
+Hidden file. Not often seen with the `DIR` command, unless you use the **`/AH`** option. Returns information about normal files and files that have this attribute. Value: `0x02`.
`_A_NORMAL`\
Normal. File has no other attributes set and can be read or written to without restriction. Value: `0x00`.
`_A_RDONLY`\
-Read-only. File can’t be opened for writing and a file that has the same name can’t be created. Value: `0x01`.
+Read-only. File can't be opened for writing and a file that has the same name can't be created. Value: `0x01`.
`_A_SUBDIR`\
Subdirectory. Value: `0x10`.
@@ -69,21 +69,21 @@ System file. Not ordinarily seen with the **`DIR`** command, unless the **`/A`**
You can nest the `_find` functions. For example, if a call to `_findfirst` or `_findnext` finds the file that is a subdirectory, a new search can be initiated with another call to `_findfirst` or `_findnext`.
-`_wfindfirst` and `_wfindnext` are wide-character versions of `_findfirst` and `_findnext`. The structure argument of the wide-character versions has the `_wfinddata_t` data type, which is defined in `IO.h` and in `Wchar.h`. The fields of this data type are the same as those of the `_finddata_t` data type, except that in `_wfinddata_t` the name field is of type **`wchar_t`** instead of type **`char`**. Otherwise `_wfindfirst` and `_wfindnext` behave identically to `_findfirst` and `_findnext`.
+`_wfindfirst` and `_wfindnext` are wide-character versions of `_findfirst` and `_findnext`. The structure argument of the wide-character versions has the `_wfinddata_t` data type, which is defined in `IO.h` and in `Wchar.h`. The fields of this data type are the same as the fields of the `_finddata_t` data type, except that in `_wfinddata_t` the `name` field is of type **`wchar_t`** instead of type **`char`**. Otherwise, `_wfindfirst` and `_wfindnext` behave identically to `_findfirst` and `_findnext`.
-`_findfirst` and `_findnext` use the 64-bit time type. If you must use the old 32-bit time type, you can define `_USE_32BIT_TIME_T`. The versions of these functions that have the `32` suffix in their names use the 32-bit time type, and those with the `64` suffix use the 64-bit time type.
+`_findfirst` and `_findnext` use the 64-bit time type. If you must use the old 32-bit time type, you can define `_USE_32BIT_TIME_T`. The versions of these functions that have the `32` suffix in their names use the 32-bit time type, and the ones with the `64` suffix use the 64-bit time type.
Functions `_findfirst32i64`, `_findnext32i64`, `_wfindfirst32i64`, and `_wfindnext32i64` also behave identically to the 32-bit time type versions of these functions except they use and return 64-bit file lengths. Functions `_findfirst64i32`, `_findnext64i32`, `_wfindfirst64i32`, and `_wfindnext64i32` use the 64-bit time type but use 32-bit file lengths. These functions use appropriate variations of the `_finddata_t` type in which the fields have different types for the time and the file size.
`_finddata_t` is actually a macro that evaluates to `_finddata64i32_t` (or `_finddata32_t` if `_USE_32BIT_TIME_T` is defined). The following table summarizes the variations on `_finddata_t`:
-|Structure|Time type|File size type|
-|---------------|---------------|--------------------|
-|`_finddata_t`, `_wfinddata_t`|`__time64_t`|`_fsize_t`|
-|`_finddata32_t`, `_wfinddata32_t`|`__time32_t`|`_fsize_t`|
-|`__finddata64_t`, `__wfinddata64_t`|`__time64_t`|**`__int64`**|
-|`_finddata32i64_t`, `_wfinddata32i64_t`|`__time32_t`|**`__int64`**|
-|`_finddata64i32_t`, `_wfinddata64i32_t`|`__time64_t`|`_fsize_t`|
+| Structure | Time type | File size type |
+|---|---|---|
+| `_finddata_t`, `_wfinddata_t` | `__time64_t` | `_fsize_t` |
+| `_finddata32_t`, `_wfinddata32_t` | `__time32_t` | `_fsize_t` |
+| `__finddata64_t`, `_wfinddata64_t` | `__time64_t` | **`__int64`** |
+| `_finddata32i64_t`, `_wfinddata32i64_t` | `__time32_t` | **`__int64`** |
+| `_finddata64i32_t`, `_wfinddata64i32_t` | `__time64_t` | `_fsize_t` |
`_fsize_t` is a **`typedef`** for **`unsigned long`** (32 bits).
@@ -139,4 +139,4 @@ N N N Y test.c Wed Feb 06 14:30:44 2002 312
## See also
-[System Calls](../c-runtime-library/system-calls.md)
+[System calls](./system-calls.md)
diff --git a/docs/c-runtime-library/files-and-streams.md b/docs/c-runtime-library/files-and-streams.md
index 9d4ea210d1..16b6697be7 100644
--- a/docs/c-runtime-library/files-and-streams.md
+++ b/docs/c-runtime-library/files-and-streams.md
@@ -6,7 +6,7 @@ ms.topic: "conceptual"
helpviewer_keywords: ["files [C++]", "streams"]
ms.assetid: f61e712b-eac9-4c28-bb18-97c3786ef387
---
-# Files and Streams
+# Files and streams
A program communicates with the target environment by reading and writing files. A file can be:
@@ -16,27 +16,27 @@ A program communicates with the target environment by reading and writing files.
- A stream of bytes received from or sent to a peripheral device.
-The last two items are interactive files. Files are typically the principal means by which to interact with a program. You manipulate all these kinds of files in much the same way — by calling library functions. You include the standard header STDIO.H to declare most of these functions.
+The last two items are interactive files. Files are typically the principal means by which to interact with a program. You manipulate all these kinds of files in much the same way: by calling library functions. You include the standard header STDIO.H to declare most of these functions.
Before you can perform many of the operations on a file, the file must be opened. Opening a file associates it with a stream, a data structure within the Standard C Library that glosses over many differences among files of various kinds. The library maintains the state of each stream in an object of type FILE.
-The target environment opens three files before program startup. You can open a file by calling the library function [fopen, _wfopen](../c-runtime-library/reference/fopen-wfopen.md) with two arguments. (The `fopen` function has been deprecated, use [fopen_s, _wfopen_s](../c-runtime-library/reference/fopen-s-wfopen-s.md) instead.) The first argument is a filename. The second argument is a C string that specifies:
+The target environment opens three files before program startup. You can open a file by calling the library function [`fopen`, `_wfopen`](./reference/fopen-wfopen.md) with two arguments. (The `fopen` function has been deprecated, use [`fopen_s`, `_wfopen_s`](./reference/fopen-s-wfopen-s.md) instead.) The first argument is a filename. The second argument is a C string that specifies:
- Whether you intend to read data from the file or write data to it or both.
-- Whether you intend to generate new contents for the file (or create a file if it did not previously exist) or leave the existing contents in place.
+- Whether you intend to generate new contents for the file (or create a file if it didn't previously exist) or leave the existing contents in place.
- Whether writes to a file can alter existing contents or should only append bytes at the end of the file.
- Whether you want to manipulate a text stream or a binary stream.
-Once the file is successfully opened, you can then determine whether the stream is byte oriented (a byte stream) or wide oriented (a wide stream). A stream is initially unbound. Calling certain functions to operate on the stream makes it byte oriented, while certain other functions make it wide oriented. Once established, a stream maintains its orientation until it is closed by a call to [fclose](../c-runtime-library/reference/fclose-fcloseall.md) or [freopen](../c-runtime-library/reference/freopen-wfreopen.md).
+Once the file is successfully opened, you can then determine whether the stream is byte oriented (a byte stream) or wide oriented (a wide stream). A stream is initially unbound. Calling certain functions to operate on the stream makes it byte oriented, while certain other functions make it wide oriented. Once established, a stream maintains its orientation until it's closed by a call to [`fclose`](./reference/fclose-fcloseall.md) or [`freopen`](./reference/freopen-wfreopen.md).
© 1989-2001 by P.J. Plauger and Jim Brodie. All rights reserved.
## See also
-[Text and Binary Streams](../c-runtime-library/text-and-binary-streams.md)
-[Byte and Wide Streams](../c-runtime-library/byte-and-wide-streams.md)
-[Controlling Streams](../c-runtime-library/controlling-streams.md)
-[Stream States](../c-runtime-library/stream-states.md)
+[Text and binary streams](./text-and-binary-streams.md)\
+[Byte and wide streams](./byte-and-wide-streams.md)\
+[Controlling streams](./controlling-streams.md)\
+[Stream states](./stream-states.md)
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
-[_get_fmode](../c-runtime-library/reference/get-fmode.md)
-[_set_fmode](../c-runtime-library/reference/set-fmode.md)
+[Global variables](./global-variables.md)\
+[`_get_fmode`](./reference/get-fmode.md)\
+[`_set_fmode`](./reference/set-fmode.md)
diff --git a/docs/c-runtime-library/fopen-max-sys-open.md b/docs/c-runtime-library/fopen-max-sys-open.md
index 2c9b6fd3a5..8076924089 100644
--- a/docs/c-runtime-library/fopen-max-sys-open.md
+++ b/docs/c-runtime-library/fopen-max-sys-open.md
@@ -2,22 +2,22 @@
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
---
-# FOPEN_MAX, _SYS_OPEN
+# `FOPEN_MAX`, `_SYS_OPEN`
## Syntax
-```
+```C
#include
Typically, the **`Z`** type character is used only in driver debugging functions that use a conversion specification, such as `dbgPrint` and `kdPrint`.|
-
-Starting in Visual Studio 2015, 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:
-
-|Value|Output|
-|-----------|------------|
-|infinity|`inf`|
-|Quiet NaN|`nan`|
-|Signaling NaN|`nan(snan)`|
-|Indefinite NaN|`nan(ind)`|
-
-Any of these values may be prefixed by a sign. If a floating-point *type* conversion specifier character is a capital letter, then the output is also formatted in capital letters. For example, if the format specifier is `%F` instead of `%f`, an infinity is formatted as `INF` instead of `inf`. The `scanf` functions can also parse these strings, so these values can make a round trip through `printf` and `scanf` functions.
+| Type character | Argument | Output format |
+|---|---|---|
+| **`c`** | Character | When used with `printf` functions, specifies a single-byte character; when used with `wprintf` functions, specifies a wide character. |
+| **`C`** | Character | When used with `printf` functions, specifies a wide character; when used with `wprintf` functions, specifies a single-byte character. |
+| **`d`** | Integer | Signed decimal integer. |
+| **`i`** | Integer | Signed decimal integer. |
+| **`o`** | Integer | Unsigned octal integer. |
+| **`u`** | Integer | Unsigned decimal integer. |
+| **`x`** | Integer | Unsigned hexadecimal integer; uses "`abcdef`". |
+| **`X`** | Integer | Unsigned hexadecimal integer; uses "`ABCDEF`". |
+| **`e`** | Floating-point | Signed value that has the form [`-`]*d.dddd*`e`\[`+`\|`-`]*dd*\[*d*], where *d* is one decimal digit, *dddd* is one or more decimal digits depending on the specified precision, or six by default, and *dd*\[*d*] is two or three decimal digits depending on the [output format](./set-output-format.md) and size of the exponent. |
+| **`E`** | Floating-point | Identical to the **`e`** format except that **`E`** rather than **`e`** introduces the exponent. |
+| **`f`** | Floating-point | Signed value that has the form [`-`]*dddd*`.`*dddd*, where *dddd* is one or more decimal digits. The number of digits before the decimal point depends on the magnitude of the number, and the number of digits after the decimal point depends on the requested precision, or six by default. |
+| **`F`** | Floating-point | Identical to the **`f`** format except that infinity and NaN output is capitalized. |
+| **`g`** | Floating-point | Signed values are displayed in **`f`** or **`e`** format, whichever is more compact for the given value and precision. The **`e`** format is used only when the exponent of the value is less than -4 or greater than or equal to the *precision* argument. Trailing zeros are truncated, and the decimal point appears only if one or more digits follow it. |
+| **`G`** | Floating-point | Identical to the **`g`** format, except that **`E`**, rather than **`e`**, introduces the exponent (where appropriate). |
+| **`a`** | Floating-point | Signed hexadecimal double-precision floating-point value that has the form [`-`]`0x`*h.hhhh*`p`\[`+`\|`-`]*dd*, where *h.hhhh* are the hex digits (using lower case letters) of the mantissa, and *dd* are one or more digits for the exponent. The precision specifies the number of digits after the point. |
+| **`A`** | Floating-point | Signed hexadecimal double-precision floating-point value that has the form \[`-`]`0X`*h.hhhh*`P`\[`+`\|`-`]*dd*, where *h.hhhh* are the hex digits (using capital letters) of the mantissa, and *dd* are one or more digits for the exponent. The precision specifies the number of digits after the point. |
+| **`n`** | Pointer to integer | Number of characters that are successfully written so far to the stream or buffer. This value is stored in the integer whose address is given as the argument. The size of the integer pointed at can be controlled by an argument size specification prefix. The **`n`** specifier is disabled by default; for information see the important security note. |
+| **`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 | **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:
+
+| Value | Output |
+|---|---|
+| Infinity | `inf` |
+| Quiet NaN | `nan` |
+| Signaling NaN | `nan(snan)` |
+| Indefinite NaN | `nan(ind)` |
+
+Any of these strings may be prefixed by a sign. If a floating-point *type* conversion specifier character is a capital letter, then the output is also formatted in capital letters. For example, if the format specifier is `%F` instead of `%f`, an infinity is formatted as `INF` instead of `inf`. The `scanf` functions can also parse these strings, so these values can make a round trip through `printf` and `scanf` functions.
Before Visual Studio 2015, the CRT used a different, non-standard format for output of infinite, indefinite, and NaN values:
-|Value|Output|
-|-----------|------------|
-|+ infinity|`1.#INF` *random-digits*|
-|- infinity|`-1.#INF` *random-digits*|
-|Indefinite (same as quiet NaN)|*digit* `.#IND` *random-digits*|
-|NaN|*digit* `.#NAN` *random-digits*|
+| Value | Output |
+|---|---|
+| + Infinity | `1.#INF` *random-digits* |
+| - Infinity | `-1.#INF` *random-digits* |
+| Indefinite (same as quiet NaN) | *digit* `.#IND` *random-digits* |
+| NaN | *digit* `.#NAN` *random-digits* |
-Any of these may have been prefixed by a sign, and may have been formatted differently depending on field width and precision, sometimes with unusual effects. For example, `printf("%.2f\n", INFINITY)` prints `1.#J` because the *#INF* would be "rounded" to two digits of precision.
+Any of these strings may have been prefixed by a sign, and may have been formatted differently depending on field width and precision, sometimes with unusual effects. For example, `printf("%.2f\n", INFINITY)` prints `1.#J` because the *#INF* would be "rounded" to two digits of precision.
> [!NOTE]
> If the argument that corresponds to `%s` or `%S`, or the `Buffer` field of the argument that corresponds to `%Z`, is a null pointer, "(null)" is displayed.
> [!NOTE]
-> In all exponential formats, the minimum number of digits of exponent to display is two, using three only if necessary. By using the [`_set_output_format`](../c-runtime-library/set-output-format.md) function, you can set the number of digits displayed to three for backward compatibility with code written for Visual Studio 2013 and before.
+> In all exponential formats, the minimum number of digits of exponent to display is two, using three only if necessary. By using the [`_set_output_format`](./set-output-format.md) function, you can set the number of digits displayed to three for backward compatibility with code written for Visual Studio 2013 and before.
> [!IMPORTANT]
-> Because the `%n` format is inherently insecure, it's disabled by default. If `%n` is encountered in a format string, the invalid parameter handler is invoked, as described in [Parameter Validation](../c-runtime-library/parameter-validation.md). To enable `%n` support, see [`_set_printf_count_output`](../c-runtime-library/reference/set-printf-count-output.md).
-
-
+> Because the `%n` format is inherently insecure, it's disabled by default. If `%n` is encountered in a format string, the invalid parameter handler is invoked, as described in [Parameter validation](./parameter-validation.md). To enable `%n` support, see [`_set_printf_count_output`](./reference/set-printf-count-output.md).
-## Flag directives
+## Flag directives
-The first optional field in a conversion specification contains *flag directives*, zero or more flag characters that specify output justification and control output of signs, blanks, leading zeros, decimal points, and octal and hexadecimal prefixes. More than one flag directive may appear in a conversion specification, and the flag characters can appear in any order.
+The first optional field in a conversion specification contains *flag directives*. This field contains zero or more flag characters that specify output justification and control output of signs, blanks, leading zeros, decimal points, and octal and hexadecimal prefixes. More than one flag directive may appear in a conversion specification, and the flag characters can appear in any order.
### Flag characters
-|Flag|Meaning|Default|
-|----------|-------------|-------------|
-|**`-`**|Left align the result within the given field width.|Right align.|
-|**`+`**|Use a sign (+ or -) to prefix the output value if it's of a signed type.|Sign appears only for negative signed values (-).|
-|**`0`**|If *width* is prefixed by **`0`**, leading zeros are added until the minimum width is reached. If both **`0`** and **`-`** appear, the **`0`** is ignored. If **`0`** is specified for an integer format (**`i`**, **`u`**, **`x`**, **`X`**, **`o`**, **`d`**) and a precision specification is also present—for example, `%04.d`—the **`0`** is ignored. If **`0`** is specified for the **`a`** or **`A`** floating-point format, leading zeros are prepended to the mantissa, after the `0x` or `0X` prefix.|No padding.|
-|**blank (' ')**|Use a blank to prefix the output value if it's signed and positive. The blank is ignored if both the blank and + flags appear.|No blank appears.|
-|**`#`**|When it's used with the **`o`**, **`x`**, or **`X`** format, the **`#`** flag uses `0`, `0x`, or `0X`, respectively, to prefix any nonzero output value.|No prefix appears.|
-||When it's used with the **`e`**, **`E`**, **`f`**, **`F`**, **`a`**, or **`A`** format, the **`#`** flag forces the output value to contain a decimal point.|Decimal point appears only if digits follow it.|
-||When it's used with the **`g`** or **`G`** format, the **`#`** flag forces the output value to contain a decimal point and prevents the truncation of trailing zeros.
Ignored when used with **`c`**, **`d`**, **`i`**, **`u`**, or **`s`**.|Decimal point appears only if digits follow it. Trailing zeros are truncated.|
-
-
+| Flag | Meaning | Default |
+|---|---|---|
+| **`-`** | Left align the result within the given field width. | Right align. |
+| **`+`** | Use a sign (+ or -) to prefix the output value if it's of a signed type. | Sign appears only for negative signed values (-). |
+| **`0`** | If *width* is prefixed by **`0`**, leading zeros are added until the minimum width is reached. If both **`0`** and **`-`** appear, the **`0`** is ignored. If **`0`** is specified for an integer format (**`i`**, **`u`**, **`x`**, **`X`**, **`o`**, **`d`**) and a precision specification is also present—for example, `%04.d`—the **`0`** is ignored. If **`0`** is specified for the **`a`** or **`A`** floating-point format, leading zeros are prepended to the mantissa, after the `0x` or `0X` prefix. | No padding. |
+| **blank (' ')** | Use a blank to prefix the output value if it's signed and positive. The blank is ignored if both the blank and + flags appear. | No blank appears. |
+| **`#`** | When it's used with the **`o`**, **`x`**, or **`X`** format, the **`#`** flag uses `0`, `0x`, or `0X`, respectively, to prefix any nonzero output value. | No prefix appears. |
+| | When it's used with the **`e`**, **`E`**, **`f`**, **`F`**, **`a`**, or **`A`** format, the **`#`** flag forces the output value to contain a decimal point. | Decimal point appears only if digits follow it. |
+| | When it's used with the **`g`** or **`G`** format, the **`#`** flag forces the output value to contain a decimal point and prevents the truncation of trailing zeros.
Ignored when used with **`c`**, **`d`**, **`i`**, **`u`**, or **`s`**. | Decimal point appears only if digits follow it. Trailing zeros are truncated. |
-## Width specification
+## Width specification
In a conversion specification, the optional width specification field appears after any *flags* characters. The *`width`* argument is a non-negative decimal integer that controls the minimum number of characters that are output. If the number of characters in the output value is less than the specified width, blanks are added to the left or the right of the values—depending on whether the left-alignment flag (**`-`**) is specified—until the minimum width is reached. If *`width`* is prefixed by 0, leading zeros are added to integer or floating-point conversions until the minimum width is reached, except when conversion is to an infinity or `NaN`.
@@ -132,9 +126,7 @@ If the width specification is an asterisk (`*`), an `int` argument from the argu
A missing or small *`width`* value in a conversion specification doesn't cause the truncation of an output value. If the result of a conversion is wider than the *`width`* value, the field expands to contain the conversion result.
-
-
-## Precision specification
+## Precision specification
In a conversion specification, the third optional field is the precision specification. It consists of a period (`.`) followed by a non-negative decimal integer that, depending on the conversion type, specifies the number of string characters, the number of decimal places, or the number of significant digits to be output.
@@ -148,44 +140,42 @@ If the precision specification is an asterisk (`*`), an `int` argument from the
The *`type`* character determines either the interpretation of *`precision`* or the default precision when *`precision`* is omitted, as shown in the following table.
-### How Precision Values Affect Type
-
-|Type|Meaning|Default|
-|----------|-------------|-------------|
-|**`a`**, **`A`**|The precision specifies the number of digits after the point.|Default precision is 13. If precision is 0, no decimal point is printed unless the **`#`** flag is used.|
-|**`c`**, **`C`**|The precision has no effect.|Character is printed.|
-|**`d`**, **`i`**, **`o`**, **`u`**, **`x`**, **`X`**|The precision specifies the minimum number of digits to be printed. If the number of digits in the argument is less than *precision*, the output value is padded on the left with zeros. The value isn't truncated when the number of digits exceeds *precision*.|Default precision is 1.|
-|**`e`**, **`E`**|The precision specifies the number of digits to be printed after the decimal point. The last printed digit is rounded.|Default precision is 6. If *precision* is 0 or the period (`.`) appears without a number following it, no decimal point is printed.|
-|**`f`**, **`F`**|The precision value specifies the number of digits after the decimal point. If a decimal point appears, at least one digit appears before it. The value is rounded to the appropriate number of digits.|Default precision is 6. If *precision* is 0, or if the period (`.`) appears without a number following it, no decimal point is printed.|
-|**`g`**, **`G`**|The precision specifies the maximum number of significant digits printed.|Six significant digits are printed, and any trailing zeros are truncated.|
-|**`s`**, **`S`**|The precision specifies the maximum number of characters to be printed. Characters in excess of *precision* aren't printed.|Characters are printed until a null character is found.|
+### How precision values affect type
-
+| Type | Meaning | Default |
+|---|---|---|
+| **`a`**, **`A`** | The precision specifies the number of digits after the point. | Default precision is 13. If precision is 0, no decimal point is printed unless the **`#`** flag is used. |
+| **`c`**, **`C`** | The precision has no effect. | Character is printed. |
+| **`d`**, **`i`**, **`o`**, **`u`**, **`x`**, **`X`** | The precision specifies the minimum number of digits to be printed. If the number of digits in the argument is less than *precision*, the output value is padded on the left with zeros. The value isn't truncated when the number of digits exceeds *precision*. | Default precision is 1. |
+| **`e`**, **`E`** | The precision specifies the number of digits to be printed after the decimal point. The last printed digit is rounded. | Default precision is 6. If *precision* is 0 or the period (`.`) appears without a number following it, no decimal point is printed. |
+| **`f`**, **`F`** | The precision value specifies the number of digits after the decimal point. If a decimal point appears, at least one digit appears before it. The value is rounded to the appropriate number of digits. | Default precision is 6. If *precision* is 0, or if the period (`.`) appears without a number following it, no decimal point is printed. |
+| **`g`**, **`G`** | The precision specifies the maximum number of significant digits printed. | Six significant digits are printed, and any trailing zeros are truncated. |
+| **`s`**, **`S`** | The precision specifies the maximum number of characters to be printed. Characters in excess of *precision* aren't printed. | Characters are printed until a null character is found. |
-## Argument size specification
+## Argument size specification
In a conversion specification, the *size* field is an argument length modifier for the *type* conversion specifier. The *size* field prefixes to the *type* field—**`hh`**, **`h`**, **`j`**, **`l`** (lowercase L), **`L`**, **`ll`**, **`t`**, **`w`**, **`z`**, **`I`** (uppercase i), **`I32`**, and **`I64`**—specify the "size" of the corresponding argument—long or short, 32-bit or 64-bit, single-byte character or wide character—depending on the conversion specifier that they modify. These size prefixes are used with *type* characters in the `printf` and `wprintf` families of functions to specify the interpretation of argument sizes, as shown in the following table. The *size* field is optional for some argument types. When no size prefix is specified, the formatter consumes integer arguments—for example, signed or unsigned `char`, `short`, `int`, `long`, and enumeration types—as 32-bit `int` types, and `float`, `double`, and `long double` floating-point arguments are consumed as 64-bit `double` types. This behavior matches the default argument promotion rules for variable argument lists. For more information about argument promotion, see Ellipsis and Default Arguments in [Postfix expressions](../cpp/postfix-expressions.md). On both 32-bit and 64-bit systems, the conversion specification of a 64-bit integer argument must include a size prefix of **`ll`** or **`I64`**. Otherwise, the behavior of the formatter is undefined.
Some types are different sizes in 32-bit and 64-bit code. For example, `size_t` is 32 bits long in code compiled for x86, and 64 bits in code compiled for x64. To create platform-agnostic formatting code for variable-width types, you can use a variable-width argument size modifier. Instead, use a 64-bit argument size modifier and explicitly promote the variable-width argument type to 64 bits. The Microsoft-specific **`I`** (uppercase i) argument size modifier handles variable-width integer arguments, but we recommend the type-specific **`j`**, **`t`**, and **`z`** modifiers for portability.
-### Size Prefixes for printf and wprintf Format-Type Specifiers
-
-|To specify|Use prefix|With type specifier|
-|----------------|----------------|-------------------------|
-|`char`
`unsigned char`|**`hh`**|**`d`**, **`i`**, **`o`**, **`u`**, **`x`**, or **`X`**|
-|`short int`
`short unsigned int`|**`h`**|**`d`**, **`i`**, **`o`**, **`u`**, **`x`**, or **`X`**|
-|`__int32`
`unsigned __int32`|**`I32`**|**`d`**, **`i`**, **`o`**, **`u`**, **`x`**, or **`X`**|
-|`__int64`
`unsigned __int64`|**`I64`**|**`d`**, **`i`**, **`o`**, **`u`**, **`x`**, or **`X`**|
-|`intmax_t`
`uintmax_t`|**`j`** or **`I64`**|**`d`**, **`i`**, **`o`**, **`u`**, **`x`**, or **`X`**|
-|`long double`|**`l`** (lowercase L) or **`L`**|**`a`**, **`A`**, **`e`**, **`E`**, **`f`**, **`F`**, **`g`**, or **`G`**|
-|`long int`
`long unsigned int`|**`l`** (lowercase L) |**`d`**, **`i`**, **`o`**, **`u`**, **`x`**, or **`X`** |
-|`long long int`
`unsigned long long int`|**`ll`** (lowercase LL)|**`d`**, **`i`**, **`o`**, **`u`**, **`x`**, or **`X`**|
-|`ptrdiff_t`|**`t`** or **`I`** (uppercase i)|**`d`**, **`i`**, **`o`**, **`u`**, **`x`**, or **`X`**|
-|`size_t`|**`z`** or **`I`** (uppercase i)|**`d`**, **`i`**, **`o`**, **`u`**, **`x`**, or **`X`**|
-|Single-byte character|**`h`**|**`c`** or **`C`**|
-|Wide character|**`l`** (lowercase L) or **`w`**|**`c`** or **`C`**|
-|Single-byte character string|**`h`**|**`s`**, **`S`**, or **`Z`**|
-|Wide-character string|**`l`** (lowercase L) or **`w`**|**`s`**, **`S`**, or **`Z`**|
+### Size prefixes for printf and wprintf format-type specifiers
+
+| To specify | Use prefix | With type specifier |
+|---|---|---|
+| `char`
`unsigned char` | **`hh`** | **`d`**, **`i`**, **`o`**, **`u`**, **`x`**, or **`X`** |
+| `short int`
`short unsigned int` | **`h`** | **`d`**, **`i`**, **`o`**, **`u`**, **`x`**, or **`X`** |
+| `__int32`
`unsigned __int32` | **`I32`** | **`d`**, **`i`**, **`o`**, **`u`**, **`x`**, or **`X`** |
+| `__int64`
`unsigned __int64` | **`I64`** | **`d`**, **`i`**, **`o`**, **`u`**, **`x`**, or **`X`** |
+| `intmax_t`
`uintmax_t` | **`j`** or **`I64`** | **`d`**, **`i`**, **`o`**, **`u`**, **`x`**, or **`X`** |
+| `long double` | **`l`** (lowercase L) or **`L`** | **`a`**, **`A`**, **`e`**, **`E`**, **`f`**, **`F`**, **`g`**, or **`G`** |
+| `long int`
`long unsigned int` | **`l`** (lowercase L) | **`d`**, **`i`**, **`o`**, **`u`**, **`x`**, or **`X`** |
+| `long long int`
`unsigned long long int` | **`ll`** (lowercase LL) | **`d`**, **`i`**, **`o`**, **`u`**, **`x`**, or **`X`** |
+| `ptrdiff_t` | **`t`** or **`I`** (uppercase i) | **`d`**, **`i`**, **`o`**, **`u`**, **`x`**, or **`X`** |
+| `size_t` | **`z`** or **`I`** (uppercase i) | **`d`**, **`i`**, **`o`**, **`u`**, **`x`**, or **`X`** |
+| Single-byte character | **`h`** | **`c`** or **`C`** |
+| Wide character | **`l`** (lowercase L) or **`w`** | **`c`** or **`C`** |
+| Single-byte character string | **`h`** | **`s`**, **`S`**, or **`Z`** |
+| Wide-character string | **`l`** (lowercase L) or **`w`** | **`s`**, **`S`**, or **`Z`** |
The `ptrdiff_t` and `size_t` types are `__int32` or `unsigned __int32` on 32-bit platforms, and `__int64` or `unsigned __int64` on 64-bit platforms. The **`I`** (uppercase i), **`j`**, **`t`**, and **`z`** size prefixes take the correct argument width for the platform.
@@ -199,6 +189,6 @@ An **`hc`** or **`hC`** type specifier is synonymous with **`c`** in `printf` fu
## See also
-[`printf`, `_printf_l`, `wprintf`, `_wprintf_l`](../c-runtime-library/reference/printf-printf-l-wprintf-wprintf-l.md)\
-[`printf_s`, `_printf_s_l`, `wprintf_s`, `_wprintf_s_l`](../c-runtime-library/reference/printf-s-printf-s-l-wprintf-s-wprintf-s-l.md)\
-[`printf_p` Positional Parameters](../c-runtime-library/printf-p-positional-parameters.md)
+[`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)\
+[`printf_p` Positional Parameters](./printf-p-positional-parameters.md)
diff --git a/docs/c-runtime-library/freeentry-usedentry.md b/docs/c-runtime-library/freeentry-usedentry.md
index 3fd34d2972..e6dd6248f6 100644
--- a/docs/c-runtime-library/freeentry-usedentry.md
+++ b/docs/c-runtime-library/freeentry-usedentry.md
@@ -2,23 +2,23 @@
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
---
-# _FREEENTRY, _USEDENTRY
+# `_FREEENTRY`, `_USEDENTRY`
## Syntax
-```
+```C
#include
-[Global Constants](../c-runtime-library/global-constants.md)
+[`_heapwalk`](./reference/heapwalk.md)\
+[Global constants](./global-constants.md)
diff --git a/docs/c-runtime-library/fseek-lseek-constants.md b/docs/c-runtime-library/fseek-lseek-constants.md
index ca5be7933d..8218c3ace8 100644
--- a/docs/c-runtime-library/fseek-lseek-constants.md
+++ b/docs/c-runtime-library/fseek-lseek-constants.md
@@ -2,30 +2,30 @@
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
---
-# fseek, _lseek Constants
+# `fseek`, `_lseek` constants
## Syntax
-```
+```C
#include
-[_lseek, _lseeki64](../c-runtime-library/reference/lseek-lseeki64.md)
-[Global Constants](../c-runtime-library/global-constants.md)
+[`fseek`, `_fseeki64`](./reference/fseek-fseeki64.md)\
+[`_lseek`, `_lseeki64`](./reference/lseek-lseeki64.md)\
+[Global constants](./global-constants.md)
diff --git a/docs/c-runtime-library/function-family-overviews.md b/docs/c-runtime-library/function-family-overviews.md
index d8fa708dd7..c6223a9cc1 100644
--- a/docs/c-runtime-library/function-family-overviews.md
+++ b/docs/c-runtime-library/function-family-overviews.md
@@ -10,7 +10,7 @@ This section lists C runtime library routines by function family.
## CRT library routine families
-[_exec, _wexec](exec-wexec-functions.md)\
+[`_exec`, `_wexec`](exec-wexec-functions.md)\
Functions to load and execute a new process.
[Filename search functions](filename-search-functions.md)\
@@ -23,7 +23,7 @@ Describes the format string and arguments for `printf` and `wprintf`.
Describes the format specification fields for parsing an input stream for the entire `scanf` family of functions.
[`is`, `isw` functions](is-isw-routines.md)\
-Functions for testing characters for things like whether they are uppercase, ASCII, numeric, punctuation, and so on.
+Functions for testing characters for things like whether they're uppercase, ASCII, numeric, punctuation, and so on.
[`_ismbb` functions](ismbb-routines.md)\
Functions for testing an integer value for whether it represents an alpha character, blank character, a print character, and so on.
@@ -32,13 +32,13 @@ Functions for testing an integer value for whether it represents an alpha charac
Functions for testing a multibyte character for whether it represents an alpha character, blank character, a print character, and so on.
[operator `delete` (CRT)](delete-operator-crt.md)\
-Beginning in Visual Studio 2013, the Universal C Runtime (UCRT) no longer supports the C++-specific operator delete function. It is now part of the C++ Standard Library.
+Beginning in Visual Studio 2013, the Universal C Runtime (UCRT) no longer supports the C++-specific operator delete function. It's now part of the C++ Standard Library.
[operator `new` (CRT)](new-operator-crt.md)\
-Beginning in Visual Studio 2013, the Universal C Runtime (UCRT) no longer supports the C++-specific operator new function. It is now part of the C++ Standard Library.
+Beginning in Visual Studio 2013, the Universal C Runtime (UCRT) no longer supports the C++-specific operator new function. It's now part of the C++ Standard Library.
[`printf` positional parameter functions](printf-p-positional-parameters.md)\
-Positional parameters specify by number which of the arguments is to be substituted into a field in a format string.
+Positional parameters specify by number the argument to substitute into a field in a format string.
[`scanf` type field characters](scanf-type-field-characters.md)\
The type character determines whether the associated argument is interpreted as a character, string, or number for any of the `scanf` family of functions, including the secure versions, such as `scanf_s`.
@@ -56,7 +56,7 @@ The `strcoll` and `wcscoll` functions compare two strings according to the `LC_C
The `strtod` family of functions convert a null-terminated string to a numeric value.
[`vprintf` functions](vprintf-functions.md)\
-The `vprintf` functions take a pointer to an argument list, formats it, and writes the result to the specified destination. The functions differ in the parameter validation performed, whether they take wide or single-byte character strings, the output destination, and support for specifying the order in which parameters are used in the format string.
+The `vprintf` functions take a pointer to an argument list, format it, and write the result to the specified destination. The functions differ in several ways: the parameter validation performed; whether they take wide or single-byte character strings; the output destination; and support for specifying the order in which parameters are used in the format string.
## See also
diff --git a/docs/c-runtime-library/generic-text-mappings.md b/docs/c-runtime-library/generic-text-mappings.md
index 583bbc5975..ada65a3cd9 100644
--- a/docs/c-runtime-library/generic-text-mappings.md
+++ b/docs/c-runtime-library/generic-text-mappings.md
@@ -6,19 +6,19 @@ f1_keywords: ["c.mappings"]
helpviewer_keywords: ["generic-text mappings", "mappings, generic-text"]
ms.assetid: 1ed02e02-3649-42dd-a697-e1b4af25bb02
---
-# Generic-Text Mappings
+# Generic-text mappings
To simplify writing code for international markets, generic-text mappings are defined in TCHAR.H for:
-- [Data types](../c-runtime-library/data-type-mappings.md)
+- [Data types](./data-type-mappings.md)
-- [Constants and global variables](../c-runtime-library/constant-and-global-variable-mappings.md)
+- [Constants and global variables](./constant-and-global-variable-mappings.md)
-- [Routine mappings](../c-runtime-library/routine-mappings.md)
+- [Routine mappings](./routine-mappings.md)
-For more information, see [Using Generic-Text Mappings](../c-runtime-library/using-generic-text-mappings.md). Generic-text mappings are Microsoft extensions that are not ANSI compatible.
+For more information, see [Using generic-text mappings](./using-generic-text-mappings.md). Generic-text mappings are Microsoft extensions that aren't ANSI compatible.
## See also
-[Data Type Mappings](../c-runtime-library/data-type-mappings.md)
-[A Sample Generic-Text Program](../c-runtime-library/a-sample-generic-text-program.md)
+[Data type mappings](./data-type-mappings.md)\
+[A sample generic-text program](./a-sample-generic-text-program.md)
diff --git a/docs/c-runtime-library/get-output-format.md b/docs/c-runtime-library/get-output-format.md
index 9a5ea52f24..ae1ddd4667 100644
--- a/docs/c-runtime-library/get-output-format.md
+++ b/docs/c-runtime-library/get-output-format.md
@@ -10,7 +10,7 @@ f1_keywords: ["get_output_format", "_get_output_format"]
helpviewer_keywords: ["output formatting", "get_output_format function", "_get_output_format function"]
ms.assetid: 0ce42f3b-3479-41c4-bcbf-1d21f7ee37e7
---
-# _get_output_format
+# `_get_output_format`
Gets the current value of the output format flag.
@@ -19,29 +19,29 @@ Gets the current value of the output format flag.
## Syntax
-```
+```C
unsigned int _get_output_format();
```
-## Return Value
+## Return value
The current value of the output format flag.
## Remarks
-The output format flag controls features of formatted I/O. At present the flag has two possible values: 0 and `_TWO_DIGIT_EXPONENT`. If `_TWO_DIGIT_EXPONENT` is set, the floating point numbers is printed with only two digits in the exponent unless a third digit is required by the size of the exponent. If the flag is zero, the floating point output displays three digits of exponent, using zeroes if necessary to pad the value to three digits.
+The output format flag controls features of formatted I/O. The flag has two possible values: 0 and `_TWO_DIGIT_EXPONENT`. If `_TWO_DIGIT_EXPONENT` is set, the floating point number is printed with only two digits in the exponent unless a third digit is required by the size of the exponent. If the flag is zero, the floating point output displays three digits of exponent, using zeroes if necessary to pad the value to three digits.
## Requirements
-|Routine|Required header|
-|-------------|---------------------|
-|`_get_output_format`|\
-[printf, _printf_l, wprintf, _wprintf_l](../c-runtime-library/reference/printf-printf-l-wprintf-wprintf-l.md)
-[printf_s, _printf_s_l, wprintf_s, _wprintf_s_l](../c-runtime-library/reference/printf-s-printf-s-l-wprintf-s-wprintf-s-l.md)
-[_set_output_format](../c-runtime-library/set-output-format.md)
+[Format specification syntax: `printf` and `wprintf` functions](./format-specification-syntax-printf-and-wprintf-functions.md)\
+[`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)\
+[`_set_output_format`](./set-output-format.md)
diff --git a/docs/c-runtime-library/getmainargs-wgetmainargs.md b/docs/c-runtime-library/getmainargs-wgetmainargs.md
index 5ae0fde552..a5a8f96735 100644
--- a/docs/c-runtime-library/getmainargs-wgetmainargs.md
+++ b/docs/c-runtime-library/getmainargs-wgetmainargs.md
@@ -10,7 +10,7 @@ f1_keywords: ["__wgetmainargs", "__getmainargs"]
helpviewer_keywords: ["__wgetmainargs", "__getmainargs"]
ms.assetid: f72f54eb-9509-4bdf-8752-40fc49055439
---
-# __getmainargs, __wgetmainargs
+# `__getmainargs`, `__wgetmainargs`
Invokes command-line parsing and copies the arguments to `main()` back through the passed pointers.
@@ -18,48 +18,48 @@ Invokes command-line parsing and copies the arguments to `main()` back through t
```cpp
int __getmainargs(
- int * _Argc,
- char *** _Argv,
- char *** _Env,
- int _DoWildCard,
-_startupinfo * _StartInfo);
+ int * argc,
+ char *** argv,
+ char *** env,
+ int doWildCard,
+_startupinfo * startInfo);
int __wgetmainargs (
- int *_Argc,
- wchar_t ***_Argv,
- wchar_t ***_Env,
- int _DoWildCard,
- _startupinfo * _StartInfo)
+ int *argc,
+ wchar_t ***argv,
+ wchar_t ***env,
+ int doWildCard,
+ _startupinfo * startInfo)
```
#### Parameters
-`_Argc`
+*`argc`*\
An integer that contains the number of arguments that follow in `argv`. The `argc` parameter is always greater than or equal to 1.
-`_Argv`
-An array of null-terminated strings representing command-line arguments entered by the user of the program. By convention, `argv[0]` is the command with which the program is invoked, argv[1] is the first command-line argument, and so on, until argv[argc], which is always **NULL**. The first command-line argument is always `argv[1]` and the last one is `argv[argc - 1]`.
+*`argv`*\
+An array of null-terminated strings representing command-line arguments entered by the user of the program. By convention, `argv[0]` is the command with which the program is invoked, argv[1] is the first command-line argument, and so on, until argv[argc], which is always `NULL`. The first command-line argument is always `argv[1]` and the last one is `argv[argc - 1]`.
-`_Env`
-An array of strings that represent the variables set in the user's environment. This array is terminated by a **NULL** entry.
+*`env`*\
+An array of strings that represent the variables set in the user's environment. This array is terminated by a `NULL` entry.
-`_DoWildCard`
+*`doWildCard`*\
An integer that if set to 1 expands the wildcards in the command line arguments, or if set to 0 does nothing.
-`_StartInfo`
+*`startInfo`*\
Other information to be passed to the CRT DLL.
-## Return Value
+## Return value
0 if successful; a negative value if unsuccessful.
## Remarks
-Use `__getmainargs` on non-wide character platforms, and `__wgetmainargs` on wide-character (Unicode) platforms.
+Use **`__getmainargs`** on non-wide character platforms, and **`__wgetmainargs`** on wide-character (Unicode) platforms.
## Requirements
-|Routine|Required header|
-|-------------|---------------------|
-|__getmainargs|internal.h|
-|__wgetmainargs|internal.h|
+| Routine | Required header |
+|---|---|
+| **`__getmainargs`** | `internal.h` |
+| **`__wgetmainargs`** | `internal.h` |
diff --git a/docs/c-runtime-library/gets-getws.md b/docs/c-runtime-library/gets-getws.md
index 0f316ad0e1..f3da079669 100644
--- a/docs/c-runtime-library/gets-getws.md
+++ b/docs/c-runtime-library/gets-getws.md
@@ -3,7 +3,7 @@ description: "Learn more about: gets, _getws"
title: "gets, _getws"
ms.date: "4/2/2020"
api_name: ["_getws", "gets", "_o__getws", "_o_gets"]
-api_location: ["msvcr80.dll", "msvcr90.dll", "msvcr120.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcrt.dll", "msvcr100.dll", "api-ms-win-crt-stdio-l1-1-0.dll", "api-ms-win-crt-private-l1-1-0.dll"]
+api_location: ["msvcr80.dll", "msvcr90.dll", "msvcr120.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcrt.dll", "msvcr100.dll", "api-ms-win-crt-stdio-l1-1-0.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
f1_keywords: ["_getts", "gets", "_getws"]
@@ -11,17 +11,17 @@ helpviewer_keywords: ["getws function", "getts function", "_getws function", "li
---
# `gets`, `_getws`
-Gets a line from the `stdin` stream. More secure versions of these functions are available; see [`gets_s`, `_getws_s`](../c-runtime-library/reference/gets-s-getws-s.md).
+Gets a line from the **`stdin`** stream. More secure versions of these functions are available; see [`gets_s`, `_getws_s`](./reference/gets-s-getws-s.md).
> [!IMPORTANT]
-> These functions are obsolete. Beginning in Visual Studio 2015, they are not available in the CRT. The secure versions of these functions, `gets_s` and `_getws_s`, are still available. For information on these alternative functions, see [`gets_s`, `_getws_s`](../c-runtime-library/reference/gets-s-getws-s.md).
+> These functions are obsolete. Beginning in Visual Studio 2015, they are not available in the CRT. The secure versions of these functions, `gets_s` and `_getws_s`, are still available. For information on these alternative functions, see [`gets_s`, `_getws_s`](./reference/gets-s-getws-s.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).
## Syntax
-```
+```C
char *gets(
char *buffer
);
@@ -38,40 +38,40 @@ wchar_t *_getws(
); // C++ only
```
-#### Parameters
+### Parameters
*`buffer`*\
Storage location for input string.
-## Return Value
+## Return value
-Returns its argument if successful. A **`NULL`** pointer indicates an error or end-of-file condition. Use [`ferror`](../c-runtime-library/reference/ferror.md) or [`feof`](../c-runtime-library/reference/feof.md) to determine which one has occurred. If `buffer` is **`NULL`**, these functions invoke an invalid parameter handler, as described in [Parameter Validation](../c-runtime-library/parameter-validation.md). If execution is allowed to continue, these functions return **`NULL`** and set `errno` to `EINVAL`.
+Returns its argument if successful. A `NULL` pointer indicates an error or end-of-file condition. Use [`ferror`](./reference/ferror.md) or [`feof`](./reference/feof.md) to determine which one has occurred. If *`buffer`* is `NULL`, these functions invoke an invalid parameter handler, as described in [Parameter validation](./parameter-validation.md). If execution is allowed to continue, these functions return `NULL` and set `errno` to `EINVAL`.
## Remarks
-The `gets` function reads a line from the standard input stream `stdin` and stores it in `buffer`. The line consists of all characters up to and including the first newline character ('\n'). `gets` then replaces the newline character with a null character ('\0') before returning the line. In contrast, the `fgets` function retains the newline character. `_getws` is a wide-character version of `gets`; its argument and return value are wide-character strings.
+The **`gets`** function reads a line from the standard input stream **`stdin`** and stores it in *`buffer`*. The line consists of all characters up to and including the first newline character ('\n'). **`gets`** then replaces the newline character with a null character ('\0') before returning the line. In contrast, the `fgets` function retains the newline character. **`_getws`** is a wide-character version of **`gets`**; its argument and return value are wide-character strings.
> [!IMPORTANT]
-> Because there is no way to limit the number of characters read by `gets`, untrusted input can easily cause buffer overruns. Use `fgets` instead.
+> Because there is no way to limit the number of characters read by **`gets`**, untrusted input can easily cause buffer overruns. Use `fgets` instead.
-In C++, these functions have template overloads that invoke the newer, secure counterparts of these functions. For more information, see [Secure Template Overloads](../c-runtime-library/secure-template-overloads.md).
+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).
-By default, this function's global state is scoped to the application. To change this, see [Global state in the CRT](global-state.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 routine mappings
-|TCHAR.H routine|_UNICODE & _MBCS not defined|_MBCS defined|_UNICODE defined|
-|---------------------|------------------------------------|--------------------|-----------------------|
-|`_getts`|`gets`|`gets`|`_getws`|
+| TCHAR.H routine | `_UNICODE` and `_MBCS` not defined | `_MBCS` defined | `_UNICODE` defined |
+|---|---|---|---|
+| `_getts` | **`gets`** | **`gets`** | **`_getws`** |
## Requirements
-|Routine|Required header|
-|-------------|---------------------|
-|`gets`|`
-[Global Variables](../c-runtime-library/global-variables.md)
-[Considerations for Writing Prolog/Epilog Code](../cpp/considerations-for-writing-prolog-epilog-code.md)
+[C runtime library reference](./c-run-time-library-reference.md)\
+[Global variables](./global-variables.md)\
+[Considerations for writing prolog/epilog code](../cpp/considerations-for-writing-prolog-epilog-code.md)
diff --git a/docs/c-runtime-library/global-state.md b/docs/c-runtime-library/global-state.md
index 04d32ae9c4..b1d216c39c 100644
--- a/docs/c-runtime-library/global-state.md
+++ b/docs/c-runtime-library/global-state.md
@@ -26,34 +26,34 @@ The OS-specific versions of these functions are in `ucrt.osmode.lib`. For exampl
There are two ways to isolate your component's CRT state from an app's CRT state:
- Statically link your component by using compiler options `/MT` (release) or `/MTd` (debug). For details, see [/MD, /MT, /LD](../build/reference/md-mt-ld-use-run-time-library.md). Static linking can greatly increase binary size.
-- Starting in Windows versions beginning with Windows 10 version 2004, dynamically link to the CRT but call the OS-mode exports (the functions that begin with _o_). To call the OS-mode exports, statically link as before, but ignore the static UCRT by using linker option `/NODEFAULTLIB:libucrt.lib` (release) or `/NODEFAULTLIB:libucrtd.lib` (debug). And add `ucrt.osmode.lib` to the linker input. See [/NODEFAULTLIB (Ignore Libraries)](../build/reference/nodefaultlib-ignore-libraries.md) for details.
+- Starting in Windows versions beginning with Windows 10 version 2004, dynamically link to the CRT but call the OS-mode exports (the functions that begin with _o_). To call the OS-mode exports, statically link as before, but ignore the static UCRT by using linker option `/NODEFAULTLIB:libucrt.lib` (release) or `/NODEFAULTLIB:libucrtd.lib` (debug). And add `ucrt.osmode.lib` to the linker input. See [`/NODEFAULTLIB` (Ignore Libraries)](../build/reference/nodefaultlib-ignore-libraries.md) for details.
-> [!Note]
+> [!NOTE]
> In source code, write `setlocale()`, not `_o_setlocale()`. When you link against `ucrt.osmode.lib`, the linker will automatically substitute the OS-specific version of the function. That is, `setlocale()` will be substituted with `_o_setlocale()`.
-Linking against `ucrt.osmode.lib` disables some UCRT calls that are only available in app mode. Attempting to call these will result in a link error.
+Linking against `ucrt.osmode.lib` disables some UCRT calls that are only available in app mode. Attempting to call these functions will result in a link error.
## Global state affected by app/OS separation
Global state affected by the separation of app and OS state includes:
- [Locale data](locale.md)
-- Signal handlers set by [signal](reference/signal.md)
-- Termination routines set by [terminate](reference/set-terminate-crt.md)
-- [errno and _doserrno](errno-doserrno-sys-errlist-and-sys-nerr.md)
-- Random number generation state used by [rand](reference/rand.md) and [srand](reference/srand.md)
+- Signal handlers set by [`signal`](reference/signal.md)
+- Termination routines set by [`terminate`](reference/set-terminate-crt.md)
+- [`errno` and `_doserrno`](errno-doserrno-sys-errlist-and-sys-nerr.md)
+- Random number generation state used by [`rand`](reference/rand.md) and [`srand`](reference/srand.md)
- Functions that return a buffer that the user doesn't need to release:
- [strtok, wcstok, _mbstok](reference/strtok-strtok-l-wcstok-wcstok-l-mbstok-mbstok-l.md)
- [Tmpnam, _wtmpnam](reference/tempnam-wtempnam-tmpnam-wtmpnam.md)
- [asctime, _wasctime](reference/asctime-wasctime.md)
- [gmtime, _gmtime32, _gmtime64](reference/gmtime-gmtime32-gmtime64.md)
- [_fcvt](reference/fcvt.md)
- [_ecvt](reference/ecvt.md)
- [strerror, _strerror, _wcserror, __wcserror](reference/strerror-strerror-wcserror-wcserror.md)
-- The buffer used by [_putch, _putwch](reference/putch-putwch.md)
-- [_set_invalid_parameter_handler, _set_thread_local_invalid_parameter_handler](reference/set-invalid-parameter-handler-set-thread-local-invalid-parameter-handler.md)
-- [_set_new_handler](reference/set-new-handler.md) and [_set_new_mode](reference/set-new-mode.md)
-- [fmode](text-and-binary-mode-file-i-o.md)
+ [`strtok`, `wcstok`, `_mbstok`](reference/strtok-strtok-l-wcstok-wcstok-l-mbstok-mbstok-l.md)\
+ [`Tmpnam`, `_wtmpnam`](reference/tempnam-wtempnam-tmpnam-wtmpnam.md)\
+ [`asctime`, `_wasctime`](reference/asctime-wasctime.md)\
+ [`gmtime`, `_gmtime32`, `_gmtime64`](reference/gmtime-gmtime32-gmtime64.md)\
+ [`_fcvt`](reference/fcvt.md)\
+ [`_ecvt`](reference/ecvt.md)\
+ [`strerror`, `_strerror`, `_wcserror`, `__wcserror`](reference/strerror-strerror-wcserror-wcserror.md)
+- The buffer used by [`_putch`, `_putwch`](reference/putch-putwch.md)
+- [`_set_invalid_parameter_handler`, `_set_thread_local_invalid_parameter_handler`](reference/set-invalid-parameter-handler-set-thread-local-invalid-parameter-handler.md)
+- [`_set_new_handler`](reference/set-new-handler.md) and [`_set_new_mode`](reference/set-new-mode.md)
+- [`fmode`](text-and-binary-mode-file-i-o.md)
- [Time zone information](time-management.md)
## See also
diff --git a/docs/c-runtime-library/global-variables-and-standard-types.md b/docs/c-runtime-library/global-variables-and-standard-types.md
index 6fcb49b026..e8f156062e 100644
--- a/docs/c-runtime-library/global-variables-and-standard-types.md
+++ b/docs/c-runtime-library/global-variables-and-standard-types.md
@@ -5,11 +5,11 @@ ms.date: "11/04/2016"
helpviewer_keywords: ["global variables, CRT", "standard types, CRT", "standard types", "types [CRT]"]
ms.assetid: 8f8bad6f-2b78-4068-a0dc-77d58d978920
---
-# Global Variables and Standard Types
+# Global variables and standard types
-The Microsoft run-time library contains definitions for [global variables](../c-runtime-library/global-variables.md), [control flags](../c-runtime-library/control-flags.md), and [standard types](../c-runtime-library/standard-types.md) used by library routines. Access these variables, flags, and types by declaring them in your program or by including the appropriate header files.
+The Microsoft run-time library contains definitions for [global variables](./global-variables.md), [control flags](./control-flags.md), and [standard types](./standard-types.md) used by library routines. Access these variables, flags, and types by declaring them in your program or by including the appropriate header files.
## See also
-[C Run-Time Library Reference](../c-runtime-library/c-run-time-library-reference.md)
-[Global Constants](../c-runtime-library/global-constants.md)
+[C runtime library reference](./c-run-time-library-reference.md)\
+[Global constants](./global-constants.md)
diff --git a/docs/c-runtime-library/global-variables.md b/docs/c-runtime-library/global-variables.md
index 74b1fc6e13..495831f814 100644
--- a/docs/c-runtime-library/global-variables.md
+++ b/docs/c-runtime-library/global-variables.md
@@ -6,40 +6,40 @@ f1_keywords: ["c.variables"]
helpviewer_keywords: ["global variables", "variables, global", "global variables, Microsoft run-time library"]
ms.assetid: 01d1551c-2f0c-4f72-935c-6442caccf84f
---
-# Global Variables
+# Global variables
The Microsoft C run-time library provides the following global variables or macros. Several of these global variables or macros have been deprecated in favor of more-secure functional versions, which we recommend you use instead of the global variables.
-|Variable|Description|
-|--------------|-----------------|
-|[__argc, \__argv, \__wargv](../c-runtime-library/argc-argv-wargv.md)|Contains the command-line arguments.|
-|[_daylight, _dstbias, _timezone, and _tzname](../c-runtime-library/daylight-dstbias-timezone-and-tzname.md)|Deprecated. Instead, use `_get_daylight`, `_get_dstbias`, `_get_timezone`, and `_get_tzname`.
Adjusts for local time; used in some date and time functions.|
-|[errno, _doserrno, _sys_errlist, and _sys_nerr](../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md)|Deprecated. Instead, use `_get_errno`, `_set_errno`, `_get_doserrno`, `_set_doserrno`, `perror` and `strerror`.
Stores error codes and related information.|
-|[_environ, _wenviron](../c-runtime-library/environ-wenviron.md)|Deprecated. Instead, use `getenv_s`, `_wgetenv_s`, `_dupenv_s`, `_wdupenv_s`, `_putenv_s`, and `_wputenv_s`.
Pointers to arrays of pointers to the process environment strings; initialized at startup.|
-|[_fmode](../c-runtime-library/fmode.md)|Deprecated. Instead, use `_get_fmode` or `_set_fmode`.
Sets default file-translation mode.|
-|[_iob](../c-runtime-library/iob.md)|Array of I/O control structures for the console, files, and devices.|
-|[_pctype, _pwctype, _wctype, _mbctype, _mbcasemap](../c-runtime-library/pctype-pwctype-wctype-mbctype-mbcasemap.md)|Contains information used by the character-classification functions.|
-|[_pgmptr, _wpgmptr](../c-runtime-library/pgmptr-wpgmptr.md)|Deprecated. Instead, use `_get_pgmptr` or `_get_wpgmptr`.
Initialized at program startup to the fully-qualified or relative path of the program, the full program name, or the program name without its file name extension, depending on how the program was invoked.|
+| Variable | Description |
+|---|---|
+| [`__argc`, `__argv`, `__wargv`](./argc-argv-wargv.md) | Contains the command-line arguments. |
+| [`_daylight`, `_dstbias`, `_timezone`, and `_tzname`](./daylight-dstbias-timezone-and-tzname.md) | Deprecated. Instead, use `_get_daylight`, `_get_dstbias`, `_get_timezone`, and `_get_tzname`.
Adjusts for local time; used in some date and time functions. |
+| [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](./errno-doserrno-sys-errlist-and-sys-nerr.md) | Deprecated. Instead, use `_get_errno`, `_set_errno`, `_get_doserrno`, `_set_doserrno`, `perror` and `strerror`.
Stores error codes and related information. |
+| [`_environ`, `_wenviron`](./environ-wenviron.md) | Deprecated. Instead, use `getenv_s`, `_wgetenv_s`, `_dupenv_s`, `_wdupenv_s`, `_putenv_s`, and `_wputenv_s`.
Pointers to arrays of pointers to the process environment strings; initialized at startup. |
+| [`_fmode`](./fmode.md) | Deprecated. Instead, use `_get_fmode` or `_set_fmode`.
Sets default file-translation mode. |
+| [`_iob`](./iob.md) | Array of I/O control structures for the console, files, and devices. |
+| [`_pctype`, `_pwctype`, `_wctype`, `_mbctype`, `_mbcasemap`](./pctype-pwctype-wctype-mbctype-mbcasemap.md) | Contains information used by the character-classification functions. |
+| [`_pgmptr`, `_wpgmptr`](./pgmptr-wpgmptr.md) | Deprecated. Instead, use `_get_pgmptr` or `_get_wpgmptr`.
Based on how the program is invoked, the runtime initializes these values at program startup: either to the fully qualified or relative path of the program, the full program name, or the program name without its file name extension. |
## See also
-[C Run-Time Library Reference](../c-runtime-library/c-run-time-library-reference.md)
-[Global Constants](../c-runtime-library/global-constants.md)
-[__argc, \__argv, \__wargv](../c-runtime-library/argc-argv-wargv.md)
-[_get_daylight](../c-runtime-library/reference/get-daylight.md)
-[_get_dstbias](../c-runtime-library/reference/get-dstbias.md)
-[_get_timezone](../c-runtime-library/reference/get-timezone.md)
-[_get_tzname](../c-runtime-library/reference/get-tzname.md)
-[perror](../c-runtime-library/reference/perror-wperror.md)
-[strerror](../c-runtime-library/reference/strerror-strerror-wcserror-wcserror.md)
-[_get_doserrno](../c-runtime-library/reference/get-doserrno.md)
-[_set_doserrno](../c-runtime-library/reference/set-doserrno.md)
-[_get_errno](../c-runtime-library/reference/get-errno.md)
-[_set_errno](../c-runtime-library/reference/set-errno.md)
-[_dupenv_s, _wdupenv_s](../c-runtime-library/reference/dupenv-s-wdupenv-s.md)
-[getenv, _wgetenv](../c-runtime-library/reference/getenv-wgetenv.md)
-[getenv_s, _wgetenv_s](../c-runtime-library/reference/getenv-s-wgetenv-s.md)
-[_putenv, _wputenv](../c-runtime-library/reference/putenv-wputenv.md)
-[_putenv_s, _wputenv_s](../c-runtime-library/reference/putenv-s-wputenv-s.md)
-[_get_fmode](../c-runtime-library/reference/get-fmode.md)
-[_set_fmode](../c-runtime-library/reference/set-fmode.md)
+[C runtime library reference](./c-run-time-library-reference.md)\
+[Global constants](./global-constants.md)\
+[`__argc`, `__argv`, `__wargv`](./argc-argv-wargv.md)\
+[`_get_daylight`](./reference/get-daylight.md)\
+[`_get_dstbias`](./reference/get-dstbias.md)\
+[`_get_timezone`](./reference/get-timezone.md)\
+[`_get_tzname`](./reference/get-tzname.md)\
+[`perror`](./reference/perror-wperror.md)\
+[`strerror`](./reference/strerror-strerror-wcserror-wcserror.md)\
+[`_get_doserrno`](./reference/get-doserrno.md)\
+[`_set_doserrno`](./reference/set-doserrno.md)\
+[`_get_errno`](./reference/get-errno.md)\
+[`_set_errno`](./reference/set-errno.md)\
+[`_dupenv_s`, `_wdupenv_s`](./reference/dupenv-s-wdupenv-s.md)\
+[`getenv`, `_wgetenv`](./reference/getenv-wgetenv.md)\
+[`getenv_s`, `_wgetenv_s`](./reference/getenv-s-wgetenv-s.md)\
+[`_putenv`, `_wputenv`](./reference/putenv-wputenv.md)\
+[`_putenv_s`, `_wputenv_s`](./reference/putenv-s-wputenv-s.md)\
+[`_get_fmode`](./reference/get-fmode.md)\
+[`_set_fmode`](./reference/set-fmode.md)
diff --git a/docs/c-runtime-library/heap-constants.md b/docs/c-runtime-library/heap-constants.md
index ec7e079d88..71ae99a468 100644
--- a/docs/c-runtime-library/heap-constants.md
+++ b/docs/c-runtime-library/heap-constants.md
@@ -2,15 +2,15 @@
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
---
-# Heap Constants
+# Heap constants
## Syntax
-```
+```C
#include
-[_heapset](../c-runtime-library/heapset.md)
-[_heapwalk](../c-runtime-library/reference/heapwalk.md)
-[Global Constants](../c-runtime-library/global-constants.md)
+[`_heapchk`](./reference/heapchk.md)\
+[`_heapset`](./heapset.md)\
+[`_heapwalk`](./reference/heapwalk.md)\
+[Global constants](./global-constants.md)
diff --git a/docs/c-runtime-library/heap-maxreq.md b/docs/c-runtime-library/heap-maxreq.md
index e4688366f2..e0b2918230 100644
--- a/docs/c-runtime-library/heap-maxreq.md
+++ b/docs/c-runtime-library/heap-maxreq.md
@@ -2,15 +2,15 @@
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
---
-# _HEAP_MAXREQ
+# `_HEAP_MAXREQ`
## Syntax
-```
+```C
#include
-[calloc](../c-runtime-library/reference/calloc.md)
-[Global Constants](../c-runtime-library/global-constants.md)
+[`malloc`](./reference/malloc.md)\
+[`calloc`](./reference/calloc.md)\
+[Global constants](./global-constants.md)
diff --git a/docs/c-runtime-library/heapadd.md b/docs/c-runtime-library/heapadd.md
index f5aadfdcc1..737e7991fe 100644
--- a/docs/c-runtime-library/heapadd.md
+++ b/docs/c-runtime-library/heapadd.md
@@ -10,7 +10,7 @@ f1_keywords: ["heapadd", "_heapadd"]
helpviewer_keywords: ["_heapadd function", "memory, adding to heaps", "heaps, adding memory", "heapadd function"]
ms.assetid: 4d691fe2-2763-49f4-afb1-62738b7cd3ff
---
-# _heapadd
+# `_heapadd`
Adds memory to the heap.
@@ -19,46 +19,46 @@ Adds memory to the heap.
## Syntax
-```
+```C
int _heapadd(
void *memblock,
size_t size
);
```
-#### Parameters
+### Parameters
-*memblock*
+*`memblock`*\
Pointer to the heap memory.
-*size*
+*`size`*\
Size of memory to add, in bytes.
-## Return Value
+## Return value
-If successful, `_heapadd` returns 0; otherwise, the function returns -1 and sets `errno` to `ENOSYS`.
+If successful, **`_heapadd`** returns 0; otherwise, the function returns -1 and sets `errno` to `ENOSYS`.
-For more information about this and other return codes, see [_doserrno, errno, _sys_errlist, and _sys_nerr](../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md).
+For more information about this and other return codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](./errno-doserrno-sys-errlist-and-sys-nerr.md).
## Remarks
-Beginning with Visual C++ version 4.0, the underlying heap structure was moved to the C run-time libraries to support the new debugging features. As a result, `_heapadd` is no longer supported on any platform that is based on the Win32 API.
+Beginning with Visual C++ version 4.0, the underlying heap structure was moved to the C run-time libraries to support the new debugging features. As a result, **`_heapadd`** is no longer supported on any platform that is based on the Win32 API.
## Requirements
-|Routine|Required header|Optional header|
-|-------------|---------------------|---------------------|
-|`_heapadd`|\
-[free](../c-runtime-library/reference/free.md)
-[_heapchk](../c-runtime-library/reference/heapchk.md)
-[_heapmin](../c-runtime-library/reference/heapmin.md)
-[_heapset](../c-runtime-library/heapset.md)
-[_heapwalk](../c-runtime-library/reference/heapwalk.md)
-[malloc](../c-runtime-library/reference/malloc.md)
-[realloc](../c-runtime-library/reference/realloc.md)
+[Memory allocation](./memory-allocation.md)\
+[`free`](./reference/free.md)\
+[`_heapchk`](./reference/heapchk.md)\
+[`_heapmin`](./reference/heapmin.md)\
+[`_heapset`](./heapset.md)\
+[`_heapwalk`](./reference/heapwalk.md)\
+[`malloc`](./reference/malloc.md)\
+[`realloc`](./reference/realloc.md)
diff --git a/docs/c-runtime-library/heapset.md b/docs/c-runtime-library/heapset.md
index 5b1adc0b61..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,9 +8,8 @@ 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
+# `_heapset`
Checks heaps for minimal consistency and sets the free entries to a specified value.
@@ -19,7 +18,7 @@ Checks heaps for minimal consistency and sets the free entries to a specified va
## Syntax
-```
+```C
int _heapset(
unsigned int fill
);
@@ -27,35 +26,35 @@ int _heapset(
#### Parameters
-*fill*
+*`fill`*\
Fill character.
-## Return Value
+## Return value
-`_heapset` returns one of the following integer manifest constants defined in Malloc.h.
+**`_heapset`** returns one of the following integer manifest constants defined in Malloc.h.
-|Value|Description|
-|-|-|
-| `_HEAPBADBEGIN` | Initial header information invalid or not found. |
-| `_HEAPBADNODE` | Heap damaged or bad node found. |
-| `_HEAPEMPTY` | Heap not initialized. |
-| `_HEAPOK` | Heap appears to be consistent. |
+| Value | Description |
+|---|---|
+| `_HEAPBADBEGIN` | Initial header information invalid or not found. |
+| `_HEAPBADNODE` | Heap damaged or bad node found. |
+| `_HEAPEMPTY` | Heap not initialized. |
+| `_HEAPOK` | Heap appears to be consistent. |
-In addition, if an error occurs, `_heapset` sets `errno` to `ENOSYS`.
+In addition, if an error occurs, **`_heapset`** sets `errno` to `ENOSYS`.
## Remarks
-The `_heapset` function shows free memory locations or nodes that have been unintentionally overwritten.
+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 does not 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
-|Routine|Required header|Optional header|
-|-------------|---------------------|---------------------|
-|`_heapset`|\
-[_heapadd](../c-runtime-library/heapadd.md)
-[_heapchk](../c-runtime-library/reference/heapchk.md)
-[_heapmin](../c-runtime-library/reference/heapmin.md)
-[_heapwalk](../c-runtime-library/reference/heapwalk.md)
+[Memory allocation](./memory-allocation.md)\
+[`_heapadd`](./heapadd.md)\
+[`_heapchk`](./reference/heapchk.md)\
+[`_heapmin`](./reference/heapmin.md)\
+[`_heapwalk`](./reference/heapwalk.md)
diff --git a/docs/c-runtime-library/huge-val-huge.md b/docs/c-runtime-library/huge-val-huge.md
index be0042e116..98eaf2b2ea 100644
--- a/docs/c-runtime-library/huge-val-huge.md
+++ b/docs/c-runtime-library/huge-val-huge.md
@@ -6,22 +6,22 @@ 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
---
-# HUGE_VAL, _HUGE
+# `HUGE_VAL`, `_HUGE`
## Syntax
-```
+```C
#include
+[Universal C runtime routines by category](./run-time-routines-by-category.md)
diff --git a/docs/c-runtime-library/internal-set-app-type.md b/docs/c-runtime-library/internal-set-app-type.md
index 9a86584f3a..9faaf4a49e 100644
--- a/docs/c-runtime-library/internal-set-app-type.md
+++ b/docs/c-runtime-library/internal-set-app-type.md
@@ -10,9 +10,9 @@ f1_keywords: ["__set_app_type"]
helpviewer_keywords: ["__set_app_type"]
ms.assetid: f0ac0f4d-70e6-4e96-9e43-eb9d1515490c
---
-# __set_app_type
+# `__set_app_type`
-Sets the current application type.
+Sets the current application type. This internal function is obsolete.
## Syntax
@@ -22,21 +22,21 @@ void __set_app_type (
)
```
-#### Parameters
+### Parameters
-*at*
+*`at`*\
A value that indicates the application type. The possible values are:
-|Value|Description|
-|-----------|-----------------|
-|_UNKNOWN_APP|Unknown application type.|
-|_CONSOLE_APP|Console (command-line) application.|
-|_GUI_APP|GUI (Windows) application.|
+| Value | Description |
+|---|---|
+| `_UNKNOWN_APP` | Unknown application type. |
+| `_CONSOLE_APP` | Console (command-line) application. |
+| `_GUI_APP` | GUI (Windows) application. |
## Remarks
## Requirements
-|Routine|Required header|
-|-------------|---------------------|
-|__set_app_type|internal.h|
+| Routine | Required header |
+|---|---|
+| **`__set_app_type`** | `internal.h` |
diff --git a/docs/c-runtime-library/internationalization.md b/docs/c-runtime-library/internationalization.md
index e22e191549..e66a9a923f 100644
--- a/docs/c-runtime-library/internationalization.md
+++ b/docs/c-runtime-library/internationalization.md
@@ -11,7 +11,7 @@ ms.assetid: ee536a04-3558-4729-8e10-6dabcde055fd
The Microsoft runtime library provides many routines that you can use to customize your app for international markets such as:
-- [locale-related routines](../c-runtime-library/locale.md)
+- [locale-related routines](./locale.md)
- wide-character routines
- multibyte-character routines
- generic-text routines
@@ -24,4 +24,4 @@ ISO646 operator alternatives are also included.
## See also
-[Universal C runtime routines by category](../c-runtime-library/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/interpretation-of-multibyte-character-sequences.md b/docs/c-runtime-library/interpretation-of-multibyte-character-sequences.md
index d33d043d0e..63a877ee60 100644
--- a/docs/c-runtime-library/interpretation-of-multibyte-character-sequences.md
+++ b/docs/c-runtime-library/interpretation-of-multibyte-character-sequences.md
@@ -8,27 +8,27 @@ ms.assetid: da9150de-70ea-4d2f-90e6-ddb9202dd80b
---
# Interpretation of multibyte-character sequences
-Most multibyte-character routines in the Microsoft run-time library recognize multibyte-character sequences relating to a multibyte code page. The output value is affected by the setting of the **LC_CTYPE** category setting of the locale. For more information, see [setlocale](../c-runtime-library/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 they use the locale parameter instead of the current locale.
+Most multibyte-character routines in the Microsoft run-time library recognize multibyte-character sequences relating to a multibyte code page. The output value is affected by the setting of 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 they use the locale parameter instead of the current locale.
## Locale-dependent multibyte routines
-|Routine|Use|
-|-------------|---------|
-|[_mbclen, mblen, _mblen_l](../c-runtime-library/reference/mbclen-mblen-mblen-l.md)|Validate and return number of bytes in multibyte character|
-|[strlen, wcslen, _mbslen, _mbslen_l, _mbstrlen, _mbstrlen_l](../c-runtime-library/reference/strlen-wcslen-mbslen-mbslen-l-mbstrlen-mbstrlen-l.md)|For multibyte character strings: validate each character in string; return string length. For wide character strings: return string length.|
-|[mbstowcs, _mbstowcs_l](../c-runtime-library/reference/mbstowcs-mbstowcs-l.md), [mbstowcs_s, _mbstowcs_s_l](../c-runtime-library/reference/mbstowcs-s-mbstowcs-s-l.md)|Convert sequence of multibyte characters to corresponding sequence of wide characters|
-|[mbtowc, _mbtowc_l](../c-runtime-library/reference/mbtowc-mbtowc-l.md)|Convert multibyte character to corresponding wide character|
-|[wcstombs, _wcstombs_l](../c-runtime-library/reference/wcstombs-wcstombs-l.md), [wcstombs_s, _wcstombs_s_l](../c-runtime-library/reference/wcstombs-s-wcstombs-s-l.md)|Convert sequence of wide characters to corresponding sequence of multibyte characters|
-|[wctomb, _wctomb_l](../c-runtime-library/reference/wctomb-wctomb-l.md), [wctomb_s, _wctomb_s_l](../c-runtime-library/reference/wctomb-s-wctomb-s-l.md)|Convert wide character to corresponding multibyte character|
+| Routine | Use |
+|---|---|
+| [`_mbclen`, `mblen`, `_mblen_l`](./reference/mbclen-mblen-mblen-l.md) | Validate and return number of bytes in multibyte character |
+| [`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. For wide character strings: return string length. |
+| [`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 |
+| [`mbtowc`, `_mbtowc_l`](./reference/mbtowc-mbtowc-l.md) | Convert multibyte character to corresponding wide character |
+| [`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 |
+| [`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 |
## Locale-independent multibyte routines
-|Routine|Use|
-|-------------|---------|
-|[mbrtoc16, mbrtoc32](../c-runtime-library/reference/mbrtoc16-mbrtoc323.md)|Convert multibyte UTF-8 character to equivalent UTF-16 or UTF-32 character|
-|[c16rtomb, c32rtomb](../c-runtime-library/reference/c16rtomb-c32rtomb1.md)|Convert UTF-16 or UTF-32 character to equivalent UTF-8 multibyte character|
+| Routine | Use |
+|---|---|
+| [`mbrtoc16`, `mbrtoc32`](./reference/mbrtoc16-mbrtoc323.md) | Convert multibyte UTF-8 character to equivalent UTF-16 or UTF-32 character |
+| [`c16rtomb`, `c32rtomb`](./reference/c16rtomb-c32rtomb1.md) | Convert UTF-16 or UTF-32 character to equivalent UTF-8 multibyte character |
## See also
-[Internationalization](../c-runtime-library/internationalization.md)\
-[Universal C runtime routines by category](../c-runtime-library/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/iob.md b/docs/c-runtime-library/iob.md
index 14418570e9..9341f6b617 100644
--- a/docs/c-runtime-library/iob.md
+++ b/docs/c-runtime-library/iob.md
@@ -1,29 +1,32 @@
---
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"]
+f1_keywords: ["_iob", "_IOB_ENTRIES", "STDIO/_IOB_ENTRIES"]
helpviewer_keywords: ["_iob global variable", "iob global variable"]
-ms.assetid: 008ed376-8078-4bbd-bc6c-0677c63d0ff1
---
-# _iob
+# `_iob`
-The array of stdio control structures.
+The array of `stdio` control structures.
## Syntax
-```
+```C
FILE _iob[_IOB_ENTRIES];
```
## Remarks
-`IOB_ENTRIES` is defined as 20 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](../c-runtime-library/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 96e98fcb4f..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"]
---
@@ -8,22 +8,22 @@ helpviewer_keywords: ["is routines", "isw routines"]
:::row:::
:::column span="":::
- [`isalnum`, `iswalnum`, `_isalnum_l`, `_iswalnum_l`](../c-runtime-library/reference/isalnum-iswalnum-isalnum-l-iswalnum-l.md)\
- [`isalpha`, `iswalpha`, `_isalpha_l`, `_iswalpha_l`](../c-runtime-library/reference/isalpha-iswalpha-isalpha-l-iswalpha-l.md)\
- [`isascii`, _`_isascii`, `iswascii`](../c-runtime-library/reference/isascii-isascii-iswascii.md)\
- [`isblank`, `iswblank`, `_isblank_l`, `_iswblank_l`](../c-runtime-library/reference/isblank-iswblank-isblank-l-iswblank-l.md)\
- [`iscntrl`, `iswcntrl`, `_iscntrl_l`, `_iswcntrl_l`](../c-runtime-library/reference/iscntrl-iswcntrl-iscntrl-l-iswcntrl-l.md)\
- [`iscsym`, `iscsymf`, `__iscsym`, `__iswcsym`, `__iscsymf`, `__iswcsymf`, `_iscsym_l`, `_iswcsym_l`, `_iscsymf_l`, `_iswcsymf_l`](../c-runtime-library/reference/iscsym-functions.md)\
- [`_isctype`, `iswctype`, `_isctype_l`, `_iswctype_l`](../c-runtime-library/reference/isctype-iswctype-isctype-l-iswctype-l.md)\
- [`isdigit`, `iswdigit`, `_isdigit_l`, `_iswdigit_l`](../c-runtime-library/reference/isdigit-iswdigit-isdigit-l-iswdigit-l.md)
- [`isgraph`, `iswgraph`, `_isgraph_l`, `_iswgraph_l`](../c-runtime-library/reference/isgraph-iswgraph-isgraph-l-iswgraph-l.md)\
- [`isleadbyte`, `_isleadbyte_l`](../c-runtime-library/reference/isleadbyte-isleadbyte-l.md)\
- [`islower`, `iswlower`, `_islower_l`, `_iswlower_l`](../c-runtime-library/reference/islower-iswlower-islower-l-iswlower-l.md)\
- [`isprint`, `iswprint`, `_isprint_l`, `_iswprint_l`](../c-runtime-library/reference/isprint-iswprint-isprint-l-iswprint-l.md)\
- [`ispunct`, `iswpunct`, `_ispunct_l`, `_iswpunct_l`](../c-runtime-library/reference/ispunct-iswpunct-ispunct-l-iswpunct-l.md)\
- [`isspace`, `iswspace`, `_isspace_l`, `_iswspace_l`](../c-runtime-library/reference/isspace-iswspace-isspace-l-iswspace-l.md)\
- [`isupper`, `_isupper_l`, `iswupper`, `_iswupper_l`](../c-runtime-library/reference/isupper-isupper-l-iswupper-iswupper-l.md)\
- [`isxdigit`, `iswxdigit`, `_isxdigit_l`, `_iswxdigit_l`](../c-runtime-library/reference/isxdigit-iswxdigit-isxdigit-l-iswxdigit-l.md)
+ [`isalnum`, `iswalnum`, `_isalnum_l`, `_iswalnum_l`](./reference/isalnum-iswalnum-isalnum-l-iswalnum-l.md)\
+ [`isalpha`, `iswalpha`, `_isalpha_l`, `_iswalpha_l`](./reference/isalpha-iswalpha-isalpha-l-iswalpha-l.md)\
+ [`isascii`, `__isascii`, `iswascii`](./reference/isascii-isascii-iswascii.md)\
+ [`isblank`, `iswblank`, `_isblank_l`, `_iswblank_l`](./reference/isblank-iswblank-isblank-l-iswblank-l.md)\
+ [`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)\
+ [`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)\
+ [`isprint`, `iswprint`, `_isprint_l`, `_iswprint_l`](./reference/isprint-iswprint-isprint-l-iswprint-l.md)\
+ [`ispunct`, `iswpunct`, `_ispunct_l`, `_iswpunct_l`](./reference/ispunct-iswpunct-ispunct-l-iswpunct-l.md)\
+ [`isspace`, `iswspace`, `_isspace_l`, `_iswspace_l`](./reference/isspace-iswspace-isspace-l-iswspace-l.md)\
+ [`isupper`, `_isupper_l`, `iswupper`, `_iswupper_l`](./reference/isupper-isupper-l-iswupper-iswupper-l.md)\
+ [`isxdigit`, `iswxdigit`, `_isxdigit_l`, `_iswxdigit_l`](./reference/isxdigit-iswxdigit-isxdigit-l-iswxdigit-l.md)
:::column-end:::
:::row-end:::
@@ -38,7 +38,7 @@ The `is` routines produce meaningful results for any integer argument from -1 (`
The `isw` routines produce meaningful results for any integer value from -1 (`WEOF`) to 0xFFFF, inclusive. The `wint_t` data type is defined in `
-[is, isw Routines](../c-runtime-library/is-isw-routines.md)
-[_ismbb Routines](../c-runtime-library/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/iso646-operators.md b/docs/c-runtime-library/iso646-operators.md
index f41faff783..8e0225b114 100644
--- a/docs/c-runtime-library/iso646-operators.md
+++ b/docs/c-runtime-library/iso646-operators.md
@@ -4,7 +4,7 @@ title: "ISO646 Operators"
ms.date: "04/11/2018"
ms.assetid: 93e6d3e7-4889-4d8e-8dcb-c1a6b9bbe0f5
---
-# ISO646 Operators
+# ISO646 operators
Provides readable alternatives to certain operators or punctuators. The standard header \
-[setlocale, _wsetlocale](../c-runtime-library/reference/setlocale-wsetlocale.md)
-[_create_locale, _wcreate_locale](../c-runtime-library/reference/create-locale-wcreate-locale.md)
-[_free_locale](../c-runtime-library/reference/free-locale.md)
+[`_get_current_locale`](./reference/get-current-locale.md)\
+[`setlocale`, `_wsetlocale`](./reference/setlocale-wsetlocale.md)\
+[`_create_locale`, `_wcreate_locale`](./reference/create-locale-wcreate-locale.md)\
+[`_free_locale`](./reference/free-locale.md)
diff --git a/docs/c-runtime-library/lc-collate-cp-func.md b/docs/c-runtime-library/lc-collate-cp-func.md
index 056692ffa6..e507776555 100644
--- a/docs/c-runtime-library/lc-collate-cp-func.md
+++ b/docs/c-runtime-library/lc-collate-cp-func.md
@@ -3,14 +3,14 @@ description: "Learn more about: ___lc_collate_cp_func"
title: "___lc_collate_cp_func"
ms.date: "1/14/2021"
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-private-l1-1-0.dll", "api-ms-win-crt-locale-l1-1-0.dll"]
+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
---
-# ___lc_collate_cp_func
+# `___lc_collate_cp_func`
Internal CRT function. Retrieves the current collation code page of the thread.
@@ -20,27 +20,27 @@ Internal CRT function. Retrieves the current collation code page of the thread.
UINT ___lc_codepage_func(void);
```
-## Return Value
+## Return value
The current collation code page of the thread.
## Remarks
-`___lc_collate_cp_func` is an internal CRT function that is used by other CRT functions to get the current collation code page from the thread local storage for CRT data. This information is also available by using the [_get_current_locale](../c-runtime-library/reference/get-current-locale.md) function.
+**`___lc_collate_cp_func`** is an internal CRT function that is used by other CRT functions to get the current collation code page from the thread local storage for CRT data. This information is also available by using the [`_get_current_locale`](./reference/get-current-locale.md) function.
Internal CRT functions are implementation-specific and subject to change with each release. We don't recommend their use in your code.
-By default, this function's global state is scoped to the application. To change this, see [Global state in the CRT](global-state.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).
## Requirements
-|Routine|Required header|
-|-------------|---------------------|
-|`___lc_collate_cp_func`|crt\src\setlocal.h|
+| Routine | Required header |
+|---|---|
+| **`___lc_collate_cp_func`** | crt\src\setlocal.h |
## See also
-[_get_current_locale](../c-runtime-library/reference/get-current-locale.md)
-[setlocale, _wsetlocale](../c-runtime-library/reference/setlocale-wsetlocale.md)
-[_create_locale, _wcreate_locale](../c-runtime-library/reference/create-locale-wcreate-locale.md)
-[_free_locale](../c-runtime-library/reference/free-locale.md)
+[`_get_current_locale`](./reference/get-current-locale.md)\
+[`setlocale`, `_wsetlocale`](./reference/setlocale-wsetlocale.md)\
+[`_create_locale`, `_wcreate_locale`](./reference/create-locale-wcreate-locale.md)\
+[`_free_locale`](./reference/free-locale.md)
diff --git a/docs/c-runtime-library/lc-locale-name-func.md b/docs/c-runtime-library/lc-locale-name-func.md
index 8f19df313b..0fbf0416f2 100644
--- a/docs/c-runtime-library/lc-locale-name-func.md
+++ b/docs/c-runtime-library/lc-locale-name-func.md
@@ -3,14 +3,14 @@ description: "Learn more about: ___lc_locale_name_func"
title: "___lc_locale_name_func"
ms.date: "1/14/2021"
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-private-l1-1-0.dll", "api-ms-win-crt-locale-l1-1-0.dll"]
+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
---
-# ___lc_locale_name_func
+# `___lc_locale_name_func`
Internal CRT function. Retrieves the current locale name of the thread.
@@ -20,27 +20,27 @@ Internal CRT function. Retrieves the current locale name of the thread.
wchar_t** ___lc_locale_name_func(void);
```
-## Return Value
+## Return value
A pointer to a string that contains the current locale name of the thread.
## Remarks
-`___lc_locale_name_func` is an internal CRT function that is used by other CRT functions to get the current locale name from the thread local storage for CRT data. This information is also available by using the [_get_current_locale](../c-runtime-library/reference/get-current-locale.md) function or the [setlocale, _wsetlocale](../c-runtime-library/reference/setlocale-wsetlocale.md) functions.
+**`___lc_locale_name_func`** is an internal CRT function that is used by other CRT functions to get the current locale name from the thread local storage for CRT data. This information is also available by using the [`_get_current_locale`](./reference/get-current-locale.md) function or the [`setlocale`, `_wsetlocale`](./reference/setlocale-wsetlocale.md) functions.
Internal CRT functions are implementation-specific and subject to change with each release. We don't recommend their use in your code.
-By default, this function's global state is scoped to the application. To change this, see [Global state in the CRT](global-state.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).
## Requirements
-|Routine|Required header|
-|-------------|---------------------|
-|`___lc_locale_name_func`|crt\src\setlocal.h|
+| Routine | Required header |
+|---|---|
+| **`___lc_locale_name_func`** | `crt\src\setlocal.h` |
## See also
-[_get_current_locale](../c-runtime-library/reference/get-current-locale.md)
-[setlocale, _wsetlocale](../c-runtime-library/reference/setlocale-wsetlocale.md)
-[_create_locale, _wcreate_locale](../c-runtime-library/reference/create-locale-wcreate-locale.md)
-[_free_locale](../c-runtime-library/reference/free-locale.md)
+[`_get_current_locale`](./reference/get-current-locale.md)\
+[`setlocale`, `_wsetlocale`](./reference/setlocale-wsetlocale.md)\
+[`_create_locale`, `_wcreate_locale`](./reference/create-locale-wcreate-locale.md)\
+[`_free_locale`](./reference/free-locale.md)
diff --git a/docs/c-runtime-library/link-options.md b/docs/c-runtime-library/link-options.md
index a321a157bd..7f27f9a178 100644
--- a/docs/c-runtime-library/link-options.md
+++ b/docs/c-runtime-library/link-options.md
@@ -1,35 +1,34 @@
---
-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
+# Link options
-The CRT lib directory includes a number of small object files that enable specific CRT features without any code change. These are called "link options" since you just 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](../c-runtime-library/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](../c-runtime-library/reference/fopen-wfopen.md) and [fopen_s, _wfopen_s](../c-runtime-library/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, do not use it for DLLs. Linking to this 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 is undesirable (such as using onecore_apiset.lib or other umbrella library), use [/NODEFAULTLIB](../build/reference/nodefaultlib-ignore-libraries.md) to override this and provide an alternative. |
-|fp10.obj|n/a|Changes the default precision control to 64 bits. See [Floating-Point Support](../c-runtime-library/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|Printing floating-point values (for example, when using [printf](../c-runtime-library/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](../c-runtime-library/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](../c-runtime-library/reference/malloc.md) to call the new handler on failure. See [_set_new_mode](../c-runtime-library/reference/set-new-mode.md), [_set_new_handler](../c-runtime-library/reference/set-new-handler.md), [calloc](../c-runtime-library/reference/calloc.md), and [realloc](../c-runtime-library/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.|
-|nothrownew.obj|pnothrownew.obj|Enables the non-throwing version of new in the CRT. See [new and delete Operators](../cpp/new-and-delete-operators.md).|
-|setargv.obj|psetargv.obj|Enables command-line argument wildcard expansion. See [Expanding Wildcard Arguments](../c-language/expanding-wildcard-arguments.md).|
-|threadlocale.obj|pthreadlocale.obj|Enables per-thread locale for all new threads by default.|
-|wsetargv.obj|pwsetargv.obj|Enables command-line argument wildcard expansion. See [Expanding Wildcard Arguments](../c-language/expanding-wildcard-arguments.md).|
+| Native and /clr | Pure mode | Description |
+|---|---|---|
+| `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). |
+| `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. |
+| `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). |
+| `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. |
+| `nothrownew.obj` | `pnothrownew.obj` | Enables the non-throwing version of new in the CRT. See [new and delete Operators](../cpp/new-and-delete-operators.md). |
+| `setargv.obj` | `psetargv.obj` | Enables command-line argument wildcard expansion. See [Expanding wildcard arguments](../c-language/expanding-wildcard-arguments.md). |
+| `threadlocale.obj` | `pthreadlocale.obj` | Enables per-thread locale for all new threads by default. |
+| `wsetargv.obj` | `pwsetargv.obj` | Enables command-line argument wildcard expansion. See [Expanding wildcard arguments](../c-language/expanding-wildcard-arguments.md). |
## See also
-- [C runtime (CRT) and C++ Standard Library (STL) `.lib` files](../c-runtime-library/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/local-unwind2.md b/docs/c-runtime-library/local-unwind2.md
index f3f84e1b0e..d3f4fcc87d 100644
--- a/docs/c-runtime-library/local-unwind2.md
+++ b/docs/c-runtime-library/local-unwind2.md
@@ -3,14 +3,14 @@ description: "Learn more about: _local_unwind2"
title: "_local_unwind2"
ms.date: "1/14/2021"
api_name: ["_local_unwind2"]
-api_location: ["msvcr110_clr0400.dll", "msvcrt.dll", "msvcr100.dll", "msvcr110.dll", "msvcr80.dll", "msvcr90.dll", "msvcr120.dll", "api-ms-win-crt-private-l1-1-0.dll"]
+api_location: ["msvcr110_clr0400.dll", "msvcrt.dll", "msvcr100.dll", "msvcr110.dll", "msvcr80.dll", "msvcr90.dll", "msvcr120.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
f1_keywords: ["_local_unwind2", "local_unwind2"]
helpviewer_keywords: ["_local_unwind2 function", "local_unwind2 function"]
ms.assetid: 44f1fa82-e01e-490f-a6e6-18fc6811c28c
---
-# _local_unwind2
+# `_local_unwind2`
Internal CRT Function. Runs all termination handlers that are listed in the indicated scope table.
@@ -25,18 +25,18 @@ void _local_unwind2(
#### Parameters
-*xr*
+*`xr`*\
[in] A registration record that is associated with one scope table.
-*stop*
+*`stop`*\
[in] The lexical level that indicates where `_local_unwind2` should stop.
## Remarks
-This method is used only by the run-time environment. Do not call the method in your code.
+This method is used only by the run-time environment. Don't call the method in your code.
-When this method executes termination handlers, it starts at the current lexical level and works its way up in lexical levels until it reaches the level that is indicated by `stop`. It does not execute termination handlers at the level that is indicated by `stop`.
+When this method executes termination handlers, it starts at the current lexical level, and works upward in lexical levels until it reaches the level that's indicated by `stop`. It doesn't execute termination handlers at the level that's indicated by `stop`.
## See also
-[Alphabetical Function Reference](../c-runtime-library/reference/crt-alphabetical-function-reference.md)
+[Alphabetical function reference](./reference/crt-alphabetical-function-reference.md)
diff --git a/docs/c-runtime-library/locale-categories.md b/docs/c-runtime-library/locale-categories.md
index 9a17ab8f5f..891ebbf4d1 100644
--- a/docs/c-runtime-library/locale-categories.md
+++ b/docs/c-runtime-library/locale-categories.md
@@ -2,15 +2,15 @@
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
---
-# Locale Categories
+# Locale categories
## Syntax
-```
+```C
#include
-[setlocale, _wsetlocale](../c-runtime-library/reference/setlocale-wsetlocale.md)
-[strcoll Functions](../c-runtime-library/strcoll-functions.md)
-[strftime, wcsftime, _strftime_l, _wcsftime_l](../c-runtime-library/reference/strftime-wcsftime-strftime-l-wcsftime-l.md)
-[strxfrm, wcsxfrm, _strxfrm_l, _wcsxfrm_l](../c-runtime-library/reference/strxfrm-wcsxfrm-strxfrm-l-wcsxfrm-l.md)
-[Global Constants](../c-runtime-library/global-constants.md)
+[`localeconv`](./reference/localeconv.md)\
+[`setlocale`, `_wsetlocale`](./reference/setlocale-wsetlocale.md)\
+[`strcoll` functions](./strcoll-functions.md)\
+[`strftime`, `wcsftime`, `_strftime_l`, `_wcsftime_l`](./reference/strftime-wcsftime-strftime-l-wcsftime-l.md)\
+[`strxfrm`, `wcsxfrm`, `_strxfrm_l`, `_wcsxfrm_l`](./reference/strxfrm-wcsxfrm-strxfrm-l-wcsxfrm-l.md)\
+[Global constants](./global-constants.md)
diff --git a/docs/c-runtime-library/locale-names-languages-and-country-region-strings.md b/docs/c-runtime-library/locale-names-languages-and-country-region-strings.md
index fd9ee6817a..dd2fae03a4 100644
--- a/docs/c-runtime-library/locale-names-languages-and-country-region-strings.md
+++ b/docs/c-runtime-library/locale-names-languages-and-country-region-strings.md
@@ -8,31 +8,31 @@ ms.assetid: a0e5a0c5-5602-4da0-b65f-de3d6c8530a2
---
# UCRT Locale names, Languages, and Country/Region strings
-The *locale* argument to the [setlocale, \_wsetlocale](../c-runtime-library/reference/setlocale-wsetlocale.md), [\_create\_locale](../c-runtime-library/reference/create-locale-wcreate-locale.md), and [\_wcreate\_locale](../c-runtime-library/reference/create-locale-wcreate-locale.md) functions can be set by using the locale names, languages, country/region codes, and code pages that are supported by the Windows NLS API. The *locale* argument takes the following form:
+You can set the *`locale`* argument to the [`setlocale`, `_wsetlocale`](./reference/setlocale-wsetlocale.md), [`_create_locale`](./reference/create-locale-wcreate-locale.md), and [`_wcreate_locale`](./reference/create-locale-wcreate-locale.md) functions in several ways. The locale can be set by using the locale names, languages, country/region codes, and code pages that are supported by the Windows NLS API. The *`locale`* argument takes one of the following forms:
-> *locale* :: "*locale-name*"
- \| "*language*\[**\_**_country-region_\[__.__*code-page*]]"
- \| "__.__*code-page*"
- \| "C"
- \| ""
- \| NULL
+> *`locale`* :: "*locale-name*"\
+ \| "*language*\[_*country-region*\[.*code-page*]]"\
+ \| ".*code-page*"\
+ \| "C"\
+ \| ""\
+ \| NULL
-The *locale-name* form is a short, IETF-standardized string; for example, `en-US` for English (United States) or `bs-Cyrl-BA` for Bosnian (Cyrillic, Bosnia and Herzegovina). These forms are preferred. For a list of supported locale names by Windows operating system version, see the **Language tag** column of the table in [Appendix A: Product Behavior](/openspecs/windows_protocols/ms-lcid/a9eac961-e77d-41a6-90a5-ce1a8b0cdb9c) in \[MS-LCID]: Windows Language Code Identifier (LCID) Reference. This resource lists the supported language, script, and region parts of the locale names. For information about the supported locale names that have non-default sort orders, see the **Locale name** column in [Sort Order Identifiers](/windows/win32/Intl/sort-order-identifiers). Under Windows 10 or later, locale names that correspond to valid [BCP-47](https://tools.ietf.org/html/bcp47) language tags are allowed. For example, `jp-US` is a valid BCP-47 tag, but it is effectively only `US` for locale functionality.
+The *locale-name* form is a short, IETF-standardized string; for example, `en-US` for English (United States) or `bs-Cyrl-BA` for Bosnian (Cyrillic, Bosnia and Herzegovina). These forms are preferred. For a list of supported locale names by Windows operating system version, see the **Language tag** column of the table in [Appendix A: Product Behavior](/openspecs/windows_protocols/ms-lcid/a9eac961-e77d-41a6-90a5-ce1a8b0cdb9c) in \[MS-LCID]: Windows Language Code Identifier (LCID) Reference. This resource lists the supported language, script, and region parts of the locale names. For information about the supported locale names that have non-default sort orders, see the **Locale name** column in [Sort order identifiers](/windows/win32/Intl/sort-order-identifiers). Under Windows 10 or later, locale names that correspond to valid [BCP-47](https://tools.ietf.org/html/bcp47) language tags are allowed. For example, `jp-US` is a valid BCP-47 tag, but it's effectively only `US` for locale functionality.
-The *language*\[**\_**_country-region_\[__.__*code-page*]] form is stored in the locale setting for a category when a language string, or language string and country or region string, is used to create the locale. The set of supported language strings is described in [Language Strings](../c-runtime-library/language-strings.md), and the list of supported country and region strings is listed in [Country/Region Strings](../c-runtime-library/country-region-strings.md). If the specified language is not associated with the specified country or region, the default language for the specified country or region is stored in the locale setting. We do not recommend this form for locale strings embedded in code or serialized to storage, because these strings are more likely to be changed by an operating system update than the locale name form.
+The *language*\[**\_**_country-region_\[__.__*code-page*]] form is stored in the locale setting for a category when a language string, or language string and country or region string, is used to create the locale. The set of supported language strings is described in [Language strings](./language-strings.md), and the list of supported country and region strings is listed in [Country/Region strings](./country-region-strings.md). If the specified language isn't associated with the specified country or region, the default language for the specified country or region is stored in the locale setting. We don't recommend this form for locale strings embedded in code or serialized to storage: These strings are more likely to be changed by an operating system update than the locale name form.
-The *code-page* is the ANSI/OEM code page that's associated with the locale. The code page is determined for you when you specify a locale by language or by language and country/region alone. The special value `.ACP` specifies the ANSI code page for the country/region. The special value `.OCP` specifies the OEM code page for the country/region. For example, if you specify `"Greek_Greece.ACP"` as the locale, the locale is stored as `Greek_Greece.1253` (the ANSI code page for Greek), and if you specify `"Greek_Greece.OCP"` as the locale, it is stored as `Greek_Greece.737` (the OEM code page for Greek). For more information about code pages, see [Code Pages](../c-runtime-library/code-pages.md). For a list of supported code pages on Windows, see [Code Page Identifiers](/windows/win32/Intl/code-page-identifiers).
+The *code-page* is the ANSI/OEM code page that's associated with the locale. The code page is determined for you when you specify a locale by language or by language and country/region alone. The special value `.ACP` specifies the ANSI code page for the country/region. The special value `.OCP` specifies the OEM code page for the country/region. For example, if you specify `"Greek_Greece.ACP"` as the locale, the locale is stored as `Greek_Greece.1253` (the ANSI code page for Greek), and if you specify `"Greek_Greece.OCP"` as the locale, it's stored as `Greek_Greece.737` (the OEM code page for Greek). For more information about code pages, see [Code pages](./code-pages.md). For a list of supported code pages on Windows, see [Code page identifiers](/windows/win32/Intl/code-page-identifiers).
-If you use only the code page to specify the locale, the user's default language and country/region as reported by [GetUserDefaultLocaleName](/windows/win32/api/winnls/nf-winnls-getuserdefaultlocalename) are used. For example, if you specify `".1254"` (ANSI Turkish) as the locale for a user that's configured for English (United States), the locale that's stored is `English_United States.1254`. We do not recommend this form, because it could lead to inconsistent behavior.
+If you use only the code page to specify the locale, the user's default language and country/region as reported by [`GetUserDefaultLocaleName`](/windows/win32/api/winnls/nf-winnls-getuserdefaultlocalename) are used. For example, if you specify `".1254"` (ANSI Turkish) as the locale for a user that's configured for English (United States), the locale that's stored is `English_United States.1254`. We don't recommend this form, because it could lead to inconsistent behavior.
-A *locale* argument value of `C` specifies the minimal ANSI conforming environment for C translation. The `C` locale assumes that every **`char`** data type is 1 byte and its value is always less than 256. If *locale* points to an empty string, the locale is the implementation-defined native environment.
+A *`locale`* argument value of `C` specifies the minimal ANSI conforming environment for C translation. The `C` locale assumes that every **`char`** data type is 1 byte and its value is always less than 256. If *`locale`* points to an empty string, the locale is the implementation-defined native environment.
You can specify all of the locale categories at the same time for the `setlocale` and `_wsetlocale` functions by using the `LC_ALL` category. The categories can all be set to the same locale, or you can set each category individually by using a locale argument that has this form:
-> *LC-ALL-specifier* :: *locale*
- \| \[**LC_COLLATE=**_locale_]\[**;LC_CTYPE=**_locale_]\[**;LC_MONETARY=**_locale_]\[**;LC_NUMERIC=**_locale_]\[**;LC_TIME=**_locale_]
+> *`LC-ALL-specifier`* :: *`locale`*\
+ \| \[**`LC_COLLATE=`***`locale`*]\[**`;LC_CTYPE=`***`locale`*]\[**`;LC_MONETARY=`***`locale`*]\[**`;LC_NUMERIC=`***`locale`*]\[**`;LC_TIME=`***`locale`*]
-You can specify multiple category types, separated by semicolons. Category types that are not specified use the current locale setting. For example, this code snippet sets the current locale for all categories to `de-DE`, and then sets the categories `LC_MONETARY` to `en-GB` and `LC_TIME` to `es-ES`:
+You can specify multiple category types, separated by semicolons. Category types that aren't specified use the current locale setting. For example, this code snippet sets the current locale for all categories to `de-DE`, and then sets the categories `LC_MONETARY` to `en-GB` and `LC_TIME` to `es-ES`:
```C
_wsetlocale(LC_ALL, L"de-DE");
@@ -41,13 +41,13 @@ _wsetlocale(LC_ALL, L"LC_MONETARY=en-GB;LC_TIME=es-ES");
## UTF-8 Support
-UTF-8 support can be enabled by using the UTF-8 code page in your locale string. See the [UTF-8 Support section of `setlocale`](../c-runtime-library/reference/setlocale-wsetlocale.md#utf-8-support) for more information.
+UTF-8 support can be enabled by using the UTF-8 code page in your locale string. For more information, see the [UTF-8 support section of `setlocale`](./reference/setlocale-wsetlocale.md#utf-8-support).
## See also
-[C Run-Time Library Reference](../c-runtime-library/c-run-time-library-reference.md)
-[_get_current_locale](../c-runtime-library/reference/get-current-locale.md)
-[setlocale, _wsetlocale](../c-runtime-library/reference/setlocale-wsetlocale.md)
-[_create_locale, _wcreate_locale](../c-runtime-library/reference/create-locale-wcreate-locale.md)
-[Language Strings](../c-runtime-library/language-strings.md)
-[Country/Region Strings](../c-runtime-library/country-region-strings.md)
+[C runtime library reference](./c-run-time-library-reference.md)\
+[`_get_current_locale`](./reference/get-current-locale.md)\
+[`setlocale`, `_wsetlocale`](./reference/setlocale-wsetlocale.md)\
+[`_create_locale`, `_wcreate_locale`](./reference/create-locale-wcreate-locale.md)\
+[Language strings](./language-strings.md)\
+[Country/Region strings](./country-region-strings.md)
diff --git a/docs/c-runtime-library/locale.md b/docs/c-runtime-library/locale.md
index 75f7d9a845..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 information", "language information routines", "setlocale function", "locale routines"]
+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](../c-runtime-library/locale-categories.md).
-
-Use the [`setlocale`](../c-runtime-library/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`](../c-runtime-library/reference/create-locale-wcreate-locale.md). To free this locale, use [`_free_locale`](../c-runtime-library/reference/free-locale.md). To get the current locale, use [`_get_current_locale`](../c-runtime-library/reference/get-current-locale.md).
-
-Use [`_configthreadlocale`](../c-runtime-library/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](../c-runtime-library/security-features-in-the-crt.md).
-
-## Locale-Dependent Routines
-
-|Routine|Use|**`setlocale`** category setting dependence|
-|-------------|---------|---------------------------------------------|
-|[`atof`, `_atof_l`, `_wtof`, `_wtof_l`](../c-runtime-library/reference/atof-atof-l-wtof-wtof-l.md)|Convert character to floating-point value|**`LC_NUMERIC`**|
-|[`atoi`, `_atoi_l`, `_wtoi`, `_wtoi_l`](../c-runtime-library/reference/atoi-atoi-l-wtoi-wtoi-l.md)|Convert character to integer value|**`LC_NUMERIC`**|
-|[`_atoi64`, `_atoi64_l`, `_wtoi64`, `_wtoi64_l`](../c-runtime-library/reference/atoi64-atoi64-l-wtoi64-wtoi64-l.md)|Convert character to 64-bit integer value|**`LC_NUMERIC`**|
-|[`atol`, `_atol_l`, `_wtol`, `_wtol_l`](../c-runtime-library/reference/atol-atol-l-wtol-wtol-l.md)|Convert character to long value|**`LC_NUMERIC`**|
-|[`_atodbl`, `_atodbl_l`, `_atoldbl`, `_atoldbl_l`, `_atoflt`, `_atoflt_l`](../c-runtime-library/reference/atodbl-atodbl-l-atoldbl-atoldbl-l-atoflt-atoflt-l.md)|Convert character to double-long value|**`LC_NUMERIC`**|
-|[`is` Routines](../c-runtime-library/is-isw-routines.md)|Test given integer for particular condition.|**`LC_CTYPE`**|
-|[`isleadbyte`, `_isleadbyte_l`](../c-runtime-library/reference/isleadbyte-isleadbyte-l.md)|Test for lead byte|**`LC_CTYPE`**|
-|[`localeconv`](../c-runtime-library/reference/localeconv.md)|Read appropriate values for formatting numeric quantities|`LC_MONETARY, LC_NUMERIC`|
-|[`MB_CUR_MAX`](../c-runtime-library/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`](../c-runtime-library/reference/mbccpy-mbccpy-l.md),[`_mbccpy_s`, `_mbccpy_s_l`](../c-runtime-library/reference/mbccpy-s-mbccpy-s-l.md)|Copy one multibyte character|**`LC_CTYPE`**|
-|[`_mbclen`, `mblen`, `_mblen_l`](../c-runtime-library/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`](../c-runtime-library/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`](../c-runtime-library/reference/mbstowcs-mbstowcs-l.md),[`mbstowcs_s`, `_mbstowcs_s_l`](../c-runtime-library/reference/mbstowcs-s-mbstowcs-s-l.md)|Convert sequence of multibyte characters to corresponding sequence of wide characters|**`LC_CTYPE`**|
-|[`mbtowc`, `_mbtowc_l`](../c-runtime-library/reference/mbtowc-mbtowc-l.md)|Convert multibyte character to corresponding wide character|**`LC_CTYPE`**|
-|[`printf`](../c-runtime-library/reference/printf-printf-l-wprintf-wprintf-l.md) functions|Write formatted output|**`LC_NUMERIC`** (determines radix character output)|
-|[`scanf`](../c-runtime-library/reference/scanf-scanf-l-wscanf-wscanf-l.md) functions|Read formatted input|**`LC_NUMERIC`** (determines radix character recognition)|
-|[`setlocale`, `_wsetlocale`](../c-runtime-library/reference/setlocale-wsetlocale.md)|Select locale for program|Not applicable|
-|[`strcoll`, `wcscoll`, `_mbscoll`, `_strcoll_l`, `_wcscoll_l`, `_mbscoll_l`](../c-runtime-library/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`](../c-runtime-library/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`](../c-runtime-library/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`](../c-runtime-library/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`](../c-runtime-library/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`](../c-runtime-library/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`](../c-runtime-library/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`](../c-runtime-library/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`](../c-runtime-library/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`](../c-runtime-library/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`](../c-runtime-library/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`](../c-runtime-library/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`](../c-runtime-library/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`](../c-runtime-library/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`](../c-runtime-library/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`](../c-runtime-library/reference/tolower-tolower-towlower-tolower-l-towlower-l.md),[`_mbctolower`, `_mbctolower_l`, `_mbctoupper`, `_mbctoupper_l`](../c-runtime-library/reference/mbctolower-mbctolower-l-mbctoupper-mbctoupper-l.md)|Convert given character to corresponding lowercase character|**`LC_CTYPE`**|
-|[`toupper`, `_toupper`, `towupper`, `_toupper_l`, `_towupper_l`](../c-runtime-library/reference/toupper-toupper-towupper-toupper-l-towupper-l.md),[`_mbctolower`, `_mbctolower_l`, `_mbctoupper`, `_mbctoupper_l`](../c-runtime-library/reference/mbctolower-mbctolower-l-mbctoupper-mbctoupper-l.md)|Convert given character to corresponding uppercase letter|**`LC_CTYPE`**|
-|[`wcstombs`, `_wcstombs_l`](../c-runtime-library/reference/wcstombs-wcstombs-l.md),[`wcstombs_s`, `_wcstombs_s_l`](../c-runtime-library/reference/wcstombs-s-wcstombs-s-l.md)|Convert sequence of wide characters to corresponding sequence of multibyte characters|**`LC_CTYPE`**|
-|[`wctomb`, `_wctomb_l`](../c-runtime-library/reference/wctomb-wctomb-l.md),[`wctomb_s`, `_wctomb_s_l`](../c-runtime-library/reference/wctomb-s-wctomb-s-l.md)|Convert wide character to corresponding multibyte character|**`LC_CTYPE`**|
+*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 [`_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).
+
+## 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` |
> [!NOTE]
-> For multibyte routines, the multibyte code page must be equivalent to the locale set with [`setlocale`](../c-runtime-library/reference/setlocale-wsetlocale.md). [`_setmbcp`](../c-runtime-library/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](../c-runtime-library/internationalization.md)\
-[Universal C runtime routines by category](../c-runtime-library/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 087babd800..19562f13ef 100644
--- a/docs/c-runtime-library/lock.md
+++ b/docs/c-runtime-library/lock.md
@@ -1,16 +1,15 @@
---
-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
+# `_lock`
Acquires a multi-thread lock.
@@ -20,19 +19,19 @@ Acquires a multi-thread lock.
## Syntax
```cpp
-void __cdecl _lock
+void __cdecl _lock(
int locknum
);
```
#### Parameters
-*locknum*
+*`locknum`*\
[in] The identifier of the lock to acquire.
## Remarks
-If the lock has already been acquired, this method acquires the lock anyway and causes an internal C run-time (CRT) error. If the method cannot acquire a lock, it exits with a fatal error and sets the error code to `_RT_LOCK`.
+If the lock has already been acquired, this method acquires the lock anyway and causes an internal C run-time (CRT) error. If the method can't acquire a lock, it exits with a fatal error and sets the error code to `_RT_LOCK`.
## Requirements
@@ -40,5 +39,5 @@ If the lock has already been acquired, this method acquires the lock anyway and
## See also
-[Alphabetical Function Reference](../c-runtime-library/reference/crt-alphabetical-function-reference.md)
-[_unlock](../c-runtime-library/unlock.md)
+[Alphabetical function reference](./reference/crt-alphabetical-function-reference.md)\
+[`_unlock`](./unlock.md)
diff --git a/docs/c-runtime-library/locking-constants.md b/docs/c-runtime-library/locking-constants.md
index 392f25237d..3951399044 100644
--- a/docs/c-runtime-library/locking-constants.md
+++ b/docs/c-runtime-library/locking-constants.md
@@ -2,33 +2,33 @@
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
---
-# _locking Constants
+# `_locking` constants
## Syntax
-```
+```C
#include
-[Global Constants](../c-runtime-library/global-constants.md)
+[`_locking`](./reference/locking.md)\
+[Global constants](./global-constants.md)
diff --git a/docs/c-runtime-library/low-level-i-o.md b/docs/c-runtime-library/low-level-i-o.md
index c1228d636a..b08223be75 100644
--- a/docs/c-runtime-library/low-level-i-o.md
+++ b/docs/c-runtime-library/low-level-i-o.md
@@ -4,42 +4,42 @@ title: "Low-Level I/O"
ms.date: "11/04/2016"
helpviewer_keywords: ["I/O [CRT], low-level", "I/O [CRT], functions", "low-level I/O routines", "file handles [C++]", "file handles [C++], I/O functions"]
---
-# Low-Level I/O
+# Low-level I/O
-These functions invoke the operating system directly for lower-level operation than that provided by stream I/O. Low-level input and output calls do not buffer or format data.
+These functions invoke the operating system directly for lower-level operation than that provided by stream I/O. Low-level input and output calls don't buffer or format data.
Low-level routines can access the standard streams opened at program startup using the following predefined file descriptors.
-|Stream|File Descriptor|
-|------------|---------------------|
-|**`stdin`**|0|
-|**`stdout`**|1|
-|**`stderr`**|2|
-
-Low-level I/O routines set the [`errno`](../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md) global variable when an error occurs. You must include `STDIO.H` when you use low-level functions only if your program requires a constant that is defined in `STDIO.H`, such as the end-of-file indicator (**`EOF`**).
-
-## Low-Level I/O Functions
-
-|Function|Use|
-|--------------|---------|
-|[`_close`](../c-runtime-library/reference/close.md)|Close file|
-|[`_commit`](../c-runtime-library/reference/commit.md)|Flush file to disk|
-|[`_creat`, `_wcreat`](../c-runtime-library/reference/creat-wcreat.md)|Create file|
-|[`_dup`](../c-runtime-library/reference/dup-dup2.md)|Return next available file descriptor for given file|
-|[`_dup2`](../c-runtime-library/reference/dup-dup2.md)|Create second descriptor for given file|
-|[`_eof`](../c-runtime-library/reference/eof.md)|Test for end of file|
-|[`_lseek`, `_lseeki64`](../c-runtime-library/reference/lseek-lseeki64.md)|Reposition file pointer to given location|
-|[`_open`, `_wopen`](../c-runtime-library/reference/open-wopen.md)|Open file|
-|[`_read`](../c-runtime-library/reference/read.md)|Read data from file|
-|[`_sopen`, `_wsopen`](../c-runtime-library/reference/sopen-wsopen.md), [`_sopen_s`, `_wsopen_s`](../c-runtime-library/reference/sopen-s-wsopen-s.md)|Open file for file sharing|
-|[`_tell`, `_telli64`](../c-runtime-library/reference/tell-telli64.md)|Get current file-pointer position|
-|[`_umask`](../c-runtime-library/reference/umask.md), [`_umask_s`](../c-runtime-library/reference/umask-s.md)|Set file-permission mask|
-|[`_write`](../c-runtime-library/reference/write.md)|Write data to file|
-
-**`_dup`** and **`_dup2`** are typically used to associate the predefined file descriptors with different files.
+| Stream | File Descriptor |
+|---|---|
+| **`stdin`** | 0 |
+| **`stdout`** | 1 |
+| **`stderr`** | 2 |
+
+Low-level I/O routines set the [`errno`](./errno-doserrno-sys-errlist-and-sys-nerr.md) global variable when an error occurs. You must include `STDIO.H` when you use low-level functions only if your program requires a constant that is defined in `STDIO.H`, such as the end-of-file indicator (`EOF`).
+
+## Low-level I/O functions
+
+| Function | Use |
+|---|---|
+| [`_close`](./reference/close.md) | Close file |
+| [`_commit`](./reference/commit.md) | Flush file to disk |
+| [`_creat`, `_wcreat`](./reference/creat-wcreat.md) | Create file |
+| [`_dup`](./reference/dup-dup2.md) | Return next available file descriptor for given file |
+| [`_dup2`](./reference/dup-dup2.md) | Create second descriptor for given file |
+| [`_eof`](./reference/eof.md) | Test for end of file |
+| [`_lseek`, `_lseeki64`](./reference/lseek-lseeki64.md) | Reposition file pointer to given location |
+| [`_open`, `_wopen`](./reference/open-wopen.md) | Open file |
+| [`_read`](./reference/read.md) | Read data from file |
+| [`_sopen`, `_wsopen`](./reference/sopen-wsopen.md), [`_sopen_s`, `_wsopen_s`](./reference/sopen-s-wsopen-s.md) | Open file for file sharing |
+| [`_tell`, `_telli64`](./reference/tell-telli64.md) | Get current file-pointer position |
+| [`_umask`](./reference/umask.md), [`_umask_s`](./reference/umask-s.md) | Set file-permission mask |
+| [`_write`](./reference/write.md) | Write data to file |
+
+`_dup` and `_dup2` are typically used to associate the predefined file descriptors with different files.
## See also
-[Input and Output](../c-runtime-library/input-and-output.md)\
-[Universal C runtime routines by category](../c-runtime-library/run-time-routines-by-category.md)\
-[System Calls](../c-runtime-library/system-calls.md)
+[Input and output](./input-and-output.md)\
+[Universal C runtime routines by category](./run-time-routines-by-category.md)\
+[System calls](./system-calls.md)
diff --git a/docs/c-runtime-library/math-constants.md b/docs/c-runtime-library/math-constants.md
index 50afa4a9e6..61b129659a 100644
--- a/docs/c-runtime-library/math-constants.md
+++ b/docs/c-runtime-library/math-constants.md
@@ -2,15 +2,17 @@
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
---
-# Math Constants
+# Math constants
+
+Microsoft provides several predefined preprocessor macros for common math constants.
## Syntax
-```
+```cpp
#define _USE_MATH_DEFINES // for C++
#include
-[Global Constants](../c-runtime-library/global-constants.md)
+[`_matherr`](./reference/matherr.md)\
+[Global constants](./global-constants.md)
diff --git a/docs/c-runtime-library/max-env.md b/docs/c-runtime-library/max-env.md
index 040f8e0d81..8c4c735c43 100644
--- a/docs/c-runtime-library/max-env.md
+++ b/docs/c-runtime-library/max-env.md
@@ -2,21 +2,21 @@
description: "Learn more about: _MAX_ENV"
title: "_MAX_ENV"
ms.date: "11/04/2016"
-f1_keywords: ["_MAX_ENV", "MAX_ENV"]
-helpviewer_keywords: ["MAX_ENV constant", "_MAX_ENV constant"]
+f1_keywords: ["_MAX_ENV", "STDLIB/_MAX_ENV"]
+helpviewer_keywords: ["_MAX_ENV constant"]
ms.assetid: 66f0683e-6132-4297-b99b-6940534898b5
---
-# _MAX_ENV
+# `_MAX_ENV`
The maximum permissible string length of an environmental variable.
## Syntax
-```
+```C
#include
-[Global Constants](../c-runtime-library/global-constants.md)
+[Environmental constants](./environmental-constants.md)\
+[Global constants](./global-constants.md)
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 166fd485fe..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
@@ -3,14 +3,14 @@ description: "Learn more about: ___mb_cur_max_func, ___mb_cur_max_l_func, __p___
title: "___mb_cur_max_func, ___mb_cur_max_l_func, __p___mb_cur_max, __mb_cur_max"
ms.date: "4/2/2020"
api_name: ["___mb_cur_max_l_func", "__p___mb_cur_max", "___mb_cur_max_func", "__mb_cur_max", "_o____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-ms-win-crt-private-l1-1-0.dll"]
+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
---
-# ___mb_cur_max_func, ___mb_cur_max_l_func, __p___mb_cur_max, __mb_cur_max
+# `___mb_cur_max_func`, `___mb_cur_max_l_func`, `__p___mb_cur_max`, `__mb_cur_max`
Internal CRT function. Retrieves the maximum number of bytes in a multibyte character for the current or specified locale.
@@ -25,29 +25,29 @@ int * __p___mb_cur_max(void);
#### Parameters
-locale
+*`locale`*\
The locale structure to retrieve the result from. If this value is null, the current thread locale is used.
-## Return Value
+## Return value
The maximum number of bytes in a multibyte character for the current thread locale or the specified locale.
## Remarks
-This is an internal function that the CRT uses to retrieve the current value of the [MB_CUR_MAX](../c-runtime-library/mb-cur-max.md) macro from thread local storage. We recommend that you use the `MB_CUR_MAX` macro in your code for portability.
+**`___mb_cur_max_func`** is an internal function that the CRT uses to retrieve the current value of the [`MB_CUR_MAX`](./mb-cur-max.md) macro from thread local storage. We recommend that you use the `MB_CUR_MAX` macro in your code for portability.
-The `__mb_cur_max` macro is a convenient way to call the `___mb_cur_max_func()` function. The `__p___mb_cur_max` function is defined for compatibility with Visual C++ 5.0 and earlier versions.
+The **`__mb_cur_max`** macro is a convenient way to call the **`___mb_cur_max_func`** function. The **`__p___mb_cur_max`** function is defined for compatibility with Visual C++ 5.0 and earlier versions.
Internal CRT functions are implementation-specific and subject to change with each release. We don't recommend their use in your code.
-By default, this function's global state is scoped to the application. To change this, see [Global state in the CRT](global-state.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).
## Requirements
-|Routine|Required header|
-|-------------|---------------------|
-|`___mb_cur_max_func`, `___mb_cur_max_l_func`, `__p___mb_cur_max`|\
-[`mbstowcs`, `_mbstowcs_l`](../c-runtime-library/reference/mbstowcs-mbstowcs-l.md)
-[`mbtowc`, `_mbtowc_l`](../c-runtime-library/reference/mbtowc-mbtowc-l.md)
-[`___mb_cur_max_func`, `___mb_cur_max_l_func`, `__p___mb_cur_max`, `__mb_cur_max`](../c-runtime-library/mb-cur-max-func-mb-cur-max-l-func-p-mb-cur-max-mb-cur-max.md)
-[Standard Types](../c-runtime-library/standard-types.md)
-[`wcstombs`, `_wcstombs_l`](../c-runtime-library/reference/wcstombs-wcstombs-l.md)
-[`wctomb`, `_wctomb_l`](../c-runtime-library/reference/wctomb-wctomb-l.md)
-[Data Type Constants](../c-runtime-library/data-type-constants.md)
-[Global Constants](../c-runtime-library/global-constants.md)
+[`_mbclen`, `mblen`, `_mblen_l`](./reference/mbclen-mblen-mblen-l.md)\
+[`mbstowcs`, `_mbstowcs_l`](./reference/mbstowcs-mbstowcs-l.md)\
+[`mbtowc`, `_mbtowc_l`](./reference/mbtowc-mbtowc-l.md)\
+[`___mb_cur_max_func`, `___mb_cur_max_l_func`, `__p___mb_cur_max`, `__mb_cur_max`](./mb-cur-max-func-mb-cur-max-l-func-p-mb-cur-max-mb-cur-max.md)\
+[Standard types](./standard-types.md)\
+[`wcstombs`, `_wcstombs_l`](./reference/wcstombs-wcstombs-l.md)\
+[`wctomb`, `_wctomb_l`](./reference/wctomb-wctomb-l.md)\
+[Data type constants](./data-type-constants.md)\
+[Global constants](./global-constants.md)
diff --git a/docs/c-runtime-library/memory-allocation.md b/docs/c-runtime-library/memory-allocation.md
index 09a9aeca3c..605cf305cb 100644
--- a/docs/c-runtime-library/memory-allocation.md
+++ b/docs/c-runtime-library/memory-allocation.md
@@ -11,35 +11,35 @@ These routines allocate, free, and reallocate memory.
## Memory-allocation routines
-|Routine|Use|
-|-------------|---------|
-|[`_alloca`](../c-runtime-library/reference/alloca.md), [`_malloca`](../c-runtime-library/reference/malloca.md)|Allocate memory from the stack|
-|[`calloc`](../c-runtime-library/reference/calloc.md)|Allocate an array and initialize its elements to 0 (zero)|
-|[`_calloc_dbg`](../c-runtime-library/reference/calloc-dbg.md)|Debug version of **`calloc`**. Only available in the debug versions of the run-time libraries|
-|[`operator delete`, `operator delete[]`](../c-runtime-library/delete-operator-crt.md)|Free memory allocated on the heap |
-|[`_expand`](../c-runtime-library/reference/expand.md)|Expand or shrink a block of memory without moving it|
-|[`_expand_dbg`](../c-runtime-library/reference/expand-dbg.md)|Debug version of **`_expand`**. Only available in the debug versions of the run-time libraries|
-|[`free`](../c-runtime-library/reference/free.md)|Free memory allocated on the heap|
-|[`_free_dbg`](../c-runtime-library/reference/free-dbg.md)|Debug version of **`free`**. Only available in the debug versions of the run-time libraries|
-|[`_freea`](../c-runtime-library/reference/freea.md)|Free memory allocated on the stack|
-|[`_get_heap_handle`](../c-runtime-library/reference/get-heap-handle.md)|Get a Win32 `HANDLE` to the C runtime (CRT) heap.|
-|[`_heapadd`](../c-runtime-library/heapadd.md)|Add memory to the heap|
-|[`_heapchk`](../c-runtime-library/reference/heapchk.md)|Check the heap for consistency|
-|[`_heapmin`](../c-runtime-library/reference/heapmin.md)|Release unused memory in the heap|
-|[`_heapset`](../c-runtime-library/heapset.md)|Fill free heap entries with a value|
-|[`_heapwalk`](../c-runtime-library/reference/heapwalk.md)|Get info about each entry in the heap|
-|[`malloc`](../c-runtime-library/reference/malloc.md)|Allocate memory from the heap|
-|[`_malloc_dbg`](../c-runtime-library/reference/malloc-dbg.md)|Debug version of **`malloc`**; only available in the debug versions of the run-time libraries|
-|[`_msize`](../c-runtime-library/reference/msize.md)|Return the size of an allocated block of memory|
-|[`_msize_dbg`](../c-runtime-library/reference/msize-dbg.md)|Debug version of **`_msize`**; only available in the debug versions of the run-time libraries|
-|[`new`, `new[]`](../c-runtime-library/new-operator-crt.md)|Allocate a block of memory from the heap|
-|[`_query_new_handler`](../c-runtime-library/reference/query-new-handler.md)|Get the address of the current new handler routine set by **`_set_new_handler`**|
-|[`_query_new_mode`](../c-runtime-library/reference/query-new-mode.md)|Get the new handler mode set by **`_set_new_mode`** for **`malloc`**|
-|[`realloc`](../c-runtime-library/reference/realloc.md)|Reallocate a block to a new size|
-|[`_realloc_dbg`](../c-runtime-library/reference/realloc-dbg.md)|Debug version of **`realloc`**; only available in the debug versions of the run-time libraries|
-|[`_set_new_handler`](../c-runtime-library/reference/set-new-handler.md)|Enable error-handling mechanism when the **`new`** operator fails to allocate memory, and enable compilation of the C++ Standard Libraries|
-|[`_set_new_mode`](../c-runtime-library/reference/set-new-mode.md)|Set the new handler mode for **`malloc`**|
+| Routine | Use |
+|---|---|
+| [`_alloca`](./reference/alloca.md), [`_malloca`](./reference/malloca.md) | Allocate memory from the stack |
+| [`calloc`](./reference/calloc.md) | Allocate an array and initialize its elements to 0 (zero) |
+| [`_calloc_dbg`](./reference/calloc-dbg.md) | Debug version of **`calloc`**. Only available in the debug versions of the run-time libraries |
+| [`operator delete`, `operator delete[]`](./delete-operator-crt.md) | Free memory allocated on the heap |
+| [`_expand`](./reference/expand.md) | Expand or shrink a block of memory without moving it |
+| [`_expand_dbg`](./reference/expand-dbg.md) | Debug version of **`_expand`**. Only available in the debug versions of the run-time libraries |
+| [`free`](./reference/free.md) | Free memory allocated on the heap |
+| [`_free_dbg`](./reference/free-dbg.md) | Debug version of **`free`**. Only available in the debug versions of the run-time libraries |
+| [`_freea`](./reference/freea.md) | Free memory allocated on the stack |
+| [`_get_heap_handle`](./reference/get-heap-handle.md) | Get a Win32 `HANDLE` to the C runtime (CRT) heap. |
+| [`_heapadd`](./heapadd.md) | Add memory to the heap |
+| [`_heapchk`](./reference/heapchk.md) | Check the heap for consistency |
+| [`_heapmin`](./reference/heapmin.md) | Release unused memory in the heap |
+| [`_heapset`](./heapset.md) | Fill free heap entries with a value |
+| [`_heapwalk`](./reference/heapwalk.md) | Get info about each entry in the heap |
+| [`malloc`](./reference/malloc.md) | Allocate memory from the heap |
+| [`_malloc_dbg`](./reference/malloc-dbg.md) | Debug version of **`malloc`**; only available in the debug versions of the run-time libraries |
+| [`_msize`](./reference/msize.md) | Return the size of an allocated block of memory |
+| [`_msize_dbg`](./reference/msize-dbg.md) | Debug version of **`_msize`**; only available in the debug versions of the run-time libraries |
+| [`new`, `new[]`](./new-operator-crt.md) | Allocate a block of memory from the heap |
+| [`_query_new_handler`](./reference/query-new-handler.md) | Get the address of the current new handler routine set by **`_set_new_handler`** |
+| [`_query_new_mode`](./reference/query-new-mode.md) | Get the new handler mode set by **`_set_new_mode`** for **`malloc`** |
+| [`realloc`](./reference/realloc.md) | Reallocate a block to a new size |
+| [`_realloc_dbg`](./reference/realloc-dbg.md) | Debug version of **`realloc`**; only available in the debug versions of the run-time libraries |
+| [`_set_new_handler`](./reference/set-new-handler.md) | Enable error-handling mechanism when the **`new`** operator fails to allocate memory, and enable compilation of the C++ Standard Libraries |
+| [`_set_new_mode`](./reference/set-new-mode.md) | Set the new handler mode for **`malloc`** |
## See also
-[Universal C runtime routines by category](../c-runtime-library/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/multithreaded-libraries-performance.md b/docs/c-runtime-library/multithreaded-libraries-performance.md
index d8aa90c502..12d78d352f 100644
--- a/docs/c-runtime-library/multithreaded-libraries-performance.md
+++ b/docs/c-runtime-library/multithreaded-libraries-performance.md
@@ -6,26 +6,26 @@ ms.topic: "conceptual"
helpviewer_keywords: ["threading [C++], performance", "libraries, multithreaded", "performance, multithreading", "multithreaded libraries"]
ms.assetid: faa5d808-087c-463d-8f0d-8c478d137296
---
-# Multithreaded Libraries Performance
+# Multithreaded libraries performance
-The single-threaded CRT is no longer available. This topic discusses how to get the maximum performance from the multithreaded libraries.
+The single-threaded CRT is no longer available. This article discusses how to get the maximum performance from the multithreaded libraries.
## Maximizing performance
The performance of the multithreaded libraries has been improved and is close to the performance of the now-eliminated single-threaded libraries. For those situations when even higher performance is required, there are several new features.
-- Independent stream locking allows you to lock a stream and then use [_nolock Functions](../c-runtime-library/nolock-functions.md) that access the stream directly. This allows lock usage to be hoisted outside critical loops.
+- Independent stream locking allows you to lock a stream and then use [`_nolock` functions](./nolock-functions.md) that access the stream directly. This feature allows lock usage to be hoisted outside critical loops.
-- Per-thread locale reduces the cost of locale access for multithreaded scenarios (see [_configthreadlocale](../c-runtime-library/reference/configthreadlocale.md)).
+- Per-thread locale reduces the cost of locale access for multithreaded scenarios (see [`_configthreadlocale`](./reference/configthreadlocale.md)).
-- Locale-dependent functions (with names ending in _l) take the locale as a parameter, removing substantial cost (for example, [printf, _printf_l, wprintf, _wprintf_l](../c-runtime-library/reference/printf-printf-l-wprintf-wprintf-l.md)).
+- Locale-dependent functions (with names ending in _l) take the locale as a parameter, removing substantial cost (for example, [`printf`, `_printf_l`, `wprintf`, `_wprintf_l`](./reference/printf-printf-l-wprintf-wprintf-l.md)).
- Optimizations for common codepages reduce the cost of many short operations.
-- Defining [_CRT_DISABLE_PERFCRIT_LOCKS](../c-runtime-library/crt-disable-perfcrit-locks.md) forces all I/O operations to assume a single-threaded I/O model and use the _nolock forms of the functions. This allows highly I/O-based single-threaded applications to get better performance.
+- Defining [`_CRT_DISABLE_PERFCRIT_LOCKS`](./crt-disable-perfcrit-locks.md) forces all I/O operations to assume a single-threaded I/O model and use the `_nolock` forms of the functions. This macro allows highly I/O-based single-threaded applications to get better performance.
- Exposure of the CRT heap handle allows you to enable the Windows Low Fragmentation Heap (LFH) for the CRT heap, which can substantially improve performance in highly scaled scenarios.
## See also
-[C runtime (CRT) and C++ Standard Library (STL) `.lib` files](../c-runtime-library/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/new-operator-crt.md b/docs/c-runtime-library/new-operator-crt.md
index dd43a78d1b..c5273af0c4 100644
--- a/docs/c-runtime-library/new-operator-crt.md
+++ b/docs/c-runtime-library/new-operator-crt.md
@@ -5,10 +5,9 @@ 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
---
-# operator new(CRT)
+# `operator new` (CRT)
-Beginning in Visual Studio 2013, the Universal C Runtime (UCRT) no longer supports the C++-specific operator new and operator delete functions. These are now part of the C++ Standard Library. For more information, see [new and delete operators](../cpp/new-and-delete-operators.md) and [new operator](../cpp/new-operator-cpp.md) in the C++ Language Reference.
+Beginning in Visual Studio 2013, the Universal C Runtime (UCRT) no longer supports the C++-specific `operator new` and `operator delete` functions. These functions are now part of the C++ Standard Library. For more information, see [`new` and `delete` operators](../cpp/new-and-delete-operators.md) and [`new` operator](../cpp/new-operator-cpp.md) in the C++ Language Reference.
diff --git a/docs/c-runtime-library/nolock-functions.md b/docs/c-runtime-library/nolock-functions.md
index 6cfc9a402e..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
+# `_nolock` functions
-These are functions that do not perform any locking. They are provided for users requiring maximum performance. For more information, see [Multithreaded Libraries Performance](../c-runtime-library/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](../c-runtime-library/reference/fclose-nolock.md)
-
-[_fflush_nolock](../c-runtime-library/reference/fflush-nolock.md)
-
-[_fgetc_nolock, _fgetwc_nolock](../c-runtime-library/reference/fgetc-nolock-fgetwc-nolock.md)
-
-[_fread_nolock](../c-runtime-library/reference/fread-nolock.md)
-
-[_fseek_nolock, _fseeki64_nolock](../c-runtime-library/reference/fseek-nolock-fseeki64-nolock.md)
-
-[_ftell_nolock, _ftelli64_nolock](../c-runtime-library/reference/ftell-nolock-ftelli64-nolock.md)
-
-[_fwrite_nolock](../c-runtime-library/reference/fwrite-nolock.md)
-
-[_getc_nolock, _getwc_nolock](../c-runtime-library/reference/getc-nolock-getwc-nolock.md)
-
-[_getch_nolock, _getwch_nolock](../c-runtime-library/reference/getch-nolock-getwch-nolock.md)
-
-[_getchar_nolock, _getwchar_nolock](../c-runtime-library/reference/getchar-nolock-getwchar-nolock.md)
-
-[_getche_nolock, _getwche_nolock](../c-runtime-library/reference/getche-nolock-getwche-nolock.md)
-
-[_getdcwd_nolock, _wgetdcwd_nolock](../c-runtime-library/reference/getdcwd-nolock-wgetdcwd-nolock.md)
-
-[_putc_nolock, _putwc_nolock](../c-runtime-library/reference/putc-nolock-putwc-nolock.md)
-
-[_putch_nolock, _putwch_nolock](../c-runtime-library/reference/putch-nolock-putwch-nolock.md)
-
-[_putchar_nolock, _putwchar_nolock](../c-runtime-library/reference/putchar-nolock-putwchar-nolock.md)
-
-[_ungetc_nolock, _ungetwc_nolock](../c-runtime-library/reference/ungetc-nolock-ungetwc-nolock.md)
-
-[_ungetch_nolock, _ungetwch_nolock](../c-runtime-library/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](../c-runtime-library/input-and-output.md)
-[Universal C runtime routines by category](../c-runtime-library/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/null-crt.md b/docs/c-runtime-library/null-crt.md
index 9286b072fb..a0e2fb5725 100644
--- a/docs/c-runtime-library/null-crt.md
+++ b/docs/c-runtime-library/null-crt.md
@@ -2,14 +2,14 @@
description: "Learn more about: NULL (CRT)"
title: "NULL (CRT)"
ms.date: "11/04/2016"
-f1_keywords: ["null"]
+f1_keywords: ["NULL", "VCRUNTIME/NULL"]
helpviewer_keywords: ["NULL", "null pointers", "NULL, null pointer value"]
ms.assetid: f9aac2a0-4f79-423f-8738-a76dccc0b1c3
---
-# NULL (CRT)
+# `NULL` (CRT)
-**NULL** is the null-pointer value used with many pointer operations and functions. It is equivalent to 0. **NULL** is defined in the following header files: CRTDBG.H, LOCALE.H, STDDEF.H, STDIO.H, STDLIB.H, STRING.H, TCHAR.H, TIME.H and WCHAR.H.
+`NULL` is the null-pointer value used with many pointer operations and functions. It's equivalent to 0. `NULL` is defined in the following header files: CRTDBG.H, LOCALE.H, STDDEF.H, STDIO.H, STDLIB.H, STRING.H, TCHAR.H, TIME.H and WCHAR.H.
## See also
-[Global Constants](../c-runtime-library/global-constants.md)
+[Global constants](./global-constants.md)
diff --git a/docs/c-runtime-library/obsolete-functions.md b/docs/c-runtime-library/obsolete-functions.md
index 7a8b34d60b..90759b70fa 100644
--- a/docs/c-runtime-library/obsolete-functions.md
+++ b/docs/c-runtime-library/obsolete-functions.md
@@ -3,46 +3,45 @@ title: "Obsolete functions"
description: "Lists the obsolete functions that have been deprecated and removed from the Microsoft C runtime library (CRT)."
ms.date: "4/2/2020"
api_name: ["_beep", "_sleep", "_loaddll", "_getdllprocaddr", "_seterrormode", "is_wctype", "_getsystime", "_setsystime", "_unloaddll", "_o__beep", "_o__getdllprocaddr", "_o__getsystime", "_o__loaddll", "_o__seterrormode", "_o__setsystime", "_o__sleep", "_o__unloaddll", "_o_is_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-process-l1-1-0.dll", "api-ms-win-crt-runtime-l1-1-0.dll", "api-ms-win-crt-string-l1-1-0.dll", "api-ms-win-crt-time-l1-1-0.dll", "api-ms-win-crt-private-l1-1-0.dll"]
+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-process-l1-1-0.dll", "api-ms-win-crt-runtime-l1-1-0.dll", "api-ms-win-crt-string-l1-1-0.dll", "api-ms-win-crt-time-l1-1-0.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
f1_keywords: ["is_wctype", "_loaddll", "_unloaddll", "_getdllprocaddr", "_seterrormode", "_beep", "_sleep", "_getsystime", "corecrt_wctype/is_wctype", "process/_loaddll", "process/_unloaddll", "process/_getdllprocaddr", "stdlib/_seterrormode", "stdlib/_beep", "stdlib/_sleep", "time/_getsystime", "time/_setsystime"]
helpviewer_keywords: ["obsolete functions", "_beep function", "_sleep function", "_seterrormode function"]
ms.assetid: 8e14c2d4-1481-4240-8586-47eb43db02b0
---
-# Obsolete Functions
+# Obsolete functions
Certain library functions are obsolete and have more recent equivalents. We recommend you change these functions to the updated versions. Other obsolete functions have been removed from the CRT. This article lists the functions deprecated as obsolete, and the functions removed in a particular version of Visual Studio.
## Deprecated as obsolete in Visual Studio 2015
-|Obsolete function|Alternative|
-|-----------------------|-----------------|
-|`is_wctype`|[iswctype](../c-runtime-library/reference/isctype-iswctype-isctype-l-iswctype-l.md)|
-|`_loaddll`|[LoadLibrary](/windows/win32/api/libloaderapi/nf-libloaderapi-loadlibraryw), [LoadLibraryEx](/windows/win32/api/libloaderapi/nf-libloaderapi-loadlibraryexw), or [LoadPackagedLibrary](/windows/win32/api/winbase/nf-winbase-loadpackagedlibrary)|
-|`_unloaddll`|[FreeLibrary](/windows/win32/api/libloaderapi/nf-libloaderapi-freelibrary)|
-|`_getdllprocaddr`|[GetProcAddress](../build/getprocaddress.md)|
-|`_seterrormode`|[SetErrorMode](/windows/win32/api/errhandlingapi/nf-errhandlingapi-seterrormode)|
-|`_beep`|[Beep](/windows/win32/api/utilapiset/nf-utilapiset-beep)|
-|`_sleep`|[Sleep](/windows/win32/api/synchapi/nf-synchapi-sleep)|
-|`_getsystime`|[GetLocalTime](/windows/win32/api/sysinfoapi/nf-sysinfoapi-getlocaltime)|
-|`_setsystime`|[SetLocalTime](/windows/win32/api/sysinfoapi/nf-sysinfoapi-setlocaltime)|
+| Obsolete function | Alternative |
+|---|---|
+| `is_wctype` | [`iswctype`](./reference/isctype-iswctype-isctype-l-iswctype-l.md) |
+| `_loaddll` | [`LoadLibrary`](/windows/win32/api/libloaderapi/nf-libloaderapi-loadlibraryw), [`LoadLibraryEx`](/windows/win32/api/libloaderapi/nf-libloaderapi-loadlibraryexw), or [`LoadPackagedLibrary`](/windows/win32/api/winbase/nf-winbase-loadpackagedlibrary) |
+| `_unloaddll` | [`FreeLibrary`](/windows/win32/api/libloaderapi/nf-libloaderapi-freelibrary) |
+| `_getdllprocaddr` | [`GetProcAddress`](../build/getprocaddress.md) |
+| `_seterrormode` | [`SetErrorMode`](/windows/win32/api/errhandlingapi/nf-errhandlingapi-seterrormode) |
+| `_beep` | [`Beep`](/windows/win32/api/utilapiset/nf-utilapiset-beep) |
+| `_sleep` | [`Sleep`](/windows/win32/api/synchapi/nf-synchapi-sleep) |
+| `_getsystime` | [`GetLocalTime`](/windows/win32/api/sysinfoapi/nf-sysinfoapi-getlocaltime) |
+| `_setsystime` | [`SetLocalTime`](/windows/win32/api/sysinfoapi/nf-sysinfoapi-setlocaltime) |
## Removed from the CRT in Visual Studio 2015
-|Obsolete function|Alternative|
-|-----------------------|-----------------|
-|[_cgets, _cgetws](../c-runtime-library/cgets-cgetws.md)|[_cgets_s, _cgetws_s](../c-runtime-library/reference/cgets-s-cgetws-s.md)|
-|[gets, _getws](../c-runtime-library/gets-getws.md)|[gets_s, _getws_s](../c-runtime-library/reference/gets-s-getws-s.md)|
-|[_get_output_format](../c-runtime-library/get-output-format.md)|None|
-|[_heapadd](../c-runtime-library/heapadd.md)|None|
-|[_heapset](../c-runtime-library/heapset.md)|None|
-|[inp, inpw, _inp, _inpw, _inpd](../c-runtime-library/inp-inpw-inpd.md)|None|
-|[outp, outpw, _outp, _outpw, _outpd](../c-runtime-library/outp-outpw-outpd.md)|None|
-|[_set_output_format](../c-runtime-library/set-output-format.md)|None|
+| Obsolete function | Alternative |
+|---|---|
+| [`_cgets`, `_cgetws`](./cgets-cgetws.md) | [`_cgets_s`, `_cgetws_s`](./reference/cgets-s-cgetws-s.md) |
+| [`gets`, `_getws`](./gets-getws.md) | [`gets_s`, `_getws_s`](./reference/gets-s-getws-s.md) |
+| [`_get_output_format`](./get-output-format.md) | None |
+| [`_heapadd`](./heapadd.md) | None |
+| [`_heapset`](./heapset.md) | None |
+| [`inp`, `inpw`, `_inp`, `_inpw`, `_inpd`](./inp-inpw-inpd.md) | None |
+| [`outp`, `outpw`, `_outp`, `_outpw`, `_outpd`](./outp-outpw-outpd.md) | None |
+| [`_set_output_format`](./set-output-format.md) | None |
## Removed from the CRT in earlier versions of Visual Studio
-[_lock](../c-runtime-library/lock.md)
-
-[_unlock](../c-runtime-library/unlock.md)
+[`_lock`](./lock.md)\
+[`_unlock`](./unlock.md)
diff --git a/docs/c-runtime-library/outp-outpw-outpd.md b/docs/c-runtime-library/outp-outpw-outpd.md
index 161f457d1e..bc7244ca7a 100644
--- a/docs/c-runtime-library/outp-outpw-outpd.md
+++ b/docs/c-runtime-library/outp-outpw-outpd.md
@@ -12,7 +12,7 @@ ms.assetid: c200fe22-41f6-46fd-b0be-ebb805b35181
---
# `outp`, `outpw`, `_outp`, `_outpw`, `_outpd`
-Outputs, at a port, a byte (`outp`, `_outp`), a word (`outpw`, `_outpw`), or a double word (`_outpd`).
+Outputs, at a port, a byte (**`outp`**, **`_outp`**), a word (**`outpw`**, **`_outpw`**), or a double word (**`_outpd`**).
> [!IMPORTANT]
> These functions are obsolete. Beginning in Visual Studio 2015, they are not available in the CRT.\
@@ -43,35 +43,35 @@ Port number.
*`data_byte`*, *`data_word`*\
Output values.
-## Return Value
+## Return value
The functions return the data output. There's no error return.
## Remarks
-The `_outp`, `_outpw`, and `_outpd` functions write a byte, a word, and a double word, respectively, to the specified output port. The *`port`* argument can be any unsigned integer in the range 0 - 65,535. *`data_byte`* can be any integer in the range 0 - 255. *`data_word`* can be any value in the range of an integer, an unsigned short integer, and an unsigned long integer, respectively.
+The **`_outp`**, **`_outpw`**, and **`_outpd`** functions write a byte, a word, and a double word, respectively, to the specified output port. The *`port`* argument can be any unsigned integer in the range 0 - 65,535. *`data_byte`* can be any integer in the range 0 - 255. *`data_word`* can be any value in the range of an integer, an unsigned short integer, and an unsigned long integer, respectively.
Because these functions write directly to an I/O port, they can't be used in user-mode Windows code.
-For information about using I/O ports in the Windows operating system, see [Serial Communications](/previous-versions/ff802693(v=msdn.10)).
+For information about using I/O ports in the Windows operating system, see [Serial communications](/previous-versions/ff802693(v=msdn.10)).
-The `outp` and `outpw` names are older, deprecated names for the `_outp` and `_outpw` functions. For more information, see [POSIX function names](../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names).
+The **`outp`** and **`outpw`** names are older, deprecated names for the **`_outp`** and **`_outpw`** functions. For more information, see [POSIX function names](../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names).
## Requirements
-|Routine|Required header|
-|-------------|---------------------|
-|`_outp`|\
-[__pctype_func](../c-runtime-library/pctype-func.md)
+[`is`, `isw` routines](./is-isw-routines.md)\
+[`__pctype_func`](./pctype-func.md)
diff --git a/docs/c-runtime-library/pgmptr-wpgmptr.md b/docs/c-runtime-library/pgmptr-wpgmptr.md
index 1118e345ba..e5779e9075 100644
--- a/docs/c-runtime-library/pgmptr-wpgmptr.md
+++ b/docs/c-runtime-library/pgmptr-wpgmptr.md
@@ -2,48 +2,48 @@
description: "Learn more about: _pgmptr, _wpgmptr"
title: "_pgmptr, _wpgmptr"
ms.date: "11/04/2016"
-f1_keywords: ["pgmptr", "_pgmptr", "wpgmptr", "_wpgmptr"]
-helpviewer_keywords: ["wpgmptr function", "_wpgmptr function", "_pgmptr function", "pgmptr function"]
+f1_keywords: ["_pgmptr", "STDLIB/_pgmptr", "_wpgmptr", "STDLIB/_wpgmptr"]
+helpviewer_keywords: ["_pgmptr global variable", "_wpgmptr global variable"]
ms.assetid: 4d44b515-0eff-4136-8bc4-684195f218f5
---
-# _pgmptr, _wpgmptr
+# `_pgmptr`, `_wpgmptr`
-The path of the executable file. Deprecated; use [_get_pgmptr](../c-runtime-library/reference/get-pgmptr.md) and [_get_wpgmptr](../c-runtime-library/reference/get-wpgmptr.md).
+The path of the executable file. Deprecated; use [`_get_pgmptr`](./reference/get-pgmptr.md) and [`_get_wpgmptr`](./reference/get-wpgmptr.md).
## Syntax
-```
+```C
extern char *_pgmptr;
extern wchar_t *_wpgmptr;
```
## Remarks
-When a program is run from the command interpreter (Cmd.exe), `_pgmptr` is automatically initialized to the full path of the executable file. For example, if Hello.exe is in C:\BIN and C:\BIN is in the path, `_pgmptr` is set to C:\BIN\Hello.exe when you execute:
+When a program is run from the command interpreter (Cmd.exe), **`_pgmptr`** is automatically initialized to the full path of the executable file. For example, if Hello.exe is in C:\BIN and C:\BIN is in the path, **`_pgmptr`** is set to *`C:\BIN\Hello.exe`* when you execute:
-```
+```cmd
C> hello
```
-When a program is not run from the command line, `_pgmptr` might be initialized to the program name (the file's base name without the file name extension) or to a file name, relative path, or full path.
+When a program isn't run from the command line, **`_pgmptr`** might be initialized to the program name (the file's base name without the file name extension) or to a file name, relative path, or full path.
-`_wpgmptr` is the wide-character counterpart of `_pgmptr` for use with programs that use `wmain`.
+**`_wpgmptr`** is the wide-character counterpart of **`_pgmptr`** for use with programs that use `wmain`.
-### Generic-Text Routine Mappings
+### Generic-text routine mappings
-|Tchar.h routine|_UNICODE and _MBCS not defined|_MBCS defined|_UNICODE defined|
-|---------------------|--------------------------------------|--------------------|-----------------------|
-|`_tpgmptr`|`_pgmptr`|`_pgmptr`|`_wpgmptr`|
+| Tchar.h routine | `_UNICODE` and `_MBCS` not defined | `_MBCS` defined | `_UNICODE` defined |
+|---|---|---|---|
+| `_tpgmptr` | **`_pgmptr`** | **`_pgmptr`** | **`_wpgmptr`** |
## Requirements
-|Variable|Required header|
-|--------------|---------------------|
-|`_pgmptr`, `_wpgmptr`|\