Skip to content

Repo sync for protected CLA branch #4232

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Oct 19, 2022
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion docs/c-runtime-library/32-bit-windows-time-date-formats.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ The file time and the date are stored individually, using unsigned integers as b

## See also

[Global Constants](../c-runtime-library/global-constants.md)
[Global constants](./global-constants.md)
12 changes: 6 additions & 6 deletions docs/c-runtime-library/a-sample-generic-text-program.md
Original file line number Diff line number Diff line change
Expand Up @@ -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**

Expand Down Expand Up @@ -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)<br/>
[Data Type Mappings](../c-runtime-library/data-type-mappings.md)<br/>
[Constant and Global Variable Mappings](../c-runtime-library/constant-and-global-variable-mappings.md)<br/>
[Routine Mappings](../c-runtime-library/routine-mappings.md)<br/>
[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)
4 changes: 2 additions & 2 deletions docs/c-runtime-library/abnormal-termination.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ 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

Expand Down
2 changes: 1 addition & 1 deletion docs/c-runtime-library/acmdln-tcmdln-wcmdln.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ These CRT internal variables store the complete command line. They're exposed in

## See also

[Global Variables](../c-runtime-library/global-variables.md)
[Global variables](./global-variables.md)
2 changes: 1 addition & 1 deletion docs/c-runtime-library/ansi-c-compliance.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ The names of Microsoft-specific macros and manifest constants begin with two und

## See also

[Compatibility](../c-runtime-library/compatibility.md)
[Compatibility](./compatibility.md)
4 changes: 2 additions & 2 deletions docs/c-runtime-library/argc-argv-wargv.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ For portable code, we recommend you use the arguments passed to `main` to get th
|---------------------|---------------------|
|`__argc`, `__argv`, `__wargv`|\<stdlib.h>, \<cstdlib> (C++)|

`__argc`, `__argv`, and `__wargv` are Microsoft extensions. For compatibility information, see [Compatibility](../c-runtime-library/compatibility.md).
`__argc`, `__argv`, and `__wargv` are Microsoft extensions. For compatibility information, see [Compatibility](./compatibility.md).

## See also

[Global variables](../c-runtime-library/global-variables.md)\
[Global variables](./global-variables.md)\
[`main` function and command-line arguments (C++)](../cpp/main-function-command-line-args.md)\
[Using `wmain` instead of `main`](../cpp/main-function-command-line-args.md)
8 changes: 4 additions & 4 deletions docs/c-runtime-library/argument-access.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ The **va_arg**, **va_end**, and **va_start** macros provide access to function a

|Macro|Use|
|-----------|-------------------------------|
|[va_arg](../c-runtime-library/reference/va-arg-va-copy-va-end-va-start.md)|Retrieve argument from list|
|[va_end](../c-runtime-library/reference/va-arg-va-copy-va-end-va-start.md)|Reset pointer|
|[va_start](../c-runtime-library/reference/va-arg-va-copy-va-end-va-start.md)|Set pointer to beginning of argument list|
|[`va_arg`](./reference/va-arg-va-copy-va-end-va-start.md)|Retrieve argument from list|
|[`va_end`](./reference/va-arg-va-copy-va-end-va-start.md)|Reset pointer|
|[`va_start`](./reference/va-arg-va-copy-va-end-va-start.md)|Set pointer to beginning of argument list|

## 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)
6 changes: 3 additions & 3 deletions docs/c-runtime-library/backward-compatibility.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ ms.topic: "conceptual"
helpviewer_keywords: ["CRT, compatibility", "backward compatibility, C run-time libraries", "compatibility, C run-time libraries", "backward compatibility"]
ms.assetid: cc3175cf-97fd-492f-b329-5791aea63090
---
# Backward Compatibility
# Backward compatibility

For compatibility between product versions, the library OLDNAMES.LIB maps old names to new names. For instance, `open` maps to `_open`. You must explicitly link with OLDNAMES.LIB only when you compile with the following combinations of command-line options:

- `/Zl` (omit default library name from object file) and `/Ze` (the default: use Microsoft extensions)

- `/link` (linker-control), `/NOD` (no default-library search), and `/Ze`

For more information about compiler command-line options, see [Compiler Reference](../build/reference/compiler-options.md).
For more information about compiler command-line options, see [Compiler options](../build/reference/compiler-options.md).

## See also

[Compatibility](../c-runtime-library/compatibility.md)
[Compatibility](./compatibility.md)
18 changes: 9 additions & 9 deletions docs/c-runtime-library/buffer-manipulation.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ Use these routines to work with areas of memory on a byte-by-byte basis.

|Routine|Use|
|-------------|---------|
|[_memccpy](../c-runtime-library/reference/memccpy.md)|Copy characters from one buffer to another until given character or given number of characters has been copied|
|[memchr, wmemchr](../c-runtime-library/reference/memchr-wmemchr.md)|Return pointer to first occurrence, within specified number of characters, of given character in buffer|
|[memcmp, wmemcmp](../c-runtime-library/reference/memcmp-wmemcmp.md)|Compare specified number of characters from two buffers|
|[memcpy, wmemcpy](../c-runtime-library/reference/memcpy-wmemcpy.md), [memcpy_s, wmemcpy_s](../c-runtime-library/reference/memcpy-s-wmemcpy-s.md)|Copy specified number of characters from one buffer to another|
|[_memicmp, _memicmp_l](../c-runtime-library/reference/memicmp-memicmp-l.md)|Compare specified number of characters from two buffers without regard to case|
|[memmove, wmemmove](../c-runtime-library/reference/memmove-wmemmove.md),[memmove_s, wmemmove_s](../c-runtime-library/reference/memmove-s-wmemmove-s.md)|Copy specified number of characters from one buffer to another|
|[memset, wmemset](../c-runtime-library/reference/memset-wmemset.md)|Use given character to initialize specified number of bytes in the buffer|
|[_swab](../c-runtime-library/reference/swab.md)|Swap bytes of data and store them at specified location|
|[`_memccpy`](./reference/memccpy.md)|Copy characters from one buffer to another until given character or given number of characters has been copied|
|[`memchr`, `wmemchr`](./reference/memchr-wmemchr.md)|Return pointer to first occurrence, within specified number of characters, of given character in buffer|
|[`memcmp`, `wmemcmp`](./reference/memcmp-wmemcmp.md)|Compare specified number of characters from two buffers|
|[`memcpy`, `wmemcpy`](./reference/memcpy-wmemcpy.md), [`memcpy_s`, `wmemcpy_s`](./reference/memcpy-s-wmemcpy-s.md)|Copy specified number of characters from one buffer to another|
|[`_memicmp`, `_memicmp_l`](./reference/memicmp-memicmp-l.md)|Compare specified number of characters from two buffers without regard to case|
|[`memmove`, `wmemmove`](./reference/memmove-wmemmove.md),[`memmove_s`, `wmemmove_s`](./reference/memmove-s-wmemmove-s.md)|Copy specified number of characters from one buffer to another|
|[`memset`, `wmemset`](./reference/memset-wmemset.md)|Use given character to initialize specified number of bytes in the buffer|
|[`_swab`](./reference/swab.md)|Swap bytes of data and store them at specified location|

When the source and target areas overlap, only **memmove** is guaranteed to copy the full source properly.

## See also

[Universal C runtime routines by category](../c-runtime-library/run-time-routines-by-category.md)
[Universal C runtime routines by category](./run-time-routines-by-category.md)
6 changes: 3 additions & 3 deletions docs/c-runtime-library/bufsiz.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ ms.assetid: 94ac04a3-d154-476b-bd89-eefbc7b949ae

## Remarks

`BUFSIZ` is the required user-allocated buffer for the [setvbuf](../c-runtime-library/reference/setvbuf.md) routine.
`BUFSIZ` is the required user-allocated buffer for the [`setvbuf`](./reference/setvbuf.md) routine.

## See also

[Stream I/O](../c-runtime-library/stream-i-o.md)<br/>
[Global Constants](../c-runtime-library/global-constants.md)
[Stream I/O](./stream-i-o.md)\
[Global constants](./global-constants.md)
10 changes: 5 additions & 5 deletions docs/c-runtime-library/byte-and-wide-streams.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ 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` later 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 steams. Moreover, the file-position indicator may well have to deal with a state-dependent encoding. Typically, it includes both a byte offset within the stream and an object of type `mbstate_t`. Thus, the only reliable way to obtain a file position within a wide stream is by calling [`fgetpos`](./reference/fgetpos.md), and the only reliable way to restore a position obtained this way is by calling [`fsetpos`](./reference/fsetpos.md).

## See also

[Files and Streams](../c-runtime-library/files-and-streams.md)<br/>
[`setlocale`, `_wsetlocale`](../c-runtime-library/reference/setlocale-wsetlocale.md)
[Files and streams](./files-and-streams.md)\
[`setlocale`, `_wsetlocale`](./reference/setlocale-wsetlocale.md)
38 changes: 19 additions & 19 deletions docs/c-runtime-library/byte-classification.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -19,26 +19,26 @@ The predefined constants in the following table are defined in `<ctype.h>`.

| Routine | Byte Test Condition |
|--|--|
| [`isleadbyte`, `_isleadbyte_l`](../c-runtime-library/reference/isleadbyte-isleadbyte-l.md) | Lead byte; test result depends on `LC_CTYPE` category setting of current locale |
| [`_ismbbalnum`, `_ismbbalnum_l`](../c-runtime-library/reference/ismbbalnum-ismbbalnum-l.md) | `isalnum || _ismbbkalnum` |
| [`_ismbbalpha`, `_ismbbalpha_l`](../c-runtime-library/reference/ismbbalpha-ismbbalpha-l.md) | `isalpha || _ismbbkalpha` |
| [`_ismbbgraph`, `_ismbbgraph_l`](../c-runtime-library/reference/ismbbgraph-ismbbgraph-l.md) | Same as `_ismbbprint`, but `_ismbbgraph` doesn't include the space character (0x20) |
| [`_ismbbkalnum`, `_ismbbkalnum_l`](../c-runtime-library/reference/ismbbkalnum-ismbbkalnum-l.md) | Non-ASCII text symbol other than punctuation. For example, in code page 932 only, `_ismbbkalnum` tests for katakana alphanumeric |
| [`_ismbbkana`, `_ismbbkana_l`](../c-runtime-library/reference/ismbbkana-ismbbkana-l.md) | Katakana (0xA1 - 0xDF), code page 932 only |
| [`_ismbbkprint`, `_ismbbkprint_l`](../c-runtime-library/reference/ismbbkprint-ismbbkprint-l.md) | Non-ASCII text or non-ASCII punctuation symbol. For example, in code page 932 only, `_ismbbkprint` tests for katakana alphanumeric or katakana punctuation (range: 0xA1 - 0xDF). |
| [`_ismbbkpunct`, `_ismbbkpunct_l`](../c-runtime-library/reference/ismbbkpunct-ismbbkpunct-l.md) | Non-ASCII punctuation. For example, in code page 932 only, `_ismbbkpunct` tests for katakana punctuation. |
| [`_ismbblead`, `_ismbblead_l`](../c-runtime-library/reference/ismbblead-ismbblead-l.md) | First byte of multibyte character. For example, in code page 932 only, valid ranges are 0x81 - 0x9F, 0xE0 - 0xFC. |
| [`_ismbbprint`, `_ismbbprint_l`](../c-runtime-library/reference/ismbbprint-ismbbprint-l.md) | `isprint || _ismbbkprint`. `ismbbprint` includes the space character (0x20) |
| [`_ismbbpunct`, `_ismbbpunct_l`](../c-runtime-library/reference/ismbbpunct-ismbbpunct-l.md) | `ispunct || _ismbbkpunct` |
| [`_ismbbtrail`, `_ismbbtrail_l`](../c-runtime-library/reference/ismbbtrail-ismbbtrail-l.md) | Second byte of multibyte character. For example, in code page 932 only, valid ranges are 0x40 - 0x7E, 0x80 - 0xEC. |
| [`_ismbslead`, `_ismbslead_l`](../c-runtime-library/reference/ismbslead-ismbstrail-ismbslead-l-ismbstrail-l.md) | Lead byte (in string context) |
| [`ismbstrail`, `_ismbstrail_l`](../c-runtime-library/reference/ismbslead-ismbstrail-ismbslead-l-ismbstrail-l.md) | Trail byte (in string context) |
| [`_mbbtype`, `_mbbtype_l`](../c-runtime-library/reference/mbbtype-mbbtype-l.md) | Return byte type based on previous byte |
| [`_mbsbtype`, `_mbsbtype_l`](../c-runtime-library/reference/mbsbtype-mbsbtype-l.md) | Return type of byte within string |
| [`mbsinit`](../c-runtime-library/reference/mbsinit.md) | Tracks the state of a multibyte character conversion. |
| [`isleadbyte`, `_isleadbyte_l`](./reference/isleadbyte-isleadbyte-l.md) | Lead byte; test result depends on `LC_CTYPE` category setting of current locale |
| [`_ismbbalnum`, `_ismbbalnum_l`](./reference/ismbbalnum-ismbbalnum-l.md) | `isalnum || _ismbbkalnum` |
| [`_ismbbalpha`, `_ismbbalpha_l`](./reference/ismbbalpha-ismbbalpha-l.md) | `isalpha || _ismbbkalpha` |
| [`_ismbbgraph`, `_ismbbgraph_l`](./reference/ismbbgraph-ismbbgraph-l.md) | Same as `_ismbbprint`, but `_ismbbgraph` doesn't include the space character (0x20) |
| [`_ismbbkalnum`, `_ismbbkalnum_l`](./reference/ismbbkalnum-ismbbkalnum-l.md) | Non-ASCII text symbol other than punctuation. For example, in code page 932 only, `_ismbbkalnum` tests for katakana alphanumeric |
| [`_ismbbkana`, `_ismbbkana_l`](./reference/ismbbkana-ismbbkana-l.md) | Katakana (0xA1 - 0xDF), code page 932 only |
| [`_ismbbkprint`, `_ismbbkprint_l`](./reference/ismbbkprint-ismbbkprint-l.md) | Non-ASCII text or non-ASCII punctuation symbol. For example, in code page 932 only, `_ismbbkprint` tests for katakana alphanumeric or katakana punctuation (range: 0xA1 - 0xDF). |
| [`_ismbbkpunct`, `_ismbbkpunct_l`](./reference/ismbbkpunct-ismbbkpunct-l.md) | Non-ASCII punctuation. For example, in code page 932 only, `_ismbbkpunct` tests for katakana punctuation. |
| [`_ismbblead`, `_ismbblead_l`](./reference/ismbblead-ismbblead-l.md) | First byte of multibyte character. For example, in code page 932 only, valid ranges are 0x81 - 0x9F, 0xE0 - 0xFC. |
| [`_ismbbprint`, `_ismbbprint_l`](./reference/ismbbprint-ismbbprint-l.md) | `isprint || _ismbbkprint`. `ismbbprint` includes the space character (0x20) |
| [`_ismbbpunct`, `_ismbbpunct_l`](./reference/ismbbpunct-ismbbpunct-l.md) | `ispunct || _ismbbkpunct` |
| [`_ismbbtrail`, `_ismbbtrail_l`](./reference/ismbbtrail-ismbbtrail-l.md) | Second byte of multibyte character. For example, in code page 932 only, valid ranges are 0x40 - 0x7E, 0x80 - 0xEC. |
| [`_ismbslead`, `_ismbslead_l`](./reference/ismbslead-ismbstrail-ismbslead-l-ismbstrail-l.md) | Lead byte (in string context) |
| [`ismbstrail`, `_ismbstrail_l`](./reference/ismbslead-ismbstrail-ismbslead-l-ismbstrail-l.md) | Trail byte (in string context) |
| [`_mbbtype`, `_mbbtype_l`](./reference/mbbtype-mbbtype-l.md) | Return byte type based on previous byte |
| [`_mbsbtype`, `_mbsbtype_l`](./reference/mbsbtype-mbsbtype-l.md) | Return type of byte within string |
| [`mbsinit`](./reference/mbsinit.md) | Tracks the state of a multibyte character conversion. |

The `MB_LEN_MAX` macro, defined in `<limits.h>`, expands to the maximum length in bytes that any multibyte character can have. `MB_CUR_MAX`, defined in `<stdlib.h>`, expands to the maximum length in bytes of any multibyte character in the 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)
4 changes: 2 additions & 2 deletions docs/c-runtime-library/c-run-time-library-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ The Microsoft runtime library provides routines for programming the Microsoft Wi

Sample programs are included in the individual reference articles for most routines in the library.

## In This Section
## In this section

[Universal C runtime routines by category](run-time-routines-by-category.md)\
Provides links to the runtime library by category.
Expand Down Expand Up @@ -40,7 +40,7 @@ Describes how to use the `setlocale` function to set the language and Country/Re
[C runtime (CRT) and C++ Standard Library (STL) `.lib` files](crt-library-features.md)\
List of `.lib` files that make up the C runtime libraries and their associated compiler options and preprocessor directives.

## Related Sections
## Related sections

[Debug routines](debug-routines.md)\
Provides links to the debug versions of the runtime library routines.
Expand Down
Loading