You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/c-runtime-library/backward-compatibility.md
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -6,16 +6,16 @@ ms.topic: "conceptual"
6
6
helpviewer_keywords: ["CRT, compatibility", "backward compatibility, C run-time libraries", "compatibility, C run-time libraries", "backward compatibility"]
7
7
ms.assetid: cc3175cf-97fd-492f-b329-5791aea63090
8
8
---
9
-
# Backward Compatibility
9
+
# Backward compatibility
10
10
11
11
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:
12
12
13
13
-`/Zl` (omit default library name from object file) and `/Ze` (the default: use Microsoft extensions)
14
14
15
15
-`/link` (linker-control), `/NOD` (no default-library search), and `/Ze`
16
16
17
-
For more information about compiler command-line options, see [Compiler Reference](../build/reference/compiler-options.md).
17
+
For more information about compiler command-line options, see [Compiler options](../build/reference/compiler-options.md).
Copy file name to clipboardExpand all lines: docs/c-runtime-library/buffer-manipulation.md
+9-9Lines changed: 9 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -13,17 +13,17 @@ Use these routines to work with areas of memory on a byte-by-byte basis.
13
13
14
14
|Routine|Use|
15
15
|-------------|---------|
16
-
|[_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|
17
-
|[memchr, wmemchr](../c-runtime-library/reference/memchr-wmemchr.md)|Return pointer to first occurrence, within specified number of characters, of given character in buffer|
18
-
|[memcmp, wmemcmp](../c-runtime-library/reference/memcmp-wmemcmp.md)|Compare specified number of characters from two buffers|
19
-
|[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|
20
-
|[_memicmp, _memicmp_l](../c-runtime-library/reference/memicmp-memicmp-l.md)|Compare specified number of characters from two buffers without regard to case|
21
-
|[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|
22
-
|[memset, wmemset](../c-runtime-library/reference/memset-wmemset.md)|Use given character to initialize specified number of bytes in the buffer|
23
-
|[_swab](../c-runtime-library/reference/swab.md)|Swap bytes of data and store them at specified location|
16
+
|[`_memccpy`](./reference/memccpy.md)|Copy characters from one buffer to another until given character or given number of characters has been copied|
17
+
|[`memchr`, `wmemchr`](./reference/memchr-wmemchr.md)|Return pointer to first occurrence, within specified number of characters, of given character in buffer|
18
+
|[`memcmp`, `wmemcmp`](./reference/memcmp-wmemcmp.md)|Compare specified number of characters from two buffers|
19
+
|[`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|
20
+
|[`_memicmp`, `_memicmp_l`](./reference/memicmp-memicmp-l.md)|Compare specified number of characters from two buffers without regard to case|
21
+
|[`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|
22
+
|[`memset`, `wmemset`](./reference/memset-wmemset.md)|Use given character to initialize specified number of bytes in the buffer|
23
+
|[`_swab`](./reference/swab.md)|Swap bytes of data and store them at specified location|
24
24
25
25
When the source and target areas overlap, only **memmove** is guaranteed to copy the full source properly.
26
26
27
27
## See also
28
28
29
-
[Universal C runtime routines by category](../c-runtime-library/run-time-routines-by-category.md)
29
+
[Universal C runtime routines by category](./run-time-routines-by-category.md)
A byte stream treats a file as a sequence of bytes. Within the program, the stream is the identical sequence of bytes.
13
13
14
-
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.
14
+
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.
15
15
16
-
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).
16
+
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).
17
17
18
18
## See also
19
19
20
-
[Files and Streams](../c-runtime-library/files-and-streams.md)<br/>
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.
11
+
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.
12
12
13
13
> [!NOTE]
14
14
> 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 `<ctype.h>`.
19
19
20
20
| Routine | Byte Test Condition |
21
21
|--|--|
22
-
|[`isleadbyte`, `_isleadbyte_l`](../c-runtime-library/reference/isleadbyte-isleadbyte-l.md)| Lead byte; test result depends on `LC_CTYPE` category setting of current locale |
|[`_ismbbgraph`, `_ismbbgraph_l`](../c-runtime-library/reference/ismbbgraph-ismbbgraph-l.md)| Same as `_ismbbprint`, but `_ismbbgraph` doesn't include the space character (0x20) |
26
-
|[`_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 |
|[`_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). |
29
-
|[`_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. |
30
-
|[`_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. |
31
-
|[`_ismbbprint`, `_ismbbprint_l`](../c-runtime-library/reference/ismbbprint-ismbbprint-l.md)| `isprint ||_ismbbkprint`. `ismbbprint` includes the space character (0x20) |
|[`_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. |
34
-
|[`_ismbslead`, `_ismbslead_l`](../c-runtime-library/reference/ismbslead-ismbstrail-ismbslead-l-ismbstrail-l.md)| Lead byte (in string context) |
35
-
|[`ismbstrail`, `_ismbstrail_l`](../c-runtime-library/reference/ismbslead-ismbstrail-ismbslead-l-ismbstrail-l.md)| Trail byte (in string context) |
36
-
|[`_mbbtype`, `_mbbtype_l`](../c-runtime-library/reference/mbbtype-mbbtype-l.md)| Return byte type based on previous byte |
37
-
|[`_mbsbtype`, `_mbsbtype_l`](../c-runtime-library/reference/mbsbtype-mbsbtype-l.md)| Return type of byte within string |
38
-
|[`mbsinit`](../c-runtime-library/reference/mbsinit.md)| Tracks the state of a multibyte character conversion. |
22
+
|[`isleadbyte`, `_isleadbyte_l`](./reference/isleadbyte-isleadbyte-l.md)| Lead byte; test result depends on `LC_CTYPE` category setting of current locale |
|[`_ismbbgraph`, `_ismbbgraph_l`](./reference/ismbbgraph-ismbbgraph-l.md)| Same as `_ismbbprint`, but `_ismbbgraph` doesn't include the space character (0x20) |
26
+
|[`_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 |
|[`_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). |
29
+
|[`_ismbbkpunct`, `_ismbbkpunct_l`](./reference/ismbbkpunct-ismbbkpunct-l.md)| Non-ASCII punctuation. For example, in code page 932 only, `_ismbbkpunct` tests for katakana punctuation. |
30
+
|[`_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. |
31
+
|[`_ismbbprint`, `_ismbbprint_l`](./reference/ismbbprint-ismbbprint-l.md)| `isprint ||_ismbbkprint`. `ismbbprint` includes the space character (0x20) |
|[`_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. |
34
+
|[`_ismbslead`, `_ismbslead_l`](./reference/ismbslead-ismbstrail-ismbslead-l-ismbstrail-l.md)| Lead byte (in string context) |
35
+
|[`ismbstrail`, `_ismbstrail_l`](./reference/ismbslead-ismbstrail-ismbslead-l-ismbstrail-l.md)| Trail byte (in string context) |
36
+
|[`_mbbtype`, `_mbbtype_l`](./reference/mbbtype-mbbtype-l.md)| Return byte type based on previous byte |
37
+
|[`_mbsbtype`, `_mbsbtype_l`](./reference/mbsbtype-mbsbtype-l.md)| Return type of byte within string |
38
+
|[`mbsinit`](./reference/mbsinit.md)| Tracks the state of a multibyte character conversion. |
39
39
40
40
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.
41
41
42
42
## See also
43
43
44
-
[Universal C runtime routines by category](../c-runtime-library/run-time-routines-by-category.md)
44
+
[Universal C runtime routines by category](./run-time-routines-by-category.md)
0 commit comments