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 bb77e184b1e..e6957f88f74 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 @@ -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) 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 eb18a8e6b5c..95628a223a2 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** @@ -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 13094b903d7..08d4858331c 100644 --- a/docs/c-runtime-library/abnormal-termination.md +++ b/docs/c-runtime-library/abnormal-termination.md @@ -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 diff --git a/docs/c-runtime-library/acmdln-tcmdln-wcmdln.md b/docs/c-runtime-library/acmdln-tcmdln-wcmdln.md index b3439f2065a..43f9ba680ab 100644 --- a/docs/c-runtime-library/acmdln-tcmdln-wcmdln.md +++ b/docs/c-runtime-library/acmdln-tcmdln-wcmdln.md @@ -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) diff --git a/docs/c-runtime-library/ansi-c-compliance.md b/docs/c-runtime-library/ansi-c-compliance.md index 947f0a6054b..a097cad3fe7 100644 --- a/docs/c-runtime-library/ansi-c-compliance.md +++ b/docs/c-runtime-library/ansi-c-compliance.md @@ -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) diff --git a/docs/c-runtime-library/argc-argv-wargv.md b/docs/c-runtime-library/argc-argv-wargv.md index ebc63c4e8f7..2ef7e26e4cf 100644 --- a/docs/c-runtime-library/argc-argv-wargv.md +++ b/docs/c-runtime-library/argc-argv-wargv.md @@ -41,10 +41,10 @@ For portable code, we recommend you use the arguments passed to `main` to get th |---------------------|---------------------| |`__argc`, `__argv`, `__wargv`|\, \ (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) diff --git a/docs/c-runtime-library/argument-access.md b/docs/c-runtime-library/argument-access.md index 0f31799ba6f..2a6a3a1e19a 100644 --- a/docs/c-runtime-library/argument-access.md +++ b/docs/c-runtime-library/argument-access.md @@ -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) diff --git a/docs/c-runtime-library/backward-compatibility.md b/docs/c-runtime-library/backward-compatibility.md index 346253bc7bf..16e0a796c7a 100644 --- a/docs/c-runtime-library/backward-compatibility.md +++ b/docs/c-runtime-library/backward-compatibility.md @@ -6,7 +6,7 @@ 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: @@ -14,8 +14,8 @@ For compatibility between product versions, the library OLDNAMES.LIB maps old na - `/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) diff --git a/docs/c-runtime-library/buffer-manipulation.md b/docs/c-runtime-library/buffer-manipulation.md index fb2d1941a0d..61d3589c832 100644 --- a/docs/c-runtime-library/buffer-manipulation.md +++ b/docs/c-runtime-library/buffer-manipulation.md @@ -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) diff --git a/docs/c-runtime-library/bufsiz.md b/docs/c-runtime-library/bufsiz.md index d42cf2cf325..3ecb4e5d87c 100644 --- a/docs/c-runtime-library/bufsiz.md +++ b/docs/c-runtime-library/bufsiz.md @@ -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)
-[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 16fcc7a605a..6e59ac7be8c 100644 --- a/docs/c-runtime-library/byte-and-wide-streams.md +++ b/docs/c-runtime-library/byte-and-wide-streams.md @@ -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)
-[`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 363e06bc7b6..46fd6bbbac1 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 ``. | 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 ``, expands to the maximum length in bytes that any multibyte character can have. `MB_CUR_MAX`, defined in ``, 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) diff --git a/docs/c-runtime-library/c-run-time-library-reference.md b/docs/c-runtime-library/c-run-time-library-reference.md index a5c5a3457c2..192b1df77e6 100644 --- a/docs/c-runtime-library/c-run-time-library-reference.md +++ b/docs/c-runtime-library/c-run-time-library-reference.md @@ -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. @@ -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. diff --git a/docs/c-runtime-library/cgets-cgetws.md b/docs/c-runtime-library/cgets-cgetws.md index ae2a349fe00..b9abffd4f37 100644 --- a/docs/c-runtime-library/cgets-cgetws.md +++ b/docs/c-runtime-library/cgets-cgetws.md @@ -12,10 +12,10 @@ ms.assetid: 4d5e134a-58c3-4f62-befd-5d235b0212f4 --- # _cgets, _cgetws -Gets a character string from the console. More secure versions of these functions are available; see [_cgets_s, _cgetws_s](../c-runtime-library/reference/cgets-s-cgetws-s.md). +Gets a character string from the console. More secure versions of these functions are available; see [`_cgets_s`, `_cgetws_s`](./reference/cgets-s-cgetws-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, _cgets_s and _cgetws_s, are still available. For information on these alternative functions, see [_cgets_s, _cgetws_s](../c-runtime-library/reference/cgets-s-cgetws-s.md). +> These functions are obsolete. Beginning in Visual Studio 2015, they are not available in the CRT. The secure versions of these functions, _cgets_s and _cgetws_s, are still available. For information on these alternative functions, see [`_cgets_s`, `_cgetws_s`](./reference/cgets-s-cgetws-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). @@ -41,12 +41,12 @@ wchar_t *_cgetws( #### Parameters -*buffer*
+*`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 @@ -54,11 +54,11 @@ These functions read a string of characters from the console and store the strin 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 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| |---------------------|--------------------------------------|--------------------|-----------------------| @@ -71,7 +71,7 @@ By default, this function's global state is scoped to the application. To change |`_cgets`|\| |`_cgetws`|\ or \| -For more compatibility information, see [Compatibility](../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](./compatibility.md). ## Example @@ -119,5 +119,5 @@ Text = A line of input. ## See also -[Console and Port I/O](../c-runtime-library/console-and-port-i-o.md)
-[`_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 1c413749357..8a681f4c413 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 both ASCII and non-ASCII characters.) -The test conditions are 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. +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 +## 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| +|[`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 510cc211eae..ed55f52c53d 100644 --- a/docs/c-runtime-library/ciatan.md +++ b/docs/c-runtime-library/ciatan.md @@ -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 4ea285d90ee..f56c59a321b 100644 --- a/docs/c-runtime-library/ciatan2.md +++ b/docs/c-runtime-library/ciatan2.md @@ -12,7 +12,7 @@ ms.assetid: 31f8cc78-b79f-4576-b73b-8add18e08680 --- # _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 @@ -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 b084f5b4151..20b69fef117 100644 --- a/docs/c-runtime-library/cicos.md +++ b/docs/c-runtime-library/cicos.md @@ -22,7 +22,7 @@ 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. @@ -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 745aadd8143..2099c9be580 100644 --- a/docs/c-runtime-library/ciexp.md +++ b/docs/c-runtime-library/ciexp.md @@ -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 957823e3308..b5c6d2630a8 100644 --- a/docs/c-runtime-library/cifmod.md +++ b/docs/c-runtime-library/cifmod.md @@ -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 2733244cf8d..d54ffcc5263 100644 --- a/docs/c-runtime-library/cilog.md +++ b/docs/c-runtime-library/cilog.md @@ -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 3d2ee6c2102..72f74f93a90 100644 --- a/docs/c-runtime-library/cilog10.md +++ b/docs/c-runtime-library/cilog10.md @@ -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 2a920100317..18bc18ccc53 100644 --- a/docs/c-runtime-library/cipow.md +++ b/docs/c-runtime-library/cipow.md @@ -12,7 +12,7 @@ ms.assetid: 477aaf0c-ac58-4252-89dd-9f3e35d47536 --- # _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 @@ -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 75bad56f0dd..ca4f3308170 100644 --- a/docs/c-runtime-library/cisin.md +++ b/docs/c-runtime-library/cisin.md @@ -22,7 +22,7 @@ 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. @@ -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 83bec81cdff..281252725b7 100644 --- a/docs/c-runtime-library/cisqrt.md +++ b/docs/c-runtime-library/cisqrt.md @@ -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 2573834ee7b..2e32dfd40d3 100644 --- a/docs/c-runtime-library/citan.md +++ b/docs/c-runtime-library/citan.md @@ -22,7 +22,7 @@ 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. @@ -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 4c16e39eb3d..eafbf8a342b 100644 --- a/docs/c-runtime-library/clocks-per-sec-clk-tck.md +++ b/docs/c-runtime-library/clocks-per-sec-clk-tck.md @@ -20,5 +20,5 @@ The time in seconds is the value returned by the `clock` function, divided by `C ## See also -[clock](../c-runtime-library/reference/clock.md)
-[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 4d738ad9378..6105f2e6807 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. @@ -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 several 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. ## 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 5ab2a097bcc..520ffb9f5d3 100644 --- a/docs/c-runtime-library/commit-to-disk-constants.md +++ b/docs/c-runtime-library/commit-to-disk-constants.md @@ -6,7 +6,7 @@ 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** @@ -24,7 +24,7 @@ The commit-to-disk modes are as follows: - **c** - Writes the unwritten contents of the specified buffer to disk. This commit-to-disk functionality only occurs at explicit calls to either the [fflush](../c-runtime-library/reference/fflush.md) or the [_flushall](../c-runtime-library/reference/flushall.md) function. This mode is useful when dealing with sensitive data. For example, if your program terminates after a call to `fflush` or `_flushall`, you can be sure that your data reached the operating system's buffers. However, unless a file is opened with the **c** option, the data might never make it to disk if the operating system also terminates. + Writes the unwritten contents of the specified buffer to disk. This commit-to-disk functionality only occurs at explicit calls to either the [`fflush`](./reference/fflush.md) or the [`_flushall`](./reference/flushall.md) function. This mode is useful when dealing with sensitive data. For example, if your program terminates after a call to `fflush` or `_flushall`, you can be sure that your data reached the operating system's buffers. However, unless a file is opened with the **c** option, the data might never make it to disk if the operating system also terminates. - **n** @@ -33,9 +33,9 @@ The commit-to-disk modes are as follows: > [!NOTE] > The **c** and **n** options are not part of the ANSI standard for `fopen`, but are Microsoft extensions and should not be used where ANSI portability is desired. -## Using the Commit-to-Disk Feature with Existing Code +## Using the commit-to-disk feature with existing code -By default, calls to the [fflush](../c-runtime-library/reference/fflush.md) or [_flushall](../c-runtime-library/reference/flushall.md) library functions write data to buffers maintained by the operating system. The operating system determines the optimal time to actually write the data to disk. The commit-to-disk feature of the run-time library lets you ensure that critical data is written directly to disk rather than to the operating system's buffers. You can give this capability to an existing program without rewriting it by linking its object files with COMMODE.OBJ. +By default, calls to the [`fflush`](./reference/fflush.md) or [`_flushall`](./reference/flushall.md) library functions write data to buffers maintained by the operating system. The operating system determines the optimal time to actually write the data to disk. The commit-to-disk feature of the run-time library lets you ensure that critical data is written directly to disk rather than to the operating system's buffers. You can give this capability to an existing program without rewriting it by linking its object files with COMMODE.OBJ. In the resulting executable file, calls to `fflush` write the contents of the buffer directly to disk, and calls to `_flushall` write the contents of all buffers to disk. These two functions are the only ones affected by COMMODE.OBJ. @@ -43,7 +43,7 @@ In the resulting executable file, calls to `fflush` write the contents of the bu ## See also -[Stream I/O](../c-runtime-library/stream-i-o.md)
-[_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 8e0f21a211a..0bd8cc1b7e0 100644 --- a/docs/c-runtime-library/compatibility.md +++ b/docs/c-runtime-library/compatibility.md @@ -22,17 +22,17 @@ Functions specific to the Microsoft implementation of Visual C++ are found in th 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.| +|[UWP apps, the Windows Runtime, and the C runtime](./windows-store-apps-the-windows-runtime-and-the-c-run-time.md)|Describes when UCRT routines aren't compatible with Universal Windows apps or Microsoft Store apps.| +|[ANSI C conformance](./ansi-c-compliance.md)|Describes standard-conforming names in the UCRT.| +|[UNIX](./unix.md)|Provides guidelines for porting programs to UNIX.| +|[Windows platforms (CRT)](./windows-platforms-crt.md)|Lists the operating systems that are the CRT supports.| +|[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 ed2bd56c8b9..bd1ca4df1c9 100644 --- a/docs/c-runtime-library/complex-math-support.md +++ b/docs/c-runtime-library/complex-math-support.md @@ -23,7 +23,7 @@ The Microsoft implementation of the `complex.h` header defines these types as eq |**`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 @@ -33,51 +33,51 @@ The `math.h` header defines a separate type, **`struct _complex`**, used for the |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| +|[`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| +|[`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| +|[`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| -|[`csqrt`, `csqrtf`, `csqrtl`](../c-runtime-library/reference/csqrt-csqrtf-csqrtl.md)|Compute the complex square root of a complex number| +|[`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| +|[`_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 @@ -85,10 +85,10 @@ Because complex numbers aren't a native type in the Microsoft compiler, the stan |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| +|[`_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 5efcc295b2e..5dd04351feb 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. -## 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 a byte from the 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 a byte to the 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| +|[`_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 1a99b8b9215..b957278f0c4 100644 --- a/docs/c-runtime-library/constant-and-global-variable-mappings.md +++ b/docs/c-runtime-library/constant-and-global-variable-mappings.md @@ -6,11 +6,11 @@ f1_keywords: ["_tenviron", "_TEOF", "_tfinddata_t"] helpviewer_keywords: ["tfinddatat function", "tenviron function", "TEOF type", "_TEOF type", "generic-text mappings", "_tenviron function", "_tfinddata_t function"] 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| |----------------------------------|--------------------------------------------|--------------------|-----------------------| @@ -20,8 +20,8 @@ These generic-text constant, global variable, and standard-type mappings are def ## 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 016e1da6334..dd618b6181d 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](/visualstudio/debugger/crt-debugging-techniques). |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| +|[`_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` 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 478cd9ad7f2..4748de8e7d8 100644 --- a/docs/c-runtime-library/controlling-streams.md +++ b/docs/c-runtime-library/controlling-streams.md @@ -7,11 +7,11 @@ 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). 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). 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,7 +21,7 @@ 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, and any shift state for the sequence of bytes in the file). @@ -31,4 +31,4 @@ Don't alter any value stored in a `FILE` object or in a file buffer that you spe ## 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 09b7f716934..d2bd0dbf29e 100644 --- a/docs/c-runtime-library/country-region-strings.md +++ b/docs/c-runtime-library/country-region-strings.md @@ -42,7 +42,7 @@ The Microsoft C run-time library implementation also supports the following coun ## 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-disable-perfcrit-locks.md b/docs/c-runtime-library/crt-disable-perfcrit-locks.md index c6d776a32c1..4e6ffae9d70 100644 --- a/docs/c-runtime-library/crt-disable-perfcrit-locks.md +++ b/docs/c-runtime-library/crt-disable-perfcrit-locks.md @@ -18,8 +18,8 @@ Disables performance-critical locking in I/O operations. ## Remarks -Defining this symbol can improve performance in single-threaded I/O-bound programs by forcing all I/O operations to assume a single-threaded I/O model. For more information, see [Multithreaded Libraries Performance](../c-runtime-library/multithreaded-libraries-performance.md). +Defining this symbol can improve performance in single-threaded I/O-bound programs by forcing all I/O operations to assume a single-threaded I/O model. For more information, see [Multithreaded libraries performance](./multithreaded-libraries-performance.md). ## See also -[Global Constants](../c-runtime-library/global-constants.md) +[Global constants](./global-constants.md) diff --git a/docs/c-runtime-library/crt-initialization.md b/docs/c-runtime-library/crt-initialization.md index d426c7aee0c..13d47562f4d 100644 --- a/docs/c-runtime-library/crt-initialization.md +++ b/docs/c-runtime-library/crt-initialization.md @@ -14,7 +14,7 @@ By default, the linker includes the CRT library, which provides its own startup It's possible, though not recommended, to take advantage of Microsoft-specific linker behavior to insert your own global initializers in a specific order. This code isn't portable, and comes with some important caveats. -## Initializing a Global Object +## Initializing a global object Consider the following code: @@ -112,4 +112,4 @@ The names `.CRT$XCT` and `.CRT$XCV` aren't used by either the compiler or the CR ## 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/crt-library-features.md b/docs/c-runtime-library/crt-library-features.md index a0770dc0b94..5f9494f648f 100644 --- a/docs/c-runtime-library/crt-library-features.md +++ b/docs/c-runtime-library/crt-library-features.md @@ -12,7 +12,7 @@ This article lists the Microsoft C runtime library `.lib` files that you can lin See [Redistributing Visual C++ files](../windows/redistributing-visual-cpp-files.md) if you're looking for information about deploying the C runtime files necessary to support your application. -See [C runtime library reference](../c-runtime-library/c-run-time-library-reference.md) if you're looking for API reference for the C runtime library. +See [C runtime library reference](./c-run-time-library-reference.md) if you're looking for API reference for the C runtime library. >[!NOTE] > Microsoft's implementation of the C++ Standard Library is often referred to as the *STL* or *Standard Template Library*. Although *C++ Standard Library* is the official name of the library as defined in ISO 14882, due to the popular use of "STL" and "Standard Template Library" in search engines, we occasionally use those names to make it easier to find our documentation. @@ -66,15 +66,15 @@ This table lists the libraries that implement CRT initialization and termination If you link your program from the command line without a compiler option that specifies a C runtime library, the linker will use the statically linked CRT libraries: *`libcmt.lib`*, *`libvcruntime.lib`*, and *`libucrt.lib`*. -Using the statically linked CRT implies that any state information saved by the C runtime library will be local to that instance of the CRT. For example, if you use [`strtok`](../c-runtime-library/reference/strtok-strtok-l-wcstok-wcstok-l-mbstok-mbstok-l.md) when using a statically linked CRT, the position of the `strtok` parser is unrelated to the `strtok` state used in code in the same process (but in a different DLL or EXE) that is linked to another instance of the static CRT. In contrast, the dynamically linked CRT shares state for all code within a process that is dynamically linked to the CRT. This concern doesn't apply if you use the new more secure versions of these functions; for example, `strtok_s` doesn't have this problem. +Using the statically linked CRT implies that any state information saved by the C runtime library will be local to that instance of the CRT. For example, if you use [`strtok`](./reference/strtok-strtok-l-wcstok-wcstok-l-mbstok-mbstok-l.md) when using a statically linked CRT, the position of the `strtok` parser is unrelated to the `strtok` state used in code in the same process (but in a different DLL or EXE) that is linked to another instance of the static CRT. In contrast, the dynamically linked CRT shares state for all code within a process that is dynamically linked to the CRT. This concern doesn't apply if you use the new more secure versions of these functions; for example, `strtok_s` doesn't have this problem. -Because a DLL built by linking to a static CRT has its own CRT state, we don't recommend you link statically to the CRT in a DLL unless the consequences are understood and desired. For example, if you call [`_set_se_translator`](../c-runtime-library/reference/set-se-translator.md) in an executable that loads the DLL linked to its own static CRT, any hardware exceptions generated by the code in the DLL won't be caught by the translator, but hardware exceptions generated by code in the main executable will be caught. +Because a DLL built by linking to a static CRT has its own CRT state, we don't recommend you link statically to the CRT in a DLL unless the consequences are understood and desired. For example, if you call [`_set_se_translator`](./reference/set-se-translator.md) in an executable that loads the DLL linked to its own static CRT, any hardware exceptions generated by the code in the DLL won't be caught by the translator, but hardware exceptions generated by code in the main executable will be caught. If you're using the **`/clr`** compiler switch, your code will be linked with a static library, `msvcmrt.lib`. The static library provides a proxy between your managed code and the native CRT. You can't use the statically linked CRT ( **`/MT`** or **`/MTd`** options) with **`/clr`**. Use the dynamically linked libraries (**`/MD`** or **`/MDd`**) instead. The pure managed CRT libraries are deprecated in Visual Studio 2015 and unsupported in Visual Studio 2017. For more information on using the CRT with **`/clr`**, see [Mixed (Native and Managed) Assemblies](../dotnet/mixed-native-and-managed-assemblies.md). -To build a debug version of your application, the [`_DEBUG`](../c-runtime-library/debug.md) flag must be defined and the application must be linked with a debug version of one of these libraries. For more information about using the debug versions of the library files, see [CRT Debugging Techniques](/visualstudio/debugger/crt-debugging-techniques). +To build a debug version of your application, the [`_DEBUG`](./debug.md) flag must be defined and the application must be linked with a debug version of one of these libraries. For more information about using the debug versions of the library files, see [CRT debugging techniques](/visualstudio/debugger/crt-debugging-techniques). This version of the CRT isn't fully conformant with the C99 standard. In versions before Visual Studio 2019 version 16.8, the `` header isn't supported. In all versions, the `CX_LIMITED_RANGE` and `FP_CONTRACT` pragma macros aren't supported. Certain elements such as the meaning of parameter specifiers in standard IO functions use legacy interpretations by default. You can use **`/Zc`** compiler conformance options and specify linker options to control some aspects of library conformance. @@ -103,9 +103,9 @@ You can avoid many of these issues by using Application Binary Interface (ABI) t It's also possible to avoid some of these issues if all of the images in your process use the same dynamically loaded version of the CRT. To ensure that all components use the same DLL version of the CRT, build them by using the **`/MD`** option, and use the same compiler toolset and property settings. -Be careful if your program passes certain CRT resources across DLL boundaries. Resources such as file handles, locales, and environment variables can cause problems, even when using the same version of the CRT. For more information on the issues involved and how to resolve them, see [Potential Errors Passing CRT Objects Across DLL Boundaries](../c-runtime-library/potential-errors-passing-crt-objects-across-dll-boundaries.md). +Be careful if your program passes certain CRT resources across DLL boundaries. Resources such as file handles, locales, and environment variables can cause problems, even when using the same version of the CRT. For more information on the issues involved and how to resolve them, see [Potential errors passing CRT objects across DLL boundaries](./potential-errors-passing-crt-objects-across-dll-boundaries.md). ## See also -[C runtime library reference](../c-runtime-library/c-run-time-library-reference.md)\ +[C runtime library reference](./c-run-time-library-reference.md)\ [Redistributing Visual C++ Files](../windows/redistributing-visual-cpp-files.md) diff --git a/docs/c-runtime-library/crtdbg-map-alloc.md b/docs/c-runtime-library/crtdbg-map-alloc.md index a44bc99f70c..798953096ce 100644 --- a/docs/c-runtime-library/crtdbg-map-alloc.md +++ b/docs/c-runtime-library/crtdbg-map-alloc.md @@ -8,10 +8,10 @@ ms.assetid: 435242b8-caea-4063-b765-4a608200312b --- # _CRTDBG_MAP_ALLOC -When the **_CRTDBG_MAP_ALLOC** flag is defined in the debug version of an application, the base versions of the heap functions are directly mapped to their debug versions. The flag is used in Crtdbg.h to do the mapping. This flag is only available when the [_DEBUG](../c-runtime-library/debug.md) flag has been defined in the application. +When the **_CRTDBG_MAP_ALLOC** flag is defined in the debug version of an application, the base versions of the heap functions are directly mapped to their debug versions. The flag is used in Crtdbg.h to do the mapping. This flag is only available when the [`_DEBUG`](./debug.md) flag has been defined in the application. -For more information about using the debug version versus the base version of a heap function, see [Using the Debug Version Versus the Base Version](/visualstudio/debugger/debug-versions-of-heap-allocation-functions). +For more information about using the debug version versus the base version of a heap function, see [Using the debug version versus the base version](/visualstudio/debugger/debug-versions-of-heap-allocation-functions). ## See also -[Control Flags](../c-runtime-library/control-flags.md) +[Control flags](./control-flags.md) diff --git a/docs/c-runtime-library/crtdbgflag.md b/docs/c-runtime-library/crtdbgflag.md index d341a4d6bb3..3b170c271db 100644 --- a/docs/c-runtime-library/crtdbgflag.md +++ b/docs/c-runtime-library/crtdbgflag.md @@ -8,10 +8,10 @@ ms.assetid: 9e7adb47-8ab9-4e19-81d5-e2f237979973 --- # _crtDbgFlag -The **_crtDbgFlag** flag consists of five bit-fields that control how memory allocations on the debug version of the heap are tracked, verified, reported, and dumped. The bit fields of the flag are set using the [_CrtSetDbgFlag](../c-runtime-library/reference/crtsetdbgflag.md) function. This flag and its bit fields are declared in Crtdbg.h. This flag is only available when the [_DEBUG](../c-runtime-library/debug.md) flag has been defined in the application. +The **_crtDbgFlag** flag consists of five bit-fields that control how memory allocations on the debug version of the heap are tracked, verified, reported, and dumped. The bit fields of the flag are set using the [`_CrtSetDbgFlag`](./reference/crtsetdbgflag.md) function. This flag and its bit fields are declared in Crtdbg.h. This flag is only available when the [`_DEBUG`](./debug.md) flag has been defined in the application. -For more information about using this flag along with other debug functions, see [Heap State Reporting Functions](/visualstudio/debugger/crt-debug-heap-details). +For more information about using this flag along with other debug functions, see [Heap state reporting functions](/visualstudio/debugger/crt-debug-heap-details). ## See also -[Control Flags](../c-runtime-library/control-flags.md) +[Control flags](./control-flags.md) diff --git a/docs/c-runtime-library/crtlcmapstringw.md b/docs/c-runtime-library/crtlcmapstringw.md index ae9771253eb..1496438545a 100644 --- a/docs/c-runtime-library/crtlcmapstringw.md +++ b/docs/c-runtime-library/crtlcmapstringw.md @@ -28,27 +28,27 @@ int __crtLCMapStringW( #### Parameters -*Locale*
-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 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. diff --git a/docs/c-runtime-library/cxxframehandler.md b/docs/c-runtime-library/cxxframehandler.md index 8f6e9df406c..c44953cd2d8 100644 --- a/docs/c-runtime-library/cxxframehandler.md +++ b/docs/c-runtime-library/cxxframehandler.md @@ -27,19 +27,19 @@ EXCEPTION_DISPOSITION __CxxFrameHandler( #### Parameters -*pExcept*
+*`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). diff --git a/docs/c-runtime-library/data-alignment.md b/docs/c-runtime-library/data-alignment.md index 7586dceb7c8..6235dcc300e 100644 --- a/docs/c-runtime-library/data-alignment.md +++ b/docs/c-runtime-library/data-alignment.md @@ -6,31 +6,31 @@ f1_keywords: ["data.alignment"] helpviewer_keywords: ["data alignment [C++]"] ms.assetid: 35ac3d2d-a4b3-421b-954f-b7372b1f18e1 --- -# Data Alignment +# Data alignment The following C run-time functions support data alignment. -## Data-Alignment Routines +## Data-alignment routines |Routine|Use| |-------------|---------| -|[_aligned_free](../c-runtime-library/reference/aligned-free.md)|Frees a block of memory that was allocated with [_aligned_malloc](../c-runtime-library/reference/aligned-malloc.md)or [_aligned_offset_malloc](../c-runtime-library/reference/aligned-offset-malloc.md).| -|[_aligned_free_dbg](../c-runtime-library/reference/aligned-free-dbg.md)|Frees a block of memory that was allocated with [_aligned_malloc](../c-runtime-library/reference/aligned-malloc.md) or [_aligned_offset_malloc](../c-runtime-library/reference/aligned-offset-malloc.md) (debug only).| -|[_aligned_malloc](../c-runtime-library/reference/aligned-malloc.md)|Allocates memory on a specified alignment boundary.| -|[_aligned_malloc_dbg](../c-runtime-library/reference/aligned-malloc-dbg.md)|Allocates memory on a specified alignment boundary with extra space for a debugging header and overwrite buffers (debug version only).| -|[_aligned_msize](../c-runtime-library/reference/aligned-msize.md)|Returns the size of a memory block allocated in the heap.| -|[_aligned_msize_dbg](../c-runtime-library/reference/aligned-msize-dbg.md)|Returns the size of a memory block allocated in the heap (debug version only).| -|[_aligned_offset_malloc](../c-runtime-library/reference/aligned-offset-malloc.md)|Allocates memory on a specified alignment boundary.| -|[_aligned_offset_malloc_dbg](../c-runtime-library/reference/aligned-offset-malloc-dbg.md)|Allocates memory on a specified alignment boundary (debug version only).| -|[_aligned_offset_realloc](../c-runtime-library/reference/aligned-offset-realloc.md)|Changes the size of a memory block that was allocated with [_aligned_malloc](../c-runtime-library/reference/aligned-malloc.md) or [_aligned_offset_malloc](../c-runtime-library/reference/aligned-offset-malloc.md).| -|[_aligned_offset_realloc_dbg](../c-runtime-library/reference/aligned-offset-realloc-dbg.md)|Changes the size of a memory block that was allocated with [_aligned_malloc](../c-runtime-library/reference/aligned-malloc.md) or [_aligned_offset_malloc](../c-runtime-library/reference/aligned-offset-malloc.md) (debug version only).| -|[_aligned_offset_recalloc](../c-runtime-library/reference/aligned-offset-recalloc.md)|Changes the size of a memory block that was allocated with [_aligned_malloc](../c-runtime-library/reference/aligned-malloc.md) or [_aligned_offset_malloc](../c-runtime-library/reference/aligned-offset-malloc.md) and initializes the memory to 0.| -|[_aligned_offset_recalloc_dbg](../c-runtime-library/reference/aligned-offset-recalloc-dbg.md)|Changes the size of a memory block that was allocated with [_aligned_malloc](../c-runtime-library/reference/aligned-malloc.md) or [_aligned_offset_malloc](../c-runtime-library/reference/aligned-offset-malloc.md) and initializes the memory to 0 (debug version only).| -|[_aligned_realloc](../c-runtime-library/reference/aligned-realloc.md)|Changes the size of a memory block that was allocated with [_aligned_malloc](../c-runtime-library/reference/aligned-malloc.md) or [_aligned_offset_malloc](../c-runtime-library/reference/aligned-offset-malloc.md).| -|[_aligned_realloc_dbg](../c-runtime-library/reference/aligned-realloc-dbg.md)|Changes the size of a memory block that was allocated with [_aligned_malloc](../c-runtime-library/reference/aligned-malloc.md) or [_aligned_offset_malloc](../c-runtime-library/reference/aligned-offset-malloc.md) (debug version only).| -|[_aligned_recalloc](../c-runtime-library/reference/aligned-recalloc.md)|Changes the size of a memory block that was allocated with [_aligned_malloc](../c-runtime-library/reference/aligned-malloc.md) or [_aligned_offset_malloc](../c-runtime-library/reference/aligned-offset-malloc.md) and initializes the memory to 0.| -|[_aligned_recalloc_dbg](../c-runtime-library/reference/aligned-recalloc-dbg.md)|Changes the size of a memory block that was allocated with [_aligned_malloc](../c-runtime-library/reference/aligned-malloc.md) or [_aligned_offset_malloc](../c-runtime-library/reference/aligned-offset-malloc.md) and initializes the memory to 0 (debug version only).| +|[`_aligned_free`](./reference/aligned-free.md)|Frees a block of memory that was allocated with [`_aligned_malloc`](./reference/aligned-malloc.md)or [`_aligned_offset_malloc`](./reference/aligned-offset-malloc.md).| +|[`_aligned_free_dbg`](./reference/aligned-free-dbg.md)|Frees a block of memory that was allocated with [`_aligned_malloc`](./reference/aligned-malloc.md) or [`_aligned_offset_malloc`](./reference/aligned-offset-malloc.md) (debug only).| +|[`_aligned_malloc`](./reference/aligned-malloc.md)|Allocates memory on a specified alignment boundary.| +|[`_aligned_malloc_dbg`](./reference/aligned-malloc-dbg.md)|Allocates memory on a specified alignment boundary with extra space for a debugging header and overwrite buffers (debug version only).| +|[`_aligned_msize`](./reference/aligned-msize.md)|Returns the size of a memory block allocated in the heap.| +|[`_aligned_msize_dbg`](./reference/aligned-msize-dbg.md)|Returns the size of a memory block allocated in the heap (debug version only).| +|[`_aligned_offset_malloc`](./reference/aligned-offset-malloc.md)|Allocates memory on a specified alignment boundary.| +|[`_aligned_offset_malloc_dbg`](./reference/aligned-offset-malloc-dbg.md)|Allocates memory on a specified alignment boundary (debug version only).| +|[`_aligned_offset_realloc`](./reference/aligned-offset-realloc.md)|Changes the size of a memory block that was allocated with [`_aligned_malloc`](./reference/aligned-malloc.md) or [`_aligned_offset_malloc`](./reference/aligned-offset-malloc.md).| +|[`_aligned_offset_realloc_dbg`](./reference/aligned-offset-realloc-dbg.md)|Changes the size of a memory block that was allocated with [`_aligned_malloc`](./reference/aligned-malloc.md) or [`_aligned_offset_malloc`](./reference/aligned-offset-malloc.md) (debug version only).| +|[`_aligned_offset_recalloc`](./reference/aligned-offset-recalloc.md)|Changes the size of a memory block that was allocated with [`_aligned_malloc`](./reference/aligned-malloc.md) or [`_aligned_offset_malloc`](./reference/aligned-offset-malloc.md) and initializes the memory to 0.| +|[`_aligned_offset_recalloc_dbg`](./reference/aligned-offset-recalloc-dbg.md)|Changes the size of a memory block that was allocated with [`_aligned_malloc`](./reference/aligned-malloc.md) or [`_aligned_offset_malloc`](./reference/aligned-offset-malloc.md) and initializes the memory to 0 (debug version only).| +|[`_aligned_realloc`](./reference/aligned-realloc.md)|Changes the size of a memory block that was allocated with [`_aligned_malloc`](./reference/aligned-malloc.md) or [`_aligned_offset_malloc`](./reference/aligned-offset-malloc.md).| +|[`_aligned_realloc_dbg`](./reference/aligned-realloc-dbg.md)|Changes the size of a memory block that was allocated with [`_aligned_malloc`](./reference/aligned-malloc.md) or [`_aligned_offset_malloc`](./reference/aligned-offset-malloc.md) (debug version only).| +|[`_aligned_recalloc`](./reference/aligned-recalloc.md)|Changes the size of a memory block that was allocated with [`_aligned_malloc`](./reference/aligned-malloc.md) or [`_aligned_offset_malloc`](./reference/aligned-offset-malloc.md) and initializes the memory to 0.| +|[`_aligned_recalloc_dbg`](./reference/aligned-recalloc-dbg.md)|Changes the size of a memory block that was allocated with [`_aligned_malloc`](./reference/aligned-malloc.md) or [`_aligned_offset_malloc`](./reference/aligned-offset-malloc.md) and initializes the memory to 0 (debug version only).| ## 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-conversion.md b/docs/c-runtime-library/data-conversion.md index e7939ab2527..9f67a01e779 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`**| +|[`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 e69c292b9bb..4e7b75dfb6a 100644 --- a/docs/c-runtime-library/data-type-constants.md +++ b/docs/c-runtime-library/data-type-constants.md @@ -5,7 +5,7 @@ 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"] 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. @@ -111,4 +111,4 @@ The following constants give the range and other characteristics of the **`long ## See also -[Global Constants](../c-runtime-library/global-constants.md) +[Global constants](./global-constants.md) diff --git a/docs/c-runtime-library/data-type-mappings.md b/docs/c-runtime-library/data-type-mappings.md index aa0d1a52f0b..5aae9eed3d1 100644 --- a/docs/c-runtime-library/data-type-mappings.md +++ b/docs/c-runtime-library/data-type-mappings.md @@ -6,13 +6,13 @@ f1_keywords: ["_TXCHAR", "_TUCHAR", "_TINT", "_TSCHAR", "_TCHAR", "TCHAR::H", "T helpviewer_keywords: ["_TXCHAR type", "TINT type", "_TCHAR type", "TSCHAR type", "TEXT type", "TCHAR type", "TCHAR.H data types, mappings defined in", "generic-text data types", "_TINT type", "TUCHAR type", "TXCHAR type", "_TSCHAR type", "T type", "_TUCHAR type", "_TEXT type", "_T type"] ms.assetid: 4e573c05-8800-468b-ae5f-76ff7409835e --- -# Data Type Mappings +# Data type mappings These data-type mappings are defined in TCHAR.H and depend on whether the constant `_UNICODE` or `_MBCS` has been defined in your program. For related information, see [Using TCHAR.H Data Types with _MBCS Code](../text/using-tchar-h-data-types-with-mbcs-code.md). -### Generic-Text Data Type Mappings +### Generic-text data type mappings |Generic-text

data type name|SBCS (_UNICODE,

_MBCS not

defined)|_MBCS

defined|_UNICODE

defined| |--------------------------------------|----------------------------------------------------|------------------------|---------------------------| @@ -28,8 +28,8 @@ For related information, see [Using TCHAR.H Data Types with _MBCS Code](../text/ ## 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 2fec010706d..3c7d9119c24 100644 --- a/docs/c-runtime-library/daylight-dstbias-timezone-and-tzname.md +++ b/docs/c-runtime-library/daylight-dstbias-timezone-and-tzname.md @@ -12,10 +12,10 @@ ms.assetid: d06c7292-6b99-4aba-b284-16a96570c856 |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)| +|`_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're declared in Time.h as follows. @@ -30,7 +30,7 @@ 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 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](../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| |--------------|-----------| @@ -42,8 +42,8 @@ On a call to `_ftime`, `localtime`, or `_tzset`, the values of `_daylight`, `_ds ## 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 741bd8d2536..612b6cf6e84 100644 --- a/docs/c-runtime-library/debug-routines.md +++ b/docs/c-runtime-library/debug-routines.md @@ -20,45 +20,45 @@ 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](/visualstudio/debugger/crt-debugging-techniques). | 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 extra 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 extra 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. | +| [`_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 @@ -66,59 +66,59 @@ The debugger can be used to step through the source code for most of the C runti :::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::: @@ -130,10 +130,10 @@ Some C run-time functions and C++ operators behave differently when called from :::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.md b/docs/c-runtime-library/debug.md index 2841c3d3c84..1a3468c5605 100644 --- a/docs/c-runtime-library/debug.md +++ b/docs/c-runtime-library/debug.md @@ -9,8 +9,8 @@ ms.assetid: a9901568-4846-4731-a404-399d947e2e7a The compiler defines `_DEBUG` when you specify the /MTd or /MDd option. These options specify debug versions of the C run-time library. -For more information, see [CRT Debugging Techniques](/visualstudio/debugger/crt-debugging-techniques). +For more information, see [CRT debugging techniques](/visualstudio/debugger/crt-debugging-techniques). ## See also -[Control Flags](../c-runtime-library/control-flags.md) +[Control flags](./control-flags.md) diff --git a/docs/c-runtime-library/direction-flag.md b/docs/c-runtime-library/direction-flag.md index f6d01e0885a..3eabde54165 100644 --- a/docs/c-runtime-library/direction-flag.md +++ b/docs/c-runtime-library/direction-flag.md @@ -6,7 +6,7 @@ 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. @@ -16,4 +16,4 @@ The C Run-Time library functions, such as the string-manipulation and buffer-man ## 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 c9c32901a1b..2a9a09f2824 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| +|[`_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 6873c4293fb..c2d27304444 100644 --- a/docs/c-runtime-library/dllonexit.md +++ b/docs/c-runtime-library/dllonexit.md @@ -25,22 +25,22 @@ _onexit_t __dllonexit( _onexit_t func, #### 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. ## 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 aren't 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. @@ -54,4 +54,4 @@ The `_PVFV` type is defined as `typedef void (__cdecl *_PVFV)(void)`. ## 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 b42a10eef23..ab9070d13c1 100644 --- a/docs/c-runtime-library/environ-wenviron.md +++ b/docs/c-runtime-library/environ-wenviron.md @@ -8,7 +8,7 @@ ms.assetid: 7e639962-6536-47cd-8095-0cbe44a56e03 --- # _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). @@ -62,8 +62,8 @@ Thus, in the multibyte environment, the value of "`env_var_z`" after the first i ## 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 be9ff13c096..445dad2fb7f 100644 --- a/docs/c-runtime-library/environmental-constants.md +++ b/docs/c-runtime-library/environmental-constants.md @@ -5,7 +5,7 @@ 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 @@ -23,4 +23,4 @@ The `_MAX_ENV` constant defines the environmental length for strings. ## See also -[Global Constants](../c-runtime-library/global-constants.md) +[Global constants](./global-constants.md) diff --git a/docs/c-runtime-library/eof-weof.md b/docs/c-runtime-library/eof-weof.md index 2e3a8569e27..f109d4a2060 100644 --- a/docs/c-runtime-library/eof-weof.md +++ b/docs/c-runtime-library/eof-weof.md @@ -21,12 +21,12 @@ ms.assetid: a7150563-cdae-4cdf-9798-ad509990e505 ## See also -[putc, putwc](../c-runtime-library/reference/putc-putwc.md)
-[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 8c07f0d852a..a2a079d4302 100644 --- a/docs/c-runtime-library/errno-constants.md +++ b/docs/c-runtime-library/errno-constants.md @@ -15,11 +15,11 @@ 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) for 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. -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: @@ -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 10039d1df5c..0ee14181c4a 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 @@ -29,17 +29,17 @@ Both `errno` and `_doserrno` are set to 0 by the runtime during program startup. 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)| +|`_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 ``, and are UNIX-compatible. Only `ERANGE`, `EILSEQ`, and `EDOM` are specified in the ISO C99 standard. For a complete list, see [errno Constants](../c-runtime-library/errno-constants.md). +All `errno` values are predefined constants in ``, and are UNIX-compatible. Only `ERANGE`, `EILSEQ`, and `EDOM` are specified in the ISO C99 standard. For a complete list, see [`errno` constants](./errno-constants.md). ## Requirements @@ -48,16 +48,16 @@ All `errno` values are predefined constants in ``, and are UNIX-compati |`errno`|`` or ``, `` or `` (C++)|| |`_doserrno`, `_sys_errlist`, `_sys_nerr`|``, `` (C++)|``, `` (C++)| -The `_doserrno`, `_sys_errlist`, and `_sys_nerr` macros are Microsoft extensions. For more compatibility information, see [Compatibility](../c-runtime-library/compatibility.md). +The `_doserrno`, `_sys_errlist`, and `_sys_nerr` macros are Microsoft extensions. For more compatibility information, see [Compatibility](./compatibility.md). ## See also -[Global Variables](../c-runtime-library/global-variables.md)
-[`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 e0316576265..0165ae6a88a 100644 --- a/docs/c-runtime-library/error-handling-crt.md +++ b/docs/c-runtime-library/error-handling-crt.md @@ -13,16 +13,16 @@ Use these routines to handle program errors. |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.| +|[`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 43d8673d416..ca1edec9341 100644 --- a/docs/c-runtime-library/except-handler3.md +++ b/docs/c-runtime-library/except-handler3.md @@ -27,19 +27,19 @@ 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`. @@ -49,4 +49,4 @@ If this method finds an appropriate exception handler, it passes the exception t ## 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 6bdc7e47489..27de90ff6ed 100644 --- a/docs/c-runtime-library/exception-handling-constants.md +++ b/docs/c-runtime-library/exception-handling-constants.md @@ -6,10 +6,10 @@ f1_keywords: ["EXCEPTION_CONTINUE_SEARCH", "EXCEPTION_CONTINUE_EXECUTION", "EXCE 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 f71e5eb1d75..9318d030d97 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 isn't used in current Microsoft C++ exception-handling implementation| +|[`_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 f4b7acae8aa..a5d1f69c4bc 100644 --- a/docs/c-runtime-library/exec-wexec-functions.md +++ b/docs/c-runtime-library/exec-wexec-functions.md @@ -14,18 +14,18 @@ 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::: @@ -42,7 +42,7 @@ The letter at the end of the function name determines the variation. 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| |---------------------|--------------------------------------|--------------------|-----------------------| @@ -65,7 +65,7 @@ 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.) @@ -77,7 +77,7 @@ Files that are open when an `_exec` call is made remain open in the new 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 2d530a44cb3..2238cb6fd20 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 @@ -33,13 +33,13 @@ int _execute_onexit_table( #### Parameters -*table*
+*`table`*\ [in, out] Pointer to the `onexit` function table. -*function*
+*`function`*\ [in] Pointer to a function to add to the `onexit` function table. -## Return Value +## Return value If successful, the function returns 0. Otherwise, it returns a negative value. @@ -61,10 +61,10 @@ By default, this function's global state is scoped to the application. To change |-------------|---------------------| |`_initialize_onexit_table function`, `_register_onexit_function`, `_execute_onexit_table`|C, C++: \| -The `_initialize_onexit_table`, `_register_onexit_function`, and `_execute_onexit_table` functions are Microsoft-specific. For compatibility information, see [Compatibility](../c-runtime-library/compatibility.md). +The `_initialize_onexit_table`, `_register_onexit_function`, and `_execute_onexit_table` functions are Microsoft-specific. For compatibility information, see [Compatibility](./compatibility.md). ## See also -[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) +[`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 4e49b15f438..813aa17c7d2 100644 --- a/docs/c-runtime-library/exit-success-exit-failure.md +++ b/docs/c-runtime-library/exit-success-exit-failure.md @@ -24,4 +24,4 @@ The `EXIT_SUCCESS` and `EXIT_FAILURE` constants are arguments for the [`exit`](r ## 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 b2be1244fbf..a7fc3535e71 100644 --- a/docs/c-runtime-library/file-attribute-constants.md +++ b/docs/c-runtime-library/file-attribute-constants.md @@ -6,7 +6,7 @@ f1_keywords: ["A_HIDDEN", "_A_NORMAL", "_A_SUBDIR", "_A_RDONLY", "A_NORMAL", "A_ 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 @@ -33,5 +33,5 @@ Multiple constants can be combined with the OR operator (`|`). ## See also -[Filename Search Functions](../c-runtime-library/filename-search-functions.md)
-[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 fabae25abbb..782e5d869fe 100644 --- a/docs/c-runtime-library/file-constants.md +++ b/docs/c-runtime-library/file-constants.md @@ -6,7 +6,7 @@ f1_keywords: ["_O_EXCL", "_O_RDWR", "_O_APPEND", "_O_RDONLY", "_O_TRUNC", "_O_CR 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 @@ -23,8 +23,8 @@ The file constants are as follows: |Constant|Description| |-|-| | `_O_APPEND` | Repositions the file pointer to the end of the file before every write operation. | -| `_O_CREAT` | Creates and opens a new file for writing; the constant has no effect if the file specified by *filename* exists. | -| `_O_EXCL` | Returns an error value if the file specified by *filename* exists. Only applies when used with `_O_CREAT`. | +| `_O_CREAT` | Creates and opens a new file for writing; the constant has no effect if the file specified by *`filename`* exists. | +| `_O_EXCL` | Returns an error value if the file specified by *`filename`* exists. Only applies when used with `_O_CREAT`. | | `_O_RDONLY` | Opens file for reading only; if this flag is given, `_O_RDWR` and `_O_WRONLY` can't be given. | | `_O_RDWR` | Opens file for both reading and writing; if this flag is given, `_O_RDONLY` and `_O_WRONLY` can't be given. | | `_O_TRUNC` | Opens and truncates an existing file to zero length; the file must have write permission. The contents of the file are destroyed. If this flag is given, you can't specify `_O_RDONLY`. | @@ -32,6 +32,6 @@ The file constants are as follows: ## See also -[_open, _wopen](../c-runtime-library/reference/open-wopen.md)
-[_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 5da950aeef3..9377aad6c99 100644 --- a/docs/c-runtime-library/file-handling.md +++ b/docs/c-runtime-library/file-handling.md @@ -6,26 +6,26 @@ 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| +|[`_chsize`](./reference/chsize.md),[`_chsize_s`](./reference/chsize-s.md)|Change file size| +|[`_filelength`, `_filelengthi64`](./reference/filelength-filelengthi64.md)|Get file length| +|[`_fstat`, `_fstat32`, `_fstat64`, `_fstati64`, `_fstat32i64`, `_fstat64i32`](./reference/fstat-fstat32-fstat64-fstati64-fstat32i64-fstat64i32.md)|Get file-status information on descriptor| +|[`_get_osfhandle`](./reference/get-osfhandle.md)|Return operating-system file handle associated with existing C run-time file descriptor| +|[`_isatty`](./reference/isatty.md)|Check for character device| +|[`_locking`](./reference/locking.md)|Lock areas of file| +|[`_open_osfhandle`](./reference/open-osfhandle.md)|Associate C run-time file descriptor with existing operating-system file handle| +|[`_setmode`](./reference/setmode.md)|Set file-translation mode| ## File-Handling Routines (Path or Filename) @@ -33,17 +33,17 @@ 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| +|[`_access`, `_waccess`](./reference/access-waccess.md), [`_access_s`, `_waccess_s`](./reference/access-s-waccess-s.md)|Check file-permission setting| +|[`_chmod`, `_wchmod`](./reference/chmod-wchmod.md)|Change file-permission setting| +|[`_fullpath`, `_wfullpath`](./reference/fullpath-wfullpath.md)|Expand a relative path to its absolute path name| +|[`_makepath`, `_wmakepath`](./reference/makepath-wmakepath.md), [`_makepath_s`, `_wmakepath_s`](./reference/makepath-s-wmakepath-s.md)|Merge path components into single, full path| +|[`_mktemp`, `_wmktemp`](./reference/mktemp-wmktemp.md), [`_mktemp_s`, `_wmktemp_s`](./reference/mktemp-s-wmktemp-s.md)|Create unique filename| +|[`remove`, `_wremove`](./reference/remove-wremove.md)|Delete file| +|[`rename`, `_wrename`](./reference/rename-wrename.md)|Rename file| +|[`_splitpath`, `_wsplitpath`](./reference/splitpath-wsplitpath.md), [`_splitpath_s`, `_wsplitpath_s`](./reference/splitpath-s-wsplitpath-s.md)|Parse path into components| +|[`_stat`, `_stat64`, `_stati64`, `_wstat`, `_wstat64`, `_wstati64`](./reference/stat-functions.md)|Get file-status information on named file| +|[`_umask`](./reference/umask.md), [`_umask_s`](./reference/umask-s.md)|Set default permission mask for new files created by program| +|[`_unlink`, `_wunlink`](./reference/unlink-wunlink.md)|Delete file| ## File-Handling Routines (Open File) @@ -51,21 +51,21 @@ 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.| +|[`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.| +|[`_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: @@ -77,6 +77,6 @@ The following Win32 functions also open files and pipes: ## 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 3f5a9fb072d..9b6c5bc78fe 100644 --- a/docs/c-runtime-library/file-permission-constants.md +++ b/docs/c-runtime-library/file-permission-constants.md @@ -5,7 +5,7 @@ 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 @@ -35,8 +35,8 @@ When used as the `pmode` argument for `_umask`, the manifest constant sets the p ## See also -[_open, _wopen](../c-runtime-library/reference/open-wopen.md)
-[_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 3986b0fdc8b..5371e123470 100644 --- a/docs/c-runtime-library/file-read-write-access-constants.md +++ b/docs/c-runtime-library/file-read-write-access-constants.md @@ -5,7 +5,7 @@ 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 @@ -15,7 +15,7 @@ ms.assetid: 56cd1d22-39a5-4fcf-bea2-7046d249e8ee ## Remarks -These constants specify the access type ("a", "r", or "w") requested for the file. Both the [translation mode](../c-runtime-library/file-translation-constants.md) ("b" or "t") and the [commit-to-disk mode](../c-runtime-library/commit-to-disk-constants.md) ("c" or "n") can be specified with the type of access. +These constants specify the access type ("a", "r", or "w") requested for the file. Both the [translation mode](./file-translation-constants.md) ("b" or "t") and the [commit-to-disk mode](./commit-to-disk-constants.md) ("c" or "n") can be specified with the type of access. The access types are described in this table: @@ -32,9 +32,9 @@ When the "r+", "w+", or "a+" type is specified, both reading and writing are all ## See also -[_fdopen, _wfdopen](../c-runtime-library/reference/fdopen-wfdopen.md)
-[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 2eff6d514dd..ef2eb9e63a9 100644 --- a/docs/c-runtime-library/file-translation-constants.md +++ b/docs/c-runtime-library/file-translation-constants.md @@ -5,7 +5,7 @@ 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 @@ -30,12 +30,12 @@ The translation modes are as follows: Opens in binary (untranslated) mode. The above translations are suppressed. -If **t** or **b** isn't given in *mode*, the translation mode is defined by the default-mode variable [_fmode](../c-runtime-library/fmode.md). For more information about using text and binary modes, see [Text and Binary Mode File I/O](../c-runtime-library/text-and-binary-mode-file-i-o.md). +If **t** or **b** isn't given in *`mode`*, the translation mode is defined by the default-mode variable [`_fmode`](./fmode.md). For more information about using text and binary modes, see [Text and binary mode file I/O](./text-and-binary-mode-file-i-o.md). ## See also -[_fdopen, _wfdopen](../c-runtime-library/reference/fdopen-wfdopen.md)
-[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 15923f7b07c..3a3e437bff3 100644 --- a/docs/c-runtime-library/filename-max.md +++ b/docs/c-runtime-library/filename-max.md @@ -18,5 +18,5 @@ The maximum permissible length for a `filename` string buffer size. ## See also -[Path Field Limits](../c-runtime-library/path-field-limits.md)
-[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 b1dd3833b28..fdc98ed11a3 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`. @@ -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 20c3a524f16..16b6697be76 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: @@ -20,7 +20,7 @@ The last two items are interactive files. Files are typically the principal mean 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. @@ -30,13 +30,13 @@ The target environment opens three files before program startup. You can open a - 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's 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/floating-point-support.md b/docs/c-runtime-library/floating-point-support.md index cabb8abd9a6..e8f6976ac25 100644 --- a/docs/c-runtime-library/floating-point-support.md +++ b/docs/c-runtime-library/floating-point-support.md @@ -19,115 +19,115 @@ Previous 16-bit versions of Microsoft C/C++ and Microsoft Visual C++ supported t |Routine|Use| |-|-| -[`abs`, `labs`, `llabs`, `_abs64`](../c-runtime-library/reference/abs-labs-llabs-abs64.md)|Computes the absolute value of an integer type -[`acos`, `acosf`, `acosl`](../c-runtime-library/reference/acos-acosf-acosl.md)|Computes the arc cosine -[`acosh`, `acoshf`, `acoshl`](../c-runtime-library/reference/acosh-acoshf-acoshl.md)|Computes the hyperbolic arc cosine -[`asin`, `asinf`, `asinl`](../c-runtime-library/reference/asin-asinf-asinl.md)|Computes the arc sine -[`asinh`, `asinhf`, `asinhl`](../c-runtime-library/reference/asinh-asinhf-asinhl.md)|Computes the hyperbolic arc sine -[`atan`, `atanf`, `atanl`, `atan2`, `atan2f`, `atan2l`](../c-runtime-library/reference/atan-atanf-atanl-atan2-atan2f-atan2l.md)|Computes the arc tangent -[`atanh`, `atanhf`, `atanhl`](../c-runtime-library/reference/atanh-atanhf-atanhl.md)|Computes the hyperbolic arc tangent -[`_atodbl`, `_atodbl_l`](../c-runtime-library/reference/atodbl-atodbl-l-atoldbl-atoldbl-l-atoflt-atoflt-l.md)|Converts a locale-specific string to a **`double`** -[`atof`, `_atof_l`](../c-runtime-library/reference/atof-atof-l-wtof-wtof-l.md)|Converts a string to a **`double`** -[`_atoflt`, `_atoflt_l`, `_atoldbl`, `_atoldbl_l`](../c-runtime-library/reference/atodbl-atodbl-l-atoldbl-atoldbl-l-atoflt-atoflt-l.md)|Converts a locale-specific string to a **`float`** or **`long double`** -[`cbrt`, `cbrtf`, `cbrtl`](../c-runtime-library/reference/cbrt-cbrtf-cbrtl.md)|Computes the cube root -[`ceil`, `ceilf`, `ceill`](../c-runtime-library/reference/ceil-ceilf-ceill.md)|Computes the ceiling -[`_chgsign`, `_chgsignf`, `_chgsignl`](../c-runtime-library/reference/chgsign-chgsignf-chgsignl.md)|Computes the additive inverse -[`_clear87`, `_clearfp`](../c-runtime-library/reference/clear87-clearfp.md)|Gets and clears the floating-point status register -[`_control87`, `\__control87_2`, `_controlfp`](../c-runtime-library/reference/control87-controlfp-control87-2.md)|Gets and sets the floating-point control word -[`_controlfp_s`](../c-runtime-library/reference/controlfp-s.md)|Secure version of **`_controlfp`** -[`copysign`, `copysignf`, `copysignl`, `_copysign`, `_copysignf`, `_copysignl`](../c-runtime-library/reference/copysign-copysignf-copysignl-copysign-copysignf-copysignl.md)|Returns a value that has the magnitude of one argument and the sign of another -[`cos`, `cosf`, `cosl`](../c-runtime-library/reference/cos-cosf-cosl.md)|Computes the sine -[`cosh`, `coshf`, `coshl`](../c-runtime-library/reference/cosh-coshf-coshl.md)|Computes the hyperbolic sine -[`div`, `ldiv`, `lldiv`](../c-runtime-library/reference/div.md)|Computes the quotient and the remainder of two integer values -[`_ecvt`](../c-runtime-library/reference/ecvt.md), [`ecvt`](../c-runtime-library/reference/posix-ecvt.md)|Converts a **`double`** to a string -[`_ecvt_s`](../c-runtime-library/reference/ecvt-s.md)|Secure version of **`_ecvt`** -[`erf`, `erff`, `erfl`](../c-runtime-library/reference/erf-erff-erfl-erfc-erfcf-erfcl.md)|Computes the error function -[`erfc`, `erfcf`, `erfcl`](../c-runtime-library/reference/erf-erff-erfl-erfc-erfcf-erfcl.md)|Computes the complementary error function -[`exp`, `expf`, `expl`](../c-runtime-library/reference/exp-expf.md)|Computes the exponential *e*x -[`exp2`, `exp2f`, `exp2l`](../c-runtime-library/reference/exp2-exp2f-exp2l.md)|Computes the exponential 2x -[`expm1`, `expm1f`, `expm1l`](../c-runtime-library/reference/expm1-expm1f-expm1l.md)|Computes *e*x-1 -[`fabs`, `fabsf`, `fabsl`](../c-runtime-library/reference/fabs-fabsf-fabsl.md)|Computes the absolute value of a floating-point type -[`_fcvt`](../c-runtime-library/reference/fcvt.md), [`fcvt`](../c-runtime-library/reference/posix-fcvt.md)|Converts a floating-point number to a string -[_fcvt_s](../c-runtime-library/reference/fcvt-s.md)|Secure version of **`_fcvt`** -[`fdim`, `fdimf`, `fdiml`](../c-runtime-library/reference/fdim-fdimf-fdiml.md)|Determines the positive difference between two values -[`feclearexcept`](../c-runtime-library/reference/feclearexcept1.md)|Clears specified floating-point exceptions -[`fegetenv`](../c-runtime-library/reference/fegetenv1.md)|Stores the current floating-point environment -[`fegetexceptflag`](../c-runtime-library/reference/fegetexceptflag2.md)|Gets the specified floating-point exception status -[`fegetround`](../c-runtime-library/reference/fegetround-fesetround2.md)|Gets the floating-point rounding mode -[`feholdexcept`](../c-runtime-library/reference/feholdexcept2.md)|Sets non-stop floating-point exception mode -[`feraiseexcept`](../c-runtime-library/reference/feraiseexcept.md)|Raises the specified floating-point exceptions -[`fesetenv`](../c-runtime-library/reference/fesetenv1.md)|Sets the current floating-point environment -[`fesetexceptflag`](../c-runtime-library/reference/fesetexceptflag2.md)|Sets the specified floating-point status flags -[`fesetround`](../c-runtime-library/reference/fegetround-fesetround2.md)|Sets the specified floating-point rounding mode -[`fetestexcept`](../c-runtime-library/reference/fetestexcept1.md)|Determines which floating-point exception status flags are set -[`feupdateenv`](../c-runtime-library/reference/feupdateenv.md)|Restores a floating-point environment then raises previous exceptions -[`floor`, `floorf`, `floorl`](../c-runtime-library/reference/floor-floorf-floorl.md)|Computes the floor -[`fma`, `fmaf`, `fmal`](../c-runtime-library/reference/fma-fmaf-fmal.md)|Computes a fused multiply-add -[`fmax`, `fmaxf`, `fmaxl`](../c-runtime-library/reference/fmax-fmaxf-fmaxl.md)|Computes the maximum of the arguments -[`fmin`, `fminf`, `fminl`](../c-runtime-library/reference/fmin-fminf-fminl.md)|Computes the minimum of the arguments -[`fmod`, `fmodf`, `fmodl`](../c-runtime-library/reference/fmod-fmodf.md)|Computes the floating-point remainder -[`_fpclass`, `_fpclassf`](../c-runtime-library/reference/fpclass-fpclassf.md)|Returns the classification of a floating-point value -[`fpclassify`](../c-runtime-library/reference/fpclassify.md)|Returns the classification of a floating-point value -[`_fpieee_flt`](../c-runtime-library/reference/fpieee-flt.md)|Sets a handler for floating-point exceptions -[`_fpreset`](../c-runtime-library/reference/fpreset.md)|Resets the floating-point environment -[`frexp`, `frexpf`, `frexpl`](../c-runtime-library/reference/frexp.md)|Gets the mantissa and exponent of a floating-point number -[`_gcvt`](../c-runtime-library/reference/gcvt.md), [`gcvt`](../c-runtime-library/reference/posix-gcvt.md)|Converts a floating-point number to a string -[`_gcvt_s`](../c-runtime-library/reference/gcvt-s.md)|Secure version of **`_gcvt`** -[`_get_FMA3_enable`, `_set_FMA3_enable`](../c-runtime-library/reference/get-fma3-enable-set-fma3-enable.md)|Gets or sets a flag for use of FMA3 instructions on x64 -[`hypot`, `hypotf`, `hypotl`, `_hypot`, `_hypotf`, `_hypotl`](../c-runtime-library/reference/hypot-hypotf-hypotl-hypot-hypotf-hypotl.md)|Computes the hypotenuse -[`ilogb`, `ilogbf`, `ilogbl`](../c-runtime-library/reference/ilogb-ilogbf-ilogbl2.md)|Computes the integer base-2 exponent -[`imaxabs`](../c-runtime-library/reference/imaxabs.md)|Computes the absolute value of an integer type -[`imaxdiv`](../c-runtime-library/reference/imaxdiv.md)|Computes the quotient and the remainder of two integer values -[`isfinite`, `_finite`, `_finitef`](../c-runtime-library/reference/finite-finitef.md)|Determines whether a value is finite -[`isgreater`, `isgreaterequal`, `isless`, `islessequal`, `islessgreater`, `isunordered`](../c-runtime-library/reference/floating-point-ordering.md)|Compare the order of two floating point values -[`isinf`](../c-runtime-library/reference/isinf.md)|Determines whether a floating-point value is infinite -[`isnan`, `_isnan`, `_isnanf`](../c-runtime-library/reference/isnan-isnan-isnanf.md)|Tests a floating-point value for NaN -[`isnormal`](../c-runtime-library/reference/isnormal.md)|Tests whether a floating-point value is both finite and not subnormal -[`_j0`, `_j1`, `_jn`](../c-runtime-library/reference/bessel-functions-j0-j1-jn-y0-y1-yn.md)|Computes the Bessel function -[`ldexp`, `ldexpf`, `ldexpl`](../c-runtime-library/reference/ldexp.md)|Computes x*2n -[`lgamma`, `lgammaf`, `lgammal`](../c-runtime-library/reference/lgamma-lgammaf-lgammal.md)|Computes the natural logarithm of the absolute value of the gamma function -[`llrint`, `llrintf`, `llrintl`](../c-runtime-library/reference/lrint-lrintf-lrintl-llrint-llrintf-llrintl.md)|Rounds a floating-point value to the nearest **`long long`** value -[`llround`, `llroundf`, `llroundl`](../c-runtime-library/reference/lround-lroundf-lroundl-llround-llroundf-llroundl.md)|Rounds a floating-point value to the nearest **`long long`** value -[`log`, `logf`, `logl`, `log10`, `log10f`, `log10l`](../c-runtime-library/reference/log-logf-log10-log10f.md)|Computes the natural or base-10 logarithm -[`log1p`, `log1pf`, `log1pl`](../c-runtime-library/reference/log1p-log1pf-log1pl2.md)|Computes the natural logarithm of 1+x -[`log2`, `log2f`, `log2l`](../c-runtime-library/reference/log2-log2f-log2l.md)|Computes the base-2 logarithm -[`logb`, `logbf`, `logbl`, `_logb`, `_logbf`](../c-runtime-library/reference/logb-logbf-logbl-logb-logbf.md)|Returns the exponent of a floating-point value -[`lrint`, `lrintf`, `lrintl`](../c-runtime-library/reference/lrint-lrintf-lrintl-llrint-llrintf-llrintl.md)|Rounds a floating-point value to the nearest **`long`** value -[`_lrotl`, `_lrotr`](../c-runtime-library/reference/lrotl-lrotr.md)|Rotates an integer value left or right -[`lround`, `lroundf`, `lroundl`](../c-runtime-library/reference/lround-lroundf-lroundl-llround-llroundf-llroundl.md)|Rounds a floating-point value to the nearest **`long`** value -[`_matherr`](../c-runtime-library/reference/matherr.md)|The default math error handler -[`__max`](../c-runtime-library/reference/max.md)|Macro that returns the larger of two values -[`__min`](../c-runtime-library/reference/min.md)|Macro that returns the smaller of two values -[`modf`, `modff`, `modfl`](../c-runtime-library/reference/modf-modff-modfl.md)|Splits a floating-point value into fractional and integer parts -[`nan`, `nanf`, `nanl`](../c-runtime-library/reference/nan-nanf-nanl.md)|Returns a quiet NaN value -[`nearbyint`, `nearbyintf`, `nearbyintl`](../c-runtime-library/reference/nearbyint-nearbyintf-nearbyintl1.md)|Returns the rounded value -[`nextafter`, `nextafterf`, `nextafterl`, `_nextafter`, `_nextafterf`](../c-runtime-library/reference/nextafter-functions.md)|Returns the next representable floating-point value -[`nexttoward`, `nexttowardf`, `nexttowardl`](../c-runtime-library/reference/nextafter-functions.md)|Returns the next representable floating-point value -[`pow`, `powf`, `powl`](../c-runtime-library/reference/pow-powf-powl.md)|Returns the value of *x**y* -[`remainder`, `remainderf`, `remainderl`](../c-runtime-library/reference/remainder-remainderf-remainderl.md)|Computes the remainder of the quotient of two floating-point values -[`remquo`, `remquof`, `remquol`](../c-runtime-library/reference/remquo-remquof-remquol.md)|Computes the remainder of two integer values -[`rint`, `rintf`, `rintl`](../c-runtime-library/reference/rint-rintf-rintl.md)|Rounds a floating-point value -[`_rotl`, `_rotl64`, `_rotr`, `_rotr64`](../c-runtime-library/reference/rotl-rotl64-rotr-rotr64.md)|Rotates bits in integer types -[`round`, `roundf`, `roundl`](../c-runtime-library/reference/round-roundf-roundl.md)|Rounds a floating-point value -[`_scalb`, `_scalbf`](../c-runtime-library/reference/scalb.md)|Scales argument by a power of 2 -[`scalbn`, `scalbnf`, `scalbnl`, `scalbln`, `scalblnf`, `scalblnl`](../c-runtime-library/reference/scalbn-scalbnf-scalbnl-scalbln-scalblnf-scalblnl.md)|Multiplies a floating-point number by an integral power of **`FLT_RADIX`** -[`_set_controlfp`](../c-runtime-library/reference/set-controlfp.md)|Sets the floating-point control word -[`_set_SSE2_enable`](../c-runtime-library/reference/set-sse2-enable.md)|Enables or disables SSE2 instructions -[`signbit`](../c-runtime-library/reference/signbit.md)|Tests the sign bit of a floating-point value -[`sin`, `sinf`, `sinl`](../c-runtime-library/reference/sin-sinf-sinl.md)|Computes the sine -[`sinh`, `sinhf`, `sinhl`](../c-runtime-library/reference/sinh-sinhf-sinhl.md)|Computes the hyperbolic sine -[`sqrt`, `sqrtf`, `sqrtl`](../c-runtime-library/reference/sqrt-sqrtf-sqrtl.md)|Computes the square root -[`_status87`, `_statusfp`, `_statusfp2`](../c-runtime-library/reference/status87-statusfp-statusfp2.md)|Gets the floating-point status word -[`strtof`, `_strtof_l`](../c-runtime-library/reference/strtof-strtof-l-wcstof-wcstof-l.md)|Converts a string to a **`float`** -[`strtold`, `_strtold_l`](../c-runtime-library/reference/strtold-strtold-l-wcstold-wcstold-l.md)|Converts a string to a **`long double`** -[`tan`, `tanf`, `tanl`](../c-runtime-library/reference/tan-tanf-tanl.md)|Computes the tangent -[`tanh`, `tanhf`, `tanhl`](../c-runtime-library/reference/tanh-tanhf-tanhl.md)|Computes the hyperbolic tangent -[`tgamma`, `tgammaf`, `tgammal`](../c-runtime-library/reference/tgamma-tgammaf-tgammal.md)|Computes the gamma function -[`trunc`, `truncf`, `truncl`](../c-runtime-library/reference/trunc-truncf-truncl.md)|Truncates the fractional part -[`_wtof`, `_wtof_l`](../c-runtime-library/reference/atof-atof-l-wtof-wtof-l.md)|Converts a wide string to a **`double`** -[`_y0`, `_y1`, `_yn`](../c-runtime-library/reference/bessel-functions-j0-j1-jn-y0-y1-yn.md)|Computes the Bessel function +[`abs`, `labs`, `llabs`, `_abs64`](./reference/abs-labs-llabs-abs64.md)|Computes the absolute value of an integer type +[`acos`, `acosf`, `acosl`](./reference/acos-acosf-acosl.md)|Computes the arc cosine +[`acosh`, `acoshf`, `acoshl`](./reference/acosh-acoshf-acoshl.md)|Computes the hyperbolic arc cosine +[`asin`, `asinf`, `asinl`](./reference/asin-asinf-asinl.md)|Computes the arc sine +[`asinh`, `asinhf`, `asinhl`](./reference/asinh-asinhf-asinhl.md)|Computes the hyperbolic arc sine +[`atan`, `atanf`, `atanl`, `atan2`, `atan2f`, `atan2l`](./reference/atan-atanf-atanl-atan2-atan2f-atan2l.md)|Computes the arc tangent +[`atanh`, `atanhf`, `atanhl`](./reference/atanh-atanhf-atanhl.md)|Computes the hyperbolic arc tangent +[`_atodbl`, `_atodbl_l`](./reference/atodbl-atodbl-l-atoldbl-atoldbl-l-atoflt-atoflt-l.md)|Converts a locale-specific string to a **`double`** +[`atof`, `_atof_l`](./reference/atof-atof-l-wtof-wtof-l.md)|Converts a string to a **`double`** +[`_atoflt`, `_atoflt_l`, `_atoldbl`, `_atoldbl_l`](./reference/atodbl-atodbl-l-atoldbl-atoldbl-l-atoflt-atoflt-l.md)|Converts a locale-specific string to a **`float`** or **`long double`** +[`cbrt`, `cbrtf`, `cbrtl`](./reference/cbrt-cbrtf-cbrtl.md)|Computes the cube root +[`ceil`, `ceilf`, `ceill`](./reference/ceil-ceilf-ceill.md)|Computes the ceiling +[`_chgsign`, `_chgsignf`, `_chgsignl`](./reference/chgsign-chgsignf-chgsignl.md)|Computes the additive inverse +[`_clear87`, `_clearfp`](./reference/clear87-clearfp.md)|Gets and clears the floating-point status register +[`_control87`, `_controlfp`, `__control87_2`](./reference/control87-controlfp-control87-2.md)|Gets and sets the floating-point control word +[`_controlfp_s`](./reference/controlfp-s.md)|Secure version of **`_controlfp`** +[`copysign`, `copysignf`, `copysignl`, `_copysign`, `_copysignf`, `_copysignl`](./reference/copysign-copysignf-copysignl-copysign-copysignf-copysignl.md)|Returns a value that has the magnitude of one argument and the sign of another +[`cos`, `cosf`, `cosl`](./reference/cos-cosf-cosl.md)|Computes the sine +[`cosh`, `coshf`, `coshl`](./reference/cosh-coshf-coshl.md)|Computes the hyperbolic sine +[`div`, `ldiv`, `lldiv`](./reference/div.md)|Computes the quotient and the remainder of two integer values +[`_ecvt`](./reference/ecvt.md), [`ecvt`](./reference/posix-ecvt.md)|Converts a **`double`** to a string +[`_ecvt_s`](./reference/ecvt-s.md)|Secure version of **`_ecvt`** +[`erf`, `erff`, `erfl`](./reference/erf-erff-erfl-erfc-erfcf-erfcl.md)|Computes the error function +[`erfc`, `erfcf`, `erfcl`](./reference/erf-erff-erfl-erfc-erfcf-erfcl.md)|Computes the complementary error function +[`exp`, `expf`, `expl`](./reference/exp-expf.md)|Computes the exponential *e*x +[`exp2`, `exp2f`, `exp2l`](./reference/exp2-exp2f-exp2l.md)|Computes the exponential 2x +[`expm1`, `expm1f`, `expm1l`](./reference/expm1-expm1f-expm1l.md)|Computes *e*x-1 +[`fabs`, `fabsf`, `fabsl`](./reference/fabs-fabsf-fabsl.md)|Computes the absolute value of a floating-point type +[`_fcvt`](./reference/fcvt.md), [`fcvt`](./reference/posix-fcvt.md)|Converts a floating-point number to a string +[`_fcvt_s`](./reference/fcvt-s.md)|Secure version of **`_fcvt`** +[`fdim`, `fdimf`, `fdiml`](./reference/fdim-fdimf-fdiml.md)|Determines the positive difference between two values +[`feclearexcept`](./reference/feclearexcept1.md)|Clears specified floating-point exceptions +[`fegetenv`](./reference/fegetenv1.md)|Stores the current floating-point environment +[`fegetexceptflag`](./reference/fegetexceptflag2.md)|Gets the specified floating-point exception status +[`fegetround`](./reference/fegetround-fesetround2.md)|Gets the floating-point rounding mode +[`feholdexcept`](./reference/feholdexcept2.md)|Sets non-stop floating-point exception mode +[`feraiseexcept`](./reference/feraiseexcept.md)|Raises the specified floating-point exceptions +[`fesetenv`](./reference/fesetenv1.md)|Sets the current floating-point environment +[`fesetexceptflag`](./reference/fesetexceptflag2.md)|Sets the specified floating-point status flags +[`fesetround`](./reference/fegetround-fesetround2.md)|Sets the specified floating-point rounding mode +[`fetestexcept`](./reference/fetestexcept1.md)|Determines which floating-point exception status flags are set +[`feupdateenv`](./reference/feupdateenv.md)|Restores a floating-point environment then raises previous exceptions +[`floor`, `floorf`, `floorl`](./reference/floor-floorf-floorl.md)|Computes the floor +[`fma`, `fmaf`, `fmal`](./reference/fma-fmaf-fmal.md)|Computes a fused multiply-add +[`fmax`, `fmaxf`, `fmaxl`](./reference/fmax-fmaxf-fmaxl.md)|Computes the maximum of the arguments +[`fmin`, `fminf`, `fminl`](./reference/fmin-fminf-fminl.md)|Computes the minimum of the arguments +[`fmod`, `fmodf`, `fmodl`](./reference/fmod-fmodf.md)|Computes the floating-point remainder +[`_fpclass`, `_fpclassf`](./reference/fpclass-fpclassf.md)|Returns the classification of a floating-point value +[`fpclassify`](./reference/fpclassify.md)|Returns the classification of a floating-point value +[`_fpieee_flt`](./reference/fpieee-flt.md)|Sets a handler for floating-point exceptions +[`_fpreset`](./reference/fpreset.md)|Resets the floating-point environment +[`frexp`, `frexpf`, `frexpl`](./reference/frexp.md)|Gets the mantissa and exponent of a floating-point number +[`_gcvt`](./reference/gcvt.md), [`gcvt`](./reference/posix-gcvt.md)|Converts a floating-point number to a string +[`_gcvt_s`](./reference/gcvt-s.md)|Secure version of **`_gcvt`** +[`_get_FMA3_enable`, `_set_FMA3_enable`](./reference/get-fma3-enable-set-fma3-enable.md)|Gets or sets a flag for use of FMA3 instructions on x64 +[`hypot`, `hypotf`, `hypotl`, `_hypot`, `_hypotf`, `_hypotl`](./reference/hypot-hypotf-hypotl-hypot-hypotf-hypotl.md)|Computes the hypotenuse +[`ilogb`, `ilogbf`, `ilogbl`](./reference/ilogb-ilogbf-ilogbl2.md)|Computes the integer base-2 exponent +[`imaxabs`](./reference/imaxabs.md)|Computes the absolute value of an integer type +[`imaxdiv`](./reference/imaxdiv.md)|Computes the quotient and the remainder of two integer values +[`isfinite`, `_finite`, `_finitef`](./reference/finite-finitef.md)|Determines whether a value is finite +[`isgreater`, `isgreaterequal`, `isless`, `islessequal`, `islessgreater`, `isunordered`](./reference/floating-point-ordering.md)|Compare the order of two floating point values +[`isinf`](./reference/isinf.md)|Determines whether a floating-point value is infinite +[`isnan`, `_isnan`, `_isnanf`](./reference/isnan-isnan-isnanf.md)|Tests a floating-point value for NaN +[`isnormal`](./reference/isnormal.md)|Tests whether a floating-point value is both finite and not subnormal +[`_j0`, `_j1`, `_jn`](./reference/bessel-functions-j0-j1-jn-y0-y1-yn.md)|Computes the Bessel function +[`ldexp`, `ldexpf`, `ldexpl`](./reference/ldexp.md)|Computes x*2n +[`lgamma`, `lgammaf`, `lgammal`](./reference/lgamma-lgammaf-lgammal.md)|Computes the natural logarithm of the absolute value of the gamma function +[`llrint`, `llrintf`, `llrintl`](./reference/lrint-lrintf-lrintl-llrint-llrintf-llrintl.md)|Rounds a floating-point value to the nearest **`long long`** value +[`llround`, `llroundf`, `llroundl`](./reference/lround-lroundf-lroundl-llround-llroundf-llroundl.md)|Rounds a floating-point value to the nearest **`long long`** value +[`log`, `logf`, `logl`, `log10`, `log10f`, `log10l`](./reference/log-logf-log10-log10f.md)|Computes the natural or base-10 logarithm +[`log1p`, `log1pf`, `log1pl`](./reference/log1p-log1pf-log1pl2.md)|Computes the natural logarithm of 1+x +[`log2`, `log2f`, `log2l`](./reference/log2-log2f-log2l.md)|Computes the base-2 logarithm +[`logb`, `logbf`, `logbl`, `_logb`, `_logbf`](./reference/logb-logbf-logbl-logb-logbf.md)|Returns the exponent of a floating-point value +[`lrint`, `lrintf`, `lrintl`](./reference/lrint-lrintf-lrintl-llrint-llrintf-llrintl.md)|Rounds a floating-point value to the nearest **`long`** value +[`_lrotl`, `_lrotr`](./reference/lrotl-lrotr.md)|Rotates an integer value left or right +[`lround`, `lroundf`, `lroundl`](./reference/lround-lroundf-lroundl-llround-llroundf-llroundl.md)|Rounds a floating-point value to the nearest **`long`** value +[`_matherr`](./reference/matherr.md)|The default math error handler +[`__max`](./reference/max.md)|Macro that returns the larger of two values +[`__min`](./reference/min.md)|Macro that returns the smaller of two values +[`modf`, `modff`, `modfl`](./reference/modf-modff-modfl.md)|Splits a floating-point value into fractional and integer parts +[`nan`, `nanf`, `nanl`](./reference/nan-nanf-nanl.md)|Returns a quiet NaN value +[`nearbyint`, `nearbyintf`, `nearbyintl`](./reference/nearbyint-nearbyintf-nearbyintl1.md)|Returns the rounded value +[`nextafter`, `nextafterf`, `nextafterl`, `_nextafter`, `_nextafterf`](./reference/nextafter-functions.md)|Returns the next representable floating-point value +[`nexttoward`, `nexttowardf`, `nexttowardl`](./reference/nextafter-functions.md)|Returns the next representable floating-point value +[`pow`, `powf`, `powl`](./reference/pow-powf-powl.md)|Returns the value of *`x`**`y`* +[`remainder`, `remainderf`, `remainderl`](./reference/remainder-remainderf-remainderl.md)|Computes the remainder of the quotient of two floating-point values +[`remquo`, `remquof`, `remquol`](./reference/remquo-remquof-remquol.md)|Computes the remainder of two integer values +[`rint`, `rintf`, `rintl`](./reference/rint-rintf-rintl.md)|Rounds a floating-point value +[`_rotl`, `_rotl64`, `_rotr`, `_rotr64`](./reference/rotl-rotl64-rotr-rotr64.md)|Rotates bits in integer types +[`round`, `roundf`, `roundl`](./reference/round-roundf-roundl.md)|Rounds a floating-point value +[`_scalb`, `_scalbf`](./reference/scalb.md)|Scales argument by a power of 2 +[`scalbn`, `scalbnf`, `scalbnl`, `scalbln`, `scalblnf`, `scalblnl`](./reference/scalbn-scalbnf-scalbnl-scalbln-scalblnf-scalblnl.md)|Multiplies a floating-point number by an integral power of **`FLT_RADIX`** +[`_set_controlfp`](./reference/set-controlfp.md)|Sets the floating-point control word +[`_set_SSE2_enable`](./reference/set-sse2-enable.md)|Enables or disables SSE2 instructions +[`signbit`](./reference/signbit.md)|Tests the sign bit of a floating-point value +[`sin`, `sinf`, `sinl`](./reference/sin-sinf-sinl.md)|Computes the sine +[`sinh`, `sinhf`, `sinhl`](./reference/sinh-sinhf-sinhl.md)|Computes the hyperbolic sine +[`sqrt`, `sqrtf`, `sqrtl`](./reference/sqrt-sqrtf-sqrtl.md)|Computes the square root +[`_status87`, `_statusfp`, `_statusfp2`](./reference/status87-statusfp-statusfp2.md)|Gets the floating-point status word +[`strtof`, `_strtof_l`](./reference/strtof-strtof-l-wcstof-wcstof-l.md)|Converts a string to a **`float`** +[`strtold`, `_strtold_l`](./reference/strtold-strtold-l-wcstold-wcstold-l.md)|Converts a string to a **`long double`** +[`tan`, `tanf`, `tanl`](./reference/tan-tanf-tanl.md)|Computes the tangent +[`tanh`, `tanhf`, `tanhl`](./reference/tanh-tanhf-tanhl.md)|Computes the hyperbolic tangent +[`tgamma`, `tgammaf`, `tgammal`](./reference/tgamma-tgammaf-tgammal.md)|Computes the gamma function +[`trunc`, `truncf`, `truncl`](./reference/trunc-truncf-truncl.md)|Truncates the fractional part +[`_wtof`, `_wtof_l`](./reference/atof-atof-l-wtof-wtof-l.md)|Converts a wide string to a **`double`** +[`_y0`, `_y1`, `_yn`](./reference/bessel-functions-j0-j1-jn-y0-y1-yn.md)|Computes the Bessel function ## See also -[Universal C runtime routines by category](../c-runtime-library/run-time-routines-by-category.md)\ -[Floating-point primitives](../c-runtime-library/reference/floating-point-primitives.md) +[Universal C runtime routines by category](./run-time-routines-by-category.md)\ +[Floating-point primitives](./reference/floating-point-primitives.md) diff --git a/docs/c-runtime-library/fmode.md b/docs/c-runtime-library/fmode.md index a4ef62af8b2..59d113dcbac 100644 --- a/docs/c-runtime-library/fmode.md +++ b/docs/c-runtime-library/fmode.md @@ -8,7 +8,7 @@ ms.assetid: ac6df9eb-e5cc-4c54-aff3-373c21983118 --- # _fmode -The `_fmode` variable sets the default file-translation mode for text or binary translation. This global variable has been deprecated for the more secure functional versions [_get_fmode](../c-runtime-library/reference/get-fmode.md) and [_set_fmode](../c-runtime-library/reference/set-fmode.md), which should be used in place of the global variable. It's declared in Stdlib.h as follows. +The `_fmode` variable sets the default file-translation mode for text or binary translation. This global variable has been deprecated for the more secure functional versions [`_get_fmode`](./reference/get-fmode.md) and [`_set_fmode`](./reference/set-fmode.md), which should be used in place of the global variable. It's declared in Stdlib.h as follows. ## Syntax @@ -30,6 +30,6 @@ You can change the value of `_fmode` in three ways: ## See also -[Global Variables](../c-runtime-library/global-variables.md)
-[_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 8974eec5a7f..9d45f93bf27 100644 --- a/docs/c-runtime-library/fopen-max-sys-open.md +++ b/docs/c-runtime-library/fopen-max-sys-open.md @@ -20,4 +20,4 @@ ms.assetid: 39cf5196-250a-459d-ae90-ce3d99f79039 ## See also -[Global Constants](../c-runtime-library/global-constants.md) +[Global constants](./global-constants.md) diff --git a/docs/c-runtime-library/format-specification-fields-scanf-and-wscanf-functions.md b/docs/c-runtime-library/format-specification-fields-scanf-and-wscanf-functions.md index 50f9cc1e4bd..bf5994d104e 100644 --- a/docs/c-runtime-library/format-specification-fields-scanf-and-wscanf-functions.md +++ b/docs/c-runtime-library/format-specification-fields-scanf-and-wscanf-functions.md @@ -22,7 +22,7 @@ The `format` argument is a string that specifies the interpretation of the input > **`%`**\[**`*`**]\[***`width`***]\[{**`h`**\|**`l`**\|**`ll`**\|**`I64`**\|**`L`**}]***`type`*** - Here, ***`width`***, **`h`**, **`l`**, **`ll`**, **`I64`**, and **`L`** represent a `scanf` [width specification](../c-runtime-library/scanf-width-specification.md), and ***`type`*** represents a `scanf` [type field character](../c-runtime-library/scanf-type-field-characters.md). + Here, ***`width`***, **`h`**, **`l`**, **`ll`**, **`I64`**, and **`L`** represent a `scanf` [width specification](./scanf-width-specification.md), and ***`type`*** represents a `scanf` [type field character](./scanf-type-field-characters.md). The `format` argument string is read from left to right. Characters outside format specifications are expected to match the sequence of characters in the input stream. The matching characters in the input stream are scanned but not stored. If a character in the input stream conflicts with the format specification, `scanf` terminates, and the character is left in the input stream as if it hadn't been read. @@ -36,11 +36,11 @@ The simplest format specification contains only the percent sign and a `type` ch An asterisk (`*`) following the percent sign suppresses assignment of the next input field, which is interpreted as a field of the specified type. The field is scanned but not stored in an argument. -The secure versions (the ones with the `_s` suffix) of the `scanf` family of functions require each parameter of type `c`, `C`, `s`, `S` or `[` to have a buffer size parameter passed immediately following. For more information on the secure versions of the `scanf` family of functions, see [`scanf_s`, `_scanf_s_l`, `wscanf_s`, `_wscanf_s_l`](../c-runtime-library/reference/scanf-s-scanf-s-l-wscanf-s-wscanf-s-l.md). +The secure versions (the ones with the `_s` suffix) of the `scanf` family of functions require each parameter of type `c`, `C`, `s`, `S` or `[` to have a buffer size parameter passed immediately following. For more information on the secure versions of the `scanf` family of functions, see [`scanf_s`, `_scanf_s_l`, `wscanf_s`, `_wscanf_s_l`](./reference/scanf-s-scanf-s-l-wscanf-s-wscanf-s-l.md). ## See also -[`scanf` Width specification](../c-runtime-library/scanf-width-specification.md)\ -[`scanf` Type field characters](../c-runtime-library/scanf-type-field-characters.md)\ -[`scanf`, `_scanf_l`, `wscanf`, `_wscanf_l`](../c-runtime-library/reference/scanf-scanf-l-wscanf-wscanf-l.md)\ -[`scanf_s`, `_scanf_s_l`, `wscanf_s`, `_wscanf_s_l`](../c-runtime-library/reference/scanf-s-scanf-s-l-wscanf-s-wscanf-s-l.md) +[`scanf` Width specification](./scanf-width-specification.md)\ +[`scanf` Type field characters](./scanf-type-field-characters.md)\ +[`scanf`, `_scanf_l`, `wscanf`, `_wscanf_l`](./reference/scanf-scanf-l-wscanf-wscanf-l.md)\ +[`scanf_s`, `_scanf_s_l`, `wscanf_s`, `_wscanf_s_l`](./reference/scanf-s-scanf-s-l-wscanf-s-wscanf-s-l.md) diff --git a/docs/c-runtime-library/format-specification-syntax-printf-and-wprintf-functions.md b/docs/c-runtime-library/format-specification-syntax-printf-and-wprintf-functions.md index 4a76d2ba734..5dd38b8a478 100644 --- a/docs/c-runtime-library/format-specification-syntax-printf-and-wprintf-functions.md +++ b/docs/c-runtime-library/format-specification-syntax-printf-and-wprintf-functions.md @@ -7,15 +7,15 @@ ms.assetid: 664b1717-2760-4c61-bd9c-22eee618d825 --- # Format specification syntax: `printf` and `wprintf` functions -The various `printf` and `wprintf` functions take a format string and optional arguments and produce a formatted sequence of characters for output. The format string contains zero or more *directives*, which are either literal characters for output or encoded *conversion specifications* that describe how to format an argument in the output. This article describes the syntax used to encode conversion specifications in the format string. For a listing of these functions, see [Stream I/O](../c-runtime-library/stream-i-o.md). +The various `printf` and `wprintf` functions take a format string and optional arguments and produce a formatted sequence of characters for output. The format string contains zero or more *directives*, which are either literal characters for output or encoded *conversion specifications* that describe how to format an argument in the output. This article describes the syntax used to encode conversion specifications in the format string. For a listing of these functions, see [Stream I/O](./stream-i-o.md). A conversion specification consists of optional and required fields in this form: -**%**\[[*flags*](#flags)]\[[*width*](#width)]\[.[*precision*](#precision)]\[[*size*](#size)][*type*](#type) +> **%**\[[*flags*](#flags)]\[[*width*](#width)]\[.[*precision*](#precision)]\[[*size*](#size)][*type*](#type) Each field of the conversion specification is a character or a number that signifies a particular format option or conversion specifier. The required *type* field specifies the kind of conversion to be applied to an argument. The optional *flags*, *width*, and *precision* fields control other format aspects such as leading spaces or zeroes, justification, and displayed precision. The *size* field specifies the size of the argument consumed and converted. -A basic conversion specification contains only the percent sign and a *type* character. For example, `%s` specifies a string conversion. To print a percent-sign character, use `%%`. If a percent sign is followed by a character that has no meaning as a format field, the invalid parameter handler is invoked. For more information, see [Parameter Validation](../c-runtime-library/parameter-validation.md). +A basic conversion specification contains only the percent sign and a *type* character. For example, `%s` specifies a string conversion. To print a percent-sign character, use `%%`. If a percent sign is followed by a character that has no meaning as a format field, the invalid parameter handler is invoked. For more information, see [Parameter validation](./parameter-validation.md). > [!IMPORTANT] > For security and stability, ensure that format conversion specification strings aren't end-user defined. For example, consider a program that prompts the user to enter a name and stores the input in a string variable that's named `user_name`. To print `user_name`, never do this: @@ -27,7 +27,7 @@ A basic conversion specification contains only the percent sign and a *type* cha > `printf( "%s", user_name );` > [!NOTE] -> In Visual Studio 2015 The `printf` and `scanf` family of functions were declared as **`inline`** and moved to the `` and `` headers. If you are migrating older code you might see *LNK2019* in connection with these functions. For more information, see [Visual C++ change history 2003 - 2015](../porting/visual-cpp-change-history-2003-2015.md#stdio_and_conio). +> In Visual Studio 2015 The `printf` and `scanf` family of functions were declared as **`inline`** and moved to the `` and `` headers. If you are migrating older code you might see LNK2019 in connection with these functions. For more information, see [Visual C++ change history 2003 - 2015](../porting/visual-cpp-change-history-2003-2015.md#stdio_and_conio). ## Type conversion specifier @@ -53,7 +53,7 @@ Integer types such as `short`, `int`, `long`, `long long`, and their `unsigned` |**`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](../c-runtime-library/set-output-format.md) and size of the exponent.| +|**`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.| @@ -93,10 +93,10 @@ Any of these strings may have been prefixed by a sign, and may have been formatt > 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 @@ -189,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 3fd34d29720..2d8b590d46d 100644 --- a/docs/c-runtime-library/freeentry-usedentry.md +++ b/docs/c-runtime-library/freeentry-usedentry.md @@ -20,5 +20,5 @@ These constants represent values assigned by the `_heapwalk` routines to the **_ ## See also -[_heapwalk](../c-runtime-library/reference/heapwalk.md)
-[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 ca5be7933d5..3cfb4568a80 100644 --- a/docs/c-runtime-library/fseek-lseek-constants.md +++ b/docs/c-runtime-library/fseek-lseek-constants.md @@ -6,7 +6,7 @@ f1_keywords: ["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 @@ -16,7 +16,7 @@ ms.assetid: 9deeb13e-5aa3-4c33-80d8-721c80a4de9d ## Remarks -The *origin* argument specifies the initial position and can be one of the following manifest constants: +The *`origin`* argument specifies the initial position and can be one of the following manifest constants: |Constant|Meaning| |--------------|-------------| @@ -26,6 +26,6 @@ The *origin* argument specifies the initial position and can be one of the follo ## See also -[fseek, _fseeki64](../c-runtime-library/reference/fseek-fseeki64.md)
-[_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 235d80b8f2b..c6223a9cc14 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)\ diff --git a/docs/c-runtime-library/generic-text-mappings.md b/docs/c-runtime-library/generic-text-mappings.md index 07529a797af..ada65a3cd9f 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 aren't 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 d769851b725..b6783f5da23 100644 --- a/docs/c-runtime-library/get-output-format.md +++ b/docs/c-runtime-library/get-output-format.md @@ -23,7 +23,7 @@ Gets the current value of the output format flag. unsigned int _get_output_format(); ``` -## Return Value +## Return value The current value of the output format flag. @@ -37,11 +37,11 @@ The output format flag controls features of formatted I/O. The flag has two poss |-------------|---------------------| |`_get_output_format`|\| -For more compatibility information, see [Compatibility](../c-runtime-library/compatibility.md) in the Introduction. +For more compatibility information, see [Compatibility](./compatibility.md) in the Introduction. ## See also -[Format Specification Syntax: printf and wprintf Functions](../c-runtime-library/format-specification-syntax-printf-and-wprintf-functions.md)
-[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 5ae0fde5523..a359b253d35 100644 --- a/docs/c-runtime-library/getmainargs-wgetmainargs.md +++ b/docs/c-runtime-library/getmainargs-wgetmainargs.md @@ -18,38 +18,38 @@ 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`
+*`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`
+*`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. diff --git a/docs/c-runtime-library/gets-getws.md b/docs/c-runtime-library/gets-getws.md index 4783d86aac8..9c0c7f467e5 100644 --- a/docs/c-runtime-library/gets-getws.md +++ b/docs/c-runtime-library/gets-getws.md @@ -11,10 +11,10 @@ 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). @@ -43,9 +43,9 @@ wchar_t *_getws( *`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 @@ -54,11 +54,11 @@ The `gets` function reads a line from the standard input stream `stdin` and stor > [!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. -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 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| |---------------------|------------------------------------|--------------------|-----------------------| @@ -71,7 +71,7 @@ By default, this function's global state is scoped to the application. To change |`gets`|``| |`_getws`|`` or ``| -For more compatibility information, see [Compatibility](../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](./compatibility.md). ## Example @@ -100,7 +100,7 @@ Hello there!The line entered was: Hello there! ## See also -[Stream I/O](../c-runtime-library/stream-i-o.md)\ -[`fgets`, `fgetws`](../c-runtime-library/reference/fgets-fgetws.md)\ -[`fputs`, `fputws`](../c-runtime-library/reference/fputs-fputws.md)\ -[`puts`, `_putws`](../c-runtime-library/reference/puts-putws.md) +[Stream I/O](./stream-i-o.md)\ +[`fgets`, `fgetws`](./reference/fgets-fgetws.md)\ +[`fputs`, `fputws`](./reference/fputs-fputws.md)\ +[`puts`, `_putws`](./reference/puts-putws.md) diff --git a/docs/c-runtime-library/global-constants.md b/docs/c-runtime-library/global-constants.md index 568385863af..1feefd8f3e5 100644 --- a/docs/c-runtime-library/global-constants.md +++ b/docs/c-runtime-library/global-constants.md @@ -6,61 +6,61 @@ f1_keywords: ["c.constants"] helpviewer_keywords: ["global constants"] ms.assetid: 778d86fd-3ca6-4d2b-b4c5-aee6dc1efe6b --- -# Global Constants +# Global constants The Microsoft run-time library contains definitions for global constants used by library routines. To use these constants, include the appropriate header files as indicated in the description for each constant. The global constant articles follow in this section. ## Global constant articles -[32-Bit Windows Time/Date Formats](../c-runtime-library/32-bit-windows-time-date-formats.md)\ -[`BUFSIZ`](../c-runtime-library/bufsiz.md)\ -[`CLOCKS_PER_SEC`, `CLK_TCK`](../c-runtime-library/clocks-per-sec-clk-tck.md)\ -[Commit-To-Disk Constants](../c-runtime-library/commit-to-disk-constants.md)\ -[`_CRT_DISABLE_PERFCRIT_LOCKS`](../c-runtime-library/crt-disable-perfcrit-locks.md)\ -[Data Type Constants](../c-runtime-library/data-type-constants.md)\ -[Environmental Constants](../c-runtime-library/environmental-constants.md)\ -[`EOF`, `WEOF`](../c-runtime-library/eof-weof.md)\ -[errno Constants](../c-runtime-library/errno-constants.md)\ -[Exception-Handling Constants](../c-runtime-library/exception-handling-constants.md)\ -[`EXIT_SUCCESS`, `EXIT_FAILURE`](../c-runtime-library/exit-success-exit-failure.md)\ -[File Attribute Constants](../c-runtime-library/file-attribute-constants.md)\ -[File Constants](../c-runtime-library/file-constants.md)\ -[File Permission Constants](../c-runtime-library/file-permission-constants.md)\ -[File Read/Write Access Constants](../c-runtime-library/file-read-write-access-constants.md)\ -[File Translation Constants](../c-runtime-library/file-translation-constants.md)\ -[`FILENAME_MAX`](../c-runtime-library/filename-max.md)\ -[`FOPEN_MAX`, `_SYS_OPEN`](../c-runtime-library/fopen-max-sys-open.md)\ -[`_FREEENTRY`, `_USEDENTRY`](../c-runtime-library/freeentry-usedentry.md)\ -[`fseek`, `_lseek` Constants](../c-runtime-library/fseek-lseek-constants.md)\ -[Heap Constants](../c-runtime-library/heap-constants.md)\ -[`_HEAP_MAXREQ`](../c-runtime-library/heap-maxreq.md)\ -[`HUGE_VAL`, `_HUGE`](../c-runtime-library/huge-val-huge.md)\ -[Locale Categories](../c-runtime-library/locale-categories.md)\ -[`_locking` Constants](../c-runtime-library/locking-constants.md)\ -[Math Constants](../c-runtime-library/math-constants.md)\ -[Math Error Constants](../c-runtime-library/math-error-constants.md)\ -[`_MAX_ENV`](../c-runtime-library/max-env.md)\ -[`MB_CUR_MAX`](../c-runtime-library/mb-cur-max.md)\ -[`NULL`](../c-runtime-library/null-crt.md)\ -[Path Field Limits](../c-runtime-library/path-field-limits.md)\ -[`RAND_MAX`](../c-runtime-library/rand-max.md)\ -[setvbuf Constants](../c-runtime-library/setvbuf-constants.md)\ -[Sharing Constants](../c-runtime-library/sharing-constants.md)\ -[`signal` Constants](../c-runtime-library/signal-constants.md)\ -[`signal` Action Constants](../c-runtime-library/signal-action-constants.md)\ -[`spawn` Constants](../c-runtime-library/spawn-constants.md)\ -[`_stat` Structure st_mode Field Constants](../c-runtime-library/stat-structure-st-mode-field-constants.md)\ -[`stdin`, `stdout`, `stderr`](../c-runtime-library/stdin-stdout-stderr.md)\ -[`TMP_MAX`, `L_tmpnam`](../c-runtime-library/tmp-max-l-tmpnam.md)\ -[Translation Mode Constants](../c-runtime-library/translation-mode-constants.md)\ -[`_TRUNCATE`](../c-runtime-library/truncate.md)\ -[`TZNAME_MAX`](../c-runtime-library/tzname-max.md)\ -[`_WAIT_CHILD`, `_WAIT_GRANDCHILD`](../c-runtime-library/wait-child-wait-grandchild.md)\ -[`WCHAR_MAX`](../c-runtime-library/wchar-max.md)\ -[`WCHAR_MIN`](../c-runtime-library/wchar-min.md) +[32-Bit Windows Time/Date Formats](./32-bit-windows-time-date-formats.md)\ +[`BUFSIZ`](./bufsiz.md)\ +[`CLOCKS_PER_SEC`, `CLK_TCK`](./clocks-per-sec-clk-tck.md)\ +[Commit-to-disk constants](./commit-to-disk-constants.md)\ +[`_CRT_DISABLE_PERFCRIT_LOCKS`](./crt-disable-perfcrit-locks.md)\ +[Data type constants](./data-type-constants.md)\ +[Environmental constants](./environmental-constants.md)\ +[`EOF`, `WEOF`](./eof-weof.md)\ +[`errno` constants](./errno-constants.md)\ +[Exception-handling constants](./exception-handling-constants.md)\ +[`EXIT_SUCCESS`, `EXIT_FAILURE`](./exit-success-exit-failure.md)\ +[File attribute constants](./file-attribute-constants.md)\ +[File constants](./file-constants.md)\ +[File permission constants](./file-permission-constants.md)\ +[File read/write access constants](./file-read-write-access-constants.md)\ +[File translation constants](./file-translation-constants.md)\ +[`FILENAME_MAX`](./filename-max.md)\ +[`FOPEN_MAX`, `_SYS_OPEN`](./fopen-max-sys-open.md)\ +[`_FREEENTRY`, `_USEDENTRY`](./freeentry-usedentry.md)\ +[`fseek`, `_lseek` constants](./fseek-lseek-constants.md)\ +[Heap constants](./heap-constants.md)\ +[`_HEAP_MAXREQ`](./heap-maxreq.md)\ +[`HUGE_VAL`, `_HUGE`](./huge-val-huge.md)\ +[Locale categories](./locale-categories.md)\ +[`_locking` constants](./locking-constants.md)\ +[Math constants](./math-constants.md)\ +[Math error constants](./math-error-constants.md)\ +[`_MAX_ENV`](./max-env.md)\ +[`MB_CUR_MAX`](./mb-cur-max.md)\ +[`NULL`](./null-crt.md)\ +[Path field limits](./path-field-limits.md)\ +[`RAND_MAX`](./rand-max.md)\ +[`setvbuf` constants](./setvbuf-constants.md)\ +[Sharing constants](./sharing-constants.md)\ +[`signal` constants](./signal-constants.md)\ +[`signal` action constants](./signal-action-constants.md)\ +[`spawn` constants](./spawn-constants.md)\ +[`_stat` structure `st_mode` field constants](./stat-structure-st-mode-field-constants.md)\ +[`stdin`, `stdout`, `stderr`](./stdin-stdout-stderr.md)\ +[`TMP_MAX`, `L_tmpnam`](./tmp-max-l-tmpnam.md)\ +[Translation mode constants](./translation-mode-constants.md)\ +[`_TRUNCATE`](./truncate.md)\ +[`TZNAME_MAX`](./tzname-max.md)\ +[`_WAIT_CHILD`, `_WAIT_GRANDCHILD`](./wait-child-wait-grandchild.md)\ +[`WCHAR_MAX`](./wchar-max.md)\ +[`WCHAR_MIN`](./wchar-min.md) ## See also -[C Run-Time Library Reference](../c-runtime-library/c-run-time-library-reference.md)
-[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 7bdd247305e..b1d216c39c7 100644 --- a/docs/c-runtime-library/global-state.md +++ b/docs/c-runtime-library/global-state.md @@ -41,9 +41,9 @@ Global state affected by the separation of app and OS state includes: - 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) +- 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`, _mb`stok](reference/strtok-strtok-l-wcstok-wcstok-l-mbstok-mbstok-l.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)\ 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 6fcb49b0264..e8f156062ec 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 319b9c3527f..7eb11315dd8 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`.

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.| +|[`__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 80fab240588..5f8bf7164f1 100644 --- a/docs/c-runtime-library/heap-constants.md +++ b/docs/c-runtime-library/heap-constants.md @@ -6,7 +6,7 @@ f1_keywords: ["_HEAPBADPTR", "_HEAPEMPTY", "_HEAPBADBEGIN", "_HEAPOK", "_HEAPBAD 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 @@ -29,7 +29,7 @@ These constants give the return value indicating status of the heap. ## See also -[_heapchk](../c-runtime-library/reference/heapchk.md)
-[_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 e4688366f27..8d805deab66 100644 --- a/docs/c-runtime-library/heap-maxreq.md +++ b/docs/c-runtime-library/heap-maxreq.md @@ -20,6 +20,6 @@ The maximum size of a user request for memory that can be granted. ## See also -[malloc](../c-runtime-library/reference/malloc.md)
-[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 4ee7da88ea8..96f7ad9362b 100644 --- a/docs/c-runtime-library/heapadd.md +++ b/docs/c-runtime-library/heapadd.md @@ -28,17 +28,17 @@ int _heapadd( #### 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`. -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 @@ -50,15 +50,15 @@ Beginning with Visual C++ version 4.0, the underlying heap structure was moved t |-------------|---------------------|---------------------| |`_heapadd`|\|\| -For more compatibility information, see [Compatibility](../c-runtime-library/compatibility.md) in the Introduction. +For more compatibility information, see [Compatibility](./compatibility.md) in the Introduction. ## See also -[Memory Allocation](../c-runtime-library/memory-allocation.md)
-[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 1eb6c66e9eb..9be42e38cfc 100644 --- a/docs/c-runtime-library/heapset.md +++ b/docs/c-runtime-library/heapset.md @@ -27,10 +27,10 @@ int _heapset( #### Parameters -*fill*
+*`fill`*\ Fill character. -## Return Value +## Return value `_heapset` returns one of the following integer manifest constants defined in Malloc.h. @@ -55,7 +55,7 @@ The `_heapset` function shows free memory locations or nodes that have been unin |-------------|---------------------|---------------------| |`_heapset`|\|\| -For more compatibility information, see [Compatibility](../c-runtime-library/compatibility.md) in the Introduction. +For more compatibility information, see [Compatibility](./compatibility.md) in the Introduction. ## Example @@ -101,8 +101,8 @@ OK - heap is fine ## See also -[Memory Allocation](../c-runtime-library/memory-allocation.md)
-[_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 be0042e116b..9bbadc2cd52 100644 --- a/docs/c-runtime-library/huge-val-huge.md +++ b/docs/c-runtime-library/huge-val-huge.md @@ -24,4 +24,4 @@ ms.assetid: 3f044b45-02cd-46b2-b1de-87fd0441dd6a ## See also -[Global Constants](../c-runtime-library/global-constants.md) +[Global constants](./global-constants.md) diff --git a/docs/c-runtime-library/inp-inpw-inpd.md b/docs/c-runtime-library/inp-inpw-inpd.md index f6466bde4ea..6846b10f020 100644 --- a/docs/c-runtime-library/inp-inpw-inpd.md +++ b/docs/c-runtime-library/inp-inpw-inpd.md @@ -37,7 +37,7 @@ unsigned long _inpd( *`port`*\ I/O port number. -## Return Value +## Return value The functions return the byte, word, or double word read from *`port`*. There's no error return. @@ -57,13 +57,13 @@ The `inp` and `inpw` names are older, deprecated names for the `_inp` and `_inpw |`_inpw`|\| |`_inpd`|\| -For more compatibility information, see [Compatibility](../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](./compatibility.md). ## Libraries -All versions of the [C run-time libraries](../c-runtime-library/crt-library-features.md). +All versions of the [C run-time libraries](./crt-library-features.md). ## See also -[Console and Port I/O](../c-runtime-library/console-and-port-i-o.md)\ -[`outp`, `outpw`, `_outp`, `_outpw`, `_outpd`](../c-runtime-library/outp-outpw-outpd.md) +[Console and port I/O](./console-and-port-i-o.md)\ +[`outp`, `outpw`, `_outp`, `_outpw`, `_outpd`](./outp-outpw-outpd.md) diff --git a/docs/c-runtime-library/input-and-output.md b/docs/c-runtime-library/input-and-output.md index 10be91539a8..d459ce63c10 100644 --- a/docs/c-runtime-library/input-and-output.md +++ b/docs/c-runtime-library/input-and-output.md @@ -5,19 +5,19 @@ ms.date: "11/04/2016" f1_keywords: ["c.io"] helpviewer_keywords: ["input routines", "I/O [CRT]", "I/O routines", "I/O [CRT], routines", "output routines"] --- -# Input and Output +# Input and output The I/O functions read and write data to and from files and devices. File I/O operations take place in text mode or binary mode. The Microsoft run-time library has three types of I/O functions: -- [Stream I/O](../c-runtime-library/stream-i-o.md) functions treat data as a stream of individual characters. +- [Stream I/O](./stream-i-o.md) functions treat data as a stream of individual characters. -- [Low-level I/O](../c-runtime-library/low-level-i-o.md) functions invoke the operating system directly for lower-level operation than that provided by stream I/O. +- [Low-level I/O](./low-level-i-o.md) functions invoke the operating system directly for lower-level operation than that provided by stream I/O. -- [Console and port I/O](../c-runtime-library/console-and-port-i-o.md) functions read or write directly to a console (keyboard and screen) or an I/O port (such as a printer port). +- [Console and port I/O](./console-and-port-i-o.md) functions read or write directly to a console (keyboard and screen) or an I/O port (such as a printer port). > [!NOTE] > Because stream functions are buffered and low-level functions are not, these two types of functions are generally incompatible. For processing a particular file, use either stream or low-level functions exclusively. ## 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/internal-crt-globals-and-functions.md b/docs/c-runtime-library/internal-crt-globals-and-functions.md index baad53841bc..77abd7513a5 100644 --- a/docs/c-runtime-library/internal-crt-globals-and-functions.md +++ b/docs/c-runtime-library/internal-crt-globals-and-functions.md @@ -9,30 +9,30 @@ topic_type: ["apiref"] f1_keywords: ["__acrt_iob_func", "__AdjustPointer", "__badioinfo", "__BuildCatchObject", "__BuildCatchObjectHelper", "__C_specific_handler", "_calloc_base", "_chkesp", "__chkstk", "_chkstk", "_chvalidator", "_chvalidator_l", "_CIacos", "_CIasin", "_CIcosh", "_CIsinh", "_CItanh", "__clean_type_info_names_internal", "_commode", "_configure_narrow_argv", "_configure_wide_argv", "__conio_common_vcprintf", "__conio_common_vcprintf_p", "__conio_common_vcprintf_s", "__conio_common_vcscanf", "__conio_common_vcwprintf", "__conio_common_vcwprintf_p", "__conio_common_vcwprintf_s", "__conio_common_vcwscanf", "__CppXcptFilter", "_crt_at_quick_exit", "_crt_atexit", "_crtAssertBusy", "_crtBreakAlloc", "__crtCompareStringA", "__crtCompareStringEx", "__crtCompareStringW", "__crtCreateEventExW", "__crtCreateSemaphoreExW", "__crtCreateSymbolicLinkW", "_crt_debugger_hook", "__crtEnumSystemLocalesEx", "__crtFlsAlloc", "__crtFlsFree", "__crtFlsGetValue", "__crtFlsSetValue", "_CrtGetCheckCount", "__crtGetDateFormatEx", "__crtGetFileInformationByHandleEx", "__crtGetLocaleInfoEx", "__crtGetShowWindowMode", "__crtGetTickCount64", "__crtGetTimeFormatEx", "__crtGetUserDefaultLocaleName", "__crtInitializeCriticalSectionEx", "__crtIsPackagedApp", "__crtIsValidLocaleName", "__crtLCMapStringA", "__crtLCMapStringEx", "_CrtSetCheckCount", "_CrtSetDbgBlockType", "__crtSetFileInformationByHandle", "__crtSetThreadStackGuarantee", "__crtSetUnhandledExceptionFilter", "__crtSleep", "__crtTerminateProcess", "__crtUnhandledException", "__CxxDetectRethrow", "__CxxExceptionFilter", "__CxxFrameHandler2", "__CxxFrameHandler3", "__CxxLongjmpUnwind", "__CxxQueryExceptionSize", "__CxxRegisterExceptionObject", "__CxxUnregisterExceptionObject", "__daylight", "__DestructExceptionObject", "__doserrno", "_dosmaperr", "_EH_prolog", "_errno", "_except_handler2", "_except_handler4_common", "_except1", "_filbuf", "_FindAndUnlinkFrame", "_flsbuf", "__fpe_flt_rounds", "_FPE_Raise", "__fpecode", "__FrameUnwindFilter", "_free_base", "_freea_s", "_freefls", "_ftol", "__get_flsindex", "_get_initial_narrow_environment", "_get_initial_wide_environment", "_get_narrow_winmain_command_line", "_get_stream_buffer_pointers", "__get_tlsindex", "_get_wide_winmain_command_line", "_Getdays", "_Getmonths", "__GetPlatformExceptionInfo", "_getptd", "_Gettnames", "_global_unwind2", "_inconsistency", "__initenv", "_initialize_lconv_for_unsigned_char", "_initialize_narrow_environment", "_initialize_wide_environment", "_initptd", "__iob_func", "_IsExceptionObjectToBeDestroyed", "__lconv", "__lconv_init", "__libm_sse2_acos", "_libm_sse2_acos_precise", "__libm_sse2_acosf", "__libm_sse2_asin", "_libm_sse2_asin_precise", "__libm_sse2_asinf", "__libm_sse2_atan", "_libm_sse2_atan_precise", "__libm_sse2_atan2", "__libm_sse2_atanf", "__libm_sse2_cos", "_libm_sse2_cos_precise", "__libm_sse2_cosf", "__libm_sse2_exp", "_libm_sse2_exp_precise", "__libm_sse2_expf", "__libm_sse2_log", "_libm_sse2_log_precise", "__libm_sse2_log10", "_libm_sse2_log10_precise", "__libm_sse2_log10f", "__libm_sse2_logf", "__libm_sse2_pow", "_libm_sse2_pow_precise", "__libm_sse2_powf", "__libm_sse2_sin", "_libm_sse2_sin_precise", "__libm_sse2_sinf", "_libm_sse2_sqrt_precise", "__libm_sse2_tan", "_libm_sse2_tan_precise", "__libm_sse2_tanf", "_local_unwind4", "_lock_locales", "_longjmpex", "_malloc_base", "_NLG_Dispatch2", "_NLG_Return", "_NLG_Return2", "__p___argc", "__p___argv", "__p___initenv", "__p___wargv", "__p___winitenv", "__p__acmdln", "__p__crtAssertBusy", "__p__crtBreakAlloc", "__p__crtDbgFlag", "__p__daylight", "__p__dstbias", "__p__environ", "__p__iob", "__p__mbcasemap", "__p__mbctype", "__p__pctype", "__p__pgmptr", "__p__pwctype", "__p__timezone", "__p__tzname", "__p__wcmdln", "__p__wenviron", "__p__wpgmptr", "__pioinfo", "_pwctype", "__pwctype_func", "__pxcptinfoptrs", "_query_app_type", "_realloc_base", "_register_thread_local_exe_atexit_callback", "__report_gsfailure", "__RTCastToVoid", "__RTtypeid", "_seh_longjmp_unwind", "_seh_longjmp_unwind4", "_set_malloc_crt_max_wait", "__setlc_active", "_SetWinRTOutOfMemoryExceptionCallback", "_sopen_dispatch", "__std_exception_copy", "__std_exception_destroy", "__std_type_info_destroy_list", "__stdio_common_vfprintf", "__stdio_common_vfprintf_p", "__stdio_common_vfprintf_s", "__stdio_common_vfscanf", "__stdio_common_vfwprintf", "__stdio_common_vfwprintf_p", "__stdio_common_vfwprintf_s", "__stdio_common_vfwscanf", "__stdio_common_vsnprintf_s", "__stdio_common_vsnwprintf_s", "__stdio_common_vsprintf", "__stdio_common_vsprintf_p", "__stdio_common_vsprintf_s", "__stdio_common_vsscanf", "__stdio_common_vswprintf", "__stdio_common_vswprintf_p", "__stdio_common_vswprintf_s", "__stdio_common_vswscanf", "_Strftime", "__STRINGTOLD", "__STRINGTOLD_L", "__strncnt", "__threadhandle", "__threadid", "__timezone", "__TypeMatch", "__tzname", "__unDName", "__unDNameEx", "__unDNameHelper", "__unguarded_readlc_active", "_unlock_locales", "_vacopy", "_ValidateExecute", "_ValidateRead", "_ValidateWrite", "_VCrtDbgReportA", "_VCrtDbgReportW", "_W_Getdays", "_W_Getmonths", "_W_Getnames", "_Wcsftime", "__wcsncnt", "__winitenv", "_wsopen_dispatch", "_Xbad_alloc", "_Xlength_error"] helpviewer_keywords: ["__acrt_iob_func", "__AdjustPointer", "_assert", "__badioinfo", "__BuildCatchObject", "__BuildCatchObjectHelper", "__C_specific_handler", "_calloc_base", "_chkesp", "__chkstk", "_chkstk", "_chvalidator", "_chvalidator_l", "_CIacos", "_CIasin", "_CIcosh", "_CIsinh", "_CItanh", "__clean_type_info_names_internal", "_commode", "_configure_narrow_argv", "_configure_wide_argv", "__conio_common_vcprintf", "__conio_common_vcprintf_p", "__conio_common_vcprintf_s", "__conio_common_vcscanf", "__conio_common_vcwprintf", "__conio_common_vcwprintf_p", "__conio_common_vcwprintf_s", "__conio_common_vcwscanf", "__CppXcptFilter", "__create_locale", "_crt_at_quick_exit", "_crt_atexit", "_crtAssertBusy", "_crtBreakAlloc", "__crtCompareStringA", "__crtCompareStringEx", "__crtCompareStringW", "__crtCreateEventExW", "__crtCreateSemaphoreExW", "__crtCreateSymbolicLinkW", "_crt_debugger_hook", "__crtEnumSystemLocalesEx", "__crtFlsAlloc", "__crtFlsFree", "__crtFlsGetValue", "__crtFlsSetValue", "_CrtGetCheckCount", "__crtGetDateFormatEx", "__crtGetFileInformationByHandleEx", "__crtGetLocaleInfoEx", "__crtGetShowWindowMode", "__crtGetTickCount64", "__crtGetTimeFormatEx", "__crtGetUserDefaultLocaleName", "__crtInitializeCriticalSectionEx", "__crtIsPackagedApp", "__crtIsValidLocaleName", "__crtLCMapStringA", "__crtLCMapStringEx", "_CrtSetCheckCount", "_CrtSetDbgBlockType", "__crtSetFileInformationByHandle", "__crtSetThreadStackGuarantee", "__crtSetUnhandledExceptionFilter", "__crtSleep", "__crtTerminateProcess", "__crtUnhandledException", "__CxxDetectRethrow", "__CxxExceptionFilter", "__CxxFrameHandler2", "__CxxFrameHandler3", "__CxxLongjmpUnwind", "__CxxQueryExceptionSize", "__CxxRegisterExceptionObject", "_CxxThrowException", "__CxxUnregisterExceptionObject", "__daylight", "_dclass", "__DestructExceptionObject", "__doserrno", "_dosmaperr", "_dpcomp", "_dsign", "__dstbias", "_dtest", "_EH_prolog", "_errno", "_except_handler2", "_except_handler4_common", "_except1", "_fdclass", "_fdpcomp", "_fdsign", "_fdtest", "_filbuf", "_FindAndUnlinkFrame", "_flsbuf", "__fpe_flt_rounds", "_FPE_Raise", "__fpecode", "__FrameUnwindFilter", "_fread_nolock_s", "_free_base", "__free_locale", "_freea_s", "_freefls", "_ftol", "__get_current_locale", "__get_flsindex", "_get_initial_narrow_environment", "_get_initial_wide_environment", "_get_narrow_winmain_command_line", "_get_stream_buffer_pointers", "__get_tlsindex", "_get_wide_winmain_command_line", "_Getdays", "_Getmonths", "__GetPlatformExceptionInfo", "_getptd", "_Gettnames", "_global_unwind2", "_inconsistency", "__initenv", "_initialize_lconv_for_unsigned_char", "_initialize_narrow_environment", "_initialize_wide_environment", "_initptd", "_invalid_parameter", "_invoke_watson", "__iob_func", "_IsExceptionObjectToBeDestroyed", "__lconv", "__lconv_init", "_ldclass", "_ldpcomp", "_ldsign", "_ldtest", "__libm_sse2_acos", "_libm_sse2_acos_precise", "__libm_sse2_acosf", "__libm_sse2_asin", "_libm_sse2_asin_precise", "__libm_sse2_asinf", "__libm_sse2_atan", "_libm_sse2_atan_precise", "__libm_sse2_atan2", "__libm_sse2_atanf", "__libm_sse2_cos", "_libm_sse2_cos_precise", "__libm_sse2_cosf", "__libm_sse2_exp", "_libm_sse2_exp_precise", "__libm_sse2_expf", "__libm_sse2_log", "_libm_sse2_log_precise", "__libm_sse2_log10", "_libm_sse2_log10_precise", "__libm_sse2_log10f", "__libm_sse2_logf", "__libm_sse2_pow", "_libm_sse2_pow_precise", "__libm_sse2_powf", "__libm_sse2_sin", "_libm_sse2_sin_precise", "__libm_sse2_sinf", "_libm_sse2_sqrt_precise", "__libm_sse2_tan", "_libm_sse2_tan_precise", "__libm_sse2_tanf", "_local_unwind4", "_lock_locales", "_longjmpex", "_malloc_base", "_mbctype", "_NLG_Dispatch2", "_NLG_Return", "_NLG_Return2", "__p___argc", "__p___argv", "__p___initenv", "__p___wargv", "__p___winitenv", "__p__acmdln", "__p__crtAssertBusy", "__p__crtBreakAlloc", "__p__crtDbgFlag", "__p__daylight", "__p__dstbias", "__p__environ", "__p__iob", "__p__mbcasemap", "__p__mbctype", "__p__pctype", "__p__pgmptr", "__p__pwctype", "__p__timezone", "__p__tzname", "__p__wcmdln", "__p__wenviron", "__p__wpgmptr", "_pctype", "__pioinfo", "_pwctype", "__pwctype_func", "__pxcptinfoptrs", "_query_app_type", "_realloc_base", "_register_thread_local_exe_atexit_callback", "__report_gsfailure", "__RTCastToVoid", "__RTtypeid", "_seh_filter_dll", "_seh_filter_exe", "_seh_longjmp_unwind", "_seh_longjmp_unwind4", "_set_malloc_crt_max_wait", "__setlc_active", "_SetWinRTOutOfMemoryExceptionCallback", "_sopen_dispatch", "__std_exception_copy", "__std_exception_destroy", "__std_type_info_destroy_list", "__stdio_common_vfprintf", "__stdio_common_vfprintf_p", "__stdio_common_vfprintf_s", "__stdio_common_vfscanf", "__stdio_common_vfwprintf", "__stdio_common_vfwprintf_p", "__stdio_common_vfwprintf_s", "__stdio_common_vfwscanf", "__stdio_common_vsnprintf_s", "__stdio_common_vsnwprintf_s", "__stdio_common_vsprintf", "__stdio_common_vsprintf_p", "__stdio_common_vsprintf_s", "__stdio_common_vsscanf", "__stdio_common_vswprintf", "__stdio_common_vswprintf_p", "__stdio_common_vswprintf_s", "__stdio_common_vswscanf", "_Strftime", "__STRINGTOLD", "__STRINGTOLD_L", "__strncnt", "__sys_errlist", "__sys_nerr", "__threadhandle", "__threadid", "__timezone", "__TypeMatch", "__tzname", "__unDName", "__unDNameEx", "__unDNameHelper", "__unguarded_readlc_active", "_unloaddll", "_unlock_locales", "_vacopy", "_ValidateExecute", "_ValidateRead", "_ValidateWrite", "_VCrtDbgReportA", "_VCrtDbgReportW", "_W_Getdays", "_W_Getmonths", "_W_Getnames", "_wassert", "_Wcsftime", "__wcsncnt", "__winitenv", "_wsopen_dispatch", "_Xbad_alloc", "_Xlength_error"] --- -# Internal CRT Globals and Functions +# Internal CRT globals and functions The C runtime (CRT) library contains functions and global variables that are used only to support the public library interface. Some of them are exposed in public headers as implementation details. Although these functions and global variables are accessible through public exports, they're not intended for use by your code. We recommend that you change any code that uses these functions and variables to use public library equivalents instead. These functions may change from version to version. They're listed here to help you identify them. Links are provided when other documentation exists, but in general, these implementation details aren't documented. -## Internal CRT Globals and Value Macros +## Internal CRT globals and value macros These global variables and macro definitions are used to implement the CRT. |Name| |----------| |`__badioinfo`| -|[`_acmdln`](../c-runtime-library/acmdln-tcmdln-wcmdln.md)| +|[`_acmdln`](./acmdln-tcmdln-wcmdln.md)| |`_commode`| |`_crtAssertBusy`| |`_crtBreakAlloc`| |`__initenv`| |`__lconv`| -|[`__mb_cur_max`](../c-runtime-library/mb-cur-max-func-mb-cur-max-l-func-p-mb-cur-max-mb-cur-max.md)| +|[`__mb_cur_max`](./mb-cur-max-func-mb-cur-max-l-func-p-mb-cur-max-mb-cur-max.md)| |`__pioinfo`| |`__unguarded_readlc_active`| -|[`_wcmdln`](../c-runtime-library/acmdln-tcmdln-wcmdln.md)| +|[`_wcmdln`](./acmdln-tcmdln-wcmdln.md)| |`__winitenv`| -## Internal CRT Functions and Function Macros +## Internal CRT functions and function macros These functions and function macros are used to implement the CRT and the C++ Standard Library. @@ -52,19 +52,19 @@ These functions and function macros are used to implement the CRT and the C++ St |`_chvalidator_l`| |`_CIacos`| |`_CIasin`| -|[`_CIatan`](../c-runtime-library/ciatan.md)| -|[`_CIatan2`](../c-runtime-library/ciatan2.md)| -|[`_CIcos`](../c-runtime-library/cicos.md)| +|[`_CIatan`](./ciatan.md)| +|[`_CIatan2`](./ciatan2.md)| +|[`_CIcos`](./cicos.md)| |`_CIcosh`| -|[`_CIexp`](../c-runtime-library/ciexp.md)| -|[`_CIfmod`](../c-runtime-library/cifmod.md)| -|[`_CIlog`](../c-runtime-library/cilog.md)| -|[`_CIlog10`](../c-runtime-library/cilog10.md)| -|[`_CIpow`](../c-runtime-library/cipow.md)| -|[`_CIsin`](../c-runtime-library/cisin.md)| +|[`_CIexp`](./ciexp.md)| +|[`_CIfmod`](./cifmod.md)| +|[`_CIlog`](./cilog.md)| +|[`_CIlog10`](./cilog10.md)| +|[`_CIpow`](./cipow.md)| +|[`_CIsin`](./cisin.md)| |`_CIsinh`| -|[`_CIsqrt`](../c-runtime-library/cisqrt.md)| -|[`_CItan`](../c-runtime-library/citan.md)| +|[`_CIsqrt`](./cisqrt.md)| +|[`_CItan`](./citan.md)| |`_CItanh`| |`__clean_type_info_names_internal`| |`_configure_narrow_argv`| @@ -106,7 +106,7 @@ These functions and function macros are used to implement the CRT and the C++ St |`__crtIsValidLocaleName`| |`__crtLCMapStringA`| |`__crtLCMapStringEx`| -|[`__crtLCMapStringW`](../c-runtime-library/crtlcmapstringw.md)| +|[`__crtLCMapStringW`](./crtlcmapstringw.md)| |`_CrtSetCheckCount`| |`_CrtSetDbgBlockType`| |`__crtSetFileInformationByHandle`| @@ -117,7 +117,7 @@ These functions and function macros are used to implement the CRT and the C++ St |`__crtUnhandledException`| |`__CxxDetectRethrow`| |`__CxxExceptionFilter`| -|[`__CxxFrameHandler`](../c-runtime-library/cxxframehandler.md)| +|[`__CxxFrameHandler`](./cxxframehandler.md)| |`__CxxFrameHandler2`| |`__CxxFrameHandler3`| |`__CxxLongjmpUnwind`| @@ -128,7 +128,7 @@ These functions and function macros are used to implement the CRT and the C++ St |`__daylight`| |`_dclass`| |`__DestructExceptionObject`| -|[`__dllonexit`](../c-runtime-library/dllonexit.md)| +|[`__dllonexit`](./dllonexit.md)| |`__doserrno`| |`_dosmaperr`| |`_dpcomp`| @@ -138,10 +138,10 @@ These functions and function macros are used to implement the CRT and the C++ St |`_EH_prolog`| |`_errno`| |`_except_handler2`| -|[`_except_handler3`](../c-runtime-library/except-handler3.md)| +|[`_except_handler3`](./except-handler3.md)| |`_except_handler4_common`| |`_except1`| -|[`_execute_onexit_table`](../c-runtime-library/execute-onexit-table-initialize-onexit-table-register-onexit-function.md)| +|[`_execute_onexit_table`](./execute-onexit-table-initialize-onexit-table-register-onexit-function.md)| |`_fdclass`| |`_fdpcomp`| |`_fdsign`| @@ -168,7 +168,7 @@ These functions and function macros are used to implement the CRT and the C++ St |`__get_tlsindex`| |`_get_wide_winmain_command_line`| |`_Getdays`| -|[`__getmainargs`](../c-runtime-library/getmainargs-wgetmainargs.md)| +|[`__getmainargs`](./getmainargs-wgetmainargs.md)| |`_Getmonths`| |`__GetPlatformExceptionInfo`| |`_getptd`| @@ -177,16 +177,16 @@ These functions and function macros are used to implement the CRT and the C++ St |`_inconsistency`| |`_initialize_lconv_for_unsigned_char`| |`_initialize_narrow_environment`| -|[`_initialize_onexit_table`](../c-runtime-library/execute-onexit-table-initialize-onexit-table-register-onexit-function.md)| +|[`_initialize_onexit_table`](./execute-onexit-table-initialize-onexit-table-register-onexit-function.md)| |`_initialize_wide_environment`| |`_initptd`| |`_invalid_parameter`| |`_invoke_watson`| |`__iob_func`| |`_IsExceptionObjectToBeDestroyed`| -|[`___lc_codepage_func`](../c-runtime-library/lc-codepage-func.md)| -|[`___lc_collate_cp_func`](../c-runtime-library/lc-collate-cp-func.md)| -|[`___lc_locale_name_func`](../c-runtime-library/lc-locale-name-func.md)| +|[`___lc_codepage_func`](./lc-codepage-func.md)| +|[`___lc_collate_cp_func`](./lc-collate-cp-func.md)| +|[`___lc_locale_name_func`](./lc-locale-name-func.md)| |`__lconv_init`| |`_ldclass`| |`_ldpcomp`| @@ -224,13 +224,13 @@ These functions and function macros are used to implement the CRT and the C++ St |`__libm_sse2_tan`| |`_libm_sse2_tan_precise`| |`__libm_sse2_tanf`| -|[`_local_unwind2`](../c-runtime-library/local-unwind2.md)| +|[`_local_unwind2`](./local-unwind2.md)| |`_local_unwind4`| |`_lock_locales`| |`_longjmpex`| |`_malloc_base`| -|[`___mb_cur_max_func`](../c-runtime-library/mb-cur-max-func-mb-cur-max-l-func-p-mb-cur-max-mb-cur-max.md)| -|[`___mb_cur_max_l_func`](../c-runtime-library/mb-cur-max-func-mb-cur-max-l-func-p-mb-cur-max-mb-cur-max.md)| +|[`___mb_cur_max_func`](./mb-cur-max-func-mb-cur-max-l-func-p-mb-cur-max-mb-cur-max.md)| +|[`___mb_cur_max_l_func`](./mb-cur-max-func-mb-cur-max-l-func-p-mb-cur-max-mb-cur-max.md)| |`_mbctype`| |`_NLG_Dispatch2`| |`_NLG_Return`| @@ -238,18 +238,18 @@ These functions and function macros are used to implement the CRT and the C++ St |`__p___argc`| |`__p___argv`| |`__p___initenv`| -|[`__p___mb_cur_max`](../c-runtime-library/mb-cur-max-func-mb-cur-max-l-func-p-mb-cur-max-mb-cur-max.md)| +|[`__p___mb_cur_max`](./mb-cur-max-func-mb-cur-max-l-func-p-mb-cur-max-mb-cur-max.md)| |`__p___wargv`| |`__p___winitenv`| |`__p__acmdln`| -|[`__p__commode`](../c-runtime-library/p-commode.md)| +|[`__p__commode`](./p-commode.md)| |`__p__crtAssertBusy`| |`__p__crtBreakAlloc`| |`__p__crtDbgFlag`| |`__p__daylight`| |`__p__dstbias`| |`__p__environ`| -|[`__p__fmode`](../c-runtime-library/p-fmode.md)| +|[`__p__fmode`](./p-fmode.md)| |`__p__iob`| |`__p__mbcasemap`| |`__p__mbctype`| @@ -262,28 +262,28 @@ These functions and function macros are used to implement the CRT and the C++ St |`__p__wenviron`| |`__p__wpgmptr`| |`_pctype`| -|[`__pctype_func`](../c-runtime-library/pctype-func.md)| +|[`__pctype_func`](./pctype-func.md)| |`_pwctype`| |`__pwctype_func`| |`__pxcptinfoptrs`| |`_query_app_type`| |`_realloc_base`| -|[`_register_onexit_function`](../c-runtime-library/execute-onexit-table-initialize-onexit-table-register-onexit-function.md)| +|[`_register_onexit_function`](./execute-onexit-table-initialize-onexit-table-register-onexit-function.md)| |`_register_thread_local_exe_atexit_callback`| |`__report_gsfailure`| |`__RTCastToVoid`| -|[`__RTDynamicCast`](../c-runtime-library/rtdynamiccast.md)| +|[`__RTDynamicCast`](./rtdynamiccast.md)| |`__RTtypeid`| |`_seh_filter_dll`| |`_seh_filter_exe`| |`_seh_longjmp_unwind`| |`_seh_longjmp_unwind4`| -|[`__set_app_type`](../c-runtime-library/internal-set-app-type.md)| +|[`__set_app_type`](./internal-set-app-type.md)| |`_set_malloc_crt_max_wait`| -|[`_setjmp3`](../c-runtime-library/setjmp3.md)| +|[`_setjmp3`](./setjmp3.md)| |`__setlc_active`| -|[`___setlc_active_func`](../c-runtime-library/setlc-active-func-unguarded-readlc-active-add-func.md)| -|[`__setusermatherr`](../c-runtime-library/setusermatherr.md)| +|[`___setlc_active_func`](./setlc-active-func-unguarded-readlc-active-add-func.md)| +|[`__setusermatherr`](./setusermatherr.md)| |`_SetWinRTOutOfMemoryExceptionCallback`| |`_sopen_dispatch`| |`__std_exception_copy`| @@ -323,7 +323,7 @@ These functions and function macros are used to implement the CRT and the C++ St |`__unDNameEx`| |`__unDNameHelper`| |`__unguarded_readlc_active`| -|[`___unguarded_readlc_active_add_func`](../c-runtime-library/setlc-active-func-unguarded-readlc-active-add-func.md)| +|[`___unguarded_readlc_active_add_func`](./setlc-active-func-unguarded-readlc-active-add-func.md)| |`_unloaddll`| |`_unlock_locales`| |`_vacopy`| @@ -339,11 +339,11 @@ These functions and function macros are used to implement the CRT and the C++ St |`_wassert`| |`_Wcsftime`| |`__wcsncnt`| -|[`__wgetmainargs`](../c-runtime-library/getmainargs-wgetmainargs.md)| +|[`__wgetmainargs`](./getmainargs-wgetmainargs.md)| |`_wsopen_dispatch`| |`_Xbad_alloc`| |`_Xlength_error`| ## 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/internal-set-app-type.md b/docs/c-runtime-library/internal-set-app-type.md index 9a86584f3ab..37f3bbd3901 100644 --- a/docs/c-runtime-library/internal-set-app-type.md +++ b/docs/c-runtime-library/internal-set-app-type.md @@ -24,7 +24,7 @@ void __set_app_type ( #### Parameters -*at*
+*`at`*\ A value that indicates the application type. The possible values are: |Value|Description| diff --git a/docs/c-runtime-library/internationalization.md b/docs/c-runtime-library/internationalization.md index e22e1915491..e66a9a923f6 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 d33d043d0ec..24d5dcd23d9 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| +|[`_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| +|[`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 ad06d4eeb82..4d7c4504e12 100644 --- a/docs/c-runtime-library/iob.md +++ b/docs/c-runtime-library/iob.md @@ -26,4 +26,4 @@ FILE _iob[_IOB_ENTRIES]; ## See also -[Global Variables](../c-runtime-library/global-variables.md) +[Global variables](./global-variables.md) diff --git a/docs/c-runtime-library/is-isw-routines.md b/docs/c-runtime-library/is-isw-routines.md index 96e98fcb4ff..ed954731123 100644 --- a/docs/c-runtime-library/is-isw-routines.md +++ b/docs/c-runtime-library/is-isw-routines.md @@ -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 `` as an **`unsigned short`**. It can hold any wide character or the wide-character end-of-file (`WEOF`) value. -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. +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. In the "C" locale, the test conditions for the `is` routines are as follows: @@ -328,8 +328,8 @@ int main( void ) ## See also -[Character classification](../c-runtime-library/character-classification.md)\ -[Locale](../c-runtime-library/locale.md)\ -[`setlocale`, `_wsetlocale`](../c-runtime-library/reference/setlocale-wsetlocale.md)\ -[Interpretation of multibyte-character sequences](../c-runtime-library/interpretation-of-multibyte-character-sequences.md)\ -[`to` Functions](../c-runtime-library/to-functions.md) +[Character classification](./character-classification.md)\ +[Locale](./locale.md)\ +[`setlocale`, `_wsetlocale`](./reference/setlocale-wsetlocale.md)\ +[Interpretation of multibyte-character sequences](./interpretation-of-multibyte-character-sequences.md)\ +[`to` functions](./to-functions.md) diff --git a/docs/c-runtime-library/ismbb-routines.md b/docs/c-runtime-library/ismbb-routines.md index 38b9d7044b4..2d24fedf48a 100644 --- a/docs/c-runtime-library/ismbb-routines.md +++ b/docs/c-runtime-library/ismbb-routines.md @@ -10,43 +10,43 @@ Tests the given integer value `c` for a particular condition, by using the curre :::row::: :::column span=""::: - [`_ismbbalnum`, `_ismbbalnum_l`](../c-runtime-library/reference/ismbbalnum-ismbbalnum-l.md)\ - [`_ismbbalpha`, `_ismbbalpha_l`](../c-runtime-library/reference/ismbbalpha-ismbbalpha-l.md)\ - [`_ismbbblank`, `_ismbbblank_l`](../c-runtime-library/reference/ismbbblank-ismbbblank-l.md)\ - [`_ismbbgraph`, `_ismbbgraph_l`](../c-runtime-library/reference/ismbbgraph-ismbbgraph-l.md)\ - [`_ismbbkalnum`, `_ismbbkalnum_l`](../c-runtime-library/reference/ismbbkalnum-ismbbkalnum-l.md)\ - [`_ismbbkana`, `_ismbbkana_l`](../c-runtime-library/reference/ismbbkana-ismbbkana-l.md)\ - [`_ismbbkprint`, `_ismbbkprint_l`](../c-runtime-library/reference/ismbbkprint-ismbbkprint-l.md)\ - [`_ismbbkpunct`, `_ismbbkpunct_l`](../c-runtime-library/reference/ismbbkpunct-ismbbkpunct-l.md)\ - [`_ismbblead`, `_ismbblead_l`](../c-runtime-library/reference/ismbblead-ismbblead-l.md)\ - [`_ismbbprint`, `_ismbbprint_l`](../c-runtime-library/reference/ismbbprint-ismbbprint-l.md)\ - [`_ismbbpunct`, `_ismbbpunct_l`](../c-runtime-library/reference/ismbbpunct-ismbbpunct-l.md)\ - [`_ismbbtrail`, `_ismbbtrail_l`](../c-runtime-library/reference/ismbbtrail-ismbbtrail-l.md)\ + [`_ismbbalnum`, `_ismbbalnum_l`](./reference/ismbbalnum-ismbbalnum-l.md)\ + [`_ismbbalpha`, `_ismbbalpha_l`](./reference/ismbbalpha-ismbbalpha-l.md)\ + [`_ismbbblank`, `_ismbbblank_l`](./reference/ismbbblank-ismbbblank-l.md)\ + [`_ismbbgraph`, `_ismbbgraph_l`](./reference/ismbbgraph-ismbbgraph-l.md)\ + [`_ismbbkalnum`, `_ismbbkalnum_l`](./reference/ismbbkalnum-ismbbkalnum-l.md)\ + [`_ismbbkana`, `_ismbbkana_l`](./reference/ismbbkana-ismbbkana-l.md)\ + [`_ismbbkprint`, `_ismbbkprint_l`](./reference/ismbbkprint-ismbbkprint-l.md)\ + [`_ismbbkpunct`, `_ismbbkpunct_l`](./reference/ismbbkpunct-ismbbkpunct-l.md)\ + [`_ismbblead`, `_ismbblead_l`](./reference/ismbblead-ismbblead-l.md)\ + [`_ismbbprint`, `_ismbbprint_l`](./reference/ismbbprint-ismbbprint-l.md)\ + [`_ismbbpunct`, `_ismbbpunct_l`](./reference/ismbbpunct-ismbbpunct-l.md)\ + [`_ismbbtrail`, `_ismbbtrail_l`](./reference/ismbbtrail-ismbbtrail-l.md)\ :::column-end::: :::row-end::: ## Remarks -Every routine in the `_ismbb` family tests the given integer value `c` for a particular condition. The test result depends on the multibyte code page that's in effect. By default, the multibyte code page is set to the ANSI code page that's obtained from the operating system at program startup. You can use [`_getmbcp`](../c-runtime-library/reference/getmbcp.md) to query for the multibyte code page that's in use, or [`_setmbcp`](../c-runtime-library/reference/setmbcp.md) to change it. +Every routine in the `_ismbb` family tests the given integer value `c` for a particular condition. The test result depends on the multibyte code page that's in effect. By default, the multibyte code page is set to the ANSI code page that's obtained from the operating system at program startup. You can use [`_getmbcp`](./reference/getmbcp.md) to query for the multibyte code page that's in use, or [`_setmbcp`](./reference/setmbcp.md) to change it. -The output value is affected by the setting of the `LC_CTYPE` category setting of the locale; for more information, see [`setlocale`, `_wsetlocale`](../c-runtime-library/reference/setlocale-wsetlocale.md). The versions of these functions that don't have the **`_l`** suffix use the current locale for this locale-dependent behavior; the versions that do have the **`_l`** suffix are identical except that instead they use the locale parameter that's passed in. +The output value is affected by the setting of the `LC_CTYPE` category setting of the locale; for more information, see [`setlocale`, `_wsetlocale`](./reference/setlocale-wsetlocale.md). The versions of these functions that don't have the **`_l`** suffix use the current locale for this locale-dependent behavior; the versions that do have the **`_l`** suffix are identical except that instead they use the locale parameter that's passed in. The routines in the `_ismbb` family test the given integer `c` as follows. | Routine | Byte test condition | |--|--| -| [`_ismbbalnum`](../c-runtime-library/reference/ismbbalnum-ismbbalnum-l.md) | `isalnum(c) || _ismbbkalnum(c)` | +| [`_ismbbalnum`](./reference/ismbbalnum-ismbbalnum-l.md) | `isalnum(c) || _ismbbkalnum(c)` | | [`_ismbbalpha`](reference/ismbbalpha-ismbbalpha-l.md) | `isalpha(c) || _ismbbkalpha(c)` | -| [`_ismbbblank`](../c-runtime-library/reference/ismbbblank-ismbbblank-l.md) | `isblank(c)` | -| [`_ismbbgraph`](../c-runtime-library/reference/ismbbgraph-ismbbgraph-l.md) | Same as `_ismbbprint`, but `_ismbbgraph` doesn't include the space character (0x20) | -| [`_ismbbkalnum`](../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`](../c-runtime-library/reference/ismbbkana-ismbbkana-l.md) | Katakana (0xA1 - 0xDF). Specific to code page 932 | -| [`_ismbbkprint`](../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`](../c-runtime-library/reference/ismbbkpunct-ismbbkpunct-l.md) | Non-ASCII punctuation. For example, in code page 932 only, `_ismbbkpunct` tests for katakana punctuation | -| [`_ismbblead`](../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`](../c-runtime-library/reference/ismbbprint-ismbbprint-l.md) | `isprint(c) || _ismbbkprint(c)`. `ismbbprint` includes the space character (0x20) | -| [`_ismbbpunct`](../c-runtime-library/reference/ismbbpunct-ismbbpunct-l.md) | `ispunct(c) || _ismbbkpunct(c)`. | -| [`_ismbbtrail`](../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 | +| [`_ismbbblank`](./reference/ismbbblank-ismbbblank-l.md) | `isblank(c)` | +| [`_ismbbgraph`](./reference/ismbbgraph-ismbbgraph-l.md) | Same as `_ismbbprint`, but `_ismbbgraph` doesn't include the space character (0x20) | +| [`_ismbbkalnum`](./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`](./reference/ismbbkana-ismbbkana-l.md) | Katakana (0xA1 - 0xDF). Specific to code page 932 | +| [`_ismbbkprint`](./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`](./reference/ismbbkpunct-ismbbkpunct-l.md) | Non-ASCII punctuation. For example, in code page 932 only, `_ismbbkpunct` tests for katakana punctuation | +| [`_ismbblead`](./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`](./reference/ismbbprint-ismbbprint-l.md) | `isprint(c) || _ismbbkprint(c)`. `ismbbprint` includes the space character (0x20) | +| [`_ismbbpunct`](./reference/ismbbpunct-ismbbpunct-l.md) | `ispunct(c) || _ismbbkpunct(c)`. | +| [`_ismbbtrail`](./reference/ismbbtrail-ismbbtrail-l.md) | Second byte of multibyte character. For example, in code page 932 only, valid ranges are 0x40 - 0x7E, 0x80 - 0xEC | The following table shows the `|`-combined values that compose the test conditions for these routines. The manifest constants `_BLANK`, `_DIGIT`, `_LOWER`, `_PUNCT`, and `_UPPER` are defined in *`ctype.h`*. @@ -62,11 +62,11 @@ The following table shows the `|`-combined values that compose the test conditio | `_ismbbprint` | x | x | x | x | x | x | x | | `_ismbbpunct` | — | — | — | x | — | — | x | -The `_ismbb` routines are implemented both as functions and as macros. For more information about how to choose either implementation, see [Recommendations for choosing between functions and macros](../c-runtime-library/recommendations-for-choosing-between-functions-and-macros.md). +The `_ismbb` routines are implemented both as functions and as macros. For more information about how to choose either implementation, see [Recommendations for choosing between functions and macros](./recommendations-for-choosing-between-functions-and-macros.md). ## See also -[Byte classification](../c-runtime-library/byte-classification.md)\ -[`is`, `isw` routines](../c-runtime-library/is-isw-routines.md)\ -[`_mbbtombc`, `_mbbtombc_l`](../c-runtime-library/reference/mbbtombc-mbbtombc-l.md)\ -[`_mbctombb`, `_mbctombb_l`](../c-runtime-library/reference/mbctombb-mbctombb-l.md) +[Byte classification](./byte-classification.md)\ +[`is`, `isw` routines](./is-isw-routines.md)\ +[`_mbbtombc`, `_mbbtombc_l`](./reference/mbbtombc-mbbtombc-l.md)\ +[`_mbctombb`, `_mbctombb_l`](./reference/mbctombb-mbctombb-l.md) diff --git a/docs/c-runtime-library/ismbc-routines.md b/docs/c-runtime-library/ismbc-routines.md index 1bdfbadd42a..22c272e3140 100644 --- a/docs/c-runtime-library/ismbc-routines.md +++ b/docs/c-runtime-library/ismbc-routines.md @@ -15,35 +15,35 @@ Each **_ismbc** routine tests a given multibyte character `c` for a particular c :::row::: :::column span=""::: - [_ismbcalnum, _ismbcalnum_l, _ismbcalpha, _ismbcalpha_l, _ismbcdigit, _ismbcdigit_l](../c-runtime-library/reference/ismbcalnum-functions.md)\ - [_ismbcl0, _ismbcl0_l, _ismbcl1, _ismbcl1_l, _ismbcl2, _ismbcl2_l](../c-runtime-library/reference/ismbcl0-ismbcl0-l-ismbcl1-ismbcl1-l-ismbcl2-ismbcl2-l.md)\ - [_ismbcgraph, _ismbcgraph_l, _ismbcprint, _ismbcprint_l, _ismbcpunct, _ismbcpunct_l, _ismbcblank, _ismbcblank_l, _ismbcspace, _ismbcspace_l](../c-runtime-library/reference/ismbcgraph-functions.md)\ - [_ismbclegal, _ismbclegal_l, _ismbcsymbol, _ismbcsymbol_l](../c-runtime-library/reference/ismbclegal-ismbclegal-l-ismbcsymbol-ismbcsymbol-l.md)\ - [_ismbchira, _ismbchira_l, _ismbckata, _ismbckata_l](../c-runtime-library/reference/ismbchira-ismbchira-l-ismbckata-ismbckata-l.md)\ - [_ismbclower, _ismbclower_l, _ismbcupper, _ismbcupper_l](../c-runtime-library/reference/ismbclower-ismbclower-l-ismbcupper-ismbcupper-l.md) + [`_ismbcalnum`, `_ismbcalnum_l`, `_ismbcalpha`, `_ismbcalpha_l`, `_ismbcdigit`, `_ismbcdigit_l`](./reference/ismbcalnum-functions.md)\ + [`_ismbcl0`, `_ismbcl0_l`, `_ismbcl1`, `_ismbcl1_l`, `_ismbcl2`, `_ismbcl2_l`](./reference/ismbcl0-ismbcl0-l-ismbcl1-ismbcl1-l-ismbcl2-ismbcl2-l.md)\ + [`_ismbcgraph`, `_ismbcgraph_l`, `_ismbcprint`, `_ismbcprint_l`, `_ismbcpunct`, `_ismbcpunct_l`, `_ismbcblank`, `_ismbcblank_l`, `_ismbcspace`, `_ismbcspace_l`](./reference/ismbcgraph-functions.md)\ + [`_ismbclegal`, `_ismbclegal_l`, `_ismbcsymbol`, `_ismbcsymbol_l`](./reference/ismbclegal-ismbclegal-l-ismbcsymbol-ismbcsymbol-l.md)\ + [`_ismbchira`, `_ismbchira_l`, `_ismbckata`, `_ismbckata_l`](./reference/ismbchira-ismbchira-l-ismbckata-ismbckata-l.md)\ + [`_ismbclower`, `_ismbclower_l`, `_ismbcupper`, `_ismbcupper_l`](./reference/ismbclower-ismbclower-l-ismbcupper-ismbcupper-l.md) :::column-end::: :::row-end::: ## Remarks -The test result of each **_ismbc** routine depends on the multibyte code page in effect. Multibyte code pages have single-byte alphabetic characters. By default, the multibyte code page is set to the system-default ANSI code page obtained from the operating system at program startup. You can query or change the multibyte code page in use with [_getmbcp](../c-runtime-library/reference/getmbcp.md) or [_setmbcp](../c-runtime-library/reference/setmbcp.md), respectively. +The test result of each **_ismbc** routine depends on the multibyte code page in effect. Multibyte code pages have single-byte alphabetic characters. By default, the multibyte code page is set to the system-default ANSI code page obtained from the operating system at program startup. You can query or change the multibyte code page in use with [`_getmbcp`](./reference/getmbcp.md) or [`_setmbcp`](./reference/setmbcp.md), respectively. -The output value is affected by the `LC_CTYPE` category setting of the locale. For more information, see [`setlocale`](../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. +The output value is affected by the `LC_CTYPE` category setting of the locale. For more information, see [`setlocale`](./reference/setlocale-wsetlocale.md). The versions of these functions without the **_l** suffix use the current locale for this locale-dependent behavior; the versions with the **_l** suffix are identical except that they use the locale parameter passed in instead. |Routine|Test condition|Code page 932 example| |-------------|--------------------|---------------------------| -|[_ismbcalnum, _ismbcalnum_l](../c-runtime-library/reference/ismbcalnum-functions.md)|Alphanumeric|Returns nonzero if and only if `c` is a single-byte representation of an ASCII English letter: See examples for `_ismbcdigit` and `_ismbcalpha`.| -|[_ismbcalpha, _ismbcalpha_l](../c-runtime-library/reference/ismbcalnum-functions.md)|Alphabetic|Returns nonzero if and only if `c` is a single-byte representation of an ASCII English letter: See examples for `_ismbcupper` and `_ismbclower`; or a katakana letter: 0xA6<=`c`<=0xDF.| -|[_ismbcdigit, _ismbcdigit_l](../c-runtime-library/reference/ismbcalnum-functions.md)|Digit|Returns nonzero if and only if `c` is a single-byte representation of an ASCII digit: 0x30<=`c`<=0x39.| -|[_ismbcgraph, _ismbcgraph_l](../c-runtime-library/reference/ismbcgraph-functions.md)|Graphic|Returns nonzero if and only if `c` is a single-byte representation of any ASCII or katakana printable character except a white space ( ). See examples for `_ismbcdigit`, `_ismbcalpha`, and `_ismbcpunct`.| -|[_ismbclegal, _ismbclegal_l](../c-runtime-library/reference/ismbclegal-ismbclegal-l-ismbcsymbol-ismbcsymbol-l.md)|Valid multibyte character|Returns nonzero if and only if the first byte of `c` is within ranges 0x81 - 0x9F or 0xE0 - 0xFC, while the second byte is within ranges 0x40 - 0x7E or 0x80 - FC.| -|[_ismbclower, _ismbclower_l](../c-runtime-library/reference/ismbclower-ismbclower-l-ismbcupper-ismbcupper-l.md)|Lowercase alphabetic|Returns nonzero if and only if `c` is a single-byte representation of an ASCII lowercase English letter: 0x61<=`c`<=0x7A.| -|[_ismbcprint, _ismbcprint_l](../c-runtime-library/reference/ismbcgraph-functions.md)|Printable|Returns nonzero if and only if `c` is a single-byte representation of any ASCII or katakana printable character including a white space ( ): See examples for `_ismbcspace`, `_ismbcdigit`, `_ismbcalpha`, and `_ismbcpunct`.| -|[_ismbcpunct, _ismbcpunct_l](../c-runtime-library/reference/ismbcgraph-functions.md)|Punctuation|Returns nonzero if and only if `c` is a single-byte representation of any ASCII or katakana punctuation character.| -|[_ismbcblank, _ismbcblank_l,](../c-runtime-library/reference/ismbcgraph-functions.md)|Space or horizontal tab|Returns nonzero if and only if `c` is a single-byte representation of a space character or a horizontal tab character: `c`=0x20 or `c`=0x09.| -|[_ismbcspace, _ismbcspace_l](../c-runtime-library/reference/ismbcgraph-functions.md)|Whitespace|Returns nonzero if and only if `c` is a white space character: `c`=0x20 or 0x09<=`c`<=0x0D.| -|[_ismbcsymbol, _ismbcsymbol_l](../c-runtime-library/reference/ismbclegal-ismbclegal-l-ismbcsymbol-ismbcsymbol-l.md)|Multibyte symbol|Returns nonzero if and only if 0x8141<=`c`<=0x81AC.| -|[_ismbcupper, _ismbcupper_l](../c-runtime-library/reference/ismbclower-ismbclower-l-ismbcupper-ismbcupper-l.md)|Uppercase alphabetic|Returns nonzero if and only if `c` is a single-byte representation of an ASCII uppercase English letter: 0x41<=`c`<=0x5A.| +|[`_ismbcalnum`, `_ismbcalnum_l`](./reference/ismbcalnum-functions.md)|Alphanumeric|Returns nonzero if and only if `c` is a single-byte representation of an ASCII English letter: See examples for `_ismbcdigit` and `_ismbcalpha`.| +|[`_ismbcalpha`, `_ismbcalpha_l`](./reference/ismbcalnum-functions.md)|Alphabetic|Returns nonzero if and only if `c` is a single-byte representation of an ASCII English letter: See examples for `_ismbcupper` and `_ismbclower`; or a katakana letter: 0xA6<=`c`<=0xDF.| +|[`_ismbcdigit`, `_ismbcdigit_l`](./reference/ismbcalnum-functions.md)|Digit|Returns nonzero if and only if `c` is a single-byte representation of an ASCII digit: 0x30<=`c`<=0x39.| +|[`_ismbcgraph`, `_ismbcgraph_l`](./reference/ismbcgraph-functions.md)|Graphic|Returns nonzero if and only if `c` is a single-byte representation of any ASCII or katakana printable character except a white space ( ). See examples for `_ismbcdigit`, `_ismbcalpha`, and `_ismbcpunct`.| +|[`_ismbclegal`, `_ismbclegal_l`](./reference/ismbclegal-ismbclegal-l-ismbcsymbol-ismbcsymbol-l.md)|Valid multibyte character|Returns nonzero if and only if the first byte of `c` is within ranges 0x81 - 0x9F or 0xE0 - 0xFC, while the second byte is within ranges 0x40 - 0x7E or 0x80 - FC.| +|[`_ismbclower`, `_ismbclower_l`](./reference/ismbclower-ismbclower-l-ismbcupper-ismbcupper-l.md)|Lowercase alphabetic|Returns nonzero if and only if `c` is a single-byte representation of an ASCII lowercase English letter: 0x61<=`c`<=0x7A.| +|[`_ismbcprint`, `_ismbcprint_l`](./reference/ismbcgraph-functions.md)|Printable|Returns nonzero if and only if `c` is a single-byte representation of any ASCII or katakana printable character including a white space ( ): See examples for `_ismbcspace`, `_ismbcdigit`, `_ismbcalpha`, and `_ismbcpunct`.| +|[`_ismbcpunct`, `_ismbcpunct_l`](./reference/ismbcgraph-functions.md)|Punctuation|Returns nonzero if and only if `c` is a single-byte representation of any ASCII or katakana punctuation character.| +|[`_ismbcblank`, `_ismbcblank_l`](./reference/ismbcgraph-functions.md)|Space or horizontal tab|Returns nonzero if and only if `c` is a single-byte representation of a space character or a horizontal tab character: `c`=0x20 or `c`=0x09.| +|[`_ismbcspace`, `_ismbcspace_l`](./reference/ismbcgraph-functions.md)|Whitespace|Returns nonzero if and only if `c` is a white space character: `c`=0x20 or 0x09<=`c`<=0x0D.| +|[`_ismbcsymbol`, `_ismbcsymbol_l`](./reference/ismbclegal-ismbclegal-l-ismbcsymbol-ismbcsymbol-l.md)|Multibyte symbol|Returns nonzero if and only if 0x8141<=`c`<=0x81AC.| +|[`_ismbcupper`, `_ismbcupper_l`](./reference/ismbclower-ismbclower-l-ismbcupper-ismbcupper-l.md)|Uppercase alphabetic|Returns nonzero if and only if `c` is a single-byte representation of an ASCII uppercase English letter: 0x41<=`c`<=0x5A.| **Code Page 932 Specific** @@ -51,18 +51,18 @@ The following routines are specific to code page 932. |Routine|Test condition (code page 932 only)| |-------------|-------------------------------------------| -|[_ismbchira, _ismbchira_l](../c-runtime-library/reference/ismbchira-ismbchira-l-ismbckata-ismbckata-l.md)|Double-byte Hiragana: 0x829F<=`c`<=0x82F1.| -|[_ismbckata, _ismbckata_l](../c-runtime-library/reference/ismbchira-ismbchira-l-ismbckata-ismbckata-l.md)|Double-byte katakana: 0x8340<=`c`<=0x8396.| -|[_ismbcl0, _ismbcl0_l](../c-runtime-library/reference/ismbcl0-ismbcl0-l-ismbcl1-ismbcl1-l-ismbcl2-ismbcl2-l.md)|JIS non-Kanji: 0x8140<=`c`<=0x889E.| -|[_ismbcl1, _ismbcl1_l](../c-runtime-library/reference/ismbcl0-ismbcl0-l-ismbcl1-ismbcl1-l-ismbcl2-ismbcl2-l.md)|JIS level-1: 0x889F<=`c`<=0x9872.| -|[_ismbcl2, _ismbcl2_l](../c-runtime-library/reference/ismbcl0-ismbcl0-l-ismbcl1-ismbcl1-l-ismbcl2-ismbcl2-l.md)|JIS level-2: 0x989F<=`c`<=0xEA9E.| +|[`_ismbchira`, `_ismbchira_l`](./reference/ismbchira-ismbchira-l-ismbckata-ismbckata-l.md)|Double-byte Hiragana: 0x829F<=`c`<=0x82F1.| +|[`_ismbckata`, `_ismbckata_l`](./reference/ismbchira-ismbchira-l-ismbckata-ismbckata-l.md)|Double-byte katakana: 0x8340<=`c`<=0x8396.| +|[`_ismbcl0`, `_ismbcl0_l`](./reference/ismbcl0-ismbcl0-l-ismbcl1-ismbcl1-l-ismbcl2-ismbcl2-l.md)|JIS non-Kanji: 0x8140<=`c`<=0x889E.| +|[`_ismbcl1`, `_ismbcl1_l`](./reference/ismbcl0-ismbcl0-l-ismbcl1-ismbcl1-l-ismbcl2-ismbcl2-l.md)|JIS level-1: 0x889F<=`c`<=0x9872.| +|[`_ismbcl2`, `_ismbcl2_l`](./reference/ismbcl0-ismbcl0-l-ismbcl1-ismbcl1-l-ismbcl2-ismbcl2-l.md)|JIS level-2: 0x989F<=`c`<=0xEA9E.| -`_ismbcl0`, `_ismbcl1`, and `_ismbcl2` check that the specified value `c` matches the test conditions described in the preceding table, but don't check that `c` is a valid multibyte character. If the lower byte is in the ranges 0x00 - 0x3F, 0x7F, or 0xFD - 0xFF, these functions return a nonzero value, indicating that the character satisfies the test condition. Use [_ismbbtrail, _ismbbtrail_l](../c-runtime-library/reference/ismbbtrail-ismbbtrail-l.md) to test whether the multibyte character is defined. +`_ismbcl0`, `_ismbcl1`, and `_ismbcl2` check that the specified value `c` matches the test conditions described in the preceding table, but don't check that `c` is a valid multibyte character. If the lower byte is in the ranges 0x00 - 0x3F, 0x7F, or 0xFD - 0xFF, these functions return a nonzero value, indicating that the character satisfies the test condition. Use [`_ismbbtrail`, `_ismbbtrail_l`](./reference/ismbbtrail-ismbbtrail-l.md) to test whether the multibyte character is defined. **END Code Page 932 Specific** ## See also -[Character Classification](../c-runtime-library/character-classification.md)
-[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 f41faff7834..88743f2fc32 100644 --- a/docs/c-runtime-library/iso646-operators.md +++ b/docs/c-runtime-library/iso646-operators.md @@ -12,19 +12,19 @@ Provides readable alternatives to certain operators or punctuators. The standard | Name | Description | |--|--| -| [`and`](../c-runtime-library/reference/and.md) | An alternative to the `&&` operator. | -| [`and_eq`](../c-runtime-library/reference/and-eq.md) | An alternative to the `&=` operator. | -| [`bitand`](../c-runtime-library/reference/bitand.md) | An alternative to the `&` operator. | -| [`bitor`](../c-runtime-library/reference/bitor.md) | An alternative to the `|` operator. | -| [`compl`](../c-runtime-library/reference/compl.md) | An alternative to the `~` operator. | -| [`not`](../c-runtime-library/reference/not.md) | An alternative to the `!` operator. | -| [`not_eq`](../c-runtime-library/reference/not-eq.md) | An alternative to the `!=` operator. | -| [`or`](../c-runtime-library/reference/or.md) | An alternative to the `||` operator. | -| [`or_eq`](../c-runtime-library/reference/or-eq.md) | An alternative to the `|=` operator. | -| [`xor`](../c-runtime-library/reference/xor.md) | An alternative to the `^` operator. | -| [`xor_eq`](../c-runtime-library/reference/xor-eq.md) | An alternative to the `^=` operator. | +| [`and`](./reference/and.md) | An alternative to the `&&` operator. | +| [`and_eq`](./reference/and-eq.md) | An alternative to the `&=` operator. | +| [`bitand`](./reference/bitand.md) | An alternative to the `&` operator. | +| [`bitor`](./reference/bitor.md) | An alternative to the `|` operator. | +| [`compl`](./reference/compl.md) | An alternative to the `~` operator. | +| [`not`](./reference/not.md) | An alternative to the `!` operator. | +| [`not_eq`](./reference/not-eq.md) | An alternative to the `!=` operator. | +| [`or`](./reference/or.md) | An alternative to the `||` operator. | +| [`or_eq`](./reference/or-eq.md) | An alternative to the `|=` operator. | +| [`xor`](./reference/xor.md) | An alternative to the `^` operator. | +| [`xor_eq`](./reference/xor-eq.md) | An alternative to the `^=` operator. | ## 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/language-strings.md b/docs/c-runtime-library/language-strings.md index 26dc512fd94..9e4d1c6115d 100644 --- a/docs/c-runtime-library/language-strings.md +++ b/docs/c-runtime-library/language-strings.md @@ -4,9 +4,9 @@ description: "Learn more about: Language Strings" ms.date: "1/12/2021" helpviewer_keywords: ["language strings"] --- -# Language Strings +# Language strings -The [`setlocale`](../c-runtime-library/reference/setlocale-wsetlocale.md) and [`_create_locale`](../c-runtime-library/reference/create-locale-wcreate-locale.md) functions can use the Windows NLS API supported languages on operating systems that don't use the Unicode code page. For a list of supported languages by operating system version, see [Appendix A: Product Behavior](/openspecs/windows_protocols/ms-lcid/a9eac961-e77d-41a6-90a5-ce1a8b0cdb9c) in \[MS-LCID]: Windows Language Code Identifier (LCID) Reference. The language string can be any of the values in the **Language** and **Language tag** columns of the list of supported languages. For example code that enumerates available locale names and related values, see [NLS: Name-based APIs Sample](/windows/win32/intl/nls--name-based-apis-sample). +The [`setlocale`](./reference/setlocale-wsetlocale.md) and [`_create_locale`](./reference/create-locale-wcreate-locale.md) functions can use the Windows NLS API supported languages on operating systems that don't use the Unicode code page. For a list of supported languages by operating system version, see [Appendix A: Product Behavior](/openspecs/windows_protocols/ms-lcid/a9eac961-e77d-41a6-90a5-ce1a8b0cdb9c) in \[MS-LCID]: Windows Language Code Identifier (LCID) Reference. The language string can be any of the values in the **Language** and **Language tag** columns of the list of supported languages. For example code that enumerates available locale names and related values, see [NLS: Name-based APIs Sample](/windows/win32/intl/nls--name-based-apis-sample). ## Supported language strings @@ -82,7 +82,7 @@ The Microsoft C run-time library implementation also supports these language str ## See also -- [Locale Names, Languages, and Country/Region Strings](../c-runtime-library/locale-names-languages-and-country-region-strings.md)\ -- [Country/Region Strings](../c-runtime-library/country-region-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)\ +- [Country/Region strings](./country-region-strings.md)\ +- [`setlocale`, `_wsetlocale`](./reference/setlocale-wsetlocale.md)\ +- [`_create_locale`, `_wcreate_locale`](./reference/create-locale-wcreate-locale.md) diff --git a/docs/c-runtime-library/lc-codepage-func.md b/docs/c-runtime-library/lc-codepage-func.md index 0efecabe4f5..926b64c10c6 100644 --- a/docs/c-runtime-library/lc-codepage-func.md +++ b/docs/c-runtime-library/lc-codepage-func.md @@ -20,15 +20,15 @@ Internal CRT function. Retrieves the current code page of the thread. UINT ___lc_codepage_func(void); ``` -## Return Value +## Return value The current code page of the thread. ## Remarks -`___lc_codepage_func` is an internal CRT function that is used by other CRT functions to get the current 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_codepage_func` is an internal CRT function that is used by other CRT functions to get the current 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. -A *code page* is a mapping of single-byte or double-byte codes to individual characters. Different code pages include different special characters, typically customized for a language or a group of languages. For more information about code pages, see [Code Pages](../c-runtime-library/code-pages.md). +A *code page* is a mapping of single-byte or double-byte codes to individual characters. Different code pages include different special characters, typically customized for a language or a group of languages. For more information about code pages, see [Code pages](./code-pages.md). Internal CRT functions are implementation-specific and subject to change with each release. We don't recommend their use in your code. @@ -42,7 +42,7 @@ By default, this function's global state is scoped to the application. To change ## 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-collate-cp-func.md b/docs/c-runtime-library/lc-collate-cp-func.md index 6a4d5c5d7b5..18df295e197 100644 --- a/docs/c-runtime-library/lc-collate-cp-func.md +++ b/docs/c-runtime-library/lc-collate-cp-func.md @@ -20,13 +20,13 @@ 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. @@ -40,7 +40,7 @@ By default, this function's global state is scoped to the application. To change ## 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 dcf7656f739..29283bca3ca 100644 --- a/docs/c-runtime-library/lc-locale-name-func.md +++ b/docs/c-runtime-library/lc-locale-name-func.md @@ -20,13 +20,13 @@ 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. @@ -40,7 +40,7 @@ By default, this function's global state is scoped to the application. To change ## 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 f134049d119..f6dea668654 100644 --- a/docs/c-runtime-library/link-options.md +++ b/docs/c-runtime-library/link-options.md @@ -5,7 +5,7 @@ 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 several small object files that enable specific CRT features without any code change. These object files are called "link options" since you only have to add them to the linker command line to use them. @@ -13,23 +13,23 @@ CLR pure mode versions of these objects are deprecated in Visual Studio 2015 and |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).| +|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](../c-runtime-library/reference/fopen-wfopen.md) and [fopen_s, _wfopen_s](../c-runtime-library/reference/fopen-s-wfopen-s.md).| +|commode.obj|pcommode.obj|Sets the global commit flag to "commit". See [`fopen`, `_wfopen`](./reference/fopen-wfopen.md) and [`fopen_s`, `_wfopen_s`](./reference/fopen-s-wfopen-s.md).| |exe_initialize_mta.lib|n/a|Initializes the MTA apartment during EXE startup, which allows the use of COM objects in global smart pointers. Because this option leaks an MTA apartment reference during shutdown, don't use it for DLLs. Linking to this file is equivalent to including `combase.h` and defining `_EXE_INITIALIZE_MTA`. Using this link option adds [onecore.lib](/windows/win32/apiindex/windows-umbrella-libraries) to the default library list. If this effect is undesirable (such as using onecore_apiset.lib or other umbrella library), use [/NODEFAULTLIB](../build/reference/nodefaultlib-ignore-libraries.md) to override this behavior and provide an alternative. | -|fp10.obj|n/a|Changes the default precision control to 64 bits. See [Floating-Point Support](../c-runtime-library/floating-point-support.md).| +|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](../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.| +|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](../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).| +|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).| +|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).| +|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 a2f966ff64b..8321adef9e6 100644 --- a/docs/c-runtime-library/local-unwind2.md +++ b/docs/c-runtime-library/local-unwind2.md @@ -25,10 +25,10 @@ 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 @@ -39,4 +39,4 @@ When this method executes termination handlers, it starts at the current lexical ## 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 9a17ab8f5f8..46793a12d40 100644 --- a/docs/c-runtime-library/locale-categories.md +++ b/docs/c-runtime-library/locale-categories.md @@ -6,7 +6,7 @@ f1_keywords: ["LC_MAX", "LC_MIN", "LC_MONETARY", "LC_TIME", "LC_NUMERIC", "LC_CO 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 @@ -29,13 +29,13 @@ Locale categories are manifest constants used by the localization routines to sp |`LC_NUMERIC`|Decimal-point character for formatted output routines (for example, `printf`), data conversion routines, and nonmonetary formatting information returned by `localeconv` function| |`LC_TIME`|Behavior of `strftime` function| -See [setlocale, _wsetlocale](../c-runtime-library/reference/setlocale-wsetlocale.md) for an example. +See [`setlocale`, `_wsetlocale`](./reference/setlocale-wsetlocale.md) for an example. ## See also -[localeconv](../c-runtime-library/reference/localeconv.md)
-[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 4e6583f7287..dd2fae03a49 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,7 +8,7 @@ ms.assetid: a0e5a0c5-5602-4da0-b65f-de3d6c8530a2 --- # UCRT Locale names, Languages, and Country/Region strings -You can set 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 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: +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*]]"\ @@ -17,20 +17,20 @@ You can set the *`locale`* argument to the [`setlocale`, `_wsetlocale`](../c-run  \| ""\  \| 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's 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 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 *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's 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 don't 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 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`: @@ -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. For more information, see the [UTF-8 Support section of `setlocale`](../c-runtime-library/reference/setlocale-wsetlocale.md#utf-8-support). +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 75f7d9a8451..4dc63fe87ec 100644 --- a/docs/c-runtime-library/locale.md +++ b/docs/c-runtime-library/locale.md @@ -7,57 +7,57 @@ helpviewer_keywords: ["localization, locale", "country information", "language i --- # 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). +*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`](../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 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`](../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). +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](../c-runtime-library/security-features-in-the-crt.md). +More secure versions of the functions in the following table are available, indicated by the **`_s`** ("secure") suffix. For more information, see [Security features in the CRT](./security-features-in-the-crt.md). -## Locale-Dependent Routines +## 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`**| +|[`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 9f010b68b0b..9d91de95a03 100644 --- a/docs/c-runtime-library/lock.md +++ b/docs/c-runtime-library/lock.md @@ -27,7 +27,7 @@ void __cdecl _lock #### Parameters -*`locknum`*
+*`locknum`*\ [in] The identifier of the lock to acquire. ## Remarks @@ -40,5 +40,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 f002bdb30fe..59c0347c8ad 100644 --- a/docs/c-runtime-library/locking-constants.md +++ b/docs/c-runtime-library/locking-constants.md @@ -6,7 +6,7 @@ f1_keywords: ["_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 @@ -16,9 +16,9 @@ ms.assetid: c3dc92c8-60e3-4d29-9f50-5d217627c8ad ## Remarks -The *mode* argument in the call to the `_locking` function specifies the locking action to be performed. +The *`mode`* argument in the call to the `_locking` function specifies the locking action to be performed. -The *mode* argument must be one of the following manifest constants. +The *`mode`* argument must be one of the following manifest constants. |Value|Description| |-|-| @@ -30,5 +30,5 @@ The *mode* argument must be one of the following manifest constants. ## See also -[_locking](../c-runtime-library/reference/locking.md)
-[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 a89631b3813..f89cf6df174 100644 --- a/docs/c-runtime-library/low-level-i-o.md +++ b/docs/c-runtime-library/low-level-i-o.md @@ -4,7 +4,7 @@ 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 don't buffer or format data. @@ -16,30 +16,30 @@ Low-level routines can access the standard streams opened at program startup usi |**`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 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 +## 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| +|[`_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 2ec04065df2..0aa3a54dadf 100644 --- a/docs/c-runtime-library/math-constants.md +++ b/docs/c-runtime-library/math-constants.md @@ -6,7 +6,7 @@ f1_keywords: ["c.constants.math"] 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. @@ -46,4 +46,4 @@ The file `` includes `` when your project is built in Rele ## See also -[Global Constants](../c-runtime-library/global-constants.md) +[Global constants](./global-constants.md) diff --git a/docs/c-runtime-library/math-error-constants.md b/docs/c-runtime-library/math-error-constants.md index 394f6be7e7b..d33fc5070cc 100644 --- a/docs/c-runtime-library/math-error-constants.md +++ b/docs/c-runtime-library/math-error-constants.md @@ -6,7 +6,7 @@ f1_keywords: ["_PLOSS", "_UNDERFLOW", "_TLOSS", "_SING", "_DOMAIN", "_OVERFLOW"] helpviewer_keywords: ["_TLOSS constant", "_SING constant", "PLOSS constant", "UNDERFLOW constant", "_UNDERFLOW constant", "_OVERFLOW constant", "DOMAIN constant", "OVERFLOW constant", "TLOSS constant", "SING constant", "_DOMAIN constant", "_PLOSS constant", "math error constants"] ms.assetid: 4be933a6-674e-45a5-8ac9-090023542f5b --- -# Math Error Constants +# Math error constants ## Syntax @@ -31,5 +31,5 @@ These errors, described as follows, correspond to the exception types defined in ## See also -[_matherr](../c-runtime-library/reference/matherr.md)
-[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 040f8e0d817..bd7894c77e5 100644 --- a/docs/c-runtime-library/max-env.md +++ b/docs/c-runtime-library/max-env.md @@ -18,5 +18,5 @@ The maximum permissible string length of an environmental variable. ## See also -[Environmental Constants](../c-runtime-library/environmental-constants.md)
-[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 b0658c67b5b..639ed0bbdfc 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 @@ -28,13 +28,13 @@ int * __p___mb_cur_max(void); *`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 -`___mb_cur_max_func` 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. @@ -50,4 +50,4 @@ By default, this function's global state is scoped to the application. To change ## See also -[MB_CUR_MAX](../c-runtime-library/mb-cur-max.md) +[`MB_CUR_MAX`](./mb-cur-max.md) diff --git a/docs/c-runtime-library/mb-cur-max.md b/docs/c-runtime-library/mb-cur-max.md index 259ce065457..e468e93bf90 100644 --- a/docs/c-runtime-library/mb-cur-max.md +++ b/docs/c-runtime-library/mb-cur-max.md @@ -24,12 +24,12 @@ The value of `MB_CUR_MAX` is the maximum number of bytes in a multibyte characte ## See also -[`_mbclen`, `mblen`, `_mblen_l`](../c-runtime-library/reference/mbclen-mblen-mblen-l.md)
-[`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 09a9aeca3c5..264fdecac67 100644 --- a/docs/c-runtime-library/memory-allocation.md +++ b/docs/c-runtime-library/memory-allocation.md @@ -13,33 +13,33 @@ These routines allocate, free, and reallocate memory. |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`**| +|[`_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 f88fbd5d9f2..12d78d352fe 100644 --- a/docs/c-runtime-library/multithreaded-libraries-performance.md +++ b/docs/c-runtime-library/multithreaded-libraries-performance.md @@ -6,7 +6,7 @@ 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 article discusses how to get the maximum performance from the multithreaded libraries. @@ -14,18 +14,18 @@ The single-threaded CRT is no longer available. This article discusses how to ge 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 feature 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 macro 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/nolock-functions.md b/docs/c-runtime-library/nolock-functions.md index f508c30ee44..4d19751f431 100644 --- a/docs/c-runtime-library/nolock-functions.md +++ b/docs/c-runtime-library/nolock-functions.md @@ -7,47 +7,47 @@ ms.assetid: 7d651d87-38d2-4303-9897-fdb5f7a3e899 --- # _nolock Functions -The `_nolock` functions are versions of I/O functions that don't perform any locking. They're provided for users requiring maximum performance. For more information, see [Multithreaded Libraries Performance](../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. ## No lock routines -[_fclose_nolock](../c-runtime-library/reference/fclose-nolock.md) +[`_fclose_nolock`](./reference/fclose-nolock.md) -[_fflush_nolock](../c-runtime-library/reference/fflush-nolock.md) +[`_fflush_nolock`](./reference/fflush-nolock.md) -[_fgetc_nolock, _fgetwc_nolock](../c-runtime-library/reference/fgetc-nolock-fgetwc-nolock.md) +[`_fgetc_nolock`, `_fgetwc_nolock`](./reference/fgetc-nolock-fgetwc-nolock.md) -[_fread_nolock](../c-runtime-library/reference/fread-nolock.md) +[`_fread_nolock`](./reference/fread-nolock.md) -[_fseek_nolock, _fseeki64_nolock](../c-runtime-library/reference/fseek-nolock-fseeki64-nolock.md) +[`_fseek_nolock`, `_fseeki64_nolock`](./reference/fseek-nolock-fseeki64-nolock.md) -[_ftell_nolock, _ftelli64_nolock](../c-runtime-library/reference/ftell-nolock-ftelli64-nolock.md) +[`_ftell_nolock`, `_ftelli64_nolock`](./reference/ftell-nolock-ftelli64-nolock.md) -[_fwrite_nolock](../c-runtime-library/reference/fwrite-nolock.md) +[`_fwrite_nolock`](./reference/fwrite-nolock.md) -[_getc_nolock, _getwc_nolock](../c-runtime-library/reference/getc-nolock-getwc-nolock.md) +[`_getc_nolock`, `_getwc_nolock`](./reference/getc-nolock-getwc-nolock.md) -[_getch_nolock, _getwch_nolock](../c-runtime-library/reference/getch-nolock-getwch-nolock.md) +[`_getch_nolock`, `_getwch_nolock`](./reference/getch-nolock-getwch-nolock.md) -[_getchar_nolock, _getwchar_nolock](../c-runtime-library/reference/getchar-nolock-getwchar-nolock.md) +[`_getchar_nolock`, `_getwchar_nolock`](./reference/getchar-nolock-getwchar-nolock.md) -[_getche_nolock, _getwche_nolock](../c-runtime-library/reference/getche-nolock-getwche-nolock.md) +[`_getche_nolock`, `_getwche_nolock`](./reference/getche-nolock-getwche-nolock.md) -[_getdcwd_nolock, _wgetdcwd_nolock](../c-runtime-library/reference/getdcwd-nolock-wgetdcwd-nolock.md) +[`_getdcwd_nolock`, `_wgetdcwd_nolock`](./reference/getdcwd-nolock-wgetdcwd-nolock.md) -[_putc_nolock, _putwc_nolock](../c-runtime-library/reference/putc-nolock-putwc-nolock.md) +[`_putc_nolock`, `_putwc_nolock`](./reference/putc-nolock-putwc-nolock.md) -[_putch_nolock, _putwch_nolock](../c-runtime-library/reference/putch-nolock-putwch-nolock.md) +[`_putch_nolock`, `_putwch_nolock`](./reference/putch-nolock-putwch-nolock.md) -[_putchar_nolock, _putwchar_nolock](../c-runtime-library/reference/putchar-nolock-putwchar-nolock.md) +[`_putchar_nolock`, `_putwchar_nolock`](./reference/putchar-nolock-putwchar-nolock.md) -[_ungetc_nolock, _ungetwc_nolock](../c-runtime-library/reference/ungetc-nolock-ungetwc-nolock.md) +[`_ungetc_nolock`, `_ungetwc_nolock`](./reference/ungetc-nolock-ungetwc-nolock.md) -[_ungetch_nolock, _ungetwch_nolock](../c-runtime-library/reference/ungetch-ungetwch-ungetch-nolock-ungetwch-nolock.md) +[`_ungetch_nolock`, `_ungetwch_nolock`](./reference/ungetch-ungetwch-ungetch-nolock-ungetwch-nolock.md) ## 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 2c5675b9b35..aeff62b2b90 100644 --- a/docs/c-runtime-library/null-crt.md +++ b/docs/c-runtime-library/null-crt.md @@ -12,4 +12,4 @@ ms.assetid: f9aac2a0-4f79-423f-8738-a76dccc0b1c3 ## 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 e2739b3e5ff..38499701637 100644 --- a/docs/c-runtime-library/obsolete-functions.md +++ b/docs/c-runtime-library/obsolete-functions.md @@ -10,7 +10,7 @@ f1_keywords: ["is_wctype", "_loaddll", "_unloaddll", "_getdllprocaddr", "_seterr 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. @@ -18,7 +18,7 @@ Certain library functions are obsolete and have more recent equivalents. We reco |Obsolete function|Alternative| |-----------------------|-----------------| -|`is_wctype`|[`iswctype`](../c-runtime-library/reference/isctype-iswctype-isctype-l-iswctype-l.md)| +|`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)| @@ -32,16 +32,16 @@ Certain library functions are obsolete and have more recent equivalents. We reco |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| +|[`_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 161f457d1ef..9295c248b02 100644 --- a/docs/c-runtime-library/outp-outpw-outpd.md +++ b/docs/c-runtime-library/outp-outpw-outpd.md @@ -43,7 +43,7 @@ Port number. *`data_byte`*, *`data_word`*\ Output values. -## Return Value +## Return value The functions return the data output. There's no error return. @@ -53,7 +53,7 @@ The `_outp`, `_outpw`, and `_outpd` functions write a byte, a word, and a double 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). @@ -65,13 +65,13 @@ The `outp` and `outpw` names are older, deprecated names for the `_outp` and `_o |`_outpw`|\| |`_outpd`|\| -For more compatibility information, see [Compatibility](../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](./compatibility.md). ## Libraries -All versions of the [C run-time libraries](../c-runtime-library/crt-library-features.md). +All versions of the [C run-time libraries](./crt-library-features.md). ## See also -[Console and Port I/O](../c-runtime-library/console-and-port-i-o.md)\ -[`inp`, `inpw`, `_inp`, `_inpw`, `_inpd`](../c-runtime-library/inp-inpw-inpd.md) +[Console and port I/O](./console-and-port-i-o.md)\ +[`inp`, `inpw`, `_inp`, `_inpw`, `_inpd`](./inp-inpw-inpd.md) diff --git a/docs/c-runtime-library/p-commode.md b/docs/c-runtime-library/p-commode.md index 4516a1d7555..153fa6f578b 100644 --- a/docs/c-runtime-library/p-commode.md +++ b/docs/c-runtime-library/p-commode.md @@ -21,7 +21,7 @@ int * __p__commode( ); ``` -## Return Value +## Return value Pointer to the `_commode` global variable. @@ -29,7 +29,7 @@ Pointer to the `_commode` global variable. The `__p__commode` function is for internal use only, and shouldn't be called from user code. -File commit mode specifies when critical data is written to disk. For more information, see [fflush](../c-runtime-library/reference/fflush.md). +File commit mode specifies when critical data is written to disk. For more information, see [`fflush`](./reference/fflush.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). diff --git a/docs/c-runtime-library/p-fmode.md b/docs/c-runtime-library/p-fmode.md index 291e52b7c19..00d959d194f 100644 --- a/docs/c-runtime-library/p-fmode.md +++ b/docs/c-runtime-library/p-fmode.md @@ -21,7 +21,7 @@ int* __p__fmode( ); ``` -## Return Value +## Return value Pointer to the `_fmode` global variable. @@ -29,7 +29,7 @@ Pointer to the `_fmode` global variable. The `__p__fmode` function is for internal use only, and shouldn't be called from user code. -File translation mode specifies either `binary` or `text` translation for [_open](../c-runtime-library/reference/open-wopen.md) and [_pipe](../c-runtime-library/reference/pipe.md) I/O operations. For more information, see [_fmode](../c-runtime-library/fmode.md). +File translation mode specifies either `binary` or `text` translation for [`_open`](./reference/open-wopen.md) and [`_pipe`](./reference/pipe.md) I/O operations. For more information, see [`_fmode`](./fmode.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). diff --git a/docs/c-runtime-library/parameter-validation.md b/docs/c-runtime-library/parameter-validation.md index 6ba37f479ab..647f64917c9 100644 --- a/docs/c-runtime-library/parameter-validation.md +++ b/docs/c-runtime-library/parameter-validation.md @@ -6,23 +6,23 @@ ms.topic: "conceptual" helpviewer_keywords: ["parameters, validation"] ms.assetid: 019dd5f0-dc61-4d2e-b4e9-b66409ddf1f2 --- -# Parameter Validation +# Parameter validation Most of the security-enhanced CRT functions, and many that aren't, validate their parameters for things like checking pointers for **NULL**, that integers fall into a valid range, or that enumeration values are valid. If an invalid parameter is found, the invalid parameter handler is called. -## Invalid Parameter Handler Routine +## Invalid parameter handler routine -When a C Runtime Library function detects an invalid parameter, it captures some information about the error, and then calls a macro that wraps an invalid parameter handler dispatch function. Which will be one of [_invalid_parameter](../c-runtime-library/reference/invalid-parameter-functions.md), [_invalid_parameter_noinfo](../c-runtime-library/reference/invalid-parameter-functions.md), or [_invalid_parameter_noinfo_noreturn](../c-runtime-library/reference/invalid-parameter-functions.md). Which dispatch function is called depends on whether your code is, respectively, a debug build, a retail build, or the error isn't considered recoverable. +When a C Runtime Library function detects an invalid parameter, it captures some information about the error, and then calls a macro that wraps an invalid parameter handler dispatch function. Which will be one of [`_invalid_parameter`](./reference/invalid-parameter-functions.md), [`_invalid_parameter_noinfo`](./reference/invalid-parameter-functions.md), or [`_invalid_parameter_noinfo_noreturn`](./reference/invalid-parameter-functions.md). Which dispatch function is called depends on whether your code is, respectively, a debug build, a retail build, or the error isn't considered recoverable. In debug builds, the invalid parameter macro usually raises a failed assertion and a debugger breakpoint before the dispatch function is called. When the code runs, the assertion may be reported to the user in a dialog box that has "Abort", "Retry", and "Continue" or similar choices that depend on the operating system and CRT version. These options allow the user to immediately terminate the program, to attach a debugger, or to let the existing code continue to run which calls the dispatch function. The invalid parameter handler dispatch function calls the currently assigned invalid parameter handler. By default, the invalid parameter calls `_invoke_watson`, which causes the application to close and generate a mini-dump. If enabled by the operating system, a dialog box asks the user if they want to send the crash dump to Microsoft for analysis. -You can change this behavior by using the functions [_set_invalid_parameter_handler](../c-runtime-library/reference/set-invalid-parameter-handler-set-thread-local-invalid-parameter-handler.md) or [_set_thread_local_invalid_parameter_handler](../c-runtime-library/reference/set-invalid-parameter-handler-set-thread-local-invalid-parameter-handler.md) to set the invalid parameter handler to your own function. If the function you specify doesn't terminate the application, control is returned to the function that received the invalid parameters. In the CRT, these functions will normally stop function execution, set `errno` to an error code, and return an error code. In many cases, the `errno` value and the return value are both `EINVAL`, to indicate an invalid parameter. In some cases, a more specific error code is returned, such as `EBADF` for a bad file pointer passed in as a parameter. +You can change this behavior by using the functions [`_set_invalid_parameter_handler`](./reference/set-invalid-parameter-handler-set-thread-local-invalid-parameter-handler.md) or [`_set_thread_local_invalid_parameter_handler`](./reference/set-invalid-parameter-handler-set-thread-local-invalid-parameter-handler.md) to set the invalid parameter handler to your own function. If the function you specify doesn't terminate the application, control is returned to the function that received the invalid parameters. In the CRT, these functions will normally stop function execution, set `errno` to an error code, and return an error code. In many cases, the `errno` value and the return value are both `EINVAL`, to indicate an invalid parameter. In some cases, a more specific error code is returned, such as `EBADF` for a bad file pointer passed in as a parameter. -For more information on `errno`, see [errno, _doserrno, _sys_errlist, and _sys_nerr](../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +For more information on `errno`, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](./errno-doserrno-sys-errlist-and-sys-nerr.md). ## See also -[Security Features in the CRT](../c-runtime-library/security-features-in-the-crt.md)\ -[C runtime (CRT) and C++ Standard Library (STL) `.lib` files](../c-runtime-library/crt-library-features.md) +[Security features in the CRT](./security-features-in-the-crt.md)\ +[C runtime (CRT) and C++ Standard Library (STL) `.lib` files](./crt-library-features.md) diff --git a/docs/c-runtime-library/path-field-limits.md b/docs/c-runtime-library/path-field-limits.md index 75144b8a9ed..071e4f3778a 100644 --- a/docs/c-runtime-library/path-field-limits.md +++ b/docs/c-runtime-library/path-field-limits.md @@ -6,7 +6,7 @@ f1_keywords: ["_MAX_EXT", "_MAX_DIR", "_MAX_PATH", "_MAX_FNAME", "_MAX_DRIVE"] helpviewer_keywords: ["path field constants", "MAX_FNAME constant", "_MAX_DIR constant", "_MAX_DRIVE constant", "paths, maximum limit", "_MAX_PATH constant", "MAX_DRIVE constant", "_MAX_FNAME constant", "_MAX_EXT constant", "MAX_DIR constant", "MAX_EXT constant"] ms.assetid: 2b5d0e43-1347-45b4-8397-24a8a45c444e --- -# Path Field Limits +# Path field limits ## Syntax @@ -31,4 +31,4 @@ These constants define the maximum length for the path and for the individual fi ## See also -[Global Constants](../c-runtime-library/global-constants.md) +[Global constants](./global-constants.md) diff --git a/docs/c-runtime-library/pctype-func.md b/docs/c-runtime-library/pctype-func.md index 02111ce9a25..25176294fff 100644 --- a/docs/c-runtime-library/pctype-func.md +++ b/docs/c-runtime-library/pctype-func.md @@ -21,13 +21,13 @@ const unsigned short *__pctype_func( ) ``` -## Return Value +## Return value A pointer to an array of character classification information. ## Remarks -The information in the character classification table is for internal use only, and is used by various functions that classify characters of type **`char`**. For more information, see the `Remarks` section of [_pctype, _pwctype, _wctype, _mbctype, _mbcasemap](../c-runtime-library/pctype-pwctype-wctype-mbctype-mbcasemap.md). +The information in the character classification table is for internal use only, and is used by various functions that classify characters of type **`char`**. For more information, see the `Remarks` section of [`_pctype`, `_pwctype`, `_wctype`, `_mbctype`, `_mbcasemap`](./pctype-pwctype-wctype-mbctype-mbcasemap.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). @@ -39,4 +39,4 @@ By default, this function's global state is scoped to the application. To change ## See also -[_pctype, _pwctype, _wctype, _mbctype, _mbcasemap](../c-runtime-library/pctype-pwctype-wctype-mbctype-mbcasemap.md) +[`_pctype`, `_pwctype`, `_wctype`, `_mbctype`, `_mbcasemap`](./pctype-pwctype-wctype-mbctype-mbcasemap.md) diff --git a/docs/c-runtime-library/pctype-pwctype-wctype-mbctype-mbcasemap.md b/docs/c-runtime-library/pctype-pwctype-wctype-mbctype-mbcasemap.md index 069c9d6b643..227554d6ef8 100644 --- a/docs/c-runtime-library/pctype-pwctype-wctype-mbctype-mbcasemap.md +++ b/docs/c-runtime-library/pctype-pwctype-wctype-mbctype-mbcasemap.md @@ -26,9 +26,9 @@ extern unsigned char _mbcasemap[]; ## Remarks -The information in `_pctype`, `_pwctype`, and `_wctype` is used internally by [isupper, _isupper_l, iswupper, _iswupper_l](../c-runtime-library/reference/isupper-isupper-l-iswupper-iswupper-l.md), [islower, iswlower, _islower_l, _iswlower_l](../c-runtime-library/reference/islower-iswlower-islower-l-iswlower-l.md), [isdigit, iswdigit, _isdigit_l, _iswdigit_l](../c-runtime-library/reference/isdigit-iswdigit-isdigit-l-iswdigit-l.md), [isxdigit, iswxdigit, _isxdigit_l, _iswxdigit_l](../c-runtime-library/reference/isxdigit-iswxdigit-isxdigit-l-iswxdigit-l.md), [isspace, iswspace, _isspace_l, _iswspace_l](../c-runtime-library/reference/isspace-iswspace-isspace-l-iswspace-l.md), [isalnum, iswalnum, _isalnum_l, _iswalnum_l](../c-runtime-library/reference/isalnum-iswalnum-isalnum-l-iswalnum-l.md), [ispunct, iswpunct, _ispunct_l, _iswpunct_l](../c-runtime-library/reference/ispunct-iswpunct-ispunct-l-iswpunct-l.md), [isgraph, iswgraph, _isgraph_l, _iswgraph_l](../c-runtime-library/reference/isgraph-iswgraph-isgraph-l-iswgraph-l.md), [iscntrl, iswcntrl, _iscntrl_l, _iswcntrl_l](../c-runtime-library/reference/iscntrl-iswcntrl-iscntrl-l-iswcntrl-l.md), [toupper, _toupper, towupper, _toupper_l, _towupper_l](../c-runtime-library/reference/toupper-toupper-towupper-toupper-l-towupper-l.md), [tolower, _tolower, towlower, _tolower_l, and _towlower_l](../c-runtime-library/reference/tolower-tolower-towlower-tolower-l-towlower-l.md) functions. These functions should be used instead of accessing these global variables. +The information in `_pctype`, `_pwctype`, and `_wctype` is used internally by [`isupper`, `_isupper_l`, `iswupper`, `_iswupper_l`](./reference/isupper-isupper-l-iswupper-iswupper-l.md), [`islower`, `iswlower`, `_islower_l`, `_iswlower_l`](./reference/islower-iswlower-islower-l-iswlower-l.md), [`isdigit`, `iswdigit`, `_isdigit_l`, `_iswdigit_l`](./reference/isdigit-iswdigit-isdigit-l-iswdigit-l.md), [`isxdigit`, `iswxdigit`, `_isxdigit_l`, `_iswxdigit_l`](./reference/isxdigit-iswxdigit-isxdigit-l-iswxdigit-l.md), [`isspace`, `iswspace`, `_isspace_l`, `_iswspace_l`](./reference/isspace-iswspace-isspace-l-iswspace-l.md), [`isalnum`, `iswalnum`, `_isalnum_l`, `_iswalnum_l`](./reference/isalnum-iswalnum-isalnum-l-iswalnum-l.md), [`ispunct`, `iswpunct`, `_ispunct_l`, `_iswpunct_l`](./reference/ispunct-iswpunct-ispunct-l-iswpunct-l.md), [`isgraph`, `iswgraph`, `_isgraph_l`, `_iswgraph_l`](./reference/isgraph-iswgraph-isgraph-l-iswgraph-l.md), [`iscntrl`, `iswcntrl`, `_iscntrl_l`, `_iswcntrl_l`](./reference/iscntrl-iswcntrl-iscntrl-l-iswcntrl-l.md), [`toupper`, `_toupper`, `towupper`, `_toupper_l`, `_towupper_l`](./reference/toupper-toupper-towupper-toupper-l-towupper-l.md), [`tolower`, `_tolower`, `towlower`, `_tolower_l`, and `_towlower_l`](./reference/tolower-tolower-towlower-tolower-l-towlower-l.md) functions. These functions should be used instead of accessing these global variables. -The information in `_mbctype` and `_mbcasemap` is used internally by [_ismbbkalnum, _ismbbkalnum_l](../c-runtime-library/reference/ismbbkalnum-ismbbkalnum-l.md), [_ismbbkana, _ismbbkana_l](../c-runtime-library/reference/ismbbkana-ismbbkana-l.md), [_ismbbkpunct, _ismbbkpunct_l](../c-runtime-library/reference/ismbbkpunct-ismbbkpunct-l.md), [_ismbbkprint, _ismbbkprint_l](../c-runtime-library/reference/ismbbkprint-ismbbkprint-l.md), [_ismbbalpha](reference/ismbbalpha-ismbbalpha-l.md), [_ismbbpunct, _ismbbpunct_l](../c-runtime-library/reference/ismbbpunct-ismbbpunct-l.md), [_ismbbalnum, _ismbbalnum_l](../c-runtime-library/reference/ismbbalnum-ismbbalnum-l.md), [_ismbbprint, _ismbbprint_l](../c-runtime-library/reference/ismbbprint-ismbbprint-l.md), [_ismbbgraph, _ismbbgraph_l](../c-runtime-library/reference/ismbbgraph-ismbbgraph-l.md), [_ismbblead, _ismbblead_l](../c-runtime-library/reference/ismbblead-ismbblead-l.md), [_ismbbtrail, _ismbbtrail_l](../c-runtime-library/reference/ismbbtrail-ismbbtrail-l.md), [_ismbslead, _ismbstrail, _ismbslead_l, _ismbstrail_l](../c-runtime-library/reference/ismbslead-ismbstrail-ismbslead-l-ismbstrail-l.md), [_ismbslead, _ismbstrail, _ismbslead_l, and _ismbstrail_l](../c-runtime-library/reference/ismbslead-ismbstrail-ismbslead-l-ismbstrail-l.md). Use these functions instead of accessing the global variables. +The information in `_mbctype` and `_mbcasemap` is used internally by [`_ismbbkalnum`, `_ismbbkalnum_l`](./reference/ismbbkalnum-ismbbkalnum-l.md), [`_ismbbkana`, `_ismbbkana_l`](./reference/ismbbkana-ismbbkana-l.md), [`_ismbbkpunct`, `_ismbbkpunct_l`](./reference/ismbbkpunct-ismbbkpunct-l.md), [`_ismbbkprint`, `_ismbbkprint_l`](./reference/ismbbkprint-ismbbkprint-l.md), [`_ismbbalpha`](reference/ismbbalpha-ismbbalpha-l.md), [`_ismbbpunct`, `_ismbbpunct_l`](./reference/ismbbpunct-ismbbpunct-l.md), [`_ismbbalnum`, `_ismbbalnum_l`](./reference/ismbbalnum-ismbbalnum-l.md), [`_ismbbprint`, `_ismbbprint_l`](./reference/ismbbprint-ismbbprint-l.md), [`_ismbbgraph`, `_ismbbgraph_l`](./reference/ismbbgraph-ismbbgraph-l.md), [`_ismbblead`, `_ismbblead_l`](./reference/ismbblead-ismbblead-l.md), [`_ismbbtrail`, `_ismbbtrail_l`](./reference/ismbbtrail-ismbbtrail-l.md), [`_ismbslead`, `_ismbstrail`, `_ismbslead_l`, `_ismbstrail_l`](./reference/ismbslead-ismbstrail-ismbslead-l-ismbstrail-l.md), [`_ismbslead`, `_ismbstrail`, `_ismbslead_l`, and `_ismbstrail_l`](./reference/ismbslead-ismbstrail-ismbslead-l-ismbstrail-l.md). Use these functions instead of accessing the global variables. ## Requirements @@ -36,5 +36,5 @@ Not for public use. ## See also -[is, isw Routines](../c-runtime-library/is-isw-routines.md)
-[__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 780f64f286e..0c86d26d6a5 100644 --- a/docs/c-runtime-library/pgmptr-wpgmptr.md +++ b/docs/c-runtime-library/pgmptr-wpgmptr.md @@ -8,7 +8,7 @@ ms.assetid: 4d44b515-0eff-4136-8bc4-684195f218f5 --- # _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 @@ -29,7 +29,7 @@ When a program isn't run from the command line, `_pgmptr` might be initialized t `_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| |---------------------|--------------------------------------|--------------------|-----------------------| @@ -64,4 +64,4 @@ You could use `_wpgmptr` by changing `%Fs` to `%S` and `main` to `wmain`. ## See also -[Global Variables](../c-runtime-library/global-variables.md) +[Global variables](./global-variables.md) diff --git a/docs/c-runtime-library/potential-errors-passing-crt-objects-across-dll-boundaries.md b/docs/c-runtime-library/potential-errors-passing-crt-objects-across-dll-boundaries.md index 139e91d7885..9aac11ab8d6 100644 --- a/docs/c-runtime-library/potential-errors-passing-crt-objects-across-dll-boundaries.md +++ b/docs/c-runtime-library/potential-errors-passing-crt-objects-across-dll-boundaries.md @@ -131,4 +131,4 @@ New MYLIB variable is: c:\mylib;c:\yourlib ## 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/printf-p-positional-parameters.md b/docs/c-runtime-library/printf-p-positional-parameters.md index de35a30e76c..41715a892ab 100644 --- a/docs/c-runtime-library/printf-p-positional-parameters.md +++ b/docs/c-runtime-library/printf-p-positional-parameters.md @@ -14,19 +14,19 @@ Positional parameters let you specify by number the argument to substitute into | Non-positional printf functions | Positional parameter equivalents | |---|---| -|[printf, _printf_l, wprintf, _wprintf_l](../c-runtime-library/reference/printf-printf-l-wprintf-wprintf-l.md)|[_printf_p, _printf_p_l, _wprintf_p, _wprintf_p_l](../c-runtime-library/reference/printf-p-printf-p-l-wprintf-p-wprintf-p-l.md)| -|[sprintf, _sprintf_l, swprintf, _swprintf_l, \__swprintf_l](../c-runtime-library/reference/sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md)|[_sprintf_p, _sprintf_p_l, _swprintf_p, _swprintf_p_l](../c-runtime-library/reference/sprintf-p-sprintf-p-l-swprintf-p-swprintf-p-l.md)| -|[_cprintf, _cprintf_l, _cwprintf, _cwprintf_l](../c-runtime-library/reference/cprintf-cprintf-l-cwprintf-cwprintf-l.md)|[_cprintf_p, _cprintf_p_l, _cwprintf_p, _cwprintf_p_l](../c-runtime-library/reference/cprintf-p-cprintf-p-l-cwprintf-p-cwprintf-p-l.md)| -|[fprintf, _fprintf_l, fwprintf, _fwprintf_l](../c-runtime-library/reference/fprintf-fprintf-l-fwprintf-fwprintf-l.md)|[_fprintf_p, _fprintf_p_l, _fwprintf_p, _fwprintf_p_l](../c-runtime-library/reference/fprintf-p-fprintf-p-l-fwprintf-p-fwprintf-p-l.md)| -|[vprintf, _vprintf_l, vwprintf, _vwprintf_l](../c-runtime-library/reference/vprintf-vprintf-l-vwprintf-vwprintf-l.md)|[_vprintf_p, _vprintf_p_l, _vwprintf_p, _vwprintf_p_l](../c-runtime-library/reference/vprintf-p-vprintf-p-l-vwprintf-p-vwprintf-p-l.md)| -|[vfprintf, _vfprintf_l, vfwprintf, _vfwprintf_l](../c-runtime-library/reference/vfprintf-vfprintf-l-vfwprintf-vfwprintf-l.md)|[_vfprintf_p, _vfprintf_p_l, _vfwprintf_p, _vfwprintf_p_l](../c-runtime-library/reference/vfprintf-p-vfprintf-p-l-vfwprintf-p-vfwprintf-p-l.md)| -|[vsprintf, _vsprintf_l, vswprintf, _vswprintf_l, \__vswprintf_l](../c-runtime-library/reference/vsprintf-vsprintf-l-vswprintf-vswprintf-l-vswprintf-l.md)|[_vsprintf_p, _vsprintf_p_l, _vswprintf_p, _vswprintf_p_l](../c-runtime-library/reference/vsprintf-p-vsprintf-p-l-vswprintf-p-vswprintf-p-l.md)| +|[`printf`, `_printf_l`, `wprintf`, `_wprintf_l`](./reference/printf-printf-l-wprintf-wprintf-l.md)|[`_printf_p`, `_printf_p_l`, `_wprintf_p`, `_wprintf_p_l`](./reference/printf-p-printf-p-l-wprintf-p-wprintf-p-l.md)| +|[`sprintf`, `_sprintf_l`, `swprintf`, `_swprintf_l`, `__swprintf_l`](./reference/sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md)|[`_sprintf_p`, `_sprintf_p_l`, `_swprintf_p`, `_swprintf_p_l`](./reference/sprintf-p-sprintf-p-l-swprintf-p-swprintf-p-l.md)| +|[`_cprintf`, `_cprintf_l`, `_cwprintf`, `_cwprintf_l`](./reference/cprintf-cprintf-l-cwprintf-cwprintf-l.md)|[`_cprintf_p`, `_cprintf_p_l`, `_cwprintf_p`, `_cwprintf_p_l`](./reference/cprintf-p-cprintf-p-l-cwprintf-p-cwprintf-p-l.md)| +|[`fprintf`, `_fprintf_l`, `fwprintf`, `_fwprintf_l`](./reference/fprintf-fprintf-l-fwprintf-fwprintf-l.md)|[`_fprintf_p`, `_fprintf_p_l`, `_fwprintf_p`, `_fwprintf_p_l`](./reference/fprintf-p-fprintf-p-l-fwprintf-p-fwprintf-p-l.md)| +|[`vprintf`, `_vprintf_l`, `vwprintf`, `_vwprintf_l`](./reference/vprintf-vprintf-l-vwprintf-vwprintf-l.md)|[`_vprintf_p`, `_vprintf_p_l`, `_vwprintf_p`, `_vwprintf_p_l`](./reference/vprintf-p-vprintf-p-l-vwprintf-p-vwprintf-p-l.md)| +|[`vfprintf`, `_vfprintf_l`, `vfwprintf`, `_vfwprintf_l`](./reference/vfprintf-vfprintf-l-vfwprintf-vfwprintf-l.md)|[`_vfprintf_p`, `_vfprintf_p_l`, `_vfwprintf_p`, `_vfwprintf_p_l`](./reference/vfprintf-p-vfprintf-p-l-vfwprintf-p-vfwprintf-p-l.md)| +|[`vsprintf`, `_vsprintf_l`, `vswprintf`, `_vswprintf_l`, `__vswprintf_l`](./reference/vsprintf-vsprintf-l-vswprintf-vswprintf-l-vswprintf-l.md)|[`_vsprintf_p`, `_vsprintf_p_l`, `_vswprintf_p`, `_vswprintf_p_l`](./reference/vsprintf-p-vsprintf-p-l-vswprintf-p-vswprintf-p-l.md)| ## How to specify positional parameters ### Parameter indexing -By default, if no positional formatting is present, the positional functions behave identically to the non-positional ones. You specify the positional parameter to format by using `%n$` at the beginning of the format specifier, where `n` is the position of the parameter to format in the parameter list. The parameter position starts at 1 for the first argument after the format string. The remainder of the format specifier follows the same rules as the `printf` format specifier. For more information about format specifiers, see [Format Specification Syntax: printf and wprintf Functions](../c-runtime-library/format-specification-syntax-printf-and-wprintf-functions.md). +By default, if no positional formatting is present, the positional functions behave identically to the non-positional ones. You specify the positional parameter to format by using `%n$` at the beginning of the format specifier, where `n` is the position of the parameter to format in the parameter list. The parameter position starts at 1 for the first argument after the format string. The remainder of the format specifier follows the same rules as the `printf` format specifier. For more information about format specifiers, see [Format specification syntax: `printf` and `wprintf` functions](./format-specification-syntax-printf-and-wprintf-functions.md). Here's an example of positional formatting: @@ -136,4 +136,4 @@ ghi abc def ## See also -[Format Specification Syntax: printf and wprintf Functions](../c-runtime-library/format-specification-syntax-printf-and-wprintf-functions.md) +[Format specification syntax: `printf` and `wprintf` functions](./format-specification-syntax-printf-and-wprintf-functions.md) diff --git a/docs/c-runtime-library/process-and-environment-control.md b/docs/c-runtime-library/process-and-environment-control.md index c718d20d62d..4aba4ea1164 100644 --- a/docs/c-runtime-library/process-and-environment-control.md +++ b/docs/c-runtime-library/process-and-environment-control.md @@ -5,54 +5,54 @@ ms.date: "11/04/2016" f1_keywords: ["c.programs"] helpviewer_keywords: ["processes, stopping", "processes, administrative tasks", "parent process", "processes, starting", "environment control routines", "process control routines"] --- -# Process and Environment Control +# Process and environment control Use the process-control routines to start, stop, and manage processes from within a program. Use the environment-control routines to get and change information about the operating-system environment. -## Process and Environment Control Functions +## Process and environment control functions |Routine|Use| |-------------|---------| -|[`abort`](../c-runtime-library/reference/abort.md)|Abort process without flushing buffers or calling functions registered by **`atexit`** and **`_onexit`**| -|[`assert`](../c-runtime-library/reference/assert-macro-assert-wassert.md)|Test for logic error| -|[`_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 libraries| -|[`atexit`](../c-runtime-library/reference/atexit.md)|Schedule routines for execution at program termination| -|[`_beginthread`, `_beginthreadex`](../c-runtime-library/reference/beginthread-beginthreadex.md)|Create a new thread on a Windows operating system process| -|[`_cexit`](../c-runtime-library/reference/cexit-c-exit.md)|Perform **`exit`** termination procedures (such as flushing buffers), then return control to calling program without terminating process| -|[`_c_exit`](../c-runtime-library/reference/cexit-c-exit.md)|Perform **`_exit`** termination procedures, then return control to calling program without terminating process| -|[`_cwait`](../c-runtime-library/reference/cwait.md)|Wait until another process terminates| -|[`_endthread`, `_endthreadex`](../c-runtime-library/reference/endthread-endthreadex.md)|Terminate a Windows operating system thread| -|[`_execl`, `_wexecl`](../c-runtime-library/reference/execl-wexecl.md)|Execute new process with argument list| -|[`_execle`, `_wexecle`](../c-runtime-library/reference/execle-wexecle.md)|Execute new process with argument list and given environment| -|[`_execlp`, `_wexeclp`](../c-runtime-library/reference/execlp-wexeclp.md)|Execute new process using **`PATH`** variable and argument list| -|[`_execlpe`, `_wexeclpe`](../c-runtime-library/reference/execlpe-wexeclpe.md)|Execute new process using **`PATH`** variable, given environment, and argument list| -|[`_execv`, `_wexecv`](../c-runtime-library/reference/execv-wexecv.md)|Execute new process with argument array| -|[`_execve`, `_wexecve`](../c-runtime-library/reference/execve-wexecve.md)|Execute new process with argument array and given environment| -|[`_execvp`, `_wexecvp`](../c-runtime-library/reference/execvp-wexecvp.md)|Execute new process using **`PATH`** variable and argument array| -|[`_execvpe`, `_wexecvpe`](../c-runtime-library/reference/execvpe-wexecvpe.md)|Execute new process using **`PATH`** variable, given environment, and argument array| -|[`exit`](../c-runtime-library/reference/exit-exit-exit.md)|Call functions registered by **`atexit`** and **`_onexit`**, flush all buffers, close all open files, and terminate process| -|[`_exit`](../c-runtime-library/reference/exit-exit-exit.md)|Terminate process immediately without calling **`atexit`** or **`_onexit`** or flushing buffers| -|[`getenv`, `_wgetenv`](../c-runtime-library/reference/getenv-wgetenv.md), [`getenv_s`, `_wgetenv_s`](../c-runtime-library/reference/getenv-s-wgetenv-s.md)|Get value of environment variable| -|[`_getpid`](../c-runtime-library/reference/getpid.md)|Get process ID number| -|[`longjmp`](../c-runtime-library/reference/longjmp.md)|Restore saved stack environment; use it to execute a nonlocal **`goto`**| -|[`_onexit`](../c-runtime-library/reference/onexit-onexit-m.md)|Schedule routines for execution at program termination; use for compatibility with Microsoft C/C++ version 7.0 and earlier| -|[`_pclose`](../c-runtime-library/reference/pclose.md)|Wait for new command processor and close stream on associated pipe| -|[`perror`, `_wperror`](../c-runtime-library/reference/perror-wperror.md)|Print error message| -|[`_pipe`](../c-runtime-library/reference/pipe.md)|Create pipe for reading and writing| -|[`_popen`, `_wpopen`](../c-runtime-library/reference/popen-wpopen.md)|Create pipe and execute command| -|[`_putenv`, `_wputenv`](../c-runtime-library/reference/putenv-wputenv.md), [`_putenv_s`, `_wputenv_s`](../c-runtime-library/reference/putenv-s-wputenv-s.md)|Add or change value of environment variable| -|[`raise`](../c-runtime-library/reference/raise.md)|Send signal to calling process| -|[`setjmp`](../c-runtime-library/reference/setjmp.md)|Save stack environment; use to execute non local **`goto`**| -|[`signal`](../c-runtime-library/reference/signal.md)|Handle interrupt signal| -|[`_spawnl`, `_wspawnl`](../c-runtime-library/reference/spawnl-wspawnl.md)|Create and execute new process with specified argument list| -|[`_spawnle`, `_wspawnle`](../c-runtime-library/reference/spawnle-wspawnle.md)|Create and execute new process with specified argument list and environment| -|[`_spawnlp`, `_wspawnlp`](../c-runtime-library/reference/spawnlp-wspawnlp.md)|Create and execute new process using **`PATH`** variable and specified argument list| -|[`_spawnlpe`, `_wspawnlpe`](../c-runtime-library/reference/spawnlpe-wspawnlpe.md)|Create and execute new process using **`PATH`** variable, specified environment, and argument list| -|[`_spawnv`, `_wspawnv`](../c-runtime-library/reference/spawnv-wspawnv.md)|Create and execute new process with specified argument array| -|[`_spawnve`, `_wspawnve`](../c-runtime-library/reference/spawnve-wspawnve.md)|Create and execute new process with specified environment and argument array| -|[`_spawnvp`, `_wspawnvp`](../c-runtime-library/reference/spawnvp-wspawnvp.md)|Create and execute new process using **`PATH`** variable and specified argument array| -|[`_spawnvpe`, `_wspawnvpe`](../c-runtime-library/reference/spawnvpe-wspawnvpe.md)|Create and execute new process using **`PATH`** variable, specified environment, and argument array| -|[`system`, `_wsystem`](../c-runtime-library/reference/system-wsystem.md)|Execute operating-system command| +|[`abort`](./reference/abort.md)|Abort process without flushing buffers or calling functions registered by **`atexit`** and **`_onexit`**| +|[`assert`](./reference/assert-macro-assert-wassert.md)|Test for logic error| +|[`_ASSERT`, `_ASSERTE`](./reference/assert-asserte-assert-expr-macros.md) macros|Similar to **`assert`**, but only available in the debug versions of the run-time libraries| +|[`atexit`](./reference/atexit.md)|Schedule routines for execution at program termination| +|[`_beginthread`, `_beginthreadex`](./reference/beginthread-beginthreadex.md)|Create a new thread on a Windows operating system process| +|[`_cexit`](./reference/cexit-c-exit.md)|Perform **`exit`** termination procedures (such as flushing buffers), then return control to calling program without terminating process| +|[`_c_exit`](./reference/cexit-c-exit.md)|Perform **`_exit`** termination procedures, then return control to calling program without terminating process| +|[`_cwait`](./reference/cwait.md)|Wait until another process terminates| +|[`_endthread`, `_endthreadex`](./reference/endthread-endthreadex.md)|Terminate a Windows operating system thread| +|[`_execl`, `_wexecl`](./reference/execl-wexecl.md)|Execute new process with argument list| +|[`_execle`, `_wexecle`](./reference/execle-wexecle.md)|Execute new process with argument list and given environment| +|[`_execlp`, `_wexeclp`](./reference/execlp-wexeclp.md)|Execute new process using **`PATH`** variable and argument list| +|[`_execlpe`, `_wexeclpe`](./reference/execlpe-wexeclpe.md)|Execute new process using **`PATH`** variable, given environment, and argument list| +|[`_execv`, `_wexecv`](./reference/execv-wexecv.md)|Execute new process with argument array| +|[`_execve`, `_wexecve`](./reference/execve-wexecve.md)|Execute new process with argument array and given environment| +|[`_execvp`, `_wexecvp`](./reference/execvp-wexecvp.md)|Execute new process using **`PATH`** variable and argument array| +|[`_execvpe`, `_wexecvpe`](./reference/execvpe-wexecvpe.md)|Execute new process using **`PATH`** variable, given environment, and argument array| +|[`exit`](./reference/exit-exit-exit.md)|Call functions registered by **`atexit`** and **`_onexit`**, flush all buffers, close all open files, and terminate process| +|[`_exit`](./reference/exit-exit-exit.md)|Terminate process immediately without calling **`atexit`** or **`_onexit`** or flushing buffers| +|[`getenv`, `_wgetenv`](./reference/getenv-wgetenv.md), [`getenv_s`, `_wgetenv_s`](./reference/getenv-s-wgetenv-s.md)|Get value of environment variable| +|[`_getpid`](./reference/getpid.md)|Get process ID number| +|[`longjmp`](./reference/longjmp.md)|Restore saved stack environment; use it to execute a nonlocal **`goto`**| +|[`_onexit`](./reference/onexit-onexit-m.md)|Schedule routines for execution at program termination; use for compatibility with Microsoft C/C++ version 7.0 and earlier| +|[`_pclose`](./reference/pclose.md)|Wait for new command processor and close stream on associated pipe| +|[`perror`, `_wperror`](./reference/perror-wperror.md)|Print error message| +|[`_pipe`](./reference/pipe.md)|Create pipe for reading and writing| +|[`_popen`, `_wpopen`](./reference/popen-wpopen.md)|Create pipe and execute command| +|[`_putenv`, `_wputenv`](./reference/putenv-wputenv.md), [`_putenv_s`, `_wputenv_s`](./reference/putenv-s-wputenv-s.md)|Add or change value of environment variable| +|[`raise`](./reference/raise.md)|Send signal to calling process| +|[`setjmp`](./reference/setjmp.md)|Save stack environment; use to execute non local **`goto`**| +|[`signal`](./reference/signal.md)|Handle interrupt signal| +|[`_spawnl`, `_wspawnl`](./reference/spawnl-wspawnl.md)|Create and execute new process with specified argument list| +|[`_spawnle`, `_wspawnle`](./reference/spawnle-wspawnle.md)|Create and execute new process with specified argument list and environment| +|[`_spawnlp`, `_wspawnlp`](./reference/spawnlp-wspawnlp.md)|Create and execute new process using **`PATH`** variable and specified argument list| +|[`_spawnlpe`, `_wspawnlpe`](./reference/spawnlpe-wspawnlpe.md)|Create and execute new process using **`PATH`** variable, specified environment, and argument list| +|[`_spawnv`, `_wspawnv`](./reference/spawnv-wspawnv.md)|Create and execute new process with specified argument array| +|[`_spawnve`, `_wspawnve`](./reference/spawnve-wspawnve.md)|Create and execute new process with specified environment and argument array| +|[`_spawnvp`, `_wspawnvp`](./reference/spawnvp-wspawnvp.md)|Create and execute new process using **`PATH`** variable and specified argument array| +|[`_spawnvpe`, `_wspawnvpe`](./reference/spawnvpe-wspawnvpe.md)|Create and execute new process using **`PATH`** variable, specified environment, and argument array| +|[`system`, `_wsystem`](./reference/system-wsystem.md)|Execute operating-system command| In the Windows operating system, the spawned process is equivalent to the spawning process. Any process can use **`_cwait`** to wait for any other process for which the process ID is known. @@ -75,4 +75,4 @@ The differences among the functions in the **`_exec`** and **`_spawn`** families ## 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/rand-max.md b/docs/c-runtime-library/rand-max.md index 1fc11b09b9c..af3c4b4344e 100644 --- a/docs/c-runtime-library/rand-max.md +++ b/docs/c-runtime-library/rand-max.md @@ -19,5 +19,5 @@ The constant `RAND_MAX` is the maximum value that can be returned by the `rand` ## See also -[`rand`](../c-runtime-library/reference/rand.md)\ -[Global Constants](../c-runtime-library/global-constants.md) +[`rand`](./reference/rand.md)\ +[Global constants](./global-constants.md) diff --git a/docs/c-runtime-library/recommendations-for-choosing-between-functions-and-macros.md b/docs/c-runtime-library/recommendations-for-choosing-between-functions-and-macros.md index 854c5a960d7..1971598d3b1 100644 --- a/docs/c-runtime-library/recommendations-for-choosing-between-functions-and-macros.md +++ b/docs/c-runtime-library/recommendations-for-choosing-between-functions-and-macros.md @@ -7,7 +7,7 @@ f1_keywords: ["c.functions"] helpviewer_keywords: ["functions [CRT], vs. macros", "macros, vs. functions"] ms.assetid: 18a633d6-cf1c-470c-a649-fa7677473e2b --- -# Recommendations for Choosing Between Functions and Macros +# Recommendations for choosing between functions and macros Most Microsoft run-time library routines are compiled or assembled functions, but some routines are implemented as macros. When a header file declares both a function and a macro version of a routine, the macro definition takes precedence, because it always appears after the function declaration. When you invoke a routine that is implemented as both a function and a macro, you can force the compiler to use the function version in two ways: @@ -38,4 +38,4 @@ If you need to choose between a function and a macro implementation of a library ## See also [Type-generic math](tgmath.md)\ -[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/reference/abort.md b/docs/c-runtime-library/reference/abort.md index f88d180666f..1e1c911d425 100644 --- a/docs/c-runtime-library/reference/abort.md +++ b/docs/c-runtime-library/reference/abort.md @@ -22,7 +22,7 @@ Aborts the current process and returns an error code. void abort( void ); ``` -## Return Value +## Return value **`abort`** doesn't return control to the calling process. By default, it checks for an abort signal handler and raises `SIGABRT` if one is set. Then **`abort`** terminates the current process and returns an exit code to the parent process. @@ -48,7 +48,7 @@ If the Windows error reporting handler isn't invoked, then **`abort`** calls [`_ For Windows compatibility reasons, when `abort` calls `_exit`, it may invoke the Windows [`ExitProcess`](/windows/win32/api/processthreadsapi/nf-processthreadsapi-exitprocess) API, which in turn allows DLL termination routines to run. Destructors aren't run in the executable, but the same may not be true of DLLs loaded in the executable's process space. This behavior doesn't strictly conform to the C++ standard. To immediately terminate a process including any DLLs, use the Windows [`TerminateProcess`](/windows/desktop/api/processthreadsapi/nf-processthreadsapi-terminateprocess) API. You can also register an abort signal handler that invokes `TerminateProcess` for standard-compliant behavior. Compliant behavior may come at some cost in Windows compatibility. -For more information about CRT debugging, see [CRT Debugging Techniques](/visualstudio/debugger/crt-debugging-techniques). +For more information about CRT debugging, see [CRT debugging techniques](/visualstudio/debugger/crt-debugging-techniques). **End Microsoft Specific** @@ -99,12 +99,12 @@ File could not be opened: No such file or directory ## See also [Using `abort`](../../cpp/using-abort.md)\ -[`abort` Function](../../c-language/abort-function-c.md)\ -[Process and Environment Control](../../c-runtime-library/process-and-environment-control.md)\ -[`_exec`, `_wexec` Functions](../../c-runtime-library/exec-wexec-functions.md)\ +[`abort` function](../../c-language/abort-function-c.md)\ +[Process and environment control](../process-and-environment-control.md)\ +[`_exec`, `_wexec` functions](../exec-wexec-functions.md)\ [`exit`, `_Exit`, `_exit`](exit-exit-exit.md)\ [`raise`](raise.md)\ [`signal`](signal.md)\ -[`_spawn`, `_wspawn` Functions](../../c-runtime-library/spawn-wspawn-functions.md)\ -[`_DEBUG`](../../c-runtime-library/debug.md)\ +[`_spawn`, `_wspawn` functions](../spawn-wspawn-functions.md)\ +[`_DEBUG`](../debug.md)\ [`_set_abort_behavior`](set-abort-behavior.md) diff --git a/docs/c-runtime-library/reference/abs-labs-llabs-abs64.md b/docs/c-runtime-library/reference/abs-labs-llabs-abs64.md index f6b3c1253b8..21dc3404350 100644 --- a/docs/c-runtime-library/reference/abs-labs-llabs-abs64.md +++ b/docs/c-runtime-library/reference/abs-labs-llabs-abs64.md @@ -35,7 +35,7 @@ float abs( float n ); // C++ only *`n`*\ Numeric value. -## Return Value +## Return value The **`abs`**, **`labs`**, **`llabs`**, and **`_abs64`** functions return the absolute value of the parameter *`n`*. There's no error return. @@ -113,8 +113,8 @@ _abs64(_I64_MIN) returns 0x8000000000000000 ## See also -[Data Conversion](../../c-runtime-library/data-conversion.md)\ -[Floating-Point Support](../../c-runtime-library/floating-point-support.md)\ +[Data conversion](../data-conversion.md)\ +[Math and floating-point support](../floating-point-support.md)\ [`_cabs`](cabs.md)\ [`fabs`, `fabsf`, `fabsl`](fabs-fabsf-fabsl.md)\ [`imaxabs`](imaxabs.md) diff --git a/docs/c-runtime-library/reference/access-crt.md b/docs/c-runtime-library/reference/access-crt.md index 98e59aab621..58b5b7bc852 100644 --- a/docs/c-runtime-library/reference/access-crt.md +++ b/docs/c-runtime-library/reference/access-crt.md @@ -12,6 +12,6 @@ ms.assetid: 65197793-bd0a-41c3-9c29-18de2d95d9a6 --- # access (CRT) -The Microsoft-implemented POSIX function name `access` is a deprecated alias for the [_access](access-waccess.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. +The Microsoft-implemented POSIX function name `access` is a deprecated alias for the [`_access`](access-waccess.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. -We recommend you use [_access](access-waccess.md) or the security-enhanced [_access_s](access-s-waccess-s.md) function instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). +We recommend you use [`_access`](access-waccess.md) or the security-enhanced [`_access_s`](access-s-waccess-s.md) function instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). diff --git a/docs/c-runtime-library/reference/access-s-waccess-s.md b/docs/c-runtime-library/reference/access-s-waccess-s.md index 101ad7d8f56..43bdc2502e1 100644 --- a/docs/c-runtime-library/reference/access-s-waccess-s.md +++ b/docs/c-runtime-library/reference/access-s-waccess-s.md @@ -12,7 +12,7 @@ ms.assetid: fb3004fc-dcd3-4569-8b27-d817546e947e --- # _access_s, _waccess_s -Determines file read/write permissions. These functions are versions of [`_access`, `_waccess`](access-waccess.md) with security enhancements as described in [Security Features in the CRT](../../c-runtime-library/security-features-in-the-crt.md). +Determines file read/write permissions. These functions are versions of [`_access`, `_waccess`](access-waccess.md) with security enhancements as described in [Security features in the CRT](../security-features-in-the-crt.md). ## Syntax @@ -29,13 +29,13 @@ errno_t _waccess_s( ### Parameters -*path*
+*`path`*\ File or directory path. -*mode*
+*`mode`*\ Permission setting. -## Return Value +## Return value Each function returns 0 if the file has the given mode. The function returns an error code if the named file doesn't exist or isn't accessible in the given mode. In this case, the function returns an error code from the set as follows and also sets `errno` to the same value. @@ -45,11 +45,11 @@ Each function returns 0 if the file has the given mode. The function returns an `ENOENT`|File name or path not found. `EINVAL`|Invalid parameter. -For more information, see [errno, _doserrno, _sys_errlist, and _sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +For more information, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks -When used with files, the **_access_s** function determines whether the specified file exists and can be accessed as specified by the value of *mode*. When used with directories, **_access_s** determines only whether the specified directory exists. In Windows 2000 and later operating systems, all directories have read and write access. +When used with files, the **_access_s** function determines whether the specified file exists and can be accessed as specified by the value of *`mode`*. When used with directories, **_access_s** determines only whether the specified directory exists. In Windows 2000 and later operating systems, all directories have read and write access. |mode value|Checks file for| |----------------|---------------------| @@ -60,13 +60,13 @@ When used with files, the **_access_s** function determines whether the specifie Permission to read or write the file isn't enough to ensure the ability to open a file. For example, if a file is locked by another process, it might not be accessible even though **_access_s** returns 0. -**_waccess_s** is a wide-character version of **_access_s**, where the *path* argument to **_waccess_s** is a wide-character string. Otherwise, **_waccess_s** and **_access_s** behave identically. +**_waccess_s** is a wide-character version of **_access_s**, where the *`path`* argument to **_waccess_s** is a wide-character string. Otherwise, **_waccess_s** and **_access_s** behave identically. -These functions validate their parameters. If *path* is NULL or *mode* doesn't specify a valid mode, the invalid parameter handler is invoked, 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 `EINVAL`. +These functions validate their parameters. If *`path`* is NULL or *`mode`* doesn't specify a valid mode, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, these functions set `errno` to `EINVAL` and return `EINVAL`. By default, this function's global state is scoped to the application. To change this behavior, see [Global state in the CRT](../global-state.md). -### Generic-Text Routine Mappings +### Generic-text routine mappings |Tchar.h routine|_UNICODE and _MBCS not defined|_MBCS defined|_UNICODE defined| |---------------------|--------------------------------------|--------------------|-----------------------| @@ -125,9 +125,9 @@ File crt_access_s.c does not have write permission. ## See also -[File Handling](../../c-runtime-library/file-handling.md)
-[_access, _waccess](access-waccess.md)
-[_chmod, _wchmod](chmod-wchmod.md)
-[_fstat, _fstat32, _fstat64, _fstati64, _fstat32i64, _fstat64i32](fstat-fstat32-fstat64-fstati64-fstat32i64-fstat64i32.md)
-[_open, _wopen](open-wopen.md)
-[_stat, _wstat Functions](stat-functions.md) +[File handling](../file-handling.md)\ +[`_access`, `_waccess`](access-waccess.md)\ +[`_chmod`, `_wchmod`](chmod-wchmod.md)\ +[`_fstat`, `_fstat32`, `_fstat64`, `_fstati64`, `_fstat32i64`, `_fstat64i32`](fstat-fstat32-fstat64-fstati64-fstat32i64-fstat64i32.md)\ +[`_open`, `_wopen`](open-wopen.md)\ +[`_stat`, `_wstat` functions](stat-functions.md) diff --git a/docs/c-runtime-library/reference/access-waccess.md b/docs/c-runtime-library/reference/access-waccess.md index dd1b3172cb1..6d30fb93fe9 100644 --- a/docs/c-runtime-library/reference/access-waccess.md +++ b/docs/c-runtime-library/reference/access-waccess.md @@ -29,13 +29,13 @@ int _waccess( ### Parameters -*`path`*
+*`path`*\ File or directory path. -*`mode`*
+*`mode`*\ Read/write attribute. -## Return Value +## Return value Each function returns 0 if the file has the given mode. The function returns -1 if the named file doesn't exist or doesn't have the given mode; in this case, `errno` is set as shown in the following table. @@ -45,7 +45,7 @@ Each function returns 0 if the file has the given mode. The function returns -1 | `ENOENT` | File name or path not found. | | `EINVAL` | Invalid parameter. | -For more information about these 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 these and other return codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks @@ -58,15 +58,15 @@ When used with files, the **`_access`** function determines whether the specifie |04|Read-only| |06|Read and write| -This function only checks whether the file and directory are read-only or not, it doesn't check the filesystem security settings. For that you need an access token. For more information on filesystem security, see [Access Tokens](/windows/win32/SecAuthZ/access-tokens). An ATL class exists to provide this functionality; see [`CAccessToken` Class](../../atl/reference/caccesstoken-class.md). +This function only checks whether the file and directory are read-only or not, it doesn't check the filesystem security settings. For that you need an access token. For more information on filesystem security, see [Access tokens](/windows/win32/SecAuthZ/access-tokens). An ATL class exists to provide this functionality; see [`CAccessToken` Class](../../atl/reference/caccesstoken-class.md). **`_waccess`** is a wide-character version of **`_access`**; the *`path`* argument to **`_waccess`** is a wide-character string. **`_waccess`** and **`_access`** behave identically otherwise. -This function validates its parameters. If *`path`* is `NULL` or *`mode`* doesn't specify a valid mode, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, the function sets `errno` to `EINVAL` and returns -1. +This function validates its parameters. If *`path`* is `NULL` or *`mode`* doesn't specify a valid mode, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, the function sets `errno` to `EINVAL` and returns -1. By default, this function's global state is scoped to the application. To change this behavior, see [Global state in the CRT](../global-state.md). -### Generic-Text Routine Mappings +### Generic-text routine mappings |`Tchar.h` routine|`_UNICODE` and `_MBCS` not defined|`_MBCS` defined|`_UNICODE` defined| |---------------------|--------------------------------------|--------------------|-----------------------| @@ -115,8 +115,8 @@ File crt_ACCESS.C does not have write permission. ## See also -[File Handling](../../c-runtime-library/file-handling.md)
-[`_chmod`, `_wchmod`](chmod-wchmod.md)
-[`_fstat`, `_fstat32`, `_fstat64`, `_fstati64`, `_fstat32i64`, `_fstat64i32`](fstat-fstat32-fstat64-fstati64-fstat32i64-fstat64i32.md)
-[`_open`, `_wopen`](open-wopen.md)
-[`_stat`, `_wstat` Functions](stat-functions.md) +[File handling](../file-handling.md)\ +[`_chmod`, `_wchmod`](chmod-wchmod.md)\ +[`_fstat`, `_fstat32`, `_fstat64`, `_fstati64`, `_fstat32i64`, `_fstat64i32`](fstat-fstat32-fstat64-fstati64-fstat32i64-fstat64i32.md)\ +[`_open`, `_wopen`](open-wopen.md)\ +[`_stat`, `_wstat` functions](stat-functions.md) diff --git a/docs/c-runtime-library/reference/acos-acosf-acosl.md b/docs/c-runtime-library/reference/acos-acosf-acosl.md index 4d70dc96b45..9ab124d9543 100644 --- a/docs/c-runtime-library/reference/acos-acosf-acosl.md +++ b/docs/c-runtime-library/reference/acos-acosf-acosl.md @@ -30,9 +30,9 @@ long double acos( long double x ); // C++ only *`x`*\ Value between -1 and 1, for which to calculate the arccosine (the inverse cosine). -## Return Value +## Return value -The **`acos`** function returns the arccosine of *x* in the range 0 to π radians. +The **`acos`** function returns the arccosine of *`x`* in the range 0 to π radians. By default, if *`x`* is less than -1 or greater than 1, **`acos`** returns an indefinite. @@ -46,7 +46,7 @@ By default, if *`x`* is less than -1 or greater than 1, **`acos`** returns an in Because C++ allows overloading, you can call overloads of **`acos`** that take and return **`float`** and **`long double`** types. In a C program, unless you're using the `` macro to call this function, **`acos`** always takes and returns a **`double`**. -If you use the `` `acos()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../../c-runtime-library/tgmath.md) for details. +If you use the `` `acos()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../tgmath.md) for details. 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). @@ -109,7 +109,7 @@ Arccosine of 0.000000 = 1.570796 ## See also -[Floating-Point Support](../../c-runtime-library/floating-point-support.md)\ +[Math and floating-point support](../floating-point-support.md)\ [`asin`, `asinf`, `asinl`](asin-asinf-asinl.md)\ [`atan`, `atanf`, `atanl`, `atan2`, `atan2f`, `atan2l`](atan-atanf-atanl-atan2-atan2f-atan2l.md)\ [`cos`, `cosf`, `cosl`](cos-cosf-cosl.md)\ diff --git a/docs/c-runtime-library/reference/acosh-acoshf-acoshl.md b/docs/c-runtime-library/reference/acosh-acoshf-acoshl.md index 63c3266ecf8..11785c4f497 100644 --- a/docs/c-runtime-library/reference/acosh-acoshf-acoshl.md +++ b/docs/c-runtime-library/reference/acosh-acoshf-acoshl.md @@ -28,23 +28,23 @@ long double acosh( long double x ); // C++ only ### Parameters -*x*\ +*`x`*\ Floating-point value. -## Return Value +## Return value -The **acosh** functions return the inverse hyperbolic cosine (arc hyperbolic cosine) of *x*. These functions are valid over the domain *x* ≥ 1. If *x* is less than 1, `errno` is set to `EDOM`, and the result is a quiet NaN. If *x* is a quiet NaN, indefinite, or infinity, the same value is returned. +The **acosh** functions return the inverse hyperbolic cosine (arc hyperbolic cosine) of *`x`*. These functions are valid over the domain *`x`* ≥ 1. If *`x`* is less than 1, `errno` is set to `EDOM`, and the result is a quiet NaN. If *`x`* is a quiet NaN, indefinite, or infinity, the same value is returned. |Input|SEH Exception|`_matherr` Exception| |-----------|-------------------|--------------------------| |± QNAN, IND, INF|none|none| -|*x* < 1|none|none| +|*`x`* < 1|none|none| ## Remarks When you use C++, you can call overloads of **acosh** that take and return **`float`** or **`long double`** values. In a C program, unless you're using the \ macro to call this function, **acosh** always takes and returns **`double`**. -If you use the \ `acosh()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../../c-runtime-library/tgmath.md) for details. +If you use the \ `acosh()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../tgmath.md) for details. 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). @@ -55,7 +55,7 @@ By default, this function's global state is scoped to the application. To change |**acosh**, **acoshf**, **acoshl**|\|\| |**acosh()** macro | \ || -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -87,9 +87,9 @@ acosh( 1.324609 ) = 0.785398 ## See also -[Floating-Point Support](../../c-runtime-library/floating-point-support.md)
-[asinh, asinhf, asinhl](asinh-asinhf-asinhl.md)
-[atanh, atanhf, atanhl](atanh-atanhf-atanhl.md)
-[cosh, coshf, coshl](cosh-coshf-coshl.md)
-[sinh, sinhf, sinhl](sinh-sinhf-sinhl.md)
-[tanh, tanhf, tanhl](tanh-tanhf-tanhl.md) +[Math and floating-point support](../floating-point-support.md)\ +[`asinh`, `asinhf`, `asinhl`](asinh-asinhf-asinhl.md)\ +[`atanh`, `atanhf`, `atanhl`](atanh-atanhf-atanhl.md)\ +[`cosh`, `coshf`, `coshl`](cosh-coshf-coshl.md)\ +[`sinh`, `sinhf`, `sinhl`](sinh-sinhf-sinhl.md)\ +[`tanh`, `tanhf`, `tanhl`](tanh-tanhf-tanhl.md) diff --git a/docs/c-runtime-library/reference/aligned-free-dbg.md b/docs/c-runtime-library/reference/aligned-free-dbg.md index 8b8945ddbad..927e17719d4 100644 --- a/docs/c-runtime-library/reference/aligned-free-dbg.md +++ b/docs/c-runtime-library/reference/aligned-free-dbg.md @@ -12,7 +12,7 @@ ms.assetid: eb0cb3c8-0992-4db8-bac3-65f1b8311ca6 --- # _aligned_free_dbg -Frees a block of memory that was allocated with [_aligned_malloc](aligned-malloc.md) or [_aligned_offset_malloc](aligned-offset-malloc.md) (debug only). +Frees a block of memory that was allocated with [`_aligned_malloc`](aligned-malloc.md) or [`_aligned_offset_malloc`](aligned-offset-malloc.md) (debug only). ## Syntax @@ -24,18 +24,18 @@ void _aligned_free_dbg( ### Parameters -*`memblock`*
-A pointer to the memory block that was returned to the [_aligned_malloc](aligned-malloc.md) or [_aligned_offset_malloc](aligned-offset-malloc.md) function. +*`memblock`*\ +A pointer to the memory block that was returned to the [`_aligned_malloc`](aligned-malloc.md) or [`_aligned_offset_malloc`](aligned-offset-malloc.md) function. ## Remarks -The **_aligned_free_dbg** function is a debug version of the [_aligned_free](aligned-free.md) function. When [_DEBUG](../../c-runtime-library/debug.md) isn't defined, each call to **_aligned_free_dbg** is reduced to a call to `_aligned_free`. Both `_aligned_free` and **_aligned_free_dbg** free a memory block in the base heap, but **_aligned_free_dbg** accommodates a debugging feature: the ability to keep freed blocks in the heap's linked list to simulate low memory conditions. +The **_aligned_free_dbg** function is a debug version of the [`_aligned_free`](aligned-free.md) function. When [`_DEBUG`](../debug.md) isn't defined, each call to **_aligned_free_dbg** is reduced to a call to `_aligned_free`. Both `_aligned_free` and **_aligned_free_dbg** free a memory block in the base heap, but **_aligned_free_dbg** accommodates a debugging feature: the ability to keep freed blocks in the heap's linked list to simulate low memory conditions. -**_aligned_free_dbg** performs a validity check on all specified files and block locations before performing the free operation. The application isn't expected to provide this information. When a memory block is freed, the debug heap manager automatically checks the integrity of the buffers on either side of the user portion. It issues an error report if overwriting has occurred. If the _CRTDBG_DELAY_FREE_MEM_DF bit field of the [_crtDbgFlag](../../c-runtime-library/crtdbgflag.md) flag is set, the freed block is filled with the value 0xDD, assigned the _FREE_BLOCK block type, and kept in the heap's linked list of memory blocks. +**_aligned_free_dbg** performs a validity check on all specified files and block locations before performing the free operation. The application isn't expected to provide this information. When a memory block is freed, the debug heap manager automatically checks the integrity of the buffers on either side of the user portion. It issues an error report if overwriting has occurred. If the _CRTDBG_DELAY_FREE_MEM_DF bit field of the [`_crtDbgFlag`](../crtdbgflag.md) flag is set, the freed block is filled with the value 0xDD, assigned the _FREE_BLOCK block type, and kept in the heap's linked list of memory blocks. -If an error occurs in freeing the memory, `errno` is set with information from the operating system on the nature of the failure. For more information, see [errno, _doserrno, _sys_errlist, and _sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +If an error occurs in freeing the memory, `errno` is set with information from the operating system on the nature of the failure. For more information, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). -For information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT Debug Heap Details](/visualstudio/debugger/crt-debug-heap-details). For information about the allocation block types and how they're used, see [Types of blocks on the debug heap](/visualstudio/debugger/crt-debug-heap-details). For information about the differences between standard heap functions and their debug versions, see [Debug Versions of Heap Allocation Functions](/visualstudio/debugger/debug-versions-of-heap-allocation-functions). +For information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT debug heap details](/visualstudio/debugger/crt-debug-heap-details). For information about the allocation block types and how they're used, see [Types of blocks on the debug heap](/visualstudio/debugger/crt-debug-heap-details). For information about the differences between standard heap functions and their debug versions, see [Debug versions of heap allocation functions](/visualstudio/debugger/debug-versions-of-heap-allocation-functions). ## Requirements @@ -43,8 +43,8 @@ For information about how memory blocks are allocated, initialized, and managed |-------------|---------------------| |**_aligned_free_dbg**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Debug Routines](../../c-runtime-library/debug-routines.md) +[Debug routines](../debug-routines.md) diff --git a/docs/c-runtime-library/reference/aligned-free.md b/docs/c-runtime-library/reference/aligned-free.md index 4963bd580fb..94fbb81fa5e 100644 --- a/docs/c-runtime-library/reference/aligned-free.md +++ b/docs/c-runtime-library/reference/aligned-free.md @@ -12,7 +12,7 @@ ms.assetid: ed1ce952-cdfc-4682-85cc-f75d4101603d --- # _aligned_free -Frees a block of memory that was allocated with [_aligned_malloc](aligned-malloc.md) or [_aligned_offset_malloc](aligned-offset-malloc.md). +Frees a block of memory that was allocated with [`_aligned_malloc`](aligned-malloc.md) or [`_aligned_offset_malloc`](aligned-offset-malloc.md). ## Syntax @@ -24,7 +24,7 @@ void _aligned_free ( ### Parameters -*`memblock`*
+*`memblock`*\ A pointer to the memory block that was returned to the `_aligned_malloc` or `_aligned_offset_malloc` function. ## Remarks @@ -43,8 +43,8 @@ By default, this function's global state is scoped to the application. To change ## Example -For more information, see [_aligned_malloc](aligned-malloc.md). +For more information, see [`_aligned_malloc`](aligned-malloc.md). ## See also -[Data Alignment](../../c-runtime-library/data-alignment.md) +[Data alignment](../data-alignment.md) diff --git a/docs/c-runtime-library/reference/aligned-malloc-dbg.md b/docs/c-runtime-library/reference/aligned-malloc-dbg.md index 1fbee491a12..d5ac815ba72 100644 --- a/docs/c-runtime-library/reference/aligned-malloc-dbg.md +++ b/docs/c-runtime-library/reference/aligned-malloc-dbg.md @@ -27,31 +27,31 @@ void * _aligned_malloc_dbg( ### Parameters -*`size`*
+*`size`*\ Size of the requested memory allocation. -*`alignment`*
+*`alignment`*\ The alignment value, which must be an integer power of 2. -*`filename`*
+*`filename`*\ Pointer to the name of the source file that requested the allocation operation or NULL. -*`linenumber`*
+*`linenumber`*\ Line number in the source file where the allocation operation was requested or NULL. -## Return Value +## Return value A pointer to the memory block that was allocated or NULL if the operation failed. ## Remarks -**_aligned_malloc_dbg** is a debug version of the [_aligned_malloc](aligned-malloc.md) function. When [_DEBUG](../../c-runtime-library/debug.md) isn't defined, each call to **_aligned_malloc_dbg** is reduced to a call to `_aligned_malloc`. Both `_aligned_malloc` and **_aligned_malloc_dbg** allocate a block of memory in the base heap, but **_aligned_malloc_dbg** offers several debugging features: buffers on either side of the user portion of the block to test for leaks, and *`filename`*/*`linenumber`* information to determine the origin of allocation requests. Tracking specific allocation types with a block type parameter isn't a supported debug feature for aligned allocations. Aligned allocations will appear as a `_NORMAL_BLOCK` block type. +**_aligned_malloc_dbg** is a debug version of the [`_aligned_malloc`](aligned-malloc.md) function. When [`_DEBUG`](../debug.md) isn't defined, each call to **_aligned_malloc_dbg** is reduced to a call to `_aligned_malloc`. Both `_aligned_malloc` and **_aligned_malloc_dbg** allocate a block of memory in the base heap, but **_aligned_malloc_dbg** offers several debugging features: buffers on either side of the user portion of the block to test for leaks, and *`filename`*/*`linenumber`* information to determine the origin of allocation requests. Tracking specific allocation types with a block type parameter isn't a supported debug feature for aligned allocations. Aligned allocations will appear as a `_NORMAL_BLOCK` block type. **_aligned_malloc_dbg** allocates the memory block with slightly more space than the requested *`size`*. The extra space is used by the debug heap manager to link the debug memory blocks and to provide the application with debug header information and overwrite buffers. When the block is allocated, the user portion of the block is filled with the value 0xCD, and each of the overwrite buffers are filled with 0xFD. -**_aligned_malloc_dbg** sets `errno` to `ENOMEM` if a memory allocation fails or if the amount of memory needed (including the overhead mentioned previously) exceeds `_HEAP_MAXREQ`. For information about this and other error codes, see [errno, _doserrno, _sys_errlist, and _sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). Also, **_aligned_malloc_dbg** validates its parameters. If *alignment* isn't a power of 2 or *size* is zero, this function invokes the invalid parameter handler, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, this function returns NULL and sets `errno` to `EINVAL`. +**_aligned_malloc_dbg** sets `errno` to `ENOMEM` if a memory allocation fails or if the amount of memory needed (including the overhead mentioned previously) exceeds `_HEAP_MAXREQ`. For information about this and other error codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). Also, **_aligned_malloc_dbg** validates its parameters. If *`alignment`* isn't a power of 2 or *`size`* is zero, this function invokes the invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, this function returns NULL and sets `errno` to `EINVAL`. -For information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT Debug Heap Details](/visualstudio/debugger/crt-debug-heap-details). For information about the allocation block types and how they're used, see [Types of blocks on the debug heap](/visualstudio/debugger/crt-debug-heap-details). For information about the differences between standard heap functions and their debug versions, see [Debug Versions of Heap Allocation Functions](/visualstudio/debugger/debug-versions-of-heap-allocation-functions). +For information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT debug heap details](/visualstudio/debugger/crt-debug-heap-details). For information about the allocation block types and how they're used, see [Types of blocks on the debug heap](/visualstudio/debugger/crt-debug-heap-details). For information about the differences between standard heap functions and their debug versions, see [Debug versions of heap allocation functions](/visualstudio/debugger/debug-versions-of-heap-allocation-functions). ## Requirements @@ -59,12 +59,12 @@ For information about how memory blocks are allocated, initialized, and managed |-------------|---------------------| |**_aligned_malloc_dbg**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Libraries -Debug versions of [C run-time libraries](../../c-runtime-library/crt-library-features.md) only. +Debug versions of [C run-time libraries](../crt-library-features.md) only. ## See also -[Debug Routines](../../c-runtime-library/debug-routines.md) +[Debug routines](../debug-routines.md) diff --git a/docs/c-runtime-library/reference/aligned-malloc.md b/docs/c-runtime-library/reference/aligned-malloc.md index 75a79fa6644..8e50af2f891 100644 --- a/docs/c-runtime-library/reference/aligned-malloc.md +++ b/docs/c-runtime-library/reference/aligned-malloc.md @@ -25,13 +25,13 @@ void * _aligned_malloc( ### Parameters -*`size`*
+*`size`*\ Size of the requested memory allocation. -*`alignment`*
+*`alignment`*\ The alignment value, which must be an integer power of 2. -## Return Value +## Return value A pointer to the memory block that was allocated or `NULL` if the operation failed. The pointer is a multiple of *`alignment`*. @@ -41,7 +41,7 @@ A pointer to the memory block that was allocated or `NULL` if the operation fail **`_aligned_malloc`** is marked `__declspec(noalias)` and `__declspec(restrict)`, meaning that the function is guaranteed not to modify global variables and that the pointer returned isn't aliased. For more information, see [`noalias`](../../cpp/noalias.md) and [`restrict`](../../cpp/restrict.md). -This function sets `errno` to `ENOMEM` if the memory allocation failed or if the requested size was greater than `_HEAP_MAXREQ`. For more information about `errno`, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). Also, **`_aligned_malloc`** validates its parameters. If *`alignment`* isn't a power of 2 or *`size`* is zero, this function invokes the invalid parameter handler, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, this function returns NULL and sets `errno` to `EINVAL`. +This function sets `errno` to `ENOMEM` if the memory allocation failed or if the requested size was greater than `_HEAP_MAXREQ`. For more information about `errno`, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). Also, **`_aligned_malloc`** validates its parameters. If *`alignment`* isn't a power of 2 or *`size`* is zero, this function invokes the invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, this function returns NULL and sets `errno` to `EINVAL`. Use [`_aligned_free`](aligned-free.md) to deallocate memory obtained by both **`_aligned_malloc`** and `_aligned_offset_malloc`. Don't use `free`, which doesn't reclaim the aligned memory correctly and can lead to hard-to-diagnose bugs. @@ -137,4 +137,4 @@ This pointer, 3280891, is offset by 5 on alignment of 16 ## See also -[Data Alignment](../../c-runtime-library/data-alignment.md) +[Data alignment](../data-alignment.md) diff --git a/docs/c-runtime-library/reference/aligned-msize-dbg.md b/docs/c-runtime-library/reference/aligned-msize-dbg.md index ac49a71223f..7ce02188cb8 100644 --- a/docs/c-runtime-library/reference/aligned-msize-dbg.md +++ b/docs/c-runtime-library/reference/aligned-msize-dbg.md @@ -26,16 +26,16 @@ size_t _aligned_msize_dbg( ### Parameters -*`memblock`*
+*`memblock`*\ Pointer to the memory block. -*`alignment`*
+*`alignment`*\ The alignment value, which must be an integer power of 2. -*`offset`*
+*`offset`*\ The offset into the memory allocation to force the alignment. -## Return Value +## Return value Returns the size (in bytes) as an unsigned integer. @@ -43,11 +43,11 @@ Returns the size (in bytes) as an unsigned integer. The *`alignment`* and *`offset`* values must be the same as the values passed to the function that allocated the block. -**_aligned_msize_dbg** is a debug version of the [_aligned_msize](aligned-msize.md) function. When [_DEBUG](../../c-runtime-library/debug.md) isn't defined, each call to **_aligned_msize_dbg** is reduced to a call to **_aligned_msize**. Both **_aligned_msize** and **_aligned_msize_dbg** calculate the size of a memory block in the base heap, but **_aligned_msize_dbg** adds a debugging feature: It includes the buffers on either side of the user portion of the memory block in the returned size. +**_aligned_msize_dbg** is a debug version of the [`_aligned_msize`](aligned-msize.md) function. When [`_DEBUG`](../debug.md) isn't defined, each call to **_aligned_msize_dbg** is reduced to a call to **_aligned_msize**. Both **_aligned_msize** and **_aligned_msize_dbg** calculate the size of a memory block in the base heap, but **_aligned_msize_dbg** adds a debugging feature: It includes the buffers on either side of the user portion of the memory block in the returned size. -This function validates its parameter. If *`memblock`* is a null pointer or *alignment* isn't a power of 2, **_msize** invokes an invalid parameter handler, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If the error is handled, the function sets **errno** to **EINVAL** and returns -1. +This function validates its parameter. If *`memblock`* is a null pointer or *`alignment`* isn't a power of 2, **_msize** invokes an invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). If the error is handled, the function sets **errno** to **EINVAL** and returns -1. -For information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT Debug Heap Details](/visualstudio/debugger/crt-debug-heap-details). For information about the allocation block types and how they're used, see [Types of blocks on the debug heap](/visualstudio/debugger/crt-debug-heap-details). For information about the differences between standard heap functions and their debug versions, see [Debug Versions of Heap Allocation Functions](/visualstudio/debugger/debug-versions-of-heap-allocation-functions). +For information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT debug heap details](/visualstudio/debugger/crt-debug-heap-details). For information about the allocation block types and how they're used, see [Types of blocks on the debug heap](/visualstudio/debugger/crt-debug-heap-details). For information about the differences between standard heap functions and their debug versions, see [Debug versions of heap allocation functions](/visualstudio/debugger/debug-versions-of-heap-allocation-functions). ## Requirements @@ -55,12 +55,12 @@ For information about how memory blocks are allocated, initialized, and managed |-------------|---------------------| |**_aligned_msize_dbg**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Libraries -Debug versions of [C run-time libraries](../../c-runtime-library/crt-library-features.md) only. +Debug versions of [C run-time libraries](../crt-library-features.md) only. ## See also -[Memory Allocation](../../c-runtime-library/memory-allocation.md)
+[Memory allocation](../memory-allocation.md) diff --git a/docs/c-runtime-library/reference/aligned-msize.md b/docs/c-runtime-library/reference/aligned-msize.md index 3149e7c7bfb..34024346495 100644 --- a/docs/c-runtime-library/reference/aligned-msize.md +++ b/docs/c-runtime-library/reference/aligned-msize.md @@ -26,26 +26,26 @@ size_t _aligned_msize( ### Parameters -*`memblock`*
+*`memblock`*\ Pointer to the memory block. -*`alignment`*
+*`alignment`*\ The alignment value, which must be an integer power of 2. -*`offset`*
+*`offset`*\ The offset into the memory allocation to force the alignment. -## Return Value +## Return value Returns the size (in bytes) as an unsigned integer. ## Remarks -The **_aligned_msize** function returns the size, in bytes, of the memory block allocated by a call to [_aligned_malloc](aligned-malloc.md) or [_aligned_realloc](aligned-realloc.md). The *`alignment`* and *`offset`* values must be the same as the values passed to the function that allocated the block. +The **_aligned_msize** function returns the size, in bytes, of the memory block allocated by a call to [`_aligned_malloc`](aligned-malloc.md) or [`_aligned_realloc`](aligned-realloc.md). The *`alignment`* and *`offset`* values must be the same as the values passed to the function that allocated the block. -When the application is linked with a debug version of the C run-time libraries, **_aligned_msize** resolves to [_aligned_msize_dbg](aligned-msize-dbg.md). For more information about how the heap is managed during the debugging process, see [The CRT Debug Heap](/visualstudio/debugger/crt-debug-heap-details). +When the application is linked with a debug version of the C run-time libraries, **_aligned_msize** resolves to [`_aligned_msize_dbg`](aligned-msize-dbg.md). For more information about how the heap is managed during the debugging process, see [The CRT debug heap](/visualstudio/debugger/crt-debug-heap-details). -This function validates its parameter. If *`memblock`* is a null pointer or *`alignment`* isn't a power of 2, **_aligned_msize** invokes an invalid parameter handler, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If the error is handled, the function sets **errno** to **EINVAL** and returns -1. +This function validates its parameter. If *`memblock`* is a null pointer or *`alignment`* isn't a power of 2, **_aligned_msize** invokes an invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). If the error is handled, the function sets **errno** to **EINVAL** and returns -1. 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). @@ -55,12 +55,12 @@ By default, this function's global state is scoped to the application. To change |-------------|---------------------| |**_aligned_msize**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Libraries -All versions of the [C run-time libraries](../../c-runtime-library/crt-library-features.md). +All versions of the [C run-time libraries](../crt-library-features.md). ## See also -[Memory Allocation](../../c-runtime-library/memory-allocation.md)
+[Memory allocation](../memory-allocation.md) diff --git a/docs/c-runtime-library/reference/aligned-offset-malloc-dbg.md b/docs/c-runtime-library/reference/aligned-offset-malloc-dbg.md index 2e6938ce009..81f8ffbdb27 100644 --- a/docs/c-runtime-library/reference/aligned-offset-malloc-dbg.md +++ b/docs/c-runtime-library/reference/aligned-offset-malloc-dbg.md @@ -28,38 +28,38 @@ void * _aligned_offset_malloc_dbg( ### Parameters -*`size`*
+*`size`*\ The size of the requested memory allocation. -*`alignment`*
+*`alignment`*\ The alignment value, which must be an integer power of 2. -*`offset`*
+*`offset`*\ The offset into the memory allocation to force the alignment. -*`filename`*
+*`filename`*\ Pointer to the name of the source file that requested the allocation operation or **NULL**. -*`linenumber`*
+*`linenumber`*\ Line number in the source file where the allocation operation was requested or **NULL**. -## Return Value +## Return value A pointer to the memory block that was allocated or **NULL** if the operation failed. ## Remarks -**_aligned_offset_malloc_dbg** is a debug version of the [_aligned_offset_malloc](aligned-offset-malloc.md) function. When [_DEBUG](../../c-runtime-library/debug.md) isn't defined, each call to **_aligned_offset_malloc_dbg** is reduced to a call to **_aligned_offset_malloc**. Both **_aligned_offset_malloc** and **_aligned_offset_malloc_dbg** allocate a block of memory in the base heap, but **_aligned_offset_malloc_dbg** offers several debugging features: buffers on either side of the user portion of the block to test for leaks, and *`filename`*/*`linenumber`* information to determine the origin of allocation requests. Tracking specific allocation types with a block type parameter isn't a supported debug feature for aligned allocations. Aligned allocations will appear as a `_NORMAL_BLOCK` block type. +**_aligned_offset_malloc_dbg** is a debug version of the [`_aligned_offset_malloc`](aligned-offset-malloc.md) function. When [`_DEBUG`](../debug.md) isn't defined, each call to **_aligned_offset_malloc_dbg** is reduced to a call to **_aligned_offset_malloc**. Both **_aligned_offset_malloc** and **_aligned_offset_malloc_dbg** allocate a block of memory in the base heap, but **_aligned_offset_malloc_dbg** offers several debugging features: buffers on either side of the user portion of the block to test for leaks, and *`filename`*/*`linenumber`* information to determine the origin of allocation requests. Tracking specific allocation types with a block type parameter isn't a supported debug feature for aligned allocations. Aligned allocations will appear as a `_NORMAL_BLOCK` block type. **_aligned_offset_malloc_dbg** allocates the memory block with slightly more space than the requested *`size`*. The extra space is used by the debug heap manager to link the debug memory blocks and to provide the application with debug header information and overwrite buffers. When the block is allocated, the user portion of the block is filled with the value 0xCD, and each of the overwrite buffers are filled with 0xFD. **_aligned_offset_malloc_dbg** is useful in situations where alignment is needed on a nested element; for example, if alignment was needed on a nested class. -**_aligned_offset_malloc_dbg** is based on **malloc**; for more information, see [malloc](malloc.md). +**_aligned_offset_malloc_dbg** is based on **malloc**; for more information, see [`malloc`](malloc.md). -This function sets **errno** to **ENOMEM** if the memory allocation failed or if the requested size was greater than **_HEAP_MAXREQ**. For more information about **errno**, see [errno, _doserrno, _sys_errlist, and _sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). Also, **_aligned_offset_malloc** validates its parameters. If *`alignment`* isn't a power of 2, or if *`offset`* is non-zero and greater than or equal to *`size`*, this function invokes the invalid parameter handler, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, this function returns **NULL** and sets **errno** to **EINVAL**. +This function sets **errno** to **ENOMEM** if the memory allocation failed or if the requested size was greater than **_HEAP_MAXREQ**. For more information about **errno**, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). Also, **_aligned_offset_malloc** validates its parameters. If *`alignment`* isn't a power of 2, or if *`offset`* is non-zero and greater than or equal to *`size`*, this function invokes the invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, this function returns **NULL** and sets **errno** to **EINVAL**. -For information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT Debug Heap Details](/visualstudio/debugger/crt-debug-heap-details). +For information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT debug heap details](/visualstudio/debugger/crt-debug-heap-details). For information about the allocation block types and how they're used, see [Types of blocks on the debug heap](/visualstudio/debugger/crt-debug-heap-details). @@ -69,12 +69,12 @@ For information about the allocation block types and how they're used, see [Type |-------------|---------------------| |**_aligned_offset_malloc_dbg**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Libraries -Debug versions of [C run-time libraries](../../c-runtime-library/crt-library-features.md) only. +Debug versions of [C run-time libraries](../crt-library-features.md) only. ## See also -[Debug Routines](../../c-runtime-library/debug-routines.md)
+[Debug routines](../debug-routines.md) diff --git a/docs/c-runtime-library/reference/aligned-offset-malloc.md b/docs/c-runtime-library/reference/aligned-offset-malloc.md index 1d9bd81522f..4cbee1d9c23 100644 --- a/docs/c-runtime-library/reference/aligned-offset-malloc.md +++ b/docs/c-runtime-library/reference/aligned-offset-malloc.md @@ -26,16 +26,16 @@ void * _aligned_offset_malloc( ### Parameters -*`size`*
+*`size`*\ The size of the requested memory allocation. -*`alignment`*
+*`alignment`*\ The alignment value, which must be an integer power of 2. -*`offset`*
+*`offset`*\ The offset into the memory allocation to force the alignment. -## Return Value +## Return value A pointer to the memory block that was allocated or **NULL** if the operation failed. @@ -43,11 +43,11 @@ A pointer to the memory block that was allocated or **NULL** if the operation fa **_aligned_offset_malloc** is useful in situations where alignment is needed on a nested element; for example, if alignment was needed on a nested class. -**_aligned_offset_malloc** is based on **malloc**; for more information, see [malloc](malloc.md). +**_aligned_offset_malloc** is based on **malloc**; for more information, see [`malloc`](malloc.md). -**_aligned_offset_malloc** is marked `__declspec(noalias)` and `__declspec(restrict)`, meaning that the function is guaranteed not to modify global variables and that the pointer returned isn't aliased. For more information, see [`noalias`](../../cpp/noalias.md) and [restrict](../../cpp/restrict.md). +**_aligned_offset_malloc** is marked `__declspec(noalias)` and `__declspec(restrict)`, meaning that the function is guaranteed not to modify global variables and that the pointer returned isn't aliased. For more information, see [`noalias`](../../cpp/noalias.md) and [`restrict`](../../cpp/restrict.md). -This function sets **errno** to **ENOMEM** if the memory allocation failed or if the requested size was greater than **_HEAP_MAXREQ**. For more information about **errno**, see [errno, _doserrno, _sys_errlist, and _sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). Also, **_aligned_offset_malloc** validates its parameters. If *`alignment`* isn't a power of 2, or if *`offset`* is non-zero and greater than or equal to *`size`*, this function invokes the invalid parameter handler, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, this function returns **NULL** and sets **errno** to **EINVAL**. +This function sets **errno** to **ENOMEM** if the memory allocation failed or if the requested size was greater than **_HEAP_MAXREQ**. For more information about **errno**, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). Also, **_aligned_offset_malloc** validates its parameters. If *`alignment`* isn't a power of 2, or if *`offset`* is non-zero and greater than or equal to *`size`*, this function invokes the invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, this function returns **NULL** and sets **errno** to **EINVAL**. 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). @@ -59,8 +59,8 @@ By default, this function's global state is scoped to the application. To change ## Example -For more information, see [_aligned_malloc](aligned-malloc.md). +For more information, see [`_aligned_malloc`](aligned-malloc.md). ## See also -[Data Alignment](../../c-runtime-library/data-alignment.md)
+[Data alignment](../data-alignment.md) diff --git a/docs/c-runtime-library/reference/aligned-offset-realloc-dbg.md b/docs/c-runtime-library/reference/aligned-offset-realloc-dbg.md index 93a60cd7ee9..afe77da410e 100644 --- a/docs/c-runtime-library/reference/aligned-offset-realloc-dbg.md +++ b/docs/c-runtime-library/reference/aligned-offset-realloc-dbg.md @@ -12,7 +12,7 @@ ms.assetid: 64e30a12-887e-453b-aea8-aed793fca9d8 --- # _aligned_offset_realloc_dbg -Changes the size of a memory block that was allocated with [_aligned_malloc](aligned-malloc.md) or [_aligned_offset_malloc](aligned-offset-malloc.md) (debug version only). +Changes the size of a memory block that was allocated with [`_aligned_malloc`](aligned-malloc.md) or [`_aligned_offset_malloc`](aligned-offset-malloc.md) (debug version only). ## Syntax @@ -29,39 +29,39 @@ void * _aligned_offset_realloc_dbg( ### Parameters -*`memblock`*
+*`memblock`*\ The current memory block pointer. -*`size`*
+*`size`*\ The size of the memory allocation. -*`alignment`*
+*`alignment`*\ The alignment value, which must be an integer power of 2. -*`offset`*
+*`offset`*\ The offset into the memory allocation to force the alignment. -*`filename`*
+*`filename`*\ Pointer to the name of the source file that requested the **aligned_offset_realloc** operation or **NULL**. -*`linenumber`*
+*`linenumber`*\ Line number in the source file where the **aligned_offset_realloc** operation was requested or **NULL**. -## Return Value +## Return value **_aligned_offset_realloc_dbg** returns a void pointer to the reallocated (and possibly moved) memory block. The return value is **NULL** if the size is zero and the buffer argument isn't **NULL**, or if there isn't enough available memory to expand the block to the given size. In the first case, the original block is freed. In the second case, the original block is unchanged. The return value points to a storage space that's suitably aligned for storage of any type of object. To get a pointer to a type other than void, use a type cast on the return value. ## Remarks -**_aligned_offset_realloc_dbg** is a debug version of the [_aligned_offset_realloc](aligned-offset-realloc.md) function. When [_DEBUG](../../c-runtime-library/debug.md) isn't defined, each call to **_aligned_offset_realloc_dbg** is reduced to a call to **_aligned_offset_realloc**. Both **_aligned_offset_realloc** and **_aligned_offset_realloc_dbg** reallocate a memory block in the base heap, but **_aligned_offset_realloc_dbg** accommodates several debugging features: buffers on either side of the user portion of the block to test for leaks, and *`filename`*/*`linenumber`* information to determine the origin of allocation requests. Tracking specific allocation types with a block type parameter isn't a supported debug feature for aligned allocations. Aligned allocations will appear as a `_NORMAL_BLOCK` block type. +**_aligned_offset_realloc_dbg** is a debug version of the [`_aligned_offset_realloc`](aligned-offset-realloc.md) function. When [`_DEBUG`](../debug.md) isn't defined, each call to **_aligned_offset_realloc_dbg** is reduced to a call to **_aligned_offset_realloc**. Both **_aligned_offset_realloc** and **_aligned_offset_realloc_dbg** reallocate a memory block in the base heap, but **_aligned_offset_realloc_dbg** accommodates several debugging features: buffers on either side of the user portion of the block to test for leaks, and *`filename`*/*`linenumber`* information to determine the origin of allocation requests. Tracking specific allocation types with a block type parameter isn't a supported debug feature for aligned allocations. Aligned allocations will appear as a `_NORMAL_BLOCK` block type. -Like [_aligned_offset_malloc](aligned-offset-malloc.md), **_aligned_offset_realloc_dbg** allows a structure to be aligned at an offset within the structure. +Like [`_aligned_offset_malloc`](aligned-offset-malloc.md), **_aligned_offset_realloc_dbg** allows a structure to be aligned at an offset within the structure. -**_realloc_dbg** reallocates the specified memory block with slightly more space than the requested *newSize*. *newSize* might be greater or less than the size of the originally allocated memory block. The extra space is used by the debug heap manager to link the debug memory blocks and to provide the application with debug header information and overwrite buffers. The reallocation might both move the original memory block to a different location in the heap, and also change the size of the memory block. If the memory block is moved, the contents of the original block are overwritten. +**_realloc_dbg** reallocates the specified memory block with slightly more space than the requested *`newSize`*. *`newSize`* might be greater or less than the size of the originally allocated memory block. The extra space is used by the debug heap manager to link the debug memory blocks and to provide the application with debug header information and overwrite buffers. The reallocation might both move the original memory block to a different location in the heap, and also change the size of the memory block. If the memory block is moved, the contents of the original block are overwritten. -This function sets **errno** to **ENOMEM** if the memory allocation failed or if the requested size was greater than **_HEAP_MAXREQ**. For more information about **errno**, see [errno, _doserrno, _sys_errlist, and _sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). Also, **_aligned_offset_realloc_dbg** validates its parameters. If *`alignment`* isn't a power of 2 or if *`offset`* is non-zero and greater than or equal to *`size`*, this function invokes the invalid parameter handler, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, this function returns **NULL** and sets **errno** to **EINVAL**. +This function sets **errno** to **ENOMEM** if the memory allocation failed or if the requested size was greater than **_HEAP_MAXREQ**. For more information about **errno**, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). Also, **_aligned_offset_realloc_dbg** validates its parameters. If *`alignment`* isn't a power of 2 or if *`offset`* is non-zero and greater than or equal to *`size`*, this function invokes the invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, this function returns **NULL** and sets **errno** to **EINVAL**. -For information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT Debug Heap Details](/visualstudio/debugger/crt-debug-heap-details). For information about the allocation block types and how they're used, see [Types of blocks on the debug heap](/visualstudio/debugger/crt-debug-heap-details). For information about the differences between standard heap functions and their debug versions, see [Debug Versions of Heap Allocation Functions](/visualstudio/debugger/debug-versions-of-heap-allocation-functions). +For information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT debug heap details](/visualstudio/debugger/crt-debug-heap-details). For information about the allocation block types and how they're used, see [Types of blocks on the debug heap](/visualstudio/debugger/crt-debug-heap-details). For information about the differences between standard heap functions and their debug versions, see [Debug versions of heap allocation functions](/visualstudio/debugger/debug-versions-of-heap-allocation-functions). ## Requirements @@ -69,12 +69,12 @@ For information about how memory blocks are allocated, initialized, and managed |-------------|---------------------| |**_aligned_offset_realloc_dbg**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Libraries -Debug versions of [C run-time libraries](../../c-runtime-library/crt-library-features.md) only. +Debug versions of [C run-time libraries](../crt-library-features.md) only. ## See also -[Debug Routines](../../c-runtime-library/debug-routines.md)
+[Debug routines](../debug-routines.md) diff --git a/docs/c-runtime-library/reference/aligned-offset-realloc.md b/docs/c-runtime-library/reference/aligned-offset-realloc.md index 3e82c9c056f..197768babd8 100644 --- a/docs/c-runtime-library/reference/aligned-offset-realloc.md +++ b/docs/c-runtime-library/reference/aligned-offset-realloc.md @@ -12,7 +12,7 @@ ms.assetid: e0263533-991e-41b0-acc9-1b8a51ab9ecd --- # _aligned_offset_realloc -Changes the size of a memory block that was allocated with [_aligned_malloc](aligned-malloc.md) or [_aligned_offset_malloc](aligned-offset-malloc.md). +Changes the size of a memory block that was allocated with [`_aligned_malloc`](aligned-malloc.md) or [`_aligned_offset_malloc`](aligned-offset-malloc.md). ## Syntax @@ -27,31 +27,31 @@ void * _aligned_offset_realloc( ### Parameters -*`memblock`*
+*`memblock`*\ The current memory block pointer. -*`size`*
+*`size`*\ The size of the memory allocation. -*`alignment`*
+*`alignment`*\ The alignment value, which must be an integer power of 2. -*`offset`*
+*`offset`*\ The offset into the memory allocation to force the alignment. -## Return Value +## Return value **_aligned_offset_realloc** returns a void pointer to the reallocated (and possibly moved) memory block. The return value is **NULL** if the size is zero and the buffer argument isn't **NULL**, or if there isn't enough available memory to expand the block to the given size. In the first case, the original block is freed. In the second case, the original block is unchanged. The return value points to a storage space that is suitably aligned for storage of any type of object. To get a pointer to a type other than `void`, use a type cast on the return value. -**_aligned_offset_realloc** is marked `__declspec(noalias)` and `__declspec(restrict)`, meaning that the function is guaranteed not to modify global variables and that the pointer returned isn't aliased. For more information, see [`noalias`](../../cpp/noalias.md) and [restrict](../../cpp/restrict.md). +**_aligned_offset_realloc** is marked `__declspec(noalias)` and `__declspec(restrict)`, meaning that the function is guaranteed not to modify global variables and that the pointer returned isn't aliased. For more information, see [`noalias`](../../cpp/noalias.md) and [`restrict`](../../cpp/restrict.md). ## Remarks -Like [_aligned_offset_malloc](aligned-offset-malloc.md), **_aligned_offset_realloc** allows a structure to be aligned at an offset within the structure. +Like [`_aligned_offset_malloc`](aligned-offset-malloc.md), **_aligned_offset_realloc** allows a structure to be aligned at an offset within the structure. -**_aligned_offset_realloc** is based on **malloc**. For more information about using **_aligned_offset_malloc**, see [malloc](malloc.md). If *`memblock`* is **NULL**, the function calls **_aligned_offset_malloc** internally. +**_aligned_offset_realloc** is based on **malloc**. For more information about using **_aligned_offset_malloc**, see [`malloc`](malloc.md). If *`memblock`* is **NULL**, the function calls **_aligned_offset_malloc** internally. -This function sets **errno** to **ENOMEM** if the memory allocation failed or if the requested size was greater than **_HEAP_MAXREQ**. For more information about **errno**, see [errno, _doserrno, _sys_errlist, and _sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). Also, **_aligned_offset_realloc** validates its parameters. If *`alignment`* isn't a power of 2 or if *`offset`* is non-zero and greater than or equal to *`size`*, this function invokes the invalid parameter handler, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, this function returns **NULL** and sets **errno** to **EINVAL**. +This function sets **errno** to **ENOMEM** if the memory allocation failed or if the requested size was greater than **_HEAP_MAXREQ**. For more information about **errno**, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). Also, **_aligned_offset_realloc** validates its parameters. If *`alignment`* isn't a power of 2 or if *`offset`* is non-zero and greater than or equal to *`size`*, this function invokes the invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, this function returns **NULL** and sets **errno** to **EINVAL**. 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). @@ -63,8 +63,8 @@ By default, this function's global state is scoped to the application. To change ## Example -For more information, see [_aligned_malloc](aligned-malloc.md). +For more information, see [`_aligned_malloc`](aligned-malloc.md). ## See also -[Data Alignment](../../c-runtime-library/data-alignment.md)
+[Data alignment](../data-alignment.md) diff --git a/docs/c-runtime-library/reference/aligned-offset-recalloc-dbg.md b/docs/c-runtime-library/reference/aligned-offset-recalloc-dbg.md index 43ae95cba88..e38b3a3192e 100644 --- a/docs/c-runtime-library/reference/aligned-offset-recalloc-dbg.md +++ b/docs/c-runtime-library/reference/aligned-offset-recalloc-dbg.md @@ -12,7 +12,7 @@ ms.assetid: 7ab719c3-77e0-4d2e-934f-01529d062fbf --- # _aligned_offset_recalloc_dbg -Changes the size of a memory block that was allocated with [_aligned_malloc](aligned-malloc.md) or [_aligned_offset_malloc](aligned-offset-malloc.md) and initializes the memory to 0 (debug version only). +Changes the size of a memory block that was allocated with [`_aligned_malloc`](aligned-malloc.md) or [`_aligned_offset_malloc`](aligned-offset-malloc.md) and initializes the memory to 0 (debug version only). ## Syntax @@ -30,40 +30,40 @@ void * _aligned_offset_recalloc_dbg( ### Parameters -*`memblock`*
+*`memblock`*\ The current memory block pointer. -*`number`*
+*`number`*\ Number of elements. -*`size`*
+*`size`*\ Length in bytes of each element. -*`alignment`*
+*`alignment`*\ The alignment value, which must be an integer power of 2. -*`offset`*
+*`offset`*\ The offset into the memory allocation to force the alignment. -*`filename`*
+*`filename`*\ Pointer to the name of the source file that requested the realloc operation or **NULL**. -*`linenumber`*
+*`linenumber`*\ Line number in the source file where the realloc operation was requested or **NULL**. -## Return Value +## Return value **_aligned_offset_recalloc_dbg** returns a void pointer to the reallocated (and possibly moved) memory block. The return value is **NULL** if the size is zero and the buffer argument isn't **NULL**, or if there isn't enough available memory to expand the block to the given size. In the first case, the original block is freed. In the second case, the original block is unchanged. The return value points to a storage space that is suitably aligned for storage of any type of object. To get a pointer to a type other than `void`, use a type cast on the return value. ## Remarks -**_aligned_offset_realloc_dbg** is a debug version of the [_aligned_offset_recalloc](aligned-offset-recalloc.md) function. When [_DEBUG](../../c-runtime-library/debug.md) isn't defined, each call to **_aligned_offset_recalloc_dbg** is reduced to a call to **_aligned_offset_recalloc**. Both **_aligned_offset_recalloc** and **_aligned_offset_recalloc_dbg** reallocate a memory block in the base heap, but **_aligned_offset_recalloc_dbg** accommodates several debugging features: buffers on either side of the user portion of the block to test for leaks, and *filename*/*linenumber* information to determine the origin of allocation requests. Tracking specific allocation types with a block type parameter isn't a supported debug feature for aligned allocations. Aligned allocations will appear as a _NORMAL_BLOCK block type. +**_aligned_offset_realloc_dbg** is a debug version of the [`_aligned_offset_recalloc`](aligned-offset-recalloc.md) function. When [`_DEBUG`](../debug.md) isn't defined, each call to **_aligned_offset_recalloc_dbg** is reduced to a call to **_aligned_offset_recalloc**. Both **_aligned_offset_recalloc** and **_aligned_offset_recalloc_dbg** reallocate a memory block in the base heap, but **_aligned_offset_recalloc_dbg** accommodates several debugging features: buffers on either side of the user portion of the block to test for leaks, and *`filename`*/*`linenumber`* information to determine the origin of allocation requests. Tracking specific allocation types with a block type parameter isn't a supported debug feature for aligned allocations. Aligned allocations will appear as a _NORMAL_BLOCK block type. -**_aligned_offset_realloc_dbg** reallocates the specified memory block with slightly more space than the requested *newSize*. *newSize* might be greater or less than the size of the originally allocated memory block. The extra space is used by the debug heap manager to link the debug memory blocks and to provide the application with debug header information and overwrite buffers. The reallocation might both move the original memory block to a different location in the heap, and also change the size of the memory block. If the memory block is moved, the contents of the original block are overwritten. +**_aligned_offset_realloc_dbg** reallocates the specified memory block with slightly more space than the requested *`newSize`*. *`newSize`* might be greater or less than the size of the originally allocated memory block. The extra space is used by the debug heap manager to link the debug memory blocks and to provide the application with debug header information and overwrite buffers. The reallocation might both move the original memory block to a different location in the heap, and also change the size of the memory block. If the memory block is moved, the contents of the original block are overwritten. -This function sets **errno** to **ENOMEM** if the memory allocation failed or if the requested size (*number* * *size*) was greater than **_HEAP_MAXREQ**. For more information about **errno**, see [errno, _doserrno, _sys_errlist, and _sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). Also, **_aligned_offset_recalloc_dbg** validates its parameters. If *`alignment`* isn't a power of 2, or if *`offset`* is non-zero and greater than or equal to the requested *`size`*, this function invokes the invalid parameter handler, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, this function returns **NULL** and sets **errno** to **EINVAL**. +This function sets **errno** to **ENOMEM** if the memory allocation failed or if the requested size (*`number`* * *`size`*) was greater than **_HEAP_MAXREQ**. For more information about **errno**, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). Also, **_aligned_offset_recalloc_dbg** validates its parameters. If *`alignment`* isn't a power of 2, or if *`offset`* is non-zero and greater than or equal to the requested *`size`*, this function invokes the invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, this function returns **NULL** and sets **errno** to **EINVAL**. -For information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT Debug Heap Details](/visualstudio/debugger/crt-debug-heap-details). For information about the allocation block types and how they're used, see [Types of blocks on the debug heap](/visualstudio/debugger/crt-debug-heap-details). For information about the differences between standard heap functions and their debug versions, see [Debug Versions of Heap Allocation Functions](/visualstudio/debugger/debug-versions-of-heap-allocation-functions). +For information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT debug heap details](/visualstudio/debugger/crt-debug-heap-details). For information about the allocation block types and how they're used, see [Types of blocks on the debug heap](/visualstudio/debugger/crt-debug-heap-details). For information about the differences between standard heap functions and their debug versions, see [Debug versions of heap allocation functions](/visualstudio/debugger/debug-versions-of-heap-allocation-functions). ## Requirements @@ -73,4 +73,4 @@ For information about how memory blocks are allocated, initialized, and managed ## See also -[Data Alignment](../../c-runtime-library/data-alignment.md)
+[Data alignment](../data-alignment.md) diff --git a/docs/c-runtime-library/reference/aligned-offset-recalloc.md b/docs/c-runtime-library/reference/aligned-offset-recalloc.md index 90ae1c653a2..6663e1c5172 100644 --- a/docs/c-runtime-library/reference/aligned-offset-recalloc.md +++ b/docs/c-runtime-library/reference/aligned-offset-recalloc.md @@ -12,7 +12,7 @@ ms.assetid: a258f54e-eeb4-4853-96fc-007d710f98e9 --- # _aligned_offset_recalloc -Changes the size of a memory block that was allocated with [_aligned_malloc](aligned-malloc.md) or [_aligned_offset_malloc](aligned-offset-malloc.md) and initializes the memory to 0. +Changes the size of a memory block that was allocated with [`_aligned_malloc`](aligned-malloc.md) or [`_aligned_offset_malloc`](aligned-offset-malloc.md) and initializes the memory to 0. ## Syntax @@ -28,34 +28,34 @@ void * _aligned_offset_recalloc( ### Parameters -*`memblock`*
+*`memblock`*\ The current memory block pointer. -*`number`*
+*`number`*\ Number of elements. -*`size`*
+*`size`*\ Length in bytes of each element. -*`alignment`*
+*`alignment`*\ The alignment value, which must be an integer power of 2. -*`offset`*
+*`offset`*\ The offset into the memory allocation to force the alignment. -## Return Value +## Return value **_aligned_offset_recalloc** returns a void pointer to the reallocated (and possibly moved) memory block. The return value is **NULL** if the size is zero and the buffer argument isn't **NULL**, or if there isn't enough available memory to expand the block to the given size. In the first case, the original block is freed. In the second case, the original block is unchanged. The return value points to a storage space that is suitably aligned for storage of any type of object. To get a pointer to a type other than void, use a type cast on the return value. -**_aligned_offset_recalloc** is marked `__declspec(noalias)` and `__declspec(restrict)`, meaning that the function is guaranteed not to modify global variables and that the pointer returned isn't aliased. For more information, see [`noalias`](../../cpp/noalias.md) and [restrict](../../cpp/restrict.md). +**_aligned_offset_recalloc** is marked `__declspec(noalias)` and `__declspec(restrict)`, meaning that the function is guaranteed not to modify global variables and that the pointer returned isn't aliased. For more information, see [`noalias`](../../cpp/noalias.md) and [`restrict`](../../cpp/restrict.md). ## Remarks -Like [_aligned_offset_malloc](aligned-offset-malloc.md), **_aligned_offset_recalloc** allows a structure to be aligned at an offset within the structure. +Like [`_aligned_offset_malloc`](aligned-offset-malloc.md), **_aligned_offset_recalloc** allows a structure to be aligned at an offset within the structure. -**_aligned_offset_recalloc** is based on **malloc**. For more information about using **_aligned_offset_malloc**, see [malloc](malloc.md). If *`memblock`* is **NULL**, the function calls **_aligned_offset_malloc** internally. +**_aligned_offset_recalloc** is based on **malloc**. For more information about using **_aligned_offset_malloc**, see [`malloc`](malloc.md). If *`memblock`* is **NULL**, the function calls **_aligned_offset_malloc** internally. -This function sets **errno** to **ENOMEM** if the memory allocation failed or if the requested size (*number* * *size*) was greater than **_HEAP_MAXREQ**. For more information about **errno**, see [errno, _doserrno, _sys_errlist, and _sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). Also, **_aligned_offset_recalloc** validates its parameters. If *`alignment`* isn't a power of 2, or if *`offset`* is non-zero and greater than or equal to the requested *`size`*, this function invokes the invalid parameter handler, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, this function returns **NULL** and sets **errno** to **EINVAL**. +This function sets **errno** to **ENOMEM** if the memory allocation failed or if the requested size (*`number`* * *`size`*) was greater than **_HEAP_MAXREQ**. For more information about **errno**, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). Also, **_aligned_offset_recalloc** validates its parameters. If *`alignment`* isn't a power of 2, or if *`offset`* is non-zero and greater than or equal to the requested *`size`*, this function invokes the invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, this function returns **NULL** and sets **errno** to **EINVAL**. 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). @@ -67,6 +67,6 @@ By default, this function's global state is scoped to the application. To change ## See also -[Data Alignment](../../c-runtime-library/data-alignment.md)
-[_recalloc](recalloc.md)
-[_aligned_recalloc](aligned-recalloc.md)
+[Data alignment](../data-alignment.md)\ +[`_recalloc`](recalloc.md)\ +[`_aligned_recalloc`](aligned-recalloc.md) diff --git a/docs/c-runtime-library/reference/aligned-realloc-dbg.md b/docs/c-runtime-library/reference/aligned-realloc-dbg.md index 9383c552a63..0bfce8430dd 100644 --- a/docs/c-runtime-library/reference/aligned-realloc-dbg.md +++ b/docs/c-runtime-library/reference/aligned-realloc-dbg.md @@ -12,7 +12,7 @@ ms.assetid: 8aede920-991e-44cd-867f-83dc2165db47 --- # _aligned_realloc_dbg -Changes the size of a memory block that was allocated with [_aligned_malloc](aligned-malloc.md) or [_aligned_offset_malloc](aligned-offset-malloc.md) (debug version only). +Changes the size of a memory block that was allocated with [`_aligned_malloc`](aligned-malloc.md) or [`_aligned_offset_malloc`](aligned-offset-malloc.md) (debug version only). ## Syntax @@ -28,22 +28,22 @@ void * _aligned_realloc_dbg( ### Parameters -*`memblock`*
+*`memblock`*\ The current memory block pointer. -*`size`*
+*`size`*\ The size of the requested memory allocation. -*`alignment`*
+*`alignment`*\ The alignment value, which must be an integer power of 2. -*`filename`*
+*`filename`*\ Pointer to the name of the source file that requested the **realloc** operation or **NULL**. -*`linenumber`*
+*`linenumber`*\ Line number in the source file where the **realloc** operation was requested or **NULL**. -## Return Value +## Return value **_aligned_realloc_dbg** returns a void pointer to the reallocated (and possibly moved) memory block. The return value is **NULL** if the size is zero and the buffer argument isn't **NULL**, or if there isn't enough available memory to expand the block to the given size. In the first case, the original block is freed. In the second, the original block is unchanged. The return value points to a storage space that is suitably aligned for storage of any type of object. To get a pointer to a type other than void, use a type cast on the return value. @@ -51,15 +51,15 @@ It's an error to reallocate memory and change the alignment of a block. ## Remarks -**_aligned_realloc_dbg** is a debug version of the [_aligned_realloc](aligned-realloc.md) function. When [_DEBUG](../../c-runtime-library/debug.md) isn't defined, each call to **_aligned_realloc_dbg** is reduced to a call to **_aligned_realloc**. Both **_aligned_realloc** and **_aligned_realloc_dbg** reallocate a memory block in the base heap, but **_aligned_realloc_dbg** accommodates several debugging features: buffers on either side of the user portion of the block to test for leaks, and *`filename`*/*`linenumber`* information to determine the origin of allocation requests. Tracking specific allocation types with a block type parameter isn't a supported debug feature for aligned allocations. Aligned allocations will appear as a `_NORMAL_BLOCK` block type. +**_aligned_realloc_dbg** is a debug version of the [`_aligned_realloc`](aligned-realloc.md) function. When [`_DEBUG`](../debug.md) isn't defined, each call to **_aligned_realloc_dbg** is reduced to a call to **_aligned_realloc**. Both **_aligned_realloc** and **_aligned_realloc_dbg** reallocate a memory block in the base heap, but **_aligned_realloc_dbg** accommodates several debugging features: buffers on either side of the user portion of the block to test for leaks, and *`filename`*/*`linenumber`* information to determine the origin of allocation requests. Tracking specific allocation types with a block type parameter isn't a supported debug feature for aligned allocations. Aligned allocations will appear as a `_NORMAL_BLOCK` block type. -**_aligned_realloc_dbg** reallocates the specified memory block with slightly more space than the requested *newSize*. *newSize* might be greater or less than the size of the originally allocated memory block. The extra space is used by the debug heap manager to link the debug memory blocks and to provide the application with debug header information and overwrite buffers. The reallocation might both move the original memory block to a different location in the heap, and change the size of the memory block. If the memory block is moved, the contents of the original block are overwritten. +**_aligned_realloc_dbg** reallocates the specified memory block with slightly more space than the requested *`newSize`*. *`newSize`* might be greater or less than the size of the originally allocated memory block. The extra space is used by the debug heap manager to link the debug memory blocks and to provide the application with debug header information and overwrite buffers. The reallocation might both move the original memory block to a different location in the heap, and change the size of the memory block. If the memory block is moved, the contents of the original block are overwritten. -**_aligned_realloc_dbg** sets **errno** to **ENOMEM** if a memory allocation fails or if the amount of memory needed (including the overhead mentioned previously) exceeds **_HEAP_MAXREQ**. For information about this and other error codes, see [errno, _doserrno, _sys_errlist, and _sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +**_aligned_realloc_dbg** sets **errno** to **ENOMEM** if a memory allocation fails or if the amount of memory needed (including the overhead mentioned previously) exceeds **_HEAP_MAXREQ**. For information about this and other error codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). -Also, **_aligned_realloc_dbg** validates its parameters. If *alignment* isn't a power of 2, this function invokes the invalid parameter handler, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, this function returns **NULL** and sets **errno** to **EINVAL**. +Also, **_aligned_realloc_dbg** validates its parameters. If *`alignment`* isn't a power of 2, this function invokes the invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, this function returns **NULL** and sets **errno** to **EINVAL**. -For information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT Debug Heap Details](/visualstudio/debugger/crt-debug-heap-details). For information about the allocation block types and how they're used, see [Types of blocks on the debug heap](/visualstudio/debugger/crt-debug-heap-details). For information about the differences between standard heap functions and their debug versions, see [Debug Versions of Heap Allocation Functions](/visualstudio/debugger/debug-versions-of-heap-allocation-functions). +For information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT debug heap details](/visualstudio/debugger/crt-debug-heap-details). For information about the allocation block types and how they're used, see [Types of blocks on the debug heap](/visualstudio/debugger/crt-debug-heap-details). For information about the differences between standard heap functions and their debug versions, see [Debug versions of heap allocation functions](/visualstudio/debugger/debug-versions-of-heap-allocation-functions). ## Requirements @@ -67,12 +67,12 @@ For information about how memory blocks are allocated, initialized, and managed |-------------|---------------------| |**_aligned_realloc_dbg**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Libraries -Debug versions of [C run-time libraries](../../c-runtime-library/crt-library-features.md) only. +Debug versions of [C run-time libraries](../crt-library-features.md) only. ## See also -[Debug Routines](../../c-runtime-library/debug-routines.md)
+[Debug routines](../debug-routines.md) diff --git a/docs/c-runtime-library/reference/aligned-realloc.md b/docs/c-runtime-library/reference/aligned-realloc.md index 4ce426f98b5..da0853621fa 100644 --- a/docs/c-runtime-library/reference/aligned-realloc.md +++ b/docs/c-runtime-library/reference/aligned-realloc.md @@ -12,7 +12,7 @@ ms.assetid: 80ce96e8-6087-416f-88aa-4dbb8cb1d218 --- # _aligned_realloc -Changes the size of a memory block that was allocated with [_aligned_malloc](aligned-malloc.md) or [_aligned_offset_malloc](aligned-offset-malloc.md). +Changes the size of a memory block that was allocated with [`_aligned_malloc`](aligned-malloc.md) or [`_aligned_offset_malloc`](aligned-offset-malloc.md). ## Syntax @@ -26,16 +26,16 @@ void * _aligned_realloc( ### Parameters -*`memblock`*
+*`memblock`*\ The current memory block pointer. -*`size`*
+*`size`*\ The size of the requested memory allocation. -*`alignment`*
+*`alignment`*\ The alignment value, which must be an integer power of 2. -## Return Value +## Return value **_aligned_realloc** returns a void pointer to the reallocated (and possibly moved) memory block. The return value is **NULL** if the size is zero and the buffer argument isn't **NULL**, or if there isn't enough available memory to expand the block to the given size. In the first case, the original block is freed. In the second, the original block is unchanged. The return value points to a storage space that is suitably aligned for storage of any type of object. To get a pointer to a type other than void, use a type cast on the return value. @@ -43,9 +43,9 @@ It's an error to reallocate memory and change the alignment of a block. ## Remarks -**_aligned_realloc** is based on **malloc**. For more information about using **_aligned_offset_malloc**, see [malloc](malloc.md). +**_aligned_realloc** is based on **malloc**. For more information about using **_aligned_offset_malloc**, see [`malloc`](malloc.md). -This function sets **errno** to **ENOMEM** if the memory allocation failed or if the requested size was greater than **_HEAP_MAXREQ**. For more information about **errno**, see [errno, _doserrno, _sys_errlist, and _sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). Also, **_aligned_realloc** validates its parameters. If *`alignment`* isn't a power of 2, this function invokes the invalid parameter handler, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, this function returns **NULL** and sets **errno** to **EINVAL**. +This function sets **errno** to **ENOMEM** if the memory allocation failed or if the requested size was greater than **_HEAP_MAXREQ**. For more information about **errno**, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). Also, **_aligned_realloc** validates its parameters. If *`alignment`* isn't a power of 2, this function invokes the invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, this function returns **NULL** and sets **errno** to **EINVAL**. 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). @@ -57,8 +57,8 @@ By default, this function's global state is scoped to the application. To change ## Example -For more information, see [_aligned_malloc](aligned-malloc.md). +For more information, see [`_aligned_malloc`](aligned-malloc.md). ## See also -[Data Alignment](../../c-runtime-library/data-alignment.md)
+[Data alignment](../data-alignment.md) diff --git a/docs/c-runtime-library/reference/aligned-recalloc-dbg.md b/docs/c-runtime-library/reference/aligned-recalloc-dbg.md index d64781022d3..5d526fd8dfe 100644 --- a/docs/c-runtime-library/reference/aligned-recalloc-dbg.md +++ b/docs/c-runtime-library/reference/aligned-recalloc-dbg.md @@ -12,7 +12,7 @@ ms.assetid: 55c3c27e-561c-4d6b-9bf9-1e34cc556e4b --- # _aligned_recalloc_dbg -Changes the size of a memory block that was allocated with [_aligned_malloc](aligned-malloc.md) or [_aligned_offset_malloc](aligned-offset-malloc.md) and initializes the memory to 0 (debug version only). +Changes the size of a memory block that was allocated with [`_aligned_malloc`](aligned-malloc.md) or [`_aligned_offset_malloc`](aligned-offset-malloc.md) and initializes the memory to 0 (debug version only). ## Syntax @@ -29,25 +29,25 @@ void * _aligned_recalloc_dbg( ### Parameters -*`memblock`*
+*`memblock`*\ The current memory block pointer. -*`number`*
+*`number`*\ The number of elements. -*`size`*
+*`size`*\ The size in bytes of each element. -*`alignment`*
+*`alignment`*\ The alignment value, which must be an integer power of 2. -*`filename`*
+*`filename`*\ Pointer to name of the source file that requested allocation operation or **NULL**. -*`linenumber`*
+*`linenumber`*\ Line number in the source file where allocation operation was requested or **NULL**. -## Return Value +## Return value **_aligned_recalloc_dbg** returns a `void` pointer to the reallocated (and possibly moved) memory block. The return value is **NULL** if the size is zero and the buffer argument isn't **NULL**, or if there isn't enough available memory to expand the block to the given size. In the first case, the original block is freed. In the second case, the original block is unchanged. The return value points to a storage space that is suitably aligned for storage of any type of object. To get a pointer to a type other than `void`, use a type cast on the return value. @@ -55,15 +55,15 @@ It's an error to reallocate memory and change the alignment of a block. ## Remarks -**_aligned_recalloc_dbg** is a debug version of the [_aligned_recalloc](aligned-recalloc.md) function. When [_DEBUG](../../c-runtime-library/debug.md) isn't defined, each call to **_aligned_recalloc_dbg** is reduced to a call to **_aligned_recalloc**. Both **_aligned_recalloc** and **_aligned_recalloc_dbg** reallocate a memory block in the base heap, but **_aligned_recalloc_dbg** accommodates several debugging features: buffers on either side of the user portion of the block to test for leaks, and *`filename`*/*`linenumber`* information to determine the origin of allocation requests. Tracking specific allocation types with a block type parameter isn't a supported debug feature for aligned allocations. Aligned allocations will appear as a _NORMAL_BLOCK block type. +**_aligned_recalloc_dbg** is a debug version of the [`_aligned_recalloc`](aligned-recalloc.md) function. When [`_DEBUG`](../debug.md) isn't defined, each call to **_aligned_recalloc_dbg** is reduced to a call to **_aligned_recalloc**. Both **_aligned_recalloc** and **_aligned_recalloc_dbg** reallocate a memory block in the base heap, but **_aligned_recalloc_dbg** accommodates several debugging features: buffers on either side of the user portion of the block to test for leaks, and *`filename`*/*`linenumber`* information to determine the origin of allocation requests. Tracking specific allocation types with a block type parameter isn't a supported debug feature for aligned allocations. Aligned allocations will appear as a _NORMAL_BLOCK block type. **_aligned_recalloc_dbg** reallocates the specified memory block with slightly more space than the requested size (*`number`* * *`size`*) which might be greater or less than the size of the originally allocated memory block. The extra space is used by the debug heap manager to link the debug memory blocks and to provide the application with debug header information and overwrite buffers. The reallocation might both move the original memory block to a different location in the heap, and change the size of the memory block. The user portion of the block is filled with the value 0xCD, and the overwrite buffers are filled with 0xFD. -**_aligned_recalloc_dbg** sets **errno** to **ENOMEM** if a memory allocation fails; **EINVAL** is returned if the amount of memory needed (including the overhead mentioned previously) exceeds **_HEAP_MAXREQ**. For information about this and other error codes, see [errno, _doserrno, _sys_errlist, and _sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +**_aligned_recalloc_dbg** sets **errno** to **ENOMEM** if a memory allocation fails; **EINVAL** is returned if the amount of memory needed (including the overhead mentioned previously) exceeds **_HEAP_MAXREQ**. For information about this and other error codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). -Also, **_aligned_recalloc_dbg** validates its parameters. If *alignment* isn't a power of 2, this function invokes the invalid parameter handler, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, this function returns **NULL** and sets **errno** to **EINVAL**. +Also, **_aligned_recalloc_dbg** validates its parameters. If *`alignment`* isn't a power of 2, this function invokes the invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, this function returns **NULL** and sets **errno** to **EINVAL**. -For information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT Debug Heap Details](/visualstudio/debugger/crt-debug-heap-details). For information about the allocation block types and how they're used, see [Types of blocks on the debug heap](/visualstudio/debugger/crt-debug-heap-details). For information about the differences between standard heap functions and their debug versions, see [Debug Versions of Heap Allocation Functions](/visualstudio/debugger/debug-versions-of-heap-allocation-functions). +For information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT debug heap details](/visualstudio/debugger/crt-debug-heap-details). For information about the allocation block types and how they're used, see [Types of blocks on the debug heap](/visualstudio/debugger/crt-debug-heap-details). For information about the differences between standard heap functions and their debug versions, see [Debug versions of heap allocation functions](/visualstudio/debugger/debug-versions-of-heap-allocation-functions). ## Requirements @@ -71,12 +71,12 @@ For information about how memory blocks are allocated, initialized, and managed |-------------|---------------------| |**_aligned_recalloc_dbg**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Libraries -Debug versions of [C run-time libraries](../../c-runtime-library/crt-library-features.md) only. +Debug versions of [C run-time libraries](../crt-library-features.md) only. ## See also -[Debug Routines](../../c-runtime-library/debug-routines.md)
+[Debug routines](../debug-routines.md) diff --git a/docs/c-runtime-library/reference/aligned-recalloc.md b/docs/c-runtime-library/reference/aligned-recalloc.md index 2a732394c59..f98f5c7c5be 100644 --- a/docs/c-runtime-library/reference/aligned-recalloc.md +++ b/docs/c-runtime-library/reference/aligned-recalloc.md @@ -12,7 +12,7 @@ ms.assetid: d3da3dcc-79ef-4273-8af5-ac7469420142 --- # _aligned_recalloc -Changes the size of a memory block that was allocated with [_aligned_malloc](aligned-malloc.md) or [_aligned_offset_malloc](aligned-offset-malloc.md) and initializes the memory to 0. +Changes the size of a memory block that was allocated with [`_aligned_malloc`](aligned-malloc.md) or [`_aligned_offset_malloc`](aligned-offset-malloc.md) and initializes the memory to 0. ## Syntax @@ -27,19 +27,19 @@ void * _aligned_recalloc( ### Parameters -*`memblock`*
+*`memblock`*\ The current memory block pointer. -*`number`*
+*`number`*\ The number of elements. -*`size`*
+*`size`*\ The size in bytes of each element. -*`alignment`*
+*`alignment`*\ The alignment value, which must be an integer power of 2. -## Return Value +## Return value **_aligned_recalloc** returns a void pointer to the reallocated (and possibly moved) memory block. The return value is **NULL** if the size is zero and the buffer argument isn't **NULL**, or if there isn't enough available memory to expand the block to the given size. In the first case, the original block is freed. In the second case, the original block is unchanged. The return value points to a storage space that is suitably aligned for storage of any type of object. To get a pointer to a type other than void, use a type cast on the return value. @@ -47,9 +47,9 @@ It's an error to reallocate memory and change the alignment of a block. ## Remarks -**_aligned_recalloc** is based on **malloc**. For more information about using **_aligned_offset_malloc**, see [malloc](malloc.md). +**_aligned_recalloc** is based on **malloc**. For more information about using **_aligned_offset_malloc**, see [`malloc`](malloc.md). -This function sets **errno** to **ENOMEM** if the memory allocation failed or if the requested size was greater than **_HEAP_MAXREQ**. For more information about **errno**, see [errno, _doserrno, _sys_errlist, and _sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). Also, **_aligned_recalloc** validates its parameters. If *`alignment`* isn't a power of 2, this function invokes the invalid parameter handler, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, this function returns **NULL** and sets **errno** to **EINVAL**. +This function sets **errno** to **ENOMEM** if the memory allocation failed or if the requested size was greater than **_HEAP_MAXREQ**. For more information about **errno**, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). Also, **_aligned_recalloc** validates its parameters. If *`alignment`* isn't a power of 2, this function invokes the invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, this function returns **NULL** and sets **errno** to **EINVAL**. 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). @@ -61,6 +61,6 @@ By default, this function's global state is scoped to the application. To change ## See also -[Data Alignment](../../c-runtime-library/data-alignment.md)
-[_recalloc](recalloc.md)
-[_aligned_offset_recalloc](aligned-offset-recalloc.md)
+[Data alignment](../data-alignment.md)\ +[`_recalloc`](recalloc.md)\ +[`_aligned_offset_recalloc`](aligned-offset-recalloc.md) diff --git a/docs/c-runtime-library/reference/alloca.md b/docs/c-runtime-library/reference/alloca.md index 28a8b705f38..a5680b3fb5e 100644 --- a/docs/c-runtime-library/reference/alloca.md +++ b/docs/c-runtime-library/reference/alloca.md @@ -26,11 +26,11 @@ void *_alloca( *`size`*\ Bytes to be allocated from the stack. -## Return Value +## Return value The **`_alloca`** routine returns a **`void`** pointer to the allocated space, which is suitably aligned for storage of any type of object. If *`size`* is 0, **`_alloca`** allocates a zero-length item and returns a valid pointer to that item. -A stack overflow exception is generated if the space can't be allocated. The stack overflow exception isn't a C++ exception; it's a structured exception. Instead of using C++ exception handling, you must use [Structured Exception Handling](../../cpp/structured-exception-handling-c-cpp.md) (SEH). +A stack overflow exception is generated if the space can't be allocated. The stack overflow exception isn't a C++ exception; it's a structured exception. Instead of using C++ exception handling, you must use [Structured exception handling](../../cpp/structured-exception-handling-c-cpp.md) (SEH). ## Remarks @@ -117,7 +117,7 @@ Allocated 1000 bytes of stack at 0x0012FB50 ## See also -[Memory Allocation](../../c-runtime-library/memory-allocation.md)\ +[Memory allocation](../memory-allocation.md)\ [`calloc`](calloc.md)\ [`malloc`](malloc.md)\ [`realloc`](realloc.md)\ diff --git a/docs/c-runtime-library/reference/amsg-exit.md b/docs/c-runtime-library/reference/amsg-exit.md index 168105fe6b0..f86b3086dd7 100644 --- a/docs/c-runtime-library/reference/amsg-exit.md +++ b/docs/c-runtime-library/reference/amsg-exit.md @@ -22,7 +22,7 @@ void _amsg_exit ( int rterrnum ); ### Parameters -*`rterrnum`*
+*`rterrnum`*\ The identification number of a system-defined runtime error message. ## Remarks diff --git a/docs/c-runtime-library/reference/asctime-s-wasctime-s.md b/docs/c-runtime-library/reference/asctime-s-wasctime-s.md index dcd4c50c988..e3fad90badc 100644 --- a/docs/c-runtime-library/reference/asctime-s-wasctime-s.md +++ b/docs/c-runtime-library/reference/asctime-s-wasctime-s.md @@ -12,7 +12,7 @@ ms.assetid: 17ad9b2b-a459-465d-976a-42822897688a --- # asctime_s, _wasctime_s -Convert a `tm` time structure to a character string. These functions are versions of [asctime, _wasctime](asctime-wasctime.md) with security enhancements as described in [Security Features in the CRT](../../c-runtime-library/security-features-in-the-crt.md). +Convert a `tm` time structure to a character string. These functions are versions of [`asctime`, `_wasctime`](asctime-wasctime.md) with security enhancements as described in [Security features in the CRT](../security-features-in-the-crt.md). ## Syntax @@ -41,26 +41,26 @@ errno_t _wasctime_s( ### Parameters -*`buffer`*
+*`buffer`*\ A pointer to a buffer to store the character string result. This function assumes a pointer to a valid memory location with a size specified by *`numberOfElements`*. -*`numberOfElements`*
+*`numberOfElements`*\ The size of the buffer used to store the result. -*`tmSource`*
+*`tmSource`*\ Time/date structure. This function assumes a pointer to a valid `struct tm` object. -## Return Value +## Return value -Zero if successful. If there's a failure, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, the return value is an error code. Error codes are defined in ERRNO.H. For more information, see [errno Constants](../../c-runtime-library/errno-constants.md). The actual error codes returned for each error condition are shown in the following table. +Zero if successful. If there's a failure, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, the return value is an error code. Error codes are defined in ERRNO.H. For more information, see [`errno` constants](../errno-constants.md). The actual error codes returned for each error condition are shown in the following table. -### Error Conditions +### Error conditions -|*buffer*|*numberOfElements*|*tmSource*|Return|Value in *buffer*| +|*`buffer`*|*`numberOfElements`*|*`tmSource`*|Return|Value in *`buffer`*| |--------------|------------------------|----------|------------|-----------------------| |**NULL**|Any|Any|**EINVAL**|Not modified| |Not **NULL** (points to valid memory)|0|Any|**EINVAL**|Not modified| -|Not **NULL**|0< size < 26|Any|**EINVAL**|Empty string| +|Not **NULL**|0< *`numberOfElements`* < 26|Any|**EINVAL**|Empty string| |Not **NULL**|>= 26|**NULL**|**EINVAL**|Empty string| |Not **NULL**|>= 26|Invalid time structure or out of range values for components of the time|**EINVAL**|Empty string| @@ -69,7 +69,7 @@ Zero if successful. If there's a failure, the invalid parameter handler is invok ## Remarks -The **asctime** function converts a time stored as a structure to a character string. The *tmSource* value is typically obtained from a call to **gmtime** or **localtime**. Both functions can be used to fill in a `tm` structure, as defined in TIME.H. +The **asctime** function converts a time stored as a structure to a character string. The *`tmSource`* value is typically obtained from a call to **gmtime** or **localtime**. Both functions can be used to fill in a `tm` structure, as defined in TIME.H. |timeptr member|Value| |--------------------|-----------| @@ -83,23 +83,23 @@ The **asctime** function converts a time stored as a structure to a character st |**tm_yday**|Day of year (0-365; January 1 = 0)| |**tm_year**|Year (current year minus 1900)| -The converted character string is also adjusted according to the local time zone settings. For information about configuring the local time, see the [time, _time32, _time64](time-time32-time64.md), [_ftime, _ftime32, _ftime64](ftime-ftime32-ftime64.md), and [localtime_s, _localtime32_s, _localtime64_s](localtime-s-localtime32-s-localtime64-s.md) functions. For information about defining the time zone environment and global variables, see [_tzset](tzset.md). +The converted character string is also adjusted according to the local time zone settings. For information about configuring the local time, see the [`time`, `_time32`, `_time64`](time-time32-time64.md), [`_ftime`, `_ftime32`, `_ftime64`](ftime-ftime32-ftime64.md), and [`localtime_s`, `_localtime32_s`, `_localtime64_s`](localtime-s-localtime32-s-localtime64-s.md) functions. For information about defining the time zone environment and global variables, see [`_tzset`](tzset.md). The string result produced by **asctime_s** contains exactly 26 characters and has the form `Wed Jan 2 02:03:55 1980\n\0`. A 24-hour clock is used. All fields have a constant width. The new line character and the null character occupy the last two positions of the string. The value passed in as *`numberOfElements`* should be at least this size. If it's less, an error code, **EINVAL**, will be returned. **_wasctime_s** is a wide-character version of **asctime_s**. **_wasctime_s** and **asctime_s** behave identically otherwise. -The debug library versions of these functions first fill the buffer with 0xFE. To disable this behavior, use [_CrtSetDebugFillThreshold](crtsetdebugfillthreshold.md). +The debug library versions of these functions first fill the buffer with 0xFE. To disable this behavior, use [`_CrtSetDebugFillThreshold`](crtsetdebugfillthreshold.md). By default, this function's global state is scoped to the application. To change this behavior, see [Global state in the CRT](../global-state.md). -### Generic-Text Routine Mapping +### Generic-text routine mapping |TCHAR.H routine|_UNICODE & _MBCS not defined|_MBCS defined|_UNICODE defined| |---------------------|------------------------------------|--------------------|-----------------------| |**_tasctime_s**|**asctime_s**|**asctime_s**|**_wasctime_s**| -In C++, using these functions is simplified by template overloads; the overloads can infer buffer length automatically, eliminating the need to specify a size argument. For more information, see [Secure Template Overloads](../../c-runtime-library/secure-template-overloads.md). +In C++, using these functions is simplified by template overloads; the overloads can infer buffer length automatically, eliminating the need to specify a size argument. For more information, see [Secure template overloads](../secure-template-overloads.md). ## Requirements @@ -152,10 +152,10 @@ Current date and time: Wed May 14 15:30:17 2003 ## See also -[Time Management](../../c-runtime-library/time-management.md)
-[ctime_s, _ctime32_s, _ctime64_s, _wctime_s, _wctime32_s, _wctime64_s](ctime-s-ctime32-s-ctime64-s-wctime-s-wctime32-s-wctime64-s.md)
-[_ftime, _ftime32, _ftime64](ftime-ftime32-ftime64.md)
-[gmtime_s, _gmtime32_s, _gmtime64_s](gmtime-s-gmtime32-s-gmtime64-s.md)
-[localtime_s, _localtime32_s, _localtime64_s](localtime-s-localtime32-s-localtime64-s.md)
-[time, _time32, _time64](time-time32-time64.md)
-[_tzset](tzset.md)
+[Time management](../time-management.md)\ +[`ctime_s`, `_ctime32_s`, `_ctime64_s`, `_wctime_s`, `_wctime32_s`, `_wctime64_s`](ctime-s-ctime32-s-ctime64-s-wctime-s-wctime32-s-wctime64-s.md)\ +[`_ftime`, `_ftime32`, `_ftime64`](ftime-ftime32-ftime64.md)\ +[`gmtime_s`, `_gmtime32_s`, `_gmtime64_s`](gmtime-s-gmtime32-s-gmtime64-s.md)\ +[`localtime_s`, `_localtime32_s`, `_localtime64_s`](localtime-s-localtime32-s-localtime64-s.md)\ +[`time`, `_time32`, `_time64`](time-time32-time64.md)\ +[`_tzset`](tzset.md) diff --git a/docs/c-runtime-library/reference/asctime-wasctime.md b/docs/c-runtime-library/reference/asctime-wasctime.md index 11a398cf1ad..ee9ebe17fe3 100644 --- a/docs/c-runtime-library/reference/asctime-wasctime.md +++ b/docs/c-runtime-library/reference/asctime-wasctime.md @@ -12,7 +12,7 @@ ms.assetid: 974f1727-10ff-4ed4-8cac-2eb2d681f576 --- # asctime, _wasctime -Convert a `tm` time structure to a character string. More secure versions of these functions are available; see [asctime_s, _wasctime_s](asctime-s-wasctime-s.md). +Convert a `tm` time structure to a character string. More secure versions of these functions are available; see [`asctime_s`, `_wasctime_s`](asctime-s-wasctime-s.md). ## Syntax @@ -27,16 +27,16 @@ wchar_t *_wasctime( ### Parameters -*`timeptr`*
+*`timeptr`*\ Time/date structure. -## Return Value +## Return value **asctime** returns a pointer to the character string result; **_wasctime** returns a pointer to the wide-character string result. There's no error return value. ## Remarks -More secure versions of these functions are available; see [asctime_s, _wasctime_s](asctime-s-wasctime-s.md). +More secure versions of these functions are available; see [`asctime_s`, `_wasctime_s`](asctime-s-wasctime-s.md). The **asctime** function converts a time stored as a structure to a character string. The *`timeptr`* value is typically obtained from a call to **gmtime** or **localtime**, which both return a pointer to a `tm` structure, defined in TIME.H. @@ -52,17 +52,17 @@ The **asctime** function converts a time stored as a structure to a character st |**tm_yday**|Day of year (0-365; January 1 = 0)| |**tm_year**|Year (current year minus 1900)| -The converted character string is also adjusted according to the local time zone settings. For information about configuring the local time, see the [time](time-time32-time64.md), [_ftime](ftime-ftime32-ftime64.md), and [localtime](localtime-localtime32-localtime64.md) functions. For information about defining the time zone environment and global variables, see the [_tzset](tzset.md) function. +The converted character string is also adjusted according to the local time zone settings. For information about configuring the local time, see the [`time`](time-time32-time64.md), [`_ftime`](ftime-ftime32-ftime64.md), and [`localtime`](localtime-localtime32-localtime64.md) functions. For information about defining the time zone environment and global variables, see the [`_tzset`](tzset.md) function. The string result produced by **asctime** contains exactly 26 characters and has the form `Wed Jan 2 02:03:55 1980\n\0`. A 24-hour clock is used. All fields have a constant width. The newline character and the null character occupy the last two positions of the string. **asctime** uses a single, statically allocated buffer to hold the return string. Each call to this function destroys the result of the previous call. **_wasctime** is a wide-character version of **asctime**. **_wasctime** and **asctime** behave identically otherwise. -These functions validate their parameters. If *timeptr* is a null pointer, or if it contains out-of-range values, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, the function returns **NULL** and sets **errno** to **EINVAL**. +These functions validate their parameters. If *`timeptr`* is a null pointer, or if it contains out-of-range values, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, the function returns **NULL** and sets **errno** to **EINVAL**. By default, this function's global state is scoped to the application. To change this behavior, see [Global state in the CRT](../global-state.md). -### Generic-Text Routine Mapping +### Generic-text routine mapping |TCHAR.H routine|_UNICODE & _MBCS not defined|_MBCS defined|_UNICODE defined| |---------------------|------------------------------------|--------------------|-----------------------| @@ -109,11 +109,11 @@ Current date and time: Sun Feb 3 11:38:58 2002 ## See also -[Time Management](../../c-runtime-library/time-management.md)
-[ctime, _ctime32, _ctime64, _wctime, _wctime32, _wctime64](ctime-ctime32-ctime64-wctime-wctime32-wctime64.md)
-[_ftime, _ftime32, _ftime64](ftime-ftime32-ftime64.md)
-[gmtime, _gmtime32, _gmtime64](gmtime-gmtime32-gmtime64.md)
-[localtime, _localtime32, _localtime64](localtime-localtime32-localtime64.md)
-[time, _time32, _time64](time-time32-time64.md)
-[_tzset](tzset.md)
-[asctime_s, _wasctime_s](asctime-s-wasctime-s.md)
+[Time management](../time-management.md)\ +[`ctime`, `_ctime32`, `_ctime64`, `_wctime`, `_wctime32`, `_wctime64`](ctime-ctime32-ctime64-wctime-wctime32-wctime64.md)\ +[`_ftime`, `_ftime32`, `_ftime64`](ftime-ftime32-ftime64.md)\ +[`gmtime`, `_gmtime32`, `_gmtime64`](gmtime-gmtime32-gmtime64.md)\ +[`localtime`, `_localtime32`, `_localtime64`](localtime-localtime32-localtime64.md)\ +[`time`, `_time32`, `_time64`](time-time32-time64.md)\ +[`_tzset`](tzset.md)\ +[`asctime_s`, `_wasctime_s`](asctime-s-wasctime-s.md) diff --git a/docs/c-runtime-library/reference/asin-asinf-asinl.md b/docs/c-runtime-library/reference/asin-asinf-asinl.md index 55a482b64ce..14ded8f1e2d 100644 --- a/docs/c-runtime-library/reference/asin-asinf-asinl.md +++ b/docs/c-runtime-library/reference/asin-asinf-asinl.md @@ -30,7 +30,7 @@ long double asin( long double x ); // C++ only *`x`*\ Value whose arcsine is to be calculated. -## Return Value +## Return value The **`asin`** function returns the arcsine (the inverse sine function) of *`x`* in the range -π/2 to π/2 radians. @@ -46,7 +46,7 @@ By default, if *`x`* is less than -1 or greater than 1, **`asin`** returns an in Because C++ allows overloading, you can call overloads of **`asin`** with **`float`** and **`long double`** values. In a C program, unless you're using the `` macro to call this function, **`asin`** always takes and returns a **`double`**. -If you use the `` `asin()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../../c-runtime-library/tgmath.md) for details. +If you use the `` `asin()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../tgmath.md) for details. 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). @@ -63,7 +63,7 @@ For more information, see [`acos`, `acosf`, `acosl`](acos-acosf-acosl.md). ## See also -[Floating-Point Support](../../c-runtime-library/floating-point-support.md)\ +[Math and floating-point support](../floating-point-support.md)\ [`acos`, `acosf`, `acosl`](acos-acosf-acosl.md)\ [`atan`, `atanf`, `atanl`, `atan2`, `atan2f`, `atan2l`](atan-atanf-atanl-atan2-atan2f-atan2l.md)\ [`cos`, `cosf`, `cosl`](cos-cosf-cosl.md)\ diff --git a/docs/c-runtime-library/reference/asinh-asinhf-asinhl.md b/docs/c-runtime-library/reference/asinh-asinhf-asinhl.md index c99f3a59fb7..6ee28e23e47 100644 --- a/docs/c-runtime-library/reference/asinh-asinhf-asinhl.md +++ b/docs/c-runtime-library/reference/asinh-asinhf-asinhl.md @@ -28,12 +28,12 @@ long double asinh( long double x ); // C++ only ### Parameters -*x*
+*`x`*\ Floating-point value. -## Return Value +## Return value -The **asinh** functions return the inverse hyperbolic sine (arc hyperbolic sine) of *x*. This function is valid over the floating-point domain. If *x* is a quiet NaN, indefinite, or infinity, the same value is returned. +The **asinh** functions return the inverse hyperbolic sine (arc hyperbolic sine) of *`x`*. This function is valid over the floating-point domain. If *`x`* is a quiet NaN, indefinite, or infinity, the same value is returned. |Input|SEH Exception|`_matherr` Exception| |-----------|-------------------|--------------------------| @@ -43,7 +43,7 @@ The **asinh** functions return the inverse hyperbolic sine (arc hyperbolic sine) When you use C++, you can call overloads of **asinh** that take and return **`float`** or **`long double`** values. In a C program, unless you're using the \ macro to call this function, **asinh** always takes and returns **`double`**. -If you use the \ `asinh()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../../c-runtime-library/tgmath.md) for details. +If you use the \ `asinh()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../tgmath.md) for details. By default, this function's global state is scoped to the application. To change this, see [Global state in the CRT](../global-state.md). @@ -54,7 +54,7 @@ By default, this function's global state is scoped to the application. To change |**asinh**, **asinhf**, **asinhl**|\|\ or \| |**asinh()** macro | \ || -For additional compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For additional compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -86,9 +86,9 @@ asinh( 0.868671 ) = 0.785398 ## See also -[Floating-Point Support](../../c-runtime-library/floating-point-support.md)
-[acosh, acoshf, acoshl](acosh-acoshf-acoshl.md)
-[atanh, atanhf, atanhl](atanh-atanhf-atanhl.md)
-[cosh, coshf, coshl](cosh-coshf-coshl.md)
-[sinh, sinhf, sinhl](sinh-sinhf-sinhl.md)
-[tanh, tanhf, tanhl](tanh-tanhf-tanhl.md)
+[Math and floating-point support](../floating-point-support.md)\ +[`acosh`, `acoshf`, `acoshl`](acosh-acoshf-acoshl.md)\ +[`atanh`, `atanhf`, `atanhl`](atanh-atanhf-atanhl.md)\ +[`cosh`, `coshf`, `coshl`](cosh-coshf-coshl.md)\ +[`sinh`, `sinhf`, `sinhl`](sinh-sinhf-sinhl.md)\ +[`tanh`, `tanhf`, `tanhl`](tanh-tanhf-tanhl.md) diff --git a/docs/c-runtime-library/reference/assert-asserte-assert-expr-macros.md b/docs/c-runtime-library/reference/assert-asserte-assert-expr-macros.md index 807e109f8a7..b04f434fe03 100644 --- a/docs/c-runtime-library/reference/assert-asserte-assert-expr-macros.md +++ b/docs/c-runtime-library/reference/assert-asserte-assert-expr-macros.md @@ -31,7 +31,7 @@ A wide string to display as part of the report. ## Remarks -The **`_ASSERT_EXPR`**, **`_ASSERT`** and **`_ASSERTE`** macros provide an application with a clean and simple mechanism for checking assumptions during the debugging process. They're flexible because they don't need to be enclosed in `#ifdef` statements to prevent them from being called in a retail build of an application. This flexibility is achieved by using the [`_DEBUG`](../../c-runtime-library/debug.md) macro. **`_ASSERT_EXPR`**, **`_ASSERT`** and **`_ASSERTE`** are only available when **`_DEBUG`** is defined at compile time. When **`_DEBUG`** isn't defined, calls to these macros are removed during preprocessing. +The **`_ASSERT_EXPR`**, **`_ASSERT`** and **`_ASSERTE`** macros provide an application with a clean and simple mechanism for checking assumptions during the debugging process. They're flexible because they don't need to be enclosed in `#ifdef` statements to prevent them from being called in a retail build of an application. This flexibility is achieved by using the [`_DEBUG`](../debug.md) macro. **`_ASSERT_EXPR`**, **`_ASSERT`** and **`_ASSERTE`** are only available when **`_DEBUG`** is defined at compile time. When **`_DEBUG`** isn't defined, calls to these macros are removed during preprocessing. **`_ASSERT_EXPR`**, **`_ASSERT`** and **`_ASSERTE`** evaluate their *`booleanExpression`* argument and when the result is **`false`** (0), they print a diagnostic message and call [`_CrtDbgReportW`](crtdbgreport-crtdbgreportw.md) to generate a debug report. The **`_ASSERT`** macro prints a simple diagnostic message, **`_ASSERTE`** includes a string representation of the failed expression in the message, and **`_ASSERT_EXPR`** includes the *`message`* string in the diagnostic message. These macros do nothing when *`booleanExpression`* evaluates to nonzero. @@ -49,7 +49,7 @@ _CrtSetReportMode(CRT_ASSERT, _CRTDBG_MODE_WNDW); When the destination is a debug message window and the user selects the **Retry** button, **`_CrtDbgReportW`** returns 1, causing the **`_ASSERT_EXPR`**, **`_ASSERT`** and **`_ASSERTE`** macros to start the debugger if just-in-time (JIT) debugging is enabled. -For more information about the reporting process, see the [`_CrtDbgReport`, `_CrtDbgReportW`](crtdbgreport-crtdbgreportw.md) function. For more information about resolving assertion failures and using these macros as a debugging error handling mechanism, see [Using Macros for Verification and Reporting](/visualstudio/debugger/macros-for-reporting). +For more information about the reporting process, see the [`_CrtDbgReport`, `_CrtDbgReportW`](crtdbgreport-crtdbgreportw.md) function. For more information about resolving assertion failures and using these macros as a debugging error handling mechanism, see [Using macros for verification and reporting](/visualstudio/debugger/macros-for-reporting). In addition to the **`_ASSERT`** macros, the [`assert`](assert-macro-assert-wassert.md) macro can be used to verify program logic. This macro is available in both the debug and release versions of the libraries. The [`_RPT`, `_RPTF`](rpt-rptf-rptw-rptfw-macros.md) debug macros are also available for generating a debug report, but they don't evaluate an expression. The **`_RPT`** macros generate a simple report. The **`_RPTF`** macros include the source file and line number where the report macro was called in the generated report. Wide character versions of these macros are available (**`_RPTW`**, **`_RPTFW`**). The wide character versions are identical to the narrow character versions except that wide character strings are used for all string parameters and output. @@ -139,6 +139,6 @@ crt_ASSERT_macro.c(59) : Assertion failed: p1 == p2 ## See also -[Debug Routines](../../c-runtime-library/debug-routines.md)\ +[Debug routines](../debug-routines.md)\ [`assert` Macro, `_assert`, `_wassert`](assert-macro-assert-wassert.md)\ [`_RPT`, `_RPTF`, `_RPTW`, `_RPTFW` Macros](rpt-rptf-rptw-rptfw-macros.md) diff --git a/docs/c-runtime-library/reference/assert-macro-assert-wassert.md b/docs/c-runtime-library/reference/assert-macro-assert-wassert.md index 2c63ad43cfa..cc220756bcc 100644 --- a/docs/c-runtime-library/reference/assert-macro-assert-wassert.md +++ b/docs/c-runtime-library/reference/assert-macro-assert-wassert.md @@ -34,16 +34,16 @@ void _wassert( ### Parameters -*`expression`*
+*`expression`*\ A scalar expression (including pointer expressions) that evaluates to nonzero (**`true`**) or 0 (**`false`**). -*`message`*
+*`message`*\ The message to display. -*`filename`*
+*`filename`*\ The name of the source file the assertion failed in. -*`line`*
+*`line`*\ The line number in the source file of the failed assertion. ## Remarks @@ -68,11 +68,11 @@ As a consequence of the above behavior, a dialog box is always displayed followi |`Retry`|Break into debugger during `abort`|Break into debugger during `assert`| |`Ignore`|Finish exiting via `abort`|Continue program as though `assert` didn't fire (may result in undefined behavior since preconditions of the calling code weren't met)| -For more information about CRT debugging, see [CRT Debugging Techniques](/visualstudio/debugger/crt-debugging-techniques). +For more information about CRT debugging, see [CRT debugging techniques](/visualstudio/debugger/crt-debugging-techniques). The `_assert` and `_wassert` functions are internal CRT functions. They help minimize the code required in your object files to support assertions. We don't recommend that you call these functions directly. -The `assert` macro is enabled in both the release and debug versions of the C run-time libraries when **`NDEBUG`** isn't defined. When **`NDEBUG`** is defined, the macro is available, but doesn't evaluate its argument and has no effect. When it's enabled, the `assert` macro calls `_wassert` for its implementation. Other assertion macros, [`_ASSERT`](assert-asserte-assert-expr-macros.md), [`_ASSERTE`](assert-asserte-assert-expr-macros.md) and [`_ASSERT_EXPR`](assert-asserte-assert-expr-macros.md), are also available, but they only evaluate the expressions passed to them when the [`_DEBUG`](../../c-runtime-library/debug.md) macro has been defined and when they are in code linked with the debug version of the C run-time libraries. +The `assert` macro is enabled in both the release and debug versions of the C run-time libraries when **`NDEBUG`** isn't defined. When **`NDEBUG`** is defined, the macro is available, but doesn't evaluate its argument and has no effect. When it's enabled, the `assert` macro calls `_wassert` for its implementation. Other assertion macros, [`_ASSERT`](assert-asserte-assert-expr-macros.md), [`_ASSERTE`](assert-asserte-assert-expr-macros.md) and [`_ASSERT_EXPR`](assert-asserte-assert-expr-macros.md), are also available, but they only evaluate the expressions passed to them when the [`_DEBUG`](../debug.md) macro has been defined and when they are in code linked with the debug version of the C run-time libraries. ## Requirements @@ -135,10 +135,10 @@ If a debugger is installed, choose the **Debug** button to start the debugger, o ## See also -[Error Handling](../../c-runtime-library/error-handling-crt.md)
-[Process and Environment Control](../../c-runtime-library/process-and-environment-control.md)
-[`abort`](abort.md)
-[`raise`](raise.md)
-[`signal`](signal.md)
-[`_ASSERT`, `_ASSERTE`, `_ASSERT_EXPR` Macros](assert-asserte-assert-expr-macros.md)
-[`_DEBUG`](../../c-runtime-library/debug.md)
+[Error handling](../error-handling-crt.md)\ +[Process and environment control](../process-and-environment-control.md)\ +[`abort`](abort.md)\ +[`raise`](raise.md)\ +[`signal`](signal.md)\ +[`_ASSERT`, `_ASSERTE`, `_ASSERT_EXPR` Macros](assert-asserte-assert-expr-macros.md)\ +[`_DEBUG`](../debug.md) diff --git a/docs/c-runtime-library/reference/atan-atanf-atanl-atan2-atan2f-atan2l.md b/docs/c-runtime-library/reference/atan-atanf-atanl-atan2-atan2f-atan2l.md index 6dfe7cc0836..990dac0bab5 100644 --- a/docs/c-runtime-library/reference/atan-atanf-atanl-atan2-atan2f-atan2l.md +++ b/docs/c-runtime-library/reference/atan-atanf-atanl-atan2-atan2f-atan2l.md @@ -38,7 +38,7 @@ long double atan2( long double y, long double x ); // C++ only *`x`*, *`y`*\ Any numbers. -## Return Value +## Return value **`atan`** returns the arctangent of *`x`* in the range -π/2 to π/2 radians. **`atan2`** returns the arctangent of *`y`*/*`x`* in the range -π to π radians. If *`x`* is 0, **`atan`** returns 0. If both parameters of **`atan2`** are 0, the function returns 0. All results are in radians. @@ -52,7 +52,7 @@ Any numbers. The **`atan`** function calculates the arctangent (the inverse tangent function) of *`x`*. **`atan2`** calculates the arctangent of *`y`*/*`x`* (if *`x`* equals 0, **`atan2`** returns π/2 if *`y`* is positive, -π/2 if *`y`* is negative, or 0 if *`y`* is 0.) -If you use the `` `atan()` or `atan2()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../../c-runtime-library/tgmath.md) for details. +If you use the `` `atan()` or `atan2()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../tgmath.md) for details. **`atan`** has an implementation that uses Streaming SIMD Extensions 2 (SSE2). For information and restrictions about using the SSE2 implementation, see [`_set_SSE2_enable`](set-sse2-enable.md). @@ -100,12 +100,12 @@ Arctangent of 0.500000 / 5.000000: 0.099669 ## See also -[Floating-Point Support](../../c-runtime-library/floating-point-support.md)\ +[Math and floating-point support](../floating-point-support.md)\ [`acos`, `acosf`, `acosl`](acos-acosf-acosl.md)\ [`asin`, `asinf`, `asinl`](asin-asinf-asinl.md)\ [`cos`, `cosf`, `cosl`](cos-cosf-cosl.md)\ [`_matherr`](matherr.md)\ [`sin`, `sinf`, `sinl`](sin-sinf-sinl.md)\ [`tan`, `tanf`, `tanl`](tan-tanf-tanl.md)\ -[`_CIatan`](../../c-runtime-library/ciatan.md)\ -[`_CIatan2`](../../c-runtime-library/ciatan2.md) +[`_CIatan`](../ciatan.md)\ +[`_CIatan2`](../ciatan2.md) diff --git a/docs/c-runtime-library/reference/atanh-atanhf-atanhl.md b/docs/c-runtime-library/reference/atanh-atanhf-atanhl.md index 90c167dbd21..9476e41c3f0 100644 --- a/docs/c-runtime-library/reference/atanh-atanhf-atanhl.md +++ b/docs/c-runtime-library/reference/atanh-atanhf-atanhl.md @@ -28,23 +28,23 @@ long double atanh( long double x ); // C++ only ### Parameters -*x*\ +*`x`*\ Floating-point value. -## Return Value +## Return value -The **atanh** functions return the inverse hyperbolic tangent (arc hyperbolic tangent) of *x*. If *x* is greater than 1, or less than -1, **errno** is set to **EDOM** and the result is a quiet NaN. If *x* is equal to 1 or -1, a positive or negative infinity is returned, respectively, and **errno** is set to **ERANGE**. +The **atanh** functions return the inverse hyperbolic tangent (arc hyperbolic tangent) of *`x`*. If *`x`* is greater than 1, or less than -1, **errno** is set to **EDOM** and the result is a quiet NaN. If *`x`* is equal to 1 or -1, a positive or negative infinity is returned, respectively, and **errno** is set to **ERANGE**. |Input|SEH Exception|`Matherr` Exception| |-----------|-------------------|-------------------------| |± QNAN, IND|none|none| -|*X* ≥ 1; *x* ≤ -1|none|none| +|*`X`* ≥ 1; *`x`* ≤ -1|none|none| ## Remarks Because C++ allows overloading, you can call overloads of **atanh** that take and return **`float`** or **`long double`** values. In a C program, unless you're using the \ macro to call this function, **atanh** always takes and returns **`double`**. -If you use the \ `atanh()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../../c-runtime-library/tgmath.md) for details. +If you use the \ `atanh()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../tgmath.md) for details. 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). @@ -55,7 +55,7 @@ By default, this function's global state is scoped to the application. To change |**atanh**, **atanhf**, **atanhl**|\|\ or \| |**atanh()** macro | \ || -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -87,9 +87,9 @@ atanh( 0.655794 ) = 0.785398 ## See also -[Floating-Point Support](../../c-runtime-library/floating-point-support.md)
-[acosh, acoshf, acoshl](acosh-acoshf-acoshl.md)
-[asinh, asinhf, asinhl](asinh-asinhf-asinhl.md)
-[cosh, coshf, coshl](cosh-coshf-coshl.md)
-[sinh, sinhf, sinhl](sinh-sinhf-sinhl.md)
-[tanh, tanhf, tanhl](tanh-tanhf-tanhl.md)
+[Math and floating-point support](../floating-point-support.md)\ +[`acosh`, `acoshf`, `acoshl`](acosh-acoshf-acoshl.md)\ +[`asinh`, `asinhf`, `asinhl`](asinh-asinhf-asinhl.md)\ +[`cosh`, `coshf`, `coshl`](cosh-coshf-coshl.md)\ +[`sinh`, `sinhf`, `sinhl`](sinh-sinhf-sinhl.md)\ +[`tanh`, `tanhf`, `tanhl`](tanh-tanhf-tanhl.md) diff --git a/docs/c-runtime-library/reference/atexit.md b/docs/c-runtime-library/reference/atexit.md index d948a7dd2da..744cbe24ea6 100644 --- a/docs/c-runtime-library/reference/atexit.md +++ b/docs/c-runtime-library/reference/atexit.md @@ -26,7 +26,7 @@ int atexit( *`func`*\ Function to be called. -## Return Value +## Return value **`atexit`** returns 0 if successful, or a nonzero value if an error occurs. @@ -92,7 +92,7 @@ This is executed next. ## See also -[Process and Environment Control](../../c-runtime-library/process-and-environment-control.md)\ +[Process and environment control](../process-and-environment-control.md)\ [`abort`](abort.md)\ [`exit`, `_Exit`, `_exit`](exit-exit-exit.md)\ [`_onexit`, `_onexit_m`](onexit-onexit-m.md) diff --git a/docs/c-runtime-library/reference/atodbl-atodbl-l-atoldbl-atoldbl-l-atoflt-atoflt-l.md b/docs/c-runtime-library/reference/atodbl-atodbl-l-atoldbl-atoldbl-l-atoflt-atoflt-l.md index c32df90ba60..d9299cd8fe2 100644 --- a/docs/c-runtime-library/reference/atodbl-atodbl-l-atoldbl-atoldbl-l-atoflt-atoflt-l.md +++ b/docs/c-runtime-library/reference/atodbl-atodbl-l-atoldbl-atoldbl-l-atoflt-atoflt-l.md @@ -27,16 +27,16 @@ int _atoflt_l( _CRT_FLOAT * value, const char * str, _locale_t locale ); ### Parameters -*value*
+*`value`*\ The double, long double, or float value that's produced by converting the string to a floating-point value. These values are wrapped in a structure. -*str*
+*`str`*\ The string to be parsed to convert into a floating-point value. -*locale*
+*`locale`*\ The locale to use. -## Return Value +## Return value Returns 0 if successful. Possible error codes are **_UNDERFLOW** or **_OVERFLOW**, which are defined in the header file \. @@ -44,9 +44,9 @@ Returns 0 if successful. Possible error codes are **_UNDERFLOW** or **_OVERFLOW* These functions convert a string to a floating-point value. The difference between these functions and the **atof** family of functions is that these functions don't generate floating-point code and don't cause hardware exceptions. Instead, error conditions are reported as error codes. -If a string doesn't have a valid interpretation as a floating-point value, *value* is set to zero, and the return value is zero. +If a string doesn't have a valid interpretation as a floating-point value, *`value`* is set to zero, and the return value is zero. -The versions of these functions that have the **_l** suffix are identical the versions that don't have the suffix, except that they use the *locale* parameter that's passed in instead of the current thread locale. +The versions of these functions that have the **_l** suffix are identical the versions that don't have the suffix, except that they use the *`locale`* parameter that's passed in instead of the current thread locale. 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). @@ -114,7 +114,7 @@ Return value: 3 ## See also -[Data Conversion](../../c-runtime-library/data-conversion.md)
-[Floating-Point Support](../../c-runtime-library/floating-point-support.md)
-[Locale](../../c-runtime-library/locale.md)
-[atof, _atof_l, _wtof, _wtof_l](atof-atof-l-wtof-wtof-l.md)
+[Data conversion](../data-conversion.md)\ +[Math and floating-point support](../floating-point-support.md)\ +[Locale](../locale.md)\ +[`atof`, `_atof_l`, `_wtof`, `_wtof_l`](atof-atof-l-wtof-wtof-l.md) diff --git a/docs/c-runtime-library/reference/atof-atof-l-wtof-wtof-l.md b/docs/c-runtime-library/reference/atof-atof-l-wtof-wtof-l.md index ce5d672bf45..abbb7ee45f1 100644 --- a/docs/c-runtime-library/reference/atof-atof-l-wtof-wtof-l.md +++ b/docs/c-runtime-library/reference/atof-atof-l-wtof-wtof-l.md @@ -35,17 +35,17 @@ double _wtof_l( ## Parameters -*`str`*
+*`str`*\ String to be converted. -*`locale`*
+*`locale`*\ Locale to use. -## Return Value +## Return value Each function returns the **`double`** value produced by interpreting the input characters as a number. The return value is 0.0 if the input can't be converted to a value of that type. -In all out-of-range cases, **`errno`** is set to **`ERANGE`**. If the parameter passed in is **`NULL`**, the invalid parameter handler is invoked, 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 0. +In all out-of-range cases, **`errno`** is set to **`ERANGE`**. If the parameter passed in is **`NULL`**, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, these functions set **`errno`** to **`EINVAL`** and return 0. ## Remarks @@ -55,7 +55,7 @@ The input string is a sequence of characters that can be interpreted as a numeri The *`str`* argument to **`atof`** and **`_wtof`** has the following form: -[*`whitespace`*] [*`sign`*] [*dig`its*] [**`.`***`digits`*] [ {**`e`** \| **`E`** }[*`sign`*]*`digits`*] +[*`whitespace`*] [*`sign`*] [*`digits`*] [**`.`***`digits`*] [ {**`e`** \| **`E`** }[*`sign`*]*`digits`*] A *`whitespace`* consists of space or tab characters, which are ignored; *`sign`* is either plus (+) or minus (-); and *`digits`* are one or more decimal digits. If no digits appear before the decimal point, at least one must appear after the decimal point. The decimal digits may be followed by an exponent, which consists of an introductory letter (**`e`**, or **`E`**) and an optionally signed decimal integer. @@ -65,7 +65,7 @@ The versions of these functions with the **`_l`** suffix are identical except th 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| |---------------------|------------------------------------|--------------------|-----------------------| @@ -132,11 +132,11 @@ Function: _atof_l(" -2,309e-25", fr)) = -2.309000e-25 ## See also -[Data Conversion](../../c-runtime-library/data-conversion.md)
-[Floating-Point Support](../../c-runtime-library/floating-point-support.md)
-[Locale](../../c-runtime-library/locale.md)
-[`_ecvt`](ecvt.md)
-[`_fcvt`](fcvt.md)
-[`_gcvt`](gcvt.md)
-[`setlocale`, `_wsetlocale`](setlocale-wsetlocale.md)
-[`_atodbl`, `_atodbl_l`, `_atoldbl`, `_atoldbl_l`, `_atoflt`, `_atoflt_l`](atodbl-atodbl-l-atoldbl-atoldbl-l-atoflt-atoflt-l.md)
+[Data conversion](../data-conversion.md)\ +[Math and floating-point support](../floating-point-support.md)\ +[Locale](../locale.md)\ +[`_ecvt`](ecvt.md)\ +[`_fcvt`](fcvt.md)\ +[`_gcvt`](gcvt.md)\ +[`setlocale`, `_wsetlocale`](setlocale-wsetlocale.md)\ +[`_atodbl`, `_atodbl_l`, `_atoldbl`, `_atoldbl_l`, `_atoflt`, `_atoflt_l`](atodbl-atodbl-l-atoldbl-atoldbl-l-atoflt-atoflt-l.md) diff --git a/docs/c-runtime-library/reference/atoi-atoi-l-wtoi-wtoi-l.md b/docs/c-runtime-library/reference/atoi-atoi-l-wtoi-wtoi-l.md index 6ec27150810..72ae6da743b 100644 --- a/docs/c-runtime-library/reference/atoi-atoi-l-wtoi-wtoi-l.md +++ b/docs/c-runtime-library/reference/atoi-atoi-l-wtoi-wtoi-l.md @@ -35,17 +35,17 @@ int _wtoi_l( ### Parameters -*`str`*
+*`str`*\ String to be converted. -*`locale`*
+*`locale`*\ Locale to use. -## Return Value +## Return value Each function returns the **`int`** value produced by interpreting the input characters as a number. The return value is 0 for **`atoi`** and **`_wtoi`**, if the input can't be converted to a value of that type. -When the functions overflow with large negative integral values, **`LONG_MIN`** is returned. **`atoi`** and **`_wtoi`** return **`INT_MAX`** and **`INT_MIN`** on these conditions. In all out-of-range cases, **`errno`** is set to **`ERANGE`**. If the parameter passed in is **`NULL`**, the invalid parameter handler is invoked, 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 0. +When the functions overflow with large negative integral values, **`LONG_MIN`** is returned. **`atoi`** and **`_wtoi`** return **`INT_MAX`** and **`INT_MIN`** on these conditions. In all out-of-range cases, **`errno`** is set to **`ERANGE`**. If the parameter passed in is **`NULL`**, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, these functions set **`errno`** to **`EINVAL`** and return 0. ## Remarks @@ -57,11 +57,11 @@ The *`str`* argument to **`atoi`** and **`_wtoi`** has the following form: A *`whitespace`* consists of space or tab characters, which are ignored; *`sign`* is either plus (+) or minus (-); and *`digits`* are one or more digits. -The versions of these functions with the **`_l`** suffix are identical except that they use the locale parameter passed in instead of the current locale. For more information, see [Locale](../../c-runtime-library/locale.md). +The versions of these functions with the **`_l`** suffix are identical except that they use the locale parameter passed in instead of the current locale. For more information, see [Locale](../locale.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| |---------------------|------------------------------------|--------------------|-----------------------| @@ -125,11 +125,11 @@ Overflow condition occurred. ## See also -[Data Conversion](../../c-runtime-library/data-conversion.md)
-[Floating-Point Support](../../c-runtime-library/floating-point-support.md)
-[Locale](../../c-runtime-library/locale.md)
-[`_ecvt`](ecvt.md)
-[`_fcvt`](fcvt.md)
-[`_gcvt`](gcvt.md)
-[`setlocale`, `_wsetlocale`](setlocale-wsetlocale.md)
-[`_atodbl`, `_atodbl_l`, `_atoldbl`, `_atoldbl_l`, `_atoflt`, `_atoflt_l`](atodbl-atodbl-l-atoldbl-atoldbl-l-atoflt-atoflt-l.md)
+[Data conversion](../data-conversion.md)\ +[Math and floating-point support](../floating-point-support.md)\ +[Locale](../locale.md)\ +[`_ecvt`](ecvt.md)\ +[`_fcvt`](fcvt.md)\ +[`_gcvt`](gcvt.md)\ +[`setlocale`, `_wsetlocale`](setlocale-wsetlocale.md)\ +[`_atodbl`, `_atodbl_l`, `_atoldbl`, `_atoldbl_l`, `_atoflt`, `_atoflt_l`](atodbl-atodbl-l-atoldbl-atoldbl-l-atoflt-atoflt-l.md) diff --git a/docs/c-runtime-library/reference/atoi64-atoi64-l-wtoi64-wtoi64-l.md b/docs/c-runtime-library/reference/atoi64-atoi64-l-wtoi64-wtoi64-l.md index 7d16d85e546..ef3a7751922 100644 --- a/docs/c-runtime-library/reference/atoi64-atoi64-l-wtoi64-wtoi64-l.md +++ b/docs/c-runtime-library/reference/atoi64-atoi64-l-wtoi64-wtoi64-l.md @@ -35,19 +35,19 @@ __int64 _wtoi64_l( ### Parameters -*str*
+*`str`*\ String to be converted. -*locale*
+*`locale`*\ Locale to use. -## Return Value +## Return value Each function returns the **`__int64`** value produced by interpreting the input characters as a number. The return value is 0 for **_atoi64** if the input can't be converted to a value of that type. If the functions overflow with large positive integral values, they return **I64_MAX**. The functions return **I64_MIN** if they overflow with large negative integral values. -In all out-of-range cases, **errno** is set to **ERANGE**. If the parameter passed in is **NULL**, the invalid parameter handler is invoked, 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 0. +In all out-of-range cases, **errno** is set to **ERANGE**. If the parameter passed in is **NULL**, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, these functions set **errno** to **EINVAL** and return 0. ## Remarks @@ -55,19 +55,19 @@ These functions convert a character string to a 64-bit integer value. The input string is a sequence of characters that can be interpreted as a numerical value of the specified type. The function stops reading the input string at the first character that it can't recognize as part of a number. This character might be the null character ('\0' or L'\0') terminating the string. -The *str* argument to **_atoi64** has the following form: +The *`str`* argument to **_atoi64** has the following form: -> [*whitespace*] [*sign*] [*digits*] +> [*`whitespace`*] [*`sign`*] [*`digits`*] -A *whitespace* consists of space or tab characters, which are ignored; *sign* is either plus (+) or minus (-); and *digits* are one or more digits. +A *`whitespace`* consists of space or tab characters, which are ignored; *`sign`* is either plus (+) or minus (-); and *`digits`* are one or more digits. **_wtoi64** is identical to **_atoi64** except that it takes a wide character string as a parameter. -The versions of these functions with the **_l** suffix are identical except that they use the locale parameter passed in instead of the current locale. For more information, see [Locale](../../c-runtime-library/locale.md). +The versions of these functions with the **_l** suffix are identical except that they use the locale parameter passed in instead of the current locale. For more information, see [Locale](../locale.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| |---------------------|--------------------------------------|--------------------|-----------------------| @@ -132,11 +132,11 @@ Overflow condition occurred. ## See also -[Data Conversion](../../c-runtime-library/data-conversion.md)
-[Floating-Point Support](../../c-runtime-library/floating-point-support.md)
-[Locale](../../c-runtime-library/locale.md)
-[_ecvt](ecvt.md)
-[_fcvt](fcvt.md)
-[_gcvt](gcvt.md)
-[setlocale, _wsetlocale](setlocale-wsetlocale.md)
-[_atodbl, _atodbl_l, _atoldbl, _atoldbl_l, _atoflt, _atoflt_l](atodbl-atodbl-l-atoldbl-atoldbl-l-atoflt-atoflt-l.md)
+[Data conversion](../data-conversion.md)\ +[Math and floating-point support](../floating-point-support.md)\ +[Locale](../locale.md)\ +[`_ecvt`](ecvt.md)\ +[`_fcvt`](fcvt.md)\ +[`_gcvt`](gcvt.md)\ +[`setlocale`, `_wsetlocale`](setlocale-wsetlocale.md)\ +[`_atodbl`, `_atodbl_l`, `_atoldbl`, `_atoldbl_l`, `_atoflt`, `_atoflt_l`](atodbl-atodbl-l-atoldbl-atoldbl-l-atoflt-atoflt-l.md) diff --git a/docs/c-runtime-library/reference/atol-atol-l-wtol-wtol-l.md b/docs/c-runtime-library/reference/atol-atol-l-wtol-wtol-l.md index 699b7ade45a..10b6e692a7e 100644 --- a/docs/c-runtime-library/reference/atol-atol-l-wtol-wtol-l.md +++ b/docs/c-runtime-library/reference/atol-atol-l-wtol-wtol-l.md @@ -40,11 +40,11 @@ String to be converted. *`locale`*\ Locale to use. -## Return Value +## Return value Each function returns the **`long`** value produced by interpreting the input characters as a number. The return value is `0L` for **`atol`** if the input can't be converted to a value of that type. -If these functions overflow with large positive integral values, they return **`LONG_MAX`**. If the functions overflow with large negative integral values, **`LONG_MIN`** is returned. In all out-of-range cases, **`errno`** is set to **`ERANGE`**. If the parameter passed in is **`NULL`**, the invalid parameter handler is invoked, 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 0. +If these functions overflow with large positive integral values, they return **`LONG_MAX`**. If the functions overflow with large negative integral values, **`LONG_MIN`** is returned. In all out-of-range cases, **`errno`** is set to **`ERANGE`**. If the parameter passed in is **`NULL`**, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, these functions set **`errno`** to **`EINVAL`** and return 0. ## Remarks @@ -60,11 +60,11 @@ A *`whitespace`* consists of space or tab characters, which are ignored; *`sign` **`_wtol`** is identical to **`atol`** except that it takes a wide character string. -The versions of these functions with the **`_l`** suffix are identical except that they use the locale parameter passed in instead of the current locale. For more information, see [Locale](../../c-runtime-library/locale.md). +The versions of these functions with the **`_l`** suffix are identical except that they use the locale parameter passed in instead of the current locale. For more information, see [Locale](../locale.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| |---------------------|------------------------------------|--------------------|-----------------------| @@ -129,9 +129,9 @@ Overflow condition occurred. ## See also -[Data Conversion](../../c-runtime-library/data-conversion.md)\ -[Floating-Point Support](../../c-runtime-library/floating-point-support.md)\ -[Locale](../../c-runtime-library/locale.md)\ +[Data conversion](../data-conversion.md)\ +[Math and floating-point support](../floating-point-support.md)\ +[Locale](../locale.md)\ [`_ecvt`](ecvt.md)\ [`_fcvt`](fcvt.md)\ [`_gcvt`](gcvt.md)\ diff --git a/docs/c-runtime-library/reference/atoll-atoll-l-wtoll-wtoll-l.md b/docs/c-runtime-library/reference/atoll-atoll-l-wtoll-wtoll-l.md index 4a2e14b62a3..83dddbcc862 100644 --- a/docs/c-runtime-library/reference/atoll-atoll-l-wtoll-wtoll-l.md +++ b/docs/c-runtime-library/reference/atoll-atoll-l-wtoll-wtoll-l.md @@ -35,19 +35,19 @@ long long _wtoll_l( ### Parameters -*str*
+*`str`*\ String to be converted. -*locale*
+*`locale`*\ Locale to use. -## Return Value +## Return value Each function returns the **`long long`** value that's produced by interpreting the input characters as a number. The return value for **atoll** is 0 if the input can't be converted to a value of that type. For overflow with large positive integral values, **atoll** returns **LLONG_MAX**, and for overflow with large negative integral values, it returns **LLONG_MIN**. -In all out-of-range cases, **errno** is set to **ERANGE**. If the parameter that's passed in is **NULL**, the invalid parameter handler is invoked, 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 0. +In all out-of-range cases, **errno** is set to **ERANGE**. If the parameter that's passed in is **NULL**, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, these functions set **errno** to **EINVAL** and return 0. ## Remarks @@ -55,19 +55,19 @@ These functions convert a character string to a **`long long`** integer value. The input string is a sequence of characters that can be interpreted as a numerical value of the specified type. The function stops reading the input string at the first character that it can't recognize as part of a number. This character might be the null character ('\0' or L'\0') that terminates the string. -The *str* argument to **atoll** has the following form: +The *`str`* argument to **atoll** has the following form: -> [*whitespace*] [*sign*] [*digits*] +> [*`whitespace`*] [*`sign`*] [*`digits`*] -A *whitespace* consists of space or tab characters, which are ignored; *sign* is either plus (+) or minus (-); and *digits* are one or more digits. +A *`whitespace`* consists of space or tab characters, which are ignored; *`sign`* is either plus (+) or minus (-); and *`digits`* are one or more digits. **_wtoll** is identical to **atoll** except that it takes a wide character string as a parameter. -The versions of these functions that have the **_l** suffix are identical to the versions that don't have it, except that they use the locale parameter that's passed in instead of the current locale. For more information, see [Locale](../../c-runtime-library/locale.md). +The versions of these functions that have the **_l** suffix are identical to the versions that don't have it, except that they use the locale parameter that's passed in instead of the current locale. For more information, see [Locale](../locale.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| |---------------------|--------------------------------------|--------------------|-----------------------| @@ -134,11 +134,11 @@ Overflow condition occurred. ## See also -[Data Conversion](../../c-runtime-library/data-conversion.md)
-[Floating-Point Support](../../c-runtime-library/floating-point-support.md)
-[Locale](../../c-runtime-library/locale.md)
-[_ecvt](ecvt.md)
-[_fcvt](fcvt.md)
-[_gcvt](gcvt.md)
-[setlocale, _wsetlocale](setlocale-wsetlocale.md)
-[_atodbl, _atodbl_l, _atoldbl, _atoldbl_l, _atoflt, _atoflt_l](atodbl-atodbl-l-atoldbl-atoldbl-l-atoflt-atoflt-l.md)
+[Data conversion](../data-conversion.md)\ +[Math and floating-point support](../floating-point-support.md)\ +[Locale](../locale.md)\ +[`_ecvt`](ecvt.md)\ +[`_fcvt`](fcvt.md)\ +[`_gcvt`](gcvt.md)\ +[`setlocale`, `_wsetlocale`](setlocale-wsetlocale.md)\ +[`_atodbl`, `_atodbl_l`, `_atoldbl`, `_atoldbl_l`, `_atoflt`, `_atoflt_l`](atodbl-atodbl-l-atoldbl-atoldbl-l-atoflt-atoflt-l.md) diff --git a/docs/c-runtime-library/reference/beginthread-beginthreadex.md b/docs/c-runtime-library/reference/beginthread-beginthreadex.md index 436e4fff658..1372f234a73 100644 --- a/docs/c-runtime-library/reference/beginthread-beginthreadex.md +++ b/docs/c-runtime-library/reference/beginthread-beginthreadex.md @@ -47,37 +47,37 @@ uintptr_t _beginthreadex( // MANAGED CODE ### Parameters -*`start_address`*
+*`start_address`*\ Start address of a routine that begins execution of a new thread. For **`_beginthread`**, the calling convention is either [`__cdecl`](../../cpp/cdecl.md) (for native code) or [`__clrcall`](../../cpp/clrcall.md) (for managed code). For **`_beginthreadex`**, the calling convention is either [`__stdcall`](../../cpp/stdcall.md) (for native code) or [`__clrcall`](../../cpp/clrcall.md) (for managed code). -*`stack_size`*
+*`stack_size`*\ Stack size for a new thread, or 0. -*`arglist`*
+*`arglist`*\ Argument list to be passed to a new thread, or **`NULL`**. -*`Security`*
+*`Security`*\ Pointer to a [`SECURITY_ATTRIBUTES`](/previous-versions/windows/desktop/legacy/aa379560\(v=vs.85\)) structure that determines whether the returned handle can be inherited by child processes. If *`Security`* is **`NULL`**, the handle can't be inherited. -*`initflag`*
+*`initflag`*\ Flags that control the initial state of a new thread. Set *`initflag`* to 0 to run immediately, or to **`CREATE_SUSPENDED`** to create the thread in a suspended state; use [`ResumeThread`](/windows/win32/api/processthreadsapi/nf-processthreadsapi-resumethread) to execute the thread. Set *`initflag`* to **`STACK_SIZE_PARAM_IS_A_RESERVATION`** flag to use *`stack_size`* as the initial reserve size of the stack in bytes; if this flag isn't specified, *`stack_size`* specifies the commit size. -*`thrdaddr`*
+*`thrdaddr`*\ Points to a 32-bit variable that receives the thread identifier. If it's **`NULL`**, it's not used. -## Return Value +## Return value If successful, each of these functions returns a handle to the newly created thread; however, if the newly created thread exits too quickly, **`_beginthread`** might not return a valid handle. (See the discussion in the Remarks section.) On an error, **`_beginthread`** returns -1L, and **`errno`** is set to **`EAGAIN`** if there are too many threads, to **`EINVAL`** if the argument is invalid or the stack size is incorrect, or to **`EACCES`** if there are insufficient resources (such as memory). On an error, **`_beginthreadex`** returns 0, and **`errno`** and **`_doserrno`** are set. -If *`start_address`* is **`NULL`**, the invalid parameter handler is invoked, 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. +If *`start_address`* is **`NULL`**, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, these functions set **`errno`** to **`EINVAL`** and return -1. -For more information about these and other return codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +For more information about these and other return codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). -For more information about **`uintptr_t`**, see [Standard Types](../../c-runtime-library/standard-types.md). +For more information about **`uintptr_t`**, see [Standard types](../standard-types.md). ## Remarks -The **`_beginthread`** function creates a thread that begins execution of a routine at *`start_address`*. The routine at *`start_address`* must use the **`__cdecl`** (for native code) or **`__clrcall`** (for managed code) calling convention and should have no return value. When the thread returns from that routine, it's terminated automatically. For more information about threads, see [Multithreading Support for Older Code (Visual C++)](../../parallel/multithreading-support-for-older-code-visual-cpp.md). +The **`_beginthread`** function creates a thread that begins execution of a routine at *`start_address`*. The routine at *`start_address`* must use the **`__cdecl`** (for native code) or **`__clrcall`** (for managed code) calling convention and should have no return value. When the thread returns from that routine, it's terminated automatically. For more information about threads, see [Multithreading support for older code (Visual C++)](../../parallel/multithreading-support-for-older-code-visual-cpp.md). **`_beginthreadex`** resembles the Win32 [`CreateThread`](/windows/win32/api/processthreadsapi/nf-processthreadsapi-createthread) API more closely than **`_beginthread`** does. **`_beginthreadex`** differs from **`_beginthread`** in the following ways: @@ -104,9 +104,9 @@ The operating system handles the allocation of the stack when either **`_beginth *`arglist`* is a parameter to be passed to the newly created thread. Typically, it's the address of a data item, such as a character string. *`arglist`* can be **`NULL`** if it isn't needed, but **`_beginthread`** and **`_beginthreadex`** must be given some value to pass to the new thread. All threads are terminated if any thread calls [`abort`](abort.md), **`exit`**, **`_exit`**, or **`ExitProcess`**. -The locale of the new thread is initialized by using the per-process global current locale info. If per-thread locale is enabled by a call to [`_configthreadlocale`](configthreadlocale.md) (either globally or for new threads only), the thread can change its locale independently from other threads by calling **`setlocale`** or **`_wsetlocale`**. Threads that don't have the per-thread locale flag set can affect the locale info in all other threads that also don't have the per-thread locale flag set, and also all newly created threads. For more information, see [Locale](../../c-runtime-library/locale.md). +The locale of the new thread is initialized by using the per-process global current locale info. If per-thread locale is enabled by a call to [`_configthreadlocale`](configthreadlocale.md) (either globally or for new threads only), the thread can change its locale independently from other threads by calling **`setlocale`** or **`_wsetlocale`**. Threads that don't have the per-thread locale flag set can affect the locale info in all other threads that also don't have the per-thread locale flag set, and also all newly created threads. For more information, see [Locale](../locale.md). -For **`/clr`** code, **`_beginthread`** and **`_beginthreadex`** each have two overloads. One takes a native calling-convention function pointer, and the other takes a **`__clrcall`** function pointer. The first overload isn't application domain-safe and never will be. If you're writing **`/clr`** code, you must ensure that the new thread enters the correct application domain before it accesses managed resources. You can do so, for example, by using [`call_in_appdomain` Function](../../dotnet/call-in-appdomain-function.md). The second overload is application domain-safe; the newly created thread will always end up in the application domain of the caller of **`_beginthread`** or **`_beginthreadex`**. +For **`/clr`** code, **`_beginthread`** and **`_beginthreadex`** each have two overloads. One takes a native calling-convention function pointer, and the other takes a **`__clrcall`** function pointer. The first overload isn't application domain-safe and never will be. If you're writing **`/clr`** code, you must ensure that the new thread enters the correct application domain before it accesses managed resources. You can do so, for example, by using [`call_in_appdomain`](../../dotnet/call-in-appdomain-function.md). The second overload is application domain-safe; the newly created thread will always end up in the application domain of the caller of **`_beginthread`** or **`_beginthreadex`**. 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). @@ -117,11 +117,11 @@ By default, this function's global state is scoped to the application. To change |**`_beginthread`**|``| |**`_beginthreadex`**|``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Libraries -Multithreaded versions of the [C run-time libraries](../../c-runtime-library/crt-library-features.md) only. +Multithreaded versions of the [C run-time libraries](../crt-library-features.md) only. To use **`_beginthread`** or **`_beginthreadex`**, the application must link with one of the multithreaded C run-time libraries. @@ -295,7 +295,7 @@ Counter should be 1000000; it is-> 1000000 ## See also -- [Process and Environment Control](../../c-runtime-library/process-and-environment-control.md) +- [Process and environment control](../process-and-environment-control.md) - [`_endthread`, `_endthreadex`](endthread-endthreadex.md) - [`abort`](abort.md) - [`exit`, `_Exit`, `_exit`](exit-exit-exit.md) diff --git a/docs/c-runtime-library/reference/bessel-functions-j0-j1-jn-y0-y1-yn.md b/docs/c-runtime-library/reference/bessel-functions-j0-j1-jn-y0-y1-yn.md index ac31c180d3c..e7ec20e7441 100644 --- a/docs/c-runtime-library/reference/bessel-functions-j0-j1-jn-y0-y1-yn.md +++ b/docs/c-runtime-library/reference/bessel-functions-j0-j1-jn-y0-y1-yn.md @@ -10,7 +10,7 @@ f1_keywords: ["c.bessel", "_j0", "_j1", "_jn", "_y0", "_y1", "_yn"] helpviewer_keywords: ["Bessel functions", "_j0 function", "_j1 function", "_jn function", "_y0 function", "_y1 function", "_yn function"] ms.assetid: a21a8bf1-df9d-4ba0-a8c2-e7ef71921d96 --- -# Bessel Functions: _j0, _j1, _jn, _y0, _y1, _yn +# Bessel functions: _j0, _j1, _jn, _y0, _y1, _yn Computes the Bessel function of the first or second kind, of orders 0, 1, or n. The Bessel functions are commonly used in the mathematics of electromagnetic wave theory. @@ -41,15 +41,15 @@ double _yn( ### Parameters -*x*
+*`x`*\ Floating-point value. -*n*
+*`n`*\ Integer order of Bessel function. -## Return Value +## Return value -Each of these routines returns a Bessel function of *x*. If *x* is negative in the **_y0**, **_y1**, or **_yn** functions, the routine sets **errno** to **EDOM**, prints a **_DOMAIN** error message to **stderr**, and returns **_HUGE_VAL**. You can modify error handling by using **_matherr**. +Each of these routines returns a Bessel function of *`x`*. If *`x`* is negative in the **_y0**, **_y1**, or **_yn** functions, the routine sets **errno** to **EDOM**, prints a **_DOMAIN** error message to **stderr**, and returns **_HUGE_VAL**. You can modify error handling by using **_matherr**. ## Remarks @@ -75,7 +75,7 @@ By default, this function's global state is scoped to the application. To change |-------------|---------------------| |**_j0**, **_j1**, **_jn**, **_y0**, **_y1**, **_yn**|\ (C++), \ (C, C++)| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -120,5 +120,5 @@ Bessel functions for x = 2.387000: ## See also -[Floating-Point Support](../../c-runtime-library/floating-point-support.md)
-[_matherr](matherr.md)
+[Math and floating-point support](../floating-point-support.md)\ +[`_matherr`](matherr.md) diff --git a/docs/c-runtime-library/reference/bsearch-s.md b/docs/c-runtime-library/reference/bsearch-s.md index 5b082f477a1..a0821d26dd3 100644 --- a/docs/c-runtime-library/reference/bsearch-s.md +++ b/docs/c-runtime-library/reference/bsearch-s.md @@ -12,7 +12,7 @@ ms.assetid: d5690d5e-6be3-4f1d-aa0b-5ca6dbded276 --- # bsearch_s -Performs a binary search of a sorted array. This function is a version of [bsearch](bsearch.md) with security enhancements as described in [Security features in the CRT](../../c-runtime-library/security-features-in-the-crt.md). +Performs a binary search of a sorted array. This function is a version of [`bsearch`](bsearch.md) with security enhancements as described in [Security features in the CRT](../security-features-in-the-crt.md). ## Syntax @@ -29,33 +29,33 @@ void *bsearch_s( ### Parameters -*key*\ +*`key`*\ Pointer to the key to search for. -*base*\ +*`base`*\ Pointer to the base of the search data. -*number*\ +*`number`*\ Number of elements. -*width*\ +*`width`*\ Width of elements. -*compare*\ -Callback function that compares two elements. The first argument is the *context* pointer. The second argument is a pointer to the *key* for the search. The third argument is a pointer to the array element to be compared with *key*. +*`compare`*\ +Callback function that compares two elements. The first argument is the *`context`* pointer. The second argument is a pointer to the *`key`* for the search. The third argument is a pointer to the array element to be compared with *`key`*. -*context*\ +*`context`*\ A pointer to an object that can be accessed in the comparison function. ## Return value -**bsearch_s** returns a pointer to an occurrence of *key* in the array pointed to by *base*. If *key* isn't found, the function returns **NULL**. If the array isn't in ascending sort order or contains duplicate records with identical keys, the result is unpredictable. +**bsearch_s** returns a pointer to an occurrence of *`key`* in the array pointed to by *`base`*. If *`key`* isn't found, the function returns **NULL**. If the array isn't in ascending sort order or contains duplicate records with identical keys, the result is unpredictable. -If invalid parameters are passed to the function, it invokes the invalid parameter handler as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, **errno** is set to **EINVAL** and the function returns **NULL**. For more information, see [errno, _doserrno, _sys_errlist, and _sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +If invalid parameters are passed to the function, it invokes the invalid parameter handler as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, **errno** is set to **EINVAL** and the function returns **NULL**. For more information, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ### Error conditions -|*key*|*base*|*compare*|*number*|*width*|**`errno`** value| +|*`key`*|*`base`*|*`compare`*|*`number`*|*`width`*|**`errno`** value| |-|-|-|-|-|-| |**NULL**|any|any|any|any|**EINVAL**| |any|**NULL**|any|!= 0|any|**EINVAL**| @@ -64,15 +64,15 @@ If invalid parameters are passed to the function, it invokes the invalid paramet ## Remarks -The **bsearch_s** function performs a binary search of a sorted array of *number* elements, each of *width* bytes in size. The *base* value is a pointer to the base of the array to be searched, and *key* is the value being sought. The *compare* parameter is a pointer to a user-supplied routine that compares the requested key to an array element and returns one of the following values specifying their relationship: +The **bsearch_s** function performs a binary search of a sorted array of *`number`* elements, each of *`width`* bytes in size. The *`base`* value is a pointer to the base of the array to be searched, and *`key`* is the value being sought. The *`compare`* parameter is a pointer to a user-supplied routine that compares the requested key to an array element and returns one of the following values specifying their relationship: -|Value returned by *compare* routine|Description| +|Value returned by *`compare`* routine|Description| |-----------------------------------------|-----------------| |\< 0|Key is less than array element.| |0|Key is equal to array element.| |> 0|Key is greater than array element.| -The *context* pointer may be useful if the searched data structure is part of an object, and the compare function needs to access members of the object. The *compare* function may cast the void pointer into the appropriate object type and access members of that object. The addition of the *context* parameter makes **bsearch_s** more secure, since the context may be used to avoid reentrancy bugs associated with using static variables to make data available to the *compare* function. +The *`context`* pointer may be useful if the searched data structure is part of an object, and the compare function needs to access members of the object. The *`compare`* function may cast the void pointer into the appropriate object type and access members of that object. The addition of the *`context`* parameter makes **bsearch_s** more secure, since the context may be used to avoid reentrancy bugs associated with using static variables to make data available to the *`compare`* function. 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). @@ -82,11 +82,11 @@ By default, this function's global state is scoped to the application. To change |-------------|---------------------| |**bsearch_s**|\ and \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example -This program sorts a string array with [qsort_s](qsort-s.md), and then uses bsearch_s to find the word "cat". +This program sorts a string array with [`qsort_s`](qsort-s.md), and then uses bsearch_s to find the word "cat". ```cpp // crt_bsearch_s.cpp @@ -172,7 +172,7 @@ cat found at 002F0F04 ## See also -[Searching and Sorting](../../c-runtime-library/searching-and-sorting.md)\ -[_lfind](lfind.md)\ -[_lsearch](lsearch.md)\ -[qsort](qsort.md) +[Searching and sorting](../searching-and-sorting.md)\ +[`_lfind`](lfind.md)\ +[`_lsearch`](lsearch.md)\ +[`qsort`](qsort.md) diff --git a/docs/c-runtime-library/reference/bsearch.md b/docs/c-runtime-library/reference/bsearch.md index b429ee75b43..9c0364ebb70 100644 --- a/docs/c-runtime-library/reference/bsearch.md +++ b/docs/c-runtime-library/reference/bsearch.md @@ -12,7 +12,7 @@ ms.assetid: e0ad2f47-e7dd-49ed-8288-870457a14a2c --- # bsearch -Performs a binary search of a sorted array. A more secure version of this function is available; see [bsearch_s](bsearch-s.md). +Performs a binary search of a sorted array. A more secure version of this function is available; see [`bsearch_s`](bsearch-s.md). ## Syntax @@ -28,36 +28,36 @@ void *bsearch( ### Parameters -*key*\ +*`key`*\ Pointer to the key to search for. -*base*\ +*`base`*\ Pointer to the base of the search data. -*number*\ +*`number`*\ Number of elements. -*width*\ +*`width`*\ Width of elements. -*compare*\ +*`compare`*\ Callback function that compares two elements. The first is a pointer to the key for the search, and the second is a pointer to the array element to be compared with the key. ## Return value -**bsearch** returns a pointer to an occurrence of *key* in the array pointed to by *base*. If *key* isn't found, the function returns **NULL**. If the array isn't in ascending sort order or contains duplicate records with identical keys, the result is unpredictable. +**bsearch** returns a pointer to an occurrence of *`key`* in the array pointed to by *`base`*. If *`key`* isn't found, the function returns **NULL**. If the array isn't in ascending sort order or contains duplicate records with identical keys, the result is unpredictable. ## Remarks -The **bsearch** function performs a binary search of a sorted array of *number* elements, each of *width* bytes in size. The *base* value is a pointer to the base of the array to be searched, and *key* is the value being sought. The *compare* parameter is a pointer to a user-supplied routine that compares the requested key to an array element. It returns one of the following values that specify their relationship: +The **bsearch** function performs a binary search of a sorted array of *`number`* elements, each of *`width`* bytes in size. The *`base`* value is a pointer to the base of the array to be searched, and *`key`* is the value being sought. The *`compare`* parameter is a pointer to a user-supplied routine that compares the requested key to an array element. It returns one of the following values that specify their relationship: -|Value returned by *compare* routine|Description| +|Value returned by *`compare`* routine|Description| |-----------------------------------------|-----------------| |`< 0`|Key is less than array element.| |`0`|Key is equal to array element.| |`> 0`|Key is greater than array element.| -This function validates its parameters. If *compare*, *key* or *number* is **NULL**, or if *base* is **NULL** and *number* is nonzero, or if *width* is zero, the function invokes the invalid parameter handler, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, **errno** is set to `EINVAL` and the function returns **NULL**. +This function validates its parameters. If *`compare`*, *`key`* or *`number`* is **NULL**, or if *`base`* is **NULL** and *`number`* is nonzero, or if *`width`* is zero, the function invokes the invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, **errno** is set to `EINVAL` and the function returns **NULL**. 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). @@ -67,7 +67,7 @@ By default, this function's global state is scoped to the application. To change |-------------|---------------------| |**bsearch**|\ and \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -116,7 +116,7 @@ cat found at 002F0F04 ## See also -[Searching and Sorting](../../c-runtime-library/searching-and-sorting.md)\ -[_lfind](lfind.md)\ -[_lsearch](lsearch.md)\ -[qsort](qsort.md) +[Searching and sorting](../searching-and-sorting.md)\ +[`_lfind`](lfind.md)\ +[`_lsearch`](lsearch.md)\ +[`qsort`](qsort.md) diff --git a/docs/c-runtime-library/reference/btowc.md b/docs/c-runtime-library/reference/btowc.md index 7e7b402496d..8d8865b2277 100644 --- a/docs/c-runtime-library/reference/btowc.md +++ b/docs/c-runtime-library/reference/btowc.md @@ -24,10 +24,10 @@ wint_t btowc( ### Parameters -*character*
+*`character`*\ Integer to test. -## Return Value +## Return value Returns the wide-character representation of the character if the integer represents a valid single-byte character in the initial shift state. Returns WEOF if the integer is EOF or isn't a valid single-byte character in the initial shift state. The output of this function is affected by the current **LC_TYPE** locale. @@ -41,8 +41,8 @@ By default, this function's global state is scoped to the application. To change |-------------|---------------------| |**btowc**|\ or \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[mbtowc, _mbtowc_l](mbtowc-mbtowc-l.md)
+[`mbtowc`, `_mbtowc_l`](mbtowc-mbtowc-l.md) diff --git a/docs/c-runtime-library/reference/byteswap-uint64-byteswap-ulong-byteswap-ushort.md b/docs/c-runtime-library/reference/byteswap-uint64-byteswap-ulong-byteswap-ushort.md index 463ebcdf0a0..f7095a5bdfa 100644 --- a/docs/c-runtime-library/reference/byteswap-uint64-byteswap-ulong-byteswap-ushort.md +++ b/docs/c-runtime-library/reference/byteswap-uint64-byteswap-ulong-byteswap-ushort.md @@ -24,7 +24,7 @@ unsigned __int64 _byteswap_uint64 ( unsigned __int64 val ); ### Parameters -*`val`*
+*`val`*\ The integer to reverse byte order. ## Requirements @@ -35,7 +35,7 @@ The integer to reverse byte order. |**`_byteswap_ulong`**|``| |**`_byteswap_uint64`**|``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -60,4 +60,4 @@ byteswap of 1020304 = 4030201 ## 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/reference/c16rtomb-c32rtomb1.md b/docs/c-runtime-library/reference/c16rtomb-c32rtomb1.md index e80e6f6a3ad..3b188eed73b 100644 --- a/docs/c-runtime-library/reference/c16rtomb-c32rtomb1.md +++ b/docs/c-runtime-library/reference/c16rtomb-c32rtomb1.md @@ -31,30 +31,30 @@ size_t c32rtomb( ### Parameters -*mbchar*\ +*`mbchar`*\ Pointer to an array to store the converted UTF-8 multibyte character. -*wchar*\ +*`wchar`*\ A wide character to convert. -*state*\ +*`state`*\ A pointer to an **mbstate_t** object. ## Return value -The number of bytes stored in array object *mbchar*, including any shift sequences. If *wchar* isn't a valid wide character, the value (**size_t**)(-1) is returned, **errno** is set to **EILSEQ**, and the value of *state* is unspecified. +The number of bytes stored in array object *`mbchar`*, including any shift sequences. If *`wchar`* isn't a valid wide character, the value (**size_t**)(-1) is returned, **errno** is set to **EILSEQ**, and the value of *`state`* is unspecified. ## Remarks -The **c16rtomb** function converts the UTF-16 LE character *wchar* to the equivalent UTF-8 multibyte narrow character sequence. If *mbchar* isn't a null pointer, the function stores the converted sequence in the array object pointed to by *mbchar*. Up to **MB_CUR_MAX** bytes are stored in *mbchar*, and *state* is set to the resulting multibyte shift state. +The **c16rtomb** function converts the UTF-16 LE character *`wchar`* to the equivalent UTF-8 multibyte narrow character sequence. If *`mbchar`* isn't a null pointer, the function stores the converted sequence in the array object pointed to by *`mbchar`*. Up to **MB_CUR_MAX** bytes are stored in *`mbchar`*, and *`state`* is set to the resulting multibyte shift state. -If *wchar* is a null wide character, a sequence required to restore the initial shift state is stored, if needed, followed by the null character. *state* is set to the initial conversion state. The **c32rtomb** function is identical, but converts a UTF-32 character. +If *`wchar`* is a null wide character, a sequence required to restore the initial shift state is stored, if needed, followed by the null character. *`state`* is set to the initial conversion state. The **c32rtomb** function is identical, but converts a UTF-32 character. -If *mbchar* is a null pointer, the behavior is equivalent to a call to the function that substitutes an internal buffer for *mbchar* and a wide null character for *wchar*. +If *`mbchar`* is a null pointer, the behavior is equivalent to a call to the function that substitutes an internal buffer for *`mbchar`* and a wide null character for *`wchar`*. -The *state* conversion state object allows you to make subsequent calls to this function and other restartable functions that maintain the shift state of the multibyte output characters. Results are undefined when you mix the use of restartable and non-restartable functions. +The *`state`* conversion state object allows you to make subsequent calls to this function and other restartable functions that maintain the shift state of the multibyte output characters. Results are undefined when you mix the use of restartable and non-restartable functions. -To convert UTF-16 characters into non-UTF-8 multibyte characters, use the [wcstombs, _wcstombs_l](wcstombs-wcstombs-l.md), [wcstombs_s, or _wcstombs_s_l](wcstombs-s-wcstombs-s-l.md) functions. +To convert UTF-16 characters into non-UTF-8 multibyte characters, use the [`wcstombs`, `_wcstombs_l`](wcstombs-wcstombs-l.md), [wcstombs_s, or _wcstombs_s_l](wcstombs-s-wcstombs-s-l.md) functions. ## Requirements @@ -69,6 +69,6 @@ For compatibility information, see [Compatibility](../compatibility.md). [Data conversion](../data-conversion.md)\ [Locale](../locale.md)\ [Interpretation of multibyte-character sequences](../interpretation-of-multibyte-character-sequences.md)\ -[mbrtoc16, mbrtoc32](mbrtoc16-mbrtoc323.md)\ -[wcrtomb](wcrtomb.md)\ -[wcrtomb_s](wcrtomb-s.md) +[`mbrtoc16`, `mbrtoc32`](mbrtoc16-mbrtoc323.md)\ +[`wcrtomb`](wcrtomb.md)\ +[`wcrtomb_s`](wcrtomb-s.md) diff --git a/docs/c-runtime-library/reference/cabs-cabsf-cabsl.md b/docs/c-runtime-library/reference/cabs-cabsf-cabsl.md index 8e6c845d366..df12a957752 100644 --- a/docs/c-runtime-library/reference/cabs-cabsf-cabsl.md +++ b/docs/c-runtime-library/reference/cabs-cabsf-cabsl.md @@ -36,12 +36,12 @@ long double cabsl( ### Parameters -*z*
+*`z`*\ A complex number. -## Return Value +## Return value -The absolute value of *z*. +The absolute value of *`z`*. ## Remarks @@ -53,14 +53,14 @@ Because C++ allows overloading, you can call overloads of **cabs** that take **_ |-------------|--------------|------------------| |**cabs**, **cabsf**, **cabsl**|\|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Alphabetical Function Reference](crt-alphabetical-function-reference.md)
-[norm, normf, norml](norm-normf-norml1.md)
-[creal, crealf, creall](creal-crealf-creall.md)
-[cproj, cprojf, cprojl](cproj-cprojf-cprojl.md)
-[conj, conjf, conjl](conj-conjf-conjl.md)
-[cimag, cimagf, cimagl](cimag-cimagf-cimagl.md)
-[carg, cargf, cargl](carg-cargf-cargl.md)
+[Alphabetical function reference](crt-alphabetical-function-reference.md)\ +[`norm`, `normf`, `norml`](norm-normf-norml1.md)\ +[`creal`, `crealf`, `creall`](creal-crealf-creall.md)\ +[`cproj`, `cprojf`, `cprojl`](cproj-cprojf-cprojl.md)\ +[`conj`, `conjf`, `conjl`](conj-conjf-conjl.md)\ +[`cimag`, `cimagf`, `cimagl`](cimag-cimagf-cimagl.md)\ +[`carg`, `cargf`, `cargl`](carg-cargf-cargl.md) diff --git a/docs/c-runtime-library/reference/cabs.md b/docs/c-runtime-library/reference/cabs.md index e5eb2aa2296..89cda6e6e8f 100644 --- a/docs/c-runtime-library/reference/cabs.md +++ b/docs/c-runtime-library/reference/cabs.md @@ -24,16 +24,16 @@ double _cabs( ### Parameters -*z*
+*`z`*\ Complex number. -## Return Value +## Return value -**_cabs** returns the absolute value of its argument if successful. On overflow, **_cabs** returns **HUGE_VAL** and sets **errno** to **ERANGE**. You can change error handling with [_matherr](matherr.md). +**_cabs** returns the absolute value of its argument if successful. On overflow, **_cabs** returns **HUGE_VAL** and sets **errno** to **ERANGE**. You can change error handling with [`_matherr`](matherr.md). ## Remarks -The **_cabs** function calculates the absolute value of a complex number, which must be a structure of type [_complex](../../c-runtime-library/standard-types.md). The structure *z* is composed of a real component *x* and an imaginary component *y*. A call to **_cabs** produces a value equivalent to that of the expression `sqrt( z.x * z.x + z.y * z.y )`. +The **_cabs** function calculates the absolute value of a complex number, which must be a structure of type [`_complex`](../standard-types.md). The structure *`z`* is composed of a real component *`x`* and an imaginary component *`y`*. A call to **_cabs** produces a value equivalent to that of the expression `sqrt( z.x * z.x + z.y * z.y )`. 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). @@ -43,7 +43,7 @@ By default, this function's global state is scoped to the application. To change |-------------|---------------------| |**_cabs**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -72,6 +72,6 @@ The absolute value of 3.000000 + 4.000000i is 5.000000 ## See also -[Floating-Point Support](../../c-runtime-library/floating-point-support.md)
-[abs, labs, llabs, _abs64](abs-labs-llabs-abs64.md)
-[fabs, fabsf, fabsl](fabs-fabsf-fabsl.md) +[Math and floating-point support](../floating-point-support.md)\ +[`abs`, `labs`, `llabs`, `_abs64`](abs-labs-llabs-abs64.md)\ +[`fabs`, `fabsf`, `fabsl`](fabs-fabsf-fabsl.md) diff --git a/docs/c-runtime-library/reference/cacos-cacosf-cacosl.md b/docs/c-runtime-library/reference/cacos-cacosf-cacosl.md index 84c7cdb3a6c..ce16d3ece54 100644 --- a/docs/c-runtime-library/reference/cacos-cacosf-cacosl.md +++ b/docs/c-runtime-library/reference/cacos-cacosf-cacosl.md @@ -29,12 +29,12 @@ _Lcomplex cacos( _Lcomplex z ); // C++ only ### Parameters -*z*
+*`z`*\ A complex number that represents an angle, in radians. -## Return Value +## Return value -The arc cosine of *z*, in radians. The result is unbounded along the imaginary axis, and bounded in the interval [0, π] along the real axis. A domain error will occur if *z* is outside the interval [-1, +1]. +The arc cosine of *`z`*, in radians. The result is unbounded along the imaginary axis, and bounded in the interval [0, π] along the real axis. A domain error will occur if *`z`* is outside the interval [-1, +1]. ## Remarks @@ -46,20 +46,20 @@ Because C++ allows overloading, you can call overloads of **cacos** that take an |-------------|--------------|------------------| |**cacos**, **cacosf**, **cacosl**|\|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Alphabetical Function Reference](crt-alphabetical-function-reference.md)
-[catanh, catanhf, catanhl](catanh-catanhf-catanhl.md)
-[ctanh, ctanhf, ctanhl](ctanh-ctanhf-ctanhl.md)
-[catan, catanf, catanl](catan-catanf-catanl.md)
-[csinh, csinhf, csinhl](csinh-csinhf-csinhl.md)
-[casinh, casinhf, casinhl](casinh-casinhf-casinhl.md)
-[ccosh, ccoshf, ccoshl](ccosh-ccoshf-ccoshl.md)
-[cacosh, cacoshf, cacoshl](cacosh-cacoshf-cacoshl.md)
-[ctan, ctanf, ctanl](ctan-ctanf-ctanl.md)
-[csin, csinf, csinl](csin-csinf-csinl.md)
-[casin, casinf, casinl](casin-casinf-casinl.md)
-[ccos, ccosf, ccosl](ccos-ccosf-ccosl.md)
-[csqrt, csqrtf, csqrtl](csqrt-csqrtf-csqrtl.md)
+[Alphabetical function reference](crt-alphabetical-function-reference.md)\ +[`catanh`, `catanhf`, `catanhl`](catanh-catanhf-catanhl.md)\ +[`ctanh`, `ctanhf`, `ctanhl`](ctanh-ctanhf-ctanhl.md)\ +[`catan`, `catanf`, `catanl`](catan-catanf-catanl.md)\ +[`csinh`, `csinhf`, `csinhl`](csinh-csinhf-csinhl.md)\ +[`casinh`, `casinhf`, `casinhl`](casinh-casinhf-casinhl.md)\ +[`ccosh`, `ccoshf`, `ccoshl`](ccosh-ccoshf-ccoshl.md)\ +[`cacosh`, `cacoshf`, `cacoshl`](cacosh-cacoshf-cacoshl.md)\ +[`ctan`, `ctanf`, `ctanl`](ctan-ctanf-ctanl.md)\ +[`csin`, `csinf`, `csinl`](csin-csinf-csinl.md)\ +[`casin`, `casinf`, `casinl`](casin-casinf-casinl.md)\ +[`ccos`, `ccosf`, `ccosl`](ccos-ccosf-ccosl.md)\ +[`csqrt`, `csqrtf`, `csqrtl`](csqrt-csqrtf-csqrtl.md) diff --git a/docs/c-runtime-library/reference/cacosh-cacoshf-cacoshl.md b/docs/c-runtime-library/reference/cacosh-cacoshf-cacoshl.md index 0503aac86cc..8d14e845b77 100644 --- a/docs/c-runtime-library/reference/cacosh-cacoshf-cacoshl.md +++ b/docs/c-runtime-library/reference/cacosh-cacoshf-cacoshl.md @@ -36,12 +36,12 @@ _Lcomplex cacoshl( ### Parameters -*z*
+*`z`*\ A complex number that represents an angle, in radians. -## Return Value +## Return value -The inverse hyperbolic cosine of *z*, in radians. The result is unbounded and non-negative along the real axis, and in the interval [-iπ, +iπ] along the imaginary axis. +The inverse hyperbolic cosine of *`z`*, in radians. The result is unbounded and non-negative along the real axis, and in the interval [-iπ, +iπ] along the imaginary axis. ## Remarks @@ -53,20 +53,20 @@ Because C++ allows overloading, you can call overloads of **cacosh** that take a |-------------|--------------|------------------| |**cacosh**, **cacoshf**, **cacoshl**|\|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Alphabetical Function Reference](crt-alphabetical-function-reference.md)
-[catanh, catanhf, catanhl](catanh-catanhf-catanhl.md)
-[ctanh, ctanhf, ctanhl](ctanh-ctanhf-ctanhl.md)
-[catan, catanf, catanl](catan-catanf-catanl.md)
-[csinh, csinhf, csinhl](csinh-csinhf-csinhl.md)
-[casinh, casinhf, casinhl](casinh-casinhf-casinhl.md)
-[ccosh, ccoshf, ccoshl](ccosh-ccoshf-ccoshl.md)
-[cacos, cacosf, cacosl](cacos-cacosf-cacosl.md)
-[ctan, ctanf, ctanl](ctan-ctanf-ctanl.md)
-[csin, csinf, csinl](csin-csinf-csinl.md)
-[casin, casinf, casinl](casin-casinf-casinl.md)
-[ccos, ccosf, ccosl](ccos-ccosf-ccosl.md)
-[csqrt, csqrtf, csqrtl](csqrt-csqrtf-csqrtl.md)
+[Alphabetical function reference](crt-alphabetical-function-reference.md)\ +[`catanh`, `catanhf`, `catanhl`](catanh-catanhf-catanhl.md)\ +[`ctanh`, `ctanhf`, `ctanhl`](ctanh-ctanhf-ctanhl.md)\ +[`catan`, `catanf`, `catanl`](catan-catanf-catanl.md)\ +[`csinh`, `csinhf`, `csinhl`](csinh-csinhf-csinhl.md)\ +[`casinh`, `casinhf`, `casinhl`](casinh-casinhf-casinhl.md)\ +[`ccosh`, `ccoshf`, `ccoshl`](ccosh-ccoshf-ccoshl.md)\ +[`cacos`, `cacosf`, `cacosl`](cacos-cacosf-cacosl.md)\ +[`ctan`, `ctanf`, `ctanl`](ctan-ctanf-ctanl.md)\ +[`csin`, `csinf`, `csinl`](csin-csinf-csinl.md)\ +[`casin`, `casinf`, `casinl`](casin-casinf-casinl.md)\ +[`ccos`, `ccosf`, `ccosl`](ccos-ccosf-ccosl.md)\ +[`csqrt`, `csqrtf`, `csqrtl`](csqrt-csqrtf-csqrtl.md) diff --git a/docs/c-runtime-library/reference/callnewh.md b/docs/c-runtime-library/reference/callnewh.md index 8713b341263..3be4a842631 100644 --- a/docs/c-runtime-library/reference/callnewh.md +++ b/docs/c-runtime-library/reference/callnewh.md @@ -24,10 +24,10 @@ int _callnewh( ### Parameters -*size*
+*`size`*\ The amount of memory that the [new operator](../../cpp/new-operator-cpp.md) tried to allocate. -## Return Value +## Return value |Value|Description| |-----------|-----------------| @@ -36,7 +36,7 @@ The amount of memory that the [new operator](../../cpp/new-operator-cpp.md) trie ## Exceptions -This function throws [bad_alloc](../../standard-library/bad-alloc-class.md) if the *new handler* can't be located. +This function throws [`bad_alloc`](../../standard-library/bad-alloc-class.md) if the *new handler* can't be located. ## Remarks @@ -52,5 +52,5 @@ By default, this function's global state is scoped to the application. To change ## See also -[_set_new_handler](set-new-handler.md)
-[_set_new_mode](set-new-mode.md)
+[`_set_new_handler`](set-new-handler.md)\ +[`_set_new_mode`](set-new-mode.md) diff --git a/docs/c-runtime-library/reference/calloc-dbg.md b/docs/c-runtime-library/reference/calloc-dbg.md index 4151563d665..9662c3f4d61 100644 --- a/docs/c-runtime-library/reference/calloc-dbg.md +++ b/docs/c-runtime-library/reference/calloc-dbg.md @@ -28,32 +28,32 @@ void *_calloc_dbg( ### Parameters -*`number`*
+*`number`*\ Requested number of memory blocks. -*`size`*
+*`size`*\ Requested size of each memory block (bytes). -*`blockType`*
+*`blockType`*\ Requested type of memory block: **_CLIENT_BLOCK** or **_NORMAL_BLOCK**. For information about the allocation block types and how they're used, see[Types of blocks on the debug heap](/visualstudio/debugger/crt-debug-heap-details). -*`filename`*
+*`filename`*\ Pointer to name of the source file that requested allocation operation or **NULL**. -*`linenumber`*
+*`linenumber`*\ Line number in the source file where allocation operation was requested or **NULL**. -The *`filename`* and *`linenumber`* parameters are only available when **_calloc_dbg** has been called explicitly or the [_CRTDBG_MAP_ALLOC](../../c-runtime-library/crtdbg-map-alloc.md) preprocessor constant has been defined. +The *`filename`* and *`linenumber`* parameters are only available when **_calloc_dbg** has been called explicitly or the [`_CRTDBG_MAP_ALLOC`](../crtdbg-map-alloc.md) preprocessor constant has been defined. -## Return Value +## Return value -On successful completion, this function returns a pointer to the user portion of the last allocated memory block, calls the new handler function, or returns **NULL**. For a complete description of the return behavior, see the Remarks section. For more information about how the new handler function is used, see the [calloc](calloc.md) function. +On successful completion, this function returns a pointer to the user portion of the last allocated memory block, calls the new handler function, or returns **NULL**. For a complete description of the return behavior, see the Remarks section. For more information about how the new handler function is used, see the [`calloc`](calloc.md) function. ## Remarks -**_calloc_dbg** is a debug version of the [calloc](calloc.md) function. When [_DEBUG](../../c-runtime-library/debug.md) isn't defined, each call to **_calloc_dbg** is reduced to a call to **calloc**. Both **calloc** and **_calloc_dbg** allocate *number* memory blocks in the base heap, but **_calloc_dbg** offers several debugging features: +**_calloc_dbg** is a debug version of the [`calloc`](calloc.md) function. When [`_DEBUG`](../debug.md) isn't defined, each call to **_calloc_dbg** is reduced to a call to **calloc**. Both **calloc** and **_calloc_dbg** allocate *`number`* memory blocks in the base heap, but **_calloc_dbg** offers several debugging features: - Buffers on either side of the user portion of the block to test for leaks. @@ -63,9 +63,9 @@ On successful completion, this function returns a pointer to the user portion of **_calloc_dbg** allocates each memory block with slightly more space than the requested *`size`*. The extra space is used by the debug heap manager to link the debug memory blocks and to provide the application with debug header information and overwrite buffers. When the block is allocated, the user portion of the block is filled with the value 0xCD, and each of the overwrite buffers are filled with 0xFD. -**_calloc_dbg** sets **errno** to **ENOMEM** if a memory allocation fails; **EINVAL** is returned if the amount of memory needed (including the overhead mentioned previously) exceeds **_HEAP_MAXREQ**. For information about this and other error codes, see [errno, _doserrno, _sys_errlist, and _sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +**_calloc_dbg** sets **errno** to **ENOMEM** if a memory allocation fails; **EINVAL** is returned if the amount of memory needed (including the overhead mentioned previously) exceeds **_HEAP_MAXREQ**. For information about this and other error codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). -For information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT Debug Heap Details](/visualstudio/debugger/crt-debug-heap-details). For information about the differences between calling a standard heap function and the debug version, see [Debug Versions of Heap Allocation Functions](/visualstudio/debugger/debug-versions-of-heap-allocation-functions). +For information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT debug heap details](/visualstudio/debugger/crt-debug-heap-details). For information about the differences between calling a standard heap function and the debug version, see [Debug versions of heap allocation functions](/visualstudio/debugger/debug-versions-of-heap-allocation-functions). ## Requirements @@ -73,7 +73,7 @@ For information about how memory blocks are allocated, initialized, and managed |-------------|---------------------| |**_calloc_dbg**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -112,7 +112,7 @@ Allocated memory successfully ## See also -[Debug Routines](../../c-runtime-library/debug-routines.md)
-[calloc](calloc.md)
-[_malloc_dbg](malloc-dbg.md)
-[_DEBUG](../../c-runtime-library/debug.md)
+[Debug routines](../debug-routines.md)\ +[`calloc`](calloc.md)\ +[`_malloc_dbg`](malloc-dbg.md)\ +[`_DEBUG`](../debug.md) diff --git a/docs/c-runtime-library/reference/calloc.md b/docs/c-runtime-library/reference/calloc.md index c6c59443e4a..36e314d8590 100644 --- a/docs/c-runtime-library/reference/calloc.md +++ b/docs/c-runtime-library/reference/calloc.md @@ -30,7 +30,7 @@ Number of elements. *`size`*\ Length in bytes of each element. -## Return Value +## Return value **`calloc`** returns a pointer to the allocated space. The storage space pointed to by the return value is suitably aligned for storage of any type of object. To get a pointer to a type other than **`void`**, use a type cast on the return value. @@ -38,7 +38,7 @@ Length in bytes of each element. The **`calloc`** function allocates storage space for an array of *`number`* elements, each of length *`size`* bytes. Each element is initialized to 0. -**`calloc`** sets **`errno`** to **`ENOMEM`** if a memory allocation fails or if the amount of memory requested exceeds **`_HEAP_MAXREQ`**. For information on this and other error codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +**`calloc`** sets **`errno`** to **`ENOMEM`** if a memory allocation fails or if the amount of memory requested exceeds **`_HEAP_MAXREQ`**. For information on this and other error codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). In the Microsoft implementation, if *`number`* or *`size`* is zero, **`calloc`** returns a pointer to an allocated block of non-zero size. An attempt to read or write through the returned pointer leads to undefined behavior. @@ -48,9 +48,9 @@ In the Microsoft implementation, if *`number`* or *`size`* is zero, **`calloc`** _set_new_mode(1); ``` -early in your program, or link with *`NEWMODE.OBJ`* (see [Link Options](../../c-runtime-library/link-options.md)). +early in your program, or link with *`NEWMODE.OBJ`* (see [Link options](../link-options.md)). -When the application is linked with a debug version of the C run-time libraries, **`calloc`** resolves to [`_calloc_dbg`](calloc-dbg.md). For more information about how the heap is managed during the debugging process, see [The CRT Debug Heap](/visualstudio/debugger/crt-debug-heap-details). +When the application is linked with a debug version of the C run-time libraries, **`calloc`** resolves to [`_calloc_dbg`](calloc-dbg.md). For more information about how the heap is managed during the debugging process, see [The CRT debug heap](/visualstudio/debugger/crt-debug-heap-details). **`calloc`** is marked `__declspec(noalias)` and `__declspec(restrict)`, meaning that the function is guaranteed not to modify global variables, and that the pointer returned isn't aliased. For more information, see [`noalias`](../../cpp/noalias.md) and [`restrict`](../../cpp/restrict.md). @@ -62,7 +62,7 @@ By default, this function's global state is scoped to the application. To change |-------------|---------------------| |**`calloc`**|`` and ``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -93,7 +93,7 @@ Allocated 40 long integers ## See also -[Memory Allocation](../../c-runtime-library/memory-allocation.md)\ +[Memory allocation](../memory-allocation.md)\ [`free`](free.md)\ [`malloc`](malloc.md)\ [`realloc`](realloc.md)\ diff --git a/docs/c-runtime-library/reference/carg-cargf-cargl.md b/docs/c-runtime-library/reference/carg-cargf-cargl.md index 1a9276224b8..0ec57ebe350 100644 --- a/docs/c-runtime-library/reference/carg-cargf-cargl.md +++ b/docs/c-runtime-library/reference/carg-cargf-cargl.md @@ -37,18 +37,18 @@ long double cargl( ### Parameters -*z*\ +*`z`*\ A complex number. -## Return Value +## Return value -The argument (also known as the phase) of *z*. The result is in the interval [-Ï€, +Ï€]. +The argument (also known as the phase) of *`z`*. The result is in the interval [-Ï€, +Ï€]. ## Remarks Because C++ allows overloading, you can call overloads of **carg** that take **_Fcomplex** or **_Lcomplex** values, and return **`float`** or **`long double`** values. In a C program, unless you're using the \ macro to call this function, **carg** always takes a **_Dcomplex** value and returns a **`double`** value. -If you use the \ `carg()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../../c-runtime-library/tgmath.md) for details. +If you use the \ `carg()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../tgmath.md) for details. ## Requirements @@ -57,14 +57,14 @@ If you use the \ `carg()` macro, the type of the argument determines w |**carg**, **cargf**, **cargl**|\|\| |**carg** macro | \ || -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Alphabetical Function Reference](crt-alphabetical-function-reference.md)
-[norm, normf, norml](norm-normf-norml1.md)
-[creal, crealf, creall](creal-crealf-creall.md)
-[cproj, cprojf, cprojl](cproj-cprojf-cprojl.md)
-[conj, conjf, conjl](conj-conjf-conjl.md)
-[cimag, cimagf, cimagl](cimag-cimagf-cimagl.md)
-[cabs, cabsf, cabsl](cabs-cabsf-cabsl.md)
+[Alphabetical function reference](crt-alphabetical-function-reference.md)\ +[`norm`, `normf`, `norml`](norm-normf-norml1.md)\ +[`creal`, `crealf`, `creall`](creal-crealf-creall.md)\ +[`cproj`, `cprojf`, `cprojl`](cproj-cprojf-cprojl.md)\ +[`conj`, `conjf`, `conjl`](conj-conjf-conjl.md)\ +[`cimag`, `cimagf`, `cimagl`](cimag-cimagf-cimagl.md)\ +[`cabs`, `cabsf`, `cabsl`](cabs-cabsf-cabsl.md) diff --git a/docs/c-runtime-library/reference/casin-casinf-casinl.md b/docs/c-runtime-library/reference/casin-casinf-casinl.md index 1fdfb8f66ed..4a5bce4f258 100644 --- a/docs/c-runtime-library/reference/casin-casinf-casinl.md +++ b/docs/c-runtime-library/reference/casin-casinf-casinl.md @@ -36,12 +36,12 @@ _Lcomplex casinl( ### Parameters -*z*
+*`z`*\ A complex number that represents an angle, in radians. -## Return Value +## Return value -The arcsine of *z*, in radians. The result is unbounded along the imaginary axis, and in the interval [-Ï€/2, +Ï€/2] along the real axis. +The arcsine of *`z`*, in radians. The result is unbounded along the imaginary axis, and in the interval [-Ï€/2, +Ï€/2] along the real axis. ## Remarks @@ -53,20 +53,20 @@ Because C++ allows overloading, you can call overloads of **casin** that take an |-------------|--------------|------------------| |**casin**, **casinf**, **casinl**|\|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Alphabetical Function Reference](crt-alphabetical-function-reference.md)
-[catanh, catanhf, catanhl](catanh-catanhf-catanhl.md)
-[ctanh, ctanhf, ctanhl](ctanh-ctanhf-ctanhl.md)
-[catan, catanf, catanl](catan-catanf-catanl.md)
-[csinh, csinhf, csinhl](csinh-csinhf-csinhl.md)
-[casinh, casinhf, casinhl](casinh-casinhf-casinhl.md)
-[ccosh, ccoshf, ccoshl](ccosh-ccoshf-ccoshl.md)
-[cacosh, cacoshf, cacoshl](cacosh-cacoshf-cacoshl.md)
-[cacos, cacosf, cacosl](cacos-cacosf-cacosl.md)
-[ctan, ctanf, ctanl](ctan-ctanf-ctanl.md)
-[csin, csinf, csinl](csin-csinf-csinl.md)
-[ccos, ccosf, ccosl](ccos-ccosf-ccosl.md)
-[csqrt, csqrtf, csqrtl](csqrt-csqrtf-csqrtl.md)
+[Alphabetical function reference](crt-alphabetical-function-reference.md)\ +[`catanh`, `catanhf`, `catanhl`](catanh-catanhf-catanhl.md)\ +[`ctanh`, `ctanhf`, `ctanhl`](ctanh-ctanhf-ctanhl.md)\ +[`catan`, `catanf`, `catanl`](catan-catanf-catanl.md)\ +[`csinh`, `csinhf`, `csinhl`](csinh-csinhf-csinhl.md)\ +[`casinh`, `casinhf`, `casinhl`](casinh-casinhf-casinhl.md)\ +[`ccosh`, `ccoshf`, `ccoshl`](ccosh-ccoshf-ccoshl.md)\ +[`cacosh`, `cacoshf`, `cacoshl`](cacosh-cacoshf-cacoshl.md)\ +[`cacos`, `cacosf`, `cacosl`](cacos-cacosf-cacosl.md)\ +[`ctan`, `ctanf`, `ctanl`](ctan-ctanf-ctanl.md)\ +[`csin`, `csinf`, `csinl`](csin-csinf-csinl.md)\ +[`ccos`, `ccosf`, `ccosl`](ccos-ccosf-ccosl.md)\ +[`csqrt`, `csqrtf`, `csqrtl`](csqrt-csqrtf-csqrtl.md) diff --git a/docs/c-runtime-library/reference/casinh-casinhf-casinhl.md b/docs/c-runtime-library/reference/casinh-casinhf-casinhl.md index 3a54c18b372..d24afd33ea2 100644 --- a/docs/c-runtime-library/reference/casinh-casinhf-casinhl.md +++ b/docs/c-runtime-library/reference/casinh-casinhf-casinhl.md @@ -36,12 +36,12 @@ _Lcomplex casinhl( ### Parameters -*z*
+*`z`*\ A complex number that represents an angle, in radians. -## Return Value +## Return value -The inverse hyperbolic sine of *z*, in radians. The result is unbound along the real axis, and in the interval [-iπ/2, +iπ/2] along the imaginary axis. +The inverse hyperbolic sine of *`z`*, in radians. The result is unbound along the real axis, and in the interval [-iπ/2, +iπ/2] along the imaginary axis. ## Remarks @@ -53,20 +53,20 @@ Because C++ allows overloading, you can call overloads of **casinh** that take a |-------------|--------------|------------------| |**casinh**, **casinhf**, **casinhl**|\|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Alphabetical Function Reference](crt-alphabetical-function-reference.md)
-[catanh, catanhf, catanhl](catanh-catanhf-catanhl.md)
-[ctanh, ctanhf, ctanhl](ctanh-ctanhf-ctanhl.md)
-[catan, catanf, catanl](catan-catanf-catanl.md)
-[csinh, csinhf, csinhl](csinh-csinhf-csinhl.md)
-[ccosh, ccoshf, ccoshl](ccosh-ccoshf-ccoshl.md)
-[cacosh, cacoshf, cacoshl](cacosh-cacoshf-cacoshl.md)
-[cacos, cacosf, cacosl](cacos-cacosf-cacosl.md)
-[ctan, ctanf, ctanl](ctan-ctanf-ctanl.md)
-[csin, csinf, csinl](csin-csinf-csinl.md)
-[casin, casinf, casinl](casin-casinf-casinl.md)
-[ccos, ccosf, ccosl](ccos-ccosf-ccosl.md)
-[csqrt, csqrtf, csqrtl](csqrt-csqrtf-csqrtl.md)
+[Alphabetical function reference](crt-alphabetical-function-reference.md)\ +[`catanh`, `catanhf`, `catanhl`](catanh-catanhf-catanhl.md)\ +[`ctanh`, `ctanhf`, `ctanhl`](ctanh-ctanhf-ctanhl.md)\ +[`catan`, `catanf`, `catanl`](catan-catanf-catanl.md)\ +[`csinh`, `csinhf`, `csinhl`](csinh-csinhf-csinhl.md)\ +[`ccosh`, `ccoshf`, `ccoshl`](ccosh-ccoshf-ccoshl.md)\ +[`cacosh`, `cacoshf`, `cacoshl`](cacosh-cacoshf-cacoshl.md)\ +[`cacos`, `cacosf`, `cacosl`](cacos-cacosf-cacosl.md)\ +[`ctan`, `ctanf`, `ctanl`](ctan-ctanf-ctanl.md)\ +[`csin`, `csinf`, `csinl`](csin-csinf-csinl.md)\ +[`casin`, `casinf`, `casinl`](casin-casinf-casinl.md)\ +[`ccos`, `ccosf`, `ccosl`](ccos-ccosf-ccosl.md)\ +[`csqrt`, `csqrtf`, `csqrtl`](csqrt-csqrtf-csqrtl.md) diff --git a/docs/c-runtime-library/reference/catan-catanf-catanl.md b/docs/c-runtime-library/reference/catan-catanf-catanl.md index ea8eae0d287..0f5be91999a 100644 --- a/docs/c-runtime-library/reference/catan-catanf-catanl.md +++ b/docs/c-runtime-library/reference/catan-catanf-catanl.md @@ -29,12 +29,12 @@ _Lcomplex catan( _Lcomplex z ); // C++ only ### Parameters -*z*
+*`z`*\ A complex number that represents an angle, in radians. -## Return Value +## Return value -The arctangent of *z*, in radians. The result is unbounded along the imaginary axis, and in the interval [-Ï€/2; +Ï€/2] along the real axis. +The arctangent of *`z`*, in radians. The result is unbounded along the imaginary axis, and in the interval [-Ï€/2; +Ï€/2] along the real axis. ## Remarks @@ -46,20 +46,20 @@ Because C++ allows overloading, you can call overloads of **catan** that take an |-------------|--------------|------------------| |**catan**, **catanf**, **catanl**|\|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Alphabetical Function Reference](crt-alphabetical-function-reference.md)
-[catanh, catanhf, catanhl](catanh-catanhf-catanhl.md)
-[ctanh, ctanhf, ctanhl](ctanh-ctanhf-ctanhl.md)
-[csinh, csinhf, csinhl](csinh-csinhf-csinhl.md)
-[casinh, casinhf, casinhl](casinh-casinhf-casinhl.md)
-[ccosh, ccoshf, ccoshl](ccosh-ccoshf-ccoshl.md)
-[cacosh, cacoshf, cacoshl](cacosh-cacoshf-cacoshl.md)
-[cacos, cacosf, cacosl](cacos-cacosf-cacosl.md)
-[ctan, ctanf, ctanl](ctan-ctanf-ctanl.md)
-[csin, csinf, csinl](csin-csinf-csinl.md)
-[casin, casinf, casinl](casin-casinf-casinl.md)
-[ccos, ccosf, ccosl](ccos-ccosf-ccosl.md)
-[csqrt, csqrtf, csqrtl](csqrt-csqrtf-csqrtl.md)
+[Alphabetical function reference](crt-alphabetical-function-reference.md)\ +[`catanh`, `catanhf`, `catanhl`](catanh-catanhf-catanhl.md)\ +[`ctanh`, `ctanhf`, `ctanhl`](ctanh-ctanhf-ctanhl.md)\ +[`csinh`, `csinhf`, `csinhl`](csinh-csinhf-csinhl.md)\ +[`casinh`, `casinhf`, `casinhl`](casinh-casinhf-casinhl.md)\ +[`ccosh`, `ccoshf`, `ccoshl`](ccosh-ccoshf-ccoshl.md)\ +[`cacosh`, `cacoshf`, `cacoshl`](cacosh-cacoshf-cacoshl.md)\ +[`cacos`, `cacosf`, `cacosl`](cacos-cacosf-cacosl.md)\ +[`ctan`, `ctanf`, `ctanl`](ctan-ctanf-ctanl.md)\ +[`csin`, `csinf`, `csinl`](csin-csinf-csinl.md)\ +[`casin`, `casinf`, `casinl`](casin-casinf-casinl.md)\ +[`ccos`, `ccosf`, `ccosl`](ccos-ccosf-ccosl.md)\ +[`csqrt`, `csqrtf`, `csqrtl`](csqrt-csqrtf-csqrtl.md) diff --git a/docs/c-runtime-library/reference/catanh-catanhf-catanhl.md b/docs/c-runtime-library/reference/catanh-catanhf-catanhl.md index 848f83820f0..6f74deb5f1f 100644 --- a/docs/c-runtime-library/reference/catanh-catanhf-catanhl.md +++ b/docs/c-runtime-library/reference/catanh-catanhf-catanhl.md @@ -36,12 +36,12 @@ _Lcomplex catanhl( ### Parameters -*z*
+*`z`*\ A complex number that represents an angle, in radians. -## Return Value +## Return value -The inverse hyperbolic tangent of *z*, in radians. The result is unbounded along the real axis, and in the interval [-iπ/2; +iπ/2] along the imaginary axis. A domain error will occur if *z* is outside the interval [-1, +1]. A pole error will occur if *z* is -1 or +1. +The inverse hyperbolic tangent of *`z`*, in radians. The result is unbounded along the real axis, and in the interval [-iπ/2; +iπ/2] along the imaginary axis. A domain error will occur if *`z`* is outside the interval [-1, +1]. A pole error will occur if *`z`* is -1 or +1. ## Remarks @@ -53,20 +53,20 @@ Because C++ allows overloading, you can call overloads of **catanh** that take a |-------------|--------------|------------------| |**catanh**, **catanhf**, **catanhl**|\|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Alphabetical Function Reference](crt-alphabetical-function-reference.md)
-[ctanh, ctanhf, ctanhl](ctanh-ctanhf-ctanhl.md)
-[catan, catanf, catanl](catan-catanf-catanl.md)
-[csinh, csinhf, csinhl](csinh-csinhf-csinhl.md)
-[casinh, casinhf, casinhl](casinh-casinhf-casinhl.md)
-[ccosh, ccoshf, ccoshl](ccosh-ccoshf-ccoshl.md)
-[cacosh, cacoshf, cacoshl](cacosh-cacoshf-cacoshl.md)
-[cacos, cacosf, cacosl](cacos-cacosf-cacosl.md)
-[ctan, ctanf, ctanl](ctan-ctanf-ctanl.md)
-[csin, csinf, csinl](csin-csinf-csinl.md)
-[casin, casinf, casinl](casin-casinf-casinl.md)
-[ccos, ccosf, ccosl](ccos-ccosf-ccosl.md)
-[csqrt, csqrtf, csqrtl](csqrt-csqrtf-csqrtl.md)
+[Alphabetical function reference](crt-alphabetical-function-reference.md)\ +[`ctanh`, `ctanhf`, `ctanhl`](ctanh-ctanhf-ctanhl.md)\ +[`catan`, `catanf`, `catanl`](catan-catanf-catanl.md)\ +[`csinh`, `csinhf`, `csinhl`](csinh-csinhf-csinhl.md)\ +[`casinh`, `casinhf`, `casinhl`](casinh-casinhf-casinhl.md)\ +[`ccosh`, `ccoshf`, `ccoshl`](ccosh-ccoshf-ccoshl.md)\ +[`cacosh`, `cacoshf`, `cacoshl`](cacosh-cacoshf-cacoshl.md)\ +[`cacos`, `cacosf`, `cacosl`](cacos-cacosf-cacosl.md)\ +[`ctan`, `ctanf`, `ctanl`](ctan-ctanf-ctanl.md)\ +[`csin`, `csinf`, `csinl`](csin-csinf-csinl.md)\ +[`casin`, `casinf`, `casinl`](casin-casinf-casinl.md)\ +[`ccos`, `ccosf`, `ccosl`](ccos-ccosf-ccosl.md)\ +[`csqrt`, `csqrtf`, `csqrtl`](csqrt-csqrtf-csqrtl.md) diff --git a/docs/c-runtime-library/reference/cbrt-cbrtf-cbrtl.md b/docs/c-runtime-library/reference/cbrt-cbrtf-cbrtl.md index ac6adc01aff..a5b91b262a4 100644 --- a/docs/c-runtime-library/reference/cbrt-cbrtf-cbrtl.md +++ b/docs/c-runtime-library/reference/cbrt-cbrtf-cbrtl.md @@ -37,12 +37,12 @@ long double cbrtl( ### Parameters -*x*\ +*`x`*\ Floating-point value -## Return Value +## Return value -The **cbrt** functions return the cube-root of *x*. +The **cbrt** functions return the cube-root of *`x`*. |Input|SEH Exception|**_matherr** Exception| |-----------|-------------------|--------------------------| @@ -52,7 +52,7 @@ The **cbrt** functions return the cube-root of *x*. Because C++ allows overloading, you can call overloads of **cbrt** that take **`float`** or **`long double`** types. In a C program, unless you're using the \ macro to call this function, **cbrt** always takes and returns **`double`**. -If you use the \ `cbrt()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../../c-runtime-library/tgmath.md) for details. +If you use the \ `cbrt()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../tgmath.md) for details. 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). @@ -63,7 +63,7 @@ By default, this function's global state is scoped to the application. To change |**cbrt**, **cbrtf**, **cbrtl**|\|\| |**cbrt** macro | \ || -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -91,7 +91,7 @@ The cube root of -64.64 is -4.013289 ## See also -[Floating-Point Support](../../c-runtime-library/floating-point-support.md)
-[`exp`, `expf`, `expl`](exp-expf.md)
-[`log`, `logf`, `log10`, `log10f`](log-logf-log10-log10f.md)
+[Math and floating-point support](../floating-point-support.md)\ +[`exp`, `expf`, `expl`](exp-expf.md)\ +[`log`, `logf`, `log10`, `log10f`](log-logf-log10-log10f.md)\ [`pow`, `powf`, `powl`](pow-powf-powl.md) diff --git a/docs/c-runtime-library/reference/cbuild-fcbuild-lcbuild.md b/docs/c-runtime-library/reference/cbuild-fcbuild-lcbuild.md index bb78a4e87b3..5248db05c60 100644 --- a/docs/c-runtime-library/reference/cbuild-fcbuild-lcbuild.md +++ b/docs/c-runtime-library/reference/cbuild-fcbuild-lcbuild.md @@ -23,19 +23,19 @@ _Lcomplex _LCbuild( long double real, long double imaginary ); ### Parameters -*real*
+*`real`*\ The real part of the complex number to construct. -*imaginary*
+*`imaginary`*\ The imaginary part of the complex number to construct. -## Return Value +## Return value -A **_Dcomplex**, **_Fcomplex**, or **_Lcomplex** structure that represents the complex number (*real*, *imaginary* \* i) for values of the specified floating-point type. +A **_Dcomplex**, **_Fcomplex**, or **_Lcomplex** structure that represents the complex number (*`real`*, *`imaginary`* \* i) for values of the specified floating-point type. ## Remarks -The **_Cbuild**, **_FCbuild**, and **_LCbuild** functions simplify creation of complex types. Use the [creal, crealf, creall](creal-crealf-creall.md) and [cimag, cimagf, cimagl](cimag-cimagf-cimagl.md) functions to retrieve the real and imaginary portions of the represented complex numbers. +The **_Cbuild**, **_FCbuild**, and **_LCbuild** functions simplify creation of complex types. Use the [`creal`, `crealf`, `creall`](creal-crealf-creall.md) and [`cimag`, `cimagf`, `cimagl`](cimag-cimagf-cimagl.md) functions to retrieve the real and imaginary portions of the represented complex numbers. ## Requirements @@ -43,17 +43,17 @@ The **_Cbuild**, **_FCbuild**, and **_LCbuild** functions simplify creation of c |-------------|--------------|------------------| |**_Cbuild**, **_FCbuild**, **_LCbuild**|\|\| -These functions are Microsoft-specific. The types **_Dcomplex**, **_Fcomplex**, and **_Lcomplex** are Microsoft-specific equivalents to the unimplemented C99 native types **`double _Complex`**, **`float _Complex`**, and **`long double _Complex`**, respectively. For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +These functions are Microsoft-specific. The types **_Dcomplex**, **_Fcomplex**, and **_Lcomplex** are Microsoft-specific equivalents to the unimplemented C99 native types **`double _Complex`**, **`float _Complex`**, and **`long double _Complex`**, respectively. For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Alphabetical Function Reference](crt-alphabetical-function-reference.md)
-[_Cmulcc, _FCmulcc, _LCmulcc](cmulcc-fcmulcc-lcmulcc.md)
-[_Cmulcr, _FCmulcr, _LCmulcr](cmulcr-fcmulcr-lcmulcr.md)
-[norm, normf, norml](norm-normf-norml1.md)
-[cproj, cprojf, cprojl](cproj-cprojf-cprojl.md)
-[conj, conjf, conjl](conj-conjf-conjl.md)
-[creal, crealf, creall](creal-crealf-creall.md)
-[cimag, cimagf, cimagl](cimag-cimagf-cimagl.md)
-[carg, cargf, cargl](carg-cargf-cargl.md)
-[cabs, cabsf, cabsl](cabs-cabsf-cabsl.md)
+[Alphabetical function reference](crt-alphabetical-function-reference.md)\ +[`_Cmulcc`, `_FCmulcc`, `_LCmulcc`](cmulcc-fcmulcc-lcmulcc.md)\ +[`_Cmulcr`, `_FCmulcr`, `_LCmulcr`](cmulcr-fcmulcr-lcmulcr.md)\ +[`norm`, `normf`, `norml`](norm-normf-norml1.md)\ +[`cproj`, `cprojf`, `cprojl`](cproj-cprojf-cprojl.md)\ +[`conj`, `conjf`, `conjl`](conj-conjf-conjl.md)\ +[`creal`, `crealf`, `creall`](creal-crealf-creall.md)\ +[`cimag`, `cimagf`, `cimagl`](cimag-cimagf-cimagl.md)\ +[`carg`, `cargf`, `cargl`](carg-cargf-cargl.md)\ +[`cabs`, `cabsf`, `cabsl`](cabs-cabsf-cabsl.md) diff --git a/docs/c-runtime-library/reference/ccos-ccosf-ccosl.md b/docs/c-runtime-library/reference/ccos-ccosf-ccosl.md index 02cd728cbaa..6e0d7e2144e 100644 --- a/docs/c-runtime-library/reference/ccos-ccosf-ccosl.md +++ b/docs/c-runtime-library/reference/ccos-ccosf-ccosl.md @@ -36,12 +36,12 @@ _Lcomplex ccosl( ### Parameters -*z*
+*`z`*\ A complex number that represents the angle, in radians. -## Return Value +## Return value -The cosine of *z*, in radians. +The cosine of *`z`*, in radians. ## Remarks @@ -53,20 +53,20 @@ Because C++ allows overloading, you can call overloads of **ccos** that take and |-------------|--------------|------------------| |**ccos**, **ccosf**, **ccosl**|\|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Alphabetical Function Reference](crt-alphabetical-function-reference.md)
-[catanh, catanhf, catanhl](catanh-catanhf-catanhl.md)
-[ctanh, ctanhf, ctanhl](ctanh-ctanhf-ctanhl.md)
-[catan, catanf, catanl](catan-catanf-catanl.md)
-[csinh, csinhf, csinhl](csinh-csinhf-csinhl.md)
-[casinh, casinhf, casinhl](casinh-casinhf-casinhl.md)
-[ccosh, ccoshf, ccoshl](ccosh-ccoshf-ccoshl.md)
-[cacosh, cacoshf, cacoshl](cacosh-cacoshf-cacoshl.md)
-[cacos, cacosf, cacosl](cacos-cacosf-cacosl.md)
-[ctan, ctanf, ctanl](ctan-ctanf-ctanl.md)
-[csin, csinf, csinl](csin-csinf-csinl.md)
-[casin, casinf, casinl](casin-casinf-casinl.md)
-[csqrt, csqrtf, csqrtl](csqrt-csqrtf-csqrtl.md)
+[Alphabetical function reference](crt-alphabetical-function-reference.md)\ +[`catanh`, `catanhf`, `catanhl`](catanh-catanhf-catanhl.md)\ +[`ctanh`, `ctanhf`, `ctanhl`](ctanh-ctanhf-ctanhl.md)\ +[`catan`, `catanf`, `catanl`](catan-catanf-catanl.md)\ +[`csinh`, `csinhf`, `csinhl`](csinh-csinhf-csinhl.md)\ +[`casinh`, `casinhf`, `casinhl`](casinh-casinhf-casinhl.md)\ +[`ccosh`, `ccoshf`, `ccoshl`](ccosh-ccoshf-ccoshl.md)\ +[`cacosh`, `cacoshf`, `cacoshl`](cacosh-cacoshf-cacoshl.md)\ +[`cacos`, `cacosf`, `cacosl`](cacos-cacosf-cacosl.md)\ +[`ctan`, `ctanf`, `ctanl`](ctan-ctanf-ctanl.md)\ +[`csin`, `csinf`, `csinl`](csin-csinf-csinl.md)\ +[`casin`, `casinf`, `casinl`](casin-casinf-casinl.md)\ +[`csqrt`, `csqrtf`, `csqrtl`](csqrt-csqrtf-csqrtl.md) diff --git a/docs/c-runtime-library/reference/ccosh-ccoshf-ccoshl.md b/docs/c-runtime-library/reference/ccosh-ccoshf-ccoshl.md index 970f801b8d5..ef3cb0e5fa8 100644 --- a/docs/c-runtime-library/reference/ccosh-ccoshf-ccoshl.md +++ b/docs/c-runtime-library/reference/ccosh-ccoshf-ccoshl.md @@ -36,12 +36,12 @@ _Lcomplex ccoshl( ### Parameters -*z*
+*`z`*\ A complex number that represents the angle, in radians. -## Return Value +## Return value -The hyperbolic cosine of *z*, in radians. +The hyperbolic cosine of *`z`*, in radians. ## Remarks @@ -53,20 +53,20 @@ Because C++ allows overloading, you can call overloads of **ccosh** that take an |-------------|--------------|------------------| |**ccosh**, **ccoshf**, **ccoshl**|\|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Alphabetical Function Reference](crt-alphabetical-function-reference.md)
-[catanh, catanhf, catanhl](catanh-catanhf-catanhl.md)
-[ctanh, ctanhf, ctanhl](ctanh-ctanhf-ctanhl.md)
-[catan, catanf, catanl](catan-catanf-catanl.md)
-[csinh, csinhf, csinhl](csinh-csinhf-csinhl.md)
-[casinh, casinhf, casinhl](casinh-casinhf-casinhl.md)
-[cacosh, cacoshf, cacoshl](cacosh-cacoshf-cacoshl.md)
-[cacos, cacosf, cacosl](cacos-cacosf-cacosl.md)
-[ctan, ctanf, ctanl](ctan-ctanf-ctanl.md)
-[csin, csinf, csinl](csin-csinf-csinl.md)
-[casin, casinf, casinl](casin-casinf-casinl.md)
-[ccos, ccosf, ccosl](ccos-ccosf-ccosl.md)
-[csqrt, csqrtf, csqrtl](csqrt-csqrtf-csqrtl.md)
+[Alphabetical function reference](crt-alphabetical-function-reference.md)\ +[`catanh`, `catanhf`, `catanhl`](catanh-catanhf-catanhl.md)\ +[`ctanh`, `ctanhf`, `ctanhl`](ctanh-ctanhf-ctanhl.md)\ +[`catan`, `catanf`, `catanl`](catan-catanf-catanl.md)\ +[`csinh`, `csinhf`, `csinhl`](csinh-csinhf-csinhl.md)\ +[`casinh`, `casinhf`, `casinhl`](casinh-casinhf-casinhl.md)\ +[`cacosh`, `cacoshf`, `cacoshl`](cacosh-cacoshf-cacoshl.md)\ +[`cacos`, `cacosf`, `cacosl`](cacos-cacosf-cacosl.md)\ +[`ctan`, `ctanf`, `ctanl`](ctan-ctanf-ctanl.md)\ +[`csin`, `csinf`, `csinl`](csin-csinf-csinl.md)\ +[`casin`, `casinf`, `casinl`](casin-casinf-casinl.md)\ +[`ccos`, `ccosf`, `ccosl`](ccos-ccosf-ccosl.md)\ +[`csqrt`, `csqrtf`, `csqrtl`](csqrt-csqrtf-csqrtl.md) diff --git a/docs/c-runtime-library/reference/ceil-ceilf-ceill.md b/docs/c-runtime-library/reference/ceil-ceilf-ceill.md index 8dbbb3abe74..112c5062622 100644 --- a/docs/c-runtime-library/reference/ceil-ceilf-ceill.md +++ b/docs/c-runtime-library/reference/ceil-ceilf-ceill.md @@ -37,24 +37,24 @@ long double ceill( ### Parameters -*x*\ +*`x`*\ Floating-point value. -## Return Value +## Return value -The **ceil** functions return a floating-point value that represents the smallest integer that is greater than or equal to *x*. There's no error return. +The **ceil** functions return a floating-point value that represents the smallest integer that is greater than or equal to *`x`*. There's no error return. |Input|SEH Exception|`Matherr` Exception| |-----------|-------------------|-----------------------| |± **QNAN**, **IND**|none|**_DOMAIN**| -**ceil** has an implementation that uses Streaming SIMD Extensions 2 (SSE2). For information and restrictions about using the SSE2 implementation, see [_set_SSE2_enable](set-sse2-enable.md). +**ceil** has an implementation that uses Streaming SIMD Extensions 2 (SSE2). For information and restrictions about using the SSE2 implementation, see [`_set_SSE2_enable`](set-sse2-enable.md). ## Remarks Because C++ allows overloading, you can call overloads of **ceil** that take **`float`** or **`long double`** types. In a C program, unless you're using the \ macro to call this function, **ceil** always takes and returns a **`double`**. -If you use the \ `ceil()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../../c-runtime-library/tgmath.md) for details. +If you use the \ `ceil()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../tgmath.md) for details. By default, this function's global state is scoped to the application. To change this state, see [Global state in the CRT](../global-state.md). @@ -65,15 +65,15 @@ By default, this function's global state is scoped to the application. To change | **ceil**, **ceilf**, **ceill**| \ | | **ceil** macro | \ | -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example -See the example for [floor](floor-floorf-floorl.md). +See the example for [`floor`](floor-floorf-floorl.md). ## See also -[Floating-Point Support](../../c-runtime-library/floating-point-support.md)
-[floor, floorf, floorl](floor-floorf-floorl.md)
-[fmod, fmodf](fmod-fmodf.md)
-[round, roundf, roundl](round-roundf-roundl.md)
+[Math and floating-point support](../floating-point-support.md)\ +[`floor`, `floorf`, `floorl`](floor-floorf-floorl.md)\ +[`fmod`, `fmodf`](fmod-fmodf.md)\ +[`round`, `roundf`, `roundl`](round-roundf-roundl.md) diff --git a/docs/c-runtime-library/reference/cexit-c-exit.md b/docs/c-runtime-library/reference/cexit-c-exit.md index f0ec8f5bd20..91edec53c43 100644 --- a/docs/c-runtime-library/reference/cexit-c-exit.md +++ b/docs/c-runtime-library/reference/cexit-c-exit.md @@ -47,15 +47,15 @@ By default, this function's global state is scoped to the application. To change |**_cexit**|\| |**_c_exit**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Process and Environment Control](../../c-runtime-library/process-and-environment-control.md)
-[abort](abort.md)
-[atexit](atexit.md)
-[_exec, _wexec Functions](../../c-runtime-library/exec-wexec-functions.md)
-[exit, _Exit, _exit](exit-exit-exit.md)
-[_onexit, _onexit_m](onexit-onexit-m.md)
-[_spawn, _wspawn Functions](../../c-runtime-library/spawn-wspawn-functions.md)
-[system, _wsystem](system-wsystem.md)
+[Process and environment control](../process-and-environment-control.md)\ +[`abort`](abort.md)\ +[`atexit`](atexit.md)\ +[`_exec`, `_wexec` functions](../exec-wexec-functions.md)\ +[`exit`, `_Exit`, `_exit`](exit-exit-exit.md)\ +[`_onexit`, `_onexit_m`](onexit-onexit-m.md)\ +[`_spawn`, `_wspawn` functions](../spawn-wspawn-functions.md)\ +[`system`, `_wsystem`](system-wsystem.md) diff --git a/docs/c-runtime-library/reference/cexp-cexpf-cexpl.md b/docs/c-runtime-library/reference/cexp-cexpf-cexpl.md index 357ad8fabb1..0d1d6f118cd 100644 --- a/docs/c-runtime-library/reference/cexp-cexpf-cexpl.md +++ b/docs/c-runtime-library/reference/cexp-cexpf-cexpl.md @@ -27,12 +27,12 @@ _Lcomplex cexp( _Lcomplex z ); // C++ only ### Parameters -*z*\ +*`z`*\ A complex number that represents the exponent. -## Return Value +## Return value -The value of **e** raised to the power of *z*. +The value of **e** raised to the power of *`z`*. ## Remarks @@ -44,11 +44,11 @@ Because C++ allows overloading, you can call overloads of **cexp** that take and |-------------|--------------|------------------| |**cexp**, **cexpf**, **cexpl**|\|\| -For compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For compatibility information, see [Compatibility](../compatibility.md). ## See also -[Alphabetical Function Reference](crt-alphabetical-function-reference.md)\ -[cpow, cpowf, cpowl](cpow-cpowf-cpowl.md)\ -[clog10, clog10f, clog10l](clog10-clog10f-clog10l.md)\ -[clog, clogf, clogl](clog-clogf-clogl.md) +[Alphabetical function reference](crt-alphabetical-function-reference.md)\ +[`cpow`, `cpowf`, `cpowl`](cpow-cpowf-cpowl.md)\ +[`clog10`, `clog10f`, `clog10l`](clog10-clog10f-clog10l.md)\ +[`clog`, `clogf`, `clogl`](clog-clogf-clogl.md) diff --git a/docs/c-runtime-library/reference/cgets-s-cgetws-s.md b/docs/c-runtime-library/reference/cgets-s-cgetws-s.md index c415cbb9aac..00c8be8714e 100644 --- a/docs/c-runtime-library/reference/cgets-s-cgetws-s.md +++ b/docs/c-runtime-library/reference/cgets-s-cgetws-s.md @@ -12,7 +12,7 @@ ms.assetid: 38b74897-afe6-4dd9-a43f-36a3c0d72c5c --- # _cgets_s, _cgetws_s -Gets a character string from the console. These versions of [_cgets and _cgetws](../../c-runtime-library/cgets-cgetws.md) have security enhancements, as described in [Security Features in the CRT](../../c-runtime-library/security-features-in-the-crt.md). +Gets a character string from the console. These versions of [`_cgets` and `_cgetws`](../cgets-cgetws.md) have security enhancements, as described in [Security features in the CRT](../security-features-in-the-crt.md). > [!IMPORTANT] > This API cannot be used in applications that execute in the Windows Runtime. For more information, see [CRT functions not supported in Universal Windows Platform apps](../../cppcx/crt-functions-not-supported-in-universal-windows-platform-apps.md). @@ -44,22 +44,22 @@ errno_t _cgetws_s( ### Parameters -*buffer*
+*`buffer`*\ Storage location for data. -*numberOfElements*
+*`numberOfElements`*\ The size of the buffer in single-byte or wide characters, which is also the maximum number of characters to be read. -*pSizeRead*
+*`pSizeRead`*\ The number of characters actually read. -## Return Value +## Return value The return value is zero if successful; otherwise, an error code if a failure occurs. -### Error Conditions +### Error conditions -|*buffer*|*numberOfElements*|*pSizeRead*|Return|Contents of *buffer*| +|*`buffer`*|*`numberOfElements`*|*`pSizeRead`*|Return|Contents of *`buffer`*| |--------------|------------------------|-----------------|------------|--------------------------| |**NULL**|any|any|**EINVAL**|n/a| |not **NULL**|zero|any|**EINVAL**|not modified| @@ -67,17 +67,17 @@ The return value is zero if successful; otherwise, an error code if a failure oc ## Remarks -**_cgets_s** and **_cgetws_s** read a string from the console and copy the string (with a null terminator) into *buffer*. **_cgetws_s** is the wide character version of the function; other than the character size, the behavior of these two functions is identical. The maximum size of the string to be read is passed in as the *numberOfElements* parameter. This size should include an extra character for the terminating null. The actual number of characters read is placed in *pSizeRead*. +**_cgets_s** and **_cgetws_s** read a string from the console and copy the string (with a null terminator) into *`buffer`*. **_cgetws_s** is the wide character version of the function; other than the character size, the behavior of these two functions is identical. The maximum size of the string to be read is passed in as the *`numberOfElements`* parameter. This size should include an extra character for the terminating null. The actual number of characters read is placed in *`pSizeRead`*. -If an error occurs during the operation or in the validating of the parameters, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, **errno** is set to **EINVAL**, and **EINVAL** is returned. +If an error occurs during the operation or in the validating of the parameters, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, **errno** is set to **EINVAL**, and **EINVAL** is returned. -In C++, the use of these functions is simplified by template overloads. The overloads can infer buffer length automatically, which eliminates the need to specify a size argument. They can also automatically replace older, less-secure functions with their newer, more secure counterparts. For more information, see [Secure Template Overloads](../../c-runtime-library/secure-template-overloads.md). +In C++, the use of these functions is simplified by template overloads. The overloads can infer buffer length automatically, which eliminates the need to specify a size argument. They can also automatically replace older, less-secure functions with their newer, more secure counterparts. For more information, see [Secure template overloads](../secure-template-overloads.md). -The debug library versions of these functions first fill the buffer with 0xFE. To disable this behavior, use [_CrtSetDebugFillThreshold](crtsetdebugfillthreshold.md). +The debug library versions of these functions first fill the buffer with 0xFE. To disable this behavior, use [`_CrtSetDebugFillThreshold`](crtsetdebugfillthreshold.md). By default, this function's global state is scoped to the application. To change this behavior, see [Global state in the CRT](../global-state.md). -### Generic-Text Routine Mappings +### Generic-text routine mappings |Tchar.h routine|_UNICODE and _MBCS not defined|_MBCS defined|_UNICODE defined| |---------------------|--------------------------------------|--------------------|-----------------------| @@ -90,9 +90,9 @@ By default, this function's global state is scoped to the application. To change |**_cgets_s**|\| |**_cgetws_s**|\ or \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Console and Port I/O](../../c-runtime-library/console-and-port-i-o.md)
-[_getch, _getwch](getch-getwch.md)
+[Console and port I/O](../console-and-port-i-o.md)\ +[`_getch`, `_getwch`](getch-getwch.md) diff --git a/docs/c-runtime-library/reference/cgets.md b/docs/c-runtime-library/reference/cgets.md index acd45107fe5..d2740fd54c1 100644 --- a/docs/c-runtime-library/reference/cgets.md +++ b/docs/c-runtime-library/reference/cgets.md @@ -12,9 +12,9 @@ ms.assetid: 54faf257-5ed6-4301-be19-66d953e901fa --- # cgets -The Microsoft-specific function name `cgets` is a deprecated alias for the [_cgets](../cgets-cgetws.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. +The Microsoft-specific function name `cgets` is a deprecated alias for the [`_cgets`](../cgets-cgetws.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. -We recommend you use the security-enhanced [_cgets_s](cgets-s-cgetws-s.md) function instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). +We recommend you use the security-enhanced [`_cgets_s`](cgets-s-cgetws-s.md) function instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). > [!IMPORTANT] > This API cannot be used in applications that execute in the Windows Runtime. For more information, see [CRT functions not supported in Universal Windows Platform apps](../../cppcx/crt-functions-not-supported-in-universal-windows-platform-apps.md). diff --git a/docs/c-runtime-library/reference/chdir-wchdir.md b/docs/c-runtime-library/reference/chdir-wchdir.md index a2b48e38dad..76ee1bb0d00 100644 --- a/docs/c-runtime-library/reference/chdir-wchdir.md +++ b/docs/c-runtime-library/reference/chdir-wchdir.md @@ -29,9 +29,9 @@ int _wchdir( *`dirname`*\ Path of new working directory. -## Return Value +## Return value -These functions return a value of 0 if successful. A return value of -1 indicates failure. If the specified path couldn't be found, **`errno`** is set to **`ENOENT`**. If *`dirname`* is **`NULL`**, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, **`errno`** is set to **`EINVAL`** and the function returns -1. +These functions return a value of 0 if successful. A return value of -1 indicates failure. If the specified path couldn't be found, **`errno`** is set to **`ENOENT`**. If *`dirname`* is **`NULL`**, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, **`errno`** is set to **`EINVAL`** and the function returns -1. ## Remarks @@ -47,7 +47,7 @@ When you use the optional backslash character (**`\`**) in paths, you must place 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 Mapping: +### Generic-text routine mapping |`Tchar.h` routine|`_UNICODE and _MBCS` not defined|`_MBCS` defined|`_UNICODE` defined| |---------------------|--------------------------------------|--------------------|-----------------------| @@ -60,7 +60,7 @@ By default, this function's global state is scoped to the application. To change |**`_chdir`**|``|``| |**`_wchdir`**|`` or ``|``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -123,7 +123,7 @@ Directory of c:\windows ## See also -[Directory Control](../../c-runtime-library/directory-control.md)\ +[Directory control](../directory-control.md)\ [`_mkdir`, `_wmkdir`](mkdir-wmkdir.md)\ [`_rmdir`, `_wrmdir`](rmdir-wrmdir.md)\ [`system`, `_wsystem`](system-wsystem.md) diff --git a/docs/c-runtime-library/reference/chdir.md b/docs/c-runtime-library/reference/chdir.md index ded2bd685a4..7f054ae750c 100644 --- a/docs/c-runtime-library/reference/chdir.md +++ b/docs/c-runtime-library/reference/chdir.md @@ -12,9 +12,9 @@ ms.assetid: a65275a1-41e4-46be-83a5-167dfacb62a0 --- # chdir -The Microsoft-implemented POSIX function name `chdir` is a deprecated alias for the [_chdir](chdir-wchdir.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. +The Microsoft-implemented POSIX function name `chdir` is a deprecated alias for the [`_chdir`](chdir-wchdir.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. -We recommend you use [_chdir](chdir-wchdir.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). +We recommend you use [`_chdir`](chdir-wchdir.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). > [!IMPORTANT] > This API cannot be used in applications that execute in the Windows Runtime. For more information, see [CRT functions not supported in Universal Windows Platform apps](../../cppcx/crt-functions-not-supported-in-universal-windows-platform-apps.md). diff --git a/docs/c-runtime-library/reference/chdrive.md b/docs/c-runtime-library/reference/chdrive.md index 682d0fdd764..ccc85a1b864 100644 --- a/docs/c-runtime-library/reference/chdrive.md +++ b/docs/c-runtime-library/reference/chdrive.md @@ -27,16 +27,16 @@ int _chdrive( ### Parameters -*drive*
+*`drive`*\ An integer from 1 through 26 that specifies the current working drive (1=A, 2=B, and so forth). -## Return Value +## Return value Zero (0) if the current working drive was changed successfully; otherwise, -1. ## Remarks -If *drive* isn't in the range from 1 through 26, the invalid-parameter handler is invoked as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, the **_chdrive** function returns -1, **errno** is set to **EACCES**, and **_doserrno** is set to **ERROR_INVALID_DRIVE**. +If *`drive`* isn't in the range from 1 through 26, the invalid-parameter handler is invoked as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, the **_chdrive** function returns -1, **errno** is set to **EACCES**, and **_doserrno** is set to **ERROR_INVALID_DRIVE**. The **_chdrive** function isn't thread-safe because it depends on the **SetCurrentDirectory** function, which is itself not thread-safe. To use **_chdrive** safely in a multi-threaded application, you must provide your own thread synchronization. For more information, see [SetCurrentDirectory](/windows/win32/api/winbase/nf-winbase-setcurrentdirectory). @@ -50,19 +50,19 @@ By default, this function's global state is scoped to the application. To change |-------------|---------------------| |**_chdrive**|\| -For more information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more information, see [Compatibility](../compatibility.md). ## Example -See the example for [_getdrive](getdrive.md). +See the example for [`_getdrive`](getdrive.md). ## See also -[Directory Control](../../c-runtime-library/directory-control.md)
-[_chdir, _wchdir](chdir-wchdir.md)
-[_fullpath, _wfullpath](fullpath-wfullpath.md)
-[_getcwd, _wgetcwd](getcwd-wgetcwd.md)
-[_getdrive](getdrive.md)
-[_mkdir, _wmkdir](mkdir-wmkdir.md)
-[_rmdir, _wrmdir](rmdir-wrmdir.md)
-[system, _wsystem](system-wsystem.md)
+[Directory control](../directory-control.md)\ +[`_chdir`, `_wchdir`](chdir-wchdir.md)\ +[`_fullpath`, `_wfullpath`](fullpath-wfullpath.md)\ +[`_getcwd`, `_wgetcwd`](getcwd-wgetcwd.md)\ +[`_getdrive`](getdrive.md)\ +[`_mkdir`, `_wmkdir`](mkdir-wmkdir.md)\ +[`_rmdir`, `_wrmdir`](rmdir-wrmdir.md)\ +[`system`, `_wsystem`](system-wsystem.md) diff --git a/docs/c-runtime-library/reference/chgsign-chgsignf-chgsignl.md b/docs/c-runtime-library/reference/chgsign-chgsignf-chgsignl.md index 96007ca53f7..c057b489d6e 100644 --- a/docs/c-runtime-library/reference/chgsign-chgsignf-chgsignl.md +++ b/docs/c-runtime-library/reference/chgsign-chgsignf-chgsignl.md @@ -30,12 +30,12 @@ long double _chgsignl( ### Parameters -*x*
+*`x`*\ The floating-point value to be changed. -## Return Value +## Return value -The **_chgsign** functions return a value that's equal to the floating-point argument *x*, but with its sign reversed. There's no error return. +The **_chgsign** functions return a value that's equal to the floating-point argument *`x`*, but with its sign reversed. There's no error return. ## Requirements @@ -44,10 +44,10 @@ The **_chgsign** functions return a value that's equal to the floating-point arg |**_chgsign**|\| |**_chgsignf**, **_chgsignl**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Floating-Point Support](../../c-runtime-library/floating-point-support.md)
-[fabs, fabsf, fabsl](fabs-fabsf-fabsl.md)
-[copysign, copysignf, copysignl, _copysign, _copysignf, _copysignl](copysign-copysignf-copysignl-copysign-copysignf-copysignl.md)
+[Math and floating-point support](../floating-point-support.md)\ +[`fabs`, `fabsf`, `fabsl`](fabs-fabsf-fabsl.md)\ +[`copysign`, `copysignf`, `copysignl`, `_copysign`, `_copysignf`, `_copysignl`](copysign-copysignf-copysignl-copysign-copysignf-copysignl.md) diff --git a/docs/c-runtime-library/reference/chmod-wchmod.md b/docs/c-runtime-library/reference/chmod-wchmod.md index 8972c69b0b4..f452fed350f 100644 --- a/docs/c-runtime-library/reference/chmod-wchmod.md +++ b/docs/c-runtime-library/reference/chmod-wchmod.md @@ -23,19 +23,19 @@ int _wchmod( const wchar_t *filename, int pmode ); ### Parameters -*filename*
+*`filename`*\ Name of the existing file. -*pmode*
+*`pmode`*\ Permission setting for the file. -## Return Value +## Return value These functions return 0 if the permission setting is successfully changed. A return value of -1 indicates failure. If the specified file couldn't be found, **errno** is set to **ENOENT**; if a parameter is invalid, **errno** is set to **EINVAL**. ## Remarks -The **_chmod** function changes the permission setting of the file specified by *filename*. The permission setting controls the read and write access to the file. The integer expression *pmode* contains one or both of the following manifest constants, defined in SYS\Stat.h. +The **_chmod** function changes the permission setting of the file specified by *`filename`*. The permission setting controls the read and write access to the file. The integer expression *`pmode`* contains one or both of the following manifest constants, defined in SYS\Stat.h. | *`pmode`* | Meaning | |-|-| @@ -45,13 +45,13 @@ The **_chmod** function changes the permission setting of the file specified by When both constants are given, they're joined with the bitwise or operator (**`|`**). If write permission isn't given, the file is read-only. Note that all files are always readable; it isn't possible to give write-only permission. Thus, the modes `_S_IWRITE` and `_S_IREAD | _S_IWRITE` are equivalent. -**_wchmod** is a wide-character version of **_chmod**; the *filename* argument to **_wchmod** is a wide-character string. **_wchmod** and **_chmod** behave identically otherwise. +**_wchmod** is a wide-character version of **_chmod**; the *`filename`* argument to **_wchmod** is a wide-character string. **_wchmod** and **_chmod** behave identically otherwise. -This function validates its parameters. If *pmode* isn't a combination of one of the manifest constants or incorporates an alternate set of constants, the function simply ignores them. If *filename* is **`NULL`**, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, **errno** is set to **EINVAL** and the function returns -1. +This function validates its parameters. If *`pmode`* isn't a combination of one of the manifest constants or incorporates an alternate set of constants, the function simply ignores them. If *`filename`* is **`NULL`**, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, **errno** is set to **EINVAL** and the function returns -1. By default, this function's global state is scoped to the application. To change it, 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| |---------------------|--------------------------------------|--------------------|-----------------------| @@ -64,7 +64,7 @@ By default, this function's global state is scoped to the application. To change |**_chmod**|\|\, \, \| |**_wchmod**|\ or \|\, \, \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -144,9 +144,9 @@ Mode set to read/write ## See also -[File Handling](../../c-runtime-library/file-handling.md)
-[_access, _waccess](access-waccess.md)
-[_creat, _wcreat](creat-wcreat.md)
-[_fstat, _fstat32, _fstat64, _fstati64, _fstat32i64, _fstat64i32](fstat-fstat32-fstat64-fstati64-fstat32i64-fstat64i32.md)
-[_open, _wopen](open-wopen.md)
-[_stat, _wstat Functions](stat-functions.md)
+[File handling](../file-handling.md)\ +[`_access`, `_waccess`](access-waccess.md)\ +[`_creat`, `_wcreat`](creat-wcreat.md)\ +[`_fstat`, `_fstat32`, `_fstat64`, `_fstati64`, `_fstat32i64`, `_fstat64i32`](fstat-fstat32-fstat64-fstati64-fstat32i64-fstat64i32.md)\ +[`_open`, `_wopen`](open-wopen.md)\ +[`_stat`, `_wstat` functions](stat-functions.md) diff --git a/docs/c-runtime-library/reference/chmod.md b/docs/c-runtime-library/reference/chmod.md index 513152cf1fd..ba6663269b0 100644 --- a/docs/c-runtime-library/reference/chmod.md +++ b/docs/c-runtime-library/reference/chmod.md @@ -12,6 +12,6 @@ ms.assetid: c3294722-2194-4ff4-ac87-d69f155e279b --- # chmod -The Microsoft-implemented POSIX function name `chmod` is a deprecated alias for the [_chmod](chmod-wchmod.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. +The Microsoft-implemented POSIX function name `chmod` is a deprecated alias for the [`_chmod`](chmod-wchmod.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. -We recommend you use [_chmod](chmod-wchmod.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). +We recommend you use [`_chmod`](chmod-wchmod.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). diff --git a/docs/c-runtime-library/reference/chsize-s.md b/docs/c-runtime-library/reference/chsize-s.md index b3f53734429..03469bbddee 100644 --- a/docs/c-runtime-library/reference/chsize-s.md +++ b/docs/c-runtime-library/reference/chsize-s.md @@ -12,7 +12,7 @@ ms.assetid: d88d2e94-6e3b-42a5-8631-16ac4d82fa38 --- # _chsize_s -Changes the size of a file. This function is a version of [_chsize](chsize.md) with security enhancements as described in [Security Features in the CRT](../../c-runtime-library/security-features-in-the-crt.md). +Changes the size of a file. This function is a version of [`_chsize`](chsize.md) with security enhancements as described in [Security features in the CRT](../security-features-in-the-crt.md). ## Syntax @@ -25,17 +25,17 @@ errno_t _chsize_s( ### Parameters -*`fd`*
+*`fd`*\ File descriptor referring to an open file. -*`size`*
+*`size`*\ New length of the file in bytes. -## Return Value +## Return value **_chsize_s** returns the value 0 if the file size is successfully changed. A nonzero return value indicates an error: the return value is **EACCES** if the specified file is locked against access, **EBADF** if the specified file is read-only or the descriptor is invalid, **ENOSPC** if no space is left on the device, or **EINVAL** if size is less than zero. **errno** is set to the same value. -For more information about these 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 these and other return codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks @@ -43,7 +43,7 @@ The **_chsize_s** function extends or truncates the file associated with *`fd`* **_chsize_s** takes a 64-bit integer as the file size, and therefore can handle file sizes greater than 4 GB. **_chsize** is limited to 32-bit file sizes. -This function validates its parameters. If *`fd`* isn't a valid file descriptor or size is less than zero, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). +This function validates its parameters. If *`fd`* isn't a valid file descriptor or size is less than zero, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.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). @@ -53,12 +53,12 @@ By default, this function's global state is scoped to the application. To change |-------------|---------------------|---------------------| |**_chsize_s**|\|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[File Handling](../../c-runtime-library/file-handling.md)
-[_chsize](chsize.md)
-[_close](close.md)
-[_creat, _wcreat](creat-wcreat.md)
-[_open, _wopen](open-wopen.md)
+[File handling](../file-handling.md)\ +[`_chsize`](chsize.md)\ +[`_close`](close.md)\ +[`_creat`, `_wcreat`](creat-wcreat.md)\ +[`_open`, `_wopen`](open-wopen.md) diff --git a/docs/c-runtime-library/reference/chsize.md b/docs/c-runtime-library/reference/chsize.md index ff530bdab6f..133865296cc 100644 --- a/docs/c-runtime-library/reference/chsize.md +++ b/docs/c-runtime-library/reference/chsize.md @@ -12,7 +12,7 @@ ms.assetid: b3e881c5-7b27-4837-a3d4-c51591ab10ff --- # _chsize -Changes the size of a file. A more secure version is available; see [_chsize_s](chsize-s.md). +Changes the size of a file. A more secure version is available; see [`_chsize_s`](chsize-s.md). ## Syntax @@ -25,23 +25,23 @@ int _chsize( ### Parameters -*`fd`*
+*`fd`*\ File descriptor referring to an open file. -*`size`*
+*`size`*\ New length of the file in bytes. -## Return Value +## Return value **_chsize** returns the value 0 if the file size is successfully changed. A return value of -1 indicates an error: **errno** is set to **EACCES** if the specified file is read-only or the specified file is locked against access, to **EBADF** if the descriptor is invalid, **ENOSPC** if no space is left on the device, or **EINVAL** if *`size`* is less than zero. -For more information about return codes, see [`_doserrno`, `errno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). +For more information about return codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks The **_chsize** function extends or truncates the file associated with *`fd`* to the length specified by *`size`*. The file must be open in a mode that permits writing. Null characters ('\0') are appended if the file is extended. If the file is truncated, all data from the end of the shortened file to the original length of the file is lost. -This function validates its parameters. If *`size`* is less than zero or *`fd`* is a bad file descriptor, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). +This function validates its parameters. If *`size`* is less than zero or *`fd`* is a bad file descriptor, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.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). @@ -51,7 +51,7 @@ By default, this function's global state is scoped to the application. To change |-------------|---------------------|---------------------| |**_chsize**|\|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -95,7 +95,7 @@ File length after: 329678 ## See also -[File Handling](../../c-runtime-library/file-handling.md)
-[_close](close.md)
-[_sopen, _wsopen](sopen-wsopen.md)
-[_open, _wopen](open-wopen.md)
+[File handling](../file-handling.md)\ +[`_close`](close.md)\ +[`_sopen`, `_wsopen`](sopen-wsopen.md)\ +[`_open`, `_wopen`](open-wopen.md) diff --git a/docs/c-runtime-library/reference/cimag-cimagf-cimagl.md b/docs/c-runtime-library/reference/cimag-cimagf-cimagl.md index 8774981901d..60b42b9df38 100644 --- a/docs/c-runtime-library/reference/cimag-cimagf-cimagl.md +++ b/docs/c-runtime-library/reference/cimag-cimagf-cimagl.md @@ -28,18 +28,18 @@ long double cimag( _Lcomplex z ); // C++ only ### Parameters -*z*\ +*`z`*\ A complex number. -## Return Value +## Return value -The imaginary part of *z*. +The imaginary part of *`z`*. ## Remarks Because C++ allows overloading, you can call overloads of **cimag** that take **_Fcomplex** or **_Lcomplex** values, and return **`float`** or **`long double`** values. In a C program, unless you're using the \ macro to call this function, **cimag** always takes a **_Dcomplex** value and returns a **`double`** value. -If you use the \ `cimag()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../../c-runtime-library/tgmath.md) for details. +If you use the \ `cimag()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../tgmath.md) for details. ## Requirements @@ -48,14 +48,14 @@ If you use the \ `cimag()` macro, the type of the argument determines |**cimag**, **cimagf**, **cimagl**|\|\| |**cimag** macro | \ || -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Alphabetical Function Reference](crt-alphabetical-function-reference.md)
-[norm, normf, norml](norm-normf-norml1.md)
-[creal, crealf, creall](creal-crealf-creall.md)
-[cproj, cprojf, cprojl](cproj-cprojf-cprojl.md)
-[conj, conjf, conjl](conj-conjf-conjl.md)
-[carg, cargf, cargl](carg-cargf-cargl.md)
-[cabs, cabsf, cabsl](cabs-cabsf-cabsl.md)
+[Alphabetical function reference](crt-alphabetical-function-reference.md)\ +[`norm`, `normf`, `norml`](norm-normf-norml1.md)\ +[`creal`, `crealf`, `creall`](creal-crealf-creall.md)\ +[`cproj`, `cprojf`, `cprojl`](cproj-cprojf-cprojl.md)\ +[`conj`, `conjf`, `conjl`](conj-conjf-conjl.md)\ +[`carg`, `cargf`, `cargl`](carg-cargf-cargl.md)\ +[`cabs`, `cabsf`, `cabsl`](cabs-cabsf-cabsl.md) diff --git a/docs/c-runtime-library/reference/clear87-clearfp.md b/docs/c-runtime-library/reference/clear87-clearfp.md index be875d595f8..1b583abab00 100644 --- a/docs/c-runtime-library/reference/clear87-clearfp.md +++ b/docs/c-runtime-library/reference/clear87-clearfp.md @@ -21,7 +21,7 @@ unsigned int _clear87( void ); unsigned int _clearfp( void ); ``` -## Return Value +## Return value The bits in the value returned indicate the floating-point status before the call to **_clear87** or **_clearfp**. For a complete definition of the bits returned by **_clear87**, see Float.h. Many of the math library functions modify the 8087/80287 status word, with unpredictable results. Return values from **_clear87** and **_status87** become more reliable as fewer floating-point operations are performed between known states of the floating-point status word. @@ -40,7 +40,7 @@ These functions are deprecated when compiling with [/clr (Common Language Runtim |**_clear87**|\| |**_clearfp**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -83,6 +83,6 @@ Status: 80000 - denormal ## See also -[Floating-Point Support](../../c-runtime-library/floating-point-support.md)
-[_control87, _controlfp, \__control87_2](control87-controlfp-control87-2.md)
-[_status87, _statusfp, _statusfp2](status87-statusfp-statusfp2.md)
+[Math and floating-point support](../floating-point-support.md)\ +[`_control87`, `_controlfp`, `__control87_2`](control87-controlfp-control87-2.md)\ +[`_status87`, `_statusfp`, `_statusfp2`](status87-statusfp-statusfp2.md) diff --git a/docs/c-runtime-library/reference/clearerr-s.md b/docs/c-runtime-library/reference/clearerr-s.md index 4fb7dcd0942..cb4b92159db 100644 --- a/docs/c-runtime-library/reference/clearerr-s.md +++ b/docs/c-runtime-library/reference/clearerr-s.md @@ -12,7 +12,7 @@ ms.assetid: b74d014d-b7a8-494a-a330-e5ffd5614772 --- # clearerr_s -Resets the error indicator for a stream. This function is a version of [clearerr](clearerr.md) with security enhancements as described in [Security Features in the CRT](../../c-runtime-library/security-features-in-the-crt.md). +Resets the error indicator for a stream. This function is a version of [`clearerr`](clearerr.md) with security enhancements as described in [Security features in the CRT](../security-features-in-the-crt.md). ## Syntax @@ -24,18 +24,18 @@ errno_t clearerr_s( ### Parameters -*stream*
+*`stream`*\ Pointer to **FILE** structure -## Return Value +## Return value -Zero if successful; **EINVAL** if *stream* is **NULL**. +Zero if successful; **EINVAL** if *`stream`* is **NULL**. ## Remarks -The **clearerr_s** function resets the error indicator and end-of-file indicator for *stream*. Error indicators aren't automatically cleared; once the error indicator for a specified stream is set, operations on that stream continue to return an error value until **clearerr_s**, **clearerr**, [fseek](fseek-fseeki64.md), **fsetpos**, or [rewind](rewind.md) is called. +The **clearerr_s** function resets the error indicator and end-of-file indicator for *`stream`*. Error indicators aren't automatically cleared; once the error indicator for a specified stream is set, operations on that stream continue to return an error value until **clearerr_s**, **clearerr**, [`fseek`](fseek-fseeki64.md), **fsetpos**, or [`rewind`](rewind.md) is called. -If *stream* is **NULL**, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, this function sets **errno** to **EINVAL** and returns **EINVAL**. +If *`stream`* is **NULL**, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, this function sets **errno** to **EINVAL** and returns **EINVAL**. 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). @@ -45,7 +45,7 @@ By default, this function's global state is scoped to the application. To change |-------------|---------------------| |**clearerr_s**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -104,10 +104,10 @@ Will input cause an error? n ## See also -[Error Handling](../../c-runtime-library/error-handling-crt.md)
-[Stream I/O](../../c-runtime-library/stream-i-o.md)
-[clearerr](clearerr.md)
-[_eof](eof.md)
-[feof](feof.md)
-[ferror](ferror.md)
-[perror, _wperror](perror-wperror.md)
+[Error handling](../error-handling-crt.md)\ +[Stream I/O](../stream-i-o.md)\ +[`clearerr`](clearerr.md)\ +[`_eof`](eof.md)\ +[`feof`](feof.md)\ +[`ferror`](ferror.md)\ +[`perror`, `_wperror`](perror-wperror.md) diff --git a/docs/c-runtime-library/reference/clearerr.md b/docs/c-runtime-library/reference/clearerr.md index f97d064636d..d7b04c12662 100644 --- a/docs/c-runtime-library/reference/clearerr.md +++ b/docs/c-runtime-library/reference/clearerr.md @@ -12,7 +12,7 @@ ms.assetid: a9711cd4-3335-43d4-a018-87bbac5b3bac --- # clearerr -Resets the error indicator for a stream. A more secure version of this function is available; see [clearerr_s](clearerr-s.md). +Resets the error indicator for a stream. A more secure version of this function is available; see [`clearerr_s`](clearerr-s.md). ## Syntax @@ -24,16 +24,16 @@ void clearerr( ### Parameters -*stream*
+*`stream`*\ Pointer to **FILE** structure. ## Remarks -The **clearerr** function resets the error indicator and end-of-file indicator for *stream*. Error indicators aren't automatically cleared; once the error indicator for a specified stream is set, operations on that stream continue to return an error value until **clearerr**, [fseek](fseek-fseeki64.md), **fsetpos**, or [rewind](rewind.md) is called. +The **clearerr** function resets the error indicator and end-of-file indicator for *`stream`*. Error indicators aren't automatically cleared; once the error indicator for a specified stream is set, operations on that stream continue to return an error value until **clearerr**, [`fseek`](fseek-fseeki64.md), **fsetpos**, or [`rewind`](rewind.md) is called. -If *stream* is **NULL**, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, this function sets **errno** to **EINVAL** and returns. For more information on **errno** and error codes, see [errno Constants](../../c-runtime-library/errno-constants.md). +If *`stream`* is **NULL**, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, this function sets **errno** to **EINVAL** and returns. For more information on **errno** and error codes, see [`errno` constants](../errno-constants.md). -A more secure version of this function is available; see [clearerr_s](clearerr-s.md). +A more secure version of this function is available; see [`clearerr_s`](clearerr-s.md). By default, this function's global state is scoped to the application. To change this behavior, see [Global state in the CRT](../global-state.md). @@ -43,7 +43,7 @@ By default, this function's global state is scoped to the application. To change |-------------|---------------------| |**clearerr**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -95,9 +95,9 @@ No read error ## See also -[Error Handling](../../c-runtime-library/error-handling-crt.md)
-[Stream I/O](../../c-runtime-library/stream-i-o.md)
-[_eof](eof.md)
-[feof](feof.md)
-[ferror](ferror.md)
-[perror, _wperror](perror-wperror.md)
+[Error handling](../error-handling-crt.md)\ +[Stream I/O](../stream-i-o.md)\ +[`_eof`](eof.md)\ +[`feof`](feof.md)\ +[`ferror`](ferror.md)\ +[`perror`, `_wperror`](perror-wperror.md) diff --git a/docs/c-runtime-library/reference/clock.md b/docs/c-runtime-library/reference/clock.md index a50169d8b94..94f4a125f50 100644 --- a/docs/c-runtime-library/reference/clock.md +++ b/docs/c-runtime-library/reference/clock.md @@ -19,7 +19,7 @@ Calculates the wall-clock time used by the calling process. clock_t clock( void ); ``` -## Return Value +## Return value The elapsed time since the CRT initialization at the start of the process, measured in **`CLOCKS_PER_SEC`** units per second. If the elapsed time is unavailable or has exceeded the maximum positive time that can be recorded as a **`clock_t`** type, the function returns the value `(clock_t)(-1)`. @@ -35,7 +35,7 @@ Given enough time, the value returned by **`clock`** can exceed the maximum posi |-------------|---------------------| |**`clock`**|``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -90,6 +90,6 @@ Time to do 600000000 empty loops is 1.354 seconds ## See also -[Time Management](../../c-runtime-library/time-management.md)\ +[Time management](../time-management.md)\ [`difftime`, `_difftime32`, `_difftime64`](difftime-difftime32-difftime64.md)\ [`time`, `_time32`, `_time64`](time-time32-time64.md) diff --git a/docs/c-runtime-library/reference/clog-clogf-clogl.md b/docs/c-runtime-library/reference/clog-clogf-clogl.md index 33d2a9c0f5f..b5bca85f91e 100644 --- a/docs/c-runtime-library/reference/clog-clogf-clogl.md +++ b/docs/c-runtime-library/reference/clog-clogf-clogl.md @@ -36,12 +36,12 @@ _Lcomplex clogl( ### Parameters -*z*\ +*`z`*\ The base of the logarithm. -## Return Value +## Return value -The natural logarithm of *z*. The result is unbounded along the real axis and in the interval [-iπ, +iπ] along the imaginary axis. +The natural logarithm of *`z`*. The result is unbounded along the real axis and in the interval [-iπ, +iπ] along the imaginary axis. The possible return values are: @@ -63,11 +63,11 @@ Because C++ allows overloading, you can call overloads of **clog** that take and |-------------|--------------|------------------| |**clog**, **clogf**, **clogl**|\|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Alphabetical Function Reference](crt-alphabetical-function-reference.md)
-[cexp, cexpf, cexpl](cexp-cexpf-cexpl.md)
-[cpow, cpowf, cpowl](cpow-cpowf-cpowl.md)
-[clog10, clog10f, clog10l](clog10-clog10f-clog10l.md)
+[Alphabetical function reference](crt-alphabetical-function-reference.md)\ +[`cexp`, `cexpf`, `cexpl`](cexp-cexpf-cexpl.md)\ +[`cpow`, `cpowf`, `cpowl`](cpow-cpowf-cpowl.md)\ +[`clog10`, `clog10f`, `clog10l`](clog10-clog10f-clog10l.md) diff --git a/docs/c-runtime-library/reference/clog10-clog10f-clog10l.md b/docs/c-runtime-library/reference/clog10-clog10f-clog10l.md index ca65bce2c49..8e2a8d53c71 100644 --- a/docs/c-runtime-library/reference/clog10-clog10f-clog10l.md +++ b/docs/c-runtime-library/reference/clog10-clog10f-clog10l.md @@ -29,10 +29,10 @@ _Lcomplex clog10( _Lcomplex z ); // C++ only ### Parameters -*z*
+*`z`*\ The base of the logarithm. -## Return Value +## Return value The possible return values are: @@ -54,11 +54,11 @@ Because C++ allows overloading, you can call overloads of **clog10** that take a |-------------|--------------|------------------| |**clog10**, **clog10f**, **clogl**|\|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Alphabetical Function Reference](crt-alphabetical-function-reference.md)
-[cexp, cexpf, cexpl](cexp-cexpf-cexpl.md)
-[cpow, cpowf, cpowl](cpow-cpowf-cpowl.md)
-[clog, clogf, clogl](clog-clogf-clogl.md)
+[Alphabetical function reference](crt-alphabetical-function-reference.md)\ +[`cexp`, `cexpf`, `cexpl`](cexp-cexpf-cexpl.md)\ +[`cpow`, `cpowf`, `cpowl`](cpow-cpowf-cpowl.md)\ +[`clog`, `clogf`, `clogl`](clog-clogf-clogl.md) diff --git a/docs/c-runtime-library/reference/close.md b/docs/c-runtime-library/reference/close.md index 1d52bdfb3ad..b0ceb6da971 100644 --- a/docs/c-runtime-library/reference/close.md +++ b/docs/c-runtime-library/reference/close.md @@ -24,10 +24,10 @@ int _close( ### Parameters -*`fd`*
+*`fd`*\ File descriptor referring to the open file. -## Return Value +## Return value **_close** returns 0 if the file was successfully closed. A return value of -1 indicates an error. @@ -37,7 +37,7 @@ The **_close** function closes the file associated with *`fd`*. The file descriptor and the underlying OS file handle are closed. Thus, it isn't necessary to call **CloseHandle** if the file was originally opened using the Win32 function **CreateFile** and converted to a file descriptor using **_open_osfhandle**. -This function validates its parameters. If *`fd`* is a bad file descriptor, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, the functions returns -1 and **errno** is set to **EBADF**. +This function validates its parameters. If *`fd`* is a bad file descriptor, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, the functions returns -1 and **errno** is set to **EBADF**. 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). @@ -47,17 +47,17 @@ By default, this function's global state is scoped to the application. To change |-------------|---------------------|---------------------| |**_close**|\|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example -See the example for [_open](open-wopen.md). +See the example for [`_open`](open-wopen.md). ## See also -[Low-Level I/O](../../c-runtime-library/low-level-i-o.md)
-[_chsize](chsize.md)
-[_creat, _wcreat](creat-wcreat.md)
-[_dup, _dup2](dup-dup2.md)
-[_open, _wopen](open-wopen.md)
-[_unlink, _wunlink](unlink-wunlink.md)
+[Low-level I/O](../low-level-i-o.md)\ +[`_chsize`](chsize.md)\ +[`_creat`, `_wcreat`](creat-wcreat.md)\ +[`_dup`, `_dup2`](dup-dup2.md)\ +[`_open`, `_wopen`](open-wopen.md)\ +[`_unlink`, `_wunlink`](unlink-wunlink.md) diff --git a/docs/c-runtime-library/reference/cmulcc-fcmulcc-lcmulcc.md b/docs/c-runtime-library/reference/cmulcc-fcmulcc-lcmulcc.md index 1235fa925e2..8d89ae58951 100644 --- a/docs/c-runtime-library/reference/cmulcc-fcmulcc-lcmulcc.md +++ b/docs/c-runtime-library/reference/cmulcc-fcmulcc-lcmulcc.md @@ -23,15 +23,15 @@ _Lcomplex _LCmulcc( _Lcomplex x, _Lcomplex y ); ### Parameters -*x*
+*`x`*\ One of the complex operands to multiply. -*y*
+*`y`*\ The other complex operand to multiply. -## Return Value +## Return value -A **_Dcomplex**, **_Fcomplex**, or **_Lcomplex** structure that represents the complex product of the complex numbers *x* and *y*. +A **_Dcomplex**, **_Fcomplex**, or **_Lcomplex** structure that represents the complex product of the complex numbers *`x`* and *`y`*. ## Remarks @@ -43,17 +43,17 @@ Because the built-in arithmetic operators don't work on the Microsoft implementa |-------------|--------------|------------------| |**_Cmulcc**, **_FCmulcc**, **_LCmulcc**|\|\| -These functions are Microsoft-specific. The types **_Dcomplex**, **_Fcomplex**, and **_Lcomplex** are Microsoft-specific equivalents to the unimplemented C99 native types **double _Complex**, **float _Complex**, and **long double _Complex**, respectively. For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +These functions are Microsoft-specific. The types **_Dcomplex**, **_Fcomplex**, and **_Lcomplex** are Microsoft-specific equivalents to the unimplemented C99 native types **double _Complex**, **float _Complex**, and **long double _Complex**, respectively. For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Alphabetical Function Reference](crt-alphabetical-function-reference.md)
-[_Cbuild, _FCbuild, _LCbuild](cbuild-fcbuild-lcbuild.md)
-[_Cmulcr, _FCmulcr, _LCmulcr](cmulcr-fcmulcr-lcmulcr.md)
-[norm, normf, norml](norm-normf-norml1.md)
-[cproj, cprojf, cprojl](cproj-cprojf-cprojl.md)
-[conj, conjf, conjl](conj-conjf-conjl.md)
-[creal, crealf, creall](creal-crealf-creall.md)
-[cimag, cimagf, cimagl](cimag-cimagf-cimagl.md)
-[carg, cargf, cargl](carg-cargf-cargl.md)
-[cabs, cabsf, cabsl](cabs-cabsf-cabsl.md)
+[Alphabetical function reference](crt-alphabetical-function-reference.md)\ +[`_Cbuild`, `_FCbuild`, `_LCbuild`](cbuild-fcbuild-lcbuild.md)\ +[`_Cmulcr`, `_FCmulcr`, `_LCmulcr`](cmulcr-fcmulcr-lcmulcr.md)\ +[`norm`, `normf`, `norml`](norm-normf-norml1.md)\ +[`cproj`, `cprojf`, `cprojl`](cproj-cprojf-cprojl.md)\ +[`conj`, `conjf`, `conjl`](conj-conjf-conjl.md)\ +[`creal`, `crealf`, `creall`](creal-crealf-creall.md)\ +[`cimag`, `cimagf`, `cimagl`](cimag-cimagf-cimagl.md)\ +[`carg`, `cargf`, `cargl`](carg-cargf-cargl.md)\ +[`cabs`, `cabsf`, `cabsl`](cabs-cabsf-cabsl.md) diff --git a/docs/c-runtime-library/reference/cmulcr-fcmulcr-lcmulcr.md b/docs/c-runtime-library/reference/cmulcr-fcmulcr-lcmulcr.md index f154521b73f..733c6da26d8 100644 --- a/docs/c-runtime-library/reference/cmulcr-fcmulcr-lcmulcr.md +++ b/docs/c-runtime-library/reference/cmulcr-fcmulcr-lcmulcr.md @@ -23,15 +23,15 @@ _Lcomplex _LCmulcr( _Lcomplex x, long double y ); ### Parameters -*x*
+*`x`*\ One of the complex operands to multiply. -*y*
+*`y`*\ The floating-point operand to multiply. -## Return Value +## Return value -A **_Dcomplex**, **_Fcomplex**, or **_Lcomplex** structure that represents the complex product of the complex number *x* and floating-point number *y*. +A **_Dcomplex**, **_Fcomplex**, or **_Lcomplex** structure that represents the complex product of the complex number *`x`* and floating-point number *`y`*. ## Remarks @@ -43,17 +43,17 @@ Because the built-in arithmetic operators don't work on the Microsoft implementa |-------------|--------------|------------------| |**_Cmulcr**, **_FCmulcr**, **_LCmulcr**|\|\| -These functions are Microsoft-specific. The types **_Dcomplex**, **_Fcomplex**, and **_Lcomplex** are Microsoft-specific equivalents to the unimplemented C99 native types **double _Complex**, **float _Complex**, and **long double _Complex**, respectively. For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +These functions are Microsoft-specific. The types **_Dcomplex**, **_Fcomplex**, and **_Lcomplex** are Microsoft-specific equivalents to the unimplemented C99 native types **double _Complex**, **float _Complex**, and **long double _Complex**, respectively. For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Alphabetical Function Reference](crt-alphabetical-function-reference.md)
-[_Cbuild, _FCbuild, _LCbuild](cbuild-fcbuild-lcbuild.md)
-[_Cmulcc, _FCmulcc, _LCmulcc](cmulcc-fcmulcc-lcmulcc.md)
-[norm, normf, norml](norm-normf-norml1.md)
-[cproj, cprojf, cprojl](cproj-cprojf-cprojl.md)
-[conj, conjf, conjl](conj-conjf-conjl.md)
-[creal, crealf, creall](creal-crealf-creall.md)
-[cimag, cimagf, cimagl](cimag-cimagf-cimagl.md)
-[carg, cargf, cargl](carg-cargf-cargl.md)
-[cabs, cabsf, cabsl](cabs-cabsf-cabsl.md)
+[Alphabetical function reference](crt-alphabetical-function-reference.md)\ +[`_Cbuild`, `_FCbuild`, `_LCbuild`](cbuild-fcbuild-lcbuild.md)\ +[`_Cmulcc`, `_FCmulcc`, `_LCmulcc`](cmulcc-fcmulcc-lcmulcc.md)\ +[`norm`, `normf`, `norml`](norm-normf-norml1.md)\ +[`cproj`, `cprojf`, `cprojl`](cproj-cprojf-cprojl.md)\ +[`conj`, `conjf`, `conjl`](conj-conjf-conjl.md)\ +[`creal`, `crealf`, `creall`](creal-crealf-creall.md)\ +[`cimag`, `cimagf`, `cimagl`](cimag-cimagf-cimagl.md)\ +[`carg`, `cargf`, `cargl`](carg-cargf-cargl.md)\ +[`cabs`, `cabsf`, `cabsl`](cabs-cabsf-cabsl.md) diff --git a/docs/c-runtime-library/reference/commit.md b/docs/c-runtime-library/reference/commit.md index 9dd0cee87ed..469318918fb 100644 --- a/docs/c-runtime-library/reference/commit.md +++ b/docs/c-runtime-library/reference/commit.md @@ -24,10 +24,10 @@ int _commit( ### Parameters -*`fd`*
+*`fd`*\ File descriptor referring to the open file. -## Return Value +## Return value **_commit** returns 0 if the file was successfully flushed to disk. A return value of -1 indicates an error. @@ -35,7 +35,7 @@ File descriptor referring to the open file. The **_commit** function forces the operating system to write the file associated with *`fd`* to disk. This call ensures that the specified file is flushed immediately, not at the operating system's discretion. -If *`fd`* is an invalid file descriptor, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, the function returns -1 and **errno** is set to **EBADF**. +If *`fd`* is an invalid file descriptor, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, the function returns -1 and **errno** is set to **EBADF**. 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). @@ -45,12 +45,12 @@ By default, this function's global state is scoped to the application. To change |-------------|---------------------|----------------------| |**_commit**|\|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Low-Level I/O](../../c-runtime-library/low-level-i-o.md)
-[_creat, _wcreat](creat-wcreat.md)
-[_open, _wopen](open-wopen.md)
-[_read](read.md)
-[_write](write.md)
+[Low-level I/O](../low-level-i-o.md)\ +[`_creat`, `_wcreat`](creat-wcreat.md)\ +[`_open`, `_wopen`](open-wopen.md)\ +[`_read`](read.md)\ +[`_write`](write.md) diff --git a/docs/c-runtime-library/reference/configthreadlocale.md b/docs/c-runtime-library/reference/configthreadlocale.md index 394bc1031df..83d92dfc61c 100644 --- a/docs/c-runtime-library/reference/configthreadlocale.md +++ b/docs/c-runtime-library/reference/configthreadlocale.md @@ -25,7 +25,7 @@ int _configthreadlocale( int per_thread_locale_type ); *`per_thread_locale_type`*\ The option to set. One of the options listed in the following table. -## Return Value +## Return value The previous per-thread locale status (**`_DISABLE_PER_THREAD_LOCALE`** or **`_ENABLE_PER_THREAD_LOCALE`**), or -1 on failure. @@ -43,7 +43,7 @@ These functions affect the behavior of **`setlocale`**, **`_tsetlocale`**, **`_w If you use **`_configthreadlocale`** to enable a per-thread locale, set the preferred locale in that thread immediately afterward by a call to **`setlocale`** or **`_wsetlocale`**. -If *`per_thread_locale_type`* isn't one of the values listed in the table, this function invokes the invalid parameter handler, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, this function sets **`errno`** to **`EINVAL`** and returns -1. +If *`per_thread_locale_type`* isn't one of the values listed in the table, this function invokes the invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, this function sets **`errno`** to **`EINVAL`** and returns -1. By default, this function's global state is scoped to the application. To change this behavior, see [Global state in the CRT](../global-state.md). @@ -166,5 +166,5 @@ The time in German locale is: 'Mittwoch, 12. Mai 2004' [`setlocale`, `_wsetlocale`](setlocale-wsetlocale.md)\ [`_beginthread`, `_beginthreadex`](beginthread-beginthreadex.md)\ -[Locale](../../c-runtime-library/locale.md)\ +[Locale](../locale.md)\ [Multithreading and locales](../../parallel/multithreading-and-locales.md) diff --git a/docs/c-runtime-library/reference/conj-conjf-conjl.md b/docs/c-runtime-library/reference/conj-conjf-conjl.md index 55ad3569ffb..0a2491d63fa 100644 --- a/docs/c-runtime-library/reference/conj-conjf-conjl.md +++ b/docs/c-runtime-library/reference/conj-conjf-conjl.md @@ -37,18 +37,18 @@ _Lcomplex conjl( ### Parameters -*z*\ +*`z`*\ A complex number. -## Return Value +## Return value -The complex conjugate of *z*. The result has the same real and imaginary part as *z*, but with the opposite sign. +The complex conjugate of *`z`*. The result has the same real and imaginary part as *`z`*, but with the opposite sign. ## Remarks Because C++ allows overloading, you can call overloads of **conj** that take and return **_Fcomplex** and **_Lcomplex** values. In a C program, unless you're using the \ macro to call this function, **conj** always takes and returns a **_Dcomplex** value. -If you use the \ `conj()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../../c-runtime-library/tgmath.md) for details. +If you use the \ `conj()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../tgmath.md) for details. ## Requirements @@ -57,14 +57,14 @@ If you use the \ `conj()` macro, the type of the argument determines w |**conj**, **conjf**, **conjl**|\|\| |**conj** macro | \ || -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Alphabetical Function Reference](crt-alphabetical-function-reference.md)
-[norm, normf, norml](norm-normf-norml1.md)
-[creal, crealf, creall](creal-crealf-creall.md)
-[cproj, cprojf, cprojl](cproj-cprojf-cprojl.md)
-[cimag, cimagf, cimagl](cimag-cimagf-cimagl.md)
-[carg, cargf, cargl](carg-cargf-cargl.md)
-[cabs, cabsf, cabsl](cabs-cabsf-cabsl.md)
+[Alphabetical function reference](crt-alphabetical-function-reference.md)\ +[`norm`, `normf`, `norml`](norm-normf-norml1.md)\ +[`creal`, `crealf`, `creall`](creal-crealf-creall.md)\ +[`cproj`, `cprojf`, `cprojl`](cproj-cprojf-cprojl.md)\ +[`cimag`, `cimagf`, `cimagl`](cimag-cimagf-cimagl.md)\ +[`carg`, `cargf`, `cargl`](carg-cargf-cargl.md)\ +[`cabs`, `cabsf`, `cabsl`](cabs-cabsf-cabsl.md) diff --git a/docs/c-runtime-library/reference/control87-controlfp-control87-2.md b/docs/c-runtime-library/reference/control87-controlfp-control87-2.md index 039c90bf040..bcf99a697c8 100644 --- a/docs/c-runtime-library/reference/control87-controlfp-control87-2.md +++ b/docs/c-runtime-library/reference/control87-controlfp-control87-2.md @@ -87,7 +87,7 @@ The function **`__control87_2`** enables both the x87 and SSE2 floating-point un If you use **`__control87_2`** to set different values for the floating-point control words, then **`_control87`** or **`_controlfp`** might be unable to return a single control word to represent the state of both floating-point units. In such a case, these functions set the **`EM_AMBIGUOUS`** flag in the returned integer value to indicate an inconsistency between the two control words. The **`EM_AMBIGUOUS`** flag is a warning that the returned control word might not represent the state of both floating-point control words accurately. -On the ARM, ARM64, and x64 platforms, changing the infinity mode or the floating-point precision isn't supported. If the precision control mask is used on the x64 platform, the function raises an assertion, and the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). +On the ARM, ARM64, and x64 platforms, changing the infinity mode or the floating-point precision isn't supported. If the precision control mask is used on the x64 platform, the function raises an assertion, and the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). > [!NOTE] > **`__control87_2`** is not supported on the ARM, ARM64, or x64 platforms. If you use **`__control87_2`** and compile your program for the ARM, ARM64, or x64 platforms, the compiler generates an error. @@ -112,7 +112,7 @@ For the **`_MCW_EM`** mask, clearing the mask sets the exception, which allows t |-------------|---------------------| |**`_control87`**, **`_controlfp`**, **`_control87_2`**|``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -162,7 +162,7 @@ Default: 0x0009001f ## See also -[Floating-Point Support](../../c-runtime-library/floating-point-support.md)\ +[Math and floating-point support](../floating-point-support.md)\ [`_clear87`, `_clearfp`](clear87-clearfp.md)\ [`_status87`, `_statusfp`, `_statusfp2`](status87-statusfp-statusfp2.md)\ [`_controlfp_s`](controlfp-s.md) diff --git a/docs/c-runtime-library/reference/controlfp-s.md b/docs/c-runtime-library/reference/controlfp-s.md index 12dc7cff717..cef03a70522 100644 --- a/docs/c-runtime-library/reference/controlfp-s.md +++ b/docs/c-runtime-library/reference/controlfp-s.md @@ -11,7 +11,7 @@ helpviewer_keywords: ["floating-point numbers, control word", "controlfp_s funct --- # `_controlfp_s` -Gets and sets the floating-point control word. This version of [`_control87`, `_controlfp`, `\__control87_2`](control87-controlfp-control87-2.md) has security enhancements, as described in [Security Features in the CRT](../../c-runtime-library/security-features-in-the-crt.md). +Gets and sets the floating-point control word. This version of [`_control87`, `_controlfp`, `__control87_2`](control87-controlfp-control87-2.md) has security enhancements, as described in [Security features in the CRT](../security-features-in-the-crt.md). ## Syntax @@ -34,7 +34,7 @@ New control-word bit values. *`mask`*\ Mask for new control-word bits to set. -## Return Value +## Return value Zero if successful, or an **`errno`** value error code. @@ -77,9 +77,9 @@ _controlfp_s(¤t_word, _DN_FLUSH, _MCW_DN); On ARM platforms, the **`_controlfp_s`** function applies to the FPSCR register. On x64 architectures, only the SSE2 control word that's stored in the MXCSR register is affected. On Intel (x86) platforms, **`_controlfp_s`** affects the control words for both the x87 and the SSE2, if present. It's possible for the two control words to be inconsistent with each other (because of a previous call to [`__control87_2`](control87-controlfp-control87-2.md), for example); if there's an inconsistency between the two control words, **`_controlfp_s`** sets the **`EM_AMBIGUOUS`** flag in *`currentControl`*. It's a warning that the returned control word might not represent the state of both floating-point control words accurately. -On the ARM and x64 architectures, changing the infinity mode or the floating-point precision isn't supported. If the precision control mask is used on the x64 platform, the function raises an assertion and the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). +On the ARM and x64 architectures, changing the infinity mode or the floating-point precision isn't supported. If the precision control mask is used on the x64 platform, the function raises an assertion and the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). -If the mask isn't set correctly, this function generates an invalid parameter exception, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, this function returns **`EINVAL`** and sets **`errno`** to **`EINVAL`**. +If the mask isn't set correctly, this function generates an invalid parameter exception, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, this function returns **`EINVAL`** and sets **`errno`** to **`EINVAL`**. This function is ignored when you use [`/clr` (Common Language Runtime Compilation)](../../build/reference/clr-common-language-runtime-compilation.md) to compile because the common language runtime (CLR) only supports the default floating-point precision. @@ -103,7 +103,7 @@ For the **`_MCW_EM`** mask, clearing it sets the exception, which allows the har |-------------|---------------------| |**`_controlfp_s`**|``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -158,7 +158,7 @@ Default: 0x9001f ## See also -[Floating-Point Support](../../c-runtime-library/floating-point-support.md)\ +[Math and floating-point support](../floating-point-support.md)\ [`_clear87`, `_clearfp`](clear87-clearfp.md)\ [`_status87`, `_statusfp`, `_statusfp2`](status87-statusfp-statusfp2.md)\ -[`_control87`, `_controlfp`, `\__control87_2`](control87-controlfp-control87-2.md) +[`_control87`, `_controlfp`, `__control87_2`](control87-controlfp-control87-2.md) diff --git a/docs/c-runtime-library/reference/copysign-copysignf-copysignl-copysign-copysignf-copysignl.md b/docs/c-runtime-library/reference/copysign-copysignf-copysignl-copysign-copysignf-copysignl.md index b22ae5c3eee..ede67aed642 100644 --- a/docs/c-runtime-library/reference/copysign-copysignf-copysignl-copysign-copysignf-copysignl.md +++ b/docs/c-runtime-library/reference/copysign-copysignf-copysignl-copysign-copysignf-copysignl.md @@ -56,9 +56,9 @@ The floating-point value that's returned as the magnitude of the result. *`y`*\ The floating-point value that's returned as the sign of the result. -[Floating-Point Support Routines](../../c-runtime-library/floating-point-support.md) +[Math and floating-point support](../floating-point-support.md) -## Return Value +## Return value The **copysign** functions return a floating-point value that combines the magnitude of *`x`* and the sign of *`y`*. There's no error return. @@ -66,7 +66,7 @@ The **copysign** functions return a floating-point value that combines the magni Because C++ allows overloading, you can call overloads of **copysign** that take and return **`float`** or **`long double`** values. In a C program, unless you're using the \ macro to call this function, **copysign** always takes and returns a **`double`**. -If you use the \ `copysign()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../../c-runtime-library/tgmath.md) for details. +If you use the \ `copysign()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../tgmath.md) for details. ## Requirements @@ -76,9 +76,9 @@ If you use the \ `copysign()` macro, the type of the argument determin |**copysign**, **copysignf**, **copysignl**, **_copysignf**, **_copysignl**|\| |**copysign** macro | \ | -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[fabs, fabsf, fabsl](fabs-fabsf-fabsl.md)
-[_chgsign, _chgsignf, _chgsignl](chgsign-chgsignf-chgsignl.md)
+[`fabs`, `fabsf`, `fabsl`](fabs-fabsf-fabsl.md)\ +[`_chgsign`, `_chgsignf`, `_chgsignl`](chgsign-chgsignf-chgsignl.md) diff --git a/docs/c-runtime-library/reference/cos-cosf-cosl.md b/docs/c-runtime-library/reference/cos-cosf-cosl.md index 87c2b45c7db..f78d672a693 100644 --- a/docs/c-runtime-library/reference/cos-cosf-cosl.md +++ b/docs/c-runtime-library/reference/cos-cosf-cosl.md @@ -28,12 +28,12 @@ long double cos( long double x ); // C++ only ### Parameters -*x*\ +*`x`*\ Angle in radians. -## Return Value +## Return value -The cosine of *x*. If *x* is greater than or equal to 263, or less than or equal to -263, a loss of significance in the result occurs. +The cosine of *`x`*. If *`x`* is greater than or equal to 263, or less than or equal to -263, a loss of significance in the result occurs. |Input|SEH Exception|`Matherr` Exception| |-----------|-------------------|-----------------------| @@ -44,7 +44,7 @@ The cosine of *x*. If *x* is greater than or equal to 263, or less than or equal Because C++ allows overloading, you can call overloads of **cos** that take and return **`float`** or **`long double`** values. In a C program, unless you're using the \ macro to call this function, **cos** always takes and returns a **`double`**. -If you use the \ `cos()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../../c-runtime-library/tgmath.md) for details. +If you use the \ `cos()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../tgmath.md) for details. 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). @@ -55,7 +55,7 @@ By default, this function's global state is scoped to the application. To change |**cos**, **cosh**, **cosf**|\|\ or \| |**cos()** macro | \ || -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -63,10 +63,10 @@ See the example in [`sin`, `sinf`, `sinl`](sin-sinf-sinl.md). ## See also -[Floating-Point Support](../../c-runtime-library/floating-point-support.md)
-[`acos`, `acosf`, `acosl`](acos-acosf-acosl.md)
-[`asin`, `asinf`, `asinl`](asin-asinf-asinl.md)
-[`atan`, `atanf`, `atanl`, `atan2`, `atan2f`, `atan2l`](atan-atanf-atanl-atan2-atan2f-atan2l.md)
-[`_matherr`](matherr.md)
-[`sin`, `sinf`, `sinl`](sin-sinf-sinl.md)
+[Math and floating-point support](../floating-point-support.md)\ +[`acos`, `acosf`, `acosl`](acos-acosf-acosl.md)\ +[`asin`, `asinf`, `asinl`](asin-asinf-asinl.md)\ +[`atan`, `atanf`, `atanl`, `atan2`, `atan2f`, `atan2l`](atan-atanf-atanl-atan2-atan2f-atan2l.md)\ +[`_matherr`](matherr.md)\ +[`sin`, `sinf`, `sinl`](sin-sinf-sinl.md)\ [`tan`, `tanf`, `tanl`](tan-tanf-tanl.md) diff --git a/docs/c-runtime-library/reference/cosh-coshf-coshl.md b/docs/c-runtime-library/reference/cosh-coshf-coshl.md index 1b6c92c3d33..40b8c7a2727 100644 --- a/docs/c-runtime-library/reference/cosh-coshf-coshl.md +++ b/docs/c-runtime-library/reference/cosh-coshf-coshl.md @@ -30,7 +30,7 @@ long double cosh( long double x ); // C++ only *`x`*\ Angle in radians. -## Return Value +## Return value The hyperbolic cosine of *`x`*. @@ -45,7 +45,7 @@ By default, if the result is too large in a **`cosh`**, **`coshf`**, or **`coshl Because C++ allows overloading, you can call overloads of **`cosh`** that take and return **`float`** or **`long double`** values. In a C program, unless you're using the `` macro to call this function, **`cosh`** always takes and returns a **`double`**. -If you use the `` `cosh()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../../c-runtime-library/tgmath.md) for details. +If you use the `` `cosh()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../tgmath.md) for details. 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). @@ -56,7 +56,7 @@ By default, this function's global state is scoped to the application. To change |**`coshf`**, **`cosl`**, **`coshl`**|``|`` or ``| |**`coshf()`** macro | `` || -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -64,7 +64,7 @@ See the example in [`sinh`, `sinhf`, `sinhl`](sinh-sinhf-sinhl.md). ## See also -[Floating-Point Support](../../c-runtime-library/floating-point-support.md)\ +[Math and floating-point support](../floating-point-support.md)\ [`acosh, acoshf, acoshl`](acosh-acoshf-acoshl.md)\ [`asinh, asinhf, asinhl`](asinh-asinhf-asinhl.md)\ [`atanh, atanhf, atanhl`](atanh-atanhf-atanhl.md)\ diff --git a/docs/c-runtime-library/reference/countof-macro.md b/docs/c-runtime-library/reference/countof-macro.md index 8720e8453ee..e59086c0c0e 100644 --- a/docs/c-runtime-library/reference/countof-macro.md +++ b/docs/c-runtime-library/reference/countof-macro.md @@ -21,10 +21,10 @@ Computes the number of elements in a statically allocated array. ### Parameters -*`array`*
+*`array`*\ The name of an array. -## Return Value +## Return value The number of elements in the array, expressed as a **`size_t`**. @@ -69,4 +69,4 @@ _countof(arr) = 20 elements ## See also -[`sizeof` Operator](../../cpp/sizeof-operator.md)
+[`sizeof` Operator](../../cpp/sizeof-operator.md) diff --git a/docs/c-runtime-library/reference/cpow-cpowf-cpowl.md b/docs/c-runtime-library/reference/cpow-cpowf-cpowl.md index 49f0b287c0a..067bd9a088e 100644 --- a/docs/c-runtime-library/reference/cpow-cpowf-cpowl.md +++ b/docs/c-runtime-library/reference/cpow-cpowf-cpowl.md @@ -36,15 +36,15 @@ _Lcomplex cpowl( ### Parameters -*x*
+*`x`*\ The base. -*y*
+*`y`*\ The exponent. -## Return Value +## Return value -The value of *x* raised to the power of *y* with a branch cut for *x* along the negative real axis. +The value of *`x`* raised to the power of *`y`* with a branch cut for *`x`* along the negative real axis. ## Remarks @@ -56,11 +56,11 @@ Because C++ allows overloading, you can call overloads of **cpow** that take and |-------------|--------------|------------------| |**cpow**, **cpowf**, **cpowl**|\|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Alphabetical Function Reference](crt-alphabetical-function-reference.md)
-[cexp, cexpf, cexpl](cexp-cexpf-cexpl.md)
-[clog10, clog10f, clog10l](clog10-clog10f-clog10l.md)
-[clog, clogf, clogl](clog-clogf-clogl.md)
+[Alphabetical function reference](crt-alphabetical-function-reference.md)\ +[`cexp`, `cexpf`, `cexpl`](cexp-cexpf-cexpl.md)\ +[`clog10`, `clog10f`, `clog10l`](clog10-clog10f-clog10l.md)\ +[`clog`, `clogf`, `clogl`](clog-clogf-clogl.md) diff --git a/docs/c-runtime-library/reference/cprintf-cprintf-l-cwprintf-cwprintf-l.md b/docs/c-runtime-library/reference/cprintf-cprintf-l-cwprintf-cwprintf-l.md index 98e60e009d7..af6a4a9b03b 100644 --- a/docs/c-runtime-library/reference/cprintf-cprintf-l-cwprintf-cwprintf-l.md +++ b/docs/c-runtime-library/reference/cprintf-cprintf-l-cwprintf-cwprintf-l.md @@ -11,7 +11,7 @@ helpviewer_keywords: ["_cprintf_l function", "_cwprintf_l function", "cwprintf f --- # _cprintf, _cprintf_l, _cwprintf, _cwprintf_l -Formats and prints to the console. More-secure versions are available; see [_cprintf_s, _cprintf_s_l, _cwprintf_s, _cwprintf_s_l](cprintf-s-cprintf-s-l-cwprintf-s-cwprintf-s-l.md). +Formats and prints to the console. More-secure versions are available; see [`_cprintf_s`, `_cprintf_s_l`, `_cwprintf_s`, `_cwprintf_s_l`](cprintf-s-cprintf-s-l-cwprintf-s-cwprintf-s-l.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). @@ -37,36 +37,35 @@ int _cwprintf_l( ### Parameters -*format*
+*`format`*\ Format-control string. -*argument_list*
+*`argument_list`*\ Optional parameters for the format string. -*locale*
+*`locale`*\ The locale to use. -## Return Value +## Return value The number of characters printed. ## Remarks -These functions format and print a series of characters and values directly to the console, using the **_putch** function (**_putwch** for **_cwprintf**) to output characters. Each argument in *argument_list* (if any) is converted and output according to the corresponding format specification in *format*. The *format* argument uses the [format specification syntax for printf and wprintf functions](../../c-runtime-library/format-specification-syntax-printf-and-wprintf-functions.md). Unlike the **fprintf**, **printf**, and **sprintf** functions, **_cprintf** and **_cwprintf** don't translate line-feed characters into carriage return-line feed (CR-LF) combinations when output. +These functions format and print a series of characters and values directly to the console, using the **_putch** function (**_putwch** for **_cwprintf**) to output characters. Each argument in *`argument_list`* (if any) is converted and output according to the corresponding format specification in *`format`*. The *`format`* argument uses the [format specification syntax for printf and wprintf functions](../format-specification-syntax-printf-and-wprintf-functions.md). Unlike the **fprintf**, **printf**, and **sprintf** functions, **_cprintf** and **_cwprintf** don't translate line-feed characters into carriage return-line feed (CR-LF) combinations when output. An important distinction is that **_cwprintf** displays Unicode characters when used in Windows. Unlike **_cprintf**, **_cwprintf** uses the current console locale settings. The versions of these functions with the **_l** suffix are identical except that they use the locale parameter passed in instead of the current locale. -**_cprintf** validates the *format* parameter. If *format* is a null pointer, the function invokes the invalid parameter handler, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, the function returns -1 and sets **errno** to **EINVAL**. +**_cprintf** validates the *`format`* parameter. If *`format`* is a null pointer, the function invokes the invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, the function returns -1 and sets **errno** to **EINVAL**. > [!IMPORTANT] -> Ensure that *format* is not a user-defined string. -> +> Ensure that *`format`* is not a user-defined string. > > Starting in Windows 10 version 2004 (build 19041), the `printf` family of functions prints exactly representable floating point numbers according to the IEEE 754 rules for rounding. In previous versions of Windows, exactly representable floating point numbers ending in '5' would always round up. IEEE 754 states that they must round to the closest even digit (also known as "Banker's Rounding"). For example, both `printf("%1.0f", 1.5)` and `printf("%1.0f", 2.5)` should round to 2. Previously, 1.5 would round to 2 and 2.5 would round to 3. This change only affects exactly representable numbers. For example, 2.35 (which, when represented in memory, is closer to 2.35000000000000008) continues to round up to 2.4. Rounding done by these functions now also respects the floating point rounding mode set by [`fesetround`](fegetround-fesetround2.md). Previously, rounding always chose `FE_TONEAREST` behavior. This change only affects programs built using Visual Studio 2019 version 16.2 and later. To use the legacy floating point rounding behavior, link with [`legacy_stdio_float_rounding.obj`](../link-options.md). -### Generic-Text Routine Mappings +### Generic-text routine mappings |Tchar.h routine|_UNICODE and _MBCS not defined|_MBCS defined|_UNICODE defined| |---------------------|--------------------------------------|--------------------|-----------------------| @@ -80,7 +79,7 @@ The versions of these functions with the **_l** suffix are identical except that |**_cprintf**, **_cprintf_l**|\| |**_cwprintf**, **_cwprintf_l**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -112,12 +111,12 @@ int main( void ) ## See also -[Console and Port I/O](../../c-runtime-library/console-and-port-i-o.md)
-[_cscanf, _cscanf_l, _cwscanf, _cwscanf_l](cscanf-cscanf-l-cwscanf-cwscanf-l.md)
-[fprintf, _fprintf_l, fwprintf, _fwprintf_l](fprintf-fprintf-l-fwprintf-fwprintf-l.md)
-[printf, _printf_l, wprintf, _wprintf_l](printf-printf-l-wprintf-wprintf-l.md)
-[sprintf, _sprintf_l, swprintf, _swprintf_l, \__swprintf_l](sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md)
-[vfprintf, _vfprintf_l, vfwprintf, _vfwprintf_l](vfprintf-vfprintf-l-vfwprintf-vfwprintf-l.md)
-[_cprintf_s, _cprintf_s_l, _cwprintf_s, _cwprintf_s_l](cprintf-s-cprintf-s-l-cwprintf-s-cwprintf-s-l.md)
-[_cprintf_p, _cprintf_p_l, _cwprintf_p, _cwprintf_p_l](cprintf-p-cprintf-p-l-cwprintf-p-cwprintf-p-l.md)
-[Format Specification Syntax: printf and wprintf Functions](../../c-runtime-library/format-specification-syntax-printf-and-wprintf-functions.md)
+[Console and port I/O](../console-and-port-i-o.md)\ +[`_cscanf`, `_cscanf_l`, `_cwscanf`, `_cwscanf_l`](cscanf-cscanf-l-cwscanf-cwscanf-l.md)\ +[`fprintf`, `_fprintf_l`, `fwprintf`, `_fwprintf_l`](fprintf-fprintf-l-fwprintf-fwprintf-l.md)\ +[`printf`, `_printf_l`, `wprintf`, `_wprintf_l`](printf-printf-l-wprintf-wprintf-l.md)\ +[`sprintf`, `_sprintf_l`, `swprintf`, `_swprintf_l`, `__swprintf_l`](sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md)\ +[`vfprintf`, `_vfprintf_l`, `vfwprintf`, `_vfwprintf_l`](vfprintf-vfprintf-l-vfwprintf-vfwprintf-l.md)\ +[`_cprintf_s`, `_cprintf_s_l`, `_cwprintf_s`, `_cwprintf_s_l`](cprintf-s-cprintf-s-l-cwprintf-s-cwprintf-s-l.md)\ +[`_cprintf_p`, `_cprintf_p_l`, `_cwprintf_p`, `_cwprintf_p_l`](cprintf-p-cprintf-p-l-cwprintf-p-cwprintf-p-l.md)\ +[Format specification syntax: `printf` and `wprintf` functions](../format-specification-syntax-printf-and-wprintf-functions.md) diff --git a/docs/c-runtime-library/reference/cprintf-p-cprintf-p-l-cwprintf-p-cwprintf-p-l.md b/docs/c-runtime-library/reference/cprintf-p-cprintf-p-l-cwprintf-p-cwprintf-p-l.md index 682cc1e817e..c2c873e3aab 100644 --- a/docs/c-runtime-library/reference/cprintf-p-cprintf-p-l-cwprintf-p-cwprintf-p-l.md +++ b/docs/c-runtime-library/reference/cprintf-p-cprintf-p-l-cwprintf-p-cwprintf-p-l.md @@ -41,28 +41,28 @@ int _cwprintf_p_l( ### Parameters -*`format`*
+*`format`*\ Format-control string. -*`argument`*
+*`argument`*\ Optional parameters. -*`locale`*
+*`locale`*\ The locale to use. -## Return Value +## Return value The number of characters printed or a negative value if an error occurs. ## Remarks -These functions format and print a series of characters and values directly to the console, using the **_putch** and **_putwch** functions to output characters. Each *`argument`* (if any) is converted and output according to the corresponding format specification in *`format`*. The format has the same form and function as the *`format`* parameter for the [printf_p](../../c-runtime-library/format-specification-syntax-printf-and-wprintf-functions.md) function. The difference between **_cprintf_p** and **cprintf_s** is that **_cprintf_p** supports positional parameters, which allows specifying the order in which the arguments are used in the format string. For more information, see [printf_p Positional Parameters](../../c-runtime-library/printf-p-positional-parameters.md). +These functions format and print a series of characters and values directly to the console, using the **_putch** and **_putwch** functions to output characters. Each *`argument`* (if any) is converted and output according to the corresponding format specification in *`format`*. The format has the same form and function as the *`format`* parameter for the [`printf_p`](../format-specification-syntax-printf-and-wprintf-functions.md) function. The difference between **_cprintf_p** and **cprintf_s** is that **_cprintf_p** supports positional parameters, which allows specifying the order in which the arguments are used in the format string. For more information, see [printf_p Positional Parameters](../printf-p-positional-parameters.md). Unlike the **fprintf_p**, **printf_p**, and **sprintf_p** functions, **_cprintf_p** and **_cwprintf_p** don't translate line-feed characters into carriage return-line feed (CR-LF) combinations when output. An important distinction is that **_cwprintf_p** displays Unicode characters when used in Windows NT. Unlike **_cprintf_p**, **_cwprintf_p** uses the current console locale settings. The versions of these functions with the **_l** suffix are identical except that they use the locale parameter passed in instead of the current locale. -Also, like **_cprintf_s** and **_cwprintf_s**, they validate the input pointer and the format string. If *`format`* or *`argument`* are **NULL**, or of the format string contains invalid formatting characters, these 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 return -1 and set **errno** to **EINVAL**. +Also, like **_cprintf_s** and **_cwprintf_s**, they validate the input pointer and the format string. If *`format`* or *`argument`* are **NULL**, or of the format string contains invalid formatting characters, these functions invoke the invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, these functions return -1 and set **errno** to **EINVAL**. > [!IMPORTANT] > Ensure that *`format`* is not a user-defined string. @@ -70,7 +70,7 @@ Also, like **_cprintf_s** and **_cwprintf_s**, they validate the input pointer a > > Starting in Windows 10 version 2004 (build 19041), the `printf` family of functions prints exactly representable floating point numbers according to the IEEE 754 rules for rounding. In previous versions of Windows, exactly representable floating point numbers ending in '5' would always round up. IEEE 754 states that they must round to the closest even digit (also known as "Banker's Rounding"). For example, both `printf("%1.0f", 1.5)` and `printf("%1.0f", 2.5)` should round to 2. Previously, 1.5 would round to 2 and 2.5 would round to 3. This change only affects exactly representable numbers. For example, 2.35 (which, when represented in memory, is closer to 2.35000000000000008) continues to round up to 2.4. Rounding done by these functions now also respects the floating point rounding mode set by [`fesetround`](fegetround-fesetround2.md). Previously, rounding always chose `FE_TONEAREST` behavior. This change only affects programs built using Visual Studio 2019 version 16.2 and later. To use the legacy floating point rounding behavior, link with [`legacy_stdio_float_rounding.obj`](../link-options.md). -### Generic-Text Routine Mappings +### Generic-text routine mappings |Tchar.h routine|_UNICODE and _MBCS not defined|_MBCS defined|_UNICODE defined| |---------------------|--------------------------------------|--------------------|-----------------------| @@ -84,7 +84,7 @@ Also, like **_cprintf_s** and **_cwprintf_s**, they validate the input pointer a |**_cprintf_p**, **_cprintf_p_l**|\| |**_cwprintf_p**, **_cwprintf_p_l**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -116,15 +116,15 @@ int main( void ) ## See also -[Console and Port I/O](../../c-runtime-library/console-and-port-i-o.md)
-[_cscanf, _cscanf_l, _cwscanf, _cwscanf_l](cscanf-cscanf-l-cwscanf-cwscanf-l.md)
-[_cscanf_s, _cscanf_s_l, _cwscanf_s, _cwscanf_s_l](cscanf-s-cscanf-s-l-cwscanf-s-cwscanf-s-l.md)
-[_fprintf_p, _fprintf_p_l, _fwprintf_p, _fwprintf_p_l](fprintf-p-fprintf-p-l-fwprintf-p-fwprintf-p-l.md)
-[fprintf_s, _fprintf_s_l, fwprintf_s, _fwprintf_s_l](fprintf-s-fprintf-s-l-fwprintf-s-fwprintf-s-l.md)
-[_printf_p, _printf_p_l, _wprintf_p, _wprintf_p_l](printf-p-printf-p-l-wprintf-p-wprintf-p-l.md)
-[printf_s, _printf_s_l, wprintf_s, _wprintf_s_l](printf-s-printf-s-l-wprintf-s-wprintf-s-l.md)
-[_sprintf_p, _sprintf_p_l, _swprintf_p, _swprintf_p_l](sprintf-p-sprintf-p-l-swprintf-p-swprintf-p-l.md)
-[_vfprintf_p, _vfprintf_p_l, _vfwprintf_p, _vfwprintf_p_l](vfprintf-p-vfprintf-p-l-vfwprintf-p-vfwprintf-p-l.md)
-[_cprintf_s, _cprintf_s_l, _cwprintf_s, _cwprintf_s_l](cprintf-s-cprintf-s-l-cwprintf-s-cwprintf-s-l.md)
-[printf_p Positional Parameters](../../c-runtime-library/printf-p-positional-parameters.md)
-[Format Specification Syntax: printf and wprintf Functions](../../c-runtime-library/format-specification-syntax-printf-and-wprintf-functions.md)
+[Console and port I/O](../console-and-port-i-o.md)\ +[`_cscanf`, `_cscanf_l`, `_cwscanf`, `_cwscanf_l`](cscanf-cscanf-l-cwscanf-cwscanf-l.md)\ +[`_cscanf_s`, `_cscanf_s_l`, `_cwscanf_s`, `_cwscanf_s_l`](cscanf-s-cscanf-s-l-cwscanf-s-cwscanf-s-l.md)\ +[`_fprintf_p`, `_fprintf_p_l`, `_fwprintf_p`, `_fwprintf_p_l`](fprintf-p-fprintf-p-l-fwprintf-p-fwprintf-p-l.md)\ +[`fprintf_s`, `_fprintf_s_l`, `fwprintf_s`, `_fwprintf_s_l`](fprintf-s-fprintf-s-l-fwprintf-s-fwprintf-s-l.md)\ +[`_printf_p`, `_printf_p_l`, `_wprintf_p`, `_wprintf_p_l`](printf-p-printf-p-l-wprintf-p-wprintf-p-l.md)\ +[`printf_s`, `_printf_s_l`, `wprintf_s`, `_wprintf_s_l`](printf-s-printf-s-l-wprintf-s-wprintf-s-l.md)\ +[`_sprintf_p`, `_sprintf_p_l`, `_swprintf_p`, `_swprintf_p_l`](sprintf-p-sprintf-p-l-swprintf-p-swprintf-p-l.md)\ +[`_vfprintf_p`, `_vfprintf_p_l`, `_vfwprintf_p`, `_vfwprintf_p_l`](vfprintf-p-vfprintf-p-l-vfwprintf-p-vfwprintf-p-l.md)\ +[`_cprintf_s`, `_cprintf_s_l`, `_cwprintf_s`, `_cwprintf_s_l`](cprintf-s-cprintf-s-l-cwprintf-s-cwprintf-s-l.md)\ +[printf_p Positional Parameters](../printf-p-positional-parameters.md)\ +[Format specification syntax: `printf` and `wprintf` functions](../format-specification-syntax-printf-and-wprintf-functions.md) diff --git a/docs/c-runtime-library/reference/cprintf-s-cprintf-s-l-cwprintf-s-cwprintf-s-l.md b/docs/c-runtime-library/reference/cprintf-s-cprintf-s-l-cwprintf-s-cwprintf-s-l.md index 749174d3359..3f604a0875f 100644 --- a/docs/c-runtime-library/reference/cprintf-s-cprintf-s-l-cwprintf-s-cwprintf-s-l.md +++ b/docs/c-runtime-library/reference/cprintf-s-cprintf-s-l-cwprintf-s-cwprintf-s-l.md @@ -11,7 +11,7 @@ helpviewer_keywords: ["tcprintf_s_l function", "_cprintf_s_l function", "_cwprin --- # _cprintf_s, _cprintf_s_l, _cwprintf_s, _cwprintf_s_l -Formats and prints to the console. These versions of [_cprintf, _cprintf_l, _cwprintf, _cwprintf_l](cprintf-cprintf-l-cwprintf-cwprintf-l.md) have security enhancements, as described in [Security Features in the CRT](../../c-runtime-library/security-features-in-the-crt.md). +Formats and prints to the console. These versions of [`_cprintf`, `_cprintf_l`, `_cwprintf`, `_cwprintf_l`](cprintf-cprintf-l-cwprintf-cwprintf-l.md) have security enhancements, as described in [Security features in the CRT](../security-features-in-the-crt.md). > [!IMPORTANT] > This API cannot be used in applications that execute in the Windows Runtime. For more information, see [CRT functions not supported in Universal Windows Platform apps](../../cppcx/crt-functions-not-supported-in-universal-windows-platform-apps.md). @@ -41,36 +41,35 @@ int _cwprintf_s_l( ### Parameters -*format*
+*`format`*\ Format-control string. -*argument*
+*`argument`*\ Optional parameters. -*locale*
+*`locale`*\ The locale to use. -## Return Value +## Return value The number of characters printed. ## Remarks -These functions format and print a series of characters and values directly to the console, using the **_putch** function (**_putwch** for **_cwprintf_s**) to output characters. Each *argument* (if any) is converted and output according to the corresponding format specification in *format*. The format has the same form and function as the *format* parameter for the [printf_s](../../c-runtime-library/format-specification-syntax-printf-and-wprintf-functions.md) function. Unlike the **fprintf_s**, **printf_s**, and **sprintf_s** functions, **_cprintf_s** and **_cwprintf_s** don't translate line-feed characters into carriage return-line feed (CR-LF) combinations when output. +These functions format and print a series of characters and values directly to the console, using the **_putch** function (**_putwch** for **_cwprintf_s**) to output characters. Each *`argument`* (if any) is converted and output according to the corresponding format specification in *`format`*. The format has the same form and function as the *`format`* parameter for the [`printf_s`](../format-specification-syntax-printf-and-wprintf-functions.md) function. Unlike the **fprintf_s**, **printf_s**, and **sprintf_s** functions, **_cprintf_s** and **_cwprintf_s** don't translate line-feed characters into carriage return-line feed (CR-LF) combinations when output. An important distinction is that **_cwprintf_s** displays Unicode characters when used in Windows NT. Unlike **_cprintf_s**, **_cwprintf_s** uses the current console locale The versions of these functions with the **_l** suffix are identical except that they use the locale parameter passed in instead of the current locale. > [!IMPORTANT] -> Ensure that *format* is not a user-defined string. -> +> Ensure that *`format`* is not a user-defined string. > > Starting in Windows 10 version 2004 (build 19041), the `printf` family of functions prints exactly representable floating point numbers according to the IEEE 754 rules for rounding. In previous versions of Windows, exactly representable floating point numbers ending in '5' would always round up. IEEE 754 states that they must round to the closest even digit (also known as "Banker's Rounding"). For example, both `printf("%1.0f", 1.5)` and `printf("%1.0f", 2.5)` should round to 2. Previously, 1.5 would round to 2 and 2.5 would round to 3. This change only affects exactly representable numbers. For example, 2.35 (which, when represented in memory, is closer to 2.35000000000000008) continues to round up to 2.4. Rounding done by these functions now also respects the floating point rounding mode set by [`fesetround`](fegetround-fesetround2.md). Previously, rounding always chose `FE_TONEAREST` behavior. This change only affects programs built using Visual Studio 2019 version 16.2 and later. To use the legacy floating point rounding behavior, link with ['legacy_stdio_float_rounding.obj`](../link-options.md). -Like the non-secure versions (see [_cprintf, _cprintf_l, _cwprintf, _cwprintf_l](cprintf-cprintf-l-cwprintf-cwprintf-l.md)), these functions validate their parameters and invoke the invalid parameter handler, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md), if *format* is a null pointer. These functions differ from the non-secure versions in that the format string itself is also validated. If there are any unknown or badly formed formatting specifiers, these functions invoke the invalid parameter handler. In all cases, If execution is allowed to continue, the functions return -1 and set **errno** to **EINVAL**. +Like the non-secure versions (see [`_cprintf`, `_cprintf_l`, `_cwprintf`, `_cwprintf_l`](cprintf-cprintf-l-cwprintf-cwprintf-l.md)), these functions validate their parameters and invoke the invalid parameter handler, as described in [Parameter validation](../parameter-validation.md), if *`format`* is a null pointer. These functions differ from the non-secure versions in that the format string itself is also validated. If there are any unknown or badly formed formatting specifiers, these functions invoke the invalid parameter handler. In all cases, If execution is allowed to continue, the functions return -1 and set **errno** to **EINVAL**. -### Generic-Text Routine Mappings +### Generic-text routine mappings |Tchar.h routine|_UNICODE and _MBCS not defined|_MBCS defined|_UNICODE defined| |---------------------|--------------------------------------|--------------------|-----------------------| @@ -84,11 +83,11 @@ Like the non-secure versions (see [_cprintf, _cprintf_l, _cwprintf, _cwprintf_l] |**_cprintf_s**, **_cprintf_s_l**|\| |**_cwprintf_s**, **_cwprintf_s_l**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Libraries -All versions of the [C run-time libraries](../../c-runtime-library/crt-library-features.md). +All versions of the [C run-time libraries](../crt-library-features.md). ## Example @@ -119,10 +118,10 @@ int main( void ) ## See also -[Console and Port I/O](../../c-runtime-library/console-and-port-i-o.md)
-[_cscanf, _cscanf_l, _cwscanf, _cwscanf_l](cscanf-cscanf-l-cwscanf-cwscanf-l.md)
-[fprintf_s, _fprintf_s_l, fwprintf_s, _fwprintf_s_l](fprintf-s-fprintf-s-l-fwprintf-s-fwprintf-s-l.md)
-[printf_s, _printf_s_l, wprintf_s, _wprintf_s_l](printf-s-printf-s-l-wprintf-s-wprintf-s-l.md)
-[sprintf_s, _sprintf_s_l, swprintf_s, _swprintf_s_l](sprintf-s-sprintf-s-l-swprintf-s-swprintf-s-l.md)
-[vfprintf_s, _vfprintf_s_l, vfwprintf_s, _vfwprintf_s_l](vfprintf-s-vfprintf-s-l-vfwprintf-s-vfwprintf-s-l.md)
-[Format Specification Syntax: printf and wprintf Functions](../../c-runtime-library/format-specification-syntax-printf-and-wprintf-functions.md)
+[Console and port I/O](../console-and-port-i-o.md)\ +[`_cscanf`, `_cscanf_l`, `_cwscanf`, `_cwscanf_l`](cscanf-cscanf-l-cwscanf-cwscanf-l.md)\ +[`fprintf_s`, `_fprintf_s_l`, `fwprintf_s`, `_fwprintf_s_l`](fprintf-s-fprintf-s-l-fwprintf-s-fwprintf-s-l.md)\ +[`printf_s`, `_printf_s_l`, `wprintf_s`, `_wprintf_s_l`](printf-s-printf-s-l-wprintf-s-wprintf-s-l.md)\ +[`sprintf_s`, `_sprintf_s_l`, `swprintf_s`, `_swprintf_s_l`](sprintf-s-sprintf-s-l-swprintf-s-swprintf-s-l.md)\ +[`vfprintf_s`, `_vfprintf_s_l`, `vfwprintf_s`, `_vfwprintf_s_l`](vfprintf-s-vfprintf-s-l-vfwprintf-s-vfwprintf-s-l.md)\ +[Format specification syntax: `printf` and `wprintf` functions](../format-specification-syntax-printf-and-wprintf-functions.md) diff --git a/docs/c-runtime-library/reference/cprintf.md b/docs/c-runtime-library/reference/cprintf.md index b8ee683b483..274f14df67b 100644 --- a/docs/c-runtime-library/reference/cprintf.md +++ b/docs/c-runtime-library/reference/cprintf.md @@ -11,9 +11,9 @@ helpviewer_keywords: ["cprintf function"] --- # cprintf -The Microsoft-specific function name `cprintf` is a deprecated alias for the [_cprintf](cprintf-cprintf-l-cwprintf-cwprintf-l.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. +The Microsoft-specific function name `cprintf` is a deprecated alias for the [`_cprintf`](cprintf-cprintf-l-cwprintf-cwprintf-l.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. -We recommend you use the [_cprintf](cprintf-cprintf-l-cwprintf-cwprintf-l.md) or security-enhanced [_cprintf_s](cprintf-s-cprintf-s-l-cwprintf-s-cwprintf-s-l.md) function instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). +We recommend you use the [`_cprintf`](cprintf-cprintf-l-cwprintf-cwprintf-l.md) or security-enhanced [`_cprintf_s`](cprintf-s-cprintf-s-l-cwprintf-s-cwprintf-s-l.md) function instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). > [!IMPORTANT] > This API cannot be used in applications that execute in the Windows Runtime. For more information, see [CRT functions not supported in Universal Windows Platform apps](../../cppcx/crt-functions-not-supported-in-universal-windows-platform-apps.md). diff --git a/docs/c-runtime-library/reference/cproj-cprojf-cprojl.md b/docs/c-runtime-library/reference/cproj-cprojf-cprojl.md index 6992c54b97c..b50a3de952a 100644 --- a/docs/c-runtime-library/reference/cproj-cprojf-cprojl.md +++ b/docs/c-runtime-library/reference/cproj-cprojf-cprojl.md @@ -37,18 +37,18 @@ _Lcomplex cprojl( ### Parameters -*z*\ +*`z`*\ A complex number. -## Return Value +## Return value -The projection of *z* on the Reimann sphere. +The projection of *`z`* on the Reimann sphere. ## Remarks Because C++ allows overloading, you can call overloads of **cproj** that take and return **_Fcomplex** and **_Lcomplex** values. In a C program, unless you're using the \ macro to call this function, **cproj** always takes and returns a **_Dcomplex** value. -If you use the \ `cproj()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../../c-runtime-library/tgmath.md) for details. +If you use the \ `cproj()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../tgmath.md) for details. ## Requirements @@ -57,14 +57,14 @@ If you use the \ `cproj()` macro, the type of the argument determines |**cproj**, **cprojf**, **cprojl**|\|\| |**cproj** macro | \ || -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Alphabetical Function Reference](crt-alphabetical-function-reference.md)
-[norm, normf, norml](norm-normf-norml1.md)
-[creal, crealf, creall](creal-crealf-creall.md)
-[conj, conjf, conjl](conj-conjf-conjl.md)
-[cimag, cimagf, cimagl](cimag-cimagf-cimagl.md)
-[carg, cargf, cargl](carg-cargf-cargl.md)
-[cabs, cabsf, cabsl](cabs-cabsf-cabsl.md)
+[Alphabetical function reference](crt-alphabetical-function-reference.md)\ +[`norm`, `normf`, `norml`](norm-normf-norml1.md)\ +[`creal`, `crealf`, `creall`](creal-crealf-creall.md)\ +[`conj`, `conjf`, `conjl`](conj-conjf-conjl.md)\ +[`cimag`, `cimagf`, `cimagl`](cimag-cimagf-cimagl.md)\ +[`carg`, `cargf`, `cargl`](carg-cargf-cargl.md)\ +[`cabs`, `cabsf`, `cabsl`](cabs-cabsf-cabsl.md) diff --git a/docs/c-runtime-library/reference/cputs-cputws.md b/docs/c-runtime-library/reference/cputs-cputws.md index b80d08ba6ea..b4c07bc744d 100644 --- a/docs/c-runtime-library/reference/cputs-cputws.md +++ b/docs/c-runtime-library/reference/cputs-cputws.md @@ -30,22 +30,22 @@ int _cputws( ### Parameters -*str*
+*`str`*\ Output string. -## Return Value +## Return value If successful, **_cputs** returns 0. If the function fails, it returns a nonzero value. ## Remarks -The **_cputs** function writes the null-terminated string that's pointed to by *str* directly to the console. A carriage return-line feed (CR-LF) combination isn't automatically appended to the string. +The **_cputs** function writes the null-terminated string that's pointed to by *`str`* directly to the console. A carriage return-line feed (CR-LF) combination isn't automatically appended to the string. -This function validates its parameter. If *str* is **NULL**, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, **errno** is set to **EINVAL**, and -1 is returned. +This function validates its parameter. If *`str`* is **NULL**, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, **errno** is set to **EINVAL**, and -1 is returned. 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| |---------------------|--------------------------------------|--------------------|-----------------------| @@ -58,11 +58,11 @@ By default, this function's global state is scoped to the application. To change |**_cputs**|\|\| |**_cputws**|\|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Libraries -All versions of the [C run-time libraries](../../c-runtime-library/crt-library-features.md). +All versions of the [C run-time libraries](../crt-library-features.md). ## Example @@ -123,5 +123,5 @@ Hello world (courtesy of _cputws)! ## See also -[Console and Port I/O](../../c-runtime-library/console-and-port-i-o.md)
-[_putch, _putwch](putch-putwch.md)
+[Console and port I/O](../console-and-port-i-o.md)\ +[`_putch`, `_putwch`](putch-putwch.md) diff --git a/docs/c-runtime-library/reference/cputs.md b/docs/c-runtime-library/reference/cputs.md index 6eed32aa598..f0412485d17 100644 --- a/docs/c-runtime-library/reference/cputs.md +++ b/docs/c-runtime-library/reference/cputs.md @@ -12,9 +12,9 @@ ms.assetid: 0c2a7d4e-623a-4cb2-a0f9-1900c05bac08 --- # cputs -The Microsoft-specific function name `cputs` is a deprecated alias for the [_cputs](cputs-cputws.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. +The Microsoft-specific function name `cputs` is a deprecated alias for the [`_cputs`](cputs-cputws.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. -We recommend you use [_cputs](cputs-cputws.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). +We recommend you use [`_cputs`](cputs-cputws.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). > [!IMPORTANT] > This API cannot be used in applications that execute in the Windows Runtime. For more information, see [CRT functions not supported in Universal Windows Platform apps](../../cppcx/crt-functions-not-supported-in-universal-windows-platform-apps.md). diff --git a/docs/c-runtime-library/reference/creal-crealf-creall.md b/docs/c-runtime-library/reference/creal-crealf-creall.md index cf820db3373..5264a65157e 100644 --- a/docs/c-runtime-library/reference/creal-crealf-creall.md +++ b/docs/c-runtime-library/reference/creal-crealf-creall.md @@ -28,18 +28,18 @@ long double creal( _Lcomplex z ); // C++ only ### Parameters -*z*
+*`z`*\ A complex number. -## Return Value +## Return value -The real part of *z*. +The real part of *`z`*. ## Remarks Because C++ allows overloading, you can call overloads of **creal** that take **_Fcomplex** or **_Lcomplex** values, and return **`float`** or **`long double`** values. In a C program, unless you're using the \ macro to call this function, **creal** always takes a **_Dcomplex** value and returns a **`double`** value. -If you use the \ `creal()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../../c-runtime-library/tgmath.md) for details. +If you use the \ `creal()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../tgmath.md) for details. ## Requirements @@ -48,15 +48,15 @@ If you use the \ `creal()` macro, the type of the argument determines |**creal**, **crealf**, **creall**|\|\| |**creal** macro | \ || -The **_Fcomplex**, **_Dcomplex**, and **_Lcomplex** types are Microsoft-specific equivalents of the unimplemented native C99 types **float _Complex**, **double _Complex**, and **long double _Complex**, respectively. For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +The **_Fcomplex**, **_Dcomplex**, and **_Lcomplex** types are Microsoft-specific equivalents of the unimplemented native C99 types **float _Complex**, **double _Complex**, and **long double _Complex**, respectively. For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Alphabetical Function Reference](crt-alphabetical-function-reference.md)
-[_Cbuild, _FCbuild, _LCbuild](cbuild-fcbuild-lcbuild.md)
-[norm, normf, norml](norm-normf-norml1.md)
-[cproj, cprojf, cprojl](cproj-cprojf-cprojl.md)
-[conj, conjf, conjl](conj-conjf-conjl.md)
-[cimag, cimagf, cimagl](cimag-cimagf-cimagl.md)
-[carg, cargf, cargl](carg-cargf-cargl.md)
-[cabs, cabsf, cabsl](cabs-cabsf-cabsl.md)
+[Alphabetical function reference](crt-alphabetical-function-reference.md)\ +[`_Cbuild`, `_FCbuild`, `_LCbuild`](cbuild-fcbuild-lcbuild.md)\ +[`norm`, `normf`, `norml`](norm-normf-norml1.md)\ +[`cproj`, `cprojf`, `cprojl`](cproj-cprojf-cprojl.md)\ +[`conj`, `conjf`, `conjl`](conj-conjf-conjl.md)\ +[`cimag`, `cimagf`, `cimagl`](cimag-cimagf-cimagl.md)\ +[`carg`, `cargf`, `cargl`](carg-cargf-cargl.md)\ +[`cabs`, `cabsf`, `cabsl`](cabs-cabsf-cabsl.md) diff --git a/docs/c-runtime-library/reference/creat-wcreat.md b/docs/c-runtime-library/reference/creat-wcreat.md index 3fa727c9c51..79f1478a933 100644 --- a/docs/c-runtime-library/reference/creat-wcreat.md +++ b/docs/c-runtime-library/reference/creat-wcreat.md @@ -12,7 +12,7 @@ ms.assetid: 3b3b795d-1620-40ec-bd2b-a4bbb0d20fe5 --- # _creat, _wcreat -Creates a new file. **_creat** and **_wcreat** have been deprecated; use [_sopen_s, _wsopen_s](sopen-s-wsopen-s.md) instead. +Creates a new file. **_creat** and **_wcreat** have been deprecated; use [`_sopen_s`, `_wsopen_s`](sopen-s-wsopen-s.md) instead. ## Syntax @@ -29,13 +29,13 @@ int _wcreat( ### Parameters -*`filename`*
+*`filename`*\ Name of new file. -*`pmode`*
+*`pmode`*\ Permission setting. -## Return Value +## Return value These functions, if successful, return a file descriptor to the created file. Otherwise, the functions return -1 and set **errno** as shown in the following table. @@ -45,9 +45,9 @@ These functions, if successful, return a file descriptor to the created file. Ot |**EMFILE**|No more file descriptors are available.| |**ENOENT**|Specified file couldn't be found.| -If *`filename`* 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, these functions set **errno** to **EINVAL** and return -1. +If *`filename`* is **NULL**, these 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. -For more information about these 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 these and other return codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks @@ -55,7 +55,7 @@ The **_creat** function creates a new file or opens and truncates an existing on By default, this function's global state is scoped to the application. To change it, 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| |---------------------|--------------------------------------|--------------------|-----------------------| @@ -69,9 +69,9 @@ If the file specified by *`filename`* doesn't exist, a new file is created with |`_S_IREAD`|Reading permitted.| |`_S_IREAD | _S_IWRITE`|Reading and writing permitted.| -If write permission isn't given, the file is read-only. All files are always readable; it's impossible to give write-only permission. The modes `_S_IWRITE` and `_S_IREAD | _S_IWRITE` are then equivalent. Files opened using **_creat** are always opened in compatibility mode (see [_sopen](sopen-wsopen.md)) with **_SH_DENYNO**. +If write permission isn't given, the file is read-only. All files are always readable; it's impossible to give write-only permission. The modes `_S_IWRITE` and `_S_IREAD | _S_IWRITE` are then equivalent. Files opened using **_creat** are always opened in compatibility mode (see [`_sopen`](sopen-wsopen.md)) with **_SH_DENYNO**. -**_creat** applies the current file-permission mask to *`pmode`* before setting the permissions (see [_umask](umask.md)). **_creat** is provided primarily for compatibility with previous libraries. A call to **_open** with **_O_CREAT** and **_O_TRUNC** in the *oflag* parameter is equivalent to **_creat** and is preferable for new code. +**_creat** applies the current file-permission mask to *`pmode`* before setting the permissions (see [`_umask`](umask.md)). **_creat** is provided primarily for compatibility with previous libraries. A call to **_open** with **_O_CREAT** and **_O_TRUNC** in the *`oflag`* parameter is equivalent to **_creat** and is preferable for new code. ## Requirements @@ -80,7 +80,7 @@ If write permission isn't given, the file is read-only. All files are always rea |**_creat**|\|\, \, \| |**_wcreat**|\ or \|\, \, \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -119,11 +119,11 @@ Created data file. ## See also -[Low-Level I/O](../../c-runtime-library/low-level-i-o.md)
-[_chmod, _wchmod](chmod-wchmod.md)
-[_chsize](chsize.md)
-[_close](close.md)
-[_dup, _dup2](dup-dup2.md)
-[_open, _wopen](open-wopen.md)
-[_sopen, _wsopen](sopen-wsopen.md)
-[_umask](umask.md)
+[Low-level I/O](../low-level-i-o.md)\ +[`_chmod`, `_wchmod`](chmod-wchmod.md)\ +[`_chsize`](chsize.md)\ +[`_close`](close.md)\ +[`_dup`, `_dup2`](dup-dup2.md)\ +[`_open`, `_wopen`](open-wopen.md)\ +[`_sopen`, `_wsopen`](sopen-wsopen.md)\ +[`_umask`](umask.md) diff --git a/docs/c-runtime-library/reference/creat.md b/docs/c-runtime-library/reference/creat.md index 910ff8a7f9b..c35f7efed1f 100644 --- a/docs/c-runtime-library/reference/creat.md +++ b/docs/c-runtime-library/reference/creat.md @@ -12,6 +12,6 @@ ms.assetid: 3aa6f0cc-5ae6-40d5-be94-0ab6f53c0c5b --- # creat -The Microsoft-implemented POSIX function name `creat` is a deprecated alias for the [_creat](creat-wcreat.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. +The Microsoft-implemented POSIX function name `creat` is a deprecated alias for the [`_creat`](creat-wcreat.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. -We recommend you use [_creat](creat-wcreat.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). +We recommend you use [`_creat`](creat-wcreat.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). diff --git a/docs/c-runtime-library/reference/create-locale-wcreate-locale.md b/docs/c-runtime-library/reference/create-locale-wcreate-locale.md index 47794b68bf3..a10e9f2f763 100644 --- a/docs/c-runtime-library/reference/create-locale-wcreate-locale.md +++ b/docs/c-runtime-library/reference/create-locale-wcreate-locale.md @@ -29,40 +29,40 @@ _locale_t _wcreate_locale( ### Parameters -*category*
+*`category`*\ Category. -*locale*
+*`locale`*\ Locale specifier. -## Return Value +## Return value -If a valid *locale* and *category* are given, the functions return the specified locale settings as a **_locale_t** object. The current locale settings of the program aren't changed. +If a valid *`locale`* and *`category`* are given, the functions return the specified locale settings as a **_locale_t** object. The current locale settings of the program aren't changed. ## Remarks -The **_create_locale** function allows you to create an object that represents certain region-specific settings, for use in locale-specific versions of many CRT functions (functions with the **_l** suffix). The behavior is similar to **setlocale**, except that instead of applying the specified locale settings to the current environment, the settings are saved in a **_locale_t** structure that is returned. The **_locale_t** structure should be freed using [_free_locale](free-locale.md) when it's no longer needed. +The **_create_locale** function allows you to create an object that represents certain region-specific settings, for use in locale-specific versions of many CRT functions (functions with the **_l** suffix). The behavior is similar to **setlocale**, except that instead of applying the specified locale settings to the current environment, the settings are saved in a **_locale_t** structure that is returned. The **_locale_t** structure should be freed using [`_free_locale`](free-locale.md) when it's no longer needed. -**_wcreate_locale** is a wide-character version of **_create_locale**; the *locale* argument to **_wcreate_locale** is a wide-character string. **_wcreate_locale** and **_create_locale** behave identically otherwise. +**_wcreate_locale** is a wide-character version of **_create_locale**; the *`locale`* argument to **_wcreate_locale** is a wide-character string. **_wcreate_locale** and **_create_locale** behave identically otherwise. -The *category* argument specifies the parts of the locale-specific behavior that are affected. The flags used for *category* and the parts of the program they affect are as shown in this table: +The *`category`* argument specifies the parts of the locale-specific behavior that are affected. The flags used for *`category`* and the parts of the program they affect are as shown in this table: -| *category* flag | Affects | +| *`category`* flag | Affects | |-----------------|---------| | **LC_ALL** |All categories, as listed below. | | **LC_COLLATE** |The **strcoll**, **_stricoll**, **wcscoll**, **_wcsicoll**, **strxfrm**, **_strncoll**, **_strnicoll**, **_wcsncoll**, **_wcsnicoll**, and **wcsxfrm** functions. | | **LC_CTYPE** | The character-handling functions (except **isdigit**, **isxdigit**, **mbstowcs**, and **mbtowc**, which are unaffected). | | **LC_MONETARY** | Monetary-formatting information returned by the **localeconv** function. | -| **LC_NUMERIC** | Decimal-point character for the formatted output routines (such as **printf**), for the data-conversion routines, and for the non-monetary formatting information returned by **localeconv**. In addition to the decimal-point character, **LC_NUMERIC** sets the thousands separator and the grouping control string returned by [localeconv](localeconv.md). | +| **LC_NUMERIC** | Decimal-point character for the formatted output routines (such as **printf**), for the data-conversion routines, and for the non-monetary formatting information returned by **localeconv**. In addition to the decimal-point character, **LC_NUMERIC** sets the thousands separator and the grouping control string returned by [`localeconv`](localeconv.md). | | **LC_TIME** | The **strftime** and **wcsftime** functions. | -This function validates the *category* and *locale* parameters. If the category parameter isn't one of the values given in the previous table or if *locale* is **NULL**, the function returns **NULL**. +This function validates the *`category`* and *`locale`* parameters. If the category parameter isn't one of the values given in the previous table or if *`locale`* is **NULL**, the function returns **NULL**. -The *locale* argument is a pointer to a string that specifies the locale. For information about the format of the *locale* argument, see [Locale Names, Languages, and Country/Region Strings](../../c-runtime-library/locale-names-languages-and-country-region-strings.md). +The *`locale`* argument is a pointer to a string that specifies the locale. For information about the format of the *`locale`* argument, see [Locale names, Languages, and Country/Region strings](../locale-names-languages-and-country-region-strings.md). -The *locale* argument can take several kinds of values: a locale name, a language string, a language string and country/region code, a code page, or a combination of language string, country/region code, and code page. The set (of available locale names, languages, country/region codes, and code pages) includes all that are supported by the Windows NLS API. The set of locale names **_create_locale** supports is described in [Locale Names, Languages, and Country/Region Strings](../../c-runtime-library/locale-names-languages-and-country-region-strings.md). The set of language and country/region strings supported by **_create_locale** are listed in [Language Strings](../../c-runtime-library/language-strings.md) and [Country/Region Strings](../../c-runtime-library/country-region-strings.md). +The *`locale`* argument can take several kinds of values: a locale name, a language string, a language string and country/region code, a code page, or a combination of language string, country/region code, and code page. The set (of available locale names, languages, country/region codes, and code pages) includes all that are supported by the Windows NLS API. The set of locale names **_create_locale** supports is described in [Locale names, Languages, and Country/Region strings](../locale-names-languages-and-country-region-strings.md). The set of language and country/region strings supported by **_create_locale** are listed in [Language strings](../language-strings.md) and [Country/Region strings](../country-region-strings.md). -For more information about locale settings, see [setlocale, _wsetlocale](setlocale-wsetlocale.md). +For more information about locale settings, see [`setlocale`, `_wsetlocale`](setlocale-wsetlocale.md). The previous name of this function, **__create_locale** (with two leading underscores), has been deprecated. @@ -75,7 +75,7 @@ By default, this function's global state is scoped to the application. To change |**_create_locale**|\| |**_wcreate_locale**|\ or \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -141,22 +141,22 @@ In 'C' locale, _strftime_l returns 'Saturday, February 09, 2002' ## 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)
-[Country/Region Strings](../../c-runtime-library/country-region-strings.md)
-[_free_locale](free-locale.md)
-[_configthreadlocale](configthreadlocale.md)
-[setlocale](../../preprocessor/setlocale.md)
-[Locale](../../c-runtime-library/locale.md)
-[localeconv](localeconv.md)
-[_mbclen, mblen, _mblen_l](mbclen-mblen-mblen-l.md)
-[strlen, wcslen, _mbslen, _mbslen_l, _mbstrlen, _mbstrlen_l](strlen-wcslen-mbslen-mbslen-l-mbstrlen-mbstrlen-l.md)
-[mbstowcs, _mbstowcs_l](mbstowcs-mbstowcs-l.md)
-[mbtowc, _mbtowc_l](mbtowc-mbtowc-l.md)
-[_setmbcp](setmbcp.md)
-[setlocale, _wsetlocale](setlocale-wsetlocale.md)
-[strcoll Functions](../../c-runtime-library/strcoll-functions.md)
-[strftime, wcsftime, _strftime_l, _wcsftime_l](strftime-wcsftime-strftime-l-wcsftime-l.md)
-[strxfrm, wcsxfrm, _strxfrm_l, _wcsxfrm_l](strxfrm-wcsxfrm-strxfrm-l-wcsxfrm-l.md)
-[wcstombs, _wcstombs_l](wcstombs-wcstombs-l.md)
-[wctomb, _wctomb_l](wctomb-wctomb-l.md)
+[Locale names, Languages, and Country/Region strings](../locale-names-languages-and-country-region-strings.md)\ +[Language strings](../language-strings.md)\ +[Country/Region strings](../country-region-strings.md)\ +[`_free_locale`](free-locale.md)\ +[`_configthreadlocale`](configthreadlocale.md)\ +[`setlocale`](../../preprocessor/setlocale.md)\ +[Locale](../locale.md)\ +[`localeconv`](localeconv.md)\ +[`_mbclen`, `mblen`, `_mblen_l`](mbclen-mblen-mblen-l.md)\ +[`strlen`, `wcslen`, `_mbslen`, `_mbslen_l`, `_mbstrlen`, `_mbstrlen_l`](strlen-wcslen-mbslen-mbslen-l-mbstrlen-mbstrlen-l.md)\ +[`mbstowcs`, `_mbstowcs_l`](mbstowcs-mbstowcs-l.md)\ +[`mbtowc`, `_mbtowc_l`](mbtowc-mbtowc-l.md)\ +[`_setmbcp`](setmbcp.md)\ +[`setlocale`, `_wsetlocale`](setlocale-wsetlocale.md)\ +[`strcoll` functions](../strcoll-functions.md)\ +[`strftime`, `wcsftime`, `_strftime_l`, `_wcsftime_l`](strftime-wcsftime-strftime-l-wcsftime-l.md)\ +[`strxfrm`, `wcsxfrm`, `_strxfrm_l`, `_wcsxfrm_l`](strxfrm-wcsxfrm-strxfrm-l-wcsxfrm-l.md)\ +[`wcstombs`, `_wcstombs_l`](wcstombs-wcstombs-l.md)\ +[`wctomb`, `_wctomb_l`](wctomb-wctomb-l.md) diff --git a/docs/c-runtime-library/reference/crt-alphabetical-function-reference.md b/docs/c-runtime-library/reference/crt-alphabetical-function-reference.md index 079a532a23e..43265128f6f 100644 --- a/docs/c-runtime-library/reference/crt-alphabetical-function-reference.md +++ b/docs/c-runtime-library/reference/crt-alphabetical-function-reference.md @@ -7,7 +7,7 @@ ms.assetid: c2169b0e-cd86-489a-a2fa-2ee15c03b5c2 --- # UCRT alphabetical function reference -The Universal C Runtime (UCRT, often just CRT) Library reference documentation is arranged alphabetically by routine. To find a CRT routine based on functionality, see [Universal C runtime routines by category](../../c-runtime-library/run-time-routines-by-category.md). +The Universal C Runtime (UCRT, often just CRT) Library reference documentation is arranged alphabetically by routine. To find a CRT routine based on functionality, see [Universal C runtime routines by category](../run-time-routines-by-category.md). ## A @@ -3501,4 +3501,4 @@ The Universal C Runtime (UCRT, often just CRT) Library reference documentation i ## See also -[C Run-Time Library Reference](../../c-runtime-library/c-run-time-library-reference.md)
+[C runtime library reference](../c-run-time-library-reference.md) diff --git a/docs/c-runtime-library/reference/crtcheckmemory.md b/docs/c-runtime-library/reference/crtcheckmemory.md index dbab57dfed4..323f1bbb349 100644 --- a/docs/c-runtime-library/reference/crtcheckmemory.md +++ b/docs/c-runtime-library/reference/crtcheckmemory.md @@ -21,23 +21,23 @@ Confirms the integrity of the memory blocks allocated in the debug heap (debug v int _CrtCheckMemory( void ); ``` -## Return Value +## Return value If successful, **_CrtCheckMemory** returns TRUE; otherwise, the function returns FALSE. ## Remarks -The **_CrtCheckMemory** function validates memory allocated by the debug heap manager by verifying the underlying base heap and inspecting every memory block. If an error or memory inconsistency is encountered in the underlying base heap, the debug header information, or the overwrite buffers, **_CrtCheckMemory** generates a debug report with information describing the error condition. When [_DEBUG](../../c-runtime-library/debug.md) isn't defined, calls to **_CrtCheckMemory** are removed during preprocessing. +The **_CrtCheckMemory** function validates memory allocated by the debug heap manager by verifying the underlying base heap and inspecting every memory block. If an error or memory inconsistency is encountered in the underlying base heap, the debug header information, or the overwrite buffers, **_CrtCheckMemory** generates a debug report with information describing the error condition. When [`_DEBUG`](../debug.md) isn't defined, calls to **_CrtCheckMemory** are removed during preprocessing. -The behavior of **_CrtCheckMemory** can be controlled by setting the bit fields of the [_crtDbgFlag](../../c-runtime-library/crtdbgflag.md) flag using the [_CrtSetDbgFlag](crtsetdbgflag.md) function. Turning the **_CRTDBG_CHECK_ALWAYS_DF** bit field ON results in **_CrtCheckMemory** being called every time a memory allocation operation is requested. Although this method slows down execution, it's useful for catching errors quickly. Turning the **_CRTDBG_ALLOC_MEM_DF** bit field OFF causes **_CrtCheckMemory** to not verify the heap and immediately return **TRUE**. +The behavior of **_CrtCheckMemory** can be controlled by setting the bit fields of the [`_crtDbgFlag`](../crtdbgflag.md) flag using the [`_CrtSetDbgFlag`](crtsetdbgflag.md) function. Turning the **_CRTDBG_CHECK_ALWAYS_DF** bit field ON results in **_CrtCheckMemory** being called every time a memory allocation operation is requested. Although this method slows down execution, it's useful for catching errors quickly. Turning the **_CRTDBG_ALLOC_MEM_DF** bit field OFF causes **_CrtCheckMemory** to not verify the heap and immediately return **TRUE**. -Because this function returns **TRUE** or **FALSE**, it can be passed to one of the [_ASSERT](assert-asserte-assert-expr-macros.md) macros to create a basic debugging error handling mechanism. The following example causes an assertion failure if corruption is detected in the heap: +Because this function returns **TRUE** or **FALSE**, it can be passed to one of the [`_ASSERT`](assert-asserte-assert-expr-macros.md) macros to create a basic debugging error handling mechanism. The following example causes an assertion failure if corruption is detected in the heap: ```C _ASSERTE( _CrtCheckMemory( ) ); ``` -For more information about how **_CrtCheckMemory** can be used with other debug functions, see [Heap State Reporting Functions](/visualstudio/debugger/crt-debug-heap-details). For an overview of memory management and the debug heap, see [CRT Debug Heap Details](/visualstudio/debugger/crt-debug-heap-details). +For more information about how **_CrtCheckMemory** can be used with other debug functions, see [Heap state reporting functions](/visualstudio/debugger/crt-debug-heap-details). For an overview of memory management and the debug heap, see [CRT debug heap details](/visualstudio/debugger/crt-debug-heap-details). ## Requirements @@ -45,18 +45,18 @@ For more information about how **_CrtCheckMemory** can be used with other debug |-------------|---------------------| |**_CrtCheckMemory**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Libraries -Debug versions of [C run-time libraries](../../c-runtime-library/crt-library-features.md) only. +Debug versions of [C run-time libraries](../crt-library-features.md) only. ## Example -For a sample of how to use **_CrtCheckMemory**, see [crt_dbg1](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/crt/crt_dbg1). +For a sample of how to use **_CrtCheckMemory**, see [`crt_dbg1`](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/crt/crt_dbg1). ## See also -[Debug Routines](../../c-runtime-library/debug-routines.md)
-[_crtDbgFlag](../../c-runtime-library/crtdbgflag.md)
-[_CrtSetDbgFlag](crtsetdbgflag.md)
+[Debug routines](../debug-routines.md)\ +[`_crtDbgFlag`](../crtdbgflag.md)\ +[`_CrtSetDbgFlag`](crtsetdbgflag.md) diff --git a/docs/c-runtime-library/reference/crtdbgbreak.md b/docs/c-runtime-library/reference/crtdbgbreak.md index 464e114d1ff..d4cc5b87590 100644 --- a/docs/c-runtime-library/reference/crtdbgbreak.md +++ b/docs/c-runtime-library/reference/crtdbgbreak.md @@ -20,7 +20,7 @@ Sets a break point on a particular line of code. (Used in debug mode only.) void _CrtDbgBreak( void ); ``` -## Return Value +## Return value There's no return value. @@ -28,7 +28,7 @@ There's no return value. The **_CrtDbgBreak** function sets a debug breakpoint on the particular line of code where the function resides. This function is used in debug mode only and is dependent on **_DEBUG** being previously defined. -For more information about using other hook-capable run-time functions and writing your own client-defined hook functions, see [Writing Your Own Debug Hook Functions](/visualstudio/debugger/debug-hook-function-writing). +For more information about using other hook-capable run-time functions and writing your own client-defined hook functions, see [Writing your own debug hook functions](/visualstudio/debugger/debug-hook-function-writing). ## Requirements @@ -38,9 +38,9 @@ For more information about using other hook-capable run-time functions and writi ## Libraries -Debug versions of [C run-time libraries](../../c-runtime-library/crt-library-features.md) only. +Debug versions of [C run-time libraries](../crt-library-features.md) only. ## See also -[Debug Routines](../../c-runtime-library/debug-routines.md)
-[__debugbreak](../../intrinsics/debugbreak.md)
+[Debug routines](../debug-routines.md)\ +[`__debugbreak`](../../intrinsics/debugbreak.md) diff --git a/docs/c-runtime-library/reference/crtdbgreport-crtdbgreportw.md b/docs/c-runtime-library/reference/crtdbgreport-crtdbgreportw.md index 787f11612e2..941e02cac31 100644 --- a/docs/c-runtime-library/reference/crtdbgreport-crtdbgreportw.md +++ b/docs/c-runtime-library/reference/crtdbgreport-crtdbgreportw.md @@ -37,34 +37,34 @@ int _CrtDbgReportW( ### Parameters -*`reportType`*
+*`reportType`*\ Report type: **_CRT_WARN**, **_CRT_ERROR**, and **_CRT_ASSERT**. -*`filename`*
+*`filename`*\ Pointer to name of source file where assert/report occurred or **NULL**. -*`lineNumber`*
+*`lineNumber`*\ Line number in source file where assert/report occurred or **NULL**. -*`moduleName`*
+*`moduleName`*\ Pointer to name of module (.exe or .dll) where assert or report occurred. -*`format`*
+*`format`*\ Pointer to format-control string used to create the user message. -*`argument`*
+*`argument`*\ Optional substitution arguments used by *`format`*. -## Return Value +## Return value For all report destinations, **_CrtDbgReport** and **_CrtDbgReportW** return -1 if an error occurs and 0 if no errors are encountered. However, when the report destination is a debug message window and the user chooses the **Retry** button, these functions return 1. If the user chooses the **Abort** button in the Debug Message window, these functions immediately abort and don't return a value. -The [_RPT, _RPTF](rpt-rptf-rptw-rptfw-macros.md) debug macros call **_CrtDbgReport** to generate their debug reports. The wide-character versions of these macros, along with [_ASSERT, _ASSERTE](assert-asserte-assert-expr-macros.md), [_RPTW](rpt-rptf-rptw-rptfw-macros.md) -and [_RPTFW](rpt-rptf-rptw-rptfw-macros.md), use **_CrtDbgReportW** to generate their debug reports. When **_CrtDbgReport** or **_CrtDbgReportW** return 1, these macros start the debugger, if just-in-time (JIT) debugging is enabled. +The [`_RPT`, `_RPTF`](rpt-rptf-rptw-rptfw-macros.md) debug macros call **_CrtDbgReport** to generate their debug reports. The wide-character versions of these macros, along with [`_ASSERT`, `_ASSERTE`](assert-asserte-assert-expr-macros.md), [`_RPTW`](rpt-rptf-rptw-rptfw-macros.md) +and [`_RPTFW`](rpt-rptf-rptw-rptfw-macros.md), use **_CrtDbgReportW** to generate their debug reports. When **_CrtDbgReport** or **_CrtDbgReportW** return 1, these macros start the debugger, if just-in-time (JIT) debugging is enabled. ## Remarks -**_CrtDbgReport** and **_CrtDbgReportW** can send the debug report to three different destinations: a debug report file, a debug monitor (the Visual Studio debugger), or a debug message window. Two configuration functions, [_CrtSetReportMode](crtsetreportmode.md) and [_CrtSetReportFile](crtsetreportfile.md), are used to specify the destination or destinations for each report type. These functions allow the reporting destination or destinations for each report type to be separately controlled. For example, it's possible to specify that a *`reportType`* of **_CRT_WARN** only goes to the debug monitor, while a *`reportType`* of **_CRT_ASSERT** goes to both a debug message window and a user-defined report file. +**_CrtDbgReport** and **_CrtDbgReportW** can send the debug report to three different destinations: a debug report file, a debug monitor (the Visual Studio debugger), or a debug message window. Two configuration functions, [`_CrtSetReportMode`](crtsetreportmode.md) and [`_CrtSetReportFile`](crtsetreportfile.md), are used to specify the destination or destinations for each report type. These functions allow the reporting destination or destinations for each report type to be separately controlled. For example, it's possible to specify that a *`reportType`* of **_CRT_WARN** only goes to the debug monitor, while a *`reportType`* of **_CRT_ASSERT** goes to both a debug message window and a user-defined report file. **_CrtDbgReportW** is the wide-character version of **_CrtDbgReport**. All its output and string parameters are in wide-character strings; otherwise it's identical to the single-byte character version. @@ -80,9 +80,9 @@ The following table lists the available choices for the report mode or modes and |**_CRTDBG_MODE_FILE**|**_CRTDBG_FILE_STDERR**|Writes message to **stderr**.| |**_CRTDBG_MODE_FILE**|**_CRTDBG_FILE_STDOUT**|Writes message to **stdout**.| -The report can be sent to one, two, or three destinations or to no destination at all. For more information about specifying the report mode or modes and report file, see the [_CrtSetReportMode](crtsetreportmode.md) and [_CrtSetReportFile](crtsetreportfile.md) functions. For more information about using the debug macros and reporting functions, see [Macros for Reporting](/visualstudio/debugger/macros-for-reporting). +The report can be sent to one, two, or three destinations or to no destination at all. For more information about specifying the report mode or modes and report file, see the [`_CrtSetReportMode`](crtsetreportmode.md) and [`_CrtSetReportFile`](crtsetreportfile.md) functions. For more information about using the debug macros and reporting functions, see [Macros for reporting](/visualstudio/debugger/macros-for-reporting). -If your application needs more flexibility than that provided by **_CrtDbgReport** and **_CrtDbgReportW**, you can write your own reporting function and hook it into the C run-time library reporting mechanism by using the [_CrtSetReportHook](crtsetreporthook.md) function. +If your application needs more flexibility than that provided by **_CrtDbgReport** and **_CrtDbgReportW**, you can write your own reporting function and hook it into the C run-time library reporting mechanism by using the [`_CrtSetReportHook`](crtsetreporthook.md) function. ## Requirements @@ -91,11 +91,11 @@ If your application needs more flexibility than that provided by **_CrtDbgReport |**_CrtDbgReport**|\| |**_CrtDbgReportW**|\| -**_CrtDbgReport** and **_CrtDbgReportW** are Microsoft extensions. For more information, see [Compatibility](../../c-runtime-library/compatibility.md). +**_CrtDbgReport** and **_CrtDbgReportW** are Microsoft extensions. For more information, see [Compatibility](../compatibility.md). ## Libraries -Debug versions of [C run-time libraries](../../c-runtime-library/crt-library-features.md) only. +Debug versions of [C run-time libraries](../crt-library-features.md) only. ## Example @@ -110,12 +110,12 @@ int main(int argc, char *argv[]) { } ``` -See [crt_dbg2](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/crt/crt_dbg2) for an example of how to change the report function. +See [`crt_dbg2`](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/crt/crt_dbg2) for an example of how to change the report function. ## See also -[Debug Routines](../../c-runtime-library/debug-routines.md)
-[_CrtSetReportMode](crtsetreportmode.md)
-[_CrtSetReportFile](crtsetreportfile.md)
-[printf, _printf_l, wprintf, _wprintf_l](printf-printf-l-wprintf-wprintf-l.md)
-[_DEBUG](../../c-runtime-library/debug.md)
+[Debug routines](../debug-routines.md)\ +[`_CrtSetReportMode`](crtsetreportmode.md)\ +[`_CrtSetReportFile`](crtsetreportfile.md)\ +[`printf`, `_printf_l`, `wprintf`, `_wprintf_l`](printf-printf-l-wprintf-wprintf-l.md)\ +[`_DEBUG`](../debug.md) diff --git a/docs/c-runtime-library/reference/crtdoforallclientobjects.md b/docs/c-runtime-library/reference/crtdoforallclientobjects.md index cbb883829ca..aacfaad7d77 100644 --- a/docs/c-runtime-library/reference/crtdoforallclientobjects.md +++ b/docs/c-runtime-library/reference/crtdoforallclientobjects.md @@ -25,21 +25,21 @@ void _CrtDoForAllClientObjects( ### Parameters -*`pfn`*
+*`pfn`*\ Pointer to the application-supplied function callback function. The first parameter to this function points to the data. The second parameter is the context pointer that is passed to the call to **_CrtDoForAllClientObjects**. -*`context`*
+*`context`*\ Pointer to the application-supplied context to pass to the application-supplied function. ## Remarks The **_CrtDoForAllClientObjects** function searches the heap's linked list for memory blocks with the **_CLIENT_BLOCK** type and calls the application-supplied function when a block of this type is found. The found block and the *`context`* parameter are passed as arguments to the application-supplied function. During debugging, an application can track a specific group of allocations by explicitly calling the debug heap functions to allocate the memory and specifying that the blocks be assigned the **_CLIENT_BLOCK** block type. These blocks can then be tracked separately and reported on differently during leak detection and memory state reporting. -If the **_CRTDBG_ALLOC_MEM_DF** bit field of the [_crtDbgFlag](../../c-runtime-library/crtdbgflag.md) flag isn't turned on, **_CrtDoForAllClientObjects** immediately returns. When [_DEBUG](../../c-runtime-library/debug.md) isn't defined, calls to **_CrtDoForAllClientObjects** are removed during preprocessing. +If the **_CRTDBG_ALLOC_MEM_DF** bit field of the [`_crtDbgFlag`](../crtdbgflag.md) flag isn't turned on, **_CrtDoForAllClientObjects** immediately returns. When [`_DEBUG`](../debug.md) isn't defined, calls to **_CrtDoForAllClientObjects** are removed during preprocessing. -For more information about the **_CLIENT_BLOCK** type and how it can be used by other debug functions, see [Types of blocks on the debug heap](/visualstudio/debugger/crt-debug-heap-details). For information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT Debug Heap Details](/visualstudio/debugger/crt-debug-heap-details). +For more information about the **_CLIENT_BLOCK** type and how it can be used by other debug functions, see [Types of blocks on the debug heap](/visualstudio/debugger/crt-debug-heap-details). For information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT debug heap details](/visualstudio/debugger/crt-debug-heap-details). -If *`pfn`* is **NULL**, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, [errno, _doserrno, _sys_errlist, and _sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md) is set to **EINVAL** and the function returns. +If *`pfn`* is **NULL**, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md) is set to **EINVAL** and the function returns. ## Requirements @@ -47,13 +47,13 @@ If *`pfn`* is **NULL**, the invalid parameter handler is invoked, as described i |-------------|---------------------| |**_CrtDoForAllClientObjects**|\, \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). **Libraries:** Debug versions of universal C run-time libraries only. ## See also -[Debug Routines](../../c-runtime-library/debug-routines.md)
-[_CrtSetDbgFlag](crtsetdbgflag.md)
-[Heap State Reporting Functions](/visualstudio/debugger/crt-debug-heap-details)
-[_CrtReportBlockType](crtreportblocktype.md)
+[Debug routines](../debug-routines.md)\ +[`_CrtSetDbgFlag`](crtsetdbgflag.md)\ +[Heap state reporting functions](/visualstudio/debugger/crt-debug-heap-details)\ +[`_CrtReportBlockType`](crtreportblocktype.md) diff --git a/docs/c-runtime-library/reference/crtdumpmemoryleaks.md b/docs/c-runtime-library/reference/crtdumpmemoryleaks.md index 50263ce02b3..0295e810f28 100644 --- a/docs/c-runtime-library/reference/crtdumpmemoryleaks.md +++ b/docs/c-runtime-library/reference/crtdumpmemoryleaks.md @@ -20,21 +20,21 @@ Dumps all the memory blocks in the debug heap when a memory leak has occurred (d int _CrtDumpMemoryLeaks( void ); ``` -## Return Value +## Return value **`_CrtDumpMemoryLeaks`** returns `TRUE` if a memory leak is found. Otherwise, the function returns `FALSE`. ## Remarks -The **`_CrtDumpMemoryLeaks`** function determines whether a memory leak has occurred since the start of program execution. When a leak is found, the debug header information for all the objects in the heap is dumped in a user-readable form. When [`_DEBUG`](../../c-runtime-library/debug.md) isn't defined, calls to **`_CrtDumpMemoryLeaks`** are removed during preprocessing. +The **`_CrtDumpMemoryLeaks`** function determines whether a memory leak has occurred since the start of program execution. When a leak is found, the debug header information for all the objects in the heap is dumped in a user-readable form. When [`_DEBUG`](../debug.md) isn't defined, calls to **`_CrtDumpMemoryLeaks`** are removed during preprocessing. -**`_CrtDumpMemoryLeaks`** is frequently called at the end of program execution to verify that all memory allocated by the application has been freed. The function can be called automatically at program termination by turning on the **`_CRTDBG_LEAK_CHECK_DF`** bit field of the [`_crtDbgFlag`](../../c-runtime-library/crtdbgflag.md) flag using the [`_CrtSetDbgFlag`](crtsetdbgflag.md) function. +**`_CrtDumpMemoryLeaks`** is frequently called at the end of program execution to verify that all memory allocated by the application has been freed. The function can be called automatically at program termination by turning on the **`_CRTDBG_LEAK_CHECK_DF`** bit field of the [`_crtDbgFlag`](../crtdbgflag.md) flag using the [`_CrtSetDbgFlag`](crtsetdbgflag.md) function. **`_CrtDumpMemoryLeaks`** calls [`_CrtMemCheckpoint`](crtmemcheckpoint.md) to obtain the current state of the heap and then scans the state for blocks that haven't been freed. When an unfreed block is encountered, **`_CrtDumpMemoryLeaks`** calls [`_CrtMemDumpAllObjectsSince`](crtmemdumpallobjectssince.md) to dump information for all the objects allocated in the heap from the start of program execution. By default, internal C run-time blocks (**`_CRT_BLOCK`**) aren't included in memory dump operations. The [`_CrtSetDbgFlag`](crtsetdbgflag.md) function can be used to turn on the **`_CRTDBG_CHECK_CRT_DF`** bit of **`_crtDbgFlag`** to include these blocks in the leak detection process. -For more information about heap state functions and the **`_CrtMemState`** structure, see [Heap State Reporting Functions](/visualstudio/debugger/crt-debug-heap-details). For more information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT Debug Heap Details](/visualstudio/debugger/crt-debug-heap-details). +For more information about heap state functions and the **`_CrtMemState`** structure, see [Heap state reporting functions](/visualstudio/debugger/crt-debug-heap-details). For more information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT debug heap details](/visualstudio/debugger/crt-debug-heap-details). ## Requirements @@ -42,11 +42,11 @@ For more information about heap state functions and the **`_CrtMemState`** struc |-------------|---------------------| |**`_CrtDumpMemoryLeaks`**|``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Libraries -Debug versions of [C run-time libraries](../../c-runtime-library/crt-library-features.md) only. +Debug versions of [C run-time libraries](../crt-library-features.md) only. ## Example @@ -54,4 +54,4 @@ For a sample of how to use **`_CrtDumpMemoryLeaks`**, see [`crt_dbg1`](https://g ## See also -[Debug Routines](../../c-runtime-library/debug-routines.md) +[Debug routines](../debug-routines.md) diff --git a/docs/c-runtime-library/reference/crtgetallochook.md b/docs/c-runtime-library/reference/crtgetallochook.md index df324f10e7e..e746ffce3fa 100644 --- a/docs/c-runtime-library/reference/crtgetallochook.md +++ b/docs/c-runtime-library/reference/crtgetallochook.md @@ -20,7 +20,7 @@ Retrieves the current client-defined allocation function for hooking into the C _CRT_ALLOC_HOOK _CrtGetAllocHook( void ); ``` -## Return Value +## Return value Returns the currently defined allocation hook function. @@ -28,7 +28,7 @@ Returns the currently defined allocation hook function. **_CrtGetAllocHook** retrieves the current client-defined application hook function for the C run-time debug library memory allocation process. -For more information about using other hook-capable run-time functions and writing your own client-defined hook functions, see [Debug Hook Function Writing](/visualstudio/debugger/debug-hook-function-writing). +For more information about using other hook-capable run-time functions and writing your own client-defined hook functions, see [Debug hook function writing](/visualstudio/debugger/debug-hook-function-writing). ## Requirements @@ -36,13 +36,13 @@ For more information about using other hook-capable run-time functions and writi |-------------|---------------------| |**_CrtGetAllocHook**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Libraries -Debug versions of [C run-time libraries](../../c-runtime-library/crt-library-features.md) only. +Debug versions of [C run-time libraries](../crt-library-features.md) only. ## See also -[Debug Routines](../../c-runtime-library/debug-routines.md)
-[_CrtSetAllocHook](crtsetallochook.md)
+[Debug routines](../debug-routines.md)\ +[`_CrtSetAllocHook`](crtsetallochook.md) diff --git a/docs/c-runtime-library/reference/crtgetdumpclient.md b/docs/c-runtime-library/reference/crtgetdumpclient.md index 3207f438615..6456ee967a7 100644 --- a/docs/c-runtime-library/reference/crtgetdumpclient.md +++ b/docs/c-runtime-library/reference/crtgetdumpclient.md @@ -20,7 +20,7 @@ Retrieves the current application-defined function for dumping the **_CLIENT_BLO _CRT_DUMP_CLIENT _CrtGetDumpClient( void ); ``` -## Return Value +## Return value Returns the current dump routine. @@ -28,7 +28,7 @@ Returns the current dump routine. The **_CrtGetDumpClient** function retrieves the current hook function for dumping objects stored in the **_CLIENT_BLOCK** memory blocks. -For more information about using other hook-capable run-time functions and writing your own client-defined hook functions, see [Debug Hook Function Writing](/visualstudio/debugger/debug-hook-function-writing). +For more information about using other hook-capable run-time functions and writing your own client-defined hook functions, see [Debug hook function writing](/visualstudio/debugger/debug-hook-function-writing). ## Requirements @@ -36,14 +36,14 @@ For more information about using other hook-capable run-time functions and writi |-------------|---------------------| |**_CrtGetDumpClient**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Libraries -Debug versions of [C run-time libraries](../../c-runtime-library/crt-library-features.md) only. +Debug versions of [C run-time libraries](../crt-library-features.md) only. ## See also -[Debug Routines](../../c-runtime-library/debug-routines.md)
-[_CrtReportBlockType](crtreportblocktype.md)
-[_CrtSetDumpClient](crtsetdumpclient.md)
+[Debug routines](../debug-routines.md)\ +[`_CrtReportBlockType`](crtreportblocktype.md)\ +[`_CrtSetDumpClient`](crtsetdumpclient.md) diff --git a/docs/c-runtime-library/reference/crtgetreporthook.md b/docs/c-runtime-library/reference/crtgetreporthook.md index 3e57a3b0331..34f0d4e98ac 100644 --- a/docs/c-runtime-library/reference/crtgetreporthook.md +++ b/docs/c-runtime-library/reference/crtgetreporthook.md @@ -20,7 +20,7 @@ Retrieves the client-defined reporting function for hooking it into the C run ti _CRT_REPORT_HOOK _CrtGetReportHook( void ); ``` -## Return Value +## Return value Returns the current client-defined reporting function. @@ -28,7 +28,7 @@ Returns the current client-defined reporting function. **_CrtGetReportHook** allows an application to retrieve the current reporting function for the C run-time debug library reporting process. -For more information about using other hook-capable run-time functions and writing your own client-defined hook functions, see [Debug Hook Function Writing](/visualstudio/debugger/debug-hook-function-writing). +For more information about using other hook-capable run-time functions and writing your own client-defined hook functions, see [Debug hook function writing](/visualstudio/debugger/debug-hook-function-writing). ## Requirements @@ -36,17 +36,17 @@ For more information about using other hook-capable run-time functions and writi |-------------|---------------------| |**_CrtGetReportHook**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Libraries -Debug versions of [C run-time libraries](../../c-runtime-library/crt-library-features.md) only. +Debug versions of [C run-time libraries](../crt-library-features.md) only. ## Example -For a sample of how to use **_CrtSetReportHook**, see [report](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/crt/report). +For a sample of how to use **_CrtSetReportHook**, see [`report`](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/crt/report). ## See also -[Debug Routines](../../c-runtime-library/debug-routines.md)
-[_CrtSetReportHook](crtsetreporthook.md)
+[Debug routines](../debug-routines.md)\ +[`_CrtSetReportHook`](crtsetreporthook.md) diff --git a/docs/c-runtime-library/reference/crtismemoryblock.md b/docs/c-runtime-library/reference/crtismemoryblock.md index af7547d5b19..790f6e07c58 100644 --- a/docs/c-runtime-library/reference/crtismemoryblock.md +++ b/docs/c-runtime-library/reference/crtismemoryblock.md @@ -28,39 +28,39 @@ int _CrtIsMemoryBlock( ### Parameters -*userData*
+*`userData`*\ Pointer to the beginning of the memory block to verify. -*size*
+*`size`*\ Size of the specified block (in bytes). -*requestNumber*
+*`requestNumber`*\ Pointer to the allocation number of the block or **NULL**. -*filename*
+*`filename`*\ Pointer to the name of the source file that requested the block or **NULL**. -*lineNumber*
+*`lineNumber`*\ Pointer to the line number in the source file or **NULL**. -## Return Value +## Return value **_CrtIsMemoryBlock** returns **TRUE** if the specified memory block is located within the local heap and has a valid debug heap block type identifier; otherwise, the function returns **FALSE**. ## Remarks -The **_CrtIsMemoryBlock** function verifies that a specified memory block is located within the application's local heap and that it has a valid block type identifier. This function can also be used to obtain the object allocation order number and the source file name/line number where the memory block allocation was originally requested. A non-**NULL** value passed in a *requestNumber*, *filename*, or *lineNumber* parameter causes **_CrtIsMemoryBlock** to set the parameter to the value in the memory block's debug header, if it finds the block in the local heap. When [_DEBUG](../../c-runtime-library/debug.md) isn't defined, calls to **_CrtIsMemoryBlock** are removed during preprocessing. +The **_CrtIsMemoryBlock** function verifies that a specified memory block is located within the application's local heap and that it has a valid block type identifier. This function can also be used to obtain the object allocation order number and the source file name/line number where the memory block allocation was originally requested. A non-**NULL** value passed in a *`requestNumber`*, *`filename`*, or *`lineNumber`* parameter causes **_CrtIsMemoryBlock** to set the parameter to the value in the memory block's debug header, if it finds the block in the local heap. When [`_DEBUG`](../debug.md) isn't defined, calls to **_CrtIsMemoryBlock** are removed during preprocessing. -If **_CrtIsMemoryBlock** fails, it returns **FALSE**, and the output parameters are initialized to default values: *requestNumber* and **lineNumber** are set to 0 and *filename* is set to **NULL**. +If **_CrtIsMemoryBlock** fails, it returns **FALSE**, and the output parameters are initialized to default values: *`requestNumber`* and **lineNumber** are set to 0 and *`filename`* is set to **NULL**. -Because this function returns **TRUE** or **FALSE**, it can be passed to one of the [_ASSERT](assert-asserte-assert-expr-macros.md) macros to create a basic debugging error handling mechanism. The following example causes an assertion failure if the specified address isn't located within the local heap: +Because this function returns **TRUE** or **FALSE**, it can be passed to one of the [`_ASSERT`](assert-asserte-assert-expr-macros.md) macros to create a basic debugging error handling mechanism. The following example causes an assertion failure if the specified address isn't located within the local heap: ```C _ASSERTE( _CrtIsMemoryBlock( userData, size, &requestNumber, &filename, &linenumber ) ); ``` -For more information about how **_CrtIsMemoryBlock** can be used with other debug functions and macros, see [Macros for Reporting](/visualstudio/debugger/macros-for-reporting). For information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT Debug Heap Details](/visualstudio/debugger/crt-debug-heap-details). +For more information about how **_CrtIsMemoryBlock** can be used with other debug functions and macros, see [Macros for reporting](/visualstudio/debugger/macros-for-reporting). For information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT debug heap details](/visualstudio/debugger/crt-debug-heap-details). ## Requirements @@ -68,16 +68,16 @@ For more information about how **_CrtIsMemoryBlock** can be used with other debu |-------------|---------------------| |**_CrtIsMemoryBlock**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Libraries -Debug versions of [C run-time libraries](../../c-runtime-library/crt-library-features.md) only. +Debug versions of [C run-time libraries](../crt-library-features.md) only. ## Example -See the example for the [_CrtIsValidHeapPointer](crtisvalidheappointer.md) article. +See the example for the [`_CrtIsValidHeapPointer`](crtisvalidheappointer.md) article. ## See also -[Debug Routines](../../c-runtime-library/debug-routines.md)
+[Debug routines](../debug-routines.md) diff --git a/docs/c-runtime-library/reference/crtisvalidheappointer.md b/docs/c-runtime-library/reference/crtisvalidheappointer.md index 96e0060f8d5..11601bdbed9 100644 --- a/docs/c-runtime-library/reference/crtisvalidheappointer.md +++ b/docs/c-runtime-library/reference/crtisvalidheappointer.md @@ -26,13 +26,13 @@ int _CrtIsValidHeapPointer( *`userData`*\ Pointer to the beginning of an allocated memory block. -## Return Value +## Return value **`_CrtIsValidHeapPointer`** returns `TRUE` if the specified pointer is in the heap shared by all CRT library instances. In versions of the CRT before Visual Studio 2010, this function returns `TRUE` if the specified pointer is in the local heap. Otherwise, the function returns `FALSE`. ## Remarks -We don't recommend that you use this function. Starting with the Visual Studio 2010 CRT library, all CRT libraries share one OS heap, the *process heap*. The **`_CrtIsValidHeapPointer`** function reports whether the pointer was allocated in a CRT heap, but not that it was allocated by the caller's CRT library. For example, consider a block allocated by using the Visual Studio 2010 version of the CRT library. If the **`_CrtIsValidHeapPointer`** function exported by the Visual Studio 2012 version of the CRT library tests the pointer, it returns `TRUE`. This test is no longer useful. In versions of the CRT library before Visual Studio 2010, the function is used to ensure that a specific memory address is within the local heap. The local heap refers to the heap created and managed by a particular instance of the C run-time library. If a dynamic-link library (DLL) contains a static link to the run-time library, it has its own instance of the run-time heap, and therefore its own heap, independent of the application's local heap. When [`_DEBUG`](../../c-runtime-library/debug.md) isn't defined, calls to **`_CrtIsValidHeapPointer`** are removed during preprocessing. +We don't recommend that you use this function. Starting with the Visual Studio 2010 CRT library, all CRT libraries share one OS heap, the *process heap*. The **`_CrtIsValidHeapPointer`** function reports whether the pointer was allocated in a CRT heap, but not that it was allocated by the caller's CRT library. For example, consider a block allocated by using the Visual Studio 2010 version of the CRT library. If the **`_CrtIsValidHeapPointer`** function exported by the Visual Studio 2012 version of the CRT library tests the pointer, it returns `TRUE`. This test is no longer useful. In versions of the CRT library before Visual Studio 2010, the function is used to ensure that a specific memory address is within the local heap. The local heap refers to the heap created and managed by a particular instance of the C run-time library. If a dynamic-link library (DLL) contains a static link to the run-time library, it has its own instance of the run-time heap, and therefore its own heap, independent of the application's local heap. When [`_DEBUG`](../debug.md) isn't defined, calls to **`_CrtIsValidHeapPointer`** are removed during preprocessing. Because this function returns `TRUE` or `FALSE`, it can be passed to one of the [`_ASSERT`](assert-asserte-assert-expr-macros.md) macros to create a basic debugging error handling mechanism. The following example causes an assertion failure if the specified address isn't located within the local heap: @@ -40,7 +40,7 @@ Because this function returns `TRUE` or `FALSE`, it can be passed to one of the _ASSERTE( _CrtIsValidHeapPointer( userData ) ); ``` -For more information about how **`_CrtIsValidHeapPointer`** can be used with other debug functions and macros, see [Macros for Reporting](/visualstudio/debugger/macros-for-reporting). For information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT Debug Heap Details](/visualstudio/debugger/crt-debug-heap-details). +For more information about how **`_CrtIsValidHeapPointer`** can be used with other debug functions and macros, see [Macros for reporting](/visualstudio/debugger/macros-for-reporting). For information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT debug heap details](/visualstudio/debugger/crt-debug-heap-details). ## Requirements @@ -48,11 +48,11 @@ For more information about how **`_CrtIsValidHeapPointer`** can be used with oth |-------------|---------------------| |**`_CrtIsValidHeapPointer`**|``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Libraries -Debug versions of [C run-time libraries](../../c-runtime-library/crt-library-features.md) only. +Debug versions of [C run-time libraries](../crt-library-features.md) only. ## Example @@ -110,4 +110,4 @@ my_pointer is within the local heap. ## See also -[Debug Routines](../../c-runtime-library/debug-routines.md) +[Debug routines](../debug-routines.md) diff --git a/docs/c-runtime-library/reference/crtisvalidpointer.md b/docs/c-runtime-library/reference/crtisvalidpointer.md index 7fb09d6ec88..43e974fdc62 100644 --- a/docs/c-runtime-library/reference/crtisvalidpointer.md +++ b/docs/c-runtime-library/reference/crtisvalidpointer.md @@ -26,30 +26,30 @@ int _CrtIsValidPointer( ### Parameters -*address*
+*`address`*\ Points to the beginning of the memory range to test for validity. -*size*
+*`size`*\ Size of the specified memory range (in bytes). -*access*
+*`access`*\ Read/write accessibility to determine for the memory range. -## Return Value +## Return value **_CrtIsValidPointer** returns TRUE if the specified pointer isn't null. In CRT library versions before Visual Studio 2010, returns TRUE if the memory range is valid for the specified operation or operations. Otherwise, the function returns FALSE. ## Remarks -In the CRT library in Visual Studio 2010 and later versions, the *size* and *access* parameters are ignored, and **_CrtIsValidPointer** only verifies that the specified *address* isn't null. Because this test is easy to perform yourself, we don't recommend you use this function. In versions before Visual Studio 2010, the function verifies that the memory range beginning at *address* and extending for *size* bytes is valid for the specified accessibility operation or operations. When *access* is set to TRUE, the memory range is verified for both reading and writing. When *access* is FALSE, the memory range is only validated for reading. When [_DEBUG](../../c-runtime-library/debug.md) isn't defined, calls to **_CrtIsValidPointer** are removed during preprocessing. +In the CRT library in Visual Studio 2010 and later versions, the *`size`* and *`access`* parameters are ignored, and **_CrtIsValidPointer** only verifies that the specified *`address`* isn't null. Because this test is easy to perform yourself, we don't recommend you use this function. In versions before Visual Studio 2010, the function verifies that the memory range beginning at *`address`* and extending for *`size`* bytes is valid for the specified accessibility operation or operations. When *`access`* is set to TRUE, the memory range is verified for both reading and writing. When *`access`* is FALSE, the memory range is only validated for reading. When [`_DEBUG`](../debug.md) isn't defined, calls to **_CrtIsValidPointer** are removed during preprocessing. -Because this function returns TRUE or FALSE, it can be passed to one of the [_ASSERT](assert-asserte-assert-expr-macros.md) macros to create a basic debugging error handling mechanism. The following example causes an assertion failure if the memory range isn't valid for both reading and writing operations: +Because this function returns TRUE or FALSE, it can be passed to one of the [`_ASSERT`](assert-asserte-assert-expr-macros.md) macros to create a basic debugging error handling mechanism. The following example causes an assertion failure if the memory range isn't valid for both reading and writing operations: ```C _ASSERTE( _CrtIsValidPointer( address, size, TRUE ) ); ``` -For more information about how **_CrtIsValidPointer** can be used with other debug functions and macros, see [Macros for Reporting](/visualstudio/debugger/macros-for-reporting). For information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT Debug Heap Details](/visualstudio/debugger/crt-debug-heap-details). +For more information about how **_CrtIsValidPointer** can be used with other debug functions and macros, see [Macros for reporting](/visualstudio/debugger/macros-for-reporting). For information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT debug heap details](/visualstudio/debugger/crt-debug-heap-details). ## Requirements @@ -57,16 +57,16 @@ For more information about how **_CrtIsValidPointer** can be used with other deb |-------------|---------------------| |**_CrtIsValidPointer**|\| -**_CrtIsValidPointer** is a Microsoft extension. For compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +**_CrtIsValidPointer** is a Microsoft extension. For compatibility information, see [Compatibility](../compatibility.md). ## Libraries -Debug versions of [C run-time libraries](../../c-runtime-library/crt-library-features.md) only. +Debug versions of [C run-time libraries](../crt-library-features.md) only. ## Example -See the example for the [_CrtIsValidHeapPointer](crtisvalidheappointer.md) article. +See the example for the [`_CrtIsValidHeapPointer`](crtisvalidheappointer.md) article. ## See also -[Debug Routines](../../c-runtime-library/debug-routines.md)
+[Debug routines](../debug-routines.md) diff --git a/docs/c-runtime-library/reference/crtmemcheckpoint.md b/docs/c-runtime-library/reference/crtmemcheckpoint.md index 62e1ed54f58..568c916ef17 100644 --- a/docs/c-runtime-library/reference/crtmemcheckpoint.md +++ b/docs/c-runtime-library/reference/crtmemcheckpoint.md @@ -24,18 +24,18 @@ void _CrtMemCheckpoint( ### Parameters -*state*
+*`state`*\ Pointer to **_CrtMemState** structure to fill with the memory checkpoint. ## Remarks -The **_CrtMemCheckpoint** function creates a snapshot of the current state of the debug heap at any given moment. This snapshot can be used by other heap state functions such as [_CrtMemDifference](crtmemdifference.md) to help detect memory leaks and other problems. When [_DEBUG](../../c-runtime-library/debug.md) isn't defined, calls to **_CrtMemState** are removed during preprocessing. +The **_CrtMemCheckpoint** function creates a snapshot of the current state of the debug heap at any given moment. This snapshot can be used by other heap state functions such as [`_CrtMemDifference`](crtmemdifference.md) to help detect memory leaks and other problems. When [`_DEBUG`](../debug.md) isn't defined, calls to **_CrtMemState** are removed during preprocessing. -The application must pass a pointer to a previously allocated instance of the **_CrtMemState** structure, defined in Crtdbg.h, in the *state* parameter. If **_CrtMemCheckpoint** encounters an error during the checkpoint creation, the function generates a **_CRT_WARN** debug report describing the problem. +The application must pass a pointer to a previously allocated instance of the **_CrtMemState** structure, defined in Crtdbg.h, in the *`state`* parameter. If **_CrtMemCheckpoint** encounters an error during the checkpoint creation, the function generates a **_CRT_WARN** debug report describing the problem. -For more information about heap state functions and the **_CrtMemState** structure, see [Heap State Reporting Functions](/visualstudio/debugger/crt-debug-heap-details). For more information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT Debug Heap Details](/visualstudio/debugger/crt-debug-heap-details). +For more information about heap state functions and the **_CrtMemState** structure, see [Heap state reporting functions](/visualstudio/debugger/crt-debug-heap-details). For more information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT debug heap details](/visualstudio/debugger/crt-debug-heap-details). -If *state* is **NULL**, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, [errno, _doserrno, _sys_errlist, and _sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md) is set to **EINVAL** and the function returns. +If *`state`* is **NULL**, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md) is set to **EINVAL** and the function returns. ## Requirements @@ -43,11 +43,11 @@ If *state* is **NULL**, the invalid parameter handler is invoked, as described i |-------------|---------------------| |**_CrtMemCheckpoint**|\, \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). **Libraries:** Debug versions of the UCRT only. ## See also -[Debug Routines](../../c-runtime-library/debug-routines.md)
-[_CrtMemDifference](crtmemdifference.md)
+[Debug routines](../debug-routines.md)\ +[`_CrtMemDifference`](crtmemdifference.md) diff --git a/docs/c-runtime-library/reference/crtmemdifference.md b/docs/c-runtime-library/reference/crtmemdifference.md index cb1c7a51316..ddcc8447a64 100644 --- a/docs/c-runtime-library/reference/crtmemdifference.md +++ b/docs/c-runtime-library/reference/crtmemdifference.md @@ -34,21 +34,21 @@ Pointer to an earlier memory state (**`_CrtMemState`** structure). *`newState`*\ Pointer to a later memory state (**`_CrtMemState`** structure). -## Return Value +## Return value If the difference in memory states is significant, **`_CrtMemDifference`** returns `TRUE`. Otherwise, the function returns FALSE. ## Remarks -The **`_CrtMemDifference`** function compares *`oldState`* and *`newState`* and stores their differences in *`stateDiff`*, which can then be used by the app to detect memory leaks and other memory problems. When [_DEBUG](../../c-runtime-library/debug.md) isn't defined, calls to **`_CrtMemDifference`** are removed during preprocessing. +The **`_CrtMemDifference`** function compares *`oldState`* and *`newState`* and stores their differences in *`stateDiff`*, which can then be used by the app to detect memory leaks and other memory problems. When [`_DEBUG`](../debug.md) isn't defined, calls to **`_CrtMemDifference`** are removed during preprocessing. -*`newState`* and *`oldState`* must each be a valid pointer to a **`_CrtMemState`** structure, defined in `crtdbg.h`, that [`_CrtMemCheckpoint`](crtmemcheckpoint.md) has filled in before the call to **`_CrtMemDifference`**. *`stateDiff`* must be a pointer to a previously allocated instance of the **`_CrtMemState`** structure. If *`stateDiff`*, *`newState`*, or *`oldState`* is **`NULL`**, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, [`errno, _doserrno, _sys_errlist, and _sys_nerr`](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md) is set to **`EINVAL`** and the function returns FALSE. +*`newState`* and *`oldState`* must each be a valid pointer to a **`_CrtMemState`** structure, defined in `crtdbg.h`, that [`_CrtMemCheckpoint`](crtmemcheckpoint.md) has filled in before the call to **`_CrtMemDifference`**. *`stateDiff`* must be a pointer to a previously allocated instance of the **`_CrtMemState`** structure. If *`stateDiff`*, *`newState`*, or *`oldState`* is **`NULL`**, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, [`errno, _doserrno, _sys_errlist, and _sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md) is set to **`EINVAL`** and the function returns FALSE. **`_CrtMemDifference`** compares the **`_CrtMemState`** field values of the blocks in *`oldState`* to the ones in *`newState`* and stores the result in *`stateDiff`*. When the number of allocated block types or total number of allocated blocks for each type differs between the two memory states, the difference in states is considered significant. The difference between the largest amount ever allocated at once for the two states and the difference between total allocations for the two states are also stored in *`stateDiff`*. -By default, internal C run-time blocks (**`_CRT_BLOCK`**) aren't included in memory state operations. The [_CrtSetDbgFlag](crtsetdbgflag.md) function can be used to turn on the **`_CRTDBG_CHECK_CRT_DF`** bit of **`_crtDbgFlag`** to include these blocks in leak detection and other memory state operations. Freed memory blocks (**`_FREE_BLOCK`**) don't cause **`_CrtMemDifference`** to return `TRUE`. +By default, internal C run-time blocks (**`_CRT_BLOCK`**) aren't included in memory state operations. The [`_CrtSetDbgFlag`](crtsetdbgflag.md) function can be used to turn on the **`_CRTDBG_CHECK_CRT_DF`** bit of **`_crtDbgFlag`** to include these blocks in leak detection and other memory state operations. Freed memory blocks (**`_FREE_BLOCK`**) don't cause **`_CrtMemDifference`** to return `TRUE`. -For more information about heap state functions and the **`_CrtMemState`** structure, see [Heap State Reporting Functions](/visualstudio/debugger/crt-debug-heap-details). For information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT Debug Heap Details](/visualstudio/debugger/crt-debug-heap-details). +For more information about heap state functions and the **`_CrtMemState`** structure, see [Heap state reporting functions](/visualstudio/debugger/crt-debug-heap-details). For information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT debug heap details](/visualstudio/debugger/crt-debug-heap-details). ## Requirements @@ -56,11 +56,11 @@ For more information about heap state functions and the **`_CrtMemState`** struc |-------------|---------------------|---------------------| |**`_CrtMemDifference`**|``|``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). -**Libraries:** Debug versions of the [C runtime libraries](../../c-runtime-library/crt-library-features.md) only. +**Libraries:** Debug versions of the [C runtime libraries](../crt-library-features.md) only. ## See also -[Debug Routines](../../c-runtime-library/debug-routines.md)\ -[`_crtDbgFlag`](../../c-runtime-library/crtdbgflag.md)\ +[Debug routines](../debug-routines.md)\ +[`_crtDbgFlag`](../crtdbgflag.md)\ diff --git a/docs/c-runtime-library/reference/crtmemdumpallobjectssince.md b/docs/c-runtime-library/reference/crtmemdumpallobjectssince.md index 75987066d0b..cafc0ff2f71 100644 --- a/docs/c-runtime-library/reference/crtmemdumpallobjectssince.md +++ b/docs/c-runtime-library/reference/crtmemdumpallobjectssince.md @@ -24,18 +24,18 @@ void _CrtMemDumpAllObjectsSince( ### Parameters -*state*
+*`state`*\ Pointer to the heap state to begin dumping from or **NULL**. ## Remarks -The **_CrtMemDumpAllObjectsSince** function dumps the debug header information of objects allocated in the heap in a user-readable form. The dump information can be used by the application to track allocations and detect memory problems. When [_DEBUG](../../c-runtime-library/debug.md) isn't defined, calls to **_CrtMemDumpAllObjectsSince** are removed during preprocessing. +The **_CrtMemDumpAllObjectsSince** function dumps the debug header information of objects allocated in the heap in a user-readable form. The dump information can be used by the application to track allocations and detect memory problems. When [`_DEBUG`](../debug.md) isn't defined, calls to **_CrtMemDumpAllObjectsSince** are removed during preprocessing. -**_CrtMemDumpAllObjectsSince** uses the value of the *state* parameter to determine where to initiate the dump operation. To begin dumping from a specified heap state, the *state* parameter must be a pointer to a **_CrtMemState** structure that has been filled in by [_CrtMemCheckpoint](crtmemcheckpoint.md) before **_CrtMemDumpAllObjectsSince** was called. When *state* is **NULL**, the function begins the dump from the start of program execution. +**_CrtMemDumpAllObjectsSince** uses the value of the *`state`* parameter to determine where to initiate the dump operation. To begin dumping from a specified heap state, the *`state`* parameter must be a pointer to a **_CrtMemState** structure that has been filled in by [`_CrtMemCheckpoint`](crtmemcheckpoint.md) before **_CrtMemDumpAllObjectsSince** was called. When *`state`* is **NULL**, the function begins the dump from the start of program execution. -If the application has installed a dump hook function by calling [_CrtSetDumpClient](crtsetdumpclient.md), then every time **_CrtMemDumpAllObjectsSince** dumps information about a **_CLIENT_BLOCK** type of block, it calls the application-supplied dump function as well. By default, internal C run-time blocks (**_CRT_BLOCK**) aren't included in memory dump operations. The [_CrtSetDbgFlag](crtsetdbgflag.md) function can be used to turn on the **_CRTDBG_CHECK_CRT_DF** bit of **_crtDbgFlag** to include these blocks. In addition, blocks marked as freed or ignored (**_FREE_BLOCK**, **_IGNORE_BLOCK**) aren't included in the memory dump. +If the application has installed a dump hook function by calling [`_CrtSetDumpClient`](crtsetdumpclient.md), then every time **_CrtMemDumpAllObjectsSince** dumps information about a **_CLIENT_BLOCK** type of block, it calls the application-supplied dump function as well. By default, internal C run-time blocks (**_CRT_BLOCK**) aren't included in memory dump operations. The [`_CrtSetDbgFlag`](crtsetdbgflag.md) function can be used to turn on the **_CRTDBG_CHECK_CRT_DF** bit of **_crtDbgFlag** to include these blocks. In addition, blocks marked as freed or ignored (**_FREE_BLOCK**, **_IGNORE_BLOCK**) aren't included in the memory dump. -For more information about heap state functions and the **_CrtMemState** structure, see [Heap State Reporting Functions](/visualstudio/debugger/crt-debug-heap-details). For more information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT Debug Heap Details](/visualstudio/debugger/crt-debug-heap-details). +For more information about heap state functions and the **_CrtMemState** structure, see [Heap state reporting functions](/visualstudio/debugger/crt-debug-heap-details). For more information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT debug heap details](/visualstudio/debugger/crt-debug-heap-details). ## Requirements @@ -43,17 +43,17 @@ For more information about heap state functions and the **_CrtMemState** structu |-------------|---------------------| |**_CrtMemDumpAll-ObjectsSince**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Libraries -Debug versions of [C run-time libraries](../../c-runtime-library/crt-library-features.md) only. +Debug versions of [C run-time libraries](../crt-library-features.md) only. ## Example -For a sample of how to use **_CrtMemDumpAllObjectsSince**, see [crt_dbg2](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/crt/crt_dbg2). +For a sample of how to use **_CrtMemDumpAllObjectsSince**, see [`crt_dbg2`](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/crt/crt_dbg2). ## See also -[Debug Routines](../../c-runtime-library/debug-routines.md)
-[_crtDbgFlag](../../c-runtime-library/crtdbgflag.md)
+[Debug routines](../debug-routines.md)\ +[`_crtDbgFlag`](../crtdbgflag.md) diff --git a/docs/c-runtime-library/reference/crtmemdumpstatistics.md b/docs/c-runtime-library/reference/crtmemdumpstatistics.md index 0b81c3be3b7..d2ac5dec7b9 100644 --- a/docs/c-runtime-library/reference/crtmemdumpstatistics.md +++ b/docs/c-runtime-library/reference/crtmemdumpstatistics.md @@ -24,16 +24,16 @@ void _CrtMemDumpStatistics( ### Parameters -*state*
+*`state`*\ Pointer to the heap state to dump. ## Remarks -The **_CrtMemDumpStatistics** function dumps the debug header information for a specified state of the heap in a user-readable form. The dump statistics can be used by the application to track allocations and detect memory problems. The memory state can contain a specific heap state or the difference between two states. When [_DEBUG](../../c-runtime-library/debug.md) isn't defined, calls to **_CrtMemDumpStatistics** are removed during preprocessing. +The **_CrtMemDumpStatistics** function dumps the debug header information for a specified state of the heap in a user-readable form. The dump statistics can be used by the application to track allocations and detect memory problems. The memory state can contain a specific heap state or the difference between two states. When [`_DEBUG`](../debug.md) isn't defined, calls to **_CrtMemDumpStatistics** are removed during preprocessing. -The *state* parameter must be a pointer to a **_CrtMemState** structure that has been filled in by [_CrtMemCheckpoint](crtmemcheckpoint.md) or returned by [_CrtMemDifference](crtmemdifference.md) before **_CrtMemDumpStatistics** is called. If *state* is **NULL**, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, **errno** is set to **EINVAL**, and no action is taken. For more information, see [errno, _doserrno, _sys_errlist, and _sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +The *`state`* parameter must be a pointer to a **_CrtMemState** structure that has been filled in by [`_CrtMemCheckpoint`](crtmemcheckpoint.md) or returned by [`_CrtMemDifference`](crtmemdifference.md) before **_CrtMemDumpStatistics** is called. If *`state`* is **NULL**, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, **errno** is set to **EINVAL**, and no action is taken. For more information, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). -For more information about heap state functions and the **_CrtMemState** structure, see [Heap State Reporting Functions](/visualstudio/debugger/crt-debug-heap-details). For more information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT Debug Heap Details](/visualstudio/debugger/crt-debug-heap-details). +For more information about heap state functions and the **_CrtMemState** structure, see [Heap state reporting functions](/visualstudio/debugger/crt-debug-heap-details). For more information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT debug heap details](/visualstudio/debugger/crt-debug-heap-details). ## Requirements @@ -41,10 +41,10 @@ For more information about heap state functions and the **_CrtMemState** structu |-------------|---------------------|----------------------| |**_CrtMemDumpStatistics**|\|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). -**Libraries:** Debug versions of the [C runtime libraries](../../c-runtime-library/crt-library-features.md) only. +**Libraries:** Debug versions of the [C runtime libraries](../crt-library-features.md) only. ## See also -[Debug Routines](../../c-runtime-library/debug-routines.md)
+[Debug routines](../debug-routines.md)\ diff --git a/docs/c-runtime-library/reference/crtreportblocktype.md b/docs/c-runtime-library/reference/crtreportblocktype.md index 079d7aebc2d..8cfe177eb36 100644 --- a/docs/c-runtime-library/reference/crtreportblocktype.md +++ b/docs/c-runtime-library/reference/crtreportblocktype.md @@ -24,10 +24,10 @@ int _CrtReportBlockType( ### Parameters -*pBlock*
+*`pBlock`*\ Pointer to a valid debug heap block. -## Return Value +## Return value When passed a valid debug heap pointer, the **_CrtReportBlockType** function returns the block type and subtype in the form of an **`int`**. When passed an invalid pointer, the function returns -1. @@ -35,7 +35,7 @@ When passed a valid debug heap pointer, the **_CrtReportBlockType** function ret To extract the type and subtype returned by **_CrtReportBlockType**, use the macros **_BLOCK_TYPE** and **_BLOCK_SUBTYPE** (both defined in Crtdbg.h) on the return value. -For information about the allocation block types and how they're used, see [Types of Blocks on the Debug Heap](/visualstudio/debugger/crt-debug-heap-details). +For information about the allocation block types and how they're used, see [Types of blocks on the debug heap](/visualstudio/debugger/crt-debug-heap-details). ## Requirements @@ -43,11 +43,11 @@ For information about the allocation block types and how they're used, see [Type |-------------|---------------------| |**_CrtReportBlockType**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Libraries -Debug versions of [C run-time libraries](../../c-runtime-library/crt-library-features.md) only. +Debug versions of [C run-time libraries](../crt-library-features.md) only. ## Example @@ -89,7 +89,7 @@ int main(void) } ``` -### Sample Output +### Sample output ```Output Dumper found block at 00314F78: type 4, subtype 3 @@ -110,7 +110,7 @@ Object dump complete. ## See also -[_CrtDoForAllClientObjects](crtdoforallclientobjects.md)
-[_CrtSetDumpClient](crtsetdumpclient.md)
-[_CrtMemDumpAllObjectsSince](crtmemdumpallobjectssince.md)
-[_CrtDumpMemoryLeaks](crtdumpmemoryleaks.md)
+[`_CrtDoForAllClientObjects`](crtdoforallclientobjects.md)\ +[`_CrtSetDumpClient`](crtsetdumpclient.md)\ +[`_CrtMemDumpAllObjectsSince`](crtmemdumpallobjectssince.md)\ +[`_CrtDumpMemoryLeaks`](crtdumpmemoryleaks.md) diff --git a/docs/c-runtime-library/reference/crtsetallochook.md b/docs/c-runtime-library/reference/crtsetallochook.md index 9bd280c578c..b21ec2e17e5 100644 --- a/docs/c-runtime-library/reference/crtsetallochook.md +++ b/docs/c-runtime-library/reference/crtsetallochook.md @@ -24,18 +24,18 @@ _CRT_ALLOC_HOOK _CrtSetAllocHook( ### Parameters -*allocHook*
+*`allocHook`*\ New client-defined allocation function to hook into the C run-time debug memory allocation process. -## Return Value +## Return value -Returns the previously defined allocation hook function, or **NULL** if *allocHook* is **NULL**. +Returns the previously defined allocation hook function, or **NULL** if *`allocHook`* is **NULL**. ## Remarks -**_CrtSetAllocHook** allows an application to hook its own allocation function into the C run-time debug library memory allocation process. As a result, every call to a debug allocation function to allocate, reallocate, or free a memory block triggers a call to the application's hook function. **_CrtSetAllocHook** provides an application with an easy method for testing how the application handles insufficient memory situations, the ability to examine allocation patterns, and the opportunity to log allocation information for later analysis. When [_DEBUG](../../c-runtime-library/debug.md) isn't defined, calls to **_CrtSetAllocHook** are removed during preprocessing. +**_CrtSetAllocHook** allows an application to hook its own allocation function into the C run-time debug library memory allocation process. As a result, every call to a debug allocation function to allocate, reallocate, or free a memory block triggers a call to the application's hook function. **_CrtSetAllocHook** provides an application with an easy method for testing how the application handles insufficient memory situations, the ability to examine allocation patterns, and the opportunity to log allocation information for later analysis. When [`_DEBUG`](../debug.md) isn't defined, calls to **_CrtSetAllocHook** are removed during preprocessing. -The **_CrtSetAllocHook** function installs the new client-defined allocation function specified in *allocHook* and returns the previously defined hook function. The following example demonstrates how a client-defined allocation hook should be prototyped: +The **_CrtSetAllocHook** function installs the new client-defined allocation function specified in *`allocHook`* and returns the previously defined hook function. The following example demonstrates how a client-defined allocation hook should be prototyped: ```C int YourAllocHook( int allocType, void *userData, size_t size, @@ -43,9 +43,9 @@ int YourAllocHook( int allocType, void *userData, size_t size, const unsigned char *filename, int lineNumber); ``` -The **allocType** argument specifies the type of allocation operation (**_HOOK_ALLOC**, **_HOOK_REALLOC**, and **_HOOK_FREE**) that triggered the call to the allocation's hook function. When the triggering allocation type is **_HOOK_FREE**, *userData* is a pointer to the user data section of the memory block about to be freed. However, when the triggering allocation type is **_HOOK_ALLOC** or **_HOOK_REALLOC**, *userData* is **NULL** because the memory block hasn't been allocated yet. +The **allocType** argument specifies the type of allocation operation (**_HOOK_ALLOC**, **_HOOK_REALLOC**, and **_HOOK_FREE**) that triggered the call to the allocation's hook function. When the triggering allocation type is **_HOOK_FREE**, *`userData`* is a pointer to the user data section of the memory block about to be freed. However, when the triggering allocation type is **_HOOK_ALLOC** or **_HOOK_REALLOC**, *`userData`* is **NULL** because the memory block hasn't been allocated yet. -*size* specifies the size of the memory block in bytes, *blockType* indicates the type of the memory block, *requestNumber* is the object allocation order number of the memory block, and, if available, *filename* and **lineNumber** specify the source file name and line number where the triggering allocation operation was initiated. +*`size`* specifies the size of the memory block in bytes, *`blockType`* indicates the type of the memory block, *`requestNumber`* is the object allocation order number of the memory block, and, if available, *`filename`* and *`lineNumber`* specify the source file name and line number where the triggering allocation operation was initiated. After the hook function has finished processing, it must return a Boolean value, which tells the main C run-time allocation process how to continue. When the hook function wants the main allocation process to continue as if the hook function had never been called, then the hook function should return **TRUE**, which causes the original triggering allocation operation to be executed. The hook function can gather and save allocation information for later analysis, without interfering with the current allocation operation or state of the debug heap. @@ -53,7 +53,7 @@ When the hook function wants the main allocation process to continue as if the t To clear the hook function, pass **NULL** to **_CrtSetAllocHook**. -For more information about how **_CrtSetAllocHook** can be used with other memory management functions or how to write your own client-defined hook functions, see [Debug Hook Function Writing](/visualstudio/debugger/debug-hook-function-writing). +For more information about how **_CrtSetAllocHook** can be used with other memory management functions or how to write your own client-defined hook functions, see [Debug hook function writing](/visualstudio/debugger/debug-hook-function-writing). > [!NOTE] > **_CrtSetAllocHook** is not supported under **/clr:pure**. The **/clr:pure** and **/clr:safe** compiler options are deprecated in Visual Studio 2015 and removed in Visual Studio 2017. @@ -64,17 +64,17 @@ For more information about how **_CrtSetAllocHook** can be used with other memor |-------------|---------------------| |**_CrtSetAllocHook**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Libraries -Debug versions of [C run-time libraries](../../c-runtime-library/crt-library-features.md) only. +Debug versions of [C run-time libraries](../crt-library-features.md) only. ## Example -For a sample of how to use **_CrtSetAllocHook**, see [crt_dbg2](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/crt/crt_dbg2). +For a sample of how to use **_CrtSetAllocHook**, see [`crt_dbg2`](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/crt/crt_dbg2). ## See also -[Debug Routines](../../c-runtime-library/debug-routines.md)
-[_CrtGetAllocHook](crtgetallochook.md)
+[Debug routines](../debug-routines.md)\ +[`_CrtGetAllocHook`](crtgetallochook.md) diff --git a/docs/c-runtime-library/reference/crtsetbreakalloc.md b/docs/c-runtime-library/reference/crtsetbreakalloc.md index 027798e783f..5de2b43a349 100644 --- a/docs/c-runtime-library/reference/crtsetbreakalloc.md +++ b/docs/c-runtime-library/reference/crtsetbreakalloc.md @@ -24,20 +24,20 @@ long _CrtSetBreakAlloc( ### Parameters -*lBreakAlloc*
+*`lBreakAlloc`*\ Allocation order number, for which to set the breakpoint. -## Return Value +## Return value Returns the previous object allocation order number that had a breakpoint set. ## Remarks -**_CrtSetBreakAlloc** allows an application to perform memory leak detection by breaking at a specific point of memory allocation and tracing back to the origin of the request. The function uses the sequential object allocation order number assigned to the memory block when it was allocated in the heap. When [_DEBUG](../../c-runtime-library/debug.md) isn't defined, calls to **_CrtSetBreakAlloc** are removed during preprocessing. +**_CrtSetBreakAlloc** allows an application to perform memory leak detection by breaking at a specific point of memory allocation and tracing back to the origin of the request. The function uses the sequential object allocation order number assigned to the memory block when it was allocated in the heap. When [`_DEBUG`](../debug.md) isn't defined, calls to **_CrtSetBreakAlloc** are removed during preprocessing. -The object allocation order number is stored in the *lRequest* field of the **_CrtMemBlockHeader** structure, defined in Crtdbg.h. When information about a memory block is reported by one of the debug dump functions, this number is enclosed in braces, such as {36}. +The object allocation order number is stored in the *`lRequest`* field of the **_CrtMemBlockHeader** structure, defined in Crtdbg.h. When information about a memory block is reported by one of the debug dump functions, this number is enclosed in braces, such as {36}. -For more information about how **_CrtSetBreakAlloc** can be used with other memory management functions, see [Tracking Heap Allocation Requests](/visualstudio/debugger/crt-debug-heap-details). For more information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT Debug Heap Details](/visualstudio/debugger/crt-debug-heap-details). +For more information about how **_CrtSetBreakAlloc** can be used with other memory management functions, see [Tracking heap allocation requests](/visualstudio/debugger/crt-debug-heap-details). For more information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT debug heap details](/visualstudio/debugger/crt-debug-heap-details). ## Requirements @@ -45,11 +45,11 @@ For more information about how **_CrtSetBreakAlloc** can be used with other memo |-------------|---------------------| |**_CrtSetBreakAlloc**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Libraries -Debug versions of [C run-time libraries](../../c-runtime-library/crt-library-features.md) only. +Debug versions of [C run-time libraries](../crt-library-features.md) only. ## Example @@ -99,4 +99,4 @@ int main( ) ## See also -[Debug Routines](../../c-runtime-library/debug-routines.md)
+[Debug routines](../debug-routines.md)\ diff --git a/docs/c-runtime-library/reference/crtsetdbgflag.md b/docs/c-runtime-library/reference/crtsetdbgflag.md index 0f4f9025cd9..bbc381afc5d 100644 --- a/docs/c-runtime-library/reference/crtsetdbgflag.md +++ b/docs/c-runtime-library/reference/crtsetdbgflag.md @@ -26,7 +26,7 @@ int _CrtSetDbgFlag( *`newFlag`*\ New state for **`_crtDbgFlag`**. -## Return Value +## Return value Returns the previous state of **`_crtDbgFlag`**. @@ -38,9 +38,9 @@ The **`_CrtSetDbgFlag`** function allows the application to control how the debu - Simulating low-memory conditions by specifying that freed memory blocks should remain in the heap's linked list, - Verifying the integrity of the heap by inspecting each memory block at every allocation request. -When [`_DEBUG`](../../c-runtime-library/debug.md) isn't defined, calls to **`_CrtSetDbgFlag`** are removed during preprocessing. +When [`_DEBUG`](../debug.md) isn't defined, calls to **`_CrtSetDbgFlag`** are removed during preprocessing. -The following table lists the bit fields for **`_crtDbgFlag`** and describes their behavior. Because setting the bits results in increased diagnostic output and reduced program execution speed, these bits aren't set (turned off) by default. For more information about these bit fields, see [Heap State Reporting Functions](/visualstudio/debugger/crt-debug-heap-details). +The following table lists the bit fields for **`_crtDbgFlag`** and describes their behavior. Because setting the bits results in increased diagnostic output and reduced program execution speed, these bits aren't set (turned off) by default. For more information about these bit fields, see [Heap state reporting functions](/visualstudio/debugger/crt-debug-heap-details). |Bit field|Default|Description| |---------------|-------------|-----------------| @@ -117,11 +117,11 @@ tmpFlag &= ~_CRTDBG_CHECK_ALWAYS_DF; _CrtSetDbgFlag( tmpFlag ); ``` -For an overview of memory management and the debug heap, see [CRT Debug Heap Details](/visualstudio/debugger/crt-debug-heap-details). +For an overview of memory management and the debug heap, see [CRT debug heap details](/visualstudio/debugger/crt-debug-heap-details). To disable a flag with the **`_CrtSetDbgFlag`** function, use a bitwise "and" (`&`) of the variable with the bitwise "not" (`~`) of the bitmask. -If *`newFlag`* isn't a valid value, this function invokes the invalid parameter handler, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, this function sets **`errno`** to **`EINVAL`** and returns the previous state of **`_crtDbgFlag`**. +If *`newFlag`* isn't a valid value, this function invokes the invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, this function sets **`errno`** to **`EINVAL`** and returns the previous state of **`_crtDbgFlag`**. ## Requirements @@ -129,11 +129,11 @@ If *`newFlag`* isn't a valid value, this function invokes the invalid parameter |-------------|---------------------| |**`_CrtSetDbgFlag`**|``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Libraries -Debug versions of [C run-time libraries](../../c-runtime-library/crt-library-features.md) only. +Debug versions of [C run-time libraries](../crt-library-features.md) only. ## Example @@ -201,6 +201,6 @@ int main( ) ## See also -[Debug Routines](../../c-runtime-library/debug-routines.md)\ -[`_crtDbgFlag`](../../c-runtime-library/crtdbgflag.md)\ +[Debug routines](../debug-routines.md)\ +[`_crtDbgFlag`](../crtdbgflag.md)\ [`_CrtCheckMemory`](crtcheckmemory.md) diff --git a/docs/c-runtime-library/reference/crtsetdebugfillthreshold.md b/docs/c-runtime-library/reference/crtsetdebugfillthreshold.md index f285fd41fc2..c5f99655ff2 100644 --- a/docs/c-runtime-library/reference/crtsetdebugfillthreshold.md +++ b/docs/c-runtime-library/reference/crtsetdebugfillthreshold.md @@ -22,7 +22,7 @@ size_t _CrtSetDebugFillThreshold( size_t newThreshold ); ### Parameters -*newThreshold*
+*`newThreshold`*\ New threshold size in bytes. ## Return value @@ -31,59 +31,59 @@ The previous threshold value. ## Remarks -The debug versions of some security-enhanced CRT functions fill the buffer passed to them with a special character (0xFE). This fill character helps to find cases where the incorrect size was passed to the function. Unfortunately, it also reduces performance. To improve performance, use **_CrtSetDebugFillThreshold** to disable buffer-filling for buffers larger than the *newThreshold* threshold. A *newThreshold* value of 0 disables it for all buffers. +The debug versions of some security-enhanced CRT functions fill the buffer passed to them with a special character (0xFE). This fill character helps to find cases where the incorrect size was passed to the function. Unfortunately, it also reduces performance. To improve performance, use **_CrtSetDebugFillThreshold** to disable buffer-filling for buffers larger than the *`newThreshold`* threshold. A *`newThreshold`* value of 0 disables it for all buffers. The default threshold is **SIZE_T_MAX**. Here's a list of the affected functions: -- [asctime_s, _wasctime_s](asctime-s-wasctime-s.md) +- [`asctime_s`, `_wasctime_s`](asctime-s-wasctime-s.md) -- [_cgets_s, _cgetws_s](cgets-s-cgetws-s.md) +- [`_cgets_s`, `_cgetws_s`](cgets-s-cgetws-s.md) -- [ctime_s, _ctime32_s, _ctime64_s, _wctime_s, _wctime32_s, _wctime64_s](ctime-s-ctime32-s-ctime64-s-wctime-s-wctime32-s-wctime64-s.md) +- [`ctime_s`, `_ctime32_s`, `_ctime64_s`, `_wctime_s`, `_wctime32_s`, `_wctime64_s`](ctime-s-ctime32-s-ctime64-s-wctime-s-wctime32-s-wctime64-s.md) -- [_ecvt_s](ecvt-s.md) +- [`_ecvt_s`](ecvt-s.md) -- [_fcvt_s](fcvt-s.md) +- [`_fcvt_s`](fcvt-s.md) -- [_gcvt_s](gcvt-s.md) +- [`_gcvt_s`](gcvt-s.md) -- [_itoa_s, _ltoa_s, _ultoa_s, _i64toa_s, _ui64toa_s, _itow_s, _ltow_s, _ultow_s, _i64tow_s, _ui64tow_s](itoa-s-itow-s.md) +- [`_itoa_s`, `_ltoa_s`, `_ultoa_s`, `_i64toa_s`, `_ui64toa_s`, `_itow_s`, `_ltow_s`, `_ultow_s`, `_i64tow_s`, `_ui64tow_s`](itoa-s-itow-s.md) -- [_makepath_s, _wmakepath_s](makepath-s-wmakepath-s.md) +- [`_makepath_s`, `_wmakepath_s`](makepath-s-wmakepath-s.md) -- [_mbsnbcat_s, _mbsnbcat_s_l](mbsnbcat-s-mbsnbcat-s-l.md) +- [`_mbsnbcat_s`, `_mbsnbcat_s_l`](mbsnbcat-s-mbsnbcat-s-l.md) -- [_mbsnbcpy_s, _mbsnbcpy_s_l](mbsnbcpy-s-mbsnbcpy-s-l.md) +- [`_mbsnbcpy_s`, `_mbsnbcpy_s_l`](mbsnbcpy-s-mbsnbcpy-s-l.md) -- [_mbsnbset_s, _mbsnbset_s_l](mbsnbset-s-mbsnbset-s-l.md) +- [`_mbsnbset_s`, `_mbsnbset_s_l`](mbsnbset-s-mbsnbset-s-l.md) -- [_mktemp_s, _wmktemp_s](makepath-s-wmakepath-s.md) +- [`_mktemp_s`, `_wmktemp_s`](makepath-s-wmakepath-s.md) -- [_splitpath_s, _wsplitpath_s](splitpath-s-wsplitpath-s.md) +- [`_splitpath_s`, `_wsplitpath_s`](splitpath-s-wsplitpath-s.md) -- [strcat_s, wcscat_s, _mbscat_s](strcat-s-wcscat-s-mbscat-s.md) +- [`strcat_s`, `wcscat_s`, `_mbscat_s`](strcat-s-wcscat-s-mbscat-s.md) -- [strcpy_s, wcscpy_s, _mbscpy_s](strcpy-s-wcscpy-s-mbscpy-s.md) +- [`strcpy_s`, `wcscpy_s`, `_mbscpy_s`](strcpy-s-wcscpy-s-mbscpy-s.md) -- [_strdate_s, _wstrdate_s](strdate-s-wstrdate-s.md) +- [`_strdate_s`, `_wstrdate_s`](strdate-s-wstrdate-s.md) -- [strerror_s, _strerror_s, _wcserror_s, \__wcserror_s](strerror-s-strerror-s-wcserror-s-wcserror-s.md) +- [`strerror_s`, `_strerror_s`, `_wcserror_s`, `__wcserror_s`](strerror-s-strerror-s-wcserror-s-wcserror-s.md) -- [_strlwr_s, _strlwr_s_l, _mbslwr_s, _mbslwr_s_l, _wcslwr_s, _wcslwr_s_l](strlwr-s-strlwr-s-l-mbslwr-s-mbslwr-s-l-wcslwr-s-wcslwr-s-l.md) +- [`_strlwr_s`, `_strlwr_s_l`, `_mbslwr_s`, `_mbslwr_s_l`, `_wcslwr_s`, `_wcslwr_s_l`](strlwr-s-strlwr-s-l-mbslwr-s-mbslwr-s-l-wcslwr-s-wcslwr-s-l.md) -- [strncat_s, _strncat_s_l, wcsncat_s, _wcsncat_s_l, _mbsncat_s, _mbsncat_s_l](strncat-s-strncat-s-l-wcsncat-s-wcsncat-s-l-mbsncat-s-mbsncat-s-l.md) +- [`strncat_s`, `_strncat_s_l`, `wcsncat_s`, `_wcsncat_s_l`, `_mbsncat_s`, `_mbsncat_s_l`](strncat-s-strncat-s-l-wcsncat-s-wcsncat-s-l-mbsncat-s-mbsncat-s-l.md) -- [strncpy_s, _strncpy_s_l, wcsncpy_s, _wcsncpy_s_l, _mbsncpy_s, _mbsncpy_s_l](strncpy-s-strncpy-s-l-wcsncpy-s-wcsncpy-s-l-mbsncpy-s-mbsncpy-s-l.md) +- [`strncpy_s`, `_strncpy_s_l`, `wcsncpy_s`, `_wcsncpy_s_l`, `_mbsncpy_s`, `_mbsncpy_s_l`](strncpy-s-strncpy-s-l-wcsncpy-s-wcsncpy-s-l-mbsncpy-s-mbsncpy-s-l.md) -- [_strnset_s, _strnset_s_l, _wcsnset_s, _wcsnset_s_l, _mbsnset_s, _mbsnset_s_l](strnset-s-strnset-s-l-wcsnset-s-wcsnset-s-l-mbsnset-s-mbsnset-s-l.md) +- [`_strnset_s`, `_strnset_s_l`, `_wcsnset_s`, `_wcsnset_s_l`, `_mbsnset_s`, `_mbsnset_s_l`](strnset-s-strnset-s-l-wcsnset-s-wcsnset-s-l-mbsnset-s-mbsnset-s-l.md) -- [_strset_s, _strset_s_l, _wcsset_s, _wcsset_s_l, _mbsset_s, _mbsset_s_l](strset-s-strset-s-l-wcsset-s-wcsset-s-l-mbsset-s-mbsset-s-l.md) +- [`_strset_s`, `_strset_s_l`, `_wcsset_s`, `_wcsset_s_l`, `_mbsset_s`, `_mbsset_s_l`](strset-s-strset-s-l-wcsset-s-wcsset-s-l-mbsset-s-mbsset-s-l.md) -- [_strtime_s, _wstrtime_s](strtime-s-wstrtime-s.md) +- [`_strtime_s`, `_wstrtime_s`](strtime-s-wstrtime-s.md) -- [_strupr_s, _strupr_s_l, _mbsupr_s, _mbsupr_s_l, _wcsupr_s, _wcsupr_s_l](strupr-s-strupr-s-l-mbsupr-s-mbsupr-s-l-wcsupr-s-wcsupr-s-l.md) +- [`_strupr_s`, `_strupr_s_l`, `_mbsupr_s`, `_mbsupr_s_l`, `_wcsupr_s`, `_wcsupr_s_l`](strupr-s-strupr-s-l-mbsupr-s-mbsupr-s-l-wcsupr-s-wcsupr-s-l.md) ## Requirements @@ -91,11 +91,11 @@ Here's a list of the affected functions: |-------------|---------------------| |**_CrtSetDebugFillThreshold**|\| -This function is Microsoft-specific. For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +This function is Microsoft-specific. For more compatibility information, see [Compatibility](../compatibility.md). ## Libraries -Debug versions of the [C run-time libraries](../../c-runtime-library/crt-library-features.md) only. +Debug versions of the [C run-time libraries](../crt-library-features.md) only. ## Example @@ -163,4 +163,4 @@ With buffer-filling off: ## See also -[Debug Routines](../../c-runtime-library/debug-routines.md)
+[Debug routines](../debug-routines.md) diff --git a/docs/c-runtime-library/reference/crtsetdumpclient.md b/docs/c-runtime-library/reference/crtsetdumpclient.md index c6f148185a2..ee3aca7ca3e 100644 --- a/docs/c-runtime-library/reference/crtsetdumpclient.md +++ b/docs/c-runtime-library/reference/crtsetdumpclient.md @@ -22,30 +22,30 @@ _CRT_DUMP_CLIENT _CrtSetDumpClient( _CRT_DUMP_CLIENT dumpClient ); ### Parameters -*dumpClient*
+*`dumpClient`*\ New client-defined memory dump function to hook. -## Return Value +## Return value Returns the previously defined client block dump function. ## Remarks -The **_CrtSetDumpClient** function allows the application to hook its own function to dump objects stored in **_CLIENT_BLOCK** memory blocks. As a result, every time a debug dump function such as [_CrtMemDumpAllObjectsSince](crtmemdumpallobjectssince.md) or [_CrtDumpMemoryLeaks](crtdumpmemoryleaks.md) dumps a **_CLIENT_BLOCK** memory block, the application's dump function is called as well. **_CrtSetDumpClient** provides an application with an easy method for detecting memory leaks and validating or reporting the contents of data stored in **_CLIENT_BLOCK** blocks. When [_DEBUG](../../c-runtime-library/debug.md) isn't defined, calls to **_CrtSetDumpClient** are removed during preprocessing. +The **_CrtSetDumpClient** function allows the application to hook its own function to dump objects stored in **_CLIENT_BLOCK** memory blocks. As a result, every time a debug dump function such as [`_CrtMemDumpAllObjectsSince`](crtmemdumpallobjectssince.md) or [`_CrtDumpMemoryLeaks`](crtdumpmemoryleaks.md) dumps a **_CLIENT_BLOCK** memory block, the application's dump function is called as well. **_CrtSetDumpClient** provides an application with an easy method for detecting memory leaks and validating or reporting the contents of data stored in **_CLIENT_BLOCK** blocks. When [`_DEBUG`](../debug.md) isn't defined, calls to **_CrtSetDumpClient** are removed during preprocessing. -The **_CrtSetDumpClient** function installs the new application-defined dump function specified in *dumpClient* and returns the previously defined dump function. An example of a client block dump function is as follows: +The **_CrtSetDumpClient** function installs the new application-defined dump function specified in *`dumpClient`* and returns the previously defined dump function. An example of a client block dump function is as follows: ```C void DumpClientFunction( void *userPortion, size_t blockSize ); ``` -The *userPortion* argument is a pointer to the beginning of the user data portion of the memory block and *blockSize* specifies the size of the allocated memory block in bytes. The client block dump function must return **`void`**. The pointer to the client dump function that is passed to **_CrtSetDumpClient** is of type **_CRT_DUMP_CLIENT**, as defined in Crtdbg.h: +The *`userPortion`* argument is a pointer to the beginning of the user data portion of the memory block and *`blockSize`* specifies the size of the allocated memory block in bytes. The client block dump function must return **`void`**. The pointer to the client dump function that is passed to **_CrtSetDumpClient** is of type **_CRT_DUMP_CLIENT**, as defined in Crtdbg.h: ```C typedef void (__cdecl *_CRT_DUMP_CLIENT)( void *, size_t ); ``` -For more information about functions that operate on **_CLIENT_BLOCK** type memory blocks, see [Client Block Hook Functions](/visualstudio/debugger/client-block-hook-functions). The [_CrtReportBlockType](crtreportblocktype.md) function can be used to return information about block types and subtypes. +For more information about functions that operate on **_CLIENT_BLOCK** type memory blocks, see [Client block hook functions](/visualstudio/debugger/client-block-hook-functions). The [`_CrtReportBlockType`](crtreportblocktype.md) function can be used to return information about block types and subtypes. ## Requirements @@ -53,14 +53,14 @@ For more information about functions that operate on **_CLIENT_BLOCK** type memo |-------------|---------------------| |**_CrtSetDumpClient**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Libraries -Debug versions of [C run-time libraries](../../c-runtime-library/crt-library-features.md) only. +Debug versions of [C run-time libraries](../crt-library-features.md) only. ## See also -[Debug Routines](../../c-runtime-library/debug-routines.md)
-[_CrtReportBlockType](crtreportblocktype.md)
-[_CrtGetDumpClient](crtgetdumpclient.md)
+[Debug routines](../debug-routines.md)\ +[`_CrtReportBlockType`](crtreportblocktype.md)\ +[`_CrtGetDumpClient`](crtgetdumpclient.md) diff --git a/docs/c-runtime-library/reference/crtsetreportfile.md b/docs/c-runtime-library/reference/crtsetreportfile.md index 3da8af0012f..3670c3c8e5d 100644 --- a/docs/c-runtime-library/reference/crtsetreportfile.md +++ b/docs/c-runtime-library/reference/crtsetreportfile.md @@ -12,7 +12,7 @@ ms.assetid: 3126537e-511b-44af-9c1c-0605265eabc4 --- # _CrtSetReportFile -After you use [_CrtSetReportMode](crtsetreportmode.md) to specify **_CRTDBG_MODE_FILE**, you can specify the file handle to receive the message text. **_CrtSetReportFile** is also used by [_CrtDbgReport, _CrtDbgReportW](crtdbgreport-crtdbgreportw.md) to specify the destination of text (debug version only). +After you use [`_CrtSetReportMode`](crtsetreportmode.md) to specify **_CRTDBG_MODE_FILE**, you can specify the file handle to receive the message text. **_CrtSetReportFile** is also used by [`_CrtDbgReport`, `_CrtDbgReportW`](crtdbgreport-crtdbgreportw.md) to specify the destination of text (debug version only). ## Syntax @@ -25,21 +25,21 @@ _HFILE _CrtSetReportFile( ### Parameters -*reportType*
+*`reportType`*\ Report type: **_CRT_WARN**, **_CRT_ERROR**, and **_CRT_ASSERT**. -*reportFile*
-New report file for *reportType*. +*`reportFile`*\ +New report file for *`reportType`*. -## Return Value +## Return value -On successful completion, **_CrtSetReportFile** returns the previous report file defined for the report type specified in *reportType*. If an invalid value is passed in for *reportType*, this function invokes the invalid parameter handler, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, **errno** is set to **EINVAL**, and the function returns **_CRTDBG_HFILE_ERROR**. For more information, see [errno, _doserrno, _sys_errlist, and _sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +On successful completion, **_CrtSetReportFile** returns the previous report file defined for the report type specified in *`reportType`*. If an invalid value is passed in for *`reportType`*, this function invokes the invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, **errno** is set to **EINVAL**, and the function returns **_CRTDBG_HFILE_ERROR**. For more information, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks -**_CrtSetReportFile** is used with the [_CrtSetReportMode](crtsetreportmode.md) function to define the destination or destinations for a specific report type generated by **_CrtDbgReport**. When you call **_CrtSetReportMode** to assign the **_CRTDBG_MODE_FILE** reporting mode for a specific report type, also call **_CrtSetReportFile** to specify the destination file or stream. When [_DEBUG](../../c-runtime-library/debug.md) isn't defined, calls to **_CrtSetReportFile** are removed during preprocessing. +**_CrtSetReportFile** is used with the [`_CrtSetReportMode`](crtsetreportmode.md) function to define the destination or destinations for a specific report type generated by **_CrtDbgReport**. When you call **_CrtSetReportMode** to assign the **_CRTDBG_MODE_FILE** reporting mode for a specific report type, also call **_CrtSetReportFile** to specify the destination file or stream. When [`_DEBUG`](../debug.md) isn't defined, calls to **_CrtSetReportFile** are removed during preprocessing. -The following list shows the available choices for *reportFile* and the resulting behavior of **_CrtDbgReport**. These options are defined as bit flags in Crtdbg.h. +The following list shows the available choices for *`reportFile`* and the resulting behavior of **_CrtDbgReport**. These options are defined as bit flags in Crtdbg.h. - **file handle** @@ -77,7 +77,7 @@ The following list shows the available choices for *reportFile* and the resultin Returns the current report mode. -You can control the report file used by each report type separately. For example, it's possible to specify that a *reportType* of **_CRT_ERROR** reports through **stderr**, while a *reportType* of **_CRT_ASSERT** reports through a user-defined file handle or stream. +You can control the report file used by each report type separately. For example, it's possible to specify that a *`reportType`* of **_CRT_ERROR** reports through **stderr**, while a *`reportType`* of **_CRT_ASSERT** reports through a user-defined file handle or stream. ## Requirements @@ -85,10 +85,10 @@ You can control the report file used by each report type separately. For example |-------------|---------------------|---------------------| |**_CrtSetReportFile**|\|\| -The console isn't supported in Universal Windows Platform (UWP) apps. The standard stream handles that are associated with the console, **stdin**, **stdout**, and **stderr**, must be redirected before C run-time functions can use them in UWP apps. For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +The console isn't supported in Universal Windows Platform (UWP) apps. The standard stream handles that are associated with the console, **stdin**, **stdout**, and **stderr**, must be redirected before C run-time functions can use them in UWP apps. For more compatibility information, see [Compatibility](../compatibility.md). -**Libraries:** Debug versions of [CRT Library Features](../../c-runtime-library/crt-library-features.md) only. +**Libraries:** Debug versions of [CRT library features](../crt-library-features.md) only. ## See also -[Debug Routines](../../c-runtime-library/debug-routines.md)
+[Debug routines](../debug-routines.md)\ diff --git a/docs/c-runtime-library/reference/crtsetreporthook.md b/docs/c-runtime-library/reference/crtsetreporthook.md index 32e0bb946c3..64a5cce8bb1 100644 --- a/docs/c-runtime-library/reference/crtsetreporthook.md +++ b/docs/c-runtime-library/reference/crtsetreporthook.md @@ -24,30 +24,30 @@ _CRT_REPORT_HOOK _CrtSetReportHook( ### Parameters -*reportHook*
+*`reportHook`*\ New client-defined reporting function to hook into the C run-time debug reporting process. -## Return Value +## Return value Returns the previous client-defined reporting function. ## Remarks -**_CrtSetReportHook** allows an application to use its own reporting function into the C run-time debug library reporting process. As a result, whenever [_CrtDbgReport](crtdbgreport-crtdbgreportw.md) is called to generate a debug report, the application's reporting function is called first. This functionality enables an application to perform operations such as filtering debug reports so it can focus on specific allocation types or send a report to destinations not available by using **_CrtDbgReport**. When [_DEBUG](../../c-runtime-library/debug.md) isn't defined, calls to **_CrtSetReportHook** are removed during preprocessing. +**_CrtSetReportHook** allows an application to use its own reporting function into the C run-time debug library reporting process. As a result, whenever [`_CrtDbgReport`](crtdbgreport-crtdbgreportw.md) is called to generate a debug report, the application's reporting function is called first. This functionality enables an application to perform operations such as filtering debug reports so it can focus on specific allocation types or send a report to destinations not available by using **_CrtDbgReport**. When [`_DEBUG`](../debug.md) isn't defined, calls to **_CrtSetReportHook** are removed during preprocessing. -For a more robust version of **_CrtSetReportHook**, see [_CrtSetReportHook2](crtsetreporthook2-crtsetreporthookw2.md). +For a more robust version of **_CrtSetReportHook**, see [`_CrtSetReportHook2`](crtsetreporthook2-crtsetreporthookw2.md). -The **_CrtSetReportHook** function installs the new client-defined reporting function specified in *reportHook* and returns the previous client-defined hook. The following example demonstrates how a client-defined report hook should be prototyped: +The **_CrtSetReportHook** function installs the new client-defined reporting function specified in *`reportHook`* and returns the previous client-defined hook. The following example demonstrates how a client-defined report hook should be prototyped: ```C int YourReportHook( int reportType, char *message, int *returnValue ); ``` -where *reportType* is the debug report type (**_CRT_WARN**, **_CRT_ERROR**, or **_CRT_ASSERT**), *message* is the fully assembled debug user message to be contained in the report, and **returnValue** is the value specified by the client-defined reporting function that should be returned by **_CrtDbgReport**. For a complete description of the available report types, see the [_CrtSetReportMode](crtsetreportmode.md) function. +where *`reportType`* is the debug report type (**_CRT_WARN**, **_CRT_ERROR**, or **_CRT_ASSERT**), *`message`* is the fully assembled debug user message to be contained in the report, and **returnValue** is the value specified by the client-defined reporting function that should be returned by **_CrtDbgReport**. For a complete description of the available report types, see the [`_CrtSetReportMode`](crtsetreportmode.md) function. -If the client-defined reporting function completely handles the debug message such that no further reporting is required, then the function should return **TRUE**. When the function returns **FALSE**, **_CrtDbgReport** is called to generate the debug report using the current settings for the report type, mode, and file. In addition, by specifying the **_CrtDbgReport** return value in **returnValue**, the application can also control whether a debug break occurs. For a complete description of how the debug report is configured and generated, see **_CrtSetReportMode**, [_CrtSetReportFile](crtsetreportfile.md), and **_CrtDbgReport**. +If the client-defined reporting function completely handles the debug message such that no further reporting is required, then the function should return **TRUE**. When the function returns **FALSE**, **_CrtDbgReport** is called to generate the debug report using the current settings for the report type, mode, and file. In addition, by specifying the **_CrtDbgReport** return value in **returnValue**, the application can also control whether a debug break occurs. For a complete description of how the debug report is configured and generated, see **_CrtSetReportMode**, [`_CrtSetReportFile`](crtsetreportfile.md), and **_CrtDbgReport**. -For more information about using other hook-capable run-time functions and writing your own client-defined hook functions, see [Debug Hook Function Writing](/visualstudio/debugger/debug-hook-function-writing). +For more information about using other hook-capable run-time functions and writing your own client-defined hook functions, see [Debug hook function writing](/visualstudio/debugger/debug-hook-function-writing). > [!NOTE] > If your application is compiled with **/clr** and the reporting function is called after the application has exited main, the CLR will throw an exception if the reporting function calls any CRT functions. @@ -58,13 +58,13 @@ For more information about using other hook-capable run-time functions and writi |-------------|---------------------| |**_CrtSetReportHook**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Libraries -Debug versions of [C run-time libraries](../../c-runtime-library/crt-library-features.md) only. +Debug versions of [C run-time libraries](../crt-library-features.md) only. ## See also -[Debug Routines](../../c-runtime-library/debug-routines.md)
-[_CrtGetReportHook](crtgetreporthook.md)
+[Debug routines](../debug-routines.md)\ +[`_CrtGetReportHook`](crtgetreporthook.md) diff --git a/docs/c-runtime-library/reference/crtsetreporthook2-crtsetreporthookw2.md b/docs/c-runtime-library/reference/crtsetreporthook2-crtsetreporthookw2.md index 184c99a7e25..2df80b15d3b 100644 --- a/docs/c-runtime-library/reference/crtsetreporthook2-crtsetreporthookw2.md +++ b/docs/c-runtime-library/reference/crtsetreporthook2-crtsetreporthookw2.md @@ -29,19 +29,19 @@ int _CrtSetReportHookW2( ### Parameters -*mode*
+*`mode`*\ The action to take: **_CRT_RPTHOOK_INSTALL** or **_CRT_RPTHOOK_REMOVE**. -*pfnNewHook*
+*`pfnNewHook`*\ Report hook to install or remove in the narrow-character or wide-character version of this function. -## Return Value +## Return value --1 if an error was encountered, with **EINVAL** or **ENOMEM** set; otherwise returns the reference count of *pfnNewHook* after the call. +-1 if an error was encountered, with **EINVAL** or **ENOMEM** set; otherwise returns the reference count of *`pfnNewHook`* after the call. ## Remarks -**_CrtSetReportHook2** and **_CrtSetReportHookW2** let you hook or unhook a function, whereas [_CrtSetReportHook](crtsetreporthook.md) only lets you hook a function. +**_CrtSetReportHook2** and **_CrtSetReportHookW2** let you hook or unhook a function, whereas [`_CrtSetReportHook`](crtsetreporthook.md) only lets you hook a function. **_CrtSetReportHook2** or **_CrtSetReportHookW2** should be used instead of **_CrtSetReportHook** when the hook call is made in a DLL and when multiple DLLs might be loaded and setting their own hook functions. In such a situation, DLLs can be unloaded in a different order than they were loaded and the hook function can be left pointing at an unloaded DLL. Any debug output crashes the process if the hook functions were added with **_CrtSetReportHook**. @@ -59,7 +59,7 @@ Use the following prototype for the narrow-character report hooks: int YourReportHook( int reportType, char *message, int *returnValue ); ``` -These functions validate their parameters. If *mode* or *pfnNewHook* is invalid, these 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. +These functions validate their parameters. If *`mode`* or *`pfnNewHook`* is invalid, these 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. > [!NOTE] > If your application is compiled with **/clr** and the reporting function is called after the application has exited main, the CLR will throw an exception if the reporting function calls any CRT functions. @@ -71,11 +71,11 @@ These functions validate their parameters. If *mode* or *pfnNewHook* is invalid, |**_CrtSetReportHook2**|\|\| |**_CrtSetReportHookW2**|\|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Libraries -Debug versions of [C run-time libraries](../../c-runtime-library/crt-library-features.md) only. +Debug versions of [C run-time libraries](../crt-library-features.md) only. ## Example @@ -227,4 +227,4 @@ _CrtSetReportHook2(_CRT_RPTHOOK_REMOVE, TestHook1) returned 0 ## See also -[Debug Routines](../../c-runtime-library/debug-routines.md)
+[Debug routines](../debug-routines.md) diff --git a/docs/c-runtime-library/reference/crtsetreportmode.md b/docs/c-runtime-library/reference/crtsetreportmode.md index 33e26bd2861..aaf32682f49 100644 --- a/docs/c-runtime-library/reference/crtsetreportmode.md +++ b/docs/c-runtime-library/reference/crtsetreportmode.md @@ -30,15 +30,15 @@ Report type: **`_CRT_WARN`**, **`_CRT_ERROR`**, and **`_CRT_ASSERT`**. *`reportMode`*\ New report mode or modes for *`reportType`*. -## Return Value +## Return value -On successful completion, **`_CrtSetReportMode`** returns the previous report mode or modes for the report type specified in *`reportType`*. If an invalid value is passed in as *`reportType`* or an invalid mode is specified for *`reportMode`*, **`_CrtSetReportMode`** invokes the invalid parameter handler as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, this function sets **`errno`** to **`EINVAL`** and returns -1. For more information, see [`errno, _doserrno, _sys_errlist, and _sys_nerr`](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +On successful completion, **`_CrtSetReportMode`** returns the previous report mode or modes for the report type specified in *`reportType`*. If an invalid value is passed in as *`reportType`* or an invalid mode is specified for *`reportMode`*, **`_CrtSetReportMode`** invokes the invalid parameter handler as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, this function sets **`errno`** to **`EINVAL`** and returns -1. For more information, see [`errno, _doserrno, _sys_errlist, and _sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks **`_CrtSetReportMode`** specifies the output destination for **`_CrtDbgReport`**. Because the macros [`_ASSERT`](assert-asserte-assert-expr-macros.md), [`_ASSERTE`](assert-asserte-assert-expr-macros.md), [`_RPT`](rpt-rptf-rptw-rptfw-macros.md), and [`_RPTF`](rpt-rptf-rptw-rptfw-macros.md) call **`_CrtDbgReport`**, **`_CrtSetReportMode`** specifies the output destination of text specified with those macros. -When [`_DEBUG`](../../c-runtime-library/debug.md) isn't defined, calls to **`_CrtSetReportMode`** are removed during preprocessing. +When [`_DEBUG`](../debug.md) isn't defined, calls to **`_CrtSetReportMode`** are removed during preprocessing. If you don't call **`_CrtSetReportMode`** to define the output destination of messages, then the following defaults are in effect: @@ -80,10 +80,10 @@ In addition, you can control the reporting mode or modes for each report type se |-------------|---------------------|---------------------| |**`_CrtSetReportMode`**|``|``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). -**Libraries:** Debug versions of the [C runtime libraries](../../c-runtime-library/crt-library-features.md) only. +**Libraries:** Debug versions of the [C runtime libraries](../crt-library-features.md) only. ## See also -[Debug Routines](../../c-runtime-library/debug-routines.md) +[Debug routines](../debug-routines.md) diff --git a/docs/c-runtime-library/reference/cscanf-cscanf-l-cwscanf-cwscanf-l.md b/docs/c-runtime-library/reference/cscanf-cscanf-l-cwscanf-cwscanf-l.md index 9466da10693..6f033f15214 100644 --- a/docs/c-runtime-library/reference/cscanf-cscanf-l-cwscanf-cwscanf-l.md +++ b/docs/c-runtime-library/reference/cscanf-cscanf-l-cwscanf-cwscanf-l.md @@ -12,10 +12,10 @@ ms.assetid: dbfe7547-b577-4567-a1cb-893fa640e669 --- # _cscanf, _cscanf_l, _cwscanf, _cwscanf_l -Reads formatted data from the console. More secure versions of these functions are available; see [_cscanf_s, _cscanf_s_l, _cwscanf_s, _cwscanf_s_l](cscanf-s-cscanf-s-l-cwscanf-s-cwscanf-s-l.md). +Reads formatted data from the console. More secure versions of these functions are available; see [`_cscanf_s`, `_cscanf_s_l`, `_cwscanf_s`, `_cwscanf_s_l`](cscanf-s-cscanf-s-l-cwscanf-s-cwscanf-s-l.md). > [!NOTE] -> In Visual Studio 2015 The `printf` and `scanf` family of functions were declared as **`inline`** and moved to the `` and `` headers. If you are migrating older code you might see *LNK2019* in connection with these functions. For more information, see [Visual C++ change history 2003 - 2015](../../porting/visual-cpp-change-history-2003-2015.md#stdio_and_conio). +> In Visual Studio 2015 The `printf` and `scanf` family of functions were declared as **`inline`** and moved to the `` and `` headers. If you are migrating older code you might see Linker Error LNK2019 in connection with these functions. For more information, see [Visual C++ change history 2003 - 2015](../../porting/visual-cpp-change-history-2003-2015.md#stdio_and_conio). > [!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). @@ -45,28 +45,28 @@ int _cwscanf_l( ### Parameters -*format*
+*`format`*\ Format-control string. -*argument*
+*`argument`*\ Optional parameters. -*locale*
+*`locale`*\ The locale to use. -## Return Value +## Return value The number of fields that were successfully converted and assigned. The return value doesn't include fields that were read but not assigned. The return value is `EOF` for an attempt to read at end of file. An `EOF` can also be returned when keyboard input is redirected at the operating-system command-line level. A return value of zero means that no fields were assigned. ## Remarks -The **_cscanf** function reads data directly from the console into the locations given by *argument*. The [_getche](getch-getwch.md) function is used to read characters. Each optional parameter must be a pointer to a variable with a type that corresponds to a type specifier in *format*. The format controls the interpretation of the input fields and has the same form and function as the *format* parameter for the [scanf](scanf-scanf-l-wscanf-wscanf-l.md) function. While **_cscanf** normally echoes the input character, it doesn't do so if the last call was to **_ungetch**. +The **_cscanf** function reads data directly from the console into the locations given by *`argument`*. The [`_getche`](getch-getwch.md) function is used to read characters. Each optional parameter must be a pointer to a variable with a type that corresponds to a type specifier in *`format`*. The format controls the interpretation of the input fields and has the same form and function as the *`format`* parameter for the [`scanf`](scanf-scanf-l-wscanf-wscanf-l.md) function. While **_cscanf** normally echoes the input character, it doesn't do so if the last call was to **_ungetch**. -This function validates its parameters. If format is **NULL**, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, **errno** is set to **EINVAL** and the function returns **EOF**. +This function validates its parameters. If format is **NULL**, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, **errno** is set to **EINVAL** and the function returns **EOF**. The versions of these functions with the **_l** suffix are identical except that they use the locale parameter passed in instead of the current thread locale. -### Generic-Text Routine Mappings +### Generic-text routine mappings |TCHAR.H routine|_UNICODE and _MBCS not defined|_MBCS defined|_UNICODE defined| |---------------------|--------------------------------------|--------------------|-----------------------| @@ -80,7 +80,7 @@ The versions of these functions with the **_l** suffix are identical except that |**_cscanf**, **_cscanf_l**|\| |**_cwscanf**, **_cwscanf_l**|\ or \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -121,8 +121,8 @@ You entered 3 2 1 ## See also -[Console and Port I/O](../../c-runtime-library/console-and-port-i-o.md)
-[_cprintf, _cprintf_l, _cwprintf, _cwprintf_l](cprintf-cprintf-l-cwprintf-cwprintf-l.md)
-[fscanf, _fscanf_l, fwscanf, _fwscanf_l](fscanf-fscanf-l-fwscanf-fwscanf-l.md)
-[scanf_s, _scanf_s_l, wscanf_s, _wscanf_s_l](scanf-s-scanf-s-l-wscanf-s-wscanf-s-l.md)
-[sscanf, _sscanf_l, swscanf, _swscanf_l](sscanf-sscanf-l-swscanf-swscanf-l.md)
+[Console and port I/O](../console-and-port-i-o.md)\ +[`_cprintf`, `_cprintf_l`, `_cwprintf`, `_cwprintf_l`](cprintf-cprintf-l-cwprintf-cwprintf-l.md)\ +[`fscanf`, `_fscanf_l`, `fwscanf`, `_fwscanf_l`](fscanf-fscanf-l-fwscanf-fwscanf-l.md)\ +[`scanf_s`, `_scanf_s_l`, `wscanf_s`, `_wscanf_s_l`](scanf-s-scanf-s-l-wscanf-s-wscanf-s-l.md)\ +[`sscanf`, `_sscanf_l`, `swscanf`, `_swscanf_l`](sscanf-sscanf-l-swscanf-swscanf-l.md) diff --git a/docs/c-runtime-library/reference/cscanf-s-cscanf-s-l-cwscanf-s-cwscanf-s-l.md b/docs/c-runtime-library/reference/cscanf-s-cscanf-s-l-cwscanf-s-cwscanf-s-l.md index 2ff0ac9d08d..fb3577acb70 100644 --- a/docs/c-runtime-library/reference/cscanf-s-cscanf-s-l-cwscanf-s-cwscanf-s-l.md +++ b/docs/c-runtime-library/reference/cscanf-s-cscanf-s-l-cwscanf-s-cwscanf-s-l.md @@ -12,7 +12,7 @@ ms.assetid: 9ccab74d-916f-42a6-93d8-920525efdf4b --- # _cscanf_s, _cscanf_s_l, _cwscanf_s, _cwscanf_s_l -Reads formatted data from the console. These more secure versions of [_cscanf, _cscanf_l, _cwscanf, _cwscanf_l](cscanf-cscanf-l-cwscanf-cwscanf-l.md) have security enhancements, as described in [Security Features in the CRT](../../c-runtime-library/security-features-in-the-crt.md). +Reads formatted data from the console. These more secure versions of [`_cscanf`, `_cscanf_l`, `_cwscanf`, `_cwscanf_l`](cscanf-cscanf-l-cwscanf-cwscanf-l.md) have security enhancements, as described in [Security features in the CRT](../security-features-in-the-crt.md). > [!IMPORTANT] > This API cannot be used in applications that execute in the Windows Runtime. For more information, see [CRT functions not supported in Universal Windows Platform apps](../../cppcx/crt-functions-not-supported-in-universal-windows-platform-apps.md). @@ -42,33 +42,33 @@ int _cwscanf_s_l( ### Parameters -*format*
+*`format`*\ Format-control string. -*argument*
+*`argument`*\ Optional parameters. -*locale*
+*`locale`*\ The locale to use. -## Return Value +## Return value The number of fields that were successfully converted and assigned. The return value doesn't include fields that were read but not assigned. The return value is `EOF` for an attempt to read at end of file. An `EOF` can also be returned when keyboard input is redirected at the operating-system command-line level. A return value of zero means that no fields were assigned. -These functions validate their parameters. If *format* is a null pointer, these 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 return `EOF`, and **errno** is set to **EINVAL**. +These functions validate their parameters. If *`format`* is a null pointer, these functions invoke the invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, these functions return `EOF`, and **errno** is set to **EINVAL**. ## Remarks -The **_cscanf_s** function reads data directly from the console into the locations given by *argument*. The [_getche](getch-getwch.md) function is used to read characters. Each optional parameter must be a pointer to a variable with a type that corresponds to a type specifier in *format*. The format controls the interpretation of the input fields and has the same form and function as the *format* parameter for the [scanf_s](scanf-scanf-l-wscanf-wscanf-l.md) function. While **_cscanf_s** normally echoes the input character, it doesn't do so if the last call was to **_ungetch**. +The **_cscanf_s** function reads data directly from the console into the locations given by *`argument`*. The [`_getche`](getch-getwch.md) function is used to read characters. Each optional parameter must be a pointer to a variable with a type that corresponds to a type specifier in *`format`*. The format controls the interpretation of the input fields and has the same form and function as the *`format`* parameter for the [`scanf_s`](scanf-scanf-l-wscanf-wscanf-l.md) function. While **_cscanf_s** normally echoes the input character, it doesn't do so if the last call was to **_ungetch**. -Like other secure versions of functions in the **scanf** family, **_cscanf_s** and **_cswscanf_s** require size arguments for the type field characters **c**, **C**, **s**, **S**, and **[**. For more information, see [scanf Width Specification](../../c-runtime-library/scanf-width-specification.md). +Like other secure versions of functions in the **scanf** family, **_cscanf_s** and **_cswscanf_s** require size arguments for the type field characters **c**, **C**, **s**, **S**, and **[**. For more information, see [scanf Width Specification](../scanf-width-specification.md). > [!NOTE] > The size parameter is of type **`unsigned`**, not **size_t**. The versions of these functions with the **_l** suffix are identical except that they use the locale parameter passed in instead of the current thread locale. -### Generic-Text Routine Mappings +### Generic-text routine mappings |TCHAR.H routine|_UNICODE and _MBCS not defined|_MBCS defined|_UNICODE defined| |---------------------|--------------------------------------|--------------------|-----------------------| @@ -82,11 +82,11 @@ The versions of these functions with the **_l** suffix are identical except that |**_cscanf_s**, **_cscanf_s_l**|\| |**_cwscanf_s**, **_cwscanf_s_l**|\ or \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Libraries -All versions of the [C run-time libraries](../../c-runtime-library/crt-library-features.md). +All versions of the [C run-time libraries](../crt-library-features.md). ## Example @@ -125,8 +125,8 @@ You entered 1 2 3 ## See also -[Console and Port I/O](../../c-runtime-library/console-and-port-i-o.md)
-[_cprintf, _cprintf_l, _cwprintf, _cwprintf_l](cprintf-cprintf-l-cwprintf-cwprintf-l.md)
-[fscanf_s, _fscanf_s_l, fwscanf_s, _fwscanf_s_l](fscanf-s-fscanf-s-l-fwscanf-s-fwscanf-s-l.md)
-[scanf_s, _scanf_s_l, wscanf_s, _wscanf_s_l](scanf-s-scanf-s-l-wscanf-s-wscanf-s-l.md)
-[sscanf_s, _sscanf_s_l, swscanf_s, _swscanf_s_l](sscanf-s-sscanf-s-l-swscanf-s-swscanf-s-l.md)
+[Console and port I/O](../console-and-port-i-o.md)\ +[`_cprintf`, `_cprintf_l`, `_cwprintf`, `_cwprintf_l`](cprintf-cprintf-l-cwprintf-cwprintf-l.md)\ +[`fscanf_s`, `_fscanf_s_l`, `fwscanf_s`, `_fwscanf_s_l`](fscanf-s-fscanf-s-l-fwscanf-s-fwscanf-s-l.md)\ +[`scanf_s`, `_scanf_s_l`, `wscanf_s`, `_wscanf_s_l`](scanf-s-scanf-s-l-wscanf-s-wscanf-s-l.md)\ +[`sscanf_s`, `_sscanf_s_l`, `swscanf_s`, `_swscanf_s_l`](sscanf-s-sscanf-s-l-swscanf-s-swscanf-s-l.md) diff --git a/docs/c-runtime-library/reference/cscanf.md b/docs/c-runtime-library/reference/cscanf.md index 8f4dfb73c45..d9269ce238e 100644 --- a/docs/c-runtime-library/reference/cscanf.md +++ b/docs/c-runtime-library/reference/cscanf.md @@ -12,9 +12,9 @@ ms.assetid: 51aa2da2-0d53-4272-b510-f3eabf049ea7 --- # cscanf -The Microsoft-specific function name `cscanf` is a deprecated alias for the [_cscanf](cscanf-cscanf-l-cwscanf-cwscanf-l.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. +The Microsoft-specific function name `cscanf` is a deprecated alias for the [`_cscanf`](cscanf-cscanf-l-cwscanf-cwscanf-l.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. -We recommend you use [_cscanf](cscanf-cscanf-l-cwscanf-cwscanf-l.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). +We recommend you use [`_cscanf`](cscanf-cscanf-l-cwscanf-cwscanf-l.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). > [!IMPORTANT] > This API cannot be used in applications that execute in the Windows Runtime. For more information, see [CRT functions not supported in Universal Windows Platform apps](../../cppcx/crt-functions-not-supported-in-universal-windows-platform-apps.md). diff --git a/docs/c-runtime-library/reference/csin-csinf-csinl.md b/docs/c-runtime-library/reference/csin-csinf-csinl.md index 399c064829b..774a1d0a6db 100644 --- a/docs/c-runtime-library/reference/csin-csinf-csinl.md +++ b/docs/c-runtime-library/reference/csin-csinf-csinl.md @@ -36,12 +36,12 @@ _Lcomplex csinl( ### Parameters -*z*
+*`z`*\ A complex number that represents an angle, in radians. -## Return Value +## Return value -The sine of *z*, in radians. +The sine of *`z`*, in radians. ## Remarks @@ -53,20 +53,20 @@ Because C++ allows overloading, you can call overloads of **csin** that take and |-------------|--------------|------------------| |**csin**, **csinf**, **csinl**|\|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Alphabetical Function Reference](crt-alphabetical-function-reference.md)
-[catanh, catanhf, catanhl](catanh-catanhf-catanhl.md)
-[ctanh, ctanhf, ctanhl](ctanh-ctanhf-ctanhl.md)
-[catan, catanf, catanl](catan-catanf-catanl.md)
-[csinh, csinhf, csinhl](csinh-csinhf-csinhl.md)
-[casinh, casinhf, casinhl](casinh-casinhf-casinhl.md)
-[ccosh, ccoshf, ccoshl](ccosh-ccoshf-ccoshl.md)
-[cacosh, cacoshf, cacoshl](cacosh-cacoshf-cacoshl.md)
-[cacos, cacosf, cacosl](cacos-cacosf-cacosl.md)
-[ctan, ctanf, ctanl](ctan-ctanf-ctanl.md)
-[casin, casinf, casinl](casin-casinf-casinl.md)
-[ccos, ccosf, ccosl](ccos-ccosf-ccosl.md)
-[csqrt, csqrtf, csqrtl](csqrt-csqrtf-csqrtl.md)
+[Alphabetical function reference](crt-alphabetical-function-reference.md)\ +[`catanh`, `catanhf`, `catanhl`](catanh-catanhf-catanhl.md)\ +[`ctanh`, `ctanhf`, `ctanhl`](ctanh-ctanhf-ctanhl.md)\ +[`catan`, `catanf`, `catanl`](catan-catanf-catanl.md)\ +[`csinh`, `csinhf`, `csinhl`](csinh-csinhf-csinhl.md)\ +[`casinh`, `casinhf`, `casinhl`](casinh-casinhf-casinhl.md)\ +[`ccosh`, `ccoshf`, `ccoshl`](ccosh-ccoshf-ccoshl.md)\ +[`cacosh`, `cacoshf`, `cacoshl`](cacosh-cacoshf-cacoshl.md)\ +[`cacos`, `cacosf`, `cacosl`](cacos-cacosf-cacosl.md)\ +[`ctan`, `ctanf`, `ctanl`](ctan-ctanf-ctanl.md)\ +[`casin`, `casinf`, `casinl`](casin-casinf-casinl.md)\ +[`ccos`, `ccosf`, `ccosl`](ccos-ccosf-ccosl.md)\ +[`csqrt`, `csqrtf`, `csqrtl`](csqrt-csqrtf-csqrtl.md) diff --git a/docs/c-runtime-library/reference/csinh-csinhf-csinhl.md b/docs/c-runtime-library/reference/csinh-csinhf-csinhl.md index b87356ab457..e51602feddc 100644 --- a/docs/c-runtime-library/reference/csinh-csinhf-csinhl.md +++ b/docs/c-runtime-library/reference/csinh-csinhf-csinhl.md @@ -36,12 +36,12 @@ _Lcomplex csinhl( ### Parameters -*z*
+*`z`*\ A complex number that represents an angle, in radians. -## Return Value +## Return value -The hyperbolic sine of *z*, in radians. +The hyperbolic sine of *`z`*, in radians. ## Remarks @@ -53,20 +53,20 @@ Because C++ allows overloading, you can call overloads of **csinh** that take an |-------------|--------------|------------------| |**csinh**, **csinhf**, **csinhl**|\|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Alphabetical Function Reference](crt-alphabetical-function-reference.md)
-[catanh, catanhf, catanhl](catanh-catanhf-catanhl.md)
-[ctanh, ctanhf, ctanhl](ctanh-ctanhf-ctanhl.md)
-[catan, catanf, catanl](catan-catanf-catanl.md)
-[casinh, casinhf, casinhl](casinh-casinhf-casinhl.md)
-[ccosh, ccoshf, ccoshl](ccosh-ccoshf-ccoshl.md)
-[cacosh, cacoshf, cacoshl](cacosh-cacoshf-cacoshl.md)
-[cacos, cacosf, cacosl](cacos-cacosf-cacosl.md)
-[ctan, ctanf, ctanl](ctan-ctanf-ctanl.md)
-[csin, csinf, csinl](csin-csinf-csinl.md)
-[casin, casinf, casinl](casin-casinf-casinl.md)
-[ccos, ccosf, ccosl](ccos-ccosf-ccosl.md)
-[csqrt, csqrtf, csqrtl](csqrt-csqrtf-csqrtl.md)
+[Alphabetical function reference](crt-alphabetical-function-reference.md)\ +[`catanh`, `catanhf`, `catanhl`](catanh-catanhf-catanhl.md)\ +[`ctanh`, `ctanhf`, `ctanhl`](ctanh-ctanhf-ctanhl.md)\ +[`catan`, `catanf`, `catanl`](catan-catanf-catanl.md)\ +[`casinh`, `casinhf`, `casinhl`](casinh-casinhf-casinhl.md)\ +[`ccosh`, `ccoshf`, `ccoshl`](ccosh-ccoshf-ccoshl.md)\ +[`cacosh`, `cacoshf`, `cacoshl`](cacosh-cacoshf-cacoshl.md)\ +[`cacos`, `cacosf`, `cacosl`](cacos-cacosf-cacosl.md)\ +[`ctan`, `ctanf`, `ctanl`](ctan-ctanf-ctanl.md)\ +[`csin`, `csinf`, `csinl`](csin-csinf-csinl.md)\ +[`casin`, `casinf`, `casinl`](casin-casinf-casinl.md)\ +[`ccos`, `ccosf`, `ccosl`](ccos-ccosf-ccosl.md)\ +[`csqrt`, `csqrtf`, `csqrtl`](csqrt-csqrtf-csqrtl.md) diff --git a/docs/c-runtime-library/reference/csqrt-csqrtf-csqrtl.md b/docs/c-runtime-library/reference/csqrt-csqrtf-csqrtl.md index dcfc4cea173..dc52a252aad 100644 --- a/docs/c-runtime-library/reference/csqrt-csqrtf-csqrtl.md +++ b/docs/c-runtime-library/reference/csqrt-csqrtf-csqrtl.md @@ -36,12 +36,12 @@ _Lcomplex csqrtl( ### Parameters -*z*
+*`z`*\ A complex number. -## Return Value +## Return value -The square root of *z*. The result is in the right half-plane. +The square root of *`z`*. The result is in the right half-plane. |Input|SEH Exception|**_matherr** Exception| |-----------|-------------------|--------------------------| @@ -58,20 +58,20 @@ Because C++ allows overloading, you can call overloads of **csqrt** that take an |-------------|--------------|------------------| |**csqrt**, **csqrtf**, **csqrtl**|\|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Alphabetical Function Reference](crt-alphabetical-function-reference.md)
-[catanh, catanhf, catanhl](catanh-catanhf-catanhl.md)
-[ctanh, ctanhf, ctanhl](ctanh-ctanhf-ctanhl.md)
-[catan, catanf, catanl](catan-catanf-catanl.md)
-[csinh, csinhf, csinhl](csinh-csinhf-csinhl.md)
-[casinh, casinhf, casinhl](casinh-casinhf-casinhl.md)
-[ccosh, ccoshf, ccoshl](ccosh-ccoshf-ccoshl.md)
-[cacosh, cacoshf, cacoshl](cacosh-cacoshf-cacoshl.md)
-[cacos, cacosf, cacosl](cacos-cacosf-cacosl.md)
-[ctan, ctanf, ctanl](ctan-ctanf-ctanl.md)
-[csin, csinf, csinl](csin-csinf-csinl.md)
-[casin, casinf, casinl](casin-casinf-casinl.md)
-[ccos, ccosf, ccosl](ccos-ccosf-ccosl.md)
+[Alphabetical function reference](crt-alphabetical-function-reference.md)\ +[`catanh`, `catanhf`, `catanhl`](catanh-catanhf-catanhl.md)\ +[`ctanh`, `ctanhf`, `ctanhl`](ctanh-ctanhf-ctanhl.md)\ +[`catan`, `catanf`, `catanl`](catan-catanf-catanl.md)\ +[`csinh`, `csinhf`, `csinhl`](csinh-csinhf-csinhl.md)\ +[`casinh`, `casinhf`, `casinhl`](casinh-casinhf-casinhl.md)\ +[`ccosh`, `ccoshf`, `ccoshl`](ccosh-ccoshf-ccoshl.md)\ +[`cacosh`, `cacoshf`, `cacoshl`](cacosh-cacoshf-cacoshl.md)\ +[`cacos`, `cacosf`, `cacosl`](cacos-cacosf-cacosl.md)\ +[`ctan`, `ctanf`, `ctanl`](ctan-ctanf-ctanl.md)\ +[`csin`, `csinf`, `csinl`](csin-csinf-csinl.md)\ +[`casin`, `casinf`, `casinl`](casin-casinf-casinl.md)\ +[`ccos`, `ccosf`, `ccosl`](ccos-ccosf-ccosl.md) diff --git a/docs/c-runtime-library/reference/ctan-ctanf-ctanl.md b/docs/c-runtime-library/reference/ctan-ctanf-ctanl.md index 2b86ee75414..3be71fe7d12 100644 --- a/docs/c-runtime-library/reference/ctan-ctanf-ctanl.md +++ b/docs/c-runtime-library/reference/ctan-ctanf-ctanl.md @@ -36,12 +36,12 @@ _Lcomplex ctanl( ### Parameters -*z*\ +*`z`*\ A complex number that represents the angle, in radians. -## Return Value +## Return value -The tangent of *z*. +The tangent of *`z`*. |Input|SEH Exception|**_matherr** Exception| |-----------|-------------------|--------------------------| @@ -58,20 +58,20 @@ Because C++ allows overloading, you can call overloads of **ctan** that take and |-------------|--------------|------------------| |**ctan**, **ctanf**, **ctanl**|\|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Alphabetical Function Reference](crt-alphabetical-function-reference.md)
-[catanh, catanhf, catanhl](catanh-catanhf-catanhl.md)
-[ctanh, ctanhf, ctanhl](ctanh-ctanhf-ctanhl.md)
-[catan, catanf, catanl](catan-catanf-catanl.md)
-[csinh, csinhf, csinhl](csinh-csinhf-csinhl.md)
-[casinh, casinhf, casinhl](casinh-casinhf-casinhl.md)
-[ccosh, ccoshf, ccoshl](ccosh-ccoshf-ccoshl.md)
-[cacosh, cacoshf, cacoshl](cacosh-cacoshf-cacoshl.md)
-[cacos, cacosf, cacosl](cacos-cacosf-cacosl.md)
-[csin, csinf, csinl](csin-csinf-csinl.md)
-[casin, casinf, casinl](casin-casinf-casinl.md)
-[ccos, ccosf, ccosl](ccos-ccosf-ccosl.md)
-[csqrt, csqrtf, csqrtl](csqrt-csqrtf-csqrtl.md)
+[Alphabetical function reference](crt-alphabetical-function-reference.md)\ +[`catanh`, `catanhf`, `catanhl`](catanh-catanhf-catanhl.md)\ +[`ctanh`, `ctanhf`, `ctanhl`](ctanh-ctanhf-ctanhl.md)\ +[`catan`, `catanf`, `catanl`](catan-catanf-catanl.md)\ +[`csinh`, `csinhf`, `csinhl`](csinh-csinhf-csinhl.md)\ +[`casinh`, `casinhf`, `casinhl`](casinh-casinhf-casinhl.md)\ +[`ccosh`, `ccoshf`, `ccoshl`](ccosh-ccoshf-ccoshl.md)\ +[`cacosh`, `cacoshf`, `cacoshl`](cacosh-cacoshf-cacoshl.md)\ +[`cacos`, `cacosf`, `cacosl`](cacos-cacosf-cacosl.md)\ +[`csin`, `csinf`, `csinl`](csin-csinf-csinl.md)\ +[`casin`, `casinf`, `casinl`](casin-casinf-casinl.md)\ +[`ccos`, `ccosf`, `ccosl`](ccos-ccosf-ccosl.md)\ +[`csqrt`, `csqrtf`, `csqrtl`](csqrt-csqrtf-csqrtl.md) diff --git a/docs/c-runtime-library/reference/ctanh-ctanhf-ctanhl.md b/docs/c-runtime-library/reference/ctanh-ctanhf-ctanhl.md index ec298344699..66bb80bd5be 100644 --- a/docs/c-runtime-library/reference/ctanh-ctanhf-ctanhl.md +++ b/docs/c-runtime-library/reference/ctanh-ctanhf-ctanhl.md @@ -36,12 +36,12 @@ _Lcomplex ctanhl( ### Parameters -*z*\ +*`z`*\ A complex number that represents an angle, in radians. -## Return Value +## Return value -The complex hyperbolic tangent of *z*. +The complex hyperbolic tangent of *`z`*. |Input|SEH Exception|**_matherr** Exception| |-----------|-------------------|--------------------------| @@ -58,20 +58,20 @@ Because C++ allows overloading, you can call overloads of **ctanh** that take an |-------------|--------------|------------------| |**ctanh**, **ctanhf**, **ctanhl**|\|\| -For compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For compatibility information, see [Compatibility](../compatibility.md). ## See also -[Alphabetical Function Reference](crt-alphabetical-function-reference.md)
-[catanh, catanhf, catanhl](catanh-catanhf-catanhl.md)
-[catan, catanf, catanl](catan-catanf-catanl.md)
-[csinh, csinhf, csinhl](csinh-csinhf-csinhl.md)
-[casinh, casinhf, casinhl](casinh-casinhf-casinhl.md)
-[ccosh, ccoshf, ccoshl](ccosh-ccoshf-ccoshl.md)
-[cacosh, cacoshf, cacoshl](cacosh-cacoshf-cacoshl.md)
-[cacos, cacosf, cacosl](cacos-cacosf-cacosl.md)
-[ctan, ctanf, ctanl](ctan-ctanf-ctanl.md)
-[csin, csinf, csinl](csin-csinf-csinl.md)
-[casin, casinf, casinl](casin-casinf-casinl.md)
-[ccos, ccosf, ccosl](ccos-ccosf-ccosl.md)
-[csqrt, csqrtf, csqrtl](csqrt-csqrtf-csqrtl.md)
+[Alphabetical function reference](crt-alphabetical-function-reference.md)\ +[`catanh`, `catanhf`, `catanhl`](catanh-catanhf-catanhl.md)\ +[`catan`, `catanf`, `catanl`](catan-catanf-catanl.md)\ +[`csinh`, `csinhf`, `csinhl`](csinh-csinhf-csinhl.md)\ +[`casinh`, `casinhf`, `casinhl`](casinh-casinhf-casinhl.md)\ +[`ccosh`, `ccoshf`, `ccoshl`](ccosh-ccoshf-ccoshl.md)\ +[`cacosh`, `cacoshf`, `cacoshl`](cacosh-cacoshf-cacoshl.md)\ +[`cacos`, `cacosf`, `cacosl`](cacos-cacosf-cacosl.md)\ +[`ctan`, `ctanf`, `ctanl`](ctan-ctanf-ctanl.md)\ +[`csin`, `csinf`, `csinl`](csin-csinf-csinl.md)\ +[`casin`, `casinf`, `casinl`](casin-casinf-casinl.md)\ +[`ccos`, `ccosf`, `ccosl`](ccos-ccosf-ccosl.md)\ +[`csqrt`, `csqrtf`, `csqrtl`](csqrt-csqrtf-csqrtl.md) diff --git a/docs/c-runtime-library/reference/ctime-ctime32-ctime64-wctime-wctime32-wctime64.md b/docs/c-runtime-library/reference/ctime-ctime32-ctime64-wctime-wctime32-wctime64.md index d03df8ceb99..0dedb388d65 100644 --- a/docs/c-runtime-library/reference/ctime-ctime32-ctime64-wctime-wctime32-wctime64.md +++ b/docs/c-runtime-library/reference/ctime-ctime32-ctime64-wctime-wctime32-wctime64.md @@ -12,7 +12,7 @@ ms.assetid: 2423de37-a35c-4f0a-a378-3116bc120a9d --- # ctime, _ctime32, _ctime64, _wctime, _wctime32, _wctime64 -Convert a time value to a string and adjust for local time zone settings. More secure versions of these functions are available; see [ctime_s, _ctime32_s, _ctime64_s, _wctime_s, _wctime32_s, _wctime64_s](ctime-s-ctime32-s-ctime64-s-wctime-s-wctime32-s-wctime64-s.md). +Convert a time value to a string and adjust for local time zone settings. More secure versions of these functions are available; see [`ctime_s`, `_ctime32_s`, `_ctime64_s`, `_wctime_s`, `_wctime32_s`, `_wctime64_s`](ctime-s-ctime32-s-ctime64-s-wctime-s-wctime32-s-wctime64-s.md). ## Syntax @@ -27,24 +27,24 @@ wchar_t *_wctime64( const __time64_t *sourceTime ); ### Parameters -*sourceTime*
+*`sourceTime`*\ Pointer to stored time to convert. -## Return Value +## Return value A pointer to the character string result. **NULL** is returned when: -- *sourceTime* represents a date before midnight, January 1, 1970, UTC. +- *`sourceTime`* represents a date before midnight, January 1, 1970, UTC. -- You use **_ctime32** or **_wctime32**, and *sourceTime* represents a date after 23:59:59 January 18, 2038, UTC. +- You use **_ctime32** or **_wctime32**, and *`sourceTime`* represents a date after 23:59:59 January 18, 2038, UTC. -- You use **_ctime64** or **_wctime64**, and *sourceTime* represents a date after 23:59:59, December 31, 3000, UTC. +- You use **_ctime64** or **_wctime64**, and *`sourceTime`* represents a date after 23:59:59, December 31, 3000, UTC. **ctime** is an inline function that evaluates to **_ctime64**, and **time_t** is equivalent to **__time64_t**. If you need to force the compiler to interpret **time_t** as the old 32-bit **time_t**, you can define **_USE_32BIT_TIME_T**. This macro causes **ctime** to evaluate to **_ctime32**. We don't recommend you use it, because your application may fail after January 18, 2038, and it isn't allowed on 64-bit platforms. ## Remarks -The **ctime** function converts a time value stored as a [time_t](../../c-runtime-library/standard-types.md) value into a character string. The *sourceTime* value is typically obtained from a call to [time](time-time32-time64.md), which returns the number of seconds elapsed since midnight (00:00:00), January 1, 1970, coordinated universal time (UTC). The return value string contains exactly 26 characters and has the form: +The **ctime** function converts a time value stored as a [`time_t`](../standard-types.md) value into a character string. The *`sourceTime`* value is typically obtained from a call to [`time`](time-time32-time64.md), which returns the number of seconds elapsed since midnight (00:00:00), January 1, 1970, coordinated universal time (UTC). The return value string contains exactly 26 characters and has the form: ```Output Wed Jan 02 02:03:55 1980\n\0 @@ -52,17 +52,17 @@ Wed Jan 02 02:03:55 1980\n\0 A 24-hour clock is used. All fields have a constant width. The newline character ('\n') and the null character ('\0') occupy the last two positions of the string. -The converted character string is also adjusted according to the local time zone settings. For information on configuring the local time, see the [time](time-time32-time64.md), [_ftime](ftime-ftime32-ftime64.md), and [localtime](localtime-localtime32-localtime64.md) functions. For details about defining the time zone environment and global variables, see the [_tzset](tzset.md) function. +The converted character string is also adjusted according to the local time zone settings. For information on configuring the local time, see the [`time`](time-time32-time64.md), [`_ftime`](ftime-ftime32-ftime64.md), and [`localtime`](localtime-localtime32-localtime64.md) functions. For details about defining the time zone environment and global variables, see the [`_tzset`](tzset.md) function. A call to **ctime** modifies the single statically allocated buffer used by the **gmtime** and **localtime** functions. Each call to one of these routines destroys the result of the previous call. **ctime** shares a static buffer with the **asctime** function. Thus, a call to **ctime** destroys the results of any previous call to **asctime**, **localtime**, or **gmtime**. **_wctime** and **_wctime64** are the wide-character version of **ctime** and **_ctime64**; returning a pointer to wide-character string. Otherwise, **_ctime64**, **_wctime**, and **_wctime64** behave identically to **ctime**. -These functions validate their parameters. If *sourceTime* is a null pointer, or if the *sourceTime* value is negative, these functions invoke the invalid parameter handler, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, the functions return **NULL** and set **errno** to **EINVAL**. +These functions validate their parameters. If *`sourceTime`* is a null pointer, or if the *`sourceTime`* value is negative, these functions invoke the invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, the functions return **NULL** and set **errno** to **EINVAL**. By default, this function's global state is scoped to the application. To change this behavior, see [Global state in the CRT](../global-state.md). -### Generic-Text Routine Mappings +### Generic-text routine mappings |TCHAR.H routine|_UNICODE & _MBCS not defined|_MBCS defined|_UNICODE defined| |---------------------|------------------------------------|--------------------|-----------------------| @@ -81,7 +81,7 @@ By default, this function's global state is scoped to the application. To change |**_wctime32**|\ or \| |**_wctime64**|\ or \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -112,10 +112,10 @@ The time is Wed Feb 13 16:04:43 2002 ## See also -[Time Management](../../c-runtime-library/time-management.md)
-[asctime, _wasctime](asctime-wasctime.md)
-[ctime_s, _ctime32_s, _ctime64_s, _wctime_s, _wctime32_s, _wctime64_s](ctime-s-ctime32-s-ctime64-s-wctime-s-wctime32-s-wctime64-s.md)
-[_ftime, _ftime32, _ftime64](ftime-ftime32-ftime64.md)
-[gmtime, _gmtime32, _gmtime64](gmtime-gmtime32-gmtime64.md)
-[localtime, _localtime32, _localtime64](localtime-localtime32-localtime64.md)
-[time, _time32, _time64](time-time32-time64.md)
+[Time management](../time-management.md)\ +[`asctime`, `_wasctime`](asctime-wasctime.md)\ +[`ctime_s`, `_ctime32_s`, `_ctime64_s`, `_wctime_s`, `_wctime32_s`, `_wctime64_s`](ctime-s-ctime32-s-ctime64-s-wctime-s-wctime32-s-wctime64-s.md)\ +[`_ftime`, `_ftime32`, `_ftime64`](ftime-ftime32-ftime64.md)\ +[`gmtime`, `_gmtime32`, `_gmtime64`](gmtime-gmtime32-gmtime64.md)\ +[`localtime`, `_localtime32`, `_localtime64`](localtime-localtime32-localtime64.md)\ +[`time`, `_time32`, `_time64`](time-time32-time64.md) diff --git a/docs/c-runtime-library/reference/ctime-s-ctime32-s-ctime64-s-wctime-s-wctime32-s-wctime64-s.md b/docs/c-runtime-library/reference/ctime-s-ctime32-s-ctime64-s-wctime-s-wctime32-s-wctime64-s.md index 8c129bb4ec6..0326029fcb2 100644 --- a/docs/c-runtime-library/reference/ctime-s-ctime32-s-ctime64-s-wctime-s-wctime32-s-wctime64-s.md +++ b/docs/c-runtime-library/reference/ctime-s-ctime32-s-ctime64-s-wctime-s-wctime32-s-wctime64-s.md @@ -12,7 +12,7 @@ ms.assetid: 36ac419a-8000-4389-9fd8-d78b747a009b --- # ctime_s, _ctime32_s, _ctime64_s, _wctime_s, _wctime32_s, _wctime64_s -Convert a time value to a string and adjust for local time zone settings. These functions are versions of [ctime, _ctime64, _wctime, _wctime64](ctime-ctime32-ctime64-wctime-wctime32-wctime64.md) with security enhancements as described in [Security Features in the CRT](../../c-runtime-library/security-features-in-the-crt.md). +Convert a time value to a string and adjust for local time zone settings. These functions are versions of [`ctime`, `_ctime64`, `_wctime`, `_wctime64`](ctime-ctime32-ctime64-wctime-wctime32-wctime64.md) with security enhancements as described in [Security features in the CRT](../security-features-in-the-crt.md). ## Syntax @@ -74,30 +74,30 @@ errno_t _wctime64_s( ### Parameters -*buffer*
+*`buffer`*\ Must be large enough to hold 26 characters. A pointer to the character string result, or **NULL** if: -- *sourceTime* represents a date before midnight, January 1, 1970, UTC. +- *`sourceTime`* represents a date before midnight, January 1, 1970, UTC. -- If you use **_ctime32_s** or **_wctime32_s** and *sourceTime* represents a date after 23:59:59 January 18, 2038, UTC. +- If you use **_ctime32_s** or **_wctime32_s** and *`sourceTime`* represents a date after 23:59:59 January 18, 2038, UTC. -- If you use **_ctime64_s** or **_wctime64_s** and *sourceTime* represents a date after 23:59:59, December 31, 3000, UTC. +- If you use **_ctime64_s** or **_wctime64_s** and *`sourceTime`* represents a date after 23:59:59, December 31, 3000, UTC. - If you use **_ctime_s** or **_wctime_s**, these functions are wrappers to the previous functions. See the Remarks section. -*numberOfElements*
+*`numberOfElements`*\ The size of the buffer. -*sourceTime*
+*`sourceTime`*\ Pointer to stored time. -## Return Value +## Return value -Zero if successful. If there's a failure due to an invalid parameter, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, an error code is returned. Error codes are defined in ERRNO.H; for a listing of these errors, see [errno](../../c-runtime-library/errno-constants.md). The actual error codes thrown for each error condition are shown in the following table. +Zero if successful. If there's a failure due to an invalid parameter, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, an error code is returned. Error codes are defined in ERRNO.H; for a listing of these errors, see [`errno`](../errno-constants.md). The actual error codes thrown for each error condition are shown in the following table. -## Error Conditions +## Error conditions -|*buffer*|*numberOfElements*|*sourceTime*|Return|Value in *buffer*| +|*`buffer`*|*`numberOfElements`*|*`sourceTime`*|Return|Value in *`buffer`*| |--------------|------------------------|------------|------------|-----------------------| |**NULL**|any|any|**EINVAL**|Not modified| |Not **NULL** (points to valid memory)|0|any|**EINVAL**|Not modified| @@ -107,25 +107,25 @@ Zero if successful. If there's a failure due to an invalid parameter, the invali ## Remarks -The **ctime_s** function converts a time value stored as a [time_t](../../c-runtime-library/standard-types.md) structure into a character string. The *sourceTime* value is typically obtained from a call to [time](time-time32-time64.md), which returns the number of seconds elapsed since midnight (00:00:00), January 1, 1970, coordinated universal time (UTC). The return value string contains exactly 26 characters and has the form: +The **ctime_s** function converts a time value stored as a [`time_t`](../standard-types.md) structure into a character string. The *`sourceTime`* value is typically obtained from a call to [`time`](time-time32-time64.md), which returns the number of seconds elapsed since midnight (00:00:00), January 1, 1970, coordinated universal time (UTC). The return value string contains exactly 26 characters and has the form: `Wed Jan 02 02:03:55 1980\n\0` A 24-hour clock is used. All fields have a constant width. The new line character ('\n') and the null character ('\0') occupy the last two positions of the string. -The converted character string is also adjusted according to the local time zone settings. For information on configuring the local time, see the [time](time-time32-time64.md), [_ftime](ftime-ftime32-ftime64.md), and [localtime](localtime-localtime32-localtime64.md) functions. For details about defining the time zone environment and global variables, see the [_tzset](tzset.md) function. +The converted character string is also adjusted according to the local time zone settings. For information on configuring the local time, see the [`time`](time-time32-time64.md), [`_ftime`](ftime-ftime32-ftime64.md), and [`localtime`](localtime-localtime32-localtime64.md) functions. For details about defining the time zone environment and global variables, see the [`_tzset`](tzset.md) function. **_wctime32_s** and **_wctime64_s** are the wide-character version of **_ctime32_s** and **_ctime64_s**; returning a pointer to wide-character string. Otherwise, **_ctime64_s**, **_wctime32_s**, and **_wctime64_s** behave identically to **_ctime32_s**. **ctime_s** is an inline function that evaluates to **_ctime64_s** and **time_t** is equivalent to **__time64_t**. If you need to force the compiler to interpret **time_t** as the old 32-bit **time_t**, you can define **_USE_32BIT_TIME_T**. This macro causes **ctime_s** to evaluate to **_ctime32_s**. We don't recommend it, because your application may fail after January 18, 2038, and it isn't allowed on 64-bit platforms. -In C++, using these functions is simplified by template overloads; the overloads can infer buffer length automatically, eliminating the need to specify a size argument. For more information, see [Secure Template Overloads](../../c-runtime-library/secure-template-overloads.md). +In C++, using these functions is simplified by template overloads; the overloads can infer buffer length automatically, eliminating the need to specify a size argument. For more information, see [Secure template overloads](../secure-template-overloads.md). -The debug library versions of these functions first fill the buffer with 0xFE. To disable this behavior, use [_CrtSetDebugFillThreshold](crtsetdebugfillthreshold.md). +The debug library versions of these functions first fill the buffer with 0xFE. To disable this behavior, use [`_CrtSetDebugFillThreshold`](crtsetdebugfillthreshold.md). By default, this function's global state is scoped to the application. To change this behavior, see [Global state in the CRT](../global-state.md). -### Generic-Text Routine Mappings +### Generic-text routine mappings |TCHAR.H routine|_UNICODE & _MBCS not defined|_MBCS defined|_UNICODE defined| |---------------------|------------------------------------|--------------------|-----------------------| @@ -140,11 +140,11 @@ By default, this function's global state is scoped to the application. To change |**ctime_s**, **_ctime32_s**, **_ctime64_s**|\| |**_wctime_s**, **_wctime32_s**, **_wctime64_s**|\ or \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Libraries -All versions of the [C run-time libraries](../../c-runtime-library/crt-library-features.md). +All versions of the [C run-time libraries](../crt-library-features.md). ## Example @@ -182,10 +182,10 @@ The time is Fri Apr 25 13:03:39 2003 ## See also -[Time Management](../../c-runtime-library/time-management.md)
-[asctime_s, _wasctime_s](asctime-s-wasctime-s.md)
-[ctime, _ctime32, _ctime64, _wctime, _wctime32, _wctime64](ctime-ctime32-ctime64-wctime-wctime32-wctime64.md)
-[_ftime, _ftime32, _ftime64](ftime-ftime32-ftime64.md)
-[gmtime_s, _gmtime32_s, _gmtime64_s](gmtime-s-gmtime32-s-gmtime64-s.md)
-[localtime_s, _localtime32_s, _localtime64_s](localtime-s-localtime32-s-localtime64-s.md)
-[time, _time32, _time64](time-time32-time64.md)
+[Time management](../time-management.md)\ +[`asctime_s`, `_wasctime_s`](asctime-s-wasctime-s.md)\ +[`ctime`, `_ctime32`, `_ctime64`, `_wctime`, `_wctime32`, `_wctime64`](ctime-ctime32-ctime64-wctime-wctime32-wctime64.md)\ +[`_ftime`, `_ftime32`, `_ftime64`](ftime-ftime32-ftime64.md)\ +[`gmtime_s`, `_gmtime32_s`, `_gmtime64_s`](gmtime-s-gmtime32-s-gmtime64-s.md)\ +[`localtime_s`, `_localtime32_s`, `_localtime64_s`](localtime-s-localtime32-s-localtime64-s.md)\ +[`time`, `_time32`, `_time64`](time-time32-time64.md) diff --git a/docs/c-runtime-library/reference/cwait.md b/docs/c-runtime-library/reference/cwait.md index 3f7df4742fe..0fe2f66c847 100644 --- a/docs/c-runtime-library/reference/cwait.md +++ b/docs/c-runtime-library/reference/cwait.md @@ -38,7 +38,7 @@ The handle to the process to wait on (that is, the process that has to terminate *`action`*\ **`NULL`**: Ignored by Windows operating system applications; for other applications: action code to perform on *`procHandle`*. -## Return Value +## Return value When the specified process has successfully completed, returns the handle of the specified process and sets *`termstat`* to the result code that's returned by the specified process. Otherwise, returns -1 and sets **`errno`** as follows. @@ -47,11 +47,11 @@ When the specified process has successfully completed, returns the handle of the |**`ECHILD`**|No specified process exists, *`procHandle`* is invalid, or the call to the [`GetExitCodeProcess`](/windows/win32/api/processthreadsapi/nf-processthreadsapi-getexitcodeprocess) or [`WaitForSingleObject`](/windows/win32/api/synchapi/nf-synchapi-waitforsingleobject) API failed.| |**`EINVAL`**|*`action`* is invalid.| -For more information about these and other return codes, see [`errno, _doserrno, _sys_errlist, and _sys_nerr`](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +For more information about these and other return codes, see [`errno, _doserrno, _sys_errlist, and _sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks -The **`_cwait`** function waits for the termination of the process ID of the specified process that's provided by *`procHandle`*. The value of *`procHandle`* that's passed to **`_cwait`** should be the value that's returned by the call to the [`_spawn`](../../c-runtime-library/spawn-wspawn-functions.md) function that created the specified process. If the process ID terminates before **`_cwait`** is called, **`_cwait`** returns immediately. **`_cwait`** can be used by any process to wait for any other known process for which a valid handle (*`procHandle`*) exists. +The **`_cwait`** function waits for the termination of the process ID of the specified process that's provided by *`procHandle`*. The value of *`procHandle`* that's passed to **`_cwait`** should be the value that's returned by the call to the [`_spawn`](../spawn-wspawn-functions.md) function that created the specified process. If the process ID terminates before **`_cwait`** is called, **`_cwait`** returns immediately. **`_cwait`** can be used by any process to wait for any other known process for which a valid handle (*`procHandle`*) exists. *`termstat`* points to a buffer where the return code of the specified process will be stored. The value of *`termstat`* indicates whether the specified process terminated normally by calling the Windows [`ExitProcess`](/windows/win32/api/processthreadsapi/nf-processthreadsapi-exitprocess) API. **`ExitProcess`** is called internally if the specified process calls **`exit`** or **`_exit`**, returns from **`main`**, or reaches the end of **`main`**. For more information about the value that's passed back through *`termstat`*, see [GetExitCodeProcess](/windows/win32/api/processthreadsapi/nf-processthreadsapi-getexitcodeprocess). If **`_cwait`** is called by using a **`NULL`** value for *`termstat`*, the return code of the specified process isn't stored. @@ -67,7 +67,7 @@ By default, this function's global state is scoped to the application. To change |-------------|---------------------|---------------------| |**`_cwait`**|\|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -141,5 +141,5 @@ Hi, Dad. It's Dave. ## See also -[Process and Environment Control](../../c-runtime-library/process-and-environment-control.md)\ -[_spawn, _wspawn Functions](../../c-runtime-library/spawn-wspawn-functions.md) +[Process and environment control](../process-and-environment-control.md)\ +[`_spawn`, `_wspawn` functions](../spawn-wspawn-functions.md) diff --git a/docs/c-runtime-library/reference/cxxthrowexception.md b/docs/c-runtime-library/reference/cxxthrowexception.md index 5cc6565aeab..25638c83d63 100644 --- a/docs/c-runtime-library/reference/cxxthrowexception.md +++ b/docs/c-runtime-library/reference/cxxthrowexception.md @@ -25,10 +25,10 @@ extern "C" void __stdcall _CxxThrowException( ### Parameters -*pExceptionObject*
+*`pExceptionObject`*\ The object that generated the exception. -*pThrowInfo*
+*`pThrowInfo`*\ The information that is required to process the exception. ## Remarks @@ -41,4 +41,4 @@ This method is included in a compiler-only file that the compiler uses to proces ## See also -[Alphabetical Function Reference](crt-alphabetical-function-reference.md)
+[Alphabetical function reference](crt-alphabetical-function-reference.md) diff --git a/docs/c-runtime-library/reference/difftime-difftime32-difftime64.md b/docs/c-runtime-library/reference/difftime-difftime32-difftime64.md index 4baaff443bb..e11817da808 100644 --- a/docs/c-runtime-library/reference/difftime-difftime32-difftime64.md +++ b/docs/c-runtime-library/reference/difftime-difftime32-difftime64.md @@ -24,25 +24,25 @@ double _difftime64( __time64_t timeEnd, __time64_t timeStart ); ### Parameters -*timeEnd*
+*`timeEnd`*\ Ending time. -*timeStart*
+*`timeStart`*\ Beginning time. -## Return Value +## Return value -**difftime** returns the elapsed time in seconds, from *timeStart* to *timeEnd*. The value returned is a double precision floating-point number. The return value may be 0, indicating an error. +**difftime** returns the elapsed time in seconds, from *`timeStart`* to *`timeEnd`*. The value returned is a double precision floating-point number. The return value may be 0, indicating an error. ## Remarks -The **difftime** function computes the difference between the two supplied time values *timeStart* and *timeEnd*. +The **difftime** function computes the difference between the two supplied time values *`timeStart`* and *`timeEnd`*. The time value supplied must fit within the range of **time_t**. **time_t** is a 64-bit value. Thus, the end of the range was extended from 23:59:59 January 18, 2038, UTC to 23:59:59, December 31, 3000. The lower range of **time_t** is still midnight, January 1, 1970. **difftime** is an inline function that evaluates to either **_difftime32** or **_difftime64** depending on whether **_USE_32BIT_TIME_T** is defined. _difftime32 and _difftime64 can be used directly to force the use of a particular size of the time type. -These functions validate their parameters. If either of the parameters is zero or negative, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, these functions return 0 and set **errno** to **EINVAL**. +These functions validate their parameters. If either of the parameters is zero or negative, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, these functions return 0 and set **errno** to **EINVAL**. By default, this function's global state is scoped to the application. To change this behavior, see [Global state in the CRT](../global-state.md). @@ -54,7 +54,7 @@ By default, this function's global state is scoped to the application. To change |**_difftime32**|\| |**_difftime64**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -114,6 +114,6 @@ Program takes 3 seconds. ## See also -[Floating-Point Support](../../c-runtime-library/floating-point-support.md)
-[Time Management](../../c-runtime-library/time-management.md)
-[time, _time32, _time64](time-time32-time64.md)
+[Math and floating-point support](../floating-point-support.md)\ +[Time management](../time-management.md)\ +[`time`, `_time32`, `_time64`](time-time32-time64.md) diff --git a/docs/c-runtime-library/reference/div.md b/docs/c-runtime-library/reference/div.md index cd201569805..5fb4a081e97 100644 --- a/docs/c-runtime-library/reference/div.md +++ b/docs/c-runtime-library/reference/div.md @@ -49,15 +49,15 @@ The numerator. *`denom`*\ The denominator. -## Return Value +## Return value **`div`** called by using arguments of type **`int`** returns a structure of type `div_t`, which contains the quotient and the remainder. The return value with arguments of type **`long`** is `ldiv_t`, and the return value with arguments of type **`long long`** is `lldiv_t`. The `div_t`, `ldiv_t`, and `lldiv_t` types are defined in \. ## Remarks -The **`div`** function divides *`numer`* by *`denom`* and computes the quotient and the remainder. The [`div_t`](../../c-runtime-library/standard-types.md) structure contains the quotient, `quot`, and the remainder, `rem`. The sign of the quotient is the same as the sign of the mathematical quotient. Its absolute value is the largest integer that's less than the absolute value of the mathematical quotient. If the denominator is 0, the program terminates with an error message. +The **`div`** function divides *`numer`* by *`denom`* and computes the quotient and the remainder. The [`div_t`](../standard-types.md) structure contains the quotient, `quot`, and the remainder, `rem`. The sign of the quotient is the same as the sign of the mathematical quotient. Its absolute value is the largest integer that's less than the absolute value of the mathematical quotient. If the denominator is 0, the program terminates with an error message. -The overloads of **`div`** that take arguments of type **`long`** or **`long long`** are only available to C++ code. The return types [`ldiv_t`](../../c-runtime-library/standard-types.md) and [`lldiv_t`](../../c-runtime-library/standard-types.md) contains members `quot` and `rem`, which have the same meanings as the members of `div_t`. +The overloads of **`div`** that take arguments of type **`long`** or **`long long`** are only available to C++ code. The return types [`ldiv_t`](../standard-types.md) and [`lldiv_t`](../standard-types.md) contains members `quot` and `rem`, which have the same meanings as the members of `div_t`. ## Requirements @@ -65,7 +65,7 @@ The overloads of **`div`** that take arguments of type **`long`** or **`long lon |--|--| | **`div`**, **`ldiv`**, **`lldiv`** | \ | -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -107,5 +107,5 @@ The quotient is 67, and the remainder is 5 ## See also -[Floating-point support](../../c-runtime-library/floating-point-support.md)\ +[Math and floating-point support](../floating-point-support.md)\ [`imaxdiv`](imaxdiv.md) diff --git a/docs/c-runtime-library/reference/dup-dup2.md b/docs/c-runtime-library/reference/dup-dup2.md index 2782ff0465e..55549f51691 100644 --- a/docs/c-runtime-library/reference/dup-dup2.md +++ b/docs/c-runtime-library/reference/dup-dup2.md @@ -28,11 +28,11 @@ File descriptors referring to open file. *`fd2`*\ Any file descriptor. -## Return Value +## Return value -**`_dup`** returns a new file descriptor. **`_dup2`** returns 0 to indicate success. If an error occurs, each function returns -1 and sets **`errno`** to **`EBADF`** if the file descriptor is invalid, or to **`EMFILE`** if no more file descriptors are available. When passed an invalid file descriptor, the function also invokes the invalid parameter handler, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). +**`_dup`** returns a new file descriptor. **`_dup2`** returns 0 to indicate success. If an error occurs, each function returns -1 and sets **`errno`** to **`EBADF`** if the file descriptor is invalid, or to **`EMFILE`** if no more file descriptors are available. When passed an invalid file descriptor, the function also invokes the invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). -For more information about return codes, see [`_doserrno`, `errno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). +For more information about return codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks @@ -53,7 +53,7 @@ By default, this function's global state is scoped to the application. To change |**`_dup`**|``| |**`_dup2`**|``| -The console isn't supported in Universal Windows Platform (UWP) apps. The standard stream handles that are associated with the console, **`stdin`**, **`stdout`**, and **`stderr`**, must be redirected before C run-time functions can use them in UWP apps. For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +The console isn't supported in Universal Windows Platform (UWP) apps. The standard stream handles that are associated with the console, **`stdin`**, **`stdout`**, and **`stderr`**, must be redirected before C run-time functions can use them in UWP apps. For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -118,7 +118,7 @@ This goes to file 'data' ## See also -[Low-Level I/O](../../c-runtime-library/low-level-i-o.md)\ +[Low-level I/O](../low-level-i-o.md)\ [`_close`](close.md)\ [`_creat`, `_wcreat`](creat-wcreat.md)\ [`_open`, `_wopen`](open-wopen.md) diff --git a/docs/c-runtime-library/reference/dupenv-s-dbg-wdupenv-s-dbg.md b/docs/c-runtime-library/reference/dupenv-s-dbg-wdupenv-s-dbg.md index dfac6dca970..08ee56eb652 100644 --- a/docs/c-runtime-library/reference/dupenv-s-dbg-wdupenv-s-dbg.md +++ b/docs/c-runtime-library/reference/dupenv-s-dbg-wdupenv-s-dbg.md @@ -12,7 +12,7 @@ ms.assetid: e3d81148-e24e-46d0-a21d-fd87b5e6256c --- # _dupenv_s_dbg, _wdupenv_s_dbg -Get a value from the current environment. Versions of [_dupenv_s, _wdupenv_s](dupenv-s-wdupenv-s.md) that allocate memory with [_malloc_dbg](malloc-dbg.md) to provide more debugging information. +Get a value from the current environment. Versions of [`_dupenv_s`, `_wdupenv_s`](dupenv-s-wdupenv-s.md) that allocate memory with [`_malloc_dbg`](malloc-dbg.md) to provide more debugging information. ## Syntax @@ -37,39 +37,39 @@ errno_t _wdupenv_s_dbg( ### Parameters -*buffer*
+*`buffer`*\ Buffer to store the variable's value. -*numberOfElements*
-Size of *buffer*. +*`numberOfElements`*\ +Size of *`buffer`*. -*varname*
+*`varname`*\ Environment variable name. -*blockType*
+*`blockType`*\ Requested type of the memory block: **_CLIENT_BLOCK** or **_NORMAL_BLOCK**. -*filename*
+*`filename`*\ Pointer to the name of the source file or **NULL**. -*lineNumber*
+*`lineNumber`*\ Line number in source file or **NULL**. -## Return Value +## Return value Zero on success, an error code on failure. -These functions validate their parameters; if *buffer* or *varname* is **NULL**, the invalid parameter handler is invoked as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, the functions set **errno** to **EINVAL**, and return **EINVAL**. +These functions validate their parameters; if *`buffer`* or *`varname`* is **NULL**, the invalid parameter handler is invoked as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, the functions set **errno** to **EINVAL**, and return **EINVAL**. -If these functions can't allocate enough memory, they set *buffer* to **NULL** and *numberOfElements* to 0, and return **ENOMEM**. +If these functions can't allocate enough memory, they set *`buffer`* to **NULL** and *`numberOfElements`* to 0, and return **ENOMEM**. ## Remarks -The **_dupenv_s_dbg** and **_wdupenv_s_dbg** functions are identical to **_dupenv_s** and **_wdupenv_s** except that, when **_DEBUG** is defined, these functions use the debug version of [malloc](malloc.md), [_malloc_dbg](malloc-dbg.md), to allocate memory for the value of the environment variable. For information on the debugging features of **_malloc_dbg**, see [_malloc_dbg](malloc-dbg.md). +The **_dupenv_s_dbg** and **_wdupenv_s_dbg** functions are identical to **_dupenv_s** and **_wdupenv_s** except that, when **_DEBUG** is defined, these functions use the debug version of [`malloc`](malloc.md), [`_malloc_dbg`](malloc-dbg.md), to allocate memory for the value of the environment variable. For information on the debugging features of **_malloc_dbg**, see [`_malloc_dbg`](malloc-dbg.md). -You don't need to call these functions explicitly in most cases. Instead, you can define the flag **_CRTDBG_MAP_ALLOC**. When **_CRTDBG_MAP_ALLOC** is defined, calls to **_dupenv_s** and **_wdupenv_s** are remapped to **_dupenv_s_dbg** and **_wdupenv_s_dbg**, respectively, with the *blockType* set to **_NORMAL_BLOCK**. Thus, you don't need to call these functions explicitly unless you want to mark the heap blocks as **_CLIENT_BLOCK**. For more information on block types, see [Types of blocks on the debug heap](/visualstudio/debugger/crt-debug-heap-details). +You don't need to call these functions explicitly in most cases. Instead, you can define the flag **_CRTDBG_MAP_ALLOC**. When **_CRTDBG_MAP_ALLOC** is defined, calls to **_dupenv_s** and **_wdupenv_s** are remapped to **_dupenv_s_dbg** and **_wdupenv_s_dbg**, respectively, with the *`blockType`* set to **_NORMAL_BLOCK**. Thus, you don't need to call these functions explicitly unless you want to mark the heap blocks as **_CLIENT_BLOCK**. For more information on block types, see [Types of blocks on the debug heap](/visualstudio/debugger/crt-debug-heap-details). -### Generic-Text Routine Mappings +### Generic-text routine mappings |TCHAR.H routine|_UNICODE & _MBCS not defined|_MBCS defined|_UNICODE defined| |---------------------|------------------------------------|--------------------|-----------------------| @@ -82,7 +82,7 @@ You don't need to call these functions explicitly in most cases. Instead, you ca |**_dupenv_s_dbg**|\| |**_wdupenv_s_dbg**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -115,7 +115,7 @@ nonexistentvariable = (null) ## See also -[Process and Environment Control](../../c-runtime-library/process-and-environment-control.md)
-[Environmental Constants](../../c-runtime-library/environmental-constants.md)
-[getenv_s, _wgetenv_s](getenv-s-wgetenv-s.md)
-[_putenv_s, _wputenv_s](putenv-s-wputenv-s.md)
+[Process and environment control](../process-and-environment-control.md)\ +[Environmental constants](../environmental-constants.md)\ +[`getenv_s`, `_wgetenv_s`](getenv-s-wgetenv-s.md)\ +[`_putenv_s`, `_wputenv_s`](putenv-s-wputenv-s.md) diff --git a/docs/c-runtime-library/reference/dupenv-s-wdupenv-s.md b/docs/c-runtime-library/reference/dupenv-s-wdupenv-s.md index 9c5ce71f1d0..02e6e3c623e 100644 --- a/docs/c-runtime-library/reference/dupenv-s-wdupenv-s.md +++ b/docs/c-runtime-library/reference/dupenv-s-wdupenv-s.md @@ -34,20 +34,20 @@ errno_t _wdupenv_s( ### Parameters -*`buffer`*
+*`buffer`*\ Buffer to store the variable's value. -*`numberOfElements`*
+*`numberOfElements`*\ Size of *`buffer`*. -*`varname`*
+*`varname`*\ Environment variable name. -## Return Value +## Return value Zero on success, an error code on failure. -These functions validate their parameters; if *`buffer`* or *`varname`* is **`NULL`**, the invalid parameter handler is invoked as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, the functions set **`errno`** to **`EINVAL`** and return **`EINVAL`**. +These functions validate their parameters; if *`buffer`* or *`varname`* is **`NULL`**, the invalid parameter handler is invoked as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, the functions set **`errno`** to **`EINVAL`** and return **`EINVAL`**. If these functions can't allocate enough memory, they set *`buffer`* to **`NULL`** and *`numberOfElements`* to 0, and return **`ENOMEM`**. @@ -70,7 +70,7 @@ The value in *`buffer`* is a copy of the environment variable's value; modifying 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| |---------------------|------------------------------------|--------------------|-----------------------| @@ -83,7 +83,7 @@ By default, this function's global state is scoped to the application. To change |**`_dupenv_s`**|``| |**`_wdupenv_s`**|`` or ``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -113,8 +113,8 @@ nonexistentvariable = (null) ## See also -[Process and Environment Control](../../c-runtime-library/process-and-environment-control.md)
-[Environmental Constants](../../c-runtime-library/environmental-constants.md)
-[`_dupenv_s_dbg`, `_wdupenv_s_dbg`](dupenv-s-dbg-wdupenv-s-dbg.md)
-[`getenv_s`, `_wgetenv_s`](getenv-s-wgetenv-s.md)
-[`_putenv_s`, `_wputenv_s`](putenv-s-wputenv-s.md)
+[Process and environment control](../process-and-environment-control.md)\ +[Environmental constants](../environmental-constants.md)\ +[`_dupenv_s_dbg`, `_wdupenv_s_dbg`](dupenv-s-dbg-wdupenv-s-dbg.md)\ +[`getenv_s`, `_wgetenv_s`](getenv-s-wgetenv-s.md)\ +[`_putenv_s`, `_wputenv_s`](putenv-s-wputenv-s.md) diff --git a/docs/c-runtime-library/reference/ecvt-s.md b/docs/c-runtime-library/reference/ecvt-s.md index 2c617c342bb..e2496d40243 100644 --- a/docs/c-runtime-library/reference/ecvt-s.md +++ b/docs/c-runtime-library/reference/ecvt-s.md @@ -12,81 +12,81 @@ ms.assetid: d52fb0a6-cb91-423f-80b3-952a8955d914 --- # _ecvt_s -Converts a **`double`** number to a string. This function is a version of [_ecvt](ecvt.md) with security enhancements as described in [Security Features in the CRT](../../c-runtime-library/security-features-in-the-crt.md). +Converts a **`double`** number to a string. This function is a version of [`_ecvt`](ecvt.md) with security enhancements as described in [Security features in the CRT](../security-features-in-the-crt.md). ## Syntax ```C errno_t _ecvt_s( - char * _Buffer, - size_t _SizeInBytes, - double _Value, - int _Count, - int *_Dec, - int *_Sign + char * buffer, + size_t sizeInBytes, + double value, + int count, + int *dec, + int *sign ); template errno_t _ecvt_s( - char (&_Buffer)[size], - double _Value, - int _Count, - int *_Dec, - int *_Sign + char (&buffer)[size], + double value, + int count, + int *dec, + int *sign ); // C++ only ``` ### Parameters -*_Buffer*
+*`buffer`*\ Filled with the pointer to the string of digits, the result of the conversion. -*_SizeInBytes*
+*`sizeInBytes`*\ Size of the buffer in bytes. -*_Value*
+*`value`*\ Number to be converted. -*_Count*
+*`count`*\ Number of digits stored. -*_Dec*
+*`dec`*\ Stored decimal-point position. -*_Sign*
+*`sign`*\ Sign of the converted number. -## Return Value +## Return value -Zero if successful. The return value is an error code if there's a failure. Error codes are defined in Errno.h. For more information, see [errno, _doserrno, _sys_errlist, and _sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +Zero if successful. The return value is an error code if there's a failure. Error codes are defined in Errno.h. For more information, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). -If there's an invalid parameter, as listed in the following table, this function invokes the invalid parameter handler, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, this function sets **errno** to **EINVAL**, and returns **EINVAL**. +If there's an invalid parameter, as listed in the following table, this function invokes the invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, this function sets **errno** to **EINVAL**, and returns **EINVAL**. -### Error Conditions +### Error conditions -|*_Buffer*|*_SizeInBytes*|_Value|_Count|_Dec|_Sign|Return value|Value in *buffer*| +|*`buffer`*|*`sizeInBytes`*|*`value`*|*`count`*|*`dec`*|*`sign`*|Return value|Value in *`buffer`*| |---------------|--------------------|-------------|-------------|-----------|------------|------------------|-----------------------| |**NULL**|any|any|any|any|any|**EINVAL**|Not modified.| |Not **NULL** (points to valid memory)|<=0|any|any|any|any|**EINVAL**|Not modified.| |any|any|any|any|**NULL**|any|**EINVAL**|Not modified.| |any|any|any|any|any|**NULL**|**EINVAL**|Not modified.| -## Security Issues +## Security issues -**_ecvt_s** might generate an access violation if *buffer* doesn't point to valid memory and isn't **NULL**. +**_ecvt_s** might generate an access violation if *`buffer`* doesn't point to valid memory and isn't **NULL**. ## Remarks -The **_ecvt_s** function converts a floating-point number to a character string. The *_Value* parameter is the floating-point number to be converted. This function stores up to *count* digits of *_Value* as a string and appends a null character ('\0'). If the number of digits in *_Value* exceeds *_Count*, the low-order digit is rounded. If there are fewer than *count* digits, the string is padded with zeros. +The **_ecvt_s** function converts a floating-point number to a character string. The *`value`* parameter is the floating-point number to be converted. This function stores up to *`count`* digits of *`value`* as a string and appends a null character ('\0'). If the number of digits in *`value`* exceeds *`count`*, the low-order digit is rounded. If there are fewer than *`count`* digits, the string is padded with zeros. -Only digits are stored in the string. The position of the decimal point and the sign of *_Value* can be obtained from *_Dec* and *_Sign* after the call. The *_Dec* parameter points to an integer value giving the position of the decimal point with respect to the beginning of the string. A 0 or negative integer value indicates that the decimal point lies to the left of the first digit. The *_Sign* parameter points to an integer that indicates the sign of the converted number. If the integer value is 0, the number is positive. Otherwise, the number is negative. +Only digits are stored in the string. The position of the decimal point and the sign of *`value`* can be obtained from *`dec`* and *`sign`* after the call. The *`dec`* parameter points to an integer value giving the position of the decimal point with respect to the beginning of the string. A 0 or negative integer value indicates that the decimal point lies to the left of the first digit. The *`sign`* parameter points to an integer that indicates the sign of the converted number. If the integer value is 0, the number is positive. Otherwise, the number is negative. A buffer of length **_CVTBUFSIZE** is sufficient for any floating-point value. -The difference between **_ecvt_s** and **_fcvt_s** is in the interpretation of the *_Count* parameter. **_ecvt_s** interprets *_Count* as the total number of digits in the output string, whereas **_fcvt_s** interprets *_Count* as the number of digits after the decimal point. +The difference between **_ecvt_s** and **_fcvt_s** is in the interpretation of the *`count`* parameter. **_ecvt_s** interprets *`count`* as the total number of digits in the output string, whereas **_fcvt_s** interprets *`count`* as the number of digits after the decimal point. -In C++, using this function is simplified by a template overload; the overload can infer buffer length automatically, eliminating the need to specify a size argument. For more information, see [Secure Template Overloads](../../c-runtime-library/secure-template-overloads.md). +In C++, using this function is simplified by a template overload; the overload can infer buffer length automatically, eliminating the need to specify a size argument. For more information, see [Secure template overloads](../secure-template-overloads.md). -The debug version of this function first fills the buffer with 0xFE. To disable this behavior, use [_CrtSetDebugFillThreshold](crtsetdebugfillthreshold.md). +The debug version of this function first fills the buffer with 0xFE. To disable this behavior, use [`_CrtSetDebugFillThreshold`](crtsetdebugfillthreshold.md). By default, this function's global state is scoped to the application. To change this behavior, see [Global state in the CRT](../global-state.md). @@ -96,7 +96,7 @@ By default, this function's global state is scoped to the application. To change |--------------|---------------------|---------------------| |**_ecvt_s**|\|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -132,9 +132,9 @@ Converted value: 12000 ## See also -[Data Conversion](../../c-runtime-library/data-conversion.md)
-[Floating-Point Support](../../c-runtime-library/floating-point-support.md)
-[atof, _atof_l, _wtof, _wtof_l](atof-atof-l-wtof-wtof-l.md)
-[_ecvt](ecvt.md)
-[_fcvt_s](fcvt-s.md)
-[_gcvt_s](gcvt-s.md)
+[Data conversion](../data-conversion.md)\ +[Math and floating-point support](../floating-point-support.md)\ +[`atof`, `_atof_l`, `_wtof`, `_wtof_l`](atof-atof-l-wtof-wtof-l.md)\ +[`_ecvt`](ecvt.md)\ +[`_fcvt_s`](fcvt-s.md)\ +[`_gcvt_s`](gcvt-s.md) diff --git a/docs/c-runtime-library/reference/ecvt.md b/docs/c-runtime-library/reference/ecvt.md index 67e4219bb7e..7f45c6c46be 100644 --- a/docs/c-runtime-library/reference/ecvt.md +++ b/docs/c-runtime-library/reference/ecvt.md @@ -12,7 +12,7 @@ ms.assetid: a916eb05-92d1-4b5c-8563-093acdb49dc8 --- # _ecvt -Converts a **`double`** number to a string. A more secure version of this function is available; see [_ecvt_s](ecvt-s.md). +Converts a **`double`** number to a string. A more secure version of this function is available; see [`_ecvt_s`](ecvt-s.md). ## Syntax @@ -27,35 +27,35 @@ char *_ecvt( ### Parameters -*value*
+*`value`*\ Number to be converted. -*count*
+*`count`*\ Number of digits stored. -*dec*
+*`dec`*\ Stored decimal-point position. -*sign*
+*`sign`*\ Sign of the converted number. -## Return Value +## Return value **_ecvt** returns a pointer to the string of digits; **NULL** if an error occurred. ## Remarks -The **_ecvt** function converts a floating-point number to a character string. The *value* parameter is the floating-point number to be converted. This function stores up to *count* digits of *value* as a string and appends a null character ('\0'). If the number of digits in *value* exceeds *count*, the low-order digit is rounded. If there are fewer than *count* digits, the string is padded with zeros. +The **_ecvt** function converts a floating-point number to a character string. The *`value`* parameter is the floating-point number to be converted. This function stores up to *`count`* digits of *`value`* as a string and appends a null character ('\0'). If the number of digits in *`value`* exceeds *`count`*, the low-order digit is rounded. If there are fewer than *`count`* digits, the string is padded with zeros. The total number of digits returned by **_ecvt** won't exceed **_CVTBUFSIZE**. -Only digits are stored in the string. The position of the decimal point and the sign of *value* can be obtained from *dec* and *sign* after the call. The *dec* parameter points to an integer value giving the position of the decimal point with respect to the beginning of the string. A 0 or negative integer value indicates that the decimal point lies to the left of the first digit. The *sign* parameter points to an integer that indicates the sign of the converted number. If the integer value is 0, the number is positive. Otherwise, the number is negative. +Only digits are stored in the string. The position of the decimal point and the sign of *`value`* can be obtained from *`dec`* and *`sign`* after the call. The *`dec`* parameter points to an integer value giving the position of the decimal point with respect to the beginning of the string. A 0 or negative integer value indicates that the decimal point lies to the left of the first digit. The *`sign`* parameter points to an integer that indicates the sign of the converted number. If the integer value is 0, the number is positive. Otherwise, the number is negative. -The difference between **_ecvt** and **_fcvt** is in the interpretation of the *count* parameter. **_ecvt** interprets *count* as the total number of digits in the output string, whereas **_fcvt** interprets *count* as the number of digits after the decimal point. +The difference between **_ecvt** and **_fcvt** is in the interpretation of the *`count`* parameter. **_ecvt** interprets *`count`* as the total number of digits in the output string, whereas **_fcvt** interprets *`count`* as the number of digits after the decimal point. **_ecvt** and **_fcvt** use a single statically allocated buffer for the conversion. Each call to one of these routines destroys the result of the previous call. -This function validates its parameters. If *dec* or *sign* is **NULL**, or *count* is 0, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, **errno** is set to **EINVAL,** and **NULL** is returned. +This function validates its parameters. If *`dec`* or *`sign`* is **NULL**, or *`count`* is 0, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, **errno** is set to **EINVAL,** and **NULL** is returned. 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). @@ -65,7 +65,7 @@ By default, this function's global state is scoped to the application. To change |--------------|---------------------| |**_ecvt**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -98,8 +98,8 @@ source: 3.1415926535 buffer: '3141592654' decimal: 1 sign: 0 ## See also -[Data Conversion](../../c-runtime-library/data-conversion.md)
-[Floating-Point Support](../../c-runtime-library/floating-point-support.md)
-[atof, _atof_l, _wtof, _wtof_l](atof-atof-l-wtof-wtof-l.md)
-[_fcvt](fcvt.md)
-[_gcvt](gcvt.md)
+[Data conversion](../data-conversion.md)\ +[Math and floating-point support](../floating-point-support.md)\ +[`atof`, `_atof_l`, `_wtof`, `_wtof_l`](atof-atof-l-wtof-wtof-l.md)\ +[`_fcvt`](fcvt.md)\ +[`_gcvt`](gcvt.md) diff --git a/docs/c-runtime-library/reference/endthread-endthreadex.md b/docs/c-runtime-library/reference/endthread-endthreadex.md index 7f8cb41be3c..a2a40575a06 100644 --- a/docs/c-runtime-library/reference/endthread-endthreadex.md +++ b/docs/c-runtime-library/reference/endthread-endthreadex.md @@ -50,11 +50,11 @@ By default, this function's global state is scoped to the application. To change |**`_endthread`**|``| |**`_endthreadex`**|``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Libraries -Multithreaded versions of the [C run-time libraries](../../c-runtime-library/crt-library-features.md) only. +Multithreaded versions of the [C run-time libraries](../crt-library-features.md) only. ## Example @@ -62,5 +62,5 @@ See the example for [`_beginthread`](beginthread-beginthreadex.md). ## See also -[Process and Environment Control](../../c-runtime-library/process-and-environment-control.md)\ +[Process and environment control](../process-and-environment-control.md)\ [`_beginthread`, `_beginthreadex`](beginthread-beginthreadex.md) diff --git a/docs/c-runtime-library/reference/eof.md b/docs/c-runtime-library/reference/eof.md index 255d750f4f2..6cbfcd49dcc 100644 --- a/docs/c-runtime-library/reference/eof.md +++ b/docs/c-runtime-library/reference/eof.md @@ -24,12 +24,12 @@ int _eof( ### Parameters -*`fd`*
+*`fd`*\ File descriptor referring to the open file. -## Return Value +## Return value -**_eof** returns 1 if the current position is end of file, or 0 if it isn't. A return value of -1 indicates an error; in this case, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, **errno** is set to **EBADF**, which indicates an invalid file descriptor. +**_eof** returns 1 if the current position is end of file, or 0 if it isn't. A return value of -1 indicates an error; in this case, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, **errno** is set to **EBADF**, which indicates an invalid file descriptor. ## Remarks @@ -43,7 +43,7 @@ By default, this function's global state is scoped to the application. To change |--------------|---------------------|---------------------| |**_eof**|\|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -99,9 +99,9 @@ Number of bytes read = 29 ## See also -[Error Handling](../../c-runtime-library/error-handling-crt.md)
-[Low-Level I/O](../../c-runtime-library/low-level-i-o.md)
-[clearerr](clearerr.md)
-[feof](feof.md)
-[ferror](ferror.md)
-[perror, _wperror](perror-wperror.md)
+[Error handling](../error-handling-crt.md)\ +[Low-level I/O](../low-level-i-o.md)\ +[`clearerr`](clearerr.md)\ +[`feof`](feof.md)\ +[`ferror`](ferror.md)\ +[`perror`, `_wperror`](perror-wperror.md) diff --git a/docs/c-runtime-library/reference/erf-erff-erfl-erfc-erfcf-erfcl.md b/docs/c-runtime-library/reference/erf-erff-erfl-erfc-erfcf-erfcl.md index 802a14bba74..61596f466d7 100644 --- a/docs/c-runtime-library/reference/erf-erff-erfl-erfc-erfcf-erfcl.md +++ b/docs/c-runtime-library/reference/erf-erff-erfl-erfc-erfcf-erfcl.md @@ -53,24 +53,24 @@ long double erfcl( ### Parameters -*x*\ +*`x`*\ A floating-point value. -## Return Value +## Return value -The **erf** functions return the Gauss error function of *x*. The **erfc** functions return the complementary Gauss error function of *x*. +The **erf** functions return the Gauss error function of *`x`*. The **erfc** functions return the complementary Gauss error function of *`x`*. ## Remarks -The **erf** functions calculate the Gauss error function of *x*, which is defined as: +The **erf** functions calculate the Gauss error function of *`x`*, which is defined as: ![The error function of x equals two over the square root of pi times the integral from zero to x of e to the minus t squared d t. ](media/crt_erf_formula.PNG "The error function of x") -The complementary Gauss error function is defined as 1 - erf(x). The **erf** functions return a value in the range -1.0 to 1.0. There's no error return. The **erfc** functions return a value in the range 0 to 2. If *x* is too large for **erfc**, the **errno** variable is set to **ERANGE**. +The complementary Gauss error function is defined as 1 - erf(x). The **erf** functions return a value in the range -1.0 to 1.0. There's no error return. The **erfc** functions return a value in the range 0 to 2. If *`x`* is too large for **erfc**, the **errno** variable is set to **ERANGE**. Because C++ allows overloading, you can call **erf** and **erfc** overloads that take and return **`float`** and **`long double`** types. In a C program, unless you're using the \ macro to call this function, **erf** and **erfc** always take and return a **`double`**. -If you use the \ `erf()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../../c-runtime-library/tgmath.md) for details. +If you use the \ `erf()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../tgmath.md) for details. By default, this function's global state is scoped to the application. To change this behavior, see [Global state in the CRT](../global-state.md). @@ -81,8 +81,8 @@ By default, this function's global state is scoped to the application. To change |**erf**, **erff**, **erfl**, **erfc**, **erfcf**, **erfcl**|\| |**erf** macro | \ | -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Floating-Point Support](../../c-runtime-library/floating-point-support.md)
+[Math and floating-point support](../floating-point-support.md) diff --git a/docs/c-runtime-library/reference/execl-wexecl.md b/docs/c-runtime-library/reference/execl-wexecl.md index 6d3874d6f96..5225535e139 100644 --- a/docs/c-runtime-library/reference/execl-wexecl.md +++ b/docs/c-runtime-library/reference/execl-wexecl.md @@ -36,13 +36,13 @@ intptr_t _wexecl( ### Parameters -*cmdname*
+*`cmdname`*\ Path of the file to be executed. -*arg0*, ... *argN*
+*`arg0`*, ... *`argN`*\ List of pointers to the parameters. -## Return Value +## Return value If successful, these functions don't return to the calling process. A return value of -1 indicates an error, in which case the **errno** global variable is set. @@ -60,7 +60,7 @@ If successful, these functions don't return to the calling process. A return val Each of these functions loads and executes a new process, passing each command-line argument as a separate parameter. The first argument is the command or executable file name, and the second argument should be the same as the first. It becomes `argv[0]` in the executed process. The third argument is the first argument, `argv[1]`, of the process being executed. -The **_execl** functions validate their parameters. If either *cmdname* or *arg0* is a null pointer or empty string, these 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 **_execl** functions validate their parameters. If either *`cmdname`* or *`arg0`* is a null pointer or empty string, these 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. ## Requirements @@ -69,19 +69,19 @@ The **_execl** functions validate their parameters. If either *cmdname* or *arg0 |**_execl**|\|\| |**_wexecl**|\ or \|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example -See the example in [_exec, _wexec Functions](../../c-runtime-library/exec-wexec-functions.md). +See the example in [`_exec`, `_wexec` functions](../exec-wexec-functions.md). ## See also -[Process and Environment Control](../../c-runtime-library/process-and-environment-control.md)
-[_exec, _wexec Functions](../../c-runtime-library/exec-wexec-functions.md)
-[abort](abort.md)
-[atexit](atexit.md)
-[exit, _Exit, _exit](exit-exit-exit.md)
-[_onexit, _onexit_m](onexit-onexit-m.md)
-[_spawn, _wspawn Functions](../../c-runtime-library/spawn-wspawn-functions.md)
-[system, _wsystem](system-wsystem.md)
+[Process and environment control](../process-and-environment-control.md)\ +[`_exec`, `_wexec` functions](../exec-wexec-functions.md)\ +[`abort`](abort.md)\ +[`atexit`](atexit.md)\ +[`exit`, `_Exit`, `_exit`](exit-exit-exit.md)\ +[`_onexit`, `_onexit_m`](onexit-onexit-m.md)\ +[`_spawn`, `_wspawn` functions](../spawn-wspawn-functions.md)\ +[`system`, `_wsystem`](system-wsystem.md) diff --git a/docs/c-runtime-library/reference/execle-wexecle.md b/docs/c-runtime-library/reference/execle-wexecle.md index bf5d30ebab1..bb0cba7b3e6 100644 --- a/docs/c-runtime-library/reference/execle-wexecle.md +++ b/docs/c-runtime-library/reference/execle-wexecle.md @@ -38,16 +38,16 @@ intptr_t _wexecle( ### Parameters -*cmdname*
+*`cmdname`*\ Path of the file to execute. -*arg0*, ... *argN*
+*`arg0`*, ... *`argN`*\ List of pointers to parameters. -*envp*
+*`envp`*\ Array of pointers to environment settings. -## Return Value +## Return value If successful, these functions don't return to the calling process. A return value of -1 indicates an error, in which case the **errno** global variable is set. @@ -61,13 +61,13 @@ If successful, these functions don't return to the calling process. A return val |**ENOEXEC**|The specified file isn't executable or has an invalid executable-file format.| |**ENOMEM**|Not enough memory is available to execute the new process; the available memory has been corrupted; or an invalid block exists, which indicates that the calling process wasn't allocated correctly.| -For more information about these 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 these return codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks Each of these functions loads and executes a new process, and passes each command-line argument as a separate parameter and passes an array of pointers to environment settings. -The **_execle** functions validate their parameters. If *cmdname* or *arg0* is a null pointer or an empty string, these 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 launched. +The **_execle** functions validate their parameters. If *`cmdname`* or *`arg0`* is a null pointer or an empty string, these 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 launched. ## Requirements @@ -76,19 +76,19 @@ The **_execle** functions validate their parameters. If *cmdname* or *arg0* is a |**_execle**|\|\| |**_wexecle**|\ or \|\| -For more information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more information, see [Compatibility](../compatibility.md). ## Example -See the example in [_exec, _wexec Functions](../../c-runtime-library/exec-wexec-functions.md). +See the example in [`_exec`, `_wexec` functions](../exec-wexec-functions.md). ## See also -[Process and Environment Control](../../c-runtime-library/process-and-environment-control.md)
-[_exec, _wexec Functions](../../c-runtime-library/exec-wexec-functions.md)
-[abort](abort.md)
-[atexit](atexit.md)
-[exit, _Exit, _exit](exit-exit-exit.md)
-[_onexit, _onexit_m](onexit-onexit-m.md)
-[_spawn, _wspawn Functions](../../c-runtime-library/spawn-wspawn-functions.md)
-[system, _wsystem](system-wsystem.md)
+[Process and environment control](../process-and-environment-control.md)\ +[`_exec`, `_wexec` functions](../exec-wexec-functions.md)\ +[`abort`](abort.md)\ +[`atexit`](atexit.md)\ +[`exit`, `_Exit`, `_exit`](exit-exit-exit.md)\ +[`_onexit`, `_onexit_m`](onexit-onexit-m.md)\ +[`_spawn`, `_wspawn` functions](../spawn-wspawn-functions.md)\ +[`system`, `_wsystem`](system-wsystem.md) diff --git a/docs/c-runtime-library/reference/execle.md b/docs/c-runtime-library/reference/execle.md index 21af98255b0..ce26e4bd000 100644 --- a/docs/c-runtime-library/reference/execle.md +++ b/docs/c-runtime-library/reference/execle.md @@ -12,9 +12,9 @@ ms.assetid: 5985b615-fe90-4d1c-9c1d-13ec87c8e306 --- # execle -The Microsoft-implemented POSIX function name `execle` is a deprecated alias for the [_execle](execle-wexecle.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. +The Microsoft-implemented POSIX function name `execle` is a deprecated alias for the [`_execle`](execle-wexecle.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. -We recommend you use [_execle](execle-wexecle.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). +We recommend you use [`_execle`](execle-wexecle.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). > [!IMPORTANT] > This API cannot be used in applications that execute in the Windows Runtime. For more information, see [CRT functions not supported in Universal Windows Platform apps](../../cppcx/crt-functions-not-supported-in-universal-windows-platform-apps.md). diff --git a/docs/c-runtime-library/reference/execlp-wexeclp.md b/docs/c-runtime-library/reference/execlp-wexeclp.md index 2504890e6e9..8e047546f75 100644 --- a/docs/c-runtime-library/reference/execlp-wexeclp.md +++ b/docs/c-runtime-library/reference/execlp-wexeclp.md @@ -36,13 +36,13 @@ intptr_t _wexeclp( ### Parameters -*cmdname*
+*`cmdname`*\ Path of the file to execute. -*arg0*, ... *argN*
+*`arg0`*, ... *`argN`*\ List of pointers to parameters. -## Return Value +## Return value If successful, these functions don't return to the calling process. A return value of -1 indicates an error, in which case the **errno** global variable is set. @@ -56,13 +56,13 @@ If successful, these functions don't return to the calling process. A return val |**ENOEXEC**|The specified file isn't executable or has an invalid executable-file format.| |**ENOMEM**|Not enough memory is available to execute the new process; the available memory has been corrupted; or an invalid block exists, indicating that the calling process wasn't allocated properly.| -For more information about these 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 these and other return codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks Each of these functions loads and executes a new process, passing each command-line argument as a separate parameter and using the **PATH** environment variable to find the file to execute. -The **_execlp** functions validate their parameters. If *cmdname* or *arg0* is a null pointer or empty string, these 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 launched. +The **_execlp** functions validate their parameters. If *`cmdname`* or *`arg0`* is a null pointer or empty string, these 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 launched. ## Requirements @@ -71,19 +71,19 @@ The **_execlp** functions validate their parameters. If *cmdname* or *arg0* is a |**_execlp**|\|\| |**_wexeclp**|\ or \|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example -See the example in [_exec, _wexec Functions](../../c-runtime-library/exec-wexec-functions.md). +See the example in [`_exec`, `_wexec` functions](../exec-wexec-functions.md). ## See also -[Process and Environment Control](../../c-runtime-library/process-and-environment-control.md)
-[_exec, _wexec Functions](../../c-runtime-library/exec-wexec-functions.md)
-[abort](abort.md)
-[atexit](atexit.md)
-[exit, _Exit, _exit](exit-exit-exit.md)
-[_onexit, _onexit_m](onexit-onexit-m.md)
-[_spawn, _wspawn Functions](../../c-runtime-library/spawn-wspawn-functions.md)
-[system, _wsystem](system-wsystem.md)
+[Process and environment control](../process-and-environment-control.md)\ +[`_exec`, `_wexec` functions](../exec-wexec-functions.md)\ +[`abort`](abort.md)\ +[`atexit`](atexit.md)\ +[`exit`, `_Exit`, `_exit`](exit-exit-exit.md)\ +[`_onexit`, `_onexit_m`](onexit-onexit-m.md)\ +[`_spawn`, `_wspawn` functions](../spawn-wspawn-functions.md)\ +[`system`, `_wsystem`](system-wsystem.md) diff --git a/docs/c-runtime-library/reference/execlp.md b/docs/c-runtime-library/reference/execlp.md index fcddb73c071..6004ef608f6 100644 --- a/docs/c-runtime-library/reference/execlp.md +++ b/docs/c-runtime-library/reference/execlp.md @@ -12,9 +12,9 @@ ms.assetid: 68b19143-e7b1-49c6-89b5-084d0d66de9c --- # execlp -The Microsoft-implemented POSIX function name `execlp` is a deprecated alias for the [_execlp](execlp-wexeclp.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. +The Microsoft-implemented POSIX function name `execlp` is a deprecated alias for the [`_execlp`](execlp-wexeclp.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. -We recommend you use [_execlp](execlp-wexeclp.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). +We recommend you use [`_execlp`](execlp-wexeclp.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). > [!IMPORTANT] > This API cannot be used in applications that execute in the Windows Runtime. For more information, see [CRT functions not supported in Universal Windows Platform apps](../../cppcx/crt-functions-not-supported-in-universal-windows-platform-apps.md). diff --git a/docs/c-runtime-library/reference/execlpe-wexeclpe.md b/docs/c-runtime-library/reference/execlpe-wexeclpe.md index e30c4cb0afc..ee3e5b44420 100644 --- a/docs/c-runtime-library/reference/execlpe-wexeclpe.md +++ b/docs/c-runtime-library/reference/execlpe-wexeclpe.md @@ -38,16 +38,16 @@ intptr_t _wexeclpe( ### Parameters -*cmdname*
+*`cmdname`*\ Path of the file to execute. -*arg0*, ... *argN*
+*`arg0`*, ... *`argN`*\ List of pointers to parameters. -*envp*
+*`envp`*\ Array of pointers to environment settings. -## Return Value +## Return value If successful, these functions don't return to the calling process. A return value of -1 indicates an error, in which case the **errno** global variable is set. @@ -61,13 +61,13 @@ If successful, these functions don't return to the calling process. A return val |**ENOEXEC**|The specified file isn't executable or has an invalid executable-file format.| |**ENOMEM**|Not enough memory is available to execute the new process; the available memory has been corrupted; or an invalid block exists, indicating that the calling process wasn't allocated properly.| -For more information about these 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 these and other return codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks Each of these functions loads and executes a new process, passing each command-line argument as a separate parameter and also passing an array of pointers to environment settings. These functions use the **PATH** environment variable to find the file to execute. -The **_execlpe** functions validate their parameters. If either *cmdname* or *arg0* is a null pointers or empty string, these 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 launched. +The **_execlpe** functions validate their parameters. If either *`cmdname`* or *`arg0`* is a null pointers or empty string, these 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 launched. ## Requirements @@ -76,19 +76,19 @@ The **_execlpe** functions validate their parameters. If either *cmdname* or *ar |**_execlpe**|\|\| |**_wexeclpe**|\ or \|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example -See the example in [_exec, _wexec Functions](../../c-runtime-library/exec-wexec-functions.md). +See the example in [`_exec`, `_wexec` functions](../exec-wexec-functions.md). ## See also -[Process and Environment Control](../../c-runtime-library/process-and-environment-control.md)
-[_exec, _wexec Functions](../../c-runtime-library/exec-wexec-functions.md)
-[abort](abort.md)
-[atexit](atexit.md)
-[exit, _Exit, _exit](exit-exit-exit.md)
-[_onexit, _onexit_m](onexit-onexit-m.md)
-[_spawn, _wspawn Functions](../../c-runtime-library/spawn-wspawn-functions.md)
-[system, _wsystem](system-wsystem.md)
+[Process and environment control](../process-and-environment-control.md)\ +[`_exec`, `_wexec` functions](../exec-wexec-functions.md)\ +[`abort`](abort.md)\ +[`atexit`](atexit.md)\ +[`exit`, `_Exit`, `_exit`](exit-exit-exit.md)\ +[`_onexit`, `_onexit_m`](onexit-onexit-m.md)\ +[`_spawn`, `_wspawn` functions](../spawn-wspawn-functions.md)\ +[`system`, `_wsystem`](system-wsystem.md) diff --git a/docs/c-runtime-library/reference/execlpe.md b/docs/c-runtime-library/reference/execlpe.md index 5c08778fc64..765524d8643 100644 --- a/docs/c-runtime-library/reference/execlpe.md +++ b/docs/c-runtime-library/reference/execlpe.md @@ -12,9 +12,9 @@ ms.assetid: 33b28785-43e3-4971-b139-33743a7c9a32 --- # execlpe -The Microsoft-specific function name `execlpe` is a deprecated alias for the [_execlpe](execlpe-wexeclpe.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. +The Microsoft-specific function name `execlpe` is a deprecated alias for the [`_execlpe`](execlpe-wexeclpe.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. -We recommend you use [_execlpe](execlpe-wexeclpe.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). +We recommend you use [`_execlpe`](execlpe-wexeclpe.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). > [!IMPORTANT] > This API cannot be used in applications that execute in the Windows Runtime. For more information, see [CRT functions not supported in Universal Windows Platform apps](../../cppcx/crt-functions-not-supported-in-universal-windows-platform-apps.md). diff --git a/docs/c-runtime-library/reference/execv-wexecv.md b/docs/c-runtime-library/reference/execv-wexecv.md index 24219e30a3c..67e3d3f1401 100644 --- a/docs/c-runtime-library/reference/execv-wexecv.md +++ b/docs/c-runtime-library/reference/execv-wexecv.md @@ -32,13 +32,13 @@ intptr_t _wexecv( ### Parameters -*cmdname*
+*`cmdname`*\ Path of the file to execute. -*argv*
+*`argv`*\ Array of pointers to parameters. -## Return Value +## Return value If successful, these functions don't return to the calling process. A return value of -1 indicates an error, in which case the **errno** global variable is set. @@ -52,13 +52,13 @@ If successful, these functions don't return to the calling process. A return val |**ENOEXEC**|The specified file isn't executable or has an invalid executable-file format.| |**ENOMEM**|Not enough memory is available to execute the new process; the available memory has been corrupted; or an invalid block exists, indicating that the calling process wasn't allocated properly.| -For more information about these 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 these and other return codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks Each of these functions loads and executes a new process, passing an array of pointers to command-line arguments. -The **_execv** functions validate their parameters. If *cmdname* is a null pointer, or if *argv* is a null pointer, pointer to an empty array, or if the array contains an empty string as the first argument, the **_execv** 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 process is launched. +The **_execv** functions validate their parameters. If *`cmdname`* is a null pointer, or if *`argv`* is a null pointer, pointer to an empty array, or if the array contains an empty string as the first argument, the **_execv** 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 process is launched. 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). @@ -69,19 +69,19 @@ By default, this function's global state is scoped to the application. To change |**_execv**|\|\| |**_wexecv**|\ or \|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example -See the example in [_exec, _wexec Functions](../../c-runtime-library/exec-wexec-functions.md). +See the example in [`_exec`, `_wexec` functions](../exec-wexec-functions.md). ## See also -[Process and Environment Control](../../c-runtime-library/process-and-environment-control.md)
-[_exec, _wexec Functions](../../c-runtime-library/exec-wexec-functions.md)
-[abort](abort.md)
-[atexit](atexit.md)
-[exit, _Exit, _exit](exit-exit-exit.md)
-[_onexit, _onexit_m](onexit-onexit-m.md)
-[_spawn, _wspawn Functions](../../c-runtime-library/spawn-wspawn-functions.md)
-[system, _wsystem](system-wsystem.md)
+[Process and environment control](../process-and-environment-control.md)\ +[`_exec`, `_wexec` functions](../exec-wexec-functions.md)\ +[`abort`](abort.md)\ +[`atexit`](atexit.md)\ +[`exit`, `_Exit`, `_exit`](exit-exit-exit.md)\ +[`_onexit`, `_onexit_m`](onexit-onexit-m.md)\ +[`_spawn`, `_wspawn` functions](../spawn-wspawn-functions.md)\ +[`system`, `_wsystem`](system-wsystem.md) diff --git a/docs/c-runtime-library/reference/execv.md b/docs/c-runtime-library/reference/execv.md index 423925a59de..8b188ba815f 100644 --- a/docs/c-runtime-library/reference/execv.md +++ b/docs/c-runtime-library/reference/execv.md @@ -12,9 +12,9 @@ ms.assetid: b097d606-9384-427a-9a1d-707dc4ce03ae --- # execv -The Microsoft-implemented POSIX function name `execv` is a deprecated alias for the [_execv](execv-wexecv.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. +The Microsoft-implemented POSIX function name `execv` is a deprecated alias for the [`_execv`](execv-wexecv.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. -We recommend you use [_execv](execv-wexecv.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). +We recommend you use [`_execv`](execv-wexecv.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). > [!IMPORTANT] > This API cannot be used in applications that execute in the Windows Runtime. For more information, see [CRT functions not supported in Universal Windows Platform apps](../../cppcx/crt-functions-not-supported-in-universal-windows-platform-apps.md). diff --git a/docs/c-runtime-library/reference/execve-wexecve.md b/docs/c-runtime-library/reference/execve-wexecve.md index aa185f1ad91..bf6d6e7590c 100644 --- a/docs/c-runtime-library/reference/execve-wexecve.md +++ b/docs/c-runtime-library/reference/execve-wexecve.md @@ -34,16 +34,16 @@ intptr_t _wexecve( ### Parameters -*cmdname*
+*`cmdname`*\ Path of the file to execute. -*argv*
+*`argv`*\ Array of pointers to parameters. -*envp*
+*`envp`*\ Array of pointers to environment settings. -## Return Value +## Return value If successful, these functions don't return to the calling process. A return value of -1 indicates an error, in which case the **errno** global variable is set. @@ -57,16 +57,16 @@ If successful, these functions don't return to the calling process. A return val |**ENOEXEC**|The specified file isn't executable or has an invalid executable-file format.| |**ENOMEM**|Not enough memory is available to execute the new process; the available memory has been corrupted; or an invalid block exists, indicating that the calling process wasn't allocated properly.| -For more information about these 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 these and other return codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks Each of these functions loads and executes a new process, passing an array of pointers to command-line arguments and an array of pointers to environment settings. -**_execve** and **_wexecve** validate their parameters. These functions invoke the invalid parameter handler, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md), when: +**_execve** and **_wexecve** validate their parameters. These functions invoke the invalid parameter handler, as described in [Parameter validation](../parameter-validation.md), when: -- *cmdname* is a null pointer, -- *argv* is either a null pointer or pointer to an empty array, +- *`cmdname`* is a null pointer, +- *`argv`* is either a null pointer or pointer to an empty array, - the array contains an empty string as the first argument. If execution is allowed to continue by the handler, these functions set **errno** to **EINVAL**, and return -1. No process is launched. @@ -80,19 +80,19 @@ By default, this function's global state is scoped to the application. To change |**_execve**|\|\| |**_wexecve**|\ or \|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example -See the example in [_exec, _wexec Functions](../../c-runtime-library/exec-wexec-functions.md). +See the example in [`_exec`, `_wexec` functions](../exec-wexec-functions.md). ## See also -[Process and Environment Control](../../c-runtime-library/process-and-environment-control.md)
-[_exec, _wexec Functions](../../c-runtime-library/exec-wexec-functions.md)
-[abort](abort.md)
-[atexit](atexit.md)
-[exit, _Exit, _exit](exit-exit-exit.md)
-[_onexit, _onexit_m](onexit-onexit-m.md)
-[_spawn, _wspawn Functions](../../c-runtime-library/spawn-wspawn-functions.md)
-[system, _wsystem](system-wsystem.md)
+[Process and environment control](../process-and-environment-control.md)\ +[`_exec`, `_wexec` functions](../exec-wexec-functions.md)\ +[`abort`](abort.md)\ +[`atexit`](atexit.md)\ +[`exit`, `_Exit`, `_exit`](exit-exit-exit.md)\ +[`_onexit`, `_onexit_m`](onexit-onexit-m.md)\ +[`_spawn`, `_wspawn` functions](../spawn-wspawn-functions.md)\ +[`system`, `_wsystem`](system-wsystem.md) diff --git a/docs/c-runtime-library/reference/execve.md b/docs/c-runtime-library/reference/execve.md index 7764e132c85..49145bf25ee 100644 --- a/docs/c-runtime-library/reference/execve.md +++ b/docs/c-runtime-library/reference/execve.md @@ -12,9 +12,9 @@ ms.assetid: f28aabe4-fd76-422e-a0e4-80864736d245 --- # execve -The Microsoft-implemented POSIX function name `execve` is a deprecated alias for the [_execve](execve-wexecve.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. +The Microsoft-implemented POSIX function name `execve` is a deprecated alias for the [`_execve`](execve-wexecve.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. -We recommend you use [_execve](execve-wexecve.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). +We recommend you use [`_execve`](execve-wexecve.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). > [!IMPORTANT] > This API cannot be used in applications that execute in the Windows Runtime. For more information, see [CRT functions not supported in Universal Windows Platform apps](../../cppcx/crt-functions-not-supported-in-universal-windows-platform-apps.md). diff --git a/docs/c-runtime-library/reference/execvp-wexecvp.md b/docs/c-runtime-library/reference/execvp-wexecvp.md index d2dd7cec169..7e55796ea0e 100644 --- a/docs/c-runtime-library/reference/execvp-wexecvp.md +++ b/docs/c-runtime-library/reference/execvp-wexecvp.md @@ -32,13 +32,13 @@ intptr_t _wexecvp( ### Parameters -*cmdname*
+*`cmdname`*\ Path of the file to execute. -*argv*
+*`argv`*\ Array of pointers to parameters. -## Return Value +## Return value If successful, these functions don't return to the calling process. A return value of -1 indicates an error, in which case the **errno** global variable is set. @@ -52,16 +52,16 @@ If successful, these functions don't return to the calling process. A return val |**ENOEXEC**|The specified file isn't executable or has an invalid executable-file format.| |**ENOMEM**|Not enough memory is available to execute the new process; the available memory has been corrupted; or an invalid block exists, indicating that the calling process wasn't allocated properly.| -For more information about these 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 these and other return codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks Each of these functions loads and executes a new process, passing an array of pointers to command-line arguments and using the **PATH** environment variable to find the file to execute. -The **_execvp** functions validate their parameters. These functions invoke the invalid parameter handler, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md), when: +The **_execvp** functions validate their parameters. These functions invoke the invalid parameter handler, as described in [Parameter validation](../parameter-validation.md), when: -- *cmdname* is a null pointer, -- *argv* is either a null pointer or pointer to an empty array, +- *`cmdname`* is a null pointer, +- *`argv`* is either a null pointer or pointer to an empty array, - the array contains an empty string as the first argument. If execution is allowed to continue by the handler, these functions set **errno** to **EINVAL**, and return -1. No process is launched. @@ -75,19 +75,19 @@ By default, this function's global state is scoped to the application. To change |**_execvp**|\|\| |**_wexecvp**|\ or \|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example -See the example in [_exec, _wexec Functions](../../c-runtime-library/exec-wexec-functions.md). +See the example in [`_exec`, `_wexec` functions](../exec-wexec-functions.md). ## See also -[Process and Environment Control](../../c-runtime-library/process-and-environment-control.md)
-[_exec, _wexec Functions](../../c-runtime-library/exec-wexec-functions.md)
-[abort](abort.md)
-[atexit](atexit.md)
-[exit, _Exit, _exit](exit-exit-exit.md)
-[_onexit, _onexit_m](onexit-onexit-m.md)
-[_spawn, _wspawn Functions](../../c-runtime-library/spawn-wspawn-functions.md)
-[system, _wsystem](system-wsystem.md)
+[Process and environment control](../process-and-environment-control.md)\ +[`_exec`, `_wexec` functions](../exec-wexec-functions.md)\ +[`abort`](abort.md)\ +[`atexit`](atexit.md)\ +[`exit`, `_Exit`, `_exit`](exit-exit-exit.md)\ +[`_onexit`, `_onexit_m`](onexit-onexit-m.md)\ +[`_spawn`, `_wspawn` functions](../spawn-wspawn-functions.md)\ +[`system`, `_wsystem`](system-wsystem.md) diff --git a/docs/c-runtime-library/reference/execvp.md b/docs/c-runtime-library/reference/execvp.md index 8a7a40a488a..402f88f8b98 100644 --- a/docs/c-runtime-library/reference/execvp.md +++ b/docs/c-runtime-library/reference/execvp.md @@ -12,9 +12,9 @@ ms.assetid: a0d0e898-9f06-4aa9-94ce-3ad317318c3a --- # execvp -The Microsoft-implemented POSIX function name `execvp` is a deprecated alias for the [_execvp](execvp-wexecvp.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. +The Microsoft-implemented POSIX function name `execvp` is a deprecated alias for the [`_execvp`](execvp-wexecvp.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. -We recommend you use [_execvp](execvp-wexecvp.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). +We recommend you use [`_execvp`](execvp-wexecvp.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). > [!IMPORTANT] > This API cannot be used in applications that execute in the Windows Runtime. For more information, see [CRT functions not supported in Universal Windows Platform apps](../../cppcx/crt-functions-not-supported-in-universal-windows-platform-apps.md). diff --git a/docs/c-runtime-library/reference/execvpe-wexecvpe.md b/docs/c-runtime-library/reference/execvpe-wexecvpe.md index e2a1d9416d7..1b22a82aff2 100644 --- a/docs/c-runtime-library/reference/execvpe-wexecvpe.md +++ b/docs/c-runtime-library/reference/execvpe-wexecvpe.md @@ -34,16 +34,16 @@ intptr_t _wexecvpe( ### Parameters -*cmdname*
+*`cmdname`*\ Path of the file to execute. -*argv*
+*`argv`*\ Array of pointers to parameters. -*envp*
+*`envp`*\ Array of pointers to environment settings. -## Return Value +## Return value If successful, these functions don't return to the calling process. A return value of -1 indicates an error, in which case the **errno** global variable is set. @@ -56,16 +56,16 @@ If successful, these functions don't return to the calling process. A return val |**ENOEXEC**|The specified file isn't executable or has an invalid executable-file format.| |**ENOMEM**|Not enough memory is available to execute the new process; the available memory has been corrupted; or an invalid block exists, which indicates that the calling process wasn't allocated correctly.| -For more information about these and other return codes, see [errno, _doserrno, _sys_errlist, and _sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +For more information about these and other return codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks Each of these functions loads and executes a new process, and passes an array of pointers to command-line arguments and an array of pointers to environment settings. These functions use the **PATH** environment variable to find the file to execute. -The **_execvpe** functions validate their parameters. These functions invoke the invalid parameter handler, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md), when: +The **_execvpe** functions validate their parameters. These functions invoke the invalid parameter handler, as described in [Parameter validation](../parameter-validation.md), when: -- *cmdname* is a null pointer, -- *argv* is either a null pointer or pointer to an empty array, +- *`cmdname`* is a null pointer, +- *`argv`* is either a null pointer or pointer to an empty array, - the array contains an empty string as the first argument. If execution is allowed to continue by the handler, these functions set **errno** to **EINVAL**, and return -1. No process is launched. @@ -79,19 +79,19 @@ By default, this function's global state is scoped to the application. To change |**_execvpe**|\|\| |**_wexecvpe**|\ or \|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example -See the example in [_exec, _wexec Functions](../../c-runtime-library/exec-wexec-functions.md). +See the example in [`_exec`, `_wexec` functions](../exec-wexec-functions.md). ## See also -[Process and Environment Control](../../c-runtime-library/process-and-environment-control.md)
-[_exec, _wexec Functions](../../c-runtime-library/exec-wexec-functions.md)
-[abort](abort.md)
-[atexit](atexit.md)
-[exit, _Exit, _exit](exit-exit-exit.md)
-[_onexit, _onexit_m](onexit-onexit-m.md)
-[_spawn, _wspawn Functions](../../c-runtime-library/spawn-wspawn-functions.md)
-[system, _wsystem](system-wsystem.md)
+[Process and environment control](../process-and-environment-control.md)\ +[`_exec`, `_wexec` functions](../exec-wexec-functions.md)\ +[`abort`](abort.md)\ +[`atexit`](atexit.md)\ +[`exit`, `_Exit`, `_exit`](exit-exit-exit.md)\ +[`_onexit`, `_onexit_m`](onexit-onexit-m.md)\ +[`_spawn`, `_wspawn` functions](../spawn-wspawn-functions.md)\ +[`system`, `_wsystem`](system-wsystem.md) diff --git a/docs/c-runtime-library/reference/execvpe.md b/docs/c-runtime-library/reference/execvpe.md index 979b2276ed5..e8222fe23c2 100644 --- a/docs/c-runtime-library/reference/execvpe.md +++ b/docs/c-runtime-library/reference/execvpe.md @@ -12,9 +12,9 @@ ms.assetid: ee657071-c459-4bb6-82a2-8925c888f624 --- # execvpe -The Microsoft-specific function name `execvpe` is a deprecated alias for the [_execvpe](execvpe-wexecvpe.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. +The Microsoft-specific function name `execvpe` is a deprecated alias for the [`_execvpe`](execvpe-wexecvpe.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. -We recommend you use [_execvpe](execlpe-wexeclpe.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). +We recommend you use [`_execvpe`](execlpe-wexeclpe.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). > [!IMPORTANT] > This API cannot be used in applications that execute in the Windows Runtime. For more information, see [CRT functions not supported in Universal Windows Platform apps](../../cppcx/crt-functions-not-supported-in-universal-windows-platform-apps.md). diff --git a/docs/c-runtime-library/reference/exit-exit-exit.md b/docs/c-runtime-library/reference/exit-exit-exit.md index 26084d11e06..3e7cca266c7 100644 --- a/docs/c-runtime-library/reference/exit-exit-exit.md +++ b/docs/c-runtime-library/reference/exit-exit-exit.md @@ -14,7 +14,7 @@ helpviewer_keywords: ["exit function", "_exit function", "processes, terminating Terminates the calling process. The **`exit`** function terminates it after cleanup; **`_exit`** and **`_Exit`** terminate it immediately. > [!NOTE] -> Do not use this method to shut down a Universal Windows Platform (UWP) app, except in testing or debugging scenarios. Programmatic or UI ways to close a Store app are not permitted according to the [Microsoft Store policies](/legal/windows/agreements/store-policies). For more information, see [UWP App lifecycle](/windows/uwp/launch-resume/app-lifecycle). For more information about UWP apps, see [Universal Windows Platform documentation](https://developer.microsoft.com/windows/apps). +> Do not use this method to shut down a Universal Windows Platform (UWP) app, except in testing or debugging scenarios. Programmatic or UI ways to close a Store app are not permitted according to the [Microsoft Store policies](/legal/windows/agreements/store-policies). For more information, see [UWP app lifecycle](/windows/uwp/launch-resume/app-lifecycle). For more information about UWP apps, see [Universal Windows Platform documentation](https://developer.microsoft.com/windows/apps). ## Syntax @@ -32,7 +32,7 @@ void _exit( ### Parameters -*`status`*
+*`status`*\ Exit status code. ## Remarks @@ -73,7 +73,7 @@ By default, this function's global state is scoped to the application. To change |--------------|---------------------| |**`exit`**, **`_Exit`**, **`_exit`**|`` or ``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -92,12 +92,12 @@ int main( void ) ## See also -[Process and Environment Control](../../c-runtime-library/process-and-environment-control.md)
-[`abort`](abort.md)
-[`atexit`](atexit.md)
-[`_cexit`, `_c_exit`](cexit-c-exit.md)
-[`_exec`, `_wexec` Functions](../../c-runtime-library/exec-wexec-functions.md)
-[`_onexit`, `_onexit_m`](onexit-onexit-m.md)
-[`quick_exit`](quick-exit1.md)
-[`_spawn`, `_wspawn` Functions](../../c-runtime-library/spawn-wspawn-functions.md)
-[`system`, `_wsystem`](system-wsystem.md)
+[Process and environment control](../process-and-environment-control.md)\ +[`abort`](abort.md)\ +[`atexit`](atexit.md)\ +[`_cexit`, `_c_exit`](cexit-c-exit.md)\ +[`_exec`, `_wexec` functions](../exec-wexec-functions.md)\ +[`_onexit`, `_onexit_m`](onexit-onexit-m.md)\ +[`quick_exit`](quick-exit1.md)\ +[`_spawn`, `_wspawn` functions](../spawn-wspawn-functions.md)\ +[`system`, `_wsystem`](system-wsystem.md) diff --git a/docs/c-runtime-library/reference/exp-expf.md b/docs/c-runtime-library/reference/exp-expf.md index b3c0f3c01ce..1492e87eb98 100644 --- a/docs/c-runtime-library/reference/exp-expf.md +++ b/docs/c-runtime-library/reference/exp-expf.md @@ -39,7 +39,7 @@ long double expl( *`x`*\ The floating-point value to exponentiate the natural logarithm base *e* by. -## Return Value +## Return value The **`exp`** functions return the exponential value of the floating-point parameter, *`x`*, if successful. That is, the result is *e**`x`*, where *e* is the base of the natural logarithm. On overflow, the function returns `INF` (infinity) and on underflow, **`exp`** returns 0. @@ -56,7 +56,7 @@ The **`exp`** function has an implementation that uses Streaming SIMD Extensions C++ allows overloading, so you can call overloads of **`exp`** that take a **`float`** or **`long double`** argument. In a C program, unless you're using the `` macro to call this function, **`exp`** always takes and returns a **`double`**. -If you use the `` `exp()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../../c-runtime-library/tgmath.md) for details. +If you use the `` `exp()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../tgmath.md) for details. 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). @@ -67,7 +67,7 @@ By default, this function's global state is scoped to the application. To change |**`exp`**, **`expf`**, **`expl`**|``|`` or ``| |**`exp`** macro| `` || -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -92,6 +92,6 @@ exp( 2.302585 ) = 10.000000 ## See also -[Floating-Point Support](../../c-runtime-library/floating-point-support.md)\ +[Math and floating-point support](../floating-point-support.md)\ [`log, logf, log10, log10f`](log-logf-log10-log10f.md)\ -[`_CIexp`](../../c-runtime-library/ciexp.md) +[`_CIexp`](../ciexp.md) diff --git a/docs/c-runtime-library/reference/exp2-exp2f-exp2l.md b/docs/c-runtime-library/reference/exp2-exp2f-exp2l.md index f4e85b67292..0cc27ed9592 100644 --- a/docs/c-runtime-library/reference/exp2-exp2f-exp2l.md +++ b/docs/c-runtime-library/reference/exp2-exp2f-exp2l.md @@ -41,29 +41,29 @@ long double exp2l( ### Parameters -*x*\ +*`x`*\ The value of the exponent. -## Return Value +## Return value -If successful, returns the base-2 exponent of *x*, that is, 2x. Otherwise, it returns one of the following values: +If successful, returns the base-2 exponent of *`x`*, that is, 2x. Otherwise, it returns one of the following values: |Issue|Return| |-----------|------------| -|*x* = ±0|1| -|*x* = -INFINITY|+0| -|*x* = +INFINITY|+INFINITY| -|*x* = NaN|NaN| +|*`x`* = ±0|1| +|*`x`* = -INFINITY|+0| +|*`x`* = +INFINITY|+INFINITY| +|*`x`* = NaN|NaN| |Overflow range error|+HUGE_VAL, +HUGE_VALF, or +HUGE_VALL| |Underflow range error|Correct result, after rounding| -Errors are reported as specified in [_matherr](matherr.md). +Errors are reported as specified in [`_matherr`](matherr.md). ## Remarks Because C++ allows overloading, you can call overloads of **exp2** that take and return **`float`** and **`long double`** types. In a C program, unless you're using the \ macro to call this function, **exp2** always takes and returns a **`double`**, unless you use the macro in \. -If you use the \ `exp2()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../../c-runtime-library/tgmath.md) for details. +If you use the \ `exp2()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../tgmath.md) for details. 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). @@ -74,10 +74,10 @@ By default, this function's global state is scoped to the application. To change |**exp2**, **expf2**, **expl2**|\|\| |**exp2** macro | \ || -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Alphabetical Function Reference](crt-alphabetical-function-reference.md)
-[`exp`, `expf`, `expl`](exp-expf.md)
+[Alphabetical function reference](crt-alphabetical-function-reference.md)\ +[`exp`, `expf`, `expl`](exp-expf.md) [`log2`, `log2f`, `log2l`](log2-log2f-log2l.md) diff --git a/docs/c-runtime-library/reference/expand-dbg.md b/docs/c-runtime-library/reference/expand-dbg.md index ffd9f062667..7aae9578703 100644 --- a/docs/c-runtime-library/reference/expand-dbg.md +++ b/docs/c-runtime-library/reference/expand-dbg.md @@ -28,38 +28,38 @@ void *_expand_dbg( ### Parameters -*userData*
+*`userData`*\ Pointer to the previously allocated memory block. -*newSize*
+*`newSize`*\ Requested new size for the block (in bytes). -*blockType*
+*`blockType`*\ Requested type for resized block: **_CLIENT_BLOCK** or **_NORMAL_BLOCK**. -*filename*
+*`filename`*\ Pointer to the name of the source file that requested expand operation or **NULL**. -*lineNumber*
+*`lineNumber`*\ Line number in the source file where the expand operation was requested or **NULL**. -The *filename* and *lineNumber* parameters are only available when **_expand_dbg** has been called explicitly or the [_CRTDBG_MAP_ALLOC](../../c-runtime-library/crtdbg-map-alloc.md) preprocessor constant has been defined. +The *`filename`* and *`lineNumber`* parameters are only available when **_expand_dbg** has been called explicitly or the [`_CRTDBG_MAP_ALLOC`](../crtdbg-map-alloc.md) preprocessor constant has been defined. -## Return Value +## Return value -On successful completion, **_expand_dbg** returns a pointer to the resized memory block. Because the memory isn't moved, the address is the same as the userData. If an error occurred or the block couldn't be expanded to the requested size, it returns **NULL**. If a failure occurs, **errno** is with information from the operating system about the nature of the failure. For more information about **errno**, see [errno, _doserrno, _sys_errlist, and _sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +On successful completion, **_expand_dbg** returns a pointer to the resized memory block. Because the memory isn't moved, the address is the same as the userData. If an error occurred or the block couldn't be expanded to the requested size, it returns **NULL**. If a failure occurs, **errno** is with information from the operating system about the nature of the failure. For more information about **errno**, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks -The **_expand_dbg** function is a debug version of the _[expand](expand.md) function. When [_DEBUG](../../c-runtime-library/debug.md) isn't defined, each call to **_expand_dbg** is reduced to a call to **_expand**. Both **_expand** and **_expand_dbg** resize a memory block in the base heap, but **_expand_dbg** accommodates several debugging features: buffers on either side of the user portion of the block to test for leaks, a block type parameter to track specific allocation types, and *filename*/*lineNumber* information to determine the origin of allocation requests. +The **_expand_dbg** function is a debug version of the _[`expand`](expand.md) function. When [`_DEBUG`](../debug.md) isn't defined, each call to **_expand_dbg** is reduced to a call to **_expand**. Both **_expand** and **_expand_dbg** resize a memory block in the base heap, but **_expand_dbg** accommodates several debugging features: buffers on either side of the user portion of the block to test for leaks, a block type parameter to track specific allocation types, and *`filename`*/*`lineNumber`* information to determine the origin of allocation requests. -**_expand_dbg** resizes the specified memory block with slightly more space than the requested *newSize*. *newSize* might be greater or less than the size of the originally allocated memory block. The extra space is used by the debug heap manager to link the debug memory blocks and to provide the application with debug header information and overwrite buffers. The resize is accomplished by either expanding or contracting the original memory block. **_expand_dbg** doesn't move the memory block, as does the [_realloc_dbg](realloc-dbg.md) function. +**_expand_dbg** resizes the specified memory block with slightly more space than the requested *`newSize`*. *`newSize`* might be greater or less than the size of the originally allocated memory block. The extra space is used by the debug heap manager to link the debug memory blocks and to provide the application with debug header information and overwrite buffers. The resize is accomplished by either expanding or contracting the original memory block. **_expand_dbg** doesn't move the memory block, as does the [`_realloc_dbg`](realloc-dbg.md) function. -When *newSize* is greater than the original block size, the memory block is expanded. During an expansion, if the memory block can't be expanded to accommodate the requested size, **NULL** is returned. When *newSize* is less than the original block size, the memory block is contracted until the new size is obtained. +When *`newSize`* is greater than the original block size, the memory block is expanded. During an expansion, if the memory block can't be expanded to accommodate the requested size, **NULL** is returned. When *`newSize`* is less than the original block size, the memory block is contracted until the new size is obtained. -For information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT Debug Heap Details](/visualstudio/debugger/crt-debug-heap-details). For information about the allocation block types and how they're used, see [Types of blocks on the debug heap](/visualstudio/debugger/crt-debug-heap-details). For information about the differences between standard heap functions and debug versions, see [Debug Versions of Heap Allocation Functions](/visualstudio/debugger/debug-versions-of-heap-allocation-functions). +For information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT debug heap details](/visualstudio/debugger/crt-debug-heap-details). For information about the allocation block types and how they're used, see [Types of blocks on the debug heap](/visualstudio/debugger/crt-debug-heap-details). For information about the differences between standard heap functions and debug versions, see [Debug versions of heap allocation functions](/visualstudio/debugger/debug-versions-of-heap-allocation-functions). -This function validates its parameters. If *userData* is a null pointer, or if size is greater than **_HEAP_MAXREQ**, this function invokes an invalid parameter handler, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, **errno** is set to **EINVAL** and the function returns **NULL**. +This function validates its parameters. If *`userData`* is a null pointer, or if size is greater than **_HEAP_MAXREQ**, this function invokes an invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, **errno** is set to **EINVAL** and the function returns **NULL**. ## Requirements @@ -67,11 +67,11 @@ This function validates its parameters. If *userData* is a null pointer, or if s |-------------|---------------------| |**_expand_dbg**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Libraries -Debug versions of [C run-time libraries](../../c-runtime-library/crt-library-features.md) only. +Debug versions of [C run-time libraries](../crt-library-features.md) only. ## Example @@ -132,5 +132,5 @@ The output of this program depends on your computer's ability to expand all the ## See also -[Debug Routines](../../c-runtime-library/debug-routines.md)
-[_malloc_dbg](malloc-dbg.md)
+[Debug routines](../debug-routines.md)\ +[`_malloc_dbg`](malloc-dbg.md) diff --git a/docs/c-runtime-library/reference/expand.md b/docs/c-runtime-library/reference/expand.md index 834b6d84803..6d7a714c5c8 100644 --- a/docs/c-runtime-library/reference/expand.md +++ b/docs/c-runtime-library/reference/expand.md @@ -25,19 +25,19 @@ void *_expand( ### Parameters -*`memblock`*
+*`memblock`*\ Pointer to previously allocated memory block. -*`size`*
+*`size`*\ New size in bytes. -## Return Value +## Return value **_expand** returns a void pointer to the reallocated memory block. **_expand**, unlike **realloc**, can't move a block to change its size. Thus, if there's sufficient memory available to expand the block without moving it, the *`memblock`* parameter to **_expand** is the same as the return value. **_expand** returns **NULL** when an error is detected during its operation. For example, if **_expand** is used to shrink a memory block, it might detect corruption in the small block heap or an invalid block pointer and return **NULL**. -If there isn't sufficient memory available to expand the block without moving it, the function returns **NULL**. **_expand** never returns a block expanded to a size less than requested. If a failure occurs, **errno** indicates the nature of the failure. For more information about **errno**, see [errno, _doserrno, _sys_errlist, and _sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +If there isn't sufficient memory available to expand the block without moving it, the function returns **NULL**. **_expand** never returns a block expanded to a size less than requested. If a failure occurs, **errno** indicates the nature of the failure. For more information about **errno**, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). The return value points to a storage space that is suitably aligned for storage of any type of object. To check the new size of the item, use **_msize**. To get a pointer to a type other than **`void`**, use a type cast on the return value. @@ -48,9 +48,9 @@ The **_expand** function changes the size of a previously allocated memory block > [!NOTE] > On 64-bit platforms, **_expand** might not contract the block if the new size is less than the current size; in particular, if the block was less than 16K in size and therefore allocated in the Low Fragmentation Heap, **_expand** leaves the block unchanged and returns *`memblock`*. -When the application is linked with a debug version of the C run-time libraries, **_expand** resolves to [_expand_dbg](expand-dbg.md). For more information about how the heap is managed during the debugging process, see [The CRT Debug Heap](/visualstudio/debugger/crt-debug-heap-details). +When the application is linked with a debug version of the C run-time libraries, **_expand** resolves to [`_expand_dbg`](expand-dbg.md). For more information about how the heap is managed during the debugging process, see [The CRT debug heap](/visualstudio/debugger/crt-debug-heap-details). -This function validates its parameters. If *`memblock`* is a null pointer, this function invokes an invalid parameter handler, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, **errno** is set to **EINVAL** and the function returns **NULL**. If *`size`* is greater than **_HEAP_MAXREQ**, **errno** is set to **ENOMEM**, and the function returns **NULL**. +This function validates its parameters. If *`memblock`* is a null pointer, this function invokes an invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, **errno** is set to **EINVAL** and the function returns **NULL**. If *`size`* is greater than **_HEAP_MAXREQ**, **errno** is set to **ENOMEM**, and the function returns **NULL**. 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). @@ -60,7 +60,7 @@ By default, this function's global state is scoped to the application. To change |--------------|---------------------| |**_expand**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -98,9 +98,9 @@ Expanded block to 1024 bytes at 002C12BC ## See also -[Memory Allocation](../../c-runtime-library/memory-allocation.md)
-[calloc](calloc.md)
-[free](free.md)
-[malloc](malloc.md)
-[_msize](msize.md)
-[realloc](realloc.md)
+[Memory allocation](../memory-allocation.md)\ +[`calloc`](calloc.md)\ +[`free`](free.md)\ +[`malloc`](malloc.md)\ +[`_msize`](msize.md)\ +[`realloc`](realloc.md) diff --git a/docs/c-runtime-library/reference/expm1-expm1f-expm1l.md b/docs/c-runtime-library/reference/expm1-expm1f-expm1l.md index bce2dcd46c7..eb3a2ac5bc6 100644 --- a/docs/c-runtime-library/reference/expm1-expm1f-expm1l.md +++ b/docs/c-runtime-library/reference/expm1-expm1f-expm1l.md @@ -37,18 +37,18 @@ long double expm1l( ### Parameters -*x*\ +*`x`*\ The floating-point exponential value. -## Return Value +## Return value -The **expm1** functions return a floating-point value that represents ex - 1, if successful. On overflow, **expm1** returns **HUGE_VAL**, **expm1f** returns **HUGE_VALF**, **expm1l** returns **HUGE_VALL**, and **errno** is set to **ERANGE**. For more information about return codes, see [errno, _doserrno, _sys_errlist, and _sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +The **expm1** functions return a floating-point value that represents ex - 1, if successful. On overflow, **expm1** returns **HUGE_VAL**, **expm1f** returns **HUGE_VALF**, **expm1l** returns **HUGE_VALL**, and **errno** is set to **ERANGE**. For more information about return codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks Because C++ allows overloading, you can call overloads of **expm1** that take and return **`float`** and **`long double`** values. In a C program, unless you're using the \ macro to call this function, **expm1** always takes and returns a **`double`**. -If you use the \ `expm1()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../../c-runtime-library/tgmath.md) for details. +If you use the \ `expm1()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../tgmath.md) for details. ## Requirements @@ -57,10 +57,10 @@ If you use the \ `expm1()` macro, the type of the argument determines |**expm1**, **expm1f**, **expm1l**|\| |**expm1** macro | \ | -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Floating-Point Support](../../c-runtime-library/floating-point-support.md)
-[exp2, exp2f, exp2l](exp2-exp2f-exp2l.md)
-[pow, powf, powl](pow-powf-powl.md)
+[Math and floating-point support](../floating-point-support.md)\ +[`exp2`, `exp2f`, `exp2l`](exp2-exp2f-exp2l.md)\ +[`pow`, `powf`, `powl`](pow-powf-powl.md) diff --git a/docs/c-runtime-library/reference/fabs-fabsf-fabsl.md b/docs/c-runtime-library/reference/fabs-fabsf-fabsl.md index 16ee0a7b9c8..b61e79c3419 100644 --- a/docs/c-runtime-library/reference/fabs-fabsf-fabsl.md +++ b/docs/c-runtime-library/reference/fabs-fabsf-fabsl.md @@ -40,9 +40,9 @@ long double fabsl( *`x`*\ Floating-point value. -## Return Value +## Return value -The **`fabs`** functions return the absolute value of the argument *x*. There's no error return. +The **`fabs`** functions return the absolute value of the argument *`x`*. There's no error return. |Input|SEH exception|`Matherr` exception| |-----------|-------------------|-----------------------| @@ -52,7 +52,7 @@ The **`fabs`** functions return the absolute value of the argument *x*. There's C++ allows overloading, so you can call overloads of **`fabs`** if you include the `` header. In a C program, unless you're using the `` macro to call this function, **`fabs`** always takes and returns a **`double`**. -If you use the `` `fabs()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../../c-runtime-library/tgmath.md) for details. +If you use the `` `fabs()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../tgmath.md) for details. 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). @@ -63,7 +63,7 @@ By default, this function's global state is scoped to the application. To change |**`fabs`**, **`fabsf`**, **`fabsl`**|``|`` or ``| |**`fabs`** macro | `` || -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -71,6 +71,6 @@ See the example for [`abs`](abs-labs-llabs-abs64.md). ## See also -[Floating-Point Support](../../c-runtime-library/floating-point-support.md)\ +[Math and floating-point support](../floating-point-support.md)\ [`abs, labs, llabs, _abs64`](abs-labs-llabs-abs64.md)\ [`_cabs`](cabs.md) diff --git a/docs/c-runtime-library/reference/fclose-fcloseall.md b/docs/c-runtime-library/reference/fclose-fcloseall.md index 434431b7ca5..5bef68d304d 100644 --- a/docs/c-runtime-library/reference/fclose-fcloseall.md +++ b/docs/c-runtime-library/reference/fclose-fcloseall.md @@ -27,15 +27,15 @@ int _fcloseall( void ); *`stream`*\ Pointer to **`FILE`** structure. -## Return Value +## Return value **`fclose`** returns 0 if the stream is successfully closed. **`_fcloseall`** returns the total number of streams closed. Both functions return **`EOF`** to indicate an error. ## Remarks -The **`fclose`** function closes *`stream`*. If *`stream`* is **`NULL`**, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, **`fclose`** sets **`errno`** to **`EINVAL`** and returns **`EOF`**. It's recommended that you always check the *`stream`* pointer before you call this function. +The **`fclose`** function closes *`stream`*. If *`stream`* is **`NULL`**, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, **`fclose`** sets **`errno`** to **`EINVAL`** and returns **`EOF`**. It's recommended that you always check the *`stream`* pointer before you call this function. -For more information about return codes, see [`_doserrno`, `errno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). +For more information about return codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). The **`_fcloseall`** function closes all open streams except **`stdin`**, **`stdout`**, **`stderr`** (and, in MS-DOS, **`_stdaux`** and **`_stdprn`**). It also closes and deletes any temporary files created by **`tmpfile`**. In both functions, all buffers associated with the stream are flushed prior to closing. System-allocated buffers are released when the stream is closed. Buffers assigned by the user with **`setbuf`** and **`setvbuf`** aren't automatically released. @@ -53,7 +53,7 @@ By default, this function's global state is scoped to the application. To change |**`fclose`**|``| |**`_fcloseall`**|``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -61,7 +61,7 @@ See the example for [`fopen`](fopen-wfopen.md). ## See also -[Stream I/O](../../c-runtime-library/stream-i-o.md)\ +[Stream I/O](../stream-i-o.md)\ [`_close`](close.md)\ [`_fdopen`, `_wfdopen`](fdopen-wfdopen.md)\ [`fflush`](fflush.md)\ diff --git a/docs/c-runtime-library/reference/fclose-nolock.md b/docs/c-runtime-library/reference/fclose-nolock.md index a76289fadd7..69519eeac7b 100644 --- a/docs/c-runtime-library/reference/fclose-nolock.md +++ b/docs/c-runtime-library/reference/fclose-nolock.md @@ -24,10 +24,10 @@ int _fclose_nolock( ### Parameters -*stream*
+*`stream`*\ Pointer to the **FILE** structure. -## Return Value +## Return value **fclose** returns 0 if the stream is successfully closed. Returns **EOF** to indicate an error. @@ -43,13 +43,13 @@ By default, this function's global state is scoped to the application. To change |--------------|---------------------| |**_fclose_nolock**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Stream I/O](../../c-runtime-library/stream-i-o.md)
-[_close](close.md)
-[_fdopen, _wfdopen](fdopen-wfdopen.md)
-[fflush](fflush.md)
-[fopen, _wfopen](fopen-wfopen.md)
-[freopen, _wfreopen](freopen-wfreopen.md)
+[Stream I/O](../stream-i-o.md)\ +[`_close`](close.md)\ +[`_fdopen`, `_wfdopen`](fdopen-wfdopen.md)\ +[`fflush`](fflush.md)\ +[`fopen`, `_wfopen`](fopen-wfopen.md)\ +[`freopen`, `_wfreopen`](freopen-wfreopen.md) diff --git a/docs/c-runtime-library/reference/fcloseall.md b/docs/c-runtime-library/reference/fcloseall.md index 660bcd0651f..ce41631c6f8 100644 --- a/docs/c-runtime-library/reference/fcloseall.md +++ b/docs/c-runtime-library/reference/fcloseall.md @@ -12,6 +12,6 @@ ms.assetid: 4f14acde-5bc5-43da-a709-7a3c559df3cf --- # fcloseall -The Microsoft-specific function name `fcloseall` is a deprecated alias for the [_fcloseall](fclose-fcloseall.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. +The Microsoft-specific function name `fcloseall` is a deprecated alias for the [`_fcloseall`](fclose-fcloseall.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. -We recommend you use [_fcloseall](fclose-fcloseall.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). +We recommend you use [`_fcloseall`](fclose-fcloseall.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). diff --git a/docs/c-runtime-library/reference/fcvt-s.md b/docs/c-runtime-library/reference/fcvt-s.md index b6c72b714a6..df1292b3818 100644 --- a/docs/c-runtime-library/reference/fcvt-s.md +++ b/docs/c-runtime-library/reference/fcvt-s.md @@ -12,7 +12,7 @@ ms.assetid: 48671197-1d29-4c2b-a5d8-d2368f5f68a1 --- # _fcvt_s -Converts a floating-point number to a string. This function is a version of [_fcvt](fcvt.md) with security enhancements as described in [Security Features in the CRT](../../c-runtime-library/security-features-in-the-crt.md). +Converts a floating-point number to a string. This function is a version of [`_fcvt`](fcvt.md) with security enhancements as described in [Security features in the CRT](../security-features-in-the-crt.md). ## Syntax @@ -37,33 +37,33 @@ errno_t _fcvt_s( ### Parameters -*buffer*
+*`buffer`*\ The supplied buffer that will hold the result of the conversion. -*sizeInBytes*
+*`sizeInBytes`*\ The size of the buffer in bytes. -*value*
+*`value`*\ Number to be converted. -*count*
+*`count`*\ Number of digits after the decimal point. -*dec*
+*`dec`*\ Pointer to the stored decimal-point position. -*sign*
+*`sign`*\ Pointer to the stored sign indicator. -## Return Value +## Return value -Zero if successful. The return value is an error code if there's a failure. Error codes are defined in `errno.h`. For a listing of these errors, see [errno, _doserrno, _sys_errlist, and _sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +Zero if successful. The return value is an error code if there's a failure. Error codes are defined in `errno.h`. For a listing of these errors, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). -When there's an invalid parameter, as listed in the following table, this function invokes the invalid parameter handler, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, this function sets **errno** to **EINVAL** and returns **EINVAL**. +When there's an invalid parameter, as listed in the following table, this function invokes the invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, this function sets **errno** to **EINVAL** and returns **EINVAL**. -### Error Conditions +### Error conditions -|*buffer*|*sizeInBytes*|value|count|dec|sign|Return|Value in *buffer*| +|*`buffer`*|*`sizeInBytes`*|*`value`*|*`count`*|*`dec`*|*`sign`*|Return|Value in *`buffer`*| |--------------|-------------------|-----------|-----------|---------|----------|------------|-----------------------| |**NULL**|any|any|any|any|any|**EINVAL**|Not modified.| |Not **NULL** (points to valid memory)|<=0|any|any|any|any|**EINVAL**|Not modified.| @@ -72,21 +72,21 @@ When there's an invalid parameter, as listed in the following table, this functi ## Security Issues -**_fcvt_s** might generate an access violation if *buffer* doesn't point to valid memory and isn't **NULL**. +**_fcvt_s** might generate an access violation if *`buffer`* doesn't point to valid memory and isn't **NULL**. ## Remarks -The **_fcvt_s** function converts a floating-point number to a null-terminated character string. The *value* parameter is the floating-point number to be converted. **_fcvt_s** stores the digits of *value* as a string and appends a null character ('\0'). The *count* parameter specifies the number of digits to be stored after the decimal point. Excess digits are rounded off to *count* places. If there are fewer than *count* digits of precision, the string is padded with zeros. +The **_fcvt_s** function converts a floating-point number to a null-terminated character string. The *`value`* parameter is the floating-point number to be converted. **_fcvt_s** stores the digits of *`value`* as a string and appends a null character ('\0'). The *`count`* parameter specifies the number of digits to be stored after the decimal point. Excess digits are rounded off to *`count`* places. If there are fewer than *`count`* digits of precision, the string is padded with zeros. -Only digits are stored in the string. The position of the decimal point and the sign of *value* can be obtained from *dec* and *sign* after the call. The *dec* parameter points to an integer value; this integer value gives the position of the decimal point with respect to the beginning of the string. A zero or negative integer value indicates that the decimal point lies to the left of the first digit. The parameter *sign* points to an integer indicating the sign of *value*. The integer is set to 0 if *value* is positive and is set to a nonzero number if *value* is negative. +Only digits are stored in the string. The position of the decimal point and the sign of *`value`* can be obtained from *`dec`* and *`sign`* after the call. The *`dec`* parameter points to an integer value; this integer value gives the position of the decimal point with respect to the beginning of the string. A zero or negative integer value indicates that the decimal point lies to the left of the first digit. The parameter *`sign`* points to an integer indicating the sign of *`value`*. The integer is set to 0 if *`value`* is positive and is set to a nonzero number if *`value`* is negative. A buffer of length **_CVTBUFSIZE** is sufficient for any floating point value. -The difference between **_ecvt_s** and **_fcvt_s** is in the interpretation of the *count* parameter. **_ecvt_s** interprets *count* as the total number of digits in the output string, and **_fcvt_s** interprets *count* as the number of digits after the decimal point. +The difference between **_ecvt_s** and **_fcvt_s** is in the interpretation of the *`count`* parameter. **_ecvt_s** interprets *`count`* as the total number of digits in the output string, and **_fcvt_s** interprets *`count`* as the number of digits after the decimal point. -In C++, using this function is simplified by a template overload; the overload can infer buffer length automatically, eliminating the need to specify a size argument. For more information, see [Secure Template Overloads](../../c-runtime-library/secure-template-overloads.md). +In C++, using this function is simplified by a template overload; the overload can infer buffer length automatically, eliminating the need to specify a size argument. For more information, see [Secure template overloads](../secure-template-overloads.md). -The debug version of this function first fills the buffer with 0xFE. To disable this behavior, use [_CrtSetDebugFillThreshold](crtsetdebugfillthreshold.md). +The debug version of this function first fills the buffer with 0xFE. To disable this behavior, use [`_CrtSetDebugFillThreshold`](crtsetdebugfillthreshold.md). By default, this function's global state is scoped to the application. To change this behavior, see [Global state in the CRT](../global-state.md). @@ -96,9 +96,9 @@ By default, this function's global state is scoped to the application. To change |--------------|---------------------|---------------------| |**_fcvt_s**|\|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). -**Libraries:** All versions of the [C runtime libraries](../../c-runtime-library/crt-library-features.md). +**Libraries:** All versions of the [C runtime libraries](../crt-library-features.md). ## Example @@ -134,9 +134,9 @@ Converted value: 120000 ## See also -[Data Conversion](../../c-runtime-library/data-conversion.md)
-[Floating-Point Support](../../c-runtime-library/floating-point-support.md)
-[atof, _atof_l, _wtof, _wtof_l](atof-atof-l-wtof-wtof-l.md)
-[_ecvt_s](ecvt-s.md)
-[_gcvt_s](gcvt-s.md)
-[_fcvt](fcvt.md)
+[Data conversion](../data-conversion.md)\ +[Math and floating-point support](../floating-point-support.md)\ +[`atof`, `_atof_l`, `_wtof`, `_wtof_l`](atof-atof-l-wtof-wtof-l.md)\ +[`_ecvt_s`](ecvt-s.md)\ +[`_gcvt_s`](gcvt-s.md)\ +[`_fcvt`](fcvt.md) diff --git a/docs/c-runtime-library/reference/fcvt.md b/docs/c-runtime-library/reference/fcvt.md index cf447b01585..018ad723639 100644 --- a/docs/c-runtime-library/reference/fcvt.md +++ b/docs/c-runtime-library/reference/fcvt.md @@ -12,7 +12,7 @@ ms.assetid: 74584c88-f0dd-4907-8fca-52da5df583f5 --- # _fcvt -Converts a floating-point number to a string. A more secure version of this function is available; see [_fcvt_s](fcvt-s.md). +Converts a floating-point number to a string. A more secure version of this function is available; see [`_fcvt_s`](fcvt-s.md). ## Syntax @@ -27,35 +27,35 @@ char *_fcvt( ### Parameters -*value*
+*`value`*\ Number to be converted. -*count*
+*`count`*\ Number of digits after the decimal point. -*dec*
+*`dec`*\ Pointer to the stored decimal-point position. -*sign*
+*`sign`*\ Pointer to the stored sign indicator. -## Return Value +## Return value **_fcvt** returns a pointer to the string of digits, **NULL** on error. ## Remarks -The **_fcvt** function converts a floating-point number to a null-terminated character string. The *value* parameter is the floating-point number to be converted. **_fcvt** stores the digits of *value* as a string and appends a null character ('\0'). The *count* parameter specifies the number of digits to be stored after the decimal point. Excess digits are rounded off to *count* places. If there are fewer than *count* digits of precision, the string is padded with zeros. +The **_fcvt** function converts a floating-point number to a null-terminated character string. The *`value`* parameter is the floating-point number to be converted. **_fcvt** stores the digits of *`value`* as a string and appends a null character ('\0'). The *`count`* parameter specifies the number of digits to be stored after the decimal point. Excess digits are rounded off to *`count`* places. If there are fewer than *`count`* digits of precision, the string is padded with zeros. The total number of digits returned by **_fcvt** won't exceed **_CVTBUFSIZE**. -Only digits are stored in the string. The position of the decimal point and the sign of *value* can be obtained from *dec* and sign after the call. The *dec* parameter points to an integer value; this integer value gives the position of the decimal point with respect to the beginning of the string. A zero or negative integer value indicates that the decimal point lies to the left of the first digit. The parameter *sign* points to an integer indicating the sign of *value*. The integer is set to 0 if *value* is positive and is set to a nonzero number if *value* is negative. +Only digits are stored in the string. The position of the decimal point and the sign of *`value`* can be obtained from *`dec`* and sign after the call. The *`dec`* parameter points to an integer value; this integer value gives the position of the decimal point with respect to the beginning of the string. A zero or negative integer value indicates that the decimal point lies to the left of the first digit. The parameter *`sign`* points to an integer indicating the sign of *`value`*. The integer is set to 0 if *`value`* is positive and is set to a nonzero number if *`value`* is negative. -The difference between **_ecvt** and **_fcvt** is in the interpretation of the *count* parameter. **_ecvt** interprets *count* as the total number of digits in the output string, whereas **_fcvt** interprets *count* as the number of digits after the decimal point. +The difference between **_ecvt** and **_fcvt** is in the interpretation of the *`count`* parameter. **_ecvt** interprets *`count`* as the total number of digits in the output string, whereas **_fcvt** interprets *`count`* as the number of digits after the decimal point. **_ecvt** and **_fcvt** use a single statically allocated buffer for the conversion. Each call to one of these routines destroys the results of the previous call. -This function validates its parameters. If *dec* or *sign* is **NULL**, or *count* is 0, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, **errno** is set to **EINVAL**, and **NULL** is returned. +This function validates its parameters. If *`dec`* or *`sign`* is **NULL**, or *`count`* is 0, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, **errno** is set to **EINVAL**, and **NULL** is returned. 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). @@ -65,7 +65,7 @@ By default, this function's global state is scoped to the application. To change |--------------|---------------------| |**_fcvt**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -98,8 +98,8 @@ source: 3.1415926535 buffer: '31415927' decimal: 1 sign: 0 ## See also -[Data Conversion](../../c-runtime-library/data-conversion.md)
-[Floating-Point Support](../../c-runtime-library/floating-point-support.md)
-[atof, _atof_l, _wtof, _wtof_l](atof-atof-l-wtof-wtof-l.md)
-[_ecvt](ecvt.md)
-[_gcvt](gcvt.md)
+[Data conversion](../data-conversion.md)\ +[Math and floating-point support](../floating-point-support.md)\ +[`atof`, `_atof_l`, `_wtof`, `_wtof_l`](atof-atof-l-wtof-wtof-l.md)\ +[`_ecvt`](ecvt.md)\ +[`_gcvt`](gcvt.md) diff --git a/docs/c-runtime-library/reference/fdim-fdimf-fdiml.md b/docs/c-runtime-library/reference/fdim-fdimf-fdiml.md index 7bbb04b76f1..4f8c9b6979f 100644 --- a/docs/c-runtime-library/reference/fdim-fdimf-fdiml.md +++ b/docs/c-runtime-library/reference/fdim-fdimf-fdiml.md @@ -53,7 +53,7 @@ The first value. *`y`*\ The second value. -## Return Value +## Return value Returns the positive difference between *`x`* and *`y`*: @@ -70,13 +70,13 @@ Otherwise, may return one of the following errors: |Underflow range error|correct value (after rounding)| |*`x`* or *`y`* is NaN|NaN| -Errors are reported as specified in [_matherr](matherr.md). +Errors are reported as specified in [`_matherr`](matherr.md). ## Remarks Because C++ allows overloading, you can call overloads of **fdim** that take and return **`float`** and **`long double`** types. In a C program, unless you're using the \ macro to call this function, **fdim** always takes and returns a **`double`**. -If you use the \ `fdim()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../../c-runtime-library/tgmath.md) for details. +If you use the \ `fdim()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../tgmath.md) for details. Except for the NaN handling, this function is equivalent to `fmax(x - y, 0)`. @@ -87,10 +87,10 @@ Except for the NaN handling, this function is equivalent to `fmax(x - y, 0)`. |**fdim**, **fdimf**, **fdiml**|\|\| |**fdim** macro | \ || -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Alphabetical Function Reference](crt-alphabetical-function-reference.md)
-[fmax, fmaxf, fmaxl](fmax-fmaxf-fmaxl.md)
-[abs, labs, llabs, _abs64](abs-labs-llabs-abs64.md)
+[Alphabetical function reference](crt-alphabetical-function-reference.md)\ +[`fmax`, `fmaxf`, `fmaxl`](fmax-fmaxf-fmaxl.md)\ +[`abs`, `labs`, `llabs`, `_abs64`](abs-labs-llabs-abs64.md)\ diff --git a/docs/c-runtime-library/reference/fdopen-wfdopen.md b/docs/c-runtime-library/reference/fdopen-wfdopen.md index 310f2d6e4b7..3eba3aeba19 100644 --- a/docs/c-runtime-library/reference/fdopen-wfdopen.md +++ b/docs/c-runtime-library/reference/fdopen-wfdopen.md @@ -37,13 +37,13 @@ Type of file access. ## Return value -Each of these functions returns a pointer to the open stream. A null pointer value indicates an error. When an error occurs, the invalid parameter handler is invoked, as described in [Parameter validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, `errno` is set either to `EBADF`, which indicates a bad file descriptor, or `EINVAL`, which indicates that *`mode`* was a null pointer. +Each of these functions returns a pointer to the open stream. A null pointer value indicates an error. When an error occurs, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, `errno` is set either to `EBADF`, which indicates a bad file descriptor, or `EINVAL`, which indicates that *`mode`* was a null pointer. -For more information about these and other error codes, see [`_doserrno`, `errno`, `_sys_errlist`, and `_sys_nerr`](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +For more information about these and other error codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks -The **`_fdopen`** function associates an I/O stream with the file that is identified by *`fd`*, and thus allows a file that is opened for low-level I/O to be buffered and formatted. **`_wfdopen`** is a wide-character version of **`_fdopen`**; the *mode* argument to **`_wfdopen`** is a wide-character string. **`_wfdopen`** and **`_fdopen`** otherwise behave identically. +The **`_fdopen`** function associates an I/O stream with the file that is identified by *`fd`*, and thus allows a file that is opened for low-level I/O to be buffered and formatted. **`_wfdopen`** is a wide-character version of **`_fdopen`**; the *`mode`* argument to **`_wfdopen`** is a wide-character string. **`_wfdopen`** and **`_fdopen`** otherwise behave identically. File descriptors passed into **`_fdopen`** are owned by the returned `FILE *` stream. If **`_fdopen`** is successful, don't call [`_close`](close.md) on the file descriptor. Calling [`fclose`](fclose-fcloseall.md) on the returned `FILE *` also closes the file descriptor. @@ -62,18 +62,18 @@ The *`mode`* character string specifies the type of file access requested for th When a file is opened with the **`"a"`** or **`"a+"`** access type, all write operations occur at the end of the file. The file pointer can be repositioned by using [`fseek`](fseek-fseeki64.md) or [`rewind`](rewind.md), but it's always moved back to the end of the file before any write operation is carried out. Thus, existing data can't be overwritten. When the **`"r+"`**, **`"w+"`**, or **`"a+"`** access type is specified, both reading and writing are allowed (the file is said to be open for "update"). However, when you switch between reading and writing, there must be an intervening [`fflush`](fflush.md), [`fsetpos`](fsetpos.md), [`fseek`](fseek-fseeki64.md), or [`rewind`](rewind.md) operation. You can specify the current position for the [`fsetpos`](fsetpos.md) or [`fseek`](fseek-fseeki64.md) operation, if you want to. -In addition to the above values, the following characters can also be included in *mode* to specify the translation mode for newline characters: +In addition to the above values, the following characters can also be included in *`mode`* to specify the translation mode for newline characters: | *`mode`* modifier | Behavior | |-----------------|----------| | **`t`** | Open in text (translated) mode. In this mode, carriage return-line feed (CR-LF) combinations are translated into one-line feeds (LF) on input, and LF characters are translated to CR-LF combinations on output. Also, Ctrl+Z is interpreted as an end-of-file character on input. | | **`b`** | Open in binary (untranslated) mode. Any translations from **`t`** mode are suppressed. | -| **`c`** | Enable the commit flag for the associated *filename* so that the contents of the file buffer are written directly to disk if either **`fflush`** or **`_flushall`** is called. | -| **`n`** | Reset the commit flag for the associated *filename* to "no-commit." This flag is the default. It also overrides the global commit flag if you link your program with *`Commode.obj`*. The global commit flag default is "no-commit" unless you explicitly link your program with *`Commode.obj`*. | +| **`c`** | Enable the commit flag for the associated *`filename`* so that the contents of the file buffer are written directly to disk if either **`fflush`** or **`_flushall`** is called. | +| **`n`** | Reset the commit flag for the associated *`filename`* to "no-commit." This flag is the default. It also overrides the global commit flag if you link your program with *`Commode.obj`*. The global commit flag default is "no-commit" unless you explicitly link your program with *`Commode.obj`*. | The **`t`**, **`c`**, and **`n`** *`mode`* options are Microsoft extensions for **`fopen`** and **`_fdopen`**. Don't use them if you want to preserve ANSI portability. -If **`t`** or **`b`** isn't given in *`mode`*, the default translation mode is defined by the global variable [`_fmode`](../../c-runtime-library/fmode.md). If **`t`** or **`b`** is prefixed to the argument, the function fails and returns `NULL`. For a discussion of text and binary modes, see [Text and binary mode file I/O](../../c-runtime-library/text-and-binary-mode-file-i-o.md). +If **`t`** or **`b`** isn't given in *`mode`*, the default translation mode is defined by the global variable [`_fmode`](../fmode.md). If **`t`** or **`b`** is prefixed to the argument, the function fails and returns `NULL`. For a discussion of text and binary modes, see [Text and binary mode file I/O](../text-and-binary-mode-file-i-o.md). Valid characters for the *`mode`* string used in **`fopen`** and **`_fdopen`** correspond to *`oflag`* arguments used in [`_open`](open-wopen.md) and [`_sopen`](sopen-wsopen.md), as shown in this table: @@ -97,7 +97,7 @@ Valid characters for the *`mode`* string used in **`fopen`** and **`_fdopen`** c | **`_fdopen`** | `` | `` | | **`_wfdopen`** | `` or `` | `` | -For more information on standards conformance and naming conventions in the C runtime library, see [Compatibility](../../c-runtime-library/compatibility.md). +For more information on standards conformance and naming conventions in the C runtime library, see [Compatibility](../compatibility.md). ### Generic-text routine mappings @@ -157,7 +157,7 @@ Lines in file: 2 ## See also -[Stream I/O](../../c-runtime-library/stream-i-o.md)\ +[Stream I/O](../stream-i-o.md)\ [`_dup`, `_dup2`](dup-dup2.md)\ [`fclose`, `_fcloseall`](fclose-fcloseall.md)\ [`fopen`, `_wfopen`](fopen-wfopen.md)\ diff --git a/docs/c-runtime-library/reference/fdopen.md b/docs/c-runtime-library/reference/fdopen.md index 549d0382dee..afb7ff7f068 100644 --- a/docs/c-runtime-library/reference/fdopen.md +++ b/docs/c-runtime-library/reference/fdopen.md @@ -12,6 +12,6 @@ ms.assetid: 3243c1d2-2826-4d2d-bfa2-a2da45f9cc7a --- # fdopen -The Microsoft-implemented POSIX function name `fdopen` is a deprecated alias for the [_fdopen](fdopen-wfdopen.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. +The Microsoft-implemented POSIX function name `fdopen` is a deprecated alias for the [`_fdopen`](fdopen-wfdopen.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. -We recommend you use [_fdopen](fdopen-wfdopen.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). +We recommend you use [`_fdopen`](fdopen-wfdopen.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). diff --git a/docs/c-runtime-library/reference/feclearexcept1.md b/docs/c-runtime-library/reference/feclearexcept1.md index de7c9234d26..3233ecc5cba 100644 --- a/docs/c-runtime-library/reference/feclearexcept1.md +++ b/docs/c-runtime-library/reference/feclearexcept1.md @@ -24,16 +24,16 @@ int feclearexcept( ### Parameters -*excepts*
+*`excepts`*\ The exception status flags to clear. -## Return Value +## Return value -Returns zero if *excepts* is zero, or if all the specified exceptions were successfully cleared. Otherwise, it returns a nonzero value. +Returns zero if *`excepts`* is zero, or if all the specified exceptions were successfully cleared. Otherwise, it returns a nonzero value. ## Remarks -The **feclearexcept** function attempts to clear the floating point exception status flags specified by *excepts*. The function supports these exception macros, defined in fenv.h: +The **feclearexcept** function attempts to clear the floating point exception status flags specified by *`excepts`*. The function supports these exception macros, defined in fenv.h: |Exception Macro|Description| |---------------------|-----------------| @@ -44,7 +44,7 @@ The **feclearexcept** function attempts to clear the floating point exception st |FE_UNDERFLOW|An earlier floating-point operation result was too small to be represented at full precision; a denormal value was created.| |FE_ALL_EXCEPT|The bitwise OR of all supported floating-point exceptions.| -The *excepts* argument may be zero, or the bitwise OR of one or more of the supported exception macros. The result of any other argument value is undefined. +The *`excepts`* argument may be zero, or the bitwise OR of one or more of the supported exception macros. The result of any other argument value is undefined. ## Requirements @@ -52,9 +52,9 @@ The *excepts* argument may be zero, or the bitwise OR of one or more of the supp |--------------|--------------|------------------| |**feclearexcept**|\|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Alphabetical Function Reference](crt-alphabetical-function-reference.md)
-[fetestexcept](fetestexcept1.md)
+[Alphabetical function reference](crt-alphabetical-function-reference.md)\ +[`fetestexcept`](fetestexcept1.md) diff --git a/docs/c-runtime-library/reference/fegetenv1.md b/docs/c-runtime-library/reference/fegetenv1.md index 378dc7bc433..10d38ff32e7 100644 --- a/docs/c-runtime-library/reference/fegetenv1.md +++ b/docs/c-runtime-library/reference/fegetenv1.md @@ -24,10 +24,10 @@ int fegetenv( ### Parameters -*`penv`*
+*`penv`*\ Pointer to an **fenv_t** object to contain the current floating-point environment values. -## Return Value +## Return value Returns 0 if the floating-point environment was successfully stored in *`penv`*. Otherwise, it returns a non-zero value. @@ -35,7 +35,7 @@ Returns 0 if the floating-point environment was successfully stored in *`penv`*. The **fegetenv** function stores the current floating-point environment in the object pointed to by *`penv`*. The floating point environment is the set of status flags and control modes that affect floating-point calculations. This environment includes the rounding direction mode and the status flags for floating-point exceptions. If *`penv`* doesn't point to a valid **fenv_t** object, subsequent behavior is undefined. -To use this function, you must turn off floating-point optimizations that could prevent access by using the `#pragma fenv_access(on)` directive prior to the call. For more information, see [fenv_access](../../preprocessor/fenv-access.md). +To use this function, you must turn off floating-point optimizations that could prevent access by using the `#pragma fenv_access(on)` directive prior to the call. For more information, see [`fenv_access`](../../preprocessor/fenv-access.md). ## Requirements @@ -43,9 +43,9 @@ To use this function, you must turn off floating-point optimizations that could |--------------|--------------|------------------| |**fegetenv**|\|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Alphabetical Function Reference](crt-alphabetical-function-reference.md)
-[fesetenv](fesetenv1.md)
+[Alphabetical function reference](crt-alphabetical-function-reference.md)\ +[`fesetenv`](fesetenv1.md) diff --git a/docs/c-runtime-library/reference/fegetexceptflag2.md b/docs/c-runtime-library/reference/fegetexceptflag2.md index 84e96632559..dc1014e12f1 100644 --- a/docs/c-runtime-library/reference/fegetexceptflag2.md +++ b/docs/c-runtime-library/reference/fegetexceptflag2.md @@ -25,13 +25,13 @@ int fegetexceptflag( ### Parameters -*`pstatus`*
+*`pstatus`*\ A pointer to a **fexcept_t** object to contain the current values of the exception flags specified by *`excepts`*. -*`excepts`*
+*`excepts`*\ The floating-point exception flags to store in *`pstatus`*. -## Return Value +## Return value On success, returns 0. Otherwise, it returns a non-zero value. @@ -50,7 +50,7 @@ The **fegetexceptflag** function stores the current state of the floating-point The *`excepts`* argument may be zero, one of the supported floating-point exception macros, or the bitwise OR of two or more of the macros. The effect of any other argument value is undefined. -To use this function, you must turn off floating-point optimizations that could prevent access by using the `#pragma fenv_access(on)` directive prior to the call. For more information, see [fenv_access](../../preprocessor/fenv-access.md). +To use this function, you must turn off floating-point optimizations that could prevent access by using the `#pragma fenv_access(on)` directive prior to the call. For more information, see [`fenv_access`](../../preprocessor/fenv-access.md). ## Requirements @@ -58,9 +58,9 @@ To use this function, you must turn off floating-point optimizations that could |--------------|--------------|------------------| |**fegetexceptflag**|\|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Alphabetical Function Reference](crt-alphabetical-function-reference.md)
-[fesetexceptflag](fesetexceptflag2.md)
+[Alphabetical function reference](crt-alphabetical-function-reference.md)\ +[`fesetexceptflag`](fesetexceptflag2.md) diff --git a/docs/c-runtime-library/reference/fegetround-fesetround2.md b/docs/c-runtime-library/reference/fegetround-fesetround2.md index 4a48e804fcb..90d15c8459a 100644 --- a/docs/c-runtime-library/reference/fegetround-fesetround2.md +++ b/docs/c-runtime-library/reference/fegetround-fesetround2.md @@ -26,10 +26,10 @@ int fesetround( ### Parameters -*round_mode*
+*`round_mode`*\ The rounding mode to set, as one of the floating-point rounding macros. If the value isn't equal to one of the floating-point rounding macros, the rounding mode isn't changed. -## Return Value +## Return value On success, **fegetround** returns the rounding mode as one of the floating point rounding macro values. It returns a negative value if the current rounding mode can't be determined. @@ -66,7 +66,7 @@ The current rounding mode doesn't affect these operations: - The results of floating-point arithmetic operators in constant expressions, which always round to the nearest value. -To use these functions, you must turn off floating-point optimizations that could prevent access by using the `#pragma fenv_access(on)` directive prior to the call. For more information, see [fenv_access](../../preprocessor/fenv-access.md). +To use these functions, you must turn off floating-point optimizations that could prevent access by using the `#pragma fenv_access(on)` directive prior to the call. For more information, see [`fenv_access`](../../preprocessor/fenv-access.md). ## Requirements @@ -74,11 +74,11 @@ To use these functions, you must turn off floating-point optimizations that coul |--------------|--------------|------------------| |**fegetround**, **fesetround**|\|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Alphabetical Function Reference](crt-alphabetical-function-reference.md)
-[nearbyint, nearbyintf, nearbyintl](nearbyint-nearbyintf-nearbyintl1.md)
-[rint, rintf, rintl](rint-rintf-rintl.md)
-[lrint, lrintf, lrintl, llrint, llrintf, llrintl](lrint-lrintf-lrintl-llrint-llrintf-llrintl.md)
+[Alphabetical function reference](crt-alphabetical-function-reference.md)\ +[`nearbyint`, `nearbyintf`, `nearbyintl`](nearbyint-nearbyintf-nearbyintl1.md)\ +[`rint`, `rintf`, `rintl`](rint-rintf-rintl.md)\ +[`lrint`, `lrintf`, `lrintl`, `llrint`, `llrintf`, `llrintl`](lrint-lrintf-lrintl-llrint-llrintf-llrintl.md) diff --git a/docs/c-runtime-library/reference/feholdexcept2.md b/docs/c-runtime-library/reference/feholdexcept2.md index 5107369fde8..3c933181a2c 100644 --- a/docs/c-runtime-library/reference/feholdexcept2.md +++ b/docs/c-runtime-library/reference/feholdexcept2.md @@ -24,20 +24,20 @@ int feholdexcept( ### Parameters -*`penv`*
+*`penv`*\ Pointer to an **fenv_t** object to contain a copy of the floating-point environment. -## Return Value +## Return value Returns zero if and only if the function is able to successfully turn on non-stop floating-point exception handling. ## Remarks -The **feholdexcept** function is used to store the state of the current floating point environment in the **fenv_t** object pointed to by *`penv`*, and to set the environment to not interrupt execution on floating-point exceptions. This mode is known as *non-stop mode*. This mode continues until the environment is restored using [fesetenv](fesetenv1.md) or [feupdateenv](feupdateenv.md). +The **feholdexcept** function is used to store the state of the current floating point environment in the **fenv_t** object pointed to by *`penv`*, and to set the environment to not interrupt execution on floating-point exceptions. This mode is known as *non-stop mode*. This mode continues until the environment is restored using [`fesetenv`](fesetenv1.md) or [`feupdateenv`](feupdateenv.md). -You can use this function at the beginning of a subroutine that needs to hide one or more floating-point exceptions from the caller. To report an exception, you can clear the unwanted exceptions by using [feclearexcept](feclearexcept1.md), and then end the non-stop mode with a call to **feupdateenv**. +You can use this function at the beginning of a subroutine that needs to hide one or more floating-point exceptions from the caller. To report an exception, you can clear the unwanted exceptions by using [`feclearexcept`](feclearexcept1.md), and then end the non-stop mode with a call to **feupdateenv**. -To use this function, you must turn off floating-point optimizations that could prevent access by using the `#pragma fenv_access(on)` directive prior to the call. For more information, see [fenv_access](../../preprocessor/fenv-access.md). +To use this function, you must turn off floating-point optimizations that could prevent access by using the `#pragma fenv_access(on)` directive prior to the call. For more information, see [`fenv_access`](../../preprocessor/fenv-access.md). ## Requirements @@ -45,11 +45,11 @@ To use this function, you must turn off floating-point optimizations that could |--------------|--------------|------------------| |**feholdexcept**|\|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Alphabetical Function Reference](crt-alphabetical-function-reference.md)
-[feclearexcept](feclearexcept1.md)
-[fesetenv](fesetenv1.md)
-[feupdateenv](feupdateenv.md)
+[Alphabetical function reference](crt-alphabetical-function-reference.md)\ +[`feclearexcept`](feclearexcept1.md)\ +[`fesetenv`](fesetenv1.md)\ +[`feupdateenv`](feupdateenv.md) diff --git a/docs/c-runtime-library/reference/feof.md b/docs/c-runtime-library/reference/feof.md index f1c937bd169..a37d403cc2f 100644 --- a/docs/c-runtime-library/reference/feof.md +++ b/docs/c-runtime-library/reference/feof.md @@ -24,18 +24,18 @@ int feof( ### Parameters -*stream*
+*`stream`*\ Pointer to **FILE** structure. -## Return Value +## Return value -The **feof** function returns a nonzero value if a read operation has attempted to read past the end of the file; it returns 0 otherwise. If the stream pointer is **NULL**, the function invokes the invalid parameter handler, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, **errno** is set to **EINVAL** and the **feof** returns 0. +The **feof** function returns a nonzero value if a read operation has attempted to read past the end of the file; it returns 0 otherwise. If the stream pointer is **NULL**, the function invokes the invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, **errno** is set to **EINVAL** and the **feof** returns 0. -For more information about return codes, see [`_doserrno`, `errno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). +For more information about return codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks -The **feof** routine (implemented both as a function and as a macro) determines whether the end of *stream* has been passed. When the end of file is passed, read operations return an end-of-file indicator until the stream is closed or until [rewind](rewind.md), **fsetpos**, [fseek](fseek-fseeki64.md), or **clearerr** is called against it. +The **feof** routine (implemented both as a function and as a macro) determines whether the end of *`stream`* has been passed. When the end of file is passed, read operations return an end-of-file indicator until the stream is closed or until [`rewind`](rewind.md), **fsetpos**, [`fseek`](fseek-fseeki64.md), or **clearerr** is called against it. For example, if a file contains 10 bytes and you read 10 bytes from the file, **feof** will return 0 because, even though the file pointer is at the end of the file, you haven't attempted to read beyond the end. Only after you try to read an 11th byte will **feof** return a nonzero value. @@ -47,7 +47,7 @@ By default, this function's global state is scoped to the application. To change |--------------|---------------------| |**feof**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -104,9 +104,9 @@ Number of bytes read = 19 ## See also -[Error Handling](../../c-runtime-library/error-handling-crt.md)
-[Stream I/O](../../c-runtime-library/stream-i-o.md)
-[clearerr](clearerr.md)
-[_eof](eof.md)
-[ferror](ferror.md)
-[perror, _wperror](perror-wperror.md)
+[Error handling](../error-handling-crt.md)\ +[Stream I/O](../stream-i-o.md)\ +[`clearerr`](clearerr.md)\ +[`_eof`](eof.md)\ +[`ferror`](ferror.md)\ +[`perror`, `_wperror`](perror-wperror.md) diff --git a/docs/c-runtime-library/reference/feraiseexcept.md b/docs/c-runtime-library/reference/feraiseexcept.md index c6c687e9f2e..503986c6b99 100644 --- a/docs/c-runtime-library/reference/feraiseexcept.md +++ b/docs/c-runtime-library/reference/feraiseexcept.md @@ -23,16 +23,16 @@ int feraiseexcept( ### Parameters -*excepts*
+*`excepts`*\ The floating-point exceptions to raise. -## Return Value +## Return value If all specified exceptions are raised successfully, returns 0. ## Remarks -The **feraiseexcept** function attempts to raise the floating-point exceptions specified by *excepts*. The **feraiseexcept** function supports these exception macros, defined in \: +The **feraiseexcept** function attempts to raise the floating-point exceptions specified by *`excepts`*. The **feraiseexcept** function supports these exception macros, defined in \: |Exception Macro|Description| |---------------------|-----------------| @@ -43,24 +43,24 @@ The **feraiseexcept** function attempts to raise the floating-point exceptions s |FE_UNDERFLOW|An earlier floating-point operation result was too small to be represented at full precision; a denormal value was created.| |FE_ALL_EXCEPT|The bitwise OR of all supported floating-point exceptions.| -The *excepts* argument may be zero, one of the exception macro values, or the bitwise OR of two or more of the supported exception macros. If one of the specified exception macros is FE_OVERFLOW or FE_UNDERFLOW, the FE_INEXACT exception may be raised as a side-effect. +The *`excepts`* argument may be zero, one of the exception macro values, or the bitwise OR of two or more of the supported exception macros. If one of the specified exception macros is FE_OVERFLOW or FE_UNDERFLOW, the FE_INEXACT exception may be raised as a side-effect. -To use this function, you must turn off floating-point optimizations that could prevent access by using the `#pragma fenv_access(on)` directive prior to the call. For more information, see [fenv_access](../../preprocessor/fenv-access.md). +To use this function, you must turn off floating-point optimizations that could prevent access by using the `#pragma fenv_access(on)` directive prior to the call. For more information, see [`fenv_access`](../../preprocessor/fenv-access.md). -**Microsoft-specific:** The exceptions specified in *excepts* are raised in the order FE_INVALID, FE_DIVBYZERO, FE_OVERFLOW, FE_UNDERFLOW, FE_INEXACT. However, FE_INEXACT can be raised when FE_OVERFLOW or FE_UNDERFLOW is raised, even if not specified in *excepts*. +**Microsoft-specific:** The exceptions specified in *`excepts`* are raised in the order FE_INVALID, FE_DIVBYZERO, FE_OVERFLOW, FE_UNDERFLOW, FE_INEXACT. However, FE_INEXACT can be raised when FE_OVERFLOW or FE_UNDERFLOW is raised, even if not specified in *`excepts`*. ## Requirements |Function|C header|C++ header| |--------------|--------------|------------------| -|*feraiseexcept*|\|\| +|`feraiseexcept`|\|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Alphabetical Function Reference](crt-alphabetical-function-reference.md)
-[fesetexceptflag](fesetexceptflag2.md)
-[feholdexcept](feholdexcept2.md)
-[fetestexcept](fetestexcept1.md)
-[feupdateenv](feupdateenv.md)
+[Alphabetical function reference](crt-alphabetical-function-reference.md)\ +[`fesetexceptflag`](fesetexceptflag2.md)\ +[`feholdexcept`](feholdexcept2.md)\ +[`fetestexcept`](fetestexcept1.md)\ +[`feupdateenv`](feupdateenv.md) diff --git a/docs/c-runtime-library/reference/ferror.md b/docs/c-runtime-library/reference/ferror.md index f4fc184e50f..e6c44acfbb0 100644 --- a/docs/c-runtime-library/reference/ferror.md +++ b/docs/c-runtime-library/reference/ferror.md @@ -24,18 +24,18 @@ int ferror( ### Parameters -*stream*
+*`stream`*\ Pointer to **FILE** structure. -## Return Value +## Return value -If no error has occurred on *stream*, **ferror** returns 0. Otherwise, it returns a nonzero value. If stream is **NULL**, **ferror** invokes the invalid parameter handler, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, this function sets **errno** to **EINVAL** and returns 0. +If no error has occurred on *`stream`*, **ferror** returns 0. Otherwise, it returns a nonzero value. If stream is **NULL**, **ferror** invokes the invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, this function sets **errno** to **EINVAL** and returns 0. -For more information about return codes, see [`_doserrno`, `errno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). +For more information about return codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks -The **ferror** routine (implemented both as a function and as a macro) tests for a reading or writing error on the file associated with *stream*. If an error has occurred, the error indicator for the stream remains set until the stream is closed or rewound, or until **clearerr** is called against it. +The **ferror** routine (implemented both as a function and as a macro) tests for a reading or writing error on the file associated with *`stream`*. If an error has occurred, the error indicator for the stream remains set until the stream is closed or rewound, or until **clearerr** is called against it. 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). @@ -45,18 +45,18 @@ By default, this function's global state is scoped to the application. To change |--------------|---------------------| |**ferror**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example -See the example for [feof](feof.md). +See the example for [`feof`](feof.md). ## See also -[Error Handling](../../c-runtime-library/error-handling-crt.md)
-[Stream I/O](../../c-runtime-library/stream-i-o.md)
-[clearerr](clearerr.md)
-[_eof](eof.md)
-[feof](feof.md)
-[fopen, _wfopen](fopen-wfopen.md)
-[perror, _wperror](perror-wperror.md)
+[Error handling](../error-handling-crt.md)\ +[Stream I/O](../stream-i-o.md)\ +[`clearerr`](clearerr.md)\ +[`_eof`](eof.md)\ +[`feof`](feof.md)\ +[`fopen`, `_wfopen`](fopen-wfopen.md)\ +[`perror`, `_wperror`](perror-wperror.md) diff --git a/docs/c-runtime-library/reference/fesetenv1.md b/docs/c-runtime-library/reference/fesetenv1.md index 11f0d7315d6..b81118af21c 100644 --- a/docs/c-runtime-library/reference/fesetenv1.md +++ b/docs/c-runtime-library/reference/fesetenv1.md @@ -24,10 +24,10 @@ int fesetenv( ### Parameters -*`penv`*
-Pointer to a **fenv_t** object that contains a floating-point environment as set by a call to [fegetenv](fegetenv1.md) or [feholdexcept](feholdexcept2.md). You can also specify the default startup floating-point environment by using the **FE_DFL_ENV** macro. +*`penv`*\ +Pointer to a **fenv_t** object that contains a floating-point environment as set by a call to [`fegetenv`](fegetenv1.md) or [`feholdexcept`](feholdexcept2.md). You can also specify the default startup floating-point environment by using the **FE_DFL_ENV** macro. -## Return Value +## Return value Returns 0 if the environment was successfully set. Otherwise, it returns a nonzero value. @@ -37,7 +37,7 @@ The **fesetenv** function sets the current floating-point environment from the v A call to this function sets the exception status flags that are in the *`penv`* object, but it doesn't raise those exceptions. -To use this function, you must turn off floating-point optimizations that could prevent access by using the `#pragma fenv_access(on)` directive prior to the call. For more information, see [fenv_access](../../preprocessor/fenv-access.md). +To use this function, you must turn off floating-point optimizations that could prevent access by using the `#pragma fenv_access(on)` directive prior to the call. For more information, see [`fenv_access`](../../preprocessor/fenv-access.md). ## Requirements @@ -45,12 +45,12 @@ To use this function, you must turn off floating-point optimizations that could |--------------|--------------|------------------| |**fesetenv**|\|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Alphabetical Function Reference](crt-alphabetical-function-reference.md)
-[fegetenv](fegetenv1.md)
-[feclearexcept](feclearexcept1.md)
-[feholdexcept](feholdexcept2.md)
-[fesetexceptflag](fesetexceptflag2.md)
+[Alphabetical function reference](crt-alphabetical-function-reference.md)\ +[`fegetenv`](fegetenv1.md)\ +[`feclearexcept`](feclearexcept1.md)\ +[`feholdexcept`](feholdexcept2.md)\ +[`fesetexceptflag`](fesetexceptflag2.md) diff --git a/docs/c-runtime-library/reference/fesetexceptflag2.md b/docs/c-runtime-library/reference/fesetexceptflag2.md index 5235c2ded8a..0cc05d6533c 100644 --- a/docs/c-runtime-library/reference/fesetexceptflag2.md +++ b/docs/c-runtime-library/reference/fesetexceptflag2.md @@ -25,13 +25,13 @@ int fesetexceptflag( ### Parameters -*`pstatus`*
-Pointer to an **fexcept_t** object containing the values to set the exception status flags to. The object may be set by a previous call to [fegetexceptflag](fegetexceptflag2.md). +*`pstatus`*\ +Pointer to an **fexcept_t** object containing the values to set the exception status flags to. The object may be set by a previous call to [`fegetexceptflag`](fegetexceptflag2.md). -*`excepts`*
+*`excepts`*\ The floating-point exception status flags to set. -## Return Value +## Return value If all the specified exception status flags are set successfully, returns 0. Otherwise, it returns a nonzero value. @@ -50,7 +50,7 @@ The **fesetexceptflag** function sets the state of the floating-point exception The *`excepts`* argument may be zero, one of the supported floating-point exception macros, or the bitwise OR of two or more of the macros. The effect of any other argument value is undefined. -To use this function, you must turn off floating-point optimizations that could prevent access by using the `#pragma fenv_access(on)` directive prior to the call. For more information, see [fenv_access](../../preprocessor/fenv-access.md). +To use this function, you must turn off floating-point optimizations that could prevent access by using the `#pragma fenv_access(on)` directive prior to the call. For more information, see [`fenv_access`](../../preprocessor/fenv-access.md). ## Requirements @@ -58,9 +58,9 @@ To use this function, you must turn off floating-point optimizations that could |--------------|--------------|------------------| |**fesetexceptflag**|\|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Alphabetical Function Reference](crt-alphabetical-function-reference.md)
-[fegetexceptflag](fegetexceptflag2.md)
+[Alphabetical function reference](crt-alphabetical-function-reference.md)\ +[`fegetexceptflag`](fegetexceptflag2.md) diff --git a/docs/c-runtime-library/reference/fetestexcept1.md b/docs/c-runtime-library/reference/fetestexcept1.md index 50970d6c3c7..c209e539752 100644 --- a/docs/c-runtime-library/reference/fetestexcept1.md +++ b/docs/c-runtime-library/reference/fetestexcept1.md @@ -24,16 +24,16 @@ int fetestexcept( ### Parameters -*excepts*
+*`excepts`*\ A bitwise OR of the floating-point status flags to test. -## Return Value +## Return value On success, returns a bitmask containing a bitwise OR of the floating-point exception macros that correspond to the exception status flags currently set. Returns 0 if none of the exceptions are set. ## Remarks -Use the fetestexcept function to determine which exceptions were raised by a floating point operation. Use the *excepts* parameter to specify which exception status flags to test. The **fetestexcept** function uses these exception macros defined in \ in *excepts* and the return value: +Use the fetestexcept function to determine which exceptions were raised by a floating point operation. Use the *`excepts`* parameter to specify which exception status flags to test. The **fetestexcept** function uses these exception macros defined in \ in *`excepts`* and the return value: |Exception Macro|Description| |---------------------|-----------------| @@ -44,9 +44,9 @@ Use the fetestexcept function to determine which exceptions were raised by a flo |FE_UNDERFLOW|An earlier floating-point operation result was too small to be represented at full precision; a denormal value was created.| |FE_ALL_EXCEPT|The bitwise OR of all supported floating-point exceptions.| -The specified *excepts* argument may be 0, one of the supported floating-point exception macros, or the bitwise OR of two or more of the macros. The effect of any other *excepts* argument value is undefined. +The specified *`excepts`* argument may be 0, one of the supported floating-point exception macros, or the bitwise OR of two or more of the macros. The effect of any other *`excepts`* argument value is undefined. -To use this function, you must turn off floating-point optimizations that could prevent access by using the `#pragma fenv_access(on)` directive prior to the call. For more information, see [fenv_access](../../preprocessor/fenv-access.md). +To use this function, you must turn off floating-point optimizations that could prevent access by using the `#pragma fenv_access(on)` directive prior to the call. For more information, see [`fenv_access`](../../preprocessor/fenv-access.md). ## Requirements @@ -54,10 +54,10 @@ To use this function, you must turn off floating-point optimizations that could |--------------|--------------|------------------| |**fetestexcept**|\|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Alphabetical Function Reference](crt-alphabetical-function-reference.md)
-[feclearexcept](feclearexcept1.md)
-[feraiseexcept](feraiseexcept.md)
+[Alphabetical function reference](crt-alphabetical-function-reference.md)\ +[`feclearexcept`](feclearexcept1.md)\ +[`feraiseexcept`](feraiseexcept.md) diff --git a/docs/c-runtime-library/reference/feupdateenv.md b/docs/c-runtime-library/reference/feupdateenv.md index b111820ee63..5210b8bd720 100644 --- a/docs/c-runtime-library/reference/feupdateenv.md +++ b/docs/c-runtime-library/reference/feupdateenv.md @@ -23,10 +23,10 @@ int feupdateenv( ### Parameters -*`penv`*
-Pointer to a **fenv_t** object that contains a floating-point environment as set by a call to [fegetenv](fegetenv1.md) or [feholdexcept](feholdexcept2.md). You can also specify the default startup floating-point environment by using the FE_DFL_ENV macro. +*`penv`*\ +Pointer to a **fenv_t** object that contains a floating-point environment as set by a call to [`fegetenv`](fegetenv1.md) or [`feholdexcept`](feholdexcept2.md). You can also specify the default startup floating-point environment by using the FE_DFL_ENV macro. -## Return Value +## Return value Returns 0 if all actions completed successfully. Otherwise, it returns a nonzero value. @@ -34,7 +34,7 @@ Returns 0 if all actions completed successfully. Otherwise, it returns a nonzero The **feupdateenv** function performs multiple actions. First, it stores the current raised floating-point exception status flags in automatic storage. Then, it sets the current floating-point environment from the value stored in the **fenv_t** object pointed to by *`penv`*. If *`penv`* isn't **FE_DFL_ENV** or doesn't point to a valid **fenv_t** object, subsequent behavior is undefined. Finally, **feupdateenv** raises the locally stored floating-point exceptions. -To use this function, you must turn off floating-point optimizations that could prevent access by using the `#pragma fenv_access(on)` directive prior to the call. For more information, see [fenv_access](../../preprocessor/fenv-access.md). +To use this function, you must turn off floating-point optimizations that could prevent access by using the `#pragma fenv_access(on)` directive prior to the call. For more information, see [`fenv_access`](../../preprocessor/fenv-access.md). ## Requirements @@ -42,11 +42,11 @@ To use this function, you must turn off floating-point optimizations that could |--------------|--------------|------------------| |**feupdateenv**|\|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[fegetenv](fegetenv1.md)
-[feclearexcept](feclearexcept1.md)
-[feholdexcept](feholdexcept2.md)
-[fesetexceptflag](fesetexceptflag2.md)
+[`fegetenv`](fegetenv1.md)\ +[`feclearexcept`](feclearexcept1.md)\ +[`feholdexcept`](feholdexcept2.md)\ +[`fesetexceptflag`](fesetexceptflag2.md) diff --git a/docs/c-runtime-library/reference/fflush-nolock.md b/docs/c-runtime-library/reference/fflush-nolock.md index b14cb1cd281..09a02893c2a 100644 --- a/docs/c-runtime-library/reference/fflush-nolock.md +++ b/docs/c-runtime-library/reference/fflush-nolock.md @@ -24,12 +24,12 @@ int _fflush_nolock( ### Parameters -*stream*
+*`stream`*\ Pointer to the **FILE** structure. -## Return Value +## Return value -See [fflush](fflush.md). +See [`fflush`](fflush.md). ## Remarks @@ -43,11 +43,11 @@ By default, this function's global state is scoped to the application. To change |--------------|---------------------| |**_fflush_nolock**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Stream I/O](../../c-runtime-library/stream-i-o.md)
-[fclose, _fcloseall](fclose-fcloseall.md)
-[_flushall](flushall.md)
-[setvbuf](setvbuf.md)
+[Stream I/O](../stream-i-o.md)\ +[`fclose`, `_fcloseall`](fclose-fcloseall.md)\ +[`_flushall`](flushall.md)\ +[`setvbuf`](setvbuf.md) diff --git a/docs/c-runtime-library/reference/fflush.md b/docs/c-runtime-library/reference/fflush.md index f7965e8b98d..ba9c646e7a7 100644 --- a/docs/c-runtime-library/reference/fflush.md +++ b/docs/c-runtime-library/reference/fflush.md @@ -26,7 +26,7 @@ int fflush( *`stream`*\ Pointer to **`FILE`** structure. -## Return Value +## Return value **`fflush`** returns 0 if the buffer was successfully flushed. The value 0 is also returned in cases in which the specified stream has no buffer or is open for reading only. A return value of **`EOF`** indicates an error. @@ -41,7 +41,7 @@ If *`stream`* is **`NULL`**, the behavior is the same as a call to **`fflush`** Buffers are normally maintained by the operating system, which determines the optimal time to write the data automatically to disk: when a buffer is full, when a stream is closed, or when a program terminates normally without closing the stream. The commit-to-disk feature of the run-time library lets you ensure that critical data is written directly to disk rather than to the operating-system buffers. Without rewriting an existing program, you can enable this feature by linking the program's object files with `COMMODE.OBJ`. In the resulting executable file, calls to **`_flushall`** write the contents of all buffers to disk. Only **`_flushall`** and **`fflush`** are affected by `COMMODE.OBJ`. -For information about controlling the commit-to-disk feature, see [Stream I/O](../../c-runtime-library/stream-i-o.md), [`fopen`](fopen-wfopen.md), and [`_fdopen`](fdopen-wfdopen.md). +For information about controlling the commit-to-disk feature, see [Stream I/O](../stream-i-o.md), [`fopen`](fopen-wfopen.md), and [`_fdopen`](fdopen-wfdopen.md). This function locks the calling thread and is therefore thread-safe. For a non-locking version, see **`_fflush_nolock`**. @@ -53,7 +53,7 @@ By default, this function's global state is scoped to the application. To change |--------------|---------------------| |**`fflush`**|``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -107,7 +107,7 @@ User selected 5 ## See also -[Stream I/O](../../c-runtime-library/stream-i-o.md)\ +[Stream I/O](../stream-i-o.md)\ [`fclose`, `_fcloseall`](fclose-fcloseall.md)\ [`_flushall`](flushall.md)\ [`setvbuf`](setvbuf.md) diff --git a/docs/c-runtime-library/reference/fgetc-fgetwc.md b/docs/c-runtime-library/reference/fgetc-fgetwc.md index 702aaeda456..d0609ae98ba 100644 --- a/docs/c-runtime-library/reference/fgetc-fgetwc.md +++ b/docs/c-runtime-library/reference/fgetc-fgetwc.md @@ -27,12 +27,12 @@ wint_t fgetwc( ### Parameters -*`stream`*
+*`stream`*\ Pointer to **FILE** structure. -## Return Value +## Return value -**fgetc** returns the character read as an **`int`** or returns **EOF** to indicate an error or end of file. **fgetwc** returns, as a [wint_t](../../c-runtime-library/standard-types.md), the wide character that corresponds to the character read or returns **WEOF** to indicate an error or end of file. For both functions, use **feof** or **ferror** to distinguish between an error and an end-of-file condition. If a read error occurs, the error indicator for the stream is set. If *`stream`* is **NULL**, **fgetc** and **fgetwc** 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 **EOF**. +**fgetc** returns the character read as an **`int`** or returns **EOF** to indicate an error or end of file. **fgetwc** returns, as a [`wint_t`](../standard-types.md), the wide character that corresponds to the character read or returns **WEOF** to indicate an error or end of file. For both functions, use **feof** or **ferror** to distinguish between an error and an end-of-file condition. If a read error occurs, the error indicator for the stream is set. If *`stream`* is **NULL**, **fgetc** and **fgetwc** 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 **EOF**. ## Remarks @@ -44,11 +44,11 @@ Each of these functions reads a single character from the current position of th The versions with the **_nolock** suffix are identical except that they aren't protected from interference by other threads. -For more information about processing wide characters and multibyte characters in text and binary modes, see [Unicode Stream I/O in Text and Binary Modes](../../c-runtime-library/unicode-stream-i-o-in-text-and-binary-modes.md). +For more information about processing wide characters and multibyte characters in text and binary modes, see [Unicode stream I/O in text and binary modes](../unicode-stream-i-o-in-text-and-binary-modes.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| |---------------------|------------------------------------|--------------------|-----------------------| @@ -61,7 +61,7 @@ By default, this function's global state is scoped to the application. To change |**fgetc**|\| |**fgetwc**|\ or \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -116,6 +116,6 @@ Line two. ## See also -[Stream I/O](../../c-runtime-library/stream-i-o.md)
-[fputc, fputwc](fputc-fputwc.md)
-[getc, getwc](getc-getwc.md)
+[Stream I/O](../stream-i-o.md)\ +[`fputc`, `fputwc`](fputc-fputwc.md)\ +[`getc`, `getwc`](getc-getwc.md) diff --git a/docs/c-runtime-library/reference/fgetc-nolock-fgetwc-nolock.md b/docs/c-runtime-library/reference/fgetc-nolock-fgetwc-nolock.md index ead85bc9194..1f851acd5e0 100644 --- a/docs/c-runtime-library/reference/fgetc-nolock-fgetwc-nolock.md +++ b/docs/c-runtime-library/reference/fgetc-nolock-fgetwc-nolock.md @@ -27,12 +27,12 @@ wint_t _fgetwc_nolock( ### Parameters -*stream*
+*`stream`*\ Pointer to the **FILE** structure. -## Return Value +## Return value -See[fgetc, fgetwc](fgetc-fgetwc.md). +See[`fgetc`, `fgetwc`](fgetc-fgetwc.md). ## Remarks @@ -40,7 +40,7 @@ See[fgetc, fgetwc](fgetc-fgetwc.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| |---------------------|--------------------------------------|--------------------|-----------------------| @@ -53,7 +53,7 @@ By default, this function's global state is scoped to the application. To change |**_fgetc_nolock**|\| |**_fgetwc_nolock**|\ or \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -107,6 +107,6 @@ Line two. ## See also -[Stream I/O](../../c-runtime-library/stream-i-o.md)
-[fputc, fputwc](fputc-fputwc.md)
-[getc, getwc](getc-getwc.md)
+[Stream I/O](../stream-i-o.md)\ +[`fputc`, `fputwc`](fputc-fputwc.md)\ +[`getc`, `getwc`](getc-getwc.md) diff --git a/docs/c-runtime-library/reference/fgetchar-fgetwchar.md b/docs/c-runtime-library/reference/fgetchar-fgetwchar.md index 775fc6f3c38..974ba139a4e 100644 --- a/docs/c-runtime-library/reference/fgetchar-fgetwchar.md +++ b/docs/c-runtime-library/reference/fgetchar-fgetwchar.md @@ -21,9 +21,9 @@ int _fgetchar( void ); wint_t _fgetwchar( void ); ``` -## Return Value +## Return value -**\_fgetchar** returns the character read as an **`int`** or returns `EOF` to indicate an error or end of file. **\_fgetwchar** returns, as a [wint_t](../../c-runtime-library/standard-types.md), the wide character that corresponds to the character read or returns `WEOF` to indicate an error or end of file. For both functions, use **feof** or **ferror** to distinguish between an error and an end-of-file condition. +**\_fgetchar** returns the character read as an **`int`** or returns `EOF` to indicate an error or end of file. **\_fgetwchar** returns, as a [`wint_t`](../standard-types.md), the wide character that corresponds to the character read or returns `WEOF` to indicate an error or end of file. For both functions, use **feof** or **ferror** to distinguish between an error and an end-of-file condition. ## Remarks @@ -35,7 +35,7 @@ These functions aren't compatible with the ANSI standard. 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| |---------------------|--------------------------------------|--------------------|-----------------------| @@ -48,7 +48,7 @@ By default, this function's global state is scoped to the application. To change |**_fgetchar**|\| |**_fgetwchar**|\ or \| -The console isn't supported in Universal Windows Platform (UWP) apps. The standard stream handles that are associated with the console—**stdin**, **stdout**, and **stderr**—must be redirected before C run-time functions can use them in UWP apps. For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +The console isn't supported in Universal Windows Platform (UWP) apps. The standard stream handles that are associated with the console—**stdin**, **stdout**, and **stderr**—must be redirected before C run-time functions can use them in UWP apps. For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -90,6 +90,6 @@ Line two. ## See also -[Stream I/O](../../c-runtime-library/stream-i-o.md)
-[fputc, fputwc](fputc-fputwc.md)
-[getc, getwc](getc-getwc.md)
+[Stream I/O](../stream-i-o.md)\ +[`fputc`, `fputwc`](fputc-fputwc.md)\ +[`getc`, `getwc`](getc-getwc.md) diff --git a/docs/c-runtime-library/reference/fgetchar.md b/docs/c-runtime-library/reference/fgetchar.md index b28afc3c0bf..641974015fe 100644 --- a/docs/c-runtime-library/reference/fgetchar.md +++ b/docs/c-runtime-library/reference/fgetchar.md @@ -12,6 +12,6 @@ ms.assetid: 2b27a6f2-d973-4d12-a66d-7e6b01e84470 --- # fgetchar -The Microsoft-specific function name `fgetchar` is a deprecated alias for the [_fgetchar](fgetchar-fgetwchar.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. +The Microsoft-specific function name `fgetchar` is a deprecated alias for the [`_fgetchar`](fgetchar-fgetwchar.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. -We recommend you use [_fgetchar](fgetchar-fgetwchar.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). +We recommend you use [`_fgetchar`](fgetchar-fgetwchar.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). diff --git a/docs/c-runtime-library/reference/fgetpos.md b/docs/c-runtime-library/reference/fgetpos.md index 5b08dd39302..7e4ca12c8a8 100644 --- a/docs/c-runtime-library/reference/fgetpos.md +++ b/docs/c-runtime-library/reference/fgetpos.md @@ -25,19 +25,19 @@ int fgetpos( ### Parameters -*stream*
+*`stream`*\ Target stream. -*pos*
+*`pos`*\ Position-indicator storage. -## Return Value +## Return value -If successful, **fgetpos** returns 0. On failure, it returns a nonzero value and sets **errno** to one of the following manifest constants (defined in STDIO.H): **EBADF**, which means the specified stream isn't a valid file pointer or isn't accessible, or **EINVAL**, which means the *stream* value or the value of *pos* is invalid, such as if either is a null pointer. If *stream* or *pos* is a **NULL** pointer, the function invokes the invalid parameter handler, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). +If successful, **fgetpos** returns 0. On failure, it returns a nonzero value and sets **errno** to one of the following manifest constants (defined in STDIO.H): **EBADF**, which means the specified stream isn't a valid file pointer or isn't accessible, or **EINVAL**, which means the *`stream`* value or the value of *`pos`* is invalid, such as if either is a null pointer. If *`stream`* or *`pos`* is a **NULL** pointer, the function invokes the invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). ## Remarks -The **fgetpos** function gets the current value of the *stream* argument's file-position indicator and stores it in the object pointed to by *pos*. The **fsetpos** function can later use information stored in *pos* to reset the *stream* argument's pointer to its position at the time **fgetpos** was called. The *pos* value is stored in an internal format and is intended for use only by **fgetpos** and **fsetpos**. +The **fgetpos** function gets the current value of the *`stream`* argument's file-position indicator and stores it in the object pointed to by *`pos`*. The **fsetpos** function can later use information stored in *`pos`* to reset the *`stream`* argument's pointer to its position at the time **fgetpos** was called. The *`pos`* value is stored in an internal format and is intended for use only by **fgetpos** and **fsetpos**. 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). @@ -47,7 +47,7 @@ By default, this function's global state is scoped to the application. To change |--------------|---------------------| |**fgetpos**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -106,5 +106,5 @@ after fsetpos: gets a stream ## See also -[Stream I/O](../../c-runtime-library/stream-i-o.md)
-[fsetpos](fsetpos.md)
+[Stream I/O](../stream-i-o.md)\ +[`fsetpos`](fsetpos.md) diff --git a/docs/c-runtime-library/reference/fgets-fgetws.md b/docs/c-runtime-library/reference/fgets-fgetws.md index 35e1f9f6a0e..87daf997102 100644 --- a/docs/c-runtime-library/reference/fgets-fgetws.md +++ b/docs/c-runtime-library/reference/fgets-fgetws.md @@ -31,20 +31,20 @@ wchar_t *fgetws( ### Parameters -*`str`*
+*`str`*\ Storage location for data. -*`numChars`*
+*`numChars`*\ Maximum number of characters to read. -*`stream`*
+*`stream`*\ Pointer to **`FILE`** structure. -## Return Value +## Return value -Each of these functions returns *`str`*. **`NULL`** is returned to indicate an error or an end-of-file condition. Use **`feof`** or **`ferror`** to determine whether an error occurred. If *`str`* or *`stream`* is a null pointer, or *`numChars`* is less than or equal to zero, this function invokes the invalid parameter handler, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, **`errno`** is set to **`EINVAL`** and the function returns **`NULL`**. +Each of these functions returns *`str`*. **`NULL`** is returned to indicate an error or an end-of-file condition. Use **`feof`** or **`ferror`** to determine whether an error occurred. If *`str`* or *`stream`* is a null pointer, or *`numChars`* is less than or equal to zero, this function invokes the invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, **`errno`** is set to **`EINVAL`** and the function returns **`NULL`**. -For more information about return codes, see [`_doserrno`, `errno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). +For more information about return codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks @@ -52,11 +52,11 @@ The **`fgets`** function reads a string from the input *`stream`* argument and s **`fgetws`** is a wide-character version of **`fgets`**. -**`fgetws`** reads the wide-character argument *`str`* as a multibyte-character string or as a wide-character string when *`stream`* is opened in text mode or binary mode, respectively. For more information about using text and binary modes in Unicode and multibyte stream-I/O, see [Text and Binary Mode File I/O](../../c-runtime-library/text-and-binary-mode-file-i-o.md) and [Unicode Stream I/O in Text and Binary Modes](../../c-runtime-library/unicode-stream-i-o-in-text-and-binary-modes.md). +**`fgetws`** reads the wide-character argument *`str`* as a multibyte-character string or as a wide-character string when *`stream`* is opened in text mode or binary mode, respectively. For more information about using text and binary modes in Unicode and multibyte stream-I/O, see [Text and binary mode file I/O](../text-and-binary-mode-file-i-o.md) and [Unicode stream I/O in text and binary modes](../unicode-stream-i-o-in-text-and-binary-modes.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| |---------------------|------------------------------------|--------------------|-----------------------| @@ -69,7 +69,7 @@ By default, this function's global state is scoped to the application. To change |**`fgets`**|``| |**`fgetws`**|`` or ``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -111,7 +111,7 @@ Line one. ## See also -[Stream I/O](../../c-runtime-library/stream-i-o.md)
-[`fputs`, `fputws`](fputs-fputws.md)
-[`gets`, `_getws`](../../c-runtime-library/gets-getws.md)
-[`puts`, `_putws`](puts-putws.md)
+[Stream I/O](../stream-i-o.md)\ +[`fputs`, `fputws`](fputs-fputws.md)\ +[`gets`, `_getws`](../gets-getws.md)\ +[`puts`, `_putws`](puts-putws.md) diff --git a/docs/c-runtime-library/reference/filelength-filelengthi64.md b/docs/c-runtime-library/reference/filelength-filelengthi64.md index f19eae105cf..80bb2f46fef 100644 --- a/docs/c-runtime-library/reference/filelength-filelengthi64.md +++ b/docs/c-runtime-library/reference/filelength-filelengthi64.md @@ -27,12 +27,12 @@ __int64 _filelengthi64( ### Parameters -*`fd`*
+*`fd`*\ Target the file descriptor. -## Return Value +## Return value -Both **_filelength** and **_filelengthi64** return the file length, in bytes, of the target file associated with *`fd`*. If *`fd`* is an invalid file descriptor, this function invokes the invalid parameter handler, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, both functions return -1L to indicate an error and set **errno** to **EBADF**. +Both **_filelength** and **_filelengthi64** return the file length, in bytes, of the target file associated with *`fd`*. If *`fd`* is an invalid file descriptor, this function invokes the invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, both functions return -1L to indicate an error and set **errno** to **EBADF**. ## Remarks @@ -45,16 +45,16 @@ By default, this function's global state is scoped to the application. To change |**_filelength**|\| |**_filelengthi64**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example -See the example for [_chsize](chsize.md). +See the example for [`_chsize`](chsize.md). ## See also -[File Handling](../../c-runtime-library/file-handling.md)
-[_chsize](chsize.md)
-[_fileno](fileno.md)
-[_fstat, _fstat32, _fstat64, _fstati64, _fstat32i64, _fstat64i32](fstat-fstat32-fstat64-fstati64-fstat32i64-fstat64i32.md)
-[_stat, _wstat Functions](stat-functions.md)
+[File handling](../file-handling.md)\ +[`_chsize`](chsize.md)\ +[`_fileno`](fileno.md)\ +[`_fstat`, `_fstat32`, `_fstat64`, `_fstati64`, `_fstat32i64`, `_fstat64i32`](fstat-fstat32-fstat64-fstati64-fstat32i64-fstat64i32.md)\ +[`_stat`, `_wstat` functions](stat-functions.md) diff --git a/docs/c-runtime-library/reference/filelength.md b/docs/c-runtime-library/reference/filelength.md index 0d42b7b3bec..1359df90262 100644 --- a/docs/c-runtime-library/reference/filelength.md +++ b/docs/c-runtime-library/reference/filelength.md @@ -12,6 +12,6 @@ ms.assetid: 5fbc1912-7822-498d-bbf4-8bada87cf9b9 --- # filelength -The Microsoft-specific function name `filelength` is a deprecated alias for the [_filelength](filelength-filelengthi64.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. +The Microsoft-specific function name `filelength` is a deprecated alias for the [`_filelength`](filelength-filelengthi64.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. -We recommend you use [_filelength](filelength-filelengthi64.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). +We recommend you use [`_filelength`](filelength-filelengthi64.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). diff --git a/docs/c-runtime-library/reference/fileno.md b/docs/c-runtime-library/reference/fileno.md index 845cce3370b..49aaf770bb4 100644 --- a/docs/c-runtime-library/reference/fileno.md +++ b/docs/c-runtime-library/reference/fileno.md @@ -26,18 +26,18 @@ int _fileno( *`stream`*\ Pointer to the **`FILE`** structure. -## Return Value +## Return value -**`_fileno`** returns the file descriptor. There's no error return. The result is undefined if *`stream`* doesn't specify an open file. If stream is **`NULL`**, **`_fileno`** invokes the invalid parameter handler, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, this function returns -1 and sets **`errno`** to **`EINVAL`**. +**`_fileno`** returns the file descriptor. There's no error return. The result is undefined if *`stream`* doesn't specify an open file. If stream is **`NULL`**, **`_fileno`** invokes the invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, this function returns -1 and sets **`errno`** to **`EINVAL`**. -For more information about these and other error codes, see [`_doserrno`, `errno`, `_sys_errlist`, and `_sys_nerr`](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +For more information about these and other error codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). > [!NOTE] > If **`stdout`** or **`stderr`** is not associated with an output stream (for example, in a Windows application without a console window), the file descriptor returned is -2. In previous versions, the file descriptor returned was -1. This change allows applications to distinguish this condition from an error. ## Remarks -The **`_fileno`** routine returns the file descriptor currently associated with *`stream`*. This routine is implemented both as a function and as a macro. For information about choosing either implementation, see [Choosing Between Functions and Macros](../../c-runtime-library/recommendations-for-choosing-between-functions-and-macros.md). +The **`_fileno`** routine returns the file descriptor currently associated with *`stream`*. This routine is implemented both as a function and as a macro. For information about choosing either implementation, see [Recommendations for choosing between functions and macros](../recommendations-for-choosing-between-functions-and-macros.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). @@ -47,7 +47,7 @@ By default, this function's global state is scoped to the application. To change |--------------|---------------------| |**`_fileno`**|``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -75,7 +75,7 @@ The file descriptor for stderr is 2 ## See also -[Stream I/O](../../c-runtime-library/stream-i-o.md)\ +[Stream I/O](../stream-i-o.md)\ [`_fdopen`, `_wfdopen`](fdopen-wfdopen.md)\ [`_filelength`, `_filelengthi64`](filelength-filelengthi64.md)\ [`fopen`, `_wfopen`](fopen-wfopen.md)\ diff --git a/docs/c-runtime-library/reference/findclose.md b/docs/c-runtime-library/reference/findclose.md index 8ecea918e3a..10f1993d5a0 100644 --- a/docs/c-runtime-library/reference/findclose.md +++ b/docs/c-runtime-library/reference/findclose.md @@ -24,10 +24,10 @@ int _findclose( ### Parameters -*handle*
+*`handle`*\ The search handle returned by a previous call to **_findfirst**. -## Return Value +## Return value If successful, **_findclose** returns 0. Otherwise, it returns -1 and sets **errno** to **ENOENT**, indicating that no more matching files could be found. @@ -41,9 +41,9 @@ By default, this function's global state is scoped to the application. To change |--------------|---------------------| |**_findclose**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[System Calls](../../c-runtime-library/system-calls.md)
-[Filename Search Functions](../../c-runtime-library/filename-search-functions.md)
+[System calls](../system-calls.md)\ +[Filename search functions](../filename-search-functions.md) diff --git a/docs/c-runtime-library/reference/findfirst-functions.md b/docs/c-runtime-library/reference/findfirst-functions.md index b56c4aaeaa0..37978c876a9 100644 --- a/docs/c-runtime-library/reference/findfirst-functions.md +++ b/docs/c-runtime-library/reference/findfirst-functions.md @@ -69,13 +69,13 @@ intptr_t _wfindfirst64i32( ### Parameters -*`filespec`*
+*`filespec`*\ Target file specification (can include wildcard characters). -*`fileinfo`*
+*`fileinfo`*\ File information buffer. -## Return Value +## Return value If successful, **`_findfirst`** returns a unique search handle identifying the file or group of files that match the *`filespec`* specification, which can be used in a subsequent call to [`_findnext`](findnext-functions.md) or to [`_findclose`](findclose.md). Otherwise, **`_findfirst`** returns -1 and sets **`errno`** to one of the following values. @@ -86,9 +86,9 @@ If successful, **`_findfirst`** returns a unique search handle identifying the f | **`ENOMEM`** | Insufficient memory. | | **`EINVAL`** | Invalid file name specification or the file name given was larger than **`MAX_PATH`**. | -For more information about these 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 these and other return codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). -If an invalid parameter is passed in, these functions invoke the invalid parameter handler, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). +If an invalid parameter is passed in, these functions invoke the invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). ## Remarks @@ -98,7 +98,7 @@ The variations of these functions that have the **`w`** prefix are wide-characte Variations of these functions support 32-bit or 64-bit time types and 32-bit or 64-bit file sizes. The first numeric suffix (**`32`** or **`64`**) indicates the size of the time type; the second suffix is either **`i32`** or **`i64`**, and indicates whether the file size is represented as a 32-bit or 64-bit integer. For information about which versions support 32-bit and 64-bit time types and file sizes, see the following table. The **`i32`** or **`i64`** suffix is omitted if it's the same as the size of the time type, so **`_findfirst64`** also supports 64-bit file lengths and **`_findfirst32`** supports only 32-bit file lengths. -These functions use various forms of the **`_finddata_t`** structure for the *`fileinfo`* parameter. For more information about the structure, see [Filename Search Functions](../../c-runtime-library/filename-search-functions.md). +These functions use various forms of the **`_finddata_t`** structure for the *`fileinfo`* parameter. For more information about the structure, see [Filename search functions](../filename-search-functions.md). The variations that use a 64-bit time type enable file-creation dates to be expressed up through 23:59:59, December 31, 3000, UTC. The ones that use 32-bit time types represent dates only through 23:59:59 January 18, 2038, UTC. Midnight, January 1, 1970, is the lower bound of the date range for all these functions. @@ -119,7 +119,7 @@ By default, this function's global state is scoped to the application. To change |**`_findfirst32i64`**, **`_wfindfirst32i64`**|Not affected by the macro definition|32-bit|64-bit| |**`_findfirst64i32`**, **`_wfindfirst64i32`**|Not affected by the macro definition|64-bit|32-bit| -### Generic-Text Routine Mappings +### Generic-text routine mappings |`Tchar.h` routine|`_UNICODE` and `_MBCS` not defined|`_MBCS` defined|`_UNICODE` defined| |---------------------|--------------------------------------|--------------------|-----------------------| @@ -147,9 +147,9 @@ By default, this function's global state is scoped to the application. To change |**`_wfindfirst32i64`**|`` or ``| |**`_wfindfirst64i32`**|`` or ``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[System Calls](../../c-runtime-library/system-calls.md)
-[Filename Search Functions](../../c-runtime-library/filename-search-functions.md)
+[System calls](../system-calls.md)\ +[Filename search functions](../filename-search-functions.md) diff --git a/docs/c-runtime-library/reference/findnext-functions.md b/docs/c-runtime-library/reference/findnext-functions.md index 5ba40785705..8aedfb72663 100644 --- a/docs/c-runtime-library/reference/findnext-functions.md +++ b/docs/c-runtime-library/reference/findnext-functions.md @@ -12,7 +12,7 @@ ms.assetid: 75d97188-5add-4698-a46c-4c492378f0f8 --- # _findnext, _findnext32, _findnext32i64, _findnext64, _findnext64i32, _findnexti64, _wfindnext, _wfindnext32, _wfindnext32i64, _wfindnext64, _wfindnext64i32, _wfindnexti64 -Find the next name, if any, that matches the *`filespec`* argument in a previous call to [_findfirst](findfirst-functions.md), and then alter the *`fileinfo`* structure contents accordingly. +Find the next name, if any, that matches the *`filespec`* argument in a previous call to [`_findfirst`](findfirst-functions.md), and then alter the *`fileinfo`* structure contents accordingly. ## Syntax @@ -69,13 +69,13 @@ int _wfindnext64i32( ### Parameters -*`handle`*
+*`handle`*\ The search handle returned by a previous call to **_findfirst**. -*`fileinfo`*
+*`fileinfo`*\ File information buffer. -## Return Value +## Return value If successful, returns 0. Otherwise, returns -1 and sets **errno** to a value indicating the nature of the failure. Possible error codes are shown in the following table. @@ -85,11 +85,11 @@ If successful, returns 0. Otherwise, returns -1 and sets **errno** to a value in | **ENOENT** | No more matching files could be found. | | **ENOMEM** | Not enough memory or the file name's length exceeded **MAX_PATH**. | -If an invalid parameter is passed in, these functions invoke the invalid parameter handler, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). +If an invalid parameter is passed in, these functions invoke the invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). ## Remarks -You must call [_findclose](findclose.md) after you're finished using either the **_findfirst** or **_findnext** function (or any variants). `_findclose` frees up resources used by these functions in your application. +You must call [`_findclose`](findclose.md) after you're finished using either the **_findfirst** or **_findnext** function (or any variants). `_findclose` frees up resources used by these functions in your application. The variations of these functions with the **w** prefix are wide-character versions; otherwise, they're identical to the corresponding single-byte functions. @@ -112,7 +112,7 @@ By default, this function's global state is scoped to the application. To change |**_findnext32i64**, **_wfindnext32i64**|Not affected by the macro definition|32-bit|64-bit| |**_findnext64i32**, **_wfindnext64i32**|Not affected by the macro definition|64-bit|32-bit| -### Generic-Text Routine Mappings +### Generic-text routine mappings |Tchar.h routine|_UNICODE and _MBCS not defined|_MBCS defined|_UNICODE defined| |---------------------|--------------------------------------|--------------------|-----------------------| @@ -140,13 +140,13 @@ By default, this function's global state is scoped to the application. To change |**_wfindnext32i64**|\ or \| |**_wfindnext64i32**|\ or \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Libraries -All versions of the [C run-time libraries](../../c-runtime-library/crt-library-features.md). +All versions of the [C run-time libraries](../crt-library-features.md). ## See also -[System Calls](../../c-runtime-library/system-calls.md)
-[Filename Search Functions](../../c-runtime-library/filename-search-functions.md)
+[System calls](../system-calls.md)\ +[Filename search functions](../filename-search-functions.md) diff --git a/docs/c-runtime-library/reference/finite-finitef.md b/docs/c-runtime-library/reference/finite-finitef.md index 54ccf595f11..f649f9fca52 100644 --- a/docs/c-runtime-library/reference/finite-finitef.md +++ b/docs/c-runtime-library/reference/finite-finitef.md @@ -37,12 +37,12 @@ int _finitef( ### Parameters -*x*
+*`x`*\ The floating-point value to test. ## Return value -The `isfinite` macro and the `_finite` and `_finitef` functions return a non-zero value if *x* is either a normal or subnormal finite value. They return 0 if the argument is infinite or a NaN. The C++ inline template function `isfinite` behaves the same way, but returns **`true`** or **`false`**. +The `isfinite` macro and the `_finite` and `_finitef` functions return a non-zero value if *`x`* is either a normal or subnormal finite value. They return 0 if the argument is infinite or a NaN. The C++ inline template function `isfinite` behaves the same way, but returns **`true`** or **`false`**. ## Remarks @@ -55,13 +55,13 @@ The `isfinite` macro and the `_finite` and `_finitef` functions return a non-zer |`_finite`|\ or \|\, \, \, or \| |`isfinite`, `_finitef`|\|\ or \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Floating-Point Support](../../c-runtime-library/floating-point-support.md)
-[fpclassify](fpclassify.md)
-[_fpclass, _fpclassf](fpclass-fpclassf.md)
-[isinf](isinf.md)
-[isnan, _isnan, _isnanf](isnan-isnan-isnanf.md)
-[isnormal](isnormal.md)
+[Math and floating-point support](../floating-point-support.md)\ +[`fpclassify`](fpclassify.md)\ +[`_fpclass`, `_fpclassf`](fpclass-fpclassf.md)\ +[`isinf`](isinf.md)\ +[`isnan`, `_isnan`, `_isnanf`](isnan-isnan-isnanf.md)\ +[`isnormal`](isnormal.md) diff --git a/docs/c-runtime-library/reference/floating-point-ordering.md b/docs/c-runtime-library/reference/floating-point-ordering.md index 8d067db9b28..afef5fa5a04 100644 --- a/docs/c-runtime-library/reference/floating-point-ordering.md +++ b/docs/c-runtime-library/reference/floating-point-ordering.md @@ -83,18 +83,18 @@ inline bool isunordered( ### Parameters -*x*, *y*
+*`x`*, *`y`*\ The floating-point values to compare. -## Return Value +## Return value In all comparisons, infinities of the same sign compare as equal. Negative infinity is less than any finite value or positive infinity. Positive infinity is greater than any finite value or negative infinity. Zeroes are equal regardless of sign. NaNs aren't less than, equal to, or greater than any value, including another NaN. -When neither argument is a NaN, the ordering macros **isgreater**, **isgreaterequal**, **isless**, and **islessequal** return a non-zero value if the specified ordering relation between *x* and *y* holds true. These macros return 0 if either or both arguments are NaNs or if the ordering relationship is false. The function forms behave the same way, but return **`true`** or **`false`**. +When neither argument is a NaN, the ordering macros **isgreater**, **isgreaterequal**, **isless**, and **islessequal** return a non-zero value if the specified ordering relation between *`x`* and *`y`* holds true. These macros return 0 if either or both arguments are NaNs or if the ordering relationship is false. The function forms behave the same way, but return **`true`** or **`false`**. -The **islessgreater** macro returns a non-zero value if both *x* and *y* aren't NaNs, and *x* is either less than or greater than *y*. It returns 0 if either or both arguments are NaNs, or if the values are equal. The function form behaves the same way, but returns **`true`** or **`false`**. +The **islessgreater** macro returns a non-zero value if both *`x`* and *`y`* aren't NaNs, and *`x`* is either less than or greater than *`y`*. It returns 0 if either or both arguments are NaNs, or if the values are equal. The function form behaves the same way, but returns **`true`** or **`false`**. -The **isunordered** macro returns a non-zero value if either *x*, *y*, or both are NaNs. Otherwise, it returns 0. The function form behaves the same way, but returns **`true`** or **`false`**. +The **isunordered** macro returns a non-zero value if either *`x`*, *`y`*, or both are NaNs. Otherwise, it returns 0. The function form behaves the same way, but returns **`true`** or **`false`**. ## Remarks @@ -106,12 +106,12 @@ These comparison operations are implemented as macros when compiled as C, and as |--------------|---------------------------|-------------------------------| | **isgreater**, **isgreaterequal**, **isless**,
**islessequal**, **islessgreater**, **isunordered** | \ | \ or \ | -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Floating-Point Support](../../c-runtime-library/floating-point-support.md)
-[isfinite, _finite, _finitef](finite-finitef.md)
-[isinf](isinf.md)
-[isnan, _isnan, _isnanf](isnan-isnan-isnanf.md)
-[_fpclass, _fpclassf](fpclass-fpclassf.md)
+[Math and floating-point support](../floating-point-support.md)\ +[`isfinite`, `_finite`, `_finitef`](finite-finitef.md)\ +[`isinf`](isinf.md)\ +[`isnan`, `_isnan`, `_isnanf`](isnan-isnan-isnanf.md)\ +[`_fpclass`, `_fpclassf`](fpclass-fpclassf.md) diff --git a/docs/c-runtime-library/reference/floating-point-primitives.md b/docs/c-runtime-library/reference/floating-point-primitives.md index 4eb226c3698..d150f2c813e 100644 --- a/docs/c-runtime-library/reference/floating-point-primitives.md +++ b/docs/c-runtime-library/reference/floating-point-primitives.md @@ -15,7 +15,7 @@ Microsoft-specific primitive functions that are used to implement some standard 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). -## _dclass, _ldclass, _fdclass +## `_dclass`, `_ldclass`, `_fdclass` ### Syntax @@ -27,12 +27,12 @@ short __cdecl _fdclass(float x); ### Parameters -*x*
+*`x`*\ Floating-point function argument. ### Remarks -These floating-point primitives implement the C versions of the CRT macro [fpclassify](fpclassify.md) for floating-point types. The classification of the argument *x* is returned as one of these constants, defined in math.h: +These floating-point primitives implement the C versions of the CRT macro [`fpclassify`](fpclassify.md) for floating-point types. The classification of the argument *`x`* is returned as one of these constants, defined in math.h: |Value|Description| |-----------|-----------------| @@ -42,9 +42,9 @@ These floating-point primitives implement the C versions of the CRT macro [fpcla | **FP_SUBNORMAL** | A positive or negative subnormal (denormalized) value | | **FP_ZERO** | A positive or negative zero value | -For additional detail, you can use the Microsoft-specific [_fpclass, _fpclassf](fpclass-fpclassf.md) functions. Use the [fpclassify](fpclassify.md) macro or function for portability. +For more detail, you can use the Microsoft-specific [`_fpclass`, `_fpclassf`](fpclass-fpclassf.md) functions. Use the [`fpclassify`](fpclassify.md) macro or function for portability. -## _dsign, _ldsign, _fdsign +## `_dsign`, `_ldsign`, `_fdsign` ### Syntax @@ -56,12 +56,12 @@ int __cdecl _fdsign(float x); ### Parameters -*x*
+*`x`*\ Floating-point function argument. ### Remarks -These floating-point primitives implement the [signbit](signbit.md) macro or function in the CRT. They return a non-zero value if the sign bit is set in the significand (mantissa) of the argument *x*, and 0 if the sign bit is not set. +These floating-point primitives implement the [`signbit`](signbit.md) macro or function in the CRT. They return a non-zero value if the sign bit is set in the significand (mantissa) of the argument *`x`*. Otherwise, they return 0 if the sign bit isn't set. ## _dpcomp, _ldpcomp, _fdpcomp @@ -75,20 +75,20 @@ int __cdecl _fdpcomp(float x, float y); ### Parameters -*x*, *y*
+*`x`*, *`y`*\ Floating-point function arguments. ### Remarks -These floating-point primitives take two arguments, *x* and *y*, and return a value that shows their ordering relationship, expressed as the bitwise or of these constants, defined in math.h: +These floating-point primitives take two arguments, *`x`* and *`y`*, and return a value that shows their ordering relationship, expressed as the bitwise or of these constants, defined in math.h: | Value | Description | |------------|-----------------| -| **_FP_LT** | *x* can be considered less than *y* | -| **_FP_EQ** | *x* can be considered equal to *y* | -| **_FP_GT** | *x* can be considered greater than *y* | +| **_FP_LT** | *`x`* can be considered less than *`y`* | +| **_FP_EQ** | *`x`* can be considered equal to *`y`* | +| **_FP_GT** | *`x`* can be considered greater than *`y`* | -These primitives implement the [isgreater, isgreaterequal, isless, islessequal, islessgreater, and isunordered](floating-point-ordering.md) macros and functions in the CRT. +These primitives implement the [`isgreater`, `isgreaterequal`, `isless`, `islessequal`, `islessgreater`, and `isunordered`](floating-point-ordering.md) macros and functions in the CRT. ## _dtest, _ldtest, _fdtest @@ -102,12 +102,12 @@ short __cdecl _fdtest(float* px); ### Parameters -*px*
+*`px`*\ Pointer to a floating-point argument. ### Remarks -These floating-point primitives implement the C++ versions of the CRT function [fpclassify](fpclassify.md) for floating-point types. The argument *x* is evaluated and the classification is returned as one of these constants, defined in math.h: +These floating-point primitives implement the C++ versions of the CRT function [`fpclassify`](fpclassify.md) for floating-point types. The argument *`x`* is evaluated and the classification is returned as one of these constants, defined in math.h: |Value|Description| |-----------|-----------------| @@ -117,7 +117,7 @@ These floating-point primitives implement the C++ versions of the CRT function [ | **FP_SUBNORMAL** | A positive or negative subnormal (denormalized) value | | **FP_ZERO** | A positive or negative zero value | -For additional detail, you can use the Microsoft-specific [_fpclass, _fpclassf](fpclass-fpclassf.md) functions. Use the [fpclassify](fpclassify.md) function for portability. +For more detail, you can use the Microsoft-specific [`_fpclass`, `_fpclassf`](fpclass-fpclassf.md) functions. Use the [`fpclassify`](fpclassify.md) function for portability. ## _d_int, _ld_int, _fd_int @@ -131,15 +131,15 @@ short __cdecl _fd_int(float* px, short exp); ### Parameters -*px*
+*`px`*\ Pointer to a floating-point argument. -*exp*
+*`exp`*\ An exponent as an integral type. ### Remarks -These floating-point primitives take a pointer to a floating-point value *px* and an exponent value *exp*, and remove the fractional part of the floating-point value below the given exponent, if possible. The value returned is the result of **fpclassify** on the input value in *px* if it's a NaN or infinity, and on the output value in *px* otherwise. +These floating-point primitives take a pointer to a floating-point value *`px`* and an exponent value *`exp`*, and remove the fractional part of the floating-point value below the given exponent, if possible. The value returned is the result of **fpclassify** on the input value in *`px`* if it's a NaN or infinity, and on the output value in *`px`* otherwise. ## _dscale, _ldscale, _fdscale @@ -153,15 +153,15 @@ short __cdecl _fdscale(float* px, long exp); ### Parameters -*px*
+*`px`*\ Pointer to a floating-point argument. -*exp*
+*`exp`*\ An exponent as an integral type. ### Remarks -These floating-point primitives take a pointer to a floating-point value *px* and an exponent value *exp*, and scale the value in *px* by 2*exp*, if possible. The value returned is the result of **fpclassify** on the input value in *px* if it's a NaN or infinity, and on the output value in *px* otherwise. For portability, prefer the [ldexp, ldexpf, and ldexpl](ldexp.md) functions. +These floating-point primitives take a pointer to a floating-point value *`px`* and an exponent value *`exp`*, and scale the value in *`px`* by 2*`exp`*, if possible. The value returned is the result of **fpclassify** on the input value in *`px`* if it's a NaN or infinity, and on the output value in *`px`* otherwise. For portability, prefer the [`ldexp`, `ldexpf`, `ldexpl`](ldexp.md) functions. ## _dunscale, _ldunscale, _fdunscale @@ -175,15 +175,15 @@ short __cdecl _fdunscale(short* pexp, float* px); ### Parameters -*pexp*
+*`pexp`*\ A pointer to an exponent as an integral type. -*px*
+*`px`*\ Pointer to a floating-point argument. ### Remarks -These floating-point primitives break down the floating-point value pointed at by *px* into a significand (mantissa) and an exponent, if possible. The significand is scaled such that the absolute value is greater than or equal to 0.5 and less than 1.0. The exponent is the value *n*, where the original floating-point value is equal to the scaled significand times 2*n*. This integer exponent *n* is stored at the location pointed to by *pexp*. The value returned is the result of **fpclassify** on the input value in *px* if it's a NaN or infinity, and on the output value otherwise. For portability, prefer the [frexp, frexpf, frexpl](frexp.md) functions. +These floating-point primitives break down the floating-point value pointed at by *`px`* into a significand (mantissa) and an exponent, if possible. The significand is scaled such that the absolute value is greater than or equal to 0.5 and less than 1.0. The exponent is the value *`n`*, where the original floating-point value is equal to the scaled significand times 2n. This integer exponent *`n`* is stored at the location pointed to by *`pexp`*. The value returned is the result of **fpclassify** on the input value in *`px`* if it's a NaN or infinity, and on the output value otherwise. For portability, prefer the [`frexp`, `frexpf`, `frexpl`](frexp.md) functions. ## _dexp, _ldexp, _fdexp @@ -197,18 +197,18 @@ short __cdecl _fdexp(float* px, float y, long exp); ### Parameters -*y*
+*`y`*\ Floating-point function argument. -*px*
+*`px`*\ Pointer to a floating-point argument. -*exp*
+*`exp`*\ An exponent as an integral type. ### Remarks -These floating-point primitives construct a floating-point value in the location pointed at by *px* equal to *y* * 2*exp*. The value returned is the result of **fpclassify** on the input value in *y* if it's a NaN or infinity, and on the output value in *px* otherwise. For portability, prefer the [ldexp, ldexpf, and ldexpl](ldexp.md) functions. +These floating-point primitives construct a floating-point value in the location pointed at by *`px`* equal to *`y`* * 2exp. The value returned is the result of **fpclassify** on the input value in *`y`* if it's a NaN or infinity, and on the output value in *`px`* otherwise. For portability, prefer the [`ldexp`, `ldexpf`, `ldexpl`](ldexp.md) functions. ## _dnorm, _fdnorm @@ -221,12 +221,12 @@ short __cdecl _fdnorm(unsigned short* ps); ### Parameters -*ps*
+*`ps`*\ Pointer to the bitwise representation of a floating-point value expressed as an array of **`unsigned short`**. ### Remarks -These floating-point primitives normalize the fractional part of an underflowed floating-point value and adjust the *characteristic*, or biased exponent, to match. The value is passed as the bitwise representation of the floating-point type converted to an array of **`unsigned short`** through the `_double_val`, `_ldouble_val`, or `_float_val` type punning union declared in math.h. The return value is the result of **fpclassify** on the input floating-point value if it's a NaN or infinity, and on the output value otherwise. +These floating-point primitives normalize the fractional part of an underflowed floating-point value and adjust the *characteristic*, or biased exponent, to match. The value is passed as the bitwise representation of the floating-point type converted to an array of **`unsigned short`** through the `_double_val`, `_ldouble_val`, or `_float_val` type-punning union declared in math.h. The return value is the result of **fpclassify** on the input floating-point value if it's a NaN or infinity, and on the output value otherwise. ## _dpoly, _ldpoly, _fdpoly @@ -240,18 +240,18 @@ float __cdecl _fdpoly(float x, _float const* table, int n); ### Parameters -*x*
+*`x`*\ Floating-point function argument. -*table*
+*`table`*\ Pointer to a table of constant coefficients for a polynomial. -*n*
+*`n`*\ Order of the polynomial to evaluate. ### Remarks -These floating-point primitives return the evaluation of *x* in the polynomial of order *n* whose coefficients are represented by the corresponding constant values in *table*. For example, if *table*\[0] = 3.0, *table*\[1] = 4.0, *table*\[2] = 5.0, and *n* = 2, it represents the polynomial 5.0x2 + 4.0x + 3.0. If this polynomial is evaluated for *x* of 2.0, the result is 31.0. These functions aren't used internally. +These floating-point primitives return the evaluation of *`x`* in the polynomial of order *`n`* whose coefficients are represented by the corresponding constant values in *`table`*. For example, if *`table[0]`* = 3.0, *`table[1]`* = 4.0, *`table[2]`* = 5.0, and *`n`* = 2, it represents the polynomial 5.0x2 + 4.0x + 3.0. If this polynomial is evaluated for *`x`* of 2.0, the result is 31.0. These functions aren't used internally. ## _dlog, _dlog, _dlog @@ -265,15 +265,15 @@ float __cdecl _fdlog(float x, int base_flag); ### Parameters -*x*
+*`x`*\ Floating-point function argument. -*base_flag*
+*`base_flag`*\ Flag that controls the base to use, 0 for base *e* and non-zero for base 10. ### Remarks -These floating-point primitives return the natural log of *x*, ln(*x*) or log*e*(*x*), when *base_flag* is 0. They return the log base 10 of *x*, or log10(*x*), when *base_flag* is non-zero. These functions aren't used internally. For portability, prefer the functions [log, logf, logl, log10, log10f, and log10l](log-logf-log10-log10f.md). +These floating-point primitives return the natural log of *`x`* (ln(x) or log*e*(x)), when *`base_flag`* is 0. They return the log base 10 of *`x`*, or log10(x), when *`base_flag`* is non-zero. These functions aren't used internally. For portability, prefer the functions [`log`, `logf`, `logl`, `log10`, `log10f`, and `log10l`](log-logf-log10-log10f.md). ## _dsin, _ldsin, _fdsin @@ -287,33 +287,33 @@ float __cdecl _fdsin(float x, unsigned int quadrant); ### Parameters -*x*
+*`x`*\ Floating-point function argument. -*quadrant*
+*`quadrant`*\ Quadrant offset of 0, 1, 2, or 3 to use to produce `sin`, `cos`, `-sin`, and `-cos` results. ### Remarks -These floating-point primitives return the sine of *x* offset by the *quadrant* modulo 4. Effectively, they return the sine, cosine, -sine, and -cosine of *x* when *quadrant* modulo 4 is 0, 1, 2, or 3, respectively. These functions aren't used internally. For portability, prefer the [sin, sinf, sinl](sin-sinf-sinl.md), [cos, cosf, and cosl](cos-cosf-cosl.md) functions. +These floating-point primitives return the sine of *`x`* offset by the *`quadrant`* modulo 4. Effectively, they return the sine, cosine, -sine, and -cosine of *`x`* when *`quadrant`* modulo 4 is 0, 1, 2, or 3, respectively. These functions aren't used internally. For portability, prefer the [`sin`, `sinf`, `sinl`](sin-sinf-sinl.md), [`cos`, `cosf`, `cosl`](cos-cosf-cosl.md) functions. ## Requirements Header: \ -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Floating-point support](../floating-point-support.md)
-[fpclassify](fpclassify.md)
-[_fpclass, _fpclassf](fpclass-fpclassf.md)
-[isfinite, _finite, _finitef](finite-finitef.md)
-[isinf](isinf.md)
-[isnan, _isnan, _isnanf](isnan-isnan-isnanf.md)
-[isnormal](isnormal.md)
-[cos, cosf, cosl](cos-cosf-cosl.md)
-[frexp, frexpf, frexpl](frexp.md)
-[ldexp, ldexpf, and ldexpl](ldexp.md)
-[log, logf, logl, log10, log10f, log10l](log-logf-log10-log10f.md)
-[sin, sinf, sinl](sin-sinf-sinl.md)
+[Math and floating-point support](../floating-point-support.md)\ +[`fpclassify`](fpclassify.md)\ +[`_fpclass`, `_fpclassf`](fpclass-fpclassf.md)\ +[`isfinite`, `_finite`, `_finitef`](finite-finitef.md)\ +[`isinf`](isinf.md)\ +[`isnan`, `_isnan`, `_isnanf`](isnan-isnan-isnanf.md)\ +[`isnormal`](isnormal.md)\ +[`cos`, `cosf`, `cosl`](cos-cosf-cosl.md)\ +[`frexp`, `frexpf`, `frexpl`](frexp.md)\ +[`ldexp`, `ldexpf`, `ldexpl`](ldexp.md)\ +[`log`, `logf`, `logl`, `log10`, `log10f`, `log10l`](log-logf-log10-log10f.md)\ +[`sin`, `sinf`, `sinl`](sin-sinf-sinl.md) diff --git a/docs/c-runtime-library/reference/floor-floorf-floorl.md b/docs/c-runtime-library/reference/floor-floorf-floorl.md index 447e3cd4db4..4166f7c5686 100644 --- a/docs/c-runtime-library/reference/floor-floorf-floorl.md +++ b/docs/c-runtime-library/reference/floor-floorf-floorl.md @@ -37,24 +37,24 @@ long double floorl( ### Parameters -*x*\ +*`x`*\ Floating-point value. -## Return Value +## Return value -The **floor** functions return a floating-point value that represents the largest integer that is less than or equal to *x*. There's no error return. +The **floor** functions return a floating-point value that represents the largest integer that is less than or equal to *`x`*. There's no error return. -|Input|SEH Exception|Matherr Exception| +|Input|SEH Exception|`Matherr` Exception| |-----------|-------------------|-----------------------| -|± QNAN,IND|none|_DOMAIN| +|± QNAN, IND|none|_DOMAIN| -**floor** has an implementation that uses Streaming SIMD Extensions 2 (SSE2). For information and restrictions about using the SSE2 implementation, see [_set_SSE2_enable](set-sse2-enable.md). +**floor** has an implementation that uses Streaming SIMD Extensions 2 (SSE2). For information and restrictions about using the SSE2 implementation, see [`_set_SSE2_enable`](set-sse2-enable.md). ## Remarks C++ allows overloading, so you can call overloads of **floor** that take and return **`float`** and **`long double`** values. In a C program, unless you're using the \ macro to call this function, **floor** always takes and returns a **`double`**. -If you use the \ `floor()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../../c-runtime-library/tgmath.md) for details. +If you use the \ `floor()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../tgmath.md) for details. 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). @@ -65,7 +65,7 @@ By default, this function's global state is scoped to the application. To change |**floor**, **floorf**, **floorl**|\| |**floor** macro | \ | -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -104,7 +104,7 @@ The ceil of -2.8 is -2.000000 ## See also -[Floating-Point Support](../../c-runtime-library/floating-point-support.md)
-[ceil, ceilf, ceill](ceil-ceilf-ceill.md)
-[round, roundf, roundl](round-roundf-roundl.md)
-[fmod, fmodf](fmod-fmodf.md)
+[Math and floating-point support](../floating-point-support.md)\ +[`ceil`, `ceilf`, `ceill`](ceil-ceilf-ceill.md)\ +[`round`, `roundf`, `roundl`](round-roundf-roundl.md)\ +[`fmod`, `fmodf`](fmod-fmodf.md) diff --git a/docs/c-runtime-library/reference/flushall.md b/docs/c-runtime-library/reference/flushall.md index c1aabd1793b..0247208a04b 100644 --- a/docs/c-runtime-library/reference/flushall.md +++ b/docs/c-runtime-library/reference/flushall.md @@ -20,7 +20,7 @@ Flushes all streams; clears all buffers. int _flushall( void ); ``` -## Return Value +## Return value **_flushall** returns the number of open streams (input and output). There's no error return. @@ -30,9 +30,9 @@ By default, the **_flushall** function writes to appropriate files the contents If a read follows a call to **_flushall**, new data is read from the input files into the buffers. All streams remain open after the call to **_flushall**. -The commit-to-disk feature of the run-time library lets you ensure that critical data is written directly to disk rather than to the operating system buffers. Without rewriting an existing program, you can enable this feature by linking the program's object files with Commode.obj. In the resulting executable file, calls to **_flushall** write the contents of all buffers to disk. Only **_flushall** and [fflush](fflush.md) are affected by Commode.obj. +The commit-to-disk feature of the run-time library lets you ensure that critical data is written directly to disk rather than to the operating system buffers. Without rewriting an existing program, you can enable this feature by linking the program's object files with Commode.obj. In the resulting executable file, calls to **_flushall** write the contents of all buffers to disk. Only **_flushall** and [`fflush`](fflush.md) are affected by Commode.obj. -For information about controlling the commit-to-disk feature, see [Stream I/O](../../c-runtime-library/stream-i-o.md), [fopen](fopen-wfopen.md), and [_fdopen](fdopen-wfdopen.md). +For information about controlling the commit-to-disk feature, see [Stream I/O](../stream-i-o.md), [`fopen`](fopen-wfopen.md), and [`_fdopen`](fdopen-wfdopen.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). @@ -42,7 +42,7 @@ By default, this function's global state is scoped to the application. To change |--------------|---------------------| |**_flushall**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -68,8 +68,8 @@ There were 3 streams flushed ## See also -[Stream I/O](../../c-runtime-library/stream-i-o.md)
-[_commit](commit.md)
-[fclose, _fcloseall](fclose-fcloseall.md)
-[fflush](fflush.md)
-[setvbuf](setvbuf.md)
+[Stream I/O](../stream-i-o.md)\ +[`_commit`](commit.md)\ +[`fclose`, `_fcloseall`](fclose-fcloseall.md)\ +[`fflush`](fflush.md)\ +[`setvbuf`](setvbuf.md) diff --git a/docs/c-runtime-library/reference/fma-fmaf-fmal.md b/docs/c-runtime-library/reference/fma-fmaf-fmal.md index 275746b2145..6b52ebd37fc 100644 --- a/docs/c-runtime-library/reference/fma-fmaf-fmal.md +++ b/docs/c-runtime-library/reference/fma-fmaf-fmal.md @@ -52,16 +52,16 @@ long double fmal( ### Parameters -*x*\ +*`x`*\ The first value to multiply. -*y*\ +*`y`*\ The second value to multiply. -*z*\ +*`z`*\ The value to add. -## Return Value +## Return value Returns `(x * y) + z`. The return value is then rounded using the current rounding format. @@ -69,20 +69,20 @@ Otherwise, may return one of the following values: |Issue|Return| |-----------|------------| -|*x* = INFINITY, *y* = 0 or

*x* = 0, *y* = INFINITY|NaN| -|*x* or *y* = exact ± INFINITY, *z* = INFINITY with the opposite sign|NaN| -|*x* or *y* = NaN|NaN| -|not (*x* = 0, *y*= indefinite) and *z* = NaN

not (*x*=indefinite, *y*=0) and *z* = NaN|NaN| +|*`x`* = INFINITY, *`y`* = 0 or

*`x`* = 0, *`y`* = INFINITY|NaN| +|*`x`* or *`y`* = exact ± INFINITY, *`z`* = INFINITY with the opposite sign|NaN| +|*`x`* or *`y`* = NaN|NaN| +|not (*`x`* = 0, *`y`*= indefinite) and *`z`* = NaN

not (*`x`*=indefinite, *`y`*=0) and *`z`* = NaN|NaN| |Overflow range error|±HUGE_VAL, ±HUGE_VALF, or ±HUGE_VALL| |Underflow range error|correct value, after rounding.| -Errors are reported as specified in [_matherr](matherr.md). +Errors are reported as specified in [`_matherr`](matherr.md). ## Remarks Because C++ allows overloading, you can call overloads of **fma** that take and return **`float`** and **`long double`** types. In a C program, unless you're using the \ macro to call this function, **fma** always takes and returns a **`double`**. -If you use the \ `fma()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../../c-runtime-library/tgmath.md) for details. +If you use the \ `fma()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../tgmath.md) for details. This function computes the value as though it were taken to infinite precision, and then rounds the final result. @@ -95,10 +95,10 @@ By default, this function's global state is scoped to the application. To change |**fma**, **fmaf**, **fmal**|\|\| |**fma** macro | \ || -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Alphabetical Function Reference](crt-alphabetical-function-reference.md)
-[remainder, remainderf, remainderl](remainder-remainderf-remainderl.md)
-[remquo, remquof, remquol](remquo-remquof-remquol.md)
+[Alphabetical function reference](crt-alphabetical-function-reference.md)\ +[`remainder`, `remainderf`, `remainderl`](remainder-remainderf-remainderl.md)\ +[`remquo`, `remquof`, `remquol`](remquo-remquof-remquol.md) diff --git a/docs/c-runtime-library/reference/fmax-fmaxf-fmaxl.md b/docs/c-runtime-library/reference/fmax-fmaxf-fmaxl.md index 0cfb592b3f9..bd53abd5a6f 100644 --- a/docs/c-runtime-library/reference/fmax-fmaxf-fmaxl.md +++ b/docs/c-runtime-library/reference/fmax-fmaxf-fmaxl.md @@ -47,31 +47,31 @@ long double fmaxl( ### Parameters -*x*\ +*`x`*\ The first value to compare. -*y*\ +*`y`*\ The second value to compare. -## Return Value +## Return value -If successful, returns the larger of *x* or *y*. The value returned is exact, and does not depend on any form of rounding. +If successful, returns the larger of *`x`* or *`y`*. The value returned is exact, and does not depend on any form of rounding. Otherwise, may return one of the following values: |Issue|Return| |-----------|------------| -|*x* = NaN|*y*| -|*y* = NaN|*x*| -|*x* and *y* = NaN|NaN| +|*`x`* = NaN|*`y`*| +|*`y`* = NaN|*`x`*| +|*`x`* and *`y`* = NaN|NaN| -This function does not use the errors specified in [_matherr](matherr.md). +This function does not use the errors specified in [`_matherr`](matherr.md). ## Remarks Because C++ allows overloading, you can call overloads of fmax that take and return `float` and `long double` types. In a C program, unless you're using the \ macro to call this function, `fmax` always takes and returns a double. -If you use the \ `fmax()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../../c-runtime-library/tgmath.md) for details. +If you use the \ `fmax()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../tgmath.md) for details. ## Requirements @@ -80,9 +80,9 @@ If you use the \ `fmax()` macro, the type of the argument determines w |**fmax**, **fmaxf**, **fmaxl**|\|\ or \| |**fmax** macro | \ || -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Alphabetical Function Reference](crt-alphabetical-function-reference.md)
-[fmin, fminf, fminl](fmin-fminf-fminl.md)
+[Alphabetical function reference](crt-alphabetical-function-reference.md)\ +[`fmin`, `fminf`, `fminl`](fmin-fminf-fminl.md) diff --git a/docs/c-runtime-library/reference/fmin-fminf-fminl.md b/docs/c-runtime-library/reference/fmin-fminf-fminl.md index 04bb8cfba36..68ba44326d3 100644 --- a/docs/c-runtime-library/reference/fmin-fminf-fminl.md +++ b/docs/c-runtime-library/reference/fmin-fminf-fminl.md @@ -47,29 +47,29 @@ long double fminl( ### Parameters -*x*\ +*`x`*\ The first value to compare. -*y*\ +*`y`*\ The second value to compare. -## Return Value +## Return value -If successful, returns the smaller of *x* or *y*. +If successful, returns the smaller of *`x`* or *`y`*. |Input|Result| |-----------|------------| -|*x* is NaN|*y*| -|*y* is NaN|*x*| -|*x* and *y* are NaN|NaN| +|*`x`* is NaN|*`y`*| +|*`y`* is NaN|*`x`*| +|*`x`* and *`y`* are NaN|NaN| -The function does not cause [_matherr](matherr.md) to be invoked, cause any floating-point exceptions, or change the value of **errno**. +The function does not cause [`_matherr`](matherr.md) to be invoked, cause any floating-point exceptions, or change the value of **errno**. ## Remarks Because C++ allows overloading, you can call overloads of **fmin** that take and return **`float`** and **`long double`** types. In a C program, unless you're using the \ macro to call this function, **fmin** always takes and returns a **`double`**. -If you use the \ `fmin()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../../c-runtime-library/tgmath.md) for details. +If you use the \ `fmin()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../tgmath.md) for details. ## Requirements @@ -78,9 +78,9 @@ If you use the \ `fmin()` macro, the type of the argument determines w |**fmin**, **fminf**, **fminl**|C: \
C++: \ or \| |**fmin** macro | \ | -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Alphabetical Function Reference](crt-alphabetical-function-reference.md)
-[fmax, fmaxf, fmaxl](fmax-fmaxf-fmaxl.md)
+[Alphabetical function reference](crt-alphabetical-function-reference.md)\ +[`fmax`, `fmaxf`, `fmaxl`](fmax-fmaxf-fmaxl.md) diff --git a/docs/c-runtime-library/reference/fmod-fmodf.md b/docs/c-runtime-library/reference/fmod-fmodf.md index 34243d94b4c..6f35731483e 100644 --- a/docs/c-runtime-library/reference/fmod-fmodf.md +++ b/docs/c-runtime-library/reference/fmod-fmodf.md @@ -45,7 +45,7 @@ long double fmodl( *`x`*, *`y`*\ Floating-point values. -## Return Value +## Return value **`fmod`** returns the floating-point remainder of `x / y`. If the value of *`y`* is 0.0, **`fmod`** returns a quiet `NaN`. For information about representation of a quiet `NaN` by the **`printf`** family, see [`printf`](printf-printf-l-wprintf-wprintf-l.md). @@ -55,7 +55,7 @@ The **`fmod`** function calculates the floating-point remainder *`f`* of `x / y` C++ allows overloading, so you can call overloads of **`fmod`** that take and return **`float`** and **`long double`** values. In a C program, unless you're using the `` macro to call this function, **`fmod`** always takes two **`double`** arguments and returns a **`double`**. -If you use the `` `fmod()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../../c-runtime-library/tgmath.md) for details. +If you use the `` `fmod()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../tgmath.md) for details. 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). @@ -66,7 +66,7 @@ By default, this function's global state is scoped to the application. To change |**`fmod`**, **`fmodf`**, **`fmodl`**|``| |**`fmod`** macro | `` | -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -92,8 +92,8 @@ The remainder of -10.00 / 3.00 is -1.000000 ## See also -[Floating-Point Support](../../c-runtime-library/floating-point-support.md)\ +[Math and floating-point support](../floating-point-support.md)\ [`ceil, ceilf, ceill`](ceil-ceilf-ceill.md)\ [`fabs, fabsf, fabsl`](fabs-fabsf-fabsl.md)\ [`floor, floorf, floorl`](floor-floorf-floorl.md)\ -[`_CIfmod`](../../c-runtime-library/cifmod.md) +[`_CIfmod`](../cifmod.md) diff --git a/docs/c-runtime-library/reference/fopen-s-wfopen-s.md b/docs/c-runtime-library/reference/fopen-s-wfopen-s.md index 584495856fc..c2053360f79 100644 --- a/docs/c-runtime-library/reference/fopen-s-wfopen-s.md +++ b/docs/c-runtime-library/reference/fopen-s-wfopen-s.md @@ -11,7 +11,7 @@ helpviewer_keywords: ["_wfopen_s function", "opening files, for file I/O", "_tfo --- # `fopen_s`, `_wfopen_s` -Opens a file. These versions of [`fopen`, `_wfopen`](fopen-wfopen.md) have security enhancements, as described in [Security Features in the CRT](../../c-runtime-library/security-features-in-the-crt.md). +Opens a file. These versions of [`fopen`, `_wfopen`](fopen-wfopen.md) have security enhancements, as described in [Security features in the CRT](../security-features-in-the-crt.md). ## Syntax @@ -41,7 +41,7 @@ Type of access permitted. ## Return value -Zero if successful; an error code on failure. For more information about these error codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +Zero if successful; an error code on failure. For more information about these error codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ### Error conditions @@ -55,13 +55,13 @@ Zero if successful; an error code on failure. For more information about these e The **`fopen_s`** and **`_wfopen_s`** functions can't open a file for sharing. If you need to share the file, use [`_fsopen` or `_wfsopen`](fsopen-wfsopen.md) with the appropriate sharing mode constant—for example, use **`_SH_DENYNO`** for read/write sharing. -The **`fopen_s`** function opens the file that's specified by *filename*. **`_wfopen_s`** is a wide-character version of **`fopen_s`**; the arguments to **`_wfopen_s`** are wide-character strings. **`_wfopen_s`** and **`fopen_s`** behave identically otherwise. +The **`fopen_s`** function opens the file that's specified by *`filename`*. **`_wfopen_s`** is a wide-character version of **`fopen_s`**; the arguments to **`_wfopen_s`** are wide-character strings. **`_wfopen_s`** and **`fopen_s`** behave identically otherwise. **`fopen_s`** accepts paths that are valid on the file system at the point of execution; UNC paths and paths that involve mapped network drives are accepted by **`fopen_s`** as long as the system that's executing the code has access to the share or mapped network drive at the time of execution. When you construct paths for **`fopen_s`**, don't make assumptions about the availability of drives, paths, or network shares in the execution environment. You can use either forward slashes (/) or backslashes (\\) as the directory separators in a path. -These functions validate their parameters. If *`pFile`*, *`filename`*, or *`mode`* is a null pointer, these functions generate an invalid parameter exception, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). +These functions validate their parameters. If *`pFile`*, *`filename`*, or *`mode`* is a null pointer, these functions generate an invalid parameter exception, as described in [Parameter validation](../parameter-validation.md). -Always check the return value to see if the function succeeded before you do any further operations on the file. If an error occurs, the error code is returned and the global variable **`errno`** is set. For more information, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +Always check the return value to see if the function succeeded before you do any further operations on the file. If an error occurs, the error code is returned and the global variable **`errno`** is set. For more information, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). By default, this function's global state is scoped to the application. To change it, see [Global state in the CRT](../global-state.md). @@ -122,14 +122,14 @@ In text (translated) mode, **CTRL**+**Z** is interpreted as an end-of-file chara Also, in text mode, carriage return/line feed (CRLF) combinations are translated into single line feed (LF) characters on input, and LF characters are translated to CRLF combinations on output. When a Unicode stream-I/O function operates in text mode (the default), the source or destination stream is assumed to be a sequence of multibyte characters. The Unicode stream-input functions convert multibyte characters to wide characters (as if by a call to the **`mbtowc`** function). For the same reason, the Unicode stream-output functions convert wide characters to multibyte characters (as if by a call to the **`wctomb`** function). -If **`t`** or **`b`** isn't given in *`mode`*, the default translation mode is defined by the global variable [`_fmode`](../../c-runtime-library/fmode.md). If **`t`** or **`b`** is prefixed to the argument, the function fails and returns **`NULL`**. +If **`t`** or **`b`** isn't given in *`mode`*, the default translation mode is defined by the global variable [`_fmode`](../fmode.md). If **`t`** or **`b`** is prefixed to the argument, the function fails and returns **`NULL`**. -For more information about using text and binary modes in Unicode and multibyte stream-I/O, see [Text and binary mode file I/O](../../c-runtime-library/text-and-binary-mode-file-i-o.md) and [Unicode Stream I/O in Text and Binary Modes](../../c-runtime-library/unicode-stream-i-o-in-text-and-binary-modes.md). +For more information about using text and binary modes in Unicode and multibyte stream-I/O, see [Text and binary mode file I/O](../text-and-binary-mode-file-i-o.md) and [Unicode stream I/O in text and binary modes](../unicode-stream-i-o-in-text-and-binary-modes.md). | *`mode`* modifier | Behavior | |--|--| | **`c`** | Enable the commit flag for the associated *`filename`* so that the contents of the file buffer are written directly to disk if either **`fflush`** or **`_flushall`** is called. | -| **`n`** | Reset the commit flag for the associated *`filename`* to "no-commit." This flag is the default. It also overrides the global commit flag if you link your program with *`COMMODE.OBJ`*. The global commit flag default is "no-commit" unless you explicitly link your program with *`COMMODE.OBJ`* (see [Link Options](../../c-runtime-library/link-options.md)). | +| **`n`** | Reset the commit flag for the associated *`filename`* to "no-commit." This flag is the default. It also overrides the global commit flag if you link your program with *`COMMODE.OBJ`*. The global commit flag default is "no-commit" unless you explicitly link your program with *`COMMODE.OBJ`* (see [Link options](../link-options.md)). | | **`N`** | Specifies that the file isn't inherited by child processes. | | **`S`** | Specifies that caching is optimized for, but not restricted to, sequential access from disk. | | **`R`** | Specifies that caching is optimized for, but not restricted to, random access from disk. | @@ -172,7 +172,7 @@ If you're using **`rb`** mode, memory mapped Win32 files might also be an option | **`fopen_s`** | `` | `` | | **`_wfopen_s`** | `` or `` | `` | -For more information on standards conformance and naming conventions in the C runtime library, see [Compatibility](../../c-runtime-library/compatibility.md). +For more information on standards conformance and naming conventions in the C runtime library, see [Compatibility](../compatibility.md). ### Generic-text routine mappings @@ -182,7 +182,7 @@ For more information on standards conformance and naming conventions in the C ru ## Libraries -All versions of the [C run-time libraries](../../c-runtime-library/crt-library-features.md). +All versions of the [C run-time libraries](../crt-library-features.md). ## Example @@ -250,7 +250,7 @@ Number of files closed by _fcloseall: 1 ## See also -[Stream I/O](../../c-runtime-library/stream-i-o.md)\ +[Stream I/O](../stream-i-o.md)\ [`fclose`, `_fcloseall`](fclose-fcloseall.md)\ [`_fdopen`, `_wfdopen`](fdopen-wfdopen.md)\ [`ferror`](ferror.md)\ diff --git a/docs/c-runtime-library/reference/fopen-wfopen.md b/docs/c-runtime-library/reference/fopen-wfopen.md index 2d528a7f070..96d6a1fa494 100644 --- a/docs/c-runtime-library/reference/fopen-wfopen.md +++ b/docs/c-runtime-library/reference/fopen-wfopen.md @@ -37,17 +37,17 @@ Kind of access that's enabled. ## Return value -Each of these functions returns a pointer to the open file. A null pointer value indicates an error. If *`filename`* or *`mode`* is **`NULL`** or an empty string, these functions trigger the invalid parameter handler, which is 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`**. +Each of these functions returns a pointer to the open file. A null pointer value indicates an error. If *`filename`* or *`mode`* is **`NULL`** or an empty string, these functions trigger the invalid parameter handler, which is described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, these functions return **`NULL`** and set **`errno`** to **`EINVAL`**. -For more information, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +For more information, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks -The **`fopen`** function opens the file that is specified by *filename*. By default, a narrow *filename* string is interpreted using the ANSI codepage (`CP_ACP`). In Windows Desktop applications, it can be changed to the OEM codepage (`CP_OEMCP`) by using the [`SetFileApisToOEM`](/windows/win32/api/fileapi/nf-fileapi-setfileapistooem) function. You can use the [`AreFileApisANSI`](/windows/win32/api/fileapi/nf-fileapi-arefileapisansi) function to determine whether *filename* is interpreted using the ANSI or the system default OEM codepage. **`_wfopen`** is a wide-character version of **`fopen`**; the **`_wfopen`** arguments are wide-character strings. Otherwise, **`_wfopen`** and **`fopen`** behave identically. Just using **`_wfopen`** doesn't affect the coded character set that's used in the file stream. +The **`fopen`** function opens the file that is specified by *`filename`*. By default, a narrow *`filename`* string is interpreted using the ANSI codepage (`CP_ACP`). In Windows Desktop applications, it can be changed to the OEM codepage (`CP_OEMCP`) by using the [`SetFileApisToOEM`](/windows/win32/api/fileapi/nf-fileapi-setfileapistooem) function. You can use the [`AreFileApisANSI`](/windows/win32/api/fileapi/nf-fileapi-arefileapisansi) function to determine whether *`filename`* is interpreted using the ANSI or the system default OEM codepage. **`_wfopen`** is a wide-character version of **`fopen`**; the **`_wfopen`** arguments are wide-character strings. Otherwise, **`_wfopen`** and **`fopen`** behave identically. Just using **`_wfopen`** doesn't affect the coded character set that's used in the file stream. **`fopen`** accepts paths that are valid on the file system at the point of execution; **`fopen`** accepts UNC paths and paths that involve mapped network drives as long as the system that executes the code has access to the share or mapped drive at the time of execution. When you construct paths for **`fopen`**, make sure that drives, paths, or network shares will be available in the execution environment. You can use either forward slashes (`/`) or backslashes (`\`) as the directory separators in a path. -Always check the return value to see whether the pointer is NULL before you perform any other operations on the file. If an error occurs, the global variable **`errno`** is set and may be used to obtain specific error information. For more information, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +Always check the return value to see whether the pointer is NULL before you perform any other operations on the file. If an error occurs, the global variable **`errno`** is set and may be used to obtain specific error information. For more information, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). By default, this function's global state is scoped to the application. To change it, see [Global state in the CRT](../global-state.md). @@ -59,7 +59,7 @@ By default, this function's global state is scoped to the application. To change Allowed values for **`ccs`** encoding are **`UNICODE`**, **`UTF-8`**, and **`UTF-16LE`**. -When a file is opened in Unicode mode, input functions translate the data that's read from the file into UTF-16 data stored as type **`wchar_t`**. Functions that write to a file opened in Unicode mode expect buffers that contain UTF-16 data stored as type **`wchar_t`**. If the file is encoded as UTF-8, then UTF-16 data is translated into UTF-8 when it's written. The file's UTF-8-encoded content is translated into UTF-16 when it's read. An attempt to read or write an odd number of bytes in Unicode mode causes a [parameter validation](../../c-runtime-library/parameter-validation.md) error. To read or write data that's stored in your program as UTF-8, use a text or binary file mode instead of a Unicode mode. You're responsible for any required encoding translation. +When a file is opened in Unicode mode, input functions translate the data that's read from the file into UTF-16 data stored as type **`wchar_t`**. Functions that write to a file opened in Unicode mode expect buffers that contain UTF-16 data stored as type **`wchar_t`**. If the file is encoded as UTF-8, then UTF-16 data is translated into UTF-8 when it's written. The file's UTF-8-encoded content is translated into UTF-16 when it's read. An attempt to read or write an odd number of bytes in Unicode mode causes a [parameter validation](../parameter-validation.md) error. To read or write data that's stored in your program as UTF-8, use a text or binary file mode instead of a Unicode mode. You're responsible for any required encoding translation. If the file already exists and is opened for reading or appending, then any byte order mark (BOM) in the file determines the encoding. The BOM encoding takes precedence over the encoding that's specified by the **`ccs`** flag. The **`ccs`** encoding is only used when no BOM is present or the file is a new file. @@ -103,7 +103,7 @@ The **`"a"`** mode doesn't remove the EOF marker before it appends to the file. When the **`"r+"`**, **`"w+"`**, or **`"a+"`** access type is specified, both reading and writing are enabled (the file is said to be open for "update"). However, when you switch from reading to writing, the input operation must encounter an EOF marker. If there's no EOF, you must use an intervening call to a file positioning function. The file positioning functions are **`fsetpos`**, [`fseek`](fseek-fseeki64.md), and [`rewind`](rewind.md). When you switch from writing to reading, you must use an intervening call to either **`fflush`** or to a file positioning function. -In addition to the earlier values, the following characters can be appended to *mode* to specify the translation mode for newline characters. +In addition to the earlier values, the following characters can be appended to *`mode`* to specify the translation mode for newline characters. | *`mode`* modifier | Translation mode | |--|--| @@ -114,17 +114,17 @@ In text mode, **CTRL**+**Z** is interpreted as an EOF character on input. In fil In text mode, carriage return-line feed (CRLF) combinations are translated into single line feed (LF) characters on input, and LF characters are translated to CRLF combinations on output. When a Unicode stream-I/O function operates in text mode (the default), the source or destination stream is assumed to be a sequence of multibyte characters. Therefore, the Unicode stream-input functions convert multibyte characters to wide characters (as if by a call to the **`mbtowc`** function). For the same reason, the Unicode stream-output functions convert wide characters to multibyte characters (as if by a call to the **`wctomb`** function). -If **`t`** or **`b`** isn't given in *`mode`*, the default translation mode is defined by the global variable [`_fmode`](../../c-runtime-library/fmode.md). If **`t`** or **`b`** is prefixed to the argument, the function fails and returns **`NULL`**. +If **`t`** or **`b`** isn't given in *`mode`*, the default translation mode is defined by the global variable [`_fmode`](../fmode.md). If **`t`** or **`b`** is prefixed to the argument, the function fails and returns **`NULL`**. -For more information about how to use text and binary modes in Unicode and multibyte stream-I/O, see [Text and binary mode file I/O](../../c-runtime-library/text-and-binary-mode-file-i-o.md) and [Unicode stream I/O in text and binary modes](../../c-runtime-library/unicode-stream-i-o-in-text-and-binary-modes.md). +For more information about how to use text and binary modes in Unicode and multibyte stream-I/O, see [Text and binary mode file I/O](../text-and-binary-mode-file-i-o.md) and [Unicode stream I/O in text and binary modes](../unicode-stream-i-o-in-text-and-binary-modes.md). The following options can be appended to *`mode`* to specify more behaviors. -| *mode* modifier | Behavior | +| *`mode`* modifier | Behavior | |--|--| -| **`x`** | Forces the function to fail if *filename* already exists. Can only be used with the "w" or "w+" specifiers. | -| **`c`** | Enable the commit flag for the associated *filename* so that the contents of the file buffer are written directly to disk if either **`fflush`** or **`_flushall`** is called. | -| **`n`** | Reset the commit flag for the associated *filename* to "no-commit." This flag is the default. It also overrides the global commit flag if you link your program with COMMODE.OBJ. The global commit flag default is "no-commit" unless you explicitly link your program with COMMODE.OBJ (see [Link Options](../../c-runtime-library/link-options.md)). | +| **`x`** | Forces the function to fail if *`filename`* already exists. Can only be used with the "w" or "w+" specifiers. | +| **`c`** | Enable the commit flag for the associated *`filename`* so that the contents of the file buffer are written directly to disk if either **`fflush`** or **`_flushall`** is called. | +| **`n`** | Reset the commit flag for the associated *`filename`* to "no-commit." This flag is the default. It also overrides the global commit flag if you link your program with COMMODE.OBJ. The global commit flag default is "no-commit" unless you explicitly link your program with COMMODE.OBJ (see [Link options](../link-options.md)). | | **`N`** | Specifies that the file isn't inherited by child processes. | | **`S`** | Specifies that caching is optimized for, but not restricted to, sequential access from disk. | | **`R`** | Specifies that caching is optimized for, but not restricted to, random access from disk. | @@ -132,7 +132,7 @@ The following options can be appended to *`mode`* to specify more behaviors. | **`D`** | Specifies a file as temporary. It's deleted when the last file pointer is closed. | | **`ccs=encoding`** | Specifies the encoded character set to use (one of **`UTF-8`**, **`UTF-16LE`**, or **`UNICODE`**) for this file. Leave unspecified if you want ANSI encoding. | -Valid characters for the *mode* string that is used in **`fopen`** and **`_fdopen`** correspond to *`oflag`* arguments that are used in [`_open`](open-wopen.md) and [`_sopen`](sopen-wsopen.md), as follows. +Valid characters for the *`mode`* string that is used in **`fopen`** and **`_fdopen`** correspond to *`oflag`* arguments that are used in [`_open`](open-wopen.md) and [`_sopen`](sopen-wsopen.md), as follows. | Characters in *`mode`* string | Equivalent *`oflag`* value for `_open`/`_sopen` | |--|--| @@ -164,7 +164,7 @@ If you're using **`rb`** mode, you don't have to port your code, and if you expe | **`fopen`** | `` | | **`_wfopen`** | `` or `` | -**`_wfopen`** is a Microsoft extension. For more information about compatibility, see [Compatibility](../../c-runtime-library/compatibility.md). +**`_wfopen`** is a Microsoft extension. For more information about compatibility, see [Compatibility](../compatibility.md). The **`c`**, **`n`**, **`t`**, **`S`**, **`R`**, **`T`**, and **`D`** *`mode`* options are Microsoft extensions for **`fopen`** and **`_fdopen`** and shouldn't be used where ANSI portability is desired. @@ -281,8 +281,8 @@ int main(int argc, char** argv) ## See also -[Stream I/O](../../c-runtime-library/stream-i-o.md)\ -[Interpretation of Multibyte-Character Sequences](../../c-runtime-library/interpretation-of-multibyte-character-sequences.md)\ +[Stream I/O](../stream-i-o.md)\ +[Interpretation of multibyte-character sequences](../interpretation-of-multibyte-character-sequences.md)\ [`fclose`, `_fcloseall`](fclose-fcloseall.md)\ [`_fdopen`, `_wfdopen`](fdopen-wfdopen.md)\ [`ferror`](ferror.md)\ diff --git a/docs/c-runtime-library/reference/fpclass-fpclassf.md b/docs/c-runtime-library/reference/fpclass-fpclassf.md index 31e68a3e99a..6211f12e609 100644 --- a/docs/c-runtime-library/reference/fpclass-fpclassf.md +++ b/docs/c-runtime-library/reference/fpclass-fpclassf.md @@ -30,7 +30,7 @@ int _fpclassf( *`x`*\ The floating-point value to test. -## Return Value +## Return value The **`_fpclass`** and **`_fpclassf`** functions return an integer value that indicates the floating-point classification of the argument *`x`*. The classification may have one of the following values, defined in ``. @@ -59,10 +59,10 @@ By default, this function's global state is scoped to the application. To change |--------------|---------------------| |**`_fpclass`**, **`_fpclassf`**|``| -For more compatibility and conformance information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility and conformance information, see [Compatibility](../compatibility.md). ## See also -[Floating-Point Support](../../c-runtime-library/floating-point-support.md)\ +[Math and floating-point support](../floating-point-support.md)\ [`isnan`, `_isnan`, `_isnanf`](isnan-isnan-isnanf.md)\ [`fpclassify`](fpclassify.md) diff --git a/docs/c-runtime-library/reference/fpclassify.md b/docs/c-runtime-library/reference/fpclassify.md index e046e387ead..c46a6c7665a 100644 --- a/docs/c-runtime-library/reference/fpclassify.md +++ b/docs/c-runtime-library/reference/fpclassify.md @@ -35,12 +35,12 @@ int fpclassify( ### Parameters -*x*
+*`x`*\ The floating-point value to test. -## Return Value +## Return value -**fpclassify** returns an integer value that indicates the floating-point class of the argument *x*. This table shows the possible values returned by **fpclassify**, defined in \. +**fpclassify** returns an integer value that indicates the floating-point class of the argument *`x`*. This table shows the possible values returned by **fpclassify**, defined in \. |Value|Description| |-----------|-----------------| @@ -60,9 +60,9 @@ In C, **fpclassify** is a macro; in C++, **fpclassify** is a function overloaded |---------------------|---------------------------|-------------------------------| |**fpclassify**|\|\ or \| -The **fpclassify** macro and **fpclassify** functions conform to the ISO C99 and C++11 specifications. For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +The **fpclassify** macro and **fpclassify** functions conform to the ISO C99 and C++11 specifications. For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Floating-Point Support](../../c-runtime-library/floating-point-support.md)
-[isnan, _isnan, _isnanf](isnan-isnan-isnanf.md)
+[Math and floating-point support](../floating-point-support.md)\ +[`isnan`, `_isnan`, `_isnanf`](isnan-isnan-isnanf.md) diff --git a/docs/c-runtime-library/reference/fpieee-flt.md b/docs/c-runtime-library/reference/fpieee-flt.md index 2eee8eee716..56c0cf9d602 100644 --- a/docs/c-runtime-library/reference/fpieee-flt.md +++ b/docs/c-runtime-library/reference/fpieee-flt.md @@ -26,18 +26,18 @@ int _fpieee_flt( ### Parameters -*excCode*
+*`excCode`*\ Exception code. -*excInfo*
+*`excInfo`*\ Pointer to the Windows NT exception information structure. -*handler*
+*`handler`*\ Pointer to the user's IEEE trap-handler routine. -## Return Value +## Return value -The return value of **_fpieee_flt** is the value returned by *handler*. As such, the IEEE filter routine might be used in the except clause of a structured exception-handling (SEH) mechanism. +The return value of **_fpieee_flt** is the value returned by *`handler`*. As such, the IEEE filter routine might be used in the except clause of a structured exception-handling (SEH) mechanism. ## Remarks @@ -50,9 +50,9 @@ The **_FPIEEE_RECORD** structure, defined in Fpieee.h, contains information pert |**RoundingMode**
**Precision**|These **`unsigned int`** fields contain information about the floating-point environment at the time the exception occurred.| |**Operation**|This **`unsigned int`** field indicates the type of operation that caused the trap. If the type is a comparison (**_FpCodeCompare**), you can supply one of the special **_FPIEEE_COMPARE_RESULT** values (as defined in Fpieee.h) in the **Result.Value** field. The conversion type (**_FpCodeConvert**) indicates that the trap occurred during a floating-point conversion operation. You can look at the **Operand1** and **Result** types to determine the type of conversion being attempted.| |**Operand1**
**Operand2**
**Result**|These **_FPIEEE_VALUE** structures indicate the types and values of the proposed result and operands. Each structure contains these fields:

**OperandValid** - Flag indicating whether the responding value is valid.
**Format** - Data type of the corresponding value. The format type might be returned even if the corresponding value is not valid.
**Value** - Result or operand data value.| -|**Cause**
**Enable**
**Status**|**_FPIEEE_EXCEPTION_FLAGS** contains one bit field per type of floating point exception. There is a correspondence between these fields and the arguments used to mask the exceptions supplied to [_controlfp](control87-controlfp-control87-2.md). The exact meaning of each bit depends on context:

**Cause** - Each set bit indicates the particular exception that was raised.
**Enable** - Each set bit indicates that the particular exception is currently unmasked.
**Status** - Each set bit indicates that the particular exception is currently pending. This includes exceptions that have not been raised because they were masked by **_controlfp**.| +|**Cause**
**Enable**
**Status**|**_FPIEEE_EXCEPTION_FLAGS** contains one bit field per type of floating point exception. There is a correspondence between these fields and the arguments used to mask the exceptions supplied to [`_controlfp`](control87-controlfp-control87-2.md). The exact meaning of each bit depends on context:

**Cause** - Each set bit indicates the particular exception that was raised.
**Enable** - Each set bit indicates that the particular exception is currently unmasked.
**Status** - Each set bit indicates that the particular exception is currently pending. This includes exceptions that have not been raised because they were masked by **_controlfp**.| -Pending exceptions that are disabled are raised when you enable them. This can result in undefined behavior when using **_fpieee_flt** as an exception filter. Always call [_clearfp](clear87-clearfp.md) before enabling floating point exceptions. +Pending exceptions that are disabled are raised when you enable them. This can result in undefined behavior when using **_fpieee_flt** as an exception filter. Always call [`_clearfp`](clear87-clearfp.md) before enabling floating point exceptions. ## Requirements @@ -60,7 +60,7 @@ Pending exceptions that are disabled are raised when you enable them. This can r |--------------|---------------------| |**_fpieee_flt**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -131,6 +131,6 @@ int main( void ) ## See also -[Floating-Point Support](../../c-runtime-library/floating-point-support.md)
-[_control87, _controlfp, \__control87_2](control87-controlfp-control87-2.md)
-[_controlfp_s](controlfp-s.md)
+[Math and floating-point support](../floating-point-support.md)\ +[`_control87`, `_controlfp`, `__control87_2`](control87-controlfp-control87-2.md)\ +[`_controlfp_s`](controlfp-s.md) diff --git a/docs/c-runtime-library/reference/fpreset.md b/docs/c-runtime-library/reference/fpreset.md index 0e1eec7e0ca..d11d4b3dd03 100644 --- a/docs/c-runtime-library/reference/fpreset.md +++ b/docs/c-runtime-library/reference/fpreset.md @@ -32,7 +32,7 @@ This function is deprecated when compiling with [/clr (Common Language Runtime C |--------------|---------------------| |**_fpreset**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -150,8 +150,8 @@ Error 131: Divide by zero ## See also -[Floating-Point Support](../../c-runtime-library/floating-point-support.md)
-[_exec, _wexec Functions](../../c-runtime-library/exec-wexec-functions.md)
-[signal](signal.md)
-[_spawn, _wspawn Functions](../../c-runtime-library/spawn-wspawn-functions.md)
-[system, _wsystem](system-wsystem.md)
+[Math and floating-point support](../floating-point-support.md)\ +[`_exec`, `_wexec` functions](../exec-wexec-functions.md)\ +[`signal`](signal.md)\ +[`_spawn`, `_wspawn` functions](../spawn-wspawn-functions.md)\ +[`system`, `_wsystem`](system-wsystem.md) diff --git a/docs/c-runtime-library/reference/fprintf-fprintf-l-fwprintf-fwprintf-l.md b/docs/c-runtime-library/reference/fprintf-fprintf-l-fwprintf-fwprintf-l.md index f82f805c340..75976d80ad5 100644 --- a/docs/c-runtime-library/reference/fprintf-fprintf-l-fwprintf-fwprintf-l.md +++ b/docs/c-runtime-library/reference/fprintf-fprintf-l-fwprintf-fwprintf-l.md @@ -42,23 +42,23 @@ int _fwprintf_l( ### Parameters -*`stream`*
+*`stream`*\ Pointer to **FILE** structure. -*`format`*
+*`format`*\ Format-control string. -*`argument`*
+*`argument`*\ Optional arguments. -*`locale`*
+*`locale`*\ The locale to use. -## Return Value +## Return value -**`fprintf`** returns the number of bytes written. **`fwprintf`** returns the number of wide characters written. Each of these functions returns a negative value instead when an output error occurs. If *`stream`* or *`format`* 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, the functions return -1 and set **`errno`** to **`EINVAL`**. The format string isn't checked for valid formatting characters as it is when using **`fprintf_s`** or **`fwprintf_s`**. +**`fprintf`** returns the number of bytes written. **`fwprintf`** returns the number of wide characters written. Each of these functions returns a negative value instead when an output error occurs. If *`stream`* or *`format`* is **`NULL`**, these functions invoke the invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, the functions return -1 and set **`errno`** to **`EINVAL`**. The format string isn't checked for valid formatting characters as it is when using **`fprintf_s`** or **`fwprintf_s`**. -For more information about return codes, see [`_doserrno`, `errno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). +For more information about return codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks @@ -69,19 +69,18 @@ For more information about return codes, see [`_doserrno`, `errno`, `_sys_errlis The versions of these functions with the **`_l`** suffix are identical except that they use the locale parameter passed in instead of the current thread locale. > [!IMPORTANT] -> Ensure that *format* is not a user-defined string. -> +> Ensure that *`format`* is not a user-defined string. > > Starting in Windows 10 version 2004 (build 19041), the `printf` family of functions prints exactly representable floating point numbers according to the IEEE 754 rules for rounding. In previous versions of Windows, exactly representable floating point numbers ending in '5' would always round up. IEEE 754 states that they must round to the closest even digit (also known as "Banker's Rounding"). For example, both `printf("%1.0f", 1.5)` and `printf("%1.0f", 2.5)` should round to 2. Previously, 1.5 would round to 2 and 2.5 would round to 3. This change only affects exactly representable numbers. For example, 2.35 (which, when represented in memory, is closer to 2.35000000000000008) continues to round up to 2.4. Rounding done by these functions now also respects the floating point rounding mode set by [`fesetround`](fegetround-fesetround2.md). Previously, rounding always chose `FE_TONEAREST` behavior. This change only affects programs built using Visual Studio 2019 version 16.2 and later. To use the legacy floating point rounding behavior, link with ['legacy_stdio_float_rounding.obj`](../link-options.md). -### Generic-Text Routine Mappings +### Generic-text routine mappings |`TCHAR.H` routine|`_UNICODE` & `_MBCS` not defined|`_MBCS` defined|`_UNICODE` defined| |---------------------|------------------------------------|--------------------|-----------------------| |**`_ftprintf`**|**`fprintf`**|**`fprintf`**|**`fwprintf`**| |**`_ftprintf_l`**|**`_fprintf_l`**|**`_fprintf_l`**|**`_fwprintf_l`**| -For more information, see [Format Specifications](../../c-runtime-library/format-specification-syntax-printf-and-wprintf-functions.md). +For more information, see [Format specification syntax](../format-specification-syntax-printf-and-wprintf-functions.md). ## Requirements @@ -90,7 +89,7 @@ For more information, see [Format Specifications](../../c-runtime-library/format |**`fprintf`**, **`_fprintf_l`**|``| |**`fwprintf`**, **`_fwprintf_l`**|`` or ``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -131,8 +130,8 @@ this is a string ## See also -[Stream I/O](../../c-runtime-library/stream-i-o.md)
-[`_cprintf`, `_cprintf_l`, `_cwprintf`, `_cwprintf_l`](cprintf-cprintf-l-cwprintf-cwprintf-l.md)
-[`fscanf`, `_fscanf_l`, `fwscanf`, `_fwscanf_l`](fscanf-fscanf-l-fwscanf-fwscanf-l.md)
-[`sprintf`, `_sprintf_l`, `swprintf`, `_swprintf_l`, `_swprintf_l`](sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md)
-[Format Specification Syntax: `printf` and `wprintf` Functions](../../c-runtime-library/format-specification-syntax-printf-and-wprintf-functions.md)
+[Stream I/O](../stream-i-o.md)\ +[`_cprintf`, `_cprintf_l`, `_cwprintf`, `_cwprintf_l`](cprintf-cprintf-l-cwprintf-cwprintf-l.md)\ +[`fscanf`, `_fscanf_l`, `fwscanf`, `_fwscanf_l`](fscanf-fscanf-l-fwscanf-fwscanf-l.md)\ +[`sprintf`, `_sprintf_l`, `swprintf`, `_swprintf_l`, `_swprintf_l`](sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md)\ +[Format specification syntax: `printf` and `wprintf` functions](../format-specification-syntax-printf-and-wprintf-functions.md) diff --git a/docs/c-runtime-library/reference/fprintf-p-fprintf-p-l-fwprintf-p-fwprintf-p-l.md b/docs/c-runtime-library/reference/fprintf-p-fprintf-p-l-fwprintf-p-fwprintf-p-l.md index 41555638d55..4df900ed105 100644 --- a/docs/c-runtime-library/reference/fprintf-p-fprintf-p-l-fwprintf-p-fwprintf-p-l.md +++ b/docs/c-runtime-library/reference/fprintf-p-fprintf-p-l-fwprintf-p-fwprintf-p-l.md @@ -42,46 +42,45 @@ int _fwprintf_p_l( ### Parameters -*stream*
+*`stream`*\ Pointer to the **FILE** structure. -*format*
+*`format`*\ Format-control string. -*argument*
+*`argument`*\ Optional arguments. -*locale*
+*`locale`*\ The locale to use. -## Return Value +## Return value **_fprintf_p** and **_fwprintf_p** return the number of characters written or return a negative value when an output error occurs. ## Remarks -**_fprintf_p** formats and prints a series of characters and values to the output *stream*. Each function *argument* (if any) is converted and output according to the corresponding format specification in *format*. For **_fprintf_p**, the *format* argument has the same syntax and use that it has in **_printf_p**. These functions support positional parameters, meaning that the order of the parameters used by the format string can be changed. For more information about positional parameters, see [printf_p Positional Parameters](../../c-runtime-library/printf-p-positional-parameters.md). +**_fprintf_p** formats and prints a series of characters and values to the output *`stream`*. Each function *`argument`* (if any) is converted and output according to the corresponding format specification in *`format`*. For **_fprintf_p**, the *`format`* argument has the same syntax and use that it has in **_printf_p**. These functions support positional parameters, meaning that the order of the parameters used by the format string can be changed. For more information about positional parameters, see [printf_p Positional Parameters](../printf-p-positional-parameters.md). -**_fwprintf_p** is a wide-character version of **_fprintf_p**; in **_fwprintf_p**, *format* is a wide-character string. These functions behave identically if the stream is opened in ANSI mode. **_fprintf_p** doesn't currently support output into a UNICODE stream. +**_fwprintf_p** is a wide-character version of **_fprintf_p**; in **_fwprintf_p**, *`format`* is a wide-character string. These functions behave identically if the stream is opened in ANSI mode. **_fprintf_p** doesn't currently support output into a UNICODE stream. The versions of these functions with the **_l** suffix are identical except that they use the locale parameter passed in instead of the current locale. > [!IMPORTANT] -> Ensure that *format* is not a user-defined string. -> +> Ensure that *`format`* is not a user-defined string. > > Starting in Windows 10 version 2004 (build 19041), the `printf` family of functions prints exactly representable floating point numbers according to the IEEE 754 rules for rounding. In previous versions of Windows, exactly representable floating point numbers ending in '5' would always round up. IEEE 754 states that they must round to the closest even digit (also known as "Banker's Rounding"). For example, both `printf("%1.0f", 1.5)` and `printf("%1.0f", 2.5)` should round to 2. Previously, 1.5 would round to 2 and 2.5 would round to 3. This change only affects exactly representable numbers. For example, 2.35 (which, when represented in memory, is closer to 2.35000000000000008) continues to round up to 2.4. Rounding done by these functions now also respects the floating point rounding mode set by [`fesetround`](fegetround-fesetround2.md). Previously, rounding always chose `FE_TONEAREST` behavior. This change only affects programs built using Visual Studio 2019 version 16.2 and later. To use the legacy floating point rounding behavior, link with ['legacy_stdio_float_rounding.obj`](../link-options.md). -Like the non-secure versions (see [fprintf, _fprintf_l, fwprintf, _fwprintf_l](fprintf-fprintf-l-fwprintf-fwprintf-l.md)), these functions validate their parameters and invoke the invalid parameter handler, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md), if either *stream* or *format* is a null pointer or if there are any unknown or badly formed formatting specifiers. If execution is allowed to continue, the functions return -1 and set **errno** to **EINVAL**. +Like the non-secure versions (see [`fprintf`, `_fprintf_l`, `fwprintf`, `_fwprintf_l`](fprintf-fprintf-l-fwprintf-fwprintf-l.md)), these functions validate their parameters and invoke the invalid parameter handler, as described in [Parameter validation](../parameter-validation.md), if either *`stream`* or *`format`* is a null pointer or if there are any unknown or badly formed formatting specifiers. If execution is allowed to continue, the functions return -1 and set **errno** to **EINVAL**. -### Generic-Text Routine Mappings +### Generic-text routine mappings |Tchar.h routine|_UNICODE and _MBCS not defined|_MBCS defined|_UNICODE defined| |---------------------|--------------------------------------|--------------------|-----------------------| |**_ftprintf_p**|**_fprintf_p**|**_fprintf_p**|**_fwprintf_p**| |**_ftprintf_p_l**|**_fprintf_p_l**|**_fprintf_p_l**|**_fwprintf_p_l**| -For more information, see [Format Specifications](../../c-runtime-library/format-specification-syntax-printf-and-wprintf-functions.md). +For more information, see [Format specification syntax](../format-specification-syntax-printf-and-wprintf-functions.md). ## Requirements @@ -90,7 +89,7 @@ For more information, see [Format Specifications](../../c-runtime-library/format |**_fprintf_p**, **_fprintf_p_l**|\| |**_fwprintf_p**, **_fwprintf_p_l**|\ or \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -138,12 +137,12 @@ this is a string ## See also -[Stream I/O](../../c-runtime-library/stream-i-o.md)
-[_cprintf, _cprintf_l, _cwprintf, _cwprintf_l](cprintf-cprintf-l-cwprintf-cwprintf-l.md)
-[fscanf, _fscanf_l, fwscanf, _fwscanf_l](fscanf-fscanf-l-fwscanf-fwscanf-l.md)
-[sprintf, _sprintf_l, swprintf, _swprintf_l, \__swprintf_l](sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md)
-[printf_p Positional Parameters](../../c-runtime-library/printf-p-positional-parameters.md)
-[_cprintf_p, _cprintf_p_l, _cwprintf_p, _cwprintf_p_l](cprintf-p-cprintf-p-l-cwprintf-p-cwprintf-p-l.md)
-[_cprintf_s, _cprintf_s_l, _cwprintf_s, _cwprintf_s_l](cprintf-s-cprintf-s-l-cwprintf-s-cwprintf-s-l.md)
-[printf_p Positional Parameters](../../c-runtime-library/printf-p-positional-parameters.md)
-[fscanf_s, _fscanf_s_l, fwscanf_s, _fwscanf_s_l](fscanf-s-fscanf-s-l-fwscanf-s-fwscanf-s-l.md)
+[Stream I/O](../stream-i-o.md)\ +[`_cprintf`, `_cprintf_l`, `_cwprintf`, `_cwprintf_l`](cprintf-cprintf-l-cwprintf-cwprintf-l.md)\ +[`fscanf`, `_fscanf_l`, `fwscanf`, `_fwscanf_l`](fscanf-fscanf-l-fwscanf-fwscanf-l.md)\ +[`sprintf`, `_sprintf_l`, `swprintf`, `_swprintf_l`, `__swprintf_l`](sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md)\ +[printf_p Positional Parameters](../printf-p-positional-parameters.md)\ +[`_cprintf_p`, `_cprintf_p_l`, `_cwprintf_p`, `_cwprintf_p_l`](cprintf-p-cprintf-p-l-cwprintf-p-cwprintf-p-l.md)\ +[`_cprintf_s`, `_cprintf_s_l`, `_cwprintf_s`, `_cwprintf_s_l`](cprintf-s-cprintf-s-l-cwprintf-s-cwprintf-s-l.md)\ +[printf_p Positional Parameters](../printf-p-positional-parameters.md)\ +[`fscanf_s`, `_fscanf_s_l`, `fwscanf_s`, `_fwscanf_s_l`](fscanf-s-fscanf-s-l-fwscanf-s-fwscanf-s-l.md) diff --git a/docs/c-runtime-library/reference/fprintf-s-fprintf-s-l-fwprintf-s-fwprintf-s-l.md b/docs/c-runtime-library/reference/fprintf-s-fprintf-s-l-fwprintf-s-fwprintf-s-l.md index e9363ef244c..d375b3ca3a8 100644 --- a/docs/c-runtime-library/reference/fprintf-s-fprintf-s-l-fwprintf-s-fwprintf-s-l.md +++ b/docs/c-runtime-library/reference/fprintf-s-fprintf-s-l-fwprintf-s-fwprintf-s-l.md @@ -11,7 +11,7 @@ helpviewer_keywords: ["ftprintf_s_l function", "ftprintf_s function", "_fprintf_ --- # `fprintf_s`, `_fprintf_s_l`, `fwprintf_s`, `_fwprintf_s_l` -Print formatted data to a stream. These functions are versions of [`fprintf`, `_fprintf_l`, `fwprintf`, `_fwprintf_l`](fprintf-fprintf-l-fwprintf-fwprintf-l.md) with security enhancements as described in [Security Features in the CRT](../../c-runtime-library/security-features-in-the-crt.md). +Print formatted data to a stream. These functions are versions of [`fprintf`, `_fprintf_l`, `fwprintf`, `_fwprintf_l`](fprintf-fprintf-l-fwprintf-fwprintf-l.md) with security enhancements as described in [Security features in the CRT](../security-features-in-the-crt.md). ## Syntax @@ -54,13 +54,13 @@ Optional arguments to the format string. *`locale`*\ The locale to use. -## Return Value +## Return value **`fprintf_s`** returns the number of bytes written. **`fwprintf_s`** returns the number of wide characters written. Each of these functions returns a negative value instead when an output error occurs. ## Remarks -**`fprintf_s`** formats and prints a series of characters and values to the output *`stream`*. Each argument in *`argument_list`* (if any) is converted and output according to the corresponding format specification in *`format`*. The *`format`* argument uses the [format specification syntax for `printf` and `wprintf` functions](../../c-runtime-library/format-specification-syntax-printf-and-wprintf-functions.md). +**`fprintf_s`** formats and prints a series of characters and values to the output *`stream`*. Each argument in *`argument_list`* (if any) is converted and output according to the corresponding format specification in *`format`*. The *`format`* argument uses the [format specification syntax for `printf` and `wprintf` functions](../format-specification-syntax-printf-and-wprintf-functions.md). **`fwprintf_s`** is a wide-character version of **`fprintf_s`**; in **`fwprintf_s`**, *`format`* is a wide-character string. These functions behave identically if the stream is opened in ANSI mode. **`fprintf_s`** doesn't currently support output into a UNICODE stream. @@ -72,16 +72,16 @@ The versions of these functions with the **`_l`** suffix are identical except th > > Starting in Windows 10 version 2004 (build 19041), the `printf` family of functions prints exactly representable floating point numbers according to the IEEE 754 rules for rounding. In previous versions of Windows, exactly representable floating point numbers ending in '5' would always round up. IEEE 754 states that they must round to the closest even digit (also known as "Banker's Rounding"). For example, both `printf("%1.0f", 1.5)` and `printf("%1.0f", 2.5)` should round to 2. Previously, 1.5 would round to 2 and 2.5 would round to 3. This change only affects exactly representable numbers. For example, 2.35 (which, when represented in memory, is closer to 2.35000000000000008) continues to round up to 2.4. Rounding done by these functions now also respects the floating point rounding mode set by [`fesetround`](fegetround-fesetround2.md). Previously, rounding always chose `FE_TONEAREST` behavior. This change only affects programs built using Visual Studio 2019 version 16.2 and later. To use the legacy floating point rounding behavior, link with ['legacy_stdio_float_rounding.obj`](../link-options.md). -Like the non-secure versions (see [`fprintf`, `_fprintf_l`, `fwprintf`, `_fwprintf_l`](fprintf-fprintf-l-fwprintf-fwprintf-l.md)), these functions validate their parameters and invoke the invalid parameter handler, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md), if either *`stream`* or *`format`* is a `NULL` pointer. The format string itself is also validated. If there are any unknown or badly formed formatting specifiers, these functions generate the invalid parameter exception. In all cases, If execution is allowed to continue, the functions return -1 and set **`errno`** to **`EINVAL`**. For more information about return codes, see [`_doserrno`, `errno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). +Like the non-secure versions (see [`fprintf`, `_fprintf_l`, `fwprintf`, `_fwprintf_l`](fprintf-fprintf-l-fwprintf-fwprintf-l.md)), these functions validate their parameters and invoke the invalid parameter handler, as described in [Parameter validation](../parameter-validation.md), if either *`stream`* or *`format`* is a `NULL` pointer. The format string itself is also validated. If there are any unknown or badly formed formatting specifiers, these functions generate the invalid parameter exception. In all cases, If execution is allowed to continue, the functions return -1 and set **`errno`** to **`EINVAL`**. For more information about return codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). -### Generic-Text Routine Mappings +### Generic-text routine mappings |`TCHAR.H` routine|`_UNICODE & _MBCS` not defined|`_MBCS` defined|`_UNICODE` defined| |---------------------|------------------------------------|--------------------|-----------------------| |**`_ftprintf_s`**|**`fprintf_s`**|**`fprintf_s`**|**`fwprintf_s`**| |**`_ftprintf_s_l`**|**`_fprintf_s_l`**|**`_fprintf_s_l`**|**`_fwprintf_s_l`**| -For more information, see [Format Specifications](../../c-runtime-library/format-specification-syntax-printf-and-wprintf-functions.md). +For more information, see [Format specification syntax](../format-specification-syntax-printf-and-wprintf-functions.md). ## Requirements @@ -90,7 +90,7 @@ For more information, see [Format Specifications](../../c-runtime-library/format |**`fprintf_s`**, **`_fprintf_s_l`**|``| |**`fwprintf_s`**, **`_fwprintf_s_l`**|`` or ``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -130,7 +130,7 @@ this is a string ## See also -[Stream I/O](../../c-runtime-library/stream-i-o.md)\ +[Stream I/O](../stream-i-o.md)\ [`_cprintf`, `_cprintf_l`, `_cwprintf`, `_cwprintf_l`](cprintf-cprintf-l-cwprintf-cwprintf-l.md)\ [`fscanf`, `_fscanf_l`, `fwscanf`, `_fwscanf_l`](fscanf-fscanf-l-fwscanf-fwscanf-l.md)\ -[`sprintf`, `_sprintf_l`, `swprintf`, `_swprintf_l`, `\__swprintf_l`](sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md) +[`sprintf`, `_sprintf_l`, `swprintf`, `_swprintf_l`, `__swprintf_l`](sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md) diff --git a/docs/c-runtime-library/reference/fputc-fputwc.md b/docs/c-runtime-library/reference/fputc-fputwc.md index 5ff65309380..a17652e6985 100644 --- a/docs/c-runtime-library/reference/fputc-fputwc.md +++ b/docs/c-runtime-library/reference/fputc-fputwc.md @@ -29,36 +29,36 @@ wint_t fputwc( ### Parameters -*c*
+*`c`*\ Character to be written. -*stream*
+*`stream`*\ Pointer to **FILE** structure. -## Return Value +## Return value -Each of these functions returns the character written. For **fputc**, a return value of **EOF** indicates an error. For **fputwc**, a return value of **WEOF** indicates an error. If *stream* 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 **EOF** and set **errno** to **EINVAL**. +Each of these functions returns the character written. For **fputc**, a return value of **EOF** indicates an error. For **fputwc**, a return value of **WEOF** indicates an error. If *`stream`* 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 **EOF** and set **errno** to **EINVAL**. -For more information about return codes, see [`_doserrno`, `errno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). +For more information about return codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks -Each of these functions writes the single character *c* to a file at the position indicated by the associated file position indicator, if defined. The functions advance the indicator as appropriate. In **fputc** and **fputwc**, the file is associated with *stream*. If the file can't support positioning requests or was opened in append mode, the character is appended to the end of the stream. +Each of these functions writes the single character *`c`* to a file at the position indicated by the associated file position indicator, if defined. The functions advance the indicator as appropriate. In **fputc** and **fputwc**, the file is associated with *`stream`*. If the file can't support positioning requests or was opened in append mode, the character is appended to the end of the stream. The two functions behave identically if the stream is opened in ANSI mode. **fputc** doesn't currently support output into a UNICODE stream. -The versions with the **_nolock** suffix are identical except that they aren't protected from interference by other threads. For more information, see[_fputc_nolock, _fputwc_nolock](fputc-nolock-fputwc-nolock.md). +The versions with the **_nolock** suffix are identical except that they aren't protected from interference by other threads. For more information, see[`_fputc_nolock`, `_fputwc_nolock`](fputc-nolock-fputwc-nolock.md). Routine-specific remarks follow. |Routine|Remarks| |-------------|-------------| |**fputc**|Equivalent to **putc**, but implemented only as a function, rather than as a function and a macro.| -|**fputwc**|Wide-character version of **fputc**. Writes *c* as a multibyte character or a wide character when *stream* is opened in text mode or binary mode, respectively.| +|**fputwc**|Wide-character version of **fputc**. Writes *`c`* as a multibyte character or a wide character when *`stream`* is opened in text mode or binary mode, respectively.| 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| |---------------------|------------------------------------|--------------------|-----------------------| @@ -71,7 +71,7 @@ By default, this function's global state is scoped to the application. To change |**fputc**|\| |**fputwc**|\ or \| -The console isn't supported in Universal Windows Platform (UWP) apps. The standard stream handles that are associated with the console—**stdin**, **stdout**, and **stderr**—must be redirected before C run-time functions can use them in UWP apps. For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +The console isn't supported in Universal Windows Platform (UWP) apps. The standard stream handles that are associated with the console—**stdin**, **stdout**, and **stderr**—must be redirected before C run-time functions can use them in UWP apps. For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -100,6 +100,6 @@ This is a test of fputc!! ## See also -[Stream I/O](../../c-runtime-library/stream-i-o.md)
-[fgetc, fgetwc](fgetc-fgetwc.md)
-[putc, putwc](putc-putwc.md)
+[Stream I/O](../stream-i-o.md)\ +[`fgetc`, `fgetwc`](fgetc-fgetwc.md)\ +[`putc`, `putwc`](putc-putwc.md) diff --git a/docs/c-runtime-library/reference/fputc-nolock-fputwc-nolock.md b/docs/c-runtime-library/reference/fputc-nolock-fputwc-nolock.md index b5a259a3280..7ca50183b98 100644 --- a/docs/c-runtime-library/reference/fputc-nolock-fputwc-nolock.md +++ b/docs/c-runtime-library/reference/fputc-nolock-fputwc-nolock.md @@ -29,15 +29,15 @@ wint_t _fputwc_nolock( ### Parameters -*c*
+*`c`*\ Character to be written. -*stream*
+*`stream`*\ Pointer to the **FILE** structure. -## Return Value +## Return value -Each of these functions returns the character written. For error information, see [fputc, fputwc](fputc-fputwc.md). +Each of these functions returns the character written. For error information, see [`fputc`, `fputwc`](fputc-fputwc.md). ## Remarks @@ -47,7 +47,7 @@ The two functions behave identically if the stream is opened in ANSI mode. **_fp 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| |---------------------|--------------------------------------|--------------------|-----------------------| @@ -60,7 +60,7 @@ By default, this function's global state is scoped to the application. To change |**_fputc_nolock**|\| |**_fputwc_nolock**|\ or \| -The console is not supported in Universal Windows Platform (UWP) apps. The standard stream handles that are associated with the console—**stdin**, **stdout**, and **stderr**—must be redirected before C run-time functions can use them in UWP apps. For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +The console is not supported in Universal Windows Platform (UWP) apps. The standard stream handles that are associated with the console—**stdin**, **stdout**, and **stderr**—must be redirected before C run-time functions can use them in UWP apps. For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -89,6 +89,6 @@ This is a test of _fputc_nolock!! ## See also -[Stream I/O](../../c-runtime-library/stream-i-o.md)
-[fgetc, fgetwc](fgetc-fgetwc.md)
-[putc, putwc](putc-putwc.md)
+[Stream I/O](../stream-i-o.md)\ +[`fgetc`, `fgetwc`](fgetc-fgetwc.md)\ +[`putc`, `putwc`](putc-putwc.md) diff --git a/docs/c-runtime-library/reference/fputchar-fputwchar.md b/docs/c-runtime-library/reference/fputchar-fputwchar.md index 46f8c9559b2..b7cc92fb2e3 100644 --- a/docs/c-runtime-library/reference/fputchar-fputwchar.md +++ b/docs/c-runtime-library/reference/fputchar-fputwchar.md @@ -27,22 +27,22 @@ wint_t _fputwchar( ### Parameters -*c*
+*`c`*\ Character to be written. -## Return Value +## Return value -Each of these functions returns the character written. For **_fputchar**, a return value of **EOF** indicates an error. For **_fputwchar**, a return value of **WEOF** indicates an error. If c is **NULL**, these functions generate an invalid parameter exception, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, they return **EOF** (or **WEOF**) and set **errno** to **EINVAL**. +Each of these functions returns the character written. For **_fputchar**, a return value of **EOF** indicates an error. For **_fputwchar**, a return value of **WEOF** indicates an error. If c is **NULL**, these functions generate an invalid parameter exception, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, they return **EOF** (or **WEOF**) and set **errno** to **EINVAL**. -For more information about these and other error codes, see [_doserrno, errno, _sys_errlist, and _sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +For more information about these and other error codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks -Both of these functions writes the single character *c* to **stdout** and advances the indicator as appropriate. **_fputchar** is equivalent to `fputc( stdout )`. It is also equivalent to **putchar**, but implemented only as a function, rather than as a function and a macro. Unlike **fputc** and **putchar**, these functions are not compatible with the ANSI standard. +Both of these functions writes the single character *`c`* to **stdout** and advances the indicator as appropriate. **_fputchar** is equivalent to `fputc( stdout )`. It is also equivalent to **putchar**, but implemented only as a function, rather than as a function and a macro. Unlike **fputc** and **putchar**, these functions are not compatible with the ANSI standard. 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| |---------------------|--------------------------------------|--------------------|-----------------------| @@ -55,7 +55,7 @@ By default, this function's global state is scoped to the application. To change |**_fputchar**|\| |**_fputwchar**|\ or \| -The console is not supported in Universal Windows Platform (UWP) apps. The standard stream handles that are associated with the console—**stdin**, **stdout**, and **stderr**—must be redirected before C run-time functions can use them in UWP apps. For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +The console is not supported in Universal Windows Platform (UWP) apps. The standard stream handles that are associated with the console—**stdin**, **stdout**, and **stderr**—must be redirected before C run-time functions can use them in UWP apps. For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -84,6 +84,6 @@ This is a test of _fputchar!! ## See also -[Stream I/O](../../c-runtime-library/stream-i-o.md)
-[fgetc, fgetwc](fgetc-fgetwc.md)
-[putc, putwc](putc-putwc.md)
+[Stream I/O](../stream-i-o.md)\ +[`fgetc`, `fgetwc`](fgetc-fgetwc.md)\ +[`putc`, `putwc`](putc-putwc.md) diff --git a/docs/c-runtime-library/reference/fputchar.md b/docs/c-runtime-library/reference/fputchar.md index 62d6f77587e..19f69c091d8 100644 --- a/docs/c-runtime-library/reference/fputchar.md +++ b/docs/c-runtime-library/reference/fputchar.md @@ -12,6 +12,6 @@ ms.assetid: d6cf3492-ace9-47a7-9f7d-3c25aa8ad526 --- # fputchar -The Microsoft-specific function name `fputchar` is a deprecated alias for the [_fputchar](fputchar-fputwchar.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. +The Microsoft-specific function name `fputchar` is a deprecated alias for the [`_fputchar`](fputchar-fputwchar.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. -We recommend you use [_fputchar](fputchar-fputwchar.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). +We recommend you use [`_fputchar`](fputchar-fputwchar.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). diff --git a/docs/c-runtime-library/reference/fputs-fputws.md b/docs/c-runtime-library/reference/fputs-fputws.md index d0baee3b21e..68d258b367b 100644 --- a/docs/c-runtime-library/reference/fputs-fputws.md +++ b/docs/c-runtime-library/reference/fputs-fputws.md @@ -36,9 +36,9 @@ Pointer to **`FILE`** structure. ## Return value -Each of these functions returns a nonnegative value if it is successful. On an error, **`fputs`** and **`fputws`** return **`EOF`**. If *`str`* or *`stream`* is a null pointer, these 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 then return **`EOF`**. +Each of these functions returns a nonnegative value if it is successful. On an error, **`fputs`** and **`fputws`** return **`EOF`**. If *`str`* or *`stream`* is a null pointer, these functions invoke the invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, these functions set **`errno`** to **`EINVAL`** and then return **`EOF`**. -For more information on error codes, see [_doserrno, errno, _sys_errlist, and _sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +For more information on error codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks @@ -61,7 +61,7 @@ By default, this function's global state is scoped to the application. To change |**`fputs`**|\| |**`fputws`**|\ or \| -The console isn't supported in Universal Windows Platform (UWP) apps. The standard stream handles that are associated with the console—**`stdin`**, **`stdout`**, and **`stderr`**—must be redirected before C runtime functions can use them in UWP apps. For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +The console isn't supported in Universal Windows Platform (UWP) apps. The standard stream handles that are associated with the console—**`stdin`**, **`stdout`**, and **`stderr`**—must be redirected before C runtime functions can use them in UWP apps. For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -84,7 +84,7 @@ Hello world from fputs. ## See also -[Stream I/O](../../c-runtime-library/stream-i-o.md)\ +[Stream I/O](../stream-i-o.md)\ [`fgets`, `fgetws`](fgets-fgetws.md)\ -[`gets`, `_getws`](../../c-runtime-library/gets-getws.md)\ +[`gets`, `_getws`](../gets-getws.md)\ [`puts`, `_putws`](puts-putws.md) diff --git a/docs/c-runtime-library/reference/fread-nolock-s2.md b/docs/c-runtime-library/reference/fread-nolock-s2.md index e3af27545f0..23448c8d4ea 100644 --- a/docs/c-runtime-library/reference/fread-nolock-s2.md +++ b/docs/c-runtime-library/reference/fread-nolock-s2.md @@ -11,7 +11,7 @@ ms.assetid: 5badb9ab-11df-4e17-8162-30bda2a4572e --- # _fread_nolock_s -Reads data from a stream, without locking other threads. This version of [fread_nolock](fread-nolock.md) has security enhancements, as described in [Security Features in the CRT](../../c-runtime-library/security-features-in-the-crt.md). +Reads data from a stream, without locking other threads. This version of [`fread_nolock`](fread-nolock.md) has security enhancements, as described in [Security features in the CRT](../security-features-in-the-crt.md). ## Syntax @@ -27,24 +27,24 @@ size_t _fread_nolock_s( ### Parameters -*buffer*
+*`buffer`*\ Storage location for data. -*bufferSize*
+*`bufferSize`*\ Size of the destination buffer in bytes. -*elementSize*
+*`elementSize`*\ Size of the item to read in bytes. -*elementCount*
+*`elementCount`*\ Maximum number of items to be read. -*stream*
+*`stream`*\ Pointer to **FILE** structure. -## Return Value +## Return value -See [fread_s](fread-s.md). +See [`fread_s`](fread-s.md). ## Remarks @@ -58,10 +58,10 @@ By default, this function's global state is scoped to the application. To change |--------------|---------------------| |**_fread_nolock_s**|C: \; C++: \ or \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Stream I/O](../../c-runtime-library/stream-i-o.md)
-[fwrite](fwrite.md)
-[_read](read.md)
+[Stream I/O](../stream-i-o.md)\ +[`fwrite`](fwrite.md)\ +[`_read`](read.md) diff --git a/docs/c-runtime-library/reference/fread-nolock.md b/docs/c-runtime-library/reference/fread-nolock.md index b95870cda1a..946caed730e 100644 --- a/docs/c-runtime-library/reference/fread-nolock.md +++ b/docs/c-runtime-library/reference/fread-nolock.md @@ -27,21 +27,21 @@ size_t _fread_nolock( ### Parameters -*buffer*
+*`buffer`*\ Storage location for data. -*size*
+*`size`*\ Item size in bytes. -*count*
+*`count`*\ Maximum number of items to be read. -*stream*
+*`stream`*\ Pointer to the **FILE** structure. -## Return Value +## Return value -See [fread](fread.md). +See [`fread`](fread.md). ## Remarks @@ -55,10 +55,10 @@ By default, this function's global state is scoped to the application. To change |--------------|---------------------| |**_fread_nolock**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Stream I/O](../../c-runtime-library/stream-i-o.md)
-[fwrite](fwrite.md)
-[_read](read.md)
+[Stream I/O](../stream-i-o.md)\ +[`fwrite`](fwrite.md)\ +[`_read`](read.md) diff --git a/docs/c-runtime-library/reference/fread-s.md b/docs/c-runtime-library/reference/fread-s.md index 7f20aeafd41..a167adbe065 100644 --- a/docs/c-runtime-library/reference/fread-s.md +++ b/docs/c-runtime-library/reference/fread-s.md @@ -10,7 +10,7 @@ f1_keywords: ["fread_s", "stdio/fread_s"] --- # `fread_s` -Reads data from a stream. This version of [`fread`](fread.md) has security enhancements, as described in [Security Features in the CRT](../../c-runtime-library/security-features-in-the-crt.md). +Reads data from a stream. This version of [`fread`](fread.md) has security enhancements, as described in [Security features in the CRT](../security-features-in-the-crt.md). ## Syntax @@ -41,11 +41,11 @@ Maximum number of items to be read. *`stream`*\ Pointer to **`FILE`** structure. -## Return Value +## Return value -**`fread_s`** returns the number of (whole) items that were read into the buffer, which may be less than *`count`* if a read error or the end of the file is encountered before *`count`* is reached. Use the **`feof`** or **`ferror`** function to distinguish an error from an end-of-file condition. If *`size`* or *`count`* is 0, **`fread_s`** returns 0 and the buffer contents are unchanged. If *`stream`* or *`buffer`* is a null pointer, **`fread_s`** invokes the invalid parameter handler, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, this function sets **`errno`** to **`EINVAL`** and returns 0. +**`fread_s`** returns the number of (whole) items that were read into the buffer, which may be less than *`count`* if a read error or the end of the file is encountered before *`count`* is reached. Use the **`feof`** or **`ferror`** function to distinguish an error from an end-of-file condition. If *`size`* or *`count`* is 0, **`fread_s`** returns 0 and the buffer contents are unchanged. If *`stream`* or *`buffer`* is a null pointer, **`fread_s`** invokes the invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, this function sets **`errno`** to **`EINVAL`** and returns 0. -For more information about error codes, see [`_doserrno`, `errno`, `_sys_errlist`, and `_sys_nerr`](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +For more information about error codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks @@ -61,7 +61,7 @@ By default, this function's global state is scoped to the application. To change |--------------|---------------------| |**`fread_s`**|``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -132,6 +132,6 @@ Contents of buffer after write/read: ## See also -[Stream I/O](../../c-runtime-library/stream-i-o.md)\ +[Stream I/O](../stream-i-o.md)\ [`fwrite`](fwrite.md)\ [`_read`](read.md) diff --git a/docs/c-runtime-library/reference/fread.md b/docs/c-runtime-library/reference/fread.md index 74c5d05c2ee..914f545d684 100644 --- a/docs/c-runtime-library/reference/fread.md +++ b/docs/c-runtime-library/reference/fread.md @@ -27,29 +27,29 @@ size_t fread( ### Parameters -*`buffer`*
+*`buffer`*\ Storage location for data. -*`size`*
+*`size`*\ Item size in bytes. -*`count`*
+*`count`*\ Maximum number of items to be read. -*`stream`*
+*`stream`*\ Pointer to **`FILE`** structure. -## Return Value +## Return value -**`fread`** returns the number of full items actually read, which may be less than *`count`* if an error occurs or if the end of the file is encountered before reaching *`count`*. Use the **`feof`** or **`ferror`** function to distinguish a read error from an end-of-file condition. If *`size`* or *`count`* is 0, **`fread`** returns 0 and the buffer contents are unchanged. If *`stream`* or *`buffer`* is a null pointer, **`fread`** invokes the invalid parameter handler, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, this function sets **`errno`** to **`EINVAL`** and returns 0. +**`fread`** returns the number of full items actually read, which may be less than *`count`* if an error occurs or if the end of the file is encountered before reaching *`count`*. Use the **`feof`** or **`ferror`** function to distinguish a read error from an end-of-file condition. If *`size`* or *`count`* is 0, **`fread`** returns 0 and the buffer contents are unchanged. If *`stream`* or *`buffer`* is a null pointer, **`fread`** invokes the invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, this function sets **`errno`** to **`EINVAL`** and returns 0. -For more information about return codes, see [`_doserrno`, `errno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). +For more information about return codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks -The **`fread`** function reads up to *`count`* items of *`size`* bytes from the input *`stream`* and stores them in *`buffer`*. The file pointer associated with *`stream`* (if there's one) is increased by the number of bytes actually read. If the given stream is opened in [text mode](../../c-runtime-library/text-and-binary-mode-file-i-o.md), Windows-style newlines are converted into Unix-style newlines. That is, carriage return-line feed (CRLF) pairs are replaced by single line feed (LF) characters. The replacement has no effect on the file pointer or the return value. The file-pointer position is indeterminate if an error occurs. The value of a partially read item can't be determined. +The **`fread`** function reads up to *`count`* items of *`size`* bytes from the input *`stream`* and stores them in *`buffer`*. The file pointer associated with *`stream`* (if there's one) is increased by the number of bytes actually read. If the given stream is opened in [text mode](../text-and-binary-mode-file-i-o.md), Windows-style newlines are converted into Unix-style newlines. That is, carriage return-line feed (CRLF) pairs are replaced by single line feed (LF) characters. The replacement has no effect on the file pointer or the return value. The file-pointer position is indeterminate if an error occurs. The value of a partially read item can't be determined. -When used on a text mode stream, if the amount of data requested (that is, *`size`* \* *`count`*) is greater than or equal to the internal **`FILE`** \* buffer size (by default the size is 4096 bytes, configurable by using [`setvbuf`](../../c-runtime-library/reference/setvbuf.md)), stream data is copied directly into the user-provided buffer, and newline conversion is done in that buffer. Since the converted data may be shorter than the stream data copied into the buffer, data past *`buffer`*\[*`return_value`* \* *`size`*] (where *`return_value`* is the return value from **`fread`**) may contain unconverted data from the file. For this reason, we recommend you null-terminate character data at *`buffer`*\[*`return_value`* \* *`size`*] if the intent of the buffer is to act as a C-style string. See [`fopen`](fopen-wfopen.md) for details on the effects of text mode and binary mode. +When used on a text mode stream, if the amount of data requested (that is, *`size`* \* *`count`*) is greater than or equal to the internal **`FILE`** \* buffer size (by default the size is 4096 bytes, configurable by using [`setvbuf`](./setvbuf.md)), stream data is copied directly into the user-provided buffer, and newline conversion is done in that buffer. Since the converted data may be shorter than the stream data copied into the buffer, data past *`buffer`*\[*`return_value`* \* *`size`*] (where *`return_value`* is the return value from **`fread`**) may contain unconverted data from the file. For this reason, we recommend you null-terminate character data at *`buffer`*\[*`return_value`* \* *`size`*] if the intent of the buffer is to act as a C-style string. See [`fopen`](fopen-wfopen.md) for details on the effects of text mode and binary mode. This function locks out other threads. If you need a non-locking version, use **`_fread_nolock`**. @@ -61,7 +61,7 @@ By default, this function's global state is scoped to the application. To change |--------------|---------------------| |**`fread`**|``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -115,8 +115,8 @@ Contents of buffer = zyxwvutsrqponmlkjihgfedcb ## See also -[Stream I/O](../../c-runtime-library/stream-i-o.md)
-[Text and Binary File I/O](../../c-runtime-library/text-and-binary-mode-file-i-o.md)
-[`fopen`](fopen-wfopen.md)
-[`fwrite`](fwrite.md)
-[`_read`](read.md)
+[Stream I/O](../stream-i-o.md)\ +[Text and binary mode file I/O](../text-and-binary-mode-file-i-o.md)\ +[`fopen`](fopen-wfopen.md)\ +[`fwrite`](fwrite.md)\ +[`_read`](read.md) diff --git a/docs/c-runtime-library/reference/free-dbg.md b/docs/c-runtime-library/reference/free-dbg.md index 88e437bfa06..93ac82ea82d 100644 --- a/docs/c-runtime-library/reference/free-dbg.md +++ b/docs/c-runtime-library/reference/free-dbg.md @@ -25,21 +25,21 @@ void _free_dbg( ### Parameters -*userData*
+*`userData`*\ Pointer to the allocated memory block to be freed. -*blockType*
+*`blockType`*\ Type of allocated memory block to be freed: **_CLIENT_BLOCK**, **_NORMAL_BLOCK**, or **_IGNORE_BLOCK**. ## Remarks -The **_free_dbg** function is a debug version of the [free](free.md) function. When [_DEBUG](../../c-runtime-library/debug.md) is not defined, each call to **_free_dbg** is reduced to a call to **free**. Both **free** and **_free_dbg** free a memory block in the base heap, but **_free_dbg** accommodates two debugging features: the ability to keep freed blocks in the heap's linked list to simulate low memory conditions and a block type parameter to free specific allocation types. +The **_free_dbg** function is a debug version of the [`free`](free.md) function. When [`_DEBUG`](../debug.md) is not defined, each call to **_free_dbg** is reduced to a call to **free**. Both **free** and **_free_dbg** free a memory block in the base heap, but **_free_dbg** accommodates two debugging features: the ability to keep freed blocks in the heap's linked list to simulate low memory conditions and a block type parameter to free specific allocation types. -**_free_dbg** performs a validity check on all specified files and block locations before performing the free operation. The application is not expected to provide this information. When a memory block is freed, the debug heap manager automatically checks the integrity of the buffers on either side of the user portion and issues an error report if overwriting has occurred. If the **_CRTDBG_DELAY_FREE_MEM_DF** bit field of the [_crtDbgFlag](../../c-runtime-library/crtdbgflag.md) flag is set, the freed block is filled with the value 0xDD, assigned the **_FREE_BLOCK** block type, and kept in the heap's linked list of memory blocks. +**_free_dbg** performs a validity check on all specified files and block locations before performing the free operation. The application is not expected to provide this information. When a memory block is freed, the debug heap manager automatically checks the integrity of the buffers on either side of the user portion and issues an error report if overwriting has occurred. If the **_CRTDBG_DELAY_FREE_MEM_DF** bit field of the [`_crtDbgFlag`](../crtdbgflag.md) flag is set, the freed block is filled with the value 0xDD, assigned the **_FREE_BLOCK** block type, and kept in the heap's linked list of memory blocks. -If an error occurs in freeing the memory, **errno** is set with information from the operating system on the nature of the failure. For more information, see [errno, _doserrno, _sys_errlist, and _sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +If an error occurs in freeing the memory, **errno** is set with information from the operating system on the nature of the failure. For more information, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). -For information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT Debug Heap Details](/visualstudio/debugger/crt-debug-heap-details). For information about the allocation block types and how they are used, see [Types of blocks on the debug heap](/visualstudio/debugger/crt-debug-heap-details). For information about the differences between calling a standard heap function and its debug version in a debug build of an application, see [Debug Versions of Heap Allocation Functions](/visualstudio/debugger/debug-versions-of-heap-allocation-functions). +For information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT debug heap details](/visualstudio/debugger/crt-debug-heap-details). For information about the allocation block types and how they are used, see [Types of blocks on the debug heap](/visualstudio/debugger/crt-debug-heap-details). For information about the differences between calling a standard heap function and its debug version in a debug build of an application, see [Debug versions of heap allocation functions](/visualstudio/debugger/debug-versions-of-heap-allocation-functions). ## Requirements @@ -47,13 +47,13 @@ For information about how memory blocks are allocated, initialized, and managed |-------------|---------------------| |**_free_dbg**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example -For a sample of how to use **_free_dbg**, see [crt_dbg2](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/crt/crt_dbg2). +For a sample of how to use **_free_dbg**, see [`crt_dbg2`](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/crt/crt_dbg2). ## See also -[Debug Routines](../../c-runtime-library/debug-routines.md)
-[_malloc_dbg](malloc-dbg.md)
+[Debug routines](../debug-routines.md)\ +[`_malloc_dbg`](malloc-dbg.md) diff --git a/docs/c-runtime-library/reference/free-locale.md b/docs/c-runtime-library/reference/free-locale.md index fb85c24bacb..7379ea83641 100644 --- a/docs/c-runtime-library/reference/free-locale.md +++ b/docs/c-runtime-library/reference/free-locale.md @@ -24,7 +24,7 @@ void _free_locale( ### Parameters -*locale*
+*`locale`*\ Locale object to free. ## Remarks @@ -41,9 +41,9 @@ By default, this function's global state is scoped to the application. To change |---------------|---------------------| |**_free_locale**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[_get_current_locale](get-current-locale.md)
-[_create_locale, _wcreate_locale](create-locale-wcreate-locale.md)
+[`_get_current_locale`](get-current-locale.md)\ +[`_create_locale`, `_wcreate_locale`](create-locale-wcreate-locale.md) diff --git a/docs/c-runtime-library/reference/free.md b/docs/c-runtime-library/reference/free.md index d26da42fc02..058c1aaa004 100644 --- a/docs/c-runtime-library/reference/free.md +++ b/docs/c-runtime-library/reference/free.md @@ -30,11 +30,11 @@ Previously allocated memory block to be freed. The **`free`** function deallocates a memory block (*`memblock`*) that was previously allocated by a call to **`calloc`**, **`malloc`**, or **`realloc`**. The number of freed bytes is equivalent to the number of bytes requested when the block was allocated (or reallocated, in the case of **`realloc`**). If *`memblock`* is **`NULL`**, the pointer is ignored and **`free`** immediately returns. Attempting to free an invalid pointer (a pointer to a memory block that wasn't allocated by **`calloc`**, **`malloc`**, or **`realloc`**) may affect subsequent allocation requests and cause errors. -If an error occurs in freeing the memory, **`errno`** is set with information from the operating system on the nature of the failure. For more information, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +If an error occurs in freeing the memory, **`errno`** is set with information from the operating system on the nature of the failure. For more information, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). After a memory block has been freed, [`_heapmin`](heapmin.md) minimizes the amount of free memory on the heap by coalescing the unused regions and releasing them back to the operating system. Freed memory that isn't released to the operating system is restored to the free pool and is available for allocation again. -When the application is linked with a debug version of the C run-time libraries, **`free`** resolves to [`_free_dbg`](free-dbg.md). For more information about how the heap is managed during the debugging process, see [The CRT Debug Heap](/visualstudio/debugger/crt-debug-heap-details). +When the application is linked with a debug version of the C run-time libraries, **`free`** resolves to [`_free_dbg`](free-dbg.md). For more information about how the heap is managed during the debugging process, see [The CRT debug heap](/visualstudio/debugger/crt-debug-heap-details). **`free`** is marked `__declspec(noalias)`, meaning that the function is guaranteed not to modify global variables. For more information, see [`noalias`](../../cpp/noalias.md). @@ -48,7 +48,7 @@ By default, this function's global state is scoped to the application. To change |--------------|---------------------| |**`free`**|`` and ``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -56,7 +56,7 @@ See the example for [`malloc`](malloc.md). ## See also -[Memory Allocation](../../c-runtime-library/memory-allocation.md)\ +[Memory allocation](../memory-allocation.md)\ [`_alloca`](alloca.md)\ [`calloc`](calloc.md)\ [`malloc`](malloc.md)\ diff --git a/docs/c-runtime-library/reference/freea.md b/docs/c-runtime-library/reference/freea.md index 8a52c19067a..57cb0ca355a 100644 --- a/docs/c-runtime-library/reference/freea.md +++ b/docs/c-runtime-library/reference/freea.md @@ -24,26 +24,26 @@ void _freea( ### Parameters -*memblock*
+*`memblock`*\ Previously allocated memory block to be freed. -## Return Value +## Return value None. ## Remarks -The **_freea** function deallocates a memory block (*memblock*) that was previously allocated by a call to [_malloca](malloca.md). **_freea** checks to see if the memory was allocated on the heap or the stack. If it was allocated on the stack, **_freea** does nothing. If it was allocated on the heap, the number of freed bytes is equivalent to the number of bytes requested when the block was allocated. If *memblock* is **NULL**, the pointer is ignored and **_freea** immediately returns. Attempting to free an invalid pointer (a pointer to a memory block that was not allocated by **_malloca**) might affect subsequent allocation requests and cause errors. +The **_freea** function deallocates a memory block (*`memblock`*) that was previously allocated by a call to [`_malloca`](malloca.md). **_freea** checks to see if the memory was allocated on the heap or the stack. If it was allocated on the stack, **_freea** does nothing. If it was allocated on the heap, the number of freed bytes is equivalent to the number of bytes requested when the block was allocated. If *`memblock`* is **NULL**, the pointer is ignored and **_freea** immediately returns. Attempting to free an invalid pointer (a pointer to a memory block that was not allocated by **_malloca**) might affect subsequent allocation requests and cause errors. **_freea** calls **free** internally if it finds that the memory is allocated on the heap. Whether the memory is on the heap or the stack is determined by a marker placed in memory at the address immediately preceding the allocated memory. -If an error occurs in freeing the memory, **errno** is set with information from the operating system on the nature of the failure. For more information, see [errno, _doserrno, _sys_errlist, and _sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +If an error occurs in freeing the memory, **errno** is set with information from the operating system on the nature of the failure. For more information, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). -After a memory block has been freed, [_heapmin](heapmin.md) minimizes the amount of free memory on the heap by coalescing the unused regions and releasing them back to the operating system. Freed memory that is not released to the operating system is restored to the free pool and is available for allocation again. +After a memory block has been freed, [`_heapmin`](heapmin.md) minimizes the amount of free memory on the heap by coalescing the unused regions and releasing them back to the operating system. Freed memory that is not released to the operating system is restored to the free pool and is available for allocation again. -A call to **_freea** must accompany all calls to **_malloca**. It is also an error to call **_freea** twice on the same memory. When the application is linked with a debug version of the C run-time libraries, particularly with [_malloc_dbg](malloc-dbg.md) features enabled by defining **_CRTDBG_MAP_ALLOC**, it is easier to find missing or duplicated calls to **_freea**. For more information about how the heap is managed during the debugging process, see [The CRT Debug Heap](/visualstudio/debugger/crt-debug-heap-details). +A call to **_freea** must accompany all calls to **_malloca**. It is also an error to call **_freea** twice on the same memory. When the application is linked with a debug version of the C run-time libraries, particularly with [`_malloc_dbg`](malloc-dbg.md) features enabled by defining **_CRTDBG_MAP_ALLOC**, it is easier to find missing or duplicated calls to **_freea**. For more information about how the heap is managed during the debugging process, see [The CRT debug heap](/visualstudio/debugger/crt-debug-heap-details). -**_freea** is marked `__declspec(noalias)`, meaning that the function is guaranteed not to modify global variables. For more information, see [noalias](../../cpp/noalias.md). +**_freea** is marked `__declspec(noalias)`, meaning that the function is guaranteed not to modify global variables. For more information, see [`noalias`](../../cpp/noalias.md). ## Requirements @@ -51,19 +51,19 @@ A call to **_freea** must accompany all calls to **_malloca**. It is also an err |--------------|---------------------| |**_freea**|\ and \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example -See the example for [_malloca](malloca.md). +See the example for [`_malloca`](malloca.md). ## See also -[Memory Allocation](../../c-runtime-library/memory-allocation.md)
-[_malloca](malloca.md)
-[calloc](calloc.md)
-[malloc](malloc.md)
-[_malloc_dbg](malloc-dbg.md)
-[realloc](realloc.md)
-[_free_dbg](free-dbg.md)
-[_heapmin](heapmin.md)
+[Memory allocation](../memory-allocation.md)\ +[`_malloca`](malloca.md)\ +[`calloc`](calloc.md)\ +[`malloc`](malloc.md)\ +[`_malloc_dbg`](malloc-dbg.md)\ +[`realloc`](realloc.md)\ +[`_free_dbg`](free-dbg.md)\ +[`_heapmin`](heapmin.md) diff --git a/docs/c-runtime-library/reference/freopen-s-wfreopen-s.md b/docs/c-runtime-library/reference/freopen-s-wfreopen-s.md index b4b194e2f9e..16c05c2cdb6 100644 --- a/docs/c-runtime-library/reference/freopen-s-wfreopen-s.md +++ b/docs/c-runtime-library/reference/freopen-s-wfreopen-s.md @@ -13,7 +13,7 @@ helpviewer_keywords: ["_tfreopen_s function", "_wfreopen_s function", "file poin Closes the file currently associated with `oldStream` and reassigns `stream` to the file specified by `fileName`. -These versions of [`freopen, _wfreopen`](freopen-wfreopen.md) have security enhancements, as described in [Security Features in the CRT](../../c-runtime-library/security-features-in-the-crt.md). +These versions of [`freopen, _wfreopen`](freopen-wfreopen.md) have security enhancements, as described in [Security features in the CRT](../security-features-in-the-crt.md). ## Syntax @@ -51,7 +51,7 @@ The stream to reopen. It's flushed and any files associated with it are closed. Zero on success; otherwise an error code. If an error occurs, the original file is closed and **`NULL`** is written to *`stream`* unless *`stream`* is also **`NULL`** -For more information about error codes, see [`errno, _doserrno, _sys_errlist, and _sys_nerr`](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +For more information about error codes, see [`errno, _doserrno, _sys_errlist, and _sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks @@ -59,13 +59,13 @@ The **`freopen_s`** function is typically used to attach the pre-opened streams The **`freopen_s`** function closes the file currently associated with *`stream`* and reassigns *`stream`* to the file specified by *`path`*. **`_wfreopen_s`** is a wide-character version of **`freopen_s`**; the *`path`* and *`mode`* arguments to **`_wfreopen_s`** are wide-character strings. **`_wfreopen_s`** and **`freopen_s`** behave identically otherwise. -If any of *`pFile`*, *`path`*, *`mode`*, or *`stream`* are **`NULL`**, or if *`path`* is an empty string, these 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 **`EINVAL`**. +If any of *`pFile`*, *`path`*, *`mode`*, or *`stream`* are **`NULL`**, or if *`path`* is an empty string, these 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 **`EINVAL`**. By default, this function's global state is scoped to the application. To change this behavior, see [Global state in the CRT](../global-state.md). -### Generic-Text Routine Mappings +### Generic-text routine mappings -|`TCHAR.H` routine|_`UNICODE & _MBCS` not defined|`_MBCS` defined|`_UNICODE` defined| +|`TCHAR.H` routine|`_UNICODE & _MBCS` not defined|`_MBCS` defined|`_UNICODE` defined| |---------------------|------------------------------------|--------------------|-----------------------| |**`_tfreopen_s`**|**`freopen_s`**|**`freopen_s`**|**`_wfreopen_s`**| @@ -95,9 +95,9 @@ When the **`"r+"`**, **`"w+"`**, or **`"a+"`** access type is specified, both re In text (translated) mode, carriage return-line feed (CR-LF) combinations are translated into single line feed (LF) characters on input; LF characters are translated to CR-LF combinations on output. Also, CTRL+Z is interpreted as an end-of-file character on input. In files opened for reading or for writing and reading with **`"a+"`**, the run-time library checks for a CTRL+Z at the end of the file and removes it, if possible. This is done because using [`fseek`](fseek-fseeki64.md) and [`ftell`](ftell-ftelli64.md) to move within a file may cause [`fseek`](fseek-fseeki64.md) to behave improperly near the end of the file. Don't use the **`t`** option when you want ANSI portability because it's a Microsoft extension. -If **`t`** or **`b`** isn't given in *`mode`*, the default translation mode is defined by the global variable [`_fmode`](../../c-runtime-library/fmode.md). If **`t`** or **`b`** is prefixed to the argument, the function fails and returns **`NULL`**. +If **`t`** or **`b`** isn't given in *`mode`*, the default translation mode is defined by the global variable [`_fmode`](../fmode.md). If **`t`** or **`b`** is prefixed to the argument, the function fails and returns **`NULL`**. -For a discussion of text and binary modes, see [Text and Binary Mode File I/O](../../c-runtime-library/text-and-binary-mode-file-i-o.md). +For a discussion of text and binary modes, see [Text and binary mode file I/O](../text-and-binary-mode-file-i-o.md). ## Requirements @@ -108,7 +108,7 @@ For a discussion of text and binary modes, see [Text and Binary Mode File I/O](. The console isn't supported in Universal Windows Platform (UWP) apps. The standard stream handles that are associated with the console, **`stdin`**, **`stdout`**, and **`stderr`**, must be redirected before C run-time functions can use them in UWP apps. -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -148,7 +148,7 @@ This will go to the file 'freopen.out' ## See also -[`Stream I/O`](../../c-runtime-library/stream-i-o.md)\ +[`Stream I/O`](../stream-i-o.md)\ [`freopen, _wfreopen`](freopen-wfreopen.md)\ [`fclose, _fcloseall`](fclose-fcloseall.md)\ [`_fdopen, _wfdopen`](fdopen-wfdopen.md)\ diff --git a/docs/c-runtime-library/reference/freopen-wfreopen.md b/docs/c-runtime-library/reference/freopen-wfreopen.md index 4df4c604dc3..8333950bea6 100644 --- a/docs/c-runtime-library/reference/freopen-wfreopen.md +++ b/docs/c-runtime-library/reference/freopen-wfreopen.md @@ -39,11 +39,11 @@ Type of access permitted. *`stream`*\ Pointer to **`FILE`** structure. -## Return Value +## Return value -Each of these functions returns a pointer to the newly opened file. If an error occurs, the original file is closed and the function returns a **`NULL`** pointer value. If *`path`*, *`mode`*, or *`stream`* is a null pointer, or if *filename* is an empty string, these 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 **`NULL`**. +Each of these functions returns a pointer to the newly opened file. If an error occurs, the original file is closed and the function returns a **`NULL`** pointer value. If *`path`*, *`mode`*, or *`stream`* is a null pointer, or if *`filename`* is an empty string, these 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 **`NULL`**. -For more information on these, and other, error codes, see [`_doserrno`, `errno`, `_sys_errlist`, and `_sys_nerr`](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +For more information on these, and other, error codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks @@ -53,7 +53,7 @@ The **`freopen`** function closes the file currently associated with *`stream`* 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 | |--|--|--|--| @@ -85,9 +85,9 @@ When the **`"r+"`**, **`"w+"`**, or **`"a+"`** access type is specified, both re In text (translated) mode, carriage return-line feed (CR-LF) combinations are translated into single line feed (LF) characters on input; LF characters are translated to CR-LF combinations on output. Also, CTRL+Z is interpreted as an end-of-file character on input. In files opened for reading or for writing and reading with **`"a+"`**, the run-time library checks for a CTRL+Z at the end of the file and removes it, if possible. This is done because using [`fseek`](fseek-fseeki64.md) and [`ftell`](ftell-ftelli64.md) to move within a file may cause [`fseek`](fseek-fseeki64.md) to behave improperly near the end of the file. Don't use the **`t`** option if you want ANSI portability because it's a Microsoft extension. -If **`t`** or **`b`** isn't given in *`mode`*, the default translation mode is defined by the global variable [`_fmode`](../../c-runtime-library/fmode.md). If **`t`** or **`b`** is prefixed to the argument, the function fails and returns **`NULL`**. +If **`t`** or **`b`** isn't given in *`mode`*, the default translation mode is defined by the global variable [`_fmode`](../fmode.md). If **`t`** or **`b`** is prefixed to the argument, the function fails and returns **`NULL`**. -For a discussion of text and binary modes, see [Text and Binary Mode File I/O](../../c-runtime-library/text-and-binary-mode-file-i-o.md). +For a discussion of text and binary modes, see [Text and binary mode file I/O](../text-and-binary-mode-file-i-o.md). ## Requirements @@ -96,7 +96,7 @@ For a discussion of text and binary modes, see [Text and Binary Mode File I/O](. |**`freopen`**|``| |**`_wfreopen`**|`` or ``| -The console isn't supported in Universal Windows Platform (UWP) apps. The standard stream handles that are associated with the console, **`stdin`**, **`stdout`**, and **`stderr`**, must be redirected before C run-time functions can use them in UWP apps. For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +The console isn't supported in Universal Windows Platform (UWP) apps. The standard stream handles that are associated with the console, **`stdin`**, **`stdout`**, and **`stderr`**, must be redirected before C run-time functions can use them in UWP apps. For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -135,7 +135,7 @@ This will go to the file 'freopen.out' ## See also -[Stream I/O](../../c-runtime-library/stream-i-o.md)\ +[Stream I/O](../stream-i-o.md)\ [`fclose, _fcloseall`](fclose-fcloseall.md)\ [`_fdopen, _wfdopen`](fdopen-wfdopen.md)\ [`_fileno`](fileno.md)\ diff --git a/docs/c-runtime-library/reference/frexp.md b/docs/c-runtime-library/reference/frexp.md index 54004c2d79d..9dd7da1224d 100644 --- a/docs/c-runtime-library/reference/frexp.md +++ b/docs/c-runtime-library/reference/frexp.md @@ -45,23 +45,23 @@ long double frexp( ### Parameters -*x*\ +*`x`*\ Floating-point value. -*expptr*\ +*`expptr`*\ Pointer to stored integer exponent. -## Return Value +## Return value -**frexp** returns the mantissa. If *x* is 0, the function returns 0 for both the mantissa and the exponent. If *expptr* is **NULL**, the invalid parameter handler is invoked as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, this function sets **errno** to **EINVAL** and returns 0. +**frexp** returns the mantissa. If *`x`* is 0, the function returns 0 for both the mantissa and the exponent. If *`expptr`* is **NULL**, the invalid parameter handler is invoked as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, this function sets **errno** to **EINVAL** and returns 0. ## Remarks -The **frexp** function breaks down the floating-point value (*x*) into a mantissa (*m*) and an exponent (*n*), such that the absolute value of *m* is greater than or equal to 0.5 and less than 1.0, and *x* = *m* * 2*n*. The integer exponent *n* is stored at the location pointed to by *expptr*. +The **frexp** function breaks down the floating-point value (*`x`*) into a mantissa (`m`) and an exponent (`n`), such that the absolute value of `m` is greater than or equal to 0.5 and less than 1.0, and *`x`* = `m` * 2`n`. The integer exponent `n` is stored at the location pointed to by *`expptr`*. C++ allows overloading, so you can call overloads of **frexp**. In a C program, unless you're using the \ macro to call this function, **frexp** always takes a **`double`** and an **`int`** pointer and returns a **`double`**. -If you use the \ `frexp()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../../c-runtime-library/tgmath.md) for details. +If you use the \ `frexp()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../tgmath.md) for details. 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). @@ -72,7 +72,7 @@ By default, this function's global state is scoped to the application. To change |**frexp**, **frexpf**, **frexpl**|\| |**frexp** macro | \ | -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -101,6 +101,6 @@ frexp( 16.400000, &n ) = 0.512500, n = 5 ## See also -[Floating-Point Support](../../c-runtime-library/floating-point-support.md)
-[ldexp](ldexp.md)
-[modf, modff, modfl](modf-modff-modfl.md)
+[Math and floating-point support](../floating-point-support.md)\ +[`ldexp`](ldexp.md)\ +[`modf`, `modff`, `modfl`](modf-modff-modfl.md) diff --git a/docs/c-runtime-library/reference/fscanf-fscanf-l-fwscanf-fwscanf-l.md b/docs/c-runtime-library/reference/fscanf-fscanf-l-fwscanf-fwscanf-l.md index 6aef615ac89..b40daa453ca 100644 --- a/docs/c-runtime-library/reference/fscanf-fscanf-l-fwscanf-fwscanf-l.md +++ b/docs/c-runtime-library/reference/fscanf-fscanf-l-fwscanf-fwscanf-l.md @@ -54,11 +54,11 @@ Optional arguments. *`locale`*\ The locale to use. -## Return Value +## Return value Each of these functions returns the number of fields successfully converted and assigned; the return value doesn't include fields that were read but not assigned. A return value of 0 indicates that no fields were assigned. If an error occurs, or if the end of the file stream is reached before the first conversion, the return value is **`EOF`** for **`fscanf`** and **`fwscanf`**. -These functions validate their parameters. If *`stream`* or *`format`* is a `NULL` pointer, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, these functions return **`EOF`** and set **`errno`** to **`EINVAL`**. +These functions validate their parameters. If *`stream`* or *`format`* is a `NULL` pointer, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, these functions return **`EOF`** and set **`errno`** to **`EINVAL`**. ## Remarks @@ -68,14 +68,14 @@ The **`fscanf`** function reads data from the current position of *`stream`* int The versions of these functions with the **`_l`** suffix are identical except that they use the locale parameter passed in instead of the current thread locale. -### Generic-Text Routine Mappings +### Generic-text routine mappings |`TCHAR.H` routine|`_UNICODE & _MBCS` not defined|`_MBCS` defined|`_UNICODE` defined| |---------------------|------------------------------------|--------------------|-----------------------| |**`_ftscanf`**|**`fscanf`**|**`fscanf`**|**`fwscanf`**| |**`_ftscanf_l`**|**`_fscanf_l`**|**`_fscanf_l`**|**`_fwscanf_l`**| -For more information, see [Format Specification Fields - `scanf` functions and `wscanf` Functions](../../c-runtime-library/format-specification-fields-scanf-and-wscanf-functions.md). +For more information, see [Format specification fields: `scanf` and `wscanf` functions](../format-specification-fields-scanf-and-wscanf-functions.md). ## Requirements @@ -84,7 +84,7 @@ For more information, see [Format Specification Fields - `scanf` functions and ` |**`fscanf`**, **`_fscanf_l`**|``| |**`fwscanf`**, **`_fwscanf_l`**|`` or ``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -147,7 +147,7 @@ x ## See also -[Stream I/O](../../c-runtime-library/stream-i-o.md)\ +[Stream I/O](../stream-i-o.md)\ [`_cscanf`, `_cscanf_l`, `_cwscanf`, `_cwscanf_l`](cscanf-cscanf-l-cwscanf-cwscanf-l.md)\ [`fprintf`, `_fprintf_l`, `fwprintf`, `_fwprintf_l`](fprintf-fprintf-l-fwprintf-fwprintf-l.md)\ [`scanf`, `_scanf_l`, `wscanf`, `_wscanf_l`](scanf-scanf-l-wscanf-wscanf-l.md)\ diff --git a/docs/c-runtime-library/reference/fscanf-s-fscanf-s-l-fwscanf-s-fwscanf-s-l.md b/docs/c-runtime-library/reference/fscanf-s-fscanf-s-l-fwscanf-s-fwscanf-s-l.md index 4b22a866c66..76aa159481c 100644 --- a/docs/c-runtime-library/reference/fscanf-s-fscanf-s-l-fwscanf-s-fwscanf-s-l.md +++ b/docs/c-runtime-library/reference/fscanf-s-fscanf-s-l-fwscanf-s-fwscanf-s-l.md @@ -12,7 +12,7 @@ ms.assetid: b6e88194-714b-4322-be82-1cc0b343fe01 --- # `fscanf_s`, `_fscanf_s_l`, `fwscanf_s`, `_fwscanf_s_l` -Reads formatted data from a stream. These versions of [`fscanf`, `_fscanf_l`, `fwscanf`, `_fwscanf_l`](fscanf-fscanf-l-fwscanf-fwscanf-l.md) have security enhancements, as described in [Security Features in the CRT](../../c-runtime-library/security-features-in-the-crt.md). +Reads formatted data from a stream. These versions of [`fscanf`, `_fscanf_l`, `fwscanf`, `_fwscanf_l`](fscanf-fscanf-l-fwscanf-fwscanf-l.md) have security enhancements, as described in [Security features in the CRT](../security-features-in-the-crt.md). ## Syntax @@ -43,36 +43,36 @@ int _fwscanf_s_l( ### Parameters -*`stream`*
+*`stream`*\ Pointer to **`FILE`** structure. -*`format`*
+*`format`*\ Format-control string. -*`argument`*
+*`argument`*\ Optional arguments. -*`locale`*
+*`locale`*\ The locale to use. -## Return Value +## Return value Each of these functions returns the number of fields that are successfully converted and assigned; the return value does not include fields that were read but not assigned. A return value of 0 indicates that no fields were assigned. If an error occurs, or if the end of the file stream is reached before the first conversion, the return value is **`EOF`** for **`fscanf_s`** and **`fwscanf_s`**. -These functions validate their parameters. If *`stream`* is an invalid file pointer, or *`format`* is a null pointer, these 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 return **`EOF`** and set **`errno`** to **`EINVAL`**. +These functions validate their parameters. If *`stream`* is an invalid file pointer, or *`format`* is a null pointer, these functions invoke the invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, these functions return **`EOF`** and set **`errno`** to **`EINVAL`**. ## Remarks -The **`fscanf_s`** function reads data from the current position of *`stream`* into the locations that are given by *`argument`* (if any). Each *`argument`* must be a pointer to a variable of a type that corresponds to a type specifier in *`format`*. *`format`* controls the interpretation of the input fields and has the same form and function as the *format* argument for **`scanf_s`**; see [Format Specification Fields: scanf and wscanf Functions](../../c-runtime-library/format-specification-fields-scanf-and-wscanf-functions.md) for a description of *format*. **`fwscanf_s`** is a wide-character version of **`fscanf_s`**; the format argument to **`fwscanf_s`** is a wide-character string. These functions behave identically if the stream is opened in ANSI mode. **`fscanf_s`** doesn't currently support input from a UNICODE stream. +The **`fscanf_s`** function reads data from the current position of *`stream`* into the locations that are given by *`argument`* (if any). Each *`argument`* must be a pointer to a variable of a type that corresponds to a type specifier in *`format`*. *`format`* controls the interpretation of the input fields and has the same form and function as the *`format`* argument for **`scanf_s`**; see [Format specification fields: `scanf` and `wscanf` functions](../format-specification-fields-scanf-and-wscanf-functions.md) for a description of *`format`*. **`fwscanf_s`** is a wide-character version of **`fscanf_s`**; the format argument to **`fwscanf_s`** is a wide-character string. These functions behave identically if the stream is opened in ANSI mode. **`fscanf_s`** doesn't currently support input from a UNICODE stream. -The main difference between the more secure functions (that have the **`_s`** suffix) and the other versions is that the more secure functions require the size in characters of each **`c`**, **`C`**, **`s`**, **`S`**, and **`[`** type field to be passed as an argument immediately following the variable. For more information, see [`scanf_s`, `_scanf_s_l`, `wscanf_s`, `_wscanf_s_l`](scanf-s-scanf-s-l-wscanf-s-wscanf-s-l.md) and [`scanf` Width Specification](../../c-runtime-library/scanf-width-specification.md). +The main difference between the more secure functions (that have the **`_s`** suffix) and the other versions is that the more secure functions require the size in characters of each **`c`**, **`C`**, **`s`**, **`S`**, and **`[`** type field to be passed as an argument immediately following the variable. For more information, see [`scanf_s`, `_scanf_s_l`, `wscanf_s`, `_wscanf_s_l`](scanf-s-scanf-s-l-wscanf-s-wscanf-s-l.md) and [`scanf` Width Specification](../scanf-width-specification.md). > [!NOTE] > The size parameter is of type **`unsigned`**, not **`size_t`**. The versions of these functions that have the **`_l`** suffix are identical except that they use the locale parameter that's passed in instead of the current thread locale. -### Generic-Text Routine Mappings +### Generic-text routine mappings |`TCHAR.H` routine|`_UNICODE` & `_MBCS` not defined|`_MBCS` defined|`_UNICODE` defined| |---------------------|------------------------------------|--------------------|-----------------------| @@ -86,7 +86,7 @@ The versions of these functions that have the **`_l`** suffix are identical exce |**`fscanf_s`**, **`_fscanf_s_l`**|``| |**`fwscanf_s`**, **`_fwscanf_s_l`**|`` or ``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -145,9 +145,9 @@ x ## See also -[Stream I/O](../../c-runtime-library/stream-i-o.md)
-[`_cscanf_s`, `_cscanf_s_l`, `_cwscanf_s`, `_cwscanf_s_l`](cscanf-s-cscanf-s-l-cwscanf-s-cwscanf-s-l.md)
-[`fprintf_s`, `_fprintf_s_l`, `fwprintf_s`, `_fwprintf_s_l`](fprintf-s-fprintf-s-l-fwprintf-s-fwprintf-s-l.md)
-[`scanf_s`, `_scanf_s_l`, `wscanf_s`, `_wscanf_s_l`](scanf-s-scanf-s-l-wscanf-s-wscanf-s-l.md)
-[`sscanf_s`, `_sscanf_s_l`, `swscanf_s`, `_swscanf_s_l`](sscanf-s-sscanf-s-l-swscanf-s-swscanf-s-l.md)
-[`fscanf`, `_fscanf_l`, `fwscanf`, `_fwscanf_l`](fscanf-fscanf-l-fwscanf-fwscanf-l.md)
+[Stream I/O](../stream-i-o.md)\ +[`_cscanf_s`, `_cscanf_s_l`, `_cwscanf_s`, `_cwscanf_s_l`](cscanf-s-cscanf-s-l-cwscanf-s-cwscanf-s-l.md)\ +[`fprintf_s`, `_fprintf_s_l`, `fwprintf_s`, `_fwprintf_s_l`](fprintf-s-fprintf-s-l-fwprintf-s-fwprintf-s-l.md)\ +[`scanf_s`, `_scanf_s_l`, `wscanf_s`, `_wscanf_s_l`](scanf-s-scanf-s-l-wscanf-s-wscanf-s-l.md)\ +[`sscanf_s`, `_sscanf_s_l`, `swscanf_s`, `_swscanf_s_l`](sscanf-s-sscanf-s-l-swscanf-s-swscanf-s-l.md)\ +[`fscanf`, `_fscanf_l`, `fwscanf`, `_fwscanf_l`](fscanf-fscanf-l-fwscanf-fwscanf-l.md) diff --git a/docs/c-runtime-library/reference/fseek-fseeki64.md b/docs/c-runtime-library/reference/fseek-fseeki64.md index abb8af32501..a4eeaf97629 100644 --- a/docs/c-runtime-library/reference/fseek-fseeki64.md +++ b/docs/c-runtime-library/reference/fseek-fseeki64.md @@ -31,18 +31,18 @@ int _fseeki64( ### Parameters -*`stream`*
+*`stream`*\ Pointer to **`FILE`** structure. -*`offset`*
+*`offset`*\ Number of bytes from *`origin`*. -*`origin`*
+*`origin`*\ Initial position. -## Return Value +## Return value -If successful, **`fseek`** and **`_fseeki64`** returns 0. Otherwise, it returns a nonzero value. On devices incapable of seeking, the return value is undefined. If *`stream`* is a null pointer, or if *`origin`* is not one of allowed values described below, **`fseek`** and **`_fseeki64`** 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. +If successful, **`fseek`** and **`_fseeki64`** returns 0. Otherwise, it returns a nonzero value. On devices incapable of seeking, the return value is undefined. If *`stream`* is a null pointer, or if *`origin`* is not one of allowed values described below, **`fseek`** and **`_fseeki64`** 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. ## Remarks @@ -79,7 +79,7 @@ By default, this function's global state is scoped to the application. To change |**`fseek`**|``| |**`_fseeki64`**|``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -123,8 +123,8 @@ This is the file 'fseek.out'. ## See also -[Stream I/O](../../c-runtime-library/stream-i-o.md)
-[`fopen`, `_wfopen`](fopen-wfopen.md)
-[`ftell`, `_ftelli64`](ftell-ftelli64.md)
-[`_lseek`, `_lseeki64`](lseek-lseeki64.md)
-[`rewind`](rewind.md)
+[Stream I/O](../stream-i-o.md)\ +[`fopen`, `_wfopen`](fopen-wfopen.md)\ +[`ftell`, `_ftelli64`](ftell-ftelli64.md)\ +[`_lseek`, `_lseeki64`](lseek-lseeki64.md)\ +[`rewind`](rewind.md) diff --git a/docs/c-runtime-library/reference/fseek-nolock-fseeki64-nolock.md b/docs/c-runtime-library/reference/fseek-nolock-fseeki64-nolock.md index 8e465ba6c18..e4a591831a9 100644 --- a/docs/c-runtime-library/reference/fseek-nolock-fseeki64-nolock.md +++ b/docs/c-runtime-library/reference/fseek-nolock-fseeki64-nolock.md @@ -31,22 +31,22 @@ int _fseeki64_nolock( ### Parameters -*stream*
+*`stream`*\ Pointer to the **FILE** structure. -*offset*
-Number of bytes from *origin*. +*`offset`*\ +Number of bytes from *`origin`*. -*origin*
+*`origin`*\ Initial position. -## Return Value +## Return value -Same as [fseek](fseek-fseeki64.md) and [_fseeki64](fseek-fseeki64.md), respectively. +Same as [`fseek`](fseek-fseeki64.md) and [`_fseeki64`](fseek-fseeki64.md), respectively. ## Remarks -These functions are the non-locking versions of [fseek](fseek-fseeki64.md) and [_fseeki64](fseek-fseeki64.md), respectively. These are identical to [fseek](fseek-fseeki64.md) and [_fseeki64](fseek-fseeki64.md) except that they are not protected from interference by other threads. These functions might be faster because they do not incur the overhead of locking out other threads. Use these functions only in thread-safe contexts such as single-threaded applications or where the calling scope already handles thread isolation. +These functions are the non-locking versions of [`fseek`](fseek-fseeki64.md) and [`_fseeki64`](fseek-fseeki64.md), respectively. These are identical to [`fseek`](fseek-fseeki64.md) and [`_fseeki64`](fseek-fseeki64.md) except that they are not protected from interference by other threads. These functions might be faster because they do not incur the overhead of locking out other threads. Use these functions only in thread-safe contexts such as single-threaded applications or where the calling scope already handles thread isolation. 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). @@ -56,11 +56,11 @@ By default, this function's global state is scoped to the application. To change |--------------|---------------------| |**_fseek_nolock**, **_fseeki64_nolock**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Stream I/O](../../c-runtime-library/stream-i-o.md)
-[ftell, _ftelli64](ftell-ftelli64.md)
-[_lseek, _lseeki64](lseek-lseeki64.md)
-[rewind](rewind.md)
+[Stream I/O](../stream-i-o.md)\ +[`ftell`, `_ftelli64`](ftell-ftelli64.md)\ +[`_lseek`, `_lseeki64`](lseek-lseeki64.md)\ +[`rewind`](rewind.md) diff --git a/docs/c-runtime-library/reference/fsetpos.md b/docs/c-runtime-library/reference/fsetpos.md index 542a7e7fb78..40118f58233 100644 --- a/docs/c-runtime-library/reference/fsetpos.md +++ b/docs/c-runtime-library/reference/fsetpos.md @@ -25,21 +25,21 @@ int fsetpos( ### Parameters -*stream*
+*`stream`*\ Pointer to **FILE** structure. -*pos*
+*`pos`*\ Position-indicator storage. -## Return Value +## Return value -If successful, **fsetpos** returns 0. On failure, the function returns a nonzero value and sets **errno** to one of the following manifest constants (defined in ERRNO.H): **EBADF**, which means the file isn't accessible or the object that *stream* points to isn't a valid file structure; or **EINVAL**, which means an invalid value for *stream* or *pos* was passed. If an invalid parameter is passed in, these functions invoke the invalid parameter handler, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). +If successful, **fsetpos** returns 0. On failure, the function returns a nonzero value and sets **errno** to one of the following manifest constants (defined in ERRNO.H): **EBADF**, which means the file isn't accessible or the object that *`stream`* points to isn't a valid file structure; or **EINVAL**, which means an invalid value for *`stream`* or *`pos`* was passed. If an invalid parameter is passed in, these functions invoke the invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). -For more information about return codes, see [`_doserrno`, `errno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). +For more information about return codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks -The **fsetpos** function sets the file-position indicator for *stream* to the value of *pos*, which is obtained in a prior call to **fgetpos** against *stream*. The function clears the end-of-file indicator and undoes any effects of [ungetc](ungetc-ungetwc.md) on *stream*. After a call to **fsetpos**, the next operation on *stream* may be either input or output. +The **fsetpos** function sets the file-position indicator for *`stream`* to the value of *`pos`*, which is obtained in a prior call to **fgetpos** against *`stream`*. The function clears the end-of-file indicator and undoes any effects of [`ungetc`](ungetc-ungetwc.md) on *`stream`*. After a call to **fsetpos**, the next operation on *`stream`* may be either input or output. 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). @@ -49,13 +49,13 @@ By default, this function's global state is scoped to the application. To change |--------------|---------------------| |**fsetpos**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example -See the example for [fgetpos](fgetpos.md). +See the example for [`fgetpos`](fgetpos.md). ## See also -[Stream I/O](../../c-runtime-library/stream-i-o.md)
-[fgetpos](fgetpos.md)
+[Stream I/O](../stream-i-o.md)\ +[`fgetpos`](fgetpos.md) diff --git a/docs/c-runtime-library/reference/fsopen-wfsopen.md b/docs/c-runtime-library/reference/fsopen-wfsopen.md index d463a8cc541..aefaf1aca85 100644 --- a/docs/c-runtime-library/reference/fsopen-wfsopen.md +++ b/docs/c-runtime-library/reference/fsopen-wfsopen.md @@ -31,26 +31,26 @@ FILE *_wfsopen( ### Parameters -*`filename`*
+*`filename`*\ Name of the file to open. -*`mode`*
+*`mode`*\ Type of access permitted. -*`shflag`*
+*`shflag`*\ Type of sharing allowed. -## Return Value +## Return value -Each of these functions returns a pointer to the stream. A null pointer value indicates an error. If *`filename`* or *`mode`* is **`NULL`** or an empty string, these 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 return **`NULL`** and set **`errno`** to **`EINVAL`**. +Each of these functions returns a pointer to the stream. A null pointer value indicates an error. If *`filename`* or *`mode`* is **`NULL`** or an empty string, these functions invoke the 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`**. -For more information about these and other error codes, see [`_doserrno`, `errno`, `_sys_errlist`, and `_sys_nerr`](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +For more information about these and other error codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks The **`_fsopen`** function opens the file specified by *`filename`* as a stream and prepares the file for subsequent shared reading or writing, as defined by the mode and *`shflag`* arguments. **`_wfsopen`** is a wide-character version of **`_fsopen`**; the *`filename`* and *`mode`* arguments to **`_wfsopen`** are wide-character strings. **`_wfsopen`** and **`_fsopen`** behave identically otherwise. -The character string *mode* specifies the type of access requested for the file, as shown in the following table. +The character string *`mode`* specifies the type of access requested for the file, as shown in the following table. |Term|Definition| |----------|----------------| @@ -74,7 +74,7 @@ When a file is opened with the **"`a`"** or **"`a+`"** access type, all write op |**`T`**|Specifies a file as temporary. If possible, it is not flushed to disk.| |**`D`**|Specifies a file as temporary. It is deleted when the last file pointer is closed.| -If **`t`** or **`b`** is not given in *`mode`*, the translation mode is defined by the default-mode variable **`_fmode`**. If **`t`** or **`b`** is prefixed to the argument, the function fails and returns **`NULL`**. For a discussion of text and binary modes, see [Text and Binary Mode File I/O](../../c-runtime-library/text-and-binary-mode-file-i-o.md). +If **`t`** or **`b`** is not given in *`mode`*, the translation mode is defined by the default-mode variable **`_fmode`**. If **`t`** or **`b`** is prefixed to the argument, the function fails and returns **`NULL`**. For a discussion of text and binary modes, see [Text and binary mode file I/O](../text-and-binary-mode-file-i-o.md). The argument *`shflag`* is a constant expression consisting of one of the following manifest constants, defined in `Share.h`. @@ -88,7 +88,7 @@ The argument *`shflag`* is a constant expression consisting of one of the follow 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| |---------------------|--------------------------------------|--------------------|-----------------------| @@ -135,13 +135,13 @@ No one else in the network can write to this file until we are done. ## See also -[Stream I/O](../../c-runtime-library/stream-i-o.md)
-[`fclose`, `_fcloseall`](fclose-fcloseall.md)
-[`_fdopen`, `_wfdopen`](fdopen-wfdopen.md)
-[`ferror`](ferror.md)
-[`_fileno`](fileno.md)
-[`fopen`, `_wfopen`](fopen-wfopen.md)
-[`freopen`, `_wfreopen`](freopen-wfreopen.md)
-[`_open`, `_wopen`](open-wopen.md)
-[`_setmode`](setmode.md)
-[`_sopen`, `_wsopen`](sopen-wsopen.md)
+[Stream I/O](../stream-i-o.md)\ +[`fclose`, `_fcloseall`](fclose-fcloseall.md)\ +[`_fdopen`, `_wfdopen`](fdopen-wfdopen.md)\ +[`ferror`](ferror.md)\ +[`_fileno`](fileno.md)\ +[`fopen`, `_wfopen`](fopen-wfopen.md)\ +[`freopen`, `_wfreopen`](freopen-wfreopen.md)\ +[`_open`, `_wopen`](open-wopen.md)\ +[`_setmode`](setmode.md)\ +[`_sopen`, `_wsopen`](sopen-wsopen.md) diff --git a/docs/c-runtime-library/reference/fstat-fstat32-fstat64-fstati64-fstat32i64-fstat64i32.md b/docs/c-runtime-library/reference/fstat-fstat32-fstat64-fstati64-fstat32i64-fstat64i32.md index cdf40533ea0..c3fb53c11fb 100644 --- a/docs/c-runtime-library/reference/fstat-fstat32-fstat64-fstati64-fstat32i64-fstat64i32.md +++ b/docs/c-runtime-library/reference/fstat-fstat32-fstat64-fstati64-fstat32i64-fstat64i32.md @@ -50,9 +50,9 @@ File descriptor of the open file. *`buffer`*\ Pointer to the structure to store results. -## Return Value +## Return value -Returns 0 if the file-status information is obtained. A return value of -1 indicates an error. If the file descriptor is invalid or *`buffer`* is **`NULL`**, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, **`errno`** is set to **`EBADF`**, in the case of an invalid file descriptor, or to **`EINVAL`**, if *`buffer`* is **`NULL`**. +Returns 0 if the file-status information is obtained. A return value of -1 indicates an error. If the file descriptor is invalid or *`buffer`* is **`NULL`**, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, **`errno`** is set to **`EBADF`**, in the case of an invalid file descriptor, or to **`EINVAL`**, if *`buffer`* is **`NULL`**. ## Remarks @@ -71,7 +71,7 @@ The **`_fstat`** function obtains information about the open file associated wit If *`fd`* refers to a device, the **`st_atime`**, **`st_ctime`**, **`st_mtime`**, and **`st_size`** fields aren't meaningful. -Because `Stat.h` uses the [`_dev_t`](../../c-runtime-library/standard-types.md) type, which is defined in `Types.h`, you must include `Types.h` before `Stat.h` in your code. +Because `Stat.h` uses the [`_dev_t`](../standard-types.md) type, which is defined in `Types.h`, you must include `Types.h` before `Stat.h` in your code. **`_fstat64`**, which uses the **`__stat64`** structure, allows file-creation dates to be expressed up through 23:59:59, December 31, 3000, UTC; whereas the other functions only represent dates through 23:59:59 January 18, 2038, UTC. Midnight, January 1, 1970, is the lower bound of the date range for all these functions. @@ -81,7 +81,7 @@ Variations of these functions support 32-bit or 64-bit time types and 32-bit or 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). -### Time Type and File Length Type Variations of `_stat` +### Time type and file length type variations of `_stat` |Functions|`_USE_32BIT_TIME_T` defined?|Time type|File length type| |---------------|------------------------------------|---------------|----------------------| @@ -105,7 +105,7 @@ By default, this function's global state is scoped to the application. To change |**`_fstat32i64`**|`` and ``| |**`_fstat64i32`**|`` and ``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -174,8 +174,8 @@ Time modified : Wed May 07 15:25:11 2003 ## See also -[File Handling](../../c-runtime-library/file-handling.md)\ +[File handling](../file-handling.md)\ [`_access`, `_waccess`](access-waccess.md)\ [`_chmod`, `_wchmod`](chmod-wchmod.md)\ [`_filelength`, `_filelengthi64`](filelength-filelengthi64.md)\ -[`_stat`, `_wstat` Functions](stat-functions.md) +[`_stat`, `_wstat` functions](stat-functions.md) diff --git a/docs/c-runtime-library/reference/ftell-ftelli64.md b/docs/c-runtime-library/reference/ftell-ftelli64.md index 1cbc7f681c3..41738a4a1d2 100644 --- a/docs/c-runtime-library/reference/ftell-ftelli64.md +++ b/docs/c-runtime-library/reference/ftell-ftelli64.md @@ -29,11 +29,11 @@ __int64 _ftelli64( *`stream`*\ Target **`FILE`** structure. -## Return Value +## Return value -**`ftell`** and **`_ftelli64`** return the current file position. The value returned by **`ftell`** and **`_ftelli64`** may not reflect the physical byte offset for streams opened in text mode, because text mode causes carriage return-line feed translation. Use **`ftell`** with [`fseek`](fseek-fseeki64.md) or **`_ftelli64`** with [`_fseeki64`](fseek-fseeki64.md) to return to file locations correctly. On error, **`ftell`** and **`_ftelli64`** invoke the invalid parameter handler, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, these functions return -1L and set **`errno`** to one of two constants, defined in `ERRNO.H`. The **`EBADF`** constant means the *`stream`* argument isn't a valid file pointer value or doesn't refer to an open file. **`EINVAL`** means an invalid *`stream`* argument was passed to the function. On devices incapable of seeking (such as terminals and printers), or when *`stream`* doesn't refer to an open file, the return value is undefined. +**`ftell`** and **`_ftelli64`** return the current file position. The value returned by **`ftell`** and **`_ftelli64`** may not reflect the physical byte offset for streams opened in text mode, because text mode causes carriage return-line feed translation. Use **`ftell`** with [`fseek`](fseek-fseeki64.md) or **`_ftelli64`** with [`_fseeki64`](fseek-fseeki64.md) to return to file locations correctly. On error, **`ftell`** and **`_ftelli64`** invoke the invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, these functions return -1L and set **`errno`** to one of two constants, defined in `ERRNO.H`. The **`EBADF`** constant means the *`stream`* argument isn't a valid file pointer value or doesn't refer to an open file. **`EINVAL`** means an invalid *`stream`* argument was passed to the function. On devices incapable of seeking (such as terminals and printers), or when *`stream`* doesn't refer to an open file, the return value is undefined. -For more information about return codes, see [`_doserrno`, `errno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). +For more information about return codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks @@ -54,7 +54,7 @@ By default, this function's global state is scoped to the application. To change |**`ftell`**|``|``| |**`_ftelli64`**|``|``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -92,7 +92,7 @@ Position after trying to read 100 bytes: 100 ## See also -[Stream I/O](../../c-runtime-library/stream-i-o.md)\ +[Stream I/O](../stream-i-o.md)\ [`fopen`, `_wfopen`](fopen-wfopen.md)\ [`fgetpos`](fgetpos.md)\ [`fseek`, `_fseeki64`](fseek-fseeki64.md)\ diff --git a/docs/c-runtime-library/reference/ftell-nolock-ftelli64-nolock.md b/docs/c-runtime-library/reference/ftell-nolock-ftelli64-nolock.md index 5bfa54424e9..4950421354a 100644 --- a/docs/c-runtime-library/reference/ftell-nolock-ftelli64-nolock.md +++ b/docs/c-runtime-library/reference/ftell-nolock-ftelli64-nolock.md @@ -27,12 +27,12 @@ __int64 _ftelli64_nolock( ### Parameters -*stream*
+*`stream`*\ Target the **FILE** structure. -## Return Value +## Return value -Same as **ftell** and **_ftelli64**. For more information, see [ftell, _ftelli64](ftell-ftelli64.md). +Same as **ftell** and **_ftelli64**. For more information, see [`ftell`, `_ftelli64`](ftell-ftelli64.md). ## Remarks @@ -47,12 +47,12 @@ By default, this function's global state is scoped to the application. To change |**ftell_nolock**|\|\| |**_ftelli64_nolock**|\|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Stream I/O](../../c-runtime-library/stream-i-o.md)
-[fgetpos](fgetpos.md)
-[fseek, _fseeki64](fseek-fseeki64.md)
-[_lseek, _lseeki64](lseek-lseeki64.md)
-[ftell, _ftelli64](ftell-ftelli64.md)
+[Stream I/O](../stream-i-o.md)\ +[`fgetpos`](fgetpos.md)\ +[`fseek`, `_fseeki64`](fseek-fseeki64.md)\ +[`_lseek`, `_lseeki64`](lseek-lseeki64.md)\ +[`ftell`, `_ftelli64`](ftell-ftelli64.md) diff --git a/docs/c-runtime-library/reference/ftime-ftime32-ftime64.md b/docs/c-runtime-library/reference/ftime-ftime32-ftime64.md index e078f99efb6..16231b45784 100644 --- a/docs/c-runtime-library/reference/ftime-ftime32-ftime64.md +++ b/docs/c-runtime-library/reference/ftime-ftime32-ftime64.md @@ -12,7 +12,7 @@ ms.assetid: 96bc464c-3bcd-41d5-a212-8bbd836b814a --- # _ftime, _ftime32, _ftime64 -Get the current time. More secure versions of these functions are available; see [_ftime_s, _ftime32_s, _ftime64_s](ftime-s-ftime32-s-ftime64-s.md). +Get the current time. More secure versions of these functions are available; see [`_ftime_s`, `_ftime32_s`, `_ftime64_s`](ftime-s-ftime32-s-ftime64-s.md). ## Syntax @@ -24,16 +24,16 @@ void _ftime64( struct __timeb64 *timeptr ); ### Parameters -*timeptr*
+*`timeptr`*\ Pointer to a **_timeb**, **__timeb32**, or **__timeb64** structure. ## Remarks -The **_ftime** function gets the current local time and stores it in the structure pointed to by *timeptr*. The **_timeb**, **__timeb32**, and **__timeb64** structures are defined in \. They contain four fields, which are listed in the following table. +The **_ftime** function gets the current local time and stores it in the structure pointed to by *`timeptr`*. The **_timeb**, **__timeb32**, and **__timeb64** structures are defined in \. They contain four fields, which are listed in the following table. |Field|Description| |-|-| -|**dstflag**|Nonzero if daylight savings time is currently in effect for the local time zone. (See [_tzset](tzset.md) for an explanation of how daylight savings time is determined.)| +|**dstflag**|Nonzero if daylight savings time is currently in effect for the local time zone. (See [`_tzset`](tzset.md) for an explanation of how daylight savings time is determined.)| |**millitm**|Fraction of a second in milliseconds.| |**time**|Time in seconds since midnight (00:00:00), January 1, 1970, coordinated universal time (UTC).| |**timezone**|Difference in minutes, moving westward, between UTC and local time. The value of **timezone** is set from the value of the global variable **_timezone** (see **_tzset**).| @@ -42,7 +42,7 @@ The **_ftime64** function, which uses the **__timeb64** structure, allows file-c The **_ftime** function is equivalent to **_ftime64**, and **_timeb** contains a 64-bit time unless **_USE_32BIT_TIME_T** is defined, in which case the old behavior is in effect; **_ftime** uses a 32-bit time and **_timeb** contains a 32-bit time. -**_ftime** validates its parameters. If passed a null pointer as *timeptr*, the function invokes the invalid parameter handler, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, the function sets **errno** to **EINVAL**. +**_ftime** validates its parameters. If passed a null pointer as *`timeptr`*, the function invokes the invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, the function sets **errno** to **EINVAL**. By default, this function's global state is scoped to the application. To change this behavior, see [Global state in the CRT](../global-state.md). @@ -54,7 +54,7 @@ By default, this function's global state is scoped to the application. To change |**_ftime32**|\ and \| |**_ftime64**|\ and \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -113,9 +113,9 @@ The time is Mon Apr 28 11:08:54.230 2003 ## See also -[Time Management](../../c-runtime-library/time-management.md)
-[asctime, _wasctime](asctime-wasctime.md)
-[ctime, _ctime32, _ctime64, _wctime, _wctime32, _wctime64](ctime-ctime32-ctime64-wctime-wctime32-wctime64.md)
-[gmtime, _gmtime32, _gmtime64](gmtime-gmtime32-gmtime64.md)
-[localtime, _localtime32, _localtime64](localtime-localtime32-localtime64.md)
-[time, _time32, _time64](time-time32-time64.md)
+[Time management](../time-management.md)\ +[`asctime`, `_wasctime`](asctime-wasctime.md)\ +[`ctime`, `_ctime32`, `_ctime64`, `_wctime`, `_wctime32`, `_wctime64`](ctime-ctime32-ctime64-wctime-wctime32-wctime64.md)\ +[`gmtime`, `_gmtime32`, `_gmtime64`](gmtime-gmtime32-gmtime64.md)\ +[`localtime`, `_localtime32`, `_localtime64`](localtime-localtime32-localtime64.md)\ +[`time`, `_time32`, `_time64`](time-time32-time64.md) diff --git a/docs/c-runtime-library/reference/ftime-s-ftime32-s-ftime64-s.md b/docs/c-runtime-library/reference/ftime-s-ftime32-s-ftime64-s.md index b7fda8e2a36..2fae04880a7 100644 --- a/docs/c-runtime-library/reference/ftime-s-ftime32-s-ftime64-s.md +++ b/docs/c-runtime-library/reference/ftime-s-ftime32-s-ftime64-s.md @@ -12,7 +12,7 @@ ms.assetid: d03080d9-a520-45be-aa65-504bdb197e8b --- # _ftime_s, _ftime32_s, _ftime64_s -Gets the current time. These are versions of [_ftime, _ftime32, _ftime64](ftime-ftime32-ftime64.md) with security enhancements as described in [Security Features in the CRT](../../c-runtime-library/security-features-in-the-crt.md). +Gets the current time. These are versions of [`_ftime`, `_ftime32`, `_ftime64`](ftime-ftime32-ftime64.md) with security enhancements as described in [Security features in the CRT](../security-features-in-the-crt.md). ## Syntax @@ -24,20 +24,20 @@ errno_t _ftime64_s( struct __timeb64 *timeptr ); ### Parameters -*timeptr*
+*`timeptr`*\ Pointer to a **_timeb**, **__timeb32**, or **__timeb64** structure. -## Return Value +## Return value -Zero if successful, an error code on failure. If *timeptr* is **NULL**, the return value is **EINVAL**. +Zero if successful, an error code on failure. If *`timeptr`* is **NULL**, the return value is **EINVAL**. ## Remarks -The **_ftime_s** function gets the current local time and stores it in the structure pointed to by *timeptr*. The **_timeb**, **__timeb32**, and **__timeb64** structures are defined in SYS\Timeb.h. They contain four fields, which are listed in the following table. +The **_ftime_s** function gets the current local time and stores it in the structure pointed to by *`timeptr`*. The **_timeb**, **__timeb32**, and **__timeb64** structures are defined in SYS\Timeb.h. They contain four fields, which are listed in the following table. |Field|Description| |-|-| -|**dstflag**|Nonzero if daylight savings time is currently in effect for the local time zone. (See [_tzset](tzset.md) for an explanation of how daylight savings time is determined.)| +|**dstflag**|Nonzero if daylight savings time is currently in effect for the local time zone. (See [`_tzset`](tzset.md) for an explanation of how daylight savings time is determined.)| |**millitm**|Fraction of a second in milliseconds.| |**time**|Time in seconds since midnight (00:00:00), January 1, 1970, coordinated universal time (UTC).| |**timezone**|Difference in minutes, moving westward, between UTC and local time. The value of **timezone** is set from the value of the global variable **_timezone** (see **_tzset**).| @@ -46,7 +46,7 @@ The **_ftime64_s** function, which uses the **__timeb64** structure, allows file The **_ftime_s** function is equivalent to **_ftime64_s**, and **_timeb** contains a 64-bit time, unless **_USE_32BIT_TIME_T** is defined, in which case the old behavior is in effect; **_ftime_s** uses a 32-bit time and **_timeb** contains a 32-bit time. -**_ftime_s** validates its parameters. If passed a null pointer as *timeptr*, the function invokes the invalid parameter handler, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, the function sets **errno** to **EINVAL**. +**_ftime_s** validates its parameters. If passed a null pointer as *`timeptr`*, the function invokes the invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, the function sets **errno** to **EINVAL**. By default, this function's global state is scoped to the application. To change this behavior, see [Global state in the CRT](../global-state.md). @@ -58,11 +58,11 @@ By default, this function's global state is scoped to the application. To change |**_ftime32_s**|\ and \| |**_ftime64_s**|\ and \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Libraries -All versions of the [C run-time libraries](../../c-runtime-library/crt-library-features.md). +All versions of the [C run-time libraries](../crt-library-features.md). ## Example @@ -119,9 +119,9 @@ The time is Mon Apr 28 11:08:54.230 2003 ## See also -[Time Management](../../c-runtime-library/time-management.md)
-[asctime, _wasctime](asctime-wasctime.md)
-[ctime, _ctime32, _ctime64, _wctime, _wctime32, _wctime64](ctime-ctime32-ctime64-wctime-wctime32-wctime64.md)
-[gmtime, _gmtime32, _gmtime64](gmtime-gmtime32-gmtime64.md)
-[localtime, _localtime32, _localtime64](localtime-localtime32-localtime64.md)
-[time, _time32, _time64](time-time32-time64.md)
+[Time management](../time-management.md)\ +[`asctime`, `_wasctime`](asctime-wasctime.md)\ +[`ctime`, `_ctime32`, `_ctime64`, `_wctime`, `_wctime32`, `_wctime64`](ctime-ctime32-ctime64-wctime-wctime32-wctime64.md)\ +[`gmtime`, `_gmtime32`, `_gmtime64`](gmtime-gmtime32-gmtime64.md)\ +[`localtime`, `_localtime32`, `_localtime64`](localtime-localtime32-localtime64.md)\ +[`time`, `_time32`, `_time64`](time-time32-time64.md) diff --git a/docs/c-runtime-library/reference/fullpath-dbg-wfullpath-dbg.md b/docs/c-runtime-library/reference/fullpath-dbg-wfullpath-dbg.md index 2f5d404992d..d111be89f58 100644 --- a/docs/c-runtime-library/reference/fullpath-dbg-wfullpath-dbg.md +++ b/docs/c-runtime-library/reference/fullpath-dbg-wfullpath-dbg.md @@ -12,7 +12,7 @@ ms.assetid: 81f72f85-07da-4f5c-866a-598e0fb03f6b --- # _fullpath_dbg, _wfullpath_dbg -Versions of [_fullpath, _wfullpath](fullpath-wfullpath.md) that use the debug version of **malloc** to allocate memory. +Versions of [`_fullpath`, `_wfullpath`](fullpath-wfullpath.md) that use the debug version of **malloc** to allocate memory. ## Syntax @@ -37,35 +37,35 @@ wchar_t *_wfullpath_dbg( ### Parameters -*absPath*
+*`absPath`*\ Pointer to a buffer containing the absolute or full path name, or **NULL**. -*relPath*
+*`relPath`*\ Relative path name. -*maxLength*
-Maximum length of the absolute path name buffer (*absPath*). This length is in bytes for **_fullpath** but in wide characters (**`wchar_t`**) for **_wfullpath**. +*`maxLength`*\ +Maximum length of the absolute path name buffer (*`absPath`*). This length is in bytes for **_fullpath** but in wide characters (**`wchar_t`**) for **_wfullpath**. -*blockType*
+*`blockType`*\ Requested type of memory block: **_CLIENT_BLOCK** or **_NORMAL_BLOCK**. -*filename*
+*`filename`*\ Pointer to the name of the source file that requested allocation operation or **NULL**. -*linenumber*
+*`linenumber`*\ Line number in the source file where the allocation operation was requested or **NULL**. -## Return Value +## Return value -Each function returns a pointer to a buffer containing the absolute path name (*absPath*). If there is an error (for example, if the value passed in *relPath* includes a drive letter that is not valid or cannot be found, or if the length of the created absolute path name (*absPath*) is greater than *maxLength*) the function returns **NULL**. +Each function returns a pointer to a buffer containing the absolute path name (*`absPath`*). If there is an error (for example, if the value passed in *`relPath`* includes a drive letter that is not valid or cannot be found, or if the length of the created absolute path name (*`absPath`*) is greater than *`maxLength`*) the function returns **NULL**. ## Remarks -The **_fullpath_dbg** and **_wfullpath_dbg** functions are identical to **_fullpath** and **_wfullpath** except that, when **_DEBUG** is defined, these functions use the debug version of **malloc**, **_malloc_dbg**, to allocate memory if **NULL** is passed as the first parameter. For information on the debugging features of **_malloc_dbg**, see [_malloc_dbg](malloc-dbg.md). +The **_fullpath_dbg** and **_wfullpath_dbg** functions are identical to **_fullpath** and **_wfullpath** except that, when **_DEBUG** is defined, these functions use the debug version of **malloc**, **_malloc_dbg**, to allocate memory if **NULL** is passed as the first parameter. For information on the debugging features of **_malloc_dbg**, see [`_malloc_dbg`](malloc-dbg.md). -You do not need to call these functions explicitly in most cases. Instead, you can define the **_CRTDBG_MAP_ALLOC** flag. When **_CRTDBG_MAP_ALLOC** is defined, calls to **_fullpath** and **_wfullpath** are remapped to **_fullpath_dbg** and **_wfullpath_dbg**, respectively, with the *blockType* set to **_NORMAL_BLOCK**. Thus, you do not need to call these functions explicitly unless you want to mark the heap blocks as **_CLIENT_BLOCK**. For more information, see [Types of blocks on the debug heap](/visualstudio/debugger/crt-debug-heap-details). +You do not need to call these functions explicitly in most cases. Instead, you can define the **_CRTDBG_MAP_ALLOC** flag. When **_CRTDBG_MAP_ALLOC** is defined, calls to **_fullpath** and **_wfullpath** are remapped to **_fullpath_dbg** and **_wfullpath_dbg**, respectively, with the *`blockType`* set to **_NORMAL_BLOCK**. Thus, you do not need to call these functions explicitly unless you want to mark the heap blocks as **_CLIENT_BLOCK**. For more information, see [Types of blocks on the debug heap](/visualstudio/debugger/crt-debug-heap-details). -### Generic-Text Routine Mappings +### Generic-text routine mappings |Tchar.h routine|_UNICODE and _MBCS not defined|_MBCS defined|_UNICODE defined| |---------------------|--------------------------------------|--------------------|-----------------------| @@ -78,10 +78,10 @@ You do not need to call these functions explicitly in most cases. Instead, you c |**_fullpath_dbg**|\| |**_wfullpath_dbg**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[File Handling](../../c-runtime-library/file-handling.md)
-[_fullpath, _wfullpath](fullpath-wfullpath.md)
-[Debug Versions of Heap Allocation Functions](/visualstudio/debugger/debug-versions-of-heap-allocation-functions)
+[File handling](../file-handling.md)\ +[`_fullpath`, `_wfullpath`](fullpath-wfullpath.md)\ +[Debug versions of heap allocation functions](/visualstudio/debugger/debug-versions-of-heap-allocation-functions) diff --git a/docs/c-runtime-library/reference/fullpath-wfullpath.md b/docs/c-runtime-library/reference/fullpath-wfullpath.md index 3712f6fa0e7..6c7820b0352 100644 --- a/docs/c-runtime-library/reference/fullpath-wfullpath.md +++ b/docs/c-runtime-library/reference/fullpath-wfullpath.md @@ -39,7 +39,7 @@ Relative path name. *`maxLength`*\ Maximum length of the absolute path name buffer (*`absPath`*). This length is in bytes for **`_fullpath`** but in wide characters (**`wchar_t`**) for **`_wfullpath`**. -## Return Value +## Return value Each of these functions returns a pointer to a buffer containing the absolute path name (*`absPath`*). If there's an error (for example, if the value passed in *`relPath`* includes a drive letter that isn't valid or can't be found, or if the length of the created absolute path name (*`absPath`*) is greater than *`maxLength`*), the function returns **`NULL`**. @@ -63,9 +63,9 @@ By default, this function's global state is scoped to the application. To change If **`_DEBUG`** and **`_CRTDBG_MAP_ALLOC`** are both defined, calls to **`_fullpath`** and **`_wfullpath`** are replaced by calls to **`_fullpath_dbg`** and **`_wfullpath_dbg`** to allow for debugging memory allocations. For more information, see [`_fullpath_dbg`, `_wfullpath_dbg`](fullpath-dbg-wfullpath-dbg.md). -This function invokes the invalid parameter handler, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md), if *`maxlen`* is less than or equal to 0. If execution is allowed to continue, this function sets **`errno`** to **`EINVAL`** and returns **`NULL`**. +This function invokes the invalid parameter handler, as described in [Parameter validation](../parameter-validation.md), if *`maxlen`* is less than or equal to 0. If execution is allowed to continue, this function sets **`errno`** to **`EINVAL`** and returns **`NULL`**. -### Generic-Text Routine Mappings +### Generic-text routine mappings |`Tchar.h` routine|`_UNICODE and _MBCS` not defined|`_MBCS` defined|`_UNICODE` defined| |---------------------|--------------------------------------|--------------------|-----------------------| @@ -80,7 +80,7 @@ If the *`absPath`* buffer is **`NULL`**, **`_fullpath`** calls [`malloc`](malloc |**`_fullpath`**|``| |**`_wfullpath`**|`` or ``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -119,7 +119,7 @@ Full path is: C:\Documents and Settings\user\test ## See also -[File Handling](../../c-runtime-library/file-handling.md)\ +[File handling](../file-handling.md)\ [`_getcwd`, `_wgetcwd`](getcwd-wgetcwd.md)\ [`_getdcwd`, `_wgetdcwd`](getdcwd-wgetdcwd.md)\ [`_makepath`, `_wmakepath`](makepath-wmakepath.md)\ diff --git a/docs/c-runtime-library/reference/futime-futime32-futime64.md b/docs/c-runtime-library/reference/futime-futime32-futime64.md index 2450558ac72..1d31e3f991d 100644 --- a/docs/c-runtime-library/reference/futime-futime32-futime64.md +++ b/docs/c-runtime-library/reference/futime-futime32-futime64.md @@ -33,19 +33,19 @@ int _futime64( ### Parameters -*fd*
+*`fd`*\ File descriptor to the open file. -*filetime*
+*`filetime`*\ Pointer to the structure containing the new modification date. -## Return Value +## Return value -Return 0 if successful. If an error occurs, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, the function returns -1 and **errno** is set to **EBADF**, indicating an invalid file descriptor, or **EINVAL**, indicating an invalid parameter. +Return 0 if successful. If an error occurs, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, the function returns -1 and **errno** is set to **EBADF**, indicating an invalid file descriptor, or **EINVAL**, indicating an invalid parameter. ## Remarks -The **_futime** routine sets the modification date and the access time on the open file associated with *fd*. **_futime** is identical to [_utime](utime-utime32-utime64-wutime-wutime32-wutime64.md), except that its argument is the file descriptor of an open file, rather than the name of a file or a path to a file. The **_utimbuf** structure contains fields for the new modification date and access time. Both fields must contain valid values. **_utimbuf32** and **_utimbuf64** are identical to **_utimbuf** except for the use of the 32-bit and 64-bit time types, respectively. **_futime** and **_utimbuf** use a 64-bit time type and **_futime** is identical in behavior to **_futime64**. If you need to force the old behavior, define **_USE_32BIT_TIME_T**. Doing this causes **_futime** to be identical in behavior to **_futime32** and causes the **_utimbuf** structure to use the 32-bit time type, making it equivalent to **__utimbuf32**. +The **_futime** routine sets the modification date and the access time on the open file associated with *`fd`*. **_futime** is identical to [`_utime`](utime-utime32-utime64-wutime-wutime32-wutime64.md), except that its argument is the file descriptor of an open file, rather than the name of a file or a path to a file. The **_utimbuf** structure contains fields for the new modification date and access time. Both fields must contain valid values. **_utimbuf32** and **_utimbuf64** are identical to **_utimbuf** except for the use of the 32-bit and 64-bit time types, respectively. **_futime** and **_utimbuf** use a 64-bit time type and **_futime** is identical in behavior to **_futime64**. If you need to force the old behavior, define **_USE_32BIT_TIME_T**. Doing this causes **_futime** to be identical in behavior to **_futime32** and causes the **_utimbuf** structure to use the 32-bit time type, making it equivalent to **__utimbuf32**. **_futime64**, which uses the **__utimbuf64** structure, can read and modify file dates through 23:59:59, December 31, 3000, UTC; whereas a call to **_futime32** fails if the date on the file is later than 23:59:59 January 18, 2038, UTC. Midnight, January 1, 1970, is the lower bound of the date range for these functions. @@ -59,7 +59,7 @@ By default, this function's global state is scoped to the application. To change |**_futime32**|\|\| |**_futime64**|\|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -103,7 +103,7 @@ int main( void ) Arbitrary file contents. ``` -### Sample Output +### Sample output ```Output Volume in drive Z has no label. @@ -127,4 +127,4 @@ File time modified ## See also -[Time Management](../../c-runtime-library/time-management.md)
+[Time management](../time-management.md) diff --git a/docs/c-runtime-library/reference/fwide.md b/docs/c-runtime-library/reference/fwide.md index e85921f0693..b3a890b1b31 100644 --- a/docs/c-runtime-library/reference/fwide.md +++ b/docs/c-runtime-library/reference/fwide.md @@ -25,15 +25,15 @@ int fwide( ### Parameters -*stream*
+*`stream`*\ Pointer to **FILE** structure (ignored). -*mode*
+*`mode`*\ The new width of the stream: positive for wide character, negative for byte, zero to leave unchanged. (This value is ignored.) -## Return Value +## Return value -This function currently just returns *mode*. +This function currently just returns *`mode`*. ## Remarks @@ -45,4 +45,4 @@ The current version of this function doesn't conform to the C Standard. |--------------|---------------------| |**fwide**|\| -For more information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more information, see [Compatibility](../compatibility.md). diff --git a/docs/c-runtime-library/reference/fwrite-nolock.md b/docs/c-runtime-library/reference/fwrite-nolock.md index 1f552809565..71786e44180 100644 --- a/docs/c-runtime-library/reference/fwrite-nolock.md +++ b/docs/c-runtime-library/reference/fwrite-nolock.md @@ -27,21 +27,21 @@ size_t _fwrite_nolock( ### Parameters -*buffer*
+*`buffer`*\ Pointer to the data to be written. -*size*
+*`size`*\ Item size in bytes. -*count*
+*`count`*\ Maximum number of items to be written. -*stream*
+*`stream`*\ Pointer to the **FILE** structure. -## Return Value +## Return value -Same as [fwrite](fwrite.md). +Same as [`fwrite`](fwrite.md). ## Remarks @@ -55,14 +55,14 @@ By default, this function's global state is scoped to the application. To change |--------------|---------------------| |**_fwrite_nolock**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example -See the example for [fread](fread.md). +See the example for [`fread`](fread.md). ## See also -[Stream I/O](../../c-runtime-library/stream-i-o.md)
-[fread](fread.md)
-[_write](write.md)
+[Stream I/O](../stream-i-o.md)\ +[`fread`](fread.md)\ +[`_write`](write.md) diff --git a/docs/c-runtime-library/reference/fwrite.md b/docs/c-runtime-library/reference/fwrite.md index 1719345695e..551216269cb 100644 --- a/docs/c-runtime-library/reference/fwrite.md +++ b/docs/c-runtime-library/reference/fwrite.md @@ -27,27 +27,27 @@ size_t fwrite( ### Parameters -*`buffer`*
+*`buffer`*\ Pointer to data to be written. -*`size`*
+*`size`*\ Item size, in bytes. -*`count`*
+*`count`*\ Maximum number of items to be written. -*`stream`*
+*`stream`*\ Pointer to **`FILE`** structure. -## Return Value +## Return value -**`fwrite`** returns the number of full items actually written, which may be less than *`count`* if an error occurs. Also, if an error occurs, the file-position indicator cannot be determined. If either *`stream`* or *`buffer`* is a null pointer, or if an odd number of bytes to be written is specified in Unicode mode, the function invokes the invalid parameter handler, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, this function sets **`errno`** to **`EINVAL`** and returns 0. +**`fwrite`** returns the number of full items actually written, which may be less than *`count`* if an error occurs. Also, if an error occurs, the file-position indicator cannot be determined. If either *`stream`* or *`buffer`* is a null pointer, or if an odd number of bytes to be written is specified in Unicode mode, the function invokes the invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, this function sets **`errno`** to **`EINVAL`** and returns 0. ## Remarks The **`fwrite`** function writes up to *`count`* items, of *`size`* length each, from *`buffer`* to the output *`stream`*. The file pointer associated with *`stream`* (if there is one) is incremented by the number of bytes actually written. If *`stream`* is opened in text mode, each line feed is replaced with a carriage return-line feed pair. The replacement has no effect on the return value. -When *`stream`* is opened in Unicode translation mode—for example, if *`stream`* is opened by calling **`fopen`** and using a mode parameter that includes **`ccs=UNICODE`**, **`ccs=UTF-16LE`**, or **`ccs=UTF-8`**, or if the mode is changed to a Unicode translation mode by using **`_setmode`** and a mode parameter that includes **`_O_WTEXT`**, **`_O_U16TEXT`**, or **`_O_U8TEXT`**—*buffer* is interpreted as a pointer to an array of **`wchar_t`** that contains UTF-16 data. An attempt to write an odd number of bytes in this mode causes a parameter validation error. +When *`stream`* is opened in Unicode translation mode—for example, if *`stream`* is opened by calling **`fopen`** and using a mode parameter that includes **`ccs=UNICODE`**, **`ccs=UTF-16LE`**, or **`ccs=UTF-8`**, or if the mode is changed to a Unicode translation mode by using **`_setmode`** and a mode parameter that includes **`_O_WTEXT`**, **`_O_U16TEXT`**, or **`_O_U8TEXT`**—*`buffer`* is interpreted as a pointer to an array of **`wchar_t`** that contains UTF-16 data. An attempt to write an odd number of bytes in this mode causes a parameter validation error. Because this function locks the calling thread, it is thread-safe. For a non-locking version, see **`_fwrite_nolock`**. @@ -59,7 +59,7 @@ By default, this function's global state is scoped to the application. To change |--------------|---------------------| |**`fwrite`**|``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -67,8 +67,8 @@ See the example for [`fread`](fread.md). ## See also -[Stream I/O](../../c-runtime-library/stream-i-o.md)
-[`_setmode`](setmode.md)
-[`fread`](fread.md)
-[`_fwrite_nolock`](fwrite-nolock.md)
-[`_write`](write.md)
+[Stream I/O](../stream-i-o.md)\ +[`_setmode`](setmode.md)\ +[`fread`](fread.md)\ +[`_fwrite_nolock`](fwrite-nolock.md)\ +[`_write`](write.md) diff --git a/docs/c-runtime-library/reference/gcvt-s.md b/docs/c-runtime-library/reference/gcvt-s.md index d602c514e54..21c84ba8d83 100644 --- a/docs/c-runtime-library/reference/gcvt-s.md +++ b/docs/c-runtime-library/reference/gcvt-s.md @@ -12,7 +12,7 @@ ms.assetid: 0a8d8a26-5940-4ae3-835e-0aa6ec1b0744 --- # _gcvt_s -Converts a floating-point value to a string. This is a version of [_gcvt](gcvt.md) with security enhancements as described in [Security Features in the CRT](../../c-runtime-library/security-features-in-the-crt.md). +Converts a floating-point value to a string. This is a version of [`_gcvt`](gcvt.md) with security enhancements as described in [Security features in the CRT](../security-features-in-the-crt.md). ## Syntax @@ -33,41 +33,41 @@ errno_t _gcvt_s( ### Parameters -*buffer*
+*`buffer`*\ Buffer to store the result of the conversion. -*sizeInBytes*
+*`sizeInBytes`*\ Size of the buffer. -*value*
+*`value`*\ Value to be converted. -*digits*
+*`digits`*\ Number of significant digits stored. -## Return Value +## Return value -Zero if successful. If a failure occurs due to an invalid parameter (see the following table for invalid values), the invalid parameter handler is invoked as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, an error code is returned. Error codes are defined in Errno.h. For a listing of these errors, see [errno, _doserrno, _sys_errlist, and _sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +Zero if successful. If a failure occurs due to an invalid parameter (see the following table for invalid values), the invalid parameter handler is invoked as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, an error code is returned. Error codes are defined in Errno.h. For a listing of these errors, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). -### Error Conditions +### Error conditions -|*buffer*|*sizeInBytes*|*value*|*digits*|Return|Value in *buffer*| +|*`buffer`*|*`sizeInBytes`*|*`value`*|*`digits`*|Return|Value in *`buffer`*| |--------------|-------------------|-------------|--------------|------------|-----------------------| |**NULL**|any|any|any|**EINVAL**|Not modified.| |Not **NULL** (points to valid memory)|zero|any|any|**EINVAL**|Not modified.| -|Not **NULL** (points to valid memory)|any|any|>= *sizeInBytes*|**EINVAL**|Not modified.| +|Not **NULL** (points to valid memory)|any|any|>= *`sizeInBytes`*|**EINVAL**|Not modified.| **Security Issues** -**_gcvt_s** can generate an access violation if *buffer* does not point to valid memory and is not **NULL**. +**_gcvt_s** can generate an access violation if *`buffer`* does not point to valid memory and is not **NULL**. ## Remarks -The **_gcvt_s** function converts a floating-point *value* to a character string (which includes a decimal point and a possible sign byte) and stores the string in *buffer*. *buffer* should be large enough to accommodate the converted value plus a terminating null character, which is appended automatically. A buffer of length **_CVTBUFSIZE** is sufficient for any floating point value. If a buffer size of *digits* + 1 is used, the function will not overwrite the end of the buffer, so be sure to supply a sufficient buffer for this operation. **_gcvt_s** attempts to produce *digits* digits in decimal format. If it cannot, it produces *digits* digits in exponential format. Trailing zeros can be suppressed in the conversion. +The **_gcvt_s** function converts a floating-point *`value`* to a character string (which includes a decimal point and a possible sign byte) and stores the string in *`buffer`*. *`buffer`* should be large enough to accommodate the converted value plus a terminating null character, which is appended automatically. A buffer of length **_CVTBUFSIZE** is sufficient for any floating point value. If a buffer size of *`digits`* + 1 is used, the function will not overwrite the end of the buffer, so be sure to supply a sufficient buffer for this operation. **_gcvt_s** attempts to produce *`digits`* digits in decimal format. If it cannot, it produces *`digits`* digits in exponential format. Trailing zeros can be suppressed in the conversion. -In C++, using this function is simplified by a template overload; the overload can infer buffer length automatically, eliminating the need to specify a size argument. For more information, see [Secure Template Overloads](../../c-runtime-library/secure-template-overloads.md). +In C++, using this function is simplified by a template overload; the overload can infer buffer length automatically, eliminating the need to specify a size argument. For more information, see [Secure template overloads](../secure-template-overloads.md). -The debug version of this function first fills the buffer with 0xFE. To disable this behavior, use [_CrtSetDebugFillThreshold](crtsetdebugfillthreshold.md). +The debug version of this function first fills the buffer with 0xFE. To disable this behavior, use [`_CrtSetDebugFillThreshold`](crtsetdebugfillthreshold.md). By default, this function's global state is scoped to the application. To change this behavior, see [Global state in the CRT](../global-state.md). @@ -77,7 +77,7 @@ By default, this function's global state is scoped to the application. To change |-------------|---------------------|---------------------| |**_gcvt_s**|\|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -112,9 +112,9 @@ Converted value: 1.2 ## See also -[Data Conversion](../../c-runtime-library/data-conversion.md)
-[Floating-Point Support](../../c-runtime-library/floating-point-support.md)
-[atof, _atof_l, _wtof, _wtof_l](atof-atof-l-wtof-wtof-l.md)
-[_ecvt_s](ecvt-s.md)
-[_fcvt_s](fcvt-s.md)
-[_gcvt](gcvt.md)
+[Data conversion](../data-conversion.md)\ +[Math and floating-point support](../floating-point-support.md)\ +[`atof`, `_atof_l`, `_wtof`, `_wtof_l`](atof-atof-l-wtof-wtof-l.md)\ +[`_ecvt_s`](ecvt-s.md)\ +[`_fcvt_s`](fcvt-s.md)\ +[`_gcvt`](gcvt.md) diff --git a/docs/c-runtime-library/reference/gcvt.md b/docs/c-runtime-library/reference/gcvt.md index a3504d1e5c5..be3f751bb5c 100644 --- a/docs/c-runtime-library/reference/gcvt.md +++ b/docs/c-runtime-library/reference/gcvt.md @@ -12,7 +12,7 @@ ms.assetid: 5761411e-c06b-409a-912f-810fe7f4bcb5 --- # _gcvt -Converts a floating-point value to a string, which it stores in a buffer. A more secure version of this function is available; see [_gcvt_s](gcvt-s.md). +Converts a floating-point value to a string, which it stores in a buffer. A more secure version of this function is available; see [`_gcvt_s`](gcvt-s.md). ## Syntax @@ -26,26 +26,26 @@ char *_gcvt( ### Parameters -*value*
+*`value`*\ Value to be converted. -*digits*
+*`digits`*\ Number of significant digits stored. -*buffer*
+*`buffer`*\ Storage location for the result. -## Return Value +## Return value **_gcvt** returns a pointer to the string of digits. ## Remarks -The **_gcvt** function converts a floating-point *value* to a character string (which includes a decimal point and a possible sign byte) and stores the string in *buffer*. The *buffer* should be large enough to accommodate the converted value plus a terminating null character, which is appended automatically. If a buffer size of *digits* + 1 is used, the function overwrites the end of the buffer. This is because the converted string includes a decimal point and can contain sign and exponent information. There is no provision for overflow. **_gcvt** attempts to produce *digits* digits in decimal format. If it cannot, it produces *digits* digits in exponential format. Trailing zeros might be suppressed in the conversion. +The **_gcvt** function converts a floating-point *`value`* to a character string (which includes a decimal point and a possible sign byte) and stores the string in *`buffer`*. The *`buffer`* should be large enough to accommodate the converted value plus a terminating null character, which is appended automatically. If a buffer size of *`digits`* + 1 is used, the function overwrites the end of the buffer. This is because the converted string includes a decimal point and can contain sign and exponent information. There is no provision for overflow. **_gcvt** attempts to produce *`digits`* digits in decimal format. If it cannot, it produces *`digits`* digits in exponential format. Trailing zeros might be suppressed in the conversion. -A *buffer* of length **_CVTBUFSIZE** is sufficient for any floating point value. +A *`buffer`* of length **_CVTBUFSIZE** is sufficient for any floating point value. -This function validates its parameters. If *buffer* is **NULL**, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, this function sets **errno** to **EINVAL** and returns **NULL**. +This function validates its parameters. If *`buffer`* is **NULL**, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, this function sets **errno** to **EINVAL** and returns **NULL**. 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). @@ -55,7 +55,7 @@ By default, this function's global state is scoped to the application. To change |-------------|---------------------| |**_gcvt**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -115,8 +115,8 @@ buffer: '-1.23456789012e-002' (19 chars) ## See also -[Data Conversion](../../c-runtime-library/data-conversion.md)
-[Floating-Point Support](../../c-runtime-library/floating-point-support.md)
-[atof, _atof_l, _wtof, _wtof_l](atof-atof-l-wtof-wtof-l.md)
-[_ecvt](ecvt.md)
-[_fcvt](fcvt.md)
+[Data conversion](../data-conversion.md)\ +[Math and floating-point support](../floating-point-support.md)\ +[`atof`, `_atof_l`, `_wtof`, `_wtof_l`](atof-atof-l-wtof-wtof-l.md)\ +[`_ecvt`](ecvt.md)\ +[`_fcvt`](fcvt.md) diff --git a/docs/c-runtime-library/reference/get-current-locale.md b/docs/c-runtime-library/reference/get-current-locale.md index a00547da3b9..bf0c344ffb1 100644 --- a/docs/c-runtime-library/reference/get-current-locale.md +++ b/docs/c-runtime-library/reference/get-current-locale.md @@ -20,7 +20,7 @@ Gets a locale object representing the current locale. _locale_t _get_current_locale(void); ``` -## Return Value +## Return value A locale object representing the current locale. @@ -36,10 +36,10 @@ The previous name of this function, **__get_current_locale** (with two leading u |-------------|---------------------| |**_get_current_locale**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[setlocale, _wsetlocale](setlocale-wsetlocale.md)
-[_create_locale, _wcreate_locale](create-locale-wcreate-locale.md)
-[_free_locale](free-locale.md)
+[`setlocale`, `_wsetlocale`](setlocale-wsetlocale.md)\ +[`_create_locale`, `_wcreate_locale`](create-locale-wcreate-locale.md)\ +[`_free_locale`](free-locale.md) diff --git a/docs/c-runtime-library/reference/get-daylight.md b/docs/c-runtime-library/reference/get-daylight.md index d5e4967708c..51ffdebdeb0 100644 --- a/docs/c-runtime-library/reference/get-daylight.md +++ b/docs/c-runtime-library/reference/get-daylight.md @@ -22,10 +22,10 @@ error_t _get_daylight( int* hours ); ### Parameters -*hours*
+*`hours`*\ The offset in hours of daylight saving time. -## Return Value +## Return value Zero if successful or an **errno** value if an error occurs. @@ -33,7 +33,7 @@ Zero if successful or an **errno** value if an error occurs. The **_get_daylight** function retrieves the number of hours in daylight saving time as an integer. If daylight saving time is in effect, the default offset is one hour (although a few regions do observe a two-hour offset). -If *hours* is **NULL**, the invalid parameter handler is invoked as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, this function sets **errno** to **EINVAL** and returns **EINVAL**. +If *`hours`* is **NULL**, the invalid parameter handler is invoked as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, this function sets **errno** to **EINVAL** and returns **EINVAL**. We recommend you use this function instead of the macro **_daylight** or the deprecated function **__daylight**. @@ -45,12 +45,12 @@ By default, this function's global state is scoped to the application. To change |-------------|---------------------| |**_get_daylight**|\| -For more information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more information, see [Compatibility](../compatibility.md). ## See also -[Time Management](../../c-runtime-library/time-management.md)
-[errno, _doserrno, _sys_errlist, and _sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md)
-[_get_dstbias](get-dstbias.md)
-[_get_timezone](get-timezone.md)
-[_get_tzname](get-tzname.md)
+[Time management](../time-management.md)\ +[`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md)\ +[`_get_dstbias`](get-dstbias.md)\ +[`_get_timezone`](get-timezone.md)\ +[`_get_tzname`](get-tzname.md) diff --git a/docs/c-runtime-library/reference/get-doserrno.md b/docs/c-runtime-library/reference/get-doserrno.md index 16c30cf7768..551c487b05e 100644 --- a/docs/c-runtime-library/reference/get-doserrno.md +++ b/docs/c-runtime-library/reference/get-doserrno.md @@ -24,18 +24,18 @@ errno_t _get_doserrno( ### Parameters -*pValue*
+*`pValue`*\ A pointer to an integer to be filled with the current value of the **_doserrno** global macro. -## Return Value +## Return value -If **_get_doserrno** succeeds, it returns zero; if it fails, it returns an error code. If *pValue* is **NULL**, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, this function sets **errno** to **EINVAL** and returns **EINVAL**. +If **_get_doserrno** succeeds, it returns zero; if it fails, it returns an error code. If *`pValue`* is **NULL**, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, this function sets **errno** to **EINVAL** and returns **EINVAL**. ## Remarks -The **_doserrno** global macro is set to zero during CRT initialization, before process execution begins. It is set to the operating-system error value returned by any system-level function call that returns an operating-system error, and it is never reset to zero during execution. When you write code to check the error value returned by a function, always clear **_doserrno** by using [_set_doserrno](set-doserrno.md) before the function call. Because another function call may overwrite **_doserrno**, check the value by using **_get_doserrno** immediately after the function call. +The **_doserrno** global macro is set to zero during CRT initialization, before process execution begins. It is set to the operating-system error value returned by any system-level function call that returns an operating-system error, and it is never reset to zero during execution. When you write code to check the error value returned by a function, always clear **_doserrno** by using [`_set_doserrno`](set-doserrno.md) before the function call. Because another function call may overwrite **_doserrno**, check the value by using **_get_doserrno** immediately after the function call. -We recommend [_get_errno](get-errno.md) instead of **_get_doserrno** for portable error codes. +We recommend [`_get_errno`](get-errno.md) instead of **_get_doserrno** for portable error codes. Possible values of **_doserrno** are defined in \. @@ -47,9 +47,9 @@ By default, this function's global state is scoped to the application. To change |-------------|---------------------|---------------------| |**_get_doserrno**|\, \ (C++)|\, \ (C++)| -**_get_doserrno** is a Microsoft extension. For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +**_get_doserrno** is a Microsoft extension. For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[_set_doserrno](set-doserrno.md)
-[errno, _doserrno, _sys_errlist, and _sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md)
+[`_set_doserrno`](set-doserrno.md)\ +[`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md) diff --git a/docs/c-runtime-library/reference/get-dstbias.md b/docs/c-runtime-library/reference/get-dstbias.md index d3ffeae04f4..3e6236f96eb 100644 --- a/docs/c-runtime-library/reference/get-dstbias.md +++ b/docs/c-runtime-library/reference/get-dstbias.md @@ -24,7 +24,7 @@ error_t _get_dstbias( long* seconds ); *`seconds`*\ The offset in seconds of daylight saving time. -## Return Value +## Return value Zero if successful or an **`errno`** value if an error occurs. @@ -32,7 +32,7 @@ Zero if successful or an **`errno`** value if an error occurs. The **`_get_dstbias`** function retrieves the number of seconds in daylight saving time as an integer. If daylight saving time is in effect, the default offset is 3600 seconds, which is the number of seconds in one hour (though a few regions do observe a two-hour offset). -If *`seconds`* is **`NULL`**, the invalid parameter handler is invoked as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, this function sets **`errno`** to **`EINVAL`** and returns **`EINVAL`**. +If *`seconds`* is **`NULL`**, the invalid parameter handler is invoked as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, this function sets **`errno`** to **`EINVAL`** and returns **`EINVAL`**. We recommend you use this function instead of the macro **`_dstbias`** or the deprecated function **`__dstbias`**. @@ -44,12 +44,12 @@ By default, this function's global state is scoped to the application. To change |-------------|---------------------| |**`_get_dstbias`**|``| -For more information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more information, see [Compatibility](../compatibility.md). ## See also -[Time Management](../../c-runtime-library/time-management.md)\ -[`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md)\ +[Time management](../time-management.md)\ +[`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md)\ [`_get_daylight`](get-daylight.md)\ [`_get_timezone`](get-timezone.md)\ [`_get_tzname`](get-tzname.md) diff --git a/docs/c-runtime-library/reference/get-errno.md b/docs/c-runtime-library/reference/get-errno.md index 4ebba8e5898..c1de35dff57 100644 --- a/docs/c-runtime-library/reference/get-errno.md +++ b/docs/c-runtime-library/reference/get-errno.md @@ -24,16 +24,16 @@ errno_t _get_errno( ### Parameters -*pValue*
+*`pValue`*\ A pointer to an integer to be filled with the current value of the **errno** variable. -## Return Value +## Return value -Returns zero if successful; an error code on failure. If *pValue* is **NULL**, the invalid parameter handler is invoked as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, this function sets **errno** to **EINVAL** and returns **EINVAL**. +Returns zero if successful; an error code on failure. If *`pValue`* is **NULL**, the invalid parameter handler is invoked as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, this function sets **errno** to **EINVAL** and returns **EINVAL**. ## Remarks -Possible values of **errno** are defined in Errno.h. Also, see [errno Constants](../../c-runtime-library/errno-constants.md). +Possible values of **errno** are defined in Errno.h. Also, see [`errno` constants](../errno-constants.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). @@ -69,9 +69,9 @@ fyi, ENOENT = 2 |-------------|---------------------|---------------------| |**_get_errno**|\|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[_set_errno](set-errno.md)
-[errno, _doserrno, _sys_errlist, and _sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md)
+[`_set_errno`](set-errno.md)\ +[`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md) diff --git a/docs/c-runtime-library/reference/get-fma3-enable-set-fma3-enable.md b/docs/c-runtime-library/reference/get-fma3-enable-set-fma3-enable.md index 85b52407628..14d263a3134 100644 --- a/docs/c-runtime-library/reference/get-fma3-enable-set-fma3-enable.md +++ b/docs/c-runtime-library/reference/get-fma3-enable-set-fma3-enable.md @@ -23,10 +23,10 @@ int _get_FMA3_enable(); ### Parameters -*flag*
+*`flag`*\ Set to 1 to enable the FMA3 implementations of the transcendental math floating-point library functions on X64 platforms, or to 0 to use the implementations that do not use FMA3 instructions. -## Return Value +## Return value A non-zero value if the FMA3 implementations of the transcendental math floating-point library functions are enabled. Otherwise, zero. @@ -44,9 +44,9 @@ The **_set_FMA3_enable** and **_get_FMA3_enable** functions are only available i |-------------|---------------------| |**_set_FMA3_enable**, **_get_FMA3_enable**| C: \
C++: \ or \| -The **_set_FMA3_enable** and **_get_FMA3_enable** functions are Microsoft-specific. For compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +The **_set_FMA3_enable** and **_get_FMA3_enable** functions are Microsoft-specific. For compatibility information, see [Compatibility](../compatibility.md). ## See also -[Floating-point support](../../c-runtime-library/floating-point-support.md)
-[Floating-point migration issues](../../porting/floating-point-migration-issues.md)
+[Math and floating-point support](../floating-point-support.md)\ +[Floating-point migration issues](../../porting/floating-point-migration-issues.md) diff --git a/docs/c-runtime-library/reference/get-fmode.md b/docs/c-runtime-library/reference/get-fmode.md index 0798558880e..f998f43c112 100644 --- a/docs/c-runtime-library/reference/get-fmode.md +++ b/docs/c-runtime-library/reference/get-fmode.md @@ -24,16 +24,16 @@ errno_t _get_fmode( ### Parameters -*pmode*
+*`pmode`*\ A pointer to an integer to be filled with the current default mode: **_O_TEXT** or **_O_BINARY**. -## Return Value +## Return value -Returns zero if successful; an error code on failure. If *pmode* is **NULL**, the invalid parameter handler is invoked as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, **errno** is set to **EINVAL** and the function returns **EINVAL**. +Returns zero if successful; an error code on failure. If *`pmode`* is **NULL**, the invalid parameter handler is invoked as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, **errno** is set to **EINVAL** and the function returns **EINVAL**. ## Remarks -The function gets the value of the [_fmode](../../c-runtime-library/fmode.md) global variable. This variable specifies the default file translation mode for both low-level and stream file I/O operations, such as **_open**, **_pipe**, **fopen**, and [freopen](freopen-wfreopen.md). +The function gets the value of the [`_fmode`](../fmode.md) global variable. This variable specifies the default file translation mode for both low-level and stream file I/O operations, such as **_open**, **_pipe**, **fopen**, and [`freopen`](freopen-wfreopen.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). @@ -43,15 +43,15 @@ By default, this function's global state is scoped to the application. To change |-------------|---------------------|---------------------| |**_get_fmode**|\|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example -See the example in [_set_fmode](set-fmode.md). +See the example in [`_set_fmode`](set-fmode.md). ## See also -[_fmode](../../c-runtime-library/fmode.md)
-[_set_fmode](set-fmode.md)
-[_setmode](setmode.md)
-[Text and Binary Mode File I/O](../../c-runtime-library/text-and-binary-mode-file-i-o.md)
+[`_fmode`](../fmode.md)\ +[`_set_fmode`](set-fmode.md)\ +[`_setmode`](setmode.md)\ +[Text and binary mode file I/O](../text-and-binary-mode-file-i-o.md) diff --git a/docs/c-runtime-library/reference/get-heap-handle.md b/docs/c-runtime-library/reference/get-heap-handle.md index 3f649896b29..ae6e7264449 100644 --- a/docs/c-runtime-library/reference/get-heap-handle.md +++ b/docs/c-runtime-library/reference/get-heap-handle.md @@ -20,7 +20,7 @@ Returns the handle of the heap that's used by the C run-time system. intptr_t _get_heap_handle( void ); ``` -## Return Value +## Return value Returns the handle to the Win32 heap used by the C run-time system. @@ -36,7 +36,7 @@ By default, this function's global state is scoped to the application. To change |-------------|---------------------| |**_get_heap_handle**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Sample @@ -63,4 +63,4 @@ int main(void) ## See also -[Memory Allocation](../../c-runtime-library/memory-allocation.md)
+[Memory allocation](../memory-allocation.md) diff --git a/docs/c-runtime-library/reference/get-invalid-parameter-handler-get-thread-local-invalid-parameter-handler.md b/docs/c-runtime-library/reference/get-invalid-parameter-handler-get-thread-local-invalid-parameter-handler.md index e3a28560d40..e0c1428113c 100644 --- a/docs/c-runtime-library/reference/get-invalid-parameter-handler-get-thread-local-invalid-parameter-handler.md +++ b/docs/c-runtime-library/reference/get-invalid-parameter-handler-get-thread-local-invalid-parameter-handler.md @@ -21,13 +21,13 @@ _invalid_parameter_handler _get_invalid_parameter_handler(void); _invalid_parameter_handler _get_thread_local_invalid_parameter_handler(void); ``` -## Return Value +## Return value A pointer to the currently set invalid parameter handler function, or a null pointer if none has been set. ## Remarks -The **_get_invalid_parameter_handler** function gets the currently set global invalid parameter handler. It returns a null pointer if no global invalid parameter handler was set. Similarly, the **_get_thread_local_invalid_parameter_handler** gets the current thread-local invalid parameter handler of the thread it is called on, or a null pointer if no handler was set. For information about how to set global and thread-local invalid parameter handlers, see [_set_invalid_parameter_handler, _set_thread_local_invalid_parameter_handler](set-invalid-parameter-handler-set-thread-local-invalid-parameter-handler.md). +The **_get_invalid_parameter_handler** function gets the currently set global invalid parameter handler. It returns a null pointer if no global invalid parameter handler was set. Similarly, the **_get_thread_local_invalid_parameter_handler** gets the current thread-local invalid parameter handler of the thread it is called on, or a null pointer if no handler was set. For information about how to set global and thread-local invalid parameter handlers, see [`_set_invalid_parameter_handler`, `_set_thread_local_invalid_parameter_handler`](set-invalid-parameter-handler-set-thread-local-invalid-parameter-handler.md). The returned invalid parameter handler function pointer has the following type: @@ -41,7 +41,7 @@ typedef void (__cdecl* _invalid_parameter_handler)( ); ``` -For details on the invalid parameter handler, see the prototype in [_set_invalid_parameter_handler, _set_thread_local_invalid_parameter_handler](set-invalid-parameter-handler-set-thread-local-invalid-parameter-handler.md). +For details on the invalid parameter handler, see the prototype in [`_set_invalid_parameter_handler`, `_set_thread_local_invalid_parameter_handler`](set-invalid-parameter-handler-set-thread-local-invalid-parameter-handler.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). @@ -51,9 +51,9 @@ By default, this function's global state is scoped to the application. To change |-------------|---------------------| |**_get_invalid_parameter_handler**, **_get_thread_local_invalid_parameter_handler**|C: \

C++: \ or \| -The **_get_invalid_parameter_handler** and **_get_thread_local_invalid_parameter_handler** functions are Microsoft-specific. For compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +The **_get_invalid_parameter_handler** and **_get_thread_local_invalid_parameter_handler** functions are Microsoft-specific. For compatibility information, see [Compatibility](../compatibility.md). ## See also -[_set_invalid_parameter_handler, _set_thread_local_invalid_parameter_handler](set-invalid-parameter-handler-set-thread-local-invalid-parameter-handler.md)
-[Security-Enhanced Versions of CRT Functions](../../c-runtime-library/security-enhanced-versions-of-crt-functions.md)
+[`_set_invalid_parameter_handler`, `_set_thread_local_invalid_parameter_handler`](set-invalid-parameter-handler-set-thread-local-invalid-parameter-handler.md)\ +[Security-enhanced versions of CRT functions](../security-enhanced-versions-of-crt-functions.md) diff --git a/docs/c-runtime-library/reference/get-osfhandle.md b/docs/c-runtime-library/reference/get-osfhandle.md index 3fcfe8909bc..1652dba7025 100644 --- a/docs/c-runtime-library/reference/get-osfhandle.md +++ b/docs/c-runtime-library/reference/get-osfhandle.md @@ -26,14 +26,14 @@ intptr_t _get_osfhandle( *`fd`*\ An existing file descriptor. -## Return Value +## Return value -Returns an operating-system file handle if *`fd`* is valid. Otherwise, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, it returns **`INVALID_HANDLE_VALUE`** (-1). It also sets **`errno`** to **`EBADF`**, indicating an invalid file handle. To avoid a warning when the result is used as a Win32 file handle, cast it to a **`HANDLE`** type. +Returns an operating-system file handle if *`fd`* is valid. Otherwise, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, it returns **`INVALID_HANDLE_VALUE`** (-1). It also sets **`errno`** to **`EBADF`**, indicating an invalid file handle. To avoid a warning when the result is used as a Win32 file handle, cast it to a **`HANDLE`** type. > [!NOTE] > When **`stdin`**, **`stdout`**, and **`stderr`** aren't associated with a stream (for example, in a Windows application without a console window), the file descriptor values for these streams are returned from [`_fileno`](fileno.md) as the special value -2. Similarly, if you use a 0, 1, or 2 as the file descriptor parameter instead of the result of a call to **`_fileno`**, **`_get_osfhandle`** also returns the special value -2 when the file descriptor is not associated with a stream, and does not set **`errno`**. However, this is not a valid file handle value, and subsequent calls that attempt to use it are likely to fail. -For more information about **`EBADF`** and other error codes, see [`_doserrno`, `errno`, `_sys_errlist`, and `_sys_nerr`](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +For more information about **`EBADF`** and other error codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks @@ -47,13 +47,13 @@ By default, this function's global state is scoped to the application. To change |-------------|---------------------| |**`_get_osfhandle`**|``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[File Handling](../../c-runtime-library/file-handling.md)\ +[File handling](../file-handling.md)\ [`_close`](close.md)\ [`_creat`, `_wcreat`](creat-wcreat.md)\ [`_dup`, `_dup2`](dup-dup2.md)\ [`_open`, `_wopen`](open-wopen.md)\ -[`\_open_osfhandle`](open-osfhandle.md) +[`_open_osfhandle`](open-osfhandle.md) diff --git a/docs/c-runtime-library/reference/get-pgmptr.md b/docs/c-runtime-library/reference/get-pgmptr.md index 031b8af1143..48f54159169 100644 --- a/docs/c-runtime-library/reference/get-pgmptr.md +++ b/docs/c-runtime-library/reference/get-pgmptr.md @@ -24,16 +24,16 @@ errno_t _get_pgmptr( ### Parameters -*pValue*
+*`pValue`*\ A pointer to a string to be filled with the current value of the **_pgmptr** variable. -## Return Value +## Return value -Returns zero if successful; an error code on failure. If *pValue* is **NULL**, the invalid parameter handler is invoked as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, this function sets **errno** to **EINVAL** and returns **EINVAL**. +Returns zero if successful; an error code on failure. If *`pValue`* is **NULL**, the invalid parameter handler is invoked as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, this function sets **errno** to **EINVAL** and returns **EINVAL**. ## Remarks -Only call **_get_pgmptr** if your program has a narrow entry point, like **main()** or **WinMain()**. The **_pgmptr** global variable contains the full path to the executable associated with the process. For more information, see [_pgmptr, _wpgmptr](../../c-runtime-library/pgmptr-wpgmptr.md). +Only call **_get_pgmptr** if your program has a narrow entry point, like **main()** or **WinMain()**. The **_pgmptr** global variable contains the full path to the executable associated with the process. For more information, see [`_pgmptr`, `_wpgmptr`](../pgmptr-wpgmptr.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). @@ -43,8 +43,8 @@ By default, this function's global state is scoped to the application. To change |-------------|---------------------| |**_get_pgmptr**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[_get_wpgmptr](get-wpgmptr.md)
+[`_get_wpgmptr`](get-wpgmptr.md) diff --git a/docs/c-runtime-library/reference/get-printf-count-output.md b/docs/c-runtime-library/reference/get-printf-count-output.md index e012f4d7320..d66da3a0f96 100644 --- a/docs/c-runtime-library/reference/get-printf-count-output.md +++ b/docs/c-runtime-library/reference/get-printf-count-output.md @@ -11,7 +11,7 @@ helpviewer_keywords: ["%n format", "get_printf_count_output function", "_get_pri --- # _get_printf_count_output -Indicates whether [printf, _printf_l, wprintf, _wprintf_l](printf-printf-l-wprintf-wprintf-l.md)-family functions support the **%n** format. +Indicates whether [`printf`, `_printf_l`, `wprintf`, `_wprintf_l`](printf-printf-l-wprintf-wprintf-l.md)-family functions support the **%n** format. ## Syntax @@ -19,13 +19,13 @@ Indicates whether [printf, _printf_l, wprintf, _wprintf_l](printf-printf-l-wprin int _get_printf_count_output(); ``` -## Return Value +## Return value Non-zero if **%n** is supported, 0 if **%n** is not supported. ## Remarks -If **%n** is not supported (the default), encountering **%n** in the format string of any of the **printf** functions will invoke the invalid parameter handler as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If **%n** support is enabled (see [_set_printf_count_output](set-printf-count-output.md)) then **%n** will behave as described in [Format Specification Syntax: printf and wprintf Functions](../../c-runtime-library/format-specification-syntax-printf-and-wprintf-functions.md). +If **%n** is not supported (the default), encountering **%n** in the format string of any of the **printf** functions will invoke the invalid parameter handler as described in [Parameter validation](../parameter-validation.md). If **%n** support is enabled (see [`_set_printf_count_output`](set-printf-count-output.md)) then **%n** will behave as described in [Format specification syntax: `printf` and `wprintf` functions](../format-specification-syntax-printf-and-wprintf-functions.md). > [!IMPORTANT] > Starting in Windows 10 version 2004 (build 19041), the `printf` family of functions prints exactly representable floating point numbers according to the IEEE 754 rules for rounding. In previous versions of Windows, exactly representable floating point numbers ending in '5' would always round up. IEEE 754 states that they must round to the closest even digit (also known as "Banker's Rounding"). For example, both `printf("%1.0f", 1.5)` and `printf("%1.0f", 2.5)` should round to 2. Previously, 1.5 would round to 2 and 2.5 would round to 3. This change only affects exactly representable numbers. For example, 2.35 (which, when represented in memory, is closer to 2.35000000000000008) continues to round up to 2.4. Rounding done by these functions now also respects the floating point rounding mode set by [`fesetround`](fegetround-fesetround2.md). Previously, rounding always chose `FE_TONEAREST` behavior. This change only affects programs built using Visual Studio 2019 version 16.2 and later. To use the legacy floating point rounding behavior, link with ['legacy_stdio_float_rounding.obj`](../link-options.md). @@ -36,12 +36,12 @@ If **%n** is not supported (the default), encountering **%n** in the format stri |-------------|---------------------| |**_get_printf_count_output**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example -See the example for [_set_printf_count_output](set-printf-count-output.md). +See the example for [`_set_printf_count_output`](set-printf-count-output.md). ## See also -[_set_printf_count_output](set-printf-count-output.md)
+[`_set_printf_count_output`](set-printf-count-output.md) diff --git a/docs/c-runtime-library/reference/get-purecall-handler-set-purecall-handler.md b/docs/c-runtime-library/reference/get-purecall-handler-set-purecall-handler.md index 8eea483df10..ada0ccbdfcf 100644 --- a/docs/c-runtime-library/reference/get-purecall-handler-set-purecall-handler.md +++ b/docs/c-runtime-library/reference/get-purecall-handler-set-purecall-handler.md @@ -26,10 +26,10 @@ _purecall_handler __cdecl _set_purecall_handler( ### Parameters -*function*
+*`function`*\ The function to be called when a pure virtual function is called. A **_purecall_handler** function must have a void return type. -## Return Value +## Return value The previous **_purecall_handler**. Returns **`nullptr`** if there was no previous handler. @@ -49,7 +49,7 @@ To restore the default behavior, call **_set_purecall_handler** by using a **`nu |-------------|---------------------| |**_get_purecall_handler**, **_set_purecall_handler**|\ or \| -For compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -102,5 +102,5 @@ In _purecall_handler. ## See also -[Error Handling](../../c-runtime-library/error-handling-crt.md)
-[_purecall](purecall.md)
+[Error handling](../error-handling-crt.md)\ +[`_purecall`](purecall.md) diff --git a/docs/c-runtime-library/reference/get-terminate.md b/docs/c-runtime-library/reference/get-terminate.md index 4883b85b378..4172257b520 100644 --- a/docs/c-runtime-library/reference/get-terminate.md +++ b/docs/c-runtime-library/reference/get-terminate.md @@ -20,9 +20,9 @@ Returns the termination routine to be called by **terminate**. terminate_function _get_terminate( void ); ``` -## Return Value +## Return value -Returns a pointer to the function registered by [set_terminate](set-terminate-crt.md). If no function has been set, the return value may be used to restore the default behavior; this value may be **NULL**. +Returns a pointer to the function registered by [`set_terminate`](set-terminate-crt.md). If no function has been set, the return value may be used to restore the default behavior; this value may be **NULL**. ## Remarks @@ -34,12 +34,12 @@ By default, this function's global state is scoped to the application. To change |-------------|---------------------| |**_get_terminate**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Exception Handling Routines](../../c-runtime-library/exception-handling-routines.md)
-[abort](abort.md)
-[set_unexpected](set-unexpected-crt.md)
-[terminate](terminate-crt.md)
-[unexpected](unexpected-crt.md)
+[Exception handling routines](../exception-handling-routines.md)\ +[`abort`](abort.md)\ +[`set_unexpected`](set-unexpected-crt.md)\ +[`terminate`](terminate-crt.md)\ +[`unexpected`](unexpected-crt.md) diff --git a/docs/c-runtime-library/reference/get-timezone.md b/docs/c-runtime-library/reference/get-timezone.md index 47f36ce5bf1..3e9e5c7c720 100644 --- a/docs/c-runtime-library/reference/get-timezone.md +++ b/docs/c-runtime-library/reference/get-timezone.md @@ -24,10 +24,10 @@ error_t _get_timezone( ### Parameters -*seconds*
+*`seconds`*\ The difference in seconds between UTC and local time. -## Return Value +## Return value Zero if successful or an **errno** value if an error occurs. @@ -35,7 +35,7 @@ Zero if successful or an **errno** value if an error occurs. The **_get_timezone** function retrieves the difference in seconds between UTC and local time as an integer. The default value is 28,800 seconds, for Pacific Standard Time (eight hours behind UTC). -If *seconds* is **NULL**, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, this function sets **errno** to **EINVAL** and returns **EINVAL**. +If *`seconds`* is **NULL**, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, this function sets **errno** to **EINVAL** and returns **EINVAL**. 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). @@ -45,12 +45,12 @@ By default, this function's global state is scoped to the application. To change |-------------|---------------------| |**_get_timezone**|\| -For more information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more information, see [Compatibility](../compatibility.md). ## See also -[Time Management](../../c-runtime-library/time-management.md)
-[errno, _doserrno, _sys_errlist, and _sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md)
-[_get_daylight](get-daylight.md)
-[_get_dstbias](get-dstbias.md)
-[_get_tzname](get-tzname.md)
+[Time management](../time-management.md)\ +[`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md)\ +[`_get_daylight`](get-daylight.md)\ +[`_get_dstbias`](get-dstbias.md)\ +[`_get_tzname`](get-tzname.md) diff --git a/docs/c-runtime-library/reference/get-tzname.md b/docs/c-runtime-library/reference/get-tzname.md index 402f23a721b..3dcefcf7f1e 100644 --- a/docs/c-runtime-library/reference/get-tzname.md +++ b/docs/c-runtime-library/reference/get-tzname.md @@ -48,13 +48,13 @@ Unless explicitly updated during runtime, `"PST"` is returned for the standard t The time zone string isn't guaranteed to be the same between OS releases. Official time zone names can and do change. -## Return Value +## Return value Zero if successful, otherwise an **`errno`** type value. -If either *`timeZoneName`* is `NULL`, or *`sizeInBytes`* is zero or less than zero (but not both), an invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, this function sets **`errno`** to `EINVAL` and returns `EINVAL`. +If either *`timeZoneName`* is `NULL`, or *`sizeInBytes`* is zero or less than zero (but not both), an invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, this function sets **`errno`** to `EINVAL` and returns `EINVAL`. -### Error Conditions +### Error conditions |*`pReturnValue`*|*`timeZoneName`*|*`sizeInBytes`*|*`index`*|Return value|Contents of *`timeZoneName`*| |--------------------|--------------------|-------------------|-------------|------------------|--------------------------------| @@ -137,12 +137,12 @@ The current Daylight standard time zone name is Pacific Daylight Time. |-------------|---------------------| |`_get_tzname`|``| -For more information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more information, see [Compatibility](../compatibility.md). ## See also -[Time Management](../../c-runtime-library/time-management.md)\ -[`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md)\ +[Time management](../time-management.md)\ +[`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md)\ [`_get_daylight`](get-daylight.md)\ [`_get_dstbias`](get-dstbias.md)\ [`_get_timezone`](get-timezone.md) diff --git a/docs/c-runtime-library/reference/get-unexpected.md b/docs/c-runtime-library/reference/get-unexpected.md index e4f12347df1..8b35b845234 100644 --- a/docs/c-runtime-library/reference/get-unexpected.md +++ b/docs/c-runtime-library/reference/get-unexpected.md @@ -20,7 +20,7 @@ Returns the termination routine to be called by **`unexpected`**. unexpected_function _get_unexpected( void ); ``` -## Return Value +## Return value Returns a pointer to the function registered by [`set_unexpected`](set-unexpected-crt.md). If no function has been set, the return value may be used to restore the default behavior; this value may be **`NULL`**. @@ -30,12 +30,12 @@ Returns a pointer to the function registered by [`set_unexpected`](set-unexpecte |-------------|---------------------| |**`_get_unexpected`**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Exception Handling Routines](../../c-runtime-library/exception-handling-routines.md)
-[`abort`](abort.md)
-[`set_terminate`](set-terminate-crt.md)
-[`terminate`](terminate-crt.md)
-[`unexpected`](unexpected-crt.md)
+[Exception handling routines](../exception-handling-routines.md)\ +[`abort`](abort.md)\ +[`set_terminate`](set-terminate-crt.md)\ +[`terminate`](terminate-crt.md)\ +[`unexpected`](unexpected-crt.md) diff --git a/docs/c-runtime-library/reference/get-wpgmptr.md b/docs/c-runtime-library/reference/get-wpgmptr.md index ba8dce90ba2..dc58d86ab19 100644 --- a/docs/c-runtime-library/reference/get-wpgmptr.md +++ b/docs/c-runtime-library/reference/get-wpgmptr.md @@ -24,16 +24,16 @@ errno_t _get_wpgmptr( ### Parameters -*pValue*
+*`pValue`*\ A pointer to a string to be filled with the current value of the **_wpgmptr** variable. -## Return Value +## Return value -Returns zero if successful; an error code on failure. If *pValue* is **NULL**, the invalid parameter handler is invoked as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, this function sets **errno** to **EINVAL** and returns **EINVAL**. +Returns zero if successful; an error code on failure. If *`pValue`* is **NULL**, the invalid parameter handler is invoked as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, this function sets **errno** to **EINVAL** and returns **EINVAL**. ## Remarks -Only call **_get_wpgmptr** if your program has a wide entry point, like **wmain()** or **wWinMain()**. The **_wpgmptr** global variable contains the full path to the executable associated with the process as a wide-character string. For more information, see [_pgmptr, _wpgmptr](../../c-runtime-library/pgmptr-wpgmptr.md). +Only call **_get_wpgmptr** if your program has a wide entry point, like **wmain()** or **wWinMain()**. The **_wpgmptr** global variable contains the full path to the executable associated with the process as a wide-character string. For more information, see [`_pgmptr`, `_wpgmptr`](../pgmptr-wpgmptr.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). @@ -43,8 +43,8 @@ By default, this function's global state is scoped to the application. To change |-------------|---------------------| |**_get_wpgmptr**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[_get_pgmptr](get-pgmptr.md)
+[`_get_pgmptr`](get-pgmptr.md) diff --git a/docs/c-runtime-library/reference/getc-getwc.md b/docs/c-runtime-library/reference/getc-getwc.md index 9e8cad850c0..a7c4cc1ec12 100644 --- a/docs/c-runtime-library/reference/getc-getwc.md +++ b/docs/c-runtime-library/reference/getc-getwc.md @@ -27,31 +27,31 @@ wint_t getwc( ### Parameters -*stream*
+*`stream`*\ Input stream. -## Return Value +## Return value -Returns the character read. To indicate a read error or end-of-file condition, **getc** returns **EOF**, and **getwc** returns **WEOF**. For **getc**, use **ferror** or **feof** to check for an error or for end of file. If *stream* is **NULL**, **getc** and **getwc** invoke the invalid parameter handler, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, these functions return **EOF** (or **WEOF** for **getwc**), and set **errno** to **EINVAL**. +Returns the character read. To indicate a read error or end-of-file condition, **getc** returns **EOF**, and **getwc** returns **WEOF**. For **getc**, use **ferror** or **feof** to check for an error or for end of file. If *`stream`* is **NULL**, **getc** and **getwc** invoke the invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, these functions return **EOF** (or **WEOF** for **getwc**), and set **errno** to **EINVAL**. -For more information about return codes, see [`_doserrno`, `errno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). +For more information about return codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks -Each routine reads a single character from a file at the current position and increments the associated file pointer (if defined) to point to the next character. The file is associated with *stream*. +Each routine reads a single character from a file at the current position and increments the associated file pointer (if defined) to point to the next character. The file is associated with *`stream`*. -These functions lock the calling thread and are therefore thread-safe. For a non-locking version, see [_getc_nolock, _getwc_nolock](getc-nolock-getwc-nolock.md). +These functions lock the calling thread and are therefore thread-safe. For a non-locking version, see [`_getc_nolock`, `_getwc_nolock`](getc-nolock-getwc-nolock.md). Routine-specific remarks follow. |Routine|Remarks| |-------------|-------------| |**getc**|Same as **fgetc**, but implemented as a function and as a macro.| -|**getwc**|Wide-character version of **getc**. Reads a multibyte character or a wide character according to whether *stream* is opened in text mode or binary mode.| +|**getwc**|Wide-character version of **getc**. Reads a multibyte character or a wide character according to whether *`stream`* is opened in text mode or binary mode.| 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| |---------------------|------------------------------------|--------------------|-----------------------| @@ -64,7 +64,7 @@ By default, this function's global state is scoped to the application. To change |**getc**|\| |**getwc**|\ or \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -118,8 +118,8 @@ Input was: Line one. ## See also -[Stream I/O](../../c-runtime-library/stream-i-o.md)
-[fgetc, fgetwc](fgetc-fgetwc.md)
-[_getch, _getwch](getch-getwch.md)
-[putc, putwc](putc-putwc.md)
-[ungetc, ungetwc](ungetc-ungetwc.md)
+[Stream I/O](../stream-i-o.md)\ +[`fgetc`, `fgetwc`](fgetc-fgetwc.md)\ +[`_getch`, `_getwch`](getch-getwch.md)\ +[`putc`, `putwc`](putc-putwc.md)\ +[`ungetc`, `ungetwc`](ungetc-ungetwc.md) diff --git a/docs/c-runtime-library/reference/getc-nolock-getwc-nolock.md b/docs/c-runtime-library/reference/getc-nolock-getwc-nolock.md index cb2b1f2c427..d3792444213 100644 --- a/docs/c-runtime-library/reference/getc-nolock-getwc-nolock.md +++ b/docs/c-runtime-library/reference/getc-nolock-getwc-nolock.md @@ -27,12 +27,12 @@ wint_t _getwc_nolock( ### Parameters -*stream*
+*`stream`*\ Input stream. -## Return Value +## Return value -See [getc, getwc](getc-getwc.md). +See [`getc`, `getwc`](getc-getwc.md). ## Remarks @@ -40,7 +40,7 @@ These functions are identical to **getc** and **getwc** except that they do not 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| |---------------------|--------------------------------------|--------------------|-----------------------| @@ -53,7 +53,7 @@ By default, this function's global state is scoped to the application. To change |**getc_nolock**|\| |**getwc_nolock**|\ or \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -106,8 +106,8 @@ Input was: Line the first. ## See also -[Stream I/O](../../c-runtime-library/stream-i-o.md)
-[fgetc, fgetwc](fgetc-fgetwc.md)
-[_getch, _getwch](getch-getwch.md)
-[putc, putwc](putc-putwc.md)
-[ungetc, ungetwc](ungetc-ungetwc.md)
+[Stream I/O](../stream-i-o.md)\ +[`fgetc`, `fgetwc`](fgetc-fgetwc.md)\ +[`_getch`, `_getwch`](getch-getwch.md)\ +[`putc`, `putwc`](putc-putwc.md)\ +[`ungetc`, `ungetwc`](ungetc-ungetwc.md) diff --git a/docs/c-runtime-library/reference/getch-getwch.md b/docs/c-runtime-library/reference/getch-getwch.md index f0afd484ead..305d8d3209e 100644 --- a/docs/c-runtime-library/reference/getch-getwch.md +++ b/docs/c-runtime-library/reference/getch-getwch.md @@ -23,7 +23,7 @@ int _getch( void ); wint_t _getwch( void ); ``` -## Return Value +## Return value Returns the character read. There's no error return. @@ -35,7 +35,7 @@ These functions lock the calling thread and so are thread-safe. For non-locking 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| |---------------------|--------------------------------------|--------------------|-----------------------| @@ -48,7 +48,7 @@ By default, this function's global state is scoped to the application. To change |**`_getch`**|``| |**`_getwch`**|`` or ``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -88,8 +88,8 @@ Type 'Y' when finished typing keys: Y ## See also -[Console and Port I/O](../../c-runtime-library/console-and-port-i-o.md)\ +[Console and port I/O](../console-and-port-i-o.md)\ [`_getche`, `_getwche`](getche-getwche.md)\ -[`_cgets`, `_cgetws`](../../c-runtime-library/cgets-cgetws.md)\ +[`_cgets`, `_cgetws`](../cgets-cgetws.md)\ [`getc`, `getwc`](getc-getwc.md)\ [`_ungetch`, `_ungetwch`, `_ungetch_nolock`, `_ungetwch_nolock`](ungetch-ungetwch-ungetch-nolock-ungetwch-nolock.md) diff --git a/docs/c-runtime-library/reference/getch-nolock-getwch-nolock.md b/docs/c-runtime-library/reference/getch-nolock-getwch-nolock.md index 542a635017b..0fd64f9517f 100644 --- a/docs/c-runtime-library/reference/getch-nolock-getwch-nolock.md +++ b/docs/c-runtime-library/reference/getch-nolock-getwch-nolock.md @@ -24,7 +24,7 @@ int _getch_nolock( void ); wint_t _getwch_nolock( void ); ``` -## Return Value +## Return value Returns the character read. There's no error return. @@ -34,7 +34,7 @@ Returns the character read. There's no error return. 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| |---------------------|--------------------------------------|--------------------|-----------------------| @@ -47,7 +47,7 @@ By default, this function's global state is scoped to the application. To change |**_getch_nolock**|\| |**_getwch_nolock**|\ or \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -87,8 +87,8 @@ Type 'Y' when finished typing keys: Y ## See also -[Console and Port I/O](../../c-runtime-library/console-and-port-i-o.md)
-[_getche, _getwche](getche-getwche.md)
-[_cgets, _cgetws](../../c-runtime-library/cgets-cgetws.md)
-[getc, getwc](getc-getwc.md)
-[_ungetch, _ungetwch, _ungetch_nolock, _ungetwch_nolock](ungetch-ungetwch-ungetch-nolock-ungetwch-nolock.md)
+[Console and port I/O](../console-and-port-i-o.md)\ +[`_getche`, `_getwche`](getche-getwche.md)\ +[`_cgets`, `_cgetws`](../cgets-cgetws.md)\ +[`getc`, `getwc`](getc-getwc.md)\ +[`_ungetch`, `_ungetwch`, `_ungetch_nolock`, `_ungetwch_nolock`](ungetch-ungetwch-ungetch-nolock-ungetwch-nolock.md) diff --git a/docs/c-runtime-library/reference/getchar-getwchar.md b/docs/c-runtime-library/reference/getchar-getwchar.md index 49b97073b09..ca7f3c9fc59 100644 --- a/docs/c-runtime-library/reference/getchar-getwchar.md +++ b/docs/c-runtime-library/reference/getchar-getwchar.md @@ -20,7 +20,7 @@ int getchar(); wint_t getwchar(); ``` -## Return Value +## Return value Returns the character read. These functions wait for input and don't return until input is available. @@ -34,7 +34,7 @@ These functions also lock the calling thread and are thread-safe. For a non-lock 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| |---------------------|------------------------------------|--------------------|-----------------------| @@ -47,7 +47,7 @@ By default, this function's global state is scoped to the application. To change |**`getchar`**|``| |**`getwchar`**|`` or ``| -The console isn't supported in Universal Windows Platform (UWP) apps. The standard stream handles that are associated with the console, **`stdin`**, **`stdout`**, and **`stderr`**, must be redirected before C run-time functions can use them in UWP apps. For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +The console isn't supported in Universal Windows Platform (UWP) apps. The standard stream handles that are associated with the console, **`stdin`**, **`stdout`**, and **`stderr`**, must be redirected before C run-time functions can use them in UWP apps. For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -81,9 +81,9 @@ This textInput was: This text ## See also -[Stream I/O](../../c-runtime-library/stream-i-o.md)
-[`getc`, `getwc`](getc-getwc.md)
-[`fgetc`, `fgetwc`](fgetc-fgetwc.md)
-[`_getch`, `_getwch`](getch-getwch.md)
-[`putc`, `putwc`](putc-putwc.md)
-[`ungetc`, `ungetwc`](ungetc-ungetwc.md)
+[Stream I/O](../stream-i-o.md)\ +[`getc`, `getwc`](getc-getwc.md)\ +[`fgetc`, `fgetwc`](fgetc-fgetwc.md)\ +[`_getch`, `_getwch`](getch-getwch.md)\ +[`putc`, `putwc`](putc-putwc.md)\ +[`ungetc`, `ungetwc`](ungetc-ungetwc.md) diff --git a/docs/c-runtime-library/reference/getchar-nolock-getwchar-nolock.md b/docs/c-runtime-library/reference/getchar-nolock-getwchar-nolock.md index 77c74ae26e5..bac53d7106a 100644 --- a/docs/c-runtime-library/reference/getchar-nolock-getwchar-nolock.md +++ b/docs/c-runtime-library/reference/getchar-nolock-getwchar-nolock.md @@ -21,15 +21,15 @@ int _getchar_nolock( void ); wint_t _getwchar_nolock( void ); ``` -## Return Value +## Return value -See [getchar, getwchar](getchar-getwchar.md). +See [`getchar`, `getwchar`](getchar-getwchar.md). ## Remarks **_getchar_nolock** and **_getwchar_nolock** are identical to **getchar** and **getwchar** except that they are not protected from interference by other threads. They might be faster because they do not incur the overhead of locking out other threads. Use these functions only in thread-safe contexts such as single-threaded applications or where the calling scope already handles thread isolation. -### Generic-Text Routine Mappings +### Generic-text routine mappings |Tchar.h routine|_UNICODE and _MBCS not defined|_MBCS defined|_UNICODE defined| |---------------------|--------------------------------------|--------------------|-----------------------| @@ -42,7 +42,7 @@ See [getchar, getwchar](getchar-getwchar.md). |**_getchar_nolock**|\| |**_getwchar_nolock**|\ or \| -The console is not supported in Universal Windows Platform (UWP) apps. The standard stream handles that are associated with the console, **stdin**, **stdout**, and **stderr**, must be redirected before C run-time functions can use them in UWP apps. For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +The console is not supported in Universal Windows Platform (UWP) apps. The standard stream handles that are associated with the console, **stdin**, **stdout**, and **stderr**, must be redirected before C run-time functions can use them in UWP apps. For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -77,9 +77,9 @@ This textInput was: This text ## See also -[Stream I/O](../../c-runtime-library/stream-i-o.md)
-[getc, getwc](getc-getwc.md)
-[fgetc, fgetwc](fgetc-fgetwc.md)
-[_getch, _getwch](getch-getwch.md)
-[putc, putwc](putc-putwc.md)
-[ungetc, ungetwc](ungetc-ungetwc.md)
+[Stream I/O](../stream-i-o.md)\ +[`getc`, `getwc`](getc-getwc.md)\ +[`fgetc`, `fgetwc`](fgetc-fgetwc.md)\ +[`_getch`, `_getwch`](getch-getwch.md)\ +[`putc`, `putwc`](putc-putwc.md)\ +[`ungetc`, `ungetwc`](ungetc-ungetwc.md) diff --git a/docs/c-runtime-library/reference/getche-getwche.md b/docs/c-runtime-library/reference/getche-getwche.md index 3f79a908cb8..ba5e21b6765 100644 --- a/docs/c-runtime-library/reference/getche-getwche.md +++ b/docs/c-runtime-library/reference/getche-getwche.md @@ -24,7 +24,7 @@ int _getche( void ); wint_t _getwche( void ); ``` -## Return Value +## Return value Returns the character read. There's no error return. @@ -32,11 +32,11 @@ Returns the character read. There's no error return. The **_getche** and **_getwche** functions read a single character from the console with echo, meaning that the character is displayed at the console. None of these functions can be used to read CTRL+C. When reading a function key or an arrow key, each function must be called twice; the first call returns 0 or 0xE0, and the second call returns the actual key code. -These functions lock the calling thread and are therefore thread-safe. For non-locking versions, see [_getche_nolock, _getwche_nolock](getche-nolock-getwche-nolock.md). +These functions lock the calling thread and are therefore thread-safe. For non-locking versions, see [`_getche_nolock`, `_getwche_nolock`](getche-nolock-getwche-nolock.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| |---------------------|--------------------------------------|--------------------|-----------------------| @@ -49,7 +49,7 @@ By default, this function's global state is scoped to the application. To change |**_getche**|\| |**_getwche**|\ or \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -89,7 +89,7 @@ Type 'Y' when finished typing keys: abcdefyY ## See also -[Console and Port I/O](../../c-runtime-library/console-and-port-i-o.md)
-[_cgets, _cgetws](../../c-runtime-library/cgets-cgetws.md)
-[getc, getwc](getc-getwc.md)
-[_ungetch, _ungetwch, _ungetch_nolock, _ungetwch_nolock](ungetch-ungetwch-ungetch-nolock-ungetwch-nolock.md)
+[Console and port I/O](../console-and-port-i-o.md)\ +[`_cgets`, `_cgetws`](../cgets-cgetws.md)\ +[`getc`, `getwc`](getc-getwc.md)\ +[`_ungetch`, `_ungetwch`, `_ungetch_nolock`, `_ungetwch_nolock`](ungetch-ungetwch-ungetch-nolock-ungetwch-nolock.md) diff --git a/docs/c-runtime-library/reference/getche-nolock-getwche-nolock.md b/docs/c-runtime-library/reference/getche-nolock-getwche-nolock.md index eb8d18a3236..2671de49ffd 100644 --- a/docs/c-runtime-library/reference/getche-nolock-getwche-nolock.md +++ b/docs/c-runtime-library/reference/getche-nolock-getwche-nolock.md @@ -24,7 +24,7 @@ int _getche_nolock( void ); wint_t _getwche_nolock( void ); ``` -## Return Value +## Return value Returns the character read. There's no error return. @@ -34,7 +34,7 @@ Returns the character read. There's no error return. 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| |---------------------|--------------------------------------|--------------------|-----------------------| @@ -47,7 +47,7 @@ By default, this function's global state is scoped to the application. To change |**_getche_nolock**|\| |**_getwche_nolock**|\ or \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -87,7 +87,7 @@ Type 'Y' when finished typing keys: abcdefyY ## See also -[Console and Port I/O](../../c-runtime-library/console-and-port-i-o.md)
-[_cgets, _cgetws](../../c-runtime-library/cgets-cgetws.md)
-[getc, getwc](getc-getwc.md)
-[_ungetch, _ungetwch, _ungetch_nolock, _ungetwch_nolock](ungetch-ungetwch-ungetch-nolock-ungetwch-nolock.md)
+[Console and port I/O](../console-and-port-i-o.md)\ +[`_cgets`, `_cgetws`](../cgets-cgetws.md)\ +[`getc`, `getwc`](getc-getwc.md)\ +[`_ungetch`, `_ungetwch`, `_ungetch_nolock`, `_ungetwch_nolock`](ungetch-ungetwch-ungetch-nolock-ungetwch-nolock.md) diff --git a/docs/c-runtime-library/reference/getche.md b/docs/c-runtime-library/reference/getche.md index db3a1b190a0..eed88a10206 100644 --- a/docs/c-runtime-library/reference/getche.md +++ b/docs/c-runtime-library/reference/getche.md @@ -12,9 +12,9 @@ ms.assetid: 95e62bb8-eec0-4145-b2e8-f6406849af52 --- # getche -The Microsoft-specific function name `getche` is a deprecated alias for the [_getche](getche-getwche.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. +The Microsoft-specific function name `getche` is a deprecated alias for the [`_getche`](getche-getwche.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. -We recommend you use [_getche](getche-getwche.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). +We recommend you use [`_getche`](getche-getwche.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). > [!IMPORTANT] > This API cannot be used in applications that execute in the Windows Runtime. For more information, see [CRT functions not supported in Universal Windows Platform apps](../../cppcx/crt-functions-not-supported-in-universal-windows-platform-apps.md). diff --git a/docs/c-runtime-library/reference/getcwd-dbg-wgetcwd-dbg.md b/docs/c-runtime-library/reference/getcwd-dbg-wgetcwd-dbg.md index e43bf827cf8..25ba85cb947 100644 --- a/docs/c-runtime-library/reference/getcwd-dbg-wgetcwd-dbg.md +++ b/docs/c-runtime-library/reference/getcwd-dbg-wgetcwd-dbg.md @@ -12,7 +12,7 @@ ms.assetid: 8d5d151f-d844-4aa6-a28c-1c11a22dc00d --- # _getcwd_dbg, _wgetcwd_dbg -Debug versions of the [_getcwd, _wgetcwd](getcwd-wgetcwd.md) functions (only available during debug). +Debug versions of the [`_getcwd`, `_wgetcwd`](getcwd-wgetcwd.md) functions (only available during debug). ## Syntax @@ -35,34 +35,34 @@ wchar_t *_wgetcwd_dbg( ### Parameters -*buffer*
+*`buffer`*\ Storage location for the path. -*maxlen*
+*`maxlen`*\ Maximum length of the path in characters: **`char`** for **_getcwd_dbg** and **`wchar_t`** for **_wgetcwd_dbg**. -*blockType*
+*`blockType`*\ Requested type of the memory block: **_CLIENT_BLOCK** or **_NORMAL_BLOCK**. -*filename*
+*`filename`*\ Pointer to the name of the source file that requested the allocation operation or **NULL**. -*linenumber*
+*`linenumber`*\ Line number in the source file where the allocation operation was requested or **NULL**. -## Return Value +## Return value -Returns a pointer to *buffer*. A **NULL** return value indicates an error, and **errno** is set either to **ENOMEM**, indicating that there is insufficient memory to allocate *maxlen* bytes (when a **NULL** argument is given as *buffer*), or to **ERANGE**, indicating that the path is longer than *maxlen* characters. +Returns a pointer to *`buffer`*. A **NULL** return value indicates an error, and **errno** is set either to **ENOMEM**, indicating that there is insufficient memory to allocate *`maxlen`* bytes (when a **NULL** argument is given as *`buffer`*), or to **ERANGE**, indicating that the path is longer than *`maxlen`* characters. -For more information, see [errno, _doserrno, _sys_errlist, and _sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +For more information, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks -The **_getcwd_dbg** and **_wgetcwd_dbg** functions are identical to **_getcwd** and **_wgetcwd** except that, when **_DEBUG** is defined, these functions use the debug version of **malloc** and **_malloc_dbg** to allocate memory if **NULL** is passed as the first parameter. For more information, see [_malloc_dbg](malloc-dbg.md). +The **_getcwd_dbg** and **_wgetcwd_dbg** functions are identical to **_getcwd** and **_wgetcwd** except that, when **_DEBUG** is defined, these functions use the debug version of **malloc** and **_malloc_dbg** to allocate memory if **NULL** is passed as the first parameter. For more information, see [`_malloc_dbg`](malloc-dbg.md). -You do not need to call these functions explicitly in most cases. Instead, you can define the **_CRTDBG_MAP_ALLOC** flag. When **_CRTDBG_MAP_ALLOC** is defined, calls to **_getcwd** and **_wgetcwd** are remapped to **_getcwd_dbg** and **_wgetcwd_dbg**, respectively, with the *blockType* set to **_NORMAL_BLOCK**. Thus, you do not need to call these functions explicitly unless you want to mark the heap blocks as **_CLIENT_BLOCK**. For more information, see [Types of blocks on the debug heap](/visualstudio/debugger/crt-debug-heap-details). +You do not need to call these functions explicitly in most cases. Instead, you can define the **_CRTDBG_MAP_ALLOC** flag. When **_CRTDBG_MAP_ALLOC** is defined, calls to **_getcwd** and **_wgetcwd** are remapped to **_getcwd_dbg** and **_wgetcwd_dbg**, respectively, with the *`blockType`* set to **_NORMAL_BLOCK**. Thus, you do not need to call these functions explicitly unless you want to mark the heap blocks as **_CLIENT_BLOCK**. For more information, see [Types of blocks on the debug heap](/visualstudio/debugger/crt-debug-heap-details). -## Generic-Text Routine Mappings +## Generic-text routine mapping |Tchar.h routine|_UNICODE and _MBCS not defined|_MBCS defined|_UNICODE defined| |---------------------|--------------------------------------|--------------------|-----------------------| @@ -75,10 +75,10 @@ You do not need to call these functions explicitly in most cases. Instead, you c |**_getcwd_dbg**|\| |**_wgetcwd_dbg**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[_getcwd, _wgetcwd](getcwd-wgetcwd.md)
-[Directory Control](../../c-runtime-library/directory-control.md)
-[Debug Versions of Heap Allocation Functions](/visualstudio/debugger/debug-versions-of-heap-allocation-functions)
+[`_getcwd`, `_wgetcwd`](getcwd-wgetcwd.md)\ +[Directory control](../directory-control.md)\ +[Debug versions of heap allocation functions](/visualstudio/debugger/debug-versions-of-heap-allocation-functions) diff --git a/docs/c-runtime-library/reference/getcwd-wgetcwd.md b/docs/c-runtime-library/reference/getcwd-wgetcwd.md index 156a9b54c42..96cc1ab8823 100644 --- a/docs/c-runtime-library/reference/getcwd-wgetcwd.md +++ b/docs/c-runtime-library/reference/getcwd-wgetcwd.md @@ -35,11 +35,11 @@ Storage location for the path. *`maxlen`*\ Maximum length of the path in characters: **`char`** for **`_getcwd`** and **`wchar_t`** for **`_wgetcwd`**. -## Return Value +## Return value -Returns a pointer to *`buffer`*. A **`NULL`** return value indicates an error, and **`errno`** is set either to **`ENOMEM`**, indicating that there is insufficient memory to allocate *`maxlen`* bytes (when a **`NULL`** argument is given as *`buffer`*), or to **`ERANGE`**, indicating that the path is longer than *`maxlen`* characters. If *`maxlen`* is less than or equal to zero, this function invokes an invalid parameter handler, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). +Returns a pointer to *`buffer`*. A **`NULL`** return value indicates an error, and **`errno`** is set either to **`ENOMEM`**, indicating that there is insufficient memory to allocate *`maxlen`* bytes (when a **`NULL`** argument is given as *`buffer`*), or to **`ERANGE`**, indicating that the path is longer than *`maxlen`* characters. If *`maxlen`* is less than or equal to zero, this function invokes an invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). -For more information about these 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 these and other return codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks @@ -53,7 +53,7 @@ When **`_DEBUG`** and **`_CRTDBG_MAP_ALLOC`** are defined, calls to **`_getcwd`* 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| |---------------------|--------------------------------------|--------------------|-----------------------| @@ -66,7 +66,7 @@ By default, this function's global state is scoped to the application. To change |**`_getcwd`**|``| |**`_wgetcwd`**|`` or ``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -105,7 +105,7 @@ C:\Code ## See also -[Directory Control](../../c-runtime-library/directory-control.md)\ +[Directory control](../directory-control.md)\ [`_chdir`, `_wchdir`](chdir-wchdir.md)\ [`_mkdir`, `_wmkdir`](mkdir-wmkdir.md)\ [`_rmdir`, `_wrmdir`](rmdir-wrmdir.md) diff --git a/docs/c-runtime-library/reference/getdcwd-dbg-wgetdcwd-dbg.md b/docs/c-runtime-library/reference/getdcwd-dbg-wgetdcwd-dbg.md index 9fb01fc5fb3..7f86342e4dc 100644 --- a/docs/c-runtime-library/reference/getdcwd-dbg-wgetdcwd-dbg.md +++ b/docs/c-runtime-library/reference/getdcwd-dbg-wgetdcwd-dbg.md @@ -12,7 +12,7 @@ ms.assetid: 266bf6f0-0417-497f-963d-2e0f306d9385 --- # _getdcwd_dbg, _wgetdcwd_dbg -Debug versions of the [_getdcwd, _wgetdcwd](getdcwd-wgetdcwd.md) functions (only available during debug). +Debug versions of the [`_getdcwd`, `_wgetdcwd`](getdcwd-wgetdcwd.md) functions (only available during debug). ## Syntax @@ -37,35 +37,35 @@ wchar_t *_wgetdcwd_dbg( ### Parameters -*drive*
+*`drive`*\ Name of the disk drive. -*buffer*
+*`buffer`*\ Storage location for the path. -*maxlen*
+*`maxlen`*\ Maximum length of the path in characters: **`char`** for **_getdcwd_dbg** and **`wchar_t`** for **_wgetdcwd_dbg**. -*blockType*
+*`blockType`*\ Requested type of the memory block: **_CLIENT_BLOCK** or **_NORMAL_BLOCK**. -*filename*
+*`filename`*\ Pointer to the name of the source file that requested the allocation operation or **NULL**. -*linenumber*
+*`linenumber`*\ Line number in the source file where the allocation operation was requested or **NULL**. -## Return Value +## Return value -Returns a pointer to *buffer*. A **NULL** return value indicates an error, and **errno** is set either to **ENOMEM**, indicating that there is insufficient memory to allocate *maxlen* bytes (when a **NULL** argument is given as *buffer*), or to **ERANGE**, indicating that the path is longer than *maxlen* characters. For more information, see [errno, _doserrno, _sys_errlist, and _sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +Returns a pointer to *`buffer`*. A **NULL** return value indicates an error, and **errno** is set either to **ENOMEM**, indicating that there is insufficient memory to allocate *`maxlen`* bytes (when a **NULL** argument is given as *`buffer`*), or to **ERANGE**, indicating that the path is longer than *`maxlen`* characters. For more information, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks -The **_getdcwd_dbg** and **_wgetdcwd_dbg** functions are identical to **_getdcwd** and **_wgetdcwd** except that, when **_DEBUG** is defined, these functions use the debug version of **malloc** and **_malloc_dbg** to allocate memory if **NULL** is passed as the *buffer* parameter. For more information, see [_malloc_dbg](malloc-dbg.md). +The **_getdcwd_dbg** and **_wgetdcwd_dbg** functions are identical to **_getdcwd** and **_wgetdcwd** except that, when **_DEBUG** is defined, these functions use the debug version of **malloc** and **_malloc_dbg** to allocate memory if **NULL** is passed as the *`buffer`* parameter. For more information, see [`_malloc_dbg`](malloc-dbg.md). -You do not need to call these functions explicitly in most cases. Instead, you can define the **_CRTDBG_MAP_ALLOC** flag. When **_CRTDBG_MAP_ALLOC** is defined, calls to **_getdcwd** and **_wgetdcwd** are remapped to **_getdcwd_dbg** and **_wgetdcwd_dbg**, respectively, with the *blockType* set to **_NORMAL_BLOCK**. Thus, you do not need to call these functions explicitly unless you want to mark the heap blocks as **_CLIENT_BLOCK**. For more information, see [Types of Blocks on the Debug Heap](/visualstudio/debugger/crt-debug-heap-details). +You do not need to call these functions explicitly in most cases. Instead, you can define the **_CRTDBG_MAP_ALLOC** flag. When **_CRTDBG_MAP_ALLOC** is defined, calls to **_getdcwd** and **_wgetdcwd** are remapped to **_getdcwd_dbg** and **_wgetdcwd_dbg**, respectively, with the *`blockType`* set to **_NORMAL_BLOCK**. Thus, you do not need to call these functions explicitly unless you want to mark the heap blocks as **_CLIENT_BLOCK**. For more information, see [Types of blocks on the debug heap](/visualstudio/debugger/crt-debug-heap-details). -### Generic-Text Routine Mappings +### Generic-text routine mappings |Tchar.h routine|_UNICODE and _MBCS not defined|_MBCS defined|_UNICODE defined| |---------------------|--------------------------------------|--------------------|-----------------------| @@ -78,10 +78,10 @@ You do not need to call these functions explicitly in most cases. Instead, you c |**_getdcwd_dbg**|\| |**_wgetdcwd_dbg**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[_getdcwd, _wgetdcwd](getdcwd-wgetdcwd.md)
-[Directory Control](../../c-runtime-library/directory-control.md)
-[Debug Versions of Heap Allocation Functions](/visualstudio/debugger/debug-versions-of-heap-allocation-functions)
+[`_getdcwd`, `_wgetdcwd`](getdcwd-wgetdcwd.md)\ +[Directory control](../directory-control.md)\ +[Debug versions of heap allocation functions](/visualstudio/debugger/debug-versions-of-heap-allocation-functions) diff --git a/docs/c-runtime-library/reference/getdcwd-nolock-wgetdcwd-nolock.md b/docs/c-runtime-library/reference/getdcwd-nolock-wgetdcwd-nolock.md index ee60bc5a9c6..f7d632f7282 100644 --- a/docs/c-runtime-library/reference/getdcwd-nolock-wgetdcwd-nolock.md +++ b/docs/c-runtime-library/reference/getdcwd-nolock-wgetdcwd-nolock.md @@ -34,24 +34,24 @@ wchar_t *_wgetdcwd_nolock( ### Parameters -*drive*
+*`drive`*\ Disk drive. -*buffer*
+*`buffer`*\ Storage location for the path. -*maxlen*
+*`maxlen`*\ Maximum length of path in characters: **`char`** for **_getdcwd** and **`wchar_t`** for **_wgetdcwd**. -## Return Value +## Return value -See [_getdcwd, _wgetdcwd](getdcwd-wgetdcwd.md). +See [`_getdcwd`, `_wgetdcwd`](getdcwd-wgetdcwd.md). ## Remarks **_getdcwd_nolock** and **_wgetdcwd_nolock** are identical to **_getdcwd** and **_wgetdcwd**, respectively, except that they are not protected from interference by other threads. They might be faster because they do not incur the overhead of locking out other threads. Use these functions only in thread-safe contexts such as single-threaded applications or where the calling scope already handles thread isolation. -### Generic-Text Routine Mappings +### Generic-text routine mappings |Tchar.h routine|_UNICODE and _MBCS not defined|_MBCS defined|_UNICODE defined| |---------------------|--------------------------------------|--------------------|-----------------------| @@ -64,13 +64,13 @@ See [_getdcwd, _wgetdcwd](getdcwd-wgetdcwd.md). |**_getdcwd_nolock**|\| |**_wgetdcwd_nolock**|\ or \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Directory Control](../../c-runtime-library/directory-control.md)
-[_chdir, _wchdir](chdir-wchdir.md)
-[_getcwd, _wgetcwd](getcwd-wgetcwd.md)
-[_getdrive](getdrive.md)
-[_mkdir, _wmkdir](mkdir-wmkdir.md)
-[_rmdir, _wrmdir](rmdir-wrmdir.md)
+[Directory control](../directory-control.md)\ +[`_chdir`, `_wchdir`](chdir-wchdir.md)\ +[`_getcwd`, `_wgetcwd`](getcwd-wgetcwd.md)\ +[`_getdrive`](getdrive.md)\ +[`_mkdir`, `_wmkdir`](mkdir-wmkdir.md)\ +[`_rmdir`, `_wrmdir`](rmdir-wrmdir.md) diff --git a/docs/c-runtime-library/reference/getdcwd-wgetdcwd.md b/docs/c-runtime-library/reference/getdcwd-wgetdcwd.md index f253cb5aead..537b5eea9a7 100644 --- a/docs/c-runtime-library/reference/getdcwd-wgetdcwd.md +++ b/docs/c-runtime-library/reference/getdcwd-wgetdcwd.md @@ -31,42 +31,42 @@ wchar_t *_wgetdcwd( ### Parameters -*drive*
+*`drive`*\ A non-negative integer that specifies the drive (0 = default drive, 1 = A, 2 = B, and so on). -If the specified drive isn't available, or the kind of drive (for example, removable, fixed, CD-ROM, RAM disk, or network drive) can't be determined, the invalid-parameter handler is invoked. For more information, see [Parameter Validation](../../c-runtime-library/parameter-validation.md). +If the specified drive isn't available, or the kind of drive (for example, removable, fixed, CD-ROM, RAM disk, or network drive) can't be determined, the invalid-parameter handler is invoked. For more information, see [Parameter validation](../parameter-validation.md). -*buffer*
+*`buffer`*\ Storage location for the path, or **NULL**. -If **NULL** is specified, this function allocates a buffer of at least *maxlen* size by using **malloc**, and the return value of **_getdcwd** is a pointer to the allocated buffer. The buffer can be freed by calling **free** and passing it the pointer. +If **NULL** is specified, this function allocates a buffer of at least *`maxlen`* size by using **malloc**, and the return value of **_getdcwd** is a pointer to the allocated buffer. The buffer can be freed by calling **free** and passing it the pointer. -*maxlen*
+*`maxlen`*\ A nonzero positive integer that specifies the maximum length of the path, in characters: **`char`** for **_getdcwd** and **`wchar_t`** for **_wgetdcwd**. -If *maxlen* is less than or equal to zero, the invalid-parameter handler is invoked. For more information, see [Parameter Validation](../../c-runtime-library/parameter-validation.md). +If *`maxlen`* is less than or equal to zero, the invalid-parameter handler is invoked. For more information, see [Parameter validation](../parameter-validation.md). -## Return Value +## Return value Pointer to a string that represents the full path of the current working directory on the specified drive, or **NULL**, which indicates an error. -If *buffer* is specified as **NULL** and there is insufficient memory to allocate *maxlen* characters, an error occurs and **errno** is set to **ENOMEM**. If the length of the path including the terminating null character exceeds *maxlen*, an error occurs, and **errno** is set to **ERANGE**. For more information about these error codes, see [errno, _doserrno, _sys_errlist, and _sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +If *`buffer`* is specified as **NULL** and there is insufficient memory to allocate *`maxlen`* characters, an error occurs and **errno** is set to **ENOMEM**. If the length of the path including the terminating null character exceeds *`maxlen`*, an error occurs, and **errno** is set to **ERANGE**. For more information about these error codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks -The **_getdcwd** function gets the full path of the current working directory on the specified drive and stores it at *buffer*. If the current working directory is set to the root, the string ends with a backslash (\\). If the current working directory is set to a directory other than the root, the string ends with the name of the directory and not with a backslash. +The **_getdcwd** function gets the full path of the current working directory on the specified drive and stores it at *`buffer`*. If the current working directory is set to the root, the string ends with a backslash (\\). If the current working directory is set to a directory other than the root, the string ends with the name of the directory and not with a backslash. -**_wgetdcwd** is a wide-character version of **_getdcwd**, and its *buffer* parameter and return value are wide-character strings. Otherwise, **_wgetdcwd** and **_getdcwd** behave identically. +**_wgetdcwd** is a wide-character version of **_getdcwd**, and its *`buffer`* parameter and return value are wide-character strings. Otherwise, **_wgetdcwd** and **_getdcwd** behave identically. This function is thread-safe even though it depends on **GetFullPathName**, which is itself not thread-safe. However, you can violate thread safety if your multithreaded application calls both this function and [GetFullPathName](/windows/win32/api/fileapi/nf-fileapi-getfullpathnamew). -The version of this function that has the **_nolock** suffix behaves identically to this function except that it is not thread-safe and is not protected from interference by other threads. For more information, see [_getdcwd_nolock, _wgetdcwd_nolock](getdcwd-nolock-wgetdcwd-nolock.md). +The version of this function that has the **_nolock** suffix behaves identically to this function except that it is not thread-safe and is not protected from interference by other threads. For more information, see [`_getdcwd_nolock`, `_wgetdcwd_nolock`](getdcwd-nolock-wgetdcwd-nolock.md). -When **_DEBUG** and **_CRTDBG_MAP_ALLOC** are defined, calls to **_getdcwd** and **_wgetdcwd** are replaced by calls to **_getdcwd_dbg** and **_wgetdcwd_dbg** so that you can debug memory allocations. For more information, see[_getdcwd_dbg, _wgetdcwd_dbg](getdcwd-dbg-wgetdcwd-dbg.md). +When **_DEBUG** and **_CRTDBG_MAP_ALLOC** are defined, calls to **_getdcwd** and **_wgetdcwd** are replaced by calls to **_getdcwd_dbg** and **_wgetdcwd_dbg** so that you can debug memory allocations. For more information, see[`_getdcwd_dbg`, `_wgetdcwd_dbg`](getdcwd-dbg-wgetdcwd-dbg.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| |---------------------|--------------------------------------|--------------------|-----------------------| @@ -79,17 +79,17 @@ By default, this function's global state is scoped to the application. To change |**_getdcwd**|\| |**_wgetdcwd**|\ or \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example -See the example in [_getdrive](getdrive.md). +See the example in [`_getdrive`](getdrive.md). ## See also -[Directory Control](../../c-runtime-library/directory-control.md)
-[_chdir, _wchdir](chdir-wchdir.md)
-[_getcwd, _wgetcwd](getcwd-wgetcwd.md)
-[_getdrive](getdrive.md)
-[_mkdir, _wmkdir](mkdir-wmkdir.md)
-[_rmdir, _wrmdir](rmdir-wrmdir.md)
+[Directory control](../directory-control.md)\ +[`_chdir`, `_wchdir`](chdir-wchdir.md)\ +[`_getcwd`, `_wgetcwd`](getcwd-wgetcwd.md)\ +[`_getdrive`](getdrive.md)\ +[`_mkdir`, `_wmkdir`](mkdir-wmkdir.md)\ +[`_rmdir`, `_wrmdir`](rmdir-wrmdir.md) diff --git a/docs/c-runtime-library/reference/getdiskfree.md b/docs/c-runtime-library/reference/getdiskfree.md index d237032ee58..8b5ef512c0e 100644 --- a/docs/c-runtime-library/reference/getdiskfree.md +++ b/docs/c-runtime-library/reference/getdiskfree.md @@ -33,9 +33,9 @@ The disk drive for which you want information. *`driveinfo`*\ A **`_diskfree_t`** structure that will be populated with information about the drive. -## Return Value +## Return value -If the function succeeds, the return value is zero. If the function fails, the return value is the error code. The value **`errno`** is set for any errors that are returned by the operating system. For more information about error conditions that are indicated by **`errno`**, see [`errno` constants](../../c-runtime-library/errno-constants.md). +If the function succeeds, the return value is zero. If the function fails, the return value is the error code. The value **`errno`** is set for any errors that are returned by the operating system. For more information about error conditions that are indicated by **`errno`**, see [`errno` constants](../errno-constants.md). ## Remarks @@ -50,7 +50,7 @@ struct _diskfree_t { }; ``` -This function validates its parameters. If the *`driveinfo`* pointer is **`NULL`** or *`drive`* specifies an invalid drive, this function invokes an invalid parameter handler, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, the function returns **`EINVAL`** and sets **`errno`** to **`EINVAL`**. Valid drives range from 0 to 26. A *drive* value of 0 specifies the current drive; thereafter, numbers map to letters of the English alphabet such that 1 indicates drive A, 3 indicates drive C, and so on. +This function validates its parameters. If the *`driveinfo`* pointer is **`NULL`** or *`drive`* specifies an invalid drive, this function invokes an invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, the function returns **`EINVAL`** and sets **`errno`** to **`EINVAL`**. Valid drives range from 0 to 26. A *`drive`* value of 0 specifies the current drive; thereafter, numbers map to letters of the English alphabet such that 1 indicates drive A, 3 indicates drive C, and so on. 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). @@ -60,7 +60,7 @@ By default, this function's global state is scoped to the application. To change |-------------|---------------------| |**`_getdiskfree`**|``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -113,4 +113,4 @@ Drive: C ## See also -[Directory Control](../../c-runtime-library/directory-control.md) +[Directory control](../directory-control.md) diff --git a/docs/c-runtime-library/reference/getdrive.md b/docs/c-runtime-library/reference/getdrive.md index 29b44753793..453468fc05c 100644 --- a/docs/c-runtime-library/reference/getdrive.md +++ b/docs/c-runtime-library/reference/getdrive.md @@ -23,7 +23,7 @@ Gets the current disk drive. int _getdrive( void ); ``` -## Return Value +## Return value Returns the current (default) drive (1=A, 2=B, and so on). A return value of zero means that the current path doesn't start with a letter drive name, such as a UNC path. Or, it means that an internal buffer allocation failed. If an internal allocation fails, `errno` is set to ENOMEM. @@ -37,7 +37,7 @@ By default, this function's global state is scoped to the application. To change |-------------|---------------------| |**_getdrive**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -91,7 +91,7 @@ G: (Current directory is G:\) ## See also -[Directory Control](../../c-runtime-library/directory-control.md)
-[_chdrive](chdrive.md)
-[_getcwd, _wgetcwd](getcwd-wgetcwd.md)
-[_getdcwd, _wgetdcwd](getdcwd-wgetdcwd.md)
+[Directory control](../directory-control.md)\ +[`_chdrive`](chdrive.md)\ +[`_getcwd`, `_wgetcwd`](getcwd-wgetcwd.md)\ +[`_getdcwd`, `_wgetdcwd`](getdcwd-wgetdcwd.md) diff --git a/docs/c-runtime-library/reference/getdrives.md b/docs/c-runtime-library/reference/getdrives.md index 118c72b7ec1..e50fa512eb8 100644 --- a/docs/c-runtime-library/reference/getdrives.md +++ b/docs/c-runtime-library/reference/getdrives.md @@ -23,7 +23,7 @@ Returns a bitmask that represents the currently available disk drives. unsigned long _getdrives( void ); ``` -## Return Value +## Return value If the function succeeds, the return value is a bitmask that represents the currently available disk drives. Bit position 0 (the least-significant bit) is drive A, bit position 1 is drive B, bit position 2 is drive C, and so on. If the function fails, the return value is zero. To get extended error information, call **GetLastError**. @@ -37,7 +37,7 @@ By default, this function's global state is scoped to the application. To change |-------------|---------------------| |**_getdrives**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -87,4 +87,4 @@ E: ## See also -[Directory Control](../../c-runtime-library/directory-control.md)
+[Directory control](../directory-control.md) diff --git a/docs/c-runtime-library/reference/getenv-s-wgetenv-s.md b/docs/c-runtime-library/reference/getenv-s-wgetenv-s.md index 0b29ce656db..9d618adeef0 100644 --- a/docs/c-runtime-library/reference/getenv-s-wgetenv-s.md +++ b/docs/c-runtime-library/reference/getenv-s-wgetenv-s.md @@ -12,7 +12,7 @@ no-loc: [getenv_s, _wgetenv_s, _putenv_s, main, wmain, errno, EINVAL, ERANGE, _e --- # `getenv_s`, `_wgetenv_s` -Gets a value from the current environment. These versions of [`getenv`, `_wgetenv`](getenv-wgetenv.md) have security enhancements, as described in [Security Features in the CRT](../../c-runtime-library/security-features-in-the-crt.md). +Gets a value from the current environment. These versions of [`getenv`, `_wgetenv`](getenv-wgetenv.md) have security enhancements, as described in [Security features in the CRT](../security-features-in-the-crt.md). > [!IMPORTANT] > This API cannot be used in applications that execute in the Windows Runtime. For more information, see [CRT functions not supported in Universal Windows Platform apps](../../cppcx/crt-functions-not-supported-in-universal-windows-platform-apps.md). @@ -60,11 +60,11 @@ Size of *`buffer`*. *`varname`*\ Environment variable name. -## Return Value +## Return value Zero if successful; otherwise, an error code on failure. -### Error Conditions +### Error conditions |*`pReturnValue`*|*`buffer`*|*`numberOfElements`*|*`varname`*|Return Value| |--------------------|--------------|------------------------|---------------|------------------| @@ -72,7 +72,7 @@ Zero if successful; otherwise, an error code on failure. |any|**`NULL`**|>0|any|**`EINVAL`**| |any|any|any|**`NULL`**|**`EINVAL`**| -Any of these error conditions invokes an invalid parameter handler, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, the functions set **`errno`** to **`EINVAL`** and return **`EINVAL`**. +Any of these error conditions invokes an invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, the functions set **`errno`** to **`EINVAL`** and return **`EINVAL`**. Also, if the buffer is too small, these functions return **`ERANGE`**. They don't invoke an invalid parameter handler. They write out the required buffer size in *`pReturnValue`*, and thereby enable programs to call the function again with a larger buffer. @@ -89,22 +89,22 @@ Similarly in a Unicode (**`_wmain`**) program, **`_environ`** is initially **`NU When two copies of the environment (MBCS and Unicode) exist simultaneously in a program, the run-time system must maintain both copies, and this causes slower execution time. For example, when you call **`_putenv`**, a call to **`_wputenv`** is also executed automatically so that the two environment strings correspond. > [!CAUTION] -> In rare instances, when the run-time system is maintaining both a Unicode version and a multibyte version of the environment, the two environment versions may not correspond exactly. This happens because, although any unique multibyte-character string maps to a unique Unicode string, the mapping from a unique Unicode string to a multibyte-character string is not necessarily unique. For more information, see [`_environ`, `_wenviron`](../../c-runtime-library/environ-wenviron.md). +> In rare instances, when the run-time system is maintaining both a Unicode version and a multibyte version of the environment, the two environment versions may not correspond exactly. This happens because, although any unique multibyte-character string maps to a unique Unicode string, the mapping from a unique Unicode string to a multibyte-character string is not necessarily unique. For more information, see [`_environ`, `_wenviron`](../environ-wenviron.md). > [!NOTE] > The **`_putenv_s`** and **`_getenv_s`** families of functions are not thread-safe. **`_getenv_s`** could return a string pointer while **`_putenv_s`** is modifying the string and thereby cause random failures. Make sure that calls to these functions are synchronized. -In C++, use of these functions is simplified by template overloads; the overloads can infer buffer length automatically and thereby eliminate the need to specify a size argument. For more information, see [Secure Template Overloads](../../c-runtime-library/secure-template-overloads.md). +In C++, use of these functions is simplified by template overloads; the overloads can infer buffer length automatically and thereby eliminate the need to specify a size argument. 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 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| |---------------------|------------------------------------|--------------------|-----------------------| |**`_tgetenv_s`**|**`getenv_s`**|**`getenv_s`**|**`_wgetenv_s`**| -To check or change the value of the **`TZ`** environment variable, use **`getenv_s`**, **`_putenv`**, and **`_tzset`**, as required. For more information about **`TZ`**, see [`_tzset`](tzset.md) and [`_daylight`, `_dstbias`, `_timezone`, and `_tzname`](../../c-runtime-library/daylight-dstbias-timezone-and-tzname.md). +To check or change the value of the **`TZ`** environment variable, use **`getenv_s`**, **`_putenv`**, and **`_tzset`**, as required. For more information about **`TZ`**, see [`_tzset`](tzset.md) and [`_daylight`, `_dstbias`, `_timezone`, and `_tzname`](../daylight-dstbias-timezone-and-tzname.md). ## Requirements @@ -113,7 +113,7 @@ To check or change the value of the **`TZ`** environment variable, use **`getenv |**`getenv_s`**|``| |**`_wgetenv_s`**|`` or ``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -180,7 +180,7 @@ New LIB variable is: c:\mylib;c:\yourlib ## See also -[Process and Environment Control](../../c-runtime-library/process-and-environment-control.md)\ -[Environmental Constants](../../c-runtime-library/environmental-constants.md)\ +[Process and environment control](../process-and-environment-control.md)\ +[Environmental constants](../environmental-constants.md)\ [`_putenv`, `_wputenv`](putenv-wputenv.md)\ [`_dupenv_s`, `_wdupenv_s`](dupenv-s-wdupenv-s.md) diff --git a/docs/c-runtime-library/reference/getenv-wgetenv.md b/docs/c-runtime-library/reference/getenv-wgetenv.md index 7a7ea8c5b08..a495f4d0386 100644 --- a/docs/c-runtime-library/reference/getenv-wgetenv.md +++ b/docs/c-runtime-library/reference/getenv-wgetenv.md @@ -13,7 +13,7 @@ no-loc: [getenv, _wgetenv, getenv_s, _wgetenv_s, _putenv_s, main, wmain, errno, --- # `getenv`, `_wgetenv` -Gets a value from the current environment. More secure versions of these functions are available; see [getenv_s, _wgetenv_s](getenv-s-wgetenv-s.md). +Gets a value from the current environment. More secure versions of these functions are available; see [`getenv_s`, `_wgetenv_s`](getenv-s-wgetenv-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). @@ -31,7 +31,7 @@ wchar_t *_wgetenv( ### Parameters -*`varname`*
+*`varname`*\ Environment variable name. ## Return value @@ -42,7 +42,7 @@ Returns a pointer to the environment table entry containing *`varname`*. It is n The **`getenv`** function searches the list of environment variables for *`varname`*. **`getenv`** is not case sensitive in the Windows operating system. **`getenv`** and **`_putenv`** use the copy of the environment pointed to by the global variable **`_environ`** to access the environment. **`getenv`** operates only on the data structures accessible to the run-time library and not on the environment "segment" created for the process by the operating system. Therefore, programs that use the *`envp`* argument to [`main`](../../cpp/main-function-command-line-args.md) or [`wmain`](../../cpp/main-function-command-line-args.md) may retrieve invalid information. -If *`varname`* is **`NULL`**, this function invokes an invalid parameter handler, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, this function sets **`errno`** to **`EINVAL`** and returns **`NULL`**. +If *`varname`* is **`NULL`**, this function invokes an invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, this function sets **`errno`** to **`EINVAL`** and returns **`NULL`**. **`_wgetenv`** is a wide-character version of **`getenv`**; the argument and return value of **`_wgetenv`** are wide-character strings. The **`_wenviron`** global variable is a wide-character version of **`_environ`**. @@ -53,20 +53,20 @@ Similarly in a Unicode (**`_wmain`**) program, **`_environ`** is initially **`NU 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. > [!CAUTION] -> In rare instances, when the run-time system is maintaining both a Unicode version and a multibyte version of the environment, these two environment versions may not correspond exactly. This is because, although any unique multibyte-character string maps to a unique Unicode string, the mapping from a unique Unicode string to a multibyte-character string is not necessarily unique. For more information, see [`_environ`, `_wenviron`](../../c-runtime-library/environ-wenviron.md). +> In rare instances, when the run-time system is maintaining both a Unicode version and a multibyte version of the environment, these two environment versions may not correspond exactly. This is because, although any unique multibyte-character string maps to a unique Unicode string, the mapping from a unique Unicode string to a multibyte-character string is not necessarily unique. For more information, see [`_environ`, `_wenviron`](../environ-wenviron.md). > [!NOTE] > The **`_putenv`** and **`_getenv`** families of functions are not thread-safe. **`_getenv`** could return a string pointer while **`_putenv`** is modifying the string, causing random failures. Make sure that calls to these functions are synchronized. 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| |---------------------|------------------------------------|--------------------|-----------------------| |**`_tgetenv`**|**`getenv`**|**`getenv`**|**`_wgetenv`**| -To check or change the value of the **`TZ`** environment variable, use **`getenv`**, **`_putenv`** and **`_tzset`** as necessary. For more information about **`TZ`**, see [`_tzset`](tzset.md) and [`_daylight`, `timezone`, and `_tzname`](../../c-runtime-library/daylight-dstbias-timezone-and-tzname.md). +To check or change the value of the **`TZ`** environment variable, use **`getenv`**, **`_putenv`** and **`_tzset`** as necessary. For more information about **`TZ`**, see [`_tzset`](tzset.md) and [`_daylight`, `timezone`, and `_tzname`](../daylight-dstbias-timezone-and-tzname.md). ## Requirements @@ -75,7 +75,7 @@ To check or change the value of the **`TZ`** environment variable, use **`getenv |**`getenv`**|``| |**`_wgetenv`**|`` or ``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -121,6 +121,6 @@ New LIB variable is: c:\mylib;c:\yourlib ## See also -[Process and environment control](../../c-runtime-library/process-and-environment-control.md)
-[`_putenv`, `_wputenv`](putenv-wputenv.md)
-[Environmental constants](../../c-runtime-library/environmental-constants.md)
+[Process and environment control](../process-and-environment-control.md)\ +[`_putenv`, `_wputenv`](putenv-wputenv.md)\ +[Environmental constants](../environmental-constants.md) diff --git a/docs/c-runtime-library/reference/getmaxstdio.md b/docs/c-runtime-library/reference/getmaxstdio.md index a02cd8d13ef..ce5f5aa5493 100644 --- a/docs/c-runtime-library/reference/getmaxstdio.md +++ b/docs/c-runtime-library/reference/getmaxstdio.md @@ -20,13 +20,13 @@ Returns the number of simultaneously open files permitted at the stream I/O leve int _getmaxstdio( void ); ``` -## Return Value +## Return value Returns a number that represents the number of simultaneously open files currently permitted at the **stdio** level. ## Remarks -Use [_setmaxstdio](setmaxstdio.md) to configure the number of simultaneously open files permitted at the **stdio** level. +Use [`_setmaxstdio`](setmaxstdio.md) to configure the number of simultaneously open files permitted at the **stdio** level. ## Requirements @@ -34,7 +34,7 @@ Use [_setmaxstdio](setmaxstdio.md) to configure the number of simultaneously ope |-------------|---------------------| |**_getmaxstdio**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -63,4 +63,4 @@ int main() ## See also -[Stream I/O](../../c-runtime-library/stream-i-o.md)
+[Stream I/O](../stream-i-o.md) diff --git a/docs/c-runtime-library/reference/getmbcp.md b/docs/c-runtime-library/reference/getmbcp.md index bd7b8dd4048..e2ddce41e38 100644 --- a/docs/c-runtime-library/reference/getmbcp.md +++ b/docs/c-runtime-library/reference/getmbcp.md @@ -20,7 +20,7 @@ Retrieves the current code page. int _getmbcp( void ); ``` -## Return Value +## Return value Returns the current multibyte code page. A return value of 0 indicates that a single byte code page is in use. @@ -34,8 +34,8 @@ By default, this function's global state is scoped to the application. To change |-------------|---------------------| |**_getmbcp**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[_setmbcp](setmbcp.md)
+[`_setmbcp`](setmbcp.md) diff --git a/docs/c-runtime-library/reference/getpid.md b/docs/c-runtime-library/reference/getpid.md index 169ba02f03b..bc7fcdbfe2c 100644 --- a/docs/c-runtime-library/reference/getpid.md +++ b/docs/c-runtime-library/reference/getpid.md @@ -22,7 +22,7 @@ Gets the process identification. int _getpid( void ); ``` -## Return Value +## Return value Returns the process ID obtained from the system. There's no error return. @@ -36,7 +36,7 @@ The **`_getpid`** function obtains the process ID from the system. The process I |-------------|---------------------| |**`_getpid`**|``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -63,5 +63,5 @@ Process id: 3584 ## See also -[Process and Environment Control](../../c-runtime-library/process-and-environment-control.md)\ +[Process and environment control](../process-and-environment-control.md)\ [`_mktemp`, `_wmktemp`](mktemp-wmktemp.md) diff --git a/docs/c-runtime-library/reference/gets-s-getws-s.md b/docs/c-runtime-library/reference/gets-s-getws-s.md index 7b70f6c21b1..1f04e5cc0a1 100644 --- a/docs/c-runtime-library/reference/gets-s-getws-s.md +++ b/docs/c-runtime-library/reference/gets-s-getws-s.md @@ -12,7 +12,7 @@ ms.assetid: 5880c36f-122c-4061-a1a5-aeeced6fe58c --- # `gets_s`, `_getws_s` -Gets a line from the **`stdin`** stream. These versions of [`gets`, `_getws`](../../c-runtime-library/gets-getws.md) have security enhancements, as described in [Security Features in the CRT](../../c-runtime-library/security-features-in-the-crt.md). +Gets a line from the **`stdin`** stream. These versions of [`gets`, `_getws`](../gets-getws.md) have security enhancements, as described in [Security features in the CRT](../security-features-in-the-crt.md). ## Syntax @@ -37,13 +37,13 @@ wchar_t *_getws_s( wchar_t (&buffer)[size] ); // C++ only ### Parameters -*`buffer`*
+*`buffer`*\ Storage location for input string. -*`sizeInCharacters`*
+*`sizeInCharacters`*\ The size of the buffer. -## Return Value +## Return value Returns *`buffer`* if successful. A **`NULL`** pointer indicates an error or end-of-file condition. Use [`ferror`](ferror.md) or [`feof`](feof.md) to determine which one has occurred. @@ -55,13 +55,13 @@ If the first character read is the end-of-file character, a null character is st **`_getws_s`** is a wide-character version of **`gets_s`**; its argument and return value are wide-character strings. -If *`buffer`* is **`NULL`** or *`sizeInCharacters`* is less than or equal to zero, or if the buffer is too small to contain the input line and null terminator, 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 **`ERANGE`**. +If *`buffer`* is **`NULL`** or *`sizeInCharacters`* is less than or equal to zero, or if the buffer is too small to contain the input line and null terminator, 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 **`ERANGE`**. -In C++, using these functions is simplified by template overloads; the overloads can infer buffer length automatically (eliminating the need to specify a size argument) and they can automatically replace older, non-secure functions with their newer, secure counterparts. For more information, see [Secure Template Overloads](../../c-runtime-library/secure-template-overloads.md). +In C++, using these functions is simplified by template overloads; the overloads can infer buffer length automatically (eliminating the need to specify a size argument) and they can automatically replace older, non-secure functions with their newer, secure counterparts. For more information, see [Secure template overloads](../secure-template-overloads.md). 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| |---------------------|------------------------------------|--------------------|-----------------------| @@ -74,7 +74,7 @@ By default, this function's global state is scoped to the application. To change |**`gets_s`**|``| |**`_getws_s`**|`` or ``| -The console is not supported in Universal Windows Platform (UWP) apps. The standard stream handles that are associated with the console, **`stdin`**, **`stdout`**, and **`stderr`**, must be redirected before C run-time functions can use them in UWP apps. For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +The console is not supported in Universal Windows Platform (UWP) apps. The standard stream handles that are associated with the console, **`stdin`**, **`stdout`**, and **`stderr`**, must be redirected before C run-time functions can use them in UWP apps. For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -103,8 +103,8 @@ The line entered was: Hello there! ## See also -[Stream I/O](../../c-runtime-library/stream-i-o.md)
-[`gets`, `_getws`](../../c-runtime-library/gets-getws.md)
-[`fgets`, `fgetws`](fgets-fgetws.md)
-[`fputs`, `fputws`](fputs-fputws.md)
-[`puts`, `_putws`](puts-putws.md)
+[Stream I/O](../stream-i-o.md)\ +[`gets`, `_getws`](../gets-getws.md)\ +[`fgets`, `fgetws`](fgets-fgetws.md)\ +[`fputs`, `fputws`](fputs-fputws.md)\ +[`puts`, `_putws`](puts-putws.md) diff --git a/docs/c-runtime-library/reference/getw.md b/docs/c-runtime-library/reference/getw.md index 36d1646e65a..b985c2396ef 100644 --- a/docs/c-runtime-library/reference/getw.md +++ b/docs/c-runtime-library/reference/getw.md @@ -24,16 +24,16 @@ int _getw( ### Parameters -*stream*
+*`stream`*\ Pointer to the **FILE** structure. -## Return Value +## Return value -**_getw** returns the integer value read. A return value of **EOF** indicates either an error or end of file. However, because the **EOF** value is also a legitimate integer value, use **feof** or **ferror** to verify an end-of-file or error condition. If *stream* is **NULL**, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, **errno** is set to **EINVAL** and the function returns **EOF**. +**_getw** returns the integer value read. A return value of **EOF** indicates either an error or end of file. However, because the **EOF** value is also a legitimate integer value, use **feof** or **ferror** to verify an end-of-file or error condition. If *`stream`* is **NULL**, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, **errno** is set to **EINVAL** and the function returns **EOF**. ## Remarks -The **_getw** function reads the next binary value of type **`int`** from the file associated with *stream* and increments the associated file pointer (if there is one) to point to the next unread character. **_getw** does not assume any special alignment of items in the stream. Problems with porting can occur with **_getw** because the size of the **`int`** type and the ordering of bytes within the **`int`** type differ across systems. +The **_getw** function reads the next binary value of type **`int`** from the file associated with *`stream`* and increments the associated file pointer (if there is one) to point to the next unread character. **_getw** does not assume any special alignment of items in the stream. Problems with porting can occur with **_getw** because the size of the **`int`** type and the ordering of bytes within the **`int`** type differ across systems. 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). @@ -43,7 +43,7 @@ By default, this function's global state is scoped to the application. To change |-------------|---------------------| |**_getw**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -95,5 +95,5 @@ First data word in file: 0x656e694c ## See also -[Stream I/O](../../c-runtime-library/stream-i-o.md)
-[_putw](putw.md)
+[Stream I/O](../stream-i-o.md)\ +[`_putw`](putw.md) diff --git a/docs/c-runtime-library/reference/gmtime-gmtime32-gmtime64.md b/docs/c-runtime-library/reference/gmtime-gmtime32-gmtime64.md index 195e486cb73..38a0714bc2f 100644 --- a/docs/c-runtime-library/reference/gmtime-gmtime32-gmtime64.md +++ b/docs/c-runtime-library/reference/gmtime-gmtime32-gmtime64.md @@ -26,9 +26,9 @@ struct tm *_gmtime64( const __time64_t *sourceTime ); *`sourceTime`*\ Pointer to the stored time. The time is represented as seconds elapsed since midnight (00:00:00), January 1, 1970, coordinated universal time (UTC). -## Return Value +## Return value -A pointer to a structure of type [`tm`](../../c-runtime-library/standard-types.md). The fields of the returned structure hold the evaluated value of the *`sourceTime`* argument in UTC rather than in local time. Each of the structure fields is of type `int`, as follows: +A pointer to a structure of type [`tm`](../standard-types.md). The fields of the returned structure hold the evaluated value of the *`sourceTime`* argument in UTC rather than in local time. Each of the structure fields is of type `int`, as follows: |Field|Description| |-|-| @@ -48,7 +48,7 @@ Both the 32-bit and 64-bit versions of **`gmtime`**, [`mktime`](mktime-mktime32- **`gmtime`** is an inline function that evaluates to **`_gmtime64`**, and `time_t` is equivalent to `__time64_t` unless `_USE_32BIT_TIME_T` is defined. If you must force the compiler to interpret `time_t` as the old 32-bit `time_t`, you can define `_USE_32BIT_TIME_T`, but doing so causes **`gmtime`** to be in-lined to **`_gmtime32`** and `time_t` to be defined as `__time32_t`. We don't recommend that you do this, because it isn't allowed on 64-bit platforms. In any case, your application may fail after January 18, 2038. -These functions validate their parameters. If *`sourceTime`* is a `NULL` pointer, or if the *`sourceTime`* value is negative, these functions invoke an invalid parameter handler, as described in [Parameter validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, the functions return `NULL` and set `errno` to `EINVAL`. +These functions validate their parameters. If *`sourceTime`* is a `NULL` pointer, or if the *`sourceTime`* value is negative, these functions invoke an invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, the functions return `NULL` and set `errno` to `EINVAL`. ## Remarks @@ -65,7 +65,7 @@ By default, this function's global state is scoped to the application. To change |-------------|---------------------|-| |**`gmtime`**, **`_gmtime32`**, **`_gmtime64`**|``| `` or ``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -102,7 +102,7 @@ Coordinated universal time is Tue Feb 12 23:11:31 2002 ## See also -[Time Management](../../c-runtime-library/time-management.md)\ +[Time management](../time-management.md)\ [`asctime`, `_wasctime`](asctime-wasctime.md)\ [`ctime`, `_ctime32`, `_ctime64`, `_wctime`, `_wctime32`, `_wctime64`](ctime-ctime32-ctime64-wctime-wctime32-wctime64.md)\ [`_ftime`, `_ftime32`, `_ftime64`](ftime-ftime32-ftime64.md)\ diff --git a/docs/c-runtime-library/reference/gmtime-s-gmtime32-s-gmtime64-s.md b/docs/c-runtime-library/reference/gmtime-s-gmtime32-s-gmtime64-s.md index dd5a0a5f82a..e6272520b9e 100644 --- a/docs/c-runtime-library/reference/gmtime-s-gmtime32-s-gmtime64-s.md +++ b/docs/c-runtime-library/reference/gmtime-s-gmtime32-s-gmtime64-s.md @@ -11,7 +11,7 @@ helpviewer_keywords: ["gmtime_s function", "gmtime32_s function", "time function --- # `gmtime_s`, `_gmtime32_s`, `_gmtime64_s` -Converts a time value to a **`tm`** structure. These are versions of [`_gmtime32`, `_gmtime64`](gmtime-gmtime32-gmtime64.md) with security enhancements as described in [Security Features in the CRT](../../c-runtime-library/security-features-in-the-crt.md). +Converts a time value to a **`tm`** structure. These are versions of [`_gmtime32`, `_gmtime64`](gmtime-gmtime32-gmtime64.md) with security enhancements as described in [Security features in the CRT](../security-features-in-the-crt.md). ## Syntax @@ -33,16 +33,16 @@ errno_t _gmtime64_s( ### Parameters *`tmDest`*\ -Pointer to a [`tm`](../../c-runtime-library/standard-types.md) structure. The fields of the returned structure hold the evaluated value of the *`timer`* argument in UTC rather than in local time. +Pointer to a [`tm`](../standard-types.md) structure. The fields of the returned structure hold the evaluated value of the *`timer`* argument in UTC rather than in local time. *`sourceTime`*\ Pointer to stored time. The time is represented as seconds elapsed since midnight (00:00:00), January 1, 1970, coordinated universal time (UTC). -## Return Value +## Return value -Zero if successful. The return value is an error code if there's a failure. Error codes are defined in `Errno.h`; for a listing of these errors, see [`errno`](../../c-runtime-library/errno-constants.md). +Zero if successful. The return value is an error code if there's a failure. Error codes are defined in `Errno.h`; for a listing of these errors, see [`errno`](../errno-constants.md). -### Error Conditions +### Error conditions |*`tmDest`*|*`sourceTime`*|Return|Value in *`tmDest`*| |-----------|------------|------------|--------------------| @@ -50,7 +50,7 @@ Zero if successful. The return value is an error code if there's a failure. Erro |Not **`NULL`** (points to valid memory)|**`NULL`**|**`EINVAL`**|All fields set to -1.| |Not **`NULL`**|< 0|**`EINVAL`**|All fields set to -1.| -In the case of the first two error conditions, the invalid parameter handler is invoked, 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 **`EINVAL`**. +In the case of the first two error conditions, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, these functions set **`errno`** to **`EINVAL`** and return **`EINVAL`**. ## Remarks @@ -85,7 +85,7 @@ By default, this function's global state is scoped to the application. To change |-------------|---------------------|-| |**`gmtime_s`**, **`_gmtime32_s`**, **`_gmtime64_s`**|``|`` or ``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -133,7 +133,7 @@ Coordinated universal time is Fri Apr 25 20:12:33 2003 ## See also -[Time Management](../../c-runtime-library/time-management.md)\ +[Time management](../time-management.md)\ [`asctime_s`, `_wasctime_s`](asctime-s-wasctime-s.md)\ [`ctime`, `_ctime32`, `_ctime64`, `_wctime`, `_wctime32`, `_wctime64`](ctime-ctime32-ctime64-wctime-wctime32-wctime64.md)\ [`_ftime`, `_ftime32`, `_ftime64`](ftime-ftime32-ftime64.md)\ diff --git a/docs/c-runtime-library/reference/heapchk.md b/docs/c-runtime-library/reference/heapchk.md index 0c970adb341..17fb879d460 100644 --- a/docs/c-runtime-library/reference/heapchk.md +++ b/docs/c-runtime-library/reference/heapchk.md @@ -20,7 +20,7 @@ Runs consistency checks on the heap. int _heapchk( void ); ``` -## Return Value +## Return value **_heapchk** returns one of the following integer manifest constants defined in Malloc.h. @@ -46,7 +46,7 @@ By default, this function's global state is scoped to the application. To change |-------------|---------------------|---------------------| |**_heapchk**|\|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -93,8 +93,8 @@ OK - heap is fine ## See also -[Memory Allocation](../../c-runtime-library/memory-allocation.md)
-[_heapadd](../../c-runtime-library/heapadd.md)
-[_heapmin](heapmin.md)
-[_heapset](../../c-runtime-library/heapset.md)
-[_heapwalk](heapwalk.md)
+[Memory allocation](../memory-allocation.md)\ +[`_heapadd`](../heapadd.md)\ +[`_heapmin`](heapmin.md)\ +[`_heapset`](../heapset.md)\ +[`_heapwalk`](heapwalk.md) diff --git a/docs/c-runtime-library/reference/heapmin.md b/docs/c-runtime-library/reference/heapmin.md index 87af2a410a4..d02410f3768 100644 --- a/docs/c-runtime-library/reference/heapmin.md +++ b/docs/c-runtime-library/reference/heapmin.md @@ -20,11 +20,11 @@ Releases unused heap memory to the operating system. int _heapmin( void ); ``` -## Return Value +## Return value If successful, **_heapmin** 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 @@ -38,14 +38,14 @@ By default, this function's global state is scoped to the application. To change |-------------|---------------------|---------------------| |**_heapmin**|\|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Memory Allocation](../../c-runtime-library/memory-allocation.md)
-[free](free.md)
-[_heapadd](../../c-runtime-library/heapadd.md)
-[_heapchk](heapchk.md)
-[_heapset](../../c-runtime-library/heapset.md)
-[_heapwalk](heapwalk.md)
-[malloc](malloc.md)
+[Memory allocation](../memory-allocation.md)\ +[`free`](free.md)\ +[`_heapadd`](../heapadd.md)\ +[`_heapchk`](heapchk.md)\ +[`_heapset`](../heapset.md)\ +[`_heapwalk`](heapwalk.md)\ +[`malloc`](malloc.md) diff --git a/docs/c-runtime-library/reference/heapwalk.md b/docs/c-runtime-library/reference/heapwalk.md index 4a4b4c4b96f..2677e57a731 100644 --- a/docs/c-runtime-library/reference/heapwalk.md +++ b/docs/c-runtime-library/reference/heapwalk.md @@ -25,10 +25,10 @@ int _heapwalk( _HEAPINFO *entryinfo ); ### Parameters -*entryinfo*
+*`entryinfo`*\ Buffer to contain heap information. -## Return Value +## Return value **_heapwalk** returns one of the following integer manifest constants defined in Malloc.h. @@ -36,10 +36,10 @@ Buffer to contain heap information. |-|-| |**_HEAPBADBEGIN**| Initial header information invalid or not found.| |**_HEAPBADNODE**| Heap damaged or bad node found.| -|**_HEAPBADPTR**| The **_pentry** field of the **_HEAPINFO** structure does not contain a valid pointer into the heap or *entryinfo* is a null pointer.| +|**_HEAPBADPTR**| The **_pentry** field of the **_HEAPINFO** structure does not contain a valid pointer into the heap or *`entryinfo`* is a null pointer.| |**_HEAPEND**| End of the heap reached successfully.| |**_HEAPEMPTY**| Heap not initialized.| -|**_HEAPOK**| No errors so far; *entryinfo* is updated with information about the next heap entry.| +|**_HEAPOK**| No errors so far; *`entryinfo`* is updated with information about the next heap entry.| In addition, if an error occurs, **_heapwalk** sets **errno** to **ENOSYS**. @@ -55,7 +55,7 @@ The **_heapwalk** function helps debug heap-related problems in programs. The fu A call to **_heapwalk** that returns **_HEAPOK** stores the size of the entry in the **_size** field and sets the **_useflag** field to either **_FREEENTRY** or **_USEDENTRY** (both are constants defined in Malloc.h). To obtain this information about the first entry in the heap, pass **_heapwalk** a pointer to a **_HEAPINFO** structure whose **_pentry** member is **NULL**. If the operating system does not support **_heapwalk**(for example, Windows 98), the function returns **_HEAPEND** and sets **errno** to **ENOSYS**. -This function validates its parameter. If *entryinfo* is a null pointer, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, **errno** is set to **EINVAL** and the function returns **_HEAPBADPTR**. +This function validates its parameter. If *`entryinfo`* is a null pointer, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, **errno** is set to **EINVAL** and the function returns **_HEAPBADPTR**. ## Requirements @@ -63,7 +63,7 @@ This function validates its parameter. If *entryinfo* is a null pointer, the inv |-------------|---------------------|---------------------| |**_heapwalk**|\|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -150,8 +150,8 @@ OK - end of heap ## See also -[Memory Allocation](../../c-runtime-library/memory-allocation.md)
-[_heapadd](../../c-runtime-library/heapadd.md)
-[_heapchk](heapchk.md)
-[_heapmin](heapmin.md)
-[_heapset](../../c-runtime-library/heapset.md)
+[Memory allocation](../memory-allocation.md)\ +[`_heapadd`](../heapadd.md)\ +[`_heapchk`](heapchk.md)\ +[`_heapmin`](heapmin.md)\ +[`_heapset`](../heapset.md) diff --git a/docs/c-runtime-library/reference/hypot-hypotf-hypotl-hypot-hypotf-hypotl.md b/docs/c-runtime-library/reference/hypot-hypotf-hypotl-hypot-hypotf-hypotl.md index 01d052a3458..6a6fb9b2af3 100644 --- a/docs/c-runtime-library/reference/hypot-hypotf-hypotl-hypot-hypotf-hypotl.md +++ b/docs/c-runtime-library/reference/hypot-hypotf-hypotl-hypot-hypotf-hypotl.md @@ -46,22 +46,22 @@ long double _hypotl( ### Parameters -*x*, *y*\ +*`x`*, *`y`*\ Floating-point values. -## Return Value +## Return value If successful, **hypot** returns the length of the hypotenuse; on overflow, **hypot** returns INF (infinity) and the **errno** variable is set to **ERANGE**. You can use **_matherr** to modify error handling. -For more information about return codes, see [errno, _doserrno, _sys_errlist, and _sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +For more information about return codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks -The **hypot** functions calculate the length of the hypotenuse of a right triangle, given the length of the two sides *x* and *y* (in other words, the square root of *x*2 + *y*2). +The **hypot** functions calculate the length of the hypotenuse of a right triangle, given the length of the two sides *`x`* and *`y`* (in other words, the square root of *`x`*2 + *`y`*2). The versions of the functions that have leading underscores are provided for compatibility with earlier standards. Their behavior is identical to the versions that don't have leading underscores. We recommend using the versions without leading underscores for new code. -If you use the \ `hypot()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../../c-runtime-library/tgmath.md) for details. +If you use the \ `hypot()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../tgmath.md) for details. 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). @@ -72,7 +72,7 @@ By default, this function's global state is scoped to the application. To change |**hypot**, **hypotf**, **hypotl**, **_hypot**, **_hypotf**, **_hypotl**|\| |**hypot** macro | \ | -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -98,6 +98,6 @@ If a right triangle has sides 3.0 and 4.0, its hypotenuse is 5.0 ## See also -[Floating-Point Support](../../c-runtime-library/floating-point-support.md)
-[_cabs](cabs.md)
-[_matherr](matherr.md)
+[Math and floating-point support](../floating-point-support.md)\ +[`_cabs`](cabs.md)\ +[`_matherr`](matherr.md) diff --git a/docs/c-runtime-library/reference/ilogb-ilogbf-ilogbl2.md b/docs/c-runtime-library/reference/ilogb-ilogbf-ilogbl2.md index 6960325d45a..72e3018b85a 100644 --- a/docs/c-runtime-library/reference/ilogb-ilogbf-ilogbl2.md +++ b/docs/c-runtime-library/reference/ilogb-ilogbf-ilogbl2.md @@ -42,12 +42,12 @@ int ilogbl( ### Parameters -*x*\ +*`x`*\ The specified value. -## Return Value +## Return value -If successful, return the base-2 exponent of *x* as a **`signed int`** value. +If successful, return the base-2 exponent of *`x`* as a **`signed int`** value. Otherwise, returns one of the following values, defined in \: @@ -56,13 +56,13 @@ Otherwise, returns one of the following values, defined in \: |±0|FP_ILOGB0| |±inf, ±nan, indefinite|FP_ILOGBNAN| -Errors are reported as specified in [_matherr](matherr.md). +Errors are reported as specified in [`_matherr`](matherr.md). ## Remarks Because C++ allows overloading, you can call overloads of **ilogb** that take and return **`float`** and **`long double`** types. In a C program, unless you're using the \ macro to call this function, **ilogb** always takes and returns a **`double`**. -If you use the \ `ilogb()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../../c-runtime-library/tgmath.md) for details. +If you use the \ `ilogb()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../tgmath.md) for details. Calling this function is similar to calling the equivalent **logb** function, then casting the return value to **`int`**. @@ -73,10 +73,10 @@ Calling this function is similar to calling the equivalent **logb** function, th |**ilogb**, **ilogbf**, **ilogbl**|\|\| |**ilogb** macro | \ || -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Alphabetical Function Reference](crt-alphabetical-function-reference.md)
-[frexp](frexp.md)
-[logb, logbf, logbl, _logb, _logbf](logb-logbf-logbl-logb-logbf.md)
+[Alphabetical function reference](crt-alphabetical-function-reference.md)\ +[`frexp`](frexp.md)\ +[`logb`, `logbf`, `logbl`, `_logb`, `_logbf`](logb-logbf-logbl-logb-logbf.md) diff --git a/docs/c-runtime-library/reference/imaxabs.md b/docs/c-runtime-library/reference/imaxabs.md index ee18d4652f5..747c730c226 100644 --- a/docs/c-runtime-library/reference/imaxabs.md +++ b/docs/c-runtime-library/reference/imaxabs.md @@ -24,10 +24,10 @@ intmax_t imaxabs( ### Parameters -*n*
+*`n`*\ Integer value. -## Return Value +## Return value The **imaxabs** function returns the absolute value of the argument. There's no error return. @@ -40,11 +40,11 @@ The **imaxabs** function returns the absolute value of the argument. There's no |-------------|---------------------| |**imaxabs**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Libraries -All versions of the [C run-time libraries](../../c-runtime-library/crt-library-features.md). +All versions of the [C run-time libraries](../crt-library-features.md). ## Example @@ -72,8 +72,8 @@ The absolute value of -9223372036854775806 is 9223372036854775806 ## See also -[Data Conversion](../../c-runtime-library/data-conversion.md)
-[Floating-Point Support](../../c-runtime-library/floating-point-support.md)
-[abs, labs, llabs, _abs64](abs-labs-llabs-abs64.md)
-[_cabs](cabs.md)
-[fabs, fabsf, fabsl](fabs-fabsf-fabsl.md)
+[Data conversion](../data-conversion.md)\ +[Math and floating-point support](../floating-point-support.md)\ +[`abs`, `labs`, `llabs`, `_abs64`](abs-labs-llabs-abs64.md)\ +[`_cabs`](cabs.md)\ +[`fabs`, `fabsf`, `fabsl`](fabs-fabsf-fabsl.md) diff --git a/docs/c-runtime-library/reference/imaxdiv.md b/docs/c-runtime-library/reference/imaxdiv.md index 1e376da9171..396251349fb 100644 --- a/docs/c-runtime-library/reference/imaxdiv.md +++ b/docs/c-runtime-library/reference/imaxdiv.md @@ -25,19 +25,19 @@ imaxdiv_t imaxdiv( ### Parameters -*numer*
+*`numer`*\ The numerator. -*denom*
+*`denom`*\ The denominator. -## Return Value +## Return value -**imaxdiv** called with arguments of type [intmax_t](../../c-runtime-library/standard-types.md) returns a structure of type [imaxdiv_t](../../c-runtime-library/standard-types.md) that comprises the quotient and the remainder. +**imaxdiv** called with arguments of type [`intmax_t`](../standard-types.md) returns a structure of type [`imaxdiv_t`](../standard-types.md) that comprises the quotient and the remainder. ## Remarks -The **imaxdiv** function divides *numer* by *denom* and thereby computes the quotient and the remainder. The **imaxdiv_t** structure contains the quotient, **intmax_t** **quot**, and the remainder, **intmax_t** **rem**. The sign of the quotient is the same as that of the mathematical quotient. Its absolute value is the largest integer that is less than the absolute value of the mathematical quotient. If the denominator is 0, the program terminates with an error message. +The **imaxdiv** function divides *`numer`* by *`denom`* and thereby computes the quotient and the remainder. The **imaxdiv_t** structure contains the quotient, **intmax_t** **quot**, and the remainder, **intmax_t** **rem**. The sign of the quotient is the same as that of the mathematical quotient. Its absolute value is the largest integer that is less than the absolute value of the mathematical quotient. If the denominator is 0, the program terminates with an error message. ## Requirements @@ -45,7 +45,7 @@ The **imaxdiv** function divides *numer* by *denom* and thereby computes the quo |-------------|---------------------| |**imaxdiv**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -84,6 +84,6 @@ results in a quotient of 1079252848505, and a remainder of 5170 ## See also -[Floating-Point Support](../../c-runtime-library/floating-point-support.md)
-[div](div.md)
-[ldiv, lldiv](./div.md)
+[Math and floating-point support](../floating-point-support.md)\ +[`div`](div.md)\ +[`ldiv`, `lldiv`](./div.md) diff --git a/docs/c-runtime-library/reference/initterm-initterm-e.md b/docs/c-runtime-library/reference/initterm-initterm-e.md index c031a4a9d91..9240e4de935 100644 --- a/docs/c-runtime-library/reference/initterm-initterm-e.md +++ b/docs/c-runtime-library/reference/initterm-initterm-e.md @@ -30,7 +30,7 @@ int __cdecl _initterm_e( ); ``` -## Return Value +## Return value A non-zero error code if an initialization fails and throws an error; 0 if no error occurs. @@ -42,4 +42,4 @@ When these methods walk a table of function entries, they skip **NULL** entries ## See also -[Alphabetical Function Reference](crt-alphabetical-function-reference.md)
+[Alphabetical function reference](crt-alphabetical-function-reference.md) diff --git a/docs/c-runtime-library/reference/invalid-parameter-functions.md b/docs/c-runtime-library/reference/invalid-parameter-functions.md index 20cc43b757a..cbb67bd8905 100644 --- a/docs/c-runtime-library/reference/invalid-parameter-functions.md +++ b/docs/c-runtime-library/reference/invalid-parameter-functions.md @@ -55,7 +55,7 @@ The line number in the source code where the handler was called. *`reserved`*\ Unused. -## Return Value +## Return value These functions don't return a value. The **`_invalid_parameter_noinfo_noreturn`** and **`_invoke_watson`** functions don't return to the caller, and in some cases, **`_invalid_parameter`** and **`_invalid_parameter_noinfo`** may not return to the caller. @@ -77,11 +77,11 @@ By default, this function's global state is scoped to the application. To change |--------------|------------------| |**`_invalid_parameter`**, **`_invalid_parameter_noinfo`**, **`_invalid_parameter_noinfo_noreturn`**, **`_invoke_watson`**|``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Alphabetical Function Reference](crt-alphabetical-function-reference.md)\ +[Alphabetical function reference](crt-alphabetical-function-reference.md)\ [`_get_invalid_parameter_handler`, `_get_thread_local_invalid_parameter_handler`](get-invalid-parameter-handler-get-thread-local-invalid-parameter-handler.md)\ [`_set_invalid_parameter_handler`, `_set_thread_local_invalid_parameter_handler`](set-invalid-parameter-handler-set-thread-local-invalid-parameter-handler.md)\ -[Parameter Validation](../../c-runtime-library/parameter-validation.md) +[Parameter validation](../parameter-validation.md) diff --git a/docs/c-runtime-library/reference/isalnum-iswalnum-isalnum-l-iswalnum-l.md b/docs/c-runtime-library/reference/isalnum-iswalnum-isalnum-l-iswalnum-l.md index 5b257081642..9f6228a07bd 100644 --- a/docs/c-runtime-library/reference/isalnum-iswalnum-isalnum-l-iswalnum-l.md +++ b/docs/c-runtime-library/reference/isalnum-iswalnum-isalnum-l-iswalnum-l.md @@ -25,25 +25,25 @@ int _iswalnum_l( wint_t c, _locale_t locale ); ### Parameters -*c*
+*`c`*\ Integer to test. -*locale*
+*`locale`*\ The locale to use. -## Return Value +## Return value -Each of these routines returns nonzero if *c* is a particular representation of an alphanumeric character. **isalnum** returns a nonzero value if either **isalpha** or **isdigit** is nonzero for *c*, that is, if *c* is within the ranges A - Z, a - z, or 0 - 9. **iswalnum** returns a nonzero value if either **iswalpha** or **iswdigit** is nonzero for *c*. Each of these routines returns 0 if *c* does not satisfy the test condition. +Each of these routines returns nonzero if *`c`* is a particular representation of an alphanumeric character. **isalnum** returns a nonzero value if either **isalpha** or **isdigit** is nonzero for *`c`*, that is, if *`c`* is within the ranges A - Z, a - z, or 0 - 9. **iswalnum** returns a nonzero value if either **iswalpha** or **iswdigit** is nonzero for *`c`*. Each of these routines returns 0 if *`c`* does not satisfy the test condition. -The versions of these functions that have the **_l** suffix use the locale parameter that's passed in instead of the current locale. For more information, see [Locale](../../c-runtime-library/locale.md). +The versions of these functions that have the **_l** suffix use the locale parameter that's passed in instead of the current locale. For more information, see [Locale](../locale.md). -The behavior of **isalnum** and **_isalnum_l** is undefined if *c* is not EOF or in the range 0 through 0xFF, inclusive. When a debug CRT library is used and *c* is not one of these values, the functions raise an assertion. +The behavior of **isalnum** and **_isalnum_l** is undefined if *`c`* is not EOF or in the range 0 through 0xFF, inclusive. When a debug CRT library is used and *`c`* is not one of these values, the functions raise an assertion. -### Generic-Text Routine Mappings +### Generic-text routine mappings |TCHAR.H routine|_UNICODE & _MBCS not defined|_MBCS defined|_UNICODE defined| |---------------------|------------------------------------|--------------------|-----------------------| -|**_istalnum**|**isalnum**|[_ismbcalnum](ismbcalnum-functions.md)|**iswalnum**| +|**_istalnum**|**isalnum**|[`_ismbcalnum`](ismbcalnum-functions.md)|**iswalnum**| |**_istalnum_l**|**_isalnum_l**|**_ismbcalnum_l**|**_iswalnum_l**| ## Remarks @@ -59,10 +59,10 @@ By default, this function's global state is scoped to the application. To change |**_isalnum_l**|\| |**_iswalnum_l**|\ or \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Character Classification](../../c-runtime-library/character-classification.md)
-[Locale](../../c-runtime-library/locale.md)
-[is, isw Routines](../../c-runtime-library/is-isw-routines.md)
+[Character classification](../character-classification.md)\ +[Locale](../locale.md)\ +[`is`, `isw` routines](../is-isw-routines.md) diff --git a/docs/c-runtime-library/reference/isalpha-iswalpha-isalpha-l-iswalpha-l.md b/docs/c-runtime-library/reference/isalpha-iswalpha-isalpha-l-iswalpha-l.md index e5d60fe6b7e..a0943e7c706 100644 --- a/docs/c-runtime-library/reference/isalpha-iswalpha-isalpha-l-iswalpha-l.md +++ b/docs/c-runtime-library/reference/isalpha-iswalpha-isalpha-l-iswalpha-l.md @@ -35,21 +35,21 @@ int _iswalpha_l( ### Parameters -*c*
+*`c`*\ Integer to test. -*locale*
+*`locale`*\ The locale to use instead of the current locale. -## Return Value +## Return value -Each of these routines returns nonzero if *c* is a particular representation of an alphabetic character. **isalpha** returns a nonzero value if *c* is within the ranges A - Z or a - z. **iswalpha** returns a nonzero value only for wide characters for which [iswupper](isupper-isupper-l-iswupper-iswupper-l.md) or **iswlower** is nonzero; that is, for any wide character that is one of an implementation-defined set for which none of **iswcntrl**, **iswdigit**, **iswpunct**, or **iswspace** is nonzero. Each of these routines returns 0 if *c* does not satisfy the test condition. +Each of these routines returns nonzero if *`c`* is a particular representation of an alphabetic character. **isalpha** returns a nonzero value if *`c`* is within the ranges A - Z or a - z. **iswalpha** returns a nonzero value only for wide characters for which [`iswupper`](isupper-isupper-l-iswupper-iswupper-l.md) or **iswlower** is nonzero; that is, for any wide character that is one of an implementation-defined set for which none of **iswcntrl**, **iswdigit**, **iswpunct**, or **iswspace** is nonzero. Each of these routines returns 0 if *`c`* does not satisfy the test condition. -The versions of these functions that have the **_l** suffix use the locale parameter that's passed in instead of the current locale. For more information, see [Locale](../../c-runtime-library/locale.md). +The versions of these functions that have the **_l** suffix use the locale parameter that's passed in instead of the current locale. For more information, see [Locale](../locale.md). -The behavior of **isalpha** and **_isalpha_l** is undefined if *c* is not EOF or in the range 0 through 0xFF, inclusive. When a debug CRT library is used and *c* is not one of these values, the functions raise an assertion. +The behavior of **isalpha** and **_isalpha_l** is undefined if *`c`* is not EOF or in the range 0 through 0xFF, inclusive. When a debug CRT library is used and *`c`* is not one of these values, the functions raise an assertion. -### Generic-Text Routine Mappings +### Generic-text routine mappings |TCHAR.H routine|_UNICODE & _MBCS not defined|_MBCS defined|_UNICODE defined| |---------------------|------------------------------------|--------------------|-----------------------| @@ -69,10 +69,10 @@ By default, this function's global state is scoped to the application. To change |**_isalpha_l**|\| |**_iswalpha_l**|\ or \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Character Classification](../../c-runtime-library/character-classification.md)
-[Locale](../../c-runtime-library/locale.md)
-[is, isw Routines](../../c-runtime-library/is-isw-routines.md)
+[Character classification](../character-classification.md)\ +[Locale](../locale.md)\ +[`is`, `isw` routines](../is-isw-routines.md) diff --git a/docs/c-runtime-library/reference/isascii-isascii-iswascii.md b/docs/c-runtime-library/reference/isascii-isascii-iswascii.md index 8852980522d..581a9b33442 100644 --- a/docs/c-runtime-library/reference/isascii-isascii-iswascii.md +++ b/docs/c-runtime-library/reference/isascii-isascii-iswascii.md @@ -29,10 +29,10 @@ int iswascii( ### Parameters -*`c`*
+*`c`*\ Integer to test. -## Return Value +## Return value Each of these routines returns nonzero if *`c`* is a particular representation of an ASCII character. **`__isascii`** returns a nonzero value if *`c`* is an ASCII character (in the range 0x00 - 0x7F). **`iswascii`** returns a nonzero value if *`c`* is a wide-character representation of an ASCII character. Each of these routines returns 0 if *`c`* doesn't satisfy the test condition. @@ -44,7 +44,7 @@ For backward compatibility, **`isascii`** is implemented as a macro only if [`__ By default, this function's global state is scoped to the application. To change this scope, 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| |---------------------|--------------------------------------|--------------------|-----------------------| @@ -57,10 +57,10 @@ By default, this function's global state is scoped to the application. To change |**`isascii`**, **`__isascii`**|C: \

C++: \ or \| |**`iswascii`**|C: \, \, or \

C++: \, \, \, \, or \| -The **`isascii`**, **`__isascii`**, and **`iswascii`** functions are Microsoft-specific. For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +The **`isascii`**, **`__isascii`**, and **`iswascii`** functions are Microsoft-specific. For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Character Classification](../../c-runtime-library/character-classification.md)
-[Locale](../../c-runtime-library/locale.md)
-[`is`, `isw` Routines](../../c-runtime-library/is-isw-routines.md)
+[Character classification](../character-classification.md)\ +[Locale](../locale.md)\ +[`is`, `isw` routines](../is-isw-routines.md) diff --git a/docs/c-runtime-library/reference/isatty.md b/docs/c-runtime-library/reference/isatty.md index f809cabb98d..a231d74bd3f 100644 --- a/docs/c-runtime-library/reference/isatty.md +++ b/docs/c-runtime-library/reference/isatty.md @@ -22,18 +22,18 @@ int _isatty( int fd ); ### Parameters -*fd*
+*`fd`*\ File descriptor that refers to the device to be tested. -## Return Value +## Return value **_isatty** returns a nonzero value if the descriptor is associated with a character device. Otherwise, **_isatty** returns 0. ## Remarks -The **_isatty** function determines whether *fd* is associated with a character device (a terminal, console, printer, or serial port). +The **_isatty** function determines whether *`fd`* is associated with a character device (a terminal, console, printer, or serial port). -This function validates the *fd* parameter. If *fd* is a bad file pointer, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, the function returns 0 and sets **errno** to **EBADF**. +This function validates the *`fd`* parameter. If *`fd`* is a bad file pointer, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, the function returns 0 and sets **errno** to **EBADF**. 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). @@ -43,11 +43,11 @@ By default, this function's global state is scoped to the application. To change |-------------|---------------------| |**_isatty**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Libraries -All versions of the [C run-time libraries](../../c-runtime-library/crt-library-features.md). +All versions of the [C run-time libraries](../crt-library-features.md). ## Example @@ -69,7 +69,7 @@ int main( void ) } ``` -### Sample Output +### Sample output ```Output stdout has not been redirected to a file @@ -77,4 +77,4 @@ stdout has not been redirected to a file ## See also -[File Handling](../../c-runtime-library/file-handling.md)
+[File handling](../file-handling.md) diff --git a/docs/c-runtime-library/reference/isblank-iswblank-isblank-l-iswblank-l.md b/docs/c-runtime-library/reference/isblank-iswblank-isblank-l-iswblank-l.md index d1e3cf5e88f..86824e8392b 100644 --- a/docs/c-runtime-library/reference/isblank-iswblank-isblank-l-iswblank-l.md +++ b/docs/c-runtime-library/reference/isblank-iswblank-isblank-l-iswblank-l.md @@ -34,26 +34,26 @@ int _iswblank_l( ### Parameters -*c*
+*`c`*\ Integer to test. -*locale*
+*`locale`*\ Locale to use. -## Return Value +## Return value -Each of these routines returns nonzero if *c* is a particular representation of a space or horizontal tab character, or is one of a locale-specific set of characters that are used to separate words within a line of text. **isblank** returns a nonzero value if *c* is a space character (0x20) or horizontal tab character (0x09). The result of the test condition for the **isblank** functions depends on the **LC_CTYPE** category setting of the locale; for more information, see [setlocale, _wsetlocale](setlocale-wsetlocale.md). The versions of these functions that do not have the **_l** suffix use the current locale for any locale-dependent behavior; the versions that do have the **_l** suffix are identical except that they use the locale that's passed in instead. For more information, see [Locale](../../c-runtime-library/locale.md). +Each of these routines returns nonzero if *`c`* is a particular representation of a space or horizontal tab character, or is one of a locale-specific set of characters that are used to separate words within a line of text. **isblank** returns a nonzero value if *`c`* is a space character (0x20) or horizontal tab character (0x09). The result of the test condition for the **isblank** functions depends on the **LC_CTYPE** category setting of the locale; for more information, see [`setlocale`, `_wsetlocale`](setlocale-wsetlocale.md). The versions of these functions that do not have the **_l** suffix use the current locale for any locale-dependent behavior; the versions that do have the **_l** suffix are identical except that they use the locale that's passed in instead. For more information, see [Locale](../locale.md). -**iswblank** returns a nonzero value if *c* is a wide character that corresponds to a standard space or horizontal tab character. +**iswblank** returns a nonzero value if *`c`* is a wide character that corresponds to a standard space or horizontal tab character. -The behavior of **isblank** and **_isblank_l** is undefined if *c* is not EOF or in the range 0 through 0xFF, inclusive. When a debug CRT library is used and *c* is not one of these values, the functions raise an assertion. +The behavior of **isblank** and **_isblank_l** is undefined if *`c`* is not EOF or in the range 0 through 0xFF, inclusive. When a debug CRT library is used and *`c`* is not one of these values, the functions raise an assertion. -### Generic-Text Routine Mappings +### Generic-text routine mappings |TCHAR.H routine|_UNICODE & _MBCS not defined|_MBCS defined|_UNICODE defined| |---------------------|------------------------------------|--------------------|-----------------------| -|**_istblank**|**isblank**|[_ismbcblank](ismbcgraph-functions.md)|**iswblank**| -|**_istblank_l**|**_isblank_l**|[_ismbcblank_l](ismbcgraph-functions.md)|**_iswblank_l**| +|**_istblank**|**isblank**|[`_ismbcblank`](ismbcgraph-functions.md)|**iswblank**| +|**_istblank_l**|**_isblank_l**|[`_ismbcblank_l`](ismbcgraph-functions.md)|**_iswblank_l**| ## Remarks @@ -68,10 +68,10 @@ By default, this function's global state is scoped to the application. To change |**_isblank_l**|\| |**_iswblank_l**|\ or \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Character Classification](../../c-runtime-library/character-classification.md)
-[Locale](../../c-runtime-library/locale.md)
-[is, isw Routines](../../c-runtime-library/is-isw-routines.md)
+[Character classification](../character-classification.md)\ +[Locale](../locale.md)\ +[`is`, `isw` routines](../is-isw-routines.md) diff --git a/docs/c-runtime-library/reference/iscntrl-iswcntrl-iscntrl-l-iswcntrl-l.md b/docs/c-runtime-library/reference/iscntrl-iswcntrl-iscntrl-l-iswcntrl-l.md index cfb8f216679..cccb953e372 100644 --- a/docs/c-runtime-library/reference/iscntrl-iswcntrl-iscntrl-l-iswcntrl-l.md +++ b/docs/c-runtime-library/reference/iscntrl-iswcntrl-iscntrl-l-iswcntrl-l.md @@ -35,21 +35,21 @@ int _iswcntrl_l( ### Parameters -*c*
+*`c`*\ Integer to test -*locale*
+*`locale`*\ The locale to use. -## Return Value +## Return value -Each of these routines returns nonzero if *c* is a particular representation of a control character. **iscntrl** returns a nonzero value if *c* is a control character (0x00 - 0x1F or 0x7F). **iswcntrl** returns a nonzero value if *c* is a control wide character. Each of these routines returns 0 if *c* does not satisfy the test condition. +Each of these routines returns nonzero if *`c`* is a particular representation of a control character. **iscntrl** returns a nonzero value if *`c`* is a control character (0x00 - 0x1F or 0x7F). **iswcntrl** returns a nonzero value if *`c`* is a control wide character. Each of these routines returns 0 if *`c`* does not satisfy the test condition. -The versions of these functions that have the **_l** suffix use the locale parameter that's passed in instead of the current locale. For more information, see [Locale](../../c-runtime-library/locale.md). +The versions of these functions that have the **_l** suffix use the locale parameter that's passed in instead of the current locale. For more information, see [Locale](../locale.md). -The behavior of **iscntrl** and **_iscntrl_l** is undefined if *c* is not EOF or in the range 0 through 0xFF, inclusive. When a debug CRT library is used and *c* is not one of these values, the functions raise an assertion. +The behavior of **iscntrl** and **_iscntrl_l** is undefined if *`c`* is not EOF or in the range 0 through 0xFF, inclusive. When a debug CRT library is used and *`c`* is not one of these values, the functions raise an assertion. -### Generic-Text Routine Mappings +### Generic-text routine mappings |TCHAR.H routine|_UNICODE & _MBCS not defined|_MBCS defined|_UNICODE defined| |---------------------|------------------------------------|--------------------|-----------------------| @@ -69,10 +69,10 @@ By default, this function's global state is scoped to the application. To change |**_iscntrl_l**|\| |**_iswcntrl_l**|\ or \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Character Classification](../../c-runtime-library/character-classification.md)
-[Locale](../../c-runtime-library/locale.md)
-[is, isw Routines](../../c-runtime-library/is-isw-routines.md)
+[Character classification](../character-classification.md)\ +[Locale](../locale.md)\ +[`is`, `isw` routines](../is-isw-routines.md) diff --git a/docs/c-runtime-library/reference/iscsym-functions.md b/docs/c-runtime-library/reference/iscsym-functions.md index 591e49d779b..46325d784ec 100644 --- a/docs/c-runtime-library/reference/iscsym-functions.md +++ b/docs/c-runtime-library/reference/iscsym-functions.md @@ -51,15 +51,15 @@ int _iswcsymf_l( ### Parameters -*c*
-Integer to test. *c* should be in the range of 0-255 for the narrow character version of the function. +*`c`*\ +Integer to test. *`c`* should be in the range of 0-255 for the narrow character version of the function. -*locale*
+*`locale`*\ The locale to use. -## Return Value +## Return value -Both **__iscsym** and **__iswcsym** return a nonzero value if *c* is a letter, underscore, or digit. Both **__iscsymf** and **__iswcsymf** return a nonzero value if *c* is a letter or an underscore. Each of these routines returns 0 if *c* does not satisfy the test condition. The versions of these functions with the **_l** suffix are identical except that they use the *locale* passed in instead of the current locale for their locale-dependent behavior. For more information, see [Locale](../../c-runtime-library/locale.md). +Both **__iscsym** and **__iswcsym** return a nonzero value if *`c`* is a letter, underscore, or digit. Both **__iscsymf** and **__iswcsymf** return a nonzero value if *`c`* is a letter or an underscore. Each of these routines returns 0 if *`c`* does not satisfy the test condition. The versions of these functions with the **_l** suffix are identical except that they use the *`locale`* passed in instead of the current locale for their locale-dependent behavior. For more information, see [Locale](../locale.md). ## Remarks @@ -73,10 +73,10 @@ For backward compatibility, **iscsym** and **iscsymf** are defined as macros onl |-------------|---------------------| |**iscsym**, **iscsymf**, **__iscsym**, **__iswcsym**, **__iscsymf**, **__iswcsymf**, **_iscsym_l**, **_iswcsym_l**, **_iscsymf_l**, **_iswcsymf_l**|C: \

C++: \ or \| -The **iscsym**, **iscsymf**, **__iscsym**, **__iswcsym**, **__iscsymf**, **__iswcsymf**, **_iscsym_l**, **_iswcsym_l**, **_iscsymf_l**, and **_iswcsymf_l** routines are Microsoft-specific. For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +The **iscsym**, **iscsymf**, **__iscsym**, **__iswcsym**, **__iscsymf**, **__iswcsymf**, **_iscsym_l**, **_iswcsym_l**, **_iscsymf_l**, and **_iswcsymf_l** routines are Microsoft-specific. For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Character Classification](../../c-runtime-library/character-classification.md)
-[Locale](../../c-runtime-library/locale.md)
-[is, isw Routines](../../c-runtime-library/is-isw-routines.md)
+[Character classification](../character-classification.md)\ +[Locale](../locale.md)\ +[`is`, `isw` routines](../is-isw-routines.md) diff --git a/docs/c-runtime-library/reference/isctype-iswctype-isctype-l-iswctype-l.md b/docs/c-runtime-library/reference/isctype-iswctype-isctype-l-iswctype-l.md index c9a95b82c78..21b5fb91f01 100644 --- a/docs/c-runtime-library/reference/isctype-iswctype-isctype-l-iswctype-l.md +++ b/docs/c-runtime-library/reference/isctype-iswctype-isctype-l-iswctype-l.md @@ -12,7 +12,7 @@ ms.assetid: cf7509b7-12fc-4d95-8140-ad2eb98173d3 --- # _isctype, iswctype, _isctype_l, _iswctype_l -Tests *c* for the ctype property specified by the *desc* argument. For each valid value of *desc*, there is an equivalent wide-character classification routine. +Tests *`c`* for the ctype property specified by the *`desc`* argument. For each valid value of *`desc`*, there is an equivalent wide-character classification routine. ## Syntax @@ -39,22 +39,22 @@ int _iswctype_l( ### Parameters -*c*
+*`c`*\ Integer to test. -*desc*
-Property to test for. This is normally retrieved using ctype or [wctype](wctype.md). +*`desc`*\ +Property to test for. This is normally retrieved using ctype or [`wctype`](wctype.md). -*locale*
+*`locale`*\ The locale to use for any locale-dependent tests. -## Return Value +## Return value -**_isctype** and **iswctype** return a nonzero value if *c* has the property specified by *desc* in the current locale or 0 if it does not. The versions of these functions with the **_l** suffix are identical except that they use the locale passed in instead of the current locale for their locale-dependent behavior. For more information, see [Locale](../../c-runtime-library/locale.md). +**_isctype** and **iswctype** return a nonzero value if *`c`* has the property specified by *`desc`* in the current locale or 0 if it does not. The versions of these functions with the **_l** suffix are identical except that they use the locale passed in instead of the current locale for their locale-dependent behavior. For more information, see [Locale](../locale.md). -The behavior of **_isctype** and **_isctype_l** is undefined if *c* is not EOF or in the range 0 through 0xFF, inclusive. When a debug CRT library is used and *c* is not one of these values, the functions raise an assertion. +The behavior of **_isctype** and **_isctype_l** is undefined if *`c`* is not EOF or in the range 0 through 0xFF, inclusive. When a debug CRT library is used and *`c`* is not one of these values, the functions raise an assertion. -### Generic-Text Routine Mappings +### Generic-text routine mappings |Tchar.h routine|_UNICODE and _MBCS not defined|_MBCS defined|_UNICODE defined| |---------------------|--------------------------------------|--------------------|-----------------------| @@ -74,14 +74,14 @@ By default, this function's global state is scoped to the application. To change |**_isctype_l**|\| |**_iswctype_l**|\ or \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Libraries -All versions of the [C run-time libraries](../../c-runtime-library/crt-library-features.md). +All versions of the [C run-time libraries](../crt-library-features.md). ## See also -[Character Classification](../../c-runtime-library/character-classification.md)
-[Locale](../../c-runtime-library/locale.md)
-[is, isw Routines](../../c-runtime-library/is-isw-routines.md)
+[Character classification](../character-classification.md)\ +[Locale](../locale.md)\ +[`is`, `isw` routines](../is-isw-routines.md) diff --git a/docs/c-runtime-library/reference/isdigit-iswdigit-isdigit-l-iswdigit-l.md b/docs/c-runtime-library/reference/isdigit-iswdigit-isdigit-l-iswdigit-l.md index 24eebba8000..866c8037096 100644 --- a/docs/c-runtime-library/reference/isdigit-iswdigit-isdigit-l-iswdigit-l.md +++ b/docs/c-runtime-library/reference/isdigit-iswdigit-isdigit-l-iswdigit-l.md @@ -35,26 +35,26 @@ int _iswdigit_l( ### Parameters -*c*
+*`c`*\ Integer to test. -*locale*
+*`locale`*\ The locale to use. -## Return Value +## Return value -Each of these routines returns nonzero if *c* is a particular representation of a decimal-digit character. **isdigit** returns a nonzero value if *c* is a decimal digit (0 - 9). **iswdigit** returns a nonzero value if *c* is a wide character that corresponds to a decimal-digit character. Each of these routines returns 0 if *c* does not satisfy the test condition. +Each of these routines returns nonzero if *`c`* is a particular representation of a decimal-digit character. **isdigit** returns a nonzero value if *`c`* is a decimal digit (0 - 9). **iswdigit** returns a nonzero value if *`c`* is a wide character that corresponds to a decimal-digit character. Each of these routines returns 0 if *`c`* does not satisfy the test condition. -The versions of these functions that have the **_l** suffix use the locale that's passed in instead of the current locale for their locale-dependent behavior. For more information, see [Locale](../../c-runtime-library/locale.md). +The versions of these functions that have the **_l** suffix use the locale that's passed in instead of the current locale for their locale-dependent behavior. For more information, see [Locale](../locale.md). -The behavior of **isdigit** and **_isdigit_l** is undefined if *c* is not EOF or in the range 0 through 0xFF, inclusive. When a debug CRT library is used and *c* is not one of these values, the functions raise an assertion. +The behavior of **isdigit** and **_isdigit_l** is undefined if *`c`* is not EOF or in the range 0 through 0xFF, inclusive. When a debug CRT library is used and *`c`* is not one of these values, the functions raise an assertion. -### Generic-Text Routine Mappings +### Generic-text routine mappings |TCHAR.H routine|_UNICODE & _MBCS not defined|_MBCS defined|_UNICODE defined| |---------------------|------------------------------------|--------------------|-----------------------| -|**_istdigit**|**isdigit**|[_ismbcdigit](ismbcalnum-functions.md)|**iswdigit**| -|**_istdigit_l**|**_isdigit_l**|[_ismbcdigit_l](ismbcalnum-functions.md)|**_iswdigit_l**| +|**_istdigit**|**isdigit**|[`_ismbcdigit`](ismbcalnum-functions.md)|**iswdigit**| +|**_istdigit_l**|**_isdigit_l**|[`_ismbcdigit_l`](ismbcalnum-functions.md)|**_iswdigit_l**| ## Remarks @@ -69,10 +69,10 @@ By default, this function's global state is scoped to the application. To change |**_isdigit_l**|\| |**_iswdigit_l**|\ or \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Character Classification](../../c-runtime-library/character-classification.md)
-[Locale](../../c-runtime-library/locale.md)
-[is, isw Routines](../../c-runtime-library/is-isw-routines.md)
+[Character classification](../character-classification.md)\ +[Locale](../locale.md)\ +[`is`, `isw` routines](../is-isw-routines.md) diff --git a/docs/c-runtime-library/reference/isgraph-iswgraph-isgraph-l-iswgraph-l.md b/docs/c-runtime-library/reference/isgraph-iswgraph-isgraph-l-iswgraph-l.md index de454161bbf..373f3462581 100644 --- a/docs/c-runtime-library/reference/isgraph-iswgraph-isgraph-l-iswgraph-l.md +++ b/docs/c-runtime-library/reference/isgraph-iswgraph-isgraph-l-iswgraph-l.md @@ -35,23 +35,23 @@ int _iswgraph_l( ### Parameters -*c*
+*`c`*\ Integer to test. -## Return Value +## Return value -Each of these routines returns nonzero if *c* is a particular representation of a printable character other than a space. **isgraph** returns a nonzero value if *c* is a printable character other than a space. **iswgraph** returns a nonzero value if *c* is a printable wide character other than a wide character space. Each of these routines returns 0 if *c* does not satisfy the test condition. +Each of these routines returns nonzero if *`c`* is a particular representation of a printable character other than a space. **isgraph** returns a nonzero value if *`c`* is a printable character other than a space. **iswgraph** returns a nonzero value if *`c`* is a printable wide character other than a wide character space. Each of these routines returns 0 if *`c`* does not satisfy the test condition. -The versions of these functions that have the **_l** suffix use the locale that's passed in instead of the current locale for their locale-dependent behavior. For more information, see [Locale](../../c-runtime-library/locale.md). +The versions of these functions that have the **_l** suffix use the locale that's passed in instead of the current locale for their locale-dependent behavior. For more information, see [Locale](../locale.md). -The behavior of **isgraph** and **_isgraph_l** is undefined if *c* is not EOF or in the range 0 through 0xFF, inclusive. When a debug CRT library is used and *c* is not one of these values, the functions raise an assertion. +The behavior of **isgraph** and **_isgraph_l** is undefined if *`c`* is not EOF or in the range 0 through 0xFF, inclusive. When a debug CRT library is used and *`c`* is not one of these values, the functions raise an assertion. -### Generic-Text Routine Mappings +### Generic-text routine mappings |TCHAR.H routine|_UNICODE & _MBCS not defined|_MBCS defined|_UNICODE defined| |---------------------|------------------------------------|--------------------|-----------------------| -|**_istgraph**|**isgraph**|[_ismbcgraph](ismbcgraph-functions.md)|**iswgraph**| -|**_istgraph_l**|**_isgraph_l**|[_ismbcgraph_l](ismbcgraph-functions.md)|**_iswgraph_l**| +|**_istgraph**|**isgraph**|[`_ismbcgraph`](ismbcgraph-functions.md)|**iswgraph**| +|**_istgraph_l**|**_isgraph_l**|[`_ismbcgraph_l`](ismbcgraph-functions.md)|**_iswgraph_l**| ## Remarks @@ -66,10 +66,10 @@ By default, this function's global state is scoped to the application. To change |**_isgraph_l**|\| |**_iswgraph_l**|\ or \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Character Classification](../../c-runtime-library/character-classification.md)
-[Locale](../../c-runtime-library/locale.md)
-[is, isw Routines](../../c-runtime-library/is-isw-routines.md)
+[Character classification](../character-classification.md)\ +[Locale](../locale.md)\ +[`is`, `isw` routines](../is-isw-routines.md) diff --git a/docs/c-runtime-library/reference/isinf.md b/docs/c-runtime-library/reference/isinf.md index cbc03623e79..51f619ad260 100644 --- a/docs/c-runtime-library/reference/isinf.md +++ b/docs/c-runtime-library/reference/isinf.md @@ -24,12 +24,12 @@ inline bool isinf( ### Parameters -*x*
+*`x`*\ The floating-point value to test. ## Return value -**isinf** returns a nonzero value (**`true`** in C++ code) if the argument *x* is a positive or negative infinity. **isinf** returns 0 (**`false`** in C++ code) if the argument is finite or a NAN. Both normal and subnormal floating-point values are considered finite. +**isinf** returns a nonzero value (**`true`** in C++ code) if the argument *`x`* is a positive or negative infinity. **isinf** returns 0 (**`false`** in C++ code) if the argument is finite or a NAN. Both normal and subnormal floating-point values are considered finite. ## Remarks @@ -41,13 +41,13 @@ The floating-point value to test. |--------------|---------------------------|-------------------------------| |**isinf**|\|\ or \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Floating-Point Support](../../c-runtime-library/floating-point-support.md)
-[fpclassify](fpclassify.md)
-[_fpclass, _fpclassf](fpclass-fpclassf.md)
-[isfinite, _finite, _finitef](finite-finitef.md)
-[isnan, _isnan, _isnanf](isnan-isnan-isnanf.md)
-[isnormal](isnormal.md)
+[Math and floating-point support](../floating-point-support.md)\ +[`fpclassify`](fpclassify.md)\ +[`_fpclass`, `_fpclassf`](fpclass-fpclassf.md)\ +[`isfinite`, `_finite`, `_finitef`](finite-finitef.md)\ +[`isnan`, `_isnan`, `_isnanf`](isnan-isnan-isnanf.md)\ +[`isnormal`](isnormal.md) diff --git a/docs/c-runtime-library/reference/isleadbyte-isleadbyte-l.md b/docs/c-runtime-library/reference/isleadbyte-isleadbyte-l.md index 04f383a0a1a..9aca648b9be 100644 --- a/docs/c-runtime-library/reference/isleadbyte-isleadbyte-l.md +++ b/docs/c-runtime-library/reference/isleadbyte-isleadbyte-l.md @@ -26,10 +26,10 @@ int _isleadbyte_l( int c ); ### Parameters -*c*
+*`c`*\ Integer to test. -## Return Value +## Return value **isleadbyte** returns a nonzero value if the argument satisfies the test condition or 0 if it does not. In the "C" locale and in single-byte character set (SBCS) locales, **isleadbyte** always returns 0. @@ -43,7 +43,7 @@ The version of this function with the **_l** suffix is identical except that it 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| |---------------------|------------------------------------|--------------------|-----------------------| @@ -56,10 +56,10 @@ By default, this function's global state is scoped to the application. To change |**isleadbyte**|\| |**_isleadbyte_l**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Byte Classification](../../c-runtime-library/byte-classification.md)
-[Locale](../../c-runtime-library/locale.md)
-[_ismbb Routines](../../c-runtime-library/ismbb-routines.md)
+[Byte classification](../byte-classification.md)\ +[Locale](../locale.md)\ +[`_ismbb` routines](../ismbb-routines.md) diff --git a/docs/c-runtime-library/reference/islower-iswlower-islower-l-iswlower-l.md b/docs/c-runtime-library/reference/islower-iswlower-islower-l-iswlower-l.md index a437c79093c..fa90186ce9e 100644 --- a/docs/c-runtime-library/reference/islower-iswlower-islower-l-iswlower-l.md +++ b/docs/c-runtime-library/reference/islower-iswlower-islower-l-iswlower-l.md @@ -35,26 +35,26 @@ int _iswlower_l( ### Parameters -*c*
+*`c`*\ Integer to test. -*locale*
+*`locale`*\ Locale to use. -## Return Value +## Return value -Each of these routines returns nonzero if *c* is a particular representation of a lowercase character. **islower** returns a nonzero value if *c* is a lowercase character (a - z). **iswlower** returns a nonzero value if *c* is a wide character that corresponds to a lowercase letter, or if *c* is one of an implementation-defined set of wide characters for which none of **iswcntrl**, **iswdigit**, **iswpunct**, or **iswspace** is nonzero. Each of these routines returns 0 if *c* does not satisfy the test condition. +Each of these routines returns nonzero if *`c`* is a particular representation of a lowercase character. **islower** returns a nonzero value if *`c`* is a lowercase character (a - z). **iswlower** returns a nonzero value if *`c`* is a wide character that corresponds to a lowercase letter, or if *`c`* is one of an implementation-defined set of wide characters for which none of **iswcntrl**, **iswdigit**, **iswpunct**, or **iswspace** is nonzero. Each of these routines returns 0 if *`c`* does not satisfy the test condition. -The versions of these functions that have the **_l** suffix use the locale that's passed in instead of the current locale for their locale-dependent behavior. For more information, see [Locale](../../c-runtime-library/locale.md). +The versions of these functions that have the **_l** suffix use the locale that's passed in instead of the current locale for their locale-dependent behavior. For more information, see [Locale](../locale.md). -The behavior of **islower** and **_islower_l** is undefined if *c* is not EOF or in the range 0 through 0xFF, inclusive. When a debug CRT library is used and *c* is not one of these values, the functions raise an assertion. +The behavior of **islower** and **_islower_l** is undefined if *`c`* is not EOF or in the range 0 through 0xFF, inclusive. When a debug CRT library is used and *`c`* is not one of these values, the functions raise an assertion. -### Generic-Text Routine Mappings +### Generic-text routine mappings |TCHAR.H routine|_UNICODE & _MBCS not defined|_MBCS defined|_UNICODE defined| |---------------------|------------------------------------|--------------------|-----------------------| -|**_istlower**|**islower**|[_ismbclower](ismbclower-ismbclower-l-ismbcupper-ismbcupper-l.md)|**iswlower**| -|**_istlower_l**|`_islower _l`|[_ismbclower_l](ismbclower-ismbclower-l-ismbcupper-ismbcupper-l.md)|**_liswlower_l**| +|**_istlower**|**islower**|[`_ismbclower`](ismbclower-ismbclower-l-ismbcupper-ismbcupper-l.md)|**iswlower**| +|**_istlower_l**|`_islower _l`|[`_ismbclower_l`](ismbclower-ismbclower-l-ismbcupper-ismbcupper-l.md)|**_liswlower_l**| ## Remarks @@ -69,10 +69,10 @@ By default, this function's global state is scoped to the application. To change |**_islower_l**|\| |**_swlower_l**|\ or \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Character Classification](../../c-runtime-library/character-classification.md)
-[Locale](../../c-runtime-library/locale.md)
-[is, isw Routines](../../c-runtime-library/is-isw-routines.md)
+[Character classification](../character-classification.md)\ +[Locale](../locale.md)\ +[`is`, `isw` routines](../is-isw-routines.md) diff --git a/docs/c-runtime-library/reference/ismbbalnum-ismbbalnum-l.md b/docs/c-runtime-library/reference/ismbbalnum-ismbbalnum-l.md index b9582dd908d..e6f9cdc96ec 100644 --- a/docs/c-runtime-library/reference/ismbbalnum-ismbbalnum-l.md +++ b/docs/c-runtime-library/reference/ismbbalnum-ismbbalnum-l.md @@ -27,19 +27,19 @@ int _ismbbalnum_l( ### Parameters -*c*
+*`c`*\ Integer to be tested. -*locale*
+*`locale`*\ Locale to use. -## Return Value +## Return value **_ismbbalnum** returns a nonzero value if the expression: `isalnum(c) || _ismbbkalnum(c)` -is nonzero for *c*, or 0 if it is not. +is nonzero for *`c`*, or 0 if it is not. The version of this function with the **_l** suffix is identical except that it uses the locale passed in instead of the current locale for its locale-dependent behavior. @@ -54,13 +54,13 @@ By default, this function's global state is scoped to the application. To change |**_ismbbalnum**|\| |**_ismbbalnum_l**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Libraries -All versions of the [C run-time libraries](../../c-runtime-library/crt-library-features.md). +All versions of the [C run-time libraries](../crt-library-features.md). ## See also -[Byte Classification](../../c-runtime-library/byte-classification.md)
-[_ismbb Routines](../../c-runtime-library/ismbb-routines.md)
+[Byte classification](../byte-classification.md)\ +[`_ismbb` routines](../ismbb-routines.md) diff --git a/docs/c-runtime-library/reference/ismbbalpha-ismbbalpha-l.md b/docs/c-runtime-library/reference/ismbbalpha-ismbbalpha-l.md index 635fcff4075..5fc940c1aa7 100644 --- a/docs/c-runtime-library/reference/ismbbalpha-ismbbalpha-l.md +++ b/docs/c-runtime-library/reference/ismbbalpha-ismbbalpha-l.md @@ -27,19 +27,19 @@ int _ismbbalpha_l( ### Parameters -*c*
+*`c`*\ Integer to be tested. -*locale*
+*`locale`*\ Locale to use. -## Return Value +## Return value **_ismbbalpha** returns a nonzero value if the expression: `isalpha(c) || _ismbbkalnum(c)` -is nonzero for *c*, or 0 if it is not. **_ismbbalpha** uses the current locale for any locale-dependent character settings. **_ismbbalpha_l** is identical except that it uses the locale passed in. +is nonzero for *`c`*, or 0 if it is not. **_ismbbalpha** uses the current locale for any locale-dependent character settings. **_ismbbalpha_l** is identical except that it uses the locale passed in. ## Remarks @@ -52,13 +52,13 @@ By default, this function's global state is scoped to the application. To change |**_ismbbalpha**|\| |**_ismbbalpha_l**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Libraries -All versions of the [C run-time libraries](../../c-runtime-library/crt-library-features.md). +All versions of the [C run-time libraries](../crt-library-features.md). ## See also -[Byte Classification](../../c-runtime-library/byte-classification.md)
-[_ismbb Routines](../../c-runtime-library/ismbb-routines.md)
+[Byte classification](../byte-classification.md)\ +[`_ismbb` routines](../ismbb-routines.md) diff --git a/docs/c-runtime-library/reference/ismbbblank-ismbbblank-l.md b/docs/c-runtime-library/reference/ismbbblank-ismbbblank-l.md index 19eb7484ef1..93439b00931 100644 --- a/docs/c-runtime-library/reference/ismbbblank-ismbbblank-l.md +++ b/docs/c-runtime-library/reference/ismbbblank-ismbbblank-l.md @@ -29,15 +29,15 @@ int _ismbbblank_l( ### Parameters -*c*
+*`c`*\ Integer to be tested. -*locale*
+*`locale`*\ Locale to use. -## Return Value +## Return value -**_ismbbblank** returns a nonzero value if *c* represents a space (0x20) character, a horizontal tab (0x09) character, or a locale-specific character that's used to separate words within a line of text for which **isspace** is true; otherwise, returns 0. **_ismbbblank** uses the current locale for any locale-dependent behavior. **_ismbbblank_l** is identical except that it instead uses the locale that's passed in. For more information, see [Locale](../../c-runtime-library/locale.md). +**_ismbbblank** returns a nonzero value if *`c`* represents a space (0x20) character, a horizontal tab (0x09) character, or a locale-specific character that's used to separate words within a line of text for which **isspace** is true; otherwise, returns 0. **_ismbbblank** uses the current locale for any locale-dependent behavior. **_ismbbblank_l** is identical except that it instead uses the locale that's passed in. For more information, see [Locale](../locale.md). ## Remarks @@ -50,9 +50,9 @@ By default, this function's global state is scoped to the application. To change |**_ismbbblank**|\| |**_ismbbblank_l**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Byte Classification](../../c-runtime-library/byte-classification.md)
-[_ismbb Routines](../../c-runtime-library/ismbb-routines.md)
+[Byte classification](../byte-classification.md)\ +[`_ismbb` routines](../ismbb-routines.md) diff --git a/docs/c-runtime-library/reference/ismbbgraph-ismbbgraph-l.md b/docs/c-runtime-library/reference/ismbbgraph-ismbbgraph-l.md index 85b8a175e4a..acca031e32c 100644 --- a/docs/c-runtime-library/reference/ismbbgraph-ismbbgraph-l.md +++ b/docs/c-runtime-library/reference/ismbbgraph-ismbbgraph-l.md @@ -28,19 +28,19 @@ int _ismbbgraph_l ( ### Parameters -*c*
+*`c`*\ Integer to be tested. -*locale*
+*`locale`*\ Locale to use. -## Return Value +## Return value Returns a nonzero value if the expression: `isctype(c, ( _PUNCT | _UPPER | _LOWER | _DIGIT )) || _ismbbkprint(c)` -is nonzero for *c*, or 0 if it is not. **_ismbbgraph** uses the current locale for any locale-dependent behavior. **_ismbbgraph_l** is identical except that it uses the locale passed in instead. For more information, see [Locale](../../c-runtime-library/locale.md). +is nonzero for *`c`*, or 0 if it is not. **_ismbbgraph** uses the current locale for any locale-dependent behavior. **_ismbbgraph_l** is identical except that it uses the locale passed in instead. For more information, see [Locale](../locale.md). ## Remarks @@ -53,13 +53,13 @@ By default, this function's global state is scoped to the application. To change |**_ismbbgraph**|\| |**_ismbbgraph_l**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Libraries -All versions of the [C run-time libraries](../../c-runtime-library/crt-library-features.md). +All versions of the [C run-time libraries](../crt-library-features.md). ## See also -[Byte Classification](../../c-runtime-library/byte-classification.md)
-[_ismbb Routines](../../c-runtime-library/ismbb-routines.md)
+[Byte classification](../byte-classification.md)\ +[`_ismbb` routines](../ismbb-routines.md) diff --git a/docs/c-runtime-library/reference/ismbbkalnum-ismbbkalnum-l.md b/docs/c-runtime-library/reference/ismbbkalnum-ismbbkalnum-l.md index e9da4bc326a..13bdc4a38a9 100644 --- a/docs/c-runtime-library/reference/ismbbkalnum-ismbbkalnum-l.md +++ b/docs/c-runtime-library/reference/ismbbkalnum-ismbbkalnum-l.md @@ -28,15 +28,15 @@ int _ismbbkalnum_l( ### Parameters -*c*
+*`c`*\ Integer to be tested. -*locale*
+*`locale`*\ Locale to use. -## Return Value +## Return value -**_ismbbkalnum** returns a nonzero value if the integer *c* is a non-ASCII text symbol other than punctuation, or 0 if it is not. **_ismbbkalnum** uses the current locale for locale-dependent character information. **_ismbbkalnum_l** is identical to **_ismbbkalnum** except that it takes the locale as a parameter. For more information, see [Locale](../../c-runtime-library/locale.md). +**_ismbbkalnum** returns a nonzero value if the integer *`c`* is a non-ASCII text symbol other than punctuation, or 0 if it is not. **_ismbbkalnum** uses the current locale for locale-dependent character information. **_ismbbkalnum_l** is identical to **_ismbbkalnum** except that it takes the locale as a parameter. For more information, see [Locale](../locale.md). ## Remarks @@ -49,9 +49,9 @@ By default, this function's global state is scoped to the application. To change |**_ismbbkalnum**|\| |**_ismbbkalnum_l**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Byte Classification](../../c-runtime-library/byte-classification.md)
-[_ismbb Routines](../../c-runtime-library/ismbb-routines.md)
+[Byte classification](../byte-classification.md)\ +[`_ismbb` routines](../ismbb-routines.md) diff --git a/docs/c-runtime-library/reference/ismbbkana-ismbbkana-l.md b/docs/c-runtime-library/reference/ismbbkana-ismbbkana-l.md index 6efbb0806b7..412ab13c6ab 100644 --- a/docs/c-runtime-library/reference/ismbbkana-ismbbkana-l.md +++ b/docs/c-runtime-library/reference/ismbbkana-ismbbkana-l.md @@ -28,15 +28,15 @@ int _ismbbkana_l( ### Parameters -*c*
+*`c`*\ Integer to be tested. -*locale*
+*`locale`*\ Locale to use. -## Return Value +## Return value -**_ismbbkana** returns a nonzero value if the integer *c* is a katakana symbol or 0 if it is not. **_ismbbkana** uses the current locale for locale-dependent character information. **_ismbbkana_l** is identical except that it uses the locale object passed in. For more information, see [Locale](../../c-runtime-library/locale.md). +**_ismbbkana** returns a nonzero value if the integer *`c`* is a katakana symbol or 0 if it is not. **_ismbbkana** uses the current locale for locale-dependent character information. **_ismbbkana_l** is identical except that it uses the locale object passed in. For more information, see [Locale](../locale.md). ## Remarks @@ -49,9 +49,9 @@ By default, this function's global state is scoped to the application. To change |**_ismbbkana**|\| |**_ismbbkana_l**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Byte Classification](../../c-runtime-library/byte-classification.md)
-[_ismbb Routines](../../c-runtime-library/ismbb-routines.md)
+[Byte classification](../byte-classification.md)\ +[`_ismbb` routines](../ismbb-routines.md) diff --git a/docs/c-runtime-library/reference/ismbbkprint-ismbbkprint-l.md b/docs/c-runtime-library/reference/ismbbkprint-ismbbkprint-l.md index 936d6f9ec83..d41b1bf2907 100644 --- a/docs/c-runtime-library/reference/ismbbkprint-ismbbkprint-l.md +++ b/docs/c-runtime-library/reference/ismbbkprint-ismbbkprint-l.md @@ -28,15 +28,15 @@ int _ismbbkprint_l( ### Parameters -*c*
+*`c`*\ Integer to be tested. -*locale*
+*`locale`*\ Locale to use. -## Return Value +## Return value -**_ismbbkprint** returns a nonzero value if the integer *c* is a non-ASCII text or non-ASCII punctuation symbol or 0 if it is not. For example, in code page 932 only, **_ismbbkprint** tests for katakana alphanumeric or katakana punctuation (range: 0xA1 - 0xDF). **_ismbbkprint** uses the current locale for locale-dependent character settings. **_ismbbkprint_l** is identical except that it uses the locale passed in. For more information, see [Locale](../../c-runtime-library/locale.md). +**_ismbbkprint** returns a nonzero value if the integer *`c`* is a non-ASCII text or non-ASCII punctuation symbol or 0 if it is not. For example, in code page 932 only, **_ismbbkprint** tests for katakana alphanumeric or katakana punctuation (range: 0xA1 - 0xDF). **_ismbbkprint** uses the current locale for locale-dependent character settings. **_ismbbkprint_l** is identical except that it uses the locale passed in. For more information, see [Locale](../locale.md). ## Remarks @@ -49,9 +49,9 @@ By default, this function's global state is scoped to the application. To change |**_ismbbkprint**|\| |**_ismbbkprint_l**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Byte Classification](../../c-runtime-library/byte-classification.md)
-[_ismbb Routines](../../c-runtime-library/ismbb-routines.md)
+[Byte classification](../byte-classification.md)\ +[`_ismbb` routines](../ismbb-routines.md) diff --git a/docs/c-runtime-library/reference/ismbbkpunct-ismbbkpunct-l.md b/docs/c-runtime-library/reference/ismbbkpunct-ismbbkpunct-l.md index 1d1335309bd..8ed37b4e92e 100644 --- a/docs/c-runtime-library/reference/ismbbkpunct-ismbbkpunct-l.md +++ b/docs/c-runtime-library/reference/ismbbkpunct-ismbbkpunct-l.md @@ -28,15 +28,15 @@ int _ismbbkpunct_l( ### Parameters -*c*
+*`c`*\ Integer to be tested. -*locale*
+*`locale`*\ Locale to use. -## Return Value +## Return value -**_ismbbkpunct** returns a nonzero value if the integer *c* is a non-ASCII punctuation symbol, or 0 if it is not. For example, in code page 932 only, **_ismbbkpunct** tests for katakana punctuation. **_ismbbkpunct** uses the current locale for any locale-dependent character settings. **_ismbbkpunct_l** is identical except that it uses the locale that's passed in. For more information, see [Locale](../../c-runtime-library/locale.md). +**_ismbbkpunct** returns a nonzero value if the integer *`c`* is a non-ASCII punctuation symbol, or 0 if it is not. For example, in code page 932 only, **_ismbbkpunct** tests for katakana punctuation. **_ismbbkpunct** uses the current locale for any locale-dependent character settings. **_ismbbkpunct_l** is identical except that it uses the locale that's passed in. For more information, see [Locale](../locale.md). ## Remarks @@ -49,9 +49,9 @@ By default, this function's global state is scoped to the application. To change |**_ismbbkpunct**|\| |**_ismbbkpunct_l**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Byte Classification](../../c-runtime-library/byte-classification.md)
-[_ismbb Routines](../../c-runtime-library/ismbb-routines.md)
+[Byte classification](../byte-classification.md)\ +[`_ismbb` routines](../ismbb-routines.md) diff --git a/docs/c-runtime-library/reference/ismbblead-ismbblead-l.md b/docs/c-runtime-library/reference/ismbblead-ismbblead-l.md index 50644259ee9..c8a2f04160e 100644 --- a/docs/c-runtime-library/reference/ismbblead-ismbblead-l.md +++ b/docs/c-runtime-library/reference/ismbblead-ismbblead-l.md @@ -28,23 +28,23 @@ int _ismbblead_l( ### Parameters -*c*\ +*`c`*\ Integer to be tested. -*locale*\ +*`locale`*\ Locale to use. ## Return value -Returns a nonzero value if the integer *c* is the first byte of a multibyte character. +Returns a nonzero value if the integer *`c`* is the first byte of a multibyte character. ## Remarks Multibyte characters consist of a lead byte followed by a trailing byte. Lead bytes are distinguished by being in a particular range for a given character set. For example, in code page 932 only, lead bytes range from 0x81 - 0x9F and 0xE0 - 0xFC. -**_ismbblead** uses the current locale for locale-dependent behavior. **_ismbblead_l** is identical except that it uses the locale passed in instead. For more information, see [Locale](../../c-runtime-library/locale.md). +**_ismbblead** uses the current locale for locale-dependent behavior. **_ismbblead_l** is identical except that it uses the locale passed in instead. For more information, see [Locale](../locale.md). -When the locale is UTF-8, **_ismbblead** and **_ismbblead_l** always return 0 (false), whether *c* is a lead byte or not. +When the locale is UTF-8, **_ismbblead** and **_ismbblead_l** always return 0 (false), whether *`c`* is a lead byte or not. **_ismbblead** and **_ismbblead_l** are Microsoft-specific, not part of the Standard C library. We don't recommend you use them where you want portable code. For Standard C compatibility, use **mbrlen** instead. @@ -65,10 +65,10 @@ By default, this function's global state is scoped to the application. To change \* For manifest constants for the test conditions. -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Byte classification](../../c-runtime-library/byte-classification.md)\ -[_ismbb routines](../../c-runtime-library/ismbb-routines.md)\ -[mbrlen](mbrlen.md) +[Byte classification](../byte-classification.md)\ +[`_ismbb` routines](../ismbb-routines.md)\ +[`mbrlen`](mbrlen.md) diff --git a/docs/c-runtime-library/reference/ismbbprint-ismbbprint-l.md b/docs/c-runtime-library/reference/ismbbprint-ismbbprint-l.md index ef76356e166..1647547b285 100644 --- a/docs/c-runtime-library/reference/ismbbprint-ismbbprint-l.md +++ b/docs/c-runtime-library/reference/ismbbprint-ismbbprint-l.md @@ -28,19 +28,19 @@ int _ismbbprint_l( ### Parameters -*c*
+*`c`*\ Integer to be tested. -*locale*
+*`locale`*\ Locale to use. -## Return Value +## Return value **_ismbbprint** returns a nonzero value if the expression: `isprint(c) || _ismbbkprint(c)` -is nonzero for *c*, or 0 if it is not. **_ismbbprint** uses the current locale for any locale-dependent behavior. **_ismbbprint_l** is identical except that it uses the locale passed in instead. For more information, see [Locale](../../c-runtime-library/locale.md). +is nonzero for *`c`*, or 0 if it is not. **_ismbbprint** uses the current locale for any locale-dependent behavior. **_ismbbprint_l** is identical except that it uses the locale passed in instead. For more information, see [Locale](../locale.md). ## Remarks @@ -53,9 +53,9 @@ By default, this function's global state is scoped to the application. To change |**_ismbbprint**|\| |**_ismbbprint_l**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Byte Classification](../../c-runtime-library/byte-classification.md)
-[_ismbb Routines](../../c-runtime-library/ismbb-routines.md)
+[Byte classification](../byte-classification.md)\ +[`_ismbb` routines](../ismbb-routines.md) diff --git a/docs/c-runtime-library/reference/ismbbpunct-ismbbpunct-l.md b/docs/c-runtime-library/reference/ismbbpunct-ismbbpunct-l.md index 57d62f93f27..7a69ca3fb9c 100644 --- a/docs/c-runtime-library/reference/ismbbpunct-ismbbpunct-l.md +++ b/docs/c-runtime-library/reference/ismbbpunct-ismbbpunct-l.md @@ -28,15 +28,15 @@ int _ismbbpunct_l( ### Parameters -*c*
+*`c`*\ Integer to be tested. -*locale*
+*`locale`*\ Locale to use. -## Return Value +## Return value -**_ismbbpunct** returns a nonzero value if the integer *c* is a non-ASCII punctuation symbol. **_ismbbpunct** uses the current locale for any locale-dependent character settings. **_ismbbpunct_l** is identical except that it uses the locale that's passed in. For more information, see [Locale](../../c-runtime-library/locale.md). +**_ismbbpunct** returns a nonzero value if the integer *`c`* is a non-ASCII punctuation symbol. **_ismbbpunct** uses the current locale for any locale-dependent character settings. **_ismbbpunct_l** is identical except that it uses the locale that's passed in. For more information, see [Locale](../locale.md). ## Remarks @@ -49,9 +49,9 @@ By default, this function's global state is scoped to the application. To change |**_ismbbpunct**|\| |**_ismbbpunct_l**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Byte Classification](../../c-runtime-library/byte-classification.md)
-[_ismbb Routines](../../c-runtime-library/ismbb-routines.md)
+[Byte classification](../byte-classification.md)\ +[`_ismbb` routines](../ismbb-routines.md) diff --git a/docs/c-runtime-library/reference/ismbbtrail-ismbbtrail-l.md b/docs/c-runtime-library/reference/ismbbtrail-ismbbtrail-l.md index b5f95157486..b76ffdfed66 100644 --- a/docs/c-runtime-library/reference/ismbbtrail-ismbbtrail-l.md +++ b/docs/c-runtime-library/reference/ismbbtrail-ismbbtrail-l.md @@ -28,19 +28,19 @@ int _ismbbtrail_l( ### Parameters -*c*
+*`c`*\ The integer to be tested. -*locale*
+*`locale`*\ The locale to use. -## Return Value +## Return value -**_ismbbtrail** returns a nonzero value if the integer *c* is the second byte of a multibyte character. For example, in code page 932 only, valid ranges are 0x40 to 0x7E and 0x80 to 0xFC. +**_ismbbtrail** returns a nonzero value if the integer *`c`* is the second byte of a multibyte character. For example, in code page 932 only, valid ranges are 0x40 to 0x7E and 0x80 to 0xFC. ## Remarks -**_ismbbtrail** uses the current locale for locale-dependent behavior. **_ismbbtrail_l** is identical except that it uses the locale that's passed in instead. For more information, see [Locale](../../c-runtime-library/locale.md). +**_ismbbtrail** uses the current locale for locale-dependent behavior. **_ismbbtrail_l** is identical except that it uses the locale that's passed in instead. For more information, see [Locale](../locale.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). @@ -53,9 +53,9 @@ By default, this function's global state is scoped to the application. To change \* For manifest constants for the test conditions. -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Byte Classification](../../c-runtime-library/byte-classification.md)
-[_ismbb Routines](../../c-runtime-library/ismbb-routines.md)
+[Byte classification](../byte-classification.md)\ +[`_ismbb` routines](../ismbb-routines.md) diff --git a/docs/c-runtime-library/reference/ismbcalnum-functions.md b/docs/c-runtime-library/reference/ismbcalnum-functions.md index de13115eee1..b23d8e7617e 100644 --- a/docs/c-runtime-library/reference/ismbcalnum-functions.md +++ b/docs/c-runtime-library/reference/ismbcalnum-functions.md @@ -51,27 +51,27 @@ int _ismbcdigit_l ### Parameters -*c*
+*`c`*\ Character to be tested. -*locale*
+*`locale`*\ Locale to use. -## Return Value +## Return value -Each of these routines returns a nonzero value if the character satisfies the test condition or 0 if it does not. If *c*<= 255 and there is a corresponding **_ismbb** routine (for example, **_ismbcalnum** corresponds to **_ismbbalnum**), the result is the return value of the corresponding **_ismbb** routine. +Each of these routines returns a nonzero value if the character satisfies the test condition or 0 if it does not. If *`c`*<= 255 and there is a corresponding **_ismbb** routine (for example, **_ismbcalnum** corresponds to **_ismbbalnum**), the result is the return value of the corresponding **_ismbb** routine. ## Remarks Each of these routines tests a given multibyte character for a given condition. -The versions of these functions with the **_l** suffix are identical except that they use the locale passed in instead of the current locale for their locale-dependent behavior. For more information, see [Locale](../../c-runtime-library/locale.md). +The versions of these functions with the **_l** suffix are identical except that they use the locale passed in instead of the current locale for their locale-dependent behavior. For more information, see [Locale](../locale.md). |Routine|Test condition|Code page 932 example| |-------------|--------------------|---------------------------| -|**_ismbcalnum**, **_ismbcalnum_l**|Alphanumeric|Returns nonzero if and only if *c* is a single-byte representation of an ASCII English letter: See examples for **_ismbcdigit** and **_ismbcalpha**.| -|**_ismbcalpha**, **_ismbcalpha_l**|Alphabetic|Returns nonzero if and only if *c* is a single-byte representation of an ASCII English letter: 0x41<=*c*<=0x5A or 0x61<=*c*<=0x7A; or a katakana letter: 0xA6<=*c*<=0xDF.| -|**_ismbcdigit**, **_ismbcdigit**|Digit|Returns nonzero if and only if *c* is a single-byte representation of an ASCII digit: 0x30<=*c*<=0x39.| +|**_ismbcalnum**, **_ismbcalnum_l**|Alphanumeric|Returns nonzero if and only if *`c`* is a single-byte representation of an ASCII English letter: See examples for **_ismbcdigit** and **_ismbcalpha**.| +|**_ismbcalpha**, **_ismbcalpha_l**|Alphabetic|Returns nonzero if and only if *`c`* is a single-byte representation of an ASCII English letter: 0x41<=*`c`*<=0x5A or 0x61<=*`c`*<=0x7A; or a katakana letter: 0xA6<=*`c`*<=0xDF.| +|**_ismbcdigit**, **_ismbcdigit**|Digit|Returns nonzero if and only if *`c`* is a single-byte representation of an ASCII digit: 0x30<=*`c`*<=0x39.| 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). @@ -83,11 +83,11 @@ By default, this function's global state is scoped to the application. To change |**_ismbcalpha**, **_ismbcalpha_l**|\| |**_ismbcdigit**, **_ismbcdigit_l**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Character Classification](../../c-runtime-library/character-classification.md)
-[_ismbc Routines](../../c-runtime-library/ismbc-routines.md)
-[is, isw Routines](../../c-runtime-library/is-isw-routines.md)
-[_ismbb Routines](../../c-runtime-library/ismbb-routines.md)
+[Character classification](../character-classification.md)\ +[`_ismbc` routines](../ismbc-routines.md)\ +[`is`, `isw` routines](../is-isw-routines.md)\ +[`_ismbb` routines](../ismbb-routines.md) diff --git a/docs/c-runtime-library/reference/ismbcgraph-functions.md b/docs/c-runtime-library/reference/ismbcgraph-functions.md index a313f32f7b0..bf79e345186 100644 --- a/docs/c-runtime-library/reference/ismbcgraph-functions.md +++ b/docs/c-runtime-library/reference/ismbcgraph-functions.md @@ -59,17 +59,17 @@ int _ismbcspace_l( ### Parameters -*c*
+*`c`*\ Character to be determined. -*locale*
+*`locale`*\ Locale to use. -## Return Value +## Return value -Each of these routines returns a nonzero value if the character satisfies the test condition, or 0 if it does not. If *c* <= 255 and there is a corresponding **_ismbb** routine (for example, **_ismbcalnum** corresponds to **_ismbbalnum**), the result is the return value of the corresponding **_ismbb** routine. +Each of these routines returns a nonzero value if the character satisfies the test condition, or 0 if it does not. If *`c`* <= 255 and there is a corresponding **_ismbb** routine (for example, **_ismbcalnum** corresponds to **_ismbbalnum**), the result is the return value of the corresponding **_ismbb** routine. -The versions of these functions are identical, except that the ones that have the **_l** suffix use the locale that's passed in for their locale-dependent behavior, instead of the current locale. For more information, see [Locale](../../c-runtime-library/locale.md). +The versions of these functions are identical, except that the ones that have the **_l** suffix use the locale that's passed in for their locale-dependent behavior, instead of the current locale. For more information, see [Locale](../locale.md). ## Remarks @@ -77,11 +77,11 @@ Each of these functions tests a given multibyte character for a given condition. |Routine|Test condition|Code page 932 example| |-------------|--------------------|---------------------------| -|**_ismbcgraph**|Graphic|Returns nonzero if and only if *c* is a single-byte representation of any ASCII or katakana printable character except a white space ( ).| -|**_ismbcprint**|Printable|Returns nonzero if and only if *c* is a single-byte representation of any ASCII or katakana printable character including a white space ( ).| -|**_ismbcpunct**|Punctuation|Returns nonzero if and only if *c* is a single-byte representation of any ASCII or katakana punctuation character.| -|**_ismbcblank**|Space or horizontal tab|Returns nonzero if and only if *c* is a space or horizontal tab character: *c*=0x20 or *c*=0x09.| -|**_ismbcspace**|White space|Returns nonzero if and only if *c* is a white-space character: *c*=0x20 or 0x09<=*c*<=0x0D.| +|**_ismbcgraph**|Graphic|Returns nonzero if and only if *`c`* is a single-byte representation of any ASCII or katakana printable character except a white space ( ).| +|**_ismbcprint**|Printable|Returns nonzero if and only if *`c`* is a single-byte representation of any ASCII or katakana printable character including a white space ( ).| +|**_ismbcpunct**|Punctuation|Returns nonzero if and only if *`c`* is a single-byte representation of any ASCII or katakana punctuation character.| +|**_ismbcblank**|Space or horizontal tab|Returns nonzero if and only if *`c`* is a space or horizontal tab character: *`c`*=0x20 or *`c`*=0x09.| +|**_ismbcspace**|White space|Returns nonzero if and only if *`c`* is a white-space character: *`c`*=0x20 or 0x09<=*`c`*<=0x0D.| 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). @@ -100,17 +100,17 @@ By default, this function's global state is scoped to the application. To change |**_ismbcspace**|\| |**_ismbcspace_l**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Libraries -All versions of the [C run-time libraries](../../c-runtime-library/crt-library-features.md). +All versions of the [C run-time libraries](../crt-library-features.md). ## See also -[Character Classification](../../c-runtime-library/character-classification.md)
-[Locale](../../c-runtime-library/locale.md)
-[Interpretation of Multibyte-Character Sequences](../../c-runtime-library/interpretation-of-multibyte-character-sequences.md)
-[_ismbc Routines](../../c-runtime-library/ismbc-routines.md)
-[is, isw Routines](../../c-runtime-library/is-isw-routines.md)
-[_ismbb Routines](../../c-runtime-library/ismbb-routines.md)
+[Character classification](../character-classification.md)\ +[Locale](../locale.md)\ +[Interpretation of multibyte-character sequences](../interpretation-of-multibyte-character-sequences.md)\ +[`_ismbc` routines](../ismbc-routines.md)\ +[`is`, `isw` routines](../is-isw-routines.md)\ +[`_ismbb` routines](../ismbb-routines.md) diff --git a/docs/c-runtime-library/reference/ismbchira-ismbchira-l-ismbckata-ismbckata-l.md b/docs/c-runtime-library/reference/ismbchira-ismbchira-l-ismbckata-ismbckata-l.md index 2a8cb5696aa..f4491bdff3a 100644 --- a/docs/c-runtime-library/reference/ismbchira-ismbchira-l-ismbckata-ismbckata-l.md +++ b/docs/c-runtime-library/reference/ismbchira-ismbchira-l-ismbckata-ismbckata-l.md @@ -38,28 +38,28 @@ int _ismbckata_l( ### Parameters -*c*
+*`c`*\ Character to be tested. -*locale*
+*`locale`*\ Locale to use. -## Return Value +## Return value -Each of these routines returns a nonzero value if the character satisfies the test condition or 0 if it does not. If *c* <= 255 and there is a corresponding **_ismbb** routine (for example, **_ismbcalnum** corresponds to **_ismbbalnum**), the result is the return value of the corresponding **_ismbb** routine. +Each of these routines returns a nonzero value if the character satisfies the test condition or 0 if it does not. If *`c`* <= 255 and there is a corresponding **_ismbb** routine (for example, **_ismbcalnum** corresponds to **_ismbbalnum**), the result is the return value of the corresponding **_ismbb** routine. ## Remarks Each of these functions tests a given multibyte character for a given condition. -The versions of these functions with the **_l** suffix are identical except that they use the locale passed in instead of the current locale for their locale-dependent behavior. For more information, see [Locale](../../c-runtime-library/locale.md). +The versions of these functions with the **_l** suffix are identical except that they use the locale passed in instead of the current locale for their locale-dependent behavior. For more information, see [Locale](../locale.md). |Routine|Test condition (code page 932 only)| |-------------|-------------------------------------------| -|**_ismbchira**|Double-byte Hiragana: 0x829F<=*c*<=0x82F1.| -|**_ismbchira_l**|Double-byte Hiragana: 0x829F<=*c*<=0x82F1.| -|**_ismbckata**|Double-byte katakana: 0x8340<=*c*<=0x8396.| -|**_ismbckata_l**|Double-byte katakana: 0x8340<=*c*<=0x8396.| +|**_ismbchira**|Double-byte Hiragana: 0x829F<=*`c`*<=0x82F1.| +|**_ismbchira_l**|Double-byte Hiragana: 0x829F<=*`c`*<=0x82F1.| +|**_ismbckata**|Double-byte katakana: 0x8340<=*`c`*<=0x8396.| +|**_ismbckata_l**|Double-byte katakana: 0x8340<=*`c`*<=0x8396.| **End Code Page 932 Specific** @@ -74,12 +74,12 @@ By default, this function's global state is scoped to the application. To change |**_ismbckata**|\| |**_ismbckata_l**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Character Classification](../../c-runtime-library/character-classification.md)
-[_ismbc Routines](../../c-runtime-library/ismbc-routines.md)
-[is, isw Routines](../../c-runtime-library/is-isw-routines.md)
-[Locale](../../c-runtime-library/locale.md)
-[Interpretation of Multibyte-Character Sequences](../../c-runtime-library/interpretation-of-multibyte-character-sequences.md)
+[Character classification](../character-classification.md)\ +[`_ismbc` routines](../ismbc-routines.md)\ +[`is`, `isw` routines](../is-isw-routines.md)\ +[Locale](../locale.md)\ +[Interpretation of multibyte-character sequences](../interpretation-of-multibyte-character-sequences.md) diff --git a/docs/c-runtime-library/reference/ismbcl0-ismbcl0-l-ismbcl1-ismbcl1-l-ismbcl2-ismbcl2-l.md b/docs/c-runtime-library/reference/ismbcl0-ismbcl0-l-ismbcl1-ismbcl1-l-ismbcl2-ismbcl2-l.md index dae372ed43a..04d669e7aa4 100644 --- a/docs/c-runtime-library/reference/ismbcl0-ismbcl0-l-ismbcl1-ismbcl1-l-ismbcl2-ismbcl2-l.md +++ b/docs/c-runtime-library/reference/ismbcl0-ismbcl0-l-ismbcl1-ismbcl1-l-ismbcl2-ismbcl2-l.md @@ -45,32 +45,32 @@ int _ismbcl2_l( ### Parameters -*c*
+*`c`*\ Character to be tested. -*locale*
+*`locale`*\ Locale to use. -## Return Value +## Return value -Each of these routines returns a nonzero value if the character satisfies the test condition or 0 if it does not. If *c* <= 255 and there is a corresponding **_ismbb** routine (for example, **_ismbcalnum** corresponds to **_ismbbalnum**), the result is the return value of the corresponding **_ismbb** routine. +Each of these routines returns a nonzero value if the character satisfies the test condition or 0 if it does not. If *`c`* <= 255 and there is a corresponding **_ismbb** routine (for example, **_ismbcalnum** corresponds to **_ismbbalnum**), the result is the return value of the corresponding **_ismbb** routine. ## Remarks Each of these functions tests a given multibyte character for a given condition. -The output value is affected by the setting of the **LC_CTYPE** category setting of the locale; see [setlocale](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. For more information, see [Locale](../../c-runtime-library/locale.md). +The output value is affected by the setting of the **LC_CTYPE** category setting of the locale; see [`setlocale`](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. For more information, see [Locale](../locale.md). |Routine|Test condition (code page 932 only)| |-------------|-------------------------------------------| -|**_ismbcl0**|JIS non-Kanji: 0x8140<=*c*<=0x889E.| -|**_ismbcl0_l**|JIS non-Kanji: 0x8140<=*c*<=0x889E.| -|**_ismbcl1**|JIS level-1: 0x889F<=*c*<=0x9872.| -|**_ismbcl1_l**|JIS level-1: 0x889F<=*c*<=0x9872.| -|**_ismbcl2**|JIS level-2: 0x989F<=*c*<=0xEAA4.| -|**_ismbcl2_l**|JIS level-2: 0x989F<=*c*<=0xEAA4.| +|**_ismbcl0**|JIS non-Kanji: 0x8140<=*`c`*<=0x889E.| +|**_ismbcl0_l**|JIS non-Kanji: 0x8140<=*`c`*<=0x889E.| +|**_ismbcl1**|JIS level-1: 0x889F<=*`c`*<=0x9872.| +|**_ismbcl1_l**|JIS level-1: 0x889F<=*`c`*<=0x9872.| +|**_ismbcl2**|JIS level-2: 0x989F<=*`c`*<=0xEAA4.| +|**_ismbcl2_l**|JIS level-2: 0x989F<=*`c`*<=0xEAA4.| -The functions check that the specified value *c* matches the test conditions described above, but do not check that *c* is a valid multibyte character. If the lower byte is in the ranges 0x00 - 0x3F, 0x7F, or 0xFD - 0xFF, these functions return a nonzero value, indicating that the character satisfies the test condition. Use [_ismbbtrail](ismbbtrail-ismbbtrail-l.md) to test whether the multibyte character is defined. +The functions check that the specified value *`c`* matches the test conditions described above, but do not check that *`c`* is a valid multibyte character. If the lower byte is in the ranges 0x00 - 0x3F, 0x7F, or 0xFD - 0xFF, these functions return a nonzero value, indicating that the character satisfies the test condition. Use [`_ismbbtrail`](ismbbtrail-ismbbtrail-l.md) to test whether the multibyte character is defined. **End Code Page 932 Specific** @@ -87,10 +87,10 @@ By default, this function's global state is scoped to the application. To change |**_ismbcl2**|\| |**_ismbcl2_l**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Character Classification](../../c-runtime-library/character-classification.md)
-[_ismbc Routines](../../c-runtime-library/ismbc-routines.md)
-[is, isw Routines](../../c-runtime-library/is-isw-routines.md)
+[Character classification](../character-classification.md)\ +[`_ismbc` routines](../ismbc-routines.md)\ +[`is`, `isw` routines](../is-isw-routines.md) diff --git a/docs/c-runtime-library/reference/ismbclegal-ismbclegal-l-ismbcsymbol-ismbcsymbol-l.md b/docs/c-runtime-library/reference/ismbclegal-ismbclegal-l-ismbcsymbol-ismbcsymbol-l.md index edbe9120178..53dbac5fef5 100644 --- a/docs/c-runtime-library/reference/ismbclegal-ismbclegal-l-ismbcsymbol-ismbcsymbol-l.md +++ b/docs/c-runtime-library/reference/ismbclegal-ismbclegal-l-ismbcsymbol-ismbcsymbol-l.md @@ -38,30 +38,30 @@ int _ismbcsymbol_l( ### Parameters -*c*
+*`c`*\ Character to be tested. -*locale*
+*`locale`*\ Locale to use. -## Return Value +## Return value -Each of these routines returns a nonzero value if the character satisfies the test condition or 0 if it does not. If *c*<= 255 and there is a corresponding **_ismbb** routine (for example, **_ismbcalnum** corresponds to **_ismbbalnum**), the result is the return value of the corresponding **_ismbb** routine. +Each of these routines returns a nonzero value if the character satisfies the test condition or 0 if it does not. If *`c`*<= 255 and there is a corresponding **_ismbb** routine (for example, **_ismbcalnum** corresponds to **_ismbbalnum**), the result is the return value of the corresponding **_ismbb** routine. ## Remarks Each of these functions tests a given multibyte character for a given condition. -The versions of these functions with the **_l** suffix are identical except that they use the locale passed in instead of the current locale for their locale-dependent behavior. For more information, see [Locale](../../c-runtime-library/locale.md). +The versions of these functions with the **_l** suffix are identical except that they use the locale passed in instead of the current locale for their locale-dependent behavior. For more information, see [Locale](../locale.md). |Routine|Test condition|Code page 932 example| |-------------|--------------------|---------------------------| -|**_ismbclegal**|Valid multibyte|Returns nonzero if and only if the first byte of *c* is within ranges 0x81 - 0x9F or 0xE0 - 0xFC, while the second byte is within ranges 0x40 - 0x7E or 0x80 - FC.| -|**_ismbcsymbol**|Multibyte symbol|Returns nonzero if and only if 0x8141<=*c*<=0x81AC.| +|**_ismbclegal**|Valid multibyte|Returns nonzero if and only if the first byte of *`c`* is within ranges 0x81 - 0x9F or 0xE0 - 0xFC, while the second byte is within ranges 0x40 - 0x7E or 0x80 - FC.| +|**_ismbcsymbol**|Multibyte symbol|Returns nonzero if and only if 0x8141<=*`c`*<=0x81AC.| 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| |---------------------|--------------------------------------|--------------------|-----------------------| @@ -75,11 +75,11 @@ By default, this function's global state is scoped to the application. To change |**_ismbclegal**, **_ismbclegal_l**|\| |**_ismbcsymbol**, **_ismbcsymbol_l**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Character Classification](../../c-runtime-library/character-classification.md)
-[_ismbc Routines](../../c-runtime-library/ismbc-routines.md)
-[is, isw Routines](../../c-runtime-library/is-isw-routines.md)
-[_ismbb Routines](../../c-runtime-library/ismbb-routines.md)
+[Character classification](../character-classification.md)\ +[`_ismbc` routines](../ismbc-routines.md)\ +[`is`, `isw` routines](../is-isw-routines.md)\ +[`_ismbb` routines](../ismbb-routines.md) diff --git a/docs/c-runtime-library/reference/ismbclower-ismbclower-l-ismbcupper-ismbcupper-l.md b/docs/c-runtime-library/reference/ismbclower-ismbclower-l-ismbcupper-ismbcupper-l.md index 12a86542726..869bb6700eb 100644 --- a/docs/c-runtime-library/reference/ismbclower-ismbclower-l-ismbcupper-ismbcupper-l.md +++ b/docs/c-runtime-library/reference/ismbclower-ismbclower-l-ismbcupper-ismbcupper-l.md @@ -38,28 +38,28 @@ int _ismbcupper_l( ### Parameters -*c*
+*`c`*\ Character to be tested. -*locale*
+*`locale`*\ Locale to use. -## Return Value +## Return value -Each of these routines returns a nonzero value if the character satisfies the test condition or 0 if it does not. If *c*<= 255 and there is a corresponding **_ismbb** routine (for example, **_ismbcalnum** corresponds to **_ismbbalnum**), the result is the return value of the corresponding **_ismbb** routine. +Each of these routines returns a nonzero value if the character satisfies the test condition or 0 if it does not. If *`c`*<= 255 and there is a corresponding **_ismbb** routine (for example, **_ismbcalnum** corresponds to **_ismbbalnum**), the result is the return value of the corresponding **_ismbb** routine. ## Remarks Each of these functions tests a given multibyte character for a given condition. -The versions of these functions with the **_l** suffix are identical except that they use the locale passed in instead of the current locale for their locale-dependent behavior. For more information, see [Locale](../../c-runtime-library/locale.md). +The versions of these functions with the **_l** suffix are identical except that they use the locale passed in instead of the current locale for their locale-dependent behavior. For more information, see [Locale](../locale.md). |Routine|Test condition|Code page 932 example| |-------------|--------------------|---------------------------| -|**_ismbclower**|Lowercase alphabetic|Returns nonzero if and only if *c* is a single-byte representation of an ASCII lowercase English letter: 0x61<=*c*<=0x7A.| -|**_ismbclower_l**|Lowercase alphabetic|Returns nonzero if and only if *c* is a single-byte representation of an ASCII lowercase English letter: 0x61<=*c*<=0x7A.| -|**_ismbcupper**|Uppercase alphabetic|Returns nonzero if and only if *c* is a single-byte representation of an ASCII uppercase English letter: 0x41<=*c*<=0x5A.| -|**_ismbcupper_l**|Uppercase alphabetic|Returns nonzero if and only if *c* is a single-byte representation of an ASCII uppercase English letter: 0x41<=*c*<=0x5A.| +|**_ismbclower**|Lowercase alphabetic|Returns nonzero if and only if *`c`* is a single-byte representation of an ASCII lowercase English letter: 0x61<=*`c`*<=0x7A.| +|**_ismbclower_l**|Lowercase alphabetic|Returns nonzero if and only if *`c`* is a single-byte representation of an ASCII lowercase English letter: 0x61<=*`c`*<=0x7A.| +|**_ismbcupper**|Uppercase alphabetic|Returns nonzero if and only if *`c`* is a single-byte representation of an ASCII uppercase English letter: 0x41<=*`c`*<=0x5A.| +|**_ismbcupper_l**|Uppercase alphabetic|Returns nonzero if and only if *`c`* is a single-byte representation of an ASCII uppercase English letter: 0x41<=*`c`*<=0x5A.| 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). @@ -72,13 +72,13 @@ By default, this function's global state is scoped to the application. To change |**_ismbcupper**|\| |**_ismbcupper_l**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Character Classification](../../c-runtime-library/character-classification.md)
-[_ismbc Routines](../../c-runtime-library/ismbc-routines.md)
-[Locale](../../c-runtime-library/locale.md)
-[Interpretation of Multibyte-Character Sequences](../../c-runtime-library/interpretation-of-multibyte-character-sequences.md)
-[is, isw Routines](../../c-runtime-library/is-isw-routines.md)
-[_ismbb Routines](../../c-runtime-library/ismbb-routines.md)
+[Character classification](../character-classification.md)\ +[`_ismbc` routines](../ismbc-routines.md)\ +[Locale](../locale.md)\ +[Interpretation of multibyte-character sequences](../interpretation-of-multibyte-character-sequences.md)\ +[`is`, `isw` routines](../is-isw-routines.md)\ +[`_ismbb` routines](../ismbb-routines.md) diff --git a/docs/c-runtime-library/reference/ismbslead-ismbstrail-ismbslead-l-ismbstrail-l.md b/docs/c-runtime-library/reference/ismbslead-ismbstrail-ismbslead-l-ismbstrail-l.md index 4d795242b0e..2ec9c027029 100644 --- a/docs/c-runtime-library/reference/ismbslead-ismbstrail-ismbslead-l-ismbstrail-l.md +++ b/docs/c-runtime-library/reference/ismbslead-ismbstrail-ismbslead-l-ismbstrail-l.md @@ -42,24 +42,24 @@ int _ismbstrail_l( ### Parameters -*str*
+*`str`*\ Pointer to the start of the string or the previous known lead byte. -*current*
+*`current`*\ Pointer to the position in the string to be tested. -*locale*
+*`locale`*\ The locale to use. -## Return Value +## Return value -**_ismbslead** returns -1 if the character is a lead byte and **_ismbstrail** returns -1 if the character is a trail byte. If the input strings are valid but are not a lead byte or trail byte, these functions return zero. If either argument is **NULL**, the invalid parameter handler is invoked, 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**. +**_ismbslead** returns -1 if the character is a lead byte and **_ismbstrail** returns -1 if the character is a trail byte. If the input strings are valid but are not a lead byte or trail byte, these functions return zero. If either argument is **NULL**, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, these functions return **NULL** and set **errno** to **EINVAL**. ## Remarks **_ismbslead** and **_ismbstrail** are slower than the **_ismbblead** and **_ismbbtrail** versions because they take the string context into account. -The versions of these functions that have the **_l** suffix are identical except that for their locale-dependent behavior they use the locale that's passed in instead of the current locale. For more information, see [Locale](../../c-runtime-library/locale.md). +The versions of these functions that have the **_l** suffix are identical except that for their locale-dependent behavior they use the locale that's passed in instead of the current locale. For more information, see [Locale](../locale.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). @@ -74,11 +74,11 @@ By default, this function's global state is scoped to the application. To change \* For manifest constants for the test conditions. -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Character Classification](../../c-runtime-library/character-classification.md)
-[_ismbc Routines](../../c-runtime-library/ismbc-routines.md)
-[is, isw Routines](../../c-runtime-library/is-isw-routines.md)
-[_ismbb Routines](../../c-runtime-library/ismbb-routines.md)
+[Character classification](../character-classification.md)\ +[`_ismbc` routines](../ismbc-routines.md)\ +[`is`, `isw` routines](../is-isw-routines.md)\ +[`_ismbb` routines](../ismbb-routines.md) diff --git a/docs/c-runtime-library/reference/isnan-isnan-isnanf.md b/docs/c-runtime-library/reference/isnan-isnan-isnanf.md index 46c68078659..763b18a2365 100644 --- a/docs/c-runtime-library/reference/isnan-isnan-isnanf.md +++ b/docs/c-runtime-library/reference/isnan-isnan-isnanf.md @@ -37,18 +37,18 @@ bool isnan( ### Parameters -*x*
+*`x`*\ The floating-point value to test. -## Return Value +## Return value -In C, the **isnan** macro and the **_isnan** and **_isnanf** functions return a non-zero value if the argument *x* is a NAN; otherwise they return 0. +In C, the **isnan** macro and the **_isnan** and **_isnanf** functions return a non-zero value if the argument *`x`* is a NAN; otherwise they return 0. -In C++, the **isnan** template function returns **`true`** if the argument *x* is a NaN; otherwise it returns **`false`**. +In C++, the **isnan** template function returns **`true`** if the argument *`x`* is a NaN; otherwise it returns **`false`**. ## Remarks -Because a NaN value does not compare as equal to any other NaN value, you must use one of these functions or macros to detect one. A NaN is generated when the result of a floating-point operation can't be represented in IEEE-754 floating-point format for the specified type. For information about how a NaN is represented for output, see [printf](printf-printf-l-wprintf-wprintf-l.md). +Because a NaN value does not compare as equal to any other NaN value, you must use one of these functions or macros to detect one. A NaN is generated when the result of a floating-point operation can't be represented in IEEE-754 floating-point format for the specified type. For information about how a NaN is represented for output, see [`printf`](printf-printf-l-wprintf-wprintf-l.md). When compiled as C++, the **isnan** macro is not defined, and an **isnan** template function is defined instead. It behaves the same way as the macro, but returns a value of type **`bool`** instead of an integer. @@ -61,13 +61,13 @@ The **_isnan** and **_isnanf** functions are Microsoft-specific. The **_isnanf** |**isnan**, **_isnanf**|\|\ or \| |**_isnan**|\|\ or \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Floating-Point Support](../../c-runtime-library/floating-point-support.md)
-[fpclassify](fpclassify.md)
-[_fpclass, _fpclassf](fpclass-fpclassf.md)
-[isfinite, _finite, _finitef](finite-finitef.md)
-[isinf](isinf.md)
-[isnormal](isnormal.md)
+[Math and floating-point support](../floating-point-support.md)\ +[`fpclassify`](fpclassify.md)\ +[`_fpclass`, `_fpclassf`](fpclass-fpclassf.md)\ +[`isfinite`, `_finite`, `_finitef`](finite-finitef.md)\ +[`isinf`](isinf.md)\ +[`isnormal`](isnormal.md) diff --git a/docs/c-runtime-library/reference/isnormal.md b/docs/c-runtime-library/reference/isnormal.md index f356d3ad0a0..50370703da7 100644 --- a/docs/c-runtime-library/reference/isnormal.md +++ b/docs/c-runtime-library/reference/isnormal.md @@ -24,12 +24,12 @@ inline bool isnormal( ### Parameters -*x*
+*`x`*\ The floating-point value to test. ## Return value -**isnormal** returns a nonzero value (**`true`** in C++ code) if the argument *x* is neither zero, subnormal, infinite, nor a NaN. Otherwise, **isnormal** returns 0 (**`false`** in C++ code). +**isnormal** returns a nonzero value (**`true`** in C++ code) if the argument *`x`* is neither zero, subnormal, infinite, nor a NaN. Otherwise, **isnormal** returns 0 (**`false`** in C++ code). ## Remarks @@ -41,12 +41,12 @@ The floating-point value to test. |--------------|---------------------------|-------------------------------| |**isnormal**|\|\ or \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Floating-Point Support](../../c-runtime-library/floating-point-support.md)
-[isfinite, _finite, _finitef](finite-finitef.md)
-[isinf](isinf.md)
-[isnan, _isnan, _isnanf](isnan-isnan-isnanf.md)
-[_fpclass, _fpclassf](fpclass-fpclassf.md)
+[Math and floating-point support](../floating-point-support.md)\ +[`isfinite`, `_finite`, `_finitef`](finite-finitef.md)\ +[`isinf`](isinf.md)\ +[`isnan`, `_isnan`, `_isnanf`](isnan-isnan-isnanf.md)\ +[`_fpclass`, `_fpclassf`](fpclass-fpclassf.md) diff --git a/docs/c-runtime-library/reference/isprint-iswprint-isprint-l-iswprint-l.md b/docs/c-runtime-library/reference/isprint-iswprint-isprint-l-iswprint-l.md index 08831d19301..34ee9029e59 100644 --- a/docs/c-runtime-library/reference/isprint-iswprint-isprint-l-iswprint-l.md +++ b/docs/c-runtime-library/reference/isprint-iswprint-isprint-l-iswprint-l.md @@ -35,25 +35,25 @@ int _iswprint_l( ### Parameters -*c*
+*`c`*\ Integer to test. -*locale*
+*`locale`*\ The locale to use. -## Return Value +## Return value -Each of these routines returns nonzero if *c* is a particular representation of a printable character. **isprint** returns a nonzero value if *c* is a printable character—this includes the space character (0x20 - 0x7E). **iswprint** returns a nonzero value if *c* is a printable wide character—this includes the space wide character. Each of these routines returns 0 if *c* does not satisfy the test condition. +Each of these routines returns nonzero if *`c`* is a particular representation of a printable character. **isprint** returns a nonzero value if *`c`* is a printable character—this includes the space character (0x20 - 0x7E). **iswprint** returns a nonzero value if *`c`* is a printable wide character—this includes the space wide character. Each of these routines returns 0 if *`c`* does not satisfy the test condition. -The result of the test condition for these functions depends on the **LC_CTYPE** category setting of the locale; see [setlocale, _wsetlocale](setlocale-wsetlocale.md) for more information. The versions of these functions that do not have the **_l** suffix use the current locale for any locale-dependent behavior; the versions that do have the **_l** suffix are identical except that they use the locale that's passed in instead. For more information, see [Locale](../../c-runtime-library/locale.md). +The result of the test condition for these functions depends on the **LC_CTYPE** category setting of the locale; see [`setlocale`, `_wsetlocale`](setlocale-wsetlocale.md) for more information. The versions of these functions that do not have the **_l** suffix use the current locale for any locale-dependent behavior; the versions that do have the **_l** suffix are identical except that they use the locale that's passed in instead. For more information, see [Locale](../locale.md). -The behavior of **isprint** and **_isprint_l** is undefined if *c* is not EOF or in the range 0 through 0xFF, inclusive. When a debug CRT library is used and *c* is not one of these values, the functions raise an assertion. +The behavior of **isprint** and **_isprint_l** is undefined if *`c`* is not EOF or in the range 0 through 0xFF, inclusive. When a debug CRT library is used and *`c`* is not one of these values, the functions raise an assertion. -### Generic-Text Routine Mappings +### Generic-text routine mappings |TCHAR.H routine|_UNICODE & _MBCS not defined|_MBCS defined|_unicode defined| |---------------------|------------------------------------|--------------------|-----------------------| -|**_** **istprint**|**isprint**|[_ismbcprint](ismbcgraph-functions.md)|**iswprint**| +|**_** **istprint**|**isprint**|[`_ismbcprint`](ismbcgraph-functions.md)|**iswprint**| ## Remarks @@ -68,10 +68,10 @@ By default, this function's global state is scoped to the application. To change |**_isprint_l**|\| |**_iswprint_l**|\ or \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Character Classification](../../c-runtime-library/character-classification.md)
-[Locale](../../c-runtime-library/locale.md)
-[is, isw Routines](../../c-runtime-library/is-isw-routines.md)
+[Character classification](../character-classification.md)\ +[Locale](../locale.md)\ +[`is`, `isw` routines](../is-isw-routines.md) diff --git a/docs/c-runtime-library/reference/ispunct-iswpunct-ispunct-l-iswpunct-l.md b/docs/c-runtime-library/reference/ispunct-iswpunct-ispunct-l-iswpunct-l.md index b0693dbbbc9..81765a73ef5 100644 --- a/docs/c-runtime-library/reference/ispunct-iswpunct-ispunct-l-iswpunct-l.md +++ b/docs/c-runtime-library/reference/ispunct-iswpunct-ispunct-l-iswpunct-l.md @@ -35,25 +35,25 @@ int _iswpunct_l( ### Parameters -*c*
+*`c`*\ Integer to test. -*locale*
+*`locale`*\ The locale to use. -## Return Value +## Return value -Each of these routines returns nonzero if *c* is a particular representation of a punctuation character. **ispunct** returns a nonzero value for any printable character that is not a space character or a character for which **isalnum** is nonzero. **iswpunct** returns a nonzero value for any printable wide character that is neither the space wide character nor a wide character for which **iswalnum** is nonzero. Each of these routines returns 0 if *c* does not satisfy the test condition. +Each of these routines returns nonzero if *`c`* is a particular representation of a punctuation character. **ispunct** returns a nonzero value for any printable character that is not a space character or a character for which **isalnum** is nonzero. **iswpunct** returns a nonzero value for any printable wide character that is neither the space wide character nor a wide character for which **iswalnum** is nonzero. Each of these routines returns 0 if *`c`* does not satisfy the test condition. -The result of the test condition for the **ispunct** function depends on the **LC_CTYPE** category setting of the locale; see [setlocale, _wsetlocale](setlocale-wsetlocale.md) for more information. The versions of these functions that do not have the **_l** suffix use the current locale for any locale-dependent behavior; the versions that do have the **_l** suffix are identical except that they use the locale that's passed in instead. For more information, see [Locale](../../c-runtime-library/locale.md). +The result of the test condition for the **ispunct** function depends on the **LC_CTYPE** category setting of the locale; see [`setlocale`, `_wsetlocale`](setlocale-wsetlocale.md) for more information. The versions of these functions that do not have the **_l** suffix use the current locale for any locale-dependent behavior; the versions that do have the **_l** suffix are identical except that they use the locale that's passed in instead. For more information, see [Locale](../locale.md). -The behavior of **ispunct** and **_ispunct_l** is undefined if *c* is not EOF or in the range 0 through 0xFF, inclusive. When a debug CRT library is used and *c* is not one of these values, the functions raise an assertion. +The behavior of **ispunct** and **_ispunct_l** is undefined if *`c`* is not EOF or in the range 0 through 0xFF, inclusive. When a debug CRT library is used and *`c`* is not one of these values, the functions raise an assertion. -### Generic-Text Routine Mappings +### Generic-text routine mappings |TCHAR.H routine|_UNICODE & _MBCS not defined|_MBCS defined|_UNICODE defined| |---------------------|------------------------------------|--------------------|-----------------------| -|**_** **istpunct**|**ispunct**|[_ismbcpunct](ismbcgraph-functions.md)|**iswpunct**| +|**_** **istpunct**|**ispunct**|[`_ismbcpunct`](ismbcgraph-functions.md)|**iswpunct**| ## Remarks @@ -68,10 +68,10 @@ By default, this function's global state is scoped to the application. To change |**_ispunct_l**|\| |**_iswpunct_l**|\ or \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Character Classification](../../c-runtime-library/character-classification.md)
-[Locale](../../c-runtime-library/locale.md)
-[is, isw Routines](../../c-runtime-library/is-isw-routines.md)
+[Character classification](../character-classification.md)\ +[Locale](../locale.md)\ +[`is`, `isw` routines](../is-isw-routines.md) diff --git a/docs/c-runtime-library/reference/isspace-iswspace-isspace-l-iswspace-l.md b/docs/c-runtime-library/reference/isspace-iswspace-isspace-l-iswspace-l.md index 68de5dadda3..ea0a195a302 100644 --- a/docs/c-runtime-library/reference/isspace-iswspace-isspace-l-iswspace-l.md +++ b/docs/c-runtime-library/reference/isspace-iswspace-isspace-l-iswspace-l.md @@ -35,25 +35,25 @@ int _iswspace_l( ### Parameters -*c*
+*`c`*\ Integer to test. -*locale*
+*`locale`*\ Locale to use. -## Return Value +## Return value -Each of these routines returns nonzero if *c* is a particular representation of a space character. **isspace** returns a nonzero value if *c* is a white-space character (0x09 - 0x0D or 0x20). The result of the test condition for the **isspace** function depends on the **LC_CTYPE** category setting of the locale; see [setlocale, _wsetlocale](setlocale-wsetlocale.md) for more information. The versions of these functions that do not have the **_l** suffix use the current locale for any locale-dependent behavior; the versions that do have the **_l** suffix are identical except that they use the locale that's passed in instead. For more information, see [Locale](../../c-runtime-library/locale.md). +Each of these routines returns nonzero if *`c`* is a particular representation of a space character. **isspace** returns a nonzero value if *`c`* is a white-space character (0x09 - 0x0D or 0x20). The result of the test condition for the **isspace** function depends on the **LC_CTYPE** category setting of the locale; see [`setlocale`, `_wsetlocale`](setlocale-wsetlocale.md) for more information. The versions of these functions that do not have the **_l** suffix use the current locale for any locale-dependent behavior; the versions that do have the **_l** suffix are identical except that they use the locale that's passed in instead. For more information, see [Locale](../locale.md). -**iswspace** returns a nonzero value if *c* is a wide character that corresponds to a standard white-space character. +**iswspace** returns a nonzero value if *`c`* is a wide character that corresponds to a standard white-space character. -The behavior of **isspace** and **_isspace_l** is undefined if *c* is not EOF or in the range 0 through 0xFF, inclusive. When a debug CRT library is used and *c* is not one of these values, the functions raise an assertion. +The behavior of **isspace** and **_isspace_l** is undefined if *`c`* is not EOF or in the range 0 through 0xFF, inclusive. When a debug CRT library is used and *`c`* is not one of these values, the functions raise an assertion. -### Generic-Text Routine Mappings +### Generic-text routine mappings |TCHAR.H routine|_UNICODE & _MBCS not defined|_MBCS defined|_UNICODE defined| |---------------------|------------------------------------|--------------------|-----------------------| -|**_** **istspace**|**isspace**|[_ismbcspace](ismbcgraph-functions.md)|**iswspace**| +|**_** **istspace**|**isspace**|[`_ismbcspace`](ismbcgraph-functions.md)|**iswspace**| ## Remarks @@ -68,10 +68,10 @@ By default, this function's global state is scoped to the application. To change |**_isspace_l**|\| |**_iswspace_l**|\ or \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Character Classification](../../c-runtime-library/character-classification.md)
-[Locale](../../c-runtime-library/locale.md)
-[is, isw Routines](../../c-runtime-library/is-isw-routines.md)
+[Character classification](../character-classification.md)\ +[Locale](../locale.md)\ +[`is`, `isw` routines](../is-isw-routines.md) diff --git a/docs/c-runtime-library/reference/isupper-isupper-l-iswupper-iswupper-l.md b/docs/c-runtime-library/reference/isupper-isupper-l-iswupper-iswupper-l.md index b8ce090f840..f38a2b043cd 100644 --- a/docs/c-runtime-library/reference/isupper-isupper-l-iswupper-iswupper-l.md +++ b/docs/c-runtime-library/reference/isupper-isupper-l-iswupper-iswupper-l.md @@ -35,26 +35,26 @@ int _iwsupper_l( ### Parameters -*c*
+*`c`*\ Integer to test. -*locale*
+*`locale`*\ Locale to use. -## Return Value +## Return value -Each of these routines returns nonzero if *c* is a particular representation of an uppercase letter. **isupper** returns a nonzero value if *c* is an uppercase character (A - Z). **iswupper** returns a nonzero value if *c* is a wide character that corresponds to an uppercase letter, or if *c* is one of an implementation-defined set of wide characters for which none of **iswcntrl**, **iswdigit**, **iswpunct**, or **iswspace** is nonzero. Each of these routines returns 0 if *c* does not satisfy the test condition. +Each of these routines returns nonzero if *`c`* is a particular representation of an uppercase letter. **isupper** returns a nonzero value if *`c`* is an uppercase character (A - Z). **iswupper** returns a nonzero value if *`c`* is a wide character that corresponds to an uppercase letter, or if *`c`* is one of an implementation-defined set of wide characters for which none of **iswcntrl**, **iswdigit**, **iswpunct**, or **iswspace** is nonzero. Each of these routines returns 0 if *`c`* does not satisfy the test condition. -The versions of these functions that have the **_l** suffix use the locale that's passed in instead of the current locale for their locale-dependent behavior. For more information, see [Locale](../../c-runtime-library/locale.md). +The versions of these functions that have the **_l** suffix use the locale that's passed in instead of the current locale for their locale-dependent behavior. For more information, see [Locale](../locale.md). -The behavior of **isupper** and **_isupper_l** is undefined if *c* is not EOF or in the range 0 through 0xFF, inclusive. When a debug CRT library is used and *c* is not one of these values, the functions raise an assertion. +The behavior of **isupper** and **_isupper_l** is undefined if *`c`* is not EOF or in the range 0 through 0xFF, inclusive. When a debug CRT library is used and *`c`* is not one of these values, the functions raise an assertion. -### Generic-Text Routine Mappings +### Generic-text routine mappings |TCHAR.H routine|_UNICODE & _MBCS not defined|_MBCS defined|_UNICODE defined| |---------------------|------------------------------------|--------------------|-----------------------| -|**_istupper**|**isupper**|[_ismbcupper](ismbclower-ismbclower-l-ismbcupper-ismbcupper-l.md)|**iswupper**| -|**_istupper_l**|**_isupper_l**|[_ismbclower, _ismbclower_l, _ismbcupper, _ismbcupper_l](ismbclower-ismbclower-l-ismbcupper-ismbcupper-l.md)|**_iswupper_l**| +|**_istupper**|**isupper**|[`_ismbcupper`](ismbclower-ismbclower-l-ismbcupper-ismbcupper-l.md)|**iswupper**| +|**_istupper_l**|**_isupper_l**|[`_ismbclower`, `_ismbclower_l`, `_ismbcupper`, `_ismbcupper_l`](ismbclower-ismbclower-l-ismbcupper-ismbcupper-l.md)|**_iswupper_l**| ## Remarks @@ -69,10 +69,10 @@ By default, this function's global state is scoped to the application. To change |**iswupper**|\ or \| |**_iswupper_l**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Character Classification](../../c-runtime-library/character-classification.md)
-[Locale](../../c-runtime-library/locale.md)
-[is, isw Routines](../../c-runtime-library/is-isw-routines.md)
+[Character classification](../character-classification.md)\ +[Locale](../locale.md)\ +[`is`, `isw` routines](../is-isw-routines.md) diff --git a/docs/c-runtime-library/reference/isxdigit-iswxdigit-isxdigit-l-iswxdigit-l.md b/docs/c-runtime-library/reference/isxdigit-iswxdigit-isxdigit-l-iswxdigit-l.md index 9da967674da..945d4ca6be7 100644 --- a/docs/c-runtime-library/reference/isxdigit-iswxdigit-isxdigit-l-iswxdigit-l.md +++ b/docs/c-runtime-library/reference/isxdigit-iswxdigit-isxdigit-l-iswxdigit-l.md @@ -35,23 +35,23 @@ int _iswxdigit_l( ### Parameters -*c*
+*`c`*\ Integer to test. -*locale*
+*`locale`*\ Locale to use. -## Return Value +## Return value -Each of these routines returns nonzero if *c* is a particular representation of a hexadecimal digit. **isxdigit** returns a nonzero value if *c* is a hexadecimal digit (A - F, a - f, or 0 - 9). **iswxdigit** returns a nonzero value if *c* is a wide character that corresponds to a hexadecimal digit character. Each of these routines returns 0 if *c* does not satisfy the test condition. +Each of these routines returns nonzero if *`c`* is a particular representation of a hexadecimal digit. **isxdigit** returns a nonzero value if *`c`* is a hexadecimal digit (A - F, a - f, or 0 - 9). **iswxdigit** returns a nonzero value if *`c`* is a wide character that corresponds to a hexadecimal digit character. Each of these routines returns 0 if *`c`* does not satisfy the test condition. For the "C" locale, the **iswxdigit** function does not support Unicode full-width hexadecimal characters. -The versions of these functions that have the **_l** suffix use the locale that's passed in instead of the current locale for their locale-dependent behavior. For more information, see [Locale](../../c-runtime-library/locale.md). +The versions of these functions that have the **_l** suffix use the locale that's passed in instead of the current locale for their locale-dependent behavior. For more information, see [Locale](../locale.md). -The behavior of **isxdigit** and **_isxdigit_l** is undefined if *c* is not EOF or in the range 0 through 0xFF, inclusive. When a debug CRT library is used and *c* is not one of these values, the functions raise an assertion. +The behavior of **isxdigit** and **_isxdigit_l** is undefined if *`c`* is not EOF or in the range 0 through 0xFF, inclusive. When a debug CRT library is used and *`c`* is not one of these values, the functions raise an assertion. -### Generic-Text Routine Mappings +### Generic-text routine mappings |TCHAR.H routine|_UNICODE & _MBCS not defined|_MBCS defined|_UNICODE defined| |---------------------|------------------------------------|--------------------|-----------------------| @@ -70,10 +70,10 @@ By default, this function's global state is scoped to the application. To change |**_isxdigit_l**|\| |**_iswxdigit_l**|\ or \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Character Classification](../../c-runtime-library/character-classification.md)
-[Locale](../../c-runtime-library/locale.md)
-[is, isw Routines](../../c-runtime-library/is-isw-routines.md)
+[Character classification](../character-classification.md)\ +[Locale](../locale.md)\ +[`is`, `isw` routines](../is-isw-routines.md) diff --git a/docs/c-runtime-library/reference/itoa-itow.md b/docs/c-runtime-library/reference/itoa-itow.md index 58d71ee2f70..f70b9881ea8 100644 --- a/docs/c-runtime-library/reference/itoa-itow.md +++ b/docs/c-runtime-library/reference/itoa-itow.md @@ -69,28 +69,28 @@ wchar_t * _ui64tow( unsigned long long value, wchar_t (&buffer)[size], ### Parameters -*`value`*
+*`value`*\ Number to be converted. -*`buffer`*
+*`buffer`*\ Buffer that holds the result of the conversion. -*`radix`*
+*`radix`*\ The base to use for the conversion of *`value`*, which must be in the range 2-36. -*`size`*
+*`size`*\ Length of the buffer in units of the character type. This parameter is inferred from the *`buffer`* argument in C++. -## Return Value +## Return value Each of these functions returns a pointer to *`buffer`*. There's no error return. ## Remarks -The **`_itoa`**, **`_ltoa`**, **`_ultoa`**, **`_i64toa`**, and **`_ui64toa`** functions convert the digits of the given *`value`* argument to a null-terminated character string and store the result (up to 33 characters for **`_itoa`**, **`_ltoa`**, and **`_ultoa`**, and 65 for **`_i64toa`** and **`_ui64toa`**) in *`buffer`*. If *`radix`* equals 10 and *value* is negative, the first character of the stored string is the minus sign (**-**). The **`_itow`**, **`_ltow`**, **`_ultow`**, **`_i64tow`**, and **`_ui64tow`** functions are wide-character versions of **`_itoa`**, **`_ltoa`**, **`_ultoa`**, **`_i64toa`**, and **`_ui64toa`**, respectively. +The **`_itoa`**, **`_ltoa`**, **`_ultoa`**, **`_i64toa`**, and **`_ui64toa`** functions convert the digits of the given *`value`* argument to a null-terminated character string and store the result (up to 33 characters for **`_itoa`**, **`_ltoa`**, and **`_ultoa`**, and 65 for **`_i64toa`** and **`_ui64toa`**) in *`buffer`*. If *`radix`* equals 10 and *`value`* is negative, the first character of the stored string is the minus sign (**-**). The **`_itow`**, **`_ltow`**, **`_ultow`**, **`_i64tow`**, and **`_ui64tow`** functions are wide-character versions of **`_itoa`**, **`_ltoa`**, **`_ultoa`**, **`_i64toa`**, and **`_ui64toa`**, respectively. > [!IMPORTANT] -> These functions can write past the end of a buffer that is too small. To prevent buffer overruns, ensure that *buffer* is large enough to hold the converted digits plus the trailing null-character and a sign character. Misuse of these functions can cause serious security issues in your code. +> These functions can write past the end of a buffer that is too small. To prevent buffer overruns, ensure that *`buffer`* is large enough to hold the converted digits plus the trailing null-character and a sign character. Misuse of these functions can cause serious security issues in your code. Because of their potential for security issues, by default, these functions cause deprecation warning [C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md): **This function or variable may be unsafe. Consider using *`safe_function`* instead. To disable deprecation, use `_CRT_SECURE_NO_WARNINGS`.** We recommend you change your source code to use the *`safe_function`* suggested by the warning message. The more secure functions do not write more characters than the specified buffer size. For more information, see [`_itoa_s`, `_itow_s` functions](itoa-s-itow-s.md). @@ -103,7 +103,7 @@ By default, this function's global state is scoped to the application. To change #include ``` -In C++, these functions have template overloads that invoke their safer counterparts. For more information, see [Secure Template Overloads](../../c-runtime-library/secure-template-overloads.md). +In C++, these functions have template overloads that invoke their safer counterparts. For more information, see [Secure template overloads](../secure-template-overloads.md). The POSIX names **`itoa`**, **`ltoa`**, and **`ultoa`** exist as aliases for the **`_itoa`**, **`_ltoa`**, and **`_ultoa`** functions. The POSIX names are deprecated because they do not follow the implementation-specific global function name conventions of ISO C. By default, these functions cause deprecation warning [C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md): **The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name:** *`new_name`*. We recommend you change your source code to use the safer versions of these functions, **`_itoa_s`**, **`_ltoa_s`**, or **`_ultoa_s`**. For more information, see [`_itoa_s`, `_itow_s` functions](itoa-s-itow-s.md). @@ -141,7 +141,7 @@ int main() } ``` -### Generic-Text Routine Mappings +### Generic-text routine mappings |`Tchar.h` routine|`_UNICODE` and `_MBCS` not defined|`_MBCS` defined|`_UNICODE` defined| |---------------------|--------------------------------------|--------------------|-----------------------| @@ -159,7 +159,7 @@ int main() |**`_itoa`**, **`_ltoa`**, **`_ultoa`**, **`_i64toa`**, **`_ui64toa`**|``| |**`_itow`**, **`_ltow`**, **`_ultow`**, **`_i64tow`**, **`_ui64tow`**|`` or ``| -These functions and macros are Microsoft-specific. For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +These functions and macros are Microsoft-specific. For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -240,5 +240,5 @@ base 2: 1111111111111111111111111111111111111111111111111111111111111111 (64 cha ## See also -[Data Conversion](../../c-runtime-library/data-conversion.md)
-[`_itoa_s`, `_itow_s` functions](itoa-s-itow-s.md)
+[Data conversion](../data-conversion.md)\ +[`_itoa_s`, `_itow_s` functions](itoa-s-itow-s.md) diff --git a/docs/c-runtime-library/reference/itoa-s-itow-s.md b/docs/c-runtime-library/reference/itoa-s-itow-s.md index a8651e4e03d..3feeb588a0d 100644 --- a/docs/c-runtime-library/reference/itoa-s-itow-s.md +++ b/docs/c-runtime-library/reference/itoa-s-itow-s.md @@ -12,7 +12,7 @@ ms.assetid: eb746581-bff3-48b5-a973-bfc0a4478ecf --- # `_itoa_s`, `_ltoa_s`, `_ultoa_s`, `_i64toa_s`, `_ui64toa_s`, `_itow_s`, `_ltow_s`, `_ultow_s`, `_i64tow_s`, `_ui64tow_s` -Converts an integer to a string. These are versions of the [`_itoa`, `_itow` functions](itoa-itow.md) with security enhancements as described in [Security Features in the CRT](../../c-runtime-library/security-features-in-the-crt.md). +Converts an integer to a string. These are versions of the [`_itoa`, `_itow` functions](itoa-itow.md) with security enhancements as described in [Security features in the CRT](../security-features-in-the-crt.md). ## Syntax @@ -59,21 +59,21 @@ errno_t _ultow_s( unsigned long value, wchar_t (&buffer)[size], int radix ); ### Parameters -*`value`*
+*`value`*\ Number to be converted. -*`buffer`*
+*`buffer`*\ Output buffer that holds the result of the conversion. -*`size`*
+*`size`*\ Size of *`buffer`* in characters or wide characters. -*`radix`*
+*`radix`*\ The radix or numeric base to use to convert *`value`*, which must be in the range 2-36. ## Return value -Zero if successful; an error code on failure. If any of the following conditions applies, the function invokes an invalid parameter handler, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). +Zero if successful; an error code on failure. If any of the following conditions applies, the function invokes an invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). ### Error conditions @@ -92,15 +92,15 @@ These functions can generate an access violation if *`buffer`* does not point to Except for the parameters and return value, the **`_itoa_s`** and **`_itow_s`** function families have the same behavior as the corresponding less secure **`_itoa`** and **`_itow`** versions. -In C++, using these functions is simplified by template overloads; the overloads can infer buffer length automatically (eliminating the need to specify a size argument) and they can automatically replace older, non-secure functions with their newer, secure counterparts. For more information, see [Secure Template Overloads](../../c-runtime-library/secure-template-overloads.md). +In C++, using these functions is simplified by template overloads; the overloads can infer buffer length automatically (eliminating the need to specify a size argument) and they can automatically replace older, non-secure functions with their newer, secure counterparts. For more information, see [Secure template overloads](../secure-template-overloads.md). -The debug library versions of these functions first fill the buffer with 0xFE. To disable this behavior, use [_CrtSetDebugFillThreshold](crtsetdebugfillthreshold.md). +The debug library versions of these functions first fill the buffer with 0xFE. To disable this behavior, use [`_CrtSetDebugFillThreshold`](crtsetdebugfillthreshold.md). The CRT includes convenient macros to define the size of the buffer required to convert the longest possible value of each integer type, including the null terminator and sign character, for several common bases. For information, see [Maximum conversion count macros](itoa-itow.md#maximum-conversion-count-macros). 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| |---------------------|--------------------------------------|--------------------|-----------------------| @@ -117,7 +117,7 @@ By default, this function's global state is scoped to the application. To change |**`_itoa_s`**, **`_ltoa_s`**, **`_ultoa_s`**, **`_i64toa_s`**, **`_ui64toa_s`**|``| |**`_itow_s`**, **`_ltow_s`**, **`_ultow_s`**, **`_i64tow_s`**, **`_ui64tow_s`**|`` or ``| -These functions are Microsoft-specific. For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +These functions are Microsoft-specific. For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -191,5 +191,5 @@ base 2: 1111111111111111111111111111111111111111111111111111111111111111 (64 cha ## See also -[Data Conversion](../../c-runtime-library/data-conversion.md)
-[`_itoa`, `_itow` functions](itoa-itow.md)
+[Data conversion](../data-conversion.md)\ +[`_itoa`, `_itow` functions](itoa-itow.md) diff --git a/docs/c-runtime-library/reference/j0-j1-jn.md b/docs/c-runtime-library/reference/j0-j1-jn.md index cb433e020b0..21bb2739228 100644 --- a/docs/c-runtime-library/reference/j0-j1-jn.md +++ b/docs/c-runtime-library/reference/j0-j1-jn.md @@ -12,6 +12,6 @@ ms.assetid: ec8a9512-aacb-423c-a845-fc8927e6e21d --- # j0, j1, jn -The Microsoft-implemented POSIX function names `j0`, `j1`, and `jn` are deprecated aliases for the [_j0, _j1, and _jn](bessel-functions-j0-j1-jn-y0-y1-yn.md) functions. By default, they generate [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The names are deprecated because they don't follow the Standard C rules for implementation-specific names. However, the functions are still supported. +The Microsoft-implemented POSIX function names `j0`, `j1`, and `jn` are deprecated aliases for the [`_j0`, `_j1`, and `_jn`](bessel-functions-j0-j1-jn-y0-y1-yn.md) functions. By default, they generate [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The names are deprecated because they don't follow the Standard C rules for implementation-specific names. However, the functions are still supported. -We recommend you use [_j0, _j1, and _jn](bessel-functions-j0-j1-jn-y0-y1-yn.md) instead. Or, you can continue to use these function names, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). +We recommend you use [`_j0`, `_j1`, and `_jn`](bessel-functions-j0-j1-jn-y0-y1-yn.md) instead. Or, you can continue to use these function names, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). diff --git a/docs/c-runtime-library/reference/kbhit.md b/docs/c-runtime-library/reference/kbhit.md index 9b653407d40..154f8df3f41 100644 --- a/docs/c-runtime-library/reference/kbhit.md +++ b/docs/c-runtime-library/reference/kbhit.md @@ -24,7 +24,7 @@ Checks the console for keyboard input. int _kbhit( void ); ``` -## Return Value +## Return value **`_kbhit`** returns a nonzero value if a key has been pressed. Otherwise, it returns 0. @@ -40,11 +40,11 @@ By default, this function's global state is scoped to the application. To change |-------------|---------------------| |**`_kbhit`**|``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Libraries -All versions of the [C run-time libraries](../../c-runtime-library/crt-library-features.md). +All versions of the [C run-time libraries](../crt-library-features.md). ## Example @@ -71,7 +71,7 @@ int main( void ) } ``` -### Sample Output +### Sample output ```Output Hit me!! Hit me!! Hit me!! Hit me!! Hit me!! Hit me!! Hit me!! @@ -80,4 +80,4 @@ Key struck was 'q' ## See also -[Console and Port I/O](../../c-runtime-library/console-and-port-i-o.md)
+[Console and port I/O](../console-and-port-i-o.md) diff --git a/docs/c-runtime-library/reference/ldexp.md b/docs/c-runtime-library/reference/ldexp.md index 9e1e33003d1..47da9416032 100644 --- a/docs/c-runtime-library/reference/ldexp.md +++ b/docs/c-runtime-library/reference/ldexp.md @@ -43,23 +43,23 @@ long double ldexp( ### Parameters -*x*\ +*`x`*\ Floating-point value. -*exp*\ +*`exp`*\ Integer exponent. -## Return Value +## Return value -The **ldexp** functions return the value of *x* \* 2*exp* if successful. On overflow, and depending on the sign of *x*, **ldexp** returns +/- **HUGE_VAL**; the **errno** value is set to **ERANGE**. +The **ldexp** functions return the value of *`x`* \* 2*`exp`* if successful. On overflow, and depending on the sign of *`x`*, **ldexp** returns +/- **HUGE_VAL**; the **errno** value is set to **ERANGE**. -For more information about **errno** and possible error return values, see [errno, _doserrno, _sys_errlist, and _sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +For more information about **errno** and possible error return values, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks Because C++ allows overloading, you can call overloads of **ldexp** that take **`float`** or **`long double`** types. In a C program, unless you're using the \ macro to call this function, **ldexp** always takes a **`double`** and an **`int`** and returns a **`double`**. -If you use the \ `ldexp()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../../c-runtime-library/tgmath.md) for details. +If you use the \ `ldexp()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../tgmath.md) for details. 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). @@ -70,7 +70,7 @@ By default, this function's global state is scoped to the application. To change |**ldexp**, **ldexpf**, **ldexpl**|\|\| |**ldexp** macro | \ || -For compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -98,6 +98,6 @@ int main( void ) ## See also -[Floating-Point Support](../../c-runtime-library/floating-point-support.md)
-[frexp](frexp.md)
-[modf, modff, modfl](modf-modff-modfl.md)
+[Math and floating-point support](../floating-point-support.md)\ +[`frexp`](frexp.md)\ +[`modf`, `modff`, `modfl`](modf-modff-modfl.md) diff --git a/docs/c-runtime-library/reference/lfind-s.md b/docs/c-runtime-library/reference/lfind-s.md index 8d4b349ea8a..2e9834c88d2 100644 --- a/docs/c-runtime-library/reference/lfind-s.md +++ b/docs/c-runtime-library/reference/lfind-s.md @@ -12,7 +12,7 @@ ms.assetid: f1d9581d-5c9d-4222-a31c-a6dfafefa40d --- # _lfind_s -Performs a linear search for the specified key. A version of [_lfind](lfind.md) with security enhancements as described in [Security Features in the CRT](../../c-runtime-library/security-features-in-the-crt.md). +Performs a linear search for the specified key. A version of [`_lfind`](lfind.md) with security enhancements as described in [Security features in the CRT](../security-features-in-the-crt.md). ## Syntax @@ -29,33 +29,33 @@ void *_lfind_s( ### Parameters -*key*
+*`key`*\ Object to search for. -*base*
+*`base`*\ Pointer to the base of search data. -*number*
+*`number`*\ Number of array elements. -*size*
+*`size`*\ Size of array elements in bytes. -*compare*
-Pointer to comparison routine. The first parameter is the *context* pointer. The second parameter is a pointer to key for search. The third parameter is a pointer to array element to be compared with key. +*`compare`*\ +Pointer to comparison routine. The first parameter is the *`context`* pointer. The second parameter is a pointer to key for search. The third parameter is a pointer to array element to be compared with key. -*context*
+*`context`*\ A pointer to an object that might be accessed in the comparison function. -## Return Value +## Return value -If the key is found, **_lfind_s** returns a pointer to the element of the array at *base* that matches *key*. If the key is not found, **_lfind_s** returns **NULL**. +If the key is found, **_lfind_s** returns a pointer to the element of the array at *`base`* that matches *`key`*. If the key is not found, **_lfind_s** returns **NULL**. -If invalid parameters are passed to the function, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, **errno** is set to **EINVAL** and the function returns **NULL**. +If invalid parameters are passed to the function, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, **errno** is set to **EINVAL** and the function returns **NULL**. -### Error Conditions +### Error conditions -|key|base|compare|num|size|errno| +|*`key`*|*`base`*|*`compare`*|*`number`*|*`size`*|`errno`| |---------|----------|-------------|---------|----------|-----------| |**NULL**|any|any|any|any|**EINVAL**| |any|**NULL**|any|!= 0|any|**EINVAL**| @@ -64,9 +64,9 @@ If invalid parameters are passed to the function, the invalid parameter handler ## Remarks -The **_lfind_s** function performs a linear search for the value *key* in an array of *number* elements, each of *width* bytes. Unlike **bsearch_s**, **_lfind_s** does not require the array to be sorted. The *base* argument is a pointer to the base of the array to be searched. The *compare* argument is a pointer to a user-supplied routine that compares two array elements and then returns a value specifying their relationship. **_lfind_s** calls the *compare* routine one or more times during the search, passing the *context* pointer and pointers to two array elements on each call. The *compare* routine must compare the elements then return nonzero (meaning that the elements are different) or 0 (meaning the elements are identical). +The **_lfind_s** function performs a linear search for the value *`key`* in an array of *`number`* elements, each of *`size`* bytes. Unlike **bsearch_s**, **_lfind_s** does not require the array to be sorted. The *`base`* argument is a pointer to the base of the array to be searched. The *`compare`* argument is a pointer to a user-supplied routine that compares two array elements and then returns a value specifying their relationship. **_lfind_s** calls the *`compare`* routine one or more times during the search, passing the *`context`* pointer and pointers to two array elements on each call. The *`compare`* routine must compare the elements then return nonzero (meaning that the elements are different) or 0 (meaning the elements are identical). -**_lfind_s** is similar to **_lfind** except for the addition of the *context* pointer to the arguments of the comparison function and the parameter list of the function. The *context* pointer can be useful if the searched data structure is part of an object and the *compare* function needs to access members of the object. The *compare* function can cast the void pointer into the appropriate object type and access members of that object. The addition of the *context* parameter makes **_lfind_s** more secure because additional context can be used to avoid reentrancy bugs associated with using static variables to make data available to the *compare* function. +**_lfind_s** is similar to **_lfind** except for the addition of the *`context`* pointer to the arguments of the comparison function and the parameter list of the function. The *`context`* pointer can be useful if the searched data structure is part of an object and the *`compare`* function needs to access members of the object. The *`compare`* function can cast the void pointer into the appropriate object type and access members of that object. The addition of the *`context`* parameter makes **_lfind_s** more secure because additional context can be used to avoid reentrancy bugs associated with using static variables to make data available to the *`compare`* function. 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). @@ -76,7 +76,7 @@ By default, this function's global state is scoped to the application. To change |-------------|---------------------| |**_lfind_s**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -160,8 +160,8 @@ weit found ## See also -[Searching and Sorting](../../c-runtime-library/searching-and-sorting.md)
-[bsearch_s](bsearch-s.md)
-[_lsearch_s](lsearch-s.md)
-[qsort_s](qsort-s.md)
-[_lfind](lfind.md)
+[Searching and sorting](../searching-and-sorting.md)\ +[`bsearch_s`](bsearch-s.md)\ +[`_lsearch_s`](lsearch-s.md)\ +[`qsort_s`](qsort-s.md)\ +[`_lfind`](lfind.md) diff --git a/docs/c-runtime-library/reference/lfind.md b/docs/c-runtime-library/reference/lfind.md index e339f1c5d2d..853e36c2a8e 100644 --- a/docs/c-runtime-library/reference/lfind.md +++ b/docs/c-runtime-library/reference/lfind.md @@ -12,7 +12,7 @@ ms.assetid: a40ece70-1674-4b75-94bd-9f57cfff18f2 --- # _lfind -Performs a linear search for the specified key. A more secure version of this function is available; see [_lfind_s](lfind-s.md). +Performs a linear search for the specified key. A more secure version of this function is available; see [`_lfind_s`](lfind-s.md). ## Syntax @@ -28,30 +28,30 @@ void *_lfind( ### Parameters -*key*
+*`key`*\ Object to search for. -*base*
+*`base`*\ Pointer to the base of search data. -*number*
+*`number`*\ Number of array elements. -*width*
+*`width`*\ Width of array elements. -*compare*
+*`compare`*\ Pointer to comparison routine. The first parameter is a pointer to key for search. The second parameter is a pointer to array element to be compared with key. -## Return Value +## Return value -If the key is found, **_lfind** returns a pointer to the element of the array at *base* that matches *key*. If the key is not found, **_lfind** returns **NULL**. +If the key is found, **_lfind** returns a pointer to the element of the array at *`base`* that matches *`key`*. If the key is not found, **_lfind** returns **NULL**. ## Remarks -The **_lfind** function performs a linear search for the value *key* in an array of *number* elements, each of *width* bytes. Unlike **bsearch**, **_lfind** does not require the array to be sorted. The *base* argument is a pointer to the base of the array to be searched. The *compare* argument is a pointer to a user-supplied routine that compares two array elements and then returns a value specifying their relationship. **_lfind** calls the *compare* routine one or more times during the search, passing pointers to two array elements on each call. The *compare* routine must compare the elements and then return nonzero (meaning the elements are different) or 0 (meaning the elements are identical). +The **_lfind** function performs a linear search for the value *`key`* in an array of *`number`* elements, each of *`width`* bytes. Unlike **bsearch**, **_lfind** does not require the array to be sorted. The *`base`* argument is a pointer to the base of the array to be searched. The *`compare`* argument is a pointer to a user-supplied routine that compares two array elements and then returns a value specifying their relationship. **_lfind** calls the *`compare`* routine one or more times during the search, passing pointers to two array elements on each call. The *`compare`* routine must compare the elements and then return nonzero (meaning the elements are different) or 0 (meaning the elements are identical). -This function validates its parameters. If *compare*, *key* or *number* is **NULL**, or if *base* is **NULL** and *number* is nonzero, or if *width* is less than zero, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, **errno** is set to **EINVAL** and the function returns **NULL**. +This function validates its parameters. If *`compare`*, *`key`* or *`number`* is **NULL**, or if *`base`* is **NULL** and *`number`* is nonzero, or if *`width`* is less than zero, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, **errno** is set to **EINVAL** and the function returns **NULL**. 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). @@ -61,7 +61,7 @@ By default, this function's global state is scoped to the application. To change |-------------|---------------------| |**_lfind**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -102,8 +102,8 @@ Hello found ## See also -[Searching and Sorting](../../c-runtime-library/searching-and-sorting.md)
-[_lfind_s](lfind-s.md)
-[bsearch](bsearch.md)
-[_lsearch](lsearch.md)
-[qsort](qsort.md)
+[Searching and sorting](../searching-and-sorting.md)\ +[`_lfind_s`](lfind-s.md)\ +[`bsearch`](bsearch.md)\ +[`_lsearch`](lsearch.md)\ +[`qsort`](qsort.md) diff --git a/docs/c-runtime-library/reference/lgamma-lgammaf-lgammal.md b/docs/c-runtime-library/reference/lgamma-lgammaf-lgammal.md index 33766f2af93..84b62d9e166 100644 --- a/docs/c-runtime-library/reference/lgamma-lgammaf-lgammal.md +++ b/docs/c-runtime-library/reference/lgamma-lgammaf-lgammal.md @@ -28,29 +28,29 @@ long double lgamma( long double x ); //C++ only ### Parameters -*x*\ +*`x`*\ The value to compute. -## Return Value +## Return value -If successful, return the natural logarithm of the absolute value of the gamma function of *x*. +If successful, return the natural logarithm of the absolute value of the gamma function of *`x`*. |Issue|Return| |-----------|------------| -|*x* = NaN|NaN| -|*x* = ±0|+INFINITY| -|*x*= negative integer|+INFINITY| +|*`x`* = NaN|NaN| +|*`x`* = ±0|+INFINITY| +|*`x`*= negative integer|+INFINITY| |±INFINITY|+INFINITY| |pole error|+HUGE_VAL, +HUGE_VALF, or +HUGE_VALL| |overflow range error|±HUGE_VAL, ±HUGE_VALF, or ±HUGE_VALL| -Errors are reported as specified in [_matherr](matherr.md). +Errors are reported as specified in [`_matherr`](matherr.md). ## Remarks Because C++ allows overloading, you can call overloads of **lgamma** that take and return **`float`** and **`long double`** types. In a C program, unless you're using the \ macro to call this function, **lgamma** always takes and returns a **`double`**. -If you use the \ `lgamma()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../../c-runtime-library/tgmath.md) for details. +If you use the \ `lgamma()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../tgmath.md) for details. If x is a rational number, this function returns the logarithm of the factorial of (x - 1). @@ -63,9 +63,9 @@ By default, this function's global state is scoped to the application. To change |**lgamma**, **lgammaf**, **lgammal**|\|\| |**lgamma** macro | \ || -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Alphabetical Function Reference](crt-alphabetical-function-reference.md)
-[tgamma, tgammaf, tgammal](tgamma-tgammaf-tgammal.md)
+[Alphabetical function reference](crt-alphabetical-function-reference.md)\ +[`tgamma`, `tgammaf`, `tgammal`](tgamma-tgammaf-tgammal.md) diff --git a/docs/c-runtime-library/reference/localeconv.md b/docs/c-runtime-library/reference/localeconv.md index e8ca877e5dc..11ac3999952 100644 --- a/docs/c-runtime-library/reference/localeconv.md +++ b/docs/c-runtime-library/reference/localeconv.md @@ -20,9 +20,9 @@ Gets detailed information on locale settings. struct lconv *localeconv( void ); ``` -## Return Value +## Return value -**localeconv** returns a pointer to a filled-in object of type [struct lconv](../../c-runtime-library/standard-types.md). The values contained in the object are copied from the locale settings in thread-local storage, and can be overwritten by subsequent calls to **localeconv**. Changes made to the values in this object do not modify the locale settings. Calls to [setlocale](setlocale-wsetlocale.md) with *category* values of **LC_ALL**, **LC_MONETARY**, or **LC_NUMERIC** overwrite the contents of the structure. +**localeconv** returns a pointer to a filled-in object of type [struct lconv](../standard-types.md). The values contained in the object are copied from the locale settings in thread-local storage, and can be overwritten by subsequent calls to **localeconv**. Changes made to the values in this object do not modify the locale settings. Calls to [`setlocale`](setlocale-wsetlocale.md) with *`category`* values of **LC_ALL**, **LC_MONETARY**, or **LC_NUMERIC** overwrite the contents of the structure. ## Remarks @@ -59,7 +59,7 @@ The values of **grouping** and **mon_grouping** are interpreted according to the - 0 - Use previous element for each of remaining digits. -- *n* - Number of digits that make up current group. Next element is examined to determine size of next group of digits before current group. +- *`n`* - Number of digits that make up current group. Next element is examined to determine size of next group of digits before current group. The values for **int_curr_symbol** are interpreted according to the following rules: @@ -99,16 +99,16 @@ By default, this function's global state is scoped to the application. To change |-------------|---------------------| |**localeconv**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Libraries -All versions of the [C run-time libraries](../../c-runtime-library/crt-library-features.md). +All versions of the [C run-time libraries](../crt-library-features.md). ## See also -[Locale](../../c-runtime-library/locale.md)
-[setlocale](../../preprocessor/setlocale.md)
-[strcoll Functions](../../c-runtime-library/strcoll-functions.md)
-[strftime, wcsftime, _strftime_l, _wcsftime_l](strftime-wcsftime-strftime-l-wcsftime-l.md)
-[strxfrm, wcsxfrm, _strxfrm_l, _wcsxfrm_l](strxfrm-wcsxfrm-strxfrm-l-wcsxfrm-l.md)
+[Locale](../locale.md)\ +[`setlocale`](../../preprocessor/setlocale.md)\ +[`strcoll` functions](../strcoll-functions.md)\ +[`strftime`, `wcsftime`, `_strftime_l`, `_wcsftime_l`](strftime-wcsftime-strftime-l-wcsftime-l.md)\ +[`strxfrm`, `wcsxfrm`, `_strxfrm_l`, `_wcsxfrm_l`](strxfrm-wcsxfrm-strxfrm-l-wcsxfrm-l.md) diff --git a/docs/c-runtime-library/reference/localtime-localtime32-localtime64.md b/docs/c-runtime-library/reference/localtime-localtime32-localtime64.md index f3e27b17eed..12564be13c2 100644 --- a/docs/c-runtime-library/reference/localtime-localtime32-localtime64.md +++ b/docs/c-runtime-library/reference/localtime-localtime32-localtime64.md @@ -24,10 +24,10 @@ struct tm *_localtime64( const __time64_t *sourceTime ); ### Parameters -*`sourceTime`*
+*`sourceTime`*\ Pointer to stored time. -## Return Value +## Return value Return a pointer to the structure result, or **`NULL`** if the date passed to the function is: @@ -41,7 +41,7 @@ Return a pointer to the structure result, or **`NULL`** if the date passed to th **`localtime`** is an inline function which evaluates to **`_localtime64`**, and **`time_t`** is equivalent to **`__time64_t`**. If you need to force the compiler to interpret **`time_t`** as the old 32-bit **`time_t`**, you can define **`_USE_32BIT_TIME_T`**. Doing this will cause **`localtime`** to evaluate to **`_localtime32`**. This is not recommended because your application may fail after January 18, 2038, and it is not allowed on 64-bit platforms. -The fields of the structure type [`tm`](../../c-runtime-library/standard-types.md) store the following values, each of which is an **`int`**: +The fields of the structure type [`tm`](../standard-types.md) store the following values, each of which is an **`int`**: |Field|Description| |-|-| @@ -59,7 +59,7 @@ If the **`TZ`** environment variable is set, the C run-time library assumes rule ## Remarks -The **`localtime`** function converts a time stored as a [`time_t`](../../c-runtime-library/standard-types.md) value and stores the result in a structure of type [`tm`](../../c-runtime-library/standard-types.md). The **`long`** value *`sourceTime`* represents the seconds elapsed since midnight (00:00:00), January 1, 1970, UTC. This value is usually obtained from the [`time`](time-time32-time64.md) function. +The **`localtime`** function converts a time stored as a [`time_t`](../standard-types.md) value and stores the result in a structure of type [`tm`](../standard-types.md). The **`long`** value *`sourceTime`* represents the seconds elapsed since midnight (00:00:00), January 1, 1970, UTC. This value is usually obtained from the [`time`](time-time32-time64.md) function. Both the 32-bit and 64-bit versions of [`gmtime`](gmtime-gmtime32-gmtime64.md), [`mktime`](mktime-mktime32-mktime64.md), [`mkgmtime`](mkgmtime-mkgmtime32-mkgmtime64.md), and **`localtime`** all use a single **`tm`** structure per thread for the conversion. Each call to one of these routines destroys the result of the previous call. @@ -68,7 +68,7 @@ Both the 32-bit and 64-bit versions of [`gmtime`](gmtime-gmtime32-gmtime64.md), > [!NOTE] > The target environment should try to determine whether daylight saving time is in effect. -These functions validate their parameters. If *`sourceTime`* is a null pointer, or if the *`sourceTime`* value is negative, these functions invoke an invalid parameter handler, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, the functions return **`NULL`** and set **`errno`** to **`EINVAL`**. +These functions validate their parameters. If *`sourceTime`* is a null pointer, or if the *`sourceTime`* value is negative, these functions invoke an invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, the functions return **`NULL`** and set **`errno`** to **`EINVAL`**. By default, this function's global state is scoped to the application. To change this behavior, see [Global state in the CRT](../global-state.md). @@ -78,7 +78,7 @@ By default, this function's global state is scoped to the application. To change |-------------|---------------------|-| |**`localtime`**, **`_localtime32`**, **`_localtime64`**|``|`` or ``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -125,11 +125,11 @@ Tue Feb 12 10:05:58 AM ## See also -[Time Management](../../c-runtime-library/time-management.md)
-[`asctime`, `_wasctime`](asctime-wasctime.md)
-[`ctime`, `_ctime32`, `_ctime64`, `_wctime`, `_wctime32`, `_wctime64`](ctime-ctime32-ctime64-wctime-wctime32-wctime64.md)
-[`_ftime`, `_ftime32`, `_ftime64`](ftime-ftime32-ftime64.md)
-[`gmtime`, `_gmtime32`, `_gmtime64`](gmtime-gmtime32-gmtime64.md)
-[`localtime_s`, `_localtime32_s`, `_localtime64_s`](localtime-s-localtime32-s-localtime64-s.md)
-[`time`, `_time32`, `_time64`](time-time32-time64.md)
-[`_tzset`](tzset.md)
+[Time management](../time-management.md)\ +[`asctime`, `_wasctime`](asctime-wasctime.md)\ +[`ctime`, `_ctime32`, `_ctime64`, `_wctime`, `_wctime32`, `_wctime64`](ctime-ctime32-ctime64-wctime-wctime32-wctime64.md)\ +[`_ftime`, `_ftime32`, `_ftime64`](ftime-ftime32-ftime64.md)\ +[`gmtime`, `_gmtime32`, `_gmtime64`](gmtime-gmtime32-gmtime64.md)\ +[`localtime_s`, `_localtime32_s`, `_localtime64_s`](localtime-s-localtime32-s-localtime64-s.md)\ +[`time`, `_time32`, `_time64`](time-time32-time64.md)\ +[`_tzset`](tzset.md) diff --git a/docs/c-runtime-library/reference/localtime-s-localtime32-s-localtime64-s.md b/docs/c-runtime-library/reference/localtime-s-localtime32-s-localtime64-s.md index 11d377dda84..136371f0d21 100644 --- a/docs/c-runtime-library/reference/localtime-s-localtime32-s-localtime64-s.md +++ b/docs/c-runtime-library/reference/localtime-s-localtime32-s-localtime64-s.md @@ -12,7 +12,7 @@ ms.assetid: 842d1dc7-d6f8-41d3-b340-108d4b90df54 --- # `localtime_s`, `_localtime32_s`, `_localtime64_s` -Converts a **`time_t`** time value to a **`tm`** structure, and corrects for the local time zone. These are versions of [`localtime`, `_localtime32`, `_localtime64`](localtime-localtime32-localtime64.md) with security enhancements as described in [Security Features in the CRT](../../c-runtime-library/security-features-in-the-crt.md). +Converts a **`time_t`** time value to a **`tm`** structure, and corrects for the local time zone. These are versions of [`localtime`, `_localtime32`, `_localtime64`](localtime-localtime32-localtime64.md) with security enhancements as described in [Security features in the CRT](../security-features-in-the-crt.md). ## Syntax @@ -33,17 +33,17 @@ errno_t _localtime64_s( ### Parameters -*`tmDest`*
+*`tmDest`*\ Pointer to the time structure to be filled in. -*`sourceTime`*
+*`sourceTime`*\ Pointer to the stored time. -## Return Value +## Return value -Zero if successful. The return value is an error code if there is a failure. Error codes are defined in *`Errno.h`*. For a listing of these errors, see [`errno`](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +Zero if successful. The return value is an error code if there is a failure. Error codes are defined in *`Errno.h`*. For a listing of these errors, see [`errno`](../errno-doserrno-sys-errlist-and-sys-nerr.md). -### Error Conditions +### Error conditions |*`tmDest`*|*`sourceTime`*|Return value|Value in *`tmDest`*|Invokes invalid parameter handler| |-----------|------------|------------------|--------------------|---------------------------------------| @@ -51,11 +51,11 @@ Zero if successful. The return value is an error code if there is a failure. Err |Not **`NULL`** (points to valid memory)|**`NULL`**|**`EINVAL`**|All fields set to -1|Yes| |Not **`NULL`** (points to valid memory)|less than 0 or greater than **`_MAX__TIME64_T`**|**`EINVAL`**|All fields set to -1|No| -In the case of the first two error conditions, the invalid parameter handler is invoked, 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 **`EINVAL`**. +In the case of the first two error conditions, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, these functions set **`errno`** to **`EINVAL`** and return **`EINVAL`**. ## Remarks -The **`localtime_s`** function converts a time stored as a [`time_t`](../../c-runtime-library/standard-types.md) value and stores the result in a structure of type [`tm`](../../c-runtime-library/standard-types.md). The **`time_t`** value *`sourceTime`* represents the seconds elapsed since midnight (00:00:00), January 1, 1970, UTC. This value is usually obtained from the [`time`](time-time32-time64.md) function. +The **`localtime_s`** function converts a time stored as a [`time_t`](../standard-types.md) value and stores the result in a structure of type [`tm`](../standard-types.md). The **`time_t`** value *`sourceTime`* represents the seconds elapsed since midnight (00:00:00), January 1, 1970, UTC. This value is usually obtained from the [`time`](time-time32-time64.md) function. **`localtime_s`** corrects for the local time zone if the user first sets the global environment variable **`TZ`**. When **`TZ`** is set, three other environment variables (**`_timezone`**, **`_daylight`**, and **`_tzname`**) are automatically set as well. If the **`TZ`** variable is not set, **`localtime_s`** attempts to use the time zone information specified in the Date/Time application in Control Panel. If this information cannot be obtained, PST8PDT, which signifies the Pacific time zone, is used by default. See [`_tzset`](tzset.md) for a description of these variables. **`TZ`** is a Microsoft extension and not part of the ANSI standard definition of **`localtime`**. @@ -66,7 +66,7 @@ The **`localtime_s`** function converts a time stored as a [`time_t`](../../c-ru **`localtime_s`** is an inline function which evaluates to **`_localtime64_s`**, and **`time_t`** is equivalent to **`__time64_t`**. If you need to force the compiler to interpret **`time_t`** as the old 32-bit **`time_t`**, you can define **`_USE_32BIT_TIME_T`**. Doing this will cause **`localtime_s`** to evaluate to **`_localtime32_s`**. This is not recommended because your application may fail after January 18, 2038, and it is not allowed on 64-bit platforms. -The fields of the structure type [`tm`](../../c-runtime-library/standard-types.md) store the following values, each of which is an **`int`**. +The fields of the structure type [`tm`](../standard-types.md) store the following values, each of which is an **`int`**. |Field|Description| |-|-| @@ -90,7 +90,7 @@ By default, this function's global state is scoped to the application. To change |-------------|---------------------|-| |**`localtime_s`**, **`_localtime32_s`**, **`_localtime64_s`**|``|`` or ``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -147,11 +147,11 @@ Fri Apr 25 01:19:27 PM ## See also -[Time Management](../../c-runtime-library/time-management.md)
-[`asctime_s`, `_wasctime_s`](asctime-s-wasctime-s.md)
-[`ctime`, `_ctime32`, `_ctime64`, `_wctime`, `_wctime32`, `_wctime64`](ctime-ctime32-ctime64-wctime-wctime32-wctime64.md)
-[`_ftime`, `_ftime32`, `_ftime64`](ftime-ftime32-ftime64.md)
-[`gmtime_s`, `_gmtime32_s`, `_gmtime64_s`](gmtime-s-gmtime32-s-gmtime64-s.md)
-[`localtime`, `_localtime32`, `_localtime64`](localtime-localtime32-localtime64.md)
-[`time`, `_time32`, `_time64`](time-time32-time64.md)
-[`_tzset`](tzset.md)
+[Time management](../time-management.md)\ +[`asctime_s`, `_wasctime_s`](asctime-s-wasctime-s.md)\ +[`ctime`, `_ctime32`, `_ctime64`, `_wctime`, `_wctime32`, `_wctime64`](ctime-ctime32-ctime64-wctime-wctime32-wctime64.md)\ +[`_ftime`, `_ftime32`, `_ftime64`](ftime-ftime32-ftime64.md)\ +[`gmtime_s`, `_gmtime32_s`, `_gmtime64_s`](gmtime-s-gmtime32-s-gmtime64-s.md)\ +[`localtime`, `_localtime32`, `_localtime64`](localtime-localtime32-localtime64.md)\ +[`time`, `_time32`, `_time64`](time-time32-time64.md)\ +[`_tzset`](tzset.md) diff --git a/docs/c-runtime-library/reference/lock-file.md b/docs/c-runtime-library/reference/lock-file.md index 02b7bd76c27..846f5ae0601 100644 --- a/docs/c-runtime-library/reference/lock-file.md +++ b/docs/c-runtime-library/reference/lock-file.md @@ -22,12 +22,12 @@ void _lock_file( FILE* file ); ### Parameters -*file*
+*`file`*\ File handle. ## Remarks -The **_lock_file** function locks the **FILE** object specified by *file*. The underlying file is not locked by **_lock_file**. Use [_unlock_file](unlock-file.md) to release the lock on the file. Calls to **_lock_file** and **_unlock_file** must be matched in a thread. +The **_lock_file** function locks the **FILE** object specified by *`file`*. The underlying file is not locked by **_lock_file**. Use [`_unlock_file`](unlock-file.md) to release the lock on the file. Calls to **_lock_file** and **_unlock_file** must be matched in a thread. 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). @@ -37,7 +37,7 @@ By default, this function's global state is scoped to the application. To change |-------------|---------------------| |**_lock_file**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -116,7 +116,7 @@ eFciornsdt ## See also -[File Handling](../../c-runtime-library/file-handling.md)
-[_creat, _wcreat](creat-wcreat.md)
-[_open, _wopen](open-wopen.md)
-[_unlock_file](unlock-file.md)
+[File handling](../file-handling.md)\ +[`_creat`, `_wcreat`](creat-wcreat.md)\ +[`_open`, `_wopen`](open-wopen.md)\ +[`_unlock_file`](unlock-file.md) diff --git a/docs/c-runtime-library/reference/locking.md b/docs/c-runtime-library/reference/locking.md index 0238326fc1f..d42d47985e6 100644 --- a/docs/c-runtime-library/reference/locking.md +++ b/docs/c-runtime-library/reference/locking.md @@ -26,18 +26,18 @@ int _locking( ### Parameters -*fd*
+*`fd`*\ File descriptor. -*mode*
+*`mode`*\ Locking action to perform. -*nbytes*
+*`nbytes`*\ Number of bytes to lock. -## Return Value +## Return value -**_locking** returns 0 if successful. A return value of -1 indicates failure, in which case [errno](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md) is set to one of the following values. +**_locking** returns 0 if successful. A return value of -1 indicates failure, in which case [`errno`](../errno-doserrno-sys-errlist-and-sys-nerr.md) is set to one of the following values. |errno value|Condition| |-|-| @@ -46,15 +46,15 @@ Number of bytes to lock. | **EDEADLOCK** | Locking violation. Returned when the **_LK_LOCK** or **_LK_RLCK** flag is specified and the file cannot be locked after 10 attempts. | | **EINVAL** | An invalid argument was given to **_locking**. | -If the failure is due to a bad parameter, such as an invalid file descriptor, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). +If the failure is due to a bad parameter, such as an invalid file descriptor, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). ## Remarks -The **_locking** function locks or unlocks *nbytes* bytes of the file specified by *fd*. Locking bytes in a file prevents access to those bytes by other processes. All locking or unlocking begins at the current position of the file pointer and proceeds for the next *nbytes* bytes. It is possible to lock bytes past end of file. +The **_locking** function locks or unlocks *`nbytes`* bytes of the file specified by *`fd`*. Locking bytes in a file prevents access to those bytes by other processes. All locking or unlocking begins at the current position of the file pointer and proceeds for the next *`nbytes`* bytes. It is possible to lock bytes past end of file. -*mode* must be one of the following manifest constants, which are defined in Locking.h. +*`mode`* must be one of the following manifest constants, which are defined in Locking.h. -|*mode* value|Effect| +|*`mode`* value|Effect| |-|-| | **_LK_LOCK** | Locks the specified bytes. If the bytes cannot be locked, the program immediately tries again after 1 second. If, after 10 attempts, the bytes cannot be locked, the constant returns an error. | | **_LK_NBLCK** | Locks the specified bytes. If the bytes cannot be locked, the constant returns an error. | @@ -72,11 +72,11 @@ By default, this function's global state is scoped to the application. To change |-------------|---------------------|---------------------| |**_locking**|\ and \|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Libraries -All versions of the [C run-time libraries](../../c-runtime-library/crt-library-features.md). +All versions of the [C run-time libraries](../crt-library-features.md). ## Example @@ -135,7 +135,7 @@ int main( void ) The first thirty bytes of this file will be locked. ``` -## Sample Output +## Sample output ```Output No one can change these bytes while I'm reading them @@ -145,6 +145,6 @@ Now I'm done. Do what you will with them ## See also -[File Handling](../../c-runtime-library/file-handling.md)
-[_creat, _wcreat](creat-wcreat.md)
-[_open, _wopen](open-wopen.md)
+[File handling](../file-handling.md)\ +[`_creat`, `_wcreat`](creat-wcreat.md)\ +[`_open`, `_wopen`](open-wopen.md) diff --git a/docs/c-runtime-library/reference/log-logf-log10-log10f.md b/docs/c-runtime-library/reference/log-logf-log10-log10f.md index 935129c0378..e4a394682a2 100644 --- a/docs/c-runtime-library/reference/log-logf-log10-log10f.md +++ b/docs/c-runtime-library/reference/log-logf-log10-log10f.md @@ -36,7 +36,7 @@ long double log10(long double x); // C++ only *`x`*\ Value whose logarithm is to be found. -## Return Value +## Return value The **`log`** functions return the natural logarithm (base *`e`*) of *`x`* if successful. The **`log10`** functions return the base-10 logarithm. If *`x`* is negative, these functions return an indefinite (`IND`), by default. If *`x`* is 0, they return infinity (`INF`). @@ -52,7 +52,7 @@ The **`log`** functions return the natural logarithm (base *`e`*) of *`x`* if su C++ allows overloading, so you can call overloads of **`log`** and **`log10`** that take and return **`float`** or **`long double`** values. In a C program, unless you're using the `` macro to call this function, **`log`** and **`log10`** always take and return a **`double`**. -If you use the ` log()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../../c-runtime-library/tgmath.md) for details. +If you use the ` log()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../tgmath.md) for details. 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). @@ -63,7 +63,7 @@ By default, this function's global state is scoped to the application. To change |**`log`**, **`logf`**, **`logl`**, **`log10`**, **`log10f`**, **`log10l`**|``| |**`log`** macro | `` | -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -122,9 +122,9 @@ Log base 2 of 65536.000000 is 16.000000 ## See also -[Floating-Point Support](../../c-runtime-library/floating-point-support.md) \ +[Math and floating-point support](../floating-point-support.md) \ [`exp`, `expf`, `expl`](exp-expf.md) \ [`_matherr`](matherr.md) \ [`pow`, `powf`, `powl`](pow-powf-powl.md) \ -[`_CIlog`](../../c-runtime-library/cilog.md) \ -[`_CIlog10`](../../c-runtime-library/cilog10.md)\ +[`_CIlog`](../cilog.md) \ +[`_CIlog10`](../cilog10.md)\ diff --git a/docs/c-runtime-library/reference/log1p-log1pf-log1pl2.md b/docs/c-runtime-library/reference/log1p-log1pf-log1pl2.md index abb6cdda982..20be40f6e80 100644 --- a/docs/c-runtime-library/reference/log1p-log1pf-log1pl2.md +++ b/docs/c-runtime-library/reference/log1p-log1pf-log1pl2.md @@ -40,12 +40,12 @@ long double log1p( ### Parameters -*x*\ +*`x`*\ The floating-point argument. -## Return Value +## Return value -If successful, returns the natural (base-*e*) log of (*x* + 1). +If successful, returns the natural (base-*e*) log of (*`x`* + 1). Otherwise, may return one of the following values: @@ -60,17 +60,17 @@ Otherwise, may return one of the following values: |±SNaN|Same as input|INVALID|| |±QNaN, indefinite|Same as input||| -The **errno** value is set to ERANGE if *x* = -1. The **errno** value is set to **EDOM** if *x* < -1. +The **errno** value is set to ERANGE if *`x`* = -1. The **errno** value is set to **EDOM** if *`x`* < -1. ## Remarks -The **log1p** functions may be more accurate than using `log(x + 1)` when *x* is near 0. +The **log1p** functions may be more accurate than using `log(x + 1)` when *`x`* is near 0. Because C++ allows overloading, you can call overloads of **log1p** that take and return **`float`** and **`long double`** types. In a C program, unless you're using the \ macro to call this function, **log1p** always takes and returns a **`double`**. -If you use the \ `log1p()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../../c-runtime-library/tgmath.md) for details. +If you use the \ `log1p()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../tgmath.md) for details. -If *x* is a natural number, this function returns the logarithm of the factorial of (*x* - 1). +If *`x`* is a natural number, this function returns the logarithm of the factorial of (*`x`* - 1). By default, this function's global state is scoped to the application. To change this behavior, see [Global state in the CRT](../global-state.md). @@ -81,10 +81,10 @@ By default, this function's global state is scoped to the application. To change |**log1p**, **log1pf**, **log1pl**|\|\| |**log1p** macro | \ || -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Alphabetical Function Reference](crt-alphabetical-function-reference.md)\ -[log2, log2f, log2l](log2-log2f-log2l.md)\ -[log, logf, log10, log10f](log-logf-log10-log10f.md) +[Alphabetical function reference](crt-alphabetical-function-reference.md)\ +[`log2`, `log2f`, `log2l`](log2-log2f-log2l.md)\ +[`log`, `logf`, `log10`, `log10f`](log-logf-log10-log10f.md) diff --git a/docs/c-runtime-library/reference/log2-log2f-log2l.md b/docs/c-runtime-library/reference/log2-log2f-log2l.md index ebbbadbc76d..83941710e9b 100644 --- a/docs/c-runtime-library/reference/log2-log2f-log2l.md +++ b/docs/c-runtime-library/reference/log2-log2f-log2l.md @@ -40,30 +40,30 @@ long double log2l( ### Parameters -*x*\ +*`x`*\ The value to determine the base-2 logarithm of. -## Return Value +## Return value -On success, returns return log2 *x*. +On success, returns return log2 *`x`*. Otherwise, may return one of the following values: |Issue|Return| |-----------|------------| -|*x* < 0|NaN| -|*x* = ±0|-INFINITY| -|*x* = 1|+0| +|*`x`* < 0|NaN| +|*`x`* = ±0|-INFINITY| +|*`x`* = 1|+0| |+INFINITY|+INFINITY| |NaN|NaN| |domain error|NaN| |pole error|-HUGE_VAL, -HUGE_VALF, or -HUGE_VALL| -Errors are reported as specified in [_matherr](matherr.md). +Errors are reported as specified in [`_matherr`](matherr.md). ## Remarks -If *x* is an integer, this function essentially returns the zero-based index of the most significant 1 bit of *x*. +If *`x`* is an integer, this function essentially returns the zero-based index of the most significant 1 bit of *`x`*. 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). @@ -74,10 +74,10 @@ By default, this function's global state is scoped to the application. To change |**log2**, **log2f**, **log2l**|\|\| |**log2** macro | \ || -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Alphabetical Function Reference](crt-alphabetical-function-reference.md)
-[exp2, exp2f, exp2l](exp2-exp2f-exp2l.md)
-[log, logf, log10, log10f](log-logf-log10-log10f.md)
+[Alphabetical function reference](crt-alphabetical-function-reference.md)\ +[`exp2`, `exp2f`, `exp2l`](exp2-exp2f-exp2l.md)\ +[`log`, `logf`, `log10`, `log10f`](log-logf-log10-log10f.md) diff --git a/docs/c-runtime-library/reference/logb-logbf-logbl-logb-logbf.md b/docs/c-runtime-library/reference/logb-logbf-logbl-logb-logbf.md index f544b5ce567..daf2f6ace1f 100644 --- a/docs/c-runtime-library/reference/logb-logbf-logbl-logb-logbf.md +++ b/docs/c-runtime-library/reference/logb-logbf-logbl-logb-logbf.md @@ -45,7 +45,7 @@ float _logbf( *`x`*\ A floating-point value. -## Return Value +## Return value **`logb`** returns the unbiased exponent value of *`x`* as a signed integer represented as a floating-point value. @@ -55,7 +55,7 @@ The **`logb`** functions extract the exponential value of the floating-point arg Because C++ allows overloading, you can call overloads of **`logb`** that take and return **`float`** or **`long double`** values. In a C program, unless you're using the `` macro to call this function, **`logb`** always takes and returns a **`double`**. -If you use the `` `logb()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../../c-runtime-library/tgmath.md) for details. +If you use the `` `logb()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../tgmath.md) for details. |Input|SEH exception|`Matherr` exception| |-----------|-------------------|-----------------------| @@ -72,13 +72,13 @@ By default, this function's global state is scoped to the application. To change |**`logb`**, **`logbf`**, **`logbl`**, **`_logbf`**|``| |**`logb`** macro | `` | -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Libraries -All versions of the [C run-time libraries](../../c-runtime-library/crt-library-features.md). +All versions of the [C run-time libraries](../crt-library-features.md). ## See also -[Floating-Point Support](../../c-runtime-library/floating-point-support.md)\ +[Math and floating-point support](../floating-point-support.md)\ [`frexp`](frexp.md) diff --git a/docs/c-runtime-library/reference/longjmp.md b/docs/c-runtime-library/reference/longjmp.md index ab785051524..e6baef94bc8 100644 --- a/docs/c-runtime-library/reference/longjmp.md +++ b/docs/c-runtime-library/reference/longjmp.md @@ -25,17 +25,17 @@ void longjmp( ### Parameters -*env*
+*`env`*\ Variable in which environment is stored. -*value*
+*`value`*\ Value to be returned to `setjmp` call. ## Remarks -The **longjmp** function restores a stack environment and execution locale previously saved in *env* by `setjmp`. `setjmp` and **longjmp** provide a way to execute a nonlocal **`goto`**; they are typically used to pass execution control to error-handling or recovery code in a previously called routine without using the normal call and return conventions. +The **longjmp** function restores a stack environment and execution locale previously saved in *`env`* by `setjmp`. `setjmp` and **longjmp** provide a way to execute a nonlocal **`goto`**; they are typically used to pass execution control to error-handling or recovery code in a previously called routine without using the normal call and return conventions. -A call to `setjmp` causes the current stack environment to be saved in *env*. A subsequent call to **longjmp** restores the saved environment and returns control to the point immediately following the corresponding `setjmp` call. Execution resumes as if *value* had just been returned by the `setjmp` call. The values of all variables (except register variables) that are accessible to the routine receiving control contain the values they had when **longjmp** was called. The values of register variables are unpredictable. The value returned by `setjmp` must be nonzero. If *value* is passed as 0, the value 1 is substituted in the actual return. +A call to `setjmp` causes the current stack environment to be saved in *`env`*. A subsequent call to **longjmp** restores the saved environment and returns control to the point immediately following the corresponding `setjmp` call. Execution resumes as if *`value`* had just been returned by the `setjmp` call. The values of all variables (except register variables) that are accessible to the routine receiving control contain the values they had when **longjmp** was called. The values of register variables are unpredictable. The value returned by `setjmp` must be nonzero. If *`value`* is passed as 0, the value 1 is substituted in the actual return. **Microsoft Specific** @@ -47,7 +47,7 @@ Observe the following restrictions when using **longjmp**: - Do not assume that the values of the register variables will remain the same. The values of register variables in the routine calling `setjmp` may not be restored to the proper values after **longjmp** is executed. -- Do not use **longjmp** to transfer control out of an interrupt-handling routine unless the interrupt is caused by a floating-point exception. In this case, a program may return from an interrupt handler via **longjmp** if it first reinitializes the floating-point math package by calling [_fpreset](fpreset.md). +- Do not use **longjmp** to transfer control out of an interrupt-handling routine unless the interrupt is caused by a floating-point exception. In this case, a program may return from an interrupt handler via **longjmp** if it first reinitializes the floating-point math package by calling [`_fpreset`](fpreset.md). - Do not use **longjmp** to transfer control from a callback routine invoked directly or indirectly by Windows code. @@ -67,13 +67,13 @@ For more information, see [Using setjmp and longjmp](../../cpp/using-setjmp-long |-------------|---------------------| |**longjmp**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example -See the example for [_fpreset](fpreset.md). +See the example for [`_fpreset`](fpreset.md). ## See also -[Process and Environment Control](../../c-runtime-library/process-and-environment-control.md)
-[setjmp](setjmp.md) +[Process and environment control](../process-and-environment-control.md) +[`setjmp`](setjmp.md) diff --git a/docs/c-runtime-library/reference/lrint-lrintf-lrintl-llrint-llrintf-llrintl.md b/docs/c-runtime-library/reference/lrint-lrintf-lrintl-llrint-llrintf-llrintl.md index f894f1aeb5c..bc14ddfa84a 100644 --- a/docs/c-runtime-library/reference/lrint-lrintf-lrintl-llrint-llrintf-llrintl.md +++ b/docs/c-runtime-library/reference/lrint-lrintf-lrintl-llrint-llrintf-llrintl.md @@ -62,24 +62,24 @@ long long int llrintl( ### Parameters -*x*\ +*`x`*\ The value to round. -## Return Value +## Return value -If successful, returns the rounded integral value of *x*. +If successful, returns the rounded integral value of *`x`*. |Issue|Return| |-----------|------------| -|*x* is outside the range of the return type

*x* = ±∞

*x* = NaN|Raises **FE_INVALID** and returns zero (0).| +|*`x`* is outside the range of the return type

*`x`* = ±∞

*`x`* = NaN|Raises **FE_INVALID** and returns zero (0).| ## Remarks Because C++ allows overloading, you can call overloads of **lrint** and **llrint** that take **`float`** and **`long double`** types. In a C program, unless you're using the \ macro to call this function, **lrint** and **llrint** always take a **`double`**. -If you use the \ `llrint()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../../c-runtime-library/tgmath.md) for details. +If you use the \ `llrint()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../tgmath.md) for details. -If *x* does not represent the floating-point equivalent of an integral value, these functions raise **FE_INEXACT**. +If *`x`* does not represent the floating-point equivalent of an integral value, these functions raise **FE_INEXACT**. **Microsoft-specific**: When the result is outside the range of the return type, or when the parameter is a NaN or infinity, the return value is implementation defined. The Microsoft compiler returns a zero (0) value. @@ -92,8 +92,8 @@ By default, this function's global state is scoped to the application. To change |**lrint**, **lrintf**, **lrintl**, **llrint**, **llrintf**, **llrintl**|\|\| |**lrint** macro | \ || -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Alphabetical Function Reference](crt-alphabetical-function-reference.md) +[Alphabetical function reference](crt-alphabetical-function-reference.md) diff --git a/docs/c-runtime-library/reference/lrotl-lrotr.md b/docs/c-runtime-library/reference/lrotl-lrotr.md index 5ecdeb9ab12..3e79cb50da4 100644 --- a/docs/c-runtime-library/reference/lrotl-lrotr.md +++ b/docs/c-runtime-library/reference/lrotl-lrotr.md @@ -23,19 +23,19 @@ unsigned long _lrotr( unsigned long value, int shift ); ### Parameters -*value*
+*`value`*\ Value to be rotated. -*shift*
-Number of bits to shift *value*. +*`shift`*\ +Number of bits to shift *`value`*. -## Return Value +## Return value Both functions return the rotated value. There's no error return. ## Remarks -The **_lrotl** and **_lrotr** functions rotate *value* by *shift* bits. **_lrotl** rotates the value left, toward more significant bits. **_lrotr** rotates the value right, toward less significant bits. Both functions wrap bits rotated off one end of *value* to the other end. +The **_lrotl** and **_lrotr** functions rotate *`value`* by *`shift`* bits. **_lrotl** rotates the value left, toward more significant bits. **_lrotr** rotates the value right, toward less significant bits. Both functions wrap bits rotated off one end of *`value`* to the other end. ## Requirements @@ -43,7 +43,7 @@ The **_lrotl** and **_lrotr** functions rotate *value* by *shift* bits. **_lrotl |-------------|---------------------| |**_lrotl**, **_lrotr**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -71,5 +71,5 @@ int main( void ) ## See also -[Floating-Point Support](../../c-runtime-library/floating-point-support.md)
-[_rotl, _rotl64, _rotr, _rotr64](rotl-rotl64-rotr-rotr64.md)
+[Math and floating-point support](../floating-point-support.md)\ +[`_rotl`, `_rotl64`, `_rotr`, `_rotr64`](rotl-rotl64-rotr-rotr64.md) diff --git a/docs/c-runtime-library/reference/lround-lroundf-lroundl-llround-llroundf-llroundl.md b/docs/c-runtime-library/reference/lround-lroundf-lroundl-llround-llroundf-llroundl.md index 9091e78ee3d..7c9bfdd1a75 100644 --- a/docs/c-runtime-library/reference/lround-lroundf-lroundl-llround-llroundf-llroundl.md +++ b/docs/c-runtime-library/reference/lround-lroundf-lroundl-llround-llroundf-llroundl.md @@ -52,12 +52,12 @@ long long llroundl( ### Parameters -*x*\ +*`x`*\ The floating-point value to round. -## Return Value +## Return value -The **lround** and **llround** functions return the nearest **`long`** or **`long long`** integer to *x*. Halfway values are rounded away from zero, regardless of the setting of the floating-point rounding mode. There's no error return. +The **lround** and **llround** functions return the nearest **`long`** or **`long long`** integer to *`x`*. Halfway values are rounded away from zero, regardless of the setting of the floating-point rounding mode. There's no error return. |Input|SEH Exception|Matherr Exception| |-----------|-------------------|-----------------------| @@ -67,7 +67,7 @@ The **lround** and **llround** functions return the nearest **`long`** or **`lon Because C++ allows overloading, you can call overloads of **lround** or **llround** that take and return **`float`** and **`long double`** values. In a C program, unless you're using the \ macro to call this function, **lround** and **llround** always take and return a **`double`**. -If you use the \ `lround()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../../c-runtime-library/tgmath.md) for details. +If you use the \ `lround()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../tgmath.md) for details. By default, this function's global state is scoped to the application. To change this behavior, see [Global state in the CRT](../global-state.md). @@ -78,7 +78,7 @@ By default, this function's global state is scoped to the application. To change |**lround**, **lroundf**, **lroundl**, **llround**, **llroundf**, **llroundl**|\| |**lround** macro | \ | -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -118,11 +118,11 @@ lroundl(-3.500000) is -4 ## See also -[Floating-Point Support](../../c-runtime-library/floating-point-support.md)
-[ceil, ceilf, ceill](ceil-ceilf-ceill.md)
-[floor, floorf, floorl](floor-floorf-floorl.md)
-[fmod, fmodf](fmod-fmodf.md)
-[lrint, lrintf, lrintl, llrint, llrintf, llrintl](lrint-lrintf-lrintl-llrint-llrintf-llrintl.md)
-[round, roundf, roundl](round-roundf-roundl.md)
-[nearbyint, nearbyintf, nearbyintl](nearbyint-nearbyintf-nearbyintl1.md)
-[rint, rintf, rintl](rint-rintf-rintl.md)
+[Math and floating-point support](../floating-point-support.md)\ +[`ceil`, `ceilf`, `ceill`](ceil-ceilf-ceill.md)\ +[`floor`, `floorf`, `floorl`](floor-floorf-floorl.md)\ +[`fmod`, `fmodf`](fmod-fmodf.md)\ +[`lrint`, `lrintf`, `lrintl`, `llrint`, `llrintf`, `llrintl`](lrint-lrintf-lrintl-llrint-llrintf-llrintl.md)\ +[`round`, `roundf`, `roundl`](round-roundf-roundl.md)\ +[`nearbyint`, `nearbyintf`, `nearbyintl`](nearbyint-nearbyintf-nearbyintl1.md)\ +[`rint`, `rintf`, `rintl`](rint-rintf-rintl.md) diff --git a/docs/c-runtime-library/reference/lsearch-s.md b/docs/c-runtime-library/reference/lsearch-s.md index e7f9745ac3d..cb3c5994dce 100644 --- a/docs/c-runtime-library/reference/lsearch-s.md +++ b/docs/c-runtime-library/reference/lsearch-s.md @@ -12,7 +12,7 @@ ms.assetid: d2db0635-be7a-4799-8660-255f14450882 --- # _lsearch_s -Performs a linear search for a value. A version of [_lsearch](lsearch.md) with security enhancements as described in [Security Features in the CRT](../../c-runtime-library/security-features-in-the-crt.md). +Performs a linear search for a value. A version of [`_lsearch`](lsearch.md) with security enhancements as described in [Security features in the CRT](../security-features-in-the-crt.md). ## Syntax @@ -29,33 +29,33 @@ void *_lsearch_s( ### Parameters -*key*
+*`key`*\ Object to search for. -*base*
+*`base`*\ Pointer to the base of array to be searched. -*number*
+*`number`*\ Number of elements. -*size*
+*`size`*\ Size of each array element in bytes. -*compare*
+*`compare`*\ Pointer to the comparison routine. The second parameter is a pointer to the key for search. The third parameter is a pointer to an array element to be compared with the key. -*context*
+*`context`*\ A pointer to an object that might be accessed in the comparison function. -## Return Value +## Return value -If *key* is found, **_lsearch_s** returns a pointer to the element of the array at *base* that matches *key*. If *key* is not found, **_lsearch_s** returns a pointer to the newly added item at the end of the array. +If *`key`* is found, **_lsearch_s** returns a pointer to the element of the array at *`base`* that matches *`key`*. If *`key`* is not found, **_lsearch_s** returns a pointer to the newly added item at the end of the array. -If invalid parameters are passed to the function, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, then **errno** is set to **EINVAL** and the function returns **NULL**. For more information, see [errno, _doserrno, _sys_errlist, and _sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +If invalid parameters are passed to the function, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, then **errno** is set to **EINVAL** and the function returns **NULL**. For more information, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). -### Error Conditions +### Error conditions -|*key*|*base*|*compare*|*number*|*size*|**errno**| +|*`key`*|*`base`*|*`compare`*|*`number`*|*`size`*|`errno`| |-----------|------------|---------------|-----------|------------|-------------| |**NULL**|any|any|any|any|**EINVAL**| |any|**NULL**|any|!= 0|any|**EINVAL**| @@ -64,11 +64,11 @@ If invalid parameters are passed to the function, the invalid parameter handler ## Remarks -The **_lsearch_s** function performs a linear search for the value *key* in an array of *number* elements, each of *width* bytes. Unlike **bsearch_s**, **_lsearch_s** does not require the array to be sorted. If *key* is not found, then **_lsearch_s** adds it to the end of the array and increments *number*. +The **_lsearch_s** function performs a linear search for the value *`key`* in an array of *`number`* elements, each of *`size`* bytes. Unlike **bsearch_s**, **_lsearch_s** does not require the array to be sorted. If *`key`* is not found, then **_lsearch_s** adds it to the end of the array and increments *`number`*. -The *compare* function is a pointer to a user-supplied routine that compares two array elements and returns a value specifying their relationship. The *compare* function also takes the pointer to the context as the first argument. **_lsearch_s** calls *compare* one or more times during the search, passing pointers to two array elements on each call. *compare* must compare the elements and then return either nonzero (meaning the elements are different) or 0 (meaning the elements are identical). +The *`compare`* function is a pointer to a user-supplied routine that compares two array elements and returns a value specifying their relationship. The *`compare`* function also takes the pointer to the context as the first argument. **_lsearch_s** calls *`compare`* one or more times during the search, passing pointers to two array elements on each call. *`compare`* must compare the elements and then return either nonzero (meaning the elements are different) or 0 (meaning the elements are identical). -The *context* pointer can be useful if the searched data structure is part of an object and the *compare* function needs to access members of the object. For example, code in the *compare* function can cast the void pointer into the appropriate object type and access members of that object. The addition of the *context* pointer makes **_lsearch_s** more secure because additional context can be used to avoid reentrancy bugs associated with using static variables to make data available to the *compare* function. +The *`context`* pointer can be useful if the searched data structure is part of an object and the *`compare`* function needs to access members of the object. For example, code in the *`compare`* function can cast the void pointer into the appropriate object type and access members of that object. The addition of the *`context`* pointer makes **_lsearch_s** more secure because additional context can be used to avoid reentrancy bugs associated with using static variables to make data available to the *`compare`* function. By default, this function's global state is scoped to the application. To change this behavior, see [Global state in the CRT](../global-state.md). @@ -78,11 +78,11 @@ By default, this function's global state is scoped to the application. To change |-------------|---------------------| |**_lsearch_s**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Searching and Sorting](../../c-runtime-library/searching-and-sorting.md)
-[bsearch_s](bsearch-s.md)
-[_lfind_s](lfind-s.md)
-[_lsearch](lsearch.md)
+[Searching and sorting](../searching-and-sorting.md)\ +[`bsearch_s`](bsearch-s.md)\ +[`_lfind_s`](lfind-s.md)\ +[`_lsearch`](lsearch.md) diff --git a/docs/c-runtime-library/reference/lsearch.md b/docs/c-runtime-library/reference/lsearch.md index b91b53ca221..8d867dc4f35 100644 --- a/docs/c-runtime-library/reference/lsearch.md +++ b/docs/c-runtime-library/reference/lsearch.md @@ -12,7 +12,7 @@ ms.assetid: 8200f608-159a-46f0-923b-1a37ee1af7e0 --- # _lsearch -Performs a linear search for a value; adds to end of list if not found. A more secure version of this function is available; see [_lsearch_s](lsearch-s.md). +Performs a linear search for a value; adds to end of list if not found. A more secure version of this function is available; see [`_lsearch_s`](lsearch-s.md). ## Syntax @@ -28,32 +28,32 @@ void *_lsearch( ### Parameters -*key*
+*`key`*\ Object to search for. -*base*
+*`base`*\ Pointer to the base of array to be searched. -*number*
+*`number`*\ Number of elements. -*width*
+*`width`*\ Width of each array element. -*compare*
+*`compare`*\ Pointer to the comparison routine. The first parameter is a pointer to the key for search. The second parameter is a pointer to an array element to be compared with the key. -## Return Value +## Return value -If the key is found, **_lsearch** returns a pointer to the element of the array at *base* that matches *key*. If the key is not found, **_lsearch** returns a pointer to the newly added item at the end of the array. +If the key is found, **_lsearch** returns a pointer to the element of the array at *`base`* that matches *`key`*. If the key is not found, **_lsearch** returns a pointer to the newly added item at the end of the array. ## Remarks -The **_lsearch** function performs a linear search for the value *key* in an array of *number* elements, each of *width* bytes. Unlike **bsearch**, **_lsearch** does not require the array to be sorted. If *key* is not found, **_lsearch** adds it to the end of the array and increments *number*. +The **_lsearch** function performs a linear search for the value *`key`* in an array of *`number`* elements, each of *`width`* bytes. Unlike **bsearch**, **_lsearch** does not require the array to be sorted. If *`key`* is not found, **_lsearch** adds it to the end of the array and increments *`number`*. -The *compare* argument is a pointer to a user-supplied routine that compares two array elements and returns a value specifying their relationship. **_lsearch** calls the *compare* routine one or more times during the search, passing pointers to two array elements on each call. *compare* must compare the elements and return either nonzero (meaning the elements are different) or 0 (meaning the elements are identical). +The *`compare`* argument is a pointer to a user-supplied routine that compares two array elements and returns a value specifying their relationship. **_lsearch** calls the *`compare`* routine one or more times during the search, passing pointers to two array elements on each call. *`compare`* must compare the elements and return either nonzero (meaning the elements are different) or 0 (meaning the elements are identical). -This function validates its parameters. If *compare*, *key* or *number* is **NULL**, or if *base* is **NULL** and *number* is nonzero, or if *width* is less than zero, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, **errno** is set to **EINVAL** and the function returns **NULL**. +This function validates its parameters. If *`compare`*, *`key`* or *`number`* is **NULL**, or if *`base`* is **NULL** and *`number`* is nonzero, or if *`width`* is less than zero, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, **errno** is set to **EINVAL** and the function returns **NULL**. 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). @@ -63,7 +63,7 @@ By default, this function's global state is scoped to the application. To change |-------------|---------------------| |**_lsearch**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -109,7 +109,7 @@ wordlist after _lsearch: hello thanks bye extra ## See also -[Searching and Sorting](../../c-runtime-library/searching-and-sorting.md)
-[bsearch](bsearch.md)
-[_lfind](lfind.md)
-[_lsearch_s](lsearch-s.md)
+[Searching and sorting](../searching-and-sorting.md)\ +[`bsearch`](bsearch.md)\ +[`_lfind`](lfind.md)\ +[`_lsearch_s`](lsearch-s.md) diff --git a/docs/c-runtime-library/reference/lseek-lseeki64.md b/docs/c-runtime-library/reference/lseek-lseeki64.md index 3dcf6c64332..f306f8c59d8 100644 --- a/docs/c-runtime-library/reference/lseek-lseeki64.md +++ b/docs/c-runtime-library/reference/lseek-lseeki64.md @@ -31,26 +31,26 @@ __int64 _lseeki64( ### Parameters -*fd*
+*`fd`*\ File descriptor referring to an open file. -*offset*
-Number of bytes from *origin*. +*`offset`*\ +Number of bytes from *`origin`*. -*origin*
+*`origin`*\ Initial position. -## Return Value +## Return value -**_lseek** returns the offset, in bytes, of the new position from the beginning of the file. **_lseeki64** returns the offset in a 64-bit integer. The function returns -1L to indicate an error. If passed an invalid parameter, such as a bad file descriptor, or the value for *origin* is invalid or the position specified by *offset* is before the beginning of the file, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, these functions set **errno** to **EBADF** and return -1L. On devices incapable of seeking (such as terminals and printers), the return value is undefined. +**_lseek** returns the offset, in bytes, of the new position from the beginning of the file. **_lseeki64** returns the offset in a 64-bit integer. The function returns -1L to indicate an error. If passed an invalid parameter, such as a bad file descriptor, or the value for *`origin`* is invalid or the position specified by *`offset`* is before the beginning of the file, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, these functions set **errno** to **EBADF** and return -1L. On devices incapable of seeking (such as terminals and printers), the return value is undefined. -For more information about these and other error codes, see [_doserrno, errno, _sys_errlist, and _sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +For more information about these and other error codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks -The **_lseek** function moves the file pointer associated with *fd* to a new location that is *offset* bytes from *origin*. The next operation on the file occurs at the new location. The *origin* argument must be one of the following constants, which are defined in Stdio.h. +The **_lseek** function moves the file pointer associated with *`fd`* to a new location that is *`offset`* bytes from *`origin`*. The next operation on the file occurs at the new location. The *`origin`* argument must be one of the following constants, which are defined in Stdio.h. -|*origin* value| Description | +|*`origin`* value| Description | |-|-| | **SEEK_SET** | Beginning of the file. | | **SEEK_CUR** | Current position of the file pointer. | @@ -67,11 +67,11 @@ By default, this function's global state is scoped to the application. To change |**_lseek**|\| |**_lseeki64**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Libraries -All versions of the [C run-time libraries](../../c-runtime-library/crt-library-features.md). +All versions of the [C run-time libraries](../crt-library-features.md). ## Example @@ -145,6 +145,6 @@ Position for end of file seek = 57 ## See also -[Low-Level I/O](../../c-runtime-library/low-level-i-o.md)
-[fseek, _fseeki64](fseek-fseeki64.md)
-[_tell, _telli64](tell-telli64.md)
+[Low-level I/O](../low-level-i-o.md)\ +[`fseek`, `_fseeki64`](fseek-fseeki64.md)\ +[`_tell`, `_telli64`](tell-telli64.md) diff --git a/docs/c-runtime-library/reference/lseek.md b/docs/c-runtime-library/reference/lseek.md index 9054789dda0..42922637e4f 100644 --- a/docs/c-runtime-library/reference/lseek.md +++ b/docs/c-runtime-library/reference/lseek.md @@ -12,6 +12,6 @@ ms.assetid: 137d7741-5c2e-443e-811a-6a01417fcae7 --- # lseek -The Microsoft-implemented POSIX function name `lseek` is a deprecated alias for the [_lseek](lseek-lseeki64.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. +The Microsoft-implemented POSIX function name `lseek` is a deprecated alias for the [`_lseek`](lseek-lseeki64.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. -We recommend you use [_lseek](lseek-lseeki64.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). +We recommend you use [`_lseek`](lseek-lseeki64.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). diff --git a/docs/c-runtime-library/reference/makepath-s-wmakepath-s.md b/docs/c-runtime-library/reference/makepath-s-wmakepath-s.md index 694ea543b71..da9d0990a67 100644 --- a/docs/c-runtime-library/reference/makepath-s-wmakepath-s.md +++ b/docs/c-runtime-library/reference/makepath-s-wmakepath-s.md @@ -12,7 +12,7 @@ ms.assetid: 4405e43c-3d63-4697-bb80-9b8dcd21d027 --- # _makepath_s, _wmakepath_s -Creates a path name from components. These are versions of [_makepath, _wmakepath](makepath-wmakepath.md) with security enhancements as described in [Security Features in the CRT](../../c-runtime-library/security-features-in-the-crt.md). +Creates a path name from components. These are versions of [`_makepath`, `_wmakepath`](makepath-wmakepath.md) with security enhancements as described in [Security features in the CRT](../security-features-in-the-crt.md). ## Syntax @@ -53,59 +53,59 @@ errno_t _wmakepath_s( ### Parameters -*path*
+*`path`*\ Full path buffer. -*sizeInWords*
+*`sizeInWords`*\ Size of the buffer in words. -*sizeInBytes*
+*`sizeInBytes`*\ Size of the buffer in bytes. -*drive*
-Contains a letter (A, B, and so on) corresponding to the desired drive and an optional trailing colon. **_makepath_s** inserts the colon automatically in the composite path if it is missing. If *drive* is **NULL** or points to an empty string, no drive letter appears in the composite *path* string. +*`drive`*\ +Contains a letter (A, B, and so on) corresponding to the desired drive and an optional trailing colon. **_makepath_s** inserts the colon automatically in the composite path if it is missing. If *`drive`* is **NULL** or points to an empty string, no drive letter appears in the composite *`path`* string. -*dir*
-Contains the path of directories, not including the drive designator or the actual file name. The trailing slash is optional, and either a forward slash (/) or a backslash (\\) or both might be used in a single *dir* argument. If no trailing slash (/ or \\) is specified, it is inserted automatically. If *dir* is **NULL** or points to an empty string, no directory path is inserted in the composite *path* string. +*`dir`*\ +Contains the path of directories, not including the drive designator or the actual file name. The trailing slash is optional, and either a forward slash (/) or a backslash (\\) or both might be used in a single *`dir`* argument. If no trailing slash (/ or \\) is specified, it is inserted automatically. If *`dir`* is **NULL** or points to an empty string, no directory path is inserted in the composite *`path`* string. -*fname*
-Contains the base file name without any file name extensions. If *fname* is **NULL** or points to an empty string, no filename is inserted in the composite *path* string. +*`fname`*\ +Contains the base file name without any file name extensions. If *`fname`* is **NULL** or points to an empty string, no filename is inserted in the composite *`path`* string. -*ext*
-Contains the actual file name extension, with or without a leading period (.). **_makepath_s** inserts the period automatically if it does not appear in *ext*. If *ext* is **NULL** or points to an empty string, no extension is inserted in the composite *path* string. +*`ext`*\ +Contains the actual file name extension, with or without a leading period (.). **_makepath_s** inserts the period automatically if it does not appear in *`ext`*. If *`ext`* is **NULL** or points to an empty string, no extension is inserted in the composite *`path`* string. -## Return Value +## Return value Zero if successful; an error code on failure. -### Error Conditions +### Error conditions -|*path*|*sizeInWords* / *sizeInBytes*|Return|Contents of *path*| +|*`path`*|*`sizeInWords`* / *`sizeInBytes`*|Return|Contents of *`path`*| |------------|------------------------------------|------------|------------------------| |**NULL**|any|**EINVAL**|not modified| |any|<= 0|**EINVAL**|not modified| -If any of the above error conditions occurs, these functions invoke the invalid parameter handler, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, **errno** is set to **EINVAL** and the functions returns **EINVAL**. **NULL** is allowed for the parameters *drive*, *fname*, and *ext*. For information about the behavior when these parameters are null pointers or empty strings, see the Remarks section. +If any of the above error conditions occurs, these functions invoke the invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, **errno** is set to **EINVAL** and the functions returns **EINVAL**. **NULL** is allowed for the parameters *`drive`*, *`fname`*, and *`ext`*. For information about the behavior when these parameters are null pointers or empty strings, see the Remarks section. ## Remarks -The **_makepath_s** function creates a composite path string from individual components, storing the result in *path*. The *path* might include a drive letter, directory path, file name, and file name extension. **_wmakepath_s** is a wide-character version of **_makepath_s**; the arguments to **_wmakepath_s** are wide-character strings. **_wmakepath_s** and **_makepath_s** behave identically otherwise. +The **_makepath_s** function creates a composite path string from individual components, storing the result in *`path`*. The *`path`* might include a drive letter, directory path, file name, and file name extension. **_wmakepath_s** is a wide-character version of **_makepath_s**; the arguments to **_wmakepath_s** are wide-character strings. **_wmakepath_s** and **_makepath_s** behave identically otherwise. 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| |---------------------|--------------------------------------|--------------------|-----------------------| |**_tmakepath_s**|**_makepath_s**|**_makepath_s**|**_wmakepath_s**| -The *path* argument must point to an empty buffer large enough to hold the complete path. The composite *path* must be no larger than the **_MAX_PATH** constant, defined in Stdlib.h. +The *`path`* argument must point to an empty buffer large enough to hold the complete path. The composite *`path`* must be no larger than the **_MAX_PATH** constant, defined in Stdlib.h. -If path is **NULL**, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). In addition, **errno** is set to **EINVAL**. **NULL** values are allowed for all other parameters. +If path is **NULL**, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). In addition, **errno** is set to **EINVAL**. **NULL** values are allowed for all other parameters. -In C++, using these functions is simplified by template overloads; the overloads can infer buffer length automatically (eliminating the need to specify a size argument) and they can automatically replace older, non-secure functions with their newer, secure counterparts. For more information, see [Secure Template Overloads](../../c-runtime-library/secure-template-overloads.md). +In C++, using these functions is simplified by template overloads; the overloads can infer buffer length automatically (eliminating the need to specify a size argument) and they can automatically replace older, non-secure functions with their newer, secure counterparts. For more information, see [Secure template overloads](../secure-template-overloads.md). -The debug library versions of these functions first fill the buffer with 0xFE. To disable this behavior, use [_CrtSetDebugFillThreshold](crtsetdebugfillthreshold.md). +The debug library versions of these functions first fill the buffer with 0xFE. To disable this behavior, use [`_CrtSetDebugFillThreshold`](crtsetdebugfillthreshold.md). ## Requirements @@ -114,7 +114,7 @@ The debug library versions of these functions first fill the buffer with 0xFE. T |**_makepath_s**|\| |**_wmakepath_s**|\ or \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -168,7 +168,7 @@ Path extracted with _splitpath_s: ## See also -[File Handling](../../c-runtime-library/file-handling.md)
-[_fullpath, _wfullpath](fullpath-wfullpath.md)
-[_splitpath_s, _wsplitpath_s](splitpath-s-wsplitpath-s.md)
-[_makepath, _wmakepath](makepath-wmakepath.md)
+[File handling](../file-handling.md)\ +[`_fullpath`, `_wfullpath`](fullpath-wfullpath.md)\ +[`_splitpath_s`, `_wsplitpath_s`](splitpath-s-wsplitpath-s.md)\ +[`_makepath`, `_wmakepath`](makepath-wmakepath.md) diff --git a/docs/c-runtime-library/reference/makepath-wmakepath.md b/docs/c-runtime-library/reference/makepath-wmakepath.md index f441de77522..d3e8b5bcf0b 100644 --- a/docs/c-runtime-library/reference/makepath-wmakepath.md +++ b/docs/c-runtime-library/reference/makepath-wmakepath.md @@ -12,7 +12,7 @@ ms.assetid: 5930b197-a7b8-46eb-8519-2841a58cd026 --- # _makepath, _wmakepath -Create a path name from components. More secure versions of these functions are available; see [_makepath_s, _wmakepath_s](makepath-s-wmakepath-s.md). +Create a path name from components. More secure versions of these functions are available; see [`_makepath_s`, `_wmakepath_s`](makepath-s-wmakepath-s.md). ## Syntax @@ -35,38 +35,38 @@ void _wmakepath( ### Parameters -*path*
+*`path`*\ Full path buffer. -*drive*
-Contains a letter (A, B, and so on) corresponding to the desired drive and an optional trailing colon. **_makepath** inserts the colon automatically in the composite path if it is missing. If *drive* is **NULL** or points to an empty string, no drive letter appears in the composite *path* string. +*`drive`*\ +Contains a letter (A, B, and so on) corresponding to the desired drive and an optional trailing colon. **_makepath** inserts the colon automatically in the composite path if it is missing. If *`drive`* is **NULL** or points to an empty string, no drive letter appears in the composite *`path`* string. -*dir*
-Contains the path of directories, not including the drive designator or the actual file name. The trailing slash is optional, and either a forward slash (/) or a backslash (\\) or both might be used in a single *dir* argument. If no trailing slash (/ or \\) is specified, it is inserted automatically. If *dir* is **NULL** or points to an empty string, no directory path is inserted in the composite *path* string. +*`dir`*\ +Contains the path of directories, not including the drive designator or the actual file name. The trailing slash is optional, and either a forward slash (/) or a backslash (\\) or both might be used in a single *`dir`* argument. If no trailing slash (/ or \\) is specified, it is inserted automatically. If *`dir`* is **NULL** or points to an empty string, no directory path is inserted in the composite *`path`* string. -*fname*
-Contains the base file name without any file name extensions. If *fname* is **NULL** or points to an empty string, no filename is inserted in the composite *path* string. +*`fname`*\ +Contains the base file name without any file name extensions. If *`fname`* is **NULL** or points to an empty string, no filename is inserted in the composite *`path`* string. -*ext*
-Contains the actual file name extension, with or without a leading period (.). **_makepath** inserts the period automatically if it does not appear in *ext*. If *ext* is **NULL** or points to an empty string, no extension is inserted in the composite *path* string. +*`ext`*\ +Contains the actual file name extension, with or without a leading period (.). **_makepath** inserts the period automatically if it does not appear in *`ext`*. If *`ext`* is **NULL** or points to an empty string, no extension is inserted in the composite *`path`* string. ## Remarks -The **_makepath** function creates a composite path string from individual components, storing the result in *path*. The *path* might include a drive letter, directory path, filename, and filename extension. **_wmakepath** is a wide-character version of **_makepath**; the arguments to **_wmakepath** are wide-character strings. **_wmakepath** and **_makepath** behave identically otherwise. +The **_makepath** function creates a composite path string from individual components, storing the result in *`path`*. The *`path`* might include a drive letter, directory path, filename, and filename extension. **_wmakepath** is a wide-character version of **_makepath**; the arguments to **_wmakepath** are wide-character strings. **_wmakepath** and **_makepath** behave identically otherwise. -**Security Note** Use a null-terminated string. To avoid buffer overrun, the null-terminated string must not exceed the size of the *path* buffer. **_makepath** does not ensure that the length of the composite path string does not exceed **_MAX_PATH**. For more information, see [Avoiding Buffer Overruns](/windows/win32/SecBP/avoiding-buffer-overruns). +**Security Note** Use a null-terminated string. To avoid buffer overrun, the null-terminated string must not exceed the size of the *`path`* buffer. **_makepath** does not ensure that the length of the composite path string does not exceed **_MAX_PATH**. For more information, see [Avoiding buffer overruns](/windows/win32/SecBP/avoiding-buffer-overruns). 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| |---------------------|--------------------------------------|--------------------|-----------------------| |**_tmakepath**|**_makepath**|**_makepath**|**_wmakepath**| -The *path* argument must point to an empty buffer large enough to hold the complete path. The composite *path* must be no larger than the **_MAX_PATH** constant, defined in Stdlib.h. +The *`path`* argument must point to an empty buffer large enough to hold the complete path. The composite *`path`* must be no larger than the **_MAX_PATH** constant, defined in Stdlib.h. -If path is **NULL**, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). In addition, **errno** is set to **EINVAL**. **NULL** values are allowed for all other parameters. +If path is **NULL**, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). In addition, **errno** is set to **EINVAL**. **NULL** values are allowed for all other parameters. ## Requirements @@ -75,7 +75,7 @@ If path is **NULL**, the invalid parameter handler is invoked, as described in [ |**_makepath**|\| |**_wmakepath**|\ or \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -117,7 +117,7 @@ Path extracted with _splitpath: ## See also -[File Handling](../../c-runtime-library/file-handling.md)
-[_fullpath, _wfullpath](fullpath-wfullpath.md)
-[_splitpath, _wsplitpath](splitpath-wsplitpath.md)
-[_makepath_s, _wmakepath_s](makepath-s-wmakepath-s.md)
+[File handling](../file-handling.md)\ +[`_fullpath`, `_wfullpath`](fullpath-wfullpath.md)\ +[`_splitpath`, `_wsplitpath`](splitpath-wsplitpath.md)\ +[`_makepath_s`, `_wmakepath_s`](makepath-s-wmakepath-s.md) diff --git a/docs/c-runtime-library/reference/malloc-dbg.md b/docs/c-runtime-library/reference/malloc-dbg.md index c1247cac4d3..b0b183808ec 100644 --- a/docs/c-runtime-library/reference/malloc-dbg.md +++ b/docs/c-runtime-library/reference/malloc-dbg.md @@ -27,33 +27,33 @@ void *_malloc_dbg( ### Parameters -*size*
+*`size`*\ Requested size of the memory block (in bytes). -*blockType*
+*`blockType`*\ Requested type of the memory block: **_CLIENT_BLOCK** or **_NORMAL_BLOCK**. -*filename*
+*`filename`*\ Pointer to the name of the source file that requested the allocation operation or **NULL**. -*linenumber*
+*`linenumber`*\ Line number in the source file where the allocation operation was requested or **NULL**. -The *filename* and *linenumber* parameters are only available when **_malloc_dbg** has been called explicitly or the [_CRTDBG_MAP_ALLOC](../../c-runtime-library/crtdbg-map-alloc.md) preprocessor constant has been defined. +The *`filename`* and *`linenumber`* parameters are only available when **_malloc_dbg** has been called explicitly or the [`_CRTDBG_MAP_ALLOC`](../crtdbg-map-alloc.md) preprocessor constant has been defined. -## Return Value +## Return value -On successful completion, this function returns a pointer to the user portion of the allocated memory block, calls the new handler function, or returns **NULL**. For a complete description of the return behavior, see the following Remarks section. For more information about how the new handler function is used, see the [malloc](malloc.md) function. +On successful completion, this function returns a pointer to the user portion of the allocated memory block, calls the new handler function, or returns **NULL**. For a complete description of the return behavior, see the following Remarks section. For more information about how the new handler function is used, see the [`malloc`](malloc.md) function. ## Remarks -**_malloc_dbg** is a debug version of the [malloc](malloc.md) function. When [_DEBUG](../../c-runtime-library/debug.md) is not defined, each call to **_malloc_dbg** is reduced to a call to **malloc**. Both **malloc** and **_malloc_dbg** allocate a block of memory in the base heap, but **_malloc_dbg** offers several debugging features: buffers on either side of the user portion of the block to test for leaks, a block type parameter to track specific allocation types, and *filename*/*linenumber* information to determine the origin of allocation requests. +**_malloc_dbg** is a debug version of the [`malloc`](malloc.md) function. When [`_DEBUG`](../debug.md) is not defined, each call to **_malloc_dbg** is reduced to a call to **malloc**. Both **malloc** and **_malloc_dbg** allocate a block of memory in the base heap, but **_malloc_dbg** offers several debugging features: buffers on either side of the user portion of the block to test for leaks, a block type parameter to track specific allocation types, and *`filename`*/*`linenumber`* information to determine the origin of allocation requests. -**_malloc_dbg** allocates the memory block with slightly more space than the requested *size*. The additional space is used by the debug heap manager to link the debug memory blocks and to provide the application with debug header information and overwrite buffers. When the block is allocated, the user portion of the block is filled with the value 0xCD and each of the overwrite buffers are filled with 0xFD. +**_malloc_dbg** allocates the memory block with slightly more space than the requested *`size`*. The additional space is used by the debug heap manager to link the debug memory blocks and to provide the application with debug header information and overwrite buffers. When the block is allocated, the user portion of the block is filled with the value 0xCD and each of the overwrite buffers are filled with 0xFD. -**_malloc_dbg** sets **errno** to **ENOMEM** if a memory allocation fails or if the amount of memory needed (including the overhead mentioned previously) exceeds **_HEAP_MAXREQ**. For information about this and other error codes, see [errno, _doserrno, _sys_errlist, and _sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +**_malloc_dbg** sets **errno** to **ENOMEM** if a memory allocation fails or if the amount of memory needed (including the overhead mentioned previously) exceeds **_HEAP_MAXREQ**. For information about this and other error codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). -For information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT Debug Heap Details](/visualstudio/debugger/crt-debug-heap-details). For information about the allocation block types and how they are used, see [Types of blocks on the debug heap](/visualstudio/debugger/crt-debug-heap-details). For information about the differences between calling a standard heap function and its debug version in a debug build of an application, see [Debug Versions of Heap Allocation Functions](/visualstudio/debugger/debug-versions-of-heap-allocation-functions). +For information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT debug heap details](/visualstudio/debugger/crt-debug-heap-details). For information about the allocation block types and how they are used, see [Types of blocks on the debug heap](/visualstudio/debugger/crt-debug-heap-details). For information about the differences between calling a standard heap function and its debug version in a debug build of an application, see [Debug versions of heap allocation functions](/visualstudio/debugger/debug-versions-of-heap-allocation-functions). ## Requirements @@ -61,18 +61,18 @@ For information about how memory blocks are allocated, initialized, and managed |-------------|---------------------| |**_malloc_dbg**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Libraries -Debug versions of [C run-time libraries](../../c-runtime-library/crt-library-features.md) only. +Debug versions of [C run-time libraries](../crt-library-features.md) only. ## Example -For a sample of how to use **_malloc_dbg**, see [crt_dbg1](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/crt/crt_dbg1). +For a sample of how to use **_malloc_dbg**, see [`crt_dbg1`](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/crt/crt_dbg1). ## See also -[Debug Routines](../../c-runtime-library/debug-routines.md)
-[malloc](malloc.md)
-[_calloc_dbg](calloc-dbg.md)
+[Debug routines](../debug-routines.md)\ +[`malloc`](malloc.md)\ +[`_calloc_dbg`](calloc-dbg.md) diff --git a/docs/c-runtime-library/reference/malloc.md b/docs/c-runtime-library/reference/malloc.md index a5c1e5d84ba..d83c04d96d1 100644 --- a/docs/c-runtime-library/reference/malloc.md +++ b/docs/c-runtime-library/reference/malloc.md @@ -24,10 +24,10 @@ void *malloc( ### Parameters -*`size`*
+*`size`*\ Bytes to allocate. -## Return Value +## Return value **`malloc`** returns a void pointer to the allocated space, or **`NULL`** if there is insufficient memory available. To return a pointer to a type other than **`void`**, use a type cast on the return value. The storage space pointed to by the return value is guaranteed to be suitably aligned for storage of any type of object that has an alignment requirement less than or equal to that of the fundamental alignment. (In Visual C++, the fundamental alignment is the alignment that's required for a **`double`**, or 8 bytes. In code that targets 64-bit platforms, it's 16 bytes.) Use [`_aligned_malloc`](aligned-malloc.md) to allocate storage for objects that have a larger alignment requirement—for example, the SSE types [`__m128`](../../cpp/m128.md) and **`__m256`**, and types that are declared by using `__declspec(align( n ))` where **`n`** is greater than 8. If *`size`* is 0, **`malloc`** allocates a zero-length item in the heap and returns a valid pointer to that item. Always check the return from **`malloc`**, even if the amount of memory requested is small. @@ -35,14 +35,14 @@ Bytes to allocate. The **`malloc`** function allocates a memory block of at least *`size`* bytes. The block may be larger than *`size`* bytes because of the space that's required for alignment and maintenance information. -**`malloc`** sets **`errno`** to **`ENOMEM`** if a memory allocation fails or if the amount of memory requested exceeds **`_HEAP_MAXREQ`**. For information about this and other error codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +**`malloc`** sets **`errno`** to **`ENOMEM`** if a memory allocation fails or if the amount of memory requested exceeds **`_HEAP_MAXREQ`**. For information about this and other error codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). The startup code uses **`malloc`** to allocate storage for the **`_environ`**, *`envp`*, and *`argv`* variables. The following functions and their wide-character counterparts also call **`malloc`**. :::row::: :::column span=""::: [`calloc`](calloc.md)\ - [`_exec` functions](../../c-runtime-library/exec-wexec-functions.md)\ + [`_exec` functions](../exec-wexec-functions.md)\ [`fgetc`](fgetc-fgetwc.md)\ [`_fgetchar`](fgetc-fgetwc.md)\ [`fgets`](fgets-fgetws.md)\ @@ -62,7 +62,7 @@ The startup code uses **`malloc`** to allocate storage for the **`_environ`**, * [`getchar`](getc-getwc.md)\ [`_getcwd`](getcwd-wgetcwd.md)\ [`_getdcwd`](getcwd-wgetcwd.md)\ - [`gets`](../../c-runtime-library/gets-getws.md) + [`gets`](../gets-getws.md) :::column-end::: :::column span=""::: [`_getw`](getw.md)\ @@ -78,7 +78,7 @@ The startup code uses **`malloc`** to allocate storage for the **`_environ`**, * :::column span=""::: [`_searchenv`](searchenv-wsearchenv.md)\ [`setvbuf`](setvbuf.md)\ - [`_spawn` functions](../../c-runtime-library/spawn-wspawn-functions.md)\ + [`_spawn` functions](../spawn-wspawn-functions.md)\ [`_strdup`](strdup-wcsdup-mbsdup.md)\ [`system`](system-wsystem.md)\ [`_tempnam`](tempnam-wtempnam-tmpnam-wtmpnam.md)\ @@ -88,9 +88,9 @@ The startup code uses **`malloc`** to allocate storage for the **`_environ`**, * :::column-end::: :::row-end::: -The C++ [`_set_new_mode`](set-new-mode.md) function sets the new handler mode for **`malloc`**. The new handler mode indicates whether, on failure, **`malloc`** is to call the new handler routine as set by [`_set_new_handler`](set-new-handler.md). By default, **`malloc`** does not call the new handler routine on failure to allocate memory. You can override this default behavior so that, when **`malloc`** fails to allocate memory, **`malloc`** calls the new handler routine in the same way that the **`new`** operator does when it fails for the same reason. To override the default, call `_set_new_mode(1)` early in your program, or link with `NEWMODE.OBJ` (see [Link Options](../../c-runtime-library/link-options.md)). +The C++ [`_set_new_mode`](set-new-mode.md) function sets the new handler mode for **`malloc`**. The new handler mode indicates whether, on failure, **`malloc`** is to call the new handler routine as set by [`_set_new_handler`](set-new-handler.md). By default, **`malloc`** does not call the new handler routine on failure to allocate memory. You can override this default behavior so that, when **`malloc`** fails to allocate memory, **`malloc`** calls the new handler routine in the same way that the **`new`** operator does when it fails for the same reason. To override the default, call `_set_new_mode(1)` early in your program, or link with `NEWMODE.OBJ` (see [Link options](../link-options.md)). -When the application is linked with a debug version of the C run-time libraries, **`malloc`** resolves to [`_malloc_dbg`](malloc-dbg.md). For more information about how the heap is managed during the debugging process, see [CRT Debug Heap Details](/visualstudio/debugger/crt-debug-heap-details). +When the application is linked with a debug version of the C run-time libraries, **`malloc`** resolves to [`_malloc_dbg`](malloc-dbg.md). For more information about how the heap is managed during the debugging process, see [CRT debug heap details](/visualstudio/debugger/crt-debug-heap-details). **`malloc`** is marked `__declspec(noalias)` and `__declspec(restrict)`; this means that the function is guaranteed not to modify global variables, and that the pointer returned is not aliased. For more information, see [`noalias`](../../cpp/noalias.md) and [`restrict`](../../cpp/restrict.md). @@ -102,11 +102,11 @@ By default, this function's global state is scoped to the application. To change |-------------|---------------------| |**`malloc`**|`` and ``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Libraries -All versions of the [C run-time libraries](../../c-runtime-library/crt-library-features.md). +All versions of the [C run-time libraries](../crt-library-features.md). ## Example @@ -147,8 +147,8 @@ Memory freed ## See also -[Memory Allocation](../../c-runtime-library/memory-allocation.md)
-[`calloc`](calloc.md)
-[`free`](free.md)
-[`realloc`](realloc.md)
-[`_aligned_malloc`](aligned-malloc.md)
+[Memory allocation](../memory-allocation.md)\ +[`calloc`](calloc.md)\ +[`free`](free.md)\ +[`realloc`](realloc.md)\ +[`_aligned_malloc`](aligned-malloc.md) diff --git a/docs/c-runtime-library/reference/malloca.md b/docs/c-runtime-library/reference/malloca.md index 38c3dba0a06..093d376eb09 100644 --- a/docs/c-runtime-library/reference/malloca.md +++ b/docs/c-runtime-library/reference/malloca.md @@ -11,7 +11,7 @@ helpviewer_keywords: ["memory allocation, stack", "malloca function", "_malloca --- # `_malloca` -Allocates memory on the stack. This is a version of [`_alloca`](alloca.md) with security enhancements as described in [Security Features in the CRT](../../c-runtime-library/security-features-in-the-crt.md). +Allocates memory on the stack. This is a version of [`_alloca`](alloca.md) with security enhancements as described in [Security features in the CRT](../security-features-in-the-crt.md). ## Syntax @@ -26,11 +26,11 @@ void *_malloca( *`size`*\ Bytes to be allocated from the stack. -## Return Value +## Return value The **`_malloca`** routine returns a **`void`** pointer to the allocated space, which is guaranteed to be suitably aligned for storage of any type of object. If *`size`* is 0, **`_malloca`** allocates a zero-length item and returns a valid pointer to that item. -If *`size`* is greater than **`_ALLOCA_S_THRESHOLD`**, then **`_malloca`** attempts to allocate on the heap, and returns a null pointer if the space can't be allocated. If *`size`* is less than or equal to **`_ALLOCA_S_THRESHOLD`**, then **`_malloca`** attempts to allocate on the stack, and a stack overflow exception is generated if the space can't be allocated. The stack overflow exception isn't a C++ exception; it's a structured exception. Instead of using C++ exception handling, you must use [Structured Exception Handling](../../cpp/structured-exception-handling-c-cpp.md) (SEH) to catch this exception. +If *`size`* is greater than **`_ALLOCA_S_THRESHOLD`**, then **`_malloca`** attempts to allocate on the heap, and returns a null pointer if the space can't be allocated. If *`size`* is less than or equal to **`_ALLOCA_S_THRESHOLD`**, then **`_malloca`** attempts to allocate on the stack, and a stack overflow exception is generated if the space can't be allocated. The stack overflow exception isn't a C++ exception; it's a structured exception. Instead of using C++ exception handling, you must use [Structured exception handling](../../cpp/structured-exception-handling-c-cpp.md) (SEH) to catch this exception. ## Remarks @@ -143,7 +143,7 @@ int main() 1000 ``` -### Sample Output +### Sample output ```Output Enter the number of bytes to allocate using _malloca: 1000 @@ -151,7 +151,7 @@ Enter the number of bytes to allocate using _malloca: 1000 ## See also -[Memory Allocation](../../c-runtime-library/memory-allocation.md)\ +[Memory allocation](../memory-allocation.md)\ [`calloc`](calloc.md)\ [`malloc`](malloc.md)\ [`realloc`](realloc.md)\ diff --git a/docs/c-runtime-library/reference/matherr.md b/docs/c-runtime-library/reference/matherr.md index a3d52e22885..4103532d792 100644 --- a/docs/c-runtime-library/reference/matherr.md +++ b/docs/c-runtime-library/reference/matherr.md @@ -24,17 +24,18 @@ int _matherr(struct _exception *except); *`except`*\ Pointer to the structure containing error information. -## Return Value +## Return value **`_matherr`** returns 0 to indicate an error, or a nonzero value to indicate success: + - If **`_matherr`** returns 0, an error message can be displayed and **`errno`** is set to an appropriate error value. - If **`_matherr`** returns a nonzero value, no error message is displayed and **`errno`** remains unchanged. -For more information about 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 return codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks -The **`_matherr`** function processes errors generated by the floating-point functions of the math library. These functions call **`_matherr`** when an error is detected. This interaction isn't impacted by the [floating-point mode of the compiler](../../build/reference/fp-specify-floating-point-behavior.md) or the [floating point control word](../../c-runtime-library/reference/control87-controlfp-control87-2.md). Since **`_matherr`** is a library function, math [intrinsic functions](../../intrinsics/compiler-intrinsics.md) won't call it. +The **`_matherr`** function processes errors generated by the floating-point functions of the math library. These functions call **`_matherr`** when an error is detected. This interaction isn't impacted by the [floating-point mode of the compiler](../../build/reference/fp-specify-floating-point-behavior.md) or the [floating point control word](./control87-controlfp-control87-2.md). Since **`_matherr`** is a library function, math [intrinsic functions](../../intrinsics/compiler-intrinsics.md) won't call it. For special error handling, you can provide a different definition of **`_matherr`**. If you use the dynamically linked version of the C run-time library (CRT), you can replace the default **`_matherr`** routine in a client executable with a user-defined version. However, you can't replace the default **`_matherr`** routine in a DLL client of the CRT DLL. @@ -72,7 +73,7 @@ The default return value for the given error is **`retval`**. If you change the |-------------|---------------------| |**`_matherr`**|``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -138,4 +139,4 @@ Normal: log( 0.0 ) = -inf ## See also -[Floating-Point Support](../../c-runtime-library/floating-point-support.md) +[Math and floating-point support](../floating-point-support.md) diff --git a/docs/c-runtime-library/reference/max.md b/docs/c-runtime-library/reference/max.md index e5560931b2c..0036b6fe269 100644 --- a/docs/c-runtime-library/reference/max.md +++ b/docs/c-runtime-library/reference/max.md @@ -22,10 +22,10 @@ A preprocessor macro that returns the larger of two values. ### Parameters -*a*, *b*
+*`a`*, *`b`*\ Values of any numeric type to be compared. -## Return Value +## Return value **__max** returns the larger of its arguments. @@ -43,9 +43,9 @@ The argument returned is evaluated twice by the macro. This can lead to unexpect ## Example -For more information, see the example for [__min](min.md). +For more information, see the example for [`__min`](min.md). ## See also -[Floating-Point Support](../../c-runtime-library/floating-point-support.md)
-[__min](min.md)
+[Math and floating-point support](../floating-point-support.md)\ +[`__min`](min.md) diff --git a/docs/c-runtime-library/reference/mbbtombc-mbbtombc-l.md b/docs/c-runtime-library/reference/mbbtombc-mbbtombc-l.md index 9c491b7312d..26c87640a11 100644 --- a/docs/c-runtime-library/reference/mbbtombc-mbbtombc-l.md +++ b/docs/c-runtime-library/reference/mbbtombc-mbbtombc-l.md @@ -31,21 +31,21 @@ unsigned int _mbbtombc_l( ### Parameters -*c*
+*`c`*\ Single-byte character to convert. -*locale*
+*`locale`*\ Locale to use. -## Return Value +## Return value -If **_mbbtombc** successfully converts *c*, it returns a multibyte character; otherwise, it returns *c*. +If **_mbbtombc** successfully converts *`c`*, it returns a multibyte character; otherwise, it returns *`c`*. ## Remarks The **_mbbtombc** function converts a given single-byte multibyte character to a corresponding double-byte multibyte character. Characters must be within the range 0x20 - 0x7E or 0xA1 - 0xDF to be converted. -The output value is affected by the setting of the **LC_CTYPE** category setting of the locale; see [setlocale, _wsetlocale](setlocale-wsetlocale.md) for more information. The versions of this function are identical, except that **_mbbtombc** uses the current locale for this locale-dependent behavior and **_mbbtombc_l** instead uses the locale parameter that's passed in. For more information, see [Locale](../../c-runtime-library/locale.md). +The output value is affected by the setting of the **LC_CTYPE** category setting of the locale; see [`setlocale`, `_wsetlocale`](setlocale-wsetlocale.md) for more information. The versions of this function are identical, except that **_mbbtombc** uses the current locale for this locale-dependent behavior and **_mbbtombc_l** instead uses the locale parameter that's passed in. For more information, see [Locale](../locale.md). In earlier versions, **_mbbtombc** was named **hantozen**. For new code, use **_mbbtombc**. @@ -58,9 +58,9 @@ By default, this function's global state is scoped to the application. To change |**_mbbtombc**|\| |**_mbbtombc_l**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Data Conversion](../../c-runtime-library/data-conversion.md)
-[_mbctombb, _mbctombb_l](mbctombb-mbctombb-l.md)
+[Data conversion](../data-conversion.md)\ +[`_mbctombb`, `_mbctombb_l`](mbctombb-mbctombb-l.md) diff --git a/docs/c-runtime-library/reference/mbbtype-mbbtype-l.md b/docs/c-runtime-library/reference/mbbtype-mbbtype-l.md index c1941b90016..e9da2505e51 100644 --- a/docs/c-runtime-library/reference/mbbtype-mbbtype-l.md +++ b/docs/c-runtime-library/reference/mbbtype-mbbtype-l.md @@ -33,20 +33,20 @@ int _mbbtype_l( ### Parameters -*c*
+*`c`*\ The character to test. -*type*
+*`type`*\ The type of byte to test for. -*locale*
+*`locale`*\ The locale to use. -## Return Value +## Return value -**_mbbtype** returns the type of byte in a string. This decision is context-sensitive, as specified by the value of *type*, which provides the control test condition. *type* is the type of the previous byte in the string. The manifest constants in the following table are defined in Mbctype.h. +**_mbbtype** returns the type of byte in a string. This decision is context-sensitive, as specified by the value of *`type`*, which provides the control test condition. *`type`* is the type of the previous byte in the string. The manifest constants in the following table are defined in Mbctype.h. -|Value of *type*|**_mbbtype** tests for|Return value|*c*| +|Value of *`type`*|**_mbbtype** tests for|Return value|*`c`*| |---------------------|--------------------------|------------------|---------| |Any value except 1|Valid single byte or lead byte|**_MBC_SINGLE** (0)|Single byte (0x20 - 0x7E, 0xA1 - 0xDF)| |Any value except 1|Valid single byte or lead byte|**_MBC_LEAD** (1)|Lead byte of multibyte character (0x81 - 0x9F, 0xE0 - 0xFC)| @@ -56,9 +56,9 @@ The locale to use. ## Remarks -The **_mbbtype** function determines the type of a byte in a multibyte character. If the value of *type* is any value except 1, **_mbbtype** tests for a valid single-byte or lead byte of a multibyte character. If the value of *type* is 1, **_mbbtype** tests for a valid trail byte of a multibyte character. +The **_mbbtype** function determines the type of a byte in a multibyte character. If the value of *`type`* is any value except 1, **_mbbtype** tests for a valid single-byte or lead byte of a multibyte character. If the value of *`type`* is 1, **_mbbtype** tests for a valid trail byte of a multibyte character. -The output value is affected by the setting of the **LC_CTYPE** category setting of the locale; see [setlocale, _wsetlocale](setlocale-wsetlocale.md) for more information. The **_mbbtype** version of this function uses the current locale for this locale-dependent behavior; the **_mbbtype_l** version is identical except that it use the locale parameter that's passed in instead. For more information, see [Locale](../../c-runtime-library/locale.md). +The output value is affected by the setting of the **LC_CTYPE** category setting of the locale; see [`setlocale`, `_wsetlocale`](setlocale-wsetlocale.md) for more information. The **_mbbtype** version of this function uses the current locale for this locale-dependent behavior; the **_mbbtype_l** version is identical except that it use the locale parameter that's passed in instead. For more information, see [Locale](../locale.md). In earlier versions, **_mbbtype** was named **chkctype**. For new code, use **_mbbtype** instead. @@ -73,8 +73,8 @@ By default, this function's global state is scoped to the application. To change \* For definitions of manifest constants that are used as return values. -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Byte Classification](../../c-runtime-library/byte-classification.md)
+[Byte classification](../byte-classification.md) diff --git a/docs/c-runtime-library/reference/mbccpy-mbccpy-l.md b/docs/c-runtime-library/reference/mbccpy-mbccpy-l.md index b5c3774b11e..55eca1dee1d 100644 --- a/docs/c-runtime-library/reference/mbccpy-mbccpy-l.md +++ b/docs/c-runtime-library/reference/mbccpy-mbccpy-l.md @@ -12,7 +12,7 @@ ms.assetid: 13f4de6e-7792-41ac-b319-dd9b135433aa --- # _mbccpy, _mbccpy_l -Copies a multibyte character from one string to another string. More secure versions of these functions are available; see [_mbccpy_s, _mbccpy_s_l](mbccpy-s-mbccpy-s-l.md). +Copies a multibyte character from one string to another string. More secure versions of these functions are available; see [`_mbccpy_s`, `_mbccpy_s_l`](mbccpy-s-mbccpy-s-l.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). @@ -33,28 +33,28 @@ void _mbccpy_l( ### Parameters -*dest*
+*`dest`*\ Copy destination. -*src*
+*`src`*\ Multibyte character to copy. -*locale*
+*`locale`*\ Locale to use. ## Remarks -The **_mbccpy** function copies one multibyte character from *src* to *dest*. +The **_mbccpy** function copies one multibyte character from *`src`* to *`dest`*. -This function validates its parameters. If **_mbccpy** is passed a null pointer for *dest* or *src*, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, **errno** is set to **EINVAL**. +This function validates its parameters. If **_mbccpy** is passed a null pointer for *`dest`* or *`src`*, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, **errno** is set to **EINVAL**. -**_mbccpy** uses the current locale for any locale-dependent behavior. **_mbccpy_l** is identical to **_mbccpy** except that **_mbccpy_l** uses the locale passed in for any locale-dependent behavior. For more information, see [Locale](../../c-runtime-library/locale.md). +**_mbccpy** uses the current locale for any locale-dependent behavior. **_mbccpy_l** is identical to **_mbccpy** except that **_mbccpy_l** uses the locale passed in for any locale-dependent behavior. For more information, see [Locale](../locale.md). -**Security Note** Use a null-terminated string. The null-terminated string must not exceed the size of the destination buffer. For more information, see [Avoiding Buffer Overruns](/windows/win32/SecBP/avoiding-buffer-overruns). Buffer overrun problems are a frequent method of system attack, resulting in an unwarranted elevation of privilege. +**Security Note** Use a null-terminated string. The null-terminated string must not exceed the size of the destination buffer. For more information, see [Avoiding buffer overruns](/windows/win32/SecBP/avoiding-buffer-overruns). Buffer overrun problems are a frequent method of system attack, resulting in an unwarranted elevation of privilege. 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| |---------------------|--------------------------------------|--------------------|-----------------------| @@ -68,10 +68,10 @@ By default, this function's global state is scoped to the application. To change |**_mbccpy**|\| |**_mbccpy_l**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Locale](../../c-runtime-library/locale.md)
-[Interpretation of Multibyte-Character Sequences](../../c-runtime-library/interpretation-of-multibyte-character-sequences.md)
-[_mbclen, mblen, _mblen_l](mbclen-mblen-mblen-l.md)
+[Locale](../locale.md)\ +[Interpretation of multibyte-character sequences](../interpretation-of-multibyte-character-sequences.md)\ +[`_mbclen`, `mblen`, `_mblen_l`](mbclen-mblen-mblen-l.md) diff --git a/docs/c-runtime-library/reference/mbccpy-s-mbccpy-s-l.md b/docs/c-runtime-library/reference/mbccpy-s-mbccpy-s-l.md index 3ed571d0670..447be50de90 100644 --- a/docs/c-runtime-library/reference/mbccpy-s-mbccpy-s-l.md +++ b/docs/c-runtime-library/reference/mbccpy-s-mbccpy-s-l.md @@ -12,7 +12,7 @@ ms.assetid: b6e965fa-53c1-4ec3-85ef-a1c4b4f2b2da --- # _mbccpy_s, _mbccpy_s_l -Copies one multibyte character from a string to another string. These versions of [_mbccpy, _mbccpy_l](mbccpy-mbccpy-l.md) have security enhancements, as described in [Security Features in the CRT](../../c-runtime-library/security-features-in-the-crt.md). +Copies one multibyte character from a string to another string. These versions of [`_mbccpy`, `_mbccpy_l`](mbccpy-mbccpy-l.md) have security enhancements, as described in [Security features in the CRT](../security-features-in-the-crt.md). > [!IMPORTANT] > This API cannot be used in applications that execute in the Windows Runtime. For more information, see [CRT functions not supported in Universal Windows Platform apps](../../cppcx/crt-functions-not-supported-in-universal-windows-platform-apps.md). @@ -50,49 +50,49 @@ errno_t _mbccpy_s_l( ### Parameters -*dest*
+*`dest`*\ Copy destination. -*buffSizeInBytes*
+*`buffSizeInBytes`*\ Size of the destination buffer. -*pCopied*
+*`pCopied`*\ Filled with the number of bytes copied (1 or 2 if successful). Pass **NULL** if you don't care about the number. -*src*
+*`src`*\ Multibyte character to copy. -*locale*
+*`locale`*\ Locale to use. -## Return Value +## Return value -Zero if successful; an error code on failure. If *src* or *dest* is **NULL**, or if more than **buffSizeinBytes** bytes would be copied to *dest*, then the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, the functions return **EINVAL** and **errno** is set to **EINVAL**. +Zero if successful; an error code on failure. If *`src`* or *`dest`* is **NULL**, or if more than **buffSizeinBytes** bytes would be copied to *`dest`*, then the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, the functions return **EINVAL** and **errno** is set to **EINVAL**. ## Remarks -The **_mbccpy_s** function copies one multibyte character from *src* to *dest*. If *src* does not point to the lead byte of a multibyte character as determined by an implicit call to [_ismbblead](ismbblead-ismbblead-l.md), then the single byte that *src* points to is copied. If *src* points to a lead byte but the following byte is 0 and thus invalid, then 0 is copied to *dest*, **errno** is set to **EILSEQ**, and the function returns **EILSEQ**. +The **_mbccpy_s** function copies one multibyte character from *`src`* to *`dest`*. If *`src`* does not point to the lead byte of a multibyte character as determined by an implicit call to [`_ismbblead`](ismbblead-ismbblead-l.md), then the single byte that *`src`* points to is copied. If *`src`* points to a lead byte but the following byte is 0 and thus invalid, then 0 is copied to *`dest`*, **errno** is set to **EILSEQ**, and the function returns **EILSEQ**. -**_mbccpy_s** does not append a null terminator; however, if *src* points to a null character, then that null is copied to *dest* (this is just a regular single-byte copy). +**_mbccpy_s** does not append a null terminator; however, if *`src`* points to a null character, then that null is copied to *`dest`* (this is just a regular single-byte copy). -The value in *pCopied* is filled with the number of bytes copied. Possible values are 1 and 2 if the operation is successful. If **NULL** is passed in, this parameter is ignored. +The value in *`pCopied`* is filled with the number of bytes copied. Possible values are 1 and 2 if the operation is successful. If **NULL** is passed in, this parameter is ignored. -|*src*|copied to *dest*|*pCopied*|Return value| +|*`src`*|copied to *`dest`*|*`pCopied`*|Return value| |-----------|----------------------|---------------|------------------| |non-lead-byte|non-lead-byte|1|0| |0|0|1|0| |lead-byte followed by non-0|lead-byte followed by non-0|2|0| |lead-byte followed by 0|0|1|**EILSEQ**| -Note that the second row is just a special case of the first. Also note that the table assumes *buffSizeInBytes* >= *pCopied*. +Note that the second row is just a special case of the first. Also note that the table assumes *`buffSizeInBytes`* >= *`pCopied`*. **_mbccpy_s** uses the current locale for any locale-dependent behavior. **_mbccpy_s_l** is identical to **_mbccpy_s** except that **_mbccpy_s_l** uses the locale passed in for any locale-dependent behavior. -In C++, using these functions is simplified by template overloads; the overloads can infer buffer length automatically, eliminating the need to specify a size argument. For more information, see [Secure Template Overloads](../../c-runtime-library/secure-template-overloads.md). +In C++, using these functions is simplified by template overloads; the overloads can infer buffer length automatically, eliminating the need to specify a size argument. 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 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| |---------------------|--------------------------------------|--------------------|-----------------------| @@ -105,10 +105,10 @@ By default, this function's global state is scoped to the application. To change |**_mbccpy_s**|\| |**_mbccpy_s_l**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Locale](../../c-runtime-library/locale.md)
-[Interpretation of Multibyte-Character Sequences](../../c-runtime-library/interpretation-of-multibyte-character-sequences.md)
-[_mbclen, mblen, _mblen_l](mbclen-mblen-mblen-l.md)
+[Locale](../locale.md)\ +[Interpretation of multibyte-character sequences](../interpretation-of-multibyte-character-sequences.md)\ +[`_mbclen`, `mblen`, `_mblen_l`](mbclen-mblen-mblen-l.md) diff --git a/docs/c-runtime-library/reference/mbcjistojms-mbcjistojms-l-mbcjmstojis-mbcjmstojis-l.md b/docs/c-runtime-library/reference/mbcjistojms-mbcjistojms-l-mbcjmstojis-mbcjmstojis-l.md index 6a21a92c73d..4c362cf83c2 100644 --- a/docs/c-runtime-library/reference/mbcjistojms-mbcjistojms-l-mbcjmstojis-mbcjmstojis-l.md +++ b/docs/c-runtime-library/reference/mbcjistojms-mbcjistojms-l-mbcjmstojis-mbcjmstojis-l.md @@ -38,25 +38,25 @@ unsigned int _mbcjmstojis_l( ### Parameters -*c*
+*`c`*\ Character to convert. -*locale*
+*`locale`*\ Locale to use. -## Return Value +## Return value On Japanese locale, these functions return a converted character or return 0 if no conversion is possible. On a non-Japanese locale, these functions return the character passed in. ## Remarks -The **_mbcjistojms** function converts a Japan Industry Standard (JIS) character to a Microsoft Kanji (Shift JIS) character. The character is converted only if the lead and trail bytes are in the range 0x21 - 0x7E. If the lead or trial byte is outside this range, **errno** is set to **EILSEQ**. For more information about this and other error codes, see [errno, _doserrno, _sys_errlist, and _sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +The **_mbcjistojms** function converts a Japan Industry Standard (JIS) character to a Microsoft Kanji (Shift JIS) character. The character is converted only if the lead and trail bytes are in the range 0x21 - 0x7E. If the lead or trial byte is outside this range, **errno** is set to **EILSEQ**. For more information about this and other error codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). The **_mbcjmstojis** function converts a Shift JIS character to a JIS character. The character is converted only if the lead byte is in the range 0x81 - 0x9F or 0xE0 - 0xFC and the trail byte is in the range 0x40 - 0x7E or 0x80 - 0xFC. Note that some code points in that range do not have a character assigned and so cannot be converted. -The value *c* should be a 16-bit value whose upper 8 bits represent the lead byte of the character to convert and whose lower 8 bits represent the trail byte. +The value *`c`* should be a 16-bit value whose upper 8 bits represent the lead byte of the character to convert and whose lower 8 bits represent the trail byte. -The output value is affected by the setting of the **LC_CTYPE** category setting of the locale; see [setlocale](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. For more information, see [Locale](../../c-runtime-library/locale.md). +The output value is affected by the setting of the **LC_CTYPE** category setting of the locale; see [`setlocale`](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. For more information, see [Locale](../locale.md). In earlier versions, **_mbcjistojms** and **_mbcjmstojis** were called **jistojms** and **jmstojis**, respectively. **_mbcjistojms**, **_mbcjistojms_l**, **_mbcjmstojis** and **_mbcjmstojis_l** should be used instead. @@ -71,9 +71,9 @@ By default, this function's global state is scoped to the application. To change |**_mbcjmstojis**|\| |**_mbcjmstojis_l**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Data Conversion](../../c-runtime-library/data-conversion.md)
-[_ismbb Routines](../../c-runtime-library/ismbb-routines.md)
+[Data conversion](../data-conversion.md)\ +[`_ismbb` routines](../ismbb-routines.md) diff --git a/docs/c-runtime-library/reference/mbclen-mblen-mblen-l.md b/docs/c-runtime-library/reference/mbclen-mblen-mblen-l.md index 17607a80b1b..593d041c205 100644 --- a/docs/c-runtime-library/reference/mbclen-mblen-mblen-l.md +++ b/docs/c-runtime-library/reference/mbclen-mblen-mblen-l.md @@ -40,37 +40,37 @@ int _mblen_l( ### Parameters -*c*\ +*`c`*\ Multibyte character. -*mbstr*\ +*`mbstr`*\ Address of a multibyte-character byte sequence. -*count*\ +*`count`*\ Number of bytes to check. -*locale*\ +*`locale`*\ Locale to use. -## Return Value +## Return value -**_mbclen** and **_mbclen_l** return 1 or 2, according to the length of the multibyte character *c*. The functions always return 1 for UTF-8, whether *c* is multibyte or not. There's no error return for **_mbclen**. +**_mbclen** and **_mbclen_l** return 1 or 2, according to the length of the multibyte character *`c`*. The functions always return 1 for UTF-8, whether *`c`* is multibyte or not. There's no error return for **_mbclen**. -If *mbstr* isn't **NULL**, **mblen** and **_mblen_l** return the length, in bytes, of the multibyte character. The **mblen** and **_mblen_l** functions work correctly on UTF-8, and may return a value between 1 and 3. When *mbstr* is **NULL** (or it points to the wide-character null character), **mblen** and **_mblen_l** return 0. The object that *mbstr* points to must form a valid multibyte character within the first *count* characters, or **mblen** and **_mblen_l** return -1. +If *`mbstr`* isn't **NULL**, **mblen** and **_mblen_l** return the length, in bytes, of the multibyte character. The **mblen** and **_mblen_l** functions work correctly on UTF-8, and may return a value between 1 and 3. When *`mbstr`* is **NULL** (or it points to the wide-character null character), **mblen** and **_mblen_l** return 0. The object that *`mbstr`* points to must form a valid multibyte character within the first *`count`* characters, or **mblen** and **_mblen_l** return -1. ## Remarks -The **_mbclen** function returns the length, in bytes, of the multibyte character *c*. If *c* doesn't point to the lead byte of a multibyte character (as determined by an implicit call to [_ismbblead](ismbblead-ismbblead-l.md), the result of **_mbclen** is unpredictable. +The **_mbclen** function returns the length, in bytes, of the multibyte character *`c`*. If *`c`* doesn't point to the lead byte of a multibyte character (as determined by an implicit call to [`_ismbblead`](ismbblead-ismbblead-l.md), the result of **_mbclen** is unpredictable. -**mblen** returns the length in bytes of *mbstr* if it's a valid multibyte character. It also determines multibyte-character validity associated with the code page. **mblen** examines *count* or fewer bytes contained in *mbstr*, but not more than **MB_CUR_MAX** bytes. +**mblen** returns the length in bytes of *`mbstr`* if it's a valid multibyte character. It also determines multibyte-character validity associated with the code page. **mblen** examines *`count`* or fewer bytes contained in *`mbstr`*, but not more than **MB_CUR_MAX** bytes. -The output value is affected by the **LC_CTYPE** category setting of the locale. The versions of these functions without the **_l** suffix use the current locale for this locale-dependent behavior. The **_l** suffixed versions behave the same, but they use the locale parameter passed in instead. For more information, see [setlocale](setlocale-wsetlocale.md) and [Locale](../../c-runtime-library/locale.md). +The output value is affected by the **LC_CTYPE** category setting of the locale. The versions of these functions without the **_l** suffix use the current locale for this locale-dependent behavior. The **_l** suffixed versions behave the same, but they use the locale parameter passed in instead. For more information, see [`setlocale`](setlocale-wsetlocale.md) and [Locale](../locale.md). **_mbclen**, **_mblen_l**, and **_mbclen_l** are Microsoft-specific, not part of the Standard C library. We don't recommend you use them where you want portable code. For Standard C compatibility, use **mblen** or **mbrlen** instead. 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| |---------------------|--------------------------------------|--------------------|-----------------------| @@ -84,7 +84,7 @@ By default, this function's global state is scoped to the application. To change |**mblen**|\| |**_mblen_l**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -127,9 +127,9 @@ Length in bytes of NULL multibyte character 0: 0 ## See also -[Character Classification](../../c-runtime-library/character-classification.md)\ -[Locale](../../c-runtime-library/locale.md)\ -[Interpretation of Multibyte-Character Sequences](../../c-runtime-library/interpretation-of-multibyte-character-sequences.md)\ -[_mbccpy, _mbccpy_l](mbccpy-mbccpy-l.md)\ -[mbrlen](mbrlen.md)\ -[strlen, wcslen, _mbslen, _mbslen_l, _mbstrlen, _mbstrlen_l](strlen-wcslen-mbslen-mbslen-l-mbstrlen-mbstrlen-l.md) +[Character classification](../character-classification.md)\ +[Locale](../locale.md)\ +[Interpretation of multibyte-character sequences](../interpretation-of-multibyte-character-sequences.md)\ +[`_mbccpy`, `_mbccpy_l`](mbccpy-mbccpy-l.md)\ +[`mbrlen`](mbrlen.md)\ +[`strlen`, `wcslen`, `_mbslen`, `_mbslen_l`, `_mbstrlen`, `_mbstrlen_l`](strlen-wcslen-mbslen-mbslen-l-mbstrlen-mbstrlen-l.md) diff --git a/docs/c-runtime-library/reference/mbctohira-mbctohira-l-mbctokata-mbctokata-l.md b/docs/c-runtime-library/reference/mbctohira-mbctohira-l-mbctokata-mbctokata-l.md index 2b48d26caed..2e237d51d36 100644 --- a/docs/c-runtime-library/reference/mbctohira-mbctohira-l-mbctokata-mbctokata-l.md +++ b/docs/c-runtime-library/reference/mbctohira-mbctohira-l-mbctokata-mbctokata-l.md @@ -38,26 +38,26 @@ unsigned int _mbctokata_l( ### Parameters -*c*
+*`c`*\ Multibyte character to convert. -*locale*
+*`locale`*\ Locale to use. -## Return Value +## Return value -Each of these functions returns the converted character *c*, if possible. Otherwise it returns the character *c* unchanged. +Each of these functions returns the converted character *`c`*, if possible. Otherwise it returns the character *`c`* unchanged. ## Remarks -The **_mbctohira** and **_mbctokata** functions test a character *c* and, if possible, apply one of the following conversions. +The **_mbctohira** and **_mbctokata** functions test a character *`c`* and, if possible, apply one of the following conversions. |Routines|Converts| |--------------|--------------| |**_mbctohira**, **_mbctohira_l**|Multibyte katakana to multibyte hiragana.| |**_mbctokata**, **_mbctokata_l**|Multibyte hiragana to multibyte katakana.| -The output value is affected by the setting of the **LC_CTYPE** category setting of the locale; see [setlocale](setlocale-wsetlocale.md) for more information. The versions of these functions are identical, except that the ones that don't have the **_l** suffix use the current locale for this locale-dependent behavior and the ones that do have the **_l** suffix instead use the locale parameter that's passed in. For more information, see [Locale](../../c-runtime-library/locale.md). +The output value is affected by the setting of the **LC_CTYPE** category setting of the locale; see [`setlocale`](setlocale-wsetlocale.md) for more information. The versions of these functions are identical, except that the ones that don't have the **_l** suffix use the current locale for this locale-dependent behavior and the ones that do have the **_l** suffix instead use the locale parameter that's passed in. For more information, see [Locale](../locale.md). In earlier versions, **_mbctohira** was named **jtohira** and **_mbctokata** was named **jtokata**. For new code, use the new names. @@ -72,11 +72,11 @@ By default, this function's global state is scoped to the application. To change |**_mbctokata**|\| |**_mbctokata_l**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Data Conversion](../../c-runtime-library/data-conversion.md)
-[_mbcjistojms, _mbcjistojms_l, _mbcjmstojis, _mbcjmstojis_l](mbcjistojms-mbcjistojms-l-mbcjmstojis-mbcjmstojis-l.md)
-[_mbctolower, _mbctolower_l, _mbctoupper, _mbctoupper_l](mbctolower-mbctolower-l-mbctoupper-mbctoupper-l.md)
-[_mbctombb, _mbctombb_l](mbctombb-mbctombb-l.md)
+[Data conversion](../data-conversion.md)\ +[`_mbcjistojms`, `_mbcjistojms_l`, `_mbcjmstojis`, `_mbcjmstojis_l`](mbcjistojms-mbcjistojms-l-mbcjmstojis-mbcjmstojis-l.md)\ +[`_mbctolower`, `_mbctolower_l`, `_mbctoupper`, `_mbctoupper_l`](mbctolower-mbctolower-l-mbctoupper-mbctoupper-l.md)\ +[`_mbctombb`, `_mbctombb_l`](mbctombb-mbctombb-l.md) diff --git a/docs/c-runtime-library/reference/mbctolower-mbctolower-l-mbctoupper-mbctoupper-l.md b/docs/c-runtime-library/reference/mbctolower-mbctolower-l-mbctoupper-mbctoupper-l.md index 13036a0f380..85066117e22 100644 --- a/docs/c-runtime-library/reference/mbctolower-mbctolower-l-mbctoupper-mbctoupper-l.md +++ b/docs/c-runtime-library/reference/mbctolower-mbctolower-l-mbctoupper-mbctoupper-l.md @@ -38,32 +38,32 @@ unsigned int _mbctoupper_l( ### Parameters -*c*
+*`c`*\ Multibyte character to convert. -*locale*
+*`locale`*\ Locale to use. -## Return Value +## Return value -Each of these functions returns the converted character *c*, if possible. Otherwise it returns the character *c* unchanged. +Each of these functions returns the converted character *`c`*, if possible. Otherwise it returns the character *`c`* unchanged. ## Remarks -The functions test a character *c* and, if possible, apply one of the following conversions. +The functions test a character *`c`* and, if possible, apply one of the following conversions. |Routines|Converts| |--------------|--------------| |**_mbctolower**, **_mbctolower_l**|Uppercase character to lowercase character.| |**_mbctoupper**, **_mbctoupper_l**|Lowercase character to uppercase character.| -The output value is affected by the setting of the **LC_CTYPE** category setting of the locale; see [setlocale](setlocale-wsetlocale.md) for more information. The version of this function without the **_l** suffix uses the current locale for this locale-dependent behavior; the version with the **_l** suffix is identical except that it uses the locale parameter passed in instead. For more information, see [Locale](../../c-runtime-library/locale.md). +The output value is affected by the setting of the **LC_CTYPE** category setting of the locale; see [`setlocale`](setlocale-wsetlocale.md) for more information. The version of this function without the **_l** suffix uses the current locale for this locale-dependent behavior; the version with the **_l** suffix is identical except that it uses the locale parameter passed in instead. For more information, see [Locale](../locale.md). In previous versions, **_mbctolower** was called **jtolower**, and **_mbctoupper** was called **jtoupper**. For new code, use the new names instead. 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| |---------------------|--------------------------------------|--------------------|-----------------------| @@ -79,12 +79,12 @@ By default, this function's global state is scoped to the application. To change |**_mbctolower**, **_mbctolower_l**|\| |**_mbctoupper**, **_mbctoupper_l**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Data Conversion](../../c-runtime-library/data-conversion.md)
-[_mbbtombc, _mbbtombc_l](mbbtombc-mbbtombc-l.md)
-[_mbcjistojms, _mbcjistojms_l, _mbcjmstojis, _mbcjmstojis_l](mbcjistojms-mbcjistojms-l-mbcjmstojis-mbcjmstojis-l.md)
-[_mbctohira, _mbctohira_l, _mbctokata, _mbctokata_l](mbctohira-mbctohira-l-mbctokata-mbctokata-l.md)
-[_mbctombb, _mbctombb_l](mbctombb-mbctombb-l.md)
+[Data conversion](../data-conversion.md)\ +[`_mbbtombc`, `_mbbtombc_l`](mbbtombc-mbbtombc-l.md)\ +[`_mbcjistojms`, `_mbcjistojms_l`, `_mbcjmstojis`, `_mbcjmstojis_l`](mbcjistojms-mbcjistojms-l-mbcjmstojis-mbcjmstojis-l.md)\ +[`_mbctohira`, `_mbctohira_l`, `_mbctokata`, `_mbctokata_l`](mbctohira-mbctohira-l-mbctokata-mbctokata-l.md)\ +[`_mbctombb`, `_mbctombb_l`](mbctombb-mbctombb-l.md) diff --git a/docs/c-runtime-library/reference/mbctombb-mbctombb-l.md b/docs/c-runtime-library/reference/mbctombb-mbctombb-l.md index 404452e410e..4ec73c7d92d 100644 --- a/docs/c-runtime-library/reference/mbctombb-mbctombb-l.md +++ b/docs/c-runtime-library/reference/mbctombb-mbctombb-l.md @@ -31,21 +31,21 @@ unsigned int _mbctombb_l( ### Parameters -*c*
+*`c`*\ Multibyte character to convert. -*locale*
+*`locale`*\ Locale to use. -## Return Value +## Return value -If successful, **_mbctombb** and **_mbctombb_l** returns the single-byte character that corresponds to *c*; otherwise it returns *c*. +If successful, **_mbctombb** and **_mbctombb_l** returns the single-byte character that corresponds to *`c`*; otherwise it returns *`c`*. ## Remarks The **_mbctombb** and **_mbctombb_l** functions convert a given multibyte character to a corresponding single-byte multibyte character. Characters must correspond to single-byte characters within the range 0x20 - 0x7E or 0xA1 - 0xDF to be converted. -The output value is affected by the setting of the **LC_CTYPE** category setting of the locale; see [setlocale](setlocale-wsetlocale.md) for more information. The version of this function without the **_l** suffix uses the current locale for this locale-dependent behavior; the version with the **_l** suffix is identical except that it use the locale parameter passed in instead. For more information, see [Locale](../../c-runtime-library/locale.md). +The output value is affected by the setting of the **LC_CTYPE** category setting of the locale; see [`setlocale`](setlocale-wsetlocale.md) for more information. The version of this function without the **_l** suffix uses the current locale for this locale-dependent behavior; the version with the **_l** suffix is identical except that it use the locale parameter passed in instead. For more information, see [Locale](../locale.md). In previous versions, **_mbctombb** was called **zentohan**. Use **_mbctombb** instead. @@ -58,12 +58,12 @@ By default, this function's global state is scoped to the application. To change |**_mbctombb**|\| |**_mbctombb_l**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Data Conversion](../../c-runtime-library/data-conversion.md)
-[_mbbtombc, _mbbtombc_l](mbbtombc-mbbtombc-l.md)
-[_mbcjistojms, _mbcjistojms_l, _mbcjmstojis, _mbcjmstojis_l](mbcjistojms-mbcjistojms-l-mbcjmstojis-mbcjmstojis-l.md)
-[_mbctohira, _mbctohira_l, _mbctokata, _mbctokata_l](mbctohira-mbctohira-l-mbctokata-mbctokata-l.md)
-[_mbctolower, _mbctolower_l, _mbctoupper, _mbctoupper_l](mbctolower-mbctolower-l-mbctoupper-mbctoupper-l.md)
+[Data conversion](../data-conversion.md)\ +[`_mbbtombc`, `_mbbtombc_l`](mbbtombc-mbbtombc-l.md)\ +[`_mbcjistojms`, `_mbcjistojms_l`, `_mbcjmstojis`, `_mbcjmstojis_l`](mbcjistojms-mbcjistojms-l-mbcjmstojis-mbcjmstojis-l.md)\ +[`_mbctohira`, `_mbctohira_l`, `_mbctokata`, `_mbctokata_l`](mbctohira-mbctohira-l-mbctokata-mbctokata-l.md)\ +[`_mbctolower`, `_mbctolower_l`, `_mbctoupper`, `_mbctoupper_l`](mbctolower-mbctolower-l-mbctoupper-mbctoupper-l.md) diff --git a/docs/c-runtime-library/reference/mbrlen.md b/docs/c-runtime-library/reference/mbrlen.md index 59181b0d63c..57aebce6ae0 100644 --- a/docs/c-runtime-library/reference/mbrlen.md +++ b/docs/c-runtime-library/reference/mbrlen.md @@ -26,37 +26,37 @@ size_t mbrlen( ### Parameters -*str*
+*`str`*\ Pointer to the next byte to inspect in a multibyte character string. -*count*
+*`count`*\ The maximum number of bytes to inspect. -*mbstate*
-Pointer to the current shift state of the initial byte of *str*. +*`mbstate`*\ +Pointer to the current shift state of the initial byte of *`str`*. -## Return Value +## Return value One of the following values: | Value | Description | |--|--| -| 0 | The next *count* or fewer bytes complete the multibyte character that represents the wide null character. | -| 1 to *count*, inclusive | The next *count* or fewer bytes complete a valid multibyte character. The value returned is the number of bytes that complete the multibyte character. | -| (size_t)(-2) | The next *count* bytes contribute to an incomplete but potentially valid multibyte character and all *count* bytes have been processed. | -| (size_t)(-1) | An encoding error occurred. The next *count* or fewer bytes do not contribute to a complete and valid multibyte character. In this case, **errno** is set to EILSEQ and the conversion state in *mbstate* is unspecified. | +| 0 | The next *`count`* or fewer bytes complete the multibyte character that represents the wide null character. | +| 1 to *`count`*, inclusive | The next *`count`* or fewer bytes complete a valid multibyte character. The value returned is the number of bytes that complete the multibyte character. | +| (size_t)(-2) | The next *`count`* bytes contribute to an incomplete but potentially valid multibyte character and all *`count`* bytes have been processed. | +| (size_t)(-1) | An encoding error occurred. The next *`count`* or fewer bytes do not contribute to a complete and valid multibyte character. In this case, **errno** is set to EILSEQ and the conversion state in *`mbstate`* is unspecified. | ## Remarks -The **mbrlen** function inspects at most *count* bytes starting with the byte pointed to by *str* to determine the number of bytes that are required to complete the next multibyte character, including any shift sequences. It is equivalent to the call `mbrtowc(NULL, str, count, &mbstate)` where *mbstate* is either a user-provided **mbstate_t** object, or a static internal object provided by the library. +The **mbrlen** function inspects at most *`count`* bytes starting with the byte pointed to by *`str`* to determine the number of bytes that are required to complete the next multibyte character, including any shift sequences. It is equivalent to the call `mbrtowc(NULL, str, count, &mbstate)` where *`mbstate`* is either a user-provided **mbstate_t** object, or a static internal object provided by the library. -The **mbrlen** function saves and uses the shift state of an incomplete multibyte character in the *mbstate* parameter. This gives **mbrlen** the capability of restarting in the middle of a multibyte character if need be, examining at most *count* bytes. If *mbstate* is a null pointer, **mbrlen** uses an internal, static **mbstate_t** object to store the shift state. Because the internal **mbstate_t** object is not thread-safe, we recommend that you always allocate and pass your own *mbstate* parameter. +The **mbrlen** function saves and uses the shift state of an incomplete multibyte character in the *`mbstate`* parameter. This gives **mbrlen** the capability of restarting in the middle of a multibyte character if need be, examining at most *`count`* bytes. If *`mbstate`* is a null pointer, **mbrlen** uses an internal, static **mbstate_t** object to store the shift state. Because the internal **mbstate_t** object is not thread-safe, we recommend that you always allocate and pass your own *`mbstate`* parameter. -The **mbrlen** function differs from [_mbclen, mblen, _mblen_l](mbclen-mblen-mblen-l.md) by its restartability. The shift state is stored in *mbstate* for subsequent calls to the same or other restartable functions. Results are undefined when mixing the use of restartable and nonrestartable functions. For example, an application should use **wcsrlen** instead of **wcslen** if a subsequent call to **wcsrtombs** is used instead of **wcstombs**. +The **mbrlen** function differs from [`_mbclen`, `mblen`, `_mblen_l`](mbclen-mblen-mblen-l.md) by its restartability. The shift state is stored in *`mbstate`* for subsequent calls to the same or other restartable functions. Results are undefined when mixing the use of restartable and nonrestartable functions. For example, an application should use **wcsrlen** instead of **wcslen** if a subsequent call to **wcsrtombs** is used instead of **wcstombs**. 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| |---------------------|------------------------------------|--------------------|-----------------------| @@ -68,7 +68,7 @@ By default, this function's global state is scoped to the application. To change |-------------|---------------------| |**mbrlen**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -134,5 +134,5 @@ Character count: 25 ## See also -[String Manipulation](../../c-runtime-library/string-manipulation-crt.md)
-[Locale](../../c-runtime-library/locale.md)
+[String manipulation](../string-manipulation-crt.md)\ +[Locale](../locale.md) diff --git a/docs/c-runtime-library/reference/mbrtoc16-mbrtoc323.md b/docs/c-runtime-library/reference/mbrtoc16-mbrtoc323.md index 89312f63140..79a87bcc381 100644 --- a/docs/c-runtime-library/reference/mbrtoc16-mbrtoc323.md +++ b/docs/c-runtime-library/reference/mbrtoc16-mbrtoc323.md @@ -34,39 +34,39 @@ size_t mbrtoc32( ### Parameters -*destination*\ +*`destination`*\ Pointer to the **`char16_t`** or **`char32_t`** equivalent of the UTF-8 multibyte character to convert. If null, the function doesn't store a value. -*source*\ +*`source`*\ Pointer to the UTF-8 multibyte character string to convert. -*max_bytes*\ -The maximum number of bytes in *source* to examine for a character to convert. This argument should be a value between one and the number of bytes, including any null terminator, remaining in *source*. +*`max_bytes`*\ +The maximum number of bytes in *`source`* to examine for a character to convert. This argument should be a value between one and the number of bytes, including any null terminator, remaining in *`source`*. -*state*\ +*`state`*\ Pointer to a **mbstate_t** conversion state object used to interpret the UTF-8 multibyte string to one or more output characters. ## Return value -On success, returns the value of the first of these conditions that applies, given the current *state* value: +On success, returns the value of the first of these conditions that applies, given the current *`state`* value: |Value|Condition| |-----------|---------------| -|0|The next *max_bytes* or fewer characters converted from *source* correspond to the null wide character, which is the value stored if *destination* isn't null.

*state* contains the initial shift state.| -|Between 1 and *max_bytes*, inclusive|The value returned is the number of bytes of *source* that complete a valid multibyte character. The converted wide character is stored if *destination* isn't null.| -|-3|The next wide character resulting from a previous call to the function has been stored in *destination* if *destination* isn't null. No bytes from *source* are consumed by this call to the function.

When *source* points to a UTF-8 multibyte character that requires more than one wide character to represent (for example, a surrogate pair), then the *state* value is updated so that the next function call writes out the additional character.| -|-2|The next *max_bytes* bytes represent an incomplete, but potentially valid, UTF-8 multibyte character. No value is stored in *destination*. This result can occur if *max_bytes* is zero.| -|-1|An encoding error has occurred. The next *max_bytes* or fewer bytes do not contribute to a complete and valid UTF-8 multibyte character. No value is stored in *destination*.

**EILSEQ** is stored in **errno** and the conversion state value *state* is unspecified.| +|0|The next *`max_bytes`* or fewer characters converted from *`source`* correspond to the null wide character, which is the value stored if *`destination`* isn't null.

*`state`* contains the initial shift state.| +|Between 1 and *`max_bytes`*, inclusive|The value returned is the number of bytes of *`source`* that complete a valid multibyte character. The converted wide character is stored if *`destination`* isn't null.| +|-3|The next wide character resulting from a previous call to the function has been stored in *`destination`* if *`destination`* isn't null. No bytes from *`source`* are consumed by this call to the function.

When *`source`* points to a UTF-8 multibyte character that requires more than one wide character to represent (for example, a surrogate pair), then the *`state`* value is updated so that the next function call writes out the additional character.| +|-2|The next *`max_bytes`* bytes represent an incomplete, but potentially valid, UTF-8 multibyte character. No value is stored in *`destination`*. This result can occur if *`max_bytes`* is zero.| +|-1|An encoding error has occurred. The next *`max_bytes`* or fewer bytes do not contribute to a complete and valid UTF-8 multibyte character. No value is stored in *`destination`*.

**EILSEQ** is stored in **errno** and the conversion state value *`state`* is unspecified.| ## Remarks -The **mbrtoc16** function reads up to *max_bytes* bytes from *source* to find the first complete, valid UTF-8 multibyte character, and then stores the equivalent UTF-16 character in *destination*. If the character requires more than one UTF-16 output character, such as a surrogate pair, then the *state* value is set to store the next UTF-16 character in *destination* on the next call to **mbrtoc16**. The **mbrtoc32** function is identical, but output is stored as a UTF-32 character. +The **mbrtoc16** function reads up to *`max_bytes`* bytes from *`source`* to find the first complete, valid UTF-8 multibyte character, and then stores the equivalent UTF-16 character in *`destination`*. If the character requires more than one UTF-16 output character, such as a surrogate pair, then the *`state`* value is set to store the next UTF-16 character in *`destination`* on the next call to **mbrtoc16**. The **mbrtoc32** function is identical, but output is stored as a UTF-32 character. -If *source* is null, these functions return the equivalent of a call made using arguments of **NULL** for *destination*, `""` (an empty, null-terminated string) for *source*, and 1 for *max_bytes*. The passed values of *destination* and *max_bytes* are ignored. +If *`source`* is null, these functions return the equivalent of a call made using arguments of **NULL** for *`destination`*, `""` (an empty, null-terminated string) for *`source`*, and 1 for *`max_bytes`*. The passed values of *`destination`* and *`max_bytes`* are ignored. -If *source* isn't null, the function starts at the beginning of the string and inspects up to *max_bytes* bytes to determine the number of bytes required to complete the next UTF-8 multibyte character, including any shift sequences. If the examined bytes contain a valid and complete UTF-8 multibyte character, the function converts the character into the equivalent 16-bit or 32-bit wide character or characters. If *destination* isn't null, the function stores the first (and possibly only) result character in destination. If additional output characters are required, a value is set in *state*, so that subsequent calls to the function output the additional characters and return the value -3. If no more output characters are required, then *state* is set to the initial shift state. +If *`source`* isn't null, the function starts at the beginning of the string and inspects up to *`max_bytes`* bytes to determine the number of bytes required to complete the next UTF-8 multibyte character, including any shift sequences. If the examined bytes contain a valid and complete UTF-8 multibyte character, the function converts the character into the equivalent 16-bit or 32-bit wide character or characters. If *`destination`* isn't null, the function stores the first (and possibly only) result character in destination. If additional output characters are required, a value is set in *`state`*, so that subsequent calls to the function output the additional characters and return the value -3. If no more output characters are required, then *`state`* is set to the initial shift state. -To convert non-UTF-8 multibyte characters to UTF-16 LE characters, use the [mbrtowc](mbrtowc.md), [mbtowc, or _mbtowc_l](mbtowc-mbtowc-l.md) functions. +To convert non-UTF-8 multibyte characters to UTF-16 LE characters, use the [`mbrtowc`](mbrtowc.md), [mbtowc, or _mbtowc_l](mbtowc-mbtowc-l.md) functions. 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). @@ -83,7 +83,7 @@ For more compatibility information, see [Compatibility](../compatibility.md). [Data conversion](../data-conversion.md)\ [Locale](../locale.md)\ [Interpretation of multibyte-character sequences](../interpretation-of-multibyte-character-sequences.md)\ -[c16rtomb, c32rtomb](c16rtomb-c32rtomb1.md)\ -[mbrtowc](mbrtowc.md)\ -[mbsrtowcs](mbsrtowcs.md)\ -[mbsrtowcs_s](mbsrtowcs-s.md) +[`c16rtomb`, `c32rtomb`](c16rtomb-c32rtomb1.md)\ +[`mbrtowc`](mbrtowc.md)\ +[`mbsrtowcs`](mbsrtowcs.md)\ +[`mbsrtowcs_s`](mbsrtowcs-s.md) diff --git a/docs/c-runtime-library/reference/mbrtowc.md b/docs/c-runtime-library/reference/mbrtowc.md index 966c5529854..0e335fe57da 100644 --- a/docs/c-runtime-library/reference/mbrtowc.md +++ b/docs/c-runtime-library/reference/mbrtowc.md @@ -27,45 +27,45 @@ size_t mbrtowc( ### Parameters -*wchar*
+*`wchar`*\ Address of a wide character to receive the converted wide character string (type **`wchar_t`**). This value can be a null pointer if no return wide character is required. -*mbchar*
+*`mbchar`*\ Address of a sequence of bytes (a multibyte character). -*count*
+*`count`*\ Number of bytes to check. -*mbstate*
-Pointer to conversion state object. If this value is a null pointer, the function uses a static internal conversion state object. Because the internal **mbstate_t** object is not thread-safe, we recommend that you always pass your own *mbstate* argument. +*`mbstate`*\ +Pointer to conversion state object. If this value is a null pointer, the function uses a static internal conversion state object. Because the internal **mbstate_t** object is not thread-safe, we recommend that you always pass your own *`mbstate`* argument. -## Return Value +## Return value One of the following values: 0 -The next *count* or fewer bytes complete the multibyte character that represents the null wide character, which is stored in *wchar*, if *wchar* is not a null pointer. +The next *`count`* or fewer bytes complete the multibyte character that represents the null wide character, which is stored in *`wchar`*, if *`wchar`* is not a null pointer. -1 to *count*, inclusive -The next *count* or fewer bytes complete a valid multibyte character. The value returned is the number of bytes that complete the multibyte character. The wide character equivalent is stored in *wchar*, if *wchar* is not a null pointer. +1 to *`count`*, inclusive +The next *`count`* or fewer bytes complete a valid multibyte character. The value returned is the number of bytes that complete the multibyte character. The wide character equivalent is stored in *`wchar`*, if *`wchar`* is not a null pointer. (size_t)(-1) -An encoding error occurred. The next *count* or fewer bytes do not contribute to a complete and valid multibyte character. In this case, **errno** is set to EILSEQ and the conversion shift state in *mbstate* is unspecified. +An encoding error occurred. The next *`count`* or fewer bytes do not contribute to a complete and valid multibyte character. In this case, **errno** is set to EILSEQ and the conversion shift state in *`mbstate`* is unspecified. (size_t)(-2) -The next *count* bytes contribute to an incomplete but potentially valid multibyte character, and all *count* bytes have been processed. No value is stored in *wchar*, but *mbstate* is updated to restart the function. +The next *`count`* bytes contribute to an incomplete but potentially valid multibyte character, and all *`count`* bytes have been processed. No value is stored in *`wchar`*, but *`mbstate`* is updated to restart the function. ## Remarks -If *mbchar* is a null pointer, the function is equivalent to the call: +If *`mbchar`* is a null pointer, the function is equivalent to the call: `mbrtowc(NULL, "", 1, &mbstate)` -In this case, the value of the arguments *wchar* and *count* are ignored. +In this case, the value of the arguments *`wchar`* and *`count`* are ignored. -If *mbchar* is not a null pointer, the function examines *count* bytes from *mbchar* to determine the required number of bytes that are required to complete the next multibyte character. If the next character is valid, the corresponding multibyte character is stored in *wchar* if it is not a null pointer. If the character is the corresponding wide null character, the resulting state of *mbstate* is the initial conversion state. +If *`mbchar`* is not a null pointer, the function examines *`count`* bytes from *`mbchar`* to determine the required number of bytes that are required to complete the next multibyte character. If the next character is valid, the corresponding multibyte character is stored in *`wchar`* if it is not a null pointer. If the character is the corresponding wide null character, the resulting state of *`mbstate`* is the initial conversion state. -The **mbrtowc** function differs from [mbtowc, _mbtowc_l](mbtowc-mbtowc-l.md) by its restartability. The conversion state is stored in *mbstate* for subsequent calls to the same or other restartable functions. Results are undefined when mixing the use of restartable and nonrestartable functions. For example, an application should use **wcsrlen** instead of **wcslen** if a subsequent call to **wcsrtombs** is used instead of **wcstombs**. +The **mbrtowc** function differs from [`mbtowc`, `_mbtowc_l`](mbtowc-mbtowc-l.md) by its restartability. The conversion state is stored in *`mbstate`* for subsequent calls to the same or other restartable functions. Results are undefined when mixing the use of restartable and nonrestartable functions. For example, an application should use **wcsrlen** instead of **wcslen** if a subsequent call to **wcsrtombs** is used instead of **wcstombs**. 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). @@ -179,7 +179,7 @@ int main(int argc, char* argv[]) } ``` -### Sample Output +### Sample output ```Output Locale set to: "French_Canada.1252" @@ -196,6 +196,6 @@ WC String: AaBbCcÜïα∩≡xXyYzZ ## See also -[Data Conversion](../../c-runtime-library/data-conversion.md)
-[Locale](../../c-runtime-library/locale.md)
-[Interpretation of Multibyte-Character Sequences](../../c-runtime-library/interpretation-of-multibyte-character-sequences.md)
+[Data conversion](../data-conversion.md)\ +[Locale](../locale.md)\ +[Interpretation of multibyte-character sequences](../interpretation-of-multibyte-character-sequences.md) diff --git a/docs/c-runtime-library/reference/mbsbtype-mbsbtype-l.md b/docs/c-runtime-library/reference/mbsbtype-mbsbtype-l.md index 845b09e8db4..3787fd9e436 100644 --- a/docs/c-runtime-library/reference/mbsbtype-mbsbtype-l.md +++ b/docs/c-runtime-library/reference/mbsbtype-mbsbtype-l.md @@ -33,16 +33,16 @@ int _mbsbtype_l( ### Parameters -*mbstr*
+*`mbstr`*\ Address of a sequence of multibyte characters. -*count*
+*`count`*\ Byte offset from head of string. -*locale*
+*`locale`*\ Locale to use. -## Return Value +## Return value **_mbsbtype** and **_mbsbtype_l** returns an integer value indicating the result of the test on the specified byte. The manifest constants in the following table are defined in Mbctype.h. @@ -51,15 +51,15 @@ Locale to use. |**_MBC_SINGLE** (0)|Single-byte character. For example, in code page 932, **_mbsbtype** returns 0 if the specified byte is within the range 0x20 - 0x7E or 0xA1 - 0xDF.| |**_MBC_LEAD** (1)|Lead byte of multibyte character. For example, in code page 932, **_mbsbtype** returns 1 if the specified byte is within the range 0x81 - 0x9F or 0xE0 - 0xFC.| |**_MBC_TRAIL** (2)|Trailing byte of multibyte character. For example, in code page 932, **_mbsbtype** returns 2 if the specified byte is within the range 0x40 - 0x7E or 0x80 - 0xFC.| -|**_MBC_ILLEGAL** (-1)|**NULL** string, invalid character, or null byte found before the byte at offset *count* in *mbstr*.| +|**_MBC_ILLEGAL** (-1)|**NULL** string, invalid character, or null byte found before the byte at offset *`count`* in *`mbstr`*.| ## Remarks -The **_mbsbtype** function determines the type of a byte in a multibyte character string. The function examines only the byte at offset *count* in *mbstr*, ignoring invalid characters before the specified byte. +The **_mbsbtype** function determines the type of a byte in a multibyte character string. The function examines only the byte at offset *`count`* in *`mbstr`*, ignoring invalid characters before the specified byte. -The output value is affected by the setting of the **LC_CTYPE** category setting of the locale; see [setlocale](setlocale-wsetlocale.md) for more information. The version of this function without the **_l** suffix uses the current locale for this locale-dependent behavior; the version with the **_l** suffix is identical except that it use the locale parameter passed in instead. For more information, see [Locale](../../c-runtime-library/locale.md). +The output value is affected by the setting of the **LC_CTYPE** category setting of the locale; see [`setlocale`](setlocale-wsetlocale.md) for more information. The version of this function without the **_l** suffix uses the current locale for this locale-dependent behavior; the version with the **_l** suffix is identical except that it use the locale parameter passed in instead. For more information, see [Locale](../locale.md). -If the input string is **NULL**, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, **errno** is set to **EINVAL** and the function returns **_MBC_ILLEGAL**. +If the input string is **NULL**, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, **errno** is set to **EINVAL** and the function returns **_MBC_ILLEGAL**. 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). @@ -72,8 +72,8 @@ By default, this function's global state is scoped to the application. To change \* For manifest constants used as return values. -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Byte Classification](../../c-runtime-library/byte-classification.md)
+[Byte classification](../byte-classification.md) diff --git a/docs/c-runtime-library/reference/mbsinit.md b/docs/c-runtime-library/reference/mbsinit.md index 5b6a3150ac8..ed8bba3ba16 100644 --- a/docs/c-runtime-library/reference/mbsinit.md +++ b/docs/c-runtime-library/reference/mbsinit.md @@ -24,12 +24,12 @@ int mbsinit( ### Parameters -*ps*
-A pointer to an [mbstate_t](../../c-runtime-library/standard-types.md) variable. +*`ps`*\ +A pointer to an [`mbstate_t`](../standard-types.md) variable. -## Return Value +## Return value -Nonzero if *ps* is **NULL** or if not in the middle of a conversion. +Nonzero if *`ps`* is **NULL** or if not in the middle of a conversion. ## Remarks @@ -131,7 +131,7 @@ int main(int argc, char* argv[]) } ``` -### Sample Output +### Sample output ```Output Locale set to: "Japanese_Japan.932" @@ -145,4 +145,4 @@ WC String: AaBbCcxXyYzZ ## See also -[Byte Classification](../../c-runtime-library/byte-classification.md)
+[Byte classification](../byte-classification.md) diff --git a/docs/c-runtime-library/reference/mbsnbcat-mbsnbcat-l.md b/docs/c-runtime-library/reference/mbsnbcat-mbsnbcat-l.md index e3e0d05ec4a..354e3b51343 100644 --- a/docs/c-runtime-library/reference/mbsnbcat-mbsnbcat-l.md +++ b/docs/c-runtime-library/reference/mbsnbcat-mbsnbcat-l.md @@ -12,7 +12,7 @@ ms.assetid: aa0f1d30-0ddd-48d1-88eb-c6884b20fd91 --- # _mbsnbcat, _mbsnbcat_l -Appends, at most, the first **n** bytes of one multibyte-character string to another. More secure versions of these functions are available; see [_mbsnbcat_s, _mbsnbcat_s_l](mbsnbcat-s-mbsnbcat-s-l.md). +Appends, at most, the first **n** bytes of one multibyte-character string to another. More secure versions of these functions are available; see [`_mbsnbcat_s`, `_mbsnbcat_s_l`](mbsnbcat-s-mbsnbcat-s-l.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). @@ -48,41 +48,41 @@ unsigned char *_mbsnbcat_l( ### Parameters -*dest*
+*`dest`*\ Null-terminated multibyte-character destination string. -*src*
+*`src`*\ Null-terminated multibyte-character source string. -*count*
-Number of bytes from *src* to append to *dest*. +*`count`*\ +Number of bytes from *`src`* to append to *`dest`*. -*locale*
+*`locale`*\ Locale to use. -## Return Value +## Return value **_mbsnbcat** returns a pointer to the destination string. No return value is reserved to indicate an error. ## Remarks -The **_mbsnbcat** function appends, at most, the first *count* bytes of *src* to *dest*. If the byte immediately preceding the null character in *dest* is a lead byte, the initial byte of *src* overwrites this lead byte. Otherwise, the initial byte of *src* overwrites the terminating null character of *dest*. If a null byte appears in *src* before *count* bytes are appended, **_mbsnbcat** appends all bytes from *src*, up to the null character. If *count* is greater than the length of *src*, the length of *src* is used in place of *count*. The resulting string is terminated with a null character. If copying takes place between strings that overlap, the behavior is undefined. +The **_mbsnbcat** function appends, at most, the first *`count`* bytes of *`src`* to *`dest`*. If the byte immediately preceding the null character in *`dest`* is a lead byte, the initial byte of *`src`* overwrites this lead byte. Otherwise, the initial byte of *`src`* overwrites the terminating null character of *`dest`*. If a null byte appears in *`src`* before *`count`* bytes are appended, **_mbsnbcat** appends all bytes from *`src`*, up to the null character. If *`count`* is greater than the length of *`src`*, the length of *`src`* is used in place of *`count`*. The resulting string is terminated with a null character. If copying takes place between strings that overlap, the behavior is undefined. -The output value is affected by the setting of the **LC_CTYPE** category setting of the locale; see [setlocale](setlocale-wsetlocale.md) for more information. The **_mbsnbcat** version of the function uses the current locale for this locale-dependent behavior; the **_mbsnbcat_l** version is identical except that they use the locale parameter passed in instead. For more information, see [Locale](../../c-runtime-library/locale.md). +The output value is affected by the setting of the **LC_CTYPE** category setting of the locale; see [`setlocale`](setlocale-wsetlocale.md) for more information. The **_mbsnbcat** version of the function uses the current locale for this locale-dependent behavior; the **_mbsnbcat_l** version is identical except that they use the locale parameter passed in instead. For more information, see [Locale](../locale.md). -**Security Note** Use a null-terminated string. The null-terminated string must not exceed the size of the destination buffer. For more information, see [Avoiding Buffer Overruns](/windows/win32/SecBP/avoiding-buffer-overruns). +**Security Note** Use a null-terminated string. The null-terminated string must not exceed the size of the destination buffer. For more information, see [Avoiding buffer overruns](/windows/win32/SecBP/avoiding-buffer-overruns). -If *dest* or *src* is **NULL**, the function will generate an invalid parameter error, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If the error is handled, the function returns **EINVAL** and sets **errno** to **EINVAL**. +If *`dest`* or *`src`* is **NULL**, the function will generate an invalid parameter error, as described in [Parameter validation](../parameter-validation.md). If the error is handled, the function returns **EINVAL** and sets **errno** to **EINVAL**. -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 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| |---------------------|--------------------------------------|--------------------|-----------------------| -|**_tcsncat**|[strncat](strncat-strncat-l-wcsncat-wcsncat-l-mbsncat-mbsncat-l.md)|**_mbsnbcat**|[wcsncat](strncat-strncat-l-wcsncat-wcsncat-l-mbsncat-mbsncat-l.md)| +|**_tcsncat**|[`strncat`](strncat-strncat-l-wcsncat-wcsncat-l-mbsncat-mbsncat-l.md)|**_mbsnbcat**|[`wcsncat`](strncat-strncat-l-wcsncat-wcsncat-l-mbsncat-mbsncat-l.md)| |**_tcsncat_l**|**_strncat_l**|**_mbsnbcat_l**|**_wcsncat_l**| ## Requirements @@ -92,15 +92,15 @@ By default, this function's global state is scoped to the application. To change |**_mbsnbcat**|\| |**_mbsnbcat_l**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[String Manipulation](../../c-runtime-library/string-manipulation-crt.md)
-[_mbsnbcmp, _mbsnbcmp_l](mbsnbcmp-mbsnbcmp-l.md)
-[_strncnt, _wcsncnt, _mbsnbcnt, _mbsnbcnt_l, _mbsnccnt, _mbsnccnt_l](strncnt-wcsncnt-mbsnbcnt-mbsnbcnt-l-mbsnccnt-mbsnccnt-l.md)
-[_mbsnbcpy, _mbsnbcpy_l](mbsnbcpy-mbsnbcpy-l.md)
-[_mbsnbicmp, _mbsnbicmp_l](mbsnbicmp-mbsnbicmp-l.md)
-[_mbsnbset, _mbsnbset_l](mbsnbset-mbsnbset-l.md)
-[strncat, _strncat_l, wcsncat, _wcsncat_l, _mbsncat, _mbsncat_l](strncat-strncat-l-wcsncat-wcsncat-l-mbsncat-mbsncat-l.md)
-[_mbsnbcat_s, _mbsnbcat_s_l](mbsnbcat-s-mbsnbcat-s-l.md)
+[String manipulation](../string-manipulation-crt.md)\ +[`_mbsnbcmp`, `_mbsnbcmp_l`](mbsnbcmp-mbsnbcmp-l.md)\ +[`_strncnt`, `_wcsncnt`, `_mbsnbcnt`, `_mbsnbcnt_l`, `_mbsnccnt`, `_mbsnccnt_l`](strncnt-wcsncnt-mbsnbcnt-mbsnbcnt-l-mbsnccnt-mbsnccnt-l.md)\ +[`_mbsnbcpy`, `_mbsnbcpy_l`](mbsnbcpy-mbsnbcpy-l.md)\ +[`_mbsnbicmp`, `_mbsnbicmp_l`](mbsnbicmp-mbsnbicmp-l.md)\ +[`_mbsnbset`, `_mbsnbset_l`](mbsnbset-mbsnbset-l.md)\ +[`strncat`, `_strncat_l`, `wcsncat`, `_wcsncat_l`, `_mbsncat`, `_mbsncat_l`](strncat-strncat-l-wcsncat-wcsncat-l-mbsncat-mbsncat-l.md)\ +[`_mbsnbcat_s`, `_mbsnbcat_s_l`](mbsnbcat-s-mbsnbcat-s-l.md) diff --git a/docs/c-runtime-library/reference/mbsnbcat-s-mbsnbcat-s-l.md b/docs/c-runtime-library/reference/mbsnbcat-s-mbsnbcat-s-l.md index caf4600f7c0..3d679ebbe43 100644 --- a/docs/c-runtime-library/reference/mbsnbcat-s-mbsnbcat-s-l.md +++ b/docs/c-runtime-library/reference/mbsnbcat-s-mbsnbcat-s-l.md @@ -12,7 +12,7 @@ ms.assetid: 2c9e9be7-d979-4a54-8ada-23428b6648a9 --- # `_mbsnbcat_s`, `_mbsnbcat_s_l` -Appends to a multibyte character string, at most, the first **n** bytes of another multibyte-character string. These are versions of [`_mbsnbcat`, `_mbsnbcat_l`](mbsnbcat-mbsnbcat-l.md) that have security enhancements, as described in [Security Features in the CRT](../../c-runtime-library/security-features-in-the-crt.md). +Appends to a multibyte character string, at most, the first **n** bytes of another multibyte-character string. These are versions of [`_mbsnbcat`, `_mbsnbcat_l`](mbsnbcat-mbsnbcat-l.md) that have security enhancements, as described in [Security features in the CRT](../security-features-in-the-crt.md). > [!IMPORTANT] > This API cannot be used in applications that execute in the Windows Runtime. For more information, see [CRT functions not supported in Universal Windows Platform apps](../../cppcx/crt-functions-not-supported-in-universal-windows-platform-apps.md). @@ -65,11 +65,11 @@ Number of bytes from *`src`* to append to *`dest`*. *`locale`*\ Locale to use. -## Return Value +## Return value Zero if successful; otherwise, an error code. -### Error Conditions +### Error conditions |**`dest`**|*`sizeInBytes`*|*`src`*|Return value| |------------|-------------------|-----------|------------------| @@ -77,25 +77,25 @@ Zero if successful; otherwise, an error code. |Any|<= 0|any|**`EINVAL`**| |Any|any|**`NULL`**|**`EINVAL`**| -If any of the error conditions occurs, the function generates an invalid parameter error, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If the error is handled, the function returns **`EINVAL`** and sets **errno** to **`EINVAL`**. +If any of the error conditions occurs, the function generates an invalid parameter error, as described in [Parameter validation](../parameter-validation.md). If the error is handled, the function returns **`EINVAL`** and sets **errno** to **`EINVAL`**. ## Remarks The **`_mbsnbcat_s`** function appends to *`dest`*, at most, the first *`count`* bytes of *`src`*. If the byte that immediately precedes the null character in *`dest`* is a lead byte, it's overwritten by the initial byte of *`src`*. Otherwise, the initial byte of *`src`* overwrites the terminating null character of *`dest`*. If a null byte appears in *`src`* before *`count`* bytes are appended, **`_mbsnbcat_s`** appends all bytes from *`src`*, up to the null character. If *`count`* is greater than the length of *`src`*, the length of *`src`* is used in place of *`count`*. The resulting string is terminated by a null character. If copying takes place between strings that overlap, the behavior is undefined. -The output value is affected by the setting of the **`LC_CTYPE`** category setting of the locale; see [setlocale, _wsetlocale](setlocale-wsetlocale.md) for more information. The versions of these functions are identical, except that the ones that don't have the **`_l`** suffix use the current locale and the ones that do have the **`_l`** suffix instead use the locale parameter that's passed in. For more information, see [Locale](../../c-runtime-library/locale.md). +The output value is affected by the setting of the **`LC_CTYPE`** category setting of the locale; see [`setlocale`, `_wsetlocale`](setlocale-wsetlocale.md) for more information. The versions of these functions are identical, except that the ones that don't have the **`_l`** suffix use the current locale and the ones that do have the **`_l`** suffix instead use the locale parameter that's passed in. For more information, see [Locale](../locale.md). -In C++, the use of these functions is simplified by template overloads. The overloads can infer buffer length automatically which eliminates the need to specify a size argument, and they can automatically use their newer, more secure functions to replace older, less-secure functions. For more information, see [Secure Template Overloads](../../c-runtime-library/secure-template-overloads.md). +In C++, the use of these functions is simplified by template overloads. The overloads can infer buffer length automatically which eliminates the need to specify a size argument, and they can automatically use their newer, more secure functions to replace older, less-secure functions. For more information, see [Secure template overloads](../secure-template-overloads.md). The debug library versions of these functions first fill the buffer with 0xFE. To disable this behavior, use [`_CrtSetDebugFillThreshold`](crtsetdebugfillthreshold.md). By default, this function's global state is scoped to the application. To change this behavior, see [Global state in the CRT](../global-state.md). -### Generic-Text Routine Mappings +### Generic-text routine mappings |`Tchar.h` routine|`_UNICODE` and `_MBCS` not defined|`_MBCS` defined|`_UNICODE` defined| |---------------------|--------------------------------------|--------------------|-----------------------| -|**`_tcsncat_s`**|[strncat_s](strncat-s-strncat-s-l-wcsncat-s-wcsncat-s-l-mbsncat-s-mbsncat-s-l.md)|**`_mbsnbcat_s`**|[wcsncat_s](strncat-s-strncat-s-l-wcsncat-s-wcsncat-s-l-mbsncat-s-mbsncat-s-l.md)| +|**`_tcsncat_s`**|[`strncat_s`](strncat-s-strncat-s-l-wcsncat-s-wcsncat-s-l-mbsncat-s-mbsncat-s-l.md)|**`_mbsnbcat_s`**|[`wcsncat_s`](strncat-s-strncat-s-l-wcsncat-s-wcsncat-s-l-mbsncat-s-mbsncat-s-l.md)| |**`_tcsncat_s_l`**|**`_strncat_s_l`**|**`_mbsnbcat_s_l`**|**`_wcsncat_s_l`**| ## Requirements @@ -105,11 +105,11 @@ By default, this function's global state is scoped to the application. To change |**`_mbsnbcat_s`**|\| |**`_mbsnbcat_s_l`**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[String Manipulation](../../c-runtime-library/string-manipulation-crt.md)\ +[String manipulation](../string-manipulation-crt.md)\ [`_mbsnbcmp`, `_mbsnbcmp_l`](mbsnbcmp-mbsnbcmp-l.md)\ [`_strncnt`, `_wcsncnt`, `_mbsnbcnt`, `_mbsnbcnt_l`, `_mbsnccnt`, `_mbsnccnt_l`](strncnt-wcsncnt-mbsnbcnt-mbsnbcnt-l-mbsnccnt-mbsnccnt-l.md)\ [`_mbsnbcpy`, `_mbsnbcpy_l`](mbsnbcpy-mbsnbcpy-l.md)\ diff --git a/docs/c-runtime-library/reference/mbsnbcmp-mbsnbcmp-l.md b/docs/c-runtime-library/reference/mbsnbcmp-mbsnbcmp-l.md index 8bce8b750cd..865cd7a6d04 100644 --- a/docs/c-runtime-library/reference/mbsnbcmp-mbsnbcmp-l.md +++ b/docs/c-runtime-library/reference/mbsnbcmp-mbsnbcmp-l.md @@ -35,45 +35,45 @@ int _mbsnbcmp_l( ### Parameters -*string1*, *string2*
+*`string1`*, *`string2`*\ The strings to compare. -*count*
+*`count`*\ The number of bytes to compare. -*locale*
+*`locale`*\ The locale to use. -## Return Value +## Return value -The return value indicates the ordinal relationship between the substrings of *string1* and *string2*. +The return value indicates the ordinal relationship between the substrings of *`string1`* and *`string2`*. |Return value|Description| |------------------|-----------------| -|< 0|*string1* substring is less than *string2* substring.| -|0|*string1* substring is identical to *string2* substring.| -|> 0|*string1* substring is greater than *string2* substring.| +|< 0|*`string1`* substring is less than *`string2`* substring.| +|0|*`string1`* substring is identical to *`string2`* substring.| +|> 0|*`string1`* substring is greater than *`string2`* substring.| On a parameter validation error, **_mbsnbcmp** and **_mbsnbcmp_l** return **_NLSCMPERROR**, which is defined in \ and \. ## Remarks -The **_mbsnbcmp** functions compare at most the first *count* bytes in *string1* and *string2* and return a value that indicates the relationship between the substrings. **_mbsnbcmp** is a case-sensitive version of **_mbsnbicmp**. Unlike **_mbsnbcoll**, **_mbsnbcmp** is not affected by the collation order of the locale. **_mbsnbcmp** recognizes multibyte-character sequences according to the current multibyte [code page](../../c-runtime-library/code-pages.md). +The **_mbsnbcmp** functions compare at most the first *`count`* bytes in *`string1`* and *`string2`* and return a value that indicates the relationship between the substrings. **_mbsnbcmp** is a case-sensitive version of **_mbsnbicmp**. Unlike **_mbsnbcoll**, **_mbsnbcmp** is not affected by the collation order of the locale. **_mbsnbcmp** recognizes multibyte-character sequences according to the current multibyte [code page](../code-pages.md). **_mbsnbcmp** resembles **_mbsncmp**, except that **_mbsncmp** compares strings by characters rather than by bytes. -The output value is affected by the **LC_CTYPE** category setting of the locale, which specifies the lead bytes and trailing bytes of multibyte characters. For more information, see [setlocale](setlocale-wsetlocale.md). The **_mbsnbcmp** function uses the current locale for this locale-dependent behavior. The **_mbsnbcmp_l** function is identical except that it uses the *locale* parameter instead. For more information, see [Locale](../../c-runtime-library/locale.md). +The output value is affected by the **LC_CTYPE** category setting of the locale, which specifies the lead bytes and trailing bytes of multibyte characters. For more information, see [`setlocale`](setlocale-wsetlocale.md). The **_mbsnbcmp** function uses the current locale for this locale-dependent behavior. The **_mbsnbcmp_l** function is identical except that it uses the *`locale`* parameter instead. For more information, see [Locale](../locale.md). -If either *string1* or *string2* is a null pointer, these functions invoke the invalid parameter handler, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, the functions return **_NLSCMPERROR** and **errno** is set to **EINVAL**. +If either *`string1`* or *`string2`* is a null pointer, these functions invoke the invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, the functions return **_NLSCMPERROR** and **errno** is set to **EINVAL**. By default, this function's global state is scoped to the application. To change this behavior, see [Global state in the CRT](../global-state.md). -### Generic-Text Routine Mappings +### Generic-text routine mappings |Tchar.h routine|_UNICODE and _MBCS not defined|_MBCS defined|_UNICODE defined| |---------------------|---------------------------------------|--------------------|-----------------------| -|**_tcsncmp**|[strncmp](strncmp-wcsncmp-mbsncmp-mbsncmp-l.md)|**_mbsnbcmp**|[wcsncmp](strncmp-wcsncmp-mbsncmp-mbsncmp-l.md)| -|**_tcsncmp_l**|[strncmp](strncmp-wcsncmp-mbsncmp-mbsncmp-l.md)|**_mbsnbcml**|[wcsncmp](strncmp-wcsncmp-mbsncmp-mbsncmp-l.md)| +|**_tcsncmp**|[`strncmp`](strncmp-wcsncmp-mbsncmp-mbsncmp-l.md)|**_mbsnbcmp**|[`wcsncmp`](strncmp-wcsncmp-mbsncmp-mbsncmp-l.md)| +|**_tcsncmp_l**|[`strncmp`](strncmp-wcsncmp-mbsncmp-mbsncmp-l.md)|**_mbsnbcml**|[`wcsncmp`](strncmp-wcsncmp-mbsncmp-mbsncmp-l.md)| ## Requirements @@ -82,7 +82,7 @@ By default, this function's global state is scoped to the application. To change |**_mbsnbcmp**|\| |**_mbsnbcmp_l**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -137,10 +137,10 @@ Result: String 1 is equal to string 2 ## See also -[String Manipulation](../../c-runtime-library/string-manipulation-crt.md)
-[_mbsnbcat, _mbsnbcat_l](mbsnbcat-mbsnbcat-l.md)
-[_mbsnbicmp, _mbsnbicmp_l](mbsnbicmp-mbsnbicmp-l.md)
-[strncmp, wcsncmp, _mbsncmp, _mbsncmp_l](strncmp-wcsncmp-mbsncmp-mbsncmp-l.md)
-[_strnicmp, _wcsnicmp, _mbsnicmp, _strnicmp_l, _wcsnicmp_l, _mbsnicmp_l](strnicmp-wcsnicmp-mbsnicmp-strnicmp-l-wcsnicmp-l-mbsnicmp-l.md)
-[Locale](../../c-runtime-library/locale.md)
-[Interpretation of Multibyte-Character Sequences](../../c-runtime-library/interpretation-of-multibyte-character-sequences.md)
+[String manipulation](../string-manipulation-crt.md)\ +[`_mbsnbcat`, `_mbsnbcat_l`](mbsnbcat-mbsnbcat-l.md)\ +[`_mbsnbicmp`, `_mbsnbicmp_l`](mbsnbicmp-mbsnbicmp-l.md)\ +[`strncmp`, `wcsncmp`, `_mbsncmp`, `_mbsncmp_l`](strncmp-wcsncmp-mbsncmp-mbsncmp-l.md)\ +[`_strnicmp`, `_wcsnicmp`, `_mbsnicmp`, `_strnicmp_l`, `_wcsnicmp_l`, `_mbsnicmp_l`](strnicmp-wcsnicmp-mbsnicmp-strnicmp-l-wcsnicmp-l-mbsnicmp-l.md)\ +[Locale](../locale.md)\ +[Interpretation of multibyte-character sequences](../interpretation-of-multibyte-character-sequences.md) diff --git a/docs/c-runtime-library/reference/mbsnbcoll-mbsnbcoll-l-mbsnbicoll-mbsnbicoll-l.md b/docs/c-runtime-library/reference/mbsnbcoll-mbsnbcoll-l-mbsnbicoll-mbsnbicoll-l.md index be614a707ce..a57d7a9f22a 100644 --- a/docs/c-runtime-library/reference/mbsnbcoll-mbsnbcoll-l-mbsnbicoll-mbsnbicoll-l.md +++ b/docs/c-runtime-library/reference/mbsnbcoll-mbsnbcoll-l-mbsnbicoll-mbsnbicoll-l.md @@ -12,7 +12,7 @@ ms.assetid: d139ed63-ccba-4458-baa2-61cbcef03e94 --- # _mbsnbcoll, _mbsnbcoll_l, _mbsnbicoll, _mbsnbicoll_l -Compares *n* bytes of two multibyte-character strings by using multibyte code-page information. +Compares *`n`* bytes of two multibyte-character strings by using multibyte code-page information. > [!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). @@ -46,47 +46,47 @@ int _mbsnbicoll_l( ### Parameters -*string1*, *string2*
+*`string1`*, *`string2`*\ Strings to compare. -*count*
+*`count`*\ Number of bytes to compare. -*locale*
+*`locale`*\ Locale to use. -## Return Value +## Return value -The return value indicates the relation of the substrings of *string1* and *string2*. +The return value indicates the relation of the substrings of *`string1`* and *`string2`*. |Return value|Description| |------------------|-----------------| -|< 0|*string1* substring less than *string2* substring.| -|0|*string1* substring identical to *string2* substring.| -|> 0|*string1* substring greater than *string2* substring.| +|< 0|*`string1`* substring less than *`string2`* substring.| +|0|*`string1`* substring identical to *`string2`* substring.| +|> 0|*`string1`* substring greater than *`string2`* substring.| -If *string1* or *string2* is **NULL** or *count* is greater than **INT_MAX**, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, these functions return **_NLSCMPERROR** and set **errno** to **EINVAL**. To use **_NLSCMPERROR**, include either String.h or Mbstring.h. +If *`string1`* or *`string2`* is **NULL** or *`count`* is greater than **INT_MAX**, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, these functions return **_NLSCMPERROR** and set **errno** to **EINVAL**. To use **_NLSCMPERROR**, include either String.h or Mbstring.h. ## Remarks -Each of these functions collates, at most, the first *count* bytes in *string1* and *string2* and returns a value indicating the relationship between the resulting substrings of *string1* and *string2*. If the final byte in the substring of *string1* or *string2* is a lead byte, it is not included in the comparison; these functions compare only complete characters in the substrings. **_mbsnbicoll** is a case-insensitive version of **_mbsnbcoll**. Like [_mbsnbcmp](mbsnbcmp-mbsnbcmp-l.md) and [_mbsnbicmp](mbsnbicmp-mbsnbicmp-l.md), **_mbsnbcoll** and **_mbsnbicoll** collate the two multibyte-character strings according to the lexicographic order specified by the multibyte [code page](../../c-runtime-library/code-pages.md) currently in use. +Each of these functions collates, at most, the first *`count`* bytes in *`string1`* and *`string2`* and returns a value indicating the relationship between the resulting substrings of *`string1`* and *`string2`*. If the final byte in the substring of *`string1`* or *`string2`* is a lead byte, it is not included in the comparison; these functions compare only complete characters in the substrings. **_mbsnbicoll** is a case-insensitive version of **_mbsnbcoll**. Like [`_mbsnbcmp`](mbsnbcmp-mbsnbcmp-l.md) and [`_mbsnbicmp`](mbsnbicmp-mbsnbicmp-l.md), **_mbsnbcoll** and **_mbsnbicoll** collate the two multibyte-character strings according to the lexicographic order specified by the multibyte [code page](../code-pages.md) currently in use. For some code pages and corresponding character sets, the order of characters in the character set might differ from the lexicographic character order. In the "C" locale, this is not the case: the order of characters in the ASCII character set is the same as the lexicographic order of the characters. However, in certain European code pages, for example, the character 'a' (value 0x61) precedes the character 'ä' (value 0xE4) in the character set, but the character 'ä' precedes the character 'a' lexicographically. To perform a lexicographic comparison of strings by bytes in such an instance, use **_mbsnbcoll** rather than **_mbsnbcmp**; to check only for string equality, use **_mbsnbcmp**. Because the **coll** functions collate strings lexicographically for comparison, whereas the **cmp** functions simply test for string equality, the **coll** functions are much slower than the corresponding **cmp** versions. Therefore, the **coll** functions should be used only when there is a difference between the character set order and the lexicographic character order in the current code page and this difference is of interest for the comparison. -The output value is affected by the setting of the **LC_CTYPE** category setting of the locale; see [setlocale](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. For more information, see [Locale](../../c-runtime-library/locale.md). +The output value is affected by the setting of the **LC_CTYPE** category setting of the locale; see [`setlocale`](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. For more information, see [Locale](../locale.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| |---------------------|--------------------------------------|--------------------|-----------------------| -|**_tcsncoll**|[_strncoll](strncoll-wcsncoll-mbsncoll-strncoll-l-wcsncoll-l-mbsncoll-l.md)|**_mbsnbcoll**|[_wcsncoll](strncoll-wcsncoll-mbsncoll-strncoll-l-wcsncoll-l-mbsncoll-l.md)| -|**_tcsncoll_l**|[_strncoll, _wcsncoll, _mbsncoll, _strncoll_l, _wcsncoll_l, _mbsncoll_l](strncoll-wcsncoll-mbsncoll-strncoll-l-wcsncoll-l-mbsncoll-l.md)|**_mbsnbcoll_l**|[_wcsncoll_l](strncoll-wcsncoll-mbsncoll-strncoll-l-wcsncoll-l-mbsncoll-l.md)| -|**_tcsnicoll**|[_strnicoll](strnicoll-wcsnicoll-mbsnicoll-strnicoll-l-wcsnicoll-l-mbsnicoll-l.md)|**_mbsnbicoll**|[_wcsnicoll](strnicoll-wcsnicoll-mbsnicoll-strnicoll-l-wcsnicoll-l-mbsnicoll-l.md)| -|**_tcsnicoll_l**|[_strnicoll_l](strnicoll-wcsnicoll-mbsnicoll-strnicoll-l-wcsnicoll-l-mbsnicoll-l.md)|**_mbsnbicoll_l**|[_wcsnicoll_l](strnicoll-wcsnicoll-mbsnicoll-strnicoll-l-wcsnicoll-l-mbsnicoll-l.md)| +|**_tcsncoll**|[`_strncoll`](strncoll-wcsncoll-mbsncoll-strncoll-l-wcsncoll-l-mbsncoll-l.md)|**_mbsnbcoll**|[`_wcsncoll`](strncoll-wcsncoll-mbsncoll-strncoll-l-wcsncoll-l-mbsncoll-l.md)| +|**_tcsncoll_l**|[`_strncoll`, `_wcsncoll`, `_mbsncoll`, `_strncoll_l`, `_wcsncoll_l`, `_mbsncoll_l`](strncoll-wcsncoll-mbsncoll-strncoll-l-wcsncoll-l-mbsncoll-l.md)|**_mbsnbcoll_l**|[`_wcsncoll_l`](strncoll-wcsncoll-mbsncoll-strncoll-l-wcsncoll-l-mbsncoll-l.md)| +|**_tcsnicoll**|[`_strnicoll`](strnicoll-wcsnicoll-mbsnicoll-strnicoll-l-wcsnicoll-l-mbsnicoll-l.md)|**_mbsnbicoll**|[`_wcsnicoll`](strnicoll-wcsnicoll-mbsnicoll-strnicoll-l-wcsnicoll-l-mbsnicoll-l.md)| +|**_tcsnicoll_l**|[`_strnicoll_l`](strnicoll-wcsnicoll-mbsnicoll-strnicoll-l-wcsnicoll-l-mbsnicoll-l.md)|**_mbsnbicoll_l**|[`_wcsnicoll_l`](strnicoll-wcsnicoll-mbsnicoll-strnicoll-l-wcsnicoll-l-mbsnicoll-l.md)| ## Requirements @@ -97,14 +97,14 @@ By default, this function's global state is scoped to the application. To change |**_mbsnbicoll**|\| |**_mbsnbicoll_l**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[String Manipulation](../../c-runtime-library/string-manipulation-crt.md)
-[_mbsnbcat, _mbsnbcat_l](mbsnbcat-mbsnbcat-l.md)
-[_mbsnbcmp, _mbsnbcmp_l](mbsnbcmp-mbsnbcmp-l.md)
-[_mbsnbicmp, _mbsnbicmp_l](mbsnbicmp-mbsnbicmp-l.md)
-[strcoll Functions](../../c-runtime-library/strcoll-functions.md)
-[strncmp, wcsncmp, _mbsncmp, _mbsncmp_l](strncmp-wcsncmp-mbsncmp-mbsncmp-l.md)
-[_strnicmp, _wcsnicmp, _mbsnicmp, _strnicmp_l, _wcsnicmp_l, _mbsnicmp_l](strnicmp-wcsnicmp-mbsnicmp-strnicmp-l-wcsnicmp-l-mbsnicmp-l.md)
+[String manipulation](../string-manipulation-crt.md)\ +[`_mbsnbcat`, `_mbsnbcat_l`](mbsnbcat-mbsnbcat-l.md)\ +[`_mbsnbcmp`, `_mbsnbcmp_l`](mbsnbcmp-mbsnbcmp-l.md)\ +[`_mbsnbicmp`, `_mbsnbicmp_l`](mbsnbicmp-mbsnbicmp-l.md)\ +[`strcoll` functions](../strcoll-functions.md)\ +[`strncmp`, `wcsncmp`, `_mbsncmp`, `_mbsncmp_l`](strncmp-wcsncmp-mbsncmp-mbsncmp-l.md)\ +[`_strnicmp`, `_wcsnicmp`, `_mbsnicmp`, `_strnicmp_l`, `_wcsnicmp_l`, `_mbsnicmp_l`](strnicmp-wcsnicmp-mbsnicmp-strnicmp-l-wcsnicmp-l-mbsnicmp-l.md) diff --git a/docs/c-runtime-library/reference/mbsnbcpy-mbsnbcpy-l.md b/docs/c-runtime-library/reference/mbsnbcpy-mbsnbcpy-l.md index bc1c48ed450..83048676190 100644 --- a/docs/c-runtime-library/reference/mbsnbcpy-mbsnbcpy-l.md +++ b/docs/c-runtime-library/reference/mbsnbcpy-mbsnbcpy-l.md @@ -12,7 +12,7 @@ ms.assetid: 83d17b50-3cbf-4df9-bce8-3b6d52f85d04 --- # _mbsnbcpy, _mbsnbcpy_l -Copies **n** bytes of a string to a destination string. More secure versions of these functions are available—see [_mbsnbcpy_s, _mbsnbcpy_s_l](mbsnbcpy-s-mbsnbcpy-s-l.md). +Copies **n** bytes of a string to a destination string. More secure versions of these functions are available—see [`_mbsnbcpy_s`, `_mbsnbcpy_s_l`](mbsnbcpy-s-mbsnbcpy-s-l.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). @@ -48,42 +48,42 @@ unsigned char * _mbsnbcpy_l( ### Parameters -*strDest*
+*`strDest`*\ Destination for the character string to be copied. -*strSource*
+*`strSource`*\ Character string to be copied. -*count*
+*`count`*\ Number of bytes to be copied. -*locale*
+*`locale`*\ Locale to use. -## Return Value +## Return value **_mbsnbcpy** returns a pointer to the destination character string. No return value is reserved to indicate an error. ## Remarks -The **_mbsnbcpy** function copies *count* bytes from *strSource* to *strDest*. If *count* exceeds the size of *strDest* or the source and destination strings overlap, the behavior of **_mbsnbcpy** is undefined. +The **_mbsnbcpy** function copies *`count`* bytes from *`strSource`* to *`strDest`*. If *`count`* exceeds the size of *`strDest`* or the source and destination strings overlap, the behavior of **_mbsnbcpy** is undefined. -If *strSource* or *strDest* is a null pointer, this function invokes the invalid parameter handler as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, the function returns **NULL** and sets **errno** to **EINVAL**. +If *`strSource`* or *`strDest`* is a null pointer, this function invokes the invalid parameter handler as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, the function returns **NULL** and sets **errno** to **EINVAL**. -The output value is affected by the setting of the **LC_CTYPE** category setting of the locale; see [setlocale, _wsetlocale](setlocale-wsetlocale.md) for more information. The versions of these functions are identical, except that those that don't have the **_l** suffix use the current locale and the versions that do have the **_l** suffix instead use the locale parameter that's passed in. For more information, see [Locale](../../c-runtime-library/locale.md). +The output value is affected by the setting of the **LC_CTYPE** category setting of the locale; see [`setlocale`, `_wsetlocale`](setlocale-wsetlocale.md) for more information. The versions of these functions are identical, except that those that don't have the **_l** suffix use the current locale and the versions that do have the **_l** suffix instead use the locale parameter that's passed in. For more information, see [Locale](../locale.md). > [!IMPORTANT] -> These functions might be vulnerable to buffer overrun threats. Buffer overruns can be used to execute arbitrary attacker code, which can cause an unwarranted elevation of privilege and compromise the system. For more information, see [Avoiding Buffer Overruns](/windows/win32/SecBP/avoiding-buffer-overruns). +> These functions might be vulnerable to buffer overrun threats. Buffer overruns can be used to execute arbitrary attacker code, which can cause an unwarranted elevation of privilege and compromise the system. For more information, see [Avoiding buffer overruns](/windows/win32/SecBP/avoiding-buffer-overruns). -In C++, these functions have template overloads that invoke the newer, more 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, more 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 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| |---------------------|--------------------------------------|--------------------|-----------------------| -|**_tcsncpy**|[strncpy](strncpy-strncpy-l-wcsncpy-wcsncpy-l-mbsncpy-mbsncpy-l.md)|**_mbsnbcpy**|[wcsncpy](strncpy-strncpy-l-wcsncpy-wcsncpy-l-mbsncpy-mbsncpy-l.md)| +|**_tcsncpy**|[`strncpy`](strncpy-strncpy-l-wcsncpy-wcsncpy-l-mbsncpy-mbsncpy-l.md)|**_mbsnbcpy**|[`wcsncpy`](strncpy-strncpy-l-wcsncpy-wcsncpy-l-mbsncpy-mbsncpy-l.md)| |**_tcsncpy_l**|**_strncpy_l**|**_mbsnbcp_l**|**_wcsncpy_l**| ## Requirements @@ -93,13 +93,13 @@ By default, this function's global state is scoped to the application. To change |**_mbsnbcpy**|\| |**_mbsnbcpy_l**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[String Manipulation](../../c-runtime-library/string-manipulation-crt.md)
-[_mbsnbcat, _mbsnbcat_l](mbsnbcat-mbsnbcat-l.md)
-[_mbsnbcmp, _mbsnbcmp_l](mbsnbcmp-mbsnbcmp-l.md)
-[_strncnt, _wcsncnt, _mbsnbcnt, _mbsnbcnt_l, _mbsnccnt, _mbsnccnt_l](strncnt-wcsncnt-mbsnbcnt-mbsnbcnt-l-mbsnccnt-mbsnccnt-l.md)
-[_mbsnbset, _mbsnbset_l](mbsnbset-mbsnbset-l.md)
-[strncpy, _strncpy_l, wcsncpy, _wcsncpy_l, _mbsncpy, _mbsncpy_l](strncpy-strncpy-l-wcsncpy-wcsncpy-l-mbsncpy-mbsncpy-l.md)
+[String manipulation](../string-manipulation-crt.md)\ +[`_mbsnbcat`, `_mbsnbcat_l`](mbsnbcat-mbsnbcat-l.md)\ +[`_mbsnbcmp`, `_mbsnbcmp_l`](mbsnbcmp-mbsnbcmp-l.md)\ +[`_strncnt`, `_wcsncnt`, `_mbsnbcnt`, `_mbsnbcnt_l`, `_mbsnccnt`, `_mbsnccnt_l`](strncnt-wcsncnt-mbsnbcnt-mbsnbcnt-l-mbsnccnt-mbsnccnt-l.md)\ +[`_mbsnbset`, `_mbsnbset_l`](mbsnbset-mbsnbset-l.md)\ +[`strncpy`, `_strncpy_l`, `wcsncpy`, `_wcsncpy_l`, `_mbsncpy`, `_mbsncpy_l`](strncpy-strncpy-l-wcsncpy-wcsncpy-l-mbsncpy-mbsncpy-l.md) diff --git a/docs/c-runtime-library/reference/mbsnbcpy-s-mbsnbcpy-s-l.md b/docs/c-runtime-library/reference/mbsnbcpy-s-mbsnbcpy-s-l.md index 17f48132e5a..e669ee108e8 100644 --- a/docs/c-runtime-library/reference/mbsnbcpy-s-mbsnbcpy-s-l.md +++ b/docs/c-runtime-library/reference/mbsnbcpy-s-mbsnbcpy-s-l.md @@ -12,7 +12,7 @@ ms.assetid: dfff64ab-fe6f-49c4-99ba-75014e2b0cd6 --- # _mbsnbcpy_s, _mbsnbcpy_s_l -Copies **n** bytes of a string to a destination string. These versions of [_mbsnbcpy, _mbsnbcpy_l](mbsnbcpy-mbsnbcpy-l.md) have security enhancements, as described in [Security Features in the CRT](../../c-runtime-library/security-features-in-the-crt.md). +Copies **n** bytes of a string to a destination string. These versions of [`_mbsnbcpy`, `_mbsnbcpy_l`](mbsnbcpy-mbsnbcpy-l.md) have security enhancements, as described in [Security features in the CRT](../security-features-in-the-crt.md). > [!IMPORTANT] > This API cannot be used in applications that execute in the Windows Runtime. For more information, see [CRT functions not supported in Universal Windows Platform apps](../../cppcx/crt-functions-not-supported-in-universal-windows-platform-apps.md). @@ -50,41 +50,41 @@ errno_t _mbsnbcpy_s_l( ### Parameters -*strDest*
+*`strDest`*\ Destination for character string to be copied. -*sizeInBytes*
+*`sizeInBytes`*\ Destination buffer size. -*strSource*
+*`strSource`*\ Character string to be copied. -*count*
+*`count`*\ Number of bytes to be copied. -*locale*
+*`locale`*\ Locale to use. -## Return Value +## Return value Zero if successful; **EINVAL** if a bad parameter was passed in. ## Remarks -The **_mbsnbcpy_s** function copies *count* bytes from *strSource* to *strDest*. If *count* exceeds the size of *strDest*, either of the input strings is a null pointer, or *sizeInBytes* or *count* is 0, the function invokes the invalid parameter handler as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md) . If execution is allowed to continue, the function returns **EINVAL**. If the source and destination strings overlap, the behavior of **_mbsnbcpy_s** is undefined. +The **_mbsnbcpy_s** function copies *`count`* bytes from *`strSource`* to *`strDest`*. If *`count`* exceeds the size of *`strDest`*, either of the input strings is a null pointer, or *`sizeInBytes`* or *`count`* is 0, the function invokes the invalid parameter handler as described in [Parameter validation](../parameter-validation.md) . If execution is allowed to continue, the function returns **EINVAL**. If the source and destination strings overlap, the behavior of **_mbsnbcpy_s** is undefined. -The output value is affected by the setting of the **LC_CTYPE** category setting of the locale; see [setlocale](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. For more information, see [Locale](../../c-runtime-library/locale.md). +The output value is affected by the setting of the **LC_CTYPE** category setting of the locale; see [`setlocale`](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. For more information, see [Locale](../locale.md). > [!NOTE] > Unlike the non-secure version of this function, **_mbsnbcpy_s** does not do any null padding and always null terminates the string. -In C++, using these functions is simplified by template overloads; the overloads can infer buffer length automatically (eliminating the need to specify a size argument) and they can automatically replace older, non-secure functions with their newer, secure counterparts. For more information, see [Secure Template Overloads](../../c-runtime-library/secure-template-overloads.md). +In C++, using these functions is simplified by template overloads; the overloads can infer buffer length automatically (eliminating the need to specify a size argument) and they can automatically replace older, non-secure functions with their newer, secure counterparts. For more information, see [Secure template overloads](../secure-template-overloads.md). -The debug library versions of these functions first fill the buffer with 0xFE. To disable this behavior, use [_CrtSetDebugFillThreshold](crtsetdebugfillthreshold.md). +The debug library versions of these functions first fill the buffer with 0xFE. To disable this behavior, use [`_CrtSetDebugFillThreshold`](crtsetdebugfillthreshold.md). By default, this function's global state is scoped to the application. To change this behavior, see [Global state in the CRT](../global-state.md). -### Generic-Text Routine Mappings +### Generic-text routine mappings |Tchar.h routine|_UNICODE and _MBCS not defined|_MBCS defined|_UNICODE defined| |---------------------|--------------------------------------|--------------------|-----------------------| @@ -98,14 +98,14 @@ By default, this function's global state is scoped to the application. To change |**_mbsnbcpy_s**|\| |**_mbsnbcpy_s_l**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[String Manipulation](../../c-runtime-library/string-manipulation-crt.md)
-[_mbsnbcat, _mbsnbcat_l](mbsnbcat-mbsnbcat-l.md)
-[_mbsnbcmp, _mbsnbcmp_l](mbsnbcmp-mbsnbcmp-l.md)
-[_strncnt, _wcsncnt, _mbsnbcnt, _mbsnbcnt_l, _mbsnccnt, _mbsnccnt_l](strncnt-wcsncnt-mbsnbcnt-mbsnbcnt-l-mbsnccnt-mbsnccnt-l.md)
-[_mbsnbicmp, _mbsnbicmp_l](mbsnbicmp-mbsnbicmp-l.md)
-[_mbsnbset, _mbsnbset_l](mbsnbset-mbsnbset-l.md)
-[strncpy, _strncpy_l, wcsncpy, _wcsncpy_l, _mbsncpy, _mbsncpy_l](strncpy-strncpy-l-wcsncpy-wcsncpy-l-mbsncpy-mbsncpy-l.md)
+[String manipulation](../string-manipulation-crt.md)\ +[`_mbsnbcat`, `_mbsnbcat_l`](mbsnbcat-mbsnbcat-l.md)\ +[`_mbsnbcmp`, `_mbsnbcmp_l`](mbsnbcmp-mbsnbcmp-l.md)\ +[`_strncnt`, `_wcsncnt`, `_mbsnbcnt`, `_mbsnbcnt_l`, `_mbsnccnt`, `_mbsnccnt_l`](strncnt-wcsncnt-mbsnbcnt-mbsnbcnt-l-mbsnccnt-mbsnccnt-l.md)\ +[`_mbsnbicmp`, `_mbsnbicmp_l`](mbsnbicmp-mbsnbicmp-l.md)\ +[`_mbsnbset`, `_mbsnbset_l`](mbsnbset-mbsnbset-l.md)\ +[`strncpy`, `_strncpy_l`, `wcsncpy`, `_wcsncpy_l`, `_mbsncpy`, `_mbsncpy_l`](strncpy-strncpy-l-wcsncpy-wcsncpy-l-mbsncpy-mbsncpy-l.md) diff --git a/docs/c-runtime-library/reference/mbsnbicmp-mbsnbicmp-l.md b/docs/c-runtime-library/reference/mbsnbicmp-mbsnbicmp-l.md index b76b7773268..adca1228ce1 100644 --- a/docs/c-runtime-library/reference/mbsnbicmp-mbsnbicmp-l.md +++ b/docs/c-runtime-library/reference/mbsnbicmp-mbsnbicmp-l.md @@ -29,39 +29,39 @@ int _mbsnbicmp( ### Parameters -*string1*, *string2*
+*`string1`*, *`string2`*\ Null-terminated strings to compare. -*count*
+*`count`*\ Number of bytes to compare. -## Return Value +## Return value The return value indicates the relationship between the substrings. |Return value|Description| |------------------|-----------------| -|< 0|*string1* substring less than *string2* substring.| -|0|*string1* substring identical to *string2* substring.| -|> 0|*string1* substring greater than *string2* substring.| +|< 0|*`string1`* substring less than *`string2`* substring.| +|0|*`string1`* substring identical to *`string2`* substring.| +|> 0|*`string1`* substring greater than *`string2`* substring.| On an error, **_mbsnbicmp** returns **_NLSCMPERROR**, which is defined in String.h and Mbstring.h. ## Remarks -The **_mbsnbicmp** function performs an ordinal comparison of at most the first *count* bytes of *string1* and *string2*. The comparison is performed by converting each character to lowercase; [_mbsnbcmp](mbsnbcmp-mbsnbcmp-l.md) is a case-sensitive version of **_mbsnbicmp**. The comparison ends if a terminating null character is reached in either string before *count* characters are compared. If the strings are equal when a terminating null character is reached in either string before *count* characters are compared, the shorter string is lesser. +The **_mbsnbicmp** function performs an ordinal comparison of at most the first *`count`* bytes of *`string1`* and *`string2`*. The comparison is performed by converting each character to lowercase; [`_mbsnbcmp`](mbsnbcmp-mbsnbcmp-l.md) is a case-sensitive version of **_mbsnbicmp**. The comparison ends if a terminating null character is reached in either string before *`count`* characters are compared. If the strings are equal when a terminating null character is reached in either string before *`count`* characters are compared, the shorter string is lesser. -**_mbsnbicmp** is similar to [_mbsnbcmp](mbsnbcmp-mbsnbcmp-l.md), except that it compares strings up to *count* bytes instead of by characters. +**_mbsnbicmp** is similar to [`_mbsnbcmp`](mbsnbcmp-mbsnbcmp-l.md), except that it compares strings up to *`count`* bytes instead of by characters. Two strings containing characters located between 'Z' and 'a' in the ASCII table ('[', '\\', ']', '^', '_', and '\`') compare differently, depending on their case. For example, the two strings "ABCDE" and "ABCD^" compare one way if the comparison is lowercase ("abcde" > "abcd^") and the other way ("ABCDE" < "ABCD^") if it is uppercase. -**_mbsnbicmp** recognizes multibyte-character sequences according to the [multibyte code page](../../c-runtime-library/code-pages.md) currently in use. It is not affected by the current locale setting. +**_mbsnbicmp** recognizes multibyte-character sequences according to the [multibyte code page](../code-pages.md) currently in use. It is not affected by the current locale setting. -If either *string1* or *string2* is a null pointer, **_mbsnbicmp** invokes the invalid parameter handler as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, the function returns **_NLSCMPERROR** and sets **errno** to **EINVAL**. +If either *`string1`* or *`string2`* is a null pointer, **_mbsnbicmp** invokes the invalid parameter handler as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, the function returns **_NLSCMPERROR** and sets **errno** to **EINVAL**. By default, this function's global state is scoped to the application. To change this behavior, see [Global state in the CRT](../global-state.md). -### Generic-Text Routine Mappings +### Generic-text routine mappings |Tchar.h routine|_UNICODE and _MBCS not defined|_MBCS defined|_UNICODE defined| |---------------------|--------------------------------------|--------------------|-----------------------| @@ -74,15 +74,15 @@ By default, this function's global state is scoped to the application. To change |-------------|---------------------| |**_mbsnbicmp**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example -See the example for [_mbsnbcmp, _mbsnbcmp_l](mbsnbcmp-mbsnbcmp-l.md). +See the example for [`_mbsnbcmp`, `_mbsnbcmp_l`](mbsnbcmp-mbsnbcmp-l.md). ## See also -[String Manipulation](../../c-runtime-library/string-manipulation-crt.md)
-[_mbsnbcat, _mbsnbcat_l](mbsnbcat-mbsnbcat-l.md)
-[_mbsnbcmp, _mbsnbcmp_l](mbsnbcmp-mbsnbcmp-l.md)
-[_stricmp, _wcsicmp, _mbsicmp, _stricmp_l, _wcsicmp_l, _mbsicmp_l](stricmp-wcsicmp-mbsicmp-stricmp-l-wcsicmp-l-mbsicmp-l.md)
+[String manipulation](../string-manipulation-crt.md)\ +[`_mbsnbcat`, `_mbsnbcat_l`](mbsnbcat-mbsnbcat-l.md)\ +[`_mbsnbcmp`, `_mbsnbcmp_l`](mbsnbcmp-mbsnbcmp-l.md)\ +[`_stricmp`, `_wcsicmp`, `_mbsicmp`, `_stricmp_l`, `_wcsicmp_l`, `_mbsicmp_l`](stricmp-wcsicmp-mbsicmp-stricmp-l-wcsicmp-l-mbsicmp-l.md) diff --git a/docs/c-runtime-library/reference/mbsnbset-mbsnbset-l.md b/docs/c-runtime-library/reference/mbsnbset-mbsnbset-l.md index 12270db8731..b47c5a3bf33 100644 --- a/docs/c-runtime-library/reference/mbsnbset-mbsnbset-l.md +++ b/docs/c-runtime-library/reference/mbsnbset-mbsnbset-l.md @@ -12,7 +12,7 @@ ms.assetid: 8e46ef75-9a56-42d2-a522-a08450c67c19 --- # _mbsnbset, _mbsnbset_l -Sets the first **n** bytes of a multibyte-character string to a specified character. More secure versions of these functions are available; see [_mbsnbset_s, _mbsnbset_s_l](mbsnbset-s-mbsnbset-s-l.md). +Sets the first **n** bytes of a multibyte-character string to a specified character. More secure versions of these functions are available; see [`_mbsnbset_s`, `_mbsnbset_s_l`](mbsnbset-s-mbsnbset-s-l.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). @@ -35,37 +35,37 @@ unsigned char *_mbsnbset_l( ### Parameters -*str*
+*`str`*\ String to be altered. -*c*
+*`c`*\ Single-byte or multibyte-character setting. -*count*
+*`count`*\ Number of bytes to be set. -*locale*
+*`locale`*\ Locale to use. -## Return Value +## Return value **_mbsnbset** returns a pointer to the altered string. ## Remarks -The **_mbsnbset** and **_mbsnbset_l** functions set, at most, the first *count* bytes of *str* to *c*. If *count* is greater than the length of *str*, the length of *str* is used instead of *count*. If *c* is a multibyte character and cannot be set entirely into the last byte specified by *count*, the last byte is padded with a blank character. **_mbsnbset** and **_mbsnbset_l** does not place a terminating null at the end of *str*. +The **_mbsnbset** and **_mbsnbset_l** functions set, at most, the first *`count`* bytes of *`str`* to *`c`*. If *`count`* is greater than the length of *`str`*, the length of *`str`* is used instead of *`count`*. If *`c`* is a multibyte character and cannot be set entirely into the last byte specified by *`count`*, the last byte is padded with a blank character. **_mbsnbset** and **_mbsnbset_l** does not place a terminating null at the end of *`str`*. -**_mbsnbset** and **_mbsnbset_l** is similar to **_mbsnset**, except that it sets *count* bytes rather than *count* characters of *c*. +**_mbsnbset** and **_mbsnbset_l** is similar to **_mbsnset**, except that it sets *`count`* bytes rather than *`count`* characters of *`c`*. -If *str* is **NULL** or *count* is zero, this function generates an invalid parameter exception as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, **errno** is set to **EINVAL** and the function returns **NULL**. Also, if *c* is not a valid multibyte character, **errno** is set to **EINVAL** and a space is used instead. +If *`str`* is **NULL** or *`count`* is zero, this function generates an invalid parameter exception as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, **errno** is set to **EINVAL** and the function returns **NULL**. Also, if *`c`* is not a valid multibyte character, **errno** is set to **EINVAL** and a space is used instead. -The output value is affected by the setting of the **LC_CTYPE** category setting of the locale; see [setlocale](setlocale-wsetlocale.md) for more information. The **_mbsnbset** version of this function uses the current locale for this locale-dependent behavior; the **_mbsnbset_l** version is identical except that it use the locale parameter passed in instead. For more information, see [Locale](../../c-runtime-library/locale.md). +The output value is affected by the setting of the **LC_CTYPE** category setting of the locale; see [`setlocale`](setlocale-wsetlocale.md) for more information. The **_mbsnbset** version of this function uses the current locale for this locale-dependent behavior; the **_mbsnbset_l** version is identical except that it use the locale parameter passed in instead. For more information, see [Locale](../locale.md). -**Security Note** This API incurs a potential threat brought about by a buffer overrun problem. Buffer overrun problems are a frequent method of system attack, resulting in an unwarranted elevation of privilege. For more information, see [Avoiding Buffer Overruns](/windows/win32/SecBP/avoiding-buffer-overruns). +**Security Note** This API incurs a potential threat brought about by a buffer overrun problem. Buffer overrun problems are a frequent method of system attack, resulting in an unwarranted elevation of privilege. For more information, see [Avoiding buffer overruns](/windows/win32/SecBP/avoiding-buffer-overruns). 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| |---------------------|--------------------------------------|--------------------|-----------------------| @@ -79,7 +79,7 @@ By default, this function's global state is scoped to the application. To change |**_mbsnbset**|\| |**_mbsnbset_l**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -109,7 +109,7 @@ After: **** is a test ## See also -[String Manipulation](../../c-runtime-library/string-manipulation-crt.md)
-[_mbsnbcat, _mbsnbcat_l](mbsnbcat-mbsnbcat-l.md)
-[_strnset, _strnset_l, _wcsnset, _wcsnset_l, _mbsnset, _mbsnset_l](strnset-strnset-l-wcsnset-wcsnset-l-mbsnset-mbsnset-l.md)
-[_strset, _strset_l, _wcsset, _wcsset_l, _mbsset, _mbsset_l](strset-strset-l-wcsset-wcsset-l-mbsset-mbsset-l.md)
+[String manipulation](../string-manipulation-crt.md)\ +[`_mbsnbcat`, `_mbsnbcat_l`](mbsnbcat-mbsnbcat-l.md)\ +[`_strnset`, `_strnset_l`, `_wcsnset`, `_wcsnset_l`, `_mbsnset`, `_mbsnset_l`](strnset-strnset-l-wcsnset-wcsnset-l-mbsnset-mbsnset-l.md)\ +[`_strset`, `_strset_l`, `_wcsset`, `_wcsset_l`, `_mbsset`, `_mbsset_l`](strset-strset-l-wcsset-wcsset-l-mbsset-mbsset-l.md) diff --git a/docs/c-runtime-library/reference/mbsnbset-s-mbsnbset-s-l.md b/docs/c-runtime-library/reference/mbsnbset-s-mbsnbset-s-l.md index e470d577c44..42585a1cda2 100644 --- a/docs/c-runtime-library/reference/mbsnbset-s-mbsnbset-s-l.md +++ b/docs/c-runtime-library/reference/mbsnbset-s-mbsnbset-s-l.md @@ -12,7 +12,7 @@ ms.assetid: 811f92c9-cc31-4bbd-8017-2d1bfc6fb96f --- # _mbsnbset_s, _mbsnbset_s_l -Sets the first **n** bytes of a multibyte-character string to a specified character. These versions of [_mbsnbset, _mbsnbset_l](mbsnbset-mbsnbset-l.md) have security enhancements, as described in [Security Features in the CRT](../../c-runtime-library/security-features-in-the-crt.md). +Sets the first **n** bytes of a multibyte-character string to a specified character. These versions of [`_mbsnbset`, `_mbsnbset_l`](mbsnbset-mbsnbset-l.md) have security enhancements, as described in [Security features in the CRT](../security-features-in-the-crt.md). > [!IMPORTANT] > This API cannot be used in applications that execute in the Windows Runtime. For more information, see [CRT functions not supported in Universal Windows Platform apps](../../cppcx/crt-functions-not-supported-in-universal-windows-platform-apps.md). @@ -50,42 +50,42 @@ errno_t _mbsnbset_s_l( ### Parameters -*str*
+*`str`*\ String to be altered. -*size*
+*`size`*\ The size of the string buffer. -*c*
+*`c`*\ Single-byte or multibyte-character setting. -*count*
+*`count`*\ Number of bytes to be set. -*locale*
+*`locale`*\ Locale to use. -## Return Value +## Return value Zero if successful; otherwise, an error code. ## Remarks -The **_mbsnbset_s** and **_mbsnbset_s_l** functions set, at most, the first *count* bytes of *str* to *c*. If *count* is greater than the length of *str*, the length of *str* is used instead of *count*. If *c* is a multibyte character and cannot be set entirely into the last byte that's specified by *count*, the last byte is padded with a blank character. **_mbsnbset_s** and **_mbsnbset_s_l** do not place a terminating null at the end of *str*. +The **_mbsnbset_s** and **_mbsnbset_s_l** functions set, at most, the first *`count`* bytes of *`str`* to *`c`*. If *`count`* is greater than the length of *`str`*, the length of *`str`* is used instead of *`count`*. If *`c`* is a multibyte character and cannot be set entirely into the last byte that's specified by *`count`*, the last byte is padded with a blank character. **_mbsnbset_s** and **_mbsnbset_s_l** do not place a terminating null at the end of *`str`*. -**_mbsnbset_s** and **_mbsnbset_s_l** resemble **_mbsnset**, except that they set *count* bytes rather than *count* characters of *c*. +**_mbsnbset_s** and **_mbsnbset_s_l** resemble **_mbsnset**, except that they set *`count`* bytes rather than *`count`* characters of *`c`*. -If *str* is **NULL** or *count* is zero, this function generates an invalid parameter exception, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, **errno** is set to **EINVAL** and the function returns **NULL**. Also, if *c* is not a valid multibyte character, **errno** is set to **EINVAL** and a space is used instead. +If *`str`* is **NULL** or *`count`* is zero, this function generates an invalid parameter exception, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, **errno** is set to **EINVAL** and the function returns **NULL**. Also, if *`c`* is not a valid multibyte character, **errno** is set to **EINVAL** and a space is used instead. -The output value is affected by the setting of the **LC_CTYPE** category setting of the locale; see [setlocale, _wsetlocale](setlocale-wsetlocale.md) for more information. The **_mbsnbset_s** version of this function uses the current locale for this locale-dependent behavior; the **_mbsnbset_s_l** version is identical except that it instead uses the locale parameter that's passed in. For more information, see [Locale](../../c-runtime-library/locale.md). +The output value is affected by the setting of the **LC_CTYPE** category setting of the locale; see [`setlocale`, `_wsetlocale`](setlocale-wsetlocale.md) for more information. The **_mbsnbset_s** version of this function uses the current locale for this locale-dependent behavior; the **_mbsnbset_s_l** version is identical except that it instead uses the locale parameter that's passed in. For more information, see [Locale](../locale.md). -In C++, use of these functions is simplified by template overloads; the overloads can infer buffer length automatically and thereby eliminate the need to specify a size argument. For more information, see [Secure Template Overloads](../../c-runtime-library/secure-template-overloads.md). +In C++, use of these functions is simplified by template overloads; the overloads can infer buffer length automatically and thereby eliminate the need to specify a size argument. For more information, see [Secure template overloads](../secure-template-overloads.md). -The debug library versions of these functions first fill the buffer with 0xFE. To disable this behavior, use [_CrtSetDebugFillThreshold](crtsetdebugfillthreshold.md). +The debug library versions of these functions first fill the buffer with 0xFE. To disable this behavior, use [`_CrtSetDebugFillThreshold`](crtsetdebugfillthreshold.md). By default, this function's global state is scoped to the application. To change this behavior, see [Global state in the CRT](../global-state.md). -### Generic-Text Routine Mappings +### Generic-text routine mappings |Tchar.h routine|_UNICODE and _MBCS not defined|_MBCS defined|_UNICODE defined| |---------------------|--------------------------------------|--------------------|-----------------------| @@ -99,7 +99,7 @@ By default, this function's global state is scoped to the application. To change |**_mbsnbset_s**|\| |**_mbsnbset_s_l**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -127,7 +127,7 @@ After: **** is a test ## See also -[String Manipulation](../../c-runtime-library/string-manipulation-crt.md)
-[_mbsnbcat, _mbsnbcat_l](mbsnbcat-mbsnbcat-l.md)
-[_strnset, _strnset_l, _wcsnset, _wcsnset_l, _mbsnset, _mbsnset_l](strnset-strnset-l-wcsnset-wcsnset-l-mbsnset-mbsnset-l.md)
-[_strset, _strset_l, _wcsset, _wcsset_l, _mbsset, _mbsset_l](strset-strset-l-wcsset-wcsset-l-mbsset-mbsset-l.md)
+[String manipulation](../string-manipulation-crt.md)\ +[`_mbsnbcat`, `_mbsnbcat_l`](mbsnbcat-mbsnbcat-l.md)\ +[`_strnset`, `_strnset_l`, `_wcsnset`, `_wcsnset_l`, `_mbsnset`, `_mbsnset_l`](strnset-strnset-l-wcsnset-wcsnset-l-mbsnset-mbsnset-l.md)\ +[`_strset`, `_strset_l`, `_wcsset`, `_wcsset_l`, `_mbsset`, `_mbsset_l`](strset-strset-l-wcsset-wcsset-l-mbsset-mbsset-l.md) diff --git a/docs/c-runtime-library/reference/mbsrtowcs-s.md b/docs/c-runtime-library/reference/mbsrtowcs-s.md index ab2ef1d4f1c..578d42d3dc1 100644 --- a/docs/c-runtime-library/reference/mbsrtowcs-s.md +++ b/docs/c-runtime-library/reference/mbsrtowcs-s.md @@ -12,7 +12,7 @@ ms.assetid: 4ee084ec-b15d-4e5a-921d-6584ec3b5a60 --- # mbsrtowcs_s -Convert a multibyte character string in the current locale to its wide character string representation. A version of [mbsrtowcs](mbsrtowcs.md) with security enhancements as described in [Security Features in the CRT](../../c-runtime-library/security-features-in-the-crt.md). +Convert a multibyte character string in the current locale to its wide character string representation. A version of [`mbsrtowcs`](mbsrtowcs.md) with security enhancements as described in [Security features in the CRT](../security-features-in-the-crt.md). ## Syntax @@ -37,73 +37,73 @@ errno_t mbsrtowcs_s( ### Parameters -*pReturnValue*
+*`pReturnValue`*\ The number of characters converted. -*wcstr*
+*`wcstr`*\ Address of buffer to store the resulting converted wide character string. -*sizeInWords*
-The size of *wcstr* in words (wide characters). +*`sizeInWords`*\ +The size of *`wcstr`* in words (wide characters). -*mbstr*
+*`mbstr`*\ Indirect pointer to the location of the multibyte character string to be converted. -*count*
-The maximum number of wide characters to store in the *wcstr* buffer, not including the terminating null, or [_TRUNCATE](../../c-runtime-library/truncate.md). +*`count`*\ +The maximum number of wide characters to store in the *`wcstr`* buffer, not including the terminating null, or [`_TRUNCATE`](../truncate.md). -*mbstate*
-A pointer to an **mbstate_t** conversion state object. If this value is a null pointer, a static internal conversion state object is used. Because the internal **mbstate_t** object is not thread-safe, we recommend that you always pass your own *mbstate* parameter. +*`mbstate`*\ +A pointer to an **mbstate_t** conversion state object. If this value is a null pointer, a static internal conversion state object is used. Because the internal **mbstate_t** object is not thread-safe, we recommend that you always pass your own *`mbstate`* parameter. -## Return Value +## Return value Zero if conversion is successful, or an error code on failure. |Error condition|Return value and **errno**| |---------------------|------------------------------| -|*wcstr* is a null pointer and *sizeInWords* > 0|**EINVAL**| -|*mbstr* is a null pointer|**EINVAL**| -|The string indirectly pointed to by *mbstr* contains a multibyte sequence that is not valid for the current locale.|**EILSEQ**| -|The destination buffer is too small to contain the converted string (unless *count* is **_TRUNCATE**; for more information, see Remarks)|**ERANGE**| +|*`wcstr`* is a null pointer and *`sizeInWords`* > 0|**EINVAL**| +|*`mbstr`* is a null pointer|**EINVAL**| +|The string indirectly pointed to by *`mbstr`* contains a multibyte sequence that is not valid for the current locale.|**EILSEQ**| +|The destination buffer is too small to contain the converted string (unless *`count`* is **_TRUNCATE**; for more information, see Remarks)|**ERANGE**| -If any one of these conditions occurs, the invalid parameter exception is invoked as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md) . If execution is allowed to continue, the function returns an error code and sets **errno** as indicated in the table. +If any one of these conditions occurs, the invalid parameter exception is invoked as described in [Parameter validation](../parameter-validation.md) . If execution is allowed to continue, the function returns an error code and sets **errno** as indicated in the table. ## Remarks -The **mbsrtowcs_s** function converts a string of multibyte characters indirectly pointed to by *mbstr* into wide characters stored in the buffer pointed to by *wcstr*, by using the conversion state contained in *mbstate*. The conversion will continue for each character until one of these conditions is met: +The **mbsrtowcs_s** function converts a string of multibyte characters indirectly pointed to by *`mbstr`* into wide characters stored in the buffer pointed to by *`wcstr`*, by using the conversion state contained in *`mbstate`*. The conversion will continue for each character until one of these conditions is met: - A multibyte null character is encountered - An invalid multibyte character is encountered -- The number of wide characters stored in the *wcstr* buffer equals *count*. +- The number of wide characters stored in the *`wcstr`* buffer equals *`count`*. -The destination string *wcstr* is always null-terminated, even in the case of an error, unless *wcstr* is a null pointer. +The destination string *`wcstr`* is always null-terminated, even in the case of an error, unless *`wcstr`* is a null pointer. -If *count* is the special value [_TRUNCATE](../../c-runtime-library/truncate.md), **mbsrtowcs_s** converts as much of the string as will fit into the destination buffer, while still leaving room for a null terminator. +If *`count`* is the special value [`_TRUNCATE`](../truncate.md), **mbsrtowcs_s** converts as much of the string as will fit into the destination buffer, while still leaving room for a null terminator. -If **mbsrtowcs_s** successfully converts the source string, it puts the size in wide characters of the converted string and the null terminator into `*pReturnValue`, provided *pReturnValue* is not a null pointer. This occurs even if the *wcstr* argument is a null pointer and lets you determine the required buffer size. Note that if *wcstr* is a null pointer, *count* is ignored. +If **mbsrtowcs_s** successfully converts the source string, it puts the size in wide characters of the converted string and the null terminator into `*pReturnValue`, provided *`pReturnValue`* is not a null pointer. This occurs even if the *`wcstr`* argument is a null pointer and lets you determine the required buffer size. Note that if *`wcstr`* is a null pointer, *`count`* is ignored. -If *wcstr* is not a null pointer, the pointer object pointed to by *mbstr* is assigned a null pointer if conversion stopped because a terminating null character was reached. Otherwise, it is assigned the address just past the last multibyte character converted, if any. This allows a subsequent function call to restart conversion where this call stopped. +If *`wcstr`* is not a null pointer, the pointer object pointed to by *`mbstr`* is assigned a null pointer if conversion stopped because a terminating null character was reached. Otherwise, it is assigned the address just past the last multibyte character converted, if any. This allows a subsequent function call to restart conversion where this call stopped. -If *mbstate* is a null pointer, the library internal **mbstate_t** conversion state static object is used. Because this internal static object is not thread-safe, we recommend that you pass your own *mbstate* value. +If *`mbstate`* is a null pointer, the library internal **mbstate_t** conversion state static object is used. Because this internal static object is not thread-safe, we recommend that you pass your own *`mbstate`* value. -If **mbsrtowcs_s** encounters a multibyte character that is not valid in the current locale, it puts -1 in `*pReturnValue`, sets the destination buffer *wcstr* to an empty string, sets **errno** to **EILSEQ**, and returns **EILSEQ**. +If **mbsrtowcs_s** encounters a multibyte character that is not valid in the current locale, it puts -1 in `*pReturnValue`, sets the destination buffer *`wcstr`* to an empty string, sets **errno** to **EILSEQ**, and returns **EILSEQ**. -If the sequences pointed to by *mbstr* and *wcstr* overlap, the behavior of **mbsrtowcs_s** is undefined. **mbsrtowcs_s** is affected by the LC_TYPE category of the current locale. +If the sequences pointed to by *`mbstr`* and *`wcstr`* overlap, the behavior of **mbsrtowcs_s** is undefined. **mbsrtowcs_s** is affected by the LC_TYPE category of the current locale. > [!IMPORTANT] -> Ensure that *wcstr* and *mbstr* do not overlap, and that *count* correctly reflects the number of multibyte characters to convert. +> Ensure that *`wcstr`* and *`mbstr`* do not overlap, and that *`count`* correctly reflects the number of multibyte characters to convert. -The **mbsrtowcs_s** function differs from [mbstowcs_s, _mbstowcs_s_l](mbstowcs-s-mbstowcs-s-l.md) by its restartability. The conversion state is stored in *mbstate* for subsequent calls to the same or other restartable functions. Results are undefined when mixing the use of restartable and nonrestartable functions. For example, an application should use **mbsrlen** instead of **mbslen**, if a subsequent call to **mbsrtowcs_s** is used instead of **mbstowcs_s**. +The **mbsrtowcs_s** function differs from [`mbstowcs_s`, `_mbstowcs_s_l`](mbstowcs-s-mbstowcs-s-l.md) by its restartability. The conversion state is stored in *`mbstate`* for subsequent calls to the same or other restartable functions. Results are undefined when mixing the use of restartable and nonrestartable functions. For example, an application should use **mbsrlen** instead of **mbslen**, if a subsequent call to **mbsrtowcs_s** is used instead of **mbstowcs_s**. -In C++, using this function is simplified by template overloads; the overloads can infer buffer length automatically (eliminating the requirement to specify a size argument) and they can automatically replace older, non-secure functions by using their newer, secure counterparts. For more information, see [Secure Template Overloads](../../c-runtime-library/secure-template-overloads.md). +In C++, using this function is simplified by template overloads; the overloads can infer buffer length automatically (eliminating the requirement to specify a size argument) and they can automatically replace older, non-secure functions by using their newer, secure counterparts. 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 behavior, see [Global state in the CRT](../global-state.md). ## Exceptions -The **mbsrtowcs_s** function is multithread safe if no function in the current thread calls **setlocale** as long as this function is executing and the *mbstate* argument is not a null pointer. +The **mbsrtowcs_s** function is multithread safe if no function in the current thread calls **setlocale** as long as this function is executing and the *`mbstate`* argument is not a null pointer. ## Requirements @@ -113,10 +113,10 @@ The **mbsrtowcs_s** function is multithread safe if no function in the current t ## See also -[Data Conversion](../../c-runtime-library/data-conversion.md)
-[Locale](../../c-runtime-library/locale.md)
-[Interpretation of Multibyte-Character Sequences](../../c-runtime-library/interpretation-of-multibyte-character-sequences.md)
-[mbrtowc](mbrtowc.md)
-[mbtowc, _mbtowc_l](mbtowc-mbtowc-l.md)
-[mbstowcs_s, _mbstowcs_s_l](mbstowcs-s-mbstowcs-s-l.md)
-[mbsinit](mbsinit.md)
+[Data conversion](../data-conversion.md)\ +[Locale](../locale.md)\ +[Interpretation of multibyte-character sequences](../interpretation-of-multibyte-character-sequences.md)\ +[`mbrtowc`](mbrtowc.md)\ +[`mbtowc`, `_mbtowc_l`](mbtowc-mbtowc-l.md)\ +[`mbstowcs_s`, `_mbstowcs_s_l`](mbstowcs-s-mbstowcs-s-l.md)\ +[`mbsinit`](mbsinit.md) diff --git a/docs/c-runtime-library/reference/mbsrtowcs.md b/docs/c-runtime-library/reference/mbsrtowcs.md index bf38f351422..49098503a27 100644 --- a/docs/c-runtime-library/reference/mbsrtowcs.md +++ b/docs/c-runtime-library/reference/mbsrtowcs.md @@ -12,7 +12,7 @@ ms.assetid: f3a29de8-e36e-425b-a7fa-a258e6d7909d --- # mbsrtowcs -Converts a multibyte character string in the current locale to a corresponding wide character string, with the capability of restarting in the middle of a multibyte character. A more secure version of this function is available; see [mbsrtowcs_s](mbsrtowcs-s.md). +Converts a multibyte character string in the current locale to a corresponding wide character string, with the capability of restarting in the middle of a multibyte character. A more secure version of this function is available; see [`mbsrtowcs_s`](mbsrtowcs-s.md). ## Syntax @@ -34,43 +34,43 @@ size_t mbsrtowcs( ### Parameters -*wcstr*
+*`wcstr`*\ Address to store the resulting converted wide character string. -*mbstr*
+*`mbstr`*\ Indirect pointer to the location of the multibyte character string to convert. -*count*
-The maximum number of characters (not bytes) to convert and store in *wcstr*. +*`count`*\ +The maximum number of characters (not bytes) to convert and store in *`wcstr`*. -*mbstate*
-A pointer to an **mbstate_t** conversion state object. If this value is a null pointer, a static internal conversion state object is used. Because the internal **mbstate_t** object is not thread-safe, we recommend that you always pass your own *mbstate* parameter. +*`mbstate`*\ +A pointer to an **mbstate_t** conversion state object. If this value is a null pointer, a static internal conversion state object is used. Because the internal **mbstate_t** object is not thread-safe, we recommend that you always pass your own *`mbstate`* parameter. -## Return Value +## Return value Returns the number of characters successfully converted, not including the terminating null character, if any. Returns (size_t)(-1) if an error occurred, and sets **errno** to EILSEQ. ## Remarks -The **mbsrtowcs** function converts a string of multibyte characters indirectly pointed to by *mbstr*, into wide characters stored in the buffer pointed to by *wcstr*, by using the conversion state contained in *mbstate*. The conversion continues for each character until either a terminating null multibyte character is encountered, a multibyte sequence that does not correspond to a valid character in the current locale is encountered, or until *count* characters have been converted. If **mbsrtowcs** encounters the multibyte null character ('\0') either before or when *count* occurs, it converts it to a 16-bit terminating null character and stops. +The **mbsrtowcs** function converts a string of multibyte characters indirectly pointed to by *`mbstr`*, into wide characters stored in the buffer pointed to by *`wcstr`*, by using the conversion state contained in *`mbstate`*. The conversion continues for each character until either a terminating null multibyte character is encountered, a multibyte sequence that does not correspond to a valid character in the current locale is encountered, or until *`count`* characters have been converted. If **mbsrtowcs** encounters the multibyte null character ('\0') either before or when *`count`* occurs, it converts it to a 16-bit terminating null character and stops. -Thus, the wide character string at *wcstr* is null-terminated only if **mbsrtowcs** encounters a multibyte null character during conversion. If the sequences pointed to by *mbstr* and *wcstr* overlap, the behavior of **mbsrtowcs** is undefined. **mbsrtowcs** is affected by the LC_TYPE category of the current locale. +Thus, the wide character string at *`wcstr`* is null-terminated only if **mbsrtowcs** encounters a multibyte null character during conversion. If the sequences pointed to by *`mbstr`* and *`wcstr`* overlap, the behavior of **mbsrtowcs** is undefined. **mbsrtowcs** is affected by the LC_TYPE category of the current locale. -The **mbsrtowcs** function differs from [mbstowcs, _mbstowcs_l](mbstowcs-mbstowcs-l.md) by its restartability. The conversion state is stored in *mbstate* for subsequent calls to the same or other restartable functions. Results are undefined when mixing the use of restartable and nonrestartable functions. For example, an application should use **mbsrlen** instead of **mbslen**, if a subsequent call to **mbsrtowcs** is used instead of **mbstowcs**. +The **mbsrtowcs** function differs from [`mbstowcs`, `_mbstowcs_l`](mbstowcs-mbstowcs-l.md) by its restartability. The conversion state is stored in *`mbstate`* for subsequent calls to the same or other restartable functions. Results are undefined when mixing the use of restartable and nonrestartable functions. For example, an application should use **mbsrlen** instead of **mbslen**, if a subsequent call to **mbsrtowcs** is used instead of **mbstowcs**. -If *wcstr* is not a null pointer, the pointer object pointed to by *mbstr* is assigned a null pointer if conversion stopped because a terminating null character was reached. Otherwise, it is assigned the address just past the last multibyte character converted, if any. This allows a subsequent function call to restart conversion where this call stopped. +If *`wcstr`* is not a null pointer, the pointer object pointed to by *`mbstr`* is assigned a null pointer if conversion stopped because a terminating null character was reached. Otherwise, it is assigned the address just past the last multibyte character converted, if any. This allows a subsequent function call to restart conversion where this call stopped. -If the *wcstr* argument is a null pointer, the *count* argument is ignored and **mbsrtowcs** returns the required size in wide characters for the destination string. If *mbstate* is a null pointer, the function uses a non-thread-safe static internal **mbstate_t** conversion state object. If the character sequence *mbstr* does not have a corresponding multibyte character representation, a -1 is returned and the **errno** is set to **EILSEQ**. +If the *`wcstr`* argument is a null pointer, the *`count`* argument is ignored and **mbsrtowcs** returns the required size in wide characters for the destination string. If *`mbstate`* is a null pointer, the function uses a non-thread-safe static internal **mbstate_t** conversion state object. If the character sequence *`mbstr`* does not have a corresponding multibyte character representation, a -1 is returned and the **errno** is set to **EILSEQ**. -If *mbstr* isa null pointer, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, this function sets **errno** to **EINVAL** and returns -1. +If *`mbstr`* isa null pointer, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, this function sets **errno** to **EINVAL** and returns -1. -In C++, this function has a template overload that invokes the newer, secure counterpart of this function. For more information, see [Secure Template Overloads](../../c-runtime-library/secure-template-overloads.md). +In C++, this function has a template overload that invokes the newer, secure counterpart of this function. 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 behavior, see [Global state in the CRT](../global-state.md). ## Exceptions -The **mbsrtowcs** function is multithread safe as long as no function in the current thread calls **setlocale** as long as this function is executing and the *mbstate* argument is not a null pointer. +The **mbsrtowcs** function is multithread safe as long as no function in the current thread calls **setlocale** as long as this function is executing and the *`mbstate`* argument is not a null pointer. ## Requirements @@ -80,10 +80,10 @@ The **mbsrtowcs** function is multithread safe as long as no function in the cur ## See also -[Data Conversion](../../c-runtime-library/data-conversion.md)
-[Locale](../../c-runtime-library/locale.md)
-[Interpretation of Multibyte-Character Sequences](../../c-runtime-library/interpretation-of-multibyte-character-sequences.md)
-[mbrtowc](mbrtowc.md)
-[mbtowc, _mbtowc_l](mbtowc-mbtowc-l.md)
-[mbstowcs, _mbstowcs_l](mbstowcs-mbstowcs-l.md)
-[mbsinit](mbsinit.md)
+[Data conversion](../data-conversion.md)\ +[Locale](../locale.md)\ +[Interpretation of multibyte-character sequences](../interpretation-of-multibyte-character-sequences.md)\ +[`mbrtowc`](mbrtowc.md)\ +[`mbtowc`, `_mbtowc_l`](mbtowc-mbtowc-l.md)\ +[`mbstowcs`, `_mbstowcs_l`](mbstowcs-mbstowcs-l.md)\ +[`mbsinit`](mbsinit.md) diff --git a/docs/c-runtime-library/reference/mbstowcs-mbstowcs-l.md b/docs/c-runtime-library/reference/mbstowcs-mbstowcs-l.md index 143fb198c4c..79032a00883 100644 --- a/docs/c-runtime-library/reference/mbstowcs-mbstowcs-l.md +++ b/docs/c-runtime-library/reference/mbstowcs-mbstowcs-l.md @@ -56,7 +56,7 @@ The maximum number of multibyte characters to convert. *`locale`*\ The locale to use. -## Return Value +## Return value If **`mbstowcs`** successfully converts the source string, it returns the number of converted multibyte characters. If the *`wcstr`* argument is **`NULL`**, the function returns the required size (in wide characters) of the destination string. If **`mbstowcs`** encounters an invalid multibyte character, it returns -1. If the return value is *`count`*, the wide-character string is not null-terminated. @@ -69,11 +69,11 @@ The **`mbstowcs`** function converts up to a maximum number of *`count`* multiby If the *`wcstr`* argument is **`NULL`**, **`mbstowcs`** returns the number of wide characters that would result from conversion, not including a null terminator. The source string must be null-terminated for the correct value to be returned. If you need the resulting wide character string to be null-terminated, add one to the returned value. -If the *`mbstr`* argument is **`NULL`**, or if *`count`* is > **`INT_MAX`**, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, `errno` is set to **`EINVAL`** and the function returns -1. +If the *`mbstr`* argument is **`NULL`**, or if *`count`* is > **`INT_MAX`**, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, `errno` is set to **`EINVAL`** and the function returns -1. -**`mbstowcs`** uses the current locale for any locale-dependent behavior; **`_mbstowcs_l`** is identical except that it uses the locale passed in instead. For more information, see [Locale](../../c-runtime-library/locale.md). +**`mbstowcs`** uses the current locale for any locale-dependent behavior; **`_mbstowcs_l`** is identical except that it uses the locale passed in instead. For more information, see [Locale](../locale.md). -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 behavior, see [Global state in the CRT](../global-state.md). @@ -84,7 +84,7 @@ By default, this function's global state is scoped to the application. To change |**`mbstowcs`**|``| |**`_mbstowcs_l`**|``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -183,9 +183,9 @@ Convert back to wide-character string: ## See also -[Data Conversion](../../c-runtime-library/data-conversion.md)\ -[Locale](../../c-runtime-library/locale.md)\ -[Interpretation of Multibyte-Character Sequences](../../c-runtime-library/interpretation-of-multibyte-character-sequences.md)\ +[Data conversion](../data-conversion.md)\ +[Locale](../locale.md)\ +[Interpretation of multibyte-character sequences](../interpretation-of-multibyte-character-sequences.md)\ [`_mbclen`, `mblen`, `_mblen_l`](mbclen-mblen-mblen-l.md)\ [`mbtowc`, `_mbtowc_l`](mbtowc-mbtowc-l.md)\ [`wcstombs`, `_wcstombs_l`](wcstombs-wcstombs-l.md)\ diff --git a/docs/c-runtime-library/reference/mbstowcs-s-mbstowcs-s-l.md b/docs/c-runtime-library/reference/mbstowcs-s-mbstowcs-s-l.md index f7eb0017817..d021de7c989 100644 --- a/docs/c-runtime-library/reference/mbstowcs-s-mbstowcs-s-l.md +++ b/docs/c-runtime-library/reference/mbstowcs-s-mbstowcs-s-l.md @@ -12,7 +12,7 @@ ms.assetid: 2fbda953-6918-498f-b440-3e7b21ed65a4 --- # `mbstowcs_s`, `_mbstowcs_s_l` -Converts a sequence of multibyte characters to a corresponding sequence of wide characters. Versions of [`mbstowcs`, `_mbstowcs_l`](mbstowcs-mbstowcs-l.md) with security enhancements as described in [Security Features in the CRT](../../c-runtime-library/security-features-in-the-crt.md). +Converts a sequence of multibyte characters to a corresponding sequence of wide characters. Versions of [`mbstowcs`, `_mbstowcs_l`](mbstowcs-mbstowcs-l.md) with security enhancements as described in [Security features in the CRT](../security-features-in-the-crt.md). ## Syntax @@ -51,25 +51,25 @@ errno_t _mbstowcs_s_l( ### Parameters -*`pReturnValue`*
+*`pReturnValue`*\ The number of characters converted. -*`wcstr`*
+*`wcstr`*\ Address of buffer for the resulting converted wide character string. -*`sizeInWords`*
+*`sizeInWords`*\ The size of the *`wcstr`* buffer in words. -*`mbstr`*
+*`mbstr`*\ The address of a sequence of null terminated multibyte characters. -*`count`*
-The maximum number of wide characters to store in the *`wcstr`* buffer, not including the terminating null, or [`_TRUNCATE`](../../c-runtime-library/truncate.md). +*`count`*\ +The maximum number of wide characters to store in the *`wcstr`* buffer, not including the terminating null, or [`_TRUNCATE`](../truncate.md). -*`locale`*
+*`locale`*\ The locale to use. -## Return Value +## Return value Zero if successful, an error code on failure. @@ -80,7 +80,7 @@ Zero if successful, an error code on failure. |The destination buffer is too small to contain the converted string (unless *`count`* is **`_TRUNCATE`**; see Remarks below)|**`ERANGE`**| |*`wcstr`* is not **`NULL`** and *`sizeInWords`* == 0|**`EINVAL`**| -If any of these conditions occurs, the invalid parameter exception is invoked as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, the function returns an error code and sets **`errno`** as indicated in the table. +If any of these conditions occurs, the invalid parameter exception is invoked as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, the function returns an error code and sets **`errno`** as indicated in the table. ## Remarks @@ -94,9 +94,9 @@ The **`mbstowcs_s`** function converts a string of multibyte characters pointed The destination string is always null-terminated (even in the case of an error). -If *`count`* is the special value [`_TRUNCATE`](../../c-runtime-library/truncate.md), then **`mbstowcs_s`** converts as much of the string as will fit into the destination buffer, while still leaving room for a null terminator. +If *`count`* is the special value [`_TRUNCATE`](../truncate.md), then **`mbstowcs_s`** converts as much of the string as will fit into the destination buffer, while still leaving room for a null terminator. -If **`mbstowcs_s`** successfully converts the source string, it puts the size in wide characters of the converted string, including the null terminator, into `*pReturnValue` (provided *`pReturnValue`* is not **`NULL`**). This occurs even if the *`wcstr`* argument is **`NULL`** and provides a way to determine the required buffer size. Note that if *`wcstr`* is **`NULL`**, *count* is ignored, and *`sizeInWords`* must be 0. +If **`mbstowcs_s`** successfully converts the source string, it puts the size in wide characters of the converted string, including the null terminator, into `*pReturnValue` (provided *`pReturnValue`* is not **`NULL`**). This occurs even if the *`wcstr`* argument is **`NULL`** and provides a way to determine the required buffer size. Note that if *`wcstr`* is **`NULL`**, *`count`* is ignored, and *`sizeInWords`* must be 0. If **`mbstowcs_s`** encounters an invalid multibyte character, it puts 0 in `*pReturnValue`, sets the destination buffer to an empty string, sets **`errno`** to **`EILSEQ`**, and returns **`EILSEQ`**. @@ -105,9 +105,9 @@ If the sequences pointed to by *`mbstr`* and *`wcstr`* overlap, the behavior of > [!IMPORTANT] > Ensure that *`wcstr`* and *`mbstr`* do not overlap, and that *`count`* correctly reflects the number of multibyte characters to convert. -**`mbstowcs_s`** uses the current locale for any locale-dependent behavior; **`_mbstowcs_s_l`** is identical except that it uses the locale passed in instead. For more information, see [Locale](../../c-runtime-library/locale.md). +**`mbstowcs_s`** uses the current locale for any locale-dependent behavior; **`_mbstowcs_s_l`** is identical except that it uses the locale passed in instead. For more information, see [Locale](../locale.md). -In C++, using these functions is simplified by template overloads; the overloads can infer buffer length automatically (eliminating the need to specify a size argument) and they can automatically replace older, non-secure functions with their newer, secure counterparts. For more information, see [Secure Template Overloads](../../c-runtime-library/secure-template-overloads.md). +In C++, using these functions is simplified by template overloads; the overloads can infer buffer length automatically (eliminating the need to specify a size argument) and they can automatically replace older, non-secure functions with their newer, secure counterparts. For more information, see [Secure template overloads](../secure-template-overloads.md). 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). @@ -118,15 +118,15 @@ By default, this function's global state is scoped to the application. To change |**`mbstowcs_s`**|``| |**`_mbstowcs_s_l`**|``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Data Conversion](../../c-runtime-library/data-conversion.md)
-[Locale](../../c-runtime-library/locale.md)
-[`MultiByteToWideChar`](/windows/win32/api/stringapiset/nf-stringapiset-multibytetowidechar)
-[Interpretation of Multibyte-Character Sequences](../../c-runtime-library/interpretation-of-multibyte-character-sequences.md)
-[`_mbclen`, `mblen`, `_mblen_l`](mbclen-mblen-mblen-l.md)
-[`mbtowc`, `_mbtowc_l`](mbtowc-mbtowc-l.md)
-[`wcstombs`, `_wcstombs_l`](wcstombs-wcstombs-l.md)
-[`wctomb`, `_wctomb_l`](wctomb-wctomb-l.md)
+[Data conversion](../data-conversion.md)\ +[Locale](../locale.md)\ +[`MultiByteToWideChar`](/windows/win32/api/stringapiset/nf-stringapiset-multibytetowidechar)\ +[Interpretation of multibyte-character sequences](../interpretation-of-multibyte-character-sequences.md)\ +[`_mbclen`, `mblen`, `_mblen_l`](mbclen-mblen-mblen-l.md)\ +[`mbtowc`, `_mbtowc_l`](mbtowc-mbtowc-l.md)\ +[`wcstombs`, `_wcstombs_l`](wcstombs-wcstombs-l.md)\ +[`wctomb`, `_wctomb_l`](wctomb-wctomb-l.md) diff --git a/docs/c-runtime-library/reference/mbtowc-mbtowc-l.md b/docs/c-runtime-library/reference/mbtowc-mbtowc-l.md index 2e953a8fdb1..6d0c6508e32 100644 --- a/docs/c-runtime-library/reference/mbtowc-mbtowc-l.md +++ b/docs/c-runtime-library/reference/mbtowc-mbtowc-l.md @@ -32,25 +32,25 @@ int _mbtowc_l( ### Parameters -*wchar*
+*`wchar`*\ Address of a wide character (type **`wchar_t`**). -*mbchar*
+*`mbchar`*\ Address of a sequence of bytes (a multibyte character). -*count*
+*`count`*\ Number of bytes to check. -*locale*
+*`locale`*\ The locale to use. -## Return Value +## Return value -If **mbchar** is not **NULL** and if the object that *mbchar* points to forms a valid multibyte character, **mbtowc** returns the length in bytes of the multibyte character. If *mbchar* is **NULL** or the object that it points to is a wide-character null character (L'\0'), the function returns 0. If the object that *mbchar* points to does not form a valid multibyte character within the first *count* characters, it returns -1. +If **mbchar** is not **NULL** and if the object that *`mbchar`* points to forms a valid multibyte character, **mbtowc** returns the length in bytes of the multibyte character. If *`mbchar`* is **NULL** or the object that it points to is a wide-character null character (L'\0'), the function returns 0. If the object that *`mbchar`* points to does not form a valid multibyte character within the first *`count`* characters, it returns -1. ## Remarks -The **mbtowc** function converts *count* or fewer bytes pointed to by *mbchar*, if *mbchar* is not **NULL**, to a corresponding wide character. **mbtowc** stores the resulting wide character at *wchar,* if *wchar* is not **NULL**. **mbtowc** does not examine more than **MB_CUR_MAX** bytes. **mbtowc** uses the current locale for locale-dependent behavior; **_mbtowc_l** is identical except that it uses the locale passed in instead. For more information, see [Locale](../../c-runtime-library/locale.md). +The **mbtowc** function converts *`count`* or fewer bytes pointed to by *`mbchar`*, if *`mbchar`* is not **NULL**, to a corresponding wide character. **mbtowc** stores the resulting wide character at *wchar,* if *`wchar`* is not **NULL**. **mbtowc** does not examine more than **MB_CUR_MAX** bytes. **mbtowc** uses the current locale for locale-dependent behavior; **_mbtowc_l** is identical except that it uses the locale passed in instead. For more information, see [Locale](../locale.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). @@ -61,11 +61,11 @@ By default, this function's global state is scoped to the application. To change |**mbtowc**|\| |**_mbtowc_l**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Libraries -All versions of the [C run-time libraries](../../c-runtime-library/crt-library-features.md). +All versions of the [C run-time libraries](../crt-library-features.md). ## Example @@ -125,10 +125,10 @@ Attempt to convert a NULL pointer to a wide character: ## See also -[Data Conversion](../../c-runtime-library/data-conversion.md)
-[MultiByteToWideChar](/windows/win32/api/stringapiset/nf-stringapiset-multibytetowidechar)
-[Locale](../../c-runtime-library/locale.md)
-[Interpretation of Multibyte-Character Sequences](../../c-runtime-library/interpretation-of-multibyte-character-sequences.md)
-[_mbclen, mblen, _mblen_l](mbclen-mblen-mblen-l.md)
-[wcstombs, _wcstombs_l](wcstombs-wcstombs-l.md)
-[wctomb, _wctomb_l](wctomb-wctomb-l.md)
+[Data conversion](../data-conversion.md)\ +[MultiByteToWideChar](/windows/win32/api/stringapiset/nf-stringapiset-multibytetowidechar)\ +[Locale](../locale.md)\ +[Interpretation of multibyte-character sequences](../interpretation-of-multibyte-character-sequences.md)\ +[`_mbclen`, `mblen`, `_mblen_l`](mbclen-mblen-mblen-l.md)\ +[`wcstombs`, `_wcstombs_l`](wcstombs-wcstombs-l.md)\ +[`wctomb`, `_wctomb_l`](wctomb-wctomb-l.md) diff --git a/docs/c-runtime-library/reference/memccpy.md b/docs/c-runtime-library/reference/memccpy.md index 8881065263a..9a5ef804a6e 100644 --- a/docs/c-runtime-library/reference/memccpy.md +++ b/docs/c-runtime-library/reference/memccpy.md @@ -27,27 +27,27 @@ void *_memccpy( ### Parameters -*dest*
+*`dest`*\ Pointer to the destination. -*src*
+*`src`*\ Pointer to the source. -*c*
+*`c`*\ Last character to copy. -*count*
+*`count`*\ Number of characters. -## Return Value +## Return value -If the character *c* is copied, **_memccpy** returns a pointer to the char in *dest* that immediately follows the character. If *c* is not copied, it returns **NULL**. +If the character *`c`* is copied, **_memccpy** returns a pointer to the char in *`dest`* that immediately follows the character. If *`c`* is not copied, it returns **NULL**. ## Remarks -The **_memccpy** function copies 0 or more characters of *src* to *dest*, halting when the character *c* has been copied or when *count* characters have been copied, whichever comes first. +The **_memccpy** function copies 0 or more characters of *`src`* to *`dest`*, halting when the character *`c`* has been copied or when *`count`* characters have been copied, whichever comes first. -**Security Note** Make sure that the destination buffer is the same size or larger than the source buffer. For more information, see [Avoiding Buffer Overruns](/windows/win32/SecBP/avoiding-buffer-overruns). +**Security Note** Make sure that the destination buffer is the same size or larger than the source buffer. For more information, see [Avoiding buffer overruns](/windows/win32/SecBP/avoiding-buffer-overruns). ## Requirements @@ -55,11 +55,11 @@ The **_memccpy** function copies 0 or more characters of *src* to *dest*, haltin |-------------|---------------------| |**_memccpy**|\ or \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Libraries -All versions of the [C run-time libraries](../../c-runtime-library/crt-library-features.md). +All versions of the [C run-time libraries](../crt-library-features.md). ## Example @@ -97,8 +97,8 @@ Length: 25 characters ## See also -[Buffer Manipulation](../../c-runtime-library/buffer-manipulation.md)
-[memchr, wmemchr](memchr-wmemchr.md)
-[memcmp, wmemcmp](memcmp-wmemcmp.md)
-[memcpy, wmemcpy](memcpy-wmemcpy.md)
-[memset, wmemset](memset-wmemset.md)
+[Buffer manipulation](../buffer-manipulation.md)\ +[`memchr`, `wmemchr`](memchr-wmemchr.md)\ +[`memcmp`, `wmemcmp`](memcmp-wmemcmp.md)\ +[`memcpy`, `wmemcpy`](memcpy-wmemcpy.md)\ +[`memset`, `wmemset`](memset-wmemset.md) diff --git a/docs/c-runtime-library/reference/memchr-wmemchr.md b/docs/c-runtime-library/reference/memchr-wmemchr.md index c3b8def893c..6bef1d5c0e0 100644 --- a/docs/c-runtime-library/reference/memchr-wmemchr.md +++ b/docs/c-runtime-library/reference/memchr-wmemchr.md @@ -51,24 +51,24 @@ const wchar_t *wmemchr( ### Parameters -*buffer*
+*`buffer`*\ Pointer to buffer. -*c*
+*`c`*\ Character to look for. -*count*
+*`count`*\ Number of characters to check. -## Return Value +## Return value -If successful, returns a pointer to the first location of *c* in *buffer*. Otherwise it returns NULL. +If successful, returns a pointer to the first location of *`c`* in *`buffer`*. Otherwise it returns NULL. ## Remarks -`memchr` and `wmemchr` look for the first occurrence of *c* in the first *count* characters of *buffer*. It stops when it finds *c* or when it has checked the first *count* characters. +`memchr` and `wmemchr` look for the first occurrence of *`c`* in the first *`count`* characters of *`buffer`*. It stops when it finds *`c`* or when it has checked the first *`count`* characters. -In C, these functions take a **`const`** pointer for the first argument. In C++, two overloads are available. The overload taking a pointer to **`const`** returns a pointer to **`const`**; the version that takes a pointer to non-**`const`** returns a pointer to non-**`const`**. The macro \_CRT\_CONST\_CORRECT\_OVERLOADS is defined if both the **`const`** and non-**`const`** versions of these functions are available. If you require the non-**`const`** behavior for both C++ overloads in C++, define the symbol \_CONST\_RETURN. +In C, these functions take a **`const`** pointer for the first argument. In C++, two overloads are available. The overload taking a pointer to **`const`** returns a pointer to **`const`**; the version that takes a pointer to non-**`const`** returns a pointer to non-**`const`**. The macro `_CRT_CONST_CORRECT_OVERLOADS` is defined if both the **`const`** and non-**`const`** versions of these functions are available. If you require the non-**`const`** behavior for both C++ overloads in C++, define the symbol `_CONST_RETURN`. ## Requirements @@ -77,11 +77,11 @@ In C, these functions take a **`const`** pointer for the first argument. In C++, |`memchr`|\ or \| |`wmemchr`|\| -For more information about compatibility, see [Compatibility](../../c-runtime-library/compatibility.md). +For more information about compatibility, see [Compatibility](../compatibility.md). ## Libraries -All versions of the [C run-time libraries](../../c-runtime-library/crt-library-features.md). +All versions of the [C run-time libraries](../crt-library-features.md). ## Example @@ -128,9 +128,9 @@ Result: r found at position 12 ## See also -[Buffer Manipulation](../../c-runtime-library/buffer-manipulation.md)
-[_memccpy](memccpy.md)
-[memcmp, wmemcmp](memcmp-wmemcmp.md)
-[memcpy, wmemcpy](memcpy-wmemcpy.md)
-[memset, wmemset](memset-wmemset.md)
-[strchr, wcschr, _mbschr, _mbschr_l](strchr-wcschr-mbschr-mbschr-l.md)
+[Buffer manipulation](../buffer-manipulation.md)\ +[`_memccpy`](memccpy.md)\ +[`memcmp`, `wmemcmp`](memcmp-wmemcmp.md)\ +[`memcpy`, `wmemcpy`](memcpy-wmemcpy.md)\ +[`memset`, `wmemset`](memset-wmemset.md)\ +[`strchr`, `wcschr`, `_mbschr`, `_mbschr_l`](strchr-wcschr-mbschr-mbschr-l.md) diff --git a/docs/c-runtime-library/reference/memcmp-wmemcmp.md b/docs/c-runtime-library/reference/memcmp-wmemcmp.md index fdb697c4c30..8cf32179733 100644 --- a/docs/c-runtime-library/reference/memcmp-wmemcmp.md +++ b/docs/c-runtime-library/reference/memcmp-wmemcmp.md @@ -31,16 +31,16 @@ int wmemcmp( ### Parameters -*`buffer1`*
+*`buffer1`*\ First buffer. -*`buffer2`*
+*`buffer2`*\ Second buffer. -*`count`*
+*`count`*\ Number of characters to compare. (Compares bytes for **`memcmp`**, wide characters for **`wmemcmp`**). -## Return Value +## Return value The return value indicates the relationship between the buffers. @@ -61,11 +61,11 @@ Compares the first *`count`* characters of *`buffer1`* and *`buffer2`* and retur |**`memcmp`**|`` or ``| |**`wmemcmp`**|``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Libraries -All versions of the [C run-time library](../../c-runtime-library/crt-library-features.md). +All versions of the [C run-time library](../crt-library-features.md). ## Example @@ -117,10 +117,10 @@ int_arr1 is equal to int_arr2. ## See also -[Buffer Manipulation](../../c-runtime-library/buffer-manipulation.md)
-[`_memccpy`](memccpy.md)
-[`memchr`, `wmemchr`](memchr-wmemchr.md)
-[`memcpy`, `wmemcpy`](memcpy-wmemcpy.md)
-[`memset`, `wmemset`](memset-wmemset.md)
-[`strcmp`, `wcscmp`, `_mbscmp`](strcmp-wcscmp-mbscmp.md)
-[`strncmp`, `wcsncmp`, `_mbsncmp`, `_mbsncmp_l`](strncmp-wcsncmp-mbsncmp-mbsncmp-l.md)
+[Buffer manipulation](../buffer-manipulation.md)\ +[`_memccpy`](memccpy.md)\ +[`memchr`, `wmemchr`](memchr-wmemchr.md)\ +[`memcpy`, `wmemcpy`](memcpy-wmemcpy.md)\ +[`memset`, `wmemset`](memset-wmemset.md)\ +[`strcmp`, `wcscmp`, `_mbscmp`](strcmp-wcscmp-mbscmp.md)\ +[`strncmp`, `wcsncmp`, `_mbsncmp`, `_mbsncmp_l`](strncmp-wcsncmp-mbsncmp-mbsncmp-l.md) diff --git a/docs/c-runtime-library/reference/memcpy-s-wmemcpy-s.md b/docs/c-runtime-library/reference/memcpy-s-wmemcpy-s.md index 9fd60b8f8d7..9837569b238 100644 --- a/docs/c-runtime-library/reference/memcpy-s-wmemcpy-s.md +++ b/docs/c-runtime-library/reference/memcpy-s-wmemcpy-s.md @@ -12,7 +12,7 @@ ms.assetid: 5504e20a-83d9-4063-91fc-3f55f7dabe99 --- # `memcpy_s`, `wmemcpy_s` -Copies bytes between buffers. These are versions of [`memcpy`, `wmemcpy`](memcpy-wmemcpy.md) with security enhancements as described in [Security Features in the CRT](../../c-runtime-library/security-features-in-the-crt.md). +Copies bytes between buffers. These are versions of [`memcpy`, `wmemcpy`](memcpy-wmemcpy.md) with security enhancements as described in [Security features in the CRT](../security-features-in-the-crt.md). ## Syntax @@ -33,23 +33,23 @@ errno_t wmemcpy_s( ### Parameters -*`dest`*
+*`dest`*\ New buffer. -*`destSize`*
+*`destSize`*\ Size of the destination buffer, in bytes for `memcpy_s` and wide characters (`wchar_t`) for `wmemcpy_s`. -*`src`*
+*`src`*\ Buffer to copy from. -*`count`*
+*`count`*\ Number of characters to copy. -## Return Value +## Return value Zero if successful; an error code on failure. -### Error Conditions +### Error conditions |*`dest`*|*`destSize`*|*`src`*|*`count`*|Return value|Contents of *`dest`*| |------------|----------------|-----------|---|------------------|------------------------| @@ -62,7 +62,7 @@ Zero if successful; an error code on failure. **`memcpy_s`** copies *`count`* bytes from *`src`* to *`dest`*; **`wmemcpy_s`** copies *`count`* wide characters (two bytes). If the source and destination overlap, the behavior of **`memcpy_s`** is undefined. Use **`memmove_s`** to handle overlapping regions. -These functions validate their parameters. If *`count`* is non-zero and *`dest`* or *`src`* is a null pointer, or *`destSize`* is smaller than *`count`*, these 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 return **`EINVAL`** or **`ERANGE`** and set **`errno`** to the return value. +These functions validate their parameters. If *`count`* is non-zero and *`dest`* or *`src`* is a null pointer, or *`destSize`* is smaller than *`count`*, these functions invoke the invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, these functions return **`EINVAL`** or **`ERANGE`** and set **`errno`** to the return value. 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). @@ -73,7 +73,7 @@ By default, this function's global state is scoped to the application. To change |**`memcpy_s`**|`` or ``| |**`wmemcpy_s`**|``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -117,12 +117,12 @@ int main() ## See also -[Buffer Manipulation](../../c-runtime-library/buffer-manipulation.md)
-[`_memccpy`](memccpy.md)
-[`memchr`, `wmemchr`](memchr-wmemchr.md)
-[`memcmp`, `wmemcmp`](memcmp-wmemcmp.md)
-[`memmove`, `wmemmove`](memmove-wmemmove.md)
-[`memset`, `wmemset`](memset-wmemset.md)
-[`strcpy`, `wcscpy`, `_mbscpy`](strcpy-wcscpy-mbscpy.md)
-[`strncpy`, `_strncpy_l`, `wcsncpy`, `_wcsncpy_l`, `_mbsncpy`, `_mbsncpy_l`](strncpy-strncpy-l-wcsncpy-wcsncpy-l-mbsncpy-mbsncpy-l.md)
-[`strncpy_s`, `_strncpy_s_l`, `wcsncpy_s`, `_wcsncpy_s_l`, `_mbsncpy_s`, `_mbsncpy_s_l`](strncpy-s-strncpy-s-l-wcsncpy-s-wcsncpy-s-l-mbsncpy-s-mbsncpy-s-l.md)
+[Buffer manipulation](../buffer-manipulation.md)\ +[`_memccpy`](memccpy.md)\ +[`memchr`, `wmemchr`](memchr-wmemchr.md)\ +[`memcmp`, `wmemcmp`](memcmp-wmemcmp.md)\ +[`memmove`, `wmemmove`](memmove-wmemmove.md)\ +[`memset`, `wmemset`](memset-wmemset.md)\ +[`strcpy`, `wcscpy`, `_mbscpy`](strcpy-wcscpy-mbscpy.md)\ +[`strncpy`, `_strncpy_l`, `wcsncpy`, `_wcsncpy_l`, `_mbsncpy`, `_mbsncpy_l`](strncpy-strncpy-l-wcsncpy-wcsncpy-l-mbsncpy-mbsncpy-l.md)\ +[`strncpy_s`, `_strncpy_s_l`, `wcsncpy_s`, `_wcsncpy_s_l`, `_mbsncpy_s`, `_mbsncpy_s_l`](strncpy-s-strncpy-s-l-wcsncpy-s-wcsncpy-s-l-mbsncpy-s-mbsncpy-s-l.md) diff --git a/docs/c-runtime-library/reference/memcpy-wmemcpy.md b/docs/c-runtime-library/reference/memcpy-wmemcpy.md index b4bd93f2075..2c2d0af8c40 100644 --- a/docs/c-runtime-library/reference/memcpy-wmemcpy.md +++ b/docs/c-runtime-library/reference/memcpy-wmemcpy.md @@ -40,7 +40,7 @@ Buffer to copy from. *`count`*\ Number of characters to copy. -## Return Value +## Return value The value of *`dest`*. @@ -49,7 +49,7 @@ The value of *`dest`*. **`memcpy`** copies *`count`* bytes from *`src`* to *`dest`*; **`wmemcpy`** copies *`count`* wide characters (two bytes). If the source and destination overlap, the behavior of **`memcpy`** is undefined. Use **`memmove`** to handle overlapping regions. > [!IMPORTANT] -> Make sure that the destination buffer is the same size or larger than the source buffer. For more information, see [Avoiding Buffer Overruns](/windows/win32/SecBP/avoiding-buffer-overruns). +> Make sure that the destination buffer is the same size or larger than the source buffer. For more information, see [Avoiding buffer overruns](/windows/win32/SecBP/avoiding-buffer-overruns). > [!IMPORTANT] > Because so many buffer overruns, and thus potential security exploits, have been traced to improper usage of **`memcpy`**, this function is listed among the "banned" functions by the Security Development Lifecycle (SDL). You may observe that some VC++ library classes continue to use **`memcpy`**. Furthermore, you may observe that the VC++ compiler optimizer sometimes emits calls to **`memcpy`**. The Visual C++ product is developed in accordance with the SDL process, and thus usage of this banned function has been closely evaluated. In the case of library use of it, the calls have been carefully scrutinized to ensure that buffer overruns will not be allowed through these calls. In the case of the compiler, sometimes certain code patterns are recognized as identical to the pattern of **`memcpy`**, and are thus replaced with a call to the function. In such cases, the use of **`memcpy`** is no more unsafe than the original instructions would have been; they have simply been optimized to a call to the performance-tuned **`memcpy`** function. Just as the use of "safe" CRT functions doesn't guarantee safety (they just make it harder to be unsafe), the use of "banned" functions doesn't guarantee danger (they just require greater scrutiny to ensure safety). @@ -77,7 +77,7 @@ or |**`memcpy`**|`` or ``| |**`wmemcpy`**|``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -85,7 +85,7 @@ See [`memmove`](memmove-wmemmove.md) for a sample of how to use **`memcpy`**. ## See also -[Buffer Manipulation](../../c-runtime-library/buffer-manipulation.md)\ +[Buffer manipulation](../buffer-manipulation.md)\ [`_memccpy`](memccpy.md)\ [`memchr`, `wmemchr`](memchr-wmemchr.md)\ [`memcmp`, `wmemcmp`](memcmp-wmemcmp.md)\ diff --git a/docs/c-runtime-library/reference/memicmp-memicmp-l.md b/docs/c-runtime-library/reference/memicmp-memicmp-l.md index c05c56a421c..b7a72ea0b1b 100644 --- a/docs/c-runtime-library/reference/memicmp-memicmp-l.md +++ b/docs/c-runtime-library/reference/memicmp-memicmp-l.md @@ -32,36 +32,36 @@ int _memicmp_l( ### Parameters -*buffer1*
+*`buffer1`*\ First buffer. -*buffer2*
+*`buffer2`*\ Second buffer. -*count*
+*`count`*\ Number of characters. -*locale*
+*`locale`*\ Locale to use. -## Return Value +## Return value The return value indicates the relationship between the buffers. |Return value|Relationship of first count bytes of buf1 and buf2| |------------------|--------------------------------------------------------| -|< 0|*buffer1* less than *buffer2*.| -|0|*buffer1* identical to *buffer2*.| -|> 0|*buffer1* greater than *buffer2*.| +|< 0|*`buffer1`* less than *`buffer2`*.| +|0|*`buffer1`* identical to *`buffer2`*.| +|> 0|*`buffer1`* greater than *`buffer2`*.| |**_NLSCMPERROR**|An error occurred.| ## Remarks -The **_memicmp** function compares the first *count* characters of the two buffers *buffer1* and *buffer2* byte by byte. The comparison is not case-sensitive. +The **_memicmp** function compares the first *`count`* characters of the two buffers *`buffer1`* and *`buffer2`* byte by byte. The comparison is not case-sensitive. -If either *buffer1* or *buffer2* is a null pointer, this function invokes an invalid parameter handler, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, the function returns **_NLSCMPERROR** and sets **errno** to **EINVAL**. +If either *`buffer1`* or *`buffer2`* is a null pointer, this function invokes an invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, the function returns **_NLSCMPERROR** and sets **errno** to **EINVAL**. -**_memicmp** uses the current locale for locale-dependent behavior; **_memicmp_l** is identical except that it uses the locale passed in instead. For more information, see [Locale](../../c-runtime-library/locale.md). +**_memicmp** uses the current locale for locale-dependent behavior; **_memicmp_l** is identical except that it uses the locale passed in instead. For more information, see [Locale](../locale.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). @@ -72,7 +72,7 @@ By default, this function's global state is scoped to the application. To change |**_memicmp**|\ or \| |**_memicmp_l**|\ or \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -111,11 +111,11 @@ First is equal to second. ## See also -[Buffer Manipulation](../../c-runtime-library/buffer-manipulation.md)
-[_memccpy](memccpy.md)
-[memchr, wmemchr](memchr-wmemchr.md)
-[memcmp, wmemcmp](memcmp-wmemcmp.md)
-[memcpy, wmemcpy](memcpy-wmemcpy.md)
-[memset, wmemset](memset-wmemset.md)
-[_stricmp, _wcsicmp, _mbsicmp, _stricmp_l, _wcsicmp_l, _mbsicmp_l](stricmp-wcsicmp-mbsicmp-stricmp-l-wcsicmp-l-mbsicmp-l.md)
-[_strnicmp, _wcsnicmp, _mbsnicmp, _strnicmp_l, _wcsnicmp_l, _mbsnicmp_l](strnicmp-wcsnicmp-mbsnicmp-strnicmp-l-wcsnicmp-l-mbsnicmp-l.md)
+[Buffer manipulation](../buffer-manipulation.md)\ +[`_memccpy`](memccpy.md)\ +[`memchr`, `wmemchr`](memchr-wmemchr.md)\ +[`memcmp`, `wmemcmp`](memcmp-wmemcmp.md)\ +[`memcpy`, `wmemcpy`](memcpy-wmemcpy.md)\ +[`memset`, `wmemset`](memset-wmemset.md)\ +[`_stricmp`, `_wcsicmp`, `_mbsicmp`, `_stricmp_l`, `_wcsicmp_l`, `_mbsicmp_l`](stricmp-wcsicmp-mbsicmp-stricmp-l-wcsicmp-l-mbsicmp-l.md)\ +[`_strnicmp`, `_wcsnicmp`, `_mbsnicmp`, `_strnicmp_l`, `_wcsnicmp_l`, `_mbsnicmp_l`](strnicmp-wcsnicmp-mbsnicmp-strnicmp-l-wcsnicmp-l-mbsnicmp-l.md) diff --git a/docs/c-runtime-library/reference/memicmp.md b/docs/c-runtime-library/reference/memicmp.md index 5dce2412d54..f1a6db4ca33 100644 --- a/docs/c-runtime-library/reference/memicmp.md +++ b/docs/c-runtime-library/reference/memicmp.md @@ -12,6 +12,6 @@ ms.assetid: 45362e9c-7c64-41e9-92bb-7d4999a8635b --- # memicmp -The Microsoft-specific function name `memicmp` is a deprecated alias for the [_memicmp](memicmp-memicmp-l.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. +The Microsoft-specific function name `memicmp` is a deprecated alias for the [`_memicmp`](memicmp-memicmp-l.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. -We recommend you use [_memicmp](memicmp-memicmp-l.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). +We recommend you use [`_memicmp`](memicmp-memicmp-l.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). diff --git a/docs/c-runtime-library/reference/memmove-s-wmemmove-s.md b/docs/c-runtime-library/reference/memmove-s-wmemmove-s.md index a2df08b647f..c5bf00b99bd 100644 --- a/docs/c-runtime-library/reference/memmove-s-wmemmove-s.md +++ b/docs/c-runtime-library/reference/memmove-s-wmemmove-s.md @@ -12,7 +12,7 @@ ms.assetid: a17619e4-1307-4bb0-98c6-77f8c68dab2d --- # memmove_s, wmemmove_s -Moves one buffer to another. These are versions of [memmove, wmemmove](memmove-wmemmove.md) with security enhancements as described in [Security Features in the CRT](../../c-runtime-library/security-features-in-the-crt.md). +Moves one buffer to another. These are versions of [`memmove`, `wmemmove`](memmove-wmemmove.md) with security enhancements as described in [Security features in the CRT](../security-features-in-the-crt.md). ## Syntax @@ -33,35 +33,35 @@ errno_t wmemmove_s( ### Parameters -*dest*
+*`dest`*\ Destination object. -*numberOfElements*
+*`numberOfElements`*\ Size of the destination buffer. -*src*
+*`src`*\ Source object. -*count*
+*`count`*\ Number of bytes (**memmove_s**) or characters (**wmemmove_s**) to copy. -## Return Value +## Return value Zero if successful; an error code on failure -### Error Conditions +### Error conditions -|*dest*|*numberOfElements*|*src*|Return value|Contents of *dest*| +|*`dest`*|*`numberOfElements`*|*`src`*|Return value|Contents of *`dest`*| |------------|------------------------|-----------|------------------|------------------------| |**NULL**|any|any|**EINVAL**|not modified| |any|any|**NULL**|**EINVAL**|not modified| -|any|< *count*|any|**ERANGE**|not modified| +|any|< *`count`*|any|**ERANGE**|not modified| ## Remarks -Copies *count* bytes of characters from *src* to *dest*. If some regions of the source area and the destination overlap, **memmove_s** ensures that the original source bytes in the overlapping region are copied before being overwritten. +Copies *`count`* bytes of characters from *`src`* to *`dest`*. If some regions of the source area and the destination overlap, **memmove_s** ensures that the original source bytes in the overlapping region are copied before being overwritten. -If *dest* or if *src* is a null pointer, or if the destination string is too small, 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 **EINVAL** and set **errno** to **EINVAL**. +If *`dest`* or if *`src`* is a null pointer, or if the destination string is too small, these functions invoke an invalid parameter handler, as described in [Parameter validation](../parameter-validation.md) . If execution is allowed to continue, these functions return **EINVAL** and set **errno** to **EINVAL**. By default, this function's global state is scoped to the application. To change this behavior, see [Global state in the CRT](../global-state.md). @@ -72,7 +72,7 @@ By default, this function's global state is scoped to the application. To change |**memmove_s**|\| |**wmemmove_s**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -112,10 +112,10 @@ After: 0012345789 ## See also -[Buffer Manipulation](../../c-runtime-library/buffer-manipulation.md)
-[_memccpy](memccpy.md)
-[memcpy, wmemcpy](memcpy-wmemcpy.md)
-[strcpy_s, wcscpy_s, _mbscpy_s](strcpy-s-wcscpy-s-mbscpy-s.md)
-[strcpy, wcscpy, _mbscpy](strcpy-wcscpy-mbscpy.md)
-[strncpy_s, _strncpy_s_l, wcsncpy_s, _wcsncpy_s_l, _mbsncpy_s, _mbsncpy_s_l](strncpy-s-strncpy-s-l-wcsncpy-s-wcsncpy-s-l-mbsncpy-s-mbsncpy-s-l.md)
-[strncpy, _strncpy_l, wcsncpy, _wcsncpy_l, _mbsncpy, _mbsncpy_l](strncpy-strncpy-l-wcsncpy-wcsncpy-l-mbsncpy-mbsncpy-l.md)
+[Buffer manipulation](../buffer-manipulation.md)\ +[`_memccpy`](memccpy.md)\ +[`memcpy`, `wmemcpy`](memcpy-wmemcpy.md)\ +[`strcpy_s`, `wcscpy_s`, `_mbscpy_s`](strcpy-s-wcscpy-s-mbscpy-s.md)\ +[`strcpy`, `wcscpy`, `_mbscpy`](strcpy-wcscpy-mbscpy.md)\ +[`strncpy_s`, `_strncpy_s_l`, `wcsncpy_s`, `_wcsncpy_s_l`, `_mbsncpy_s`, `_mbsncpy_s_l`](strncpy-s-strncpy-s-l-wcsncpy-s-wcsncpy-s-l-mbsncpy-s-mbsncpy-s-l.md)\ +[`strncpy`, `_strncpy_l`, `wcsncpy`, `_wcsncpy_l`, `_mbsncpy`, `_mbsncpy_l`](strncpy-strncpy-l-wcsncpy-wcsncpy-l-mbsncpy-mbsncpy-l.md) diff --git a/docs/c-runtime-library/reference/memmove-wmemmove.md b/docs/c-runtime-library/reference/memmove-wmemmove.md index e3d761dab75..7779da2318a 100644 --- a/docs/c-runtime-library/reference/memmove-wmemmove.md +++ b/docs/c-runtime-library/reference/memmove-wmemmove.md @@ -39,7 +39,7 @@ Source object. *`count`*\ Number of bytes (**`memmove`**) or characters (**`wmemmove`**) to copy. -## Return Value +## Return value The value of *`dest`*. @@ -47,7 +47,7 @@ The value of *`dest`*. Copies *`count`* bytes (**`memmove`**) or characters (**`wmemmove`**) from *`src`* to *`dest`*. If some regions of the source area and the destination overlap, both functions ensure that the original source bytes in the overlapping region are copied before being overwritten. -**Security Note** Make sure that the destination buffer is the same size or larger than the source buffer. For more information, see [Avoiding Buffer Overruns](/windows/win32/SecBP/avoiding-buffer-overruns). +**Security Note** Make sure that the destination buffer is the same size or larger than the source buffer. For more information, see [Avoiding buffer overruns](/windows/win32/SecBP/avoiding-buffer-overruns). The **`memmove`** and **`wmemmove`** functions will only be deprecated if the constant **`_CRT_SECURE_DEPRECATE_MEMORY`** is defined before the inclusion statement in order for the functions to be deprecated, such as in the example below: @@ -70,7 +70,7 @@ or |**`memmove`**|``| |**`wmemmove`**|``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -110,7 +110,7 @@ New string: aaaabb ## See also -[Buffer Manipulation](../../c-runtime-library/buffer-manipulation.md)\ +[Buffer manipulation](../buffer-manipulation.md)\ [`_memccpy`](memccpy.md)\ [`memcpy`, `wmemcpy`](memcpy-wmemcpy.md)\ [`strcpy`, `wcscpy`, `_mbscpy`](strcpy-wcscpy-mbscpy.md)\ diff --git a/docs/c-runtime-library/reference/memset-wmemset.md b/docs/c-runtime-library/reference/memset-wmemset.md index 5c0b764a417..14e24da21c9 100644 --- a/docs/c-runtime-library/reference/memset-wmemset.md +++ b/docs/c-runtime-library/reference/memset-wmemset.md @@ -39,7 +39,7 @@ Character to set. *`count`*\ Number of characters. -## Return Value +## Return value The value of *`dest`*. @@ -47,7 +47,7 @@ The value of *`dest`*. Sets the first *`count`* characters of *`dest`* to the character *`c`*. -**Security Note** Make sure that the destination buffer has enough room for at least *`count`* characters. For more information, see [Avoiding Buffer Overruns](/windows/win32/SecBP/avoiding-buffer-overruns). +**Security Note** Make sure that the destination buffer has enough room for at least *`count`* characters. For more information, see [Avoiding buffer overruns](/windows/win32/SecBP/avoiding-buffer-overruns). 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). @@ -58,11 +58,11 @@ By default, this function's global state is scoped to the application. To change |**`memset`**|`` or ``| |**`wmemset`**|``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Libraries -All versions of the [C run-time libraries](../../c-runtime-library/crt-library-features.md). +All versions of the [C run-time libraries](../crt-library-features.md). ## Example @@ -122,7 +122,7 @@ After: **** is a test of the wmemset function ## See also -[Buffer Manipulation](../../c-runtime-library/buffer-manipulation.md)\ +[Buffer manipulation](../buffer-manipulation.md)\ [`_memccpy`](memccpy.md)\ [`memchr`, `wmemchr`](memchr-wmemchr.md)\ [`memcmp`, `wmemcmp`](memcmp-wmemcmp.md)\ diff --git a/docs/c-runtime-library/reference/min.md b/docs/c-runtime-library/reference/min.md index 6e24398902a..8fcc54a35ee 100644 --- a/docs/c-runtime-library/reference/min.md +++ b/docs/c-runtime-library/reference/min.md @@ -22,10 +22,10 @@ A preprocessor macro that returns the smaller of two values. ### Parameters -*a*, *b*
+*`a`*, *`b`*\ Values of any type that the **<** operator works on. -## Return Value +## Return value The smaller of the two arguments. @@ -66,5 +66,5 @@ The smaller of 10 and 21 is 10 ## See also -[Floating-Point Support](../../c-runtime-library/floating-point-support.md)
-[__max](max.md)
+[Math and floating-point support](../floating-point-support.md)\ +[`__max`](max.md) diff --git a/docs/c-runtime-library/reference/mkdir-wmkdir.md b/docs/c-runtime-library/reference/mkdir-wmkdir.md index 33d859ed0e9..79c428cc5c9 100644 --- a/docs/c-runtime-library/reference/mkdir-wmkdir.md +++ b/docs/c-runtime-library/reference/mkdir-wmkdir.md @@ -28,10 +28,10 @@ int _wmkdir( ### Parameters -*`dirname`*
+*`dirname`*\ Path for a new directory. -## Return Value +## Return value Each of these functions returns the value 0 if the new directory was created. On an error, the function returns -1 and sets **`errno`** as follows. @@ -39,7 +39,7 @@ Each of these functions returns the value 0 if the new directory was created. On **`ENOENT`** Path was not found. -For more information about these 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 these and other return codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks @@ -49,7 +49,7 @@ The **`_mkdir`** function creates a new directory with the specified *`dirname`* 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| |---------------------|--------------------------------------|--------------------|-----------------------| @@ -62,11 +62,11 @@ By default, this function's global state is scoped to the application. To change |**`_mkdir`**|``| |**`_wmkdir`**|`` or ``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Libraries -All versions of the [C run-time libraries](../../c-runtime-library/crt-library-features.md). +All versions of the [C run-time libraries](../crt-library-features.md). ## Example @@ -93,7 +93,7 @@ int main( void ) } ``` -### Sample Output +### Sample output ```Output Directory '\testtmp' was successfully created @@ -111,6 +111,6 @@ Directory '\testtmp' was successfully removed ## See also -[Directory Control](../../c-runtime-library/directory-control.md)
-[`_chdir`, `_wchdir`](chdir-wchdir.md)
-[`_rmdir`, `_wrmdir`](rmdir-wrmdir.md)
+[Directory control](../directory-control.md)\ +[`_chdir`, `_wchdir`](chdir-wchdir.md)\ +[`_rmdir`, `_wrmdir`](rmdir-wrmdir.md) diff --git a/docs/c-runtime-library/reference/mkgmtime-mkgmtime32-mkgmtime64.md b/docs/c-runtime-library/reference/mkgmtime-mkgmtime32-mkgmtime64.md index 6b909114d02..ed74d778c28 100644 --- a/docs/c-runtime-library/reference/mkgmtime-mkgmtime32-mkgmtime64.md +++ b/docs/c-runtime-library/reference/mkgmtime-mkgmtime32-mkgmtime64.md @@ -32,7 +32,7 @@ __time64_t _mkgmtime64( *`timeptr`*\ A pointer to the UTC time as a **`struct tm`** to convert. -## Return Value +## Return value A quantity of type **`__time32_t`** or **`__time64_t`** representing the number of seconds elapsed since midnight, January 1, 1970, in Coordinated Universal Time (UTC). If the date is out of range (see the Remarks section) or the input can't be interpreted as a valid time, the return value is -1. @@ -141,7 +141,7 @@ t.tm_yday = 42 ## See also -[Time Management](../../c-runtime-library/time-management.md)\ +[Time management](../time-management.md)\ [`asctime`, `_wasctime`](asctime-wasctime.md)\ [`asctime_s`, `_wasctime_s`](asctime-s-wasctime-s.md)\ [`gmtime`, `_gmtime32`, `_gmtime64`](gmtime-gmtime32-gmtime64.md)\ diff --git a/docs/c-runtime-library/reference/mktemp-s-wmktemp-s.md b/docs/c-runtime-library/reference/mktemp-s-wmktemp-s.md index 2aaebbec2b3..c06ceb8fbf4 100644 --- a/docs/c-runtime-library/reference/mktemp-s-wmktemp-s.md +++ b/docs/c-runtime-library/reference/mktemp-s-wmktemp-s.md @@ -12,7 +12,7 @@ ms.assetid: 92a7e269-7f3d-4c71-bad6-14bc827a451d --- # _mktemp_s, _wmktemp_s -Creates a unique file name. These are versions of [_mktemp, _wmktemp](mktemp-wmktemp.md) with security enhancements as described in [Security Features in the CRT](../../c-runtime-library/security-features-in-the-crt.md). +Creates a unique file name. These are versions of [`_mktemp`, `_wmktemp`](mktemp-wmktemp.md) with security enhancements as described in [Security features in the CRT](../security-features-in-the-crt.md). ## Syntax @@ -37,43 +37,43 @@ errno_t _wmktemp_s( ### Parameters -*nameTemplate*
+*`nameTemplate`*\ File name pattern. -*sizeInChars*
+*`sizeInChars`*\ Size of the buffer in single-byte characters in **_mktemp_s**; wide characters in **_wmktemp_s**, including the null terminator. -## Return Value +## Return value Both of these functions return zero on success; an error code on failure. -### Error Conditions +### Error conditions -|*nameTemplate*|*sizeInChars*|Return value|New value in *nameTemplate*| +|*`nameTemplate`*|*`sizeInChars`*|Return value|New value in *`nameTemplate`*| |----------------|-------------------|----------------------|-------------------------------| |**NULL**|any|**EINVAL**|**NULL**| |Incorrect format (see Remarks section for correct format)|any|**EINVAL**|empty string| |any|<= number of X's|**EINVAL**|empty string| -If any of the above error conditions occurs, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, **errno** is set to **EINVAL** and the functions returns **EINVAL**. +If any of the above error conditions occurs, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, **errno** is set to **EINVAL** and the functions returns **EINVAL**. ## Remarks -The **_mktemp_s** function creates a unique file name by modifying the *nameTemplate* argument, so that after the call, the *nameTemplate* pointer points to a string containing the new file name. **_mktemp_s** automatically handles multibyte-character string arguments as appropriate, recognizing multibyte-character sequences according to the multibyte code page currently in use by the run-time system. **_wmktemp_s** is a wide-character version of **_mktemp_s**; the argument of **_wmktemp_s** is a wide-character string. **_wmktemp_s** and **_mktemp_s** behave identically otherwise, except that **_wmktemp_s** does not handle multibyte-character strings. +The **_mktemp_s** function creates a unique file name by modifying the *`nameTemplate`* argument, so that after the call, the *`nameTemplate`* pointer points to a string containing the new file name. **_mktemp_s** automatically handles multibyte-character string arguments as appropriate, recognizing multibyte-character sequences according to the multibyte code page currently in use by the run-time system. **_wmktemp_s** is a wide-character version of **_mktemp_s**; the argument of **_wmktemp_s** is a wide-character string. **_wmktemp_s** and **_mktemp_s** behave identically otherwise, except that **_wmktemp_s** does not handle multibyte-character strings. -The debug library versions of these functions first fill the buffer with 0xFE. To disable this behavior, use [_CrtSetDebugFillThreshold](crtsetdebugfillthreshold.md). +The debug library versions of these functions first fill the buffer with 0xFE. To disable this behavior, use [`_CrtSetDebugFillThreshold`](crtsetdebugfillthreshold.md). By default, this function's global state is scoped to the application. To change this behavior, see [Global state in the CRT](../global-state.md). -### Generic-Text Routine Mappings +### Generic-text routine mappings |Tchar.h routine|_UNICODE and _MBCS not defined|_MBCS defined|_UNICODE defined| |---------------------|--------------------------------------|--------------------|-----------------------| |**_tmktemp_s**|**_mktemp_s**|**_mktemp_s**|**_wmktemp_s**| -The *nameTemplate* argument has the form **baseXXXXXX**, where *base* is the part of the new file name that you supply and each X is a placeholder for a character supplied by **_mktemp_s**. Each placeholder character in *nameTemplate* must be an uppercase X. **_mktemp_s** preserves *base* and replaces the first trailing X with an alphabetic character. **_mktemp_s** replaces the following trailing X's with a five-digit value; this value is a unique number identifying the calling process, or in multithreaded programs, the calling thread. +The *`nameTemplate`* argument has the form **baseXXXXXX**, where *`base`* is the part of the new file name that you supply and each X is a placeholder for a character supplied by **_mktemp_s**. Each placeholder character in *`nameTemplate`* must be an uppercase X. **_mktemp_s** preserves *`base`* and replaces the first trailing X with an alphabetic character. **_mktemp_s** replaces the following trailing X's with a five-digit value; this value is a unique number identifying the calling process, or in multithreaded programs, the calling thread. -Each successful call to **_mktemp_s** modifies *nameTemplate*. In each subsequent call from the same process or thread with the same *nameTemplate* argument, **_mktemp_s** checks for file names that match names returned by **_mktemp_s** in previous calls. If no file exists for a given name, **_mktemp_s** returns that name. If files exist for all previously returned names, **_mktemp_s** creates a new name by replacing the alphabetic character it used in the previously returned name with the next available lowercase letter, in order, from 'a' through 'z'. For example, if *base* is: +Each successful call to **_mktemp_s** modifies *`nameTemplate`*. In each subsequent call from the same process or thread with the same *`nameTemplate`* argument, **_mktemp_s** checks for file names that match names returned by **_mktemp_s** in previous calls. If no file exists for a given name, **_mktemp_s** returns that name. If files exist for all previously returned names, **_mktemp_s** creates a new name by replacing the alphabetic character it used in the previously returned name with the next available lowercase letter, in order, from 'a' through 'z'. For example, if *`base`* is: > **fn** @@ -81,7 +81,7 @@ and the five-digit value supplied by **_mktemp_s** is 12345, the first name retu > **fna12345** -If this name is used to create file FNA12345 and this file still exists, the next name returned on a call from the same process or thread with the same *base* for *nameTemplate* is: +If this name is used to create file FNA12345 and this file still exists, the next name returned on a call from the same process or thread with the same *`base`* for *`nameTemplate`* is: > **fnb12345** @@ -89,9 +89,9 @@ If FNA12345 does not exist, the next name returned is again: > **fna12345** -**_mktemp_s** can create a maximum of 26 unique file names for any given combination of *base* and *nameTemplate* values. Therefore, FNZ12345 is the last unique file name **_mktemp_s** can create for the *base* and *nameTemplate* values used in this example. +**_mktemp_s** can create a maximum of 26 unique file names for any given combination of *`base`* and *`nameTemplate`* values. Therefore, FNZ12345 is the last unique file name **_mktemp_s** can create for the *`base`* and *`nameTemplate`* values used in this example. -In C++, using these functions is simplified by template overloads; the overloads can infer buffer length automatically (eliminating the need to specify a size argument) and they can automatically replace older, non-secure functions with their newer, secure counterparts. For more information, see [Secure Template Overloads](../../c-runtime-library/secure-template-overloads.md). +In C++, using these functions is simplified by template overloads; the overloads can infer buffer length automatically (eliminating the need to specify a size argument) and they can automatically replace older, non-secure functions with their newer, secure counterparts. For more information, see [Secure template overloads](../secure-template-overloads.md). ## Requirements @@ -100,7 +100,7 @@ In C++, using these functions is simplified by template overloads; the overloads |**_mktemp_s**|\| |**_wmktemp_s**|\ or \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -146,7 +146,7 @@ int main() } ``` -### Sample Output +### Sample output ```Output Unique filename is fna03188 @@ -158,11 +158,11 @@ Unique filename is fne03188 ## See also -[File Handling](../../c-runtime-library/file-handling.md)
-[fopen, _wfopen](fopen-wfopen.md)
-[_getmbcp](getmbcp.md)
-[_getpid](getpid.md)
-[_open, _wopen](open-wopen.md)
-[_setmbcp](setmbcp.md)
-[_tempnam, _wtempnam, tmpnam, _wtmpnam](tempnam-wtempnam-tmpnam-wtmpnam.md)
-[tmpfile_s](tmpfile-s.md)
+[File handling](../file-handling.md)\ +[`fopen`, `_wfopen`](fopen-wfopen.md)\ +[`_getmbcp`](getmbcp.md)\ +[`_getpid`](getpid.md)\ +[`_open`, `_wopen`](open-wopen.md)\ +[`_setmbcp`](setmbcp.md)\ +[`_tempnam`, `_wtempnam`, `tmpnam`, `_wtmpnam`](tempnam-wtempnam-tmpnam-wtmpnam.md)\ +[`tmpfile_s`](tmpfile-s.md) diff --git a/docs/c-runtime-library/reference/mktemp-wmktemp.md b/docs/c-runtime-library/reference/mktemp-wmktemp.md index de84beb60d0..010a9385341 100644 --- a/docs/c-runtime-library/reference/mktemp-wmktemp.md +++ b/docs/c-runtime-library/reference/mktemp-wmktemp.md @@ -12,7 +12,7 @@ ms.assetid: 055eb539-a8c2-4a7d-be54-f5b6d1eb5c85 --- # _mktemp, _wmktemp -Creates a unique file name. More secure versions of these functions are available; see [_mktemp_s, _wmktemp_s](mktemp-s-wmktemp-s.md). +Creates a unique file name. More secure versions of these functions are available; see [`_mktemp_s`, `_wmktemp_s`](mktemp-s-wmktemp-s.md). ## Syntax @@ -35,28 +35,28 @@ wchar_t *_wmktemp( ### Parameters -*nameTemplate*
+*`nameTemplate`*\ File name pattern. -## Return Value +## Return value -Each of these functions returns a pointer to the modified nameTemplate. The function returns **NULL** if *nameTemplate* is badly formed or no more unique names can be created from the given nameTemplate. +Each of these functions returns a pointer to the modified nameTemplate. The function returns **NULL** if *`nameTemplate`* is badly formed or no more unique names can be created from the given nameTemplate. ## Remarks -The **_mktemp** function creates a unique file name by modifying the *nameTemplate* argument. **_mktemp** automatically handles multibyte-character string arguments as appropriate, recognizing multibyte-character sequences according to the multibyte code page currently in use by the run-time system. **_wmktemp** is a wide-character version of **_mktemp**; the argument and return value of **_wmktemp** are wide-character strings. **_wmktemp** and **_mktemp** behave identically otherwise, except that **_wmktemp** does not handle multibyte-character strings. +The **_mktemp** function creates a unique file name by modifying the *`nameTemplate`* argument. **_mktemp** automatically handles multibyte-character string arguments as appropriate, recognizing multibyte-character sequences according to the multibyte code page currently in use by the run-time system. **_wmktemp** is a wide-character version of **_mktemp**; the argument and return value of **_wmktemp** are wide-character strings. **_wmktemp** and **_mktemp** behave identically otherwise, except that **_wmktemp** does not handle multibyte-character strings. 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| |---------------------|--------------------------------------|--------------------|-----------------------| |**_tmktemp**|**_mktemp**|**_mktemp**|**_wmktemp**| -The *nameTemplate* argument has the form *base*XXXXXX, where *base* is the part of the new file name that you supply and each X is a placeholder for a character supplied by **_mktemp**. Each placeholder character in *nameTemplate* must be an uppercase X. **_mktemp** preserves *base* and replaces the first trailing X with an alphabetic character. **_mktemp** replaces the following trailing X's with a five-digit value; this value is a unique number identifying the calling process, or in multithreaded programs, the calling thread. +The *`nameTemplate`* argument has the form *`base`*XXXXXX, where *`base`* is the part of the new file name that you supply and each X is a placeholder for a character supplied by **_mktemp**. Each placeholder character in *`nameTemplate`* must be an uppercase X. **_mktemp** preserves *`base`* and replaces the first trailing X with an alphabetic character. **_mktemp** replaces the following trailing X's with a five-digit value; this value is a unique number identifying the calling process, or in multithreaded programs, the calling thread. -Each successful call to **_mktemp** modifies *nameTemplate*. In each subsequent call from the same process or thread with the same *nameTemplate* argument, **_mktemp** checks for file names that match names returned by **_mktemp** in previous calls. If no file exists for a given name, **_mktemp** returns that name. If files exist for all previously returned names, **_mktemp** creates a new name by replacing the alphabetic character it used in the previously returned name with the next available lowercase letter, in order, from 'a' through 'z'. For example, if *base* is: +Each successful call to **_mktemp** modifies *`nameTemplate`*. In each subsequent call from the same process or thread with the same *`nameTemplate`* argument, **_mktemp** checks for file names that match names returned by **_mktemp** in previous calls. If no file exists for a given name, **_mktemp** returns that name. If files exist for all previously returned names, **_mktemp** creates a new name by replacing the alphabetic character it used in the previously returned name with the next available lowercase letter, in order, from 'a' through 'z'. For example, if *`base`* is: > **fn** @@ -64,7 +64,7 @@ and the five-digit value supplied by **_mktemp** is 12345, the first name return > **fna12345** -If this name is used to create file FNA12345 and this file still exists, the next name returned on a call from the same process or thread with the same *base* for *nameTemplate* is: +If this name is used to create file FNA12345 and this file still exists, the next name returned on a call from the same process or thread with the same *`base`* for *`nameTemplate`* is: > **fnb12345** @@ -72,11 +72,11 @@ If FNA12345 does not exist, the next name returned is again: > **fna12345** -**_mktemp** can create a maximum of 26 unique file names for any given combination of *base* and *nameTemplate* values. Therefore, FNZ12345 is the last unique file name **_mktemp** can create for the *base* and *nameTemplate* values used in this example. +**_mktemp** can create a maximum of 26 unique file names for any given combination of *`base`* and *`nameTemplate`* values. Therefore, FNZ12345 is the last unique file name **_mktemp** can create for the *`base`* and *`nameTemplate`* values used in this example. -On failure, **errno** is set. If *nameTemplate* has an invalid format (for example, fewer than 6 X's), **errno** is set to **EINVAL**. If **_mktemp** is unable to create a unique name because all 26 possible file names already exist, **_mktemp** sets nameTemplate to an empty string and returns **EEXIST**. +On failure, **errno** is set. If *`nameTemplate`* has an invalid format (for example, fewer than 6 X's), **errno** is set to **EINVAL**. If **_mktemp** is unable to create a unique name because all 26 possible file names already exist, **_mktemp** sets nameTemplate to an empty string and returns **EEXIST**. -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). ## Requirements @@ -85,7 +85,7 @@ In C++, these functions have template overloads that invoke the newer, secure co |**_mktemp**|\| |**_wmktemp**|\ or \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -175,11 +175,11 @@ Out of unique filenames. ## See also -[File Handling](../../c-runtime-library/file-handling.md)
-[fopen, _wfopen](fopen-wfopen.md)
-[_getmbcp](getmbcp.md)
-[_getpid](getpid.md)
-[_open, _wopen](open-wopen.md)
-[_setmbcp](setmbcp.md)
-[_tempnam, _wtempnam, tmpnam, _wtmpnam](tempnam-wtempnam-tmpnam-wtmpnam.md)
-[tmpfile](tmpfile.md)
+[File handling](../file-handling.md)\ +[`fopen`, `_wfopen`](fopen-wfopen.md)\ +[`_getmbcp`](getmbcp.md)\ +[`_getpid`](getpid.md)\ +[`_open`, `_wopen`](open-wopen.md)\ +[`_setmbcp`](setmbcp.md)\ +[`_tempnam`, `_wtempnam`, `tmpnam`, `_wtmpnam`](tempnam-wtempnam-tmpnam-wtmpnam.md)\ +[`tmpfile`](tmpfile.md) diff --git a/docs/c-runtime-library/reference/mktemp.md b/docs/c-runtime-library/reference/mktemp.md index 13c68d04448..dbd6071bcc0 100644 --- a/docs/c-runtime-library/reference/mktemp.md +++ b/docs/c-runtime-library/reference/mktemp.md @@ -12,6 +12,6 @@ ms.assetid: b58cba60-034f-4e63-b312-ccbcd489d0a7 --- # mktemp -The Microsoft-specific function name `mktemp` is a deprecated alias for the [_mktemp](mktemp-wmktemp.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. +The Microsoft-specific function name `mktemp` is a deprecated alias for the [`_mktemp`](mktemp-wmktemp.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. -We recommend you use [_mktemp](mktemp-wmktemp.md) or the security-enhanced [_mktemp_s](mktemp-s-wmktemp-s.md) function instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). +We recommend you use [`_mktemp`](mktemp-wmktemp.md) or the security-enhanced [`_mktemp_s`](mktemp-s-wmktemp-s.md) function instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). diff --git a/docs/c-runtime-library/reference/mktime-mktime32-mktime64.md b/docs/c-runtime-library/reference/mktime-mktime32-mktime64.md index 98aaf69860e..92553c4fbaa 100644 --- a/docs/c-runtime-library/reference/mktime-mktime32-mktime64.md +++ b/docs/c-runtime-library/reference/mktime-mktime32-mktime64.md @@ -32,9 +32,9 @@ __time64_t _mktime64( *`timeptr`*\ Pointer to time structure; see [`asctime`](asctime-wasctime.md). -## Return Value +## Return value -**`_mktime32`** returns the specified calendar time encoded as a value of type [`time_t`](../../c-runtime-library/standard-types.md). If *`timeptr`* references a date before midnight, January 1, 1970, or if the calendar time can't be represented, **`_mktime32`** returns -1 cast to type **`time_t`**. When using **`_mktime32`** and if *`timeptr`* references a date after 23:59:59 January 18, 2038, Coordinated Universal Time (UTC), it will return -1 cast to type **`time_t`**. +**`_mktime32`** returns the specified calendar time encoded as a value of type [`time_t`](../standard-types.md). If *`timeptr`* references a date before midnight, January 1, 1970, or if the calendar time can't be represented, **`_mktime32`** returns -1 cast to type **`time_t`**. When using **`_mktime32`** and if *`timeptr`* references a date after 23:59:59 January 18, 2038, Coordinated Universal Time (UTC), it will return -1 cast to type **`time_t`**. **`_mktime64`** will return -1 cast to type **`__time64_t`** if *`timeptr`* references a date after 23:59:59, December 31, 3000, UTC. @@ -58,7 +58,7 @@ The C run-time library will determine the daylight savings time behavior from th Note that **`gmtime`** and **`localtime`** (and **`_gmtime32`**, **`_gmtime64`**, **`_localtime32`**, and **`_localtime64`**) use a single buffer per thread for the conversion. If you supply this buffer to **`mktime`**, **`_mktime32`** or **`_mktime64`**, the previous contents are destroyed. -These functions validate their parameter. If *`timeptr`* is a null pointer, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, the functions return -1 and set **`errno`** to **`EINVAL`**. +These functions validate their parameter. If *`timeptr`* is a null pointer, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, the functions return -1 and set **`errno`** to **`EINVAL`**. 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). @@ -70,11 +70,11 @@ By default, this function's global state is scoped to the application. To change |**`_mktime32`**|``| |**`_mktime64`**|``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Libraries -All versions of the [C run-time libraries](../../c-runtime-library/crt-library-features.md). +All versions of the [C run-time libraries](../crt-library-features.md). ## Example @@ -109,7 +109,7 @@ int main( void ) } ``` -### Sample Output +### Sample output ```Output Current time is Fri Apr 25 13:34:07 2003 @@ -119,7 +119,7 @@ In 20 days the time will be Thu May 15 13:34:07 2003 ## See also -[Time Management](../../c-runtime-library/time-management.md)\ +[Time management](../time-management.md)\ [`asctime`, `_wasctime`](asctime-wasctime.md)\ [`gmtime`, `_gmtime32`, `_gmtime64`](gmtime-gmtime32-gmtime64.md)\ [`localtime`, `_localtime32`, `_localtime64`](localtime-localtime32-localtime64.md)\ diff --git a/docs/c-runtime-library/reference/modf-modff-modfl.md b/docs/c-runtime-library/reference/modf-modff-modfl.md index 48feae9efe2..89ac8153132 100644 --- a/docs/c-runtime-library/reference/modf-modff-modfl.md +++ b/docs/c-runtime-library/reference/modf-modff-modfl.md @@ -34,7 +34,7 @@ Floating-point value. *`intptr`*\ Pointer to stored integer portion. -## Return Value +## Return value This function returns the signed fractional portion of *`x`*. There's no error return. @@ -54,7 +54,7 @@ By default, this function's global state is scoped to the application. To change |-------------|---------------------| |**`modf`**, **`modff`**, **`modfl`**|C: ``

C++: , `` or ``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -82,6 +82,6 @@ For -14.876543, the fraction is -0.876543 and the integer is -14 ## See also -[Floating-Point Support](../../c-runtime-library/floating-point-support.md)\ +[Math and floating-point support](../floating-point-support.md)\ [`frexp`](frexp.md)\ [`ldexp`](ldexp.md) diff --git a/docs/c-runtime-library/reference/msize-dbg.md b/docs/c-runtime-library/reference/msize-dbg.md index 2d36d246e45..a6baf0bef21 100644 --- a/docs/c-runtime-library/reference/msize-dbg.md +++ b/docs/c-runtime-library/reference/msize-dbg.md @@ -25,23 +25,23 @@ size_t _msize_dbg( ### Parameters -*userData*
+*`userData`*\ Pointer to the memory block for which to determine the size. -*blockType*
+*`blockType`*\ Type of the specified memory block: **_CLIENT_BLOCK** or **_NORMAL_BLOCK**. -## Return Value +## Return value On successful completion, **_msize_dbg** returns the size (in bytes) of the specified memory block; otherwise it returns **NULL**. ## Remarks -**_msize_dbg** is a debug version of the _[msize](msize.md) function. When [_DEBUG](../../c-runtime-library/debug.md) is not defined, each call to **_msize_dbg** is reduced to a call to **_msize**. Both **_msize** and **_msize_dbg** calculate the size of a memory block in the base heap, but **_msize_dbg** adds two debugging features: It includes the buffers on either side of the user portion of the memory block in the returned size and it allows size calculations for specific block types. +**_msize_dbg** is a debug version of the _[`msize`](msize.md) function. When [`_DEBUG`](../debug.md) is not defined, each call to **_msize_dbg** is reduced to a call to **_msize**. Both **_msize** and **_msize_dbg** calculate the size of a memory block in the base heap, but **_msize_dbg** adds two debugging features: It includes the buffers on either side of the user portion of the memory block in the returned size and it allows size calculations for specific block types. -For information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT Debug Heap Details](/visualstudio/debugger/crt-debug-heap-details). For information about the allocation block types and how they are used, see [Types of blocks on the debug heap](/visualstudio/debugger/crt-debug-heap-details). For information about the differences between calling a standard heap function and its debug version in a debug build of an application, see [Debug Versions of Heap Allocation Functions](/visualstudio/debugger/debug-versions-of-heap-allocation-functions). +For information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT debug heap details](/visualstudio/debugger/crt-debug-heap-details). For information about the allocation block types and how they are used, see [Types of blocks on the debug heap](/visualstudio/debugger/crt-debug-heap-details). For information about the differences between calling a standard heap function and its debug version in a debug build of an application, see [Debug versions of heap allocation functions](/visualstudio/debugger/debug-versions-of-heap-allocation-functions). -This function validates its parameter. If *memblock* is a null pointer, **_msize** invokes an invalid parameter handler, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If the error is handled, the function sets **errno** to **EINVAL** and returns -1. +This function validates its parameter. If *`memblock`* is a null pointer, **_msize** invokes an invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). If the error is handled, the function sets **errno** to **EINVAL** and returns -1. ## Requirements @@ -49,11 +49,11 @@ This function validates its parameter. If *memblock* is a null pointer, **_msize |-------------|---------------------| |**_msize_dbg**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Libraries -Debug versions of [C run-time libraries](../../c-runtime-library/crt-library-features.md) only. +Debug versions of [C run-time libraries](../crt-library-features.md) only. ## Example @@ -116,5 +116,5 @@ Size of block after _realloc_dbg of 40 more longs: 320 ## See also -[Debug Routines](../../c-runtime-library/debug-routines.md)
-[_malloc_dbg](malloc-dbg.md)
+[Debug routines](../debug-routines.md)\ +[`_malloc_dbg`](malloc-dbg.md) diff --git a/docs/c-runtime-library/reference/msize.md b/docs/c-runtime-library/reference/msize.md index 90713c49303..37b4c72df75 100644 --- a/docs/c-runtime-library/reference/msize.md +++ b/docs/c-runtime-library/reference/msize.md @@ -26,7 +26,7 @@ size_t _msize( *`memblock`*\ Pointer to the memory block. -## Return Value +## Return value **`_msize`** returns the size (in bytes) as an unsigned integer. @@ -34,9 +34,9 @@ Pointer to the memory block. The **`_msize`** function returns the size, in bytes, of the memory block allocated by a call to **`calloc`**, **`malloc`**, or **`realloc`**. -When the application is linked with a debug version of the C run-time libraries, **`_msize`** resolves to [`_msize_dbg`](msize-dbg.md). For more information about how the heap is managed during the debugging process, see [The CRT Debug Heap](/visualstudio/debugger/crt-debug-heap-details). +When the application is linked with a debug version of the C run-time libraries, **`_msize`** resolves to [`_msize_dbg`](msize-dbg.md). For more information about how the heap is managed during the debugging process, see [The CRT debug heap](/visualstudio/debugger/crt-debug-heap-details). -This function validates its parameter. If *`memblock`* is a `NULL` pointer, **`_msize`** invokes an invalid parameter handler, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If the error is handled, the function sets **`errno`** to **`EINVAL`** and returns -1. +This function validates its parameter. If *`memblock`* is a `NULL` pointer, **`_msize`** invokes an invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). If the error is handled, the function sets **`errno`** to **`EINVAL`** and returns -1. 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). @@ -46,11 +46,11 @@ By default, this function's global state is scoped to the application. To change |-------------|---------------------| |**`_msize`**|``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Libraries -All versions of the [C run-time libraries](../../c-runtime-library/crt-library-features.md). +All versions of the [C run-time libraries](../crt-library-features.md). ## Example @@ -58,7 +58,7 @@ See the example for [`realloc`](realloc.md). ## See also -[Memory Allocation](../../c-runtime-library/memory-allocation.md)\ +[Memory allocation](../memory-allocation.md)\ [`calloc`](calloc.md)\ [`_expand`](expand.md)\ [`malloc`](malloc.md)\ diff --git a/docs/c-runtime-library/reference/nan-nanf-nanl.md b/docs/c-runtime-library/reference/nan-nanf-nanl.md index fbbeecba1c3..ae686ad59bf 100644 --- a/docs/c-runtime-library/reference/nan-nanf-nanl.md +++ b/docs/c-runtime-library/reference/nan-nanf-nanl.md @@ -24,16 +24,16 @@ long double nanl( const char* input ); ### Parameters -*input*
+*`input`*\ A string value. -## Return Value +## Return value The **nan** functions return a quiet NaN value. ## Remarks -The **nan** functions return a floating-point value that corresponds to a quiet (non-signalling) NaN. The *input* value is ignored. For information about how a NaN is represented for output, see [printf, _printf_l, wprintf, _wprintf_l](printf-printf-l-wprintf-wprintf-l.md). +The **nan** functions return a floating-point value that corresponds to a quiet (non-signalling) NaN. The *`input`* value is ignored. For information about how a NaN is represented for output, see [`printf`, `_printf_l`, `wprintf`, `_wprintf_l`](printf-printf-l-wprintf-wprintf-l.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). @@ -45,10 +45,10 @@ By default, this function's global state is scoped to the application. To change ## See also -[Floating-Point Support](../../c-runtime-library/floating-point-support.md)
-[fpclassify](fpclassify.md)
-[_fpclass, _fpclassf](fpclass-fpclassf.md)
-[isfinite, _finite, _finitef](finite-finitef.md)
-[isinf](isinf.md)
-[isnan, _isnan, _isnanf](isnan-isnan-isnanf.md)
-[isnormal](isnormal.md)
+[Math and floating-point support](../floating-point-support.md)\ +[`fpclassify`](fpclassify.md)\ +[`_fpclass`, `_fpclassf`](fpclass-fpclassf.md)\ +[`isfinite`, `_finite`, `_finitef`](finite-finitef.md)\ +[`isinf`](isinf.md)\ +[`isnan`, `_isnan`, `_isnanf`](isnan-isnan-isnanf.md)\ +[`isnormal`](isnormal.md) diff --git a/docs/c-runtime-library/reference/nearbyint-nearbyintf-nearbyintl1.md b/docs/c-runtime-library/reference/nearbyint-nearbyintf-nearbyintl1.md index 210d913bf93..204801003d8 100644 --- a/docs/c-runtime-library/reference/nearbyint-nearbyintf-nearbyintl1.md +++ b/docs/c-runtime-library/reference/nearbyint-nearbyintf-nearbyintl1.md @@ -28,30 +28,30 @@ long double nearbyint( long double x ); //C++ only ### Parameters -*x*\ +*`x`*\ The value to round. -## Return Value +## Return value -If successful, returns *x*, rounded to the nearest integer, using the current rounding format as reported by [fegetround](fegetround-fesetround2.md). Otherwise, the function may return one of the following values: +If successful, returns *`x`*, rounded to the nearest integer, using the current rounding format as reported by [`fegetround`](fegetround-fesetround2.md). Otherwise, the function may return one of the following values: |Issue|Return| |-----------|------------| -|*x* = ±INFINITY|±INFINITY, unmodified| -|*x* = ±0|±0, unmodified| -|*x* = NaN|NaN| +|*`x`* = ±INFINITY|±INFINITY, unmodified| +|*`x`* = ±0|±0, unmodified| +|*`x`* = NaN|NaN| -Errors are not reported through [_matherr](matherr.md); specifically, this function does not report any **FE_INEXACT** exceptions. +Errors are not reported through [`_matherr`](matherr.md); specifically, this function does not report any **FE_INEXACT** exceptions. ## Remarks -The primary difference between this function and [rint](rint-rintf-rintl.md) is that this function does not raise the inexact floating point exception. +The primary difference between this function and [`rint`](rint-rintf-rintl.md) is that this function does not raise the inexact floating point exception. Because the maximum floating-point values are exact integers, this function will never overflow by itself; rather, the output may overflow the return value, depending on which version of the function you use. C++ allows overloading, so you can call overloads of **nearbyint** that take and return **`float`** or **`long double`** parameters. In a C program, unless you're using the \ macro to call this function, **nearbyint** always takes two double values and returns a double value. -If you use the \ `nearbyint()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../../c-runtime-library/tgmath.md) for details. +If you use the \ `nearbyint()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../tgmath.md) for details. 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). @@ -62,9 +62,9 @@ By default, this function's global state is scoped to the application. To change |**nearbyint**, **nearbyintf**, **nearbyintl**|\|\ or \| |**nearbyint** macro | \ || -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Alphabetical Function Reference](crt-alphabetical-function-reference.md)
-[Math and floating-point support](../floating-point-support.md)
+[Alphabetical function reference](crt-alphabetical-function-reference.md)\ +[Math and floating-point support](../floating-point-support.md) diff --git a/docs/c-runtime-library/reference/nextafter-functions.md b/docs/c-runtime-library/reference/nextafter-functions.md index bf965e2b388..62f12ff5ea3 100644 --- a/docs/c-runtime-library/reference/nextafter-functions.md +++ b/docs/c-runtime-library/reference/nextafter-functions.md @@ -46,7 +46,7 @@ The floating-point value to start from. *`y`*\ The floating-point value to go towards. -## Return Value +## Return value Returns the next representable floating-point value of the return type after *`x`* in the direction of *`y`*. If *`x`* and *`y`* are equal, the function returns *`y`*, converted to the return type, with no exception triggered. If *`x`* is not equal to *`y`*, and the result is a denormal or zero, the **`FE_UNDERFLOW`** and **`FE_INEXACT`** floating-point exception states are set, and the correct result is returned. If either *`x`* or *`y`* is a NAN, then the return value is one of the input NANs. If *`x`* is finite and the result is infinite or not representable in the type, a correctly signed infinity or NAN is returned, the **`FE_OVERFLOW`** and **`FE_INEXACT`** floating-point exception states are set, and **`errno`** is set to **`ERANGE`**. @@ -56,7 +56,7 @@ The **`nextafter`** and **`nexttoward`** function families are equivalent, excep Because C++ allows overloading, if you include `` you can call overloads of **`nextafter`** and **`nexttoward`** that return **`float`** and **`long double`** types. In a C program, unless you're using the `` macro to call this function, **`nextafter`** and **`nexttoward`** always return **`double`**. -If you use the `` `nextafter()` or `nexttoward()`macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../../c-runtime-library/tgmath.md) for details. +If you use the `` `nextafter()` or `nexttoward()`macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../tgmath.md) for details. The **_nextafter** and **_nextafterf** functions are Microsoft-specific. The **_nextafterf** function is only available when compiling for x64. @@ -70,9 +70,9 @@ By default, this function's global state is scoped to the application. To change |**`_nextafter`**|``|`` or ``| |**`nextafter`** macro, **`nexttoward`** macro| `` || -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Floating-Point Support](../../c-runtime-library/floating-point-support.md)\ +[Math and floating-point support](../floating-point-support.md)\ [`isnan`, `_isnan`, `_isnanf`](isnan-isnan-isnanf.md) diff --git a/docs/c-runtime-library/reference/norm-normf-norml1.md b/docs/c-runtime-library/reference/norm-normf-norml1.md index e86dff978cf..6c928639a0c 100644 --- a/docs/c-runtime-library/reference/norm-normf-norml1.md +++ b/docs/c-runtime-library/reference/norm-normf-norml1.md @@ -29,12 +29,12 @@ long double norm( _Lcomplex z ); // C++ only ### Parameters -*z*
+*`z`*\ A complex number. -## Return Value +## Return value -The squared magnitude of *z*. +The squared magnitude of *`z`*. ## Remarks @@ -46,14 +46,14 @@ Because C++ allows overloading, you can call overloads of **norm** that take **_ |-------------|--------------|------------------| |**norm**, **normf**, **norml**|\|\| -The **_Fcomplex**, **_Dcomplex**, and **_Lcomplex** types are Microsoft-specific equivalents of the unimplemented native C99 types **float _Complex**, **double _Complex**, and **long double _Complex**, respectively. For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +The **_Fcomplex**, **_Dcomplex**, and **_Lcomplex** types are Microsoft-specific equivalents of the unimplemented native C99 types **float _Complex**, **double _Complex**, and **long double _Complex**, respectively. For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Alphabetical Function Reference](crt-alphabetical-function-reference.md)
-[creal, crealf, creall](creal-crealf-creall.md)
-[cproj, cprojf, cprojl](cproj-cprojf-cprojl.md)
-[conj, conjf, conjl](conj-conjf-conjl.md)
-[cimag, cimagf, cimagl](cimag-cimagf-cimagl.md)
-[carg, cargf, cargl](carg-cargf-cargl.md)
-[cabs, cabsf, cabsl](cabs-cabsf-cabsl.md)
+[Alphabetical function reference](crt-alphabetical-function-reference.md)\ +[`creal`, `crealf`, `creall`](creal-crealf-creall.md)\ +[`cproj`, `cprojf`, `cprojl`](cproj-cprojf-cprojl.md)\ +[`conj`, `conjf`, `conjl`](conj-conjf-conjl.md)\ +[`cimag`, `cimagf`, `cimagl`](cimag-cimagf-cimagl.md)\ +[`carg`, `cargf`, `cargl`](carg-cargf-cargl.md)\ +[`cabs`, `cabsf`, `cabsl`](cabs-cabsf-cabsl.md) diff --git a/docs/c-runtime-library/reference/offsetof-macro.md b/docs/c-runtime-library/reference/offsetof-macro.md index 3fffe85e68d..3d92bab504b 100644 --- a/docs/c-runtime-library/reference/offsetof-macro.md +++ b/docs/c-runtime-library/reference/offsetof-macro.md @@ -24,19 +24,19 @@ size_t offsetof( ### Parameters -*structName*
+*`structName`*\ Name of the parent data structure. -*memberName*
+*`memberName`*\ Name of the member in the parent data structure for which to determine the offset. -## Return Value +## Return value **offsetof** returns the offset in bytes of the specified member from the beginning of its parent data structure. It is undefined for bit fields. ## Remarks -The **offsetof** macro returns the offset in bytes of *memberName* from the beginning of the structure specified by *structName* as a value of type **size_t**. You can specify types with the **`struct`** keyword. +The **offsetof** macro returns the offset in bytes of *`memberName`* from the beginning of the structure specified by *`structName`* as a value of type **size_t**. You can specify types with the **`struct`** keyword. > [!NOTE] > **offsetof** is not a function and cannot be described using a C prototype. @@ -47,12 +47,12 @@ The **offsetof** macro returns the offset in bytes of *memberName* from the begi |-------------|---------------------| |**offsetof**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Libraries -All versions of the [C run-time libraries](../../c-runtime-library/crt-library-features.md). +All versions of the [C run-time libraries](../crt-library-features.md). ## See also -[Memory Allocation](../../c-runtime-library/memory-allocation.md)
+[Memory allocation](../memory-allocation.md) diff --git a/docs/c-runtime-library/reference/onexit-onexit-m.md b/docs/c-runtime-library/reference/onexit-onexit-m.md index fcbfd85e5b1..97b1915333b 100644 --- a/docs/c-runtime-library/reference/onexit-onexit-m.md +++ b/docs/c-runtime-library/reference/onexit-onexit-m.md @@ -27,20 +27,20 @@ _onexit_t_m _onexit_m( ### Parameters -*function*
+*`function`*\ Pointer to a function to be called at exit. -## Return Value +## Return value **_onexit** returns a pointer to the function if successful or **NULL** if there is no space to store the function pointer. ## Remarks -The **_onexit** function is passed the address of a function (*function*) to be called when the program terminates normally. Successive calls to **_onexit** create a register of functions that are executed in LIFO (last-in-first-out) order. The functions passed to **_onexit** cannot take parameters. +The **_onexit** function is passed the address of a function (*`function`*) to be called when the program terminates normally. Successive calls to **_onexit** create a register of functions that are executed in LIFO (last-in-first-out) order. The functions passed to **_onexit** cannot take parameters. In the case when **_onexit** is called from within a DLL, routines registered with **_onexit** run on a DLL's unloading after **DllMain** is called with DLL_PROCESS_DETACH. -**_onexit** is a Microsoft extension. For ANSI portability, use [atexit](atexit.md). The **_onexit_m** version of the function is for mixed mode use. +**_onexit** is a Microsoft extension. For ANSI portability, use [`atexit`](atexit.md). The **_onexit_m** version of the function is for mixed mode use. ## Requirements @@ -48,7 +48,7 @@ In the case when **_onexit** is called from within a DLL, routines registered wi |-------------|---------------------| |**_onexit**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -104,7 +104,7 @@ This is executed next. ## See also -[Process and Environment Control](../../c-runtime-library/process-and-environment-control.md)
-[atexit](atexit.md)
-[exit, _Exit, _exit](exit-exit-exit.md)
-[__dllonexit](../../c-runtime-library/dllonexit.md)
+[Process and environment control](../process-and-environment-control.md)\ +[`atexit`](atexit.md)\ +[`exit`, `_Exit`, `_exit`](exit-exit-exit.md)\ +[`__dllonexit`](../dllonexit.md) diff --git a/docs/c-runtime-library/reference/open-osfhandle.md b/docs/c-runtime-library/reference/open-osfhandle.md index 74fb6f256ff..553f368be3a 100644 --- a/docs/c-runtime-library/reference/open-osfhandle.md +++ b/docs/c-runtime-library/reference/open-osfhandle.md @@ -30,7 +30,7 @@ Operating system file handle. *`flags`*\ Types of operations allowed. -## Return Value +## Return value If successful, **`_open_osfhandle`** returns a C run-time file descriptor. Otherwise, it returns -1. @@ -57,9 +57,9 @@ By default, this function's global state is scoped to the application. To change |-------------|---------------------| |**`_open_osfhandle`**|``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[File Handling](../../c-runtime-library/file-handling.md)\ +[File handling](../file-handling.md)\ [`_get_osfhandle`](get-osfhandle.md) diff --git a/docs/c-runtime-library/reference/open-wopen.md b/docs/c-runtime-library/reference/open-wopen.md index 6b82727fa77..a85a52217ee 100644 --- a/docs/c-runtime-library/reference/open-wopen.md +++ b/docs/c-runtime-library/reference/open-wopen.md @@ -52,7 +52,7 @@ Each of these functions returns a file descriptor for the opened file. A return | **`EMFILE`** | No more file descriptors are available (too many files are open). | | **`ENOENT`** | File or path not found. | -For more information about these and other return codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +For more information about these and other return codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks @@ -79,7 +79,7 @@ The **`_open`** function opens the file specified by *`filename`* and prepares i | **`_O_RDONLY`** | Opens a file for reading only. Can't be specified with **`_O_RDWR`** or **`_O_WRONLY`**. | | **`_O_RDWR`** | Opens a file for both reading and writing. Can't be specified with **`_O_RDONLY`** or **`_O_WRONLY`**. | | **`_O_SEQUENTIAL`** | Specifies that caching is optimized for, but not restricted to, sequential access from disk. | -| **`_O_TEXT`** | Opens a file in text (translated) mode. (For more information, see [Text and binary mode file I/O](../../c-runtime-library/text-and-binary-mode-file-i-o.md) and [`fopen`](fopen-wfopen.md).) | +| **`_O_TEXT`** | Opens a file in text (translated) mode. (For more information, see [Text and binary mode file I/O](../text-and-binary-mode-file-i-o.md) and [`fopen`](fopen-wfopen.md).) | | **`_O_TRUNC`** | Opens a file and truncates it to zero length; the file must have write permission. Can't be specified with **`_O_RDONLY`**. **`_O_TRUNC`** used with **`_O_CREAT`** opens an existing file or creates a file. **Note:** The **`_O_TRUNC`** flag destroys the contents of the specified file. | | **`_O_WRONLY`** | Opens a file for writing only. Can't be specified with **`_O_RDONLY`** or **`_O_RDWR`**. | | **`_O_U16TEXT`** | Opens a file in Unicode UTF-16 mode. | @@ -94,7 +94,7 @@ When a file is opened in Unicode mode by using **`_O_WTEXT`**, **`_O_U8TEXT`**, If **`_open`** is called with **`_O_WRONLY | _O_APPEND`** (append mode) and **`_O_WTEXT`**, **`_O_U16TEXT`**, or **`_O_U8TEXT`**, it first tries to open the file for reading and writing, read the BOM, then reopen it for writing only. If opening the file for reading and writing fails, it opens the file for writing only and uses the default value for the Unicode mode setting. -When two or more manifest constants are used to form the *`oflag`* argument, the constants are combined with the bitwise-OR operator ( **`|`** ). For a discussion of binary and text modes, see [Text and binary mode file I/O](../../c-runtime-library/text-and-binary-mode-file-i-o.md). +When two or more manifest constants are used to form the *`oflag`* argument, the constants are combined with the bitwise-OR operator ( **`|`** ). For a discussion of binary and text modes, see [Text and binary mode file I/O](../text-and-binary-mode-file-i-o.md). The *`pmode`* argument is required only when **`_O_CREAT`** is specified. If the file already exists, *`pmode`* is ignored. Otherwise, *`pmode`* specifies the file permission settings, which are set when the new file is closed the first time. **`_open`** applies the current file-permission mask to *`pmode`* before the permissions are set. (For more information, see [`_umask`](umask.md).) *`pmode`* is an integer expression that contains one or both of the following manifest constants, which are defined in ``. @@ -106,7 +106,7 @@ The *`pmode`* argument is required only when **`_O_CREAT`** is specified. If the When both constants are given, they're joined with the bitwise-OR operator ( **`|`** ). In Windows, all files are readable; write-only permission isn't available. Therefore, the modes **`_S_IWRITE`** and **`_S_IREAD`** | **`_S_IWRITE`** are equivalent. -If a value other than some combination of **`_S_IREAD`** and **`_S_IWRITE`** is specified for *`pmode`*—even if it would specify a valid *`pmode`* in another operating system—or if any value other than the allowed *`oflag`* values is specified, the function generates an assertion in Debug mode and invokes the invalid parameter handler, as described in [Parameter validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, the function returns -1 and sets **`errno`** to **`EINVAL`**. +If a value other than some combination of **`_S_IREAD`** and **`_S_IWRITE`** is specified for *`pmode`*—even if it would specify a valid *`pmode`* in another operating system—or if any value other than the allowed *`oflag`* values is specified, the function generates an assertion in Debug mode and invokes the invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, the function returns -1 and sets **`errno`** to **`EINVAL`**. ## Requirements @@ -115,11 +115,11 @@ If a value other than some combination of **`_S_IREAD`** and **`_S_IWRITE`** is | **`_open`** | `` | ``, ``, `` | | **`_wopen`** | `` or `` | ``, ``, `` | -**`_open`** and **`_wopen`** are Microsoft extensions. For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +**`_open`** and **`_wopen`** are Microsoft extensions. For more compatibility information, see [Compatibility](../compatibility.md). ## Libraries -All versions of the [C run-time libraries](../../c-runtime-library/crt-library-features.md). +All versions of the [C run-time libraries](../crt-library-features.md). ## Example @@ -172,7 +172,7 @@ Open succeeded on output file ## See also -[Low-level I/O](../../c-runtime-library/low-level-i-o.md)\ +[Low-level I/O](../low-level-i-o.md)\ [`_chmod`, `_wchmod`](chmod-wchmod.md)\ [`_close`](close.md)\ [`_creat`, `_wcreat`](creat-wcreat.md)\ diff --git a/docs/c-runtime-library/reference/open.md b/docs/c-runtime-library/reference/open.md index d1f53a77b74..86404086750 100644 --- a/docs/c-runtime-library/reference/open.md +++ b/docs/c-runtime-library/reference/open.md @@ -12,6 +12,6 @@ ms.assetid: e3139118-4da2-434b-a551-fcf3fccf49b5 --- # open -The Microsoft-implemented POSIX function name `open` is a deprecated alias for the [_open](open-wopen.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. +The Microsoft-implemented POSIX function name `open` is a deprecated alias for the [`_open`](open-wopen.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. -We recommend you use [_open](open-wopen.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). +We recommend you use [`_open`](open-wopen.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). diff --git a/docs/c-runtime-library/reference/pclose.md b/docs/c-runtime-library/reference/pclose.md index 060eb281dbf..48403896cdf 100644 --- a/docs/c-runtime-library/reference/pclose.md +++ b/docs/c-runtime-library/reference/pclose.md @@ -27,18 +27,18 @@ FILE *stream ### Parameters -*stream*
+*`stream`*\ Return value from the previous call to **_popen**. -## Return Value +## Return value Returns the exit status of the terminating command processor, or -1 if an error occurs. The format of the return value is the same as that for **_cwait**, except the low-order and high-order bytes are swapped. If stream is **NULL**, **_pclose** sets **errno** to **EINVAL** and returns -1. -For information about these and other error codes, see [_doserrno, errno, _sys_errlist, and _sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +For information about these and other error codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks -The **_pclose** function looks up the process ID of the command processor (Cmd.exe) started by the associated **_popen** call, executes a [_cwait](cwait.md) call on the new command processor, and closes the stream on the associated pipe. +The **_pclose** function looks up the process ID of the command processor (Cmd.exe) started by the associated **_popen** call, executes a [`_cwait`](cwait.md) call on the new command processor, and closes the stream on the associated pipe. 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). @@ -48,14 +48,14 @@ By default, this function's global state is scoped to the application. To change |-------------|---------------------| |**_pclose**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Libraries -All versions of the [C run-time libraries](../../c-runtime-library/crt-library-features.md). +All versions of the [C run-time libraries](../crt-library-features.md). ## See also -[Process and Environment Control](../../c-runtime-library/process-and-environment-control.md)
-[_pipe](pipe.md)
-[_popen, _wpopen](popen-wpopen.md)
+[Process and environment control](../process-and-environment-control.md)\ +[`_pipe`](pipe.md)\ +[`_popen`, `_wpopen`](popen-wpopen.md) diff --git a/docs/c-runtime-library/reference/perror-wperror.md b/docs/c-runtime-library/reference/perror-wperror.md index edf10087171..7385f7632ce 100644 --- a/docs/c-runtime-library/reference/perror-wperror.md +++ b/docs/c-runtime-library/reference/perror-wperror.md @@ -27,28 +27,28 @@ void _wperror( ### Parameters -*message*
+*`message`*\ String message to print. ## Remarks -The **perror** function prints an error message to **stderr**. **_wperror** is a wide-character version of **_perror**; the *message* argument to **_wperror** is a wide-character string. **_wperror** and **_perror** behave identically otherwise. +The **perror** function prints an error message to **stderr**. **_wperror** is a wide-character version of **_perror**; the *`message`* argument to **_wperror** is a wide-character string. **_wperror** and **_perror** behave identically otherwise. 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| |---------------------|------------------------------------|--------------------|-----------------------| |**_tperror**|**perror**|**perror**|**_wperror**| -*message* is printed first, followed by a colon, then by the system error message for the last library call that produced the error, and finally by a newline character. If *message* is a null pointer or a pointer to a null string, **perror** prints only the system error message. +*`message`* is printed first, followed by a colon, then by the system error message for the last library call that produced the error, and finally by a newline character. If *`message`* is a null pointer or a pointer to a null string, **perror** prints only the system error message. -The error number is stored in the variable [errno](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md) (defined in ERRNO.H). The system error messages are accessed through the variable [_sys_errlist](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md), which is an array of messages ordered by error number. **perror** prints the appropriate error message using the **errno** value as an index to **_sys_errlist**. The value of the variable [_sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md) is defined as the maximum number of elements in the **_sys_errlist** array. +The error number is stored in the variable [`errno`](../errno-doserrno-sys-errlist-and-sys-nerr.md) (defined in ERRNO.H). The system error messages are accessed through the variable [`_sys_errlist`](../errno-doserrno-sys-errlist-and-sys-nerr.md), which is an array of messages ordered by error number. **perror** prints the appropriate error message using the **errno** value as an index to **_sys_errlist**. The value of the variable [`_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md) is defined as the maximum number of elements in the **_sys_errlist** array. For accurate results, call **perror** immediately after a library routine returns with an error. Otherwise, subsequent calls can overwrite the **errno** value. -In the Windows operating system, some **errno** values listed in ERRNO.H are unused. These values are reserved for use by the UNIX operating system. See [_doserrno, errno, _sys_errlist, and _sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md) for a listing of **errno** values used by the Windows operating system. **perror** prints an empty string for any **errno** value not used by these platforms. +In the Windows operating system, some **errno** values listed in ERRNO.H are unused. These values are reserved for use by the UNIX operating system. See [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md) for a listing of **errno** values used by the Windows operating system. **perror** prints an empty string for any **errno** value not used by these platforms. ## Requirements @@ -57,11 +57,11 @@ In the Windows operating system, some **errno** values listed in ERRNO.H are unu |**perror**|\ or \| |**_wperror**|\ or \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Libraries -All versions of the [C run-time libraries](../../c-runtime-library/crt-library-features.md). +All versions of the [C run-time libraries](../crt-library-features.md). ## Example @@ -113,7 +113,7 @@ _strerror says open failed: No such file or directory ## See also -[Process and Environment Control](../../c-runtime-library/process-and-environment-control.md)
-[clearerr](clearerr.md)
-[ferror](ferror.md)
-[strerror, _strerror, _wcserror, \__wcserror](strerror-strerror-wcserror-wcserror.md)
+[Process and environment control](../process-and-environment-control.md)\ +[`clearerr`](clearerr.md)\ +[`ferror`](ferror.md)\ +[`strerror`, `_strerror`, `_wcserror`, `__wcserror`](strerror-strerror-wcserror-wcserror.md) diff --git a/docs/c-runtime-library/reference/pipe.md b/docs/c-runtime-library/reference/pipe.md index bf603129574..ca2670672ee 100644 --- a/docs/c-runtime-library/reference/pipe.md +++ b/docs/c-runtime-library/reference/pipe.md @@ -37,7 +37,7 @@ Amount of memory to reserve. *`textmode`*\ File mode. -## Return Value +## Return value Returns 0 if successful. Returns -1 to indicate an error. On error, **`errno`** is set to one of these values: @@ -47,7 +47,7 @@ Returns 0 if successful. Returns -1 to indicate an error. On error, **`errno`** - **`EINVAL`**, which indicates that either the array *`pfds`* is a null pointer or that an invalid value for *`textmode`* was passed in. -For more information about these and other return codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +For more information about these and other return codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks @@ -59,7 +59,7 @@ The standard output descriptor of **`PROGRAM1`** is attached to the pipe's write The **`_pipe`** function returns two file descriptors to the pipe in the *`pfds`* argument. The element *`pfds`*[0] contains the read descriptor, and the element *`pfds`*[1] contains the write descriptor. Pipe file descriptors are used in the same way as other file descriptors. (The low-level input and output functions **`_read`** and **`_write`** can read from and write to a pipe.) To detect the end-of-pipe condition, check for a **`_read`** request that returns 0 as the number of bytes read. -The *`psize`* argument specifies the amount of memory, in bytes, to reserve for the pipe. The *`textmode`* argument specifies the translation mode for the pipe. The manifest constant **`_O_TEXT`** specifies a text translation, and the constant **`_O_BINARY`** specifies binary translation. (See [`fopen`, `_wfopen`](fopen-wfopen.md) for a description of text and binary modes.) If the *`textmode`* argument is 0, **`_pipe`** uses the default translation mode that's specified by the default-mode variable [`_fmode`](../../c-runtime-library/fmode.md). +The *`psize`* argument specifies the amount of memory, in bytes, to reserve for the pipe. The *`textmode`* argument specifies the translation mode for the pipe. The manifest constant **`_O_TEXT`** specifies a text translation, and the constant **`_O_BINARY`** specifies binary translation. (See [`fopen`, `_wfopen`](fopen-wfopen.md) for a description of text and binary modes.) If the *`textmode`* argument is 0, **`_pipe`** uses the default translation mode that's specified by the default-mode variable [`_fmode`](../fmode.md). In multithreaded programs, no locking is performed. The file descriptors that are returned are newly opened and shouldn't be referenced by any thread until after the **`_pipe`** call is complete. @@ -79,11 +79,11 @@ By default, this function's global state is scoped to the application. To change 2 **`errno`** definitions. -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Libraries -All versions of the [C run-time libraries](../../c-runtime-library/crt-library-features.md). +All versions of the [C run-time libraries](../crt-library-features.md). ## Example 1 @@ -321,5 +321,5 @@ This is speaker beep number 10... ## See also -[Process and Environment Control](../../c-runtime-library/process-and-environment-control.md)\ +[Process and environment control](../process-and-environment-control.md)\ [`_open`, `_wopen`](open-wopen.md) diff --git a/docs/c-runtime-library/reference/popen-wpopen.md b/docs/c-runtime-library/reference/popen-wpopen.md index b0e096c7864..b2a81ce81f1 100644 --- a/docs/c-runtime-library/reference/popen-wpopen.md +++ b/docs/c-runtime-library/reference/popen-wpopen.md @@ -43,7 +43,7 @@ Mode of the returned stream. Returns a stream associated with one end of the created pipe. The other end of the pipe is associated with the spawned command's standard input or standard output. The functions return **`NULL`** on an error. If the error is caused by an invalid parameter, **`errno`** is set to **`EINVAL`**. See the Remarks section for valid modes. -For information about these and other error codes, see [`_doserrno`, `errno`, `_sys_errlist`, and `_sys_nerr`](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +For information about these and other error codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks @@ -57,13 +57,13 @@ The **`_popen`** function creates a pipe. It then asynchronously executes a spaw |**"t"**|Open in text mode.| > [!NOTE] -> If used in a Windows program, the **`_popen`** function returns an invalid file pointer that causes the program to stop responding indefinitely. **`_popen`** works properly in a console application. To create a Windows application that redirects input and output, see [Creating a Child Process with Redirected Input and Output](/windows/win32/ProcThread/creating-a-child-process-with-redirected-input-and-output) in the Windows SDK. +> If used in a Windows program, the **`_popen`** function returns an invalid file pointer that causes the program to stop responding indefinitely. **`_popen`** works properly in a console application. To create a Windows application that redirects input and output, see [Creating a child process with redirected input and output](/windows/win32/ProcThread/creating-a-child-process-with-redirected-input-and-output) in the Windows SDK. -**`_wpopen`** is a wide-character version of **`_popen`**; the *path* argument to **`_wpopen`** is a wide-character string. **`_wpopen`** and **`_popen`** behave identically otherwise. +**`_wpopen`** is a wide-character version of **`_popen`**; the *`path`* argument to **`_wpopen`** is a wide-character string. **`_wpopen`** and **`_popen`** behave identically otherwise. 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| |---------------------|--------------------------------------|--------------------|-----------------------| @@ -76,11 +76,11 @@ By default, this function's global state is scoped to the application. To change |**`_popen`**|``| |**`_wpopen`**|`` or ``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Libraries -All versions of the [C run-time libraries](../../c-runtime-library/crt-library-features.md). +All versions of the [C run-time libraries](../crt-library-features.md). ## Example @@ -143,6 +143,6 @@ Process returned 0 ## See also -[Process and environment control](../../c-runtime-library/process-and-environment-control.md)\ +[Process and environment control](../process-and-environment-control.md)\ [`_pclose`](pclose.md)\ [`_pipe`](pipe.md) diff --git a/docs/c-runtime-library/reference/posix-chsize.md b/docs/c-runtime-library/reference/posix-chsize.md index b71b2b63e97..ec05d40fc38 100644 --- a/docs/c-runtime-library/reference/posix-chsize.md +++ b/docs/c-runtime-library/reference/posix-chsize.md @@ -12,6 +12,6 @@ ms.assetid: f94d62f6-b539-4cbf-bf99-b81d081b4216 --- # chsize -The Microsoft-specific function name `chsize` is a deprecated alias for the [_chsize](chsize.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. +The Microsoft-specific function name `chsize` is a deprecated alias for the [`_chsize`](chsize.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. -We recommend you use [_chsize](chsize.md) or the security-enhanced [_chsize_s](chsize-s.md) function instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). +We recommend you use [`_chsize`](chsize.md) or the security-enhanced [`_chsize_s`](chsize-s.md) function instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). diff --git a/docs/c-runtime-library/reference/posix-close.md b/docs/c-runtime-library/reference/posix-close.md index 4ae588f0d40..bcc2844fc6f 100644 --- a/docs/c-runtime-library/reference/posix-close.md +++ b/docs/c-runtime-library/reference/posix-close.md @@ -12,6 +12,6 @@ ms.assetid: c79689f4-9c86-4a4a-a256-d22e3498f55d --- # close -The Microsoft-implemented POSIX function name `close` is a deprecated alias for the [_close](close.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. +The Microsoft-implemented POSIX function name `close` is a deprecated alias for the [`_close`](close.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. -We recommend you use [_close](close.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). +We recommend you use [`_close`](close.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). diff --git a/docs/c-runtime-library/reference/posix-cwait.md b/docs/c-runtime-library/reference/posix-cwait.md index a075885647f..0dcb1d55cf6 100644 --- a/docs/c-runtime-library/reference/posix-cwait.md +++ b/docs/c-runtime-library/reference/posix-cwait.md @@ -12,9 +12,9 @@ ms.assetid: 1ad1ab19-02e5-4155-94ca-f02c2d5a90a6 --- # cwait -The Microsoft-specific function name `cwait` is a deprecated alias for the [_cwait](cwait.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. +The Microsoft-specific function name `cwait` is a deprecated alias for the [`_cwait`](cwait.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. -We recommend you use [_cwait](cwait.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). +We recommend you use [`_cwait`](cwait.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). > [!IMPORTANT] > This API cannot be used in applications that execute in the Windows Runtime. For more information, see [CRT functions not supported in Universal Windows Platform apps](../../cppcx/crt-functions-not-supported-in-universal-windows-platform-apps.md). diff --git a/docs/c-runtime-library/reference/posix-dup-dup2.md b/docs/c-runtime-library/reference/posix-dup-dup2.md index 8493deb9953..10a85f8af59 100644 --- a/docs/c-runtime-library/reference/posix-dup-dup2.md +++ b/docs/c-runtime-library/reference/posix-dup-dup2.md @@ -12,6 +12,6 @@ ms.assetid: c7572170-47ff-4e0d-b9c3-10f0ab0ba40a --- # dup, dup2 -The Microsoft-implemented POSIX function names `dup` and `dup2` are deprecated aliases for the [_dup](dup-dup2.md) and [_dup2](dup-dup2.md) functions. By default, they generate [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The names are deprecated because they don't follow the Standard C rules for implementation-specific names. However, the functions are still supported. +The Microsoft-implemented POSIX function names `dup` and `dup2` are deprecated aliases for the [`_dup`](dup-dup2.md) and [`_dup2`](dup-dup2.md) functions. By default, they generate [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The names are deprecated because they don't follow the Standard C rules for implementation-specific names. However, the functions are still supported. -We recommend you use [_dup](dup-dup2.md) and [_dup2](dup-dup2.md) instead. Or, you can continue to use these function names, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). +We recommend you use [`_dup`](dup-dup2.md) and [`_dup2`](dup-dup2.md) instead. Or, you can continue to use these function names, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). diff --git a/docs/c-runtime-library/reference/posix-ecvt.md b/docs/c-runtime-library/reference/posix-ecvt.md index 9c02ed49d44..3c02f1c4d9e 100644 --- a/docs/c-runtime-library/reference/posix-ecvt.md +++ b/docs/c-runtime-library/reference/posix-ecvt.md @@ -12,6 +12,6 @@ ms.assetid: a24fccea-033a-4cc7-b120-4fd0f525a7e3 --- # ecvt -The Microsoft-specific function name `ecvt` is a deprecated alias for the [_ecvt](ecvt.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. +The Microsoft-specific function name `ecvt` is a deprecated alias for the [`_ecvt`](ecvt.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. -We recommend you use [_ecvt](ecvt.md) or the security-enhanced [_ecvt_s](ecvt-s.md) function instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). +We recommend you use [`_ecvt`](ecvt.md) or the security-enhanced [`_ecvt_s`](ecvt-s.md) function instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). diff --git a/docs/c-runtime-library/reference/posix-eof.md b/docs/c-runtime-library/reference/posix-eof.md index e0ff5e79aac..6fc52d582e3 100644 --- a/docs/c-runtime-library/reference/posix-eof.md +++ b/docs/c-runtime-library/reference/posix-eof.md @@ -12,6 +12,6 @@ ms.assetid: 2e8fb55b-b736-46a6-be5e-15f8876a714f --- # eof -The Microsoft-specific function name `eof` is a deprecated alias for the [_eof](eof.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. +The Microsoft-specific function name `eof` is a deprecated alias for the [`_eof`](eof.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. -We recommend you use [_eof](eof.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). +We recommend you use [`_eof`](eof.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). diff --git a/docs/c-runtime-library/reference/posix-fcvt.md b/docs/c-runtime-library/reference/posix-fcvt.md index ecab0f6c043..ddddadd2b7f 100644 --- a/docs/c-runtime-library/reference/posix-fcvt.md +++ b/docs/c-runtime-library/reference/posix-fcvt.md @@ -12,6 +12,6 @@ ms.assetid: 1f748ad0-e186-400e-af8e-80d4431523d7 --- # fcvt -The Microsoft-specific function name `fcvt` is a deprecated alias for the [_fcvt](fcvt.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. +The Microsoft-specific function name `fcvt` is a deprecated alias for the [`_fcvt`](fcvt.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. -We recommend you use [_fcvt](fcvt.md) or the security-enhanced [_fcvt_s](fcvt-s.md) function instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). +We recommend you use [`_fcvt`](fcvt.md) or the security-enhanced [`_fcvt_s`](fcvt-s.md) function instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). diff --git a/docs/c-runtime-library/reference/posix-fileno.md b/docs/c-runtime-library/reference/posix-fileno.md index 9331d44a2ba..fc2d159fa53 100644 --- a/docs/c-runtime-library/reference/posix-fileno.md +++ b/docs/c-runtime-library/reference/posix-fileno.md @@ -12,6 +12,6 @@ ms.assetid: 8f33e1e0-0dc8-4311-b690-ec6e577a64b5 --- # fileno -The Microsoft-implemented POSIX function name `fileno` is a deprecated alias for the [_fileno](fileno.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. +The Microsoft-implemented POSIX function name `fileno` is a deprecated alias for the [`_fileno`](fileno.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. -We recommend you use [_fileno](fileno.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). +We recommend you use [`_fileno`](fileno.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). diff --git a/docs/c-runtime-library/reference/posix-flushall.md b/docs/c-runtime-library/reference/posix-flushall.md index b2e53a526bf..5efdf2f262a 100644 --- a/docs/c-runtime-library/reference/posix-flushall.md +++ b/docs/c-runtime-library/reference/posix-flushall.md @@ -12,6 +12,6 @@ ms.assetid: 481429ae-3980-4233-9495-a3ee56e7c838 --- # flushall -The Microsoft-specific function name `flushall` is a deprecated alias for the [_flushall](flushall.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. +The Microsoft-specific function name `flushall` is a deprecated alias for the [`_flushall`](flushall.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. -We recommend you use [_flushall](flushall.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). +We recommend you use [`_flushall`](flushall.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). diff --git a/docs/c-runtime-library/reference/posix-gcvt.md b/docs/c-runtime-library/reference/posix-gcvt.md index f954e02fa6c..919d46c1614 100644 --- a/docs/c-runtime-library/reference/posix-gcvt.md +++ b/docs/c-runtime-library/reference/posix-gcvt.md @@ -12,6 +12,6 @@ ms.assetid: 913478fd-ef22-4dee-b558-ff2bd6d72f3d --- # gcvt -The Microsoft-specific function name `gcvt` is a deprecated alias for the [_gcvt](gcvt.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. +The Microsoft-specific function name `gcvt` is a deprecated alias for the [`_gcvt`](gcvt.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. -We recommend you use [_gcvt](gcvt.md) or the security-enhanced [_gcvt_s](gcvt-s.md) function instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). +We recommend you use [`_gcvt`](gcvt.md) or the security-enhanced [`_gcvt_s`](gcvt-s.md) function instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). diff --git a/docs/c-runtime-library/reference/posix-getw.md b/docs/c-runtime-library/reference/posix-getw.md index 1c26fcd4b6f..0f27b58e172 100644 --- a/docs/c-runtime-library/reference/posix-getw.md +++ b/docs/c-runtime-library/reference/posix-getw.md @@ -12,6 +12,6 @@ ms.assetid: d3c347a4-3ff1-403b-8d02-2dd3b429bb5f --- # getw -The Microsoft-specific function name `getw` is a deprecated alias for the [_getw](getw.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. +The Microsoft-specific function name `getw` is a deprecated alias for the [`_getw`](getw.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. -We recommend you use [_getw](getw.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). +We recommend you use [`_getw`](getw.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). diff --git a/docs/c-runtime-library/reference/posix-isatty.md b/docs/c-runtime-library/reference/posix-isatty.md index 73151ae8e7c..21627526a09 100644 --- a/docs/c-runtime-library/reference/posix-isatty.md +++ b/docs/c-runtime-library/reference/posix-isatty.md @@ -12,6 +12,6 @@ ms.assetid: 610d0b09-a1db-41ef-9f45-a2c6076b4683 --- # isatty -The Microsoft-implemented POSIX function name `isatty` is a deprecated alias for the [_isatty](isatty.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. +The Microsoft-implemented POSIX function name `isatty` is a deprecated alias for the [`_isatty`](isatty.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. -We recommend you use [_isatty](isatty.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). +We recommend you use [`_isatty`](isatty.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). diff --git a/docs/c-runtime-library/reference/posix-kbhit.md b/docs/c-runtime-library/reference/posix-kbhit.md index 315579e00f2..27a143bd566 100644 --- a/docs/c-runtime-library/reference/posix-kbhit.md +++ b/docs/c-runtime-library/reference/posix-kbhit.md @@ -12,9 +12,9 @@ ms.assetid: 73f1eed7-b3ef-4887-8ec6-755367de1d7d --- # kbhit -The Microsoft-specific function name `kbhit` is a deprecated alias for the [_kbhit](kbhit.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. +The Microsoft-specific function name `kbhit` is a deprecated alias for the [`_kbhit`](kbhit.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. -We recommend you use [_kbhit](kbhit.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). +We recommend you use [`_kbhit`](kbhit.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). > [!IMPORTANT] > This API cannot be used in applications that execute in the Windows Runtime. For more information, see [CRT functions not supported in Universal Windows Platform apps](../../cppcx/crt-functions-not-supported-in-universal-windows-platform-apps.md). diff --git a/docs/c-runtime-library/reference/posix-lfind.md b/docs/c-runtime-library/reference/posix-lfind.md index 52dafe65238..e3b722bbe0c 100644 --- a/docs/c-runtime-library/reference/posix-lfind.md +++ b/docs/c-runtime-library/reference/posix-lfind.md @@ -12,6 +12,6 @@ ms.assetid: 2528e787-94b6-4740-8a8d-6efc276d1f42 --- # lfind -The Microsoft-implemented POSIX function name `lfind` is a deprecated alias for the [_lfind](lfind.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. +The Microsoft-implemented POSIX function name `lfind` is a deprecated alias for the [`_lfind`](lfind.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. -We recommend you use [_lfind](lfind.md) or security-enhanced [_lfind_s](lfind-s.md) function instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). +We recommend you use [`_lfind`](lfind.md) or security-enhanced [`_lfind_s`](lfind-s.md) function instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). diff --git a/docs/c-runtime-library/reference/posix-locking.md b/docs/c-runtime-library/reference/posix-locking.md index 3252601bae6..df4af5f56b7 100644 --- a/docs/c-runtime-library/reference/posix-locking.md +++ b/docs/c-runtime-library/reference/posix-locking.md @@ -12,6 +12,6 @@ ms.assetid: 1db15308-543e-44cf-a26f-5539f8e4fb2f --- # locking -The Microsoft-specific function name `locking` is a deprecated alias for the [_locking](locking.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. +The Microsoft-specific function name `locking` is a deprecated alias for the [`_locking`](locking.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. -We recommend you use [_locking](locking.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). +We recommend you use [`_locking`](locking.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). diff --git a/docs/c-runtime-library/reference/posix-lsearch.md b/docs/c-runtime-library/reference/posix-lsearch.md index 3a98aad87f4..b926fd58f59 100644 --- a/docs/c-runtime-library/reference/posix-lsearch.md +++ b/docs/c-runtime-library/reference/posix-lsearch.md @@ -12,6 +12,6 @@ ms.assetid: 130da3fc-904a-4375-b0ab-79bfea8a455f --- # lsearch -The Microsoft-implemented POSIX function name `lsearch` is a deprecated alias for the [_lsearch](lsearch.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. +The Microsoft-implemented POSIX function name `lsearch` is a deprecated alias for the [`_lsearch`](lsearch.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. -We recommend you use [_lsearch](lsearch.md) or security-enhanced [_lsearch_s](lsearch-s.md) function instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). +We recommend you use [`_lsearch`](lsearch.md) or security-enhanced [`_lsearch_s`](lsearch-s.md) function instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). diff --git a/docs/c-runtime-library/reference/posix-memccpy.md b/docs/c-runtime-library/reference/posix-memccpy.md index a94f6bade8d..063ce91ebd2 100644 --- a/docs/c-runtime-library/reference/posix-memccpy.md +++ b/docs/c-runtime-library/reference/posix-memccpy.md @@ -12,6 +12,6 @@ ms.assetid: e9951812-2b69-43e9-bbee-a0001bce4d80 --- # memccpy -The Microsoft-implemented POSIX function name `memccpy` is a deprecated alias for the [_memccpy](memccpy.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. +The Microsoft-implemented POSIX function name `memccpy` is a deprecated alias for the [`_memccpy`](memccpy.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. -We recommend you use [_memccpy](memccpy.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). +We recommend you use [`_memccpy`](memccpy.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). diff --git a/docs/c-runtime-library/reference/posix-putw.md b/docs/c-runtime-library/reference/posix-putw.md index 8182a13dca2..a6ee64b7507 100644 --- a/docs/c-runtime-library/reference/posix-putw.md +++ b/docs/c-runtime-library/reference/posix-putw.md @@ -12,6 +12,6 @@ ms.assetid: a004fbb6-7643-4f3f-9ee1-87a23154d49a --- # putw -The Microsoft-specific function name `putw` is a deprecated alias for the [_putw](putw.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. +The Microsoft-specific function name `putw` is a deprecated alias for the [`_putw`](putw.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. -We recommend you use [_putw](putw.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). +We recommend you use [`_putw`](putw.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). diff --git a/docs/c-runtime-library/reference/posix-read.md b/docs/c-runtime-library/reference/posix-read.md index 46b774c8ae5..933df68cfde 100644 --- a/docs/c-runtime-library/reference/posix-read.md +++ b/docs/c-runtime-library/reference/posix-read.md @@ -12,6 +12,6 @@ ms.assetid: 9e0eead4-d38c-4f65-87f5-f6c12da40ead --- # read -The Microsoft-implemented POSIX function name `read` is a deprecated alias for the [_read](read.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. +The Microsoft-implemented POSIX function name `read` is a deprecated alias for the [`_read`](read.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. -We recommend you use [_read](read.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). +We recommend you use [`_read`](read.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). diff --git a/docs/c-runtime-library/reference/posix-rmtmp.md b/docs/c-runtime-library/reference/posix-rmtmp.md index 801434b958c..4165c60533e 100644 --- a/docs/c-runtime-library/reference/posix-rmtmp.md +++ b/docs/c-runtime-library/reference/posix-rmtmp.md @@ -12,6 +12,6 @@ ms.assetid: d79f0364-39e8-42fb-a73a-63c22a646cd8 --- # rmtmp -The Microsoft-specific function name `rmtmp` is a deprecated alias for the [_rmtmp](rmtmp.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. +The Microsoft-specific function name `rmtmp` is a deprecated alias for the [`_rmtmp`](rmtmp.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. -We recommend you use [_rmtmp](rmtmp.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). +We recommend you use [`_rmtmp`](rmtmp.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). diff --git a/docs/c-runtime-library/reference/posix-setmode.md b/docs/c-runtime-library/reference/posix-setmode.md index 6b4d7557482..d3a745b570a 100644 --- a/docs/c-runtime-library/reference/posix-setmode.md +++ b/docs/c-runtime-library/reference/posix-setmode.md @@ -12,6 +12,6 @@ ms.assetid: cb959d9e-09f3-45af-8943-85f4ca0d3f5a --- # setmode -The Microsoft-specific function name `setmode` is a deprecated alias for the [_setmode](setmode.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. +The Microsoft-specific function name `setmode` is a deprecated alias for the [`_setmode`](setmode.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. -We recommend you use [_setmode](setmode.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). +We recommend you use [`_setmode`](setmode.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). diff --git a/docs/c-runtime-library/reference/posix-swab.md b/docs/c-runtime-library/reference/posix-swab.md index fd9e0270e9b..d8e3f8651f2 100644 --- a/docs/c-runtime-library/reference/posix-swab.md +++ b/docs/c-runtime-library/reference/posix-swab.md @@ -12,6 +12,6 @@ ms.assetid: fb8b7137-420d-4485-bb65-e1ec68602905 --- # swab -The Microsoft-implemented POSIX function name `swab` is a deprecated alias for the [_swab](swab.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. +The Microsoft-implemented POSIX function name `swab` is a deprecated alias for the [`_swab`](swab.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. -We recommend you use [_swab](swab.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). +We recommend you use [`_swab`](swab.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). diff --git a/docs/c-runtime-library/reference/posix-tzset.md b/docs/c-runtime-library/reference/posix-tzset.md index 2508c322e67..27afef7c415 100644 --- a/docs/c-runtime-library/reference/posix-tzset.md +++ b/docs/c-runtime-library/reference/posix-tzset.md @@ -12,9 +12,9 @@ ms.assetid: c3afa5d0-cb15-4163-9181-fafb962c95aa --- # tzset -The Microsoft-implemented POSIX function name `tzset` is a deprecated alias for the [_tzset](tzset.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. +The Microsoft-implemented POSIX function name `tzset` is a deprecated alias for the [`_tzset`](tzset.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. -We recommend you use [_tzset](tzset.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). +We recommend you use [`_tzset`](tzset.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). > [!IMPORTANT] > This API cannot be used in applications that execute in the Windows Runtime. For more information, see [CRT functions not supported in Universal Windows Platform apps](../../cppcx/crt-functions-not-supported-in-universal-windows-platform-apps.md). diff --git a/docs/c-runtime-library/reference/posix-umask.md b/docs/c-runtime-library/reference/posix-umask.md index ea9f5322f29..6dc47cf06d0 100644 --- a/docs/c-runtime-library/reference/posix-umask.md +++ b/docs/c-runtime-library/reference/posix-umask.md @@ -12,6 +12,6 @@ ms.assetid: d2f697fc-08d5-4b70-9dd5-df3f5bb8b754 --- # umask -The Microsoft-implemented POSIX function name `umask` is a deprecated alias for the [_umask](umask.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. +The Microsoft-implemented POSIX function name `umask` is a deprecated alias for the [`_umask`](umask.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. -We recommend you use [_umask](umask.md) or security-enhanced [_umask_s](umask-s.md) function instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). +We recommend you use [`_umask`](umask.md) or security-enhanced [`_umask_s`](umask-s.md) function instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). diff --git a/docs/c-runtime-library/reference/posix-write.md b/docs/c-runtime-library/reference/posix-write.md index c6fba512ec7..8cf8bcccff1 100644 --- a/docs/c-runtime-library/reference/posix-write.md +++ b/docs/c-runtime-library/reference/posix-write.md @@ -12,6 +12,6 @@ ms.assetid: 1cbf112e-b9ef-4df6-993a-83abd4213acd --- # write -The Microsoft-implemented POSIX function name `write` is a deprecated alias for the [_write](write.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. +The Microsoft-implemented POSIX function name `write` is a deprecated alias for the [`_write`](write.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. -We recommend you use [_write](write.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). +We recommend you use [`_write`](write.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). diff --git a/docs/c-runtime-library/reference/pow-powf-powl.md b/docs/c-runtime-library/reference/pow-powf-powl.md index 482db0e962b..a11fe2c5133 100644 --- a/docs/c-runtime-library/reference/pow-powf-powl.md +++ b/docs/c-runtime-library/reference/pow-powf-powl.md @@ -37,15 +37,15 @@ Base. *`y`*\ Exponent. -## Return Value +## Return value Returns the value of *`x`**`y`*. No error message is printed on overflow or underflow. |Values of x and y|Return value of pow| |-----------------------|-------------------------| -|*x* != 0.0 and *y* == 0.0|1| -|*x* == 0.0 and *y* == 0.0|1| -|*x* == 0.0 and *y* < 0|INF| +|*`x`* != 0.0 and *`y`* == 0.0|1| +|*`x`* == 0.0 and *`y`* == 0.0|1| +|*`x`* == 0.0 and *`y`* < 0|INF| ## Remarks @@ -55,11 +55,11 @@ Returns the value of *`x`**`y`*. No error message is printed on overf Because C++ allows overloading, you can call any of the various overloads of **`pow`**. In a C program, unless you're using the `` macro to call this function, **`pow`** always takes two **`double`** values and returns a **`double`** value. -If you use the `` `pow()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../../c-runtime-library/tgmath.md) for details. +If you use the `` `pow()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../tgmath.md) for details. The `pow(int, int)` overload is no longer available. If you use this overload, the compiler may emit [C2668](../../error-messages/compiler-errors-2/compiler-error-c2668.md). To avoid this problem, cast the first parameter to **`double`**, **`float`**, or **`long double`**. -Originally, the `pow(T, int)` overloads would unroll the `pow` call into a sequence of inline multiplication operations. While this was faster, it was also significantly less accurate and was removed in Visual Studio 2015 Update 1. For more information, see [Conformance Improvements in Visual Studio 2015 Update 1](../../porting/visual-cpp-what-s-new-2003-through-2015.md). +Originally, the `pow(T, int)` overloads would unroll the `pow` call into a sequence of inline multiplication operations. While this was faster, it was also significantly less accurate and was removed in Visual Studio 2015 Update 1. For more information, see [Conformance improvements in Visual Studio 2015 Update 1](../../porting/visual-cpp-what-s-new-2003-through-2015.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). @@ -70,7 +70,7 @@ By default, this function's global state is scoped to the application. To change |**`pow`**, **`powf`**, **`powl`**|``|`` or ``| |**`pow`** macro | `` || -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -95,8 +95,8 @@ int main( void ) ## See also -[Floating-Point Support](../../c-runtime-library/floating-point-support.md)
-[`exp`, `expf`, `expl`](exp-expf.md)
-[`log`, `logf`, `log10`, `log10f`](log-logf-log10-log10f.md)
-[`sqrt`, `sqrtf`, `sqrtl`](sqrt-sqrtf-sqrtl.md)
-[`_CIpow`](../../c-runtime-library/cipow.md)
+[Math and floating-point support](../floating-point-support.md)\ +[`exp`, `expf`, `expl`](exp-expf.md)\ +[`log`, `logf`, `log10`, `log10f`](log-logf-log10-log10f.md)\ +[`sqrt`, `sqrtf`, `sqrtl`](sqrt-sqrtf-sqrtl.md)\ +[`_CIpow`](../cipow.md) diff --git a/docs/c-runtime-library/reference/printf-p-printf-p-l-wprintf-p-wprintf-p-l.md b/docs/c-runtime-library/reference/printf-p-printf-p-l-wprintf-p-wprintf-p-l.md index af86e3e8ff2..da46f16a2d4 100644 --- a/docs/c-runtime-library/reference/printf-p-printf-p-l-wprintf-p-wprintf-p-l.md +++ b/docs/c-runtime-library/reference/printf-p-printf-p-l-wprintf-p-wprintf-p-l.md @@ -38,35 +38,35 @@ int _wprintf_p_l( ### Parameters -*format*
+*`format`*\ Format control. -*argument*
+*`argument`*\ Optional arguments. -*locale*
+*`locale`*\ The locale to use. -## Return Value +## Return value Returns the number of characters printed or a negative value if an error occurs. ## Remarks -The **_printf_p** function formats and prints a series of characters and values to the standard output stream, **stdout**. If arguments follow the *format* string, the *format* string must contain specifications that determine the output format for the arguments (see [printf_p Positional Parameters](../../c-runtime-library/printf-p-positional-parameters.md)). +The **_printf_p** function formats and prints a series of characters and values to the standard output stream, **stdout**. If arguments follow the *`format`* string, the *`format`* string must contain specifications that determine the output format for the arguments (see [printf_p Positional Parameters](../printf-p-positional-parameters.md)). -The difference between **_printf_p** and **printf_s** is that **_printf_p** supports positional parameters, which allows specifying the order in which the arguments are used in the format string. For more information, see [printf_p Positional Parameters](../../c-runtime-library/printf-p-positional-parameters.md). +The difference between **_printf_p** and **printf_s** is that **_printf_p** supports positional parameters, which allows specifying the order in which the arguments are used in the format string. For more information, see [printf_p Positional Parameters](../printf-p-positional-parameters.md). **_wprintf_p** is the wide-character version of **_printf_p**; they behave identically if the stream is opened in ANSI mode. **_printf_p** doesn't currently support output into a UNICODE stream. The versions of these functions with the **_l** suffix are identical except that they use the locale parameter passed in instead of the current thread locale. > [!IMPORTANT] -> Ensure that *format* is not a user-defined string. +> Ensure that *`format`* is not a user-defined string. -If *format* or *argument* are **NULL**, or of the format string contains invalid formatting characters, **_printf_p** and **_wprintf_p** functions invoke an invalid parameter handler, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, the function returns -1 and sets **errno** to **EINVAL**. +If *`format`* or *`argument`* are **NULL**, or of the format string contains invalid formatting characters, **_printf_p** and **_wprintf_p** functions invoke an invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, the function returns -1 and sets **errno** to **EINVAL**. -### Generic-Text Routine Mappings +### Generic-text routine mappings |Tchar.h routine|_UNICODE and _MBCS not defined|_MBCS defined|_UNICODE defined| |---------------------|--------------------------------------|--------------------|-----------------------| @@ -80,7 +80,7 @@ If *format* or *argument* are **NULL**, or of the format string contains invalid |**_printf_p**, **_printf_p_l**|\| |**_wprintf_p**, **_wprintf_p_l**|\ or \| -The console is not supported in Universal Windows Platform (UWP) apps. The standard stream handles that are associated with the console, **stdin**, **stdout**, and **stderr**, must be redirected before C run-time functions can use them in UWP apps. For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +The console is not supported in Universal Windows Platform (UWP) apps. The standard stream handles that are associated with the console, **stdin**, **stdout**, and **stderr**, must be redirected before C run-time functions can use them in UWP apps. For more compatibility information, see [Compatibility](../compatibility.md). > [!IMPORTANT] > Starting in Windows 10 version 2004 (build 19041), the `printf` family of functions prints exactly representable floating point numbers according to the IEEE 754 rules for rounding. In previous versions of Windows, exactly representable floating point numbers ending in '5' would always round up. IEEE 754 states that they must round to the closest even digit (also known as "Banker's Rounding"). For example, both `printf("%1.0f", 1.5)` and `printf("%1.0f", 2.5)` should round to 2. Previously, 1.5 would round to 2 and 2.5 would round to 3. This change only affects exactly representable numbers. For example, 2.35 (which, when represented in memory, is closer to 2.35000000000000008) continues to round up to 2.4. Rounding done by these functions now also respects the floating point rounding mode set by [`fesetround`](fegetround-fesetround2.md). Previously, rounding always chose `FE_TONEAREST` behavior. This change only affects programs built using Visual Studio 2019 version 16.2 and later. To use the legacy floating point rounding behavior, link with [`legacy_stdio_float_rounding.obj`](../link-options.md). @@ -117,16 +117,16 @@ Width specifiers: Hello ## See also -[Floating-Point Support](../../c-runtime-library/floating-point-support.md)
-[Stream I/O](../../c-runtime-library/stream-i-o.md)
-[Locale](../../c-runtime-library/locale.md)
-[fopen, _wfopen](fopen-wfopen.md)
-[_fprintf_p, _fprintf_p_l, _fwprintf_p, _fwprintf_p_l](fprintf-p-fprintf-p-l-fwprintf-p-fwprintf-p-l.md)
-[fprintf, _fprintf_l, fwprintf, _fwprintf_l](fprintf-fprintf-l-fwprintf-fwprintf-l.md)
-[fprintf_s, _fprintf_s_l, fwprintf_s, _fwprintf_s_l](fprintf-s-fprintf-s-l-fwprintf-s-fwprintf-s-l.md)
-[scanf, _scanf_l, wscanf, _wscanf_l](scanf-scanf-l-wscanf-wscanf-l.md)
-[scanf_s, _scanf_s_l, wscanf_s, _wscanf_s_l](scanf-s-scanf-s-l-wscanf-s-wscanf-s-l.md)
-[_sprintf_p, _sprintf_p_l, _swprintf_p, _swprintf_p_l](sprintf-p-sprintf-p-l-swprintf-p-swprintf-p-l.md)
-[sprintf, _sprintf_l, swprintf, _swprintf_l, \__swprintf_l](sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md)
-[sprintf_s, _sprintf_s_l, swprintf_s, _swprintf_s_l](sprintf-s-sprintf-s-l-swprintf-s-swprintf-s-l.md)
-[vprintf Functions](../../c-runtime-library/vprintf-functions.md)
+[Math and floating-point support](../floating-point-support.md)\ +[Stream I/O](../stream-i-o.md)\ +[Locale](../locale.md)\ +[`fopen`, `_wfopen`](fopen-wfopen.md)\ +[`_fprintf_p`, `_fprintf_p_l`, `_fwprintf_p`, `_fwprintf_p_l`](fprintf-p-fprintf-p-l-fwprintf-p-fwprintf-p-l.md)\ +[`fprintf`, `_fprintf_l`, `fwprintf`, `_fwprintf_l`](fprintf-fprintf-l-fwprintf-fwprintf-l.md)\ +[`fprintf_s`, `_fprintf_s_l`, `fwprintf_s`, `_fwprintf_s_l`](fprintf-s-fprintf-s-l-fwprintf-s-fwprintf-s-l.md)\ +[`scanf`, `_scanf_l`, `wscanf`, `_wscanf_l`](scanf-scanf-l-wscanf-wscanf-l.md)\ +[`scanf_s`, `_scanf_s_l`, `wscanf_s`, `_wscanf_s_l`](scanf-s-scanf-s-l-wscanf-s-wscanf-s-l.md)\ +[`_sprintf_p`, `_sprintf_p_l`, `_swprintf_p`, `_swprintf_p_l`](sprintf-p-sprintf-p-l-swprintf-p-swprintf-p-l.md)\ +[`sprintf`, `_sprintf_l`, `swprintf`, `_swprintf_l`, `__swprintf_l`](sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md)\ +[`sprintf_s`, `_sprintf_s_l`, `swprintf_s`, `_swprintf_s_l`](sprintf-s-sprintf-s-l-swprintf-s-swprintf-s-l.md)\ +[`vprintf` functions](../vprintf-functions.md) diff --git a/docs/c-runtime-library/reference/printf-printf-l-wprintf-wprintf-l.md b/docs/c-runtime-library/reference/printf-printf-l-wprintf-wprintf-l.md index 52908ff20a8..37f76412650 100644 --- a/docs/c-runtime-library/reference/printf-printf-l-wprintf-wprintf-l.md +++ b/docs/c-runtime-library/reference/printf-printf-l-wprintf-wprintf-l.md @@ -38,20 +38,20 @@ int _wprintf_l( ### Parameters -*`format`*
+*`format`*\ Format control. -*`argument`*
+*`argument`*\ Optional arguments. -*`locale`*
+*`locale`*\ The locale to use. -## Return Value +## Return value -Returns the number of characters printed, or a negative value if an error occurs. If *`format`* is **`NULL`**, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, the function returns -1 and sets **`errno`** to **`EINVAL`**. If **`EOF`** (0xFFFF) is encountered in *`argument`*, the function returns -1. +Returns the number of characters printed, or a negative value if an error occurs. If *`format`* is **`NULL`**, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, the function returns -1 and sets **`errno`** to **`EINVAL`**. If **`EOF`** (0xFFFF) is encountered in *`argument`*, the function returns -1. -For information on **`errno`** and error codes, see [`_doserrno`, `errno`, `_sys_errlist`, and `_sys_nerr`](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +For information on **`errno`** and error codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks @@ -74,12 +74,12 @@ Line one Line two ``` -[Format specifications](../../c-runtime-library/format-specification-syntax-printf-and-wprintf-functions.md) always begin with a percent sign (**%**) and are read left to right. When **`printf`** encounters the first format specification (if any), it converts the value of the first argument after *`format`* and outputs it accordingly. The second format specification causes the second argument to be converted and output, and so on. If there are more arguments than there are format specifications, the extra arguments are ignored. The results are undefined if there are not enough arguments for all the format specifications. +[Format specifications](../format-specification-syntax-printf-and-wprintf-functions.md) always begin with a percent sign (**%**) and are read left to right. When **`printf`** encounters the first format specification (if any), it converts the value of the first argument after *`format`* and outputs it accordingly. The second format specification causes the second argument to be converted and output, and so on. If there are more arguments than there are format specifications, the extra arguments are ignored. The results are undefined if there are not enough arguments for all the format specifications. > [!IMPORTANT] > Ensure that *`format`* is not a user-defined string. -### Generic-Text Routine Mappings +### Generic-text routine mappings |`Tchar.h` routine|`_UNICODE` and `_MBCS` not defined|`_MBCS` defined|`_UNICODE` defined| |---------------------|--------------------------------------|--------------------|-----------------------| @@ -93,7 +93,7 @@ Line one |**`printf`**, **`_printf_l`**|``| |**`wprintf`**, **`_wprintf_l`**|`` or ``| -The console is not supported in Universal Windows Platform (UWP) apps. The standard stream handles that are associated with the console, **`stdin`**, **`stdout`**, and **`stderr`**, must be redirected before C run-time functions can use them in UWP apps. For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +The console is not supported in Universal Windows Platform (UWP) apps. The standard stream handles that are associated with the console, **`stdin`**, **`stdout`**, and **`stderr`**, must be redirected before C run-time functions can use them in UWP apps. For more compatibility information, see [Compatibility](../compatibility.md). > [!IMPORTANT] > Starting in Windows 10 version 2004 (build 19041), the `printf` family of functions prints exactly representable floating point numbers according to the IEEE 754 rules for rounding. In previous versions of Windows, exactly representable floating point numbers ending in '5' would always round up. IEEE 754 states that they must round to the closest even digit (also known as "Banker's Rounding"). For example, both `printf("%1.0f", 1.5)` and `printf("%1.0f", 2.5)` should round to 2. Previously, 1.5 would round to 2 and 2.5 would round to 3. This change only affects exactly representable numbers. For example, 2.35 (which, when represented in memory, is closer to 2.35000000000000008) continues to round up to 2.4. Rounding done by these functions now also respects the floating point rounding mode set by [`fesetround`](fegetround-fesetround2.md). Previously, rounding always chose `FE_TONEAREST` behavior. This change only affects programs built using Visual Studio 2019 version 16.2 and later. To use the legacy floating point rounding behavior, link with [`legacy_stdio_float_rounding.obj`](../link-options.md). @@ -157,7 +157,7 @@ int main( void ) } ``` -### Sample Output +### Sample output ```Output Integer formats: @@ -186,13 +186,13 @@ Address as: 0012FF3C ## See also -[Format Specification Syntax: `printf` and `wprintf` Functions](../format-specification-syntax-printf-and-wprintf-functions.md)
-[Floating-Point Support](../../c-runtime-library/floating-point-support.md)
-[Stream I/O](../../c-runtime-library/stream-i-o.md)
-[Locale](../../c-runtime-library/locale.md)
-[`fopen`, `_wfopen`](fopen-wfopen.md)
-[`_fprintf_p`, `_fprintf_p_l`, `_fwprintf_p`, `_fwprintf_p_l`](fprintf-p-fprintf-p-l-fwprintf-p-fwprintf-p-l.md)
-[`scanf`, `_scanf_l`, `wscanf`, `_wscanf_l`](scanf-scanf-l-wscanf-wscanf-l.md)
-[`sprintf`, `_sprintf_l`, `swprintf`, `_swprintf_l`, `__swprintf_l`](sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md)
-[`vprintf` Functions](../../c-runtime-library/vprintf-functions.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)\ +[Math and floating-point support](../floating-point-support.md)\ +[Stream I/O](../stream-i-o.md)\ +[Locale](../locale.md)\ +[`fopen`, `_wfopen`](fopen-wfopen.md)\ +[`_fprintf_p`, `_fprintf_p_l`, `_fwprintf_p`, `_fwprintf_p_l`](fprintf-p-fprintf-p-l-fwprintf-p-fwprintf-p-l.md)\ +[`scanf`, `_scanf_l`, `wscanf`, `_wscanf_l`](scanf-scanf-l-wscanf-wscanf-l.md)\ +[`sprintf`, `_sprintf_l`, `swprintf`, `_swprintf_l`, `__swprintf_l`](sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md)\ +[`vprintf` functions](../vprintf-functions.md)\ +[`_set_output_format`](../set-output-format.md) diff --git a/docs/c-runtime-library/reference/printf-s-printf-s-l-wprintf-s-wprintf-s-l.md b/docs/c-runtime-library/reference/printf-s-printf-s-l-wprintf-s-wprintf-s-l.md index a8b31000310..2abf47a6f4e 100644 --- a/docs/c-runtime-library/reference/printf-s-printf-s-l-wprintf-s-wprintf-s-l.md +++ b/docs/c-runtime-library/reference/printf-s-printf-s-l-wprintf-s-wprintf-s-l.md @@ -11,7 +11,7 @@ helpviewer_keywords: ["wprintf_s function", "tprintf_s function", "_tprintf_s fu --- # `printf_s`, `_printf_s_l`, `wprintf_s`, `_wprintf_s_l` -Prints formatted output to the standard output stream. These versions of [`printf`, `_printf_l`, `wprintf`, `_wprintf_l`](printf-printf-l-wprintf-wprintf-l.md) have security enhancements, as described in [Security Features in the CRT](../../c-runtime-library/security-features-in-the-crt.md). +Prints formatted output to the standard output stream. These versions of [`printf`, `_printf_l`, `wprintf`, `_wprintf_l`](printf-printf-l-wprintf-wprintf-l.md) have security enhancements, as described in [Security features in the CRT](../security-features-in-the-crt.md). ## Syntax @@ -38,16 +38,16 @@ int _wprintf_s_l( ### Parameters -*`format`*
+*`format`*\ Format control. -*`argument`*
+*`argument`*\ Optional arguments. -*`locale`*
+*`locale`*\ The locale to use. -## Return Value +## Return value Returns the number of characters printed, or a negative value if an error occurs. @@ -55,9 +55,9 @@ Returns the number of characters printed, or a negative value if an error occurs The **`printf_s`** function formats and prints a series of characters and values to the standard output stream, **`stdout`**. If arguments follow the *`format`* string, the *`format`* string must contain specifications that determine the output format for the arguments. -The main difference between **`printf_s`** and **`printf`** is that **`printf_s`** checks the format string for valid formatting characters, whereas **`printf`** only checks if the format string is a null pointer. If either check fails, an invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, the function returns -1 and sets **`errno`** to **`EINVAL`**. +The main difference between **`printf_s`** and **`printf`** is that **`printf_s`** checks the format string for valid formatting characters, whereas **`printf`** only checks if the format string is a null pointer. If either check fails, an invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, the function returns -1 and sets **`errno`** to **`EINVAL`**. -For information on **`errno`** and error codes, see [`_doserrno`, `errno`, `_sys_errlist`, and `_sys_nerr`](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +For information on **`errno`** and error codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). **`printf_s`** and **`fprintf_s`** behave identically except that **`printf_s`** writes output to **`stdout`** rather than to a destination of type **`FILE`**. For more information, see [`fprintf_s`, `_fprintf_s_l`, `fwprintf_s`, `_fwprintf_s_l`](fprintf-s-fprintf-s-l-fwprintf-s-fwprintf-s-l.md). @@ -65,7 +65,7 @@ For information on **`errno`** and error codes, see [`_doserrno`, `errno`, `_sys The versions of these functions with the **`_l`** suffix are identical except that they use the locale parameter passed in instead of the current thread locale. -### Generic-Text Routine Mappings +### Generic-text routine mappings |`TCHAR.H` routine|`_UNICODE` & `_MBCS` not defined|`_MBCS` defined|`_UNICODE` defined| |---------------------|------------------------------------|--------------------|-----------------------| @@ -85,11 +85,10 @@ Line one Line two ``` -[Format specifications](../../c-runtime-library/format-specification-syntax-printf-and-wprintf-functions.md) always begin with a percent sign (**`%`**) and are read left to right. When **`printf_s`** encounters the first format specification (if any), it converts the value of the first argument after *`format`* and outputs it accordingly. The second format specification causes the second argument to be converted and output, and so on. If there are more arguments than there are format specifications, the extra arguments are ignored. The results are undefined if there are not enough arguments for all the format specifications. +[Format specifications](../format-specification-syntax-printf-and-wprintf-functions.md) always begin with a percent sign (**`%`**) and are read left to right. When **`printf_s`** encounters the first format specification (if any), it converts the value of the first argument after *`format`* and outputs it accordingly. The second format specification causes the second argument to be converted and output, and so on. If there are more arguments than there are format specifications, the extra arguments are ignored. The results are undefined if there are not enough arguments for all the format specifications. > [!IMPORTANT] -> Ensure that *format* is not a user-defined string. -> +> Ensure that *`format`* is not a user-defined string. > > Starting in Windows 10 version 2004 (build 19041), the `printf` family of functions prints exactly representable floating point numbers according to the IEEE 754 rules for rounding. In previous versions of Windows, exactly representable floating point numbers ending in '5' would always round up. IEEE 754 states that they must round to the closest even digit (also known as "Banker's Rounding"). For example, both `printf("%1.0f", 1.5)` and `printf("%1.0f", 2.5)` should round to 2. Previously, 1.5 would round to 2 and 2.5 would round to 3. This change only affects exactly representable numbers. For example, 2.35 (which, when represented in memory, is closer to 2.35000000000000008) continues to round up to 2.4. Rounding done by these functions now also respects the floating point rounding mode set by [`fesetround`](fegetround-fesetround2.md). Previously, rounding always chose `FE_TONEAREST` behavior. This change only affects programs built using Visual Studio 2019 version 16.2 and later. To use the legacy floating point rounding behavior, link with [`legacy_stdio_float_rounding.obj`](../link-options.md). @@ -100,9 +99,9 @@ Line one |**`printf_s`**, **`_printf_s_l`**|``| |**`wprintf_s`**, **`_wprintf_s_l`**|`` or ``| -The console is not supported in Universal Windows Platform (UWP) apps. The standard stream handles that are associated with the console, **`stdin`**, **`stdout`**, and **`stderr`**, must be redirected before C run-time functions can use them in UWP apps. For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +The console is not supported in Universal Windows Platform (UWP) apps. The standard stream handles that are associated with the console, **`stdin`**, **`stdout`**, and **`stderr`**, must be redirected before C run-time functions can use them in UWP apps. For more compatibility information, see [Compatibility](../compatibility.md). -The console is not supported in Universal Windows Platform (UWP) apps. The standard stream handles that are associated with the console, **`stdin`**, **`stdout`**, and **`stderr`**, must be redirected before C run-time functions can use them in UWP apps. For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +The console is not supported in Universal Windows Platform (UWP) apps. The standard stream handles that are associated with the console, **`stdin`**, **`stdout`**, and **`stderr`**, must be redirected before C run-time functions can use them in UWP apps. For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -154,7 +153,7 @@ int main( void ) } ``` -### Sample Output +### Sample output ```Output Integer formats: @@ -183,11 +182,11 @@ Address as: 0012FF78 ## See also -[Floating-Point Support](../../c-runtime-library/floating-point-support.md)
-[Stream I/O](../../c-runtime-library/stream-i-o.md)
-[Locale](../../c-runtime-library/locale.md)
-[`fopen`, `_wfopen`](fopen-wfopen.md)
-[`fprintf`, `_fprintf_l`, `fwprintf`, `_fwprintf_l`](fprintf-fprintf-l-fwprintf-fwprintf-l.md)
-[`scanf`, `_scanf_l`, `wscanf`, `_wscanf_l`](scanf-scanf-l-wscanf-wscanf-l.md)
-[`sprintf`, `_sprintf_l`, `swprintf`, `_swprintf_l`, `__swprintf_l`](sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md)
-[`vprintf` Functions](../../c-runtime-library/vprintf-functions.md)
+[Math and floating-point support](../floating-point-support.md)\ +[Stream I/O](../stream-i-o.md)\ +[Locale](../locale.md)\ +[`fopen`, `_wfopen`](fopen-wfopen.md)\ +[`fprintf`, `_fprintf_l`, `fwprintf`, `_fwprintf_l`](fprintf-fprintf-l-fwprintf-fwprintf-l.md)\ +[`scanf`, `_scanf_l`, `wscanf`, `_wscanf_l`](scanf-scanf-l-wscanf-wscanf-l.md)\ +[`sprintf`, `_sprintf_l`, `swprintf`, `_swprintf_l`, `__swprintf_l`](sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md)\ +[`vprintf` functions](../vprintf-functions.md) diff --git a/docs/c-runtime-library/reference/purecall.md b/docs/c-runtime-library/reference/purecall.md index 8ad9ce7d8de..32f054b0f95 100644 --- a/docs/c-runtime-library/reference/purecall.md +++ b/docs/c-runtime-library/reference/purecall.md @@ -24,7 +24,7 @@ extern "C" int __cdecl _purecall(); The **_purecall** function is a Microsoft-specific implementation detail of the Microsoft C++ compiler. This function is not intended to be called by your code directly, and it has no public header declaration. It is documented here because it is a public export of the C Runtime Library. -A call to a pure virtual function is an error because it has no implementation. The compiler generates code to invoke the **_purecall** error handler function when a pure virtual function is called. By default, **_purecall** terminates the program. Before terminating, the **_purecall** function invokes a **_purecall_handler** function if one has been set for the process. You can install your own error handler function for pure virtual function calls, to catch them for debugging or reporting purposes. To use your own error handler, create a function that has the **_purecall_handler** signature, then use [_set_purecall_handler](get-purecall-handler-set-purecall-handler.md) to make it the current handler. +A call to a pure virtual function is an error because it has no implementation. The compiler generates code to invoke the **_purecall** error handler function when a pure virtual function is called. By default, **_purecall** terminates the program. Before terminating, the **_purecall** function invokes a **_purecall_handler** function if one has been set for the process. You can install your own error handler function for pure virtual function calls, to catch them for debugging or reporting purposes. To use your own error handler, create a function that has the **_purecall_handler** signature, then use [`_set_purecall_handler`](get-purecall-handler-set-purecall-handler.md) to make it the current handler. 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). @@ -34,5 +34,5 @@ The **_purecall** function does not have a header declaration. The **_purecall_h ## See also -[Alphabetical Function Reference](crt-alphabetical-function-reference.md)
-[_get_purecall_handler, _set_purecall_handler](get-purecall-handler-set-purecall-handler.md)
+[Alphabetical function reference](crt-alphabetical-function-reference.md)\ +[`_get_purecall_handler`, `_set_purecall_handler`](get-purecall-handler-set-purecall-handler.md) diff --git a/docs/c-runtime-library/reference/putc-nolock-putwc-nolock.md b/docs/c-runtime-library/reference/putc-nolock-putwc-nolock.md index b4cd5293a2a..1b451475583 100644 --- a/docs/c-runtime-library/reference/putc-nolock-putwc-nolock.md +++ b/docs/c-runtime-library/reference/putc-nolock-putwc-nolock.md @@ -29,13 +29,13 @@ wint_t _putwc_nolock( ### Parameters -*c*
+*`c`*\ Character to be written. -*stream*
+*`stream`*\ Pointer to the **FILE** structure. -## Return Value +## Return value See **putc, putwc**. @@ -47,7 +47,7 @@ See **putc, putwc**. 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| |---------------------|--------------------------------------|--------------------|-----------------------| @@ -60,11 +60,11 @@ By default, this function's global state is scoped to the application. To change |**_putc_nolock**|\| |**_putwc_nolock**|\ or \| -The console is not supported in Universal Windows Platform (UWP) apps. The standard stream handles that are associated with the console, **stdin**, **stdout**, and **stderr**, must be redirected before C run-time functions can use them in UWP apps. For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +The console is not supported in Universal Windows Platform (UWP) apps. The standard stream handles that are associated with the console, **stdin**, **stdout**, and **stderr**, must be redirected before C run-time functions can use them in UWP apps. For more compatibility information, see [Compatibility](../compatibility.md). ## Libraries -All versions of the [C run-time libraries](../../c-runtime-library/crt-library-features.md). +All versions of the [C run-time libraries](../crt-library-features.md). ## Example @@ -99,6 +99,6 @@ This is the line of output ## See also -[Stream I/O](../../c-runtime-library/stream-i-o.md)
-[fputc, fputwc](fputc-fputwc.md)
-[getc, getwc](getc-getwc.md)
+[Stream I/O](../stream-i-o.md)\ +[`fputc`, `fputwc`](fputc-fputwc.md)\ +[`getc`, `getwc`](getc-getwc.md) diff --git a/docs/c-runtime-library/reference/putc-putwc.md b/docs/c-runtime-library/reference/putc-putwc.md index 30721e76ed2..b221355aeed 100644 --- a/docs/c-runtime-library/reference/putc-putwc.md +++ b/docs/c-runtime-library/reference/putc-putwc.md @@ -29,27 +29,27 @@ wint_t putwc( ### Parameters -*c*
+*`c`*\ Character to be written. -*stream*
+*`stream`*\ Pointer to **FILE** structure. -## Return Value +## Return value -Returns the character written. To indicate an error or end-of-file condition, **putc** and **putchar** return **EOF**; **putwc** and **putwchar** return **WEOF**. For all four routines, use [ferror](ferror.md) or [feof](feof.md) to check for an error or end of file. If passed a null pointer for *stream*, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, these functions return **EOF** or **WEOF** and set **errno** to **EINVAL**. +Returns the character written. To indicate an error or end-of-file condition, **putc** and **putchar** return **EOF**; **putwc** and **putwchar** return **WEOF**. For all four routines, use [`ferror`](ferror.md) or [`feof`](feof.md) to check for an error or end of file. If passed a null pointer for *`stream`*, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, these functions return **EOF** or **WEOF** and set **errno** to **EINVAL**. -For more information about return codes, see [`_doserrno`, `errno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). +For more information about return codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks -The **putc** routine writes the single character *c* to the output *stream* at the current position. Any integer can be passed to **putc**, but only the lower 8 bits are written. The **putchar** routine is identical to `putc( c, stdout )`. For each routine, if a read error occurs, the error indicator for the stream is set. **putc** and **putchar** are similar to **fputc** and **_fputchar**, respectively, but are implemented both as functions and as macros (see [Choosing Between Functions and Macros](../../c-runtime-library/recommendations-for-choosing-between-functions-and-macros.md)). **putwc** and **putwchar** are wide-character versions of **putc** and **putchar**, respectively. **putwc** and **putc** behave identically if the stream is opened in ANSI mode. **putc** doesn't currently support output into a UNICODE stream. +The **putc** routine writes the single character *`c`* to the output *`stream`* at the current position. Any integer can be passed to **putc**, but only the lower 8 bits are written. The **putchar** routine is identical to `putc( c, stdout )`. For each routine, if a read error occurs, the error indicator for the stream is set. **putc** and **putchar** are similar to **fputc** and **_fputchar**, respectively, but are implemented both as functions and as macros (see [Recommendations for choosing between functions and macros](../recommendations-for-choosing-between-functions-and-macros.md)). **putwc** and **putwchar** are wide-character versions of **putc** and **putchar**, respectively. **putwc** and **putc** behave identically if the stream is opened in ANSI mode. **putc** doesn't currently support output into a UNICODE stream. The versions with the **_nolock** suffix are identical except that they aren't protected from interference by other threads. For more information, see **_putc_nolock, _putwc_nolock**. 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| |---------------------|------------------------------------|--------------------|-----------------------| @@ -62,11 +62,11 @@ By default, this function's global state is scoped to the application. To change |**putc**|\| |**putwc**|\ or \| -The console isn't supported in Universal Windows Platform (UWP) apps. The standard stream handles that are associated with the console, **stdin**, **stdout**, and **stderr**, must be redirected before C run-time functions can use them in UWP apps. For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +The console isn't supported in Universal Windows Platform (UWP) apps. The standard stream handles that are associated with the console, **stdin**, **stdout**, and **stderr**, must be redirected before C run-time functions can use them in UWP apps. For more compatibility information, see [Compatibility](../compatibility.md). ## Libraries -All versions of the [C run-time libraries](../../c-runtime-library/crt-library-features.md). +All versions of the [C run-time libraries](../crt-library-features.md). ## Example @@ -101,6 +101,6 @@ This is the line of output ## See also -[Stream I/O](../../c-runtime-library/stream-i-o.md)
-[fputc, fputwc](fputc-fputwc.md)
-[getc, getwc](getc-getwc.md)
+[Stream I/O](../stream-i-o.md)\ +[`fputc`, `fputwc`](fputc-fputwc.md)\ +[`getc`, `getwc`](getc-getwc.md) diff --git a/docs/c-runtime-library/reference/putch-nolock-putwch-nolock.md b/docs/c-runtime-library/reference/putch-nolock-putwch-nolock.md index 69ea238788d..5c0a0327f9b 100644 --- a/docs/c-runtime-library/reference/putch-nolock-putwch-nolock.md +++ b/docs/c-runtime-library/reference/putch-nolock-putwch-nolock.md @@ -30,12 +30,12 @@ wchar_t c ### Parameters -*c*
+*`c`*\ Character to be output. -## Return Value +## Return value -Returns *c* if successful. If **_putch_nolock** fails, it returns **EOF**; if **_putwch_nolock** fails, it returns **WEOF**. +Returns *`c`* if successful. If **_putch_nolock** fails, it returns **EOF**; if **_putwch_nolock** fails, it returns **WEOF**. ## Remarks @@ -43,7 +43,7 @@ Returns *c* if successful. If **_putch_nolock** fails, it returns **EOF**; if ** 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| |---------------------|--------------------------------------|--------------------|-----------------------| @@ -56,14 +56,14 @@ By default, this function's global state is scoped to the application. To change |**_putch_nolock**|\| |**_putwch_nolock**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Libraries -All versions of the [C run-time libraries](../../c-runtime-library/crt-library-features.md). +All versions of the [C run-time libraries](../crt-library-features.md). ## See also -[Console and Port I/O](../../c-runtime-library/console-and-port-i-o.md)
-[_cprintf, _cprintf_l, _cwprintf, _cwprintf_l](cprintf-cprintf-l-cwprintf-cwprintf-l.md)
-[_getch, _getwch](getch-getwch.md)
+[Console and port I/O](../console-and-port-i-o.md)\ +[`_cprintf`, `_cprintf_l`, `_cwprintf`, `_cwprintf_l`](cprintf-cprintf-l-cwprintf-cwprintf-l.md)\ +[`_getch`, `_getwch`](getch-getwch.md) diff --git a/docs/c-runtime-library/reference/putch-putwch.md b/docs/c-runtime-library/reference/putch-putwch.md index fffd4c7b39c..f29d8800fe9 100644 --- a/docs/c-runtime-library/reference/putch-putwch.md +++ b/docs/c-runtime-library/reference/putch-putwch.md @@ -31,22 +31,22 @@ wint_t _putwch( ### Parameters -*c*
+*`c`*\ Character to be output. -## Return Value +## Return value -Returns *c* if successful. If **_putch** fails, it returns **EOF**; if **_putwch** fails, it returns **WEOF**. +Returns *`c`* if successful. If **_putch** fails, it returns **EOF**; if **_putwch** fails, it returns **WEOF**. ## Remarks -These functions write the character *c* directly, without buffering, to the console. In Windows NT, **_putwch** writes Unicode characters using the current console locale setting. +These functions write the character *`c`* directly, without buffering, to the console. In Windows NT, **_putwch** writes Unicode characters using the current console locale setting. The versions with the **_nolock** suffix are identical except that they are not protected from interference by other threads. For more information, see **_putch_nolock**, **_putwch_nolock**. 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| |---------------------|--------------------------------------|--------------------|-----------------------| @@ -59,18 +59,18 @@ By default, this function's global state is scoped to the application. To change |**_putch**|\| |**_putwch**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Libraries -All versions of the [C run-time libraries](../../c-runtime-library/crt-library-features.md). +All versions of the [C run-time libraries](../crt-library-features.md). ## Example -See the example for [_getch](getch-getwch.md). +See the example for [`_getch`](getch-getwch.md). ## See also -[Console and Port I/O](../../c-runtime-library/console-and-port-i-o.md)
-[_cprintf, _cprintf_l, _cwprintf, _cwprintf_l](cprintf-cprintf-l-cwprintf-cwprintf-l.md)
-[_getch, _getwch](getch-getwch.md)
+[Console and port I/O](../console-and-port-i-o.md)\ +[`_cprintf`, `_cprintf_l`, `_cwprintf`, `_cwprintf_l`](cprintf-cprintf-l-cwprintf-cwprintf-l.md)\ +[`_getch`, `_getwch`](getch-getwch.md) diff --git a/docs/c-runtime-library/reference/putch.md b/docs/c-runtime-library/reference/putch.md index 85549a6af15..76245c23ca1 100644 --- a/docs/c-runtime-library/reference/putch.md +++ b/docs/c-runtime-library/reference/putch.md @@ -12,9 +12,9 @@ ms.assetid: 81e733e5-770e-4c7a-b7e4-8e66da109f92 --- # putch -The Microsoft-specific function name `putch` is a deprecated alias for the [_putch](putch-putwch.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. +The Microsoft-specific function name `putch` is a deprecated alias for the [`_putch`](putch-putwch.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. -We recommend you use [_putch](putch-putwch.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). +We recommend you use [`_putch`](putch-putwch.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). > [!IMPORTANT] > This API cannot be used in applications that execute in the Windows Runtime. For more information, see [CRT functions not supported in Universal Windows Platform apps](../../cppcx/crt-functions-not-supported-in-universal-windows-platform-apps.md). diff --git a/docs/c-runtime-library/reference/putchar-nolock-putwchar-nolock.md b/docs/c-runtime-library/reference/putchar-nolock-putwchar-nolock.md index 0b54053da0f..56b100cf78e 100644 --- a/docs/c-runtime-library/reference/putchar-nolock-putwchar-nolock.md +++ b/docs/c-runtime-library/reference/putchar-nolock-putwchar-nolock.md @@ -27,10 +27,10 @@ wint_t _putwchar_nolock( ### Parameters -*c*
+*`c`*\ Character to be written. -## Return Value +## Return value See **putchar, putwchar**. @@ -38,7 +38,7 @@ See **putchar, putwchar**. **putchar_nolock** and **_putwchar_nolock** are identical to the versions without the **_nolock** suffix except that they are not protected from interference by other threads. They might be faster because they do not incur the overhead of locking out other threads. Use these functions only in thread-safe contexts such as single-threaded applications or where the calling scope already handles thread isolation. -### Generic-Text Routine Mappings +### Generic-text routine mappings |Tchar.h routine|_UNICODE and _MBCS not defined|_MBCS defined|_UNICODE defined| |---------------------|--------------------------------------|--------------------|-----------------------| @@ -51,11 +51,11 @@ See **putchar, putwchar**. |**_putchar_nolock**|\| |**_putwchar_nolock**|\ or \| -The console is not supported in Universal Windows Platform (UWP) apps. The standard stream handles that are associated with the console, **stdin**, **stdout**, and **stderr**, must be redirected before C run-time functions can use them in UWP apps. For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +The console is not supported in Universal Windows Platform (UWP) apps. The standard stream handles that are associated with the console, **stdin**, **stdout**, and **stderr**, must be redirected before C run-time functions can use them in UWP apps. For more compatibility information, see [Compatibility](../compatibility.md). ## Libraries -All versions of the [C run-time libraries](../../c-runtime-library/crt-library-features.md). +All versions of the [C run-time libraries](../crt-library-features.md). ## Example @@ -89,6 +89,6 @@ This is the line of output ## See also -[Stream I/O](../../c-runtime-library/stream-i-o.md)
-[fputc, fputwc](fputc-fputwc.md)
-[fgetc, fgetwc](fgetc-fgetwc.md)
+[Stream I/O](../stream-i-o.md)\ +[`fputc`, `fputwc`](fputc-fputwc.md)\ +[`fgetc`, `fgetwc`](fgetc-fgetwc.md) diff --git a/docs/c-runtime-library/reference/putchar-putwchar.md b/docs/c-runtime-library/reference/putchar-putwchar.md index bde53d59932..4571d817c22 100644 --- a/docs/c-runtime-library/reference/putchar-putwchar.md +++ b/docs/c-runtime-library/reference/putchar-putwchar.md @@ -27,24 +27,24 @@ wint_t putwchar( ### Parameters -*c*
+*`c`*\ Character to be written. -## Return Value +## Return value -Returns the character written. To indicate an error or end-of-file condition, **putc** and **putchar** return **EOF**; **putwc** and **putwchar** return **WEOF**. For all four routines, use [ferror](ferror.md) or [feof](feof.md) to check for an error or end of file. If passed a null pointer for *stream*, these functions generate an invalid parameter exception, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, they return **EOF** or **WEOF** and set **errno** to **EINVAL**. +Returns the character written. To indicate an error or end-of-file condition, **putc** and **putchar** return **EOF**; **putwc** and **putwchar** return **WEOF**. For all four routines, use [`ferror`](ferror.md) or [`feof`](feof.md) to check for an error or end of file. If passed a null pointer for *`stream`*, these functions generate an invalid parameter exception, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, they return **EOF** or **WEOF** and set **errno** to **EINVAL**. -For more information about return codes, see [`_doserrno`, `errno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). +For more information about return codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks -The **putc** routine writes the single character *c* to the output *stream* at the current position. Any integer can be passed to **putc**, but only the lower 8 bits are written. The **putchar** routine is identical to `putc( c, stdout )`. For each routine, if a read error occurs, the error indicator for the stream is set. **putc** and **putchar** are similar to **fputc** and **_fputchar**, respectively, but are implemented both as functions and as macros (see [Choosing Between Functions and Macros](../../c-runtime-library/recommendations-for-choosing-between-functions-and-macros.md)). **putwc** and **putwchar** are wide-character versions of **putc** and **putchar**, respectively. +The **putc** routine writes the single character *`c`* to the output *`stream`* at the current position. Any integer can be passed to **putc**, but only the lower 8 bits are written. The **putchar** routine is identical to `putc( c, stdout )`. For each routine, if a read error occurs, the error indicator for the stream is set. **putc** and **putchar** are similar to **fputc** and **_fputchar**, respectively, but are implemented both as functions and as macros (see [Recommendations for choosing between functions and macros](../recommendations-for-choosing-between-functions-and-macros.md)). **putwc** and **putwchar** are wide-character versions of **putc** and **putchar**, respectively. The versions with the **_nolock** suffix are identical except that they aren't protected from interference by other threads. They may be faster since they don't incur the overhead of locking out other threads. Use these functions only in thread-safe contexts such as single-threaded applications or where the calling scope already handles thread isolation. 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| |---------------------|------------------------------------|--------------------|-----------------------| @@ -57,11 +57,11 @@ By default, this function's global state is scoped to the application. To change |**putchar**|\| |**putwchar**|\ or \| -The console isn't supported in Universal Windows Platform (UWP) apps. The standard stream handles that are associated with the console, **stdin**, **stdout**, and **stderr**, must be redirected before C run-time functions can use them in UWP apps. For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +The console isn't supported in Universal Windows Platform (UWP) apps. The standard stream handles that are associated with the console, **stdin**, **stdout**, and **stderr**, must be redirected before C run-time functions can use them in UWP apps. For more compatibility information, see [Compatibility](../compatibility.md). ## Libraries -All versions of the [C run-time libraries](../../c-runtime-library/crt-library-features.md). +All versions of the [C run-time libraries](../crt-library-features.md). ## Example @@ -95,6 +95,6 @@ This is the line of output ## See also -[Stream I/O](../../c-runtime-library/stream-i-o.md)
-[fputc, fputwc](fputc-fputwc.md)
-[getc, getwc](getc-getwc.md)
+[Stream I/O](../stream-i-o.md)\ +[`fputc`, `fputwc`](fputc-fputwc.md)\ +[`getc`, `getwc`](getc-getwc.md) diff --git a/docs/c-runtime-library/reference/putenv-s-wputenv-s.md b/docs/c-runtime-library/reference/putenv-s-wputenv-s.md index fe56423eb0b..2b50e718996 100644 --- a/docs/c-runtime-library/reference/putenv-s-wputenv-s.md +++ b/docs/c-runtime-library/reference/putenv-s-wputenv-s.md @@ -11,7 +11,7 @@ helpviewer_keywords: ["wputenv_s function", "_putenv_s function", "environment v --- # `_putenv_s`, `_wputenv_s` -Creates, modifies, or removes environment variables. These are versions of [`_putenv`, `_wputenv`](putenv-wputenv.md) but have security enhancements, as described in [Security Features in the CRT](../../c-runtime-library/security-features-in-the-crt.md). +Creates, modifies, or removes environment variables. These are versions of [`_putenv`, `_wputenv`](putenv-wputenv.md) but have security enhancements, as described in [Security features in the CRT](../security-features-in-the-crt.md). > [!IMPORTANT] > This API cannot be used in applications that execute in the Windows Runtime. For more information, see [CRT functions not supported in Universal Windows Platform apps](../../cppcx/crt-functions-not-supported-in-universal-windows-platform-apps.md). @@ -37,18 +37,18 @@ The environment variable name. *`value_string`*\ The value to set the environment variable to. -## Return Value +## Return value Returns 0 if successful, or an error code. -### Error Conditions +### Error conditions |*`varname`*|*`value_string`*|Return value| |------------|-------------|------------------| |**`NULL`**|any|**`EINVAL`**| |any|**`NULL`**|**`EINVAL`**| -If one of the error conditions occurs, 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 **`EINVAL`** and set **`errno`** to **`EINVAL`**. +If one of the error conditions occurs, these functions invoke an invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, these functions return **`EINVAL`** and set **`errno`** to **`EINVAL`**. ## Remarks @@ -56,7 +56,7 @@ The **`_putenv_s`** function adds new environment variables or modifies the valu By default, this function's global state is scoped to the application. To change this behavior, see [Global state in the CRT](../global-state.md). -### Generic-Text Routine Mappings +### Generic-text routine mappings |`TCHAR.H` routine|`_UNICODE & _MBCS` not defined|`_MBCS` defined|`_UNICODE` defined| |---------------------|------------------------------------|--------------------|-----------------------| @@ -68,7 +68,7 @@ By default, this function's global state is scoped to the application. To change Don't change an environment entry directly; instead, use **`_putenv_s`** or **`_wputenv_s`** to change it. In particular, directly freeing elements of the **`_environ[]`** global array might cause invalid memory to be addressed. -**`getenv`** and **`_putenv_s`** use the global variable **`_environ`** to access the environment table; **`_wgetenv`** and **`_wputenv_s`** use **`_wenviron`**. **`_putenv_s`** and **`_wputenv_s`** may change the value of **`_environ`** and **`_wenviron`**, and thereby invalidate the *`envp`* argument to **`main`** and the **`_wenvp`** argument to **`wmain`**. Therefore, it's safer to use **`_environ`** or **`_wenviron`** to access the environment information. For more information about the relationship of **`_putenv_s`** and **`_wputenv_s`** to global variables, see [`_environ`, `_wenviron`](../../c-runtime-library/environ-wenviron.md). +**`getenv`** and **`_putenv_s`** use the global variable **`_environ`** to access the environment table; **`_wgetenv`** and **`_wputenv_s`** use **`_wenviron`**. **`_putenv_s`** and **`_wputenv_s`** may change the value of **`_environ`** and **`_wenviron`**, and thereby invalidate the *`envp`* argument to **`main`** and the **`_wenvp`** argument to **`wmain`**. Therefore, it's safer to use **`_environ`** or **`_wenviron`** to access the environment information. For more information about the relationship of **`_putenv_s`** and **`_wputenv_s`** to global variables, see [`_environ`, `_wenviron`](../environ-wenviron.md). > [!NOTE] > The **`_putenv_s`** and **`_getenv_s`** families of functions are not thread-safe. **`_getenv_s`** could return a string pointer while **`_putenv_s`** is modifying the string, and thereby cause random failures. Make sure that calls to these functions are synchronized. @@ -80,7 +80,7 @@ Don't change an environment entry directly; instead, use **`_putenv_s`** or **`_ |**`_putenv_s`**|``| |**`_wputenv_s`**|`` or ``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -88,6 +88,6 @@ For a sample that shows how to use **`_putenv_s`**, see [`getenv_s`, `_wgetenv_s ## See also -[Process and Environment Control](../../c-runtime-library/process-and-environment-control.md)\ +[Process and environment control](../process-and-environment-control.md)\ [`getenv`, `_wgetenv`](getenv-wgetenv.md)\ [`_searchenv`, `_wsearchenv`](searchenv-wsearchenv.md) diff --git a/docs/c-runtime-library/reference/putenv-wputenv.md b/docs/c-runtime-library/reference/putenv-wputenv.md index 564c35b6b6b..5055882278b 100644 --- a/docs/c-runtime-library/reference/putenv-wputenv.md +++ b/docs/c-runtime-library/reference/putenv-wputenv.md @@ -32,7 +32,7 @@ int _wputenv( *`envstring`*\ Environment-string definition. -## Return Value +## Return value Return 0 if successful or -1 in the case of an error. @@ -42,7 +42,7 @@ The **`_putenv`** function adds new environment variables or modifies the values 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| |---------------------|--------------------------------------|--------------------|-----------------------| @@ -54,7 +54,7 @@ The *`envstring`* argument must be a pointer to a string of the form *`varname=v Don't change an environment entry directly: instead, use **`_putenv`** or **`_wputenv`** to change it. In particular, direct freeing elements of the **`_environ[]`** global array might lead to invalid memory being addressed. -**`_getenv`** and **`_putenv`** use the global variable **`_environ`** to access the environment table; **`_wgetenv`** and **`_wputenv`** use **`_wenviron`**. **`_putenv`** and **`_wputenv`** might change the value of **`_environ`** and **`_wenviron`**, thus invalidating the **`_envp`** argument to **`main`** and the **`_wenvp`** argument to **`wmain`**. Therefore, it's safer to use **`_environ`** or **`_wenviron`** to access the environment information. For more information about the relation of **`_putenv`** and **`_wputenv`** to global variables, see [`_environ`, `_wenviron`](../../c-runtime-library/environ-wenviron.md). +**`_getenv`** and **`_putenv`** use the global variable **`_environ`** to access the environment table; **`_wgetenv`** and **`_wputenv`** use **`_wenviron`**. **`_putenv`** and **`_wputenv`** might change the value of **`_environ`** and **`_wenviron`**, thus invalidating the **`_envp`** argument to **`main`** and the **`_wenvp`** argument to **`wmain`**. Therefore, it's safer to use **`_environ`** or **`_wenviron`** to access the environment information. For more information about the relation of **`_putenv`** and **`_wputenv`** to global variables, see [`_environ`, `_wenviron`](../environ-wenviron.md). > [!NOTE] > The **`_putenv`** and **`_getenv`** families of functions are not thread-safe. **`_getenv`** could return a string pointer while **`_putenv`** is modifying the string, causing random failures. Make sure that calls to these functions are synchronized. @@ -66,7 +66,7 @@ Don't change an environment entry directly: instead, use **`_putenv`** or **`_wp |**`_putenv`**|``| |**`_wputenv`**|`` or ``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -74,6 +74,6 @@ For a sample of how to use **`_putenv`**, see [`getenv`, `_wgetenv`](getenv-wget ## See also -[Process and Environment Control](../../c-runtime-library/process-and-environment-control.md)\ +[Process and environment control](../process-and-environment-control.md)\ [`getenv`, `_wgetenv`](getenv-wgetenv.md)\ [`_searchenv`, `_wsearchenv`](searchenv-wsearchenv.md) diff --git a/docs/c-runtime-library/reference/putenv.md b/docs/c-runtime-library/reference/putenv.md index 92499d53efe..3f847007a37 100644 --- a/docs/c-runtime-library/reference/putenv.md +++ b/docs/c-runtime-library/reference/putenv.md @@ -12,9 +12,9 @@ ms.assetid: 1dc49ef3-6b12-484c-8e60-7048bcc999f1 --- # putenv -The Microsoft-implemented POSIX function name `putenv` is a deprecated alias for the [_putenv](putenv-wputenv.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. +The Microsoft-implemented POSIX function name `putenv` is a deprecated alias for the [`_putenv`](putenv-wputenv.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. -We recommend you use [_putenv](putenv-wputenv.md) or security-enhanced [_putenv_s](putenv-s-wputenv-s.md) function instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). +We recommend you use [`_putenv`](putenv-wputenv.md) or security-enhanced [`_putenv_s`](putenv-s-wputenv-s.md) function instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). > [!IMPORTANT] > This API cannot be used in applications that execute in the Windows Runtime. For more information, see [CRT functions not supported in Universal Windows Platform apps](../../cppcx/crt-functions-not-supported-in-universal-windows-platform-apps.md). diff --git a/docs/c-runtime-library/reference/puts-putws.md b/docs/c-runtime-library/reference/puts-putws.md index a51b572642d..3f87d2386ea 100644 --- a/docs/c-runtime-library/reference/puts-putws.md +++ b/docs/c-runtime-library/reference/puts-putws.md @@ -27,18 +27,18 @@ int _putws( ### Parameters -*str*
+*`str`*\ Output string. -## Return Value +## Return value -Returns a nonnegative value if successful. If **puts** fails, it returns **EOF**; if **_putws** fails, it returns **WEOF**. If *str* is a null pointer, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, the functions set **errno** to **EINVAL** and return **EOF** or **WEOF**. +Returns a nonnegative value if successful. If **puts** fails, it returns **EOF**; if **_putws** fails, it returns **WEOF**. If *`str`* is a null pointer, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, the functions set **errno** to **EINVAL** and return **EOF** or **WEOF**. -For information on these and other error codes, see [_doserrno, errno, _sys_errlist, and _sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +For information on these and other error codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks -The **puts** function writes *str* to the standard output stream **stdout**, replacing the string's terminating null character ('\0') with a newline character ('\n') in the output stream. +The **puts** function writes *`str`* to the standard output stream **stdout**, replacing the string's terminating null character ('\0') with a newline character ('\n') in the output stream. **_putws** is the wide-character version of **puts**; the two functions behave identically if the stream is opened in ANSI mode. **puts** doesn't currently support output into a UNICODE stream. @@ -46,7 +46,7 @@ The **puts** function writes *str* to the standard output stream **stdout**, rep 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| |---------------------|------------------------------------|--------------------|-----------------------| @@ -59,11 +59,11 @@ By default, this function's global state is scoped to the application. To change |**puts**|\| |**_putws**|\| -The console is not supported in Universal Windows Platform (UWP) apps. The standard stream handles that are associated with the console, **stdin**, **stdout**, and **stderr**, must be redirected before C run-time functions can use them in UWP apps. For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +The console is not supported in Universal Windows Platform (UWP) apps. The standard stream handles that are associated with the console, **stdin**, **stdout**, and **stderr**, must be redirected before C run-time functions can use them in UWP apps. For more compatibility information, see [Compatibility](../compatibility.md). ## Libraries -All versions of the [C run-time libraries](../../c-runtime-library/crt-library-features.md). +All versions of the [C run-time libraries](../crt-library-features.md). ## Example @@ -87,6 +87,6 @@ Hello world from puts! ## See also -[Stream I/O](../../c-runtime-library/stream-i-o.md)
-[fputs, fputws](fputs-fputws.md)
-[fgets, fgetws](fgets-fgetws.md)
+[Stream I/O](../stream-i-o.md)\ +[`fputs`, `fputws`](fputs-fputws.md)\ +[`fgets`, `fgetws`](fgets-fgetws.md) diff --git a/docs/c-runtime-library/reference/putw.md b/docs/c-runtime-library/reference/putw.md index ee89dbc48e7..83f4b6a54eb 100644 --- a/docs/c-runtime-library/reference/putw.md +++ b/docs/c-runtime-library/reference/putw.md @@ -25,17 +25,17 @@ int _putw( ### Parameters -*binint*
+*`binint`*\ Binary integer to be output. -*stream*
+*`stream`*\ Pointer to the **FILE** structure. -## Return Value +## Return value -Returns the value written. A return value of **EOF** might indicate an error. Because **EOF** is also a legitimate integer value, use **ferror** to verify an error. If *stream* is a null pointer, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, this function sets **errno** to **EINVAL** and returns **EOF**. +Returns the value written. A return value of **EOF** might indicate an error. Because **EOF** is also a legitimate integer value, use **ferror** to verify an error. If *`stream`* is a null pointer, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, this function sets **errno** to **EINVAL** and returns **EOF**. -For information about these and other error codes, see [_doserrno, errno, _sys_errlist, and _sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +For information about these and other error codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks @@ -49,11 +49,11 @@ By default, this function's global state is scoped to the application. To change |-------------|---------------------| |**_putw**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Libraries -All versions of the [C run-time libraries](../../c-runtime-library/crt-library-features.md). +All versions of the [C run-time libraries](../crt-library-features.md). ## Example @@ -95,5 +95,5 @@ Wrote ten words ## See also -[Stream I/O](../../c-runtime-library/stream-i-o.md)
-[_getw](getw.md)
+[Stream I/O](../stream-i-o.md)\ +[`_getw`](getw.md) diff --git a/docs/c-runtime-library/reference/qsort-s.md b/docs/c-runtime-library/reference/qsort-s.md index 65c3b80c2fc..b2787aba872 100644 --- a/docs/c-runtime-library/reference/qsort-s.md +++ b/docs/c-runtime-library/reference/qsort-s.md @@ -12,7 +12,7 @@ ms.assetid: 6ee817b0-4408-4355-a5d4-6605e419ab91 --- # qsort_s -Performs a quick sort. A version of [qsort](qsort.md) with security enhancements as described in [Security Features in the CRT](../../c-runtime-library/security-features-in-the-crt.md). +Performs a quick sort. A version of [`qsort`](qsort.md) with security enhancements as described in [Security features in the CRT](../security-features-in-the-crt.md). ## Syntax @@ -28,24 +28,24 @@ void qsort_s( ### Parameters -*base*
+*`base`*\ Start of target array. -*number*
+*`number`*\ Array size in elements. -*width*
+*`width`*\ Element size in bytes. -*compare*
-Comparison function. The first argument is the *context* pointer. The second argument is a pointer to the *key* for the search. The third argument is a pointer to the array element to be compared with *key*. +*`compare`*\ +Comparison function. The first argument is the *`context`* pointer. The second argument is a pointer to the *`key`* for the search. The third argument is a pointer to the array element to be compared with *`key`*. -*context*
-A pointer to a context, which can be any object that the *compare* routine needs to access. +*`context`*\ +A pointer to a context, which can be any object that the *`compare`* routine needs to access. ## Remarks -The **qsort_s** function implements a quick-sort algorithm to sort an array of *number* elements, each of *width* bytes. The argument *base* is a pointer to the base of the array to be sorted. **qsort_s** overwrites this array with the sorted elements. The argument *compare* is a pointer to a user-supplied routine that compares two array elements and returns a value specifying their relationship. **qsort_s** calls the *compare* routine one or more times during the sort, passing pointers to two array elements on each call: +The **qsort_s** function implements a quick-sort algorithm to sort an array of *`number`* elements, each of *`width`* bytes. The argument *`base`* is a pointer to the base of the array to be sorted. **qsort_s** overwrites this array with the sorted elements. The argument *`compare`* is a pointer to a user-supplied routine that compares two array elements and returns a value specifying their relationship. **qsort_s** calls the *`compare`* routine one or more times during the sort, passing pointers to two array elements on each call: ```C compare( context, (void *) & elem1, (void *) & elem2 ); @@ -61,11 +61,11 @@ The routine must compare the elements and then return one of the following value The array is sorted in increasing order, as defined by the comparison function. To sort an array in decreasing order, reverse the sense of "greater than" and "less than" in the comparison function. -If invalid parameters are passed to the function, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, then the function returns and **errno** is set to **EINVAL**. For more information, see [errno, _doserrno, _sys_errlist, and _sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +If invalid parameters are passed to the function, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, then the function returns and **errno** is set to **EINVAL**. For more information, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.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). -### Error Conditions +### Error conditions |key|base|compare|num|width|errno| |---------|----------|-------------|---------|-----------|-----------| @@ -74,7 +74,7 @@ By default, this function's global state is scoped to the application. To change |any|any|any|any|<= 0|**EINVAL**| |any|any|**NULL**|any|any|**EINVAL**| -**qsort_s** has the same behavior as **qsort** but has the *context* parameter and sets **errno**. By passing a *context* parameter, comparison functions can use an object pointer to access object functionality or other information not accessible through an element pointer. The addition of the *context* parameter makes **qsort_s** more secure because *context* can be used to avoid reentrancy bugs introduced by using static variables to make shared information available to the *compare* function. +**qsort_s** has the same behavior as **qsort** but has the *`context`* parameter and sets **errno**. By passing a *`context`* parameter, comparison functions can use an object pointer to access object functionality or other information not accessible through an element pointer. The addition of the *`context`* parameter makes **qsort_s** more secure because *`context`* can be used to avoid reentrancy bugs introduced by using static variables to make shared information available to the *`compare`* function. ## Requirements @@ -82,13 +82,13 @@ By default, this function's global state is scoped to the application. To change |-------------|---------------------| |**qsort_s**|\ and \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). -**Libraries:** All versions of the [C runtime libraries](../../c-runtime-library/crt-library-features.md). +**Libraries:** All versions of the [C runtime libraries](../crt-library-features.md). ## Example -The following example demonstrates how to use the *context* parameter in the **qsort_s** function. The *context* parameter makes it easier to perform thread-safe sorts. Instead of using static variables that must be synchronized to ensure thread safety, pass a different *context* parameter in each sort. In this example, a locale object is used as the *context* parameter. +The following example demonstrates how to use the *`context`* parameter in the **qsort_s** function. The *`context`* parameter makes it easier to perform thread-safe sorts. Instead of using static variables that must be synchronized to ensure thread safety, pass a different *`context`* parameter in each sort. In this example, a locale object is used as the *`context`* parameter. ```cpp // crt_qsort_s.cpp @@ -227,7 +227,7 @@ int main( ) } ``` -### Sample Output +### Sample output ```Output Unsorted input: @@ -242,7 +242,7 @@ table tablet tableux ## See also -[Searching and Sorting](../../c-runtime-library/searching-and-sorting.md)
-[bsearch_s](bsearch-s.md)
-[_lsearch_s](lsearch-s.md)
-[qsort](qsort.md)
+[Searching and sorting](../searching-and-sorting.md)\ +[`bsearch_s`](bsearch-s.md)\ +[`_lsearch_s`](lsearch-s.md)\ +[`qsort`](qsort.md) diff --git a/docs/c-runtime-library/reference/qsort.md b/docs/c-runtime-library/reference/qsort.md index 2a4dedc1803..61f9cf7f278 100644 --- a/docs/c-runtime-library/reference/qsort.md +++ b/docs/c-runtime-library/reference/qsort.md @@ -58,7 +58,7 @@ The routine compares the elements and returns one of the following values. The array is sorted in increasing order, as defined by the comparison function. To sort an array in decreasing order, reverse the sense of "greater than" and "less than" in the comparison function. -This function validates its parameters. If *`compare`* or *`number`* is **`NULL`**, or if *`base`* is **`NULL`** and *`number`* is nonzero, or if *`width`* is less than zero, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, the function returns and **`errno`** is set to **`EINVAL`**. +This function validates its parameters. If *`compare`* or *`number`* is **`NULL`**, or if *`base`* is **`NULL`** and *`number`* is nonzero, or if *`width`* is less than zero, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, the function returns and **`errno`** is set to **`EINVAL`**. By default, this function's global state is scoped to the application. To change this behavior, see [Global state in the CRT](../global-state.md). @@ -68,7 +68,7 @@ By default, this function's global state is scoped to the application. To change |-------------|---------------------| |**`qsort`**|`` and ``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -116,6 +116,6 @@ boy deserves every favor good ## See also -[Searching and Sorting](../../c-runtime-library/searching-and-sorting.md)\ +[Searching and sorting](../searching-and-sorting.md)\ [`bsearch`](bsearch.md)\ [`_lsearch`](lsearch.md) diff --git a/docs/c-runtime-library/reference/query-new-handler.md b/docs/c-runtime-library/reference/query-new-handler.md index 62f280d87d4..dd5055c96a7 100644 --- a/docs/c-runtime-library/reference/query-new-handler.md +++ b/docs/c-runtime-library/reference/query-new-handler.md @@ -22,13 +22,13 @@ _PNH _query_new_handler( ); ``` -## Return Value +## Return value Returns the address of the current new handler routine as set by **_set_new_handler**. ## Remarks -The C++ **_query_new_handler** function returns the address of the current exception-handling function set by the C++ [_set_new_handler](set-new-handler.md) function. **_set_new_handler** is used to specify an exception-handling function that is to gain control if the **`new`** operator fails to allocate memory. For more information, see the discussion of the [new and delete operators](../../cpp/new-and-delete-operators.md) in the C++ Language Reference. +The C++ **_query_new_handler** function returns the address of the current exception-handling function set by the C++ [`_set_new_handler`](set-new-handler.md) function. **_set_new_handler** is used to specify an exception-handling function that is to gain control if the **`new`** operator fails to allocate memory. For more information, see the discussion of the [new and delete operators](../../cpp/new-and-delete-operators.md) in the C++ Language Reference. ## Requirements @@ -36,13 +36,13 @@ The C++ **_query_new_handler** function returns the address of the current excep |-------------|---------------------| |**_query_new_handler**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Libraries -All versions of the [C run-time libraries](../../c-runtime-library/crt-library-features.md). +All versions of the [C run-time libraries](../crt-library-features.md). ## See also -[Memory Allocation](../../c-runtime-library/memory-allocation.md)
-[free](free.md)
+[Memory allocation](../memory-allocation.md)\ +[`free`](free.md) diff --git a/docs/c-runtime-library/reference/query-new-mode.md b/docs/c-runtime-library/reference/query-new-mode.md index 72e4d3ef34c..546c8ea4939 100644 --- a/docs/c-runtime-library/reference/query-new-mode.md +++ b/docs/c-runtime-library/reference/query-new-mode.md @@ -22,13 +22,13 @@ int _query_new_mode( ); ``` -## Return Value +## Return value Returns the current new handler mode, namely 0 or 1, for **malloc**. A return value of 1 indicates that, on failure to allocate memory, **malloc** calls the new handler routine; a return value of 0 indicates that it does not. ## Remarks -The C++ **_query_new_mode** function returns an integer that indicates the new handler mode that is set by the C++ [_set_new_mode](set-new-mode.md) function for [malloc](malloc.md). The new handler mode indicates whether, on failure to allocate memory, **malloc** is to call the new handler routine as set by [_set_new_handler](set-new-handler.md). By default, **malloc** does not call the new handler routine on failure. You can use **_set_new_mode** to override this behavior so that on failure **malloc** calls the new handler routine in the same way that the **`new`** operator does when it fails to allocate memory. For more information, see the discussion of the [new and delete operators](../../cpp/new-and-delete-operators.md) in the C++ Language Reference. +The C++ **_query_new_mode** function returns an integer that indicates the new handler mode that is set by the C++ [`_set_new_mode`](set-new-mode.md) function for [`malloc`](malloc.md). The new handler mode indicates whether, on failure to allocate memory, **malloc** is to call the new handler routine as set by [`_set_new_handler`](set-new-handler.md). By default, **malloc** does not call the new handler routine on failure. You can use **_set_new_mode** to override this behavior so that on failure **malloc** calls the new handler routine in the same way that the **`new`** operator does when it fails to allocate memory. For more information, see the discussion of the [new and delete operators](../../cpp/new-and-delete-operators.md) in the C++ Language Reference. ## Requirements @@ -36,16 +36,16 @@ The C++ **_query_new_mode** function returns an integer that indicates the new h |-------------|---------------------| |**_query_new_mode**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Libraries -All versions of the [C run-time libraries](../../c-runtime-library/crt-library-features.md). +All versions of the [C run-time libraries](../crt-library-features.md). ## See also -[Memory Allocation](../../c-runtime-library/memory-allocation.md)
-[calloc](calloc.md)
-[free](free.md)
-[realloc](realloc.md)
-[_query_new_handler](query-new-handler.md)
+[Memory allocation](../memory-allocation.md)\ +[`calloc`](calloc.md)\ +[`free`](free.md)\ +[`realloc`](realloc.md)\ +[`_query_new_handler`](query-new-handler.md) diff --git a/docs/c-runtime-library/reference/quick-exit1.md b/docs/c-runtime-library/reference/quick-exit1.md index ee936274292..ce09dd7e816 100644 --- a/docs/c-runtime-library/reference/quick-exit1.md +++ b/docs/c-runtime-library/reference/quick-exit1.md @@ -24,10 +24,10 @@ __declspec(noreturn) void quick_exit( ### Parameters -*status*
+*`status`*\ The status code to return to the host environment. -## Return Value +## Return value The **quick_exit** function cannot return to its caller. @@ -35,9 +35,9 @@ The **quick_exit** function cannot return to its caller. The **quick_exit** function causes normal program termination. It calls no functions registered by **atexit**, **_onexit** or signal handlers registered by the **signal** function. Behavior is undefined if **quick_exit** is called more than once, or if the **exit** function is also called. -The **quick_exit** function calls, in last-in, first-out (LIFO) order, the functions registered by **at_quick_exit**, except for those functions already called when the function was registered. Behavior is undefined if a [longjmp](longjmp.md) call is made during a call to a registered function that would terminate the call to the function. +The **quick_exit** function calls, in last-in, first-out (LIFO) order, the functions registered by **at_quick_exit**, except for those functions already called when the function was registered. Behavior is undefined if a [`longjmp`](longjmp.md) call is made during a call to a registered function that would terminate the call to the function. -After the registered functions have been called, **quick_exit** invokes **_Exit** by using the *status* value to return control to the host environment. +After the registered functions have been called, **quick_exit** invokes **_Exit** by using the *`status`* value to return control to the host environment. ## Requirements @@ -45,15 +45,15 @@ After the registered functions have been called, **quick_exit** invokes **_Exit* |-------------|---------------------| |**quick_exit**|\ or \| -For more information about compatibility, see [Compatibility](../../c-runtime-library/compatibility.md). +For more information about compatibility, see [Compatibility](../compatibility.md). ## See also -[Process and Environment Control](../../c-runtime-library/process-and-environment-control.md)
-[abort](abort.md)
-[atexit](atexit.md)
-[_exec, _wexec Functions](../../c-runtime-library/exec-wexec-functions.md)
-[exit, _Exit, _exit](exit-exit-exit.md)
-[_onexit, _onexit_m](onexit-onexit-m.md)
-[_spawn, _wspawn Functions](../../c-runtime-library/spawn-wspawn-functions.md)
-[system, _wsystem](system-wsystem.md)
+[Process and environment control](../process-and-environment-control.md)\ +[`abort`](abort.md)\ +[`atexit`](atexit.md)\ +[`_exec`, `_wexec` functions](../exec-wexec-functions.md)\ +[`exit`, `_Exit`, `_exit`](exit-exit-exit.md)\ +[`_onexit`, `_onexit_m`](onexit-onexit-m.md)\ +[`_spawn`, `_wspawn` functions](../spawn-wspawn-functions.md)\ +[`system`, `_wsystem`](system-wsystem.md) diff --git a/docs/c-runtime-library/reference/raise.md b/docs/c-runtime-library/reference/raise.md index 277173a2079..46fc1d61d06 100644 --- a/docs/c-runtime-library/reference/raise.md +++ b/docs/c-runtime-library/reference/raise.md @@ -26,16 +26,16 @@ int raise( ### Parameters -*sig*
+*`sig`*\ Signal to be raised. -## Return Value +## Return value If successful, **raise** returns 0. Otherwise, it returns a nonzero value. ## Remarks -The **raise** function sends *sig* to the executing program. If a previous call to **signal** has installed a signal-handling function for *sig*, **raise** executes that function. If no handler function has been installed, the default action associated with the signal value *sig* is taken, as follows. +The **raise** function sends *`sig`* to the executing program. If a previous call to **signal** has installed a signal-handling function for *`sig`*, **raise** executes that function. If no handler function has been installed, the default action associated with the signal value *`sig`* is taken, as follows. |Signal|Meaning|Default| |------------|-------------|-------------| @@ -46,7 +46,7 @@ The **raise** function sends *sig* to the executing program. If a previous call |**SIGSEGV**|Illegal storage access|Terminates the calling program| |**SIGTERM**|Termination request sent to the program|Ignores the signal| -If the argument is not a valid signal as specified above, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If not handled, the function sets **errno** to **EINVAL** and returns a nonzero value. +If the argument is not a valid signal as specified above, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If not handled, the function sets **errno** to **EINVAL** and returns a nonzero value. 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). @@ -56,10 +56,10 @@ By default, this function's global state is scoped to the application. To change |-------------|---------------------| |**raise**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Process and Environment Control](../../c-runtime-library/process-and-environment-control.md)
-[abort](abort.md)
-[signal](signal.md)
+[Process and environment control](../process-and-environment-control.md)\ +[`abort`](abort.md)\ +[`signal`](signal.md) diff --git a/docs/c-runtime-library/reference/rand-s.md b/docs/c-runtime-library/reference/rand-s.md index 9ce0c5ec1d7..bb1a6c1766b 100644 --- a/docs/c-runtime-library/reference/rand-s.md +++ b/docs/c-runtime-library/reference/rand-s.md @@ -11,7 +11,7 @@ helpviewer_keywords: ["generating pseudorandom numbers", "random numbers, crypto --- # `rand_s` -Generates a pseudorandom number. This is a more secure version of the function [`rand`](rand.md), with security enhancements as described in [Security Features in the CRT](../../c-runtime-library/security-features-in-the-crt.md). +Generates a pseudorandom number. This is a more secure version of the function [`rand`](rand.md), with security enhancements as described in [Security features in the CRT](../security-features-in-the-crt.md). ## Syntax @@ -24,9 +24,9 @@ errno_t rand_s(unsigned int* randomValue); *`randomValue`*\ A pointer to an integer to hold the generated value. -## Return Value +## Return value -Zero if successful, otherwise, an error code. If the input pointer `_randomValue_` is a `NULL` pointer, the function invokes an invalid parameter handler, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, the function returns **`EINVAL`** and sets **`errno`** to **`EINVAL`**. If the function fails for any other reason, `*_randomValue_` is set to 0. +Zero if successful, otherwise, an error code. If the input pointer `_randomValue_` is a `NULL` pointer, the function invokes an invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, the function returns **`EINVAL`** and sets **`errno`** to **`EINVAL`**. If the function fails for any other reason, `*_randomValue_` is set to 0. ## Remarks @@ -49,7 +49,7 @@ By default, this function's global state is scoped to the application. To change |-------------|---------------------| |**`rand_s`**|``| -For more information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more information, see [Compatibility](../compatibility.md). ## Example @@ -101,7 +101,7 @@ int main( void ) } ``` -### Sample Output +### Sample output ```Output 10 @@ -129,6 +129,6 @@ int main( void ) ## See also -[Floating-Point Support](../../c-runtime-library/floating-point-support.md)\ +[Math and floating-point support](../floating-point-support.md)\ [`rand`](rand.md)\ [`srand`](srand.md) diff --git a/docs/c-runtime-library/reference/rand.md b/docs/c-runtime-library/reference/rand.md index 37b9c7a0040..b08c81a4e81 100644 --- a/docs/c-runtime-library/reference/rand.md +++ b/docs/c-runtime-library/reference/rand.md @@ -19,7 +19,7 @@ Generates a pseudorandom number. A more programmatically secure version of this int rand(void); ``` -## Return Value +## Return value **`rand`** returns a pseudorandom number, as described above. There's no error return. @@ -37,7 +37,7 @@ By default, this function's global state is scoped to the application. To change |-------------|---------------------| |**`rand`**|``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -120,7 +120,7 @@ Random number in a range demo ==== ## See also -[Floating-Point Support](../../c-runtime-library/floating-point-support.md)\ +[Math and floating-point support](../floating-point-support.md)\ [`srand`](srand.md)\ [`rand_s`](rand-s.md)\ [C++ `` library](../../standard-library/random.md) diff --git a/docs/c-runtime-library/reference/read.md b/docs/c-runtime-library/reference/read.md index 13b3175f872..a6cee14705b 100644 --- a/docs/c-runtime-library/reference/read.md +++ b/docs/c-runtime-library/reference/read.md @@ -34,15 +34,15 @@ Storage location for data. *`buffer_size`*\ Maximum number of bytes to read. -## Return Value +## Return value **`_read`** returns the number of bytes read, which might be less than *`buffer_size`* if there are fewer than *`buffer_size`* bytes left in the file, or if the file was opened in text mode. In text mode, each carriage return-line feed pair `\r\n` is replaced with a single line feed character `\n`. Only the single line feed character is counted in the return value. The replacement does not affect the file pointer. -If the function tries to read at end of file, it returns 0. If *`fd`* is not valid, the file isn't open for reading, or the file is locked, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, the function returns -1 and sets **`errno`** to **`EBADF`**. +If the function tries to read at end of file, it returns 0. If *`fd`* is not valid, the file isn't open for reading, or the file is locked, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, the function returns -1 and sets **`errno`** to **`EBADF`**. If *`buffer`* is `NULL`, or if *`buffer_size`* > **`INT_MAX`**, the invalid parameter handler is invoked. If execution is allowed to continue, the function returns -1 and **`errno`** is set to **`EINVAL`**. -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 @@ -58,11 +58,11 @@ By default, this function's global state is scoped to the application. To change |-------------|---------------------| |**`_read`**|``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Libraries -All versions of the [C run-time libraries](../../c-runtime-library/crt-library-features.md). +All versions of the [C run-time libraries](../crt-library-features.md). ## Example @@ -119,7 +119,7 @@ Read 19 bytes from file ## See also -[Low-Level I/O](../../c-runtime-library/low-level-i-o.md)\ +[Low-level I/O](../low-level-i-o.md)\ [`_creat`, `_wcreat`](creat-wcreat.md)\ [`fread`](fread.md)\ [`_open`, `_wopen`](open-wopen.md)\ diff --git a/docs/c-runtime-library/reference/realloc-dbg.md b/docs/c-runtime-library/reference/realloc-dbg.md index f782ea0c5d4..4ad49c8f701 100644 --- a/docs/c-runtime-library/reference/realloc-dbg.md +++ b/docs/c-runtime-library/reference/realloc-dbg.md @@ -28,36 +28,36 @@ void *_realloc_dbg( ### Parameters -*userData*
+*`userData`*\ Pointer to the previously allocated memory block. -*newSize*
+*`newSize`*\ Requested size for the reallocated block (bytes). -*blockType*
+*`blockType`*\ Requested type for the reallocated block: **_CLIENT_BLOCK** or **_NORMAL_BLOCK**. -*filename*
+*`filename`*\ Pointer to the name of the source file that requested the **realloc** operation or **NULL**. -*linenumber*
+*`linenumber`*\ Line number in the source file where the **realloc** operation was requested or **NULL**. -The *filename* and *linenumber* parameters are only available when **_realloc_dbg** has been called explicitly or the [_CRTDBG_MAP_ALLOC](../../c-runtime-library/crtdbg-map-alloc.md) preprocessor constant has been defined. +The *`filename`* and *`linenumber`* parameters are only available when **_realloc_dbg** has been called explicitly or the [`_CRTDBG_MAP_ALLOC`](../crtdbg-map-alloc.md) preprocessor constant has been defined. -## Return Value +## Return value -On successful completion, this function either returns a pointer to the user portion of the reallocated memory block, calls the new handler function, or returns **NULL**. For a complete description of the return behavior, see the following Remarks section. For more information about how the new handler function is used, see the [realloc](realloc.md) function. +On successful completion, this function either returns a pointer to the user portion of the reallocated memory block, calls the new handler function, or returns **NULL**. For a complete description of the return behavior, see the following Remarks section. For more information about how the new handler function is used, see the [`realloc`](realloc.md) function. ## Remarks -**_realloc_dbg** is a debug version of the [realloc](realloc.md) function. When [_DEBUG](../../c-runtime-library/debug.md) is not defined, each call to **_realloc_dbg** is reduced to a call to **realloc**. Both **realloc** and **_realloc_dbg** reallocate a memory block in the base heap, but **_realloc_dbg** accommodates several debugging features: buffers on either side of the user portion of the block to test for leaks, a block type parameter to track specific allocation types, and *filename*/*linenumber* information to determine the origin of allocation requests. +**_realloc_dbg** is a debug version of the [`realloc`](realloc.md) function. When [`_DEBUG`](../debug.md) is not defined, each call to **_realloc_dbg** is reduced to a call to **realloc**. Both **realloc** and **_realloc_dbg** reallocate a memory block in the base heap, but **_realloc_dbg** accommodates several debugging features: buffers on either side of the user portion of the block to test for leaks, a block type parameter to track specific allocation types, and *`filename`*/*`linenumber`* information to determine the origin of allocation requests. -**_realloc_dbg** reallocates the specified memory block with slightly more space than the requested *newSize*. *newSize* might be greater or less than the size of the originally allocated memory block. The additional space is used by the debug heap manager to link the debug memory blocks and to provide the application with debug header information and overwrite buffers. The reallocation might result in moving the original memory block to a different location in the heap, as well as changing the size of the memory block. If the memory block is moved, the contents of the original block are overwritten. +**_realloc_dbg** reallocates the specified memory block with slightly more space than the requested *`newSize`*. *`newSize`* might be greater or less than the size of the originally allocated memory block. The additional space is used by the debug heap manager to link the debug memory blocks and to provide the application with debug header information and overwrite buffers. The reallocation might result in moving the original memory block to a different location in the heap, as well as changing the size of the memory block. If the memory block is moved, the contents of the original block are overwritten. -**_realloc_dbg** sets **errno** to **ENOMEM** if a memory allocation fails or if the amount of memory needed (including the overhead mentioned previously) exceeds **_HEAP_MAXREQ**. For information about this and other error codes, see [errno, _doserrno, _sys_errlist, and _sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +**_realloc_dbg** sets **errno** to **ENOMEM** if a memory allocation fails or if the amount of memory needed (including the overhead mentioned previously) exceeds **_HEAP_MAXREQ**. For information about this and other error codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). -For information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT Debug Heap Details](/visualstudio/debugger/crt-debug-heap-details). For information about the allocation block types and how they are used, see [Types of blocks on the debug heap](/visualstudio/debugger/crt-debug-heap-details). For information about the differences between calling a standard heap function and its debug version in a debug build of an application, see [Debug Versions of Heap Allocation Functions](/visualstudio/debugger/debug-versions-of-heap-allocation-functions). +For information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT debug heap details](/visualstudio/debugger/crt-debug-heap-details). For information about the allocation block types and how they are used, see [Types of blocks on the debug heap](/visualstudio/debugger/crt-debug-heap-details). For information about the differences between calling a standard heap function and its debug version in a debug build of an application, see [Debug versions of heap allocation functions](/visualstudio/debugger/debug-versions-of-heap-allocation-functions). ## Requirements @@ -65,17 +65,17 @@ For information about how memory blocks are allocated, initialized, and managed |-------------|---------------------| |**_realloc_dbg**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Libraries -Debug versions of [C run-time libraries](../../c-runtime-library/crt-library-features.md) only. +Debug versions of [C run-time libraries](../crt-library-features.md) only. ## Example -See the example in the [_msize_dbg](msize-dbg.md) topic. +See the example in the [`_msize_dbg`](msize-dbg.md) topic. ## See also -[Debug Routines](../../c-runtime-library/debug-routines.md)
-[_malloc_dbg](malloc-dbg.md)
+[Debug routines](../debug-routines.md)\ +[`_malloc_dbg`](malloc-dbg.md) diff --git a/docs/c-runtime-library/reference/realloc.md b/docs/c-runtime-library/reference/realloc.md index 6fb14f75444..150ad16441f 100644 --- a/docs/c-runtime-library/reference/realloc.md +++ b/docs/c-runtime-library/reference/realloc.md @@ -31,7 +31,7 @@ Pointer to previously allocated memory block. *`size`*\ New size in bytes. -## Return Value +## Return value **`realloc`** returns a **`void`** pointer to the reallocated (and possibly moved) memory block. @@ -50,7 +50,7 @@ The **`realloc`** function changes the size of an allocated memory block. The *` The *`size`* argument gives the new size of the block, in bytes. The contents of the block are unchanged up to the shorter of the new and old sizes, although the new block can be in a different location. Because the new block can be in a new memory location, the pointer returned by **`realloc`** is not guaranteed to be the pointer passed through the *`memblock`* argument. **`realloc`** does not zero newly allocated memory in the case of buffer growth. -**`realloc`** sets **`errno`** to **`ENOMEM`** if the memory allocation fails or if the amount of memory requested exceeds **`_HEAP_MAXREQ`**. For information on this and other error codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +**`realloc`** sets **`errno`** to **`ENOMEM`** if the memory allocation fails or if the amount of memory requested exceeds **`_HEAP_MAXREQ`**. For information on this and other error codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). **`realloc`** calls **`malloc`** in order to use the C++ [`_set_new_mode`](set-new-mode.md) function to set the new handler mode. The new handler mode indicates whether, on failure, **`malloc`** is to call the new handler routine as set by [`_set_new_handler`](set-new-handler.md). By default, **`malloc`** does not call the new handler routine on failure to allocate memory. You can override this default behavior so that, when **`realloc`** fails to allocate memory, **`malloc`** calls the new handler routine in the same way that the **`new`** operator does when it fails for the same reason. To override the default, call @@ -58,9 +58,9 @@ The *`size`* argument gives the new size of the block, in bytes. The contents of _set_new_mode(1); ``` -early in ones program, or link with NEWMODE.OBJ (see [Link Options](../../c-runtime-library/link-options.md)). +early in ones program, or link with NEWMODE.OBJ (see [Link options](../link-options.md)). -When the application is linked with a debug version of the C run-time libraries, **`realloc`** resolves to [`_realloc_dbg`](realloc-dbg.md). For more information about how the heap is managed during the debugging process, see [The CRT Debug Heap](/visualstudio/debugger/crt-debug-heap-details). +When the application is linked with a debug version of the C run-time libraries, **`realloc`** resolves to [`_realloc_dbg`](realloc-dbg.md). For more information about how the heap is managed during the debugging process, see [The CRT debug heap](/visualstudio/debugger/crt-debug-heap-details). **`realloc`** is marked `__declspec(noalias)` and `__declspec(restrict)`, meaning that the function is guaranteed not to modify global variables, and that the pointer returned is not aliased. For more information, see [`noalias`](../../cpp/noalias.md) and [`restrict`](../../cpp/restrict.md). @@ -72,7 +72,7 @@ By default, this function's global state is scoped to the application. To change |-------------|---------------------| |**`realloc`**|`` and ``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -123,7 +123,7 @@ Size of block after realloc of 1000 more longs: 8000 ## See also -[Memory Allocation](../../c-runtime-library/memory-allocation.md)\ +[Memory allocation](../memory-allocation.md)\ [`calloc`](calloc.md)\ [`free`](free.md)\ [`malloc`](malloc.md) diff --git a/docs/c-runtime-library/reference/recalloc-dbg.md b/docs/c-runtime-library/reference/recalloc-dbg.md index 471f9b30b94..93c60ebfc48 100644 --- a/docs/c-runtime-library/reference/recalloc-dbg.md +++ b/docs/c-runtime-library/reference/recalloc-dbg.md @@ -29,41 +29,41 @@ void *_recalloc_dbg( ### Parameters -*userData*
+*`userData`*\ Pointer to the previously allocated memory block. -*number*
+*`number`*\ Requested number of memory blocks. -*size*
+*`size`*\ Requested size of each memory block (bytes). -*blockType*
+*`blockType`*\ Requested type of memory block: **_CLIENT_BLOCK** or **_NORMAL_BLOCK**. For information about the allocation block types and how they are used, see [Types of blocks on the debug heap](/visualstudio/debugger/crt-debug-heap-details). -*filename*
+*`filename`*\ Pointer to name of the source file that requested allocation operation or **NULL**. -*linenumber*
+*`linenumber`*\ Line number in the source file where allocation operation was requested or **NULL**. -The *filename* and *linenumber* parameters are only available when **_recalloc_dbg** has been called explicitly or the [_CRTDBG_MAP_ALLOC](../../c-runtime-library/crtdbg-map-alloc.md) preprocessor constant has been defined. +The *`filename`* and *`linenumber`* parameters are only available when **_recalloc_dbg** has been called explicitly or the [`_CRTDBG_MAP_ALLOC`](../crtdbg-map-alloc.md) preprocessor constant has been defined. -## Return Value +## Return value -On successful completion, this function either returns a pointer to the user portion of the reallocated memory block, calls the new handler function, or returns **NULL**. For a complete description of the return behavior, see the following Remarks section. For more information about how the new handler function is used, see the [_recalloc](recalloc.md) function. +On successful completion, this function either returns a pointer to the user portion of the reallocated memory block, calls the new handler function, or returns **NULL**. For a complete description of the return behavior, see the following Remarks section. For more information about how the new handler function is used, see the [`_recalloc`](recalloc.md) function. ## Remarks -**_recalloc_dbg** is a debug version of the [_recalloc](recalloc.md) function. When [_DEBUG](../../c-runtime-library/debug.md) is not defined, each call to **_recalloc_dbg** is reduced to a call to **_recalloc**. Both **_recalloc** and **_recalloc_dbg** reallocate a memory block in the base heap, but **_recalloc_dbg** accommodates several debugging features: buffers on either side of the user portion of the block to test for leaks, a block type parameter to track specific allocation types, and *filename*/*linenumber* information to determine the origin of allocation requests. +**_recalloc_dbg** is a debug version of the [`_recalloc`](recalloc.md) function. When [`_DEBUG`](../debug.md) is not defined, each call to **_recalloc_dbg** is reduced to a call to **_recalloc**. Both **_recalloc** and **_recalloc_dbg** reallocate a memory block in the base heap, but **_recalloc_dbg** accommodates several debugging features: buffers on either side of the user portion of the block to test for leaks, a block type parameter to track specific allocation types, and *`filename`*/*`linenumber`* information to determine the origin of allocation requests. -**_recalloc_dbg** reallocates the specified memory block with slightly more space than the requested size (*number* * *size*) which might be greater or less than the size of the originally allocated memory block. The additional space is used by the debug heap manager to link the debug memory blocks and to provide the application with debug header information and overwrite buffers. The reallocation might result in moving the original memory block to a different location in the heap, as well as changing the size of the memory block. The user portion of the block is filled with the value 0xCD and each of the overwrite buffers are filled with 0xFD. +**_recalloc_dbg** reallocates the specified memory block with slightly more space than the requested size (*`number`* * *`size`*) which might be greater or less than the size of the originally allocated memory block. The additional space is used by the debug heap manager to link the debug memory blocks and to provide the application with debug header information and overwrite buffers. The reallocation might result in moving the original memory block to a different location in the heap, as well as changing the size of the memory block. The user portion of the block is filled with the value 0xCD and each of the overwrite buffers are filled with 0xFD. -**_recalloc_dbg** sets **errno** to **ENOMEM** if a memory allocation fails; **EINVAL** is returned if the amount of memory needed (including the overhead mentioned previously) exceeds **_HEAP_MAXREQ**. For information about this and other error codes, see [errno, _doserrno, _sys_errlist, and _sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +**_recalloc_dbg** sets **errno** to **ENOMEM** if a memory allocation fails; **EINVAL** is returned if the amount of memory needed (including the overhead mentioned previously) exceeds **_HEAP_MAXREQ**. For information about this and other error codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). -For information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT Debug Heap Details](/visualstudio/debugger/crt-debug-heap-details). For information about the differences between calling a standard heap function and its debug version in a debug build of an application, see [Debug Versions of Heap Allocation Functions](/visualstudio/debugger/debug-versions-of-heap-allocation-functions). +For information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT debug heap details](/visualstudio/debugger/crt-debug-heap-details). For information about the differences between calling a standard heap function and its debug version in a debug build of an application, see [Debug versions of heap allocation functions](/visualstudio/debugger/debug-versions-of-heap-allocation-functions). ## Requirements @@ -71,12 +71,12 @@ For information about how memory blocks are allocated, initialized, and managed |-------------|---------------------| |**_recalloc_dbg**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Libraries -Debug versions of [C run-time libraries](../../c-runtime-library/crt-library-features.md) only. +Debug versions of [C run-time libraries](../crt-library-features.md) only. ## See also -[Debug Routines](../../c-runtime-library/debug-routines.md)
+[Debug routines](../debug-routines.md) diff --git a/docs/c-runtime-library/reference/recalloc.md b/docs/c-runtime-library/reference/recalloc.md index f9f2e3d13d5..36cb356710e 100644 --- a/docs/c-runtime-library/reference/recalloc.md +++ b/docs/c-runtime-library/reference/recalloc.md @@ -26,34 +26,34 @@ void *_recalloc( ### Parameters -*memblock*
+*`memblock`*\ Pointer to previously allocated memory block. -*number*
+*`number`*\ Number of elements. -*size*
+*`size`*\ Length in bytes of each element. -## Return Value +## Return value **_recalloc** returns a **`void`** pointer to the reallocated (and possibly moved) memory block. If there is not enough available memory to expand the block to the given size, the original block is left unchanged, and **NULL** is returned. -If the requested size is zero, then the block pointed to by *memblock* is freed; the return value is **NULL**, and *memblock* is left pointing at a freed block. +If the requested size is zero, then the block pointed to by *`memblock`* is freed; the return value is **NULL**, and *`memblock`* is left pointing at a freed block. The return value points to a storage space that is guaranteed to be suitably aligned for storage of any type of object. To get a pointer to a type other than **`void`**, use a type cast on the return value. ## Remarks -The **_recalloc** function changes the size of an allocated memory block. The *memblock* argument points to the beginning of the memory block. If *memblock* is **NULL**, **_recalloc** behaves the same way as [calloc](calloc.md) and allocates a new block of *number* * *size* bytes. Each element is initialized to 0. If *memblock* is not **NULL**, it should be a pointer returned by a previous call to **calloc**, [malloc](malloc.md), or [realloc](realloc.md). +The **_recalloc** function changes the size of an allocated memory block. The *`memblock`* argument points to the beginning of the memory block. If *`memblock`* is **NULL**, **_recalloc** behaves the same way as [`calloc`](calloc.md) and allocates a new block of *`number`* * *`size`* bytes. Each element is initialized to 0. If *`memblock`* is not **NULL**, it should be a pointer returned by a previous call to **calloc**, [`malloc`](malloc.md), or [`realloc`](realloc.md). -Because the new block can be in a new memory location, the pointer returned by **_recalloc** is not guaranteed to be the pointer passed through the *memblock* argument. +Because the new block can be in a new memory location, the pointer returned by **_recalloc** is not guaranteed to be the pointer passed through the *`memblock`* argument. -**_recalloc** sets **errno** to **ENOMEM** if the memory allocation fails or if the amount of memory requested exceeds **_HEAP_MAXREQ**. For information on this and other error codes, see [errno, _doserrno, _sys_errlist, and _sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +**_recalloc** sets **errno** to **ENOMEM** if the memory allocation fails or if the amount of memory requested exceeds **_HEAP_MAXREQ**. For information on this and other error codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). -**recalloc** calls **realloc** in order to use the C++ [_set_new_mode](set-new-mode.md) function to set the new handler mode. The new handler mode indicates whether, on failure, **realloc** is to call the new handler routine as set by [_set_new_handler](set-new-handler.md). By default, **realloc** does not call the new handler routine on failure to allocate memory. You can override this default behavior so that, when **_recalloc** fails to allocate memory, **realloc** calls the new handler routine in the same way that the **`new`** operator does when it fails for the same reason. To override the default, call +**recalloc** calls **realloc** in order to use the C++ [`_set_new_mode`](set-new-mode.md) function to set the new handler mode. The new handler mode indicates whether, on failure, **realloc** is to call the new handler routine as set by [`_set_new_handler`](set-new-handler.md). By default, **realloc** does not call the new handler routine on failure to allocate memory. You can override this default behavior so that, when **_recalloc** fails to allocate memory, **realloc** calls the new handler routine in the same way that the **`new`** operator does when it fails for the same reason. To override the default, call ```C _set_new_mode(1); @@ -61,9 +61,9 @@ _set_new_mode(1); early in the program, or link with NEWMODE.OBJ. -When the application is linked with a debug version of the C run-time libraries, **_recalloc** resolves to [_recalloc_dbg](recalloc-dbg.md). For more information about how the heap is managed during the debugging process, see [The CRT Debug Heap](/visualstudio/debugger/crt-debug-heap-details). +When the application is linked with a debug version of the C run-time libraries, **_recalloc** resolves to [`_recalloc_dbg`](recalloc-dbg.md). For more information about how the heap is managed during the debugging process, see [The CRT debug heap](/visualstudio/debugger/crt-debug-heap-details). -**_recalloc** is marked `__declspec(noalias)` and `__declspec(restrict)`, meaning that the function is guaranteed not to modify global variables, and that the pointer returned is not aliased. For more information, see [noalias](../../cpp/noalias.md) and [restrict](../../cpp/restrict.md). +**_recalloc** is marked `__declspec(noalias)` and `__declspec(restrict)`, meaning that the function is guaranteed not to modify global variables, and that the pointer returned is not aliased. For more information, see [`noalias`](../../cpp/noalias.md) and [`restrict`](../../cpp/restrict.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). @@ -73,13 +73,13 @@ By default, this function's global state is scoped to the application. To change |-------------|---------------------| |**_recalloc**|\ and \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Memory Allocation](../../c-runtime-library/memory-allocation.md)
-[_recalloc_dbg](recalloc-dbg.md)
-[_aligned_recalloc](aligned-recalloc.md)
-[_aligned_offset_recalloc](aligned-offset-recalloc.md)
-[free](free.md)
-[Link Options](../../c-runtime-library/link-options.md)
+[Memory allocation](../memory-allocation.md)\ +[`_recalloc_dbg`](recalloc-dbg.md)\ +[`_aligned_recalloc`](aligned-recalloc.md)\ +[`_aligned_offset_recalloc`](aligned-offset-recalloc.md)\ +[`free`](free.md)\ +[Link options](../link-options.md) diff --git a/docs/c-runtime-library/reference/remainder-remainderf-remainderl.md b/docs/c-runtime-library/reference/remainder-remainderf-remainderl.md index 2ec00b22363..c626132b51d 100644 --- a/docs/c-runtime-library/reference/remainder-remainderf-remainderl.md +++ b/docs/c-runtime-library/reference/remainder-remainderf-remainderl.md @@ -28,15 +28,15 @@ long double remainder( long double x, long double y ); /* C++ only */ ### Parameters -*x*\ +*`x`*\ The numerator. -*y*\ +*`y`*\ The denominator. -## Return Value +## Return value -The floating-point remainder of *x* / *y*. If the value of *y* is 0.0, **remainder** returns a quiet NaN. For information about the representation of a quiet NaN by the **printf** family, see [printf, _printf_l, wprintf, _wprintf_l](printf-printf-l-wprintf-wprintf-l.md). +The floating-point remainder of *`x`* / *`y`*. If the value of *`y`* is 0.0, **remainder** returns a quiet NaN. For information about the representation of a quiet NaN by the **printf** family, see [`printf`, `_printf_l`, `wprintf`, `_wprintf_l`](printf-printf-l-wprintf-wprintf-l.md). ## Remarks @@ -44,7 +44,7 @@ The **remainder** functions calculate the floating-point remainder `r` of `x / y Because C++ allows overloading, you can call overloads of **remainder** that take and return **`float`** or **`long double`** values. In a C program, unless you're using the \ macro to call this function, **remainder** always takes two **`double`** arguments and returns a **`double`**. -If you use the \ `remainder()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../../c-runtime-library/tgmath.md) for details. +If you use the \ `remainder()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../tgmath.md) for details. 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). @@ -55,7 +55,7 @@ By default, this function's global state is scoped to the application. To change |**remainder**, **remainderf**, **remainderl**|\|\ or \| |**remainder** macro | \ || -For compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -81,8 +81,8 @@ The remainder of -10.00 / 3.00 is -1.000000 ## See also -[Floating-Point Support](../../c-runtime-library/floating-point-support.md)\ -[ldiv, lldiv](./div.md)\ -[imaxdiv](imaxdiv.md)\ -[fmod, fmodf](fmod-fmodf.md)\ -[remquo, remquof, remquol](remquo-remquof-remquol.md) +[Math and floating-point support](../floating-point-support.md)\ +[`ldiv`, `lldiv`](./div.md)\ +[`imaxdiv`](imaxdiv.md)\ +[`fmod`, `fmodf`](fmod-fmodf.md)\ +[`remquo`, `remquof`, `remquol`](remquo-remquof-remquol.md) diff --git a/docs/c-runtime-library/reference/remove-wremove.md b/docs/c-runtime-library/reference/remove-wremove.md index ee7bb538511..62a108f0f36 100644 --- a/docs/c-runtime-library/reference/remove-wremove.md +++ b/docs/c-runtime-library/reference/remove-wremove.md @@ -29,11 +29,11 @@ int _wremove( *`path`*\ Path of file to be removed. -## Return Value +## Return value Each of these functions returns 0 if the file is successfully deleted. Otherwise, it returns -1 and sets **`errno`** either to **`EACCES`** to indicate that the path specifies a read-only file, specifies a directory, or the file is open, or to **`ENOENT`** to indicate that the filename or path wasn't found. -For more information about return codes, see [`_doserrno`, `errno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). +For more information about return codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks @@ -41,7 +41,7 @@ The **`remove`** function deletes the file specified by *`path`.* **`_wremove`** 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| |---------------------|------------------------------------|--------------------|-----------------------| @@ -54,11 +54,11 @@ By default, this function's global state is scoped to the application. To change |**`remove`**|`` or ``| |**`_wremove`**|`` or ``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Libraries -All versions of the [C run-time libraries](../../c-runtime-library/crt-library-features.md). +All versions of the [C run-time libraries](../crt-library-features.md). ## Example @@ -83,7 +83,7 @@ int main( void ) This file will be deleted. ``` -### Sample Output +### Sample output ```Output Deleted 'CRT_REMOVE.TXT' @@ -91,5 +91,5 @@ Deleted 'CRT_REMOVE.TXT' ## See also -[File Handling](../../c-runtime-library/file-handling.md)\ +[File handling](../file-handling.md)\ [`_unlink`, `_wunlink`](unlink-wunlink.md) diff --git a/docs/c-runtime-library/reference/remquo-remquof-remquol.md b/docs/c-runtime-library/reference/remquo-remquof-remquol.md index 4be62aee65f..ae63f620fdf 100644 --- a/docs/c-runtime-library/reference/remquo-remquof-remquol.md +++ b/docs/c-runtime-library/reference/remquo-remquof-remquol.md @@ -28,26 +28,26 @@ long double remquo( long double numer, long double denom, int* quo ); /* C++ onl ### Parameters -*numer*\ +*`numer`*\ The numerator. -*denom*\ +*`denom`*\ The denominator. -*quo*\ +*`quo`*\ A pointer to an integer to store a value that has the sign and approximate magnitude of the quotient. -## Return Value +## Return value -**remquo** returns the floating-point remainder of *x* / *y*. If the value of *y* is 0.0, **remquo** returns a quiet NaN. For information about the representation of a quiet NaN by the **printf** family, see [printf, _printf_l, wprintf, _wprintf_l](printf-printf-l-wprintf-wprintf-l.md). +**remquo** returns the floating-point remainder of *`x`* / *`y`*. If the value of *`y`* is 0.0, **remquo** returns a quiet NaN. For information about the representation of a quiet NaN by the **printf** family, see [`printf`, `_printf_l`, `wprintf`, `_wprintf_l`](printf-printf-l-wprintf-wprintf-l.md). ## Remarks -The **remquo** function calculates the floating-point remainder *f* of *x* / *y* such that *x* = *i* \* *y* + *f*, where *i* is an integer, *f* has the same sign as *x*, and the absolute value of *f* is less than the absolute value of *y*. +The **remquo** function calculates the floating-point remainder `f` of *`x`* / *`y`* such that *`x`* = `n` \* *`y`* + `f`*, where `n` is an integer, `f` has the same sign as *`x`*, and the absolute value of `f` is less than the absolute value of *`y`*. C++ allows overloading, so you can call overloads of **remquo** that take and return **`float`** or **`long double`** values. In a C program, unless you're using the \ macro to call this function, **remquo** always takes two **`double`** arguments and returns a **`double`**. -If you use the \ `remquo()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../../c-runtime-library/tgmath.md) for details. +If you use the \ `remquo()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../tgmath.md) for details. 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). @@ -58,7 +58,7 @@ By default, this function's global state is scoped to the application. To change |**remquo**, **remquof**, **remquol**|\|\ or \| |**remquo** macro | \ || -For compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -87,8 +87,8 @@ Approximate signed quotient is -3 ## See also -[Floating-Point Support](../../c-runtime-library/floating-point-support.md)
-[ldiv, lldiv](./div.md)
-[imaxdiv](imaxdiv.md)
-[fmod, fmodf](fmod-fmodf.md)
-[remainder, remainderf, remainderl](remainder-remainderf-remainderl.md)
+[Math and floating-point support](../floating-point-support.md)\ +[`ldiv`, `lldiv`](./div.md)\ +[`imaxdiv`](imaxdiv.md)\ +[`fmod`, `fmodf`](fmod-fmodf.md)\ +[`remainder`, `remainderf`, `remainderl`](remainder-remainderf-remainderl.md) diff --git a/docs/c-runtime-library/reference/rename-wrename.md b/docs/c-runtime-library/reference/rename-wrename.md index e8c3b574327..459a2fe0465 100644 --- a/docs/c-runtime-library/reference/rename-wrename.md +++ b/docs/c-runtime-library/reference/rename-wrename.md @@ -29,13 +29,13 @@ int _wrename( ### Parameters -*`oldname`*
+*`oldname`*\ Pointer to old name. -*`newname`*
+*`newname`*\ Pointer to new name. -## Return Value +## Return value Each of these functions returns 0 if it is successful. On an error, the function returns a nonzero value and sets **`errno`** to one of the following values: @@ -45,7 +45,7 @@ Each of these functions returns 0 if it is successful. On an error, the function | **`ENOENT`** | File or path specified by *`oldname`* not found. | | **`EINVAL`** | Name contains invalid characters. | -For other possible return values, see [`_doserrno`, `_errno`, `syserrlist`, and `_sys_nerr`](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +For other possible return values, see [`_doserrno`, `_errno`, `syserrlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks @@ -55,7 +55,7 @@ The **`rename`** function renames the file or directory specified by *`oldname`* 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| |---------------------|------------------------------------|--------------------|-----------------------| @@ -68,11 +68,11 @@ By default, this function's global state is scoped to the application. To change |**`rename`**|`` or ``| |**`_wrename`**|`` or ``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Libraries -All versions of the [C run-time libraries](../../c-runtime-library/crt-library-features.md). +All versions of the [C run-time libraries](../crt-library-features.md). ## Example @@ -108,4 +108,4 @@ File 'CRT_RENAMER.OBJ' renamed to 'CRT_RENAMER.JBO' ## See also -[File Handling](../../c-runtime-library/file-handling.md)
+[File handling](../file-handling.md) diff --git a/docs/c-runtime-library/reference/resetstkoflw.md b/docs/c-runtime-library/reference/resetstkoflw.md index fd7a2ccd2a3..4c0f5b88212 100644 --- a/docs/c-runtime-library/reference/resetstkoflw.md +++ b/docs/c-runtime-library/reference/resetstkoflw.md @@ -23,7 +23,7 @@ Recovers from stack overflow. int _resetstkoflw( void ); ``` -## Return Value +## Return value Nonzero if the function succeeds, zero if it fails. @@ -31,7 +31,7 @@ Nonzero if the function succeeds, zero if it fails. The **`_resetstkoflw`** function recovers from a stack overflow condition, allowing a program to continue instead of failing with a fatal exception error. If the **`_resetstkoflw`** function isn't called, there are no guard pages after the previous exception. The next time that there's a stack overflow, there are no exceptions at all and the process terminates without warning. -If a thread in an application causes an **`EXCEPTION_STACK_OVERFLOW`** exception, the thread has left its stack in a damaged state. This is in contrast to other exceptions such as **`EXCEPTION_ACCESS_VIOLATION`** or **`EXCEPTION_INT_DIVIDE_BY_ZERO`**, where the stack isn't damaged. The stack is set to an arbitrarily small value when the program is first loaded. The stack then grows on demand to meet the needs of the thread. This is implemented by placing a page with PAGE_GUARD access at the end of the current stack. For more information, see [Creating Guard Pages](/windows/win32/Memory/creating-guard-pages). +If a thread in an application causes an **`EXCEPTION_STACK_OVERFLOW`** exception, the thread has left its stack in a damaged state. This is in contrast to other exceptions such as **`EXCEPTION_ACCESS_VIOLATION`** or **`EXCEPTION_INT_DIVIDE_BY_ZERO`**, where the stack isn't damaged. The stack is set to an arbitrarily small value when the program is first loaded. The stack then grows on demand to meet the needs of the thread. This is implemented by placing a page with PAGE_GUARD access at the end of the current stack. For more information, see [Creating guard pages](/windows/win32/Memory/creating-guard-pages). When the code causes the stack pointer to point to an address on this page, an exception occurs and the system does the following three things: @@ -83,9 +83,9 @@ By default, this function's global state is scoped to the application. To change |-------------|---------------------| |**`_resetstkoflw`**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). -**Libraries:** All versions of the [CRT Library Features](../../c-runtime-library/crt-library-features.md). +**Libraries:** All versions of the [CRT library features](../crt-library-features.md). ## Example @@ -285,4 +285,4 @@ Recovered from stack overflow and allocated 100,000 bytes using _alloca. ## See also -[`_alloca`](alloca.md)
+[`_alloca`](alloca.md) diff --git a/docs/c-runtime-library/reference/rewind.md b/docs/c-runtime-library/reference/rewind.md index f499870516c..cd5af7193e1 100644 --- a/docs/c-runtime-library/reference/rewind.md +++ b/docs/c-runtime-library/reference/rewind.md @@ -24,22 +24,22 @@ void rewind( ### Parameters -*stream*
+*`stream`*\ Pointer to **FILE** structure. ## Remarks -The **rewind** function repositions the file pointer associated with *stream* to the beginning of the file. A call to **rewind** is similar to +The **rewind** function repositions the file pointer associated with *`stream`* to the beginning of the file. A call to **rewind** is similar to -**(void) fseek(** _stream_**, 0L, SEEK_SET );** +`(void) fseek(stream, 0L, SEEK_SET );` -However, unlike [fseek](fseek-fseeki64.md), **rewind** clears the error indicators for the stream as well as the end-of-file indicator. Also, unlike [fseek](fseek-fseeki64.md), **rewind** does not return a value to indicate whether the pointer was successfully moved. +However, unlike [`fseek`](fseek-fseeki64.md), **rewind** clears the error indicators for the stream as well as the end-of-file indicator. Also, unlike [`fseek`](fseek-fseeki64.md), **rewind** does not return a value to indicate whether the pointer was successfully moved. To clear the keyboard buffer, use **rewind** with the stream **stdin**, which is associated with the keyboard by default. -If stream is a **NULL** pointer, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, this function returns and **errno** is set to **EINVAL**. +If stream is a **NULL** pointer, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, this function returns and **errno** is set to **EINVAL**. -For information on these and other error codes, see [_doserrno, errno, _sys_errlist, and _sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +For information on these and other error codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.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). @@ -49,11 +49,11 @@ By default, this function's global state is scoped to the application. To change |-------------|---------------------| |**rewind**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Libraries -All versions of the [C run-time libraries](../../c-runtime-library/crt-library-features.md). +All versions of the [C run-time libraries](../crt-library-features.md). ## Example @@ -97,4 +97,4 @@ The values read are: 1 and -37 ## See also -[Stream I/O](../../c-runtime-library/stream-i-o.md)
+[Stream I/O](../stream-i-o.md) diff --git a/docs/c-runtime-library/reference/rint-rintf-rintl.md b/docs/c-runtime-library/reference/rint-rintf-rintl.md index c775cdc5002..ba69da18180 100644 --- a/docs/c-runtime-library/reference/rint-rintf-rintl.md +++ b/docs/c-runtime-library/reference/rint-rintf-rintl.md @@ -28,12 +28,12 @@ long double rint( long double x ); // C++ only ### Parameters -*x*\ +*`x`*\ The floating-point value to round. -## Return Value +## Return value -The **rint** functions return a floating-point value that represents the nearest integer to *x*. Halfway values are rounded according to the current setting of the floating-point rounding mode, the same as the **nearbyint** functions. Unlike the **nearbyint** functions, the **rint** functions may raise the **FE_INEXACT** floating-point exception if the result differs in value from the argument. There's no error return. +The **rint** functions return a floating-point value that represents the nearest integer to *`x`*. Halfway values are rounded according to the current setting of the floating-point rounding mode, the same as the **nearbyint** functions. Unlike the **nearbyint** functions, the **rint** functions may raise the **FE_INEXACT** floating-point exception if the result differs in value from the argument. There's no error return. |Input|SEH Exception|**_matherr** Exception| |-----------|-------------------|--------------------------| @@ -44,7 +44,7 @@ The **rint** functions return a floating-point value that represents the nearest Because C++ allows overloading, you can call overloads of **rint** that take and return **`float`** and **`long double`** values. In a C program, unless you're using the \ macro to call this function, **rint** always takes and returns a **`double`**. -If you use the \ `rint()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../../c-runtime-library/tgmath.md) for details. +If you use the \ `rint()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../tgmath.md) for details. 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). @@ -55,7 +55,7 @@ By default, this function's global state is scoped to the application. To change |**rint**, **rintf**, **rintl**|\|\| |**rint** macro | \ || -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -95,11 +95,11 @@ rintl(-2.500000) is -3 ## See also -[Floating-Point Support](../../c-runtime-library/floating-point-support.md)
-[ceil, ceilf, ceill](ceil-ceilf-ceill.md)
-[floor, floorf, floorl](floor-floorf-floorl.md)
-[fmod, fmodf](fmod-fmodf.md)
-[lrint, lrintf, lrintl, llrint, llrintf, llrintl](lrint-lrintf-lrintl-llrint-llrintf-llrintl.md)
-[lround, lroundf, lroundl, llround, llroundf, llroundl](lround-lroundf-lroundl-llround-llroundf-llroundl.md)
-[nearbyint, nearbyintf, nearbyintl](nearbyint-nearbyintf-nearbyintl1.md)
-[rint](rint-rintf-rintl.md)
+[Math and floating-point support](../floating-point-support.md)\ +[`ceil`, `ceilf`, `ceill`](ceil-ceilf-ceill.md)\ +[`floor`, `floorf`, `floorl`](floor-floorf-floorl.md)\ +[`fmod`, `fmodf`](fmod-fmodf.md)\ +[`lrint`, `lrintf`, `lrintl`, `llrint`, `llrintf`, `llrintl`](lrint-lrintf-lrintl-llrint-llrintf-llrintl.md)\ +[`lround`, `lroundf`, `lroundl`, `llround`, `llroundf`, `llroundl`](lround-lroundf-lroundl-llround-llroundf-llroundl.md)\ +[`nearbyint`, `nearbyintf`, `nearbyintl`](nearbyint-nearbyintf-nearbyintl1.md)\ +[`rint`](rint-rintf-rintl.md) diff --git a/docs/c-runtime-library/reference/rmdir-wrmdir.md b/docs/c-runtime-library/reference/rmdir-wrmdir.md index 35870b1543b..d3f97bdc577 100644 --- a/docs/c-runtime-library/reference/rmdir-wrmdir.md +++ b/docs/c-runtime-library/reference/rmdir-wrmdir.md @@ -27,10 +27,10 @@ int _wrmdir( ### Parameters -*dirname*
+*`dirname`*\ Path of the directory to be removed. -## Return Value +## Return value Each of these functions returns 0 if the directory is successfully deleted. A return value of -1 indicates an error and **errno** is set to one of the following values: @@ -40,17 +40,17 @@ Each of these functions returns 0 if the directory is successfully deleted. A re | **ENOENT** | Path is invalid. | | **EACCES** | A program has an open handle to the directory. | -For more information about these 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 these and other return codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks -The **_rmdir** function deletes the directory specified by *dirname*. The directory must be empty, and it must not be the current working directory or the root directory. +The **_rmdir** function deletes the directory specified by *`dirname`*. The directory must be empty, and it must not be the current working directory or the root directory. -**_wrmdir** is a wide-character version of **_rmdir**; the *dirname* argument to **_wrmdir** is a wide-character string. **_wrmdir** and **_rmdir** behave identically otherwise. +**_wrmdir** is a wide-character version of **_rmdir**; the *`dirname`* argument to **_wrmdir** is a wide-character string. **_wrmdir** and **_rmdir** behave identically otherwise. 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| |---------------------|--------------------------------------|--------------------|-----------------------| @@ -63,18 +63,18 @@ By default, this function's global state is scoped to the application. To change |**_rmdir**|\| |**_wrmdir**|\ or \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Libraries -All versions of the [C run-time libraries](../../c-runtime-library/crt-library-features.md). +All versions of the [C run-time libraries](../crt-library-features.md). ## Example -See the example for [_mkdir](mkdir-wmkdir.md). +See the example for [`_mkdir`](mkdir-wmkdir.md). ## See also -[Directory Control](../../c-runtime-library/directory-control.md)
-[_chdir, _wchdir](chdir-wchdir.md)
-[_mkdir, _wmkdir](mkdir-wmkdir.md)
+[Directory control](../directory-control.md)\ +[`_chdir`, `_wchdir`](chdir-wchdir.md)\ +[`_mkdir`, `_wmkdir`](mkdir-wmkdir.md) diff --git a/docs/c-runtime-library/reference/rmdir.md b/docs/c-runtime-library/reference/rmdir.md index 0d5d7ec1572..f0cc5a33a3b 100644 --- a/docs/c-runtime-library/reference/rmdir.md +++ b/docs/c-runtime-library/reference/rmdir.md @@ -12,6 +12,6 @@ ms.assetid: 03a0aff4-f66c-42a9-bee9-84c46f994952 --- # rmdir -The Microsoft-implemented POSIX function name `rmdir` is a deprecated alias for the [_rmdir](rmdir-wrmdir.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. +The Microsoft-implemented POSIX function name `rmdir` is a deprecated alias for the [`_rmdir`](rmdir-wrmdir.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. -We recommend you use [_rmdir](rmdir-wrmdir.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). +We recommend you use [`_rmdir`](rmdir-wrmdir.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). diff --git a/docs/c-runtime-library/reference/rmtmp.md b/docs/c-runtime-library/reference/rmtmp.md index b8076876cce..a7f4a216695 100644 --- a/docs/c-runtime-library/reference/rmtmp.md +++ b/docs/c-runtime-library/reference/rmtmp.md @@ -21,7 +21,7 @@ Removes temporary files. int _rmtmp( void ); ``` -## Return Value +## Return value **_rmtmp** returns the number of temporary files closed and deleted. @@ -37,19 +37,19 @@ By default, this function's global state is scoped to the application. To change |-------------|---------------------| |**_rmtmp**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Libraries -All versions of the [C run-time libraries](../../c-runtime-library/crt-library-features.md). +All versions of the [C run-time libraries](../crt-library-features.md). ## Example -See the example for [tmpfile](tmpfile.md). +See the example for [`tmpfile`](tmpfile.md). ## See also -[Stream I/O](../../c-runtime-library/stream-i-o.md)
-[_flushall](flushall.md)
-[tmpfile](tmpfile.md)
-[_tempnam, _wtempnam, tmpnam, _wtmpnam](tempnam-wtempnam-tmpnam-wtmpnam.md)
+[Stream I/O](../stream-i-o.md)\ +[`_flushall`](flushall.md)\ +[`tmpfile`](tmpfile.md)\ +[`_tempnam`, `_wtempnam`, `tmpnam`, `_wtmpnam`](tempnam-wtempnam-tmpnam-wtmpnam.md) diff --git a/docs/c-runtime-library/reference/rotl-rotl64-rotr-rotr64.md b/docs/c-runtime-library/reference/rotl-rotl64-rotr-rotr64.md index f78d40eab9e..c92fda846cf 100644 --- a/docs/c-runtime-library/reference/rotl-rotl64-rotr-rotr64.md +++ b/docs/c-runtime-library/reference/rotl-rotl64-rotr-rotr64.md @@ -38,19 +38,19 @@ unsigned __int64 _rotr64( ### Parameters -*value*
+*`value`*\ Value to be rotated. -*shift*
+*`shift`*\ Number of bits to shift. -## Return Value +## Return value The rotated value. There's no error return. ## Remarks -The **_rotl** and **_rotr** functions rotate the unsigned *value* by *shift* bits. **_rotl** rotates the value left. **_rotr** rotates the value right. Both functions wrap bits rotated off one end of *value* to the other end. +The **_rotl** and **_rotr** functions rotate the unsigned *`value`* by *`shift`* bits. **_rotl** rotates the value left. **_rotr** rotates the value right. Both functions wrap bits rotated off one end of *`value`* to the other end. ## Requirements @@ -59,11 +59,11 @@ The **_rotl** and **_rotr** functions rotate the unsigned *value* by *shift* bit |**_rotl**, **_rotl64**|\| |**_rotr**, **_rotr64**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Libraries -All versions of the [C run-time libraries](../../c-runtime-library/crt-library-features.md). +All versions of the [C run-time libraries](../crt-library-features.md). ## Example @@ -103,5 +103,5 @@ int main( void ) ## See also -[Floating-Point Support](../../c-runtime-library/floating-point-support.md)
-[_lrotl, _lrotr](lrotl-lrotr.md)
+[Math and floating-point support](../floating-point-support.md)\ +[`_lrotl`, `_lrotr`](lrotl-lrotr.md) diff --git a/docs/c-runtime-library/reference/round-roundf-roundl.md b/docs/c-runtime-library/reference/round-roundf-roundl.md index f01fd71abb1..aca4ba443f8 100644 --- a/docs/c-runtime-library/reference/round-roundf-roundl.md +++ b/docs/c-runtime-library/reference/round-roundf-roundl.md @@ -40,7 +40,7 @@ long double roundl( *`x`*\ The floating-point value to round. -## Return Value +## Return value The **`round`** functions return a floating-point value that represents the nearest integer to *`x`*. Halfway values are rounded away from zero, regardless of the setting of the floating-point rounding mode. There's no error return. @@ -52,7 +52,7 @@ The **`round`** functions return a floating-point value that represents the near Because C++ allows overloading, you can call overloads of **`round`** that take and return **`float`** and **`long double`** values. In a C program, unless you're using the `` macro to call this function, **`round`** always takes and returns a **`double`**. -If you use the `` `round()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../../c-runtime-library/tgmath.md) for details. +If you use the `` `round()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../tgmath.md) for details. 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). @@ -63,7 +63,7 @@ By default, this function's global state is scoped to the application. To change |**`round`**, **`roundf`**, **`roundl`**|``| |**`round`** macro | `` | -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -117,7 +117,7 @@ roundl(-2.499999900000000163657887242152355611324310302734375) is -2 ## See also -[Floating-Point Support](../../c-runtime-library/floating-point-support.md)\ +[Math and floating-point support](../floating-point-support.md)\ [`ceil`, `ceilf`, `ceill`](ceil-ceilf-ceill.md)\ [`floor`, `floorf`, `floorl`](floor-floorf-floorl.md)\ [`fmod`, `fmodf`](fmod-fmodf.md)\ diff --git a/docs/c-runtime-library/reference/rpt-rptf-rptw-rptfw-macros.md b/docs/c-runtime-library/reference/rpt-rptf-rptw-rptfw-macros.md index 6c41dbef60d..82c1333d2b6 100644 --- a/docs/c-runtime-library/reference/rpt-rptf-rptw-rptfw-macros.md +++ b/docs/c-runtime-library/reference/rpt-rptf-rptw-rptfw-macros.md @@ -11,7 +11,7 @@ ms.assetid: a5bf8b30-57f7-4971-8030-e773b7a1ae13 --- # _RPT, _RPTF, _RPTW, _RPTFW Macros -Tracks an application's progress by generating a debug report (debug version only). Note that *n* specifies the number of arguments in *args* and can be 0, 1, 2, 3, 4, or 5. +Tracks an application's progress by generating a debug report (debug version only). Note that *`n`* specifies the number of arguments in *`args`* and can be 0, 1, 2, 3, 4, or 5. ## Syntax @@ -42,26 +42,26 @@ _RPTFWn( ### Parameters -*reportType*
+*`reportType`*\ Report type: **_CRT_WARN**, **_CRT_ERROR**, or **_CRT_ASSERT**. -*format*
+*`format`*\ Format-control string used to create the user message. -*args*
-Substitution arguments used by *format*. +*`args`*\ +Substitution arguments used by *`format`*. ## Remarks -All these macros take the *reportType* and *format* parameters. In addition, they might also take up to four additional arguments, signified by the number appended to the macro name. For example, **_RPT0** and **_RPTF0** take no additional arguments, **_RPT1** and **_RPTF1** take *arg1*, **_RPT2** and **_RPTF2** take *arg1* and **arg2**, and so on. +All these macros take the *`reportType`* and *`format`* parameters. In addition, they might also take up to four additional arguments, signified by the number appended to the macro name. For example, **_RPT0** and **_RPTF0** take no additional arguments, **_RPT1** and **_RPTF1** take *`arg1`*, **_RPT2** and **_RPTF2** take *`arg1`* and *`arg2`*, and so on. -The **_RPT** and **_RPTF** macros are similar to the [printf](printf-printf-l-wprintf-wprintf-l.md) function, because they can be used to track an application's progress during the debugging process. However, these macros are more flexible than **printf** because they do not need to be enclosed in **#ifdef** statements to prevent them from being called in a retail build of an application. This flexibility is achieved by using the [_DEBUG](../../c-runtime-library/debug.md) macro; the **_RPT** and **_RPTF** macros are only available when the **_DEBUG** flag is defined. When **_DEBUG** is not defined, calls to these macros are removed during preprocessing. +The **_RPT** and **_RPTF** macros are similar to the [`printf`](printf-printf-l-wprintf-wprintf-l.md) function, because they can be used to track an application's progress during the debugging process. However, these macros are more flexible than **printf** because they do not need to be enclosed in **#ifdef** statements to prevent them from being called in a retail build of an application. This flexibility is achieved by using the [`_DEBUG`](../debug.md) macro; the **_RPT** and **_RPTF** macros are only available when the **_DEBUG** flag is defined. When **_DEBUG** is not defined, calls to these macros are removed during preprocessing. The **_RPTW** and **_RPTFW** macros are wide-character versions of these macros. They are like **wprintf** and take wide-character strings as arguments. -The **_RPT** macros call the [_CrtDbgReport](crtdbgreport-crtdbgreportw.md) function to generate a debug report with a user message. The **_RPTW** macros call the **_CrtDbgReportW** function to generate the same report with wide characters. The **_RPTF** and **_RPTFW** macros create a debug report with the source file and line number where the report macro was called, in addition to the user message. The user message is created by substituting the **arg**[*n*] arguments into the *format* string, using the same rules defined by the [printf](printf-printf-l-wprintf-wprintf-l.md) function. +The **_RPT** macros call the [`_CrtDbgReport`](crtdbgreport-crtdbgreportw.md) function to generate a debug report with a user message. The **_RPTW** macros call the **_CrtDbgReportW** function to generate the same report with wide characters. The **_RPTF** and **_RPTFW** macros create a debug report with the source file and line number where the report macro was called, in addition to the user message. The user message is created by substituting the *`arg[n]`* arguments into the *`format`* string, using the same rules defined by the [`printf`](printf-printf-l-wprintf-wprintf-l.md) function. -**_CrtDbgReport** or **_CrtDbgReportW** generates the debug report and determines its destinations based on the current report modes and file defined for *reportType*. The [_CrtSetReportMode](crtsetreportmode.md) and [_CrtSetReportFile](crtsetreportfile.md) functions are used to define the destinations for each report type. +**_CrtDbgReport** or **_CrtDbgReportW** generates the debug report and determines its destinations based on the current report modes and file defined for *`reportType`*. The [`_CrtSetReportMode`](crtsetreportmode.md) and [`_CrtSetReportFile`](crtsetreportfile.md) functions are used to define the destinations for each report type. If an **_RPT** macro is called and neither **_CrtSetReportMode** nor **_CrtSetReportFile** has been called, messages are displayed as follows. @@ -71,9 +71,9 @@ If an **_RPT** macro is called and neither **_CrtSetReportMode** nor **_CrtSetRe |**_CRT_ERROR**|A pop-up window. Same as if `_CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_WNDW);` had been specified.| |**_CRT_ASSERT**|Same as **_CRT_ERROR**.| -When the destination is a debug message window and the user chooses the **Retry** button, **_CrtDbgReport** or **_CrtDbgReportW** returns 1, causing these macros to start the debugger, provided that just-in-time (JIT) debugging is enabled. For more information about using these macros as a debugging error handling mechanism, see [Using Macros for Verification and Reporting](/visualstudio/debugger/macros-for-reporting). +When the destination is a debug message window and the user chooses the **Retry** button, **_CrtDbgReport** or **_CrtDbgReportW** returns 1, causing these macros to start the debugger, provided that just-in-time (JIT) debugging is enabled. For more information about using these macros as a debugging error handling mechanism, see [Using macros for verification and reporting](/visualstudio/debugger/macros-for-reporting). -Two other macros exist that generate a debug report. The [_ASSERT](assert-asserte-assert-expr-macros.md) macro generates a report, but only when its expression argument evaluates to FALSE. [_ASSERTE](assert-asserte-assert-expr-macros.md) is exactly like **_ASSERT**, but includes the failed expression in the generated report. +Two other macros exist that generate a debug report. The [`_ASSERT`](assert-asserte-assert-expr-macros.md) macro generates a report, but only when its expression argument evaluates to FALSE. [`_ASSERTE`](assert-asserte-assert-expr-macros.md) is exactly like **_ASSERT**, but includes the failed expression in the generated report. ## Requirements @@ -84,18 +84,18 @@ Two other macros exist that generate a debug report. The [_ASSERT](assert-assert |**_RPTW** macros|\| |**_RPTFW** macros|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Libraries -Debug versions of [C run-time libraries](../../c-runtime-library/crt-library-features.md) only. +Debug versions of [C run-time libraries](../crt-library-features.md) only. Although these are macros and are obtained by including Crtdbg.h, the application must link with one of the debug libraries because these macros call other run-time functions. ## Example -See the example in the [_ASSERT](assert-asserte-assert-expr-macros.md) topic. +See the example in the [`_ASSERT`](assert-asserte-assert-expr-macros.md) topic. ## See also -[Debug Routines](../../c-runtime-library/debug-routines.md)
+[Debug routines](../debug-routines.md) diff --git a/docs/c-runtime-library/reference/rtc-geterrdesc.md b/docs/c-runtime-library/reference/rtc-geterrdesc.md index 978b40ea921..056478fdb48 100644 --- a/docs/c-runtime-library/reference/rtc-geterrdesc.md +++ b/docs/c-runtime-library/reference/rtc-geterrdesc.md @@ -24,12 +24,12 @@ const char * _RTC_GetErrDesc( ### Parameters -*errnum*
+*`errnum`*\ A number between zero and one less than the value returned by **_RTC_NumErrors**. -## Return Value +## Return value -A character string that contains a short description of one of the error types detected by the run-time error check system. If error is less than zero or greater than or equal to the value returned by [_RTC_NumErrors](rtc-numerrors.md), **_RTC_GetErrDesc** returns **NULL**. +A character string that contains a short description of one of the error types detected by the run-time error check system. If error is less than zero or greater than or equal to the value returned by [`_RTC_NumErrors`](rtc-numerrors.md), **_RTC_GetErrDesc** returns **NULL**. ## Requirements @@ -37,13 +37,13 @@ A character string that contains a short description of one of the error types d |-------------|---------------------| |**_RTC_GetErrDesc**|\| -For more information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more information, see [Compatibility](../compatibility.md). ## Libraries -All versions of the [C run-time libraries](../../c-runtime-library/crt-library-features.md). +All versions of the [C run-time libraries](../crt-library-features.md). ## See also -[_RTC_NumErrors](rtc-numerrors.md)
-[Run-Time Error Checking](../../c-runtime-library/run-time-error-checking.md)
+[`_RTC_NumErrors`](rtc-numerrors.md)\ +[Runtime error checking](../run-time-error-checking.md) diff --git a/docs/c-runtime-library/reference/rtc-numerrors.md b/docs/c-runtime-library/reference/rtc-numerrors.md index adc69743fbc..5f715d59729 100644 --- a/docs/c-runtime-library/reference/rtc-numerrors.md +++ b/docs/c-runtime-library/reference/rtc-numerrors.md @@ -12,7 +12,7 @@ ms.assetid: 7e82adae-38e2-4f8b-bc0b-37bda8109fd1 --- # _RTC_NumErrors -Returns the total number of errors that can be detected by run-time error checks (RTC). You can use this number as the control in a **`for`** loop, where each value in the loop is passed to [_RTC_GetErrDesc](rtc-geterrdesc.md). +Returns the total number of errors that can be detected by run-time error checks (RTC). You can use this number as the control in a **`for`** loop, where each value in the loop is passed to [`_RTC_GetErrDesc`](rtc-geterrdesc.md). ## Syntax @@ -21,7 +21,7 @@ Returns the total number of errors that can be detected by run-time error checks int _RTC_NumErrors( void ); ``` -## Return Value +## Return value An integer whose value represents the total number of errors that can be detected by the Visual C++ run-time error checks. @@ -31,13 +31,13 @@ An integer whose value represents the total number of errors that can be detecte |-------------|---------------------| |**_RTC_NumErrors**|\| -For more information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more information, see [Compatibility](../compatibility.md). ## Libraries -All versions of the [C run-time libraries](../../c-runtime-library/crt-library-features.md). +All versions of the [C run-time libraries](../crt-library-features.md). ## See also -[_RTC_GetErrDesc](rtc-geterrdesc.md)
-[Run-Time Error Checking](../../c-runtime-library/run-time-error-checking.md)
+[`_RTC_GetErrDesc`](rtc-geterrdesc.md)\ +[Runtime error checking](../run-time-error-checking.md) diff --git a/docs/c-runtime-library/reference/rtc-seterrorfunc.md b/docs/c-runtime-library/reference/rtc-seterrorfunc.md index be9e6e6c444..7c582666f59 100644 --- a/docs/c-runtime-library/reference/rtc-seterrorfunc.md +++ b/docs/c-runtime-library/reference/rtc-seterrorfunc.md @@ -24,10 +24,10 @@ _RTC_error_fn _RTC_SetErrorFunc( ### Parameters -*function*
+*`function`*\ The address of the function that will handle run-time error checks. -## Return Value +## Return value The previously defined error function. If there is no previously defined function, returns **NULL**. @@ -41,13 +41,13 @@ Do not use this function; instead, use **_RTC_SetErrorFuncW**. It is retained on |-------------|---------------------| |**_RTC_SetErrorFunc**|\| -For more information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more information, see [Compatibility](../compatibility.md). ## Libraries -All versions of the [C run-time libraries](../../c-runtime-library/crt-library-features.md). +All versions of the [C run-time libraries](../crt-library-features.md). ## See also -[_CrtDbgReport, _CrtDbgReportW](crtdbgreport-crtdbgreportw.md)
-[Run-Time Error Checking](../../c-runtime-library/run-time-error-checking.md)
+[`_CrtDbgReport`, `_CrtDbgReportW`](crtdbgreport-crtdbgreportw.md)\ +[Runtime error checking](../run-time-error-checking.md) diff --git a/docs/c-runtime-library/reference/rtc-seterrorfuncw.md b/docs/c-runtime-library/reference/rtc-seterrorfuncw.md index 28fe0f94e84..16a3a63d370 100644 --- a/docs/c-runtime-library/reference/rtc-seterrorfuncw.md +++ b/docs/c-runtime-library/reference/rtc-seterrorfuncw.md @@ -24,10 +24,10 @@ _RTC_error_fnW _RTC_SetErrorFuncW( ### Parameters -*function*
+*`function`*\ The address of the function that will handle run-time error checks. -## Return Value +## Return value The previously defined error function; or **NULL** if there is no previously defined function. @@ -39,9 +39,9 @@ The **_RTC_SetErrorFuncW** callback applies only to the component that it was li Make sure that the address that you pass to **_RTC_SetErrorFuncW** is that of a valid error handling function. -If an error has been assigned a type of -1 by using [_RTC_SetErrorType](rtc-seterrortype.md), the error handling function is not called. +If an error has been assigned a type of -1 by using [`_RTC_SetErrorType`](rtc-seterrortype.md), the error handling function is not called. -Before you can call this function, you must first call one of the run-time error-check initialization functions. For more information, see [Using Run-Time Checks Without the C Run-Time Library](/visualstudio/debugger/using-run-time-checks-without-the-c-run-time-library). +Before you can call this function, you must first call one of the run-time error-check initialization functions. For more information, see [Using runtime checks without the C runtime library](/visualstudio/debugger/using-run-time-checks-without-the-c-run-time-library). **_RTC_error_fnW** is defined as follows: @@ -57,22 +57,22 @@ typedef int (__cdecl * _RTC_error_fnW)( where: -*errorType*
-The type of error that's specified by [_RTC_SetErrorType](rtc-seterrortype.md). +*`errorType`*\ +The type of error that's specified by [`_RTC_SetErrorType`](rtc-seterrortype.md). -*filename*
+*`filename`*\ The source file where the failure occurred, or null if no debug information is available. -*linenumber*
-The line in *filename* where the failure occurred, or 0 if no debug information is available. +*`linenumber`*\ +The line in *`filename`* where the failure occurred, or 0 if no debug information is available. -*moduleName*
+*`moduleName`*\ The DLL or executable name where the failure occurred. -*format*
+*`format`*\ printf style string to display an error message, using the remaining parameters. The first argument of the VA_ARGLIST is the RTC Error number that occurred. -For an example that shows how to use **_RTC_error_fnW**, see [Native Run-Time Checks Customization](/visualstudio/debugger/native-run-time-checks-customization). +For an example that shows how to use **_RTC_error_fnW**, see [Native runtime checks customization](/visualstudio/debugger/native-run-time-checks-customization). ## Requirements @@ -80,13 +80,13 @@ For an example that shows how to use **_RTC_error_fnW**, see [Native Run-Time Ch |-------------|---------------------| |**_RTC_SetErrorFuncW**|\| -For more information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more information, see [Compatibility](../compatibility.md). ## Libraries -All versions of the [C run-time libraries](../../c-runtime-library/crt-library-features.md). +All versions of the [C run-time libraries](../crt-library-features.md). ## See also -[_CrtDbgReport, _CrtDbgReportW](crtdbgreport-crtdbgreportw.md)
-[Run-Time Error Checking](../../c-runtime-library/run-time-error-checking.md)
+[`_CrtDbgReport`, `_CrtDbgReportW`](crtdbgreport-crtdbgreportw.md)\ +[Runtime error checking](../run-time-error-checking.md) diff --git a/docs/c-runtime-library/reference/rtc-seterrortype.md b/docs/c-runtime-library/reference/rtc-seterrortype.md index 67c47077342..9d06184d2a1 100644 --- a/docs/c-runtime-library/reference/rtc-seterrortype.md +++ b/docs/c-runtime-library/reference/rtc-seterrortype.md @@ -25,23 +25,23 @@ int _RTC_SetErrorType( ### Parameters -*errnum*
-A number between zero and one less than the value returned by [_RTC_NumErrors](rtc-numerrors.md). +*`errnum`*\ +A number between zero and one less than the value returned by [`_RTC_NumErrors`](rtc-numerrors.md). -*ErrType*
-A value to assign to this *errnum*. For example, you might use **_CRT_ERROR**. If you are using **_CrtDbgReport** as your error handler, *ErrType* can only be one of the symbols defined in [_CrtSetReportMode](crtsetreportmode.md). If you have your own error handler ([_RTC_SetErrorFunc](rtc-seterrorfunc.md)), you can have as many *ErrType*s as there are *errnum*s. +*`ErrType`*\ +A value to assign to this *`errnum`*. For example, you might use **_CRT_ERROR**. If you are using **_CrtDbgReport** as your error handler, *`ErrType`* can only be one of the symbols defined in [`_CrtSetReportMode`](crtsetreportmode.md). If you have your own error handler ([`_RTC_SetErrorFunc`](rtc-seterrorfunc.md)), you can have as many *`ErrType`* values as there are *`errnum`* values. -An *ErrType* of _RTC_ERRTYPE_IGNORE has special meaning to **_CrtSetReportMode**; the error is ignored. +An *`ErrType`* of _RTC_ERRTYPE_IGNORE has special meaning to **_CrtSetReportMode**; the error is ignored. -## Return Value +## Return value -The previous value for the error type *type*. +The previous value for the error type replaced by *`ErrType`*. ## Remarks -By default, all errors are set to *ErrType* = 1, which corresponds to **_CRT_ERROR**. For more information about the default error types such as **_CRT_ERROR**, see [_CrtDbgReport](crtdbgreport-crtdbgreportw.md). +By default, all errors are set to *`ErrType`* = 1, which corresponds to **_CRT_ERROR**. For more information about the default error types such as **_CRT_ERROR**, see [`_CrtDbgReport`](crtdbgreport-crtdbgreportw.md). -Before you can call this function, you must first call one of the run-time error check initialization functions; see [Using Run-Time Checks without the C Run-Time Library](/visualstudio/debugger/using-run-time-checks-without-the-c-run-time-library) +Before you can call this function, you must first call one of the run-time error check initialization functions; see [Using runtime checks without the C runtime library](/visualstudio/debugger/using-run-time-checks-without-the-c-run-time-library) ## Requirements @@ -49,13 +49,13 @@ Before you can call this function, you must first call one of the run-time error |-------------|---------------------| |**_RTC_SetErrorType**|\| -For more information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more information, see [Compatibility](../compatibility.md). ## Libraries -All versions of the [C run-time libraries](../../c-runtime-library/crt-library-features.md). +All versions of the [C run-time libraries](../crt-library-features.md). ## See also -[_RTC_GetErrDesc](rtc-geterrdesc.md)
-[Run-Time Error Checking](../../c-runtime-library/run-time-error-checking.md)
+[`_RTC_GetErrDesc`](rtc-geterrdesc.md)\ +[Runtime error checking](../run-time-error-checking.md) diff --git a/docs/c-runtime-library/reference/scalb.md b/docs/c-runtime-library/reference/scalb.md index 9670d8656a7..060a4cde1a7 100644 --- a/docs/c-runtime-library/reference/scalb.md +++ b/docs/c-runtime-library/reference/scalb.md @@ -34,11 +34,11 @@ Double-precision, floating-point value. *`exp`*\ Long integer exponent. -## Return Value +## Return value Returns an exponential value if successful. On overflow (depending on the sign of *`x`*), **`_scalb`** returns +/- **`HUGE_VAL`**; the **`errno`** variable is set to **`ERANGE`**. -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 @@ -52,9 +52,9 @@ By default, this function's global state is scoped to the application. To change |-------------|---------------------| |**`_scalb`**, **`_scalbf`**|``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Floating-Point Support](../../c-runtime-library/floating-point-support.md)\ +[Math and floating-point support](../floating-point-support.md)\ [`ldexp`](ldexp.md) diff --git a/docs/c-runtime-library/reference/scalbn-scalbnf-scalbnl-scalbln-scalblnf-scalblnl.md b/docs/c-runtime-library/reference/scalbn-scalbnf-scalbnl-scalbln-scalblnf-scalblnl.md index 307f8f2fa51..a896d388189 100644 --- a/docs/c-runtime-library/reference/scalbn-scalbnf-scalbnl-scalbln-scalblnf-scalblnl.md +++ b/docs/c-runtime-library/reference/scalbn-scalbnf-scalbnl-scalbln-scalblnf-scalblnl.md @@ -68,25 +68,25 @@ long double scalbln( ### Parameters -*x*\ +*`x`*\ Floating-point value. -*exp*\ +*`exp`*\ Integer exponent. -## Return Value +## Return value -The **scalbn** functions return the value of *x* \* **FLT_RADIX**exp when successful. On overflow (depending on the sign of *x*), **scalbn** returns +/- **HUGE_VAL**; the **errno** value is set to **ERANGE**. +The **scalbn** functions return the value of *`x`* \* **FLT_RADIX**exp when successful. On overflow (depending on the sign of *`x`*), **scalbn** returns +/- **HUGE_VAL**; the **errno** value is set to **ERANGE**. -For more information about **errno** and possible error return values, see [errno, _doserrno, _sys_errlist, and _sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +For more information about **errno** and possible error return values, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks -**FLT_RADIX** is defined in \ as the native floating-point radix; on binary systems, it has a value of 2, and **scalbn** is equivalent to [ldexp](ldexp.md). +**FLT_RADIX** is defined in \ as the native floating-point radix; on binary systems, it has a value of 2, and **scalbn** is equivalent to [`ldexp`](ldexp.md). Because C++ allows overloading, you can call overloads of **scalbn** and **scalbln** that take and return **`float`** or **`long double`** types. In a C program, unless you're using the \ macro to call this function, **scalbn** always takes a **`double`** and an **`int`** and returns a **`double`**, and **scalbln** always takes a **`double`** and a **`long`** and returns a **`double`**. -If you use the \ `scalbn()` or `scalbln` macros, the type of the argument determines which version of the function is selected. See [Type-generic math](../../c-runtime-library/tgmath.md) for details. +If you use the \ `scalbn()` or `scalbln` macros, the type of the argument determines which version of the function is selected. See [Type-generic math](../tgmath.md) for details. 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). @@ -97,7 +97,7 @@ By default, this function's global state is scoped to the application. To change |**scalbn**, **scalbnf**, **scalbnl**, **scalbln**, **scalblnf**, **scalblnl**|\|\| |**scalbn() or scalbln** macro | \ || -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -125,7 +125,7 @@ int main( void ) ## See also -[Floating-Point Support](../../c-runtime-library/floating-point-support.md)
-[frexp](frexp.md)
-[ldexp](ldexp.md)
-[modf, modff, modfl](modf-modff-modfl.md)
+[Math and floating-point support](../floating-point-support.md)\ +[`frexp`](frexp.md)\ +[`ldexp`](ldexp.md)\ +[`modf`, `modff`, `modfl`](modf-modff-modfl.md) diff --git a/docs/c-runtime-library/reference/scanf-s-scanf-s-l-wscanf-s-wscanf-s-l.md b/docs/c-runtime-library/reference/scanf-s-scanf-s-l-wscanf-s-wscanf-s-l.md index 6b195b043a7..b9ed187e1dd 100644 --- a/docs/c-runtime-library/reference/scanf-s-scanf-s-l-wscanf-s-wscanf-s-l.md +++ b/docs/c-runtime-library/reference/scanf-s-scanf-s-l-wscanf-s-wscanf-s-l.md @@ -12,7 +12,7 @@ ms.assetid: 42cafcf7-52d6-404a-80e4-b056a7faf2e5 --- # `scanf_s`, `_scanf_s_l`, `wscanf_s`, `_wscanf_s_l` -Reads formatted data from the standard input stream. These versions of [`scanf`, `_scanf_l`, `wscanf`, `_wscanf_l`](scanf-scanf-l-wscanf-wscanf-l.md) have security enhancements, as described in [Security Features in the CRT](../../c-runtime-library/security-features-in-the-crt.md). +Reads formatted data from the standard input stream. These versions of [`scanf`, `_scanf_l`, `wscanf`, `_wscanf_l`](scanf-scanf-l-wscanf-wscanf-l.md) have security enhancements, as described in [Security features in the CRT](../security-features-in-the-crt.md). ## Syntax @@ -39,26 +39,26 @@ int _wscanf_s_l( ### Parameters -*`format`*
+*`format`*\ Format control string. -*`argument`*
+*`argument`*\ Optional arguments. -*`locale`*
+*`locale`*\ The locale to use. -## Return Value +## Return value -Returns the number of fields successfully converted and assigned. The return value doesn't include fields that were read but not assigned. A return value of 0 indicates no fields were assigned. The return value is **EOF** for an error, or if the end-of-file character or the end-of-string character is found in the first attempt to read a character. If *format* is a **`NULL`** pointer, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, **`scanf_s`** and **`wscanf_s`** return **EOF** and set **`errno`** to **`EINVAL`**. +Returns the number of fields successfully converted and assigned. The return value doesn't include fields that were read but not assigned. A return value of 0 indicates no fields were assigned. The return value is **EOF** for an error, or if the end-of-file character or the end-of-string character is found in the first attempt to read a character. If *`format`* is a **`NULL`** pointer, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, **`scanf_s`** and **`wscanf_s`** return **EOF** and set **`errno`** to **`EINVAL`**. -For information about these and other error codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +For information about these and other error codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks The **`scanf_s`** function reads data from the standard input stream, **`stdin`**, and writes it into *`argument`*. Each *`argument`* must be a pointer to a variable type that corresponds to the type specifier in *`format`*. If copying occurs between strings that overlap, the behavior is undefined. -**`wscanf_s`** is a wide-character version of **`scanf_s`**; the *format* argument to **`wscanf_s`** is a wide-character string. **`wscanf_s`** and **`scanf_s`** behave identically if the stream is opened in ANSI mode. **`scanf_s`** doesn't currently support input from a UNICODE stream. +**`wscanf_s`** is a wide-character version of **`scanf_s`**; the *`format`* argument to **`wscanf_s`** is a wide-character string. **`wscanf_s`** and **`scanf_s`** behave identically if the stream is opened in ANSI mode. **`scanf_s`** doesn't currently support input from a UNICODE stream. The versions of these functions that have the **_l** suffix are identical, except they use the *`locale`* parameter instead of the current thread locale. @@ -97,16 +97,16 @@ char c[4]; scanf_s("%4c", c, (unsigned)_countof(c)); // not null terminated ``` -For more information, see [`scanf` Width Specification](../../c-runtime-library/scanf-width-specification.md). +For more information, see [`scanf` Width Specification](../scanf-width-specification.md). -### Generic-Text Routine Mappings +### Generic-text routine mappings |`TCHAR.H` routine|`_UNICODE` & `_MBCS` not defined|`_MBCS` defined|`_UNICODE` defined| |---------------------|------------------------------------|--------------------|-----------------------| |**`_tscanf_s`**|**`scanf_s`**|**`scanf_s`**|**`wscanf_s`**| |**`_tscanf_s_l`**|**`_scanf_s_l`**|**`_scanf_s_l`**|**`_wscanf_s_l`**| -For more information, see [Format Specification Fields: `scanf` and `wscanf` Functions](../../c-runtime-library/format-specification-fields-scanf-and-wscanf-functions.md). +For more information, see [Format specification fields: `scanf` and `wscanf` functions](../format-specification-fields-scanf-and-wscanf-functions.md). ## Requirements @@ -115,7 +115,7 @@ For more information, see [Format Specification Fields: `scanf` and `wscanf` Fun |**`scanf_s`**, **`_scanf_s_l`**|``| |**`wscanf_s`**, **`_wscanf_s_l`**|`` or ``| -The console isn't supported in Universal Windows Platform (UWP) apps. The standard stream handles **`stdin`**, **`stdout`**, and **`stderr`** must be redirected before C run-time functions can use them in UWP apps. For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +The console isn't supported in Universal Windows Platform (UWP) apps. The standard stream handles **`stdin`**, **`stdout`**, and **`stderr`** must be redirected before C run-time functions can use them in UWP apps. For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -166,10 +166,10 @@ The contents are: 36 92.300003 y n Wide characters ## See also -[Floating-Point Support](../../c-runtime-library/floating-point-support.md)
-[Stream I/O](../../c-runtime-library/stream-i-o.md)
-[Locale](../../c-runtime-library/locale.md)
-[`fscanf`, `_fscanf_l`, `fwscanf`, `_fwscanf_l`](fscanf-fscanf-l-fwscanf-fwscanf-l.md)
-[`printf`, `_printf_l`, `wprintf`, `_wprintf_l`](printf-printf-l-wprintf-wprintf-l.md)
-[`sprintf`, `_sprintf_l`, `swprintf`, `_swprintf_l`, `__swprintf_l`](sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md)
-[`sscanf`, `_sscanf_l`, `swscanf`, `_swscanf_l`](sscanf-sscanf-l-swscanf-swscanf-l.md)
+[Math and floating-point support](../floating-point-support.md)\ +[Stream I/O](../stream-i-o.md)\ +[Locale](../locale.md)\ +[`fscanf`, `_fscanf_l`, `fwscanf`, `_fwscanf_l`](fscanf-fscanf-l-fwscanf-fwscanf-l.md)\ +[`printf`, `_printf_l`, `wprintf`, `_wprintf_l`](printf-printf-l-wprintf-wprintf-l.md)\ +[`sprintf`, `_sprintf_l`, `swprintf`, `_swprintf_l`, `__swprintf_l`](sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md)\ +[`sscanf`, `_sscanf_l`, `swscanf`, `_swscanf_l`](sscanf-sscanf-l-swscanf-swscanf-l.md) diff --git a/docs/c-runtime-library/reference/scanf-scanf-l-wscanf-wscanf-l.md b/docs/c-runtime-library/reference/scanf-scanf-l-wscanf-wscanf-l.md index 738a9c991d4..f77649624c7 100644 --- a/docs/c-runtime-library/reference/scanf-scanf-l-wscanf-wscanf-l.md +++ b/docs/c-runtime-library/reference/scanf-scanf-l-wscanf-wscanf-l.md @@ -15,7 +15,7 @@ ms.assetid: 73eac607-117f-4be4-9ff0-4afd9cf3c848 Reads formatted data from the standard input stream. More secure versions of these function are available; see [`scanf_s`, `_scanf_s_l`, `wscanf_s`, `_wscanf_s_l`](scanf-s-scanf-s-l-wscanf-s-wscanf-s-l.md). > [!NOTE] -> In Visual Studio 2015 The `printf` and `scanf` family of functions were declared as **`inline`** and moved to the `` and `` headers. If you are migrating older code you might see *LNK2019* in connection with these functions. For more information, see [Visual C++ change history 2003 - 2015](../../porting/visual-cpp-change-history-2003-2015.md#stdio_and_conio). +> In Visual Studio 2015 The `printf` and `scanf` family of functions were declared as **`inline`** and moved to the `` and `` headers. If you are migrating older code you might see Linker Error LNK2019 in connection with these functions. For more information, see [Visual C++ change history 2003 - 2015](../../porting/visual-cpp-change-history-2003-2015.md#stdio_and_conio). ## Syntax @@ -42,22 +42,22 @@ int _wscanf_l( ### Parameters -*`format`*
+*`format`*\ Format control string. -*`argument`*
+*`argument`*\ Optional arguments. -*`locale`*
+*`locale`*\ The locale to use. -## Return Value +## Return value Returns the number of fields successfully converted and assigned; the return value does not include fields that were read but not assigned. A return value of 0 indicates that no fields were assigned. -If *`format`* is a **`NULL`** pointer, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, these functions return **`EOF`** and set **`errno`** to **`EINVAL`**. +If *`format`* is a **`NULL`** pointer, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, these functions return **`EOF`** and set **`errno`** to **`EINVAL`**. -For information on these and other error codes, see [`_doserrno`, `errno`, `_sys_errlist`, and `_sys_nerr`](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +For information on these and other error codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks @@ -70,14 +70,14 @@ The **`scanf`** function reads data from the standard input stream **`stdin`** a The versions of these functions with the **`_l`** suffix are identical except that they use the locale parameter passed in instead of the current thread locale. -### Generic-Text Routine Mappings +### Generic-text routine mappings |`TCHAR.H` routine|`_UNICODE` & `_MBCS` not defined|`_MBCS` defined|`_UNICODE` defined| |---------------------|------------------------------------|--------------------|-----------------------| |**`_tscanf`**|**`scanf`**|**`scanf`**|**`wscanf`**| |**`_tscanf_l`**|**`_scanf_l`**|**`_scanf_l`**|**`_wscanf_l`**| -For more information, see [Format Specification Fields — scanf functions and wscanf Functions](../../c-runtime-library/format-specification-fields-scanf-and-wscanf-functions.md). +For more information, see [Format specification fields: `scanf` and `wscanf` functions](../format-specification-fields-scanf-and-wscanf-functions.md). ## Requirements @@ -86,7 +86,7 @@ For more information, see [Format Specification Fields — scanf functions and w |**`scanf`**, *`*_scanf_l`**|``| |**`wscanf`**, **`_wscanf_l`**|`` or ``| -The console is not supported in Universal Windows Platform (UWP) apps. The standard stream handles that are associated with the console, **`stdin`**, **`stdout`**, and **`stderr`**, must be redirected before C run-time functions can use them in UWP apps. For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +The console is not supported in Universal Windows Platform (UWP) apps. The standard stream handles that are associated with the console, **`stdin`**, **`stdout`**, and **`stderr`**, must be redirected before C run-time functions can use them in UWP apps. For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -128,10 +128,10 @@ The contents are: 36 92.300003 y n Wide characters ## See also -[Floating-Point Support](../../c-runtime-library/floating-point-support.md)
-[Stream I/O](../../c-runtime-library/stream-i-o.md)
-[Locale](../../c-runtime-library/locale.md)
-[`fscanf`, `_fscanf_l`, `fwscanf`, `_fwscanf_l`](fscanf-fscanf-l-fwscanf-fwscanf-l.md)
-[`printf`, `_printf_l`, `wprintf`, `_wprintf_l`](printf-printf-l-wprintf-wprintf-l.md)
-[`sprintf`, `_sprintf_l`, `swprintf`, `_swprintf_l`, `__swprintf_l`](sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md)
-[`sscanf`, `_sscanf_l`, `swscanf`, `_swscanf_l`](sscanf-sscanf-l-swscanf-swscanf-l.md)
+[Math and floating-point support](../floating-point-support.md)\ +[Stream I/O](../stream-i-o.md)\ +[Locale](../locale.md)\ +[`fscanf`, `_fscanf_l`, `fwscanf`, `_fwscanf_l`](fscanf-fscanf-l-fwscanf-fwscanf-l.md)\ +[`printf`, `_printf_l`, `wprintf`, `_wprintf_l`](printf-printf-l-wprintf-wprintf-l.md)\ +[`sprintf`, `_sprintf_l`, `swprintf`, `_swprintf_l`, `__swprintf_l`](sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md)\ +[`sscanf`, `_sscanf_l`, `swscanf`, `_swscanf_l`](sscanf-sscanf-l-swscanf-swscanf-l.md) diff --git a/docs/c-runtime-library/reference/scprintf-p-scprintf-p-l-scwprintf-p-scwprintf-p-l.md b/docs/c-runtime-library/reference/scprintf-p-scprintf-p-l-scwprintf-p-scwprintf-p-l.md index 2303645c16c..7c9385ad190 100644 --- a/docs/c-runtime-library/reference/scprintf-p-scprintf-p-l-scwprintf-p-scwprintf-p-l.md +++ b/docs/c-runtime-library/reference/scprintf-p-scprintf-p-l-scwprintf-p-scwprintf-p-l.md @@ -38,38 +38,37 @@ int _scwprintf_p _l( ### Parameters -*format*
+*`format`*\ Format-control string. -*argument*
+*`argument`*\ Optional arguments. -*locale*
+*`locale`*\ The locale to use. -## Return Value +## Return value Returns the number of characters that would be generated if the string were to be printed or sent to a file or buffer using the specified formatting codes. The value returned does not include the terminating null character. **_scwprintf_p** performs the same function for wide characters. -The difference between **_scprintf_p** and **_scprintf** is that **_scprintf_p** supports positional parameters, which allows specifying the order in which the arguments are used in the format string. For more information, see [printf_p Positional Parameters](../../c-runtime-library/printf-p-positional-parameters.md). +The difference between **_scprintf_p** and **_scprintf** is that **_scprintf_p** supports positional parameters, which allows specifying the order in which the arguments are used in the format string. For more information, see [printf_p Positional Parameters](../printf-p-positional-parameters.md). -If *format* is a **NULL** pointer, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, these functions return -1 and set **errno** to **EINVAL**. +If *`format`* is a **NULL** pointer, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, these functions return -1 and set **errno** to **EINVAL**. -For information about these and other error codes, see [_doserrno, errno, _sys_errlist, and _sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +For information about these and other error codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks -Each *argument* (if any) is converted according to the corresponding format specification in *format*. The format consists of ordinary characters and has the same form and function as the *format* argument for [printf](printf-printf-l-wprintf-wprintf-l.md). +Each *`argument`* (if any) is converted according to the corresponding format specification in *`format`*. The format consists of ordinary characters and has the same form and function as the *`format`* argument for [`printf`](printf-printf-l-wprintf-wprintf-l.md). The versions of these functions with the **_l** suffix are identical except that they use the locale parameter passed in instead of the current thread locale. > [!IMPORTANT] -> Ensure that *format* is not a user-defined string. -> +> Ensure that *`format`* is not a user-defined string. > > Starting in Windows 10 version 2004 (build 19041), the `printf` family of functions prints exactly representable floating point numbers according to the IEEE 754 rules for rounding. In previous versions of Windows, exactly representable floating point numbers ending in '5' would always round up. IEEE 754 states that they must round to the closest even digit (also known as "Banker's Rounding"). For example, both `printf("%1.0f", 1.5)` and `printf("%1.0f", 2.5)` should round to 2. Previously, 1.5 would round to 2 and 2.5 would round to 3. This change only affects exactly representable numbers. For example, 2.35 (which, when represented in memory, is closer to 2.35000000000000008) continues to round up to 2.4. Rounding done by these functions now also respects the floating point rounding mode set by [`fesetround`](fegetround-fesetround2.md). Previously, rounding always chose `FE_TONEAREST` behavior. This change only affects programs built using Visual Studio 2019 version 16.2 and later. To use the legacy floating point rounding behavior, link with ['legacy_stdio_float_rounding.obj`](../link-options.md). -### Generic-Text Routine Mappings +### Generic-text routine mappings |Tchar.h routine|_UNICODE and _MBCS not defined|_MBCS defined|_UNICODE defined| |---------------------|--------------------------------------|--------------------|-----------------------| @@ -83,10 +82,10 @@ The versions of these functions with the **_l** suffix are identical except that |**_scprintf_p**, **_scprintf_p_l**|\| |**_scwprintf_p**, **_scwprintf_p_l**|\ or \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Stream I/O](../../c-runtime-library/stream-i-o.md)
-[_scprintf, _scprintf_l, _scwprintf, _scwprintf_l](scprintf-scprintf-l-scwprintf-scwprintf-l.md)
-[_printf_p, _printf_p_l, _wprintf_p, _wprintf_p_l](printf-p-printf-p-l-wprintf-p-wprintf-p-l.md)
+[Stream I/O](../stream-i-o.md)\ +[`_scprintf`, `_scprintf_l`, `_scwprintf`, `_scwprintf_l`](scprintf-scprintf-l-scwprintf-scwprintf-l.md)\ +[`_printf_p`, `_printf_p_l`, `_wprintf_p`, `_wprintf_p_l`](printf-p-printf-p-l-wprintf-p-wprintf-p-l.md) diff --git a/docs/c-runtime-library/reference/scprintf-scprintf-l-scwprintf-scwprintf-l.md b/docs/c-runtime-library/reference/scprintf-scprintf-l-scwprintf-scwprintf-l.md index c05c00ba7a0..2e1b8218564 100644 --- a/docs/c-runtime-library/reference/scprintf-scprintf-l-scwprintf-scwprintf-l.md +++ b/docs/c-runtime-library/reference/scprintf-scprintf-l-scwprintf-scwprintf-l.md @@ -38,38 +38,37 @@ int _scwprintf_l( ### Parameters -*format*
+*`format`*\ Format-control string. -*argument*
+*`argument`*\ Optional arguments. -*locale*
+*`locale`*\ The locale to use. -For more information, see [Format Specifications](../../c-runtime-library/format-specification-syntax-printf-and-wprintf-functions.md). +For more information, see [Format specification syntax](../format-specification-syntax-printf-and-wprintf-functions.md). -## Return Value +## Return value Returns the number of characters that would be generated if the string were to be printed or sent to a file or buffer using the specified formatting codes. The value returned does not include the terminating null character. **_scwprintf** performs the same function for wide characters. -If *format* is a **NULL** pointer, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, these functions return -1 and set **errno** to **EINVAL**. +If *`format`* is a **NULL** pointer, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, these functions return -1 and set **errno** to **EINVAL**. -For information about these and other error codes, see [_doserrno, errno, _sys_errlist, and _sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +For information about these and other error codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks -Each *argument* (if any) is converted according to the corresponding format specification in *format*. The format consists of ordinary characters and has the same form and function as the *format* argument for [printf](printf-printf-l-wprintf-wprintf-l.md). +Each *`argument`* (if any) is converted according to the corresponding format specification in *`format`*. The format consists of ordinary characters and has the same form and function as the *`format`* argument for [`printf`](printf-printf-l-wprintf-wprintf-l.md). The versions of these functions with the **_l** suffix are identical except that they use the locale parameter passed in instead of the current thread locale. > [!IMPORTANT] -> Ensure that *format* is not a user-defined string. -> +> Ensure that *`format`* is not a user-defined string. > > Starting in Windows 10 version 2004 (build 19041), the `printf` family of functions prints exactly representable floating point numbers according to the IEEE 754 rules for rounding. In previous versions of Windows, exactly representable floating point numbers ending in '5' would always round up. IEEE 754 states that they must round to the closest even digit (also known as "Banker's Rounding"). For example, both `printf("%1.0f", 1.5)` and `printf("%1.0f", 2.5)` should round to 2. Previously, 1.5 would round to 2 and 2.5 would round to 3. This change only affects exactly representable numbers. For example, 2.35 (which, when represented in memory, is closer to 2.35000000000000008) continues to round up to 2.4. Rounding done by these functions now also respects the floating point rounding mode set by [`fesetround`](fegetround-fesetround2.md). Previously, rounding always chose `FE_TONEAREST` behavior. This change only affects programs built using Visual Studio 2019 version 16.2 and later. To use the legacy floating point rounding behavior, link with ['legacy_stdio_float_rounding.obj`](../link-options.md). -### Generic-Text Routine Mappings +### Generic-text routine mappings |Tchar.h routine|_UNICODE and _MBCS not defined|_MBCS defined|_UNICODE defined| |---------------------|--------------------------------------|--------------------|-----------------------| @@ -83,7 +82,7 @@ The versions of these functions with the **_l** suffix are identical except that |**_scprintf**, **_scprintf_l**|\| |**_scwprintf**, **_scwprintf_l**|\ or \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -122,9 +121,9 @@ The value of Pi is calculated to be 3.141593. ## See also -[Stream I/O](../../c-runtime-library/stream-i-o.md)
-[fprintf, _fprintf_l, fwprintf, _fwprintf_l](fprintf-fprintf-l-fwprintf-fwprintf-l.md)
-[printf, _printf_l, wprintf, _wprintf_l](printf-printf-l-wprintf-wprintf-l.md)
-[scanf, _scanf_l, wscanf, _wscanf_l](scanf-scanf-l-wscanf-wscanf-l.md)
-[sscanf, _sscanf_l, swscanf, _swscanf_l](sscanf-sscanf-l-swscanf-swscanf-l.md)
-[vprintf Functions](../../c-runtime-library/vprintf-functions.md)
+[Stream I/O](../stream-i-o.md)\ +[`fprintf`, `_fprintf_l`, `fwprintf`, `_fwprintf_l`](fprintf-fprintf-l-fwprintf-fwprintf-l.md)\ +[`printf`, `_printf_l`, `wprintf`, `_wprintf_l`](printf-printf-l-wprintf-wprintf-l.md)\ +[`scanf`, `_scanf_l`, `wscanf`, `_wscanf_l`](scanf-scanf-l-wscanf-wscanf-l.md)\ +[`sscanf`, `_sscanf_l`, `swscanf`, `_swscanf_l`](sscanf-sscanf-l-swscanf-swscanf-l.md)\ +[`vprintf` functions](../vprintf-functions.md) diff --git a/docs/c-runtime-library/reference/searchenv-s-wsearchenv-s.md b/docs/c-runtime-library/reference/searchenv-s-wsearchenv-s.md index f855c38847f..8ce34977f4c 100644 --- a/docs/c-runtime-library/reference/searchenv-s-wsearchenv-s.md +++ b/docs/c-runtime-library/reference/searchenv-s-wsearchenv-s.md @@ -12,7 +12,7 @@ ms.assetid: 47f9fc29-250e-4c09-b52e-9e9f0ef395ca --- # _searchenv_s, _wsearchenv_s -Searches for a file by using environment paths. These versions of [_searchenv, _wsearchenv](searchenv-wsearchenv.md) have security enhancements, as described in [Security Features in the CRT](../../c-runtime-library/security-features-in-the-crt.md). +Searches for a file by using environment paths. These versions of [`_searchenv`, `_wsearchenv`](searchenv-wsearchenv.md) have security enhancements, as described in [Security features in the CRT](../security-features-in-the-crt.md). > [!IMPORTANT] > This API cannot be used in applications that execute in the Windows Runtime. For more information, see [CRT functions not supported in Universal Windows Platform apps](../../cppcx/crt-functions-not-supported-in-universal-windows-platform-apps.md). @@ -48,49 +48,49 @@ errno_t _wsearchenv_s( ### Parameters -*filename*
+*`filename`*\ Name of the file to search for. -*varname*
+*`varname`*\ Environment to search. -*pathname*
+*`pathname`*\ Buffer to store the complete path. -*numberOfElements*
-Size of the *pathname* buffer. +*`numberOfElements`*\ +Size of the *`pathname`* buffer. -## Return Value +## Return value Zero if successful; an error code on failure. -If *filename* is an empty string, the return value is **ENOENT**. +If *`filename`* is an empty string, the return value is **ENOENT**. -### Error Conditions +### Error conditions -|*filename*|*varname*|*pathname*|*numberOfElements*|Return value|Contents of *pathname*| +|*`filename`*|*`varname`*|*`pathname`*|*`numberOfElements`*|Return value|Contents of *`pathname`*| |----------------|---------------|----------------|------------------------|------------------|----------------------------| |any|any|**NULL**|any|**EINVAL**|n/a| |**NULL**|any|any|any|**EINVAL**|not changed| |any|any|any|<= 0|**EINVAL**|not changed| -If any of these error conditions occurs, the invalid parameter handler is invoked, 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 **EINVAL**. +If any of these error conditions occurs, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, these functions set **errno** to **EINVAL** and return **EINVAL**. ## Remarks -The **_searchenv_s** routine searches for the target file in the specified domain. The *varname* variable can be any environment or user-defined variable that specifies a list of directory paths, such as **PATH**, **LIB**, and **INCLUDE**. Because **_searchenv_s** is case-sensitive, *varname* should match the case of the environment variable. If *varname* does not match the name of an environment variable defined in the process's environment, the function returns zero and the *pathname* variable is unchanged. +The **_searchenv_s** routine searches for the target file in the specified domain. The *`varname`* variable can be any environment or user-defined variable that specifies a list of directory paths, such as **PATH**, **LIB**, and **INCLUDE**. Because **_searchenv_s** is case-sensitive, *`varname`* should match the case of the environment variable. If *`varname`* does not match the name of an environment variable defined in the process's environment, the function returns zero and the *`pathname`* variable is unchanged. -The routine searches first for the file in the current working directory. If it does not find the file, it looks next through the directories specified by the environment variable. If the target file is in one of those directories, the newly created path is copied into *pathname*. If the *filename* file is not found, *pathname* contains an empty null-terminated string. +The routine searches first for the file in the current working directory. If it does not find the file, it looks next through the directories specified by the environment variable. If the target file is in one of those directories, the newly created path is copied into *`pathname`*. If the *`filename`* file is not found, *`pathname`* contains an empty null-terminated string. -The *pathname* buffer should be at least **_MAX_PATH** characters long to accommodate the full length of the constructed path name. Otherwise, **_searchenv_s** might overrun the *pathname* buffer resulting in unexpected behavior. +The *`pathname`* buffer should be at least **_MAX_PATH** characters long to accommodate the full length of the constructed path name. Otherwise, **_searchenv_s** might overrun the *`pathname`* buffer resulting in unexpected behavior. **_wsearchenv_s** is a wide-character version of **_searchenv_s**; the arguments to **_wsearchenv_s** are wide-character strings. **_wsearchenv_s** and **_searchenv_s** behave identically otherwise. -In C++, using these functions is simplified by template overloads; the overloads can infer buffer length automatically (eliminating the need to specify a size argument) and they can automatically replace older, non-secure functions with their newer, secure counterparts. For more information, see [Secure Template Overloads](../../c-runtime-library/secure-template-overloads.md). +In C++, using these functions is simplified by template overloads; the overloads can infer buffer length automatically (eliminating the need to specify a size argument) and they can automatically replace older, non-secure functions with their newer, secure counterparts. For more information, see [Secure template overloads](../secure-template-overloads.md). 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| |---------------------|--------------------------------------|--------------------|-----------------------| @@ -103,7 +103,7 @@ By default, this function's global state is scoped to the application. To change |**_searchenv_s**|\| |**_wsearchenv_s**|\ or \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -143,7 +143,7 @@ C:\Program Files\Microsoft Visual Studio 2010\VC\BIN\CL.EXE ## See also -[Directory Control](../../c-runtime-library/directory-control.md)
-[_searchenv, _wsearchenv](searchenv-wsearchenv.md)
-[getenv, _wgetenv](getenv-wgetenv.md)
-[_putenv, _wputenv](putenv-wputenv.md)
+[Directory control](../directory-control.md)\ +[`_searchenv`, `_wsearchenv`](searchenv-wsearchenv.md)\ +[`getenv`, `_wgetenv`](getenv-wgetenv.md)\ +[`_putenv`, `_wputenv`](putenv-wputenv.md) diff --git a/docs/c-runtime-library/reference/searchenv-wsearchenv.md b/docs/c-runtime-library/reference/searchenv-wsearchenv.md index 4ca6f51824a..1a276fa14ae 100644 --- a/docs/c-runtime-library/reference/searchenv-wsearchenv.md +++ b/docs/c-runtime-library/reference/searchenv-wsearchenv.md @@ -12,7 +12,7 @@ ms.assetid: 9c944a27-d326-409b-aee6-410e8762d9d3 --- # _searchenv, _wsearchenv -Uses environment paths to search for a file. More secure versions of these functions are available; see [_searchenv_s, _wsearchenv_s](searchenv-s-wsearchenv-s.md). +Uses environment paths to search for a file. More secure versions of these functions are available; see [`_searchenv_s`, `_wsearchenv_s`](searchenv-s-wsearchenv-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). @@ -46,36 +46,36 @@ void _wsearchenv( ### Parameters -*filename*
+*`filename`*\ Name of the file to search for. -*varname*
+*`varname`*\ Environment to search. -*pathname*
+*`pathname`*\ Buffer to store the complete path. ## Remarks -The **_searchenv** routine searches for the target file in the specified domain. The *varname* variable can be any environment or user-defined variable—for example, **PATH**, **LIB**, or **INCLUDE**—that specifies a list of directory paths. Because **_searchenv** is case-sensitive, *varname* should match the case of the environment variable. +The **_searchenv** routine searches for the target file in the specified domain. The *`varname`* variable can be any environment or user-defined variable—for example, **PATH**, **LIB**, or **INCLUDE**—that specifies a list of directory paths. Because **_searchenv** is case-sensitive, *`varname`* should match the case of the environment variable. -The routine first searches for the file in the current working directory. If it does not find the file, it looks through the directories that are specified by the environment variable. If the target file is in one of those directories, the newly created path is copied into *pathname*. If the *filename* file is not found, *pathname* contains an empty null-terminated string. +The routine first searches for the file in the current working directory. If it does not find the file, it looks through the directories that are specified by the environment variable. If the target file is in one of those directories, the newly created path is copied into *`pathname`*. If the *`filename`* file is not found, *`pathname`* contains an empty null-terminated string. -The *pathname* buffer should be at least **_MAX_PATH** characters long to accommodate the full length of the constructed path name. Otherwise, **_searchenv** might overrun the *pathname* buffer and cause unexpected behavior. +The *`pathname`* buffer should be at least **_MAX_PATH** characters long to accommodate the full length of the constructed path name. Otherwise, **_searchenv** might overrun the *`pathname`* buffer and cause unexpected behavior. **_wsearchenv** is a wide-character version of **_searchenv**, and the arguments to **_wsearchenv** are wide-character strings. **_wsearchenv** and **_searchenv** behave identically otherwise. -If *filename* is an empty string, these functions return **ENOENT**. +If *`filename`* is an empty string, these functions return **ENOENT**. -If *filename* or *pathname* is a **NULL** pointer, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, these functions return -1 and set **errno** to **EINVAL**. +If *`filename`* or *`pathname`* is a **NULL** pointer, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, these functions return -1 and set **errno** to **EINVAL**. -For more information about **errno** and error codes, see [errno Constants](../../c-runtime-library/errno-constants.md). +For more information about **errno** and error codes, see [`errno` constants](../errno-constants.md). -In C++, these functions have template overloads that invoke the newer, more 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, more 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 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| |---------------------|--------------------------------------|--------------------|-----------------------| @@ -88,7 +88,7 @@ By default, this function's global state is scoped to the application. To change |**_searchenv**|\| |**_wsearchenv**|\ or \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -124,7 +124,7 @@ C:\Program Files\Microsoft Visual Studio 8\VC\BIN\CL.EXE ## See also -[Directory Control](../../c-runtime-library/directory-control.md)
-[getenv, _wgetenv](getenv-wgetenv.md)
-[_putenv, _wputenv](putenv-wputenv.md)
-[_searchenv_s, _wsearchenv_s](searchenv-s-wsearchenv-s.md)
+[Directory control](../directory-control.md)\ +[`getenv`, `_wgetenv`](getenv-wgetenv.md)\ +[`_putenv`, `_wputenv`](putenv-wputenv.md)\ +[`_searchenv_s`, `_wsearchenv_s`](searchenv-s-wsearchenv-s.md) diff --git a/docs/c-runtime-library/reference/security-init-cookie.md b/docs/c-runtime-library/reference/security-init-cookie.md index a3fa0ecc9b2..457106ec5fb 100644 --- a/docs/c-runtime-library/reference/security-init-cookie.md +++ b/docs/c-runtime-library/reference/security-init-cookie.md @@ -37,7 +37,7 @@ See the examples in [C Runtime Error R6035](../../error-messages/tool-errors/c-r |-------------|---------------------| |**`__security_init_cookie`**|``| -**`__security_init_cookie`** is a Microsoft extension to the standard C Runtime Library. For compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +**`__security_init_cookie`** is a Microsoft extension to the standard C Runtime Library. For compatibility information, see [Compatibility](../compatibility.md). ## See also diff --git a/docs/c-runtime-library/reference/seh-filter-dll-seh-filter-exe.md b/docs/c-runtime-library/reference/seh-filter-dll-seh-filter-exe.md index cf5bf61c984..fd29d64d7bc 100644 --- a/docs/c-runtime-library/reference/seh-filter-dll-seh-filter-exe.md +++ b/docs/c-runtime-library/reference/seh-filter-dll-seh-filter-exe.md @@ -18,24 +18,24 @@ Identifies the exception and the related action to be taken. ```C int __cdecl _seh_filter_dll( - unsigned long _ExceptionNum, - struct _EXCEPTION_POINTERS* _ExceptionPtr + unsigned long exceptionNum, + struct _EXCEPTION_POINTERS* exceptionPtr ); int __cdecl _seh_filter_exe( - unsigned long _ExceptionNum, - struct _EXCEPTION_POINTERS* _ExceptionPtr + unsigned long exceptionNum, + struct _EXCEPTION_POINTERS* exceptionPtr ); ``` ### Parameters -*_ExceptionNum*
+*`exceptionNum`*\ The identifier for the exception. -*_ExceptionPtr*
+*`exceptionPtr`*\ A pointer to the exception information. -## Return Value +## Return value An integer that indicates the action to be taken, based on the result of exception processing. @@ -64,4 +64,4 @@ By default, this function's global state is scoped to the application. To change ## See also -[Alphabetical Function Reference](crt-alphabetical-function-reference.md)
+[Alphabetical function reference](crt-alphabetical-function-reference.md) diff --git a/docs/c-runtime-library/reference/set-abort-behavior.md b/docs/c-runtime-library/reference/set-abort-behavior.md index ff0eea261f6..20eab42f766 100644 --- a/docs/c-runtime-library/reference/set-abort-behavior.md +++ b/docs/c-runtime-library/reference/set-abort-behavior.md @@ -33,7 +33,7 @@ New value of the `abort` flags. *`mask`*\ Mask for the `abort` flags bits to set. -## Return Value +## Return value The old value of the flags. @@ -51,7 +51,7 @@ By default, this function's global state is scoped to the application. To change |--|--| | **`_set_abort_behavior`** | `` | -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example diff --git a/docs/c-runtime-library/reference/set-controlfp.md b/docs/c-runtime-library/reference/set-controlfp.md index 5da13d46c5a..d12a0e7748d 100644 --- a/docs/c-runtime-library/reference/set-controlfp.md +++ b/docs/c-runtime-library/reference/set-controlfp.md @@ -25,19 +25,19 @@ void __cdecl _set_controlfp( ### Parameters -*newControl*
+*`newControl`*\ New control-word bit values. -*mask*
+*`mask`*\ Mask for new control-word bits to set. -## Return Value +## Return value None. ## Remarks -The **_set_controlfp** function is similar to **_control87**, but it only sets the floating-point control word to *newControl*. The bits in the values indicate the floating-point control state. The floating-point control state allows the program to change the precision, rounding, and infinity modes in the floating-point math package. You can also mask or unmask floating-point exceptions using **_set_controlfp**. For more information, see [_control87, _controlfp, \__control87_2](control87-controlfp-control87-2.md). +The **_set_controlfp** function is similar to **_control87**, but it only sets the floating-point control word to *`newControl`*. The bits in the values indicate the floating-point control state. The floating-point control state allows the program to change the precision, rounding, and infinity modes in the floating-point math package. You can also mask or unmask floating-point exceptions using **_set_controlfp**. For more information, see [`_control87`, `_controlfp`, `__control87_2`](control87-controlfp-control87-2.md). This function is deprecated when compiling with [/clr (Common Language Runtime Compilation)](../../build/reference/clr-common-language-runtime-compilation.md) because the common language runtime only supports the default floating-point precision. @@ -47,10 +47,10 @@ This function is deprecated when compiling with [/clr (Common Language Runtime C |-------------|---------------------|-------------------| |**_set_controlfp**|\|x86 processor only| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Floating-Point Support](../../c-runtime-library/floating-point-support.md)
-[_clear87, _clearfp](clear87-clearfp.md)
-[_status87, _statusfp, _statusfp2](status87-statusfp-statusfp2.md)
+[Math and floating-point support](../floating-point-support.md)\ +[`_clear87`, `_clearfp`](clear87-clearfp.md)\ +[`_status87`, `_statusfp`, `_statusfp2`](status87-statusfp-statusfp2.md) diff --git a/docs/c-runtime-library/reference/set-doserrno.md b/docs/c-runtime-library/reference/set-doserrno.md index 152fa780e77..0f7d8c30f4d 100644 --- a/docs/c-runtime-library/reference/set-doserrno.md +++ b/docs/c-runtime-library/reference/set-doserrno.md @@ -12,7 +12,7 @@ ms.assetid: 8686c159-3797-4705-a53e-7457869ca6f3 --- # _set_doserrno -Sets the value of the [_doserrno](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md) global variable. +Sets the value of the [`_doserrno`](../errno-doserrno-sys-errlist-and-sys-nerr.md) global variable. ## Syntax @@ -22,10 +22,10 @@ errno_t _set_doserrno( int error_value ); ### Parameters -*error_value*
+*`error_value`*\ The new value of **_doserrno**. -## Return Value +## Return value Returns zero if successful. @@ -41,9 +41,9 @@ By default, this function's global state is scoped to the application. To change |-------------|---------------------|---------------------| |**_set_doserrno**|\|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[_get_doserrno](get-doserrno.md)
-[errno, _doserrno, _sys_errlist, and _sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md)
+[`_get_doserrno`](get-doserrno.md)\ +[`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md) diff --git a/docs/c-runtime-library/reference/set-errno.md b/docs/c-runtime-library/reference/set-errno.md index 4b0316218a4..fb135b07a7e 100644 --- a/docs/c-runtime-library/reference/set-errno.md +++ b/docs/c-runtime-library/reference/set-errno.md @@ -22,16 +22,16 @@ errno_t _set_errno( int error_value ); ### Parameters -*error_value*
+*`error_value`*\ The new value of **errno**. -## Return Value +## Return value Returns zero if successful. ## Remarks -Possible values are defined in Errno.h. Also, see [errno Constants](../../c-runtime-library/errno-constants.md). +Possible values are defined in Errno.h. Also, see [`errno` constants](../errno-constants.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). @@ -59,9 +59,9 @@ Oops: Illegal byte sequence |-------------|---------------------|---------------------| |**_set_errno**|\|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[_get_errno](get-errno.md)
-[errno, _doserrno, _sys_errlist, and _sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md)
+[`_get_errno`](get-errno.md)\ +[`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md) diff --git a/docs/c-runtime-library/reference/set-error-mode.md b/docs/c-runtime-library/reference/set-error-mode.md index 17cabeeeeb0..5b6c728c5fe 100644 --- a/docs/c-runtime-library/reference/set-error-mode.md +++ b/docs/c-runtime-library/reference/set-error-mode.md @@ -27,10 +27,10 @@ int _set_error_mode( ### Parameters -*mode_val*
+*`mode_val`*\ Destination of error messages. -## Return Value +## Return value Returns the old setting or -1 if an error occurs. @@ -38,7 +38,7 @@ Returns the old setting or -1 if an error occurs. Controls the error output sink by setting the value of **__error_mode**. For example, you can direct output to a standard error or use the **MessageBox** API. -The *mode_val* parameter can be set to one of the following values. +The *`mode_val`* parameter can be set to one of the following values. |Value|Description| |---------------|-----------------| @@ -47,9 +47,9 @@ The *mode_val* parameter can be set to one of the following values. |**_OUT_TO_MSGBOX**|Error sink is a message box.| |**_REPORT_ERRMODE**|Report the current **__error_mode** value.| -If a value other than those listed is passed in, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, **_set_error_mode** sets **errno** to **EINVAL** and returns -1. +If a value other than those listed is passed in, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, **_set_error_mode** sets **errno** to **EINVAL** and returns -1. -When it's used with an [assert](assert-macro-assert-wassert.md), **_set_error_mode** displays the failed statement in the dialog box and gives you the option of choosing the **Ignore** button so that you can continue to run the program. +When it's used with an [`assert`](assert-macro-assert-wassert.md), **_set_error_mode** displays the failed statement in the dialog box and gives you the option of choosing the **Ignore** button so that you can continue to run the program. ## Requirements @@ -81,4 +81,4 @@ Please contact the application's support team for more information. ## See also -[assert Macro, _assert, _wassert](assert-macro-assert-wassert.md)
+[assert Macro, _assert, _wassert](assert-macro-assert-wassert.md) diff --git a/docs/c-runtime-library/reference/set-fmode.md b/docs/c-runtime-library/reference/set-fmode.md index 60e5650a0ac..81942e4972f 100644 --- a/docs/c-runtime-library/reference/set-fmode.md +++ b/docs/c-runtime-library/reference/set-fmode.md @@ -24,16 +24,16 @@ errno_t _set_fmode( ### Parameters -*mode*
+*`mode`*\ The file translation mode desired: **_O_TEXT** or **_O_BINARY**. -## Return Value +## Return value -Returns zero if successful, an error code on failure. If *mode* is not **_O_TEXT** or **_O_BINARY** or **_O_WTEXT**, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, this function sets **errno** to **EINVAL** and returns **EINVAL**. +Returns zero if successful, an error code on failure. If *`mode`* is not **_O_TEXT** or **_O_BINARY** or **_O_WTEXT**, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, this function sets **errno** to **EINVAL** and returns **EINVAL**. ## Remarks -The function sets the [_fmode](../../c-runtime-library/fmode.md) global variable. This variable specifies the default file translation mode for the file I/O operations **_open** and **_pipe**. +The function sets the [`_fmode`](../fmode.md) global variable. This variable specifies the default file translation mode for the file I/O operations **_open** and **_pipe**. **_O_TEXT** and **_O_BINARY** are defined in Fcntl.h. **EINVAL** is defined in Errno.h. @@ -45,7 +45,7 @@ By default, this function's global state is scoped to the application. To change |-------------|---------------------|---------------------| |**_set_fmode**|\|\, \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -112,7 +112,7 @@ A B C D E F G H I J K L ## See also -[_fmode](../../c-runtime-library/fmode.md)
-[_get_fmode](get-fmode.md)
-[_setmode](setmode.md)
-[Text and Binary Mode File I/O](../../c-runtime-library/text-and-binary-mode-file-i-o.md)
+[`_fmode`](../fmode.md)\ +[`_get_fmode`](get-fmode.md)\ +[`_setmode`](setmode.md)\ +[Text and binary mode file I/O](../text-and-binary-mode-file-i-o.md) diff --git a/docs/c-runtime-library/reference/set-invalid-parameter-handler-set-thread-local-invalid-parameter-handler.md b/docs/c-runtime-library/reference/set-invalid-parameter-handler-set-thread-local-invalid-parameter-handler.md index 31cf34d9397..a7f4091d7b8 100644 --- a/docs/c-runtime-library/reference/set-invalid-parameter-handler-set-thread-local-invalid-parameter-handler.md +++ b/docs/c-runtime-library/reference/set-invalid-parameter-handler-set-thread-local-invalid-parameter-handler.md @@ -27,10 +27,10 @@ _invalid_parameter_handler _set_thread_local_invalid_parameter_handler( ### Parameters -*pNew*
+*`pNew`*\ The function pointer to the new invalid parameter handler. -## Return Value +## Return value A pointer to the invalid parameter handler before the call. @@ -52,7 +52,7 @@ void _invalid_parameter( ); ``` -The *expression* argument is a wide string representation of the argument expression that raised the error. The *function* argument is the name of the CRT function that received the invalid argument. The *file* argument is the name of the CRT source file that contains the function. The *line* argument is the line number in that file. The last argument is reserved. The parameters all have the value **NULL** unless a debug version of the CRT library is used. +The *`expression`* argument is a wide string representation of the argument expression that raised the error. The *`function`* argument is the name of the CRT function that received the invalid argument. The *`file`* argument is the name of the CRT source file that contains the function. The *`line`* argument is the line number in that file. The last argument is reserved. The parameters all have the value **NULL** unless a debug version of the CRT library is used. By default, this function's global state is scoped to the application. To change this behavior, see [Global state in the CRT](../global-state.md). @@ -62,11 +62,11 @@ By default, this function's global state is scoped to the application. To change |-------------|---------------------| |**_set_invalid_parameter_handler**, **_set_thread_local_invalid_parameter_handler**|C: \

C++: \ or \| -The **_set_invalid_parameter_handler** and **_set_thread_local_invalid_parameter_handler** functions are Microsoft-specific. For compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +The **_set_invalid_parameter_handler** and **_set_thread_local_invalid_parameter_handler** functions are Microsoft-specific. For compatibility information, see [Compatibility](../compatibility.md). ## Example -In the following example, an invalid parameter error handler is used to print the function that received the invalid parameter and the file and line in CRT sources. When the debug CRT library is used, invalid parameter errors also raise an assertion, which is disabled in this example using [_CrtSetReportMode](crtsetreportmode.md). +In the following example, an invalid parameter error handler is used to print the function that received the invalid parameter and the file and line in CRT sources. When the debug CRT library is used, invalid parameter errors also raise an assertion, which is disabled in this example using [`_CrtSetReportMode`](crtsetreportmode.md). ```C // crt_set_invalid_parameter_handler.c @@ -112,6 +112,6 @@ Expression: format != nullptr ## See also -[_get_invalid_parameter_handler, _get_thread_local_invalid_parameter_handler](get-invalid-parameter-handler-get-thread-local-invalid-parameter-handler.md)
-[Security-Enhanced Versions of CRT Functions](../../c-runtime-library/security-enhanced-versions-of-crt-functions.md)
-[errno, _doserrno, _sys_errlist, and _sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md)
+[`_get_invalid_parameter_handler`, `_get_thread_local_invalid_parameter_handler`](get-invalid-parameter-handler-get-thread-local-invalid-parameter-handler.md)\ +[Security-enhanced versions of CRT functions](../security-enhanced-versions-of-crt-functions.md)\ +[`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md) diff --git a/docs/c-runtime-library/reference/set-new-handler.md b/docs/c-runtime-library/reference/set-new-handler.md index 1c6e20a3c18..b1e611257ef 100644 --- a/docs/c-runtime-library/reference/set-new-handler.md +++ b/docs/c-runtime-library/reference/set-new-handler.md @@ -82,7 +82,7 @@ There's a single **`_set_new_handler`** handler for all dynamically linked DLLs |--|--| | **`_set_new_handler`** | `` | -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -170,7 +170,7 @@ bad_alloc caught: bad allocation ## See also -[Memory allocation](../../c-runtime-library/memory-allocation.md)\ +[Memory allocation](../memory-allocation.md)\ [`calloc`](calloc.md)\ [`free`](free.md)\ [`realloc`](realloc.md) diff --git a/docs/c-runtime-library/reference/set-new-mode.md b/docs/c-runtime-library/reference/set-new-mode.md index 5514bd5b15c..097fc3645eb 100644 --- a/docs/c-runtime-library/reference/set-new-mode.md +++ b/docs/c-runtime-library/reference/set-new-mode.md @@ -22,24 +22,24 @@ int _set_new_mode( int newhandlermode ); ### Parameters -*newhandlermode*
+*`newhandlermode`*\ New handler mode for **malloc**; valid value is 0 or 1. -## Return Value +## Return value -Returns the previous handler mode set for **malloc**. A return value of 1 indicates that, on failure to allocate memory, **malloc** previously called the new handler routine; a return value of 0 indicates that it did not. If the *newhandlermode* argument does not equal 0 or 1, returns -1. +Returns the previous handler mode set for **malloc**. A return value of 1 indicates that, on failure to allocate memory, **malloc** previously called the new handler routine; a return value of 0 indicates that it did not. If the *`newhandlermode`* argument does not equal 0 or 1, returns -1. ## Remarks -The C++ **_set_new_mode** function sets the new handler mode for [malloc](malloc.md). The new handler mode indicates whether, on failure, **malloc** is to call the new handler routine as set by [_set_new_handler](set-new-handler.md). By default, **malloc** does not call the new handler routine on failure to allocate memory. You can override this default behavior so that, when **malloc** fails to allocate memory, **malloc** calls the new handler routine in the same way that the **`new`** operator does when it fails for the same reason. For more information, see the [new](../../cpp/new-operator-cpp.md) and [delete](../../cpp/delete-operator-cpp.md) operators in the *C++ Language Reference*. To override the default, call: +The C++ **_set_new_mode** function sets the new handler mode for [`malloc`](malloc.md). The new handler mode indicates whether, on failure, **malloc** is to call the new handler routine as set by [`_set_new_handler`](set-new-handler.md). By default, **malloc** does not call the new handler routine on failure to allocate memory. You can override this default behavior so that, when **malloc** fails to allocate memory, **malloc** calls the new handler routine in the same way that the **`new`** operator does when it fails for the same reason. For more information, see the [`new`](../../cpp/new-operator-cpp.md) and [`delete`](../../cpp/delete-operator-cpp.md) operators in the *C++ Language Reference*. To override the default, call: ```cpp _set_new_mode(1); ``` -early in your program or link with Newmode.obj (see [Link Options](../../c-runtime-library/link-options.md)). +early in your program or link with Newmode.obj (see [Link options](../link-options.md)). -This function validates its parameter. If *newhandlermode* is anything other than 0 or 1, the function invokes the invalid parameter handler, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, _set_new_mode returns -1 and sets **errno** to `EINVAL`. +This function validates its parameter. If *`newhandlermode`* is anything other than 0 or 1, the function invokes the invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, _set_new_mode returns -1 and sets **errno** to `EINVAL`. By default, this function's global state is scoped to the application. To change this behavior, see [Global state in the CRT](../global-state.md). @@ -49,13 +49,13 @@ By default, this function's global state is scoped to the application. To change |-------------|---------------------| |**_set_new_mode**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Memory Allocation](../../c-runtime-library/memory-allocation.md)
-[calloc](calloc.md)
-[free](free.md)
-[realloc](realloc.md)
-[_query_new_handler](query-new-handler.md)
-[_query_new_mode](query-new-mode.md)
+[Memory allocation](../memory-allocation.md)\ +[`calloc`](calloc.md)\ +[`free`](free.md)\ +[`realloc`](realloc.md)\ +[`_query_new_handler`](query-new-handler.md)\ +[`_query_new_mode`](query-new-mode.md) diff --git a/docs/c-runtime-library/reference/set-printf-count-output.md b/docs/c-runtime-library/reference/set-printf-count-output.md index 63fef201eb7..a02f0c397dd 100644 --- a/docs/c-runtime-library/reference/set-printf-count-output.md +++ b/docs/c-runtime-library/reference/set-printf-count-output.md @@ -12,7 +12,7 @@ ms.assetid: d8259ec5-764e-42d0-9169-72172e95163b --- # _set_printf_count_output -Enable or disable support of the **%n** format in [printf, _printf_l, wprintf, _wprintf_l](printf-printf-l-wprintf-wprintf-l.md)-family functions. +Enable or disable support of the **%n** format in [`printf`, `_printf_l`, `wprintf`, `_wprintf_l`](printf-printf-l-wprintf-wprintf-l.md)-family functions. ## Syntax @@ -24,16 +24,16 @@ int _set_printf_count_output( ### Parameters -*enable*
+*`enable`*\ A non-zero value to enable **%n** support, 0 to disable **%n** support. -## Property Value/Return Value +## Property value or return value The state of **%n** support before calling this function: non-zero if **%n** support was enabled, 0 if it was disabled. ## Remarks -Because of security reasons, support for the **%n** format specifier is disabled by default in **printf** and all its variants. If **%n** is encountered in a **printf** format specification, the default behavior is to invoke the invalid parameter handler as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). Calling **_set_printf_count_output** with a non-zero argument will cause **printf**-family functions to interpret **%n** as described in [Format Specification Syntax: printf and wprintf Functions](../../c-runtime-library/format-specification-syntax-printf-and-wprintf-functions.md). +Because of security reasons, support for the **%n** format specifier is disabled by default in **printf** and all its variants. If **%n** is encountered in a **printf** format specification, the default behavior is to invoke the invalid parameter handler as described in [Parameter validation](../parameter-validation.md). Calling **_set_printf_count_output** with a non-zero argument will cause **printf**-family functions to interpret **%n** as described in [Format specification syntax: `printf` and `wprintf` functions](../format-specification-syntax-printf-and-wprintf-functions.md). ## Requirements @@ -41,7 +41,7 @@ Because of security reasons, support for the **%n** format specifier is disabled |-------------|---------------------| |**_set_printf_count_output**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -72,4 +72,4 @@ i = 5 ## See also -[_get_printf_count_output](get-printf-count-output.md)
+[`_get_printf_count_output`](get-printf-count-output.md) diff --git a/docs/c-runtime-library/reference/set-se-translator.md b/docs/c-runtime-library/reference/set-se-translator.md index 3c545960039..15e11f21ae4 100644 --- a/docs/c-runtime-library/reference/set-se-translator.md +++ b/docs/c-runtime-library/reference/set-se-translator.md @@ -26,7 +26,7 @@ _se_translator_function _set_se_translator( *`seTransFunction`*\ Pointer to a C structured exception translator function that you write. -## Return Value +## Return value Returns a pointer to the previous translator function registered by **`_set_se_translator`**, so that the previous function can be restored later. If no previous function has been set, the return value can be used to restore the default behavior; this value can be **`nullptr`**. @@ -58,7 +58,7 @@ When using **`_set_se_translator`** from managed code (code compiled with `/clr` |-------------|---------------------| |**`_set_se_translator`**|``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example: Catch `__try` exception error @@ -135,7 +135,7 @@ Caught a __try exception, error c0000094. ## Example: Catch `SE_Exception` error -Although the functionality provided by **`_set_se_translator`** isn't available in managed code, it's possible to use this mapping in native code, even if that native code is in a compilation under the **`/clr`** switch, as long as the native code is indicated using `#pragma unmanaged`. If a structured exception is being thrown in managed code that is to be mapped, the code that generates and handles the exception must be marked `#pragma unmanaged`. The following code shows a possible use. For more information, see [Pragma Directives and the `__Pragma` Keyword](../../preprocessor/pragma-directives-and-the-pragma-keyword.md). +Although the functionality provided by **`_set_se_translator`** isn't available in managed code, it's possible to use this mapping in native code, even if that native code is in a compilation under the **`/clr`** switch, as long as the native code is indicated using `#pragma unmanaged`. If a structured exception is being thrown in managed code that is to be mapped, the code that generates and handles the exception must be marked `#pragma unmanaged`. The following code shows a possible use. For more information, see [Pragma directives and the `__pragma` and `_Pragma` keywords](../../preprocessor/pragma-directives-and-the-pragma-keyword.md). ```cpp // crt_set_se_translator_clr.cpp @@ -208,7 +208,7 @@ Caught SE_Exception, error c0000094 ## See also -[Exception Handling Routines](../../c-runtime-library/exception-handling-routines.md)\ +[Exception handling routines](../exception-handling-routines.md)\ [`set_terminate`](set-terminate-crt.md)\ [`set_unexpected`](set-unexpected-crt.md)\ [`terminate`](terminate-crt.md)\ diff --git a/docs/c-runtime-library/reference/set-sse2-enable.md b/docs/c-runtime-library/reference/set-sse2-enable.md index 518a2c9282c..fbbdc0f27b1 100644 --- a/docs/c-runtime-library/reference/set-sse2-enable.md +++ b/docs/c-runtime-library/reference/set-sse2-enable.md @@ -24,10 +24,10 @@ int _set_SSE2_enable( ### Parameters -*flag*
+*`flag`*\ 1 to enable the SSE2 implementation; 0 to disable the SSE2 implementation. By default, SSE2 implementation is enabled on processors that support it. -## Return Value +## Return value Nonzero if SSE2 implementation is enabled; zero if SSE2 implementation is disabled. @@ -35,28 +35,28 @@ Nonzero if SSE2 implementation is enabled; zero if SSE2 implementation is disabl The following functions have SSE2 implementations that can be enabled by using **_set_SSE2_enable**: -- [atan](atan-atanf-atanl-atan2-atan2f-atan2l.md) +- [`atan`](atan-atanf-atanl-atan2-atan2f-atan2l.md) -- [ceil](ceil-ceilf-ceill.md) +- [`ceil`](ceil-ceilf-ceill.md) -- [exp](exp-expf.md) +- [`exp`](exp-expf.md) -- [floor](floor-floorf-floorl.md) +- [`floor`](floor-floorf-floorl.md) -- [log](log-logf-log10-log10f.md) +- [`log`](log-logf-log10-log10f.md) -- [log10](log-logf-log10-log10f.md) +- [`log10`](log-logf-log10-log10f.md) -- [modf](modf-modff-modfl.md) +- [`modf`](modf-modff-modfl.md) -- [pow](pow-powf-powl.md) +- [`pow`](pow-powf-powl.md) The SSE2 implementations of these functions might give slightly different answers than the default implementations, because SSE2 intermediate values are 64-bit floating-point quantities but the default implementation intermediate values are 80-bit floating-point quantities. > [!NOTE] > If you use the [/Oi (Generate Intrinsic Functions)](../../build/reference/oi-generate-intrinsic-functions.md) compiler option to compile the project, it may appear that **_set_SSE2_enable** has no effect. The **/Oi** compiler option gives the compiler the authority to use intrinsics to replace CRT calls; this behavior overrides the effect of **_set_SSE2_enable**. If you want to guarantee that **/Oi** does not override **_set_SSE2_enable**, use **/Oi-** to compile your project. This might also be good practice when you use other compiler switches that imply **/Oi**. -The SSE2 implementation is only used if all exceptions are masked. Use [_control87, _controlfp](control87-controlfp-control87-2.md) to mask exceptions. +The SSE2 implementation is only used if all exceptions are masked. Use [`_control87`, `_controlfp`](control87-controlfp-control87-2.md) to mask exceptions. ## Requirements @@ -64,7 +64,7 @@ The SSE2 implementation is only used if all exceptions are masked. Use [_control |-------------|---------------------| |**_set_SSE2_enable**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -91,4 +91,4 @@ SSE2 enabled. ## 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/reference/set-terminate-crt.md b/docs/c-runtime-library/reference/set-terminate-crt.md index f515c67175f..b130d7e5b08 100644 --- a/docs/c-runtime-library/reference/set-terminate-crt.md +++ b/docs/c-runtime-library/reference/set-terminate-crt.md @@ -22,20 +22,20 @@ terminate_function set_terminate( terminate_function termFunction ); ### Parameters -*termFunction*
+*`termFunction`*\ Pointer to a terminate function that you write. -## Return Value +## Return value Returns a pointer to the previous function registered by **set_terminate** so that the previous function can be restored later. If no previous function has been set, the return value may be used to restore the default behavior; this value may be **NULL**. ## Remarks -The **set_terminate** function installs *termFunction* as the function called by **terminate**. **set_terminate** is used with C++ exception handling and may be called at any point in your program before the exception is thrown. **terminate** calls [abort](abort.md) by default. You can change this default by writing your own termination function and calling **set_terminate** with the name of your function as its argument. **terminate** calls the last function given as an argument to **set_terminate**. After performing any desired cleanup tasks, *termFunction* should exit the program. If it does not exit (if it returns to its caller), [abort](abort.md) is called. +The **set_terminate** function installs *`termFunction`* as the function called by **terminate**. **set_terminate** is used with C++ exception handling and may be called at any point in your program before the exception is thrown. **terminate** calls [`abort`](abort.md) by default. You can change this default by writing your own termination function and calling **set_terminate** with the name of your function as its argument. **terminate** calls the last function given as an argument to **set_terminate**. After performing any desired cleanup tasks, *`termFunction`* should exit the program. If it does not exit (if it returns to its caller), [`abort`](abort.md) is called. In a multithreaded environment, terminate functions are maintained separately for each thread. Each new thread needs to install its own terminate function. Thus, each thread is in charge of its own termination handling. -The **terminate_function** type is defined in EH.H as a pointer to a user-defined termination function, *termFunction* that returns **`void`**. Your custom function *termFunction* can take no arguments and should not return to its caller. If it does, [abort](abort.md) is called. An exception may not be thrown from within *termFunction*. +The **terminate_function** type is defined in EH.H as a pointer to a user-defined termination function, *`termFunction`* that returns **`void`**. Your custom function *`termFunction`* can take no arguments and should not return to its caller. If it does, [`abort`](abort.md) is called. An exception may not be thrown from within *`termFunction`*. ```cpp typedef void ( *terminate_function )( ); @@ -54,17 +54,17 @@ By default, this function's global state is scoped to the application. To change |-------------|---------------------| |**set_terminate**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example -See the example for [terminate](terminate-crt.md). +See the example for [`terminate`](terminate-crt.md). ## See also -[Exception Handling Routines](../../c-runtime-library/exception-handling-routines.md)
-[abort](abort.md)
-[_get_terminate](get-terminate.md)
-[set_unexpected](set-unexpected-crt.md)
-[terminate](terminate-crt.md)
-[unexpected](unexpected-crt.md)
+[Exception handling routines](../exception-handling-routines.md)\ +[`abort`](abort.md)\ +[`_get_terminate`](get-terminate.md)\ +[`set_unexpected`](set-unexpected-crt.md)\ +[`terminate`](terminate-crt.md)\ +[`unexpected`](unexpected-crt.md) diff --git a/docs/c-runtime-library/reference/set-unexpected-crt.md b/docs/c-runtime-library/reference/set-unexpected-crt.md index e77638ac303..f9cfa8a3cfd 100644 --- a/docs/c-runtime-library/reference/set-unexpected-crt.md +++ b/docs/c-runtime-library/reference/set-unexpected-crt.md @@ -25,13 +25,13 @@ unexpected_function set_unexpected( unexpected_function unexpFunction ); *`unexpFunction`*\ Pointer to a function that you write to replace the **`unexpected`** function. -## Return Value +## Return value Returns a pointer to the previous termination function registered by **`_set_unexpected`** so that the previous function can be restored later. If no previous function has been set, the return value may be used to restore the default behavior; this value may be **`NULL`**. ## Remarks -The **`set_unexpected`** function installs *unexpFunction* as the function called by **`unexpected`**. **`unexpected`** is not used in the current C++ exception-handling implementation. The **`unexpected_function`** type is defined in EH.H as a pointer to a user-defined unexpected function, *unexpFunction* that returns **`void`**. Your custom *unexpFunction* function should not return to its caller. +The **`set_unexpected`** function installs *`unexpFunction`* as the function called by **`unexpected`**. **`unexpected`** is not used in the current C++ exception-handling implementation. The **`unexpected_function`** type is defined in EH.H as a pointer to a user-defined unexpected function, *`unexpFunction`* that returns **`void`**. Your custom *`unexpFunction`* function should not return to its caller. ```cpp typedef void ( *unexpected_function )( ); @@ -53,11 +53,11 @@ There is a single **`set_unexpected`** handler for all dynamically linked DLLs o |-------------|---------------------| |**`set_unexpected`**|``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Exception Handling Routines](../../c-runtime-library/exception-handling-routines.md)\ +[Exception handling routines](../exception-handling-routines.md)\ [`abort`](abort.md)\ [`_get_unexpected`](get-unexpected.md)\ [`set_terminate`](set-terminate-crt.md)\ diff --git a/docs/c-runtime-library/reference/setbuf.md b/docs/c-runtime-library/reference/setbuf.md index 47bd2466fbc..096eecafbc8 100644 --- a/docs/c-runtime-library/reference/setbuf.md +++ b/docs/c-runtime-library/reference/setbuf.md @@ -12,7 +12,7 @@ ms.assetid: 13beda22-7b56-455d-8a6c-f2eb636885b9 --- # setbuf -Controls stream buffering. This function is deprecated; use [setvbuf](setvbuf.md) instead. +Controls stream buffering. This function is deprecated; use [`setvbuf`](setvbuf.md) instead. ## Syntax @@ -25,17 +25,17 @@ void setbuf( ### Parameters -*stream*
+*`stream`*\ Pointer to **FILE** structure. -*buffer*
+*`buffer`*\ User-allocated buffer. ## Remarks -The **setbuf** function controls buffering for *stream*. The *stream* argument must refer to an open file that hasn't been read or written. If the *buffer* argument is **NULL**, the stream is unbuffered. If not, the buffer must point to a character array of length **BUFSIZ**, where **BUFSIZ** is the buffer size as defined in STDIO.H. The user-specified buffer, instead of the default system-allocated buffer for the given stream, is used for I/O buffering. The **stderr** stream is unbuffered by default, but you can use **setbuf** to assign buffers to **stderr**. +The **setbuf** function controls buffering for *`stream`*. The *`stream`* argument must refer to an open file that hasn't been read or written. If the *`buffer`* argument is **NULL**, the stream is unbuffered. If not, the buffer must point to a character array of length **BUFSIZ**, where **BUFSIZ** is the buffer size as defined in STDIO.H. The user-specified buffer, instead of the default system-allocated buffer for the given stream, is used for I/O buffering. The **stderr** stream is unbuffered by default, but you can use **setbuf** to assign buffers to **stderr**. -**setbuf** has been replaced by [setvbuf](setvbuf.md), which is the preferred routine for new code. Unlike **setvbuf**, **setbuf** has no way of reporting errors. **setvbuf** also lets you control both the buffering mode and the buffer size. **setbuf** exists for compatibility with existing code. +**setbuf** has been replaced by [`setvbuf`](setvbuf.md), which is the preferred routine for new code. Unlike **setvbuf**, **setbuf** has no way of reporting errors. **setvbuf** also lets you control both the buffering mode and the buffer size. **setbuf** exists for compatibility with existing code. 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). @@ -45,7 +45,7 @@ By default, this function's global state is scoped to the application. To change |-------------|---------------------| |**setbuf**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -88,8 +88,8 @@ stream2 buffering disabled ## See also -[Stream I/O](../../c-runtime-library/stream-i-o.md)
-[fclose, _fcloseall](fclose-fcloseall.md)
-[fflush](fflush.md)
-[fopen, _wfopen](fopen-wfopen.md)
-[setvbuf](setvbuf.md)
+[Stream I/O](../stream-i-o.md)\ +[`fclose`, `_fcloseall`](fclose-fcloseall.md)\ +[`fflush`](fflush.md)\ +[`fopen`, `_wfopen`](fopen-wfopen.md)\ +[`setvbuf`](setvbuf.md) diff --git a/docs/c-runtime-library/reference/setjmp.md b/docs/c-runtime-library/reference/setjmp.md index ad4a103540e..6c0ae30f599 100644 --- a/docs/c-runtime-library/reference/setjmp.md +++ b/docs/c-runtime-library/reference/setjmp.md @@ -27,9 +27,9 @@ int setjmp( *`env`*\ Variable in which environment is stored. -## Return Value +## Return value -Returns 0 after saving the stack environment. If **`setjmp`** returns because of a `longjmp` call, it returns the *value* argument of `longjmp`, or if the *value* argument of `longjmp` is 0, **`setjmp`** returns 1. There's no error return. +Returns 0 after saving the stack environment. If **`setjmp`** returns because of a `longjmp` call, it returns the *`value`* argument of `longjmp`, or if the *`value`* argument of `longjmp` is 0, **`setjmp`** returns 1. There's no error return. ## Remarks @@ -57,7 +57,7 @@ For more information, see [Using `setjmp` and `longjmp`](../../cpp/using-setjmp- |-------------|---------------------| |**`setjmp`**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -65,5 +65,5 @@ See the example for [`_fpreset`](fpreset.md). ## See also -[Process and Environment Control](../../c-runtime-library/process-and-environment-control.md)\ +[Process and environment control](../process-and-environment-control.md)\ [`longjmp`](longjmp.md) diff --git a/docs/c-runtime-library/reference/setlocale-wsetlocale.md b/docs/c-runtime-library/reference/setlocale-wsetlocale.md index 51351fce5f9..a92493390db 100644 --- a/docs/c-runtime-library/reference/setlocale-wsetlocale.md +++ b/docs/c-runtime-library/reference/setlocale-wsetlocale.md @@ -39,7 +39,7 @@ Locale specifier. If a valid *`locale`* and *`category`* are given, returns a pointer to the string associated with the specified *`locale`* and *`category`*. -If the *`locale`* or *`category`* isn't valid, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, the function sets `errno` to `EINVAL` and returns `NULL`. +If the *`locale`* or *`category`* isn't valid, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, the function sets `errno` to `EINVAL` and returns `NULL`. The call @@ -63,7 +63,7 @@ Use the `setlocale` function to set, change, or query some or all of the current 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| |---------------------|------------------------------------|--------------------|-----------------------| @@ -71,7 +71,7 @@ By default, this function's global state is scoped to the application. To change The *`category`* argument specifies the parts of a program's locale information that are affected. The macros used for *`category`* and the parts of the program they affect are as follows: -|*category* flag|Affects| +|*`category`* flag|Affects| |-|-| | `LC_ALL` | All categories, as listed below. | | `LC_COLLATE` | The `strcoll`, `_stricoll`, `wcscoll`, `_wcsicoll`, `strxfrm`, `_strncoll`, `_strnicoll`, `_wcsncoll`, `_wcsnicoll`, and `wcsxfrm` functions. | @@ -80,15 +80,15 @@ The *`category`* argument specifies the parts of a program's locale information | `LC_NUMERIC` | Decimal-point character for the formatted output routines (such as `printf`), for the data-conversion routines, and for the non-monetary formatting information returned by `localeconv`. In addition to the decimal-point character, `LC_NUMERIC` sets the thousands separator and the grouping control string returned by [`localeconv`](localeconv.md). | | `LC_TIME` | The `strftime` and `wcsftime` functions. | -This function validates the category parameter. If the category parameter isn't one of the values given in the previous table, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, the function sets `errno` to `EINVAL` and returns `NULL`. +This function validates the category parameter. If the category parameter isn't one of the values given in the previous table, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, the function sets `errno` to `EINVAL` and returns `NULL`. -The *`locale`* argument is a pointer to a string that specifies the locale. For information about the format of the *`locale`* argument, see [Locale Names, Languages, and Country/Region Strings](../../c-runtime-library/locale-names-languages-and-country-region-strings.md). If *`locale`* points to an empty string, the locale is the implementation-defined native environment. A value of `C` specifies the minimal ANSI conforming environment for C translation. The `C` locale assumes that all `char` data types are 1 byte and that their value is always less than 256. +The *`locale`* argument is a pointer to a string that specifies the locale. For information about the format of the *`locale`* argument, see [Locale names, Languages, and Country/Region strings](../locale-names-languages-and-country-region-strings.md). If *`locale`* points to an empty string, the locale is the implementation-defined native environment. A value of `C` specifies the minimal ANSI conforming environment for C translation. The `C` locale assumes that all `char` data types are 1 byte and that their value is always less than 256. At program startup, the equivalent of the following statement is executed: `setlocale( LC_ALL, "C" );` -The *`locale`* argument can take a locale name, a language string, a language string and country/region code, a code page, or a language string, country/region code, and code page. The set of available locale names, languages, country/region codes, and code pages includes all those supported by the Windows NLS API. The set of locale names supported by `setlocale` is described in [Locale Names, Languages, and Country/Region Strings](../../c-runtime-library/locale-names-languages-and-country-region-strings.md). The set of language and country/region strings supported by `setlocale` are listed in [Language Strings](../../c-runtime-library/language-strings.md) and [Country/Region Strings](../../c-runtime-library/country-region-strings.md). We recommend the locale name form for performance and for maintainability of locale strings embedded in code or serialized to storage. The locale name strings are less likely to be changed by an operating system update than the language and country/region name form. +The *`locale`* argument can take a locale name, a language string, a language string and country/region code, a code page, or a language string, country/region code, and code page. The set of available locale names, languages, country/region codes, and code pages includes all those supported by the Windows NLS API. The set of locale names supported by `setlocale` is described in [Locale names, Languages, and Country/Region strings](../locale-names-languages-and-country-region-strings.md). The set of language and country/region strings supported by `setlocale` are listed in [Language strings](../language-strings.md) and [Country/Region strings](../country-region-strings.md). We recommend the locale name form for performance and for maintainability of locale strings embedded in code or serialized to storage. The locale name strings are less likely to be changed by an operating system update than the language and country/region name form. A null pointer that's passed as the *`locale`* argument tells `setlocale` to query instead of to set the international environment. If the *`locale`* argument is a null pointer, the program's current locale setting isn't changed. Instead, `setlocale` returns a pointer to the string that's associated with the *`category`* of the thread's current locale. If the *`category`* argument is `LC_ALL`, the function returns a string that indicates the current setting of each category, separated by semicolons. For example, the sequence of calls @@ -170,7 +170,7 @@ For more information, see the [`setlocale`](../../preprocessor/setlocale.md) pra The function [`_configthreadlocale`](configthreadlocale.md) is used to control whether `setlocale` affects the locale of all threads in a program or only the locale of the calling thread. -## UTF-8 Support +## UTF-8 support Starting in Windows 10 version 1803 (10.0.17134.0), the Universal C Runtime supports using a UTF-8 code page. This means that `char` strings passed to C runtime functions will expect strings in the UTF-8 encoding. To enable UTF-8 mode, use `".UTF8"` as the code page when using `setlocale`. For example, `setlocale(LC_ALL, ".UTF8")` will use the current default Windows ANSI code page (ACP) for the locale and UTF-8 for the code page. @@ -206,7 +206,7 @@ To use this feature on an OS prior to Windows 10, you must use [app-local deploy |`setlocale`|``| |`_wsetlocale`|`` or ``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -314,17 +314,17 @@ The time in de-DE locale is: 'Mittwoch, 12. Mai 2004' ## See also -[Locale Names, Languages, and Country/Region Strings](../../c-runtime-library/locale-names-languages-and-country-region-strings.md)\ +[Locale names, Languages, and Country/Region strings](../locale-names-languages-and-country-region-strings.md)\ [`_configthreadlocale`](configthreadlocale.md)\ [`_create_locale`, `_wcreate_locale`](create-locale-wcreate-locale.md)\ -[Locale](../../c-runtime-library/locale.md)\ +[Locale](../locale.md)\ [`localeconv`](localeconv.md)\ [`_mbclen`, `mblen`, `_mblen_l`](mbclen-mblen-mblen-l.md)\ [`strlen`, `wcslen`, `_mbslen`, `_mbslen_l`, `_mbstrlen`, `_mbstrlen_l`](strlen-wcslen-mbslen-mbslen-l-mbstrlen-mbstrlen-l.md)\ [`mbstowcs`, `_mbstowcs_l`](mbstowcs-mbstowcs-l.md)\ [`mbtowc`, `_mbtowc_l`](mbtowc-mbtowc-l.md)\ [`_setmbcp`](setmbcp.md)\ -[`strcoll` Functions](../../c-runtime-library/strcoll-functions.md)\ +[`strcoll` functions](../strcoll-functions.md)\ [`strftime`, `wcsftime`, `_strftime_l`, `_wcsftime_l`](strftime-wcsftime-strftime-l-wcsftime-l.md)\ [`strxfrm`, `wcsxfrm`, `_strxfrm_l`, `_wcsxfrm_l`](strxfrm-wcsxfrm-strxfrm-l-wcsxfrm-l.md)\ [`wcstombs`, `_wcstombs_l`](wcstombs-wcstombs-l.md)\ diff --git a/docs/c-runtime-library/reference/setmaxstdio.md b/docs/c-runtime-library/reference/setmaxstdio.md index eb8b1d25f06..600d6687fc6 100644 --- a/docs/c-runtime-library/reference/setmaxstdio.md +++ b/docs/c-runtime-library/reference/setmaxstdio.md @@ -26,19 +26,19 @@ int _setmaxstdio( *`new_max`*\ New maximum for the number of simultaneously open files at the stream I/O level. -## Return Value +## Return value Returns *`new_max`* if successful; -1 otherwise. -If *`new_max`* is less than **`_IOB_ENTRIES`**, or greater than the maximum number of handles available in the operating system, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, this function returns -1 and sets **`errno`** to **`EINVAL`**. +If *`new_max`* is less than **`_IOB_ENTRIES`**, or greater than the maximum number of handles available in the operating system, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, this function returns -1 and sets **`errno`** to **`EINVAL`**. -For information about these and other error codes, see [`_doserrno`, `errno`, `_sys_errlist`, and `_sys_nerr`](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +For information about these and other error codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks The **`_setmaxstdio`** function changes the maximum value for the number of files that may be open simultaneously at the stream I/O level. -C run-time I/O now supports up to 8,192 files open simultaneously at the [low I/O level](../../c-runtime-library/low-level-i-o.md). This level includes files opened and accessed using the **`_open`**, **`_read`**, and **`_write`** family of I/O functions. By default, up to 512 files can be open simultaneously at the [stream I/O level](../../c-runtime-library/stream-i-o.md). This level includes files opened and accessed using the **`fopen`**, **`fgetc`**, and **`fputc`** family of functions. The limit of 512 open files at the stream I/O level can be increased to a maximum of 8,192 by use of the **`_setmaxstdio`** function. +C run-time I/O now supports up to 8,192 files open simultaneously at the [low I/O level](../low-level-i-o.md). This level includes files opened and accessed using the **`_open`**, **`_read`**, and **`_write`** family of I/O functions. By default, up to 512 files can be open simultaneously at the [stream I/O level](../stream-i-o.md). This level includes files opened and accessed using the **`fopen`**, **`fgetc`**, and **`fputc`** family of functions. The limit of 512 open files at the stream I/O level can be increased to a maximum of 8,192 by use of the **`_setmaxstdio`** function. Because stream I/O-level functions, such as **`fopen`**, are built on top of the low I/O-level functions, the maximum of 8,192 is a hard upper limit for the number of simultaneously open files accessed through the C run-time library. @@ -51,7 +51,7 @@ Because stream I/O-level functions, such as **`fopen`**, are built on top of the |-------------|---------------------| |**`_setmaxstdio`**|``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -59,4 +59,4 @@ See [`_getmaxstdio`](getmaxstdio.md) for an example of using **`_setmaxstdio`**. ## See also -[Stream I/O](../../c-runtime-library/stream-i-o.md) +[Stream I/O](../stream-i-o.md) diff --git a/docs/c-runtime-library/reference/setmbcp.md b/docs/c-runtime-library/reference/setmbcp.md index ef776315363..6355d9bad62 100644 --- a/docs/c-runtime-library/reference/setmbcp.md +++ b/docs/c-runtime-library/reference/setmbcp.md @@ -24,28 +24,28 @@ int _setmbcp( ### Parameters -*codepage*
+*`codepage`*\ New code page setting for locale-independent multibyte routines. -## Return Value +## Return value -Returns 0 if the code page is set successfully. If an invalid code page value is supplied for *codepage*, returns -1 and the code page setting is unchanged. Sets **errno** to **EINVAL** if a memory allocation failure occurs. +Returns 0 if the code page is set successfully. If an invalid code page value is supplied for *`codepage`*, returns -1 and the code page setting is unchanged. Sets **errno** to **EINVAL** if a memory allocation failure occurs. ## Remarks -The **_setmbcp** function specifies a new multibyte code page. By default, the run-time system automatically sets the multibyte code page to the system-default ANSI code page. The multibyte code page setting affects all multibyte routines that are not locale dependent. However, it is possible to instruct **_setmbcp** to use the code page defined for the current locale (see the following list of manifest constants and associated behavior results). For a list of the multibyte routines that are dependent on the locale code page rather than the multibyte code page, see [Interpretation of Multibyte-Character Sequences](../../c-runtime-library/interpretation-of-multibyte-character-sequences.md). +The **_setmbcp** function specifies a new multibyte code page. By default, the run-time system automatically sets the multibyte code page to the system-default ANSI code page. The multibyte code page setting affects all multibyte routines that are not locale dependent. However, it is possible to instruct **_setmbcp** to use the code page defined for the current locale (see the following list of manifest constants and associated behavior results). For a list of the multibyte routines that are dependent on the locale code page rather than the multibyte code page, see [Interpretation of multibyte-character sequences](../interpretation-of-multibyte-character-sequences.md). -The *codepage* argument can be set to any of the following values: +The *`codepage`* argument can be set to any of the following values: - **_MB_CP_ANSI** Use ANSI code page obtained from operating system at program startup. -- **_MB_CP_LOCALE** Use the current locale's code page obtained from a previous call to [setlocale](setlocale-wsetlocale.md). +- **_MB_CP_LOCALE** Use the current locale's code page obtained from a previous call to [`setlocale`](setlocale-wsetlocale.md). - **_MB_CP_OEM** Use OEM code page obtained from operating system at program startup. -- **_MB_CP_SBCS** Use single-byte code page. When the code page is set to **_MB_CP_SBCS**, a routine such as [_ismbblead](ismbblead-ismbblead-l.md) always returns false. +- **_MB_CP_SBCS** Use single-byte code page. When the code page is set to **_MB_CP_SBCS**, a routine such as [`_ismbblead`](ismbblead-ismbblead-l.md) always returns false. -- **_MB_CP_UTF8** Use UTF-8. When the code page is set to **_MB_CP_UTF8**, a routine such as [_ismbblead](ismbblead-ismbblead-l.md) always returns false. +- **_MB_CP_UTF8** Use UTF-8. When the code page is set to **_MB_CP_UTF8**, a routine such as [`_ismbblead`](ismbblead-ismbblead-l.md) always returns false. - Any other valid code page value, regardless of whether the value is an ANSI, OEM, or other operating-system-supported code page (except UTF-7, which is not supported). @@ -57,9 +57,9 @@ By default, this function's global state is scoped to the application. To change |-------------|---------------------| |**_setmbcp**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[_getmbcp](getmbcp.md)
-[setlocale, _wsetlocale](setlocale-wsetlocale.md)
+[`_getmbcp`](getmbcp.md)\ +[`setlocale`, `_wsetlocale`](setlocale-wsetlocale.md) diff --git a/docs/c-runtime-library/reference/setmode.md b/docs/c-runtime-library/reference/setmode.md index ec30df818c6..799c6081b79 100644 --- a/docs/c-runtime-library/reference/setmode.md +++ b/docs/c-runtime-library/reference/setmode.md @@ -25,19 +25,19 @@ int _setmode ( ### Parameters -*`fd`*
+*`fd`*\ File descriptor. -*`mode`*
+*`mode`*\ New translation mode. -## Return Value +## Return value If successful, returns the previous translation mode. -If invalid parameters are passed to this function, the invalid-parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, this function returns -1 and sets **`errno`** to either **`EBADF`**, which indicates an invalid file descriptor, or **`EINVAL`**, which indicates an invalid *`mode`* argument. +If invalid parameters are passed to this function, the invalid-parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, this function returns -1 and sets **`errno`** to either **`EBADF`**, which indicates an invalid file descriptor, or **`EINVAL`**, which indicates an invalid *`mode`* argument. -For more information about these 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 these and other return codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks @@ -61,7 +61,7 @@ By default, this function's global state is scoped to the application. To change |-------------|---------------------|----------------------| |**`_setmode`**|``|``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example: Use `_setmode` to change stdin @@ -113,8 +113,8 @@ int main(void) { ## See also -[File Handling](../../c-runtime-library/file-handling.md)
-[`_creat`, `_wcreat`](creat-wcreat.md)
-[`fopen`, `_wfopen`](fopen-wfopen.md)
-[`_open`, `_wopen`](open-wopen.md)
-[`_set_fmode`](set-fmode.md)
+[File handling](../file-handling.md)\ +[`_creat`, `_wcreat`](creat-wcreat.md)\ +[`fopen`, `_wfopen`](fopen-wfopen.md)\ +[`_open`, `_wopen`](open-wopen.md)\ +[`_set_fmode`](set-fmode.md) diff --git a/docs/c-runtime-library/reference/setvbuf.md b/docs/c-runtime-library/reference/setvbuf.md index f7f11cfe567..301e6a806e8 100644 --- a/docs/c-runtime-library/reference/setvbuf.md +++ b/docs/c-runtime-library/reference/setvbuf.md @@ -27,37 +27,37 @@ int setvbuf( ### Parameters -*stream*
+*`stream`*\ Pointer to **FILE** structure. -*buffer*
+*`buffer`*\ User-allocated buffer. -*mode*
+*`mode`*\ Mode of buffering. -*size*
-Buffer size in bytes. Allowable range: 2 <= *size* <= INT_MAX (2147483647). Internally, the value supplied for *size* is rounded down to the nearest multiple of 2. +*`size`*\ +Buffer size in bytes. Allowable range: 2 <= *`size`* <= INT_MAX (2147483647). Internally, the value supplied for *`size`* is rounded down to the nearest multiple of 2. -## Return Value +## Return value Returns 0 if successful. -If *stream* is **NULL**, or if *mode* or *size* is not within a valid change, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, this function returns -1 and sets **errno** to **EINVAL**. +If *`stream`* is **NULL**, or if *`mode`* or *`size`* is not within a valid change, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, this function returns -1 and sets **errno** to **EINVAL**. -For information on these and other error codes, see [_doserrno, errno, _sys_errlist, and _sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +For information on these and other error codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks -The **setvbuf** function allows the program to control both buffering and buffer size for *stream*. *stream* must refer to an open file that has not undergone an I/O operation since it was opened. The array pointed to by *buffer* is used as the buffer, unless it is **NULL**, in which case **setvbuf** uses an automatically allocated buffer of length *size*/2 \* 2 bytes. +The **setvbuf** function allows the program to control both buffering and buffer size for *`stream`*. *`stream`* must refer to an open file that has not undergone an I/O operation since it was opened. The array pointed to by *`buffer`* is used as the buffer, unless it is **NULL**, in which case **setvbuf** uses an automatically allocated buffer of length *`size`*/2 \* 2 bytes. -The mode must be **_IOFBF**, **_IOLBF**, or **_IONBF**. If *mode* is **_IOFBF** or **_IOLBF**, then *size* is used as the size of the buffer. If *mode* is **_IONBF**, the stream is unbuffered and *size* and *buffer* are ignored. Values for *mode* and their meanings are: +The mode must be **_IOFBF**, **_IOLBF**, or **_IONBF**. If *`mode`* is **_IOFBF** or **_IOLBF**, then *`size`* is used as the size of the buffer. If *`mode`* is **_IONBF**, the stream is unbuffered and *`size`* and *`buffer`* are ignored. Values for *`mode`* and their meanings are: -|*mode* value|Meaning| +|*`mode`* value|Meaning| |-|-| -| **_IOFBF** | Full buffering; that is, *buffer* is used as the buffer and *size* is used as the size of the buffer. If *buffer* is **NULL**, an automatically allocated buffer *size* bytes long is used. | +| **_IOFBF** | Full buffering; that is, *`buffer`* is used as the buffer and *`size`* is used as the size of the buffer. If *`buffer`* is **NULL**, an automatically allocated buffer *`size`* bytes long is used. | | **_IOLBF** | For some systems, this provides line buffering. However, for Win32, the behavior is the same as **_IOFBF** - Full Buffering. | -| **_IONBF** | No buffer is used, regardless of *buffer* or *size*. | +| **_IONBF** | No buffer is used, regardless of *`buffer`* or *`size`*. | 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). @@ -67,11 +67,11 @@ By default, this function's global state is scoped to the application. To change |-------------|---------------------| |**setvbuf**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Libraries -All versions of the [C run-time libraries](../../c-runtime-library/crt-library-features.md). +All versions of the [C run-time libraries](../crt-library-features.md). ## Example @@ -112,8 +112,8 @@ int main( void ) ## See also -[Stream I/O](../../c-runtime-library/stream-i-o.md)
-[fclose, _fcloseall](fclose-fcloseall.md)
-[fflush](fflush.md)
-[fopen, _wfopen](fopen-wfopen.md)
-[setbuf](setbuf.md)
+[Stream I/O](../stream-i-o.md)\ +[`fclose`, `_fcloseall`](fclose-fcloseall.md)\ +[`fflush`](fflush.md)\ +[`fopen`, `_wfopen`](fopen-wfopen.md)\ +[`setbuf`](setbuf.md) diff --git a/docs/c-runtime-library/reference/signal.md b/docs/c-runtime-library/reference/signal.md index 00d3f78e8a1..cc4da08ca23 100644 --- a/docs/c-runtime-library/reference/signal.md +++ b/docs/c-runtime-library/reference/signal.md @@ -24,17 +24,17 @@ void __cdecl *signal(int sig, int (*func)(int, int)); ### Parameters -*`sig`*
+*`sig`*\ Signal value. -*`func`*
+*`func`*\ The second parameter is a pointer to the function to be executed. The first parameter is a signal value and the second parameter is a sub-code that can be used when the first parameter is **`SIGFPE`**. -## Return Value +## Return value **`signal`** returns the previous value of func that's associated with the given signal. For example, if the previous value of *`func`* was **`SIG_IGN`**, the return value is also **`SIG_IGN`**. A return value of **`SIG_ERR`** indicates an error; in that case, **`errno`** is set to **`EINVAL`**. -See [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md) for more information about return codes. +See [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md) for more information about return codes. ## Remarks @@ -49,7 +49,7 @@ The **`signal`** function enables a process to choose one of several ways to han |**`SIGSEGV`**|Illegal storage access| |**`SIGTERM`**|Termination request| -If *`sig`* is not one of the above values, the invalid parameter handler is invoked, as defined in [Parameter Validation](../../c-runtime-library/parameter-validation.md) . If execution is allowed to continue, this function sets **`errno`** to **`EINVAL`** and returns **`SIG_ERR`**. +If *`sig`* is not one of the above values, the invalid parameter handler is invoked, as defined in [Parameter validation](../parameter-validation.md) . If execution is allowed to continue, this function sets **`errno`** to **`EINVAL`** and returns **`SIG_ERR`**. By default, **`signal`** terminates the calling program with exit code 3, regardless of the value of *`sig`*. @@ -86,7 +86,7 @@ volatile double d = 0.0f; The **`SIGILL`** and **`SIGTERM`** signals are not generated under Windows. They are included for ANSI compatibility. Therefore, you can set signal handlers for these signals by using **`signal`**, and you can also explicitly generate these signals by calling [`raise`](raise.md). -Signal settings are not preserved in spawned processes that are created by calls to [`_exec`](../../c-runtime-library/exec-wexec-functions.md) or [`_spawn`](../../c-runtime-library/spawn-wspawn-functions.md) functions. The signal settings are reset to the default values in the new process. +Signal settings are not preserved in spawned processes that are created by calls to [`_exec`](../exec-wexec-functions.md) or [`_spawn`](../spawn-wspawn-functions.md) functions. The signal settings are reset to the default values in the new process. ## Requirements @@ -94,7 +94,7 @@ Signal settings are not preserved in spawned processes that are created by calls |-------------|---------------------| |**`signal`**|``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -141,9 +141,9 @@ R6010 ## See also -[Process and Environment Control](../../c-runtime-library/process-and-environment-control.md)
-[`abort`](abort.md)
-[`_exec`, `_wexec` Functions](../../c-runtime-library/exec-wexec-functions.md)
-[`exit`, `_Exit`, `_exit`](exit-exit-exit.md)
-[`_fpreset`](fpreset.md)
-[`_spawn`, `_wspawn` Functions](../../c-runtime-library/spawn-wspawn-functions.md)
+[Process and environment control](../process-and-environment-control.md)\ +[`abort`](abort.md)\ +[`_exec`, `_wexec` functions](../exec-wexec-functions.md)\ +[`exit`, `_Exit`, `_exit`](exit-exit-exit.md)\ +[`_fpreset`](fpreset.md)\ +[`_spawn`, `_wspawn` functions](../spawn-wspawn-functions.md) diff --git a/docs/c-runtime-library/reference/signbit.md b/docs/c-runtime-library/reference/signbit.md index 13f7967a2eb..5bf4cc518dd 100644 --- a/docs/c-runtime-library/reference/signbit.md +++ b/docs/c-runtime-library/reference/signbit.md @@ -31,12 +31,12 @@ inline bool signbit( ### Parameters -*x*
+*`x`*\ The floating-point value to test. ## Return value -**signbit** returns a non-zero value (**`true`** in C++) if the argument *x* is negative or negative infinity. It returns 0 (**`false`** in C++) if the argument is non-negative, positive infinity, or a NAN. +**signbit** returns a non-zero value (**`true`** in C++) if the argument *`x`* is negative or negative infinity. It returns 0 (**`false`** in C++) if the argument is non-negative, positive infinity, or a NAN. ## Remarks @@ -48,13 +48,13 @@ The floating-point value to test. |--------------|---------------------------|-------------------------------| |**signbit**|\|\ or \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Floating-Point Support](../../c-runtime-library/floating-point-support.md)
-[isfinite, _finite, _finitef](finite-finitef.md)
-[isinf](isinf.md)
-[isnan, _isnan, _isnanf](isnan-isnan-isnanf.md)
-[isnormal](isnormal.md)
-[_fpclass, _fpclassf](fpclass-fpclassf.md)
+[Math and floating-point support](../floating-point-support.md)\ +[`isfinite`, `_finite`, `_finitef`](finite-finitef.md)\ +[`isinf`](isinf.md)\ +[`isnan`, `_isnan`, `_isnanf`](isnan-isnan-isnanf.md)\ +[`isnormal`](isnormal.md)\ +[`_fpclass`, `_fpclassf`](fpclass-fpclassf.md) diff --git a/docs/c-runtime-library/reference/sin-sinf-sinl.md b/docs/c-runtime-library/reference/sin-sinf-sinl.md index 13cdb3dc07a..1d7be944e64 100644 --- a/docs/c-runtime-library/reference/sin-sinf-sinl.md +++ b/docs/c-runtime-library/reference/sin-sinf-sinl.md @@ -41,13 +41,13 @@ The **`sin`** functions return the sine of *`x`*. If *`x`* is greater than or eq |± `QNAN`,`IND`|None|`_DOMAIN`| |± ∞ (`sin`, `sinf`, `sinl`)|`INVALID`|`_DOMAIN`| -For more information about return codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +For more information about return codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks Because C++ allows overloading, you can call overloads of **`sin`** that take and return **`float`** or **`long double`** values. In a C program, unless you're using the `` macro to call this function, **`sin`** always takes and returns **`double`**. -If you use the ` sin()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../../c-runtime-library/tgmath.md) for details. +If you use the ` sin()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../tgmath.md) for details. 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). @@ -58,7 +58,7 @@ By default, this function's global state is scoped to the application. To change |**`sin`**, **`sinf`**, **`sinl`**|``|`` or ``| |**`sin()`** macro | `` || -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -90,10 +90,10 @@ cos( 1.570796 ) = 0.000000 ## See also -[Floating-Point Support](../../c-runtime-library/floating-point-support.md)\ +[Math and floating-point support](../floating-point-support.md)\ [`acos`, `acosf`, `acosl`](acos-acosf-acosl.md)\ [`asin`, `asinf`, `asinl`](asin-asinf-asinl.md)\ [`atan`, `atanf`, `atanl`, `atan2`, `atan2f`, `atan2l`](atan-atanf-atanl-atan2-atan2f-atan2l.md)\ [`cos`, `cosf`, `cosl`](cos-cosf-cosl.md)\ [`tan`, `tanf`, `tanl`](tan-tanf-tanl.md)\ -[`_CIsin`](../../c-runtime-library/cisin.md)\ +[`_CIsin`](../cisin.md)\ diff --git a/docs/c-runtime-library/reference/sinh-sinhf-sinhl.md b/docs/c-runtime-library/reference/sinh-sinhf-sinhl.md index 6d55b2dea5d..9dbe17257a3 100644 --- a/docs/c-runtime-library/reference/sinh-sinhf-sinhl.md +++ b/docs/c-runtime-library/reference/sinh-sinhf-sinhl.md @@ -30,7 +30,7 @@ long double sinh(long double x); // C++ only *`x`*\ Angle in radians. -## Return Value +## Return value The **`sinh`** functions return the hyperbolic sine of *`x`*. By default, if the result is too large, **`sinh`** sets **`errno`** to **`ERANGE`** and returns ±**`HUGE_VAL`**. @@ -39,13 +39,13 @@ The **`sinh`** functions return the hyperbolic sine of *`x`*. By default, if the |± `QNAN`,`IND`|None|`_DOMAIN`| |`|x| ≥ 7.104760e+002`|`OVERFLOW+INEXACT`|`OVERFLOW`| -For more information about return codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +For more information about return codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks Because C++ allows overloading, you can call overloads of **`sinh`** that take and return **`float`** or **`long double`** values. In a C program, unless you're using the `` macro to call this function, **`sinh`** always takes and returns **`double`**. -If you use the `` `sinh()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../../c-runtime-library/tgmath.md) for details. +If you use the `` `sinh()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../tgmath.md) for details. 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). @@ -56,7 +56,7 @@ By default, this function's global state is scoped to the application. To change |**`sinh`**, **`sinhf`**, **`sinhl`**|``|`` or ``| |**`sinh()`** macro | `` || -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -89,7 +89,7 @@ cosh( 1.570796 ) = 2.509178 ## See also -[Floating-Point Support](../../c-runtime-library/floating-point-support.md)\ +[Math and floating-point support](../floating-point-support.md)\ [`acosh`, `acoshf`, `acoshl`](acosh-acoshf-acoshl.md)\ [`asinh`, `asinhf`, `asinhl`](asinh-asinhf-asinhl.md)\ [`atanh`, `atanhf`, `atanhl`](atanh-atanhf-atanhl.md)\ diff --git a/docs/c-runtime-library/reference/snprintf-s-snprintf-s-l-snwprintf-s-snwprintf-s-l.md b/docs/c-runtime-library/reference/snprintf-s-snprintf-s-l-snwprintf-s-snwprintf-s-l.md index 74f0dd6f781..b8f7b001ffd 100644 --- a/docs/c-runtime-library/reference/snprintf-s-snprintf-s-l-snwprintf-s-snwprintf-s-l.md +++ b/docs/c-runtime-library/reference/snprintf-s-snprintf-s-l-snwprintf-s-snwprintf-s-l.md @@ -11,7 +11,7 @@ helpviewer_keywords: ["_snprintf_s_l function", "_snwprintf_s_l function", "_snt --- # `_snprintf_s`, `_snprintf_s_l`, `_snwprintf_s`, `_snwprintf_s_l` -Writes formatted data to a string. These are versions of [`snprintf`, `_snprintf`, `_snprintf_l`, `_snwprintf`, `_snwprintf_l`](snprintf-snprintf-snprintf-l-snwprintf-snwprintf-l.md) with security enhancements as described in [Security Features in the CRT](../../c-runtime-library/security-features-in-the-crt.md). +Writes formatted data to a string. These are versions of [`snprintf`, `_snprintf`, `_snprintf_l`, `_snwprintf`, `_snwprintf_l`](snprintf-snprintf-snprintf-l-snwprintf-snwprintf-l.md) with security enhancements as described in [Security features in the CRT](../security-features-in-the-crt.md). ## Syntax @@ -64,39 +64,39 @@ int _snwprintf_s( ### Parameters -*`buffer`*
+*`buffer`*\ Storage location for the output. -*`sizeOfBuffer`*
+*`sizeOfBuffer`*\ The size of the storage location for output. Size in **`bytes`** for **`_snprintf_s`** or size in **`words`** for **`_snwprintf_s`**. -*`count`*
-Maximum number of characters to store, or [`_TRUNCATE`](../../c-runtime-library/truncate.md). +*`count`*\ +Maximum number of characters to store, or [`_TRUNCATE`](../truncate.md). -*`format`*
+*`format`*\ Format-control string. -*`argument`*
+*`argument`*\ Optional arguments. -*`locale`*
+*`locale`*\ The locale to use. -## Return Value +## Return value **`_snprintf_s`** returns the number of characters stored in *`buffer`*, not counting the terminating null character. **`_snwprintf_s`** returns the number of wide characters stored in *`buffer`*, not counting the terminating null wide character. -If the storage required to store the data and a terminating null exceeds *`sizeOfBuffer`*, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution continues after the invalid parameter handler, these functions set *`buffer`* to an empty string, set **`errno`** to **`ERANGE`**, and return -1. +If the storage required to store the data and a terminating null exceeds *`sizeOfBuffer`*, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution continues after the invalid parameter handler, these functions set *`buffer`* to an empty string, set **`errno`** to **`ERANGE`**, and return -1. If *`buffer`* or *`format`* is a **`NULL`** pointer, or if *`count`* is less than or equal to zero, the invalid parameter handler is invoked. If execution is allowed to continue, these functions set **`errno`** to **`EINVAL`** and return -1. -For information about these and other error codes, see [`_doserrno`, `errno`, `_sys_errlist`, and `_sys_nerr`](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +For information about these and other error codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks -The **`_snprintf_s`** function formats and stores *`count`* or fewer characters in *`buffer`* and appends a terminating null. Each argument (if any) is converted and output according to the corresponding format specification in *`format`*. The formatting is consistent with the **`printf`** family of functions; see [Format Specification Syntax: `printf` and `wprintf` Functions](../../c-runtime-library/format-specification-syntax-printf-and-wprintf-functions.md). If copying occurs between strings that overlap, the behavior is undefined. +The **`_snprintf_s`** function formats and stores *`count`* or fewer characters in *`buffer`* and appends a terminating null. Each argument (if any) is converted and output according to the corresponding format specification in *`format`*. The formatting is consistent with the **`printf`** family of functions; see [Format specification syntax: `printf` and `wprintf` functions](../format-specification-syntax-printf-and-wprintf-functions.md). If copying occurs between strings that overlap, the behavior is undefined. -If *`count`* is [`_TRUNCATE`](../../c-runtime-library/truncate.md), then **`_snprintf_s`** writes as much of the string as will fit in *`buffer`* while leaving room for a terminating null. If the entire string (with terminating null) fits in *`buffer`*, then **`_snprintf_s`** returns the number of characters written (not including the terminating null); otherwise, **`_snprintf_s`** returns -1 to indicate that truncation occurred. +If *`count`* is [`_TRUNCATE`](../truncate.md), then **`_snprintf_s`** writes as much of the string as will fit in *`buffer`* while leaving room for a terminating null. If the entire string (with terminating null) fits in *`buffer`*, then **`_snprintf_s`** returns the number of characters written (not including the terminating null); otherwise, **`_snprintf_s`** returns -1 to indicate that truncation occurred. > [!IMPORTANT] > Ensure that *`format`* is not a user-defined string. @@ -108,9 +108,9 @@ If *`count`* is [`_TRUNCATE`](../../c-runtime-library/truncate.md), then **`_snp The versions of these functions with the **`_l`** suffix are identical except that they use the locale parameter passed in instead of the current thread locale. -In C++, using these functions is simplified by template overloads; the overloads can infer buffer length automatically (eliminating the need to specify a size argument) and they can automatically replace older, non-secure functions with their newer, secure counterparts. For more information, see [Secure Template Overloads](../../c-runtime-library/secure-template-overloads.md). +In C++, using these functions is simplified by template overloads; the overloads can infer buffer length automatically (eliminating the need to specify a size argument) and they can automatically replace older, non-secure functions with their newer, secure counterparts. For more information, see [Secure template overloads](../secure-template-overloads.md). -### Generic-Text Routine Mappings +### Generic-text routine mappings |`Tchar.h` routine|`_UNICODE` and `_MBCS` not defined|`_MBCS` defined|`_UNICODE` defined| |---------------------|--------------------------------------|--------------------|-----------------------| @@ -124,7 +124,7 @@ In C++, using these functions is simplified by template overloads; the overloads |**`_snprintf_s`**, **`_snprintf_s_l`**|``| |**`_snwprintf_s`**, **`_snwprintf_s_l`**|`` or ``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -256,10 +256,10 @@ Invalid parameter handler invoked: ("Buffer too small", 0) ## See also -[Stream I/O](../../c-runtime-library/stream-i-o.md)
-[`sprintf`, `_sprintf_l`, `swprintf`, `_swprintf_l`, `__swprintf_l`](sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md)
-[`fprintf`, `_fprintf_l`, `fwprintf`, `_fwprintf_l`](fprintf-fprintf-l-fwprintf-fwprintf-l.md)
-[`printf`, `_printf_l`, `wprintf`, `_wprintf_l`](printf-printf-l-wprintf-wprintf-l.md)
-[`scanf`, `_scanf_l`, `wscanf`, `_wscanf_l`](scanf-scanf-l-wscanf-wscanf-l.md)
-[`sscanf`, `_sscanf_l`, `swscanf`, `_swscanf_l`](sscanf-sscanf-l-swscanf-swscanf-l.md)
-[`vprintf` Functions](../../c-runtime-library/vprintf-functions.md)
+[Stream I/O](../stream-i-o.md)\ +[`sprintf`, `_sprintf_l`, `swprintf`, `_swprintf_l`, `__swprintf_l`](sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md)\ +[`fprintf`, `_fprintf_l`, `fwprintf`, `_fwprintf_l`](fprintf-fprintf-l-fwprintf-fwprintf-l.md)\ +[`printf`, `_printf_l`, `wprintf`, `_wprintf_l`](printf-printf-l-wprintf-wprintf-l.md)\ +[`scanf`, `_scanf_l`, `wscanf`, `_wscanf_l`](scanf-scanf-l-wscanf-wscanf-l.md)\ +[`sscanf`, `_sscanf_l`, `swscanf`, `_swscanf_l`](sscanf-sscanf-l-swscanf-swscanf-l.md)\ +[`vprintf` functions](../vprintf-functions.md) diff --git a/docs/c-runtime-library/reference/snprintf-snprintf-snprintf-l-snwprintf-snwprintf-l.md b/docs/c-runtime-library/reference/snprintf-snprintf-snprintf-l-snwprintf-snwprintf-l.md index cfe357ab0eb..6b14201726c 100644 --- a/docs/c-runtime-library/reference/snprintf-snprintf-snprintf-l-snwprintf-snwprintf-l.md +++ b/docs/c-runtime-library/reference/snprintf-snprintf-snprintf-l-snwprintf-snwprintf-l.md @@ -82,24 +82,24 @@ int _snwprintf_l( ### Parameters -*`buffer`*
+*`buffer`*\ Storage location for the output. -*`count`*
+*`count`*\ Maximum number of characters to store. -*`format`*
+*`format`*\ Format-control string. -*`argument`*
+*`argument`*\ Optional arguments. -*`locale`*
+*`locale`*\ The locale to use. -For more information, see [Format Specification Syntax: `printf` and `wprintf` Functions](../../c-runtime-library/format-specification-syntax-printf-and-wprintf-functions.md). +For more information, see [Format specification syntax: `printf` and `wprintf` functions](../format-specification-syntax-printf-and-wprintf-functions.md). -## Return Value +## Return value Let **`len`** be the length of the formatted data string, not including the terminating null. Both **`len`** and **`count`** are the number of characters for **`snprintf`** and **`_snprintf`**, and the number of wide characters for **`_snwprintf`**. @@ -111,16 +111,16 @@ For all functions other than **`snprintf`**, if **`len`** = *`count`*, **`len`** If *`buffer`* is a null pointer and *`count`* is zero, **`len`** is returned as the count of characters required to format the output, not including the terminating null. To make a successful call with the same *`argument`* and *`locale`* parameters, allocate a buffer holding at least **`len`** + 1 characters. -If *`buffer`* is a null pointer and *`count`* is nonzero, or if *`format`* is a null pointer, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, these functions return -1 and set **`errno`** to **`EINVAL`**. +If *`buffer`* is a null pointer and *`count`* is nonzero, or if *`format`* is a null pointer, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, these functions return -1 and set **`errno`** to **`EINVAL`**. -For information about these and other error codes, see [`errno`, `_doserrno`, `_sys_errlist, and `_sys_nerr`](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +For information about these and other error codes, see [`errno`, `_doserrno`, `_sys_errlist, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks The **`snprintf`** function and the **`_snprintf`** family of functions format and store *`count`* or fewer characters in *`buffer`*. The **`snprintf`** function always stores a terminating null character, truncating the output if necessary. The **`_snprintf`** family of functions only appends a terminating null character if the formatted string length is strictly less than *`count`* characters. Each *`argument`* (if any) is converted and is output according to the corresponding format specification in *`format`*. The format consists of ordinary characters and has the same form and function as the *`format`* argument for [`printf`](printf-printf-l-wprintf-wprintf-l.md). If copying occurs between strings that overlap, the behavior is undefined. > [!IMPORTANT] -> Ensure that *`format`* is not a user-defined string. Because the **`_snprintf`** functions do not guarantee null termination—in particular, when the return value is *`count`*—make sure that they are followed by code that adds the null terminator. For more information, see [Avoiding Buffer Overruns](/windows/win32/SecBP/avoiding-buffer-overruns). +> Ensure that *`format`* is not a user-defined string. Because the **`_snprintf`** functions do not guarantee null termination—in particular, when the return value is *`count`*—make sure that they are followed by code that adds the null terminator. For more information, see [Avoiding buffer overruns](/windows/win32/SecBP/avoiding-buffer-overruns). > > Starting in Windows 10 version 2004 (build 19041), the `printf` family of functions prints exactly representable floating point numbers according to the IEEE 754 rules for rounding. In previous versions of Windows, exactly representable floating point numbers ending in '5' would always round up. IEEE 754 states that they must round to the closest even digit (also known as "Banker's Rounding"). For example, both `printf("%1.0f", 1.5)` and `printf("%1.0f", 2.5)` should round to 2. Previously, 1.5 would round to 2 and 2.5 would round to 3. This change only affects exactly representable numbers. For example, 2.35 (which, when represented in memory, is closer to 2.35000000000000008) continues to round up to 2.4. Rounding done by these functions now also respects the floating point rounding mode set by [`fesetround`](fegetround-fesetround2.md). Previously, rounding always chose `FE_TONEAREST` behavior. This change only affects programs built using Visual Studio 2019 version 16.2 and later. To use the legacy floating point rounding behavior, link with [`legacy_stdio_float_rounding.obj`](../link-options.md). @@ -130,9 +130,9 @@ Beginning with the UCRT in Visual Studio 2015 and Windows 10, **`snprintf`** is The versions of these functions that have the **`_l`** suffix are identical except that they use the locale parameter passed in instead of the current thread locale. -In C++, these functions have template overloads that invoke their newer, more secure counterparts. For more information, see [Secure Template Overloads](../../c-runtime-library/secure-template-overloads.md). +In C++, these functions have template overloads that invoke their newer, more secure counterparts. For more information, see [Secure template overloads](../secure-template-overloads.md). -### Generic-Text Routine Mappings +### Generic-text routine mappings |`Tchar.h` routine|`_UNICODE` and `_MBCS` not defined|`_MBCS` defined|`_UNICODE` defined| |---------------------|--------------------------------------|--------------------|-----------------------| @@ -146,7 +146,7 @@ In C++, these functions have template overloads that invoke their newer, more se |**`snprintf`**, **`_snprintf`**, **`_snprintf_l`**|``| |**`_snwprintf`**, **`_snwprintf_l`**|`` or ``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -263,10 +263,10 @@ character count = 69 ## See also -[Stream I/O](../../c-runtime-library/stream-i-o.md)
-[`sprintf`, `_sprintf_l`, `swprintf`, `_swprintf_l`, `__swprintf_l`](sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md)
-[`fprintf`, `_fprintf_l`, `fwprintf`, `_fwprintf_l`](fprintf-fprintf-l-fwprintf-fwprintf-l.md)
-[`printf`, `_printf_l`, `wprintf`, `_wprintf_l`](printf-printf-l-wprintf-wprintf-l.md)
-[`scanf`, `_scanf_l`, `wscanf`, `_wscanf_l`](scanf-scanf-l-wscanf-wscanf-l.md)
-[`sscanf`, `_sscanf_l`, `swscanf`, `_swscanf_l`](sscanf-sscanf-l-swscanf-swscanf-l.md)
-[`vprintf` Functions](../../c-runtime-library/vprintf-functions.md)
+[Stream I/O](../stream-i-o.md)\ +[`sprintf`, `_sprintf_l`, `swprintf`, `_swprintf_l`, `__swprintf_l`](sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md)\ +[`fprintf`, `_fprintf_l`, `fwprintf`, `_fwprintf_l`](fprintf-fprintf-l-fwprintf-fwprintf-l.md)\ +[`printf`, `_printf_l`, `wprintf`, `_wprintf_l`](printf-printf-l-wprintf-wprintf-l.md)\ +[`scanf`, `_scanf_l`, `wscanf`, `_wscanf_l`](scanf-scanf-l-wscanf-wscanf-l.md)\ +[`sscanf`, `_sscanf_l`, `swscanf`, `_swscanf_l`](sscanf-sscanf-l-swscanf-swscanf-l.md)\ +[`vprintf` functions](../vprintf-functions.md) diff --git a/docs/c-runtime-library/reference/snscanf-s-snscanf-s-l-snwscanf-s-snwscanf-s-l.md b/docs/c-runtime-library/reference/snscanf-s-snscanf-s-l-snwscanf-s-snwscanf-s-l.md index 5b7c23ac43d..60f935999c9 100644 --- a/docs/c-runtime-library/reference/snscanf-s-snscanf-s-l-snwscanf-s-snwscanf-s-l.md +++ b/docs/c-runtime-library/reference/snscanf-s-snscanf-s-l-snwscanf-s-snwscanf-s-l.md @@ -12,7 +12,7 @@ ms.assetid: 72356653-7362-461a-af73-597b9c0a8094 --- # _snscanf_s, _snscanf_s_l, _snwscanf_s, _snwscanf_s_l -Reads formatted data of a specified length from a string. These are versions of [_snscanf, _snscanf_l, _snwscanf, _snwscanf_l](snscanf-snscanf-l-snwscanf-snwscanf-l.md) with security enhancements as described in [Security Features in the CRT](../../c-runtime-library/security-features-in-the-crt.md). +Reads formatted data of a specified length from a string. These are versions of [`_snscanf`, `_snscanf_l`, `_snwscanf`, `_snwscanf_l`](snscanf-snscanf-l-snwscanf-snwscanf-l.md) with security enhancements as described in [Security features in the CRT](../security-features-in-the-crt.md). ## Syntax @@ -43,41 +43,41 @@ int __cdecl _snwscanf_s_l( ### Parameters -*input*
+*`input`*\ Input string to examine. -*length*
-Number of characters to examine in *input*. +*`length`*\ +Number of characters to examine in *`input`*. -*format*
+*`format`*\ One or more format specifiers. -*locale*
+*`locale`*\ The locale to use. -*argument_list*
+*`argument_list`*\ Optional arguments to be assigned according to the format string. -## Return Value +## Return value -Both of these functions returns the number of fields successfully converted and assigned; the return value does not include fields that were read but not assigned. A return value of 0 indicates that no fields were assigned. The return value is **EOF** for an error or if the end of the string is reached before the first conversion. For more information, see [sscanf_s, _sscanf_s_l, swscanf_s, _swscanf_s_l](sscanf-s-sscanf-s-l-swscanf-s-swscanf-s-l.md). +Both of these functions returns the number of fields successfully converted and assigned; the return value does not include fields that were read but not assigned. A return value of 0 indicates that no fields were assigned. The return value is **EOF** for an error or if the end of the string is reached before the first conversion. For more information, see [`sscanf_s`, `_sscanf_s_l`, `swscanf_s`, `_swscanf_s_l`](sscanf-s-sscanf-s-l-swscanf-s-swscanf-s-l.md). -If *input* or *format* is a **NULL** pointer, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, these functions return **EOF** and set **errno** to **EINVAL**. +If *`input`* or *`format`* is a **NULL** pointer, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, these functions return **EOF** and set **errno** to **EINVAL**. -For information about these and other error codes, see [_doserrno, errno, _sys_errlist, and _sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +For information about these and other error codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks -This function is like **sscanf_s** except that it provides the ability to specify a fixed number of characters to examine from the input string. For more information, see [sscanf_s, _sscanf_s_l, swscanf_s, _swscanf_s_l](sscanf-s-sscanf-s-l-swscanf-s-swscanf-s-l.md). +This function is like **sscanf_s** except that it provides the ability to specify a fixed number of characters to examine from the input string. For more information, see [`sscanf_s`, `_sscanf_s_l`, `swscanf_s`, `_swscanf_s_l`](sscanf-s-sscanf-s-l-swscanf-s-swscanf-s-l.md). -The buffer size parameter is required with the type field characters **c**, **C**, **s**, **S**, and **[**. For more information, see [scanf Type Field Characters](../../c-runtime-library/scanf-type-field-characters.md). +The buffer size parameter is required with the type field characters **c**, **C**, **s**, **S**, and **[**. For more information, see [scanf Type Field Characters](../scanf-type-field-characters.md). > [!NOTE] > The size parameter is of type **`unsigned`**, not **size_t**. The versions of these functions with the **_l** suffix are identical except that they use the locale parameter passed in instead of the current thread locale. -### Generic-Text Routine Mappings +### Generic-text routine mappings |Tchar.h routine|_UNICODE and _MBCS not defined|_MBCS defined|_UNICODE defined| |---------------------|--------------------------------------|--------------------|-----------------------| @@ -91,7 +91,7 @@ The versions of these functions with the **_l** suffix are identical except that |**_snscanf_s**, **_snscanf_s_l**|\| |**_snwscanf_s**, **_snwscanf_s_l**|\ or \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -130,4 +130,4 @@ _snwscanf_s converted 2 fields: 15 and 12.000000 ## See also -[scanf Width Specification](../../c-runtime-library/scanf-width-specification.md)
+[scanf Width Specification](../scanf-width-specification.md) diff --git a/docs/c-runtime-library/reference/snscanf-snscanf-l-snwscanf-snwscanf-l.md b/docs/c-runtime-library/reference/snscanf-snscanf-l-snwscanf-snwscanf-l.md index a08e358e24f..2c7f8b3ce07 100644 --- a/docs/c-runtime-library/reference/snscanf-snscanf-l-snwscanf-snwscanf-l.md +++ b/docs/c-runtime-library/reference/snscanf-snscanf-l-snwscanf-snwscanf-l.md @@ -12,7 +12,7 @@ ms.assetid: da1ac890-f905-4cd7-954b-3c90957b5551 --- # _snscanf, _snscanf_l, _snwscanf, _snwscanf_l -Reads formatted data of a specified length from a string. More secure versions of these functions are available; see [_snscanf_s, _snscanf_s_l, _snwscanf_s, _snwscanf_s_l](snscanf-s-snscanf-s-l-snwscanf-s-snwscanf-s-l.md). +Reads formatted data of a specified length from a string. More secure versions of these functions are available; see [`_snscanf_s`, `_snscanf_s_l`, `_snwscanf_s`, `_snwscanf_s_l`](snscanf-s-snscanf-s-l-snwscanf-s-snwscanf-s-l.md). ## Syntax @@ -47,36 +47,36 @@ int __cdecl _snwscanf_l( ### Parameters -*input*
+*`input`*\ Input string to examine. -*length*
-Number of characters to examine in *input*. +*`length`*\ +Number of characters to examine in *`input`*. -*format*
+*`format`*\ One or more format specifiers. -*...*
-Optional variables that will be used to store the values extracted from the input string by the format specifiers in *format*. +*`...`*\ +Optional variables that will be used to store the values extracted from the input string by the format specifiers in *`format`*. -*locale*
+*`locale`*\ The locale to use. -## Return Value +## Return value -Both of these functions returns the number of fields successfully converted and assigned; the return value does not include fields that were read but not assigned. A return value of 0 indicates that no fields were assigned. The return value is **EOF** for an error or if the end of the string is reached before the first conversion. For more information, see [sscanf](sscanf-sscanf-l-swscanf-swscanf-l.md). +Both of these functions returns the number of fields successfully converted and assigned; the return value does not include fields that were read but not assigned. A return value of 0 indicates that no fields were assigned. The return value is **EOF** for an error or if the end of the string is reached before the first conversion. For more information, see [`sscanf`](sscanf-sscanf-l-swscanf-swscanf-l.md). -If *input* or *format* is a **NULL** pointer, or if *length* is less than or equal to zero, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, these functions return **EOF** and set **errno** to **EINVAL**. +If *`input`* or *`format`* is a **NULL** pointer, or if *`length`* is less than or equal to zero, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, these functions return **EOF** and set **errno** to **EINVAL**. -For information about these and other error codes, see [_doserrno, errno, _sys_errlist, and _sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +For information about these and other error codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks -This function is like **sscanf** except that it provides the ability to specify a fixed number of characters to examine from the input string. For more information, see [sscanf](sscanf-sscanf-l-swscanf-swscanf-l.md). +This function is like **sscanf** except that it provides the ability to specify a fixed number of characters to examine from the input string. For more information, see [`sscanf`](sscanf-sscanf-l-swscanf-swscanf-l.md). The versions of these functions with the **_l** suffix are identical except that they use the locale parameter passed in instead of the current thread locale. -### Generic-Text Routine Mappings +### Generic-text routine mappings |Tchar.h routine|_UNICODE and _MBCS not defined|_MBCS defined|_UNICODE defined| |---------------------|--------------------------------------|--------------------|-----------------------| @@ -90,7 +90,7 @@ The versions of these functions with the **_l** suffix are identical except that |**_snscanf**, **_snscanf_l**|\| |**_snwscanf**, **_snwscanf_l**|\ or \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -127,4 +127,4 @@ _snwscanf converted 2 fields: 15 and 12.000000 ## See also -[scanf Width Specification](../../c-runtime-library/scanf-width-specification.md)
+[scanf Width Specification](../scanf-width-specification.md) diff --git a/docs/c-runtime-library/reference/sopen-s-wsopen-s.md b/docs/c-runtime-library/reference/sopen-s-wsopen-s.md index 03ad5bcd058..92edae0d77b 100644 --- a/docs/c-runtime-library/reference/sopen-s-wsopen-s.md +++ b/docs/c-runtime-library/reference/sopen-s-wsopen-s.md @@ -12,7 +12,7 @@ ms.assetid: 059a0084-d08c-4973-9174-55e391b72aa2 --- # `_sopen_s`, `_wsopen_s` -Opens a file for sharing. These versions of [`_sopen` and `_wsopen`](sopen-wsopen.md) have security enhancements, as described in [Security Features in the CRT](../../c-runtime-library/security-features-in-the-crt.md). +Opens a file for sharing. These versions of [`_sopen` and `_wsopen`](sopen-wsopen.md) have security enhancements, as described in [Security features in the CRT](../security-features-in-the-crt.md). ## Syntax @@ -62,9 +62,9 @@ A nonzero return value indicates an error; in that case **`errno`** is set to on | **`EMFILE`** | No more file descriptors available. | | **`ENOENT`** | File or path not found. | -If an invalid argument is passed to the function, the invalid parameter handler is invoked, as described in [Parameter validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, **`errno`** is set to **`EINVAL`** and **`EINVAL`** is returned. +If an invalid argument is passed to the function, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, **`errno`** is set to **`EINVAL`** and **`EINVAL`** is returned. -For more information about these and other return codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +For more information about these and other return codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). If there's an error, -1 is returned through *`pfh`* (unless *`pfh`* is a null pointer). @@ -95,7 +95,7 @@ The integer expression *`oflag`* is formed by combining one or more manifest con | **`_O_RDONLY`** | Opens a file for reading only. Can't be specified with **`_O_RDWR`** or **`_O_WRONLY`**. | | **`_O_RDWR`** | Opens a file for both reading and writing. Can't be specified with **`_O_RDONLY`** or **`_O_WRONLY`**. | | **`_O_SEQUENTIAL`** | Specifies that caching is optimized for, but not restricted to, sequential access from disk. | -| **`_O_TEXT`** | Opens a file in text (translated) mode. (For more information, see [Text and Binary Mode File I/O](../../c-runtime-library/text-and-binary-mode-file-i-o.md) and [`fopen`](fopen-wfopen.md).) | +| **`_O_TEXT`** | Opens a file in text (translated) mode. (For more information, see [Text and binary mode file I/O](../text-and-binary-mode-file-i-o.md) and [`fopen`](fopen-wfopen.md).) | | **`_O_TRUNC`** | Opens a file and truncates it to zero length; the file must have write permission. Can't be specified with **`_O_RDONLY`**. **`_O_TRUNC`** used with **`_O_CREAT`** opens an existing file or creates a file. **Note:** The **`_O_TRUNC`** flag destroys the contents of the specified file. | | **`_O_WRONLY`** | Opens a file for writing only. Can't be specified with **`_O_RDONLY`** or **`_O_RDWR`**. | | **`_O_U16TEXT`** | Opens a file in Unicode UTF-16 mode. | @@ -136,7 +136,7 @@ If write permission isn't given, the file is read-only. In the Windows operating | **`_sopen_s`** | `` | ``, ``, ``, `` | | **`_wsopen_s`** | `` or `` | ``, ``, ``, `` | -**`_sopen_s`** and **`_wsopen_s`** are Microsoft extensions. For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +**`_sopen_s`** and **`_wsopen_s`** are Microsoft extensions. For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -144,7 +144,7 @@ See the example for [`_locking`](locking.md). ## See also -[Low-level I/O](../../c-runtime-library/low-level-i-o.md)\ +[Low-level I/O](../low-level-i-o.md)\ [`_close`](close.md)\ [`_creat`, `_wcreat`](creat-wcreat.md)\ [`fopen`, `_wfopen`](fopen-wfopen.md)\ diff --git a/docs/c-runtime-library/reference/sopen-wsopen.md b/docs/c-runtime-library/reference/sopen-wsopen.md index 096462619d3..64e11ad714a 100644 --- a/docs/c-runtime-library/reference/sopen-wsopen.md +++ b/docs/c-runtime-library/reference/sopen-wsopen.md @@ -49,7 +49,7 @@ Permission setting. Each of these functions returns a file descriptor for the opened file. -If *`filename`* or *`oflag`* is a **`NULL`** pointer, or if *`oflag`* or *`shflag`* isn't within a valid range of values, the invalid parameter handler is invoked, as described in [Parameter validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, these functions return -1 and set **`errno`** to one of the following values. +If *`filename`* or *`oflag`* is a **`NULL`** pointer, or if *`oflag`* or *`shflag`* isn't within a valid range of values, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, these functions return -1 and set **`errno`** to one of the following values. | `errno` value | Condition | |--|--| @@ -59,7 +59,7 @@ If *`filename`* or *`oflag`* is a **`NULL`** pointer, or if *`oflag`* or *`shfla | **`EMFILE`** | No more file descriptors are available. | | **`ENOENT`** | File or path isn't found. | -For more information about these 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 these and other return codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks @@ -88,7 +88,7 @@ The integer expression *`oflag`* is formed by combining one or more of the follo | **`_O_RDONLY`** | Opens a file for reading only. Can't be specified with **`_O_RDWR`** or **`_O_WRONLY`**. | | **`_O_RDWR`** | Opens a file for both reading and writing. Can't be specified with **`_O_RDONLY`** or **`_O_WRONLY`**. | | **`_O_SEQUENTIAL`** | Specifies that caching is optimized for, but not restricted to, sequential access from disk. | -| **`_O_TEXT`** | Opens a file in text (translated) mode. (For more information, see [Text and binary mode file I/O](../../c-runtime-library/text-and-binary-mode-file-i-o.md) and [`fopen`](fopen-wfopen.md).) | +| **`_O_TEXT`** | Opens a file in text (translated) mode. (For more information, see [Text and binary mode file I/O](../text-and-binary-mode-file-i-o.md) and [`fopen`](fopen-wfopen.md).) | | **`_O_TRUNC`** | Opens a file and truncates it to zero length; the file must have write permission. Can't be specified with **`_O_RDONLY`**. **`_O_TRUNC`** used with **`_O_CREAT`** opens an existing file or creates a file. **Note:** The **`_O_TRUNC`** flag destroys the contents of the specified file. | | **`_O_WRONLY`** | Opens a file for writing only. Can't be specified with **`_O_RDONLY`** or **`_O_RDWR`**. | | **`_O_U16TEXT`** | Opens a file in Unicode UTF-16 mode. | @@ -129,7 +129,7 @@ If write permission isn't given, the file is read-only. In the Windows operating | **`_sopen`** | `` | ``, ``, ``, `` | | **`_wsopen`** | `` or `` | ``, ``, ``, `` | -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -137,7 +137,7 @@ See the example for [`_locking`](locking.md). ## See also -[Low-level I/O](../../c-runtime-library/low-level-i-o.md)\ +[Low-level I/O](../low-level-i-o.md)\ [`_close`](close.md)\ [`_creat`, `_wcreat`](creat-wcreat.md)\ [`fopen`, `_wfopen`](fopen-wfopen.md)\ diff --git a/docs/c-runtime-library/reference/sopen.md b/docs/c-runtime-library/reference/sopen.md index 324b2d8d17f..d9c6a2f0e34 100644 --- a/docs/c-runtime-library/reference/sopen.md +++ b/docs/c-runtime-library/reference/sopen.md @@ -12,6 +12,6 @@ ms.assetid: 1ce0b707-0c9e-4942-8467-ce7f6cd68acc --- # sopen -The Microsoft-specific function name `sopen` is a deprecated alias for the [_sopen](sopen-wsopen.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. +The Microsoft-specific function name `sopen` is a deprecated alias for the [`_sopen`](sopen-wsopen.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. -We recommend you use [_sopen](sopen-wsopen.md) or the security-enhanced [_sopen_s](sopen-s-wsopen-s.md) function instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). +We recommend you use [`_sopen`](sopen-wsopen.md) or the security-enhanced [`_sopen_s`](sopen-s-wsopen-s.md) function instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). diff --git a/docs/c-runtime-library/reference/spawnl-wspawnl.md b/docs/c-runtime-library/reference/spawnl-wspawnl.md index 6fcd0d41169..66797d09837 100644 --- a/docs/c-runtime-library/reference/spawnl-wspawnl.md +++ b/docs/c-runtime-library/reference/spawnl-wspawnl.md @@ -40,30 +40,30 @@ intptr_t _wspawnl( ### Parameters -*mode*
+*`mode`*\ Execution mode for the calling process. -*cmdname*
+*`cmdname`*\ Path of the file to be executed. -*arg0*, *arg1*, ... *argn*
-List of pointers to arguments. The *arg0* argument is usually a pointer to *cmdname*. The arguments *arg1* through *argn* are pointers to the character strings forming the new argument list. Following *argn*, there must be a **NULL** pointer to mark the end of the argument list. +*`arg0`*, *`arg1`*, ... *`argN`*\ +List of pointers to arguments. The *`arg0`* argument is usually a pointer to *`cmdname`*. The arguments *`arg1`* through *`argN`* are pointers to the character strings forming the new argument list. Following *`argN`*, there must be a **NULL** pointer to mark the end of the argument list. -## Return Value +## Return value -The return value from a synchronous **_spawnl** or **_wspawnl** (**_P_WAIT** specified for *mode*) is the exit status of the new process. The return value from an asynchronous **_spawnl** or **_wspawnl** (**_P_NOWAIT** or **_P_NOWAITO** specified for *mode*) is the process handle. The exit status is 0 if the process terminated normally. You can set the exit status to a nonzero value if the spawned process specifically calls the **exit** routine with a nonzero argument. If the new process did not explicitly set a positive exit status, a positive exit status indicates an abnormal exit with an abort or an interrupt. A return value of -1 indicates an error (the new process is not started). In this case, **errno** is set to one of the following values. +The return value from a synchronous **_spawnl** or **_wspawnl** (**_P_WAIT** specified for *`mode`*) is the exit status of the new process. The return value from an asynchronous **_spawnl** or **_wspawnl** (**_P_NOWAIT** or **_P_NOWAITO** specified for *`mode`*) is the process handle. The exit status is 0 if the process terminated normally. You can set the exit status to a nonzero value if the spawned process specifically calls the **exit** routine with a nonzero argument. If the new process did not explicitly set a positive exit status, a positive exit status indicates an abnormal exit with an abort or an interrupt. A return value of -1 indicates an error (the new process is not started). In this case, **errno** is set to one of the following values. | Value | Description | |--|--| | **E2BIG** | Argument list exceeds 1024 bytes. | -| **EINVAL** | *mode* argument is invalid. | +| **EINVAL** | *`mode`* argument is invalid. | | **ENOENT** | File or path is not found. | | **ENOEXEC** | Specified file is not executable or has invalid executable-file format. | | **ENOMEM** | Not enough memory is available to execute the new process. | -For more information about these 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 these and other return codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). -These functions validate their parameters. If either *cmdname* or *arg0* is an empty string or a null pointer, the invalid parameter handler is invoked, 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 spawned. +These functions validate their parameters. If either *`cmdname`* or *`arg0`* is an empty string or a null pointer, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, these functions set **errno** to **EINVAL**, and return -1. No new process is spawned. ## Remarks @@ -76,22 +76,22 @@ Each of these functions creates and executes a new process, passing each command |**_spawnl**|\| |**_wspawnl**|\ or \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example -See the example in [_spawn, _wspawn Functions](../../c-runtime-library/spawn-wspawn-functions.md). +See the example in [`_spawn`, `_wspawn` functions](../spawn-wspawn-functions.md). ## See also -[Process and Environment Control](../../c-runtime-library/process-and-environment-control.md)
-[_spawn, _wspawn Functions](../../c-runtime-library/spawn-wspawn-functions.md)
-[abort](abort.md)
-[atexit](atexit.md)
-[_exec, _wexec Functions](../../c-runtime-library/exec-wexec-functions.md)
-[exit, _Exit, _exit](exit-exit-exit.md)
-[_flushall](flushall.md)
-[_getmbcp](getmbcp.md)
-[_onexit, _onexit_m](onexit-onexit-m.md)
-[_setmbcp](setmbcp.md)
-[system, _wsystem](system-wsystem.md)
+[Process and environment control](../process-and-environment-control.md)\ +[`_spawn`, `_wspawn` functions](../spawn-wspawn-functions.md)\ +[`abort`](abort.md)\ +[`atexit`](atexit.md)\ +[`_exec`, `_wexec` functions](../exec-wexec-functions.md)\ +[`exit`, `_Exit`, `_exit`](exit-exit-exit.md)\ +[`_flushall`](flushall.md)\ +[`_getmbcp`](getmbcp.md)\ +[`_onexit`, `_onexit_m`](onexit-onexit-m.md)\ +[`_setmbcp`](setmbcp.md)\ +[`system`, `_wsystem`](system-wsystem.md) diff --git a/docs/c-runtime-library/reference/spawnl.md b/docs/c-runtime-library/reference/spawnl.md index 77596e47d74..c459b56cc4c 100644 --- a/docs/c-runtime-library/reference/spawnl.md +++ b/docs/c-runtime-library/reference/spawnl.md @@ -12,9 +12,9 @@ ms.assetid: ae762de9-e761-4fb7-bb63-b7904ed09a98 --- # spawnl -The Microsoft-specific function name `spawnl` is a deprecated alias for the [_spawnl](spawnl-wspawnl.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. +The Microsoft-specific function name `spawnl` is a deprecated alias for the [`_spawnl`](spawnl-wspawnl.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. -We recommend you use [_spawnl](spawnl-wspawnl.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). +We recommend you use [`_spawnl`](spawnl-wspawnl.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). > [!IMPORTANT] > This API cannot be used in applications that execute in the Windows Runtime. For more information, see [CRT functions not supported in Universal Windows Platform apps](../../cppcx/crt-functions-not-supported-in-universal-windows-platform-apps.md). diff --git a/docs/c-runtime-library/reference/spawnle-wspawnle.md b/docs/c-runtime-library/reference/spawnle-wspawnle.md index af3c8682192..c124c50adf6 100644 --- a/docs/c-runtime-library/reference/spawnle-wspawnle.md +++ b/docs/c-runtime-library/reference/spawnle-wspawnle.md @@ -42,37 +42,37 @@ intptr_t _wspawnle( ### Parameters -*mode*
+*`mode`*\ Execution mode for the calling process. -*cmdname*
+*`cmdname`*\ Path of the file to be executed. -*arg0*, *arg1*, ... *argn*
-List of pointers to arguments. The *arg0* argument is usually a pointer to *cmdname*. The arguments *arg1* through *argn* are pointers to the character strings forming the new argument list. Following *argn*, there must be a **NULL** pointer to mark the end of the argument list. +*`arg0`*, *`arg1`*, ... *`argN`*\ +List of pointers to arguments. The *`arg0`* argument is usually a pointer to *`cmdname`*. The arguments *`arg1`* through *`argN`* are pointers to the character strings forming the new argument list. Following *`argN`*, there must be a **NULL** pointer to mark the end of the argument list. -*envp*
+*`envp`*\ Array of pointers to environment settings. -## Return Value +## Return value -The return value from a synchronous **_spawnle** or **_wspawnle** (**_P_WAIT** specified for *mode*) is the exit status of the new process. The return value from an asynchronous **_spawnle** or **_wspawnle** (**_P_NOWAIT** or **_P_NOWAITO** specified for *mode*) is the process handle. The exit status is 0 if the process terminated normally. You can set the exit status to a nonzero value if the spawned process specifically calls the **exit** routine with a nonzero argument. If the new process did not explicitly set a positive exit status, a positive exit status indicates an abnormal exit with an abort or an interrupt. A return value of -1 indicates an error (the new process is not started). In this case, **errno** is set to one of the following values. +The return value from a synchronous **_spawnle** or **_wspawnle** (**_P_WAIT** specified for *`mode`*) is the exit status of the new process. The return value from an asynchronous **_spawnle** or **_wspawnle** (**_P_NOWAIT** or **_P_NOWAITO** specified for *`mode`*) is the process handle. The exit status is 0 if the process terminated normally. You can set the exit status to a nonzero value if the spawned process specifically calls the **exit** routine with a nonzero argument. If the new process did not explicitly set a positive exit status, a positive exit status indicates an abnormal exit with an abort or an interrupt. A return value of -1 indicates an error (the new process is not started). In this case, **errno** is set to one of the following values. | Value | Description | |--|--| | **E2BIG** | Argument list exceeds 1024 bytes. | -| **EINVAL** | *mode* argument is invalid. | +| **EINVAL** | *`mode`* argument is invalid. | | **ENOENT** | File or path is not found. | | **ENOEXEC** | Specified file is not executable or has invalid executable-file format. | | **ENOMEM** | Not enough memory is available to execute the new process. | -For more information about these 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 these and other return codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks Each of these functions creates and executes a new process, passing each command-line argument as a separate parameter and also passing an array of pointers to environment settings. -These functions validate their parameters. If either *cmdname* or *arg0* is an empty string or a null pointer, the invalid parameter handler is invoked, 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 spawned. +These functions validate their parameters. If either *`cmdname`* or *`arg0`* is an empty string or a null pointer, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, these functions set **errno** to **EINVAL**, and return -1. No new process is spawned. ## Requirements @@ -81,22 +81,22 @@ These functions validate their parameters. If either *cmdname* or *arg0* is an e |**_spawnle**|\| |**_wspawnle**|\ or \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example -See the example in [_spawn, _wspawn Functions](../../c-runtime-library/spawn-wspawn-functions.md). +See the example in [`_spawn`, `_wspawn` functions](../spawn-wspawn-functions.md). ## See also -[Process and Environment Control](../../c-runtime-library/process-and-environment-control.md)
-[_spawn, _wspawn Functions](../../c-runtime-library/spawn-wspawn-functions.md)
-[abort](abort.md)
-[atexit](atexit.md)
-[_exec, _wexec Functions](../../c-runtime-library/exec-wexec-functions.md)
-[exit, _Exit, _exit](exit-exit-exit.md)
-[_flushall](flushall.md)
-[_getmbcp](getmbcp.md)
-[_onexit, _onexit_m](onexit-onexit-m.md)
-[_setmbcp](setmbcp.md)
-[system, _wsystem](system-wsystem.md)
+[Process and environment control](../process-and-environment-control.md)\ +[`_spawn`, `_wspawn` functions](../spawn-wspawn-functions.md)\ +[`abort`](abort.md)\ +[`atexit`](atexit.md)\ +[`_exec`, `_wexec` functions](../exec-wexec-functions.md)\ +[`exit`, `_Exit`, `_exit`](exit-exit-exit.md)\ +[`_flushall`](flushall.md)\ +[`_getmbcp`](getmbcp.md)\ +[`_onexit`, `_onexit_m`](onexit-onexit-m.md)\ +[`_setmbcp`](setmbcp.md)\ +[`system`, `_wsystem`](system-wsystem.md) diff --git a/docs/c-runtime-library/reference/spawnle.md b/docs/c-runtime-library/reference/spawnle.md index 6ce095df9ef..3e842260865 100644 --- a/docs/c-runtime-library/reference/spawnle.md +++ b/docs/c-runtime-library/reference/spawnle.md @@ -12,9 +12,9 @@ ms.assetid: 7c90cfdd-dcee-4ea6-b709-cd0f7598b0fe --- # spawnle -The Microsoft-specific function name `spawnle` is a deprecated alias for the [_spawnle](spawnle-wspawnle.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. +The Microsoft-specific function name `spawnle` is a deprecated alias for the [`_spawnle`](spawnle-wspawnle.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. -We recommend you use [_spawnle](spawnle-wspawnle.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). +We recommend you use [`_spawnle`](spawnle-wspawnle.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). > [!IMPORTANT] > This API cannot be used in applications that execute in the Windows Runtime. For more information, see [CRT functions not supported in Universal Windows Platform apps](../../cppcx/crt-functions-not-supported-in-universal-windows-platform-apps.md). diff --git a/docs/c-runtime-library/reference/spawnlp-wspawnlp.md b/docs/c-runtime-library/reference/spawnlp-wspawnlp.md index c310da4a8cc..4808998fc69 100644 --- a/docs/c-runtime-library/reference/spawnlp-wspawnlp.md +++ b/docs/c-runtime-library/reference/spawnlp-wspawnlp.md @@ -40,34 +40,34 @@ intptr_t _wspawnlp( ### Parameters -*mode*
+*`mode`*\ Execution mode for the calling process. -*cmdname*
+*`cmdname`*\ Path of the file to be executed. -*arg0*, *arg1*, ... *argn*
-List of pointers to arguments. The *arg0* argument is usually a pointer to *cmdname*. The arguments *arg1* through *argn* are pointers to the character strings forming the new argument list. Following *argn*, there must be a **NULL** pointer to mark the end of the argument list. +*`arg0`*, *`arg1`*, ... *`argN`*\ +List of pointers to arguments. The *`arg0`* argument is usually a pointer to *`cmdname`*. The arguments *`arg1`* through *`argN`* are pointers to the character strings forming the new argument list. Following *`argN`*, there must be a **NULL** pointer to mark the end of the argument list. -## Return Value +## Return value -The return value from a synchronous **_spawnlp** or **_wspawnlp** (**_P_WAIT** specified for *mode*) is the exit status of the new process. The return value from an asynchronous **_spawnlp** or **_wspawnlp** (**_P_NOWAIT** or **_P_NOWAITO** specified for *mode*) is the process handle. The exit status is 0 if the process terminated normally. You can set the exit status to a nonzero value if the spawned process specifically calls the **exit** routine with a nonzero argument. If the new process did not explicitly set a positive exit status, a positive exit status indicates an abnormal exit with an abort or an interrupt. A return value of -1 indicates an error (the new process is not started). In this case, **errno** is set to one of the following values. +The return value from a synchronous **_spawnlp** or **_wspawnlp** (**_P_WAIT** specified for *`mode`*) is the exit status of the new process. The return value from an asynchronous **_spawnlp** or **_wspawnlp** (**_P_NOWAIT** or **_P_NOWAITO** specified for *`mode`*) is the process handle. The exit status is 0 if the process terminated normally. You can set the exit status to a nonzero value if the spawned process specifically calls the **exit** routine with a nonzero argument. If the new process did not explicitly set a positive exit status, a positive exit status indicates an abnormal exit with an abort or an interrupt. A return value of -1 indicates an error (the new process is not started). In this case, **errno** is set to one of the following values. | Value | Description | |-|-| | **E2BIG** | Argument list exceeds 1024 bytes. | -| **EINVAL** | *mode* argument is invalid. | +| **EINVAL** | *`mode`* argument is invalid. | | **ENOENT** | File or path is not found. | | **ENOEXEC** | Specified file is not executable or has invalid executable-file format. | | **ENOMEM** | Not enough memory is available to execute the new process. | -For more information about these 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 these and other return codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks Each of these functions creates and executes a new process, passing each command-line argument as a separate parameter and using the **PATH** environment variable to find the file to execute. -These functions validate their parameters. If either *cmdname* or *arg0* is an empty string or a null pointer, these functions generate an invalid parameter exception, 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 spawned. +These functions validate their parameters. If either *`cmdname`* or *`arg0`* is an empty string or a null pointer, these functions generate an invalid parameter exception, 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 spawned. ## Requirements @@ -76,22 +76,22 @@ These functions validate their parameters. If either *cmdname* or *arg0* is an e |**_spawnlp**|\| |**_wspawnlp**|\ or \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example -See the example in [_spawn, _wspawn Functions](../../c-runtime-library/spawn-wspawn-functions.md). +See the example in [`_spawn`, `_wspawn` functions](../spawn-wspawn-functions.md). ## See also -[Process and Environment Control](../../c-runtime-library/process-and-environment-control.md)
-[_spawn, _wspawn Functions](../../c-runtime-library/spawn-wspawn-functions.md)
-[abort](abort.md)
-[atexit](atexit.md)
-[_exec, _wexec Functions](../../c-runtime-library/exec-wexec-functions.md)
-[exit, _Exit, _exit](exit-exit-exit.md)
-[_flushall](flushall.md)
-[_getmbcp](getmbcp.md)
-[_onexit, _onexit_m](onexit-onexit-m.md)
-[_setmbcp](setmbcp.md)
-[system, _wsystem](system-wsystem.md)
+[Process and environment control](../process-and-environment-control.md)\ +[`_spawn`, `_wspawn` functions](../spawn-wspawn-functions.md)\ +[`abort`](abort.md)\ +[`atexit`](atexit.md)\ +[`_exec`, `_wexec` functions](../exec-wexec-functions.md)\ +[`exit`, `_Exit`, `_exit`](exit-exit-exit.md)\ +[`_flushall`](flushall.md)\ +[`_getmbcp`](getmbcp.md)\ +[`_onexit`, `_onexit_m`](onexit-onexit-m.md)\ +[`_setmbcp`](setmbcp.md)\ +[`system`, `_wsystem`](system-wsystem.md) diff --git a/docs/c-runtime-library/reference/spawnlp.md b/docs/c-runtime-library/reference/spawnlp.md index 3567582639c..6906f9414fd 100644 --- a/docs/c-runtime-library/reference/spawnlp.md +++ b/docs/c-runtime-library/reference/spawnlp.md @@ -12,9 +12,9 @@ ms.assetid: 560da96f-4902-4620-8a92-0d128ecaa001 --- # spawnlp -The Microsoft-specific function name `spawnlp` is a deprecated alias for the [_spawnlp](spawnlp-wspawnlp.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. +The Microsoft-specific function name `spawnlp` is a deprecated alias for the [`_spawnlp`](spawnlp-wspawnlp.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. -We recommend you use [_spawnlp](spawnlp-wspawnlp.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). +We recommend you use [`_spawnlp`](spawnlp-wspawnlp.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). > [!IMPORTANT] > This API cannot be used in applications that execute in the Windows Runtime. For more information, see [CRT functions not supported in Universal Windows Platform apps](../../cppcx/crt-functions-not-supported-in-universal-windows-platform-apps.md). diff --git a/docs/c-runtime-library/reference/spawnlpe-wspawnlpe.md b/docs/c-runtime-library/reference/spawnlpe-wspawnlpe.md index 1887c78deb9..b496a27446e 100644 --- a/docs/c-runtime-library/reference/spawnlpe-wspawnlpe.md +++ b/docs/c-runtime-library/reference/spawnlpe-wspawnlpe.md @@ -42,37 +42,37 @@ intptr_t _wspawnlpe( ### Parameters -*mode*
+*`mode`*\ Execution mode for the calling process. -*cmdname*
+*`cmdname`*\ Path of the file to be executed. -*arg0*, *arg1*, ... *argn*
-List of pointers to arguments. The *arg0* argument is typically a pointer to *cmdname*. The arguments *arg1* through *argn* are pointers to the character strings that form the new argument list. Following *argn*, there must be a **NULL** pointer to mark the end of the argument list. +*`arg0`*, *`arg1`*, ... *`argN`*\ +List of pointers to arguments. The *`arg0`* argument is typically a pointer to *`cmdname`*. The arguments *`arg1`* through *`argN`* are pointers to the character strings that form the new argument list. Following *`argN`*, there must be a **NULL** pointer to mark the end of the argument list. -*envp*
+*`envp`*\ Array of pointers to environment settings. -## Return Value +## Return value -The return value from a synchronous **_spawnlpe** or **_wspawnlpe** (**_P_WAIT** specified for *mode*) is the exit status of the new process. The return value from an asynchronous **_spawnlpe** or **_wspawnlpe** (**_P_NOWAIT** or **_P_NOWAITO** specified for *mode*) is the process handle. The exit status is 0 if the process terminated normally. You can set the exit status to a nonzero value if the spawned process specifically uses a nonzero argument to call the **exit** routine. If the new process did not explicitly set a positive exit status, a positive exit status indicates an abnormal exit caused by an abort or an interrupt. A return value of -1 indicates an error (the new process is not started). In this case, **errno** is set to one of the following values. +The return value from a synchronous **_spawnlpe** or **_wspawnlpe** (**_P_WAIT** specified for *`mode`*) is the exit status of the new process. The return value from an asynchronous **_spawnlpe** or **_wspawnlpe** (**_P_NOWAIT** or **_P_NOWAITO** specified for *`mode`*) is the process handle. The exit status is 0 if the process terminated normally. You can set the exit status to a nonzero value if the spawned process specifically uses a nonzero argument to call the **exit** routine. If the new process did not explicitly set a positive exit status, a positive exit status indicates an abnormal exit caused by an abort or an interrupt. A return value of -1 indicates an error (the new process is not started). In this case, **errno** is set to one of the following values. | Value | Description | |-|-| | **E2BIG** | Argument list exceeds 1024 bytes. | -| **EINVAL** | *mode* argument is invalid. | +| **EINVAL** | *`mode`* argument is invalid. | | **ENOENT** | File or path is not found. | | **ENOEXEC** | Specified file is not executable or has invalid executable-file format. | | **ENOMEM** | Not enough memory is available to execute the new process. | -For more information about these and other return codes, see [errno, _doserrno, _sys_errlist, and _sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +For more information about these and other return codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks Each of these functions creates and executes a new process, passes each command-line argument as a separate parameter, and passes an array of pointers to environment settings. These functions use the **PATH** environment variable to find the file to execute. -These functions validate their parameters. If either *cmdname* or *arg0* is an empty string or a null pointer, the invalid parameter handler is invoked, 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 spawned. +These functions validate their parameters. If either *`cmdname`* or *`arg0`* is an empty string or a null pointer, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, these functions set **errno** to **EINVAL**, and return -1. No new process is spawned. ## Requirements @@ -81,22 +81,22 @@ These functions validate their parameters. If either *cmdname* or *arg0* is an e |**_spawnlpe**|\| |**_wspawnlpe**|\ or \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example -See the example in [_spawn, _wspawn Functions](../../c-runtime-library/spawn-wspawn-functions.md). +See the example in [`_spawn`, `_wspawn` functions](../spawn-wspawn-functions.md). ## See also -[Process and Environment Control](../../c-runtime-library/process-and-environment-control.md)
-[_spawn, _wspawn Functions](../../c-runtime-library/spawn-wspawn-functions.md)
-[abort](abort.md)
-[atexit](atexit.md)
-[_exec, _wexec Functions](../../c-runtime-library/exec-wexec-functions.md)
-[exit, _Exit, _exit](exit-exit-exit.md)
-[_flushall](flushall.md)
-[_getmbcp](getmbcp.md)
-[_onexit, _onexit_m](onexit-onexit-m.md)
-[_setmbcp](setmbcp.md)
-[system, _wsystem](system-wsystem.md)
+[Process and environment control](../process-and-environment-control.md)\ +[`_spawn`, `_wspawn` functions](../spawn-wspawn-functions.md)\ +[`abort`](abort.md)\ +[`atexit`](atexit.md)\ +[`_exec`, `_wexec` functions](../exec-wexec-functions.md)\ +[`exit`, `_Exit`, `_exit`](exit-exit-exit.md)\ +[`_flushall`](flushall.md)\ +[`_getmbcp`](getmbcp.md)\ +[`_onexit`, `_onexit_m`](onexit-onexit-m.md)\ +[`_setmbcp`](setmbcp.md)\ +[`system`, `_wsystem`](system-wsystem.md) diff --git a/docs/c-runtime-library/reference/spawnlpe.md b/docs/c-runtime-library/reference/spawnlpe.md index 6a97e015b1d..7c1b280e30a 100644 --- a/docs/c-runtime-library/reference/spawnlpe.md +++ b/docs/c-runtime-library/reference/spawnlpe.md @@ -12,9 +12,9 @@ ms.assetid: 379143a7-f3d0-41de-83cc-2b4321146390 --- # spawnlpe -The Microsoft-specific function name `spawnlpe` is a deprecated alias for the [_spawnlpe](spawnlpe-wspawnlpe.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. +The Microsoft-specific function name `spawnlpe` is a deprecated alias for the [`_spawnlpe`](spawnlpe-wspawnlpe.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. -We recommend you use [_spawnlpe](spawnlpe-wspawnlpe.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). +We recommend you use [`_spawnlpe`](spawnlpe-wspawnlpe.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). > [!IMPORTANT] > This API cannot be used in applications that execute in the Windows Runtime. For more information, see [CRT functions not supported in Universal Windows Platform apps](../../cppcx/crt-functions-not-supported-in-universal-windows-platform-apps.md). diff --git a/docs/c-runtime-library/reference/spawnv-wspawnv.md b/docs/c-runtime-library/reference/spawnv-wspawnv.md index 55256f7aa00..6047ff2f909 100644 --- a/docs/c-runtime-library/reference/spawnv-wspawnv.md +++ b/docs/c-runtime-library/reference/spawnv-wspawnv.md @@ -34,34 +34,34 @@ intptr_t _wspawnv( ### Parameters -*mode*
+*`mode`*\ Execution mode for the calling process. -*cmdname*
+*`cmdname`*\ Path of the file to be executed. -*argv*
-Array of pointers to arguments. The argument *argv*[0] is usually a pointer to a path in real mode or to the program name in protected mode, and *argv*[1] through *argv*[**n**] are pointers to the character strings forming the new argument list. The argument *argv*[**n** +1] must be a **NULL** pointer to mark the end of the argument list. +*`argv`*\ +Array of pointers to arguments. The argument *`argv[0]`* is usually a pointer to a path in real mode or to the program name in protected mode, and *`argv[1]`* through *`argv[n]`* are pointers to the character strings forming the new argument list. The argument *`argv[n+1]`* must be a **NULL** pointer to mark the end of the argument list. -## Return Value +## Return value -The return value from a synchronous **_spawnv** or **_wspawnv** (**_P_WAIT** specified for *mode*) is the exit status of the new process. The return value from an asynchronous **_spawnv** or **_wspawnv** (**_P_NOWAIT** or **_P_NOWAITO** specified for *mode*) is the process handle. The exit status is 0 if the process terminated normally. You can set the exit status to a nonzero value if the spawned process specifically calls the **exit** routine with a nonzero argument. If the new process did not explicitly set a positive exit status, a positive exit status indicates an abnormal exit with an abort or an interrupt. A return value of -1 indicates an error (the new process is not started). In this case, **errno** is set to one of the following values. +The return value from a synchronous **_spawnv** or **_wspawnv** (**_P_WAIT** specified for *`mode`*) is the exit status of the new process. The return value from an asynchronous **_spawnv** or **_wspawnv** (**_P_NOWAIT** or **_P_NOWAITO** specified for *`mode`*) is the process handle. The exit status is 0 if the process terminated normally. You can set the exit status to a nonzero value if the spawned process specifically calls the **exit** routine with a nonzero argument. If the new process did not explicitly set a positive exit status, a positive exit status indicates an abnormal exit with an abort or an interrupt. A return value of -1 indicates an error (the new process is not started). In this case, **errno** is set to one of the following values. | Value | Description | |-|-| | **E2BIG** | Argument list exceeds 1024 bytes. | -| **EINVAL** | *mode* argument is invalid. | +| **EINVAL** | *`mode`* argument is invalid. | | **ENOENT** | File or path is not found. | | **ENOEXEC** | Specified file is not executable or has invalid executable-file format. | | **ENOMEM** | Not enough memory is available to execute the new process. | -For more information about these 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 these and other return codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks Each of these functions creates and executes a new process, passing an array of pointers to command-line arguments. -These functions validate their parameters. If either *cmdname* or *argv* is a null pointer, or if *argv* points to null pointer, or *argv*[0] is an empty string, the invalid parameter handler is invoked, 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 spawned. +These functions validate their parameters. If either *`cmdname`* or *`argv`* is a null pointer, or if *`argv`* points to null pointer, or *`argv[0]`* is an empty string, the invalid parameter handler is invoked, 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 spawned. 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). @@ -72,22 +72,22 @@ By default, this function's global state is scoped to the application. To change |**_spawnv**|\ or \| |**_wspawnv**|\ or \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example -See the example in [_spawn, _wspawn Functions](../../c-runtime-library/spawn-wspawn-functions.md). +See the example in [`_spawn`, `_wspawn` functions](../spawn-wspawn-functions.md). ## See also -[Process and Environment Control](../../c-runtime-library/process-and-environment-control.md)
-[_spawn, _wspawn Functions](../../c-runtime-library/spawn-wspawn-functions.md)
-[abort](abort.md)
-[atexit](atexit.md)
-[_exec, _wexec Functions](../../c-runtime-library/exec-wexec-functions.md)
-[exit, _Exit, _exit](exit-exit-exit.md)
-[_flushall](flushall.md)
-[_getmbcp](getmbcp.md)
-[_onexit, _onexit_m](onexit-onexit-m.md)
-[_setmbcp](setmbcp.md)
-[system, _wsystem](system-wsystem.md)
+[Process and environment control](../process-and-environment-control.md)\ +[`_spawn`, `_wspawn` functions](../spawn-wspawn-functions.md)\ +[`abort`](abort.md)\ +[`atexit`](atexit.md)\ +[`_exec`, `_wexec` functions](../exec-wexec-functions.md)\ +[`exit`, `_Exit`, `_exit`](exit-exit-exit.md)\ +[`_flushall`](flushall.md)\ +[`_getmbcp`](getmbcp.md)\ +[`_onexit`, `_onexit_m`](onexit-onexit-m.md)\ +[`_setmbcp`](setmbcp.md)\ +[`system`, `_wsystem`](system-wsystem.md) diff --git a/docs/c-runtime-library/reference/spawnv.md b/docs/c-runtime-library/reference/spawnv.md index 4df5a81eee2..875d0c24afe 100644 --- a/docs/c-runtime-library/reference/spawnv.md +++ b/docs/c-runtime-library/reference/spawnv.md @@ -12,9 +12,9 @@ ms.assetid: 6f9b247c-1524-4c24-b846-6925fe22f1cd --- # spawnv -The Microsoft-specific function name `spawnv` is a deprecated alias for the [_spawnv](spawnv-wspawnv.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. +The Microsoft-specific function name `spawnv` is a deprecated alias for the [`_spawnv`](spawnv-wspawnv.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. -We recommend you use [_spawnv](spawnv-wspawnv.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). +We recommend you use [`_spawnv`](spawnv-wspawnv.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). > [!IMPORTANT] > This API cannot be used in applications that execute in the Windows Runtime. For more information, see [CRT functions not supported in Universal Windows Platform apps](../../cppcx/crt-functions-not-supported-in-universal-windows-platform-apps.md). diff --git a/docs/c-runtime-library/reference/spawnve-wspawnve.md b/docs/c-runtime-library/reference/spawnve-wspawnve.md index 877034f9784..42346688969 100644 --- a/docs/c-runtime-library/reference/spawnve-wspawnve.md +++ b/docs/c-runtime-library/reference/spawnve-wspawnve.md @@ -36,37 +36,37 @@ intptr_t _wspawnve( ### Parameters -*mode*
+*`mode`*\ Execution mode for a calling process. -*cmdname*
+*`cmdname`*\ Path of the file to be executed. -*argv*
-Array of pointers to arguments. The argument *argv*[0] is usually a pointer to a path in real mode or to the program name in protected mode, and *argv*[1] through *argv*[**n**] are pointers to the character strings forming the new argument list. The argument *argv*[**n** +1] must be a **NULL** pointer to mark the end of the argument list. +*`argv`*\ +Array of pointers to arguments. The argument *`argv[0]`* is usually a pointer to a path in real mode or to the program name in protected mode, and *`argv[1]`* through *`argv[n]`* are pointers to the character strings forming the new argument list. The argument *`argv[n+1]`* must be a **NULL** pointer to mark the end of the argument list. -*envp*
+*`envp`*\ Array of pointers to environment settings. -## Return Value +## Return value -The return value from a synchronous **_spawnve** or **_wspawnve** (**_P_WAIT** specified for *mode*) is the exit status of the new process. The return value from an asynchronous **_spawnve** or **_wspawnve** (**_P_NOWAIT** or **_P_NOWAITO** specified for *mode*) is the process handle. The exit status is 0 if the process terminated normally. You can set the exit status to a nonzero value if the spawned process specifically calls the **exit** routine with a nonzero argument. If the new process did not explicitly set a positive exit status, a positive exit status indicates an abnormal exit with an abort or an interrupt. A return value of -1 indicates an error (the new process is not started). In this case, **errno** is set to one of the following values. +The return value from a synchronous **_spawnve** or **_wspawnve** (**_P_WAIT** specified for *`mode`*) is the exit status of the new process. The return value from an asynchronous **_spawnve** or **_wspawnve** (**_P_NOWAIT** or **_P_NOWAITO** specified for *`mode`*) is the process handle. The exit status is 0 if the process terminated normally. You can set the exit status to a nonzero value if the spawned process specifically calls the **exit** routine with a nonzero argument. If the new process did not explicitly set a positive exit status, a positive exit status indicates an abnormal exit with an abort or an interrupt. A return value of -1 indicates an error (the new process is not started). In this case, **errno** is set to one of the following values. | Value | Description | |-|-| | **E2BIG** | Argument list exceeds 1024 bytes. | -| **EINVAL** | *mode* argument is invalid. | +| **EINVAL** | *`mode`* argument is invalid. | | **ENOENT** | File or path is not found. | | **ENOEXEC** | Specified file is not executable or has invalid executable-file format. | | **ENOMEM** | Not enough memory is available to execute the new process. | -For more information about these 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 these and other return codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks Each of these functions creates and executes a new process, passing an array of pointers to command-line arguments and an array of pointers to environment settings. -These functions validate their parameters. If either *cmdname* or *argv* is a null pointer, or if *argv* points to null pointer, or *argv*[0] is an empty string, the invalid parameter handler is invoked, 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 spawned. +These functions validate their parameters. If either *`cmdname`* or *`argv`* is a null pointer, or if *`argv`* points to null pointer, or *`argv[0]`* is an empty string, the invalid parameter handler is invoked, 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 spawned. 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). @@ -77,22 +77,22 @@ By default, this function's global state is scoped to the application. To change |**_spawnve**|\ or \| |**_wspawnve**|\ or \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example -See the example in [_spawn, _wspawn Functions](../../c-runtime-library/spawn-wspawn-functions.md). +See the example in [`_spawn`, `_wspawn` functions](../spawn-wspawn-functions.md). ## See also -[Process and Environment Control](../../c-runtime-library/process-and-environment-control.md)
-[_spawn, _wspawn Functions](../../c-runtime-library/spawn-wspawn-functions.md)
-[abort](abort.md)
-[atexit](atexit.md)
-[_exec, _wexec Functions](../../c-runtime-library/exec-wexec-functions.md)
-[exit, _Exit, _exit](exit-exit-exit.md)
-[_flushall](flushall.md)
-[_getmbcp](getmbcp.md)
-[_onexit, _onexit_m](onexit-onexit-m.md)
-[_setmbcp](setmbcp.md)
-[system, _wsystem](system-wsystem.md)
+[Process and environment control](../process-and-environment-control.md)\ +[`_spawn`, `_wspawn` functions](../spawn-wspawn-functions.md)\ +[`abort`](abort.md)\ +[`atexit`](atexit.md)\ +[`_exec`, `_wexec` functions](../exec-wexec-functions.md)\ +[`exit`, `_Exit`, `_exit`](exit-exit-exit.md)\ +[`_flushall`](flushall.md)\ +[`_getmbcp`](getmbcp.md)\ +[`_onexit`, `_onexit_m`](onexit-onexit-m.md)\ +[`_setmbcp`](setmbcp.md)\ +[`system`, `_wsystem`](system-wsystem.md) diff --git a/docs/c-runtime-library/reference/spawnve.md b/docs/c-runtime-library/reference/spawnve.md index 73a77e7475f..d44cb9764ee 100644 --- a/docs/c-runtime-library/reference/spawnve.md +++ b/docs/c-runtime-library/reference/spawnve.md @@ -12,9 +12,9 @@ ms.assetid: 39507df8-f15f-45fb-b2b6-01359272b147 --- # spawnve -The Microsoft-specific function name `spawnve` is a deprecated alias for the [_spawnve](spawnve-wspawnve.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. +The Microsoft-specific function name `spawnve` is a deprecated alias for the [`_spawnve`](spawnve-wspawnve.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. -We recommend you use [_spawnve](spawnve-wspawnve.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). +We recommend you use [`_spawnve`](spawnve-wspawnve.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). > [!IMPORTANT] > This API cannot be used in applications that execute in the Windows Runtime. For more information, see [CRT functions not supported in Universal Windows Platform apps](../../cppcx/crt-functions-not-supported-in-universal-windows-platform-apps.md). diff --git a/docs/c-runtime-library/reference/spawnvp-wspawnvp.md b/docs/c-runtime-library/reference/spawnvp-wspawnvp.md index 7032c5785fe..9c1821fa22e 100644 --- a/docs/c-runtime-library/reference/spawnvp-wspawnvp.md +++ b/docs/c-runtime-library/reference/spawnvp-wspawnvp.md @@ -34,34 +34,34 @@ intptr_t _wspawnvp( ### Parameters -*mode*
+*`mode`*\ Execution mode for calling the process. -*cmdname*
+*`cmdname`*\ Path of the file to be executed. -*argv*
-Array of pointers to arguments. The argument *argv*[0] is usually a pointer to a path in real mode or to the program name in protected mode, and *argv*[1] through *argv*[**n**] are pointers to the character strings that form the new argument list. The argument *argv*[**n** +1] must be a **NULL** pointer to mark the end of the argument list. +*`argv`*\ +Array of pointers to arguments. The argument *`argv[0]`* is usually a pointer to a path in real mode or to the program name in protected mode, and *`argv[1]`* through *`argv[n]`* are pointers to the character strings forming the new argument list. The argument *`argv[n+1]`* must be a **NULL** pointer to mark the end of the argument list. -## Return Value +## Return value -The return value from a synchronous **_spawnvp** or **_wspawnvp** (**_P_WAIT** specified for *mode*) is the exit status of the new process. The return value from an asynchronous **_spawnvp** or **_wspawnvp** (**_P_NOWAIT** or **_P_NOWAITO** specified for *mode*) is the process handle. The exit status is 0 if the process terminated normally. You can set the exit status to a nonzero value if the spawned process specifically uses a nonzero argument to call the **exit** routine. If the new process did not explicitly set a positive exit status, a positive exit status indicates an abnormal exit with an abort or an interrupt. A return value of -1 indicates an error (the new process is not started). In this case, **errno** is set to one of the following values: +The return value from a synchronous **_spawnvp** or **_wspawnvp** (**_P_WAIT** specified for *`mode`*) is the exit status of the new process. The return value from an asynchronous **_spawnvp** or **_wspawnvp** (**_P_NOWAIT** or **_P_NOWAITO** specified for *`mode`*) is the process handle. The exit status is 0 if the process terminated normally. You can set the exit status to a nonzero value if the spawned process specifically uses a nonzero argument to call the **exit** routine. If the new process did not explicitly set a positive exit status, a positive exit status indicates an abnormal exit with an abort or an interrupt. A return value of -1 indicates an error (the new process is not started). In this case, **errno** is set to one of the following values: | Value | Description | |-|-| | **E2BIG** | Argument list exceeds 1024 bytes. | -| **EINVAL** | *mode* argument is invalid. | +| **EINVAL** | *`mode`* argument is invalid. | | **ENOENT** | File or path is not found. | | **ENOEXEC** | Specified file is not executable or has invalid executable-file format. | | **ENOMEM** | Not enough memory is available to execute the new process. | -For more information about these, and other, return codes, see [errno, _doserrno, _sys_errlist, and _sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +For more information about these, and other, return codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks Each of these functions creates a new process and executes it, and passes an array of pointers to command-line arguments and uses the **PATH** environment variable to find the file to execute. -These functions validate their parameters. If either *cmdname* or *argv* is a null pointer, or if *argv* points to null pointer, or *argv*[0] is an empty string, the invalid parameter handler is invoked, 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 spawned. +These functions validate their parameters. If either *`cmdname`* or *`argv`* is a null pointer, or if *`argv`* points to null pointer, or *`argv[0]`* is an empty string, the invalid parameter handler is invoked, 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 spawned. 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). @@ -72,22 +72,22 @@ By default, this function's global state is scoped to the application. To change |**_spawnvp**|\ or \| |**_wspawnvp**|\ or \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example -See the example in [_spawn, _wspawn Functions](../../c-runtime-library/spawn-wspawn-functions.md). +See the example in [`_spawn`, `_wspawn` functions](../spawn-wspawn-functions.md). ## See also -[Process and Environment Control](../../c-runtime-library/process-and-environment-control.md)
-[_spawn, _wspawn Functions](../../c-runtime-library/spawn-wspawn-functions.md)
-[abort](abort.md)
-[atexit](atexit.md)
-[_exec, _wexec Functions](../../c-runtime-library/exec-wexec-functions.md)
-[exit, _Exit, _exit](exit-exit-exit.md)
-[_flushall](flushall.md)
-[_getmbcp](getmbcp.md)
-[_onexit, _onexit_m](onexit-onexit-m.md)
-[_setmbcp](setmbcp.md)
-[system, _wsystem](system-wsystem.md)
+[Process and environment control](../process-and-environment-control.md)\ +[`_spawn`, `_wspawn` functions](../spawn-wspawn-functions.md)\ +[`abort`](abort.md)\ +[`atexit`](atexit.md)\ +[`_exec`, `_wexec` functions](../exec-wexec-functions.md)\ +[`exit`, `_Exit`, `_exit`](exit-exit-exit.md)\ +[`_flushall`](flushall.md)\ +[`_getmbcp`](getmbcp.md)\ +[`_onexit`, `_onexit_m`](onexit-onexit-m.md)\ +[`_setmbcp`](setmbcp.md)\ +[`system`, `_wsystem`](system-wsystem.md) diff --git a/docs/c-runtime-library/reference/spawnvp.md b/docs/c-runtime-library/reference/spawnvp.md index 0605fc845b0..0e592e941bf 100644 --- a/docs/c-runtime-library/reference/spawnvp.md +++ b/docs/c-runtime-library/reference/spawnvp.md @@ -12,9 +12,9 @@ ms.assetid: 25d3896d-1934-4453-ae8b-4fb5480a2657 --- # spawnvp -The Microsoft-specific function name `spawnvp` is a deprecated alias for the [_spawnvp](spawnvp-wspawnvp.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. +The Microsoft-specific function name `spawnvp` is a deprecated alias for the [`_spawnvp`](spawnvp-wspawnvp.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. -We recommend you use [_spawnvp](spawnvp-wspawnvp.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). +We recommend you use [`_spawnvp`](spawnvp-wspawnvp.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). > [!IMPORTANT] > This API cannot be used in applications that execute in the Windows Runtime. For more information, see [CRT functions not supported in Universal Windows Platform apps](../../cppcx/crt-functions-not-supported-in-universal-windows-platform-apps.md). diff --git a/docs/c-runtime-library/reference/spawnvpe-wspawnvpe.md b/docs/c-runtime-library/reference/spawnvpe-wspawnvpe.md index 91c8857ae80..8e364ffa3a0 100644 --- a/docs/c-runtime-library/reference/spawnvpe-wspawnvpe.md +++ b/docs/c-runtime-library/reference/spawnvpe-wspawnvpe.md @@ -36,37 +36,37 @@ intptr_t _wspawnvpe( ### Parameters -*mode*
+*`mode`*\ Execution mode for calling process -*cmdname*
+*`cmdname`*\ Path of file to be executed -*argv*
-Array of pointers to arguments. The argument *argv*[0] is usually a pointer to a path in real mode or to the program name in protected mode, and *argv*[1] through *argv*[**n**] are pointers to the character strings forming the new argument list. The argument *argv*[**n** +1] must be a **NULL** pointer to mark the end of the argument list. +*`argv`*\ +Array of pointers to arguments. The argument *`argv[0]`* is usually a pointer to a path in real mode or to the program name in protected mode, and *`argv[1]`* through *`argv[n]`* are pointers to the character strings forming the new argument list. The argument *`argv[n+1]`* must be a **NULL** pointer to mark the end of the argument list. -*envp*
+*`envp`*\ Array of pointers to environment settings -## Return Value +## Return value -The return value from a synchronous **_spawnvpe** or **_wspawnvpe** (**_P_WAIT** specified for *mode*) is the exit status of the new process. The return value from an asynchronous **_spawnvpe** or **_wspawnvpe** (**_P_NOWAIT** or **_P_NOWAITO** specified for *mode*) is the process handle. The exit status is 0 if the process terminated normally. You can set the exit status to a nonzero value if the spawned process specifically calls the **exit** routine with a nonzero argument. If the new process didn't explicitly set a positive exit status, a positive exit status indicates an abnormal exit with an abort or an interrupt. A return value of -1 indicates an error (the new process isn't started). In this case, **errno** is set to one of the following values: +The return value from a synchronous **_spawnvpe** or **_wspawnvpe** (**_P_WAIT** specified for *`mode`*) is the exit status of the new process. The return value from an asynchronous **_spawnvpe** or **_wspawnvpe** (**_P_NOWAIT** or **_P_NOWAITO** specified for *`mode`*) is the process handle. The exit status is 0 if the process terminated normally. You can set the exit status to a nonzero value if the spawned process specifically calls the **exit** routine with a nonzero argument. If the new process didn't explicitly set a positive exit status, a positive exit status indicates an abnormal exit with an abort or an interrupt. A return value of -1 indicates an error (the new process isn't started). In this case, **errno** is set to one of the following values: | Value | Description | |-|-| | **E2BIG** | Argument list exceeds 1024 bytes. | -| **EINVAL** | *mode* argument is invalid. | +| **EINVAL** | *`mode`* argument is invalid. | | **ENOENT** | File or path isn't found. | | **ENOEXEC** | Specified file isn't executable or has invalid executable-file format. | | **ENOMEM** | Not enough memory is available to execute the new process. | -For more information about return codes, see [`_doserrno`, `errno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). +For more information about return codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks Each of these functions creates and executes a new process, passing an array of pointers to command-line arguments and an array of pointers to environment settings. These functions use the **PATH** environment variable to find the file to execute. -These functions validate their parameters. If either *cmdname* or *argv* is a null pointer, or if *argv* points to null pointer, or *argv*[0] is an empty string, the invalid parameter handler is invoked, 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 spawned. +These functions validate their parameters. If either *`cmdname`* or *`argv`* is a null pointer, or if *`argv`* points to null pointer, or *`argv[0]`* is an empty string, the invalid parameter handler is invoked, 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 spawned. 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). @@ -77,20 +77,20 @@ By default, this function's global state is scoped to the application. To change |**_spawnvpe**|\ or \| |**_wspawnvpe**|\ or \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example -See the example in [_spawn, _wspawn Functions](../../c-runtime-library/spawn-wspawn-functions.md). +See the example in [`_spawn`, `_wspawn` functions](../spawn-wspawn-functions.md). ## See also -[abort](abort.md)
-[atexit](atexit.md)
-[_exec, _wexec Functions](../../c-runtime-library/exec-wexec-functions.md)
-[exit, _Exit, _exit](exit-exit-exit.md)
-[_flushall](flushall.md)
-[_getmbcp](getmbcp.md)
-[_onexit, _onexit_m](onexit-onexit-m.md)
-[_setmbcp](setmbcp.md)
-[system, _wsystem](system-wsystem.md)
+[`abort`](abort.md)\ +[`atexit`](atexit.md)\ +[`_exec`, `_wexec` functions](../exec-wexec-functions.md)\ +[`exit`, `_Exit`, `_exit`](exit-exit-exit.md)\ +[`_flushall`](flushall.md)\ +[`_getmbcp`](getmbcp.md)\ +[`_onexit`, `_onexit_m`](onexit-onexit-m.md)\ +[`_setmbcp`](setmbcp.md)\ +[`system`, `_wsystem`](system-wsystem.md) diff --git a/docs/c-runtime-library/reference/spawnvpe.md b/docs/c-runtime-library/reference/spawnvpe.md index c5b1b8fb48f..cc4a4365cd2 100644 --- a/docs/c-runtime-library/reference/spawnvpe.md +++ b/docs/c-runtime-library/reference/spawnvpe.md @@ -12,9 +12,9 @@ ms.assetid: be16bf98-5059-4c33-be00-7524142a017e --- # spawnvpe -The Microsoft-specific function name `spawnvpe` is a deprecated alias for the [_spawnvpe](spawnvpe-wspawnvpe.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. +The Microsoft-specific function name `spawnvpe` is a deprecated alias for the [`_spawnvpe`](spawnvpe-wspawnvpe.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. -We recommend you use [_spawnvpe](spawnvpe-wspawnvpe.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). +We recommend you use [`_spawnvpe`](spawnvpe-wspawnvpe.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). > [!IMPORTANT] > This API cannot be used in applications that execute in the Windows Runtime. For more information, see [CRT functions not supported in Universal Windows Platform apps](../../cppcx/crt-functions-not-supported-in-universal-windows-platform-apps.md). diff --git a/docs/c-runtime-library/reference/splitpath-s-wsplitpath-s.md b/docs/c-runtime-library/reference/splitpath-s-wsplitpath-s.md index 5caceabf8e8..88440b01f87 100644 --- a/docs/c-runtime-library/reference/splitpath-s-wsplitpath-s.md +++ b/docs/c-runtime-library/reference/splitpath-s-wsplitpath-s.md @@ -12,7 +12,7 @@ ms.assetid: 30fff3e2-cd00-4eb6-b5a2-65db79cb688b --- # `_splitpath_s`, `_wsplitpath_s` -Breaks a path name into components. These are versions of [`_splitpath`, `_wsplitpath`](splitpath-wsplitpath.md) with security enhancements as described in [Security Features in the CRT](../../c-runtime-library/security-features-in-the-crt.md). +Breaks a path name into components. These are versions of [`_splitpath`, `_wsplitpath`](splitpath-wsplitpath.md) with security enhancements as described in [Security features in the CRT](../security-features-in-the-crt.md). ## Syntax @@ -59,38 +59,38 @@ errno_t _wsplitpath_s( ### Parameters -*`path`*
+*`path`*\ Full path. -*`drive`*
+*`drive`*\ Drive letter, followed by a colon (**`:`**). You can pass **`NULL`** for this parameter if you do not need the drive letter. -*`driveNumberOfElements`*
+*`driveNumberOfElements`*\ The size of the *`drive`* buffer in single-byte or wide characters. If *`drive`* is **`NULL`**, this value must be 0. -*`dir`*
+*`dir`*\ Directory path, including trailing slash. Forward slashes ( **`/`** ), backslashes ( **`\\`** ), or both may be used. You can pass **`NULL`** for this parameter if you do not need the directory path. -*`dirNumberOfElements`*
-The size of the *dir* buffer in single-byte or wide characters. If *`dir`* is **`NULL`**, this value must be 0. +*`dirNumberOfElements`*\ +The size of the *`dir`* buffer in single-byte or wide characters. If *`dir`* is **`NULL`**, this value must be 0. -*`fname`*
+*`fname`*\ Base filename (without extension). You can pass **`NULL`** for this parameter if you do not need the filename. -*`nameNumberOfElements`*
+*`nameNumberOfElements`*\ The size of the *`fname`* buffer in single-byte or wide characters. If *`fname`* is **`NULL`**, this value must be 0. -*`ext`*
+*`ext`*\ Filename extension, including leading period (**`.`**). You can pass **`NULL`** for this parameter if you do not need the filename extension. -*`extNumberOfElements`*
+*`extNumberOfElements`*\ The size of *`ext`* buffer in single-byte or wide characters. If *`ext`* is **`NULL`**, this value must be 0. -## Return Value +## Return value Zero if successful; an error code on failure. -### Error Conditions +### Error conditions |Condition|Return Value| |---------------|------------------| @@ -104,7 +104,7 @@ Zero if successful; an error code on failure. |*`ext`* is **`NULL`**, *`extNumberOfElements`* is non-zero|**`EINVAL`**| |*`ext`* is non-**`NULL`**, *`extNumberOfElements`* is zero|**`EINVAL`**| -If any of the above conditions occurs, the invalid parameter handler is invoked, 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 **`EINVAL`**. +If any of the above conditions occurs, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md) . If execution is allowed to continue, these functions set **`errno`** to **`EINVAL`** and return **`EINVAL`**. If any of the buffers is too short to hold the result, these functions clear all the buffers to empty strings, set **`errno`** to **`ERANGE`**, and return **`ERANGE`**. @@ -114,7 +114,7 @@ The **`_splitpath_s`** function breaks a path into its four components. **`_spli 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| |---------------------|------------------------------------|--------------------|-----------------------| @@ -133,7 +133,7 @@ The following table lists the values of the manifest constants. If the full path does not contain a component (for example, a filename), **`_splitpath_s`** assigns an empty string to the corresponding buffer. -In C++, using these functions is simplified by template overloads; the overloads can infer buffer length automatically, eliminating the need to specify a size argument. For more information, see [Secure Template Overloads](../../c-runtime-library/secure-template-overloads.md). +In C++, using these functions is simplified by template overloads; the overloads can infer buffer length automatically, eliminating the need to specify a size argument. For more information, see [Secure template overloads](../secure-template-overloads.md). The debug library versions of these functions first fill the buffer with 0xFE. To disable this behavior, use [`_CrtSetDebugFillThreshold`](crtsetdebugfillthreshold.md). @@ -144,7 +144,7 @@ The debug library versions of these functions first fill the buffer with 0xFE. T |**`_splitpath_s`**|``| |**`_wsplitpath_s`**|`` or ``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -152,9 +152,9 @@ See the example for [`_makepath_s`, `_wmakepath_s`](makepath-s-wmakepath-s.md). ## See also -[File Handling](../../c-runtime-library/file-handling.md)
-[`_splitpath`, `_wsplitpath`](splitpath-wsplitpath.md)
-[`_fullpath`, `_wfullpath`](fullpath-wfullpath.md)
-[`_getmbcp`](getmbcp.md)
-[`_makepath`, `_wmakepath`](makepath-wmakepath.md)
-[`_setmbcp`](setmbcp.md)
+[File handling](../file-handling.md)\ +[`_splitpath`, `_wsplitpath`](splitpath-wsplitpath.md)\ +[`_fullpath`, `_wfullpath`](fullpath-wfullpath.md)\ +[`_getmbcp`](getmbcp.md)\ +[`_makepath`, `_wmakepath`](makepath-wmakepath.md)\ +[`_setmbcp`](setmbcp.md) diff --git a/docs/c-runtime-library/reference/splitpath-wsplitpath.md b/docs/c-runtime-library/reference/splitpath-wsplitpath.md index 0d3ba3248bd..9c55bdfe73c 100644 --- a/docs/c-runtime-library/reference/splitpath-wsplitpath.md +++ b/docs/c-runtime-library/reference/splitpath-wsplitpath.md @@ -35,30 +35,30 @@ void _wsplitpath( ### Parameters -*`path`*
+*`path`*\ Full path. -*`drive`*
+*`drive`*\ Drive letter, followed by a colon (**:**). You can pass **`NULL`** for this parameter if you do not need the drive letter. -*`dir`*
+*`dir`*\ Directory path, including trailing slash. Forward slashes ( **/** ), backslashes ( **\\** ), or both may be used. You can pass **`NULL`** for this parameter if you do not need the directory path. -*`fname`*
+*`fname`*\ Base filename (no extension). You can pass **`NULL`** for this parameter if you do not need the filename. -*`ext`*
+*`ext`*\ Filename extension, including leading period (**.**). You can pass **`NULL`** for this parameter if you do not need the filename extension. ## Remarks The **`_splitpath`** function breaks a path into its four components. **`_splitpath`** automatically handles multibyte-character string arguments as appropriate, recognizing multibyte-character sequences according to the multibyte code page currently in use. **`_wsplitpath`** is a wide-character version of **`_splitpath`**; the arguments to **`_wsplitpath`** are wide-character strings. These functions behave identically otherwise. -**Security Note** These functions incur a potential threat brought about by a buffer overrun problem. Buffer overrun problems are a frequent method of system attack, resulting in an unwarranted elevation of privilege. For more information, see [Avoiding Buffer Overruns](/windows/win32/SecBP/avoiding-buffer-overruns). More secure versions of these functions are available; see [`_splitpath_s`, `_wsplitpath_s`](splitpath-s-wsplitpath-s.md). +**Security Note** These functions incur a potential threat brought about by a buffer overrun problem. Buffer overrun problems are a frequent method of system attack, resulting in an unwarranted elevation of privilege. For more information, see [Avoiding buffer overruns](/windows/win32/SecBP/avoiding-buffer-overruns). More secure versions of these functions are available; see [`_splitpath_s`, `_wsplitpath_s`](splitpath-s-wsplitpath-s.md). 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| |---------------------|------------------------------------|--------------------|-----------------------| @@ -79,9 +79,9 @@ The following table lists the values of the manifest constants. If the full path does not contain a component (for example, a filename), **`_splitpath`** assigns empty strings to the corresponding buffers. -You can pass **`NULL`** to **`_splitpath`** for any parameter other than *path* that you do not need. +You can pass **`NULL`** to **`_splitpath`** for any parameter other than *`path`* that you do not need. -If *`path`* is **`NULL`**, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, **`errno`** is set to **`EINVAL`** and the function returns **`EINVAL`**. +If *`path`* is **`NULL`**, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, **`errno`** is set to **`EINVAL`** and the function returns **`EINVAL`**. ## Requirements @@ -90,7 +90,7 @@ If *`path`* is **`NULL`**, the invalid parameter handler is invoked, as describe |**`_splitpath`**|``| |**`_wsplitpath`**|`` or ``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -98,9 +98,9 @@ See the example for [`_makepath`](makepath-wmakepath.md). ## See also -[File Handling](../../c-runtime-library/file-handling.md)
-[`_fullpath`, `_wfullpath`](fullpath-wfullpath.md)
-[`_getmbcp`](getmbcp.md)
-[`_makepath`, `_wmakepath`](makepath-wmakepath.md)
-[`_setmbcp`](setmbcp.md)
-[`_splitpath_s`, `_wsplitpath_s`](splitpath-s-wsplitpath-s.md)
+[File handling](../file-handling.md)\ +[`_fullpath`, `_wfullpath`](fullpath-wfullpath.md)\ +[`_getmbcp`](getmbcp.md)\ +[`_makepath`, `_wmakepath`](makepath-wmakepath.md)\ +[`_setmbcp`](setmbcp.md)\ +[`_splitpath_s`, `_wsplitpath_s`](splitpath-s-wsplitpath-s.md) diff --git a/docs/c-runtime-library/reference/sprintf-p-sprintf-p-l-swprintf-p-swprintf-p-l.md b/docs/c-runtime-library/reference/sprintf-p-sprintf-p-l-swprintf-p-swprintf-p-l.md index 7d92cda3950..71c19016ba3 100644 --- a/docs/c-runtime-library/reference/sprintf-p-sprintf-p-l-swprintf-p-swprintf-p-l.md +++ b/docs/c-runtime-library/reference/sprintf-p-sprintf-p-l-swprintf-p-swprintf-p-l.md @@ -46,39 +46,39 @@ int _swprintf_p_l( ### Parameters -*`buffer`*
+*`buffer`*\ Storage location for output -*`sizeOfBuffer`*
+*`sizeOfBuffer`*\ Maximum number of characters to store. -*`format`*
+*`format`*\ Format-control string. -*`argument_list`*
+*`argument_list`*\ Optional arguments to the format string. -*`locale`*
+*`locale`*\ The locale to use. -For more information, see [Format Specifications](../../c-runtime-library/format-specification-syntax-printf-and-wprintf-functions.md). +For more information, see [Format specification syntax](../format-specification-syntax-printf-and-wprintf-functions.md). -## Return Value +## Return value The number of characters written, or -1 if an error occurred. ## Remarks -The **`_sprintf_p`** function formats and stores a series of characters and values in *`buffer`*. Each argument in the *`argument_list`* (if any) is converted and output according to the corresponding format specification in *`format`*. The *format* argument uses the [format specification syntax for `printf` and `wprintf` functions](../../c-runtime-library/format-specification-syntax-printf-and-wprintf-functions.md). A null character is appended after the last character written. If copying occurs between strings that overlap, the behavior is undefined. The difference between **`_sprintf_p`** and **`sprintf_s`** is that **`_sprintf_p`** supports positional parameters, which allows specifying the order in which the arguments are used in the format string. For more information, see [`printf_p` Positional Parameters](../../c-runtime-library/printf-p-positional-parameters.md). +The **`_sprintf_p`** function formats and stores a series of characters and values in *`buffer`*. Each argument in the *`argument_list`* (if any) is converted and output according to the corresponding format specification in *`format`*. The *`format`* argument uses the [format specification syntax for `printf` and `wprintf` functions](../format-specification-syntax-printf-and-wprintf-functions.md). A null character is appended after the last character written. If copying occurs between strings that overlap, the behavior is undefined. The difference between **`_sprintf_p`** and **`sprintf_s`** is that **`_sprintf_p`** supports positional parameters, which allows specifying the order in which the arguments are used in the format string. For more information, see [`printf_p` Positional Parameters](../printf-p-positional-parameters.md). **`_swprintf_p`** is a wide-character version of **`_sprintf_p`**; the pointer arguments to **`_swprintf_p`** are wide-character strings. Detection of encoding errors in **`_swprintf_p`** may differ from that in **`_sprintf_p`**. **`_swprintf_p`** and **`fwprintf_p`** behave identically except that **`_swprintf_p`** writes output to a string rather than to a destination of type **`FILE`**, and **`_swprintf_p`** requires the *`count`* parameter to specify the maximum number of characters to be written. The versions of these functions with the **`_l`** suffix are identical except that they use the locale parameter passed in instead of the current thread locale. -**`_sprintf_p`** returns the number of bytes stored in *`buffer`*, not counting the terminating null character. **`_swprintf_p`** returns the number of wide characters stored in *`buffer`*, not counting the terminating null wide character. If *`buffer`* or *`format`* is a null pointer, or if the format string contains invalid formatting characters, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, these functions return -1 and set **`errno`** to **`EINVAL`**. +**`_sprintf_p`** returns the number of bytes stored in *`buffer`*, not counting the terminating null character. **`_swprintf_p`** returns the number of wide characters stored in *`buffer`*, not counting the terminating null wide character. If *`buffer`* or *`format`* is a null pointer, or if the format string contains invalid formatting characters, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, these functions return -1 and set **`errno`** to **`EINVAL`**. > [!IMPORTANT] > Starting in Windows 10 version 2004 (build 19041), the `printf` family of functions prints exactly representable floating point numbers according to the IEEE 754 rules for rounding. In previous versions of Windows, exactly representable floating point numbers ending in '5' would always round up. IEEE 754 states that they must round to the closest even digit (also known as "Banker's Rounding"). For example, both `printf("%1.0f", 1.5)` and `printf("%1.0f", 2.5)` should round to 2. Previously, 1.5 would round to 2 and 2.5 would round to 3. This change only affects exactly representable numbers. For example, 2.35 (which, when represented in memory, is closer to 2.35000000000000008) continues to round up to 2.4. Rounding done by these functions now also respects the floating point rounding mode set by [`fesetround`](fegetround-fesetround2.md). Previously, rounding always chose `FE_TONEAREST` behavior. This change only affects programs built using Visual Studio 2019 version 16.2 and later. To use the legacy floating point rounding behavior, link with ['legacy_stdio_float_rounding.obj`](../link-options.md). -### Generic-Text Routine Mappings +### Generic-text routine mappings |`TCHAR.H` routine|`_UNICODE` & `_MBCS` not defined|`_MBCS` defined|`_UNICODE` defined| |---------------------|------------------------------------|--------------------|-----------------------| @@ -92,7 +92,7 @@ The **`_sprintf_p`** function formats and stores a series of characters and valu |**`_sprintf_p`**, **`_sprintf_p_l`**|``| |**`_swprintf_p`**, **`_swprintf_p_l`**|`` or ``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example: Use `_sprintf_p` to format data @@ -171,14 +171,14 @@ Wrote -1 characters ## See also -[Stream I/O](../../c-runtime-library/stream-i-o.md)
-[`_fprintf_p`, `_fprintf_p_l`, `_fwprintf_p`, `_fwprintf_p_l`](fprintf-p-fprintf-p-l-fwprintf-p-fwprintf-p-l.md)
-[`fprintf`, `_fprintf_l`, `fwprintf`, `_fwprintf_l`](fprintf-fprintf-l-fwprintf-fwprintf-l.md)
-[`_printf_p`, `_printf_p_l`, `_wprintf_p`, `_wprintf_p_l`](printf-p-printf-p-l-wprintf-p-wprintf-p-l.md)
-[`printf`, `_printf_l`, `wprintf`, `_wprintf_l`](printf-printf-l-wprintf-wprintf-l.md)
-[`sprintf`, `_sprintf_l`, `swprintf`, `_swprintf_l`, `__swprintf_l`](sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md)
-[`scanf`, `_scanf_l`, `wscanf`, `_wscanf_l`](scanf-scanf-l-wscanf-wscanf-l.md)
-[`sscanf`, `_sscanf_l`, `swscanf`, `_swscanf_l`](sscanf-sscanf-l-swscanf-swscanf-l.md)
-[`sscanf_s`, `_sscanf_s_l`, `swscanf_s`, `_swscanf_s_l`](sscanf-s-sscanf-s-l-swscanf-s-swscanf-s-l.md)
-[`vprintf` Functions](../../c-runtime-library/vprintf-functions.md)
-[`printf_p` Positional Parameters](../../c-runtime-library/printf-p-positional-parameters.md)
+[Stream I/O](../stream-i-o.md)\ +[`_fprintf_p`, `_fprintf_p_l`, `_fwprintf_p`, `_fwprintf_p_l`](fprintf-p-fprintf-p-l-fwprintf-p-fwprintf-p-l.md)\ +[`fprintf`, `_fprintf_l`, `fwprintf`, `_fwprintf_l`](fprintf-fprintf-l-fwprintf-fwprintf-l.md)\ +[`_printf_p`, `_printf_p_l`, `_wprintf_p`, `_wprintf_p_l`](printf-p-printf-p-l-wprintf-p-wprintf-p-l.md)\ +[`printf`, `_printf_l`, `wprintf`, `_wprintf_l`](printf-printf-l-wprintf-wprintf-l.md)\ +[`sprintf`, `_sprintf_l`, `swprintf`, `_swprintf_l`, `__swprintf_l`](sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md)\ +[`scanf`, `_scanf_l`, `wscanf`, `_wscanf_l`](scanf-scanf-l-wscanf-wscanf-l.md)\ +[`sscanf`, `_sscanf_l`, `swscanf`, `_swscanf_l`](sscanf-sscanf-l-swscanf-swscanf-l.md)\ +[`sscanf_s`, `_sscanf_s_l`, `swscanf_s`, `_swscanf_s_l`](sscanf-s-sscanf-s-l-swscanf-s-swscanf-s-l.md)\ +[`vprintf` functions](../vprintf-functions.md)\ +[`printf_p` Positional Parameters](../printf-p-positional-parameters.md) diff --git a/docs/c-runtime-library/reference/sprintf-s-sprintf-s-l-swprintf-s-swprintf-s-l.md b/docs/c-runtime-library/reference/sprintf-s-sprintf-s-l-swprintf-s-swprintf-s-l.md index 9fdc11d0a25..3e126203218 100644 --- a/docs/c-runtime-library/reference/sprintf-s-sprintf-s-l-swprintf-s-swprintf-s-l.md +++ b/docs/c-runtime-library/reference/sprintf-s-sprintf-s-l-swprintf-s-swprintf-s-l.md @@ -11,7 +11,7 @@ helpviewer_keywords: ["stprintf_s function", "stprintf_s_l function", "swprintf_ --- # sprintf_s, _sprintf_s_l, swprintf_s, _swprintf_s_l -Write formatted data to a string. These are versions of [sprintf, _sprintf_l, swprintf, _swprintf_l, \__swprintf_l](sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md) with security enhancements as described in [Security Features in the CRT](../../c-runtime-library/security-features-in-the-crt.md). +Write formatted data to a string. These are versions of [`sprintf`, `_sprintf_l`, `swprintf`, `_swprintf_l`, `__swprintf_l`](sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md) with security enhancements as described in [Security features in the CRT](../security-features-in-the-crt.md). ## Syntax @@ -58,47 +58,47 @@ int swprintf_s( ### Parameters -*buffer*
+*`buffer`*\ Storage location for output -*sizeOfBuffer*
+*`sizeOfBuffer`*\ Maximum number of characters to store. -*format*
+*`format`*\ Format-control string -*...*
+*`...`*\ Optional arguments to be formatted -*locale*
+*`locale`*\ The locale to use. -For more information, see [Format Specifications](../../c-runtime-library/format-specification-syntax-printf-and-wprintf-functions.md). +For more information, see [Format specification syntax](../format-specification-syntax-printf-and-wprintf-functions.md). -## Return Value +## Return value -The number of characters written, or -1 if an error occurred. If *buffer* or *format* is a null pointer, **sprintf_s** and **swprintf_s** return -1 and set **errno** to **EINVAL**. +The number of characters written, or -1 if an error occurred. If *`buffer`* or *`format`* is a null pointer, **sprintf_s** and **swprintf_s** return -1 and set **errno** to **EINVAL**. -**sprintf_s** returns the number of bytes stored in *buffer*, not counting the terminating null character. **swprintf_s** returns the number of wide characters stored in *buffer*, not counting the terminating null wide character. +**sprintf_s** returns the number of bytes stored in *`buffer`*, not counting the terminating null character. **swprintf_s** returns the number of wide characters stored in *`buffer`*, not counting the terminating null wide character. ## Remarks -The **sprintf_s** function formats and stores a series of characters and values in *buffer*. Each *argument* (if any) is converted and output according to the corresponding format specification in *format*. The format consists of ordinary characters and has the same form and function as the *format* argument for [printf](printf-printf-l-wprintf-wprintf-l.md). A null character is appended after the last character written. If copying occurs between strings that overlap, the behavior is undefined. +The **sprintf_s** function formats and stores a series of characters and values in *`buffer`*. Each *`argument`* (if any) is converted and output according to the corresponding format specification in *`format`*. The format consists of ordinary characters and has the same form and function as the *`format`* argument for [`printf`](printf-printf-l-wprintf-wprintf-l.md). A null character is appended after the last character written. If copying occurs between strings that overlap, the behavior is undefined. -One main difference between **sprintf_s** and [sprintf](sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md) is that **sprintf_s** checks the format string for valid formatting characters, whereas [sprintf](sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md) only checks if the format string or buffer are **NULL** pointers. If either check fails, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, the function returns -1 and sets **errno** to **EINVAL**. +One main difference between **sprintf_s** and [`sprintf`](sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md) is that **sprintf_s** checks the format string for valid formatting characters, whereas [`sprintf`](sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md) only checks if the format string or buffer are **NULL** pointers. If either check fails, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, the function returns -1 and sets **errno** to **EINVAL**. -The other main difference between **sprintf_s** and [sprintf](sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md) is that **sprintf_s** takes a length parameter specifying the size of the output buffer in characters. If the buffer is too small for the formatted text, including the terminating null, then the buffer is set to an empty string by placing a null character at *buffer*[0], and the invalid parameter handler is invoked. Unlike **_snprintf**, **sprintf_s** guarantees that the buffer will be null-terminated unless the buffer size is zero. +The other main difference between **sprintf_s** and [`sprintf`](sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md) is that **sprintf_s** takes a length parameter specifying the size of the output buffer in characters. If the buffer is too small for the formatted text, including the terminating null, then the buffer is set to an empty string by placing a null character at *`buffer[0]`*, and the invalid parameter handler is invoked. Unlike **_snprintf**, **sprintf_s** guarantees that the buffer will be null-terminated unless the buffer size is zero. **swprintf_s** is a wide-character version of **sprintf_s**; the pointer arguments to **swprintf_s** are wide-character strings. Detection of encoding errors in **swprintf_s** may differ from that in **sprintf_s**. The versions of these functions with the **_l** suffix are identical except that they use the locale parameter passed in instead of the current thread locale. -In C++, use of these functions is simplified by template overloads; the overloads can infer buffer length automatically, which eliminates the need to specify a size argument, and they can automatically replace older, non-secure functions with their newer, secure counterparts. For more information, see [Secure Template Overloads](../../c-runtime-library/secure-template-overloads.md). +In C++, use of these functions is simplified by template overloads; the overloads can infer buffer length automatically, which eliminates the need to specify a size argument, and they can automatically replace older, non-secure functions with their newer, secure counterparts. For more information, see [Secure template overloads](../secure-template-overloads.md). -There are versions of **sprintf_s** that offer additional control over what happens if the buffer is too small. For more information, see [_snprintf_s, _snprintf_s_l, _snwprintf_s, _snwprintf_s_l](snprintf-s-snprintf-s-l-snwprintf-s-snwprintf-s-l.md). +There are versions of **sprintf_s** that offer additional control over what happens if the buffer is too small. For more information, see [`_snprintf_s`, `_snprintf_s_l`, `_snwprintf_s`, `_snwprintf_s_l`](snprintf-s-snprintf-s-l-snwprintf-s-snwprintf-s-l.md). > [!IMPORTANT] > Starting in Windows 10 version 2004 (build 19041), the `printf` family of functions prints exactly representable floating point numbers according to the IEEE 754 rules for rounding. In previous versions of Windows, exactly representable floating point numbers ending in '5' would always round up. IEEE 754 states that they must round to the closest even digit (also known as "Banker's Rounding"). For example, both `printf("%1.0f", 1.5)` and `printf("%1.0f", 2.5)` should round to 2. Previously, 1.5 would round to 2 and 2.5 would round to 3. This change only affects exactly representable numbers. For example, 2.35 (which, when represented in memory, is closer to 2.35000000000000008) continues to round up to 2.4. Rounding done by these functions now also respects the floating point rounding mode set by [`fesetround`](fegetround-fesetround2.md). Previously, rounding always chose `FE_TONEAREST` behavior. This change only affects programs built using Visual Studio 2019 version 16.2 and later. To use the legacy floating point rounding behavior, link with ['legacy_stdio_float_rounding.obj`](../link-options.md). -### Generic-Text Routine Mappings +### Generic-text routine mappings |TCHAR.H routine|_UNICODE & _MBCS not defined|_MBCS defined|_UNICODE defined| |---------------------|------------------------------------|--------------------|-----------------------| @@ -112,7 +112,7 @@ There are versions of **sprintf_s** that offer additional control over what happ |**sprintf_s**, **_sprintf_s_l**|C: \

C++: \ or \| |**swprintf_s**, **_swprintf_s_l**|C: \ or \

C++: \, \, \ or \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example: Use sprintf_s to format data @@ -176,10 +176,10 @@ wrote -1 characters ## See also -[Stream I/O](../../c-runtime-library/stream-i-o.md)
-[fprintf, _fprintf_l, fwprintf, _fwprintf_l](fprintf-fprintf-l-fwprintf-fwprintf-l.md)
-[printf, _printf_l, wprintf, _wprintf_l](printf-printf-l-wprintf-wprintf-l.md)
-[sprintf, _sprintf_l, swprintf, _swprintf_l, __swprintf_l](sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md)
-[scanf, _scanf_l, wscanf, _wscanf_l](scanf-scanf-l-wscanf-wscanf-l.md)
-[sscanf, _sscanf_l, swscanf, _swscanf_l](sscanf-sscanf-l-swscanf-swscanf-l.md)
-[vprintf Functions](../../c-runtime-library/vprintf-functions.md)
+[Stream I/O](../stream-i-o.md)\ +[`fprintf`, `_fprintf_l`, `fwprintf`, `_fwprintf_l`](fprintf-fprintf-l-fwprintf-fwprintf-l.md)\ +[`printf`, `_printf_l`, `wprintf`, `_wprintf_l`](printf-printf-l-wprintf-wprintf-l.md)\ +[`sprintf`, `_sprintf_l`, `swprintf`, `_swprintf_l`, `__swprintf_l`](sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md)\ +[`scanf`, `_scanf_l`, `wscanf`, `_wscanf_l`](scanf-scanf-l-wscanf-wscanf-l.md)\ +[`sscanf`, `_sscanf_l`, `swscanf`, `_swscanf_l`](sscanf-sscanf-l-swscanf-swscanf-l.md)\ +[`vprintf` functions](../vprintf-functions.md) diff --git a/docs/c-runtime-library/reference/sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md b/docs/c-runtime-library/reference/sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md index 650e148c4a5..45873ee1771 100644 --- a/docs/c-runtime-library/reference/sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md +++ b/docs/c-runtime-library/reference/sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md @@ -63,26 +63,26 @@ int _sprintf_l( ### Parameters -*`buffer`*
+*`buffer`*\ Storage location for output -*`count`*
+*`count`*\ Maximum number of characters to store in the Unicode version of this function. -*`format`*
+*`format`*\ Format-control string -*`argument`*
+*`argument`*\ Optional arguments -*`locale`*
+*`locale`*\ The locale to use. -For more information, see [Format Specifications](../../c-runtime-library/format-specification-syntax-printf-and-wprintf-functions.md). +For more information, see [Format specification syntax](../format-specification-syntax-printf-and-wprintf-functions.md). -## Return Value +## Return value -The number of characters written, or -1 if an error occurred. If *`buffer`* or *`format`* is a null pointer, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, these functions return -1 and set **`errno`** to **`EINVAL`**. +The number of characters written, or -1 if an error occurred. If *`buffer`* or *`format`* is a null pointer, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, these functions return -1 and set **`errno`** to **`EINVAL`**. **`sprintf`** returns the number of bytes stored in *`buffer`*, not counting the terminating null character. **`swprintf`** returns the number of wide characters stored in *`buffer`*, not counting the terminating null wide character. @@ -95,13 +95,13 @@ The **`sprintf`** function formats and stores a series of characters and values > > Starting in Windows 10 version 2004 (build 19041), the `printf` family of functions prints exactly representable floating point numbers according to the IEEE 754 rules for rounding. In previous versions of Windows, exactly representable floating point numbers ending in '5' would always round up. IEEE 754 states that they must round to the closest even digit (also known as "Banker's Rounding"). For example, both `printf("%1.0f", 1.5)` and `printf("%1.0f", 2.5)` should round to 2. Previously, 1.5 would round to 2 and 2.5 would round to 3. This change only affects exactly representable numbers. For example, 2.35 (which, when represented in memory, is closer to 2.35000000000000008) continues to round up to 2.4. Rounding done by these functions now also respects the floating point rounding mode set by [`fesetround`](fegetround-fesetround2.md). Previously, rounding always chose `FE_TONEAREST` behavior. This change only affects programs built using Visual Studio 2019 version 16.2 and later. To use the legacy floating point rounding behavior, link with ['legacy_stdio_float_rounding.obj`](../link-options.md). -**`swprintf`** is a wide-character version of **`sprintf`**; the pointer arguments to **`swprintf`** are wide-character strings. Detection of encoding errors in **`swprintf`** may differ from **`sprintf`**. **`swprintf`** and **`fwprintf`** behave identically except **`swprintf`** writes output to a string rather than to a destination of type **`FILE`**, and **`swprintf`** requires the *count* parameter to specify the maximum number of characters to write. The versions of these functions with the **`_l`** suffix are identical except they use the locale parameter passed in instead of the current thread locale. +**`swprintf`** is a wide-character version of **`sprintf`**; the pointer arguments to **`swprintf`** are wide-character strings. Detection of encoding errors in **`swprintf`** may differ from **`sprintf`**. **`swprintf`** and **`fwprintf`** behave identically except **`swprintf`** writes output to a string rather than to a destination of type **`FILE`**, and **`swprintf`** requires the *`count`* parameter to specify the maximum number of characters to write. The versions of these functions with the **`_l`** suffix are identical except they use the locale parameter passed in instead of the current thread locale. **`swprintf`** conforms to the ISO C Standard, which requires the second parameter, *`count`*, of type **`size_t`**. To force the old nonstandard behavior, define **`_CRT_NON_CONFORMING_SWPRINTFS`**. In a future version, the old behavior may be removed, so code should be changed to use the new conformant behavior. -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). -### Generic-Text Routine Mappings +### Generic-text routine mappings |`TCHAR.H` routine|`_UNICODE` & `_MBCS` not defined|`_MBCS` defined|`_UNICODE` defined| |---------------------|------------------------------------|--------------------|-----------------------| @@ -115,7 +115,7 @@ In C++, these functions have template overloads that invoke the newer, secure co |**`sprintf`**, **`_sprintf_l`**|``| |**`swprintf`**, **`_swprintf_l`**|`` or ``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example: Use `sprintf` to format data @@ -180,9 +180,9 @@ wrote -1 characters ## See also -[Stream I/O](../../c-runtime-library/stream-i-o.md)
-[`fprintf`, `_fprintf_l`, `fwprintf`, `_fwprintf_l`](fprintf-fprintf-l-fwprintf-fwprintf-l.md)
-[`printf`, `_printf_l`, `wprintf`, `_wprintf_l`](printf-printf-l-wprintf-wprintf-l.md)
-[`scanf`, `_scanf_l`, `wscanf`, `_wscanf_l`](scanf-scanf-l-wscanf-wscanf-l.md)
-[`sscanf`, `_sscanf_l`, `swscanf`, `_swscanf_l`](sscanf-sscanf-l-swscanf-swscanf-l.md)
-[`vprintf` Functions](../../c-runtime-library/vprintf-functions.md)
+[Stream I/O](../stream-i-o.md)\ +[`fprintf`, `_fprintf_l`, `fwprintf`, `_fwprintf_l`](fprintf-fprintf-l-fwprintf-fwprintf-l.md)\ +[`printf`, `_printf_l`, `wprintf`, `_wprintf_l`](printf-printf-l-wprintf-wprintf-l.md)\ +[`scanf`, `_scanf_l`, `wscanf`, `_wscanf_l`](scanf-scanf-l-wscanf-wscanf-l.md)\ +[`sscanf`, `_sscanf_l`, `swscanf`, `_swscanf_l`](sscanf-sscanf-l-swscanf-swscanf-l.md)\ +[`vprintf` functions](../vprintf-functions.md) diff --git a/docs/c-runtime-library/reference/sqrt-sqrtf-sqrtl.md b/docs/c-runtime-library/reference/sqrt-sqrtf-sqrtl.md index abc2f256a98..71bc41bfca3 100644 --- a/docs/c-runtime-library/reference/sqrt-sqrtf-sqrtl.md +++ b/docs/c-runtime-library/reference/sqrt-sqrtf-sqrtl.md @@ -43,11 +43,11 @@ Non-negative floating-point value Because C++ allows overloading, you can call overloads of **`sqrt`** that take **`float`** or **`long double`** types. In a C program, unless you're using the `` macro to call this function, **`sqrt`** always takes and returns **`double`**. -If you use the ` sqrt()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../../c-runtime-library/tgmath.md) for details. +If you use the ` sqrt()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../tgmath.md) for details. 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). -## Return Value +## Return value The **`sqrt`** functions return the square-root of *`x`*. By default, if *`x`* is negative, **`sqrt`** returns an indefinite `NaN`. @@ -64,7 +64,7 @@ The **`sqrt`** functions return the square-root of *`x`*. By default, if *`x`* i |**`sqrt`**, **`sqrtf`**, **`sqrtl`**|``|``| |**`sqrt()`** macro | `` || -For compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -93,8 +93,8 @@ The square root of 45.35 is 6.73 ## See also -[Floating-Point Support](../../c-runtime-library/floating-point-support.md)\ +[Math and floating-point support](../floating-point-support.md)\ [`exp`, `expf`, `expl`](exp-expf.md)\ [`log`, `logf`, `log10`, `log10f`](log-logf-log10-log10f.md)\ [`pow`, `powf`, `powl`](pow-powf-powl.md)\ -[`_CIsqrt`](../../c-runtime-library/cisqrt.md)\ +[`_CIsqrt`](../cisqrt.md)\ diff --git a/docs/c-runtime-library/reference/srand.md b/docs/c-runtime-library/reference/srand.md index 980028b12c2..fb150ad01aa 100644 --- a/docs/c-runtime-library/reference/srand.md +++ b/docs/c-runtime-library/reference/srand.md @@ -38,7 +38,7 @@ By default, this function's global state is scoped to the application. To change |-------------|---------------------| |**`srand`**|``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -46,5 +46,5 @@ See the example for [`rand`](rand.md). ## See also -[Floating-Point Support](../../c-runtime-library/floating-point-support.md)\ +[Math and floating-point support](../floating-point-support.md)\ [`rand`](rand.md) diff --git a/docs/c-runtime-library/reference/sscanf-s-sscanf-s-l-swscanf-s-swscanf-s-l.md b/docs/c-runtime-library/reference/sscanf-s-sscanf-s-l-swscanf-s-swscanf-s-l.md index c826c0dd193..fac3fde9d0a 100644 --- a/docs/c-runtime-library/reference/sscanf-s-sscanf-s-l-swscanf-s-swscanf-s-l.md +++ b/docs/c-runtime-library/reference/sscanf-s-sscanf-s-l-swscanf-s-swscanf-s-l.md @@ -12,7 +12,7 @@ ms.assetid: 956e65c8-00a5-43e8-a2f2-0f547ac9e56c --- # `sscanf_s`, `_sscanf_s_l`, `swscanf_s`, `_swscanf_s_l` -Reads formatted data from a string. These versions of [`sscanf`, `_sscanf_l`, `swscanf`, `_swscanf_l`](sscanf-sscanf-l-swscanf-swscanf-l.md) have security enhancements, as described in [Security Features in the CRT](../../c-runtime-library/security-features-in-the-crt.md). +Reads formatted data from a string. These versions of [`sscanf`, `_sscanf_l`, `swscanf`, `_swscanf_l`](sscanf-sscanf-l-swscanf-swscanf-l.md) have security enhancements, as described in [Security features in the CRT](../security-features-in-the-crt.md). ## Syntax @@ -43,29 +43,29 @@ int _swscanf_s_l( ### Parameters -*`buffer`*
+*`buffer`*\ Stored data -*`format`*
-Format-control string. For more information, see [Format Specification Fields: scanf and wscanf Functions](../../c-runtime-library/format-specification-fields-scanf-and-wscanf-functions.md). +*`format`*\ +Format-control string. For more information, see [Format specification fields: `scanf` and `wscanf` functions](../format-specification-fields-scanf-and-wscanf-functions.md). -*`argument`*
+*`argument`*\ Optional arguments -*`locale`*
+*`locale`*\ The locale to use -## Return Value +## Return value Each of these functions returns the number of fields that are successfully converted and assigned; the return value does not include fields that were read but not assigned. A return value of 0 indicates that no fields were assigned. The return value is **`EOF`** for an error or if the end of the string is reached before the first conversion. -If *`buffer`* or *`format`* is a **`NULL`** pointer, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, these functions return -1 and set **`errno`** to **`EINVAL`** +If *`buffer`* or *`format`* is a **`NULL`** pointer, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, these functions return -1 and set **`errno`** to **`EINVAL`** -For information about these and other error codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +For information about these and other error codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks -The **`sscanf_s`** function reads data from *`buffer`* into the location that's given by each *`argument`*. The arguments after the format string specify pointers to variables that have a type that corresponds to a type specifier in *format*. Unlike the less secure version [`sscanf`](sscanf-sscanf-l-swscanf-swscanf-l.md), a buffer size parameter is required when you use the type field characters **`c`**, **`C`**, **`s`**, **`S`**, or string control sets that are enclosed in **`[]`**. The buffer size in characters must be supplied as an additional parameter immediately after each buffer parameter that requires it. For example, if you are reading into a string, the buffer size for that string is passed as follows: +The **`sscanf_s`** function reads data from *`buffer`* into the location that's given by each *`argument`*. The arguments after the format string specify pointers to variables that have a type that corresponds to a type specifier in *`format`*. Unlike the less secure version [`sscanf`](sscanf-sscanf-l-swscanf-swscanf-l.md), a buffer size parameter is required when you use the type field characters **`c`**, **`C`**, **`s`**, **`S`**, or string control sets that are enclosed in **`[]`**. The buffer size in characters must be supplied as an additional parameter immediately after each buffer parameter that requires it. For example, if you are reading into a string, the buffer size for that string is passed as follows: ```C wchar_t ws[10]; @@ -88,7 +88,7 @@ char c[4]; sscanf_s(input, "%4c", &c, (unsigned)_countof(c)); // not null terminated ``` -For more information, see [`scanf_s`, `_scanf_s_l`, `wscanf_s`, `_wscanf_s_l`](scanf-s-scanf-s-l-wscanf-s-wscanf-s-l.md) and [`scanf` Type Field Characters](../../c-runtime-library/scanf-type-field-characters.md). +For more information, see [`scanf_s`, `_scanf_s_l`, `wscanf_s`, `_wscanf_s_l`](scanf-s-scanf-s-l-wscanf-s-wscanf-s-l.md) and [`scanf` type field characters](../scanf-type-field-characters.md). > [!NOTE] > The size parameter is of type **`unsigned`**, not **`size_t`**. When compiling for 64-bit targets, use a static cast to convert **`_countof`** or **`sizeof`** results to the correct size. @@ -99,7 +99,7 @@ The *`format`* argument controls the interpretation of the input fields and has The versions of these functions that have the **`_l`** suffix are identical except that they use the locale parameter that's passed in instead of the current thread locale. -### Generic-Text Routine Mappings +### Generic-text routine mappings |`TCHAR.H` routine|`_UNICODE` & `_MBCS` not defined|`_MBCS` defined|`_UNICODE` defined| |---------------------|------------------------------------|--------------------|-----------------------| @@ -113,7 +113,7 @@ The versions of these functions that have the **`_l`** suffix are identical exce |**`sscanf_s`**, **`_sscanf_s_l`**|``| |**`swscanf_s`**, **`_swscanf_s_l`**|`` or ``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -157,8 +157,8 @@ Real: = 15.000000 ## See also -[Stream I/O](../../c-runtime-library/stream-i-o.md)
-[`fscanf`, `_fscanf_l`, `fwscanf`, `_fwscanf_l`](fscanf-fscanf-l-fwscanf-fwscanf-l.md)
-[`scanf`, `_scanf_l`, `wscanf`, `_wscanf_l`](scanf-scanf-l-wscanf-wscanf-l.md)
-[`sprintf`, `_sprintf_l`, `swprintf`, `_swprintf_l`, `__swprintf_l`](sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md)
-[`snprintf`, `_snprintf`, `_snprintf_l`, `_snwprintf`, `_snwprintf_l`](snprintf-snprintf-snprintf-l-snwprintf-snwprintf-l.md)
+[Stream I/O](../stream-i-o.md)\ +[`fscanf`, `_fscanf_l`, `fwscanf`, `_fwscanf_l`](fscanf-fscanf-l-fwscanf-fwscanf-l.md)\ +[`scanf`, `_scanf_l`, `wscanf`, `_wscanf_l`](scanf-scanf-l-wscanf-wscanf-l.md)\ +[`sprintf`, `_sprintf_l`, `swprintf`, `_swprintf_l`, `__swprintf_l`](sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md)\ +[`snprintf`, `_snprintf`, `_snprintf_l`, `_snwprintf`, `_snwprintf_l`](snprintf-snprintf-snprintf-l-snwprintf-snwprintf-l.md) diff --git a/docs/c-runtime-library/reference/sscanf-sscanf-l-swscanf-swscanf-l.md b/docs/c-runtime-library/reference/sscanf-sscanf-l-swscanf-swscanf-l.md index f2e33d2f0e8..29b49103def 100644 --- a/docs/c-runtime-library/reference/sscanf-sscanf-l-swscanf-swscanf-l.md +++ b/docs/c-runtime-library/reference/sscanf-sscanf-l-swscanf-swscanf-l.md @@ -43,31 +43,31 @@ int _swscanf_l( ### Parameters -*`buffer`*
+*`buffer`*\ Stored data -*`format`*
-Format-control string. For more information, see [Format Specifications](../../c-runtime-library/format-specification-fields-scanf-and-wscanf-functions.md). +*`format`*\ +Format-control string. For more information, see [Format specification syntax](../format-specification-fields-scanf-and-wscanf-functions.md). -*`argument`*
+*`argument`*\ Optional arguments -*`locale`*
+*`locale`*\ The locale to use -## Return Value +## Return value Each of these functions returns the number of fields successfully converted and assigned; the return value does not include fields that were read but not assigned. A return value of 0 indicates that no fields were assigned. The return value is **`EOF`** for an error or if the end of the string is reached before the first conversion. -If *`buffer`* or *`format`* is a **`NULL`** pointer, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, these functions return -1 and set **`errno`** to **`EINVAL`**. +If *`buffer`* or *`format`* is a **`NULL`** pointer, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, these functions return -1 and set **`errno`** to **`EINVAL`**. -For information on these and other error codes, see [`_doserrno`, `errno`, `_sys_errlist`, and `_sys_nerr`](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +For information on these and other error codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks The **`sscanf`** function reads data from *`buffer`* into the location given by each *`argument`*. Every *`argument`* must be a pointer to a variable with a type that corresponds to a type specifier in *`format`*. The *`format`* argument controls the interpretation of the input fields and has the same form and function as the *`format`* argument for the **`scanf`** function. If copying takes place between strings that overlap, the behavior is undefined. -For information about scanf type field characters, see [`scanf` Type Field Characters](../scanf-type-field-characters.md). For information about scanf format specification fields, see [Format Specification Fields](../format-specification-fields-scanf-and-wscanf-functions.md). +For information about scanf type field characters, see [`scanf` type field characters](../scanf-type-field-characters.md). For information about scanf format specification fields, see [Format specification fields](../format-specification-fields-scanf-and-wscanf-functions.md). > [!IMPORTANT] > When reading a string with **`sscanf`**, always specify a width for the **`%s`** format (for example, **"`%32s`"** instead of **"`%s`"**); otherwise, improperly formatted input can easily cause a buffer overrun. @@ -76,7 +76,7 @@ For information about scanf type field characters, see [`scanf` Type Field Chara The versions of these functions with the **`_l`** suffix are identical except that they use the locale parameter passed in instead of the current thread locale. -### Generic-Text Routine Mappings +### Generic-text routine mappings |`TCHAR.H` routine|`_UNICODE` & `_MBCS` not defined|`_MBCS` defined|`_UNICODE` defined| |---------------------|------------------------------------|--------------------|-----------------------| @@ -90,7 +90,7 @@ The versions of these functions with the **`_l`** suffix are identical except th |**`sscanf`**, **`_sscanf_l`**|``| |**`swscanf`**, **`_swscanf_l`**|`` or ``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -135,8 +135,8 @@ Real: = 15.000000 ## See also -[Stream I/O](../../c-runtime-library/stream-i-o.md)
-[`fscanf`, `_fscanf_l`, `fwscanf`, `_fwscanf_l`](fscanf-fscanf-l-fwscanf-fwscanf-l.md)
-[`scanf`, `_scanf_l`, `wscanf`, `_wscanf_l`](scanf-scanf-l-wscanf-wscanf-l.md)
-[`sprintf`, `_sprintf_l`, `swprintf`, `_swprintf_l`, `__swprintf_l`](sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md)
-[`snprintf`, `_snprintf`, `_snprintf_l`, `_snwprintf`, `_snwprintf_l`](snprintf-snprintf-snprintf-l-snwprintf-snwprintf-l.md)
+[Stream I/O](../stream-i-o.md)\ +[`fscanf`, `_fscanf_l`, `fwscanf`, `_fwscanf_l`](fscanf-fscanf-l-fwscanf-fwscanf-l.md)\ +[`scanf`, `_scanf_l`, `wscanf`, `_wscanf_l`](scanf-scanf-l-wscanf-wscanf-l.md)\ +[`sprintf`, `_sprintf_l`, `swprintf`, `_swprintf_l`, `__swprintf_l`](sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md)\ +[`snprintf`, `_snprintf`, `_snprintf_l`, `_snwprintf`, `_snwprintf_l`](snprintf-snprintf-snprintf-l-snwprintf-snwprintf-l.md) diff --git a/docs/c-runtime-library/reference/stat-functions.md b/docs/c-runtime-library/reference/stat-functions.md index 6362fea9451..b85ca16501b 100644 --- a/docs/c-runtime-library/reference/stat-functions.md +++ b/docs/c-runtime-library/reference/stat-functions.md @@ -69,17 +69,17 @@ int _wstat64i32( ### Parameters -*`path`*
+*`path`*\ Pointer to a string containing the path of existing file or directory. -*`buffer`*
+*`buffer`*\ Pointer to structure that stores results. -## Return Value +## Return value Each of these functions returns 0 if the file-status information is obtained. A return value of -1 indicates an error, in which case **`errno`** is set to **`ENOENT`**, indicating that the filename or path couldn't be found. A return value of **`EINVAL`** indicates an invalid parameter; **`errno`** is also set to **`EINVAL`** in this case. -For more information about return codes, see [`_doserrno`, `errno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). +For more information about return codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). The date stamp on a file can be represented if it's later than midnight, January 1, 1970, and before 23:59:59, December 31, 3000, UTC, unless you use **`_stat32`** or **`_wstat32`**, or have defined **`_USE_32BIT_TIME_T`**, in which case the date can be represented only until 23:59:59 January 18, 2038, UTC. @@ -96,11 +96,11 @@ Variations of these functions support 32-bit or 64-bit time types, and 32-bit or > [!NOTE] > **`_wstat`** does not work with Windows Vista symbolic links. In these cases, **`_wstat`** will always report a file size of 0. **`_stat`** does work correctly with symbolic links. -This function validates its parameters. If either *`path`* or *`buffer`* is **`NULL`**, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). +This function validates its parameters. If either *`path`* or *`buffer`* is **`NULL`**, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). 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). -### Time Type and File Length Type Variations of `_stat` +### Time type and file length type variations of `_stat` |Functions|_USE_32BIT_TIME_T defined?|Time type|File length type| |---------------|------------------------------------|---------------|----------------------| @@ -113,7 +113,7 @@ By default, this function's global state is scoped to the application. To change |**`_stat32i64`**, **`_wstat32i64`**|Not affected by the macro definition|32-bit|64-bit| |**`_stat64i32`**, **`_wstat64i32`**|Not affected by the macro definition|64-bit|32-bit| -### Generic-Text Routine Mappings +### Generic-text routine mappings |`TCHAR.H` routine|`_UNICODE` & `_MBCS` not defined|`_MBCS` defined|`_UNICODE` defined| |---------------------|------------------------------------|--------------------|-----------------------| @@ -139,7 +139,7 @@ The **`_stat`** structure, defined in **`SYS\STAT.H`**, includes the following f | **`st_size`** | Size of the file in bytes; a 64-bit integer for variations with the **`i64`** suffix. | | **`st_uid`** | Numeric identifier of user who owns file (UNIX-specific). This field will always be zero on Windows systems. A redirected file is classified as a Windows file. | -If *`path`* refers to a device, the **`st_size`**, various time fields, **`st_dev`**, and **`st_rdev`** fields in the **`_stat`** structure are meaningless. Because **`STAT.H`** uses the [`_dev_t`](../../c-runtime-library/standard-types.md) type that is defined in **`TYPES.H`**, you must include **`TYPES.H`** before **`STAT.H`** in your code. +If *`path`* refers to a device, the **`st_size`**, various time fields, **`st_dev`**, and **`st_rdev`** fields in the **`_stat`** structure are meaningless. Because **`STAT.H`** uses the [`_dev_t`](../standard-types.md) type that is defined in **`TYPES.H`**, you must include **`TYPES.H`** before **`STAT.H`** in your code. ## Requirements @@ -148,7 +148,7 @@ If *`path`* refers to a device, the **`st_size`**, various time fields, **`st_de |**`_stat`**, **`_stat32`**, **`_stat64`**, **`_stati64`**, **`_stat32i64`**, **`_stat64i32`**|`` followed by ``|``| |**`_wstat`**, **`_wstat32`**, **`_wstat64`**, **`_wstati64`**, **`_wstat32i64`**, **`_wstat64i32`**|`` followed by `` or ``|``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -215,8 +215,8 @@ Time modified : Thu Feb 07 14:39:36 2002 ## See also -[File Handling](../../c-runtime-library/file-handling.md)
-[`_access`, `_waccess`](access-waccess.md)
-[`_fstat`, `_fstat32`, `_fstat64`, `_fstati64`, `_fstat32i64`, `_fstat64i32`](fstat-fstat32-fstat64-fstati64-fstat32i64-fstat64i32.md)
-[`_getmbcp`](getmbcp.md)
-[`_setmbcp`](setmbcp.md)
+[File handling](../file-handling.md)\ +[`_access`, `_waccess`](access-waccess.md)\ +[`_fstat`, `_fstat32`, `_fstat64`, `_fstati64`, `_fstat32i64`, `_fstat64i32`](fstat-fstat32-fstat64-fstati64-fstat32i64-fstat64i32.md)\ +[`_getmbcp`](getmbcp.md)\ +[`_setmbcp`](setmbcp.md) diff --git a/docs/c-runtime-library/reference/static-assert-macro.md b/docs/c-runtime-library/reference/static-assert-macro.md index 0e09a119ff6..46a4af5cfd1 100644 --- a/docs/c-runtime-library/reference/static-assert-macro.md +++ b/docs/c-runtime-library/reference/static-assert-macro.md @@ -23,16 +23,16 @@ _STATIC_ASSERT( ### Parameters -*booleanExpression*
+*`booleanExpression`*\ Expression (including pointers) that evaluates to nonzero (**TRUE**) or 0 (**FALSE**). ## Remarks -This macro resembles the [_ASSERT and _ASSERTE macros](assert-asserte-assert-expr-macros.md), except that *booleanExpression* is evaluated at compile time instead of at runtime. If *booleanExpression* evaluates to **FALSE** (0), [Compiler Error C2466](../../error-messages/compiler-errors-1/compiler-error-c2466.md) is generated. +This macro resembles the [`_ASSERT` and `_ASSERTE` macros](assert-asserte-assert-expr-macros.md), except that *`booleanExpression`* is evaluated at compile time instead of at runtime. If *`booleanExpression`* evaluates to **FALSE** (0), [Compiler Error C2466](../../error-messages/compiler-errors-1/compiler-error-c2466.md) is generated. ## Example -In this example, we check whether the [sizeof](../../c-language/sizeof-operator-c.md) an **`int`** is larger than or equal to 2 bytes and whether the [sizeof](../../c-language/sizeof-operator-c.md) a **`long`** is 1 byte. The program will not compile and it will generate [Compiler Error C2466](../../error-messages/compiler-errors-1/compiler-error-c2466.md) because a **`long`** is larger than 1 byte. +In this example, we check whether the [`sizeof`](../../c-language/sizeof-operator-c.md) an **`int`** is larger than or equal to 2 bytes and whether the [`sizeof`](../../c-language/sizeof-operator-c.md) a **`long`** is 1 byte. The program will not compile and it will generate [Compiler Error C2466](../../error-messages/compiler-errors-1/compiler-error-c2466.md) because a **`long`** is larger than 1 byte. ```C // crt__static_assert.c @@ -60,5 +60,5 @@ int main() ## See also -[Alphabetical Function Reference](crt-alphabetical-function-reference.md)
-[_ASSERT, _ASSERTE, _ASSERT_EXPR Macros](assert-asserte-assert-expr-macros.md)
+[Alphabetical function reference](crt-alphabetical-function-reference.md)\ +[_ASSERT, _ASSERTE, _ASSERT_EXPR Macros](assert-asserte-assert-expr-macros.md) diff --git a/docs/c-runtime-library/reference/status87-statusfp-statusfp2.md b/docs/c-runtime-library/reference/status87-statusfp-statusfp2.md index 50365d33196..b7d83a52efa 100644 --- a/docs/c-runtime-library/reference/status87-statusfp-statusfp2.md +++ b/docs/c-runtime-library/reference/status87-statusfp-statusfp2.md @@ -24,15 +24,15 @@ void _statusfp2(unsigned int *px86, unsigned int *pSSE2) ### Parameters -*px86*
+*`px86`*\ This address is filled with the status word for the x87 floating-point unit. -*pSSE2*
+*`pSSE2`*\ This address is filled with the status word for the SSE2 floating-point unit. -## Return Value +## Return value -For **_status87** and **_statusfp**, the bits in the value that's returned indicate the floating-point status. See the FLOAT.H include file for a definition of the bits that are returned by **_statusfp**. Many math library functions modify the floating-point status word, with unpredictable results. Optimization can reorder, combine, and eliminate floating-point operations around calls to **_status87**, **_statusfp**, and related functions. Use the [/Od (Disable (Debug))](../../build/reference/od-disable-debug.md) compiler option or the [fenv_access](../../preprocessor/fenv-access.md) pragma directive to prevent optimizations that reorder floating-point operations. Return values from **_clearfp** and **_statusfp**, and also the return parameters of **_statusfp2**, are more reliable if fewer floating-point operations are performed between known states of the floating-point status word. +For **_status87** and **_statusfp**, the bits in the value that's returned indicate the floating-point status. See the FLOAT.H include file for a definition of the bits that are returned by **_statusfp**. Many math library functions modify the floating-point status word, with unpredictable results. Optimization can reorder, combine, and eliminate floating-point operations around calls to **_status87**, **_statusfp**, and related functions. Use the [/Od (Disable (Debug))](../../build/reference/od-disable-debug.md) compiler option or the [`fenv_access`](../../preprocessor/fenv-access.md) pragma directive to prevent optimizations that reorder floating-point operations. Return values from **_clearfp** and **_statusfp**, and also the return parameters of **_statusfp2**, are more reliable if fewer floating-point operations are performed between known states of the floating-point status word. ## Remarks @@ -50,7 +50,7 @@ These functions are not useful for [/clr (Common Language Runtime Compilation)]( |-------------|---------------------| |**_status87**, **_statusfp**, **_statusfp2**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -100,6 +100,6 @@ Status = 0x00080003 - inexact, underflow, denormal ## See also -[Floating-Point Support](../../c-runtime-library/floating-point-support.md)
-[_clear87, _clearfp](clear87-clearfp.md)
-[_control87, _controlfp, \__control87_2](control87-controlfp-control87-2.md)
+[Math and floating-point support](../floating-point-support.md)\ +[`_clear87`, `_clearfp`](clear87-clearfp.md)\ +[`_control87`, `_controlfp`, `__control87_2`](control87-controlfp-control87-2.md) diff --git a/docs/c-runtime-library/reference/strcat-s-wcscat-s-mbscat-s.md b/docs/c-runtime-library/reference/strcat-s-wcscat-s-mbscat-s.md index 69184b69529..ec02e6060ca 100644 --- a/docs/c-runtime-library/reference/strcat-s-wcscat-s-mbscat-s.md +++ b/docs/c-runtime-library/reference/strcat-s-wcscat-s-mbscat-s.md @@ -12,7 +12,7 @@ ms.assetid: 0f2f9901-c5c5-480b-98bc-f8f690792fc0 --- # `strcat_s`, `wcscat_s`, `_mbscat_s`, `_mbscat_s_l` -Appends a string. These versions of [`strcat`, `wcscat`, `_mbscat`](strcat-wcscat-mbscat.md) have security enhancements, as described in [Security Features in the CRT](../../c-runtime-library/security-features-in-the-crt.md). +Appends a string. These versions of [`strcat`, `wcscat`, `_mbscat`](strcat-wcscat-mbscat.md) have security enhancements, as described in [Security features in the CRT](../security-features-in-the-crt.md). > [!IMPORTANT] > **`_mbscat_s`** and **`_mbscat_s_l`** cannot be used in applications that execute in the Windows Runtime. For more information, see [CRT functions not supported in Universal Windows Platform apps](../../cppcx/crt-functions-not-supported-in-universal-windows-platform-apps.md). @@ -66,23 +66,23 @@ errno_t _mbscat_s_l( ### Parameters -*`strDestination`*
+*`strDestination`*\ Null-terminated destination string buffer. -*`numberOfElements`*
+*`numberOfElements`*\ Size of the destination string buffer. -*`strSource`*
+*`strSource`*\ Null-terminated source string buffer. -*`locale`*
+*`locale`*\ Locale to use. -## Return Value +## Return value Zero if successful; an error code on failure. -### Error Conditions +### Error conditions |*`strDestination`*|*`numberOfElements`*|*`strSource`*|Return value|Contents of *`strDestination`*| |----------------------|------------------------|-----------------|------------------|----------------------------------| @@ -105,17 +105,17 @@ strcat_s(buf, 16 - strlen(buf), " End"); // Incorrect **`wcscat_s`** and **`_mbscat_s`** are wide-character and multibyte-character versions of **`strcat_s`**. The arguments and return value of **`wcscat_s`** are wide-character strings; those of **`_mbscat_s`** are multibyte-character strings. These three functions behave identically otherwise. -If *`strDestination`* is a null pointer, or is not null-terminated, or if *`strSource`* is a **`NULL`** pointer, or if the destination string is too small, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, these functions return **`EINVAL`** and set **`errno`** to **`EINVAL`**. +If *`strDestination`* is a null pointer, or is not null-terminated, or if *`strSource`* is a **`NULL`** pointer, or if the destination string is too small, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, these functions return **`EINVAL`** and set **`errno`** to **`EINVAL`**. -The versions of functions that have the **`_l`** suffix have the same behavior, but use the locale parameter that's passed in instead of the current locale. For more information, see [Locale](../../c-runtime-library/locale.md). +The versions of functions that have the **`_l`** suffix have the same behavior, but use the locale parameter that's passed in instead of the current locale. For more information, see [Locale](../locale.md). -In C++, using these functions is simplified by template overloads; the overloads can infer buffer length automatically (eliminating the need to specify a size argument) and they can automatically replace older, non-secure functions with their newer, secure counterparts. For more information, see [Secure Template Overloads](../../c-runtime-library/secure-template-overloads.md). +In C++, using these functions is simplified by template overloads; the overloads can infer buffer length automatically (eliminating the need to specify a size argument) and they can automatically replace older, non-secure functions with their newer, secure counterparts. For more information, see [Secure template overloads](../secure-template-overloads.md). -The debug library versions of these functions first fill the buffer with 0xFE. To disable this behavior, use [_CrtSetDebugFillThreshold](crtsetdebugfillthreshold.md). +The debug library versions of these functions first fill the buffer with 0xFE. To disable this behavior, use [`_CrtSetDebugFillThreshold`](crtsetdebugfillthreshold.md). By default, this function's global state is scoped to the application. To change this behavior, see [Global state in the CRT](../global-state.md). -### Generic-Text Routine Mappings +### Generic-text routine mappings |`TCHAR.H` routine|`_UNICODE` & `_MBCS` not defined|`_MBCS` defined|`_UNICODE` defined| |---------------------|------------------------------------|--------------------|-----------------------| @@ -129,7 +129,7 @@ By default, this function's global state is scoped to the application. To change |**`wcscat_s`**|`` or ``| |**`_mbscat_s`**|``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -137,10 +137,10 @@ See the code example in [`strcpy_s`, `wcscpy_s`, `_mbscpy_s`](strcpy-s-wcscpy-s- ## See also -[String Manipulation](../../c-runtime-library/string-manipulation-crt.md)
-[`strncat`, `_strncat_l`, `wcsncat`, `_wcsncat_l`, `_mbsncat`, `_mbsncat_l`](strncat-strncat-l-wcsncat-wcsncat-l-mbsncat-mbsncat-l.md)
-[`strncmp`, `wcsncmp`, `_mbsncmp`, `_mbsncmp_l`](strncmp-wcsncmp-mbsncmp-mbsncmp-l.md)
-[`strncpy`, `_strncpy_l`, `wcsncpy`, `_wcsncpy_l`, `_mbsncpy`, `_mbsncpy_l`](strncpy-strncpy-l-wcsncpy-wcsncpy-l-mbsncpy-mbsncpy-l.md)
-[`_strnicmp`, `_wcsnicmp`, `_mbsnicmp`, `_strnicmp_l`, `_wcsnicmp_l`, `_mbsnicmp_l`](strnicmp-wcsnicmp-mbsnicmp-strnicmp-l-wcsnicmp-l-mbsnicmp-l.md)
-[`strrchr`, `wcsrchr`, `_mbsrchr`, `_mbsrchr_l`](strrchr-wcsrchr-mbsrchr-mbsrchr-l.md)
-[`strspn`, `wcsspn`, `_mbsspn`, `_mbsspn_l`](strspn-wcsspn-mbsspn-mbsspn-l.md)
+[String manipulation](../string-manipulation-crt.md)\ +[`strncat`, `_strncat_l`, `wcsncat`, `_wcsncat_l`, `_mbsncat`, `_mbsncat_l`](strncat-strncat-l-wcsncat-wcsncat-l-mbsncat-mbsncat-l.md)\ +[`strncmp`, `wcsncmp`, `_mbsncmp`, `_mbsncmp_l`](strncmp-wcsncmp-mbsncmp-mbsncmp-l.md)\ +[`strncpy`, `_strncpy_l`, `wcsncpy`, `_wcsncpy_l`, `_mbsncpy`, `_mbsncpy_l`](strncpy-strncpy-l-wcsncpy-wcsncpy-l-mbsncpy-mbsncpy-l.md)\ +[`_strnicmp`, `_wcsnicmp`, `_mbsnicmp`, `_strnicmp_l`, `_wcsnicmp_l`, `_mbsnicmp_l`](strnicmp-wcsnicmp-mbsnicmp-strnicmp-l-wcsnicmp-l-mbsnicmp-l.md)\ +[`strrchr`, `wcsrchr`, `_mbsrchr`, `_mbsrchr_l`](strrchr-wcsrchr-mbsrchr-mbsrchr-l.md)\ +[`strspn`, `wcsspn`, `_mbsspn`, `_mbsspn_l`](strspn-wcsspn-mbsspn-mbsspn-l.md) diff --git a/docs/c-runtime-library/reference/strcat-wcscat-mbscat.md b/docs/c-runtime-library/reference/strcat-wcscat-mbscat.md index e3e060402ee..996435f1e43 100644 --- a/docs/c-runtime-library/reference/strcat-wcscat-mbscat.md +++ b/docs/c-runtime-library/reference/strcat-wcscat-mbscat.md @@ -51,13 +51,13 @@ unsigned char *_mbscat( ### Parameters -*`strDestination`*
+*`strDestination`*\ Null-terminated destination string. -*`strSource`*
+*`strSource`*\ Null-terminated source string. -## Return Value +## Return value Each of these functions returns the destination string (*`strDestination`*). No return value is reserved to indicate an error. @@ -66,13 +66,13 @@ Each of these functions returns the destination string (*`strDestination`*). No The **`strcat`** function appends *`strSource`* to *`strDestination`* and terminates the resulting string with a null character. The initial character of *`strSource`* overwrites the terminating null character of *`strDestination`*. The behavior of **`strcat`** is undefined if the source and destination strings overlap. > [!IMPORTANT] -> Because **`strcat`** does not check for sufficient space in *strDestination* before appending *strSource*, it is a potential cause of buffer overruns. Consider using [`strncat`](strncat-strncat-l-wcsncat-wcsncat-l-mbsncat-mbsncat-l.md) instead. +> Because **`strcat`** does not check for sufficient space in *`strDestination`* before appending *`strSource`*, it is a potential cause of buffer overruns. Consider using [`strncat`](strncat-strncat-l-wcsncat-wcsncat-l-mbsncat-mbsncat-l.md) instead. **`wcscat`** and **`_mbscat`** are wide-character and multibyte-character versions of **`strcat`**. The arguments and return value of **`wcscat`** are wide-character strings; those of **`_mbscat`** are multibyte-character strings. These three functions behave identically otherwise. -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). -### Generic-Text Routine Mappings +### Generic-text routine mappings |`TCHAR.H` routine|`_UNICODE` & `_MBCS` not defined|`_MBCS` defined|`_UNICODE` defined| |---------------------|------------------------------------|--------------------|-----------------------| @@ -86,7 +86,7 @@ In C++, these functions have template overloads that invoke the newer, secure co |**`wcscat`**|`` or ``| |**`_mbscat`**|``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -94,10 +94,10 @@ See the example for [`strcpy`](strcpy-wcscpy-mbscpy.md). ## See also -[String Manipulation](../../c-runtime-library/string-manipulation-crt.md)
-[`strncat`, `_strncat_l`, `wcsncat`, `_wcsncat_l`, `_mbsncat`, `_mbsncat_l`](strncat-strncat-l-wcsncat-wcsncat-l-mbsncat-mbsncat-l.md)
-[`strncmp`, `wcsncmp`, `_mbsncmp`, `_mbsncmp_l`](strncmp-wcsncmp-mbsncmp-mbsncmp-l.md)
-[`strncpy`, `_strncpy_l`, `wcsncpy`, `_wcsncpy_l`, `_mbsncpy`, `_mbsncpy_l`](strncpy-strncpy-l-wcsncpy-wcsncpy-l-mbsncpy-mbsncpy-l.md)
-[`_strnicmp`, `_wcsnicmp`, `_mbsnicmp`, `_strnicmp_l`, `_wcsnicmp_l`, `_mbsnicmp_l`](strnicmp-wcsnicmp-mbsnicmp-strnicmp-l-wcsnicmp-l-mbsnicmp-l.md)
-[`strrchr`, `wcsrchr`, `_mbsrchr`, `_mbsrchr_l`](strrchr-wcsrchr-mbsrchr-mbsrchr-l.md)
-[`strspn`, `wcsspn`, `_mbsspn`, `_mbsspn_l`](strspn-wcsspn-mbsspn-mbsspn-l.md)
+[String manipulation](../string-manipulation-crt.md)\ +[`strncat`, `_strncat_l`, `wcsncat`, `_wcsncat_l`, `_mbsncat`, `_mbsncat_l`](strncat-strncat-l-wcsncat-wcsncat-l-mbsncat-mbsncat-l.md)\ +[`strncmp`, `wcsncmp`, `_mbsncmp`, `_mbsncmp_l`](strncmp-wcsncmp-mbsncmp-mbsncmp-l.md)\ +[`strncpy`, `_strncpy_l`, `wcsncpy`, `_wcsncpy_l`, `_mbsncpy`, `_mbsncpy_l`](strncpy-strncpy-l-wcsncpy-wcsncpy-l-mbsncpy-mbsncpy-l.md)\ +[`_strnicmp`, `_wcsnicmp`, `_mbsnicmp`, `_strnicmp_l`, `_wcsnicmp_l`, `_mbsnicmp_l`](strnicmp-wcsnicmp-mbsnicmp-strnicmp-l-wcsnicmp-l-mbsnicmp-l.md)\ +[`strrchr`, `wcsrchr`, `_mbsrchr`, `_mbsrchr_l`](strrchr-wcsrchr-mbsrchr-mbsrchr-l.md)\ +[`strspn`, `wcsspn`, `_mbsspn`, `_mbsspn_l`](strspn-wcsspn-mbsspn-mbsspn-l.md) diff --git a/docs/c-runtime-library/reference/strchr-wcschr-mbschr-mbschr-l.md b/docs/c-runtime-library/reference/strchr-wcschr-mbschr-mbschr-l.md index 3b31ca63a75..5f2788c2b4f 100644 --- a/docs/c-runtime-library/reference/strchr-wcschr-mbschr-mbschr-l.md +++ b/docs/c-runtime-library/reference/strchr-wcschr-mbschr-mbschr-l.md @@ -75,16 +75,16 @@ const unsigned char *_mbschr_l( ### Parameters -*`str`*
+*`str`*\ Null-terminated source string. -*`c`*
+*`c`*\ Character to be located. -*`locale`*
+*`locale`*\ Locale to use. -## Return Value +## Return value Each of these functions returns a pointer to the first occurrence of *`c`* in *`str`*, or `NULL` if *`c`* is not found. @@ -92,15 +92,15 @@ Each of these functions returns a pointer to the first occurrence of *`c`* in *` The `strchr` function finds the first occurrence of *`c`* in *`str`*, or it returns `NULL` if *`c`* is not found. The null terminating character is included in the search. -`wcschr`, `_mbschr` and `_mbschr_l` are wide-character and multibyte-character versions of `strchr`. The arguments and return value of `wcschr` are wide-character strings; those of `_mbschr` are multibyte-character strings. `_mbschr` recognizes multibyte-character sequences. Also, if the string is a null pointer, `_mbschr` invokes the invalid parameter handler, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, `_mbschr` returns `NULL` and sets `errno` to `EINVAL`. `strchr` and `wcschr` do not validate their parameters. These three functions behave identically otherwise. +`wcschr`, `_mbschr` and `_mbschr_l` are wide-character and multibyte-character versions of `strchr`. The arguments and return value of `wcschr` are wide-character strings; those of `_mbschr` are multibyte-character strings. `_mbschr` recognizes multibyte-character sequences. Also, if the string is a null pointer, `_mbschr` invokes the invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, `_mbschr` returns `NULL` and sets `errno` to `EINVAL`. `strchr` and `wcschr` do not validate their parameters. These three functions behave identically otherwise. -The output value is affected by the setting of the `LC_CTYPE` category setting of the locale; for more information, see [`setlocale`](setlocale-wsetlocale.md). The versions of these functions without the **`_l`** suffix use the current locale for this locale-dependent behavior; the versions with the **`_l`** suffix are identical except that they use the locale parameter passed in instead. For more information, see [Locale](../../c-runtime-library/locale.md). +The output value is affected by the setting of the `LC_CTYPE` category setting of the locale; for more information, see [`setlocale`](setlocale-wsetlocale.md). The versions of these functions without the **`_l`** suffix use the current locale for this locale-dependent behavior; the versions with the **`_l`** suffix are identical except that they use the locale parameter passed in instead. For more information, see [Locale](../locale.md). In C, these functions take a **`const`** pointer for the first argument. In C++, two overloads are available. The overload taking a pointer to **`const`** returns a pointer to **`const`**; the version that takes a pointer to non-**`const`** returns a pointer to non-**`const`**. The macro `_CRT_CONST_CORRECT_OVERLOADS` is defined if both the **`const`** and non-**`const`** versions of these functions are available. If you require the non-**`const`** behavior for both C++ overloads, define the symbol `_CONST_RETURN`. 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| |---------------------|------------------------------------|--------------------|-----------------------| @@ -115,7 +115,7 @@ By default, this function's global state is scoped to the application. To change |`wcschr`|`` or ``| |`_mbschr`, `_mbschr_l`|``| -For more information about compatibility, see [Compatibility](../../c-runtime-library/compatibility.md). +For more information about compatibility, see [Compatibility](../compatibility.md). ## Example @@ -176,14 +176,14 @@ Result: last r found at position 30 ## See also -[String Manipulation](../../c-runtime-library/string-manipulation-crt.md)
-[Locale](../../c-runtime-library/locale.md)
-[Interpretation of Multibyte-Character Sequences](../../c-runtime-library/interpretation-of-multibyte-character-sequences.md)
-[`strcspn`, `wcscspn`, `_mbscspn`, `_mbscspn_l`](strcspn-wcscspn-mbscspn-mbscspn-l.md)
-[`strncat`, `_strncat_l`, `wcsncat`, `_wcsncat_l`, `_mbsncat`, `_mbsncat_l`](strncat-strncat-l-wcsncat-wcsncat-l-mbsncat-mbsncat-l.md)
-[`strncmp`, `wcsncmp`, `_mbsncmp`, `_mbsncmp_l`](strncmp-wcsncmp-mbsncmp-mbsncmp-l.md)
-[`strncpy`, `_strncpy_l`, `wcsncpy`, `_wcsncpy_l`, `_mbsncpy`, `_mbsncpy_l`](strncpy-strncpy-l-wcsncpy-wcsncpy-l-mbsncpy-mbsncpy-l.md)
-[`_strnicmp`, `_wcsnicmp`, `_mbsnicmp`, `_strnicmp_l`, `_wcsnicmp_l`, `_mbsnicmp_l`](strnicmp-wcsnicmp-mbsnicmp-strnicmp-l-wcsnicmp-l-mbsnicmp-l.md)
-[`strpbrk`, `wcspbrk`, `_mbspbrk`, `_mbspbrk_l`](strpbrk-wcspbrk-mbspbrk-mbspbrk-l.md)
-[`strrchr`, `wcsrchr`, `_mbsrchr`, `_mbsrchr_l`](strrchr-wcsrchr-mbsrchr-mbsrchr-l.md)
-[`strstr`, `wcsstr`, `_mbsstr`, `_mbsstr_l`](strstr-wcsstr-mbsstr-mbsstr-l.md)
+[String manipulation](../string-manipulation-crt.md)\ +[Locale](../locale.md)\ +[Interpretation of multibyte-character sequences](../interpretation-of-multibyte-character-sequences.md)\ +[`strcspn`, `wcscspn`, `_mbscspn`, `_mbscspn_l`](strcspn-wcscspn-mbscspn-mbscspn-l.md)\ +[`strncat`, `_strncat_l`, `wcsncat`, `_wcsncat_l`, `_mbsncat`, `_mbsncat_l`](strncat-strncat-l-wcsncat-wcsncat-l-mbsncat-mbsncat-l.md)\ +[`strncmp`, `wcsncmp`, `_mbsncmp`, `_mbsncmp_l`](strncmp-wcsncmp-mbsncmp-mbsncmp-l.md)\ +[`strncpy`, `_strncpy_l`, `wcsncpy`, `_wcsncpy_l`, `_mbsncpy`, `_mbsncpy_l`](strncpy-strncpy-l-wcsncpy-wcsncpy-l-mbsncpy-mbsncpy-l.md)\ +[`_strnicmp`, `_wcsnicmp`, `_mbsnicmp`, `_strnicmp_l`, `_wcsnicmp_l`, `_mbsnicmp_l`](strnicmp-wcsnicmp-mbsnicmp-strnicmp-l-wcsnicmp-l-mbsnicmp-l.md)\ +[`strpbrk`, `wcspbrk`, `_mbspbrk`, `_mbspbrk_l`](strpbrk-wcspbrk-mbspbrk-mbspbrk-l.md)\ +[`strrchr`, `wcsrchr`, `_mbsrchr`, `_mbsrchr_l`](strrchr-wcsrchr-mbsrchr-mbsrchr-l.md)\ +[`strstr`, `wcsstr`, `_mbsstr`, `_mbsstr_l`](strstr-wcsstr-mbsstr-mbsstr-l.md) diff --git a/docs/c-runtime-library/reference/strcmp-wcscmp-mbscmp.md b/docs/c-runtime-library/reference/strcmp-wcscmp-mbscmp.md index b4b8700a8ce..194449223da 100644 --- a/docs/c-runtime-library/reference/strcmp-wcscmp-mbscmp.md +++ b/docs/c-runtime-library/reference/strcmp-wcscmp-mbscmp.md @@ -41,13 +41,13 @@ int _mbscmp_l( ### Parameters -*`string1`*, *`string2`*
+*`string1`*, *`string2`*\ Null-terminated strings to compare. -*`locale`*
+*`locale`*\ Locale to use. -## Return Value +## Return value The return value for each of these functions indicates the ordinal relation of *`string1`* to *`string2`*. @@ -61,11 +61,11 @@ On a parameter validation error, **`_mbscmp`** and **`_mbscmp_l`** return **`_NL ## Remarks -The **`strcmp`** function performs an ordinal comparison of *`string1`* and *`string2`* and returns a value that indicates their relationship. **`wcscmp`** and **`_mbscmp`** are, respectively, wide-character and multibyte-character versions of **`strcmp`**. **`_mbscmp`** recognizes multibyte-character sequences according to the current multibyte code page and returns **`_NLSCMPERROR`** on an error. **`_mbscmp_l`** has the same behavior, but uses the locale parameter that's passed in instead of the current locale. For more information, see [Code Pages](../../c-runtime-library/code-pages.md). Also, if *`string1`* or *`string2`* is a null pointer, **`_mbscmp`** invokes the invalid parameter handler, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, **`_mbscmp`** and **`_mbscmp_l`** return **`_NLSCMPERROR`** and set **`errno`** to **`EINVAL`**. **`strcmp`** and **`wcscmp`** do not validate their parameters. These functions behave identically otherwise. +The **`strcmp`** function performs an ordinal comparison of *`string1`* and *`string2`* and returns a value that indicates their relationship. **`wcscmp`** and **`_mbscmp`** are, respectively, wide-character and multibyte-character versions of **`strcmp`**. **`_mbscmp`** recognizes multibyte-character sequences according to the current multibyte code page and returns **`_NLSCMPERROR`** on an error. **`_mbscmp_l`** has the same behavior, but uses the locale parameter that's passed in instead of the current locale. For more information, see [Code pages](../code-pages.md). Also, if *`string1`* or *`string2`* is a null pointer, **`_mbscmp`** invokes the invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, **`_mbscmp`** and **`_mbscmp_l`** return **`_NLSCMPERROR`** and set **`errno`** to **`EINVAL`**. **`strcmp`** and **`wcscmp`** do not validate their parameters. These functions behave identically otherwise. 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| |---------------------|------------------------------------|--------------------|-----------------------| @@ -87,11 +87,11 @@ The **`strcmp`** functions are case-sensitive. **`_stricmp`**, **`_wcsicmp`**, a |**`wcscmp`**|`` or ``| |**`_mbscmp`**|``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Libraries -All versions of the [C run-time libraries](../../c-runtime-library/crt-library-features.md). +All versions of the [C run-time libraries](../crt-library-features.md). ## Example @@ -144,13 +144,13 @@ Compare strings: ## See also -[String Manipulation](../../c-runtime-library/string-manipulation-crt.md)
-[`memcmp`, `wmemcmp`](memcmp-wmemcmp.md)
-[`_memicmp`, `_memicmp_`l](memicmp-memicmp-l.md)
-[`strcoll` Functions](../../c-runtime-library/strcoll-functions.md)
-[`_stricmp`, `_wcsicmp`, `_mbsicmp`, `_stricmp_l`, `_wcsicmp_l`, `_mbsicmp_l`](stricmp-wcsicmp-mbsicmp-stricmp-l-wcsicmp-l-mbsicmp-l.md)
-[`strncmp`, `wcsncmp`, `_mbsncmp`, `_mbsncmp_l`](strncmp-wcsncmp-mbsncmp-mbsncmp-l.md)
-[`_strnicmp`, `_wcsnicmp`, `_mbsnicmp`, `_strnicmp_l`, `_wcsnicmp_l`, `_mbsnicmp_l`](strnicmp-wcsnicmp-mbsnicmp-strnicmp-l-wcsnicmp-l-mbsnicmp-l.md)
-[`strrchr`, `wcsrchr`, `_mbsrchr`, `_mbsrchr_l`](strrchr-wcsrchr-mbsrchr-mbsrchr-l.md)
-[`strspn`, `wcsspn`, `_mbsspn`, `_mbsspn_l`](strspn-wcsspn-mbsspn-mbsspn-l.md)
-[`strxfrm`, `wcsxfrm`, `_strxfrm_l`, `_wcsxfrm_l`](strxfrm-wcsxfrm-strxfrm-l-wcsxfrm-l.md)
+[String manipulation](../string-manipulation-crt.md)\ +[`memcmp`, `wmemcmp`](memcmp-wmemcmp.md)\ +[`_memicmp`, `_memicmp_l`](memicmp-memicmp-l.md)\ +[`strcoll` functions](../strcoll-functions.md)\ +[`_stricmp`, `_wcsicmp`, `_mbsicmp`, `_stricmp_l`, `_wcsicmp_l`, `_mbsicmp_l`](stricmp-wcsicmp-mbsicmp-stricmp-l-wcsicmp-l-mbsicmp-l.md)\ +[`strncmp`, `wcsncmp`, `_mbsncmp`, `_mbsncmp_l`](strncmp-wcsncmp-mbsncmp-mbsncmp-l.md)\ +[`_strnicmp`, `_wcsnicmp`, `_mbsnicmp`, `_strnicmp_l`, `_wcsnicmp_l`, `_mbsnicmp_l`](strnicmp-wcsnicmp-mbsnicmp-strnicmp-l-wcsnicmp-l-mbsnicmp-l.md)\ +[`strrchr`, `wcsrchr`, `_mbsrchr`, `_mbsrchr_l`](strrchr-wcsrchr-mbsrchr-mbsrchr-l.md)\ +[`strspn`, `wcsspn`, `_mbsspn`, `_mbsspn_l`](strspn-wcsspn-mbsspn-mbsspn-l.md)\ +[`strxfrm`, `wcsxfrm`, `_strxfrm_l`, `_wcsxfrm_l`](strxfrm-wcsxfrm-strxfrm-l-wcsxfrm-l.md) diff --git a/docs/c-runtime-library/reference/strcmpi.md b/docs/c-runtime-library/reference/strcmpi.md index 9541964928c..40fc4160807 100644 --- a/docs/c-runtime-library/reference/strcmpi.md +++ b/docs/c-runtime-library/reference/strcmpi.md @@ -12,6 +12,6 @@ ms.assetid: 74206b2f-9bca-4d32-9cdc-93cb94c2aaa1 --- # strcmpi -The Microsoft-specific function name `strcmpi` is a deprecated alias for the [_stricmp](stricmp-wcsicmp-mbsicmp-stricmp-l-wcsicmp-l-mbsicmp-l.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. +The Microsoft-specific function name `strcmpi` is a deprecated alias for the [`_stricmp`](stricmp-wcsicmp-mbsicmp-stricmp-l-wcsicmp-l-mbsicmp-l.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. -We recommend you use [_stricmp](stricmp-wcsicmp-mbsicmp-stricmp-l-wcsicmp-l-mbsicmp-l.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). +We recommend you use [`_stricmp`](stricmp-wcsicmp-mbsicmp-stricmp-l-wcsicmp-l-mbsicmp-l.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). diff --git a/docs/c-runtime-library/reference/strcoll-wcscoll-mbscoll-strcoll-l-wcscoll-l-mbscoll-l.md b/docs/c-runtime-library/reference/strcoll-wcscoll-mbscoll-strcoll-l-wcscoll-l-mbscoll-l.md index 0918b217a46..b36024241ca 100644 --- a/docs/c-runtime-library/reference/strcoll-wcscoll-mbscoll-strcoll-l-wcscoll-l-mbscoll-l.md +++ b/docs/c-runtime-library/reference/strcoll-wcscoll-mbscoll-strcoll-l-wcscoll-l-mbscoll-l.md @@ -51,35 +51,35 @@ int _mbscoll_l( ### Parameters -*string1*, *string2*
+*`string1`*, *`string2`*\ Null-terminated strings to compare. -*locale*
+*`locale`*\ Locale to use. -## Return Value +## Return value -Each of these functions returns a value indicating the relationship of *string1* to *string2*, as follows. +Each of these functions returns a value indicating the relationship of *`string1`* to *`string2`*, as follows. |Return value|Relationship of string1 to string2| |------------------|----------------------------------------| -|< 0|*string1* less than *string2*| -|0|*string1* identical to *string2*| -|> 0|*string1* greater than *string2*| +|< 0|*`string1`* less than *`string2`*| +|0|*`string1`* identical to *`string2`*| +|> 0|*`string1`* greater than *`string2`*| -Each of these functions returns **_NLSCMPERROR** on an error. To use **_NLSCMPERROR**, include either STRING.H or MBSTRING.H. **wcscoll** can fail if either *string1* or *string2* is **NULL** or contains wide-character codes outside the domain of the collating sequence. When an error occurs, **wcscoll** may set **errno** to **EINVAL**. To check for an error on a call to **wcscoll**, set **errno** to 0 and then check **errno** after calling **wcscoll**. +Each of these functions returns **_NLSCMPERROR** on an error. To use **_NLSCMPERROR**, include either STRING.H or MBSTRING.H. **wcscoll** can fail if either *`string1`* or *`string2`* is **NULL** or contains wide-character codes outside the domain of the collating sequence. When an error occurs, **wcscoll** may set **errno** to **EINVAL**. To check for an error on a call to **wcscoll**, set **errno** to 0 and then check **errno** after calling **wcscoll**. ## Remarks -Each of these functions performs a case-sensitive comparison of *string1* and *string2* according to the code page currently in use. These functions should be used only when there is a difference between the character set order and the lexicographic character order in the current code page and this difference is of interest for the string comparison. +Each of these functions performs a case-sensitive comparison of *`string1`* and *`string2`* according to the code page currently in use. These functions should be used only when there is a difference between the character set order and the lexicographic character order in the current code page and this difference is of interest for the string comparison. -All of these functions validate their parameters. If either *string1* or *string2* is a null pointer, or if *count* is greater than **INT_MAX**, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md) . If execution is allowed to continue, these functions return **_NLSCMPERROR** and set **errno** to **EINVAL**. +All of these functions validate their parameters. If either *`string1`* or *`string2`* is a null pointer, or if *`count`* is greater than **INT_MAX**, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md) . If execution is allowed to continue, these functions return **_NLSCMPERROR** and set **errno** to **EINVAL**. -The comparison of the two strings is a locale-dependent operation since each locale has different rules for ordering characters. The versions of these functions without the **_l** suffix use the current thread's locale for this locale-dependent behavior; the versions with the **_l** suffix are identical to the corresponding function without the suffix except that they use the locale passed in as a parameter instead of the current locale. For more information, see [Locale](../../c-runtime-library/locale.md). +The comparison of the two strings is a locale-dependent operation since each locale has different rules for ordering characters. The versions of these functions without the **_l** suffix use the current thread's locale for this locale-dependent behavior; the versions with the **_l** suffix are identical to the corresponding function without the suffix except that they use the locale passed in as a parameter instead of the current locale. For more information, see [Locale](../locale.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| |---------------------|------------------------------------|--------------------|-----------------------| @@ -95,18 +95,18 @@ By default, this function's global state is scoped to the application. To change |**_strcoll_l**|\| |**_wcscoll_l**|\, \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Locale](../../c-runtime-library/locale.md)
-[String Manipulation](../../c-runtime-library/string-manipulation-crt.md)
-[strcoll Functions](../../c-runtime-library/strcoll-functions.md)
-[localeconv](localeconv.md)
-[_mbsnbcoll, _mbsnbcoll_l, _mbsnbicoll, _mbsnbicoll_l](mbsnbcoll-mbsnbcoll-l-mbsnbicoll-mbsnbicoll-l.md)
-[setlocale, _wsetlocale](setlocale-wsetlocale.md)
-[strcmp, wcscmp, _mbscmp](strcmp-wcscmp-mbscmp.md)
-[_stricmp, _wcsicmp, _mbsicmp, _stricmp_l, _wcsicmp_l, _mbsicmp_l](stricmp-wcsicmp-mbsicmp-stricmp-l-wcsicmp-l-mbsicmp-l.md)
-[strncmp, wcsncmp, _mbsncmp, _mbsncmp_l](strncmp-wcsncmp-mbsncmp-mbsncmp-l.md)
-[_strnicmp, _wcsnicmp, _mbsnicmp, _strnicmp_l, _wcsnicmp_l, _mbsnicmp_l](strnicmp-wcsnicmp-mbsnicmp-strnicmp-l-wcsnicmp-l-mbsnicmp-l.md)
-[strxfrm, wcsxfrm, _strxfrm_l, _wcsxfrm_l](strxfrm-wcsxfrm-strxfrm-l-wcsxfrm-l.md)
+[Locale](../locale.md)\ +[String manipulation](../string-manipulation-crt.md)\ +[`strcoll` functions](../strcoll-functions.md)\ +[`localeconv`](localeconv.md)\ +[`_mbsnbcoll`, `_mbsnbcoll_l`, `_mbsnbicoll`, `_mbsnbicoll_l`](mbsnbcoll-mbsnbcoll-l-mbsnbicoll-mbsnbicoll-l.md)\ +[`setlocale`, `_wsetlocale`](setlocale-wsetlocale.md)\ +[`strcmp`, `wcscmp`, `_mbscmp`](strcmp-wcscmp-mbscmp.md)\ +[`_stricmp`, `_wcsicmp`, `_mbsicmp`, `_stricmp_l`, `_wcsicmp_l`, `_mbsicmp_l`](stricmp-wcsicmp-mbsicmp-stricmp-l-wcsicmp-l-mbsicmp-l.md)\ +[`strncmp`, `wcsncmp`, `_mbsncmp`, `_mbsncmp_l`](strncmp-wcsncmp-mbsncmp-mbsncmp-l.md)\ +[`_strnicmp`, `_wcsnicmp`, `_mbsnicmp`, `_strnicmp_l`, `_wcsnicmp_l`, `_mbsnicmp_l`](strnicmp-wcsnicmp-mbsnicmp-strnicmp-l-wcsnicmp-l-mbsnicmp-l.md)\ +[`strxfrm`, `wcsxfrm`, `_strxfrm_l`, `_wcsxfrm_l`](strxfrm-wcsxfrm-strxfrm-l-wcsxfrm-l.md) diff --git a/docs/c-runtime-library/reference/strcpy-s-wcscpy-s-mbscpy-s.md b/docs/c-runtime-library/reference/strcpy-s-wcscpy-s-mbscpy-s.md index 4f7f889d574..98a263a927a 100644 --- a/docs/c-runtime-library/reference/strcpy-s-wcscpy-s-mbscpy-s.md +++ b/docs/c-runtime-library/reference/strcpy-s-wcscpy-s-mbscpy-s.md @@ -12,7 +12,7 @@ ms.assetid: 611326f3-7929-4a5d-a465-a4683af3b053 --- # `strcpy_s`, `wcscpy_s`, `_mbscpy_s`, `_mbscpy_s_l` -Copies a string. These versions of [`strcpy`, `wcscpy`, `_mbscpy`](strcpy-wcscpy-mbscpy.md) have security enhancements, as described in [Security Features in the CRT](../../c-runtime-library/security-features-in-the-crt.md). +Copies a string. These versions of [`strcpy`, `wcscpy`, `_mbscpy`](strcpy-wcscpy-mbscpy.md) have security enhancements, as described in [Security features in the CRT](../security-features-in-the-crt.md). > [!IMPORTANT] > **`_mbscpy_s`** and **`_mbscpy_s_l`** cannot be used in applications that execute in the Windows Runtime. For more information, see [CRT functions not supported in Universal Windows Platform apps](../../cppcx/crt-functions-not-supported-in-universal-windows-platform-apps.md). @@ -70,23 +70,23 @@ errno_t _mbscpy_s_l( ### Parameters -*`dest`*
+*`dest`*\ Location of the destination string buffer. -*`dest_size`*
+*`dest_size`*\ Size of the destination string buffer in **`char`** units for narrow and multi-byte functions, and **`wchar_t`** units for wide functions. This value must be greater than zero and not greater than **`RSIZE_MAX`**. Ensure that this size accounts for the terminating `NULL` following the string. -*`src`*
+*`src`*\ Null-terminated source string buffer. -*`locale`*
+*`locale`*\ Locale to use. -## Return Value +## Return value Zero if successful; otherwise, an error. -### Error Conditions +### Error conditions |*`dest`*|*`dest_size`*|*`src`*|Return value|Contents of *`dest`*| |----------------------|------------------------|-----------------|------------------|----------------------------------| @@ -98,19 +98,19 @@ Zero if successful; otherwise, an error. The **`strcpy_s`** function copies the contents in the address of *`src`*, including the terminating null character, to the location that's specified by *`dest`*. The destination string must be large enough to hold the source string and its terminating null character. The behavior of **`strcpy_s`** is undefined if the source and destination strings overlap. -**`wcscpy_s`** is the wide-character version of **`strcpy_s`**, and **`_mbscpy_s`** is the multibyte-character version. The arguments of **`wcscpy_s`** are wide-character strings; those of **`_mbscpy_s`** and **`_mbscpy_s_l`** are multibyte-character strings. These functions behave identically otherwise. **`_mbscpy_s_l`** is identical to **`_mbscpy_s`** except that it uses the locale parameter passed in instead of the current locale. For more information, see [`locale`](../../c-runtime-library/locale.md). +**`wcscpy_s`** is the wide-character version of **`strcpy_s`**, and **`_mbscpy_s`** is the multibyte-character version. The arguments of **`wcscpy_s`** are wide-character strings; those of **`_mbscpy_s`** and **`_mbscpy_s_l`** are multibyte-character strings. These functions behave identically otherwise. **`_mbscpy_s_l`** is identical to **`_mbscpy_s`** except that it uses the locale parameter passed in instead of the current locale. For more information, see [`locale`](../locale.md). -If *`dest`* or *`src`* is a null pointer, or if the destination string size *`dest_size`* is too small, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, these functions return **`EINVAL`** and set **`errno`** to **`EINVAL`** when *`dest`* or *`src`* is a null pointer, and they return **`ERANGE`** and set **`errno`** to **`ERANGE`** when the destination string is too small. +If *`dest`* or *`src`* is a null pointer, or if the destination string size *`dest_size`* is too small, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, these functions return **`EINVAL`** and set **`errno`** to **`EINVAL`** when *`dest`* or *`src`* is a null pointer, and they return **`ERANGE`** and set **`errno`** to **`ERANGE`** when the destination string is too small. Upon successful execution, the destination string is always null-terminated. -In C++, use of these functions is simplified by template overloads that can infer buffer length automatically so that you don't have to specify a size argument, and they can automatically replace older, less-secure functions with their newer, more secure counterparts. For more information, see [Secure Template Overloads](../../c-runtime-library/secure-template-overloads.md). +In C++, use of these functions is simplified by template overloads that can infer buffer length automatically so that you don't have to specify a size argument, and they can automatically replace older, less-secure functions with their newer, more secure counterparts. For more information, see [Secure template overloads](../secure-template-overloads.md). The debug library versions of these functions first fill the buffer with 0xFE. To disable this behavior, use [`_CrtSetDebugFillThreshold`](crtsetdebugfillthreshold.md). By default, this function's global state is scoped to the application. To change this behavior, see [Global state in the CRT](../global-state.md). -### Generic-Text Routine Mappings +### Generic-text routine mappings |`TCHAR.H` routine|`_UNICODE` & `_MBCS` not defined|`_MBCS` defined|`_UNICODE` defined| |---------------------|------------------------------------|--------------------|-----------------------| @@ -124,7 +124,7 @@ By default, this function's global state is scoped to the application. To change |**`wcscpy_s`**|`` or ``| |**`_mbscpy_s`**|``| -These functions are Microsoft-specific. For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +These functions are Microsoft-specific. For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -191,12 +191,12 @@ stringBuffer = Hello world from wcscpy_s and wcscat_s! ## See also -[String Manipulation](../../c-runtime-library/string-manipulation-crt.md)
-[`strcat`, `wcscat`, `_mbscat`, `_mbscat_l`](strcat-wcscat-mbscat.md)
-[`strcmp`, `wcscmp`, `_mbscmp`, `_mbscmp_l`](strcmp-wcscmp-mbscmp.md)
-[`strncat_s`, `_strncat_s_l`, `wcsncat_s`, `_wcsncat_s_l`, `_mbsncat_s`, `_mbsncat_s_l`](strncat-s-strncat-s-l-wcsncat-s-wcsncat-s-l-mbsncat-s-mbsncat-s-l.md)
-[`strncmp`, `wcsncmp`, `_mbsncmp`, `_mbsncmp_l`](strncmp-wcsncmp-mbsncmp-mbsncmp-l.md)
-[`strncpy_s`, `_strncpy_s_l`, `wcsncpy_s`, `_wcsncpy_s_l`, `_mbsncpy_s`, `_mbsncpy_s_l`](strncpy-s-strncpy-s-l-wcsncpy-s-wcsncpy-s-l-mbsncpy-s-mbsncpy-s-l.md)
-[`_strnicmp`, `_wcsnicmp`, `_mbsnicmp`, `_strnicmp_l`, `_wcsnicmp_l`, `_mbsnicmp_l`](strnicmp-wcsnicmp-mbsnicmp-strnicmp-l-wcsnicmp-l-mbsnicmp-l.md)
-[`strrchr`, `wcsrchr`, `_mbsrchr`, `_mbsrchr_l`](strrchr-wcsrchr-mbsrchr-mbsrchr-l.md)
-[`strspn`, `wcsspn`, `_mbsspn`, `_mbsspn_l`](strspn-wcsspn-mbsspn-mbsspn-l.md)
+[String manipulation](../string-manipulation-crt.md)\ +[`strcat`, `wcscat`, `_mbscat`, `_mbscat_l`](strcat-wcscat-mbscat.md)\ +[`strcmp`, `wcscmp`, `_mbscmp`, `_mbscmp_l`](strcmp-wcscmp-mbscmp.md)\ +[`strncat_s`, `_strncat_s_l`, `wcsncat_s`, `_wcsncat_s_l`, `_mbsncat_s`, `_mbsncat_s_l`](strncat-s-strncat-s-l-wcsncat-s-wcsncat-s-l-mbsncat-s-mbsncat-s-l.md)\ +[`strncmp`, `wcsncmp`, `_mbsncmp`, `_mbsncmp_l`](strncmp-wcsncmp-mbsncmp-mbsncmp-l.md)\ +[`strncpy_s`, `_strncpy_s_l`, `wcsncpy_s`, `_wcsncpy_s_l`, `_mbsncpy_s`, `_mbsncpy_s_l`](strncpy-s-strncpy-s-l-wcsncpy-s-wcsncpy-s-l-mbsncpy-s-mbsncpy-s-l.md)\ +[`_strnicmp`, `_wcsnicmp`, `_mbsnicmp`, `_strnicmp_l`, `_wcsnicmp_l`, `_mbsnicmp_l`](strnicmp-wcsnicmp-mbsnicmp-strnicmp-l-wcsnicmp-l-mbsnicmp-l.md)\ +[`strrchr`, `wcsrchr`, `_mbsrchr`, `_mbsrchr_l`](strrchr-wcsrchr-mbsrchr-mbsrchr-l.md)\ +[`strspn`, `wcsspn`, `_mbsspn`, `_mbsspn_l`](strspn-wcsspn-mbsspn-mbsspn-l.md) diff --git a/docs/c-runtime-library/reference/strcpy-wcscpy-mbscpy.md b/docs/c-runtime-library/reference/strcpy-wcscpy-mbscpy.md index dba53388e02..1375d289731 100644 --- a/docs/c-runtime-library/reference/strcpy-wcscpy-mbscpy.md +++ b/docs/c-runtime-library/reference/strcpy-wcscpy-mbscpy.md @@ -51,30 +51,30 @@ unsigned char *_mbscpy( ### Parameters -*`strDestination`*
+*`strDestination`*\ Destination string. -*`strSource`*
+*`strSource`*\ Null-terminated source string. -## Return Value +## Return value Each of these functions returns the destination string. No return value is reserved to indicate an error. ## Remarks -The **`strcpy`** function copies *strSource*, including the terminating null character, to the location that's specified by *`strDestination`*. The behavior of **`strcpy`** is undefined if the source and destination strings overlap. +The **`strcpy`** function copies *`strSource`*, including the terminating null character, to the location that's specified by *`strDestination`*. The behavior of **`strcpy`** is undefined if the source and destination strings overlap. > [!IMPORTANT] -> Because **`strcpy`** does not check for sufficient space in *strDestination* before it copies *`strSource`*, it is a potential cause of buffer overruns. Therefore, we recommend that you use [`strcpy_s`](strcpy-s-wcscpy-s-mbscpy-s.md) instead. +> Because **`strcpy`** does not check for sufficient space in *`strDestination`* before it copies *`strSource`*, it is a potential cause of buffer overruns. Therefore, we recommend that you use [`strcpy_s`](strcpy-s-wcscpy-s-mbscpy-s.md) instead. **`wcscpy`** and **`_mbscpy`** are, respectively, wide-character and multibyte-character versions of **`strcpy`**. The arguments and return value of **`wcscpy`** are wide-character strings; those of **`_mbscpy`** are multibyte-character strings. These three functions behave identically otherwise. -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 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| |---------------------|------------------------------------|--------------------|-----------------------| @@ -88,7 +88,7 @@ By default, this function's global state is scoped to the application. To change |**`wcscpy`**|`` or ``| |**`_mbscpy`**|``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -127,12 +127,12 @@ String = Hello world from strcpy and strcat! ## See also -[String Manipulation](../../c-runtime-library/string-manipulation-crt.md)
-[`strcat`, `wcscat`, `_mbscat`](strcat-wcscat-mbscat.md)
-[`strcmp`, `wcscmp`, `_mbscmp`](strcmp-wcscmp-mbscmp.md)
-[`strncat`, `_strncat_l`, `wcsncat`, `_wcsncat_l`, `_mbsncat`, `_mbsncat_l`](strncat-strncat-l-wcsncat-wcsncat-l-mbsncat-mbsncat-l.md)
-[`strncmp`, `wcsncmp`, `_mbsncmp`, `_mbsncmp_l`](strncmp-wcsncmp-mbsncmp-mbsncmp-l.md)
-[`strncpy`, `_strncpy_l`, `wcsncpy`, `_wcsncpy_l`, `_mbsncpy`, `_mbsncpy_l`](strncpy-strncpy-l-wcsncpy-wcsncpy-l-mbsncpy-mbsncpy-l.md)
-[`_strnicmp`, `_wcsnicmp`, `_mbsnicmp`, `_strnicmp_l`, `_wcsnicmp_l`, `_mbsnicmp_l`](strnicmp-wcsnicmp-mbsnicmp-strnicmp-l-wcsnicmp-l-mbsnicmp-l.md)
-[`strrchr`, `wcsrchr`, `_mbsrchr`, `_mbsrchr_l`](strrchr-wcsrchr-mbsrchr-mbsrchr-l.md)
-[`strspn`, `wcsspn`, `_mbsspn`, `_mbsspn_l`](strspn-wcsspn-mbsspn-mbsspn-l.md)
+[String manipulation](../string-manipulation-crt.md)\ +[`strcat`, `wcscat`, `_mbscat`](strcat-wcscat-mbscat.md)\ +[`strcmp`, `wcscmp`, `_mbscmp`](strcmp-wcscmp-mbscmp.md)\ +[`strncat`, `_strncat_l`, `wcsncat`, `_wcsncat_l`, `_mbsncat`, `_mbsncat_l`](strncat-strncat-l-wcsncat-wcsncat-l-mbsncat-mbsncat-l.md)\ +[`strncmp`, `wcsncmp`, `_mbsncmp`, `_mbsncmp_l`](strncmp-wcsncmp-mbsncmp-mbsncmp-l.md)\ +[`strncpy`, `_strncpy_l`, `wcsncpy`, `_wcsncpy_l`, `_mbsncpy`, `_mbsncpy_l`](strncpy-strncpy-l-wcsncpy-wcsncpy-l-mbsncpy-mbsncpy-l.md)\ +[`_strnicmp`, `_wcsnicmp`, `_mbsnicmp`, `_strnicmp_l`, `_wcsnicmp_l`, `_mbsnicmp_l`](strnicmp-wcsnicmp-mbsnicmp-strnicmp-l-wcsnicmp-l-mbsnicmp-l.md)\ +[`strrchr`, `wcsrchr`, `_mbsrchr`, `_mbsrchr_l`](strrchr-wcsrchr-mbsrchr-mbsrchr-l.md)\ +[`strspn`, `wcsspn`, `_mbsspn`, `_mbsspn_l`](strspn-wcsspn-mbsspn-mbsspn-l.md) diff --git a/docs/c-runtime-library/reference/strcspn-wcscspn-mbscspn-mbscspn-l.md b/docs/c-runtime-library/reference/strcspn-wcscspn-mbscspn-mbscspn-l.md index 9d72ac71d37..3b3d35641ff 100644 --- a/docs/c-runtime-library/reference/strcspn-wcscspn-mbscspn-mbscspn-l.md +++ b/docs/c-runtime-library/reference/strcspn-wcscspn-mbscspn-mbscspn-l.md @@ -41,18 +41,18 @@ size_t _mbscspn_l( ### Parameters -*str*
+*`str`*\ Null-terminated searched string. -*strCharSet*
+*`strCharSet`*\ Null-terminated character set. -*locale*
+*`locale`*\ Locale to use. -## Return Value +## Return value -These functions return the index of the first character in *str* that is in *strCharSet*. If none of the characters in *str* is in *strCharSet*, then the return value is the length of *str*. +These functions return the index of the first character in *`str`* that is in *`strCharSet`*. If none of the characters in *`str`* is in *`strCharSet`*, then the return value is the length of *`str`*. No return value is reserved to indicate an error. @@ -60,13 +60,13 @@ No return value is reserved to indicate an error. **wcscspn** and **_mbscspn** are wide-character and multibyte-character versions of **strcspn**. The arguments of **wcscspn** are wide-character strings; those of **_mbscspn** are multibyte-character strings. -**_mbscspn** validates its parameters. If either *str* or *strCharSet* is a null pointer, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, the function returns 0 and sets **errno** to **EINVAL**. **strcspn** and **wcscspn** do not validate their parameters. These three functions behave identically otherwise. +**_mbscspn** validates its parameters. If either *`str`* or *`strCharSet`* is a null pointer, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, the function returns 0 and sets **errno** to **EINVAL**. **strcspn** and **wcscspn** do not validate their parameters. These three functions behave identically otherwise. -The output value is affected by the setting of the **LC_CTYPE** category setting of the locale; see [setlocale](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. For more information, see [Locale](../../c-runtime-library/locale.md). +The output value is affected by the setting of the **LC_CTYPE** category setting of the locale; see [`setlocale`](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. For more information, see [Locale](../locale.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| |---------------------|------------------------------------|--------------------|-----------------------| @@ -81,7 +81,7 @@ By default, this function's global state is scoped to the application. To change |**wcscspn**|\ or \| |**_mbscspn**, **_mbscspn_l**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -119,12 +119,12 @@ strcspn( "", "" ) = 0 ## See also -[String Manipulation](../../c-runtime-library/string-manipulation-crt.md)
-[Locale](../../c-runtime-library/locale.md)
-[Interpretation of Multibyte-Character Sequences](../../c-runtime-library/interpretation-of-multibyte-character-sequences.md)
-[strncat, _strncat_l, wcsncat, _wcsncat_l, _mbsncat, _mbsncat_l](strncat-strncat-l-wcsncat-wcsncat-l-mbsncat-mbsncat-l.md)
-[strncmp, wcsncmp, _mbsncmp, _mbsncmp_l](strncmp-wcsncmp-mbsncmp-mbsncmp-l.md)
-[strncpy, _strncpy_l, wcsncpy, _wcsncpy_l, _mbsncpy, _mbsncpy_l](strncpy-strncpy-l-wcsncpy-wcsncpy-l-mbsncpy-mbsncpy-l.md)
-[_strnicmp, _wcsnicmp, _mbsnicmp, _strnicmp_l, _wcsnicmp_l, _mbsnicmp_l](strnicmp-wcsnicmp-mbsnicmp-strnicmp-l-wcsnicmp-l-mbsnicmp-l.md)
-[strrchr, wcsrchr, _mbsrchr, _mbsrchr_l](strrchr-wcsrchr-mbsrchr-mbsrchr-l.md)
-[strspn, wcsspn, _mbsspn, _mbsspn_l](strspn-wcsspn-mbsspn-mbsspn-l.md)
+[String manipulation](../string-manipulation-crt.md)\ +[Locale](../locale.md)\ +[Interpretation of multibyte-character sequences](../interpretation-of-multibyte-character-sequences.md)\ +[`strncat`, `_strncat_l`, `wcsncat`, `_wcsncat_l`, `_mbsncat`, `_mbsncat_l`](strncat-strncat-l-wcsncat-wcsncat-l-mbsncat-mbsncat-l.md)\ +[`strncmp`, `wcsncmp`, `_mbsncmp`, `_mbsncmp_l`](strncmp-wcsncmp-mbsncmp-mbsncmp-l.md)\ +[`strncpy`, `_strncpy_l`, `wcsncpy`, `_wcsncpy_l`, `_mbsncpy`, `_mbsncpy_l`](strncpy-strncpy-l-wcsncpy-wcsncpy-l-mbsncpy-mbsncpy-l.md)\ +[`_strnicmp`, `_wcsnicmp`, `_mbsnicmp`, `_strnicmp_l`, `_wcsnicmp_l`, `_mbsnicmp_l`](strnicmp-wcsnicmp-mbsnicmp-strnicmp-l-wcsnicmp-l-mbsnicmp-l.md)\ +[`strrchr`, `wcsrchr`, `_mbsrchr`, `_mbsrchr_l`](strrchr-wcsrchr-mbsrchr-mbsrchr-l.md)\ +[`strspn`, `wcsspn`, `_mbsspn`, `_mbsspn_l`](strspn-wcsspn-mbsspn-mbsspn-l.md) diff --git a/docs/c-runtime-library/reference/strdate-s-wstrdate-s.md b/docs/c-runtime-library/reference/strdate-s-wstrdate-s.md index d2db2b30e0a..5dbe7d15b53 100644 --- a/docs/c-runtime-library/reference/strdate-s-wstrdate-s.md +++ b/docs/c-runtime-library/reference/strdate-s-wstrdate-s.md @@ -12,7 +12,7 @@ ms.assetid: d41d8ea9-e5ce-40d4-864e-1ac29b455991 --- # _strdate_s, _wstrdate_s -Copy the current system date to a buffer. These functions are versions of [_strdate, _wstrdate](strdate-wstrdate.md) with security enhancements as described in [Security Features in the CRT](../../c-runtime-library/security-features-in-the-crt.md). +Copy the current system date to a buffer. These functions are versions of [`_strdate`, `_wstrdate`](strdate-wstrdate.md) with security enhancements as described in [Security features in the CRT](../security-features-in-the-crt.md). ## Syntax @@ -37,42 +37,42 @@ errno_t _wstrdate_s( ### Parameters -*buffer*\ +*`buffer`*\ A pointer to a buffer to put the formatted date string. -*size*\ +*`size`*\ Size of the buffer in character units. ## Return value -Zero if successful. The return value is an error code if there's a failure. Error codes are defined in ERRNO.H; see table below for the exact errors generated by this function. For more information on error codes, see [errno](../../c-runtime-library/errno-constants.md). +Zero if successful. The return value is an error code if there's a failure. Error codes are defined in ERRNO.H; see table below for the exact errors generated by this function. For more information on error codes, see [`errno`](../errno-constants.md). ## Error conditions -|*buffer*|*size*|Return|Contents of *buffer*| +|*`buffer`*|*`size`*|Return|Contents of *`buffer`*| |--------------|------------------------|------------|--------------------------| |**NULL**|(any)|**EINVAL**|Not modified| |Not **NULL** (pointing to valid buffer)|0|**EINVAL**|Not modified| -|Not **NULL** (pointing to valid buffer)|0 < *size* < 9|**EINVAL**|Empty string| -|Not **NULL** (pointing to valid buffer)|*size* >= 9|0|Current date formatted as specified in the remarks| +|Not **NULL** (pointing to valid buffer)|0 < *`size`* < 9|**EINVAL**|Empty string| +|Not **NULL** (pointing to valid buffer)|*`size`* >= 9|0|Current date formatted as specified in the remarks| ## Security issues -Passing in an invalid, non-NULL value for *buffer* results in an access violation if the *size* parameter is greater than nine. +Passing in an invalid, non-NULL value for *`buffer`* results in an access violation if the *`size`* parameter is greater than nine. -Passing a value for *size* greater than the actual size of *buffer* results in a buffer overrun. +Passing a value for *`size`* greater than the actual size of *`buffer`* results in a buffer overrun. ## Remarks -These functions provide more secure versions of **_strdate** and **_wstrdate**. The **_strdate_s** function copies the current system date to the buffer pointed to by *buffer*. It's formatted `mm/dd/yy`, where `mm` is the two-digit month, `dd` is the two-digit day, and `yy` is the last two digits of the year. For example, the string `12/05/99` represents December 5, 1999. The buffer must be at least nine characters long. +These functions provide more secure versions of **_strdate** and **_wstrdate**. The **_strdate_s** function copies the current system date to the buffer pointed to by *`buffer`*. It's formatted `mm/dd/yy`, where `mm` is the two-digit month, `dd` is the two-digit day, and `yy` is the last two digits of the year. For example, the string `12/05/99` represents December 5, 1999. The buffer must be at least nine characters long. **_wstrdate_s** is a wide-character version of **_strdate_s**; the argument and return value of **_wstrdate_s** are wide-character strings. These functions behave identically otherwise. -When *buffer* is a **NULL** pointer, or *size* is fewer than nine characters, the invalid parameter handler is invoked. It's described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, these functions return -1. They set **errno** to **EINVAL** if the buffer is **NULL** or if *size* is less than or equal to 0. Or, they set **errno** to **ERANGE** if *size* is less than 9. +When *`buffer`* is a **NULL** pointer, or *`size`* is fewer than nine characters, the invalid parameter handler is invoked. It's described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, these functions return -1. They set **errno** to **EINVAL** if the buffer is **NULL** or if *`size`* is less than or equal to 0. Or, they set **errno** to **ERANGE** if *`size`* is less than 9. -In C++, use of these functions is simplified by template overloads. The overloads can infer buffer length automatically, which eliminates the need to specify a *size* argument. And, they can automatically replace non-secure functions with their newer, more secure counterparts. For more information, see [Secure Template Overloads](../../c-runtime-library/secure-template-overloads.md). +In C++, use of these functions is simplified by template overloads. The overloads can infer buffer length automatically, which eliminates the need to specify a *`size`* argument. And, they can automatically replace non-secure functions with their newer, more secure counterparts. For more information, see [Secure template overloads](../secure-template-overloads.md). -The debug library versions of these functions first fill the buffer with 0xFE. To disable this behavior, use [_CrtSetDebugFillThreshold](crtsetdebugfillthreshold.md). +The debug library versions of these functions first fill the buffer with 0xFE. To disable this behavior, use [`_CrtSetDebugFillThreshold`](crtsetdebugfillthreshold.md). By default, this function's global state is scoped to the application. To change this behavior, see [Global state in the CRT](../global-state.md). @@ -92,15 +92,15 @@ By default, this function's global state is scoped to the application. To change ## Example -See the example for [time](time-time32-time64.md). +See the example for [`time`](time-time32-time64.md). ## See also -[Time Management](../../c-runtime-library/time-management.md)\ -[asctime_s, _wasctime_s](asctime-s-wasctime-s.md)\ -[ctime_s, _ctime32_s, _ctime64_s, _wctime_s, _wctime32_s, _wctime64_s](ctime-s-ctime32-s-ctime64-s-wctime-s-wctime32-s-wctime64-s.md)\ -[gmtime_s, _gmtime32_s, _gmtime64_s](gmtime-s-gmtime32-s-gmtime64-s.md)\ -[localtime_s, _localtime32_s, _localtime64_s](localtime-s-localtime32-s-localtime64-s.md)\ -[mktime, _mktime32, _mktime64](mktime-mktime32-mktime64.md)\ -[time, _time32, _time64](time-time32-time64.md)\ -[_tzset](tzset.md) +[Time management](../time-management.md)\ +[`asctime_s`, `_wasctime_s`](asctime-s-wasctime-s.md)\ +[`ctime_s`, `_ctime32_s`, `_ctime64_s`, `_wctime_s`, `_wctime32_s`, `_wctime64_s`](ctime-s-ctime32-s-ctime64-s-wctime-s-wctime32-s-wctime64-s.md)\ +[`gmtime_s`, `_gmtime32_s`, `_gmtime64_s`](gmtime-s-gmtime32-s-gmtime64-s.md)\ +[`localtime_s`, `_localtime32_s`, `_localtime64_s`](localtime-s-localtime32-s-localtime64-s.md)\ +[`mktime`, `_mktime32`, `_mktime64`](mktime-mktime32-mktime64.md)\ +[`time`, `_time32`, `_time64`](time-time32-time64.md)\ +[`_tzset`](tzset.md) diff --git a/docs/c-runtime-library/reference/strdate-wstrdate.md b/docs/c-runtime-library/reference/strdate-wstrdate.md index 440fce97a12..0a83d7fac8b 100644 --- a/docs/c-runtime-library/reference/strdate-wstrdate.md +++ b/docs/c-runtime-library/reference/strdate-wstrdate.md @@ -12,7 +12,7 @@ ms.assetid: de8e4097-58f8-42ba-9dcd-cb4d9a9f1696 --- # _strdate, _wstrdate -Copy current system date to a buffer. More secure versions of these functions are available; see [_strdate_s, _wstrdate_s](strdate-s-wstrdate-s.md). +Copy current system date to a buffer. More secure versions of these functions are available; see [`_strdate_s`, `_wstrdate_s`](strdate-s-wstrdate-s.md). ## Syntax @@ -35,28 +35,28 @@ wchar_t *_wstrdate( ### Parameters -*datestr*
+*`datestr`*\ A pointer to a buffer containing the formatted date string. -## Return Value +## Return value -Each of these functions returns a pointer to the resulting character string *datestr*. +Each of these functions returns a pointer to the resulting character string *`datestr`*. ## Remarks -More secure versions of these functions are available; see [_strdate_s, _wstrdate_s](strdate-s-wstrdate-s.md). It is recommended that the more secure functions be used wherever possible. +More secure versions of these functions are available; see [`_strdate_s`, `_wstrdate_s`](strdate-s-wstrdate-s.md). It is recommended that the more secure functions be used wherever possible. -The **_strdate** function copies the current system date to the buffer pointed to by *datestr*, formatted **mm**/**dd**/**yy**, where **mm** is two digits representing the month, **dd** is two digits representing the day, and **yy** is the last two digits of the year. For example, the string **12/05/99** represents December 5, 1999. The buffer must be at least 9 bytes long. +The **_strdate** function copies the current system date to the buffer pointed to by *`datestr`*, formatted **mm**/**dd**/**yy**, where **mm** is two digits representing the month, **dd** is two digits representing the day, and **yy** is the last two digits of the year. For example, the string **12/05/99** represents December 5, 1999. The buffer must be at least 9 bytes long. -If *datestr* is a **NULL** pointer, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, these functions return -1 and set **errno** to **EINVAL**. +If *`datestr`* is a **NULL** pointer, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, these functions return -1 and set **errno** to **EINVAL**. **_wstrdate** is a wide-character version of **_strdate**; the argument and return value of **_wstrdate** are wide-character strings. These functions behave identically otherwise. -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 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| |---------------------|------------------------------------|--------------------|-----------------------| @@ -69,7 +69,7 @@ By default, this function's global state is scoped to the application. To change |**_strdate**|\| |**_wstrdate**|\ or \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -99,11 +99,11 @@ OS date: 04/25/03 ## See also -[Time Management](../../c-runtime-library/time-management.md)
-[asctime, _wasctime](asctime-wasctime.md)
-[ctime, _ctime32, _ctime64, _wctime, _wctime32, _wctime64](ctime-ctime32-ctime64-wctime-wctime32-wctime64.md)
-[gmtime, _gmtime32, _gmtime64](gmtime-gmtime32-gmtime64.md)
-[localtime, _localtime32, _localtime64](localtime-localtime32-localtime64.md)
-[mktime, _mktime32, _mktime64](mktime-mktime32-mktime64.md)
-[time, _time32, _time64](time-time32-time64.md)
-[_tzset](tzset.md)
+[Time management](../time-management.md)\ +[`asctime`, `_wasctime`](asctime-wasctime.md)\ +[`ctime`, `_ctime32`, `_ctime64`, `_wctime`, `_wctime32`, `_wctime64`](ctime-ctime32-ctime64-wctime-wctime32-wctime64.md)\ +[`gmtime`, `_gmtime32`, `_gmtime64`](gmtime-gmtime32-gmtime64.md)\ +[`localtime`, `_localtime32`, `_localtime64`](localtime-localtime32-localtime64.md)\ +[`mktime`, `_mktime32`, `_mktime64`](mktime-mktime32-mktime64.md)\ +[`time`, `_time32`, `_time64`](time-time32-time64.md)\ +[`_tzset`](tzset.md) diff --git a/docs/c-runtime-library/reference/strdec-wcsdec-mbsdec-mbsdec-l.md b/docs/c-runtime-library/reference/strdec-wcsdec-mbsdec-mbsdec-l.md index 0bde62850d8..4624c564a0b 100644 --- a/docs/c-runtime-library/reference/strdec-wcsdec-mbsdec-mbsdec-l.md +++ b/docs/c-runtime-library/reference/strdec-wcsdec-mbsdec-mbsdec-l.md @@ -41,33 +41,33 @@ unsigned char *_mbsdec_l( ### Parameters -*start*
-Pointer to any character (or for **_mbsdec** and **_mbsdec_l**, the first byte of any multibyte character) in the source string; *start* must precede *current* in the source string. +*`start`*\ +Pointer to any character (or for **_mbsdec** and **_mbsdec_l**, the first byte of any multibyte character) in the source string; *`start`* must precede *`current`* in the source string. -*current*
-Pointer to any character (or for **_mbsdec** and **_mbsdec_l**, the first byte of any multibyte character) in the source string; *current* must follow *start* in the source string. +*`current`*\ +Pointer to any character (or for **_mbsdec** and **_mbsdec_l**, the first byte of any multibyte character) in the source string; *`current`* must follow *`start`* in the source string. -*locale*
+*`locale`*\ Locale to use. -## Return Value +## Return value -**_mbsdec**, **_mbsdec_l**, **_strdec**, and **_wcsdec** each return a pointer to the character that immediately precedes *current*; **_mbsdec** returns **NULL** if the value of *start* is greater than or equal to that of *current*. **_tcsdec** maps to one of these functions and its return value depends on the mapping. +**_mbsdec**, **_mbsdec_l**, **_strdec**, and **_wcsdec** each return a pointer to the character that immediately precedes *`current`*; **_mbsdec** returns **NULL** if the value of *`start`* is greater than or equal to that of *`current`*. **_tcsdec** maps to one of these functions and its return value depends on the mapping. ## Remarks -The **_mbsdec** and **_mbsdec_l** functions return a pointer to the first byte of the multibyte character that immediately precedes *current* in the string that contains *start*. +The **_mbsdec** and **_mbsdec_l** functions return a pointer to the first byte of the multibyte character that immediately precedes *`current`* in the string that contains *`start`*. -The output value is affected by the setting of the **LC_CTYPE** category setting of the locale; see [setlocale, _wsetlocale](setlocale-wsetlocale.md) for more information. **_mbsdec** recognizes multibyte-character sequences according to the locale that's currently in use, while **_mbsdec_l** is identical except that it instead uses the locale parameter that's passed in. For more information, see [Locale](../../c-runtime-library/locale.md). +The output value is affected by the setting of the **LC_CTYPE** category setting of the locale; see [`setlocale`, `_wsetlocale`](setlocale-wsetlocale.md) for more information. **_mbsdec** recognizes multibyte-character sequences according to the locale that's currently in use, while **_mbsdec_l** is identical except that it instead uses the locale parameter that's passed in. For more information, see [Locale](../locale.md). -If *start* or *current* is **NULL**, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, this function returns **EINVAL** and sets **errno** to **EINVAL**. +If *`start`* or *`current`* is **NULL**, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, this function returns **EINVAL** and sets **errno** to **EINVAL**. > [!IMPORTANT] -> These functions might be vulnerable to buffer overrun threats. Buffer overruns can be used for system attacks because they can cause an unwarranted elevation of privilege. For more information, see [Avoiding Buffer Overruns](/windows/win32/SecBP/avoiding-buffer-overruns). +> These functions might be vulnerable to buffer overrun threats. Buffer overruns can be used for system attacks because they can cause an unwarranted elevation of privilege. For more information, see [Avoiding buffer overruns](/windows/win32/SecBP/avoiding-buffer-overruns). 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| |---------------------|--------------------------------------|--------------------|-----------------------| @@ -75,7 +75,7 @@ By default, this function's global state is scoped to the application. To change **_strdec** and **_wcsdec** are single-byte-character and wide-character versions of **_mbsdec** and **_mbsdec_l**. **_strdec** and **_wcsdec** are provided only for this mapping and should not be used otherwise. -For more information, see [Using Generic-Text Mappings](../../c-runtime-library/using-generic-text-mappings.md) and [Generic-Text Mappings](../../c-runtime-library/generic-text-mappings.md). +For more information, see [Using generic-text mappings](../using-generic-text-mappings.md) and [Generic-text mappings](../generic-text-mappings.md). ## Requirements @@ -86,7 +86,7 @@ For more information, see [Using Generic-Text Mappings](../../c-runtime-library/ |**_strdec**|\|| |**_wcsdec**|\|| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -145,7 +145,7 @@ int main() ## See also -[String Manipulation](../../c-runtime-library/string-manipulation-crt.md)
-[_strinc, _wcsinc, _mbsinc, _mbsinc_l](strinc-wcsinc-mbsinc-mbsinc-l.md)
-[_strnextc, _wcsnextc, _mbsnextc, _mbsnextc_l](strnextc-wcsnextc-mbsnextc-mbsnextc-l.md)
-[_strninc, _wcsninc, _mbsninc, _mbsninc_l](strninc-wcsninc-mbsninc-mbsninc-l.md)
+[String manipulation](../string-manipulation-crt.md)\ +[`_strinc`, `_wcsinc`, `_mbsinc`, `_mbsinc_l`](strinc-wcsinc-mbsinc-mbsinc-l.md)\ +[`_strnextc`, `_wcsnextc`, `_mbsnextc`, `_mbsnextc_l`](strnextc-wcsnextc-mbsnextc-mbsnextc-l.md)\ +[`_strninc`, `_wcsninc`, `_mbsninc`, `_mbsninc_l`](strninc-wcsninc-mbsninc-mbsninc-l.md) diff --git a/docs/c-runtime-library/reference/strdup-dbg-wcsdup-dbg.md b/docs/c-runtime-library/reference/strdup-dbg-wcsdup-dbg.md index 64e6fd6bbda..a0eefbe8032 100644 --- a/docs/c-runtime-library/reference/strdup-dbg-wcsdup-dbg.md +++ b/docs/c-runtime-library/reference/strdup-dbg-wcsdup-dbg.md @@ -12,7 +12,7 @@ ms.assetid: 681db70c-d124-43ab-b83e-5eeea9035097 --- # _strdup_dbg, _wcsdup_dbg -Versions of [_strdup and _wcsdup](strdup-wcsdup-mbsdup.md) that use the debug version of **malloc**. +Versions of [`_strdup` and `_wcsdup`](strdup-wcsdup-mbsdup.md) that use the debug version of **malloc**. ## Syntax @@ -33,29 +33,29 @@ wchar_t *_wcsdup_dbg( ### Parameters -*strSource*
+*`strSource`*\ Null-terminated source string. -*blockType*
+*`blockType`*\ Requested type of memory block: **_CLIENT_BLOCK** or **_NORMAL_BLOCK**. -*filename*
+*`filename`*\ Pointer to name of source file that requested allocation operation or **NULL**. -*linenumber*
+*`linenumber`*\ Line number in source file where allocation operation was requested or **NULL**. -## Return Value +## Return value Each of these functions returns a pointer to the storage location for the copied string or **NULL** if storage cannot be allocated. ## Remarks -The **_strdup_dbg** and **_wcsdup_dbg** functions are identical to **_strdup** and **_wcsdup** except that, when **_DEBUG** is defined, these functions use the debug version of **malloc**, **_malloc_dbg**, to allocate memory for the duplicated string. For information on the debugging features of **_malloc_dbg**, see [_malloc_dbg](malloc-dbg.md). +The **_strdup_dbg** and **_wcsdup_dbg** functions are identical to **_strdup** and **_wcsdup** except that, when **_DEBUG** is defined, these functions use the debug version of **malloc**, **_malloc_dbg**, to allocate memory for the duplicated string. For information on the debugging features of **_malloc_dbg**, see [`_malloc_dbg`](malloc-dbg.md). -You do not need to call these functions explicitly in most cases. Instead, you can define the flag **_CRTDBG_MAP_ALLOC**. When **_CRTDBG_MAP_ALLOC** is defined, calls to **_strdup** and **_wcsdup** are remapped to **_strdup_dbg** and **_wcsdup_dbg**, respectively, with the *blockType* set to **_NORMAL_BLOCK**. Thus, you do not need to call these functions explicitly unless you want to mark the heap blocks as **_CLIENT_BLOCK**. For more information on block types, see [Types of blocks on the debug heap](/visualstudio/debugger/crt-debug-heap-details). +You do not need to call these functions explicitly in most cases. Instead, you can define the flag **_CRTDBG_MAP_ALLOC**. When **_CRTDBG_MAP_ALLOC** is defined, calls to **_strdup** and **_wcsdup** are remapped to **_strdup_dbg** and **_wcsdup_dbg**, respectively, with the *`blockType`* set to **_NORMAL_BLOCK**. Thus, you do not need to call these functions explicitly unless you want to mark the heap blocks as **_CLIENT_BLOCK**. For more information on block types, see [Types of blocks on the debug heap](/visualstudio/debugger/crt-debug-heap-details). -### Generic-Text Routine Mappings +### Generic-text routine mappings |TCHAR.H routine|_UNICODE & _MBCS not defined|_MBCS defined|_UNICODE defined| |---------------------|------------------------------------|--------------------|-----------------------| @@ -67,14 +67,14 @@ You do not need to call these functions explicitly in most cases. Instead, you c |-------------|---------------------| |**_strdup_dbg**, **_wcsdup_dbg**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Libraries -All debug versions of the [C run-time libraries](../../c-runtime-library/crt-library-features.md). +All debug versions of the [C run-time libraries](../crt-library-features.md). ## See also -[String Manipulation](../../c-runtime-library/string-manipulation-crt.md)
-[_strdup, _wcsdup, _mbsdup](strdup-wcsdup-mbsdup.md)
-[Debug Versions of Heap Allocation Functions](/visualstudio/debugger/debug-versions-of-heap-allocation-functions)
+[String manipulation](../string-manipulation-crt.md)\ +[`_strdup`, `_wcsdup`, `_mbsdup`](strdup-wcsdup-mbsdup.md)\ +[Debug versions of heap allocation functions](/visualstudio/debugger/debug-versions-of-heap-allocation-functions) diff --git a/docs/c-runtime-library/reference/strdup-wcsdup-mbsdup.md b/docs/c-runtime-library/reference/strdup-wcsdup-mbsdup.md index 5bab54abf27..0336e7750e0 100644 --- a/docs/c-runtime-library/reference/strdup-wcsdup-mbsdup.md +++ b/docs/c-runtime-library/reference/strdup-wcsdup-mbsdup.md @@ -33,28 +33,28 @@ unsigned char *_mbsdup( ### Parameters -*`strSource`*
+*`strSource`*\ Null-terminated source string. -## Return Value +## Return value Each of these functions returns a pointer to the storage location for the copied string or **`NULL`** if storage cannot be allocated. ## Remarks -The **`_strdup`** function calls [`malloc`](malloc.md) to allocate storage space for a copy of *strSource* and then copies *strSource* to the allocated space. +The **`_strdup`** function calls [`malloc`](malloc.md) to allocate storage space for a copy of *`strSource`* and then copies *`strSource`* to the allocated space. **`_wcsdup`** and **`_mbsdup`** are wide-character and multibyte-character versions of **`_strdup`**. The arguments and return value of **`_wcsdup`** are wide-character strings; those of **`_mbsdup`** are multibyte-character strings. These three functions behave identically otherwise. 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| |---------------------|------------------------------------|--------------------|-----------------------| |**`_tcsdup`**|**`_strdup`**|**`_mbsdup`**|**`_wcsdup`**| -Because **`_strdup`** calls **`malloc`** to allocate storage space for the copy of *strSource*, it is good practice always to release this memory by calling the [`free`](free.md) routine on the pointer that's returned by the call to **`_strdup`**. +Because **`_strdup`** calls **`malloc`** to allocate storage space for the copy of *`strSource`*, it is good practice always to release this memory by calling the [`free`](free.md) routine on the pointer that's returned by the call to **`_strdup`**. If **`_DEBUG`** and **`_CRTDBG_MAP_ALLOC`** are defined, **`_strdup`** and **`_wcsdup`** are replaced by calls to **`_strdup_dbg`** and **`_wcsdup_dbg`** to allow for debugging memory allocations. For more information, see [`_strdup_dbg`, `_wcsdup_dbg`](strdup-dbg-wcsdup-dbg.md). @@ -66,7 +66,7 @@ If **`_DEBUG`** and **`_CRTDBG_MAP_ALLOC`** are defined, **`_strdup`** and **`_w |**`_wcsdup`**|`` or ``| |**`_mbsdup`**|``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -94,13 +94,13 @@ Copy: This is the buffer text ## See also -[String Manipulation](../../c-runtime-library/string-manipulation-crt.md)
-[`memset`, `wmemset`](memset-wmemset.md)
-[`strcat`, `wcscat`, `_mbscat`](strcat-wcscat-mbscat.md)
-[`strcmp`, `wcscmp`, `_mbscmp`](strcmp-wcscmp-mbscmp.md)
-[`strncat`, `_strncat_l`, `wcsncat`, `_wcsncat_l`, `_mbsncat`, `_mbsncat_l`](strncat-strncat-l-wcsncat-wcsncat-l-mbsncat-mbsncat-l.md)
-[`strncmp`, `wcsncmp`, `_mbsncmp`, `_mbsncmp_l`](strncmp-wcsncmp-mbsncmp-mbsncmp-l.md)
-[`strncpy`, `_strncpy_l`, `wcsncpy`, `_wcsncpy_l`, `_mbsncpy`, `_mbsncpy_l`](strncpy-strncpy-l-wcsncpy-wcsncpy-l-mbsncpy-mbsncpy-l.md)
-[`_strnicmp`, `_wcsnicmp`, `_mbsnicmp`, `_strnicmp_l`, `_wcsnicmp_l`, `_mbsnicmp_l`](strnicmp-wcsnicmp-mbsnicmp-strnicmp-l-wcsnicmp-l-mbsnicmp-l.md)
-[`strrchr`, `wcsrchr`, `_mbsrchr`, `_mbsrchr_l`](strrchr-wcsrchr-mbsrchr-mbsrchr-l.md)
-[`strspn`, `wcsspn`, `_mbsspn`, `_mbsspn_l`](strspn-wcsspn-mbsspn-mbsspn-l.md)
+[String manipulation](../string-manipulation-crt.md)\ +[`memset`, `wmemset`](memset-wmemset.md)\ +[`strcat`, `wcscat`, `_mbscat`](strcat-wcscat-mbscat.md)\ +[`strcmp`, `wcscmp`, `_mbscmp`](strcmp-wcscmp-mbscmp.md)\ +[`strncat`, `_strncat_l`, `wcsncat`, `_wcsncat_l`, `_mbsncat`, `_mbsncat_l`](strncat-strncat-l-wcsncat-wcsncat-l-mbsncat-mbsncat-l.md)\ +[`strncmp`, `wcsncmp`, `_mbsncmp`, `_mbsncmp_l`](strncmp-wcsncmp-mbsncmp-mbsncmp-l.md)\ +[`strncpy`, `_strncpy_l`, `wcsncpy`, `_wcsncpy_l`, `_mbsncpy`, `_mbsncpy_l`](strncpy-strncpy-l-wcsncpy-wcsncpy-l-mbsncpy-mbsncpy-l.md)\ +[`_strnicmp`, `_wcsnicmp`, `_mbsnicmp`, `_strnicmp_l`, `_wcsnicmp_l`, `_mbsnicmp_l`](strnicmp-wcsnicmp-mbsnicmp-strnicmp-l-wcsnicmp-l-mbsnicmp-l.md)\ +[`strrchr`, `wcsrchr`, `_mbsrchr`, `_mbsrchr_l`](strrchr-wcsrchr-mbsrchr-mbsrchr-l.md)\ +[`strspn`, `wcsspn`, `_mbsspn`, `_mbsspn_l`](strspn-wcsspn-mbsspn-mbsspn-l.md) diff --git a/docs/c-runtime-library/reference/strdup-wcsdup.md b/docs/c-runtime-library/reference/strdup-wcsdup.md index 66c3b71fe11..8daddd105d8 100644 --- a/docs/c-runtime-library/reference/strdup-wcsdup.md +++ b/docs/c-runtime-library/reference/strdup-wcsdup.md @@ -12,6 +12,6 @@ ms.assetid: c9ac0935-b525-4e95-8a64-396fc7e34ee9 --- # strdup, wcsdup -The Microsoft-implemented POSIX function names `strdup` and `wcsdup` are deprecated aliases for the [_strdup and _wcsdup](strdup-wcsdup-mbsdup.md) functions. By default, they generate [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The names are deprecated because they don't follow the Standard C rules for implementation-specific names. However, the functions are still supported. +The Microsoft-implemented POSIX function names `strdup` and `wcsdup` are deprecated aliases for the [`_strdup` and `_wcsdup`](strdup-wcsdup-mbsdup.md) functions. By default, they generate [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The names are deprecated because they don't follow the Standard C rules for implementation-specific names. However, the functions are still supported. -We recommend you use [_strdup and _wcsdup](strdup-wcsdup-mbsdup.md) instead. Or, you can continue to use these function names, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). +We recommend you use [`_strdup` and `_wcsdup`](strdup-wcsdup-mbsdup.md) instead. Or, you can continue to use these function names, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). diff --git a/docs/c-runtime-library/reference/strerror-s-strerror-s-wcserror-s-wcserror-s.md b/docs/c-runtime-library/reference/strerror-s-strerror-s-wcserror-s-wcserror-s.md index 754a0a159e0..ea8623db352 100644 --- a/docs/c-runtime-library/reference/strerror-s-strerror-s-wcserror-s-wcserror-s.md +++ b/docs/c-runtime-library/reference/strerror-s-strerror-s-wcserror-s-wcserror-s.md @@ -12,7 +12,7 @@ ms.assetid: 9e5b15a0-efe1-4586-b7e3-e1d7c31a03d6 --- # strerror_s, _strerror_s, _wcserror_s, __wcserror_s -Get a system error message (**strerror_s**, **_wcserror_s**) or print a user-supplied error message (**_strerror_s**, **__wcserror_s**). These are versions of [strerror, _strerror, _wcserror, \__wcserror](strerror-strerror-wcserror-wcserror.md) with security enhancements as described in [Security Features in the CRT](../../c-runtime-library/security-features-in-the-crt.md). +Get a system error message (**strerror_s**, **_wcserror_s**) or print a user-supplied error message (**_strerror_s**, **__wcserror_s**). These are versions of [`strerror`, `_strerror`, `_wcserror`, `__wcserror`](strerror-strerror-wcserror-wcserror.md) with security enhancements as described in [Security features in the CRT](../security-features-in-the-crt.md). ## Syntax @@ -64,28 +64,28 @@ errno_t __wcserror_s( ### Parameters -*buffer*\ +*`buffer`*\ Buffer to hold error string. -*sizeInBytes*\ +*`sizeInBytes`*\ The number of bytes in the buffer. -*sizeInWords*\ +*`sizeInWords`*\ The number of words in the buffer. -*errnum*\ +*`errnum`*\ Error number. -*strErrMsg*\ +*`strErrMsg`*\ User-supplied message. -## Return Value +## Return value Zero if successful, an error code on failure. ### Error conditions -|*buffer*|*sizeInBytes/sizeInWords*|*strErrMsg*|Contents of *buffer*| +|*`buffer`*|*`sizeInBytes`*/*`sizeInWords`*|*`strErrMsg`*|Contents of *`buffer`*| |--------------|------------------------|-----------------|--------------------------| |**NULL**|any|any|n/a| |any|0|any|not modified| @@ -94,7 +94,7 @@ Zero if successful, an error code on failure. The **strerror_s** function is thread-safe. -The **strerror_s** function maps *errnum* to an error-message string, returning the string in *buffer*. **_strerror_s** doesn't take the error number; it uses the current value of **errno** to determine the appropriate message. Neither **strerror_s** nor **_strerror_s** actually prints the message: For that, you need to call an output function such as [fprintf](fprintf-fprintf-l-fwprintf-fwprintf-l.md): +The **strerror_s** function maps *`errnum`* to an error-message string, returning the string in *`buffer`*. **_strerror_s** doesn't take the error number; it uses the current value of **errno** to determine the appropriate message. Neither **strerror_s** nor **_strerror_s** actually prints the message: For that, you need to call an output function such as [`fprintf`](fprintf-fprintf-l-fwprintf-fwprintf-l.md): ```C if (( _access( "datafile",2 )) == -1 ) @@ -104,25 +104,25 @@ if (( _access( "datafile",2 )) == -1 ) } ``` -If *strErrMsg* is **NULL**, **_strerror_s** returns a string in *buffer* that contains the system error message for the last library call that produced an error. The error-message string is terminated by the newline character ('\n'). If *strErrMsg* isn't equal to **NULL**, then **_strerror_s** returns a string in *buffer* that contains (in order) your string message, a colon, a space, the system error message for the last library call that produced an error, and a newline character. Your string message can be, at most, 94 characters long. +If *`strErrMsg`* is **NULL**, **_strerror_s** returns a string in *`buffer`* that contains the system error message for the last library call that produced an error. The error-message string is terminated by the newline character ('\n'). If *`strErrMsg`* isn't equal to **NULL**, then **_strerror_s** returns a string in *`buffer`* that contains (in order) your string message, a colon, a space, the system error message for the last library call that produced an error, and a newline character. Your string message can be, at most, 94 characters long. -These functions truncate the error message if its length exceeds the size of the buffer - 1. The resulting string in *buffer* will always be null-terminated. +These functions truncate the error message if its length exceeds the size of the buffer - 1. The resulting string in *`buffer`* will always be null-terminated. -The actual error number for **_strerror_s** is stored in the variable [errno](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). The system error messages are accessed through the variable [_sys_errlist](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md), which is an array of messages ordered by error number. **_strerror_s** accesses the appropriate error message by using the **errno** value as an index to the variable **_sys_errlist**. The value of the variable [_sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md) is defined as the maximum number of elements in the **_sys_errlist** array. To produce accurate results, call **_strerror_s** immediately after a library routine returns with an error. Otherwise, subsequent calls to **strerror_s** or **_strerror_s** can overwrite the **errno** value. +The actual error number for **_strerror_s** is stored in the variable [`errno`](../errno-doserrno-sys-errlist-and-sys-nerr.md). The system error messages are accessed through the variable [`_sys_errlist`](../errno-doserrno-sys-errlist-and-sys-nerr.md), which is an array of messages ordered by error number. **_strerror_s** accesses the appropriate error message by using the **errno** value as an index to the variable **_sys_errlist**. The value of the variable [`_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md) is defined as the maximum number of elements in the **_sys_errlist** array. To produce accurate results, call **_strerror_s** immediately after a library routine returns with an error. Otherwise, subsequent calls to **strerror_s** or **_strerror_s** can overwrite the **errno** value. **_wcserror_s** and **__wcserror_s** are wide-character versions of **strerror_s** and **_strerror_s**, respectively. -These functions validate their parameters. If buffer is **NULL** or if the size parameter is 0, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md) . If execution is allowed to continue, the functions return **EINVAL** and set **errno** to **EINVAL**. +These functions validate their parameters. If buffer is **NULL** or if the size parameter is 0, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md) . If execution is allowed to continue, the functions return **EINVAL** and set **errno** to **EINVAL**. **_strerror_s**, **_wcserror_s**, and **__wcserror_s** aren't part of the ANSI definition but are instead Microsoft extensions to it. Don't use them where portability is desired; for ANSI compatibility, use **strerror_s** instead. -In C++, using these functions is simplified by template overloads; the overloads can infer buffer length automatically, eliminating the need to specify a size argument. For more information, see [Secure Template Overloads](../../c-runtime-library/secure-template-overloads.md). +In C++, using these functions is simplified by template overloads; the overloads can infer buffer length automatically, eliminating the need to specify a size argument. For more information, see [Secure template overloads](../secure-template-overloads.md). -The debug library versions of these functions first fill the buffer with 0xFE. To disable this behavior, use [_CrtSetDebugFillThreshold](crtsetdebugfillthreshold.md). +The debug library versions of these functions first fill the buffer with 0xFE. To disable this behavior, use [`_CrtSetDebugFillThreshold`](crtsetdebugfillthreshold.md). By default, this function's global state is scoped to the application. To change this behavior, see [Global state in the CRT](../global-state.md). -### Generic-Text Routine Mappings +### Generic-text routine mappings |TCHAR.H routine|_UNICODE & _MBCS not defined|_MBCS defined|_UNICODE defined| |---------------------|------------------------------------|--------------------|-----------------------| @@ -135,15 +135,15 @@ By default, this function's global state is scoped to the application. To change |**strerror_s**, **_strerror_s**|\| |**_wcserror_s**, **__wcserror_s**|\ or \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example -See the example for [perror](perror-wperror.md). +See the example for [`perror`](perror-wperror.md). ## See also -[String Manipulation](../../c-runtime-library/string-manipulation-crt.md)\ -[clearerr](clearerr.md)\ -[ferror](ferror.md)\ -[perror, _wperror](perror-wperror.md) +[String manipulation](../string-manipulation-crt.md)\ +[`clearerr`](clearerr.md)\ +[`ferror`](ferror.md)\ +[`perror`, `_wperror`](perror-wperror.md) diff --git a/docs/c-runtime-library/reference/strerror-strerror-wcserror-wcserror.md b/docs/c-runtime-library/reference/strerror-strerror-wcserror-wcserror.md index 42ba80bbccc..de1cbf6ec29 100644 --- a/docs/c-runtime-library/reference/strerror-strerror-wcserror-wcserror.md +++ b/docs/c-runtime-library/reference/strerror-strerror-wcserror-wcserror.md @@ -12,7 +12,7 @@ ms.assetid: 27b72255-f627-43c0-8836-bcda8b003e14 --- # strerror, _strerror, _wcserror, __wcserror -Gets a system error message string (**strerror**, **_wcserror**) or formats a user-supplied error message string (**_strerror**, **__wcserror**). More secure versions of these functions are available; see [strerror_s, _strerror_s, _wcserror_s, \__wcserror_s](strerror-s-strerror-s-wcserror-s-wcserror-s.md). +Gets a system error message string (**strerror**, **_wcserror**) or formats a user-supplied error message string (**_strerror**, **__wcserror**). More secure versions of these functions are available; see [`strerror_s`, `_strerror_s`, `_wcserror_s`, `__wcserror_s`](strerror-s-strerror-s-wcserror-s-wcserror-s.md). ## Syntax @@ -32,10 +32,10 @@ wchar_t * __wcserror( ### Parameters -*errnum*\ +*`errnum`*\ Error number. -*strErrMsg*\ +*`strErrMsg`*\ User-supplied message. ## Return value @@ -44,22 +44,22 @@ All of these functions return a pointer to an error-message string, in a thread- ## Remarks -The **strerror** function maps *errnum* to an error-message string and returns a pointer to the string. The **strerror** and **_strerror** functions don't actually print the message. To print, call an output function such as [fprintf](fprintf-fprintf-l-fwprintf-fwprintf-l.md): +The **strerror** function maps *`errnum`* to an error-message string and returns a pointer to the string. The **strerror** and **_strerror** functions don't actually print the message. To print, call an output function such as [`fprintf`](fprintf-fprintf-l-fwprintf-fwprintf-l.md): ```C if (( _access( "datafile", 2 )) == -1 ) fprintf( stderr, _strerror(NULL) ); ``` -If *strErrMsg* is passed as **NULL**, **_strerror** returns a pointer to a string. It contains the system error message for the last library call that produced an error. The error-message string is terminated by the newline character ('\n'). When *strErrMsg* isn't **NULL**, the string contains, in order: your *strErrMsg* string, a colon, a space, the system error message, and a newline character. Your string message can be, at most, 94 characters long, in either narrow (**_strerror**) or wide (**__wcserror**) characters. +If *`strErrMsg`* is passed as **NULL**, **_strerror** returns a pointer to a string. It contains the system error message for the last library call that produced an error. The error-message string is terminated by the newline character ('\n'). When *`strErrMsg`* isn't **NULL**, the string contains, in order: your *`strErrMsg`* string, a colon, a space, the system error message, and a newline character. Your string message can be, at most, 94 characters long, in either narrow (**_strerror**) or wide (**__wcserror**) characters. -The actual error number for **_strerror** is stored in the variable [errno](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). To produce accurate results, call **_strerror** immediately after a library routine returns an error. Otherwise, later calls to library routines may overwrite the **errno** value. +The actual error number for **_strerror** is stored in the variable [`errno`](../errno-doserrno-sys-errlist-and-sys-nerr.md). To produce accurate results, call **_strerror** immediately after a library routine returns an error. Otherwise, later calls to library routines may overwrite the **errno** value. **_wcserror** and **__wcserror** are wide-character versions of **strerror** and **_strerror**, respectively. **_strerror**, **_wcserror**, and **__wcserror** are Microsoft-specific, not part of the Standard C library. We don't recommend you use them where you want portable code. For Standard C compatibility, use **strerror** instead. -To get error strings, we recommend **strerror** or **_wcserror** instead of the deprecated macros [_sys_errlist](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md) and [_sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md) and the deprecated internal functions **__sys_errlist** and **__sys_nerr**. +To get error strings, we recommend **strerror** or **_wcserror** instead of the deprecated macros [`_sys_errlist`](../errno-doserrno-sys-errlist-and-sys-nerr.md) and [`_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md) and the deprecated internal functions **__sys_errlist** and **__sys_nerr**. 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). @@ -77,15 +77,15 @@ By default, this function's global state is scoped to the application. To change |**_strerror**|\| |**_wcserror**, **__wcserror**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example -See the example for [perror](perror-wperror.md). +See the example for [`perror`](perror-wperror.md). ## See also -[String manipulation](../../c-runtime-library/string-manipulation-crt.md)\ -[clearerr](clearerr.md)\ -[ferror](ferror.md)\ -[perror, _wperror](perror-wperror.md) +[String manipulation](../string-manipulation-crt.md)\ +[`clearerr`](clearerr.md)\ +[`ferror`](ferror.md)\ +[`perror`, `_wperror`](perror-wperror.md) diff --git a/docs/c-runtime-library/reference/strftime-wcsftime-strftime-l-wcsftime-l.md b/docs/c-runtime-library/reference/strftime-wcsftime-strftime-l-wcsftime-l.md index 4304c5e974d..3a31444bf16 100644 --- a/docs/c-runtime-library/reference/strftime-wcsftime-strftime-l-wcsftime-l.md +++ b/docs/c-runtime-library/reference/strftime-wcsftime-strftime-l-wcsftime-l.md @@ -47,22 +47,22 @@ size_t _wcsftime_l( ### Parameters -*`strDest`*
+*`strDest`*\ Output string. -*`maxsize`*
+*`maxsize`*\ Size of the *`strDest`* buffer, measured in characters (**`char`** or **`wchar_t`**). -*`format`*
+*`format`*\ Format-control string. -*`timeptr`*
+*`timeptr`*\ **`tm`** data structure. -*`locale`*
+*`locale`*\ The locale to use. -## Return Value +## Return value **`strftime`** returns the number of characters placed in *`strDest`* and **`wcsftime`** returns the corresponding number of wide characters. @@ -74,17 +74,17 @@ The number of characters in *`strDest`* is equal to the number of literal charac The **`strftime`** and **`wcsftime`** functions format the **`tm`** time value in *`timeptr`* according to the supplied *`format`* argument and store the result in the buffer *`strDest`*. At most, *`maxsize`* characters are placed in the string. For a description of the fields in the *`timeptr`* structure, see [`asctime`](asctime-wasctime.md). **`wcsftime`** is the wide-character equivalent of **`strftime`**; its string-pointer argument points to a wide-character string. These functions behave identically otherwise. -This function validates its parameters. If *`strDest`*, *`format`*, or *`timeptr`* is a null pointer, or if the **`tm`** data structure addressed by *`timeptr`* is invalid (for example, if it contains out of range values for the time or date), or if the *`format`* string contains an invalid formatting code, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, the function returns 0 and sets **`errno`** to **`EINVAL`**. +This function validates its parameters. If *`strDest`*, *`format`*, or *`timeptr`* is a null pointer, or if the **`tm`** data structure addressed by *`timeptr`* is invalid (for example, if it contains out of range values for the time or date), or if the *`format`* string contains an invalid formatting code, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, the function returns 0 and sets **`errno`** to **`EINVAL`**. By default, this function's global state is scoped to the application. To change this behavior, see [Global state in the CRT](../global-state.md). -### Generic-Text Routine Mappings +### Generic-text routine mappings |`TCHAR.H` routine|`_UNICODE` & `_MBCS` not defined|`_MBCS` defined|`_UNICODE` defined| |---------------------|------------------------------------|--------------------|-----------------------| |**`_tcsftime`**|**`strftime`**|**`strftime`**|**`wcsftime`**| -The *`format`* argument consists of one or more codes; as in **`printf`**, the formatting codes are preceded by a percent sign (**`%`**). Characters that do not begin with **`%`** are copied unchanged to *`strDest`*. The **`LC_TIME`** category of the current locale affects the output formatting of **`strftime`**. (For more information on **`LC_TIME`**, see [`setlocale`](setlocale-wsetlocale.md).) The **`strftime`** and **`wcsftime`** functions use the currently set locale. The **`_strftime_l`** and **`_wcsftime_l`** versions of these functions are identical except that they take the locale as a parameter and use that instead of the currently set locale. For more information, see [Locale](../../c-runtime-library/locale.md). +The *`format`* argument consists of one or more codes; as in **`printf`**, the formatting codes are preceded by a percent sign (**`%`**). Characters that do not begin with **`%`** are copied unchanged to *`strDest`*. The **`LC_TIME`** category of the current locale affects the output formatting of **`strftime`**. (For more information on **`LC_TIME`**, see [`setlocale`](setlocale-wsetlocale.md).) The **`strftime`** and **`wcsftime`** functions use the currently set locale. The **`_strftime_l`** and **`_wcsftime_l`** versions of these functions are identical except that they take the locale as a parameter and use that instead of the currently set locale. For more information, see [Locale](../locale.md). The **`strftime`** functions support these formatting codes: @@ -140,7 +140,7 @@ As in the **`printf`** function, the **`#`** flag may prefix any formatting code The ISO 8601 week and week-based year produced by **`%V`**, **`%g`**, and **`%G`**, uses a week that begins on Monday, where week 1 is the week that contains January 4th, which is the first week that includes at least four days of the year. If the first Monday of the year is the 2nd, 3rd, or 4th, the preceding days are part of the last week of the preceding year. For those days, **`%V`** is replaced by 53, and both **`%g`** and **`%G`** are replaced by the digits of the preceding year. > [!NOTE] -> When using one of the `strftime` functions with a `tm` pointer returned from `gmtime`, the values printed via the `%Z` and `%z` specifiers will not be accurate. This is because the `tm` struct as specified by the C Standard does not contain the information for time zone name nor offset. Instead, the timezone information is populated via the global variables [`_timezone` and `_dstbias`](../../c-runtime-library/daylight-dstbias-timezone-and-tzname.md). +> When using one of the `strftime` functions with a `tm` pointer returned from `gmtime`, the values printed via the `%Z` and `%z` specifiers will not be accurate. This is because the `tm` struct as specified by the C Standard does not contain the information for time zone name nor offset. Instead, the timezone information is populated via the global variables [`_timezone` and `_dstbias`](../daylight-dstbias-timezone-and-tzname.md). ## Requirements @@ -151,7 +151,7 @@ The ISO 8601 week and week-based year produced by **`%V`**, **`%g`**, and **`%G` |**`_strftime_l`**|``| |**`_wcsftime_l`**|`` or ``| -The **`_strftime_l`** and **`_wcsftime_l`** functions are Microsoft-specific. For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +The **`_strftime_l`** and **`_wcsftime_l`** functions are Microsoft-specific. For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -159,10 +159,10 @@ See the example for [`time`](time-time32-time64.md). ## See also -[Locale](../../c-runtime-library/locale.md)
-[Time Management](../../c-runtime-library/time-management.md)
-[String Manipulation](../../c-runtime-library/string-manipulation-crt.md)
-[`localeconv`](localeconv.md)
-[`setlocale`, `_wsetlocale`](setlocale-wsetlocale.md)
-[`strcoll` Functions](../../c-runtime-library/strcoll-functions.md)
-[`strxfrm`, `wcsxfrm`, `_strxfrm_l`, `_wcsxfrm_l`](strxfrm-wcsxfrm-strxfrm-l-wcsxfrm-l.md)
+[Locale](../locale.md)\ +[Time management](../time-management.md)\ +[String manipulation](../string-manipulation-crt.md)\ +[`localeconv`](localeconv.md)\ +[`setlocale`, `_wsetlocale`](setlocale-wsetlocale.md)\ +[`strcoll` functions](../strcoll-functions.md)\ +[`strxfrm`, `wcsxfrm`, `_strxfrm_l`, `_wcsxfrm_l`](strxfrm-wcsxfrm-strxfrm-l-wcsxfrm-l.md) diff --git a/docs/c-runtime-library/reference/stricmp-wcsicmp-mbsicmp-stricmp-l-wcsicmp-l-mbsicmp-l.md b/docs/c-runtime-library/reference/stricmp-wcsicmp-mbsicmp-stricmp-l-wcsicmp-l-mbsicmp-l.md index 8edd0aeb91c..6c824e82c3f 100644 --- a/docs/c-runtime-library/reference/stricmp-wcsicmp-mbsicmp-stricmp-l-wcsicmp-l-mbsicmp-l.md +++ b/docs/c-runtime-library/reference/stricmp-wcsicmp-mbsicmp-stricmp-l-wcsicmp-l-mbsicmp-l.md @@ -51,13 +51,13 @@ int _mbsicmp_l( ### Parameters -*`string1`*, *`string2`*
+*`string1`*, *`string2`*\ Null-terminated strings to compare. -*`locale`*
+*`locale`*\ Locale to use. -## Return Value +## Return value The return value indicates the relation of *`string1`* to *`string2`* as follows. @@ -71,7 +71,7 @@ On an error, **`_mbsicmp`** returns **`_NLSCMPERROR`**, which is defined in ` [!NOTE] > **`_stricmp`** is equivalent to **`_strcmpi`**. They can be used interchangeably but **`_stricmp`** is the preferred standard. @@ -84,7 +84,7 @@ To illustrate when case conversion by **`_stricmp`** affects the outcome of a co If the [`strcmp`](strcmp-wcscmp-mbscmp.md) function is used instead of **`_stricmp`**, `JOHN_HENRY` will be greater than `JOHNSTON`. -**`_wcsicmp`** and **`_mbsicmp`** are wide-character and multibyte-character versions of **`_stricmp`**. The arguments and return value of **`_wcsicmp`** are wide-character strings; those of **`_mbsicmp`** are multibyte-character strings. **`_mbsicmp`** recognizes multibyte-character sequences according to the current multibyte code page and returns **`_NLSCMPERROR`** on an error. For more information, see [Code Pages](../../c-runtime-library/code-pages.md). These three functions behave identically otherwise. +**`_wcsicmp`** and **`_mbsicmp`** are wide-character and multibyte-character versions of **`_stricmp`**. The arguments and return value of **`_wcsicmp`** are wide-character strings; those of **`_mbsicmp`** are multibyte-character strings. **`_mbsicmp`** recognizes multibyte-character sequences according to the current multibyte code page and returns **`_NLSCMPERROR`** on an error. For more information, see [Code pages](../code-pages.md). These three functions behave identically otherwise. **`_wcsicmp`** and **`wcscmp`** behave identically except that **`wcscmp`** does not convert its arguments to lowercase before comparing them. **`_mbsicmp`** and **`_mbscmp`** behave identically except that **`_mbscmp`** does not convert its arguments to lowercase before comparing them. @@ -108,9 +108,9 @@ int main() { An alternative is to call [`_create_locale`, `_wcreate_locale`](create-locale-wcreate-locale.md) and pass the returned locale object as a parameter to **`_wcsicmp_l`**. -All of these functions validate their parameters. If either *`string1`* or *`string2`* are null pointers, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md) . If execution is allowed to continue, these functions return **`_NLSCMPERROR`** and set **`errno`** to **`EINVAL`**. +All of these functions validate their parameters. If either *`string1`* or *`string2`* are null pointers, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md) . If execution is allowed to continue, these functions return **`_NLSCMPERROR`** and set **`errno`** to **`EINVAL`**. -### Generic-Text Routine Mappings +### Generic-text routine mappings |`TCHAR.H` routine|`_UNICODE` & `_MBCS` not defined|`_MBCS` defined|`_UNICODE` defined| |---------------------|------------------------------------|--------------------|-----------------------| @@ -124,7 +124,7 @@ All of these functions validate their parameters. If either *`string1`* or *`str |**`_wcsicmp`**, **`_wcsicmp_l`**|`` or ``| |**`_mbsicmp`**, **`_mbsicmp_l`**|``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -177,13 +177,13 @@ Compare strings: ## See also -[String Manipulation](../../c-runtime-library/string-manipulation-crt.md)
-[`memcmp`, `wmemcmp`](memcmp-wmemcmp.md)
-[`_memicmp`, `_memicmp_l`](memicmp-memicmp-l.md)
-[`strcmp`, `wcscmp`, `_mbscmp`](strcmp-wcscmp-mbscmp.md)
-[`strcoll` Functions](../../c-runtime-library/strcoll-functions.md)
-[`strncmp`, `wcsncmp`, `_mbsncmp`, `_mbsncmp_l`](strncmp-wcsncmp-mbsncmp-mbsncmp-l.md)
-[`_strnicmp`, `_wcsnicmp`, `_mbsnicmp`, `_strnicmp_l`, `_wcsnicmp_l`, `_mbsnicmp_l`](strnicmp-wcsnicmp-mbsnicmp-strnicmp-l-wcsnicmp-l-mbsnicmp-l.md)
-[`strrchr`, `wcsrchr`, `_mbsrchr`, `_mbsrchr_l`](strrchr-wcsrchr-mbsrchr-mbsrchr-l.md)
-[`_strset`, `_strset_l`, `_wcsset`, `_wcsset_l`, `_mbsset`, `_mbsset_l`](strset-strset-l-wcsset-wcsset-l-mbsset-mbsset-l.md)
-[`strspn`, `wcsspn`, `_mbsspn`, `_mbsspn_l`](strspn-wcsspn-mbsspn-mbsspn-l.md)
+[String manipulation](../string-manipulation-crt.md)\ +[`memcmp`, `wmemcmp`](memcmp-wmemcmp.md)\ +[`_memicmp`, `_memicmp_l`](memicmp-memicmp-l.md)\ +[`strcmp`, `wcscmp`, `_mbscmp`](strcmp-wcscmp-mbscmp.md)\ +[`strcoll` functions](../strcoll-functions.md)\ +[`strncmp`, `wcsncmp`, `_mbsncmp`, `_mbsncmp_l`](strncmp-wcsncmp-mbsncmp-mbsncmp-l.md)\ +[`_strnicmp`, `_wcsnicmp`, `_mbsnicmp`, `_strnicmp_l`, `_wcsnicmp_l`, `_mbsnicmp_l`](strnicmp-wcsnicmp-mbsnicmp-strnicmp-l-wcsnicmp-l-mbsnicmp-l.md)\ +[`strrchr`, `wcsrchr`, `_mbsrchr`, `_mbsrchr_l`](strrchr-wcsrchr-mbsrchr-mbsrchr-l.md)\ +[`_strset`, `_strset_l`, `_wcsset`, `_wcsset_l`, `_mbsset`, `_mbsset_l`](strset-strset-l-wcsset-wcsset-l-mbsset-mbsset-l.md)\ +[`strspn`, `wcsspn`, `_mbsspn`, `_mbsspn_l`](strspn-wcsspn-mbsspn-mbsspn-l.md) diff --git a/docs/c-runtime-library/reference/stricoll-wcsicoll-mbsicoll-stricoll-l-wcsicoll-l-mbsicoll-l.md b/docs/c-runtime-library/reference/stricoll-wcsicoll-mbsicoll-stricoll-l-wcsicoll-l-mbsicoll-l.md index 5b6561a81ff..e1194f5958b 100644 --- a/docs/c-runtime-library/reference/stricoll-wcsicoll-mbsicoll-stricoll-l-wcsicoll-l-mbsicoll-l.md +++ b/docs/c-runtime-library/reference/stricoll-wcsicoll-mbsicoll-stricoll-l-wcsicoll-l-mbsicoll-l.md @@ -51,36 +51,36 @@ int _mbsicoll_l( ### Parameters -*string1*, *string2*
+*`string1`*, *`string2`*\ Null-terminated strings to compare. -*locale*
+*`locale`*\ The locale to use. -## Return Value +## Return value -Each of these functions returns a value indicating the relationship of *string1* to *string2*, as follows. +Each of these functions returns a value indicating the relationship of *`string1`* to *`string2`*, as follows. |Return value|Relationship of string1 to string2| |------------------|----------------------------------------| -|< 0|*string1* less than *string2*| -|0|*string1* identical to *string2*| -|> 0|*string1* greater than *string2*| +|< 0|*`string1`* less than *`string2`*| +|0|*`string1`* identical to *`string2`*| +|> 0|*`string1`* greater than *`string2`*| |**_NLSCMPERROR**|An error occurred.| -Each of these functions returns **_NLSCMPERROR**. To use **_NLSCMPERROR**, include either \ or \. **_wcsicoll** can fail if either *string1* or *string2* contains wide-character codes outside the domain of the collating sequence. When an error occurs, **_wcsicoll** may set **errno** to **EINVAL**. To check for an error on a call to **_wcsicoll**, set **errno** to 0 and then check **errno** after calling **_wcsicoll**. +Each of these functions returns **_NLSCMPERROR**. To use **_NLSCMPERROR**, include either \ or \. **_wcsicoll** can fail if either *`string1`* or *`string2`* contains wide-character codes outside the domain of the collating sequence. When an error occurs, **_wcsicoll** may set **errno** to **EINVAL**. To check for an error on a call to **_wcsicoll**, set **errno** to 0 and then check **errno** after calling **_wcsicoll**. ## Remarks -Each of these functions performs a case-insensitive comparison of *string1* and *string2* according to the code page currently in use. These functions should be used only when there is a difference between the character set order and the lexicographic character order in the current code page and this difference is of interest for the string comparison. +Each of these functions performs a case-insensitive comparison of *`string1`* and *`string2`* according to the code page currently in use. These functions should be used only when there is a difference between the character set order and the lexicographic character order in the current code page and this difference is of interest for the string comparison. -**_stricmp** differs from **_stricoll** in that the **_stricmp** comparison is affected by **LC_CTYPE**, whereas the **_stricoll** comparison is according to the **LC_CTYPE** and **LC_COLLATE** categories of the locale. For more information on the **LC_COLLATE** category, see [setlocale](setlocale-wsetlocale.md) and [Locale Categories](../../c-runtime-library/locale-categories.md). The versions of these functions without the **_l** suffix use the current locale; the versions with the **_l** suffix are identical except that they use the locale passed in instead. For more information, see [Locale](../../c-runtime-library/locale.md). +**_stricmp** differs from **_stricoll** in that the **_stricmp** comparison is affected by **LC_CTYPE**, whereas the **_stricoll** comparison is according to the **LC_CTYPE** and **LC_COLLATE** categories of the locale. For more information on the **LC_COLLATE** category, see [`setlocale`](setlocale-wsetlocale.md) and [Locale categories](../locale-categories.md). The versions of these functions without the **_l** suffix use the current locale; the versions with the **_l** suffix are identical except that they use the locale passed in instead. For more information, see [Locale](../locale.md). -All of these functions validate their parameters. If either *string1* or *string2* are **NULL** pointers, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, these functions return **_NLSCMPERROR** and set **errno** to **EINVAL**. +All of these functions validate their parameters. If either *`string1`* or *`string2`* are **NULL** pointers, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, these functions return **_NLSCMPERROR** and set **errno** to **EINVAL**. By default, this function's global state is scoped to the application. To change this behavior, see [Global state in the CRT](../global-state.md). -### Generic-Text Routine Mappings +### Generic-text routine mappings |TCHAR.H routine|_UNICODE & _MBCS not defined|_MBCS defined|_UNICODE defined| |---------------------|------------------------------------|--------------------|-----------------------| @@ -94,18 +94,18 @@ By default, this function's global state is scoped to the application. To change |**_wcsicoll**, **_wcsicoll_l**|\, \| |**_mbsicoll**, **_mbsicoll_l**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Locale](../../c-runtime-library/locale.md)
-[String Manipulation](../../c-runtime-library/string-manipulation-crt.md)
-[strcoll Functions](../../c-runtime-library/strcoll-functions.md)
-[localeconv](localeconv.md)
-[_mbsnbcoll, _mbsnbcoll_l, _mbsnbicoll, _mbsnbicoll_l](mbsnbcoll-mbsnbcoll-l-mbsnbicoll-mbsnbicoll-l.md)
-[setlocale, _wsetlocale](setlocale-wsetlocale.md)
-[strcmp, wcscmp, _mbscmp](strcmp-wcscmp-mbscmp.md)
-[_stricmp, _wcsicmp, _mbsicmp, _stricmp_l, _wcsicmp_l, _mbsicmp_l](stricmp-wcsicmp-mbsicmp-stricmp-l-wcsicmp-l-mbsicmp-l.md)
-[strncmp, wcsncmp, _mbsncmp, _mbsncmp_l](strncmp-wcsncmp-mbsncmp-mbsncmp-l.md)
-[_strnicmp, _wcsnicmp, _mbsnicmp, _strnicmp_l, _wcsnicmp_l, _mbsnicmp_l](strnicmp-wcsnicmp-mbsnicmp-strnicmp-l-wcsnicmp-l-mbsnicmp-l.md)
-[strxfrm, wcsxfrm, _strxfrm_l, _wcsxfrm_l](strxfrm-wcsxfrm-strxfrm-l-wcsxfrm-l.md)
+[Locale](../locale.md)\ +[String manipulation](../string-manipulation-crt.md)\ +[`strcoll` functions](../strcoll-functions.md)\ +[`localeconv`](localeconv.md)\ +[`_mbsnbcoll`, `_mbsnbcoll_l`, `_mbsnbicoll`, `_mbsnbicoll_l`](mbsnbcoll-mbsnbcoll-l-mbsnbicoll-mbsnbicoll-l.md)\ +[`setlocale`, `_wsetlocale`](setlocale-wsetlocale.md)\ +[`strcmp`, `wcscmp`, `_mbscmp`](strcmp-wcscmp-mbscmp.md)\ +[`_stricmp`, `_wcsicmp`, `_mbsicmp`, `_stricmp_l`, `_wcsicmp_l`, `_mbsicmp_l`](stricmp-wcsicmp-mbsicmp-stricmp-l-wcsicmp-l-mbsicmp-l.md)\ +[`strncmp`, `wcsncmp`, `_mbsncmp`, `_mbsncmp_l`](strncmp-wcsncmp-mbsncmp-mbsncmp-l.md)\ +[`_strnicmp`, `_wcsnicmp`, `_mbsnicmp`, `_strnicmp_l`, `_wcsnicmp_l`, `_mbsnicmp_l`](strnicmp-wcsnicmp-mbsnicmp-strnicmp-l-wcsnicmp-l-mbsnicmp-l.md)\ +[`strxfrm`, `wcsxfrm`, `_strxfrm_l`, `_wcsxfrm_l`](strxfrm-wcsxfrm-strxfrm-l-wcsxfrm-l.md) diff --git a/docs/c-runtime-library/reference/strinc-wcsinc-mbsinc-mbsinc-l.md b/docs/c-runtime-library/reference/strinc-wcsinc-mbsinc-mbsinc-l.md index e1518bb6daa..95abe53a90d 100644 --- a/docs/c-runtime-library/reference/strinc-wcsinc-mbsinc-mbsinc-l.md +++ b/docs/c-runtime-library/reference/strinc-wcsinc-mbsinc-mbsinc-l.md @@ -39,26 +39,26 @@ unsigned char *_mbsinc_l( ### Parameters -*current*
+*`current`*\ Character pointer. -*locale*
+*`locale`*\ Locale to use. -## Return Value +## Return value -Each of these routines returns a pointer to the character that immediately follows *current*. +Each of these routines returns a pointer to the character that immediately follows *`current`*. ## Remarks -The **_mbsinc** function returns a pointer to the first byte of the multibyte character that immediately follows *current*. **_mbsinc** recognizes multibyte-character sequences according to the [multibyte code page](../../c-runtime-library/code-pages.md) that's currently in use; **_mbsinc_l** is identical except that it instead uses the locale parameter that's passed in. For more information, see [Locale](../../c-runtime-library/locale.md). +The **_mbsinc** function returns a pointer to the first byte of the multibyte character that immediately follows *`current`*. **_mbsinc** recognizes multibyte-character sequences according to the [multibyte code page](../code-pages.md) that's currently in use; **_mbsinc_l** is identical except that it instead uses the locale parameter that's passed in. For more information, see [Locale](../locale.md). -The generic-text function **_tcsinc**, defined in Tchar.h, maps to **_mbsinc** if **_MBCS** has been defined, or to **_wcsinc** if **_UNICODE** has been defined. Otherwise, **_tcsinc** maps to **_strinc**. **_strinc** and **_wcsinc** are single-byte-character and wide-character versions of **_mbsinc**. **_strinc** and **_wcsinc** are provided only for this mapping and should not be used otherwise. For more information, see [Using Generic-Text Mappings](../../c-runtime-library/using-generic-text-mappings.md) and [Generic-Text Mappings](../../c-runtime-library/generic-text-mappings.md). +The generic-text function **_tcsinc**, defined in Tchar.h, maps to **_mbsinc** if **_MBCS** has been defined, or to **_wcsinc** if **_UNICODE** has been defined. Otherwise, **_tcsinc** maps to **_strinc**. **_strinc** and **_wcsinc** are single-byte-character and wide-character versions of **_mbsinc**. **_strinc** and **_wcsinc** are provided only for this mapping and should not be used otherwise. For more information, see [Using generic-text mappings](../using-generic-text-mappings.md) and [Generic-text mappings](../generic-text-mappings.md). -If *current* is **NULL**, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, this function returns **EINVAL** and sets **errno** to **EINVAL**. +If *`current`* is **NULL**, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, this function returns **EINVAL** and sets **errno** to **EINVAL**. > [!IMPORTANT] -> These functions might be vulnerable to buffer overrun threats. Buffer overruns can be used for system attacks because they can cause an unwarranted elevation of privilege. For more information, see [Avoiding Buffer Overruns](/windows/win32/SecBP/avoiding-buffer-overruns). +> These functions might be vulnerable to buffer overrun threats. Buffer overruns can be used for system attacks because they can cause an unwarranted elevation of privilege. For more information, see [Avoiding buffer overruns](/windows/win32/SecBP/avoiding-buffer-overruns). 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). @@ -71,11 +71,11 @@ By default, this function's global state is scoped to the application. To change |**_strinc**|\| |**_wcsinc**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[String Manipulation](../../c-runtime-library/string-manipulation-crt.md)
-[_strdec, _wcsdec, _mbsdec, _mbsdec_l](strdec-wcsdec-mbsdec-mbsdec-l.md)
-[_strnextc, _wcsnextc, _mbsnextc, _mbsnextc_l](strnextc-wcsnextc-mbsnextc-mbsnextc-l.md)
-[_strninc, _wcsninc, _mbsninc, _mbsninc_l](strninc-wcsninc-mbsninc-mbsninc-l.md)
+[String manipulation](../string-manipulation-crt.md)\ +[`_strdec`, `_wcsdec`, `_mbsdec`, `_mbsdec_l`](strdec-wcsdec-mbsdec-mbsdec-l.md)\ +[`_strnextc`, `_wcsnextc`, `_mbsnextc`, `_mbsnextc_l`](strnextc-wcsnextc-mbsnextc-mbsnextc-l.md)\ +[`_strninc`, `_wcsninc`, `_mbsninc`, `_mbsninc_l`](strninc-wcsninc-mbsninc-mbsninc-l.md) diff --git a/docs/c-runtime-library/reference/strlen-wcslen-mbslen-mbslen-l-mbstrlen-mbstrlen-l.md b/docs/c-runtime-library/reference/strlen-wcslen-mbslen-mbslen-l-mbstrlen-mbstrlen-l.md index 4b450783a77..c89137f6d72 100644 --- a/docs/c-runtime-library/reference/strlen-wcslen-mbslen-mbslen-l-mbstrlen-mbstrlen-l.md +++ b/docs/c-runtime-library/reference/strlen-wcslen-mbslen-mbslen-l-mbstrlen-mbstrlen-l.md @@ -44,13 +44,13 @@ size_t _mbstrlen_l( ### Parameters -*`str`*
+*`str`*\ Null-terminated string. -*`locale`*
+*`locale`*\ Locale to use. -## Return Value +## Return value Each of these functions returns the number of characters in *`str`*, excluding the terminal null. No return value is reserved to indicate an error, except for **`_mbstrlen`** and **`_mbstrlen_l`**, which return `((size_t)(-1))` if the string contains an invalid multibyte character. @@ -58,11 +58,11 @@ Each of these functions returns the number of characters in *`str`*, excluding t **`strlen`** interprets the string as a single-byte character string, so its return value is always equal to the number of bytes, even if the string contains multibyte characters. **`wcslen`** is a wide-character version of **`strlen`**; the argument of **`wcslen`** is a wide-character string and the count of characters is in wide (two-byte) characters. **`wcslen`** and **`strlen`** behave identically otherwise. -**Security Note** These functions incur a potential threat brought about by a buffer overrun problem. Buffer overrun problems are a frequent method of system attack, resulting in an unwarranted elevation of privilege. For more information, see [Avoiding Buffer Overruns](/windows/win32/SecBP/avoiding-buffer-overruns). +**Security Note** These functions incur a potential threat brought about by a buffer overrun problem. Buffer overrun problems are a frequent method of system attack, resulting in an unwarranted elevation of privilege. For more information, see [Avoiding buffer overruns](/windows/win32/SecBP/avoiding-buffer-overruns). 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| |---------------------|------------------------------------|--------------------|-----------------------| @@ -72,7 +72,7 @@ By default, this function's global state is scoped to the application. To change **`_mbslen`** and **`_mbslen_l`** return the number of multibyte characters in a multibyte-character string but they do not test for multibyte-character validity. **`_mbstrlen`** and **`_mbstrlen_l`** test for multibyte-character validity and recognize multibyte-character sequences. If the string passed to **`_mbstrlen`** or **`_mbstrlen_l`** contains an invalid multibyte character for the code page, the function returns -1 and sets **`errno`** to **`EILSEQ`**. -The output value is affected by the setting of the **`LC_CTYPE`** category setting of the locale; see [`setlocale`](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. For more information, see [Locale](../../c-runtime-library/locale.md). +The output value is affected by the setting of the **`LC_CTYPE`** category setting of the locale; see [`setlocale`](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. For more information, see [Locale](../locale.md). ## Requirements @@ -83,7 +83,7 @@ The output value is affected by the setting of the **`LC_CTYPE`** category setti |**`_mbslen`**, **`_mbslen_l`**|``| |**`_mbstrlen`**, **`_mbstrlen_l`**|``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -150,14 +150,14 @@ Bytes in 'ABCã‚¡D' : 6 ## See also -[String Manipulation](../../c-runtime-library/string-manipulation-crt.md)
-[Interpretation of Multibyte-Character Sequences](../../c-runtime-library/interpretation-of-multibyte-character-sequences.md)
-[Locale](../../c-runtime-library/locale.md)
-[`setlocale`, `_wsetlocale`](setlocale-wsetlocale.md)
-[`strcat`, `wcscat`, `_mbscat`](strcat-wcscat-mbscat.md)
-[`strcmp`, `wcscmp`, `_mbscmp`](strcmp-wcscmp-mbscmp.md)
-[`strcoll` Functions](../../c-runtime-library/strcoll-functions.md)
-[`strcpy`, `wcscpy`, `_mbscpy`](strcpy-wcscpy-mbscpy.md)
-[`strrchr`, `wcsrchr`, `_mbsrchr`, `_mbsrchr_l`](strrchr-wcsrchr-mbsrchr-mbsrchr-l.md)
-[`_strset`, `_strset_l`, `_wcsset`, `_wcsset_l`, `_mbsset`, `_mbsset_l`](strset-strset-l-wcsset-wcsset-l-mbsset-mbsset-l.md)
-[`strspn`, `wcsspn`, `_mbsspn`, `_mbsspn_l`](strspn-wcsspn-mbsspn-mbsspn-l.md)
+[String manipulation](../string-manipulation-crt.md)\ +[Interpretation of multibyte-character sequences](../interpretation-of-multibyte-character-sequences.md)\ +[Locale](../locale.md)\ +[`setlocale`, `_wsetlocale`](setlocale-wsetlocale.md)\ +[`strcat`, `wcscat`, `_mbscat`](strcat-wcscat-mbscat.md)\ +[`strcmp`, `wcscmp`, `_mbscmp`](strcmp-wcscmp-mbscmp.md)\ +[`strcoll` functions](../strcoll-functions.md)\ +[`strcpy`, `wcscpy`, `_mbscpy`](strcpy-wcscpy-mbscpy.md)\ +[`strrchr`, `wcsrchr`, `_mbsrchr`, `_mbsrchr_l`](strrchr-wcsrchr-mbsrchr-mbsrchr-l.md)\ +[`_strset`, `_strset_l`, `_wcsset`, `_wcsset_l`, `_mbsset`, `_mbsset_l`](strset-strset-l-wcsset-wcsset-l-mbsset-mbsset-l.md)\ +[`strspn`, `wcsspn`, `_mbsspn`, `_mbsspn_l`](strspn-wcsspn-mbsspn-mbsspn-l.md) diff --git a/docs/c-runtime-library/reference/strlwr-s-strlwr-s-l-mbslwr-s-mbslwr-s-l-wcslwr-s-wcslwr-s-l.md b/docs/c-runtime-library/reference/strlwr-s-strlwr-s-l-mbslwr-s-mbslwr-s-l-wcslwr-s-wcslwr-s-l.md index 71212143b41..b4144884966 100644 --- a/docs/c-runtime-library/reference/strlwr-s-strlwr-s-l-mbslwr-s-mbslwr-s-l-wcslwr-s-wcslwr-s-l.md +++ b/docs/c-runtime-library/reference/strlwr-s-strlwr-s-l-mbslwr-s-mbslwr-s-l-wcslwr-s-wcslwr-s-l.md @@ -12,7 +12,7 @@ ms.assetid: 4883d31b-bdac-4049-83a1-91dfdeceee79 --- # _strlwr_s, _strlwr_s_l, _mbslwr_s, _mbslwr_s_l, _wcslwr_s, _wcslwr_s_l -Converts a string to lowercase, by using the current locale or a locale object that's passed in. These versions of [_strlwr, _wcslwr, _mbslwr, _strlwr_l, _wcslwr_l, _mbslwr_l](strlwr-wcslwr-mbslwr-strlwr-l-wcslwr-l-mbslwr-l.md) have security enhancements, as described in [Security Features in the CRT](../../c-runtime-library/security-features-in-the-crt.md). +Converts a string to lowercase, by using the current locale or a locale object that's passed in. These versions of [`_strlwr`, `_wcslwr`, `_mbslwr`, `_strlwr_l`, `_wcslwr_l`, `_mbslwr_l`](strlwr-wcslwr-mbslwr-strlwr-l-wcslwr-l-mbslwr-l.md) have security enhancements, as described in [Security features in the CRT](../security-features-in-the-crt.md). > [!IMPORTANT] > **_mbslwr_s** and **_mbslwr_s_l** cannot be used in applications that execute in the Windows Runtime. For more information, see [CRT functions not supported in Universal Windows Platform apps](../../cppcx/crt-functions-not-supported-in-universal-windows-platform-apps.md). @@ -78,34 +78,34 @@ errno_t _wcslwr_s_l( ### Parameters -*str*
+*`str`*\ Null-terminated string to convert to lowercase. -*numberOfElements*
+*`numberOfElements`*\ Size of the buffer. -*locale*
+*`locale`*\ The locale to use. -## Return Value +## Return value Zero if successful; a non-zero error code on failure. -These functions validate their parameters. If *str* is not a valid null-terminated string, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md) . If execution is allowed to continue, the functions return **EINVAL** and set **errno** to **EINVAL**. If *numberOfElements* is less than the length of the string, the functions also return **EINVAL** and set **errno** to **EINVAL**. +These functions validate their parameters. If *`str`* is not a valid null-terminated string, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md) . If execution is allowed to continue, the functions return **EINVAL** and set **errno** to **EINVAL**. If *`numberOfElements`* is less than the length of the string, the functions also return **EINVAL** and set **errno** to **EINVAL**. ## Remarks -The **_strlwr_s** function converts, in place, any uppercase letters in *str* to lowercase. **_mbslwr_s** is a multi-byte character version of **_strlwr_s**. **_wcslwr_s** is a wide-character version of **_strlwr_s**. +The **_strlwr_s** function converts, in place, any uppercase letters in *`str`* to lowercase. **_mbslwr_s** is a multi-byte character version of **_strlwr_s**. **_wcslwr_s** is a wide-character version of **_strlwr_s**. -The output value is affected by the setting of the **LC_CTYPE** category setting of the locale; see [setlocale](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. For more information, see [Locale](../../c-runtime-library/locale.md). +The output value is affected by the setting of the **LC_CTYPE** category setting of the locale; see [`setlocale`](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. For more information, see [Locale](../locale.md). -In C++, using these functions is simplified by template overloads; the overloads can infer buffer length automatically (eliminating the need to specify a size argument) and they can automatically replace older, non-secure functions with their newer, secure counterparts. For more information, see [Secure Template Overloads](../../c-runtime-library/secure-template-overloads.md). +In C++, using these functions is simplified by template overloads; the overloads can infer buffer length automatically (eliminating the need to specify a size argument) and they can automatically replace older, non-secure functions with their newer, secure counterparts. For more information, see [Secure template overloads](../secure-template-overloads.md). -The debug library versions of these functions first fill the buffer with 0xFE. To disable this behavior, use [_CrtSetDebugFillThreshold](crtsetdebugfillthreshold.md). +The debug library versions of these functions first fill the buffer with 0xFE. To disable this behavior, use [`_CrtSetDebugFillThreshold`](crtsetdebugfillthreshold.md). By default, this function's global state is scoped to the application. To change this behavior, see [Global state in the CRT](../global-state.md). -### Generic-Text Routine Mappings +### Generic-text routine mappings |TCHAR.H routine|_UNICODE & _MBCS not defined|_MBCS defined|_UNICODE defined| |---------------------|------------------------------------|--------------------|-----------------------| @@ -120,7 +120,7 @@ By default, this function's global state is scoped to the application. To change |**_mbslwr_s**, **_mbslwr_s_l**|\| |**_wcslwr_s**, **_wcslwr_s_l**|\ or \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -162,7 +162,7 @@ Upper: THE STRING TO END ALL STRINGS! ## See also -[String Manipulation](../../c-runtime-library/string-manipulation-crt.md)
-[Locale](../../c-runtime-library/locale.md)
-[Interpretation of Multibyte-Character Sequences](../../c-runtime-library/interpretation-of-multibyte-character-sequences.md)
-[_strupr_s, _strupr_s_l, _mbsupr_s, _mbsupr_s_l, _wcsupr_s, _wcsupr_s_l](strupr-s-strupr-s-l-mbsupr-s-mbsupr-s-l-wcsupr-s-wcsupr-s-l.md)
+[String manipulation](../string-manipulation-crt.md)\ +[Locale](../locale.md)\ +[Interpretation of multibyte-character sequences](../interpretation-of-multibyte-character-sequences.md)\ +[`_strupr_s`, `_strupr_s_l`, `_mbsupr_s`, `_mbsupr_s_l`, `_wcsupr_s`, `_wcsupr_s_l`](strupr-s-strupr-s-l-mbsupr-s-mbsupr-s-l-wcsupr-s-wcsupr-s-l.md) diff --git a/docs/c-runtime-library/reference/strlwr-wcslwr-mbslwr-strlwr-l-wcslwr-l-mbslwr-l.md b/docs/c-runtime-library/reference/strlwr-wcslwr-mbslwr-strlwr-l-wcslwr-l-mbslwr-l.md index ff05790000f..536451039c2 100644 --- a/docs/c-runtime-library/reference/strlwr-wcslwr-mbslwr-strlwr-l-wcslwr-l-mbslwr-l.md +++ b/docs/c-runtime-library/reference/strlwr-wcslwr-mbslwr-strlwr-l-wcslwr-l-mbslwr-l.md @@ -12,7 +12,7 @@ ms.assetid: d279181d-2e7d-401f-ab44-6e7c2786a046 --- # _strlwr, _wcslwr, _mbslwr, _strlwr_l, _wcslwr_l, _mbslwr_l -Converts a string to lowercase. More secure versions of these functions are available; see [_strlwr_s, _strlwr_s_l, _mbslwr_s, _mbslwr_s_l, _wcslwr_s, _wcslwr_s_l](strlwr-s-strlwr-s-l-mbslwr-s-mbslwr-s-l-wcslwr-s-wcslwr-s-l.md). +Converts a string to lowercase. More secure versions of these functions are available; see [`_strlwr_s`, `_strlwr_s_l`, `_mbslwr_s`, `_mbslwr_s_l`, `_wcslwr_s`, `_wcslwr_s_l`](strlwr-s-strlwr-s-l-mbslwr-s-mbslwr-s-l-wcslwr-s-wcslwr-s-l.md). > [!IMPORTANT] > **_mbslwr** and **_mbslwr_l** cannot be used in applications that execute in the Windows Runtime. For more information, see [CRT functions not supported in Universal Windows Platform apps](../../cppcx/crt-functions-not-supported-in-universal-windows-platform-apps.md). @@ -72,29 +72,29 @@ unsigned char *_mbslwr_l( ### Parameters -*str*
+*`str`*\ Null-terminated string to convert to lowercase. -*locale*
+*`locale`*\ The locale to use. -## Return Value +## Return value Each of these functions returns a pointer to the converted string. Because the modification is done in place, the pointer returned is the same as the pointer passed as the input argument. No return value is reserved to indicate an error. ## Remarks -The **_strlwr** function converts any uppercase letters in *str* to lowercase as determined by the **LC_CTYPE** category setting of the locale. Other characters are not affected. For more information on **LC_CTYPE**, see [setlocale](setlocale-wsetlocale.md). The versions of these functions without the **_l** suffix use the current locale for their locale-dependent behavior; the versions with the **_l** suffix are identical except that they use the locale passed in instead. For more information, see [Locale](../../c-runtime-library/locale.md). +The **_strlwr** function converts any uppercase letters in *`str`* to lowercase as determined by the **LC_CTYPE** category setting of the locale. Other characters are not affected. For more information on **LC_CTYPE**, see [`setlocale`](setlocale-wsetlocale.md). The versions of these functions without the **_l** suffix use the current locale for their locale-dependent behavior; the versions with the **_l** suffix are identical except that they use the locale passed in instead. For more information, see [Locale](../locale.md). The **_wcslwr** and **_mbslwr** functions are wide-character and multibyte-character versions of **_strlwr**. The argument and return value of **_wcslwr** are wide-character strings; those of **_mbslwr** are multibyte-character strings. These three functions behave identically otherwise. -If *str* is a **NULL** pointer, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md) . If execution is allowed to continue, these functions return the original string and set **errno** to **EINVAL**. +If *`str`* is a **NULL** pointer, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md) . If execution is allowed to continue, these functions return the original string and set **errno** to **EINVAL**. -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 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| |---------------------|------------------------------------|--------------------|-----------------------| @@ -109,7 +109,7 @@ By default, this function's global state is scoped to the application. To change |**_wcslwr**, **_wcslwr_l**|\ or \| |**_mbslwr**, **_mbslwr_l**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -149,6 +149,6 @@ Upper: THE STRING TO END ALL STRINGS! ## See also -[String Manipulation](../../c-runtime-library/string-manipulation-crt.md)
-[Locale](../../c-runtime-library/locale.md)
-[_strupr, _strupr_l, _mbsupr, _mbsupr_l, _wcsupr_l, _wcsupr](strupr-strupr-l-mbsupr-mbsupr-l-wcsupr-l-wcsupr.md)
+[String manipulation](../string-manipulation-crt.md)\ +[Locale](../locale.md)\ +[`_strupr`, `_strupr_l`, `_mbsupr`, `_mbsupr_l`, `_wcsupr_l`, `_wcsupr`](strupr-strupr-l-mbsupr-mbsupr-l-wcsupr-l-wcsupr.md) diff --git a/docs/c-runtime-library/reference/strlwr-wcslwr.md b/docs/c-runtime-library/reference/strlwr-wcslwr.md index e3e3f281e2c..223529f29f8 100644 --- a/docs/c-runtime-library/reference/strlwr-wcslwr.md +++ b/docs/c-runtime-library/reference/strlwr-wcslwr.md @@ -12,6 +12,6 @@ ms.assetid: b9274824-4365-4674-b656-823c89653656 --- # strlwr, wcslwr -The Microsoft-specific function names `strlwr` and `wcslwr` are deprecated aliases for the [_strlwr and _wcslwr](strlwr-wcslwr-mbslwr-strlwr-l-wcslwr-l-mbslwr-l.md) functions. By default, they generate [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The names are deprecated because they don't follow the Standard C rules for implementation-specific names. However, the functions are still supported. +The Microsoft-specific function names `strlwr` and `wcslwr` are deprecated aliases for the [`_strlwr` and `_wcslwr`](strlwr-wcslwr-mbslwr-strlwr-l-wcslwr-l-mbslwr-l.md) functions. By default, they generate [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The names are deprecated because they don't follow the Standard C rules for implementation-specific names. However, the functions are still supported. -We recommend you use [_strlwr or _wcslwr](strlwr-wcslwr-mbslwr-strlwr-l-wcslwr-l-mbslwr-l.md) or the security-enhanced [_strlwr_s and _wcslwr_s](strlwr-s-strlwr-s-l-mbslwr-s-mbslwr-s-l-wcslwr-s-wcslwr-s-l.md) functions instead. Or, you can continue to use these function names, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). +We recommend you use [_strlwr or _wcslwr](strlwr-wcslwr-mbslwr-strlwr-l-wcslwr-l-mbslwr-l.md) or the security-enhanced [`_strlwr_s` and `_wcslwr_s`](strlwr-s-strlwr-s-l-mbslwr-s-mbslwr-s-l-wcslwr-s-wcslwr-s-l.md) functions instead. Or, you can continue to use these function names, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). diff --git a/docs/c-runtime-library/reference/strncat-s-strncat-s-l-wcsncat-s-wcsncat-s-l-mbsncat-s-mbsncat-s-l.md b/docs/c-runtime-library/reference/strncat-s-strncat-s-l-wcsncat-s-wcsncat-s-l-mbsncat-s-mbsncat-s-l.md index 7f881724009..e2a50c5c428 100644 --- a/docs/c-runtime-library/reference/strncat-s-strncat-s-l-wcsncat-s-wcsncat-s-l-mbsncat-s-mbsncat-s-l.md +++ b/docs/c-runtime-library/reference/strncat-s-strncat-s-l-wcsncat-s-wcsncat-s-l-mbsncat-s-mbsncat-s-l.md @@ -12,7 +12,7 @@ ms.assetid: de77eca2-4d9c-4e66-abf2-a95fefc21e5a --- # strncat_s, _strncat_s_l, wcsncat_s, _wcsncat_s_l, _mbsncat_s, _mbsncat_s_l -Appends characters to a string. These versions of [strncat, _strncat_l, wcsncat, _wcsncat_l, _mbsncat, _mbsncat_l](strncat-strncat-l-wcsncat-wcsncat-l-mbsncat-mbsncat-l.md) have security enhancements, as described in [Security Features in the CRT](../../c-runtime-library/security-features-in-the-crt.md). +Appends characters to a string. These versions of [`strncat`, `_strncat_l`, `wcsncat`, `_wcsncat_l`, `_mbsncat`, `_mbsncat_l`](strncat-strncat-l-wcsncat-wcsncat-l-mbsncat-mbsncat-l.md) have security enhancements, as described in [Security features in the CRT](../security-features-in-the-crt.md). > [!IMPORTANT] > **_mbsncat_s** and **_mbsncat_s_l** cannot be used in applications that execute in the Windows Runtime. For more information, see [CRT functions not supported in Universal Windows Platform apps](../../cppcx/crt-functions-not-supported-in-universal-windows-platform-apps.md). @@ -102,28 +102,28 @@ errno_t _mbsncat_s_l( ### Parameters -*strDest*
+*`strDest`*\ Null-terminated destination string. -*numberOfElements*
+*`numberOfElements`*\ Size of the destination buffer. -*strSource*
+*`strSource`*\ Null-terminated source string. -*count*
-Number of characters to append, or [_TRUNCATE](../../c-runtime-library/truncate.md). +*`count`*\ +Number of characters to append, or [`_TRUNCATE`](../truncate.md). -*locale*
+*`locale`*\ Locale to use. -## Return Value +## Return value Returns 0 if successful, an error code on failure. -### Error Conditions +### Error conditions -|*strDestination*|*numberOfElements*|*strSource*|Return value|Contents of *strDestination*| +|*`strDestination`*|*`numberOfElements`*|*`strSource`*|Return value|Contents of *`strDestination`*| |----------------------|------------------------|-----------------|------------------|----------------------------------| |**NULL** or unterminated|any|any|**EINVAL**|not modified| |any|any|**NULL**|**EINVAL**|not modified| @@ -131,9 +131,9 @@ Returns 0 if successful, an error code on failure. ## Remarks -These functions try to append the first *D* characters of *strSource* to the end of *strDest*, where *D* is the lesser of *count* and the length of *strSource*. If appending those *D* characters will fit within *strDest* (whose size is given as *numberOfElements*) and still leave room for a null terminator, then those characters are appended, starting at the original terminating null of *strDest*, and a new terminating null is appended; otherwise, *strDest*[0] is set to the null character and the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). +These functions try to append the first `D` characters of *`strSource`* to the end of *`strDest`*, where `D` is the lesser of *`count`* and the length of *`strSource`*. If appending those `D` characters will fit within *`strDest`* (whose size is given as *`numberOfElements`*) and still leave room for a null terminator, then those characters are appended, starting at the original terminating null of *`strDest`*, and a new terminating null is appended; otherwise, *`strDest[0]`* is set to the null character and the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). -There is an exception to the above paragraph. If *count* is [_TRUNCATE](../../c-runtime-library/truncate.md), then as much of *strSource* as will fit is appended to *strDest* while still leaving room to append a terminating null. +There is an exception to the above paragraph. If *`count`* is [`_TRUNCATE`](../truncate.md), then as much of *`strSource`* as will fit is appended to *`strDest`* while still leaving room to append a terminating null. For example, @@ -145,7 +145,7 @@ strncat_s(dst, _countof(dst), "34567", 3); means that we're asking **strncat_s** to append three characters to two characters in a buffer five characters long; this would leave no space for the null terminator, hence **strncat_s** zeroes out the string and calls the invalid parameter handler. -If truncation behavior is needed, use **_TRUNCATE** or adjust the *count* parameter accordingly: +If truncation behavior is needed, use **_TRUNCATE** or adjust the *`count`* parameter accordingly: ```C strncat_s(dst, _countof(dst), "34567", _TRUNCATE); @@ -159,19 +159,19 @@ strncat_s(dst, _countof(dst), "34567", _countof(dst)-strlen(dst)-1); In all cases, the resulting string is terminated with a null character. If copying takes place between strings that overlap, the behavior is undefined. -If *strSource* or *strDest* is **NULL**, or *numberOfElements* is zero, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md) . If execution is allowed to continue, the function returns **EINVAL** without modifying its parameters. +If *`strSource`* or *`strDest`* is **NULL**, or *`numberOfElements`* is zero, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md) . If execution is allowed to continue, the function returns **EINVAL** without modifying its parameters. **wcsncat_s** and **_mbsncat_s** are wide-character and multibyte-character versions of **strncat_s**. The string arguments and return value of **wcsncat_s** are wide-character strings; those of **_mbsncat_s** are multibyte-character strings. These three functions behave identically otherwise. -The output value is affected by the setting of the **LC_CTYPE** category setting of the locale. For more information, see [setlocale](setlocale-wsetlocale.md). The versions of these functions without the **_l** suffix use the current locale for this locale-dependent behavior; the versions with the **_l** suffix are identical except they use the locale parameter passed in instead. For more information, see [Locale](../../c-runtime-library/locale.md). +The output value is affected by the setting of the **LC_CTYPE** category setting of the locale. For more information, see [`setlocale`](setlocale-wsetlocale.md). The versions of these functions without the **_l** suffix use the current locale for this locale-dependent behavior; the versions with the **_l** suffix are identical except they use the locale parameter passed in instead. For more information, see [Locale](../locale.md). -In C++, using these functions is simplified by template overloads; the overloads can infer buffer length automatically (eliminating the need to specify a size argument) and they can automatically replace older, non-secure functions with their newer, secure counterparts. For more information, see [Secure Template Overloads](../../c-runtime-library/secure-template-overloads.md). +In C++, using these functions is simplified by template overloads; the overloads can infer buffer length automatically (eliminating the need to specify a size argument) and they can automatically replace older, non-secure functions with their newer, secure counterparts. For more information, see [Secure template overloads](../secure-template-overloads.md). -The debug library versions of these functions first fill the buffer with 0xFE. To disable this behavior, use [_CrtSetDebugFillThreshold](crtsetdebugfillthreshold.md). +The debug library versions of these functions first fill the buffer with 0xFE. To disable this behavior, use [`_CrtSetDebugFillThreshold`](crtsetdebugfillthreshold.md). By default, this function's global state is scoped to the application. To change this behavior, see [Global state in the CRT](../global-state.md). -### Generic-Text Routine Mappings +### Generic-text routine mappings |TCHAR.H routine|_UNICODE & _MBCS not defined|_MBCS defined|_UNICODE defined| |---------------------|------------------------------------|--------------------|-----------------------| @@ -188,7 +188,7 @@ By default, this function's global state is scoped to the application. To change |**wcsncat_s**|\ or \| |**_mbsncat_s**, **_mbsncat_s_l**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -329,16 +329,16 @@ Invalid parameter handler invoked: (L"Buffer is too small" && 0) ## See also -[String Manipulation](../../c-runtime-library/string-manipulation-crt.md)
-[Locale](../../c-runtime-library/locale.md)
-[Interpretation of Multibyte-Character Sequences](../../c-runtime-library/interpretation-of-multibyte-character-sequences.md)
-[_mbsnbcat, _mbsnbcat_l](mbsnbcat-mbsnbcat-l.md)
-[strcat, wcscat, _mbscat](strcat-wcscat-mbscat.md)
-[strcmp, wcscmp, _mbscmp](strcmp-wcscmp-mbscmp.md)
-[strcpy, wcscpy, _mbscpy](strcpy-wcscpy-mbscpy.md)
-[strncmp, wcsncmp, _mbsncmp, _mbsncmp_l](strncmp-wcsncmp-mbsncmp-mbsncmp-l.md)
-[strncpy, _strncpy_l, wcsncpy, _wcsncpy_l, _mbsncpy, _mbsncpy_l](strncpy-strncpy-l-wcsncpy-wcsncpy-l-mbsncpy-mbsncpy-l.md)
-[_strnicmp, _wcsnicmp, _mbsnicmp, _strnicmp_l, _wcsnicmp_l, _mbsnicmp_l](strnicmp-wcsnicmp-mbsnicmp-strnicmp-l-wcsnicmp-l-mbsnicmp-l.md)
-[strrchr, wcsrchr, _mbsrchr, _mbsrchr_l](strrchr-wcsrchr-mbsrchr-mbsrchr-l.md)
-[_strset, _strset_l, _wcsset, _wcsset_l, _mbsset, _mbsset_l](strset-strset-l-wcsset-wcsset-l-mbsset-mbsset-l.md)
-[strspn, wcsspn, _mbsspn, _mbsspn_l](strspn-wcsspn-mbsspn-mbsspn-l.md)
+[String manipulation](../string-manipulation-crt.md)\ +[Locale](../locale.md)\ +[Interpretation of multibyte-character sequences](../interpretation-of-multibyte-character-sequences.md)\ +[`_mbsnbcat`, `_mbsnbcat_l`](mbsnbcat-mbsnbcat-l.md)\ +[`strcat`, `wcscat`, `_mbscat`](strcat-wcscat-mbscat.md)\ +[`strcmp`, `wcscmp`, `_mbscmp`](strcmp-wcscmp-mbscmp.md)\ +[`strcpy`, `wcscpy`, `_mbscpy`](strcpy-wcscpy-mbscpy.md)\ +[`strncmp`, `wcsncmp`, `_mbsncmp`, `_mbsncmp_l`](strncmp-wcsncmp-mbsncmp-mbsncmp-l.md)\ +[`strncpy`, `_strncpy_l`, `wcsncpy`, `_wcsncpy_l`, `_mbsncpy`, `_mbsncpy_l`](strncpy-strncpy-l-wcsncpy-wcsncpy-l-mbsncpy-mbsncpy-l.md)\ +[`_strnicmp`, `_wcsnicmp`, `_mbsnicmp`, `_strnicmp_l`, `_wcsnicmp_l`, `_mbsnicmp_l`](strnicmp-wcsnicmp-mbsnicmp-strnicmp-l-wcsnicmp-l-mbsnicmp-l.md)\ +[`strrchr`, `wcsrchr`, `_mbsrchr`, `_mbsrchr_l`](strrchr-wcsrchr-mbsrchr-mbsrchr-l.md)\ +[`_strset`, `_strset_l`, `_wcsset`, `_wcsset_l`, `_mbsset`, `_mbsset_l`](strset-strset-l-wcsset-wcsset-l-mbsset-mbsset-l.md)\ +[`strspn`, `wcsspn`, `_mbsspn`, `_mbsspn_l`](strspn-wcsspn-mbsspn-mbsspn-l.md) diff --git a/docs/c-runtime-library/reference/strncat-strncat-l-wcsncat-wcsncat-l-mbsncat-mbsncat-l.md b/docs/c-runtime-library/reference/strncat-strncat-l-wcsncat-wcsncat-l-mbsncat-mbsncat-l.md index d2b48385427..baee359cdc1 100644 --- a/docs/c-runtime-library/reference/strncat-strncat-l-wcsncat-wcsncat-l-mbsncat-mbsncat-l.md +++ b/docs/c-runtime-library/reference/strncat-strncat-l-wcsncat-wcsncat-l-mbsncat-mbsncat-l.md @@ -81,7 +81,7 @@ Number of characters to append. *`locale`*\ Locale to use. -## Return Value +## Return value Returns a pointer to the destination string. No return value is reserved to indicate an error. @@ -90,17 +90,17 @@ Returns a pointer to the destination string. No return value is reserved to indi The **`strncat`** function appends, at most, the first *`count`* characters of *`strSource`* to *`strDest`*. The initial character of *`strSource`* overwrites the terminating null character of *`strDest`*. If a null character appears in *`strSource`* before *`count`* characters are appended, **`strncat`** appends all characters from *`strSource`*, up to the null character. If *`count`* is greater than the length of *`strSource`*, the length of *`strSource`* is used in place of *`count`*. In all cases, the resulting string is terminated with a null character. If copying takes place between strings that overlap, the behavior is undefined. > [!IMPORTANT] -> **`strncat`** does not check for sufficient space in *`strDest`*; it is therefore a potential cause of buffer overruns. Keep in mind that *`count`* limits the number of characters appended; it is not a limit on the size of *`strDest`*. See the example below. For more information, see [Avoiding Buffer Overruns](/windows/win32/SecBP/avoiding-buffer-overruns). +> **`strncat`** does not check for sufficient space in *`strDest`*; it is therefore a potential cause of buffer overruns. Keep in mind that *`count`* limits the number of characters appended; it is not a limit on the size of *`strDest`*. See the example below. For more information, see [Avoiding buffer overruns](/windows/win32/SecBP/avoiding-buffer-overruns). **`wcsncat`** and **`_mbsncat`** are wide-character and multibyte-character versions of **`strncat`**. The string arguments and return value of **`wcsncat`** are wide-character strings; those of **`_mbsncat`** are multibyte-character strings. These three functions behave identically otherwise. -The output value is affected by the setting of the **`LC_CTYPE`** category setting of the locale. For more information, see [`setlocale`](setlocale-wsetlocale.md) 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 they use the locale parameter passed in instead. For more information, see [Locale](../../c-runtime-library/locale.md). +The output value is affected by the setting of the **`LC_CTYPE`** category setting of the locale. For more information, see [`setlocale`](setlocale-wsetlocale.md) 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 they use the locale parameter passed in instead. For more information, see [Locale](../locale.md). -In C++, these functions have template overloads. For more information, see [Secure Template Overloads](../../c-runtime-library/secure-template-overloads.md). +In C++, these functions have template overloads. 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 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 | |--|--|--|--| @@ -119,7 +119,7 @@ By default, this function's global state is scoped to the application. To change |**`_mbsncat`**|\| |**`_mbsncat_l`**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -172,7 +172,7 @@ Note that **BadAppend** caused a buffer overrun. ## See also -[String Manipulation](../../c-runtime-library/string-manipulation-crt.md)\ +[String manipulation](../string-manipulation-crt.md)\ [`_mbsnbcat, _mbsnbcat_l`](mbsnbcat-mbsnbcat-l.md)\ [`strcat, wcscat, _mbscat`](strcat-wcscat-mbscat.md)\ [`strcmp, wcscmp, _mbscmp`](strcmp-wcscmp-mbscmp.md)\ @@ -183,5 +183,5 @@ Note that **BadAppend** caused a buffer overrun. [`strrchr, wcsrchr, _mbsrchr, _mbsrchr_l`](strrchr-wcsrchr-mbsrchr-mbsrchr-l.md)\ [`_strset, _strset_l, _wcsset, _wcsset_l, _mbsset, _mbsset_l`](strset-strset-l-wcsset-wcsset-l-mbsset-mbsset-l.md)\ [`strspn, wcsspn, _mbsspn, _mbsspn_l`](strspn-wcsspn-mbsspn-mbsspn-l.md)\ -[Locale](../../c-runtime-library/locale.md)\ -[Interpretation of Multibyte-Character Sequences](../../c-runtime-library/interpretation-of-multibyte-character-sequences.md)\ +[Locale](../locale.md)\ +[Interpretation of multibyte-character sequences](../interpretation-of-multibyte-character-sequences.md)\ diff --git a/docs/c-runtime-library/reference/strncmp-wcsncmp-mbsncmp-mbsncmp-l.md b/docs/c-runtime-library/reference/strncmp-wcsncmp-mbsncmp-mbsncmp-l.md index 037185157e1..de4e74819a0 100644 --- a/docs/c-runtime-library/reference/strncmp-wcsncmp-mbsncmp-mbsncmp-l.md +++ b/docs/c-runtime-library/reference/strncmp-wcsncmp-mbsncmp-mbsncmp-l.md @@ -49,16 +49,16 @@ int _mbsncmp_l( ### Parameters -*`string1`*, *`string2`*
+*`string1`*, *`string2`*\ Strings to compare. -*`count`*
+*`count`*\ Number of characters to compare. -*`locale`*
+*`locale`*\ Locale to use. -## Return Value +## Return value The return value indicates the relation of the substrings of *`string1`* and *`string2`* as follows. @@ -76,13 +76,13 @@ The **`strncmp`** function performs an ordinal comparison of at most the first * **`wcsncmp`** and **`_mbsncmp`** are wide-character and multibyte-character versions of **`strncmp`**. The arguments of **`wcsncmp`** are wide-character strings; those of **`_mbsncmp`** are multibyte-character strings. **`_mbsncmp`** recognizes multibyte-character sequences according to a multibyte code page and returns **`_NLSCMPERROR`** on an error. -Also, **`_mbsncmp`** and **`_mbsncmp_l`** validate parameters. If *`string1`* or *`string2`* is a null pointer and *`count`* is not equal to 0, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, **`_mbsncmp`** and **`_mbsncmp_l`** return **`_NLSCMPERROR`** and set **`errno`** to **`EINVAL`**. **`strncmp`** and **`wcsncmp`** do not validate their parameters. These functions behave identically otherwise. +Also, **`_mbsncmp`** and **`_mbsncmp_l`** validate parameters. If *`string1`* or *`string2`* is a null pointer and *`count`* is not equal to 0, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, **`_mbsncmp`** and **`_mbsncmp_l`** return **`_NLSCMPERROR`** and set **`errno`** to **`EINVAL`**. **`strncmp`** and **`wcsncmp`** do not validate their parameters. These functions behave identically otherwise. -The comparison behavior of **`_mbsncmp`** and **`_mbsncmp_l`** is affected by the setting of the **`LC_CTYPE`** category setting of the locale. This controls detection of leading and trailing bytes of multibyte characters. For more information, see [`setlocale`](setlocale-wsetlocale.md). The **`_mbsncmp`** function uses the current locale for this locale-dependent behavior. The **`_mbsncmp_l`** function is identical except that it uses the *locale* parameter instead. For more information, see [Locale](../../c-runtime-library/locale.md). If the locale is a single-byte locale, the behavior of these functions is identical to **`strncmp`**. +The comparison behavior of **`_mbsncmp`** and **`_mbsncmp_l`** is affected by the setting of the **`LC_CTYPE`** category setting of the locale. This controls detection of leading and trailing bytes of multibyte characters. For more information, see [`setlocale`](setlocale-wsetlocale.md). The **`_mbsncmp`** function uses the current locale for this locale-dependent behavior. The **`_mbsncmp_l`** function is identical except that it uses the *`locale`* parameter instead. For more information, see [Locale](../locale.md). If the locale is a single-byte locale, the behavior of these functions is identical to **`strncmp`**. 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| |---------------------|------------------------------------|--------------------|-----------------------| @@ -99,7 +99,7 @@ By default, this function's global state is scoped to the application. To change |**`wcsncmp`**|`` or ``| |**`_mbsncmp`**, **`_mbsncmp_l`**|``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -152,14 +152,14 @@ Result: String 1 is equal to string 2 ## See also -[String Manipulation](../../c-runtime-library/string-manipulation-crt.md)
-[Locale](../../c-runtime-library/locale.md)
-[Interpretation of Multibyte-Character Sequences](../../c-runtime-library/interpretation-of-multibyte-character-sequences.md)
-[`_mbsnbcmp`, `_mbsnbcmp_l`](mbsnbcmp-mbsnbcmp-l.md)
-[`_mbsnbicmp`, `_mbsnbicmp_l`](mbsnbicmp-mbsnbicmp-l.md)
-[`strcmp`, `wcscmp`, `_mbscmp`](strcmp-wcscmp-mbscmp.md)
-[`strcoll` Functions](../../c-runtime-library/strcoll-functions.md)
-[`_strnicmp`, `_wcsnicmp`, `_mbsnicmp`, `_strnicmp_l`, `_wcsnicmp_l`, `_mbsnicmp_l`](strnicmp-wcsnicmp-mbsnicmp-strnicmp-l-wcsnicmp-l-mbsnicmp-l.md)
-[`strrchr`, `wcsrchr`, `_mbsrchr`, `_mbsrchr_l`](strrchr-wcsrchr-mbsrchr-mbsrchr-l.md)
-[`_strset`, `_strset_l`, `_wcsset`, `_wcsset_l`, `_mbsset`, `_mbsset_l`](strset-strset-l-wcsset-wcsset-l-mbsset-mbsset-l.md)
-[`strspn`, `wcsspn`, `_mbsspn`, `_mbsspn_l`](strspn-wcsspn-mbsspn-mbsspn-l.md)
+[String manipulation](../string-manipulation-crt.md)\ +[Locale](../locale.md)\ +[Interpretation of multibyte-character sequences](../interpretation-of-multibyte-character-sequences.md)\ +[`_mbsnbcmp`, `_mbsnbcmp_l`](mbsnbcmp-mbsnbcmp-l.md)\ +[`_mbsnbicmp`, `_mbsnbicmp_l`](mbsnbicmp-mbsnbicmp-l.md)\ +[`strcmp`, `wcscmp`, `_mbscmp`](strcmp-wcscmp-mbscmp.md)\ +[`strcoll` functions](../strcoll-functions.md)\ +[`_strnicmp`, `_wcsnicmp`, `_mbsnicmp`, `_strnicmp_l`, `_wcsnicmp_l`, `_mbsnicmp_l`](strnicmp-wcsnicmp-mbsnicmp-strnicmp-l-wcsnicmp-l-mbsnicmp-l.md)\ +[`strrchr`, `wcsrchr`, `_mbsrchr`, `_mbsrchr_l`](strrchr-wcsrchr-mbsrchr-mbsrchr-l.md)\ +[`_strset`, `_strset_l`, `_wcsset`, `_wcsset_l`, `_mbsset`, `_mbsset_l`](strset-strset-l-wcsset-wcsset-l-mbsset-mbsset-l.md)\ +[`strspn`, `wcsspn`, `_mbsspn`, `_mbsspn_l`](strspn-wcsspn-mbsspn-mbsspn-l.md) diff --git a/docs/c-runtime-library/reference/strncnt-wcsncnt-mbsnbcnt-mbsnbcnt-l-mbsnccnt-mbsnccnt-l.md b/docs/c-runtime-library/reference/strncnt-wcsncnt-mbsnbcnt-mbsnbcnt-l-mbsnccnt-mbsnccnt-l.md index 257b8d44fd4..bd311358fe0 100644 --- a/docs/c-runtime-library/reference/strncnt-wcsncnt-mbsnbcnt-mbsnbcnt-l-mbsnccnt-mbsnccnt-l.md +++ b/docs/c-runtime-library/reference/strncnt-wcsncnt-mbsnbcnt-mbsnbcnt-l-mbsnccnt-mbsnccnt-l.md @@ -50,34 +50,34 @@ size_t _mbsnccnt_l( ### Parameters -*str*
+*`str`*\ String to be examined. -*count*
-Number of characters or bytes to be examined in *str*. +*`count`*\ +Number of characters or bytes to be examined in *`str`*. -*locale*
+*`locale`*\ Locale to use. -## Return Value +## Return value -**_mbsnbcnt** and **_mbsnbcnt_l** return the number of bytes found in the first *count* of multibyte characters of *str*. **_mbsnccnt** and **_mbsnccnt_l** return the number of characters found in the first *count* of bytes of *str*. If a null character is encountered before the examination of *str* has completed, they return the number of bytes or characters found before the null character. If *str* consists of fewer than *count* characters or bytes, they return the number of characters or bytes in the string. If *count* is less than zero, they return 0. In previous versions, these functions had a return value of type **`int`** rather than **size_t**. +**_mbsnbcnt** and **_mbsnbcnt_l** return the number of bytes found in the first *`count`* of multibyte characters of *`str`*. **_mbsnccnt** and **_mbsnccnt_l** return the number of characters found in the first *`count`* of bytes of *`str`*. If a null character is encountered before the examination of *`str`* has completed, they return the number of bytes or characters found before the null character. If *`str`* consists of fewer than *`count`* characters or bytes, they return the number of characters or bytes in the string. If *`count`* is less than zero, they return 0. In previous versions, these functions had a return value of type **`int`** rather than **size_t**. -**_strncnt** returns the number of characters in the first *count* bytes of the single-byte string *str*. **_wcsncnt** returns the number of characters in the first *count* wide characters of the wide-character string *str*. +**_strncnt** returns the number of characters in the first *`count`* bytes of the single-byte string *`str`*. **_wcsncnt** returns the number of characters in the first *`count`* wide characters of the wide-character string *`str`*. ## Remarks -**_mbsnbcnt** and **_mbsnbcnt_l** count the number of bytes found in the first *count* of multibyte characters of *str*. **_mbsnbcnt** and **_mbsnbcnt_l** replace **mtob** and should be used in place of **mtob**. +**_mbsnbcnt** and **_mbsnbcnt_l** count the number of bytes found in the first *`count`* of multibyte characters of *`str`*. **_mbsnbcnt** and **_mbsnbcnt_l** replace **mtob** and should be used in place of **mtob**. -**_mbsnccnt** and **_mbsnccnt_l** count the number of characters found in the first *count* of bytes of *str*. If **_mbsnccnt** and **_mbsnccnt_l** encounter a null character in the second byte of a double-byte character, the first byte is also considered to be null and is not included in the returned count value. **_mbsnccnt** and **_mbsnccnt_l** replace **btom** and should be used in place of **btom**. +**_mbsnccnt** and **_mbsnccnt_l** count the number of characters found in the first *`count`* of bytes of *`str`*. If **_mbsnccnt** and **_mbsnccnt_l** encounter a null character in the second byte of a double-byte character, the first byte is also considered to be null and is not included in the returned count value. **_mbsnccnt** and **_mbsnccnt_l** replace **btom** and should be used in place of **btom**. -If *str* is a **NULL** pointer or is *count* is 0, these functions invoke the invalid parameter handler as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md), **errno** is set to **EINVAL**, and the function returns 0. +If *`str`* is a **NULL** pointer or is *`count`* is 0, these functions invoke the invalid parameter handler as described in [Parameter validation](../parameter-validation.md), **errno** is set to **EINVAL**, and the function returns 0. -The output value is affected by the setting of the **LC_CTYPE** category setting of the locale; see [setlocale](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. For more information, see [Locale](../../c-runtime-library/locale.md). +The output value is affected by the setting of the **LC_CTYPE** category setting of the locale; see [`setlocale`](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. For more information, see [Locale](../locale.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 |Routine|_UNICODE and _MBCS not defined|_MBCS defined|_UNICODE defined| |-------------|--------------------------------------|--------------------|-----------------------| @@ -98,7 +98,7 @@ By default, this function's global state is scoped to the application. To change |**_strncnt**|\| |**_wcsncnt**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -129,7 +129,7 @@ The first 10 characters are single-byte. ## See also -[String Manipulation](../../c-runtime-library/string-manipulation-crt.md)
-[Locale](../../c-runtime-library/locale.md)
-[Interpretation of Multibyte-Character Sequences](../../c-runtime-library/interpretation-of-multibyte-character-sequences.md)
-[_mbsnbcat, _mbsnbcat_l](mbsnbcat-mbsnbcat-l.md)
+[String manipulation](../string-manipulation-crt.md)\ +[Locale](../locale.md)\ +[Interpretation of multibyte-character sequences](../interpretation-of-multibyte-character-sequences.md)\ +[`_mbsnbcat`, `_mbsnbcat_l`](mbsnbcat-mbsnbcat-l.md) diff --git a/docs/c-runtime-library/reference/strncoll-wcsncoll-mbsncoll-strncoll-l-wcsncoll-l-mbsncoll-l.md b/docs/c-runtime-library/reference/strncoll-wcsncoll-mbsncoll-strncoll-l-wcsncoll-l-mbsncoll-l.md index afb9189df4f..4bf346d05bf 100644 --- a/docs/c-runtime-library/reference/strncoll-wcsncoll-mbsncoll-strncoll-l-wcsncoll-l-mbsncoll-l.md +++ b/docs/c-runtime-library/reference/strncoll-wcsncoll-mbsncoll-strncoll-l-wcsncoll-l-mbsncoll-l.md @@ -57,41 +57,41 @@ int _mbsncoll_l( ### Parameters -*string1*, *string2*
+*`string1`*, *`string2`*\ Null-terminated strings to compare. -*count*
+*`count`*\ The number of characters to compare. -*locale*
+*`locale`*\ The locale to use. -## Return Value +## Return value -Each of these functions returns a value that indicates the relationship of the substrings of *string1* and *string2*, as follows. +Each of these functions returns a value that indicates the relationship of the substrings of *`string1`* and *`string2`*, as follows. |Return value|Relationship of string1 to string2| |------------------|----------------------------------------| -|< 0|*string1* is less than *string2*.| -|0|*string1* is identical to *string2*.| -|> 0|*string1* is greater than *string2*.| +|< 0|*`string1`* is less than *`string2`*.| +|0|*`string1`* is identical to *`string2`*.| +|> 0|*`string1`* is greater than *`string2`*.| -Each of these functions returns **_NLSCMPERROR**. To use **_NLSCMPERROR**, include either STRING.h or MBSTRING.h. **_wcsncoll** can fail if either *string1* or *string2* contains wide-character codes that are outside the domain of the collating sequence. When an error occurs, **_wcsncoll** may set **errno** to **EINVAL**. To check for an error on a call to **_wcsncoll**, set **errno** to 0 and then check **errno** after you call **_wcsncoll**. +Each of these functions returns **_NLSCMPERROR**. To use **_NLSCMPERROR**, include either STRING.h or MBSTRING.h. **_wcsncoll** can fail if either *`string1`* or *`string2`* contains wide-character codes that are outside the domain of the collating sequence. When an error occurs, **_wcsncoll** may set **errno** to **EINVAL**. To check for an error on a call to **_wcsncoll**, set **errno** to 0 and then check **errno** after you call **_wcsncoll**. ## Remarks -Each of these functions performs a case-sensitive comparison of the first *count* characters in *string1* and *string2*, according to the code page that's currently in use. Use these functions only when there is a difference between the character set order and the lexicographic character order in the code page, and when this difference is of interest for the string comparison. The character set order is locale-dependent. The versions of these functions that don't have the **_l** suffix use the current locale, but the versions that have the **_l** suffix use the locale that's passed in. For more information, see [Locale](../../c-runtime-library/locale.md). +Each of these functions performs a case-sensitive comparison of the first *`count`* characters in *`string1`* and *`string2`*, according to the code page that's currently in use. Use these functions only when there is a difference between the character set order and the lexicographic character order in the code page, and when this difference is of interest for the string comparison. The character set order is locale-dependent. The versions of these functions that don't have the **_l** suffix use the current locale, but the versions that have the **_l** suffix use the locale that's passed in. For more information, see [Locale](../locale.md). -All of these functions validate their parameters. If either *string1* or *string2* is a null pointer, or *count* is greater than **INT_MAX**, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, these functions return **_NLSCMPERROR** and set **errno** to **EINVAL**. +All of these functions validate their parameters. If either *`string1`* or *`string2`* is a null pointer, or *`count`* is greater than **INT_MAX**, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, these functions return **_NLSCMPERROR** and set **errno** to **EINVAL**. By default, this function's global state is scoped to the application. To change this behavior, see [Global state in the CRT](../global-state.md). -### Generic-Text Routine Mappings +### Generic-text routine mappings |TCHAR.H routine|_UNICODE & _MBCS not defined|_MBCS defined|_UNICODE defined| |---------------------|------------------------------------|--------------------|-----------------------| |**_tcsnccoll**|**_strncoll**|**_mbsncoll**|**_wcsncoll**| -|**_tcsncoll**|**_strncoll**|[_mbsnbcoll](mbsnbcoll-mbsnbcoll-l-mbsnbicoll-mbsnbicoll-l.md)|**_wcsncoll**| +|**_tcsncoll**|**_strncoll**|[`_mbsnbcoll`](mbsnbcoll-mbsnbcoll-l-mbsnbicoll-mbsnbicoll-l.md)|**_wcsncoll**| ## Requirements @@ -101,18 +101,18 @@ By default, this function's global state is scoped to the application. To change |**_wcsncoll**, **_wcsncoll_l**|\ or \| |**_mbsncoll**, **_mbsncoll_l**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Locale](../../c-runtime-library/locale.md)
-[String Manipulation](../../c-runtime-library/string-manipulation-crt.md)
-[strcoll Functions](../../c-runtime-library/strcoll-functions.md)
-[localeconv](localeconv.md)
-[_mbsnbcoll, _mbsnbcoll_l, _mbsnbicoll, _mbsnbicoll_l](mbsnbcoll-mbsnbcoll-l-mbsnbicoll-mbsnbicoll-l.md)
-[setlocale, _wsetlocale](setlocale-wsetlocale.md)
-[strcmp, wcscmp, _mbscmp](strcmp-wcscmp-mbscmp.md)
-[_stricmp, _wcsicmp, _mbsicmp, _stricmp_l, _wcsicmp_l, _mbsicmp_l](stricmp-wcsicmp-mbsicmp-stricmp-l-wcsicmp-l-mbsicmp-l.md)
-[strncmp, wcsncmp, _mbsncmp, _mbsncmp_l](strncmp-wcsncmp-mbsncmp-mbsncmp-l.md)
-[_strnicmp, _wcsnicmp, _mbsnicmp, _strnicmp_l, _wcsnicmp_l, _mbsnicmp_l](strnicmp-wcsnicmp-mbsnicmp-strnicmp-l-wcsnicmp-l-mbsnicmp-l.md)
-[strxfrm, wcsxfrm, _strxfrm_l, _wcsxfrm_l](strxfrm-wcsxfrm-strxfrm-l-wcsxfrm-l.md)
+[Locale](../locale.md)\ +[String manipulation](../string-manipulation-crt.md)\ +[`strcoll` functions](../strcoll-functions.md)\ +[`localeconv`](localeconv.md)\ +[`_mbsnbcoll`, `_mbsnbcoll_l`, `_mbsnbicoll`, `_mbsnbicoll_l`](mbsnbcoll-mbsnbcoll-l-mbsnbicoll-mbsnbicoll-l.md)\ +[`setlocale`, `_wsetlocale`](setlocale-wsetlocale.md)\ +[`strcmp`, `wcscmp`, `_mbscmp`](strcmp-wcscmp-mbscmp.md)\ +[`_stricmp`, `_wcsicmp`, `_mbsicmp`, `_stricmp_l`, `_wcsicmp_l`, `_mbsicmp_l`](stricmp-wcsicmp-mbsicmp-stricmp-l-wcsicmp-l-mbsicmp-l.md)\ +[`strncmp`, `wcsncmp`, `_mbsncmp`, `_mbsncmp_l`](strncmp-wcsncmp-mbsncmp-mbsncmp-l.md)\ +[`_strnicmp`, `_wcsnicmp`, `_mbsnicmp`, `_strnicmp_l`, `_wcsnicmp_l`, `_mbsnicmp_l`](strnicmp-wcsnicmp-mbsnicmp-strnicmp-l-wcsnicmp-l-mbsnicmp-l.md)\ +[`strxfrm`, `wcsxfrm`, `_strxfrm_l`, `_wcsxfrm_l`](strxfrm-wcsxfrm-strxfrm-l-wcsxfrm-l.md) diff --git a/docs/c-runtime-library/reference/strncpy-s-strncpy-s-l-wcsncpy-s-wcsncpy-s-l-mbsncpy-s-mbsncpy-s-l.md b/docs/c-runtime-library/reference/strncpy-s-strncpy-s-l-wcsncpy-s-wcsncpy-s-l-mbsncpy-s-mbsncpy-s-l.md index 06443cc7629..3e9172296ed 100644 --- a/docs/c-runtime-library/reference/strncpy-s-strncpy-s-l-wcsncpy-s-wcsncpy-s-l-mbsncpy-s-mbsncpy-s-l.md +++ b/docs/c-runtime-library/reference/strncpy-s-strncpy-s-l-wcsncpy-s-wcsncpy-s-l-mbsncpy-s-mbsncpy-s-l.md @@ -12,7 +12,7 @@ ms.assetid: a971c800-94d1-4d88-92f3-a2fe236a4546 --- # `strncpy_s`, `_strncpy_s_l`, `wcsncpy_s`, `_wcsncpy_s_l`, `_mbsncpy_s`, `_mbsncpy_s_l` -Copies characters of one string to another. These versions of [`strncpy`, `_strncpy_l`, `wcsncpy`, `_wcsncpy_l`, `_mbsncpy`, `_mbsncpy_l`](strncpy-strncpy-l-wcsncpy-wcsncpy-l-mbsncpy-mbsncpy-l.md) have security enhancements, as described in [Security Features in the CRT](../../c-runtime-library/security-features-in-the-crt.md). +Copies characters of one string to another. These versions of [`strncpy`, `_strncpy_l`, `wcsncpy`, `_wcsncpy_l`, `_mbsncpy`, `_mbsncpy_l`](strncpy-strncpy-l-wcsncpy-wcsncpy-l-mbsncpy-mbsncpy-l.md) have security enhancements, as described in [Security features in the CRT](../security-features-in-the-crt.md). > [!IMPORTANT] > **`_mbsncpy_s`** and **`_mbsncpy_s_l`** cannot be used in applications that execute in the Windows Runtime. For more information, see [CRT functions not supported in Universal Windows Platform apps](../../cppcx/crt-functions-not-supported-in-universal-windows-platform-apps.md). @@ -102,26 +102,26 @@ errno_t _mbsncpy_s_l( ### Parameters -*`strDest`*
+*`strDest`*\ Destination string. -*`numberOfElements`*
+*`numberOfElements`*\ The size of the destination string, in characters. -*`strSource`*
+*`strSource`*\ Source string. -*`count`*
-Number of characters to be copied, or [`_TRUNCATE`](../../c-runtime-library/truncate.md). +*`count`*\ +Number of characters to be copied, or [`_TRUNCATE`](../truncate.md). -*`locale`*
+*`locale`*\ The locale to use. -## Return Value +## Return value Zero if successful, **`STRUNCATE`** if truncation occurred, otherwise an error code. -### Error Conditions +### Error conditions |*`strDest`*|*`numberOfElements`*|*`strSource`*|Return value|Contents of *`strDest`*| |---------------|------------------------|-----------------|------------------|---------------------------| @@ -132,7 +132,7 @@ Zero if successful, **`STRUNCATE`** if truncation occurred, otherwise an error c ## Remarks -These functions try to copy the first *`D`* characters of *`strSource`* to *`strDest`*, where *`D`* is the lesser of *`count`* and the length of *`strSource`*. If those *`D`* characters will fit within *`strDest`* (whose size is given as *`numberOfElements`*) and still leave room for a null terminator, then those characters are copied and a terminating null is appended; otherwise, *`strDest[0]`* is set to the null character and the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). +These functions try to copy the first *`D`* characters of *`strSource`* to *`strDest`*, where *`D`* is the lesser of *`count`* and the length of *`strSource`*. If those *`D`* characters will fit within *`strDest`* (whose size is given as *`numberOfElements`*) and still leave room for a null terminator, then those characters are copied and a terminating null is appended; otherwise, *`strDest[0]`* is set to the null character and the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). There is an exception to the above paragraph. If *`count`* is **`_TRUNCATE`**, then as much of *`strSource`* as will fit into *`strDest`* is copied while still leaving room for the terminating null which is always appended. @@ -160,15 +160,15 @@ If *`strDest`* or *`strSource`* is **`NULL`**, or *`numberOfElements`* is 0, the **`wcsncpy_s`** and **`_mbsncpy_s`** are wide-character and multibyte-character versions of **`strncpy_s`**. The arguments and return value of **`wcsncpy_s`** and **`mbsncpy_s`** do vary accordingly. These six functions behave identically otherwise. -The output value is affected by the setting of the **`LC_CTYPE`** category setting of the locale; see [`setlocale`](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. For more information, see [Locale](../../c-runtime-library/locale.md). +The output value is affected by the setting of the **`LC_CTYPE`** category setting of the locale; see [`setlocale`](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. For more information, see [Locale](../locale.md). -In C++, using these functions is simplified by template overloads; the overloads can infer buffer length automatically (eliminating the need to specify a size argument) and they can automatically replace older, non-secure functions with their newer, secure counterparts. For more information, see [Secure Template Overloads](../../c-runtime-library/secure-template-overloads.md). +In C++, using these functions is simplified by template overloads; the overloads can infer buffer length automatically (eliminating the need to specify a size argument) and they can automatically replace older, non-secure functions with their newer, secure counterparts. For more information, see [Secure template overloads](../secure-template-overloads.md). The debug library versions of these functions first fill the buffer with 0xFE. To disable this behavior, use [`_CrtSetDebugFillThreshold`](crtsetdebugfillthreshold.md). By default, this function's global state is scoped to the application. To change this behavior, see [Global state in the CRT](../global-state.md). -### Generic-Text Routine Mappings +### Generic-text routine mappings |`TCHAR.H` routine|`_UNICODE` & `_MBCS` not defined|`_MBCS` defined|`_UNICODE` defined| |---------------------|------------------------------------|--------------------|-----------------------| @@ -186,7 +186,7 @@ By default, this function's global state is scoped to the application. To change |**`wcsncpy_s`**, **`_wcsncpy_s_l`**|`` or ``| |**`_mbsncpy_s`**, **`_mbsncpy_s_l`**|``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example: Copy chars to a buffer @@ -361,16 +361,16 @@ After strncpy_s (with null-termination): ## See also -[String Manipulation](../../c-runtime-library/string-manipulation-crt.md)
-[Locale](../../c-runtime-library/locale.md)
-[Interpretation of Multibyte-Character Sequences](../../c-runtime-library/interpretation-of-multibyte-character-sequences.md)
-[`_mbsnbcpy`, `_mbsnbcpy_l`](mbsnbcpy-mbsnbcpy-l.md)
-[`strcat_s`, `wcscat_s`, `_mbscat_s`](strcat-s-wcscat-s-mbscat-s.md)
-[`strcmp`, `wcscmp`, `_mbscmp`](strcmp-wcscmp-mbscmp.md)
-[`strcpy_s`, `wcscpy_s`, `_mbscpy_s`](strcpy-s-wcscpy-s-mbscpy-s.md)
-[`strncat_s`, `_strncat_s_l`, `wcsncat_s`, `_wcsncat_s_l`, `_mbsncat_s`, `_mbsncat_s_l`](strncat-s-strncat-s-l-wcsncat-s-wcsncat-s-l-mbsncat-s-mbsncat-s-l.md)
-[`strncmp`, `wcsncmp`, `_mbsncmp`, `_mbsncmp_l`](strncmp-wcsncmp-mbsncmp-mbsncmp-l.md)
-[`_strnicmp`, `_wcsnicmp`, `_mbsnicmp`, `_strnicmp_l`, `_wcsnicmp_l`, `_mbsnicmp_l`](strnicmp-wcsnicmp-mbsnicmp-strnicmp-l-wcsnicmp-l-mbsnicmp-l.md)
-[`strrchr`, `wcsrchr`, `_mbsrchr`, `_mbsrchr_l`](strrchr-wcsrchr-mbsrchr-mbsrchr-l.md)
-[`_strset`, `_strset_l`, `_wcsset`, `_wcsset_l`, `_mbsset`, `_mbsset_l`](strset-strset-l-wcsset-wcsset-l-mbsset-mbsset-l.md)
-[`strspn`, `wcsspn`, `_mbsspn`, `_mbsspn_l`](strspn-wcsspn-mbsspn-mbsspn-l.md)
+[String manipulation](../string-manipulation-crt.md)\ +[Locale](../locale.md)\ +[Interpretation of multibyte-character sequences](../interpretation-of-multibyte-character-sequences.md)\ +[`_mbsnbcpy`, `_mbsnbcpy_l`](mbsnbcpy-mbsnbcpy-l.md)\ +[`strcat_s`, `wcscat_s`, `_mbscat_s`](strcat-s-wcscat-s-mbscat-s.md)\ +[`strcmp`, `wcscmp`, `_mbscmp`](strcmp-wcscmp-mbscmp.md)\ +[`strcpy_s`, `wcscpy_s`, `_mbscpy_s`](strcpy-s-wcscpy-s-mbscpy-s.md)\ +[`strncat_s`, `_strncat_s_l`, `wcsncat_s`, `_wcsncat_s_l`, `_mbsncat_s`, `_mbsncat_s_l`](strncat-s-strncat-s-l-wcsncat-s-wcsncat-s-l-mbsncat-s-mbsncat-s-l.md)\ +[`strncmp`, `wcsncmp`, `_mbsncmp`, `_mbsncmp_l`](strncmp-wcsncmp-mbsncmp-mbsncmp-l.md)\ +[`_strnicmp`, `_wcsnicmp`, `_mbsnicmp`, `_strnicmp_l`, `_wcsnicmp_l`, `_mbsnicmp_l`](strnicmp-wcsnicmp-mbsnicmp-strnicmp-l-wcsnicmp-l-mbsnicmp-l.md)\ +[`strrchr`, `wcsrchr`, `_mbsrchr`, `_mbsrchr_l`](strrchr-wcsrchr-mbsrchr-mbsrchr-l.md)\ +[`_strset`, `_strset_l`, `_wcsset`, `_wcsset_l`, `_mbsset`, `_mbsset_l`](strset-strset-l-wcsset-wcsset-l-mbsset-mbsset-l.md)\ +[`strspn`, `wcsspn`, `_mbsspn`, `_mbsspn_l`](strspn-wcsspn-mbsspn-mbsspn-l.md) diff --git a/docs/c-runtime-library/reference/strncpy-strncpy-l-wcsncpy-wcsncpy-l-mbsncpy-mbsncpy-l.md b/docs/c-runtime-library/reference/strncpy-strncpy-l-wcsncpy-wcsncpy-l-mbsncpy-mbsncpy-l.md index 11fd557243c..6cb4cd96529 100644 --- a/docs/c-runtime-library/reference/strncpy-strncpy-l-wcsncpy-wcsncpy-l-mbsncpy-mbsncpy-l.md +++ b/docs/c-runtime-library/reference/strncpy-strncpy-l-wcsncpy-wcsncpy-l-mbsncpy-mbsncpy-l.md @@ -96,19 +96,19 @@ unsigned char *_mbsncpy_l( ### Parameters -*`strDest`*
+*`strDest`*\ Destination string. -*`strSource`*
+*`strSource`*\ Source string. -*`count`*
+*`count`*\ Number of characters to be copied. -*`locale`*
+*`locale`*\ Locale to use. -## Return Value +## Return value Returns *`strDest`*. No return value is reserved to indicate an error. @@ -117,19 +117,19 @@ Returns *`strDest`*. No return value is reserved to indicate an error. The **`strncpy`** function copies the initial *`count`* characters of *`strSource`* to *`strDest`* and returns *`strDest`*. If *`count`* is less than or equal to the length of *`strSource`*, a null character is not appended automatically to the copied string. If *`count`* is greater than the length of *`strSource`*, the destination string is padded with null characters up to length *`count`*. The behavior of **`strncpy`** is undefined if the source and destination strings overlap. > [!IMPORTANT] -> **`strncpy`** does not check for sufficient space in *`strDest`*; this makes it a potential cause of buffer overruns. The *`count`* argument limits the number of characters copied; it is not a limit on the size of *`strDest`*. See the following example. For more information, see [Avoiding Buffer Overruns](/windows/win32/SecBP/avoiding-buffer-overruns). +> **`strncpy`** does not check for sufficient space in *`strDest`*; this makes it a potential cause of buffer overruns. The *`count`* argument limits the number of characters copied; it is not a limit on the size of *`strDest`*. See the following example. For more information, see [Avoiding buffer overruns](/windows/win32/SecBP/avoiding-buffer-overruns). -If *`strDest`* or *`strSource`* is a **`NULL`** pointer, or if *`count`* is less than or equal to zero, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, these functions return -1 and set **`errno`** to **`EINVAL`**. +If *`strDest`* or *`strSource`* is a **`NULL`** pointer, or if *`count`* is less than or equal to zero, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, these functions return -1 and set **`errno`** to **`EINVAL`**. **`wcsncpy`** and **`_mbsncpy`** are wide-character and multibyte-character versions of **`strncpy`**. The arguments and return value of **`wcsncpy`** and **`_mbsncpy`** vary accordingly. These six functions behave identically otherwise. -The versions of these functions with the **`_l`** suffix are identical except that they use the locale passed in instead of the current locale for their locale-dependent behavior. For more information, see [Locale](../../c-runtime-library/locale.md). +The versions of these functions with the **`_l`** suffix are identical except that they use the locale passed in instead of the current locale for their locale-dependent behavior. For more information, see [Locale](../locale.md). -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 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| |---------------------|------------------------------------|--------------------|-----------------------| @@ -147,7 +147,7 @@ By default, this function's global state is scoped to the application. To change |**`wcsncpy`**|`` or ``| |**`_mbsncpy`**, **`_mbsncpy_l`**|``| -For additional platform compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For additional platform compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -220,18 +220,18 @@ The layout of automatic variables and the level of error detection and code prot ## See also -[String Manipulation](../../c-runtime-library/string-manipulation-crt.md)
-[Locale](../../c-runtime-library/locale.md)
-[Interpretation of Multibyte-Character Sequences](../../c-runtime-library/interpretation-of-multibyte-character-sequences.md)
-[`_mbsnbcpy`, `_mbsnbcpy_l`](mbsnbcpy-mbsnbcpy-l.md)
-[`strcat`, `wcscat`, `_mbscat`](strcat-wcscat-mbscat.md)
-[`strcmp`, `wcscmp`, `_mbscmp`](strcmp-wcscmp-mbscmp.md)
-[`strcpy`, `wcscpy`, `_mbscpy`](strcpy-wcscpy-mbscpy.md)
-[`strncat`, `_strncat_l`, `wcsncat`, `_wcsncat_l`, `_mbsncat`, `_mbsncat_l`](strncat-strncat-l-wcsncat-wcsncat-l-mbsncat-mbsncat-l.md)
-[`strncmp`, `wcsncmp`, `_mbsncmp`, `_mbsncmp_l`](strncmp-wcsncmp-mbsncmp-mbsncmp-l.md)
-[`_strnicmp`, `_wcsnicmp`, `_mbsnicmp`, `_strnicmp_l`, `_wcsnicmp_l`, `_mbsnicmp_l`](strnicmp-wcsnicmp-mbsnicmp-strnicmp-l-wcsnicmp-l-mbsnicmp-l.md)
-[`strrchr`, `wcsrchr`, `_mbsrchr`, `_mbsrchr_l`](strrchr-wcsrchr-mbsrchr-mbsrchr-l.md)
-[`_strset`, `_strset_l`, `_wcsset`, `_wcsset_l`, `_mbsset`, `_mbsset_l`](strset-strset-l-wcsset-wcsset-l-mbsset-mbsset-l.md)
-[`strspn`, `wcsspn`, `_mbsspn`, `_mbsspn_l`](strspn-wcsspn-mbsspn-mbsspn-l.md)
-[`strncpy_s`, `_strncpy_s_l`, `wcsncpy_s`, `_wcsncpy_s_l`, `_mbsncpy_s`, `_mbsncpy_s_l`](strncpy-s-strncpy-s-l-wcsncpy-s-wcsncpy-s-l-mbsncpy-s-mbsncpy-s-l.md)
-[`strcpy_s`, `wcscpy_s`, `_mbscpy_s`](strcpy-s-wcscpy-s-mbscpy-s.md)
+[String manipulation](../string-manipulation-crt.md)\ +[Locale](../locale.md)\ +[Interpretation of multibyte-character sequences](../interpretation-of-multibyte-character-sequences.md)\ +[`_mbsnbcpy`, `_mbsnbcpy_l`](mbsnbcpy-mbsnbcpy-l.md)\ +[`strcat`, `wcscat`, `_mbscat`](strcat-wcscat-mbscat.md)\ +[`strcmp`, `wcscmp`, `_mbscmp`](strcmp-wcscmp-mbscmp.md)\ +[`strcpy`, `wcscpy`, `_mbscpy`](strcpy-wcscpy-mbscpy.md)\ +[`strncat`, `_strncat_l`, `wcsncat`, `_wcsncat_l`, `_mbsncat`, `_mbsncat_l`](strncat-strncat-l-wcsncat-wcsncat-l-mbsncat-mbsncat-l.md)\ +[`strncmp`, `wcsncmp`, `_mbsncmp`, `_mbsncmp_l`](strncmp-wcsncmp-mbsncmp-mbsncmp-l.md)\ +[`_strnicmp`, `_wcsnicmp`, `_mbsnicmp`, `_strnicmp_l`, `_wcsnicmp_l`, `_mbsnicmp_l`](strnicmp-wcsnicmp-mbsnicmp-strnicmp-l-wcsnicmp-l-mbsnicmp-l.md)\ +[`strrchr`, `wcsrchr`, `_mbsrchr`, `_mbsrchr_l`](strrchr-wcsrchr-mbsrchr-mbsrchr-l.md)\ +[`_strset`, `_strset_l`, `_wcsset`, `_wcsset_l`, `_mbsset`, `_mbsset_l`](strset-strset-l-wcsset-wcsset-l-mbsset-mbsset-l.md)\ +[`strspn`, `wcsspn`, `_mbsspn`, `_mbsspn_l`](strspn-wcsspn-mbsspn-mbsspn-l.md)\ +[`strncpy_s`, `_strncpy_s_l`, `wcsncpy_s`, `_wcsncpy_s_l`, `_mbsncpy_s`, `_mbsncpy_s_l`](strncpy-s-strncpy-s-l-wcsncpy-s-wcsncpy-s-l-mbsncpy-s-mbsncpy-s-l.md)\ +[`strcpy_s`, `wcscpy_s`, `_mbscpy_s`](strcpy-s-wcscpy-s-mbscpy-s.md) diff --git a/docs/c-runtime-library/reference/strnextc-wcsnextc-mbsnextc-mbsnextc-l.md b/docs/c-runtime-library/reference/strnextc-wcsnextc-mbsnextc-mbsnextc-l.md index 5e45da3b179..8c52045bde8 100644 --- a/docs/c-runtime-library/reference/strnextc-wcsnextc-mbsnextc-mbsnextc-l.md +++ b/docs/c-runtime-library/reference/strnextc-wcsnextc-mbsnextc-mbsnextc-l.md @@ -37,35 +37,35 @@ unsigned int _mbsnextc_l( ### Parameters -*str*
+*`str`*\ Source string. -*locale*
+*`locale`*\ Locale to use. -## Return Value +## Return value -Each of these functions returns the integer value of the next character in *str*. +Each of these functions returns the integer value of the next character in *`str`*. ## Remarks -The **_mbsnextc** function returns the integer value of the next multibyte character in *str*, without advancing the string pointer. **_mbsnextc** recognizes multibyte-character sequences according to the [multibyte code page](../../c-runtime-library/code-pages.md) currently in use. +The **_mbsnextc** function returns the integer value of the next multibyte character in *`str`*, without advancing the string pointer. **_mbsnextc** recognizes multibyte-character sequences according to the [multibyte code page](../code-pages.md) currently in use. -If *str* is **NULL**, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, **errno** is set to **EINVAL** and the function returns 0. +If *`str`* is **NULL**, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, **errno** is set to **EINVAL** and the function returns 0. -**Security Note** This API incurs a potential threat brought about by a buffer overrun problem. Buffer overrun problems are a frequent method of system attack, resulting in an unwarranted elevation of privilege. For more information, see [Avoiding Buffer Overruns](/windows/win32/SecBP/avoiding-buffer-overruns). +**Security Note** This API incurs a potential threat brought about by a buffer overrun problem. Buffer overrun problems are a frequent method of system attack, resulting in an unwarranted elevation of privilege. For more information, see [Avoiding buffer overruns](/windows/win32/SecBP/avoiding-buffer-overruns). 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| |---------------------|--------------------------------------|--------------------|-----------------------| |**_tcsnextc**|**_strnextc**|**_mbsnextc**|**_wcsnextc**| -**_strnextc** and **_wcsnextc** are single-byte-character string and wide-character string versions of **_mbsnextc**. **_wcsnextc** returns the integer value of the next wide character in *str*; **_strnextc** returns the integer value of the next single-byte character in *str*. **_strnextc** and **_wcsnextc** are provided only for this mapping and should not be used otherwise. For more information, see [Using Generic-Text Mappings](../../c-runtime-library/using-generic-text-mappings.md) and [Generic-Text Mappings](../../c-runtime-library/generic-text-mappings.md). +**_strnextc** and **_wcsnextc** are single-byte-character string and wide-character string versions of **_mbsnextc**. **_wcsnextc** returns the integer value of the next wide character in *`str`*; **_strnextc** returns the integer value of the next single-byte character in *`str`*. **_strnextc** and **_wcsnextc** are provided only for this mapping and should not be used otherwise. For more information, see [Using generic-text mappings](../using-generic-text-mappings.md) and [Generic-text mappings](../generic-text-mappings.md). -**_mbsnextc_l** is identical except that it uses the locale parameter passed in instead. For more information, see [Locale](../../c-runtime-library/locale.md). +**_mbsnextc_l** is identical except that it uses the locale parameter passed in instead. For more information, see [Locale](../locale.md). ## Requirements @@ -76,13 +76,13 @@ By default, this function's global state is scoped to the application. To change |**_strnextc**|\| |**_wcsnextc**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[String Manipulation](../../c-runtime-library/string-manipulation-crt.md)
-[Locale](../../c-runtime-library/locale.md)
-[Interpretation of Multibyte-Character Sequences](../../c-runtime-library/interpretation-of-multibyte-character-sequences.md)
-[_strdec, _wcsdec, _mbsdec, _mbsdec_l](strdec-wcsdec-mbsdec-mbsdec-l.md)
-[_strinc, _wcsinc, _mbsinc, _mbsinc_l](strinc-wcsinc-mbsinc-mbsinc-l.md)
-[_strninc, _wcsninc, _mbsninc, _mbsninc_l](strninc-wcsninc-mbsninc-mbsninc-l.md)
+[String manipulation](../string-manipulation-crt.md)\ +[Locale](../locale.md)\ +[Interpretation of multibyte-character sequences](../interpretation-of-multibyte-character-sequences.md)\ +[`_strdec`, `_wcsdec`, `_mbsdec`, `_mbsdec_l`](strdec-wcsdec-mbsdec-mbsdec-l.md)\ +[`_strinc`, `_wcsinc`, `_mbsinc`, `_mbsinc_l`](strinc-wcsinc-mbsinc-mbsinc-l.md)\ +[`_strninc`, `_wcsninc`, `_mbsninc`, `_mbsninc_l`](strninc-wcsninc-mbsninc-mbsninc-l.md) diff --git a/docs/c-runtime-library/reference/strnicmp-wcsnicmp-mbsnicmp-strnicmp-l-wcsnicmp-l-mbsnicmp-l.md b/docs/c-runtime-library/reference/strnicmp-wcsnicmp-mbsnicmp-strnicmp-l-wcsnicmp-l-mbsnicmp-l.md index 2af081b4d56..962ada4b820 100644 --- a/docs/c-runtime-library/reference/strnicmp-wcsnicmp-mbsnicmp-strnicmp-l-wcsnicmp-l-mbsnicmp-l.md +++ b/docs/c-runtime-library/reference/strnicmp-wcsnicmp-mbsnicmp-strnicmp-l-wcsnicmp-l-mbsnicmp-l.md @@ -57,40 +57,40 @@ int _mbsnicmp_l( ### Parameters -*string1*, *string2*
+*`string1`*, *`string2`*\ Null-terminated strings to compare. -*count*
+*`count`*\ Number of characters to compare. -*locale*
+*`locale`*\ Locale to use. -## Return Value +## Return value Indicates the relationship between the substrings, as follows. |Return value|Description| |------------------|-----------------| -|< 0|*string1* substring is less than *string2* substring.| -|0|*string1* substring is identical to *string2* substring.| -|> 0|*string1* substring is greater than *string2* substring.| +|< 0|*`string1`* substring is less than *`string2`* substring.| +|0|*`string1`* substring is identical to *`string2`* substring.| +|> 0|*`string1`* substring is greater than *`string2`* substring.| On a parameter validation error, these functions return **_NLSCMPERROR**, which is defined in \ and \. ## Remarks -The **_strnicmp** function ordinally compares, at most, the first *count* characters of *string1* and *string2*. The comparison is performed without regard to case by converting each character to lowercase. **_strnicmp** is a case-insensitive version of **strncmp**. The comparison ends if a terminating null character is reached in either string before *count* characters are compared. If the strings are equal when a terminating null character is reached in either string before *count* characters are compared, the shorter string is lesser. +The **_strnicmp** function ordinally compares, at most, the first *`count`* characters of *`string1`* and *`string2`*. The comparison is performed without regard to case by converting each character to lowercase. **_strnicmp** is a case-insensitive version of **strncmp**. The comparison ends if a terminating null character is reached in either string before *`count`* characters are compared. If the strings are equal when a terminating null character is reached in either string before *`count`* characters are compared, the shorter string is lesser. The characters from 91 to 96 in the ASCII table ('[', '\\', ']', '^', '_', and '\`') evaluate as less than any alphabetic character. This ordering is identical to that of **stricmp**. -**_wcsnicmp** and **_mbsnicmp** are wide-character and multibyte-character versions of **_strnicmp**. The arguments of **_wcsnicmp** are wide-character strings; those of **_mbsnicmp** are multibyte-character strings. **_mbsnicmp** recognizes multibyte-character sequences according to the current multibyte code page and returns **_NLSCMPERROR** on an error. For more information, see [Code Pages](../../c-runtime-library/code-pages.md). These three functions behave identically otherwise. These functions are affected by the locale setting—the versions that don't have the **_l** suffix use the current locale for their locale-dependent behavior; the versions that do have the **_l** suffix instead use the *locale* that's passed in. For more information, see [Locale](../../c-runtime-library/locale.md). +**_wcsnicmp** and **_mbsnicmp** are wide-character and multibyte-character versions of **_strnicmp**. The arguments of **_wcsnicmp** are wide-character strings; those of **_mbsnicmp** are multibyte-character strings. **_mbsnicmp** recognizes multibyte-character sequences according to the current multibyte code page and returns **_NLSCMPERROR** on an error. For more information, see [Code pages](../code-pages.md). These three functions behave identically otherwise. These functions are affected by the locale setting—the versions that don't have the **_l** suffix use the current locale for their locale-dependent behavior; the versions that do have the **_l** suffix instead use the *`locale`* that's passed in. For more information, see [Locale](../locale.md). -All of these functions validate their parameters. If either *string1* or *string2* is a null pointer, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, these functions return **_NLSCMPERROR** and set **errno** to **EINVAL**. +All of these functions validate their parameters. If either *`string1`* or *`string2`* is a null pointer, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, these functions return **_NLSCMPERROR** and set **errno** to **EINVAL**. By default, this function's global state is scoped to the application. To change this behavior, see [Global state in the CRT](../global-state.md). -### Generic-Text Routine Mappings +### Generic-text routine mappings |TCHAR.H routine|_UNICODE & _MBCS not defined|_MBCS defined|_UNICODE defined| |---------------------|------------------------------------|--------------------|-----------------------| @@ -106,21 +106,21 @@ By default, this function's global state is scoped to the application. To change |**_wcsnicmp**, **_wcsnicmp_l**|\ or \| |**_mbsnicmp**, **_mbsnicmp_l**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example -See the example for [strncmp](strncmp-wcsncmp-mbsncmp-mbsncmp-l.md). +See the example for [`strncmp`](strncmp-wcsncmp-mbsncmp-mbsncmp-l.md). ## See also -[String Manipulation](../../c-runtime-library/string-manipulation-crt.md)
-[strcat, wcscat, _mbscat](strcat-wcscat-mbscat.md)
-[strcmp, wcscmp, _mbscmp](strcmp-wcscmp-mbscmp.md)
-[strcpy, wcscpy, _mbscpy](strcpy-wcscpy-mbscpy.md)
-[strncat, _strncat_l, wcsncat, _wcsncat_l, _mbsncat, _mbsncat_l](strncat-strncat-l-wcsncat-wcsncat-l-mbsncat-mbsncat-l.md)
-[strncmp, wcsncmp, _mbsncmp, _mbsncmp_l](strncmp-wcsncmp-mbsncmp-mbsncmp-l.md)
-[strncpy, _strncpy_l, wcsncpy, _wcsncpy_l, _mbsncpy, _mbsncpy_l](strncpy-strncpy-l-wcsncpy-wcsncpy-l-mbsncpy-mbsncpy-l.md)
-[strrchr, wcsrchr, _mbsrchr, _mbsrchr_l](strrchr-wcsrchr-mbsrchr-mbsrchr-l.md)
-[_strset, _strset_l, _wcsset, _wcsset_l, _mbsset, _mbsset_l](strset-strset-l-wcsset-wcsset-l-mbsset-mbsset-l.md)
-[strspn, wcsspn, _mbsspn, _mbsspn_l](strspn-wcsspn-mbsspn-mbsspn-l.md)
+[String manipulation](../string-manipulation-crt.md)\ +[`strcat`, `wcscat`, `_mbscat`](strcat-wcscat-mbscat.md)\ +[`strcmp`, `wcscmp`, `_mbscmp`](strcmp-wcscmp-mbscmp.md)\ +[`strcpy`, `wcscpy`, `_mbscpy`](strcpy-wcscpy-mbscpy.md)\ +[`strncat`, `_strncat_l`, `wcsncat`, `_wcsncat_l`, `_mbsncat`, `_mbsncat_l`](strncat-strncat-l-wcsncat-wcsncat-l-mbsncat-mbsncat-l.md)\ +[`strncmp`, `wcsncmp`, `_mbsncmp`, `_mbsncmp_l`](strncmp-wcsncmp-mbsncmp-mbsncmp-l.md)\ +[`strncpy`, `_strncpy_l`, `wcsncpy`, `_wcsncpy_l`, `_mbsncpy`, `_mbsncpy_l`](strncpy-strncpy-l-wcsncpy-wcsncpy-l-mbsncpy-mbsncpy-l.md)\ +[`strrchr`, `wcsrchr`, `_mbsrchr`, `_mbsrchr_l`](strrchr-wcsrchr-mbsrchr-mbsrchr-l.md)\ +[`_strset`, `_strset_l`, `_wcsset`, `_wcsset_l`, `_mbsset`, `_mbsset_l`](strset-strset-l-wcsset-wcsset-l-mbsset-mbsset-l.md)\ +[`strspn`, `wcsspn`, `_mbsspn`, `_mbsspn_l`](strspn-wcsspn-mbsspn-mbsspn-l.md) diff --git a/docs/c-runtime-library/reference/strnicmp-wcsnicmp.md b/docs/c-runtime-library/reference/strnicmp-wcsnicmp.md index a6cb2a2b073..3f56a6ca575 100644 --- a/docs/c-runtime-library/reference/strnicmp-wcsnicmp.md +++ b/docs/c-runtime-library/reference/strnicmp-wcsnicmp.md @@ -12,6 +12,6 @@ ms.assetid: 01324ee4-0bd9-43e9-b2a3-53d180270a64 --- # strnicmp, wcsnicmp -The Microsoft-specific function names `strnicmp` and `wcsnicmp` are deprecated aliases for the [_strnicmp and _wcsnicmp](strnicmp-wcsnicmp-mbsnicmp-strnicmp-l-wcsnicmp-l-mbsnicmp-l.md) functions. By default, they generate [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The names are deprecated because they don't follow the Standard C rules for implementation-specific names. However, the functions are still supported. +The Microsoft-specific function names `strnicmp` and `wcsnicmp` are deprecated aliases for the [`_strnicmp` and `_wcsnicmp`](strnicmp-wcsnicmp-mbsnicmp-strnicmp-l-wcsnicmp-l-mbsnicmp-l.md) functions. By default, they generate [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The names are deprecated because they don't follow the Standard C rules for implementation-specific names. However, the functions are still supported. -We recommend you use [_strnicmp and _wcsnicmp](strnicmp-wcsnicmp-mbsnicmp-strnicmp-l-wcsnicmp-l-mbsnicmp-l.md) instead. Or, you can continue to use these function names, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). +We recommend you use [`_strnicmp` and `_wcsnicmp`](strnicmp-wcsnicmp-mbsnicmp-strnicmp-l-wcsnicmp-l-mbsnicmp-l.md) instead. Or, you can continue to use these function names, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). diff --git a/docs/c-runtime-library/reference/strnicoll-wcsnicoll-mbsnicoll-strnicoll-l-wcsnicoll-l-mbsnicoll-l.md b/docs/c-runtime-library/reference/strnicoll-wcsnicoll-mbsnicoll-strnicoll-l-wcsnicoll-l-mbsnicoll-l.md index e0b3003fe39..fa7f3663f4b 100644 --- a/docs/c-runtime-library/reference/strnicoll-wcsnicoll-mbsnicoll-strnicoll-l-wcsnicoll-l-mbsnicoll-l.md +++ b/docs/c-runtime-library/reference/strnicoll-wcsnicoll-mbsnicoll-strnicoll-l-wcsnicoll-l-mbsnicoll-l.md @@ -57,41 +57,41 @@ int _mbsnicoll_l( ### Parameters -*string1*, *string2*
+*`string1`*, *`string2`*\ Null-terminated strings to compare -*count*
+*`count`*\ Number of characters to compare -*locale*
+*`locale`*\ The locale to use. -## Return Value +## Return value -Each of these functions returns a value indicating the relationship of the substrings of *string1* and *string2*, as follows. +Each of these functions returns a value indicating the relationship of the substrings of *`string1`* and *`string2`*, as follows. |Return value|Relationship of string1 to string2| |------------------|----------------------------------------| -|< 0|*string1* less than *string2*| -|0|*string1* identical to *string2*| -|> 0|*string1* greater than *string2*| +|< 0|*`string1`* less than *`string2`*| +|0|*`string1`* identical to *`string2`*| +|> 0|*`string1`* greater than *`string2`*| -Each of these functions returns **_NLSCMPERROR**. To use **_NLSCMPERROR**, include either STRING.H or MBSTRING.H. **_wcsnicoll** can fail if either *string1* or *string2* contains wide-character codes outside the domain of the collating sequence. When an error occurs, **_wcsnicoll** may set **errno** to **EINVAL**. To check for an error on a call to **_wcsnicoll**, set **errno** to 0 and then check **errno** after calling **_wcsnicoll**. +Each of these functions returns **_NLSCMPERROR**. To use **_NLSCMPERROR**, include either STRING.H or MBSTRING.H. **_wcsnicoll** can fail if either *`string1`* or *`string2`* contains wide-character codes outside the domain of the collating sequence. When an error occurs, **_wcsnicoll** may set **errno** to **EINVAL**. To check for an error on a call to **_wcsnicoll**, set **errno** to 0 and then check **errno** after calling **_wcsnicoll**. ## Remarks -Each of these functions performs a case-insensitive comparison of the first *count* characters in *string1* and *string2* according to the code page. These functions should be used only when there is a difference between the character set order and the lexicographic character order in the code page and this difference is of interest for the string comparison. The versions of these functions without the **_l** suffix use the current locale and code page. The versions with the **_l** suffix are identical except that they use the locale passed in instead. For more information, see [Locale](../../c-runtime-library/locale.md). +Each of these functions performs a case-insensitive comparison of the first *`count`* characters in *`string1`* and *`string2`* according to the code page. These functions should be used only when there is a difference between the character set order and the lexicographic character order in the code page and this difference is of interest for the string comparison. The versions of these functions without the **_l** suffix use the current locale and code page. The versions with the **_l** suffix are identical except that they use the locale passed in instead. For more information, see [Locale](../locale.md). -All of these functions validate their parameters. If either *string1* or *string2* is a null pointer, or if count is greater than **INT_MAX**, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md) . If execution is allowed to continue, these functions return **_NLSCMPERROR** and set **errno** to **EINVAL**. +All of these functions validate their parameters. If either *`string1`* or *`string2`* is a null pointer, or if count is greater than **INT_MAX**, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md) . If execution is allowed to continue, these functions return **_NLSCMPERROR** and set **errno** to **EINVAL**. By default, this function's global state is scoped to the application. To change this behavior, see [Global state in the CRT](../global-state.md). -### Generic-Text Routine Mappings +### Generic-text routine mappings |TCHAR.H routine|_UNICODE & _MBCS not defined|_MBCS defined|_UNICODE defined| |---------------------|------------------------------------|--------------------|-----------------------| |**_tcsncicoll**|**_strnicoll**|**_mbsnbicoll**|**_wcsnicoll**| -|**_tcsnicoll**|**_strnicoll**|[_mbsnbicoll](mbsnbcoll-mbsnbcoll-l-mbsnbicoll-mbsnbicoll-l.md)|**_wcsnicoll**| +|**_tcsnicoll**|**_strnicoll**|[`_mbsnbicoll`](mbsnbcoll-mbsnbcoll-l-mbsnbicoll-mbsnbicoll-l.md)|**_wcsnicoll**| |**_tcsnicoll_l**|**_strnicoll_l**|**_mbsnbicoll_l**|**_wcsnicoll_l**| ## Requirements @@ -102,18 +102,18 @@ By default, this function's global state is scoped to the application. To change |**_wcsnicoll**, **_wcsnicoll_l**|\ or \| |**_mbsnicoll**, **_mbsnicoll_l**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Locale](../../c-runtime-library/locale.md)
-[String Manipulation](../../c-runtime-library/string-manipulation-crt.md)
-[strcoll Functions](../../c-runtime-library/strcoll-functions.md)
-[localeconv](localeconv.md)
-[_mbsnbcoll, _mbsnbcoll_l, _mbsnbicoll, _mbsnbicoll_l](mbsnbcoll-mbsnbcoll-l-mbsnbicoll-mbsnbicoll-l.md)
-[setlocale, _wsetlocale](setlocale-wsetlocale.md)
-[strcmp, wcscmp, _mbscmp](strcmp-wcscmp-mbscmp.md)
-[_stricmp, _wcsicmp, _mbsicmp, _stricmp_l, _wcsicmp_l, _mbsicmp_l](stricmp-wcsicmp-mbsicmp-stricmp-l-wcsicmp-l-mbsicmp-l.md)
-[strncmp, wcsncmp, _mbsncmp, _mbsncmp_l](strncmp-wcsncmp-mbsncmp-mbsncmp-l.md)
-[_strnicmp, _wcsnicmp, _mbsnicmp, _strnicmp_l, _wcsnicmp_l, _mbsnicmp_l](strnicmp-wcsnicmp-mbsnicmp-strnicmp-l-wcsnicmp-l-mbsnicmp-l.md)
-[strxfrm, wcsxfrm, _strxfrm_l, _wcsxfrm_l](strxfrm-wcsxfrm-strxfrm-l-wcsxfrm-l.md)
+[Locale](../locale.md)\ +[String manipulation](../string-manipulation-crt.md)\ +[`strcoll` functions](../strcoll-functions.md)\ +[`localeconv`](localeconv.md)\ +[`_mbsnbcoll`, `_mbsnbcoll_l`, `_mbsnbicoll`, `_mbsnbicoll_l`](mbsnbcoll-mbsnbcoll-l-mbsnbicoll-mbsnbicoll-l.md)\ +[`setlocale`, `_wsetlocale`](setlocale-wsetlocale.md)\ +[`strcmp`, `wcscmp`, `_mbscmp`](strcmp-wcscmp-mbscmp.md)\ +[`_stricmp`, `_wcsicmp`, `_mbsicmp`, `_stricmp_l`, `_wcsicmp_l`, `_mbsicmp_l`](stricmp-wcsicmp-mbsicmp-stricmp-l-wcsicmp-l-mbsicmp-l.md)\ +[`strncmp`, `wcsncmp`, `_mbsncmp`, `_mbsncmp_l`](strncmp-wcsncmp-mbsncmp-mbsncmp-l.md)\ +[`_strnicmp`, `_wcsnicmp`, `_mbsnicmp`, `_strnicmp_l`, `_wcsnicmp_l`, `_mbsnicmp_l`](strnicmp-wcsnicmp-mbsnicmp-strnicmp-l-wcsnicmp-l-mbsnicmp-l.md)\ +[`strxfrm`, `wcsxfrm`, `_strxfrm_l`, `_wcsxfrm_l`](strxfrm-wcsxfrm-strxfrm-l-wcsxfrm-l.md) diff --git a/docs/c-runtime-library/reference/strninc-wcsninc-mbsninc-mbsninc-l.md b/docs/c-runtime-library/reference/strninc-wcsninc-mbsninc-mbsninc-l.md index d67b9efb5c4..7d01596b2ab 100644 --- a/docs/c-runtime-library/reference/strninc-wcsninc-mbsninc-mbsninc-l.md +++ b/docs/c-runtime-library/reference/strninc-wcsninc-mbsninc-mbsninc-l.md @@ -41,34 +41,34 @@ unsigned char *_mbsninc( ### Parameters -*str*
+*`str`*\ Source string. -*count*
+*`count`*\ Number of characters to increment a string pointer. -*locale*
+*`locale`*\ Locale to use. -## Return Value +## Return value -Each of these routines returns a pointer to *str* after *str* has been incremented by *count* characters or **NULL** if the supplied pointer is **NULL**. If *count* is greater than or equal to the number of characters in *str*, the result is undefined. +Each of these routines returns a pointer to *`str`* after *`str`* has been incremented by *`count`* characters or **NULL** if the supplied pointer is **NULL**. If *`count`* is greater than or equal to the number of characters in *`str`*, the result is undefined. ## Remarks -The **_mbsninc** function increments *str* by *count* multibyte characters. **_mbsninc** recognizes multibyte-character sequences according to the [multibyte code page](../../c-runtime-library/code-pages.md) currently in use. +The **_mbsninc** function increments *`str`* by *`count`* multibyte characters. **_mbsninc** recognizes multibyte-character sequences according to the [multibyte code page](../code-pages.md) currently in use. 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| |---------------------|--------------------------------------|--------------------|-----------------------| |**_tcsninc**|**_strninc**|**_mbsninc**|**_wcsninc**| -**_strninc** and **_wcsninc** are single-byte-character string and wide-character string versions of **_mbsninc**. **_wcsninc** and **_strninc** are provided only for this mapping and should not be used otherwise. For more information, see [Using Generic-Text Mappings](../../c-runtime-library/using-generic-text-mappings.md) and [Generic-Text Mappings](../../c-runtime-library/generic-text-mappings.md). +**_strninc** and **_wcsninc** are single-byte-character string and wide-character string versions of **_mbsninc**. **_wcsninc** and **_strninc** are provided only for this mapping and should not be used otherwise. For more information, see [Using generic-text mappings](../using-generic-text-mappings.md) and [Generic-text mappings](../generic-text-mappings.md). -**_mbsninc_l** is identical except that it uses the locale parameter passed in instead. For more information, see [Locale](../../c-runtime-library/locale.md). +**_mbsninc_l** is identical except that it uses the locale parameter passed in instead. For more information, see [Locale](../locale.md). ## Requirements @@ -79,13 +79,13 @@ By default, this function's global state is scoped to the application. To change |**_strninc**|\| |**_wcsninc**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[String Manipulation](../../c-runtime-library/string-manipulation-crt.md)
-[Locale](../../c-runtime-library/locale.md)
-[Interpretation of Multibyte-Character Sequences](../../c-runtime-library/interpretation-of-multibyte-character-sequences.md)
-[_strdec, _wcsdec, _mbsdec, _mbsdec_l](strdec-wcsdec-mbsdec-mbsdec-l.md)
-[_strinc, _wcsinc, _mbsinc, _mbsinc_l](strinc-wcsinc-mbsinc-mbsinc-l.md)
-[_strnextc, _wcsnextc, _mbsnextc, _mbsnextc_l](strnextc-wcsnextc-mbsnextc-mbsnextc-l.md)
+[String manipulation](../string-manipulation-crt.md)\ +[Locale](../locale.md)\ +[Interpretation of multibyte-character sequences](../interpretation-of-multibyte-character-sequences.md)\ +[`_strdec`, `_wcsdec`, `_mbsdec`, `_mbsdec_l`](strdec-wcsdec-mbsdec-mbsdec-l.md)\ +[`_strinc`, `_wcsinc`, `_mbsinc`, `_mbsinc_l`](strinc-wcsinc-mbsinc-mbsinc-l.md)\ +[`_strnextc`, `_wcsnextc`, `_mbsnextc`, `_mbsnextc_l`](strnextc-wcsnextc-mbsnextc-mbsnextc-l.md) diff --git a/docs/c-runtime-library/reference/strnlen-strnlen-s.md b/docs/c-runtime-library/reference/strnlen-strnlen-s.md index fdce12308e1..562904822b7 100644 --- a/docs/c-runtime-library/reference/strnlen-strnlen-s.md +++ b/docs/c-runtime-library/reference/strnlen-strnlen-s.md @@ -58,16 +58,16 @@ size_t _mbstrnlen_l( ### Parameters -*`str`*
+*`str`*\ Null-terminated string. -*`numberOfElements`*
+*`numberOfElements`*\ The size of the string buffer. -*`locale`*
+*`locale`*\ Locale to use. -## Return Value +## Return value These functions return the number of characters in the string, not including the terminating null character. If there is no null terminator within the first *`numberOfElements`* bytes of the string (or wide characters for **`wcsnlen`**), then *`numberOfElements`* is returned to indicate the error condition; null-terminated strings have lengths that are strictly less than *`numberOfElements`*. @@ -84,11 +84,11 @@ Each of these functions returns the number of characters in *`str`*, not includi **`strnlen_s`** and **`wcsnlen_s`** validate their parameters. If *`str`* is **`NULL`**, the functions return 0. -**`_mbstrnlen`** also validates its parameters. If *`str`* is **`NULL`**, or if *`numberOfElements`* is greater than **`INT_MAX`**, **`_mbstrnlen`** generates an invalid parameter exception, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, **`_mbstrnlen`** sets **`errno`** to **`EINVAL`** and returns -1. +**`_mbstrnlen`** also validates its parameters. If *`str`* is **`NULL`**, or if *`numberOfElements`* is greater than **`INT_MAX`**, **`_mbstrnlen`** generates an invalid parameter exception, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, **`_mbstrnlen`** sets **`errno`** to **`EINVAL`** and returns -1. By default, this function's global state is scoped to the application. To change this behavior, see [Global state in the CRT](../global-state.md). -### Generic-Text Routine Mappings +### Generic-text routine mappings |`TCHAR.H` routine|`_UNICODE` & `_MBCS` not defined|`_MBCS` defined|`_UNICODE` defined| |---------------------|------------------------------------|--------------------|-----------------------| @@ -98,7 +98,7 @@ By default, this function's global state is scoped to the application. To change **`_mbsnlen`** and **`_mbstrnlen`** return the number of multibyte characters in a multibyte-character string. **`_mbsnlen`** recognizes multibyte-character sequences according to the multibyte code page that's currently in use or according to the locale that's passed in; it does not test for multibyte-character validity. **`_mbstrnlen`** tests for multibyte-character validity and recognizes multibyte-character sequences. If the string that's passed to **`_mbstrnlen`** contains an invalid multibyte character, **`errno`** is set to **`EILSEQ`**. -The output value is affected by the setting of the **`LC_CTYPE`** category setting of the locale; see [`setlocale`, `_wsetlocale`](setlocale-wsetlocale.md) for more information. The versions of these functions are identical, except that the ones that don't have the **`_l`** suffix use the current locale for this locale-dependent behavior and the versions that have the **`_l`** suffix instead use the locale parameter that's passed in. For more information, see [Locale](../../c-runtime-library/locale.md). +The output value is affected by the setting of the **`LC_CTYPE`** category setting of the locale; see [`setlocale`, `_wsetlocale`](setlocale-wsetlocale.md) for more information. The versions of these functions are identical, except that the ones that don't have the **`_l`** suffix use the current locale for this locale-dependent behavior and the versions that have the **`_l`** suffix instead use the locale parameter that's passed in. For more information, see [Locale](../locale.md). ## Requirements @@ -109,7 +109,7 @@ The output value is affected by the setting of the **`LC_CTYPE`** category setti |**`_mbsnlen`**, **`_mbsnlen_l`**|``| |**`_mbstrnlen`**, **`_mbstrnlen_l`**|``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -151,14 +151,14 @@ Length: 100 ## See also -[String Manipulation](../../c-runtime-library/string-manipulation-crt.md)
-[Locale](../../c-runtime-library/locale.md)
-[Interpretation of Multibyte-Character Sequences](../../c-runtime-library/interpretation-of-multibyte-character-sequences.md)
-[`setlocale`, `_wsetlocale`](setlocale-wsetlocale.md)
-[`strncat`, `_strncat_l`, `wcsncat`, `_wcsncat_l`, `_mbsncat`, `_mbsncat_l`](strncat-strncat-l-wcsncat-wcsncat-l-mbsncat-mbsncat-l.md)
-[`strncmp`, `wcsncmp`, `_mbsncmp`, `_mbsncmp_l`](strncmp-wcsncmp-mbsncmp-mbsncmp-l.md)
-[`strcoll` Functions](../../c-runtime-library/strcoll-functions.md)
-[`strncpy_s`, `_strncpy_s_l`, `wcsncpy_s`, `_wcsncpy_s_l`, `_mbsncpy_s`, `_mbsncpy_s_l`](strncpy-s-strncpy-s-l-wcsncpy-s-wcsncpy-s-l-mbsncpy-s-mbsncpy-s-l.md)
-[`strrchr`, `wcsrchr`, `_mbsrchr`, `_mbsrchr_l`](strrchr-wcsrchr-mbsrchr-mbsrchr-l.md)
-[`_strset`, `_strset_l`, `_wcsset`, `_wcsset_l`, `_mbsset`, `_mbsset_l`](strset-strset-l-wcsset-wcsset-l-mbsset-mbsset-l.md)
-[`strspn`, `wcsspn`, `_mbsspn`, `_mbsspn_l`](strspn-wcsspn-mbsspn-mbsspn-l.md)
+[String manipulation](../string-manipulation-crt.md)\ +[Locale](../locale.md)\ +[Interpretation of multibyte-character sequences](../interpretation-of-multibyte-character-sequences.md)\ +[`setlocale`, `_wsetlocale`](setlocale-wsetlocale.md)\ +[`strncat`, `_strncat_l`, `wcsncat`, `_wcsncat_l`, `_mbsncat`, `_mbsncat_l`](strncat-strncat-l-wcsncat-wcsncat-l-mbsncat-mbsncat-l.md)\ +[`strncmp`, `wcsncmp`, `_mbsncmp`, `_mbsncmp_l`](strncmp-wcsncmp-mbsncmp-mbsncmp-l.md)\ +[`strcoll` functions](../strcoll-functions.md)\ +[`strncpy_s`, `_strncpy_s_l`, `wcsncpy_s`, `_wcsncpy_s_l`, `_mbsncpy_s`, `_mbsncpy_s_l`](strncpy-s-strncpy-s-l-wcsncpy-s-wcsncpy-s-l-mbsncpy-s-mbsncpy-s-l.md)\ +[`strrchr`, `wcsrchr`, `_mbsrchr`, `_mbsrchr_l`](strrchr-wcsrchr-mbsrchr-mbsrchr-l.md)\ +[`_strset`, `_strset_l`, `_wcsset`, `_wcsset_l`, `_mbsset`, `_mbsset_l`](strset-strset-l-wcsset-wcsset-l-mbsset-mbsset-l.md)\ +[`strspn`, `wcsspn`, `_mbsspn`, `_mbsspn_l`](strspn-wcsspn-mbsspn-mbsspn-l.md) diff --git a/docs/c-runtime-library/reference/strnset-s-strnset-s-l-wcsnset-s-wcsnset-s-l-mbsnset-s-mbsnset-s-l.md b/docs/c-runtime-library/reference/strnset-s-strnset-s-l-wcsnset-s-wcsnset-s-l-mbsnset-s-mbsnset-s-l.md index 0bf32d7a650..b75004d6e7b 100644 --- a/docs/c-runtime-library/reference/strnset-s-strnset-s-l-wcsnset-s-wcsnset-s-l-mbsnset-s-mbsnset-s-l.md +++ b/docs/c-runtime-library/reference/strnset-s-strnset-s-l-wcsnset-s-wcsnset-s-l-mbsnset-s-mbsnset-s-l.md @@ -12,7 +12,7 @@ ms.assetid: 9cf1b321-b5cb-4469-b285-4c07cfbd8813 --- # _strnset_s, _strnset_s_l, _wcsnset_s, _wcsnset_s_l, _mbsnset_s, _mbsnset_s_l -Initializes characters of a string to a given character. These versions of [_strnset, _strnset_l, _wcsnset, _wcsnset_l, _mbsnset, _mbsnset_l](strnset-strnset-l-wcsnset-wcsnset-l-mbsnset-mbsnset-l.md) have security enhancements, as described in [Security Features in the CRT](../../c-runtime-library/security-features-in-the-crt.md). +Initializes characters of a string to a given character. These versions of [`_strnset`, `_strnset_l`, `_wcsnset`, `_wcsnset_l`, `_mbsnset`, `_mbsnset_l`](strnset-strnset-l-wcsnset-wcsnset-l-mbsnset-mbsnset-l.md) have security enhancements, as described in [Security features in the CRT](../security-features-in-the-crt.md). > [!IMPORTANT] > **_mbsnset_s** and **_mbsnset_s_l** cannot be used in applications that execute in the Windows Runtime. For more information, see [CRT functions not supported in Universal Windows Platform apps](../../cppcx/crt-functions-not-supported-in-universal-windows-platform-apps.md). @@ -63,40 +63,40 @@ errno_t _mbsnset_s_l( ### Parameters -*str*
+*`str`*\ String to be altered. -*numberOfElements*
-The size of the *str* buffer. +*`numberOfElements`*\ +The size of the *`str`* buffer. -*c*
+*`c`*\ Character setting. -*count*
+*`count`*\ Number of characters to be set. -*locale*
+*`locale`*\ Locale to use. -## Return Value +## Return value Zero if successful, otherwise an error code. -These functions validate their arguments. If *str* is not a valid null-terminated string or the size argument is less than or equal to 0, then the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, these functions return an error code and set **errno** to that error code. The default error code is **EINVAL** if a more specific value does not apply. +These functions validate their arguments. If *`str`* is not a valid null-terminated string or the size argument is less than or equal to 0, then the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, these functions return an error code and set **errno** to that error code. The default error code is **EINVAL** if a more specific value does not apply. ## Remarks -These functions set, at most, the first *count* characters of *str* to *c*. If *count* is greater than the size of *str*, the size of *str* is used instead of *count*. An error occurs if *count* is greater than *numberOfElements* and both those parameters are greater than the size of *str*. +These functions set, at most, the first *`count`* characters of *`str`* to *`c`*. If *`count`* is greater than the size of *`str`*, the size of *`str`* is used instead of *`count`*. An error occurs if *`count`* is greater than *`numberOfElements`* and both those parameters are greater than the size of *`str`*. **_wcsnset_s** and **_mbsnset_s** are wide-character and multibyte-character versions of **_strnset_s**. The string argument of **_wcsnset_s** is a wide-character string; that of **_mbsnset_s** is amultibyte-character string. These three functions behave identically otherwise. -The output value is affected by the setting of the **LC_CTYPE** category setting of the locale; see [setlocale](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. For more information, see [Locale](../../c-runtime-library/locale.md). +The output value is affected by the setting of the **LC_CTYPE** category setting of the locale; see [`setlocale`](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. For more information, see [Locale](../locale.md). -The debug library versions of these functions first fill the buffer with 0xFE. To disable this behavior, use [_CrtSetDebugFillThreshold](crtsetdebugfillthreshold.md). +The debug library versions of these functions first fill the buffer with 0xFE. To disable this behavior, use [`_CrtSetDebugFillThreshold`](crtsetdebugfillthreshold.md). By default, this function's global state is scoped to the application. To change this behavior, see [Global state in the CRT](../global-state.md). -### Generic-Text Routine Mappings +### Generic-text routine mappings |TCHAR.H routine|_UNICODE & _MBCS not defined|_MBCS defined|_UNICODE defined| |---------------------|------------------------------------|--------------------|-----------------------| @@ -113,7 +113,7 @@ By default, this function's global state is scoped to the application. To change |**_wcsnset_s_l**|\| |**_mbsnset_s**, **_mbsnset_s_l**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -139,10 +139,10 @@ After: **** is a test ## See also -[String Manipulation](../../c-runtime-library/string-manipulation-crt.md)
-[Locale](../../c-runtime-library/locale.md)
-[Interpretation of Multibyte-Character Sequences](../../c-runtime-library/interpretation-of-multibyte-character-sequences.md)
-[strcat, wcscat, _mbscat](strcat-wcscat-mbscat.md)
-[strcmp, wcscmp, _mbscmp](strcmp-wcscmp-mbscmp.md)
-[strcpy, wcscpy, _mbscpy](strcpy-wcscpy-mbscpy.md)
-[_strset, _strset_l, _wcsset, _wcsset_l, _mbsset, _mbsset_l](strset-strset-l-wcsset-wcsset-l-mbsset-mbsset-l.md)
+[String manipulation](../string-manipulation-crt.md)\ +[Locale](../locale.md)\ +[Interpretation of multibyte-character sequences](../interpretation-of-multibyte-character-sequences.md)\ +[`strcat`, `wcscat`, `_mbscat`](strcat-wcscat-mbscat.md)\ +[`strcmp`, `wcscmp`, `_mbscmp`](strcmp-wcscmp-mbscmp.md)\ +[`strcpy`, `wcscpy`, `_mbscpy`](strcpy-wcscpy-mbscpy.md)\ +[`_strset`, `_strset_l`, `_wcsset`, `_wcsset_l`, `_mbsset`, `_mbsset_l`](strset-strset-l-wcsset-wcsset-l-mbsset-mbsset-l.md) diff --git a/docs/c-runtime-library/reference/strnset-strnset-l-wcsnset-wcsnset-l-mbsnset-mbsnset-l.md b/docs/c-runtime-library/reference/strnset-strnset-l-wcsnset-wcsnset-l-mbsnset-mbsnset-l.md index 6769be4f76b..f8ecdf75a29 100644 --- a/docs/c-runtime-library/reference/strnset-strnset-l-wcsnset-wcsnset-l-mbsnset-mbsnset-l.md +++ b/docs/c-runtime-library/reference/strnset-strnset-l-wcsnset-wcsnset-l-mbsnset-mbsnset-l.md @@ -12,7 +12,7 @@ ms.assetid: 3f306489-5763-48e5-b939-aefee7c94ef5 --- # _strnset, _strnset_l, _wcsnset, _wcsnset_l, _mbsnset, _mbsnset_l -Initializes characters of a string to a given character. More secure versions of these functions exist; see [_strnset_s, _strnset_s_l, _wcsnset_s, _wcsnset_s_l, _mbsnset_s, _mbsnset_s_l](strnset-s-strnset-s-l-wcsnset-s-wcsnset-s-l-mbsnset-s-mbsnset-s-l.md). +Initializes characters of a string to a given character. More secure versions of these functions exist; see [`_strnset_s`, `_strnset_s_l`, `_wcsnset_s`, `_wcsnset_s_l`, `_mbsnset_s`, `_mbsnset_s_l`](strnset-s-strnset-s-l-wcsnset-s-wcsnset-s-l-mbsnset-s-mbsnset-s-l.md). > [!IMPORTANT] > **_mbsnset** and **_mbsnset_l** cannot be used in applications that execute in the Windows Runtime. For more information, see [CRT functions not supported in Universal Windows Platform apps](../../cppcx/crt-functions-not-supported-in-universal-windows-platform-apps.md). @@ -57,35 +57,35 @@ unsigned char *_mbsnset_l( ### Parameters -*str*
+*`str`*\ String to be altered. -*c*
+*`c`*\ Character setting. -*count*
+*`count`*\ Number of characters to be set. -*locale*
+*`locale`*\ Locale to use. -## Return Value +## Return value Returns a pointer to the altered string. ## Remarks -The **_strnset** function sets, at most, the first *count* characters of *str* to *c* (converted to **`char`**). If *count* is greater than the length of *str*, the length of *str* is used instead of *count*. +The **_strnset** function sets, at most, the first *`count`* characters of *`str`* to *`c`* (converted to **`char`**). If *`count`* is greater than the length of *`str`*, the length of *`str`* is used instead of *`count`*. **_wcsnset** and **_mbsnset** are wide-character and multibyte-character versions of **_strnset**. The string arguments and return value of **_wcsnset** are wide-character strings; those of **_mbsnset** are multibyte-character strings. These three functions behave identically otherwise. -**_mbsnset** validates its parameters; if *str* is a null pointer, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md) . If execution is allowed to continue, **_mbsnset** returns **NULL** and sets **errno** to **EINVAL**. **_strnset** and **_wcsnset** do not validate their parameters. +**_mbsnset** validates its parameters; if *`str`* is a null pointer, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md) . If execution is allowed to continue, **_mbsnset** returns **NULL** and sets **errno** to **EINVAL**. **_strnset** and **_wcsnset** do not validate their parameters. -The output value is affected by the setting of the **LC_CTYPE** category setting of the locale; see [setlocale](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. For more information, see [Locale](../../c-runtime-library/locale.md). +The output value is affected by the setting of the **LC_CTYPE** category setting of the locale; see [`setlocale`](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. For more information, see [Locale](../locale.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| |---------------------|------------------------------------|--------------------|-----------------------| @@ -102,7 +102,7 @@ By default, this function's global state is scoped to the application. To change |**_wcsnset_l**|\| |**_mbsnset**, **_mbsnset_l**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -130,10 +130,10 @@ After: **** is a test ## See also -[String Manipulation](../../c-runtime-library/string-manipulation-crt.md)
-[Locale](../../c-runtime-library/locale.md)
-[Interpretation of Multibyte-Character Sequences](../../c-runtime-library/interpretation-of-multibyte-character-sequences.md)
-[strcat, wcscat, _mbscat](strcat-wcscat-mbscat.md)
-[strcmp, wcscmp, _mbscmp](strcmp-wcscmp-mbscmp.md)
-[strcpy, wcscpy, _mbscpy](strcpy-wcscpy-mbscpy.md)
-[_strset, _strset_l, _wcsset, _wcsset_l, _mbsset, _mbsset_l](strset-strset-l-wcsset-wcsset-l-mbsset-mbsset-l.md)
+[String manipulation](../string-manipulation-crt.md)\ +[Locale](../locale.md)\ +[Interpretation of multibyte-character sequences](../interpretation-of-multibyte-character-sequences.md)\ +[`strcat`, `wcscat`, `_mbscat`](strcat-wcscat-mbscat.md)\ +[`strcmp`, `wcscmp`, `_mbscmp`](strcmp-wcscmp-mbscmp.md)\ +[`strcpy`, `wcscpy`, `_mbscpy`](strcpy-wcscpy-mbscpy.md)\ +[`_strset`, `_strset_l`, `_wcsset`, `_wcsset_l`, `_mbsset`, `_mbsset_l`](strset-strset-l-wcsset-wcsset-l-mbsset-mbsset-l.md) diff --git a/docs/c-runtime-library/reference/strnset-wcsnset.md b/docs/c-runtime-library/reference/strnset-wcsnset.md index e7b45b81196..c7620d488f3 100644 --- a/docs/c-runtime-library/reference/strnset-wcsnset.md +++ b/docs/c-runtime-library/reference/strnset-wcsnset.md @@ -12,6 +12,6 @@ ms.assetid: e7868ac9-dc34-4606-bd3c-0fb2e7c51631 --- # strnset, wcsnset -The Microsoft-specific function names `strnset` and `wcsnset` are deprecated aliases for the [_strnset and _wcsnset](strnset-strnset-l-wcsnset-wcsnset-l-mbsnset-mbsnset-l.md) functions. By default, they generate [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The names are deprecated because they don't follow the Standard C rules for implementation-specific names. However, the functions are still supported. +The Microsoft-specific function names `strnset` and `wcsnset` are deprecated aliases for the [`_strnset` and `_wcsnset`](strnset-strnset-l-wcsnset-wcsnset-l-mbsnset-mbsnset-l.md) functions. By default, they generate [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The names are deprecated because they don't follow the Standard C rules for implementation-specific names. However, the functions are still supported. -We recommend you use [_strnset and _wcsnset](strnset-strnset-l-wcsnset-wcsnset-l-mbsnset-mbsnset-l.md) or the security-enhanced [_strnset_s and _wcsnset_s](strnset-s-strnset-s-l-wcsnset-s-wcsnset-s-l-mbsnset-s-mbsnset-s-l.md) functions instead. Or, you can continue to use these function names, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). +We recommend you use [`_strnset` and `_wcsnset`](strnset-strnset-l-wcsnset-wcsnset-l-mbsnset-mbsnset-l.md) or the security-enhanced [`_strnset_s` and `_wcsnset_s`](strnset-s-strnset-s-l-wcsnset-s-wcsnset-s-l-mbsnset-s-mbsnset-s-l.md) functions instead. Or, you can continue to use these function names, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). diff --git a/docs/c-runtime-library/reference/strpbrk-wcspbrk-mbspbrk-mbspbrk-l.md b/docs/c-runtime-library/reference/strpbrk-wcspbrk-mbspbrk-mbspbrk-l.md index 2d56c2ad7ea..1e0ff4aee2a 100644 --- a/docs/c-runtime-library/reference/strpbrk-wcspbrk-mbspbrk-mbspbrk-l.md +++ b/docs/c-runtime-library/reference/strpbrk-wcspbrk-mbspbrk-mbspbrk-l.md @@ -75,36 +75,36 @@ const unsigned char *_mbspbrk_l( ### Parameters -*str*
+*`str`*\ Null-terminated, searched string. -*strCharSet*
+*`strCharSet`*\ Null-terminated character set. -*locale*
+*`locale`*\ Locale to use. -## Return Value +## Return value -Returns a pointer to the first occurrence of any character from *strCharSet* in *str*, or a NULL pointer if the two string arguments have no characters in common. +Returns a pointer to the first occurrence of any character from *`strCharSet`* in *`str`*, or a NULL pointer if the two string arguments have no characters in common. ## Remarks -The `strpbrk` function returns a pointer to the first occurrence of a character in *str* that belongs to the set of characters in *strCharSet*. The search does not include the terminating null character. +The `strpbrk` function returns a pointer to the first occurrence of a character in *`str`* that belongs to the set of characters in *`strCharSet`*. The search does not include the terminating null character. `wcspbrk` and `_mbspbrk` are wide-character and multibyte-character versions of `strpbrk`. The arguments and return value of `wcspbrk` are wide-character strings; those of `_mbspbrk` are multibyte-character strings. -`_mbspbrk` validates its parameters. If *str* or *strCharSet* is NULL, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, `_mbspbrk` returns NULL and sets `errno` to EINVAL. `strpbrk` and `wcspbrk` do not validate their parameters. These three functions behave identically otherwise. +`_mbspbrk` validates its parameters. If *`str`* or *`strCharSet`* is NULL, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, `_mbspbrk` returns NULL and sets `errno` to EINVAL. `strpbrk` and `wcspbrk` do not validate their parameters. These three functions behave identically otherwise. -`_mbspbrk` is similar to `_mbscspn` except that `_mbspbrk` returns a pointer rather than a value of type [size_t](../../c-runtime-library/standard-types.md). +`_mbspbrk` is similar to `_mbscspn` except that `_mbspbrk` returns a pointer rather than a value of type [`size_t`](../standard-types.md). In C, these functions take a **`const`** pointer for the first argument. In C++, two overloads are available. The overload taking a pointer to **`const`** returns a pointer to **`const`**; the version that takes a pointer to non-**`const`** returns a pointer to non-**`const`**. The macro _CRT_CONST_CORRECT_OVERLOADS is defined if both the **`const`** and non-**`const`** versions of these functions are available. If you require the non-**`const`** behavior for both C++ overloads, define the symbol _CONST_RETURN. -The output value is affected by the setting of the LC_CTYPE category setting of the locale; for more information, see [setlocale](setlocale-wsetlocale.md). The versions of these functions without the **_l** suffix use the current locale for this locale-dependent behavior; the version with the **_l** suffix is identical except that it uses the locale parameter passed in instead. For more information, see [Locale](../../c-runtime-library/locale.md). +The output value is affected by the setting of the LC_CTYPE category setting of the locale; for more information, see [`setlocale`](setlocale-wsetlocale.md). The versions of these functions without the **_l** suffix use the current locale for this locale-dependent behavior; the version with the **_l** suffix is identical except that it uses the locale parameter passed in instead. For more information, see [Locale](../locale.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| |---------------------|------------------------------------|--------------------|-----------------------| @@ -119,7 +119,7 @@ By default, this function's global state is scoped to the application. To change |`wcspbrk`|\ or \| |`_mbspbrk`, `_mbspbrk_l`|\| -For more information about compatibility, see [Compatibility](../../c-runtime-library/compatibility.md). +For more information about compatibility, see [Compatibility](../compatibility.md). ## Example @@ -157,9 +157,9 @@ int main( void ) ## See also -[String Manipulation](../../c-runtime-library/string-manipulation-crt.md)
-[Locale](../../c-runtime-library/locale.md)
-[Interpretation of Multibyte-Character Sequences](../../c-runtime-library/interpretation-of-multibyte-character-sequences.md)
-[strcspn, wcscspn, _mbscspn, _mbscspn_l](strcspn-wcscspn-mbscspn-mbscspn-l.md)
-[strchr, wcschr, _mbschr, _mbschr_l](strchr-wcschr-mbschr-mbschr-l.md)
-[strrchr, wcsrchr, _mbsrchr, _mbsrchr_l](strrchr-wcsrchr-mbsrchr-mbsrchr-l.md)
+[String manipulation](../string-manipulation-crt.md)\ +[Locale](../locale.md)\ +[Interpretation of multibyte-character sequences](../interpretation-of-multibyte-character-sequences.md)\ +[`strcspn`, `wcscspn`, `_mbscspn`, `_mbscspn_l`](strcspn-wcscspn-mbscspn-mbscspn-l.md)\ +[`strchr`, `wcschr`, `_mbschr`, `_mbschr_l`](strchr-wcschr-mbschr-mbschr-l.md)\ +[`strrchr`, `wcsrchr`, `_mbsrchr`, `_mbsrchr_l`](strrchr-wcsrchr-mbsrchr-mbsrchr-l.md) diff --git a/docs/c-runtime-library/reference/strrchr-wcsrchr-mbsrchr-mbsrchr-l.md b/docs/c-runtime-library/reference/strrchr-wcsrchr-mbsrchr-mbsrchr-l.md index 12f9f90d382..e2e6ea136cf 100644 --- a/docs/c-runtime-library/reference/strrchr-wcsrchr-mbsrchr-mbsrchr-l.md +++ b/docs/c-runtime-library/reference/strrchr-wcsrchr-mbsrchr-mbsrchr-l.md @@ -83,7 +83,7 @@ Character to be located. *`locale`*\ Locale to use. -## Return Value +## Return value Returns a pointer to the last occurrence of *`c`* in *`str`*, or `NULL` if *`c`* is not found. @@ -95,13 +95,13 @@ The `strrchr` function finds the last occurrence of *`c`* (converted to **`char` In C, these functions take a **`const`** pointer for the first argument. In C++, two overloads are available. The overload taking a pointer to **`const`** returns a pointer to **`const`**; the version that takes a pointer to non-**`const`** returns a pointer to non-**`const`**. The macro `_CRT_CONST_CORRECT_OVERLOADS` is defined if both the **`const`** and non-**`const`** versions of these functions are available. If you require the non-**`const`** behavior for both C++ overloads, define the symbol `_CONST_RETURN`. -`_mbsrchr` validates its parameters. If *`str`* is `NULL`, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, `errno` is set to `EINVAL` and `_mbsrchr` returns 0. `strrchr` and `wcsrchr` do not validate their parameters. These three functions behave identically otherwise. +`_mbsrchr` validates its parameters. If *`str`* is `NULL`, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, `errno` is set to `EINVAL` and `_mbsrchr` returns 0. `strrchr` and `wcsrchr` do not validate their parameters. These three functions behave identically otherwise. -The output value is affected by the setting of the `LC_CTYPE` category setting of the locale; for more information, see [`setlocale`](setlocale-wsetlocale.md). The versions of these functions without the **`_l`** suffix use the current locale for this locale-dependent behavior; the versions with the **`_l`** suffix are identical except that they use the locale parameter passed in instead. For more information, see [Locale](../../c-runtime-library/locale.md). +The output value is affected by the setting of the `LC_CTYPE` category setting of the locale; for more information, see [`setlocale`](setlocale-wsetlocale.md). The versions of these functions without the **`_l`** suffix use the current locale for this locale-dependent behavior; the versions with the **`_l`** suffix are identical except that they use the locale parameter passed in instead. For more information, see [Locale](../locale.md). 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| |---------------------|------------------------------------|--------------------|-----------------------| @@ -116,7 +116,7 @@ By default, this function's global state is scoped to the application. To change |`wcsrchr`|`` or ``| |`_mbsrchr`, `_mbsrchr_l`|``| -For more information about compatibility, see [Compatibility](../../c-runtime-library/compatibility.md). +For more information about compatibility, see [Compatibility](../compatibility.md). ## Example @@ -124,9 +124,9 @@ For an example of using `strrchr`, see [`strchr`](strchr-wcschr-mbschr-mbschr-l. ## See also -[String Manipulation](../../c-runtime-library/string-manipulation-crt.md)\ -[Locale](../../c-runtime-library/locale.md)\ -[Interpretation of Multibyte-Character Sequences](../../c-runtime-library/interpretation-of-multibyte-character-sequences.md)\ +[String manipulation](../string-manipulation-crt.md)\ +[Locale](../locale.md)\ +[Interpretation of multibyte-character sequences](../interpretation-of-multibyte-character-sequences.md)\ [`strchr`, `wcschr`, `_mbschr`, `_mbschr_l`](strchr-wcschr-mbschr-mbschr-l.md)\ [`strcspn`, `wcscspn`, `_mbscspn`, `_mbscspn_l`](strcspn-wcscspn-mbscspn-mbscspn-l.md)\ [`_strnicmp`, `_wcsnicmp`, `_mbsnicmp`, `_strnicmp_l`, `_wcsnicmp_l`, `_mbsnicmp_l`](strnicmp-wcsnicmp-mbsnicmp-strnicmp-l-wcsnicmp-l-mbsnicmp-l.md)\ diff --git a/docs/c-runtime-library/reference/strrev-wcsrev-mbsrev-mbsrev-l.md b/docs/c-runtime-library/reference/strrev-wcsrev-mbsrev-mbsrev-l.md index 6b254cbab4b..df63c086506 100644 --- a/docs/c-runtime-library/reference/strrev-wcsrev-mbsrev-mbsrev-l.md +++ b/docs/c-runtime-library/reference/strrev-wcsrev-mbsrev-mbsrev-l.md @@ -37,30 +37,30 @@ unsigned char *_mbsrev_l( ### Parameters -*str*
+*`str`*\ Null-terminated string to reverse. -*locale*
+*`locale`*\ Locale to use. -## Return Value +## Return value Returns a pointer to the altered string. No return value is reserved to indicate an error. ## Remarks -The **_strrev** function reverses the order of the characters in *str*. The terminating null character remains in place. **_wcsrev** and **_mbsrev** are wide-character and multibyte-character versions of **_strrev**. The arguments and return value of **_wcsrev** are wide-character strings; those of **_mbsrev** are multibyte-character strings. For **_mbsrev**, the order of bytes in each multibyte character in *str* is not changed. These three functions behave identically otherwise. +The **_strrev** function reverses the order of the characters in *`str`*. The terminating null character remains in place. **_wcsrev** and **_mbsrev** are wide-character and multibyte-character versions of **_strrev**. The arguments and return value of **_wcsrev** are wide-character strings; those of **_mbsrev** are multibyte-character strings. For **_mbsrev**, the order of bytes in each multibyte character in *`str`* is not changed. These three functions behave identically otherwise. -**_mbsrev** validates its parameters. If either *string1* or *string2* is a null pointer, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, **_mbsrev** returns **NULL** and sets **errno** to **EINVAL**. **_strrev** and **_wcsrev** do not validate their parameters. +**_mbsrev** validates its parameters. If either *`string1`* or *`string2`* is a null pointer, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, **_mbsrev** returns **NULL** and sets **errno** to **EINVAL**. **_strrev** and **_wcsrev** do not validate their parameters. -The output value is affected by the setting of the **LC_CTYPE** category setting of the locale; see [setlocale, _wsetlocale](setlocale-wsetlocale.md) for more information. The versions of these functions are identical, except that the ones that don't have the **_l** suffix use the current locale and the ones that do have the **_l** suffix instead use the locale parameter that's passed in. For more information, see [Locale](../../c-runtime-library/locale.md). +The output value is affected by the setting of the **LC_CTYPE** category setting of the locale; see [`setlocale`, `_wsetlocale`](setlocale-wsetlocale.md) for more information. The versions of these functions are identical, except that the ones that don't have the **_l** suffix use the current locale and the ones that do have the **_l** suffix instead use the locale parameter that's passed in. For more information, see [Locale](../locale.md). > [!IMPORTANT] -> These functions might be vulnerable to buffer overrun threats. Buffer overruns can be used for system attacks because they can cause an unwarranted elevation of privilege. For more information, see [Avoiding Buffer Overruns](/windows/win32/SecBP/avoiding-buffer-overruns). +> These functions might be vulnerable to buffer overrun threats. Buffer overruns can be used for system attacks because they can cause an unwarranted elevation of privilege. For more information, see [Avoiding buffer overruns](/windows/win32/SecBP/avoiding-buffer-overruns). 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| |---------------------|------------------------------------|--------------------|-----------------------| @@ -75,7 +75,7 @@ By default, this function's global state is scoped to the application. To change |**_wcsrev**|\ or \| |**_mbsrev**, **_mbsrev_l**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -109,8 +109,8 @@ The string "Able was I ere I saw Elba" is a palindrome ## See also -[String Manipulation](../../c-runtime-library/string-manipulation-crt.md)
-[Locale](../../c-runtime-library/locale.md)
-[Interpretation of Multibyte-Character Sequences](../../c-runtime-library/interpretation-of-multibyte-character-sequences.md)
-[strcpy, wcscpy, _mbscpy](strcpy-wcscpy-mbscpy.md)
-[_strset, _strset_l, _wcsset, _wcsset_l, _mbsset, _mbsset_l](strset-strset-l-wcsset-wcsset-l-mbsset-mbsset-l.md)
+[String manipulation](../string-manipulation-crt.md)\ +[Locale](../locale.md)\ +[Interpretation of multibyte-character sequences](../interpretation-of-multibyte-character-sequences.md)\ +[`strcpy`, `wcscpy`, `_mbscpy`](strcpy-wcscpy-mbscpy.md)\ +[`_strset`, `_strset_l`, `_wcsset`, `_wcsset_l`, `_mbsset`, `_mbsset_l`](strset-strset-l-wcsset-wcsset-l-mbsset-mbsset-l.md) diff --git a/docs/c-runtime-library/reference/strrev-wcsrev.md b/docs/c-runtime-library/reference/strrev-wcsrev.md index 5a0d2c18125..5eea1f2b4ce 100644 --- a/docs/c-runtime-library/reference/strrev-wcsrev.md +++ b/docs/c-runtime-library/reference/strrev-wcsrev.md @@ -12,6 +12,6 @@ ms.assetid: 89e05854-a9ce-4fb7-993d-a9831cd7edf2 --- # strrev, wcsrev -The Microsoft-specific function names `strrev` and `wcsrev` are deprecated aliases for the [_strrev and _wcsrev](strrev-wcsrev-mbsrev-mbsrev-l.md) functions. By default, they generate [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The names are deprecated because they don't follow the Standard C rules for implementation-specific names. However, the functions are still supported. +The Microsoft-specific function names `strrev` and `wcsrev` are deprecated aliases for the [`_strrev` and `_wcsrev`](strrev-wcsrev-mbsrev-mbsrev-l.md) functions. By default, they generate [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The names are deprecated because they don't follow the Standard C rules for implementation-specific names. However, the functions are still supported. -We recommend you use [_strrev and _wcsrev](strrev-wcsrev-mbsrev-mbsrev-l.md) instead. Or, you can continue to use these function names, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). +We recommend you use [`_strrev` and `_wcsrev`](strrev-wcsrev-mbsrev-mbsrev-l.md) instead. Or, you can continue to use these function names, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). diff --git a/docs/c-runtime-library/reference/strset-s-strset-s-l-wcsset-s-wcsset-s-l-mbsset-s-mbsset-s-l.md b/docs/c-runtime-library/reference/strset-s-strset-s-l-wcsset-s-wcsset-s-l-mbsset-s-mbsset-s-l.md index 4b423eefe74..29a46777ea0 100644 --- a/docs/c-runtime-library/reference/strset-s-strset-s-l-wcsset-s-wcsset-s-l-mbsset-s-mbsset-s-l.md +++ b/docs/c-runtime-library/reference/strset-s-strset-s-l-wcsset-s-wcsset-s-l-mbsset-s-mbsset-s-l.md @@ -12,7 +12,7 @@ ms.assetid: dceb2909-6b41-4792-acb7-888e45bb8b35 --- # _strset_s, _strset_s_l, _wcsset_s, _wcsset_s_l, _mbsset_s, _mbsset_s_l -Sets characters of a string to a character. These versions of [_strset, _strset_l, _wcsset, _wcsset_l, _mbsset, _mbsset_l](strset-strset-l-wcsset-wcsset-l-mbsset-mbsset-l.md) have security enhancements, as described in [Security Features in the CRT](../../c-runtime-library/security-features-in-the-crt.md). +Sets characters of a string to a character. These versions of [`_strset`, `_strset_l`, `_wcsset`, `_wcsset_l`, `_mbsset`, `_mbsset_l`](strset-strset-l-wcsset-wcsset-l-mbsset-mbsset-l.md) have security enhancements, as described in [Security features in the CRT](../security-features-in-the-crt.md). > [!IMPORTANT] > **_mbsset_s** and **_mbsset_s_l** cannot be used in applications that execute in the Windows Runtime. For more information, see [CRT functions not supported in Universal Windows Platform apps](../../cppcx/crt-functions-not-supported-in-universal-windows-platform-apps.md). @@ -57,35 +57,35 @@ errno_t _mbsset_s_l( ### Parameters -*str*
+*`str`*\ Null-terminated string to be set. -*numberOfElements*
-The size of the *str* buffer. +*`numberOfElements`*\ +The size of the *`str`* buffer. -*c*
+*`c`*\ Character setting. -*locale*
+*`locale`*\ Locale to use. -## Return Value +## Return value Zero if successful, otherwise an error code. -These functions validate their arguments. If *str* is a null pointer, or the *numberOfElements* argument is less than or equal to 0, or the block passed in is not null-terminated, then the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, these functions return **EINVAL** and set **errno** to **EINVAL**. +These functions validate their arguments. If *`str`* is a null pointer, or the *`numberOfElements`* argument is less than or equal to 0, or the block passed in is not null-terminated, then the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, these functions return **EINVAL** and set **errno** to **EINVAL**. ## Remarks -The **_strset_s** function sets all the characters of *str* to *c* (converted to **`char`**), except the terminating null character. **_wcsset_s** and **_mbsset_s** are wide-character and multibyte-character versions of **_strset_s**. The data types of the arguments and return values vary accordingly. These functions behave identically otherwise. +The **_strset_s** function sets all the characters of *`str`* to *`c`* (converted to **`char`**), except the terminating null character. **_wcsset_s** and **_mbsset_s** are wide-character and multibyte-character versions of **_strset_s**. The data types of the arguments and return values vary accordingly. These functions behave identically otherwise. -The output value is affected by the setting of the **LC_CTYPE** category setting of the locale; see [setlocale](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. For more information, see [Locale](../../c-runtime-library/locale.md). +The output value is affected by the setting of the **LC_CTYPE** category setting of the locale; see [`setlocale`](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. For more information, see [Locale](../locale.md). -The debug library versions of these functions first fill the buffer with 0xFE. To disable this behavior, use [_CrtSetDebugFillThreshold](crtsetdebugfillthreshold.md). +The debug library versions of these functions first fill the buffer with 0xFE. To disable this behavior, use [`_CrtSetDebugFillThreshold`](crtsetdebugfillthreshold.md). By default, this function's global state is scoped to the application. To change this behavior, see [Global state in the CRT](../global-state.md). -### Generic-Text Routine Mappings +### Generic-text routine mappings |TCHAR.H routine|_UNICODE & _MBCS not defined|_MBCS defined|_UNICODE defined| |---------------------|------------------------------------|--------------------|-----------------------| @@ -102,7 +102,7 @@ By default, this function's global state is scoped to the application. To change |**_wcsset_s_l**|\| |**_mbsset_s**, **_mbsset_s_l**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -128,12 +128,12 @@ After: ******************************* ## See also -[String Manipulation](../../c-runtime-library/string-manipulation-crt.md)
-[Locale](../../c-runtime-library/locale.md)
-[Interpretation of Multibyte-Character Sequences](../../c-runtime-library/interpretation-of-multibyte-character-sequences.md)
-[_mbsnbset, _mbsnbset_l](mbsnbset-mbsnbset-l.md)
-[memset, wmemset](memset-wmemset.md)
-[strcat, wcscat, _mbscat](strcat-wcscat-mbscat.md)
-[strcmp, wcscmp, _mbscmp](strcmp-wcscmp-mbscmp.md)
-[strcpy, wcscpy, _mbscpy](strcpy-wcscpy-mbscpy.md)
-[_strnset, _strnset_l, _wcsnset, _wcsnset_l, _mbsnset, _mbsnset_l](strnset-strnset-l-wcsnset-wcsnset-l-mbsnset-mbsnset-l.md)
+[String manipulation](../string-manipulation-crt.md)\ +[Locale](../locale.md)\ +[Interpretation of multibyte-character sequences](../interpretation-of-multibyte-character-sequences.md)\ +[`_mbsnbset`, `_mbsnbset_l`](mbsnbset-mbsnbset-l.md)\ +[`memset`, `wmemset`](memset-wmemset.md)\ +[`strcat`, `wcscat`, `_mbscat`](strcat-wcscat-mbscat.md)\ +[`strcmp`, `wcscmp`, `_mbscmp`](strcmp-wcscmp-mbscmp.md)\ +[`strcpy`, `wcscpy`, `_mbscpy`](strcpy-wcscpy-mbscpy.md)\ +[`_strnset`, `_strnset_l`, `_wcsnset`, `_wcsnset_l`, `_mbsnset`, `_mbsnset_l`](strnset-strnset-l-wcsnset-wcsnset-l-mbsnset-mbsnset-l.md) diff --git a/docs/c-runtime-library/reference/strset-strset-l-wcsset-wcsset-l-mbsset-mbsset-l.md b/docs/c-runtime-library/reference/strset-strset-l-wcsset-wcsset-l-mbsset-mbsset-l.md index 4b895aa711d..70cccb431d3 100644 --- a/docs/c-runtime-library/reference/strset-strset-l-wcsset-wcsset-l-mbsset-mbsset-l.md +++ b/docs/c-runtime-library/reference/strset-strset-l-wcsset-wcsset-l-mbsset-mbsset-l.md @@ -12,7 +12,7 @@ ms.assetid: c42ded42-2ed9-4f06-a0a9-247ba305473a --- # _strset, _strset_l, _wcsset, _wcsset_l, _mbsset, _mbsset_l -Sets characters of a string to a character. More secure versions of these functions are available; see [_strset_s, _strset_s_l, _wcsset_s, _wcsset_s_l, _mbsset_s, _mbsset_s_l](strset-s-strset-s-l-wcsset-s-wcsset-s-l-mbsset-s-mbsset-s-l.md). +Sets characters of a string to a character. More secure versions of these functions are available; see [`_strset_s`, `_strset_s_l`, `_wcsset_s`, `_wcsset_s_l`, `_mbsset_s`, `_mbsset_s_l`](strset-s-strset-s-l-wcsset-s-wcsset-s-l-mbsset-s-mbsset-s-l.md). > [!IMPORTANT] > **_mbsset** and **_mbsset_l** cannot be used in applications that execute in the Windows Runtime. For more information, see [CRT functions not supported in Universal Windows Platform apps](../../cppcx/crt-functions-not-supported-in-universal-windows-platform-apps.md). @@ -51,33 +51,33 @@ unsigned char *_mbsset_l( ### Parameters -*str*
+*`str`*\ Null-terminated string to be set. -*c*
+*`c`*\ Character setting. -*locale*
+*`locale`*\ Locale to use. -## Return Value +## Return value Returns a pointer to the altered string. ## Remarks -The **_strset** function sets all characters (except the terminating null character) of *str* to *c*, converted to **`char`**. **_wcsset** and **_mbsset_l** are wide-character and multibyte-character versions of **_strset**, and the data types of the arguments and return values vary accordingly. These functions behave identically otherwise. +The **_strset** function sets all characters (except the terminating null character) of *`str`* to *`c`*, converted to **`char`**. **_wcsset** and **_mbsset_l** are wide-character and multibyte-character versions of **_strset**, and the data types of the arguments and return values vary accordingly. These functions behave identically otherwise. -**_mbsset** validates its parameters. If *str* is a null pointer, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, **_mbsset** returns **NULL** and sets **errno** to **EINVAL**. **_strset** and **_wcsset** do not validate their parameters. +**_mbsset** validates its parameters. If *`str`* is a null pointer, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, **_mbsset** returns **NULL** and sets **errno** to **EINVAL**. **_strset** and **_wcsset** do not validate their parameters. -The output value is affected by the setting of the **LC_CTYPE** category setting of the locale; see [setlocale, _wsetlocale](setlocale-wsetlocale.md) for more information. The versions of these functions are identical, except that the ones that don't have the **_l** suffix use the current locale and the ones that do have the **_l** suffix instead use the locale parameter that's passed in. For more information, see [Locale](../../c-runtime-library/locale.md). +The output value is affected by the setting of the **LC_CTYPE** category setting of the locale; see [`setlocale`, `_wsetlocale`](setlocale-wsetlocale.md) for more information. The versions of these functions are identical, except that the ones that don't have the **_l** suffix use the current locale and the ones that do have the **_l** suffix instead use the locale parameter that's passed in. For more information, see [Locale](../locale.md). > [!IMPORTANT] -> These functions might be vulnerable to buffer overrun threats. Buffer overruns can be used for system attacks because they can cause an unwarranted elevation of privilege. For more information, see [Avoiding Buffer Overruns](/windows/win32/SecBP/avoiding-buffer-overruns). +> These functions might be vulnerable to buffer overrun threats. Buffer overruns can be used for system attacks because they can cause an unwarranted elevation of privilege. For more information, see [Avoiding buffer overruns](/windows/win32/SecBP/avoiding-buffer-overruns). 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| |---------------------|------------------------------------|--------------------|-----------------------| @@ -94,7 +94,7 @@ By default, this function's global state is scoped to the application. To change |**_wcsset_l**|\| |**_mbsset**, **_mbsset_l**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -122,12 +122,12 @@ After: ******************************* ## See also -[String Manipulation](../../c-runtime-library/string-manipulation-crt.md)
-[Locale](../../c-runtime-library/locale.md)
-[Interpretation of Multibyte-Character Sequences](../../c-runtime-library/interpretation-of-multibyte-character-sequences.md)
-[_mbsnbset, _mbsnbset_l](mbsnbset-mbsnbset-l.md)
-[memset, wmemset](memset-wmemset.md)
-[strcat, wcscat, _mbscat](strcat-wcscat-mbscat.md)
-[strcmp, wcscmp, _mbscmp](strcmp-wcscmp-mbscmp.md)
-[strcpy, wcscpy, _mbscpy](strcpy-wcscpy-mbscpy.md)
-[_strnset, _strnset_l, _wcsnset, _wcsnset_l, _mbsnset, _mbsnset_l](strnset-strnset-l-wcsnset-wcsnset-l-mbsnset-mbsnset-l.md)
+[String manipulation](../string-manipulation-crt.md)\ +[Locale](../locale.md)\ +[Interpretation of multibyte-character sequences](../interpretation-of-multibyte-character-sequences.md)\ +[`_mbsnbset`, `_mbsnbset_l`](mbsnbset-mbsnbset-l.md)\ +[`memset`, `wmemset`](memset-wmemset.md)\ +[`strcat`, `wcscat`, `_mbscat`](strcat-wcscat-mbscat.md)\ +[`strcmp`, `wcscmp`, `_mbscmp`](strcmp-wcscmp-mbscmp.md)\ +[`strcpy`, `wcscpy`, `_mbscpy`](strcpy-wcscpy-mbscpy.md)\ +[`_strnset`, `_strnset_l`, `_wcsnset`, `_wcsnset_l`, `_mbsnset`, `_mbsnset_l`](strnset-strnset-l-wcsnset-wcsnset-l-mbsnset-mbsnset-l.md) diff --git a/docs/c-runtime-library/reference/strset-wcsset.md b/docs/c-runtime-library/reference/strset-wcsset.md index ce34622ab8d..af2389f1937 100644 --- a/docs/c-runtime-library/reference/strset-wcsset.md +++ b/docs/c-runtime-library/reference/strset-wcsset.md @@ -12,4 +12,4 @@ ms.assetid: 20e132d8-4b6c-4341-b1eb-8e19b46047e2 --- # strset, wcsset -These functions are deprecated. Use the ISO C++ conformant [_strset, _strset_l, _wcsset, _wcsset_l, _mbsset, _mbsset_l](strset-strset-l-wcsset-wcsset-l-mbsset-mbsset-l.md) or security-enhanced [_strset_s, _strset_s_l, _wcsset_s, _wcsset_s_l, _mbsset_s, _mbsset_s_l](strset-s-strset-s-l-wcsset-s-wcsset-s-l-mbsset-s-mbsset-s-l.md) instead. +These functions are deprecated. Use the ISO C++ conformant [`_strset`, `_strset_l`, `_wcsset`, `_wcsset_l`, `_mbsset`, `_mbsset_l`](strset-strset-l-wcsset-wcsset-l-mbsset-mbsset-l.md) or security-enhanced [`_strset_s`, `_strset_s_l`, `_wcsset_s`, `_wcsset_s_l`, `_mbsset_s`, `_mbsset_s_l`](strset-s-strset-s-l-wcsset-s-wcsset-s-l-mbsset-s-mbsset-s-l.md) instead. diff --git a/docs/c-runtime-library/reference/strspn-wcsspn-mbsspn-mbsspn-l.md b/docs/c-runtime-library/reference/strspn-wcsspn-mbsspn-mbsspn-l.md index c44a5f37f8c..5b08dccb86e 100644 --- a/docs/c-runtime-library/reference/strspn-wcsspn-mbsspn-mbsspn-l.md +++ b/docs/c-runtime-library/reference/strspn-wcsspn-mbsspn-mbsspn-l.md @@ -41,30 +41,30 @@ size_t _mbsspn_l( ### Parameters -*str*
+*`str`*\ Null-terminated string to search. -*strCharSet*
+*`strCharSet`*\ Null-terminated character set. -*locale*
+*`locale`*\ Locale to use. -## Return Value +## Return value -Returns an integer value specifying the length of the substring in *str* that consists entirely of characters in *strCharSet*. If *str* begins with a character not in *strCharSet*, the function returns 0. +Returns an integer value specifying the length of the substring in *`str`* that consists entirely of characters in *`strCharSet`*. If *`str`* begins with a character not in *`strCharSet`*, the function returns 0. ## Remarks -The **strspn** function returns the index of the first character in *str* that does not belong to the set of characters in *strCharSet*. The search does not include terminating null characters. +The **strspn** function returns the index of the first character in *`str`* that does not belong to the set of characters in *`strCharSet`*. The search does not include terminating null characters. -**wcsspn** and **_mbsspn** are wide-character and multibyte-character versions of **strspn**. The arguments of **wcsspn** are wide-character strings; those of **_mbsspn** are multibyte-character strings. **_mbsspn** validates its parameters. If *str* or *strCharSet* is **NULL**, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md) . If execution is allowed to continue, **_mbspn** sets **errno** to **EINVAL** and returns 0. **strspn** and **wcsspn** do not validate their parameters. These three functions behave identically otherwise. +**wcsspn** and **_mbsspn** are wide-character and multibyte-character versions of **strspn**. The arguments of **wcsspn** are wide-character strings; those of **_mbsspn** are multibyte-character strings. **_mbsspn** validates its parameters. If *`str`* or *`strCharSet`* is **NULL**, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md) . If execution is allowed to continue, **_mbspn** sets **errno** to **EINVAL** and returns 0. **strspn** and **wcsspn** do not validate their parameters. These three functions behave identically otherwise. -The output value is affected by the setting of the **LC_CTYPE** category setting of the locale; see [setlocale](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. For more information, see [Locale](../../c-runtime-library/locale.md). +The output value is affected by the setting of the **LC_CTYPE** category setting of the locale; see [`setlocale`](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. For more information, see [Locale](../locale.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| |---------------------|------------------------------------|--------------------|-----------------------| @@ -79,7 +79,7 @@ By default, this function's global state is scoped to the application. To change |**wcsspn**|\ or \| |**_mbsspn**, **_mbsspn_l**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -110,13 +110,13 @@ The portion of 'cabbage' containing only a, b, or c is 5 bytes long ## See also -[String Manipulation](../../c-runtime-library/string-manipulation-crt.md)
-[Locale](../../c-runtime-library/locale.md)
-[Interpretation of Multibyte-Character Sequences](../../c-runtime-library/interpretation-of-multibyte-character-sequences.md)
-[_strspnp, _wcsspnp, _mbsspnp, _mbsspnp_l](strspnp-wcsspnp-mbsspnp-mbsspnp-l.md)
-[strcspn, wcscspn, _mbscspn, _mbscspn_l](strcspn-wcscspn-mbscspn-mbscspn-l.md)
-[strncat, _strncat_l, wcsncat, _wcsncat_l, _mbsncat, _mbsncat_l](strncat-strncat-l-wcsncat-wcsncat-l-mbsncat-mbsncat-l.md)
-[strncmp, wcsncmp, _mbsncmp, _mbsncmp_l](strncmp-wcsncmp-mbsncmp-mbsncmp-l.md)
-[strncpy, _strncpy_l, wcsncpy, _wcsncpy_l, _mbsncpy, _mbsncpy_l](strncpy-strncpy-l-wcsncpy-wcsncpy-l-mbsncpy-mbsncpy-l.md)
-[_strnicmp, _wcsnicmp, _mbsnicmp, _strnicmp_l, _wcsnicmp_l, _mbsnicmp_l](strnicmp-wcsnicmp-mbsnicmp-strnicmp-l-wcsnicmp-l-mbsnicmp-l.md)
-[strrchr, wcsrchr, _mbsrchr, _mbsrchr_l](strrchr-wcsrchr-mbsrchr-mbsrchr-l.md)
+[String manipulation](../string-manipulation-crt.md)\ +[Locale](../locale.md)\ +[Interpretation of multibyte-character sequences](../interpretation-of-multibyte-character-sequences.md)\ +[`_strspnp`, `_wcsspnp`, `_mbsspnp`, `_mbsspnp_l`](strspnp-wcsspnp-mbsspnp-mbsspnp-l.md)\ +[`strcspn`, `wcscspn`, `_mbscspn`, `_mbscspn_l`](strcspn-wcscspn-mbscspn-mbscspn-l.md)\ +[`strncat`, `_strncat_l`, `wcsncat`, `_wcsncat_l`, `_mbsncat`, `_mbsncat_l`](strncat-strncat-l-wcsncat-wcsncat-l-mbsncat-mbsncat-l.md)\ +[`strncmp`, `wcsncmp`, `_mbsncmp`, `_mbsncmp_l`](strncmp-wcsncmp-mbsncmp-mbsncmp-l.md)\ +[`strncpy`, `_strncpy_l`, `wcsncpy`, `_wcsncpy_l`, `_mbsncpy`, `_mbsncpy_l`](strncpy-strncpy-l-wcsncpy-wcsncpy-l-mbsncpy-mbsncpy-l.md)\ +[`_strnicmp`, `_wcsnicmp`, `_mbsnicmp`, `_strnicmp_l`, `_wcsnicmp_l`, `_mbsnicmp_l`](strnicmp-wcsnicmp-mbsnicmp-strnicmp-l-wcsnicmp-l-mbsnicmp-l.md)\ +[`strrchr`, `wcsrchr`, `_mbsrchr`, `_mbsrchr_l`](strrchr-wcsrchr-mbsrchr-mbsrchr-l.md) diff --git a/docs/c-runtime-library/reference/strspnp-wcsspnp-mbsspnp-mbsspnp-l.md b/docs/c-runtime-library/reference/strspnp-wcsspnp-mbsspnp-mbsspnp-l.md index 8f99b726c2c..b70725e3f4d 100644 --- a/docs/c-runtime-library/reference/strspnp-wcsspnp-mbsspnp-mbsspnp-l.md +++ b/docs/c-runtime-library/reference/strspnp-wcsspnp-mbsspnp-mbsspnp-l.md @@ -41,36 +41,36 @@ unsigned char *_mbsspnp_l( ### Parameters -*str*
+*`str`*\ Null-terminated string to search. -*charset*
+*`charset`*\ Null-terminated character set. -*locale*
+*`locale`*\ Locale to use. -## Return Value +## Return value -**_strspnp**, **_wcsspnp**, and **_mbsspnp** return a pointer to the first character in *str* that does not belong to the set of characters in *charset*. Each of these functions returns **NULL** if *str* consists entirely of characters from *charset*. For each of these routines, no return value is reserved to indicate an error. +**_strspnp**, **_wcsspnp**, and **_mbsspnp** return a pointer to the first character in *`str`* that does not belong to the set of characters in *`charset`*. Each of these functions returns **NULL** if *`str`* consists entirely of characters from *`charset`*. For each of these routines, no return value is reserved to indicate an error. ## Remarks -The **_mbsspnp** function returns a pointer to the multibyte character that is the first character in *str* that does not belong to the set of characters in *charset*. **_mbsspnp** recognizes multibyte-character sequences according to the [multibyte code page](../../c-runtime-library/code-pages.md) currently in use. The search does not include terminating null characters. +The **_mbsspnp** function returns a pointer to the multibyte character that is the first character in *`str`* that does not belong to the set of characters in *`charset`*. **_mbsspnp** recognizes multibyte-character sequences according to the [multibyte code page](../code-pages.md) currently in use. The search does not include terminating null characters. -If either *str* or *charset* is a null pointer, this function invokes the invalid parameter handler, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, the function returns **NULL** and sets **errno** to **EINVAL**. +If either *`str`* or *`charset`* is a null pointer, this function invokes the invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, the function returns **NULL** and sets **errno** to **EINVAL**. By default, this function's global state is scoped to the application. To change this behavior, see [Global state in the CRT](../global-state.md). -### Generic-Text Routine Mappings +### Generic-text routine mappings |Tchar.h routine|_UNICODE and _MBCS not defined|_MBCS defined|_UNICODE defined| |---------------------|--------------------------------------|--------------------|-----------------------| |**_tcsspnp**|**_strspnp**|**_mbsspnp**|**_wcsspnp**| -**_strspnp** and **_wcsspnp** are single-byte character and wide-character versions of **_mbsspnp**. **_strspnp** and **_wcsspnp** behave identically to **_mbsspnp** otherwise; they are provided only for this mapping and should not be used for any other reason. For more information, see [Using Generic-Text Mappings](../../c-runtime-library/using-generic-text-mappings.md) and [Generic-Text Mappings](../../c-runtime-library/generic-text-mappings.md). +**_strspnp** and **_wcsspnp** are single-byte character and wide-character versions of **_mbsspnp**. **_strspnp** and **_wcsspnp** behave identically to **_mbsspnp** otherwise; they are provided only for this mapping and should not be used for any other reason. For more information, see [Using generic-text mappings](../using-generic-text-mappings.md) and [Generic-text mappings](../generic-text-mappings.md). -**_mbsspnp_l** is identical except that it uses the locale parameter passed in instead. For more information, see [Locale](../../c-runtime-library/locale.md). +**_mbsspnp_l** is identical except that it uses the locale parameter passed in instead. For more information, see [Locale](../locale.md). ## Requirements @@ -80,7 +80,7 @@ By default, this function's global state is scoped to the application. To change |**_strspnp**|\| |**_wcsspnp**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -106,12 +106,12 @@ abbage ## See also -[String Manipulation](../../c-runtime-library/string-manipulation-crt.md)
-[Locale](../../c-runtime-library/locale.md)
-[Interpretation of Multibyte-Character Sequences](../../c-runtime-library/interpretation-of-multibyte-character-sequences.md)
-[strspn, wcsspn, _mbsspn, _mbsspn_l](strspn-wcsspn-mbsspn-mbsspn-l.md)
-[strncat_s, _strncat_s_l, wcsncat_s, _wcsncat_s_l, _mbsncat_s, _mbsncat_s_l](strncat-s-strncat-s-l-wcsncat-s-wcsncat-s-l-mbsncat-s-mbsncat-s-l.md)
-[strncmp, wcsncmp, _mbsncmp, _mbsncmp_l](strncmp-wcsncmp-mbsncmp-mbsncmp-l.md)
-[strncpy_s, _strncpy_s_l, wcsncpy_s, _wcsncpy_s_l, _mbsncpy_s, _mbsncpy_s_l](strncpy-s-strncpy-s-l-wcsncpy-s-wcsncpy-s-l-mbsncpy-s-mbsncpy-s-l.md)
-[_strnicmp, _wcsnicmp, _mbsnicmp, _strnicmp_l, _wcsnicmp_l, _mbsnicmp_l](strnicmp-wcsnicmp-mbsnicmp-strnicmp-l-wcsnicmp-l-mbsnicmp-l.md)
-[strrchr, wcsrchr, _mbsrchr, _mbsrchr_l](strrchr-wcsrchr-mbsrchr-mbsrchr-l.md)
+[String manipulation](../string-manipulation-crt.md)\ +[Locale](../locale.md)\ +[Interpretation of multibyte-character sequences](../interpretation-of-multibyte-character-sequences.md)\ +[`strspn`, `wcsspn`, `_mbsspn`, `_mbsspn_l`](strspn-wcsspn-mbsspn-mbsspn-l.md)\ +[`strncat_s`, `_strncat_s_l`, `wcsncat_s`, `_wcsncat_s_l`, `_mbsncat_s`, `_mbsncat_s_l`](strncat-s-strncat-s-l-wcsncat-s-wcsncat-s-l-mbsncat-s-mbsncat-s-l.md)\ +[`strncmp`, `wcsncmp`, `_mbsncmp`, `_mbsncmp_l`](strncmp-wcsncmp-mbsncmp-mbsncmp-l.md)\ +[`strncpy_s`, `_strncpy_s_l`, `wcsncpy_s`, `_wcsncpy_s_l`, `_mbsncpy_s`, `_mbsncpy_s_l`](strncpy-s-strncpy-s-l-wcsncpy-s-wcsncpy-s-l-mbsncpy-s-mbsncpy-s-l.md)\ +[`_strnicmp`, `_wcsnicmp`, `_mbsnicmp`, `_strnicmp_l`, `_wcsnicmp_l`, `_mbsnicmp_l`](strnicmp-wcsnicmp-mbsnicmp-strnicmp-l-wcsnicmp-l-mbsnicmp-l.md)\ +[`strrchr`, `wcsrchr`, `_mbsrchr`, `_mbsrchr_l`](strrchr-wcsrchr-mbsrchr-mbsrchr-l.md) diff --git a/docs/c-runtime-library/reference/strstr-wcsstr-mbsstr-mbsstr-l.md b/docs/c-runtime-library/reference/strstr-wcsstr-mbsstr-mbsstr-l.md index e22757624c5..6948e4f611b 100644 --- a/docs/c-runtime-library/reference/strstr-wcsstr-mbsstr-mbsstr-l.md +++ b/docs/c-runtime-library/reference/strstr-wcsstr-mbsstr-mbsstr-l.md @@ -75,33 +75,33 @@ const unsigned char *_mbsstr_l( ### Parameters -*`str`*
+*`str`*\ Null-terminated string to search. -*`strSearch`*
+*`strSearch`*\ Null-terminated string to search for. -*`locale`*
+*`locale`*\ Locale to use. -## Return Value +## Return value Returns a pointer to the first occurrence of *`strSearch`* in *`str`*, or **`NULL`** if *`strSearch`* does not appear in *`str`*. If *`strSearch`* points to a string of zero length, the function returns *`str`*. ## Remarks -The `strstr` function returns a pointer to the first occurrence of *`strSearch`* in *`str`*. The search does not include terminating null characters. `wcsstr` is the wide-character version of `strstr` and `_mbsstr` is the multibyte-character version. The arguments and return value of `wcsstr` are wide-character strings; those of `_mbsstr` are multibyte-character strings. `_mbsstr` validates its parameters. If *`str`* or *`strSearch`* is NULL, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md) . If execution is allowed to continue, `_mbsstr` sets `errno` to `EINVAL` and returns 0. `strstr` and `wcsstr` do not validate their parameters. These three functions behave identically otherwise. +The `strstr` function returns a pointer to the first occurrence of *`strSearch`* in *`str`*. The search does not include terminating null characters. `wcsstr` is the wide-character version of `strstr` and `_mbsstr` is the multibyte-character version. The arguments and return value of `wcsstr` are wide-character strings; those of `_mbsstr` are multibyte-character strings. `_mbsstr` validates its parameters. If *`str`* or *`strSearch`* is NULL, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md) . If execution is allowed to continue, `_mbsstr` sets `errno` to `EINVAL` and returns 0. `strstr` and `wcsstr` do not validate their parameters. These three functions behave identically otherwise. > [!IMPORTANT] -> These functions might incur a threat from a buffer overrun problem. Buffer overrun problems can be used to attack a system because they can allow the execution of arbitrary code, which can cause an unwarranted elevation of privilege. For more information, see [Avoiding Buffer Overruns](/windows/win32/SecBP/avoiding-buffer-overruns). +> These functions might incur a threat from a buffer overrun problem. Buffer overrun problems can be used to attack a system because they can allow the execution of arbitrary code, which can cause an unwarranted elevation of privilege. For more information, see [Avoiding buffer overruns](/windows/win32/SecBP/avoiding-buffer-overruns). In C, these functions take a **`const`** pointer for the first argument. In C++, two overloads are available. The overload that takes a pointer to **`const`** returns a pointer to **`const`**; the version that takes a pointer to non-**`const`** returns a pointer to non-**`const`**. The macro `_CRT_CONST_CORRECT_OVERLOADS` is defined if both the **`const`** and non-**`const`** versions of these functions are available. If you require the non-**`const`** behavior for both C++ overloads, define the symbol `_CONST_RETURN`. -The output value is affected by the locale-category setting of `LC_CTYPE`; for more information, see [`setlocale`, `_wsetlocale`](setlocale-wsetlocale.md). The versions of these functions that do not have the **`_l`** suffix use the current locale for this locale-dependent behavior; the versions that have the **`_l`** suffix are identical except that they instead use the locale parameter that's passed in. For more information, see [Locale](../../c-runtime-library/locale.md). +The output value is affected by the locale-category setting of `LC_CTYPE`; for more information, see [`setlocale`, `_wsetlocale`](setlocale-wsetlocale.md). The versions of these functions that do not have the **`_l`** suffix use the current locale for this locale-dependent behavior; the versions that have the **`_l`** suffix are identical except that they instead use the locale parameter that's passed in. For more information, see [Locale](../locale.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| |---------------------|------------------------------------|--------------------|-----------------------| @@ -116,7 +116,7 @@ By default, this function's global state is scoped to the application. To change |`wcsstr`|`` or ``| |`_mbsstr`, `_mbsstr_l`|``| -For more information about compatibility, see [Compatibility](../../c-runtime-library/compatibility.md). +For more information about compatibility, see [Compatibility](../compatibility.md). ## Example @@ -157,12 +157,12 @@ lazy found at position 36 ## See also -[String Manipulation](../../c-runtime-library/string-manipulation-crt.md)
-[Locale](../../c-runtime-library/locale.md)
-[Interpretation of Multibyte-Character Sequences](../../c-runtime-library/interpretation-of-multibyte-character-sequences.md)
-[`strcspn`, `wcscspn`, `_mbscspn`, `_mbscspn_l`](strcspn-wcscspn-mbscspn-mbscspn-l.md)
-[`strcmp`, `wcscmp`, `_mbscmp`](strcmp-wcscmp-mbscmp.md)
-[`strpbrk`, `wcspbrk`, `_mbspbrk`, `_mbspbrk_l`](strpbrk-wcspbrk-mbspbrk-mbspbrk-l.md)
-[`strrchr`, `wcsrchr`, `_mbsrchr`, `_mbsrchr_l`](strrchr-wcsrchr-mbsrchr-mbsrchr-l.md)
-[`strspn`, `wcsspn`, `_mbsspn`, `_mbsspn_l`](strspn-wcsspn-mbsspn-mbsspn-l.md)
-[`basic_string::find`](../../standard-library/basic-string-class.md#find)
+[String manipulation](../string-manipulation-crt.md)\ +[Locale](../locale.md)\ +[Interpretation of multibyte-character sequences](../interpretation-of-multibyte-character-sequences.md)\ +[`strcspn`, `wcscspn`, `_mbscspn`, `_mbscspn_l`](strcspn-wcscspn-mbscspn-mbscspn-l.md)\ +[`strcmp`, `wcscmp`, `_mbscmp`](strcmp-wcscmp-mbscmp.md)\ +[`strpbrk`, `wcspbrk`, `_mbspbrk`, `_mbspbrk_l`](strpbrk-wcspbrk-mbspbrk-mbspbrk-l.md)\ +[`strrchr`, `wcsrchr`, `_mbsrchr`, `_mbsrchr_l`](strrchr-wcsrchr-mbsrchr-mbsrchr-l.md)\ +[`strspn`, `wcsspn`, `_mbsspn`, `_mbsspn_l`](strspn-wcsspn-mbsspn-mbsspn-l.md)\ +[`basic_string::find`](../../standard-library/basic-string-class.md#find) diff --git a/docs/c-runtime-library/reference/strtime-s-wstrtime-s.md b/docs/c-runtime-library/reference/strtime-s-wstrtime-s.md index e494adeb4ed..d40b15b1638 100644 --- a/docs/c-runtime-library/reference/strtime-s-wstrtime-s.md +++ b/docs/c-runtime-library/reference/strtime-s-wstrtime-s.md @@ -12,7 +12,7 @@ ms.assetid: 42acf013-c334-485d-b610-84c0af8a46ec --- # _strtime_s, _wstrtime_s -Copy the current time to a buffer. These are versions of [_strtime, _wstrtime](strtime-wstrtime.md) with security enhancements as described in [Security Features in the CRT](../../c-runtime-library/security-features-in-the-crt.md). +Copy the current time to a buffer. These are versions of [`_strtime`, `_wstrtime`](strtime-wstrtime.md) with security enhancements as described in [Security features in the CRT](../security-features-in-the-crt.md). ## Syntax @@ -37,46 +37,46 @@ errno_t _wstrtime_s( ### Parameters -*buffer*
+*`buffer`*\ A buffer, at least 10 bytes long, where the time will be written. -*numberOfElements*
+*`numberOfElements`*\ The size of the buffer. -## Return Value +## Return value Zero if successful. -If an error condition occurs, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). The return value is an error code if there is a failure. Error codes are defined in ERRNO.H; see the following table for the exact errors generated by this function. For more information on error codes, see [errno Constants](../../c-runtime-library/errno-constants.md). +If an error condition occurs, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). The return value is an error code if there is a failure. Error codes are defined in ERRNO.H; see the following table for the exact errors generated by this function. For more information on error codes, see [`errno` constants](../errno-constants.md). -### Error Conditions +### Error conditions -|*buffer*|*numberOfElements*|Return|Contents of *buffer*| +|*`buffer`*|*`numberOfElements`*|Return|Contents of *`buffer`*| |--------------|------------------------|------------|--------------------------| |**NULL**|(any)|**EINVAL**|Not modified| |Not **NULL** (pointing to valid buffer)|0|**EINVAL**|Not modified| |Not **NULL** (pointing to valid buffer)|0 < size < 9|**EINVAL**|Empty string| |Not **NULL** (pointing to valid buffer)|Size > 9|0|Current time formatted as specified in the remarks| -## Security Issues +## Security issues -Passing in an invalid non-**NULL** value for the buffer will result in an access violation if the *numberOfElements* parameter is greater than 9. +Passing in an invalid non-**NULL** value for the buffer will result in an access violation if the *`numberOfElements`* parameter is greater than 9. -Passing a value for *numberOfElements* that is greater than the actual size of the buffer will result in buffer overrun. +Passing a value for *`numberOfElements`* that is greater than the actual size of the buffer will result in buffer overrun. ## Remarks -These functions provide more secure versions of [_strtime](strtime-wstrtime.md) and [_wstrtime](strtime-wstrtime.md). The **_strtime_s** function copies the current local time into the buffer pointed to by *timestr*. The time is formatted as **hh:mm:ss** where **hh** is two digits representing the hour in 24-hour notation, **mm** is two digits representing the minutes past the hour, and **ss** is two digits representing seconds. For example, the string **18:23:44** represents 23 minutes and 44 seconds past 6 P.M. The buffer must be at least 9 bytes long; the actual size is specified by the second parameter. +These functions provide more secure versions of [`_strtime`](strtime-wstrtime.md) and [`_wstrtime`](strtime-wstrtime.md). The **_strtime_s** function copies the current local time into the buffer pointed to by *`buffer`*. The time is formatted as **hh:mm:ss** where **hh** is two digits representing the hour in 24-hour notation, **mm** is two digits representing the minutes past the hour, and **ss** is two digits representing seconds. For example, the string **18:23:44** represents 23 minutes and 44 seconds past 6 P.M. The buffer must be at least 9 bytes long; the actual size is specified by the second parameter. **_wstrtime** is a wide-character version of **_strtime**; the argument and return value of **_wstrtime** are wide-character strings. These functions behave identically otherwise. -In C++, using these functions is simplified by template overloads; the overloads can infer buffer length automatically (eliminating the need to specify a size argument) and they can automatically replace older, non-secure functions with their newer, secure counterparts. For more information, see [Secure Template Overloads](../../c-runtime-library/secure-template-overloads.md). +In C++, using these functions is simplified by template overloads; the overloads can infer buffer length automatically (eliminating the need to specify a size argument) and they can automatically replace older, non-secure functions with their newer, secure counterparts. For more information, see [Secure template overloads](../secure-template-overloads.md). -The debug library versions of these functions first fill the buffer with 0xFE. To disable this behavior, use [_CrtSetDebugFillThreshold](crtsetdebugfillthreshold.md). +The debug library versions of these functions first fill the buffer with 0xFE. To disable this behavior, use [`_CrtSetDebugFillThreshold`](crtsetdebugfillthreshold.md). By default, this function's global state is scoped to the application. To change this behavior, see [Global state in the CRT](../global-state.md). -### Generic-Text Routine Mapping: +### Generic-text routine mapping |TCHAR.H routine|_UNICODE & _MBCS not defined|_MBCS defined|_UNICODE defined| |---------------------|------------------------------------|--------------------|-----------------------| @@ -89,7 +89,7 @@ By default, this function's global state is scoped to the application. To change |**_strtime_s**|\| |**_wstrtime_s**|\ or \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -136,11 +136,11 @@ OS date: 04/25/03 ## See also -[Time Management](../../c-runtime-library/time-management.md)
-[asctime_s, _wasctime_s](asctime-s-wasctime-s.md)
-[ctime_s, _ctime32_s, _ctime64_s, _wctime_s, _wctime32_s, _wctime64_s](ctime-s-ctime32-s-ctime64-s-wctime-s-wctime32-s-wctime64-s.md)
-[gmtime_s, _gmtime32_s, _gmtime64_s](gmtime-s-gmtime32-s-gmtime64-s.md)
-[localtime_s, _localtime32_s, _localtime64_s](localtime-s-localtime32-s-localtime64-s.md)
-[mktime, _mktime32, _mktime64](mktime-mktime32-mktime64.md)
-[time, _time32, _time64](time-time32-time64.md)
-[_tzset](tzset.md)
+[Time management](../time-management.md)\ +[`asctime_s`, `_wasctime_s`](asctime-s-wasctime-s.md)\ +[`ctime_s`, `_ctime32_s`, `_ctime64_s`, `_wctime_s`, `_wctime32_s`, `_wctime64_s`](ctime-s-ctime32-s-ctime64-s-wctime-s-wctime32-s-wctime64-s.md)\ +[`gmtime_s`, `_gmtime32_s`, `_gmtime64_s`](gmtime-s-gmtime32-s-gmtime64-s.md)\ +[`localtime_s`, `_localtime32_s`, `_localtime64_s`](localtime-s-localtime32-s-localtime64-s.md)\ +[`mktime`, `_mktime32`, `_mktime64`](mktime-mktime32-mktime64.md)\ +[`time`, `_time32`, `_time64`](time-time32-time64.md)\ +[`_tzset`](tzset.md) diff --git a/docs/c-runtime-library/reference/strtime-wstrtime.md b/docs/c-runtime-library/reference/strtime-wstrtime.md index 91e35b0e20e..499f3ed72bf 100644 --- a/docs/c-runtime-library/reference/strtime-wstrtime.md +++ b/docs/c-runtime-library/reference/strtime-wstrtime.md @@ -12,7 +12,7 @@ ms.assetid: 9e538161-cf49-44ec-bca5-c0ab0b9e4ca3 --- # _strtime, _wstrtime -Copy the time to a buffer. More secure versions of these functions are available; see [_strtime_s, _wstrtime_s](strtime-s-wstrtime-s.md). +Copy the time to a buffer. More secure versions of these functions are available; see [`_strtime_s`, `_wstrtime_s`](strtime-s-wstrtime-s.md). ## Syntax @@ -35,24 +35,24 @@ wchar_t *_wstrtime( ### Parameters -*timestr*
+*`timestr`*\ Time string. -## Return Value +## Return value -Returns a pointer to the resulting character string *timestr*. +Returns a pointer to the resulting character string *`timestr`*. ## Remarks -The **_strtime** function copies the current local time into the buffer pointed to by *timestr*. The time is formatted as **hh:mm:ss** where **hh** is two digits representing the hour in 24-hour notation, **mm** is two digits representing the minutes past the hour, and **ss** is two digits representing seconds. For example, the string **18:23:44** represents 23 minutes and 44 seconds past 6 P.M. The buffer must be at least 9 bytes long. +The **_strtime** function copies the current local time into the buffer pointed to by *`timestr`*. The time is formatted as **hh:mm:ss** where **hh** is two digits representing the hour in 24-hour notation, **mm** is two digits representing the minutes past the hour, and **ss** is two digits representing seconds. For example, the string **18:23:44** represents 23 minutes and 44 seconds past 6 P.M. The buffer must be at least 9 bytes long. -**_wstrtime** is a wide-character version of **_strtime**; the argument and return value of **_wstrtime** are wide-character strings. These functions behave identically otherwise. If *timestr* is a **NULL** pointer or if *timestr* is formatted incorrectly, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If the exception is allowed to continue, these functions return a **NULL** and set **errno** to **EINVAL** if *timestr* was a **NULL** or set **errno** to **ERANGE** if *timestr* is formatted incorrectly. +**_wstrtime** is a wide-character version of **_strtime**; the argument and return value of **_wstrtime** are wide-character strings. These functions behave identically otherwise. If *`timestr`* is a **NULL** pointer or if *`timestr`* is formatted incorrectly, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If the exception is allowed to continue, these functions return a **NULL** and set **errno** to **EINVAL** if *`timestr`* was a **NULL** or set **errno** to **ERANGE** if *`timestr`* is formatted incorrectly. -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 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| |---------------------|------------------------------------|--------------------|-----------------------| @@ -65,7 +65,7 @@ By default, this function's global state is scoped to the application. To change |**_strtime**|\| |**_wstrtime**|\ or \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -91,11 +91,11 @@ The current time is 14:21:44 ## See also -[Time Management](../../c-runtime-library/time-management.md)
-[asctime, _wasctime](asctime-wasctime.md)
-[ctime, _ctime32, _ctime64, _wctime, _wctime32, _wctime64](ctime-ctime32-ctime64-wctime-wctime32-wctime64.md)
-[gmtime, _gmtime32, _gmtime64](gmtime-gmtime32-gmtime64.md)
-[localtime, _localtime32, _localtime64](localtime-localtime32-localtime64.md)
-[mktime, _mktime32, _mktime64](mktime-mktime32-mktime64.md)
-[time, _time32, _time64](time-time32-time64.md)
-[_tzset](tzset.md)
+[Time management](../time-management.md)\ +[`asctime`, `_wasctime`](asctime-wasctime.md)\ +[`ctime`, `_ctime32`, `_ctime64`, `_wctime`, `_wctime32`, `_wctime64`](ctime-ctime32-ctime64-wctime-wctime32-wctime64.md)\ +[`gmtime`, `_gmtime32`, `_gmtime64`](gmtime-gmtime32-gmtime64.md)\ +[`localtime`, `_localtime32`, `_localtime64`](localtime-localtime32-localtime64.md)\ +[`mktime`, `_mktime32`, `_mktime64`](mktime-mktime32-mktime64.md)\ +[`time`, `_time32`, `_time64`](time-time32-time64.md)\ +[`_tzset`](tzset.md) diff --git a/docs/c-runtime-library/reference/strtod-strtod-l-wcstod-wcstod-l.md b/docs/c-runtime-library/reference/strtod-strtod-l-wcstod-wcstod-l.md index 5ced08110d9..e5c0b50871b 100644 --- a/docs/c-runtime-library/reference/strtod-strtod-l-wcstod-wcstod-l.md +++ b/docs/c-runtime-library/reference/strtod-strtod-l-wcstod-wcstod-l.md @@ -47,16 +47,16 @@ Pointer to character that stops scan. *`locale`*\ The locale to use. -## Return Value +## Return value **`strtod`** returns the value of the floating-point number, except when the representation would cause an overflow, in which case the function returns +/-**`HUGE_VAL`**. The sign of **`HUGE_VAL`** matches the sign of the value that can't be represented. **`strtod`** returns `0` if no conversion can be performed or an underflow occurs. **`wcstod`** returns values analogously to **`strtod`**: - For both functions, **`errno`** is set to **`ERANGE`** if overflow or underflow occurs. -- If there are invalid parameters, **`errno`** is set to **`EINVAL`** and the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). +- If there are invalid parameters, **`errno`** is set to **`EINVAL`** and the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). -For more information on 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 on this and other return codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks @@ -64,14 +64,14 @@ Each function converts the input string *`strSource`* to a **`double`**. The **` 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| |---------------------|------------------------------------|--------------------|-----------------------| |**`_tcstod`**|**`strtod`**|**`strtod`**|**`wcstod`**| |**`_tcstod_l`**|**`_strtod_l`**|**`_strtod_l`**|**`_wcstod_l`**| -The **`LC_NUMERIC`** category setting of the current locale determines recognition of the radix point character in *`strSource`*. For more information, see [`setlocale`](setlocale-wsetlocale.md). The functions without the **`_l`** suffix use the current locale; **`_strtod_l`** is identical to **`_strtod`** except the former uses the *`locale`* passed in instead. For more information, see [Locale](../../c-runtime-library/locale.md). +The **`LC_NUMERIC`** category setting of the current locale determines recognition of the radix point character in *`strSource`*. For more information, see [`setlocale`](setlocale-wsetlocale.md). The functions without the **`_l`** suffix use the current locale; **`_strtod_l`** is identical to **`_strtod`** except the former uses the *`locale`* passed in instead. For more information, see [Locale](../locale.md). If *`endptr`* isn't **`NULL`**, a pointer to the character that stopped the scan is stored at the location pointed to by *`endptr`*. If no conversion can be performed (no valid digits were found or an invalid base was specified), the value of *`strSource`* is stored at the location pointed to by *`endptr`*. @@ -108,7 +108,7 @@ The UCRT versions of these functions don't support conversion of Fortran-style ( |**`strtod`**, **`_strtod_l`**|C: `` C++: `` or `` | |**`wcstod`**, **`_wcstod_l`**|C: `` or `` C++: ``, ``, or `` | -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -203,11 +203,11 @@ No Fortran style support. Stopped parsing at d+49 ## See also -[Data Conversion](../../c-runtime-library/data-conversion.md)\ -[Floating-Point Support](../../c-runtime-library/floating-point-support.md)\ -[Interpretation of Multibyte-Character Sequences](../../c-runtime-library/interpretation-of-multibyte-character-sequences.md)\ -[Locale](../../c-runtime-library/locale.md)\ -[String to Numeric Value Functions](../../c-runtime-library/string-to-numeric-value-functions.md)\ +[Data conversion](../data-conversion.md)\ +[Math and floating-point support](../floating-point-support.md)\ +[Interpretation of multibyte-character sequences](../interpretation-of-multibyte-character-sequences.md)\ +[Locale](../locale.md)\ +[String to numeric value functions](../string-to-numeric-value-functions.md)\ [`strtol`, `wcstol`, `_strtol_l`, `_wcstol_l`](strtol-wcstol-strtol-l-wcstol-l.md)\ [`strtoul`, `_strtoul_l`, `wcstoul`, `_wcstoul_l`](strtoul-strtoul-l-wcstoul-wcstoul-l.md)\ [`atof`, `_atof_l`, `_wtof`, `_wtof_l`](atof-atof-l-wtof-wtof-l.md)\ diff --git a/docs/c-runtime-library/reference/strtof-strtof-l-wcstof-wcstof-l.md b/docs/c-runtime-library/reference/strtof-strtof-l-wcstof-wcstof-l.md index 6fb4ac57eda..15d2da566cf 100644 --- a/docs/c-runtime-library/reference/strtof-strtof-l-wcstof-wcstof-l.md +++ b/docs/c-runtime-library/reference/strtof-strtof-l-wcstof-wcstof-l.md @@ -39,47 +39,47 @@ float wcstof_l( ## Parameters -*strSource*
+*`strSource`*\ Null-terminated string to convert. -*endptr*
+*`endptr`*\ Pointer to the character that stops the scan. -*locale*
+*`locale`*\ The locale to use. -## Return Value +## Return value **strtof** returns the value of the floating-point number, except when the representation would cause an overflow, in which case the function returns +/-**HUGE_VALF**. The sign of **HUGE_VALF** matches the sign of the value that cannot be represented. **strtof** returns 0 if no conversion can be performed or an underflow occurs. -**wcstof** returns values analogously to **strtof**. For both functions, **errno** is set to **ERANGE** if overflow or underflow occurs and the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). +**wcstof** returns values analogously to **strtof**. For both functions, **errno** is set to **ERANGE** if overflow or underflow occurs and the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). -For more information about return codes, see [errno, _doserrno, _sys_errlist, and _sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +For more information about return codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks -Each function converts the input string *strSource* to a **`float`**. The **strtof** function converts *strSource* to a single-precision value. **strtof** stops reading the string *strSource* at the first character it cannot recognize as part of a number. This may be the terminating null character. **wcstof** is a wide-character version of **strtof**; its *strSource* argument is a wide-character string. Otherwise, these functions behave identically. +Each function converts the input string *`strSource`* to a **`float`**. The **strtof** function converts *`strSource`* to a single-precision value. **strtof** stops reading the string *`strSource`* at the first character it cannot recognize as part of a number. This may be the terminating null character. **wcstof** is a wide-character version of **strtof**; its *`strSource`* argument is a wide-character string. Otherwise, these functions behave identically. 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| |---------------------|------------------------------------|--------------------|-----------------------| |**_tcstof**|**strtof**|**strtof**|**wcstof**| |**_tcstof_l**|**_strtof_l**|**_strtof_l**|**_wcstof_l**| -The **LC_NUMERIC** category setting of the current locale determines recognition of the radix character in *strSource*; for more information, see [setlocale, _wsetlocale](setlocale-wsetlocale.md). The functions that don't have the **_l** suffix use the current locale; the ones that have the suffix are identical except that they use the locale that's passed in instead. For more information, see [Locale](../../c-runtime-library/locale.md). +The **LC_NUMERIC** category setting of the current locale determines recognition of the radix character in *`strSource`*; for more information, see [`setlocale`, `_wsetlocale`](setlocale-wsetlocale.md). The functions that don't have the **_l** suffix use the current locale; the ones that have the suffix are identical except that they use the locale that's passed in instead. For more information, see [Locale](../locale.md). -If *endptr* is not **NULL**, a pointer to the character that stopped the scan is stored at the location that's pointed to by *endptr*. If no conversion can be performed (no valid digits were found or an invalid base was specified), the value of *strSource* is stored at the location that's pointed to by *endptr*. +If *`endptr`* is not **NULL**, a pointer to the character that stopped the scan is stored at the location that's pointed to by *`endptr`*. If no conversion can be performed (no valid digits were found or an invalid base was specified), the value of *`strSource`* is stored at the location that's pointed to by *`endptr`*. -**strtof** expects *strSource* to point to a string of the following form: +**strtof** expects *`strSource`* to point to a string of the following form: -[*whitespace*] [*sign*] [*digits*] [__.__*digits*] [{**e** | **E**} [*sign*] *digits*] +[*`whitespace`*] [*`sign`*] [*`digits`*] [.*`digits`*] [{**`e`** | **`E`**} [*`sign`*] *`digits`*] -A *whitespace* may consist of space and tab characters, which are ignored; *sign* is either plus (**+**) or minus (**-**); and *digits* are one or more decimal digits. If no digits appear before the radix character, at least one must appear after the radix character. The decimal digits can be followed by an exponent, which consists of an introductory letter (**e** or **E**) and an optionally signed integer. If neither an exponent part nor a radix character appears, a radix character is assumed to follow the last digit in the string. The first character that does not fit this form stops the scan. +A *`whitespace`* may consist of space and tab characters, which are ignored; *`sign`* is either plus (**`+`**) or minus (**`-`**); and *`digits`* are one or more decimal digits. If no digits appear before the radix character, at least one must appear after the radix character. The decimal digits can be followed by an exponent, which consists of an introductory letter (**`e`** or **`E`**) and an optionally signed integer. If neither an exponent part nor a radix character appears, a radix character is assumed to follow the last digit in the string. The first character that does not fit this form stops the scan. -The UCRT versions of these functions do not support conversion of Fortran-style (**d** or **D**) exponent letters. This non-standard extension was supported by earlier versions of the CRT, and may be a breaking change for your code. +The UCRT versions of these functions do not support conversion of Fortran-style (**`d`** or **`D`**) exponent letters. This non-standard extension was supported by earlier versions of the CRT, and may be a breaking change for your code. ## Requirements @@ -88,7 +88,7 @@ The UCRT versions of these functions do not support conversion of Fortran-style |**strtof**, **_strtof_l**|C: \ C++: \ or \| |**wcstof**, **_wcstof_l**|C: \ or \ C++: \, \ or \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -122,15 +122,15 @@ string = 3.14159This stopped it ## See also -[Data Conversion](../../c-runtime-library/data-conversion.md)
-[Floating-Point Support](../../c-runtime-library/floating-point-support.md)
-[Interpretation of Multibyte-Character Sequences](../../c-runtime-library/interpretation-of-multibyte-character-sequences.md)
-[Locale](../../c-runtime-library/locale.md)
-[String to Numeric Value Functions](../../c-runtime-library/string-to-numeric-value-functions.md)
-[strtod, _strtod_l, wcstod, _wcstod_l](strtod-strtod-l-wcstod-wcstod-l.md)
-[strtol, wcstol, _strtol_l, _wcstol_l](strtol-wcstol-strtol-l-wcstol-l.md)
-[strtoul, _strtoul_l, wcstoul, _wcstoul_l](strtoul-strtoul-l-wcstoul-wcstoul-l.md)
-[atof, _atof_l, _wtof, _wtof_l](atof-atof-l-wtof-wtof-l.md)
-[localeconv](localeconv.md)
-[_create_locale, _wcreate_locale](create-locale-wcreate-locale.md)
-[_free_locale](free-locale.md)
+[Data conversion](../data-conversion.md)\ +[Math and floating-point support](../floating-point-support.md)\ +[Interpretation of multibyte-character sequences](../interpretation-of-multibyte-character-sequences.md)\ +[Locale](../locale.md)\ +[String to numeric value functions](../string-to-numeric-value-functions.md)\ +[`strtod`, `_strtod_l`, `wcstod`, `_wcstod_l`](strtod-strtod-l-wcstod-wcstod-l.md)\ +[`strtol`, `wcstol`, `_strtol_l`, `_wcstol_l`](strtol-wcstol-strtol-l-wcstol-l.md)\ +[`strtoul`, `_strtoul_l`, `wcstoul`, `_wcstoul_l`](strtoul-strtoul-l-wcstoul-wcstoul-l.md)\ +[`atof`, `_atof_l`, `_wtof`, `_wtof_l`](atof-atof-l-wtof-wtof-l.md)\ +[`localeconv`](localeconv.md)\ +[`_create_locale`, `_wcreate_locale`](create-locale-wcreate-locale.md)\ +[`_free_locale`](free-locale.md) diff --git a/docs/c-runtime-library/reference/strtoi64-wcstoi64-strtoi64-l-wcstoi64-l.md b/docs/c-runtime-library/reference/strtoi64-wcstoi64-strtoi64-l-wcstoi64-l.md index fbc9037281a..e2c4d067cc8 100644 --- a/docs/c-runtime-library/reference/strtoi64-wcstoi64-strtoi64-l-wcstoi64-l.md +++ b/docs/c-runtime-library/reference/strtoi64-wcstoi64-strtoi64-l-wcstoi64-l.md @@ -63,7 +63,7 @@ The locale to use. If *`strSource`* is **`NULL`** or the *`base`* is nonzero and either less than 2 or greater than 36, **`errno`** is set to **`EINVAL`**. -For more information about 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 return codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks @@ -78,15 +78,15 @@ By default, this function's global state is scoped to the application. To change |**`_tcstoi64`**|**`_strtoi64`**|**`_strtoi64`**|**`_wcstoi64`**| |**`_tcstoi64_l`**|**`_strtoi64_l`**|**`_strtoi64_l`**|**`_wcstoi64_l`**| -The locale's **`LC_NUMERIC`** category setting determines recognition of the radix character in *`strSource`*; for more information, see [`setlocale`](setlocale-wsetlocale.md). The functions without the **`_l`** suffix use the current locale; **`_strtoi64_l`** and **`_wcstoi64_l`** are identical to the corresponding function without the **`_l`** suffix except that they use the locale passed in instead. For more information, see [Locale](../../c-runtime-library/locale.md). +The locale's **`LC_NUMERIC`** category setting determines recognition of the radix character in *`strSource`*; for more information, see [`setlocale`](setlocale-wsetlocale.md). The functions without the **`_l`** suffix use the current locale; **`_strtoi64_l`** and **`_wcstoi64_l`** are identical to the corresponding function without the **`_l`** suffix except that they use the locale passed in instead. For more information, see [Locale](../locale.md). If *`endptr`* isn't **`NULL`**, a pointer to the character that stopped the scan is stored at the location pointed to by *`endptr`*. If no conversion can be performed (no valid digits were found or an invalid base was specified), the value of *`strSource`* is stored at the location pointed to by *`endptr`*. **`_strtoi64`** expects *`strSource`* to point to a string of the following form: -> [*whitespace*] [{**`+`** \| **`-`**}] [**`0`** [{ **`x`** \| **`X`** }]] [*digits* \| *letters*] +> [*`whitespace`*] [{**`+`** \| **`-`**}] [**`0`** [{ **`x`** \| **`X`** }]] [*`digits`* \| *`letters`*] -A *whitespace* may consist of space and tab characters, which are ignored. *digits* are one or more decimal digits. *letters* are one or more of the letters 'a' through 'z' (or 'A' through 'Z'). The first character that doesn't fit this form stops the scan. If *`base`* is between 2 and 36, then it's used as the base of the number. If *`base`* is 0, the initial characters of the string pointed to by *`strSource`* are used to determine the base. If the first character is '0' and the second character isn't 'x' or 'X', the string is interpreted as an octal integer. If the first character is '0' and the second character is 'x' or 'X', the string is interpreted as a hexadecimal integer. If the first character is '1' through '9', the string is interpreted as a decimal integer. The letters 'a' through 'z' (or 'A' through 'Z') are assigned the values 10 through 35; only letters whose assigned values are less than *`base`* are permitted. The first character outside the range of the base stops the scan. For example, if *`base`* is 0 and the first character scanned is '0', an octal integer is assumed and an '8' or '9' character will stop the scan. +A *`whitespace`* may consist of space and tab characters, which are ignored. *`digits`* are one or more decimal digits. *`letters`* are one or more of the letters 'a' through 'z' (or 'A' through 'Z'). The first character that doesn't fit this form stops the scan. If *`base`* is between 2 and 36, then it's used as the base of the number. If *`base`* is 0, the initial characters of the string pointed to by *`strSource`* are used to determine the base. If the first character is '0' and the second character isn't 'x' or 'X', the string is interpreted as an octal integer. If the first character is '0' and the second character is 'x' or 'X', the string is interpreted as a hexadecimal integer. If the first character is '1' through '9', the string is interpreted as a decimal integer. The letters 'a' through 'z' (or 'A' through 'Z') are assigned the values 10 through 35; only letters whose assigned values are less than *`base`* are permitted. The first character outside the range of the base stops the scan. For example, if *`base`* is 0 and the first character scanned is '0', an octal integer is assumed and an '8' or '9' character will stop the scan. ## Requirements @@ -95,15 +95,15 @@ A *whitespace* may consist of space and tab characters, which are ignored. *digi | **`_strtoi64`**, **`_strtoi64_l`** | `` | | **`_wcstoi64`**, **`_wcstoi64_l`** | `` or `` | -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Data conversion](../../c-runtime-library/data-conversion.md)\ -[Locale](../../c-runtime-library/locale.md)\ +[Data conversion](../data-conversion.md)\ +[Locale](../locale.md)\ [`localeconv`](localeconv.md)\ [`setlocale`, `_wsetlocale`](setlocale-wsetlocale.md)\ -[String to numeric value functions](../../c-runtime-library/string-to-numeric-value-functions.md)\ +[String to numeric value functions](../string-to-numeric-value-functions.md)\ [`strtod`, `_strtod_l`, `wcstod`, `_wcstod_l`](strtod-strtod-l-wcstod-wcstod-l.md)\ [`strtoul`, `_strtoul_l`, `wcstoul`, `_wcstoul_l`](strtoul-strtoul-l-wcstoul-wcstoul-l.md)\ [`atof`, `_atof_l`, `_wtof`, `_wtof_l`](atof-atof-l-wtof-wtof-l.md) diff --git a/docs/c-runtime-library/reference/strtoimax-strtoimax-l-wcstoimax-wcstoimax-l.md b/docs/c-runtime-library/reference/strtoimax-strtoimax-l-wcstoimax-wcstoimax-l.md index 84e0fb40fd1..3bdffc4889c 100644 --- a/docs/c-runtime-library/reference/strtoimax-strtoimax-l-wcstoimax-wcstoimax-l.md +++ b/docs/c-runtime-library/reference/strtoimax-strtoimax-l-wcstoimax-wcstoimax-l.md @@ -43,48 +43,48 @@ intmax_t _wcstoimax_l( ### Parameters -*strSource*
+*`strSource`*\ Null-terminated string to convert. -*endptr*
+*`endptr`*\ Pointer to the character that stops the scan. -*base*
+*`base`*\ Number base to use. -*locale*
+*`locale`*\ The locale to use. -## Return Value +## Return value -**strtoimax** returns the value that's represented in the string *strSource*, except when the representation would cause an overflow—in that case, it returns **INTMAX_MAX** or **INTMAX_MIN**, and **errno** is set to **ERANGE**. The function returns 0 if no conversion can be performed. **wcstoimax** returns values analogously to **strtoimax**. +**strtoimax** returns the value that's represented in the string *`strSource`*, except when the representation would cause an overflow—in that case, it returns **INTMAX_MAX** or **INTMAX_MIN**, and **errno** is set to **ERANGE**. The function returns 0 if no conversion can be performed. **wcstoimax** returns values analogously to **strtoimax**. **INTMAX_MAX** and **INTMAX_MIN** are defined in stdint.h. -If *strSource* is **NULL** or the *base* is nonzero and either less than 2 or greater than 36, **errno** is set to **EINVAL**. +If *`strSource`* is **NULL** or the *`base`* is nonzero and either less than 2 or greater than 36, **errno** is set to **EINVAL**. -For more information about return codes, see [errno, _doserrno, _sys_errlist, and _sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +For more information about return codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks -The **strtoimax** function converts *strSource* to an **intmax_t**. The wide-character version of **strtoimax** is **wcstoimax**; its *strSource* argument is a wide-character string. Otherwise, these functions behave identically. Both functions stop reading the string *strSource* at the first character they cannot recognize as part of a number. This may be the terminating null character, or it may be the first numeric character that's greater than or equal to *base*. +The **strtoimax** function converts *`strSource`* to an **intmax_t**. The wide-character version of **strtoimax** is **wcstoimax**; its *`strSource`* argument is a wide-character string. Otherwise, these functions behave identically. Both functions stop reading the string *`strSource`* at the first character they cannot recognize as part of a number. This may be the terminating null character, or it may be the first numeric character that's greater than or equal to *`base`*. -The locale's **LC_NUMERIC** category setting determines recognition of the radix character in *strSource*; for more information, see [setlocale, _wsetlocale](setlocale-wsetlocale.md). The functions that don't have the **_l** suffix use the current locale; **_strtoimax_l** and **_wcstoimax_l** are identical to the corresponding functions that don't have the **_l** suffix except that they instead use the locale that's passed in. For more information, see [Locale](../../c-runtime-library/locale.md). +The locale's **LC_NUMERIC** category setting determines recognition of the radix character in *`strSource`*; for more information, see [`setlocale`, `_wsetlocale`](setlocale-wsetlocale.md). The functions that don't have the **_l** suffix use the current locale; **_strtoimax_l** and **_wcstoimax_l** are identical to the corresponding functions that don't have the **_l** suffix except that they instead use the locale that's passed in. For more information, see [Locale](../locale.md). -If *endptr* is not **NULL**, a pointer to the character that stopped the scan is stored at the location that's pointed to by *endptr*. If no conversion can be performed (no valid digits were found or an invalid base was specified), the value of *strSource* is stored at the location that's pointed to by *endptr*. +If *`endptr`* is not **NULL**, a pointer to the character that stopped the scan is stored at the location that's pointed to by *`endptr`*. If no conversion can be performed (no valid digits were found or an invalid base was specified), the value of *`strSource`* is stored at the location that's pointed to by *`endptr`*. -### Generic-Text Routine Mappings +### Generic-text routine mappings |TCHAR.H routine|_UNICODE & _MBCS not defined|_MBCS defined|_UNICODE defined| |---------------------|------------------------------------|--------------------|-----------------------| |**_tcstoimax**|**strtoimax**|**strtoimax**|**wcstoimax**| |**_tcstoimax_l**|**strtoimax_l**|**_strtoimax_l**|**_wcstoimax_l**| -**strtoimax** expects *strSource* to point to a string of the following form: +**strtoimax** expects *`strSource`* to point to a string of the following form: -> [*whitespace*] [{**+** | **-**}] [**0** [{ **x** | **X** }]] [*digits* | *letters*] +> [*`whitespace`*] [{**`+`** | **`-`**}] [**`0`** [{ **`x`** | **`X`** }]] [*`digits`* | *`letters`*] -A *whitespace* may consist of space and tab characters, which are ignored; *digits* are one or more decimal digits; *letters* are one or more of the letters 'a' through 'z' (or 'A' through 'Z'). The first character that does not fit this form stops the scan. If *base* is between 2 and 36, then it is used as the base of the number. If *base* is 0, the initial characters of the string pointed to by *strSource* are used to determine the base. If the first character is '0' and the second character is not 'x' or 'X', the string is interpreted as an octal integer. If the first character is '0' and the second character is 'x' or 'X', the string is interpreted as a hexadecimal integer. If the first character is '1' through '9', the string is interpreted as a decimal integer. The letters 'a' through 'z' (or 'A' through 'Z') are assigned the values 10 through 35; only letters whose assigned values are less than *base* are permitted. The first character outside the range of the base stops the scan. For example, if *base* is 0 and the first character scanned is '0', an octal integer is assumed and an '8' or '9' character would stop the scan. +A *`whitespace`* may consist of space and tab characters, which are ignored; *`digits`* are one or more decimal digits; *`letters`* are one or more of the letters 'a' through 'z' (or 'A' through 'Z'). The first character that does not fit this form stops the scan. If *`base`* is between 2 and 36, then it is used as the base of the number. If *`base`* is 0, the initial characters of the string pointed to by *`strSource`* are used to determine the base. If the first character is '0' and the second character is not 'x' or 'X', the string is interpreted as an octal integer. If the first character is '0' and the second character is 'x' or 'X', the string is interpreted as a hexadecimal integer. If the first character is '1' through '9', the string is interpreted as a decimal integer. The letters 'a' through 'z' (or 'A' through 'Z') are assigned the values 10 through 35; only letters whose assigned values are less than *`base`* are permitted. The first character outside the range of the base stops the scan. For example, if *`base`* is 0 and the first character scanned is '0', an octal integer is assumed and an '8' or '9' character would stop the scan. ## Requirements @@ -92,17 +92,17 @@ A *whitespace* may consist of space and tab characters, which are ignored; *digi |-------------|---------------------| |**strtoimax**, **_strtoimax_l**, **wcstoimax**, **_wcstoimax_l**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Data Conversion](../../c-runtime-library/data-conversion.md)
-[Locale](../../c-runtime-library/locale.md)
-[localeconv](localeconv.md)
-[setlocale, _wsetlocale](setlocale-wsetlocale.md)
-[String to Numeric Value Functions](../../c-runtime-library/string-to-numeric-value-functions.md)
-[strtod, _strtod_l, wcstod, _wcstod_l](strtod-strtod-l-wcstod-wcstod-l.md)
-[strtol, wcstol, _strtol_l, _wcstol_l](strtol-wcstol-strtol-l-wcstol-l.md)
-[strtoul, _strtoul_l, wcstoul, _wcstoul_l](strtoul-strtoul-l-wcstoul-wcstoul-l.md)
-[strtoumax, _strtoumax_l, wcstoumax, _wcstoumax_l](strtoumax-strtoumax-l-wcstoumax-wcstoumax-l.md)
-[atof, _atof_l, _wtof, _wtof_l](atof-atof-l-wtof-wtof-l.md)
+[Data conversion](../data-conversion.md)\ +[Locale](../locale.md)\ +[`localeconv`](localeconv.md)\ +[`setlocale`, `_wsetlocale`](setlocale-wsetlocale.md)\ +[String to numeric value functions](../string-to-numeric-value-functions.md)\ +[`strtod`, `_strtod_l`, `wcstod`, `_wcstod_l`](strtod-strtod-l-wcstod-wcstod-l.md)\ +[`strtol`, `wcstol`, `_strtol_l`, `_wcstol_l`](strtol-wcstol-strtol-l-wcstol-l.md)\ +[`strtoul`, `_strtoul_l`, `wcstoul`, `_wcstoul_l`](strtoul-strtoul-l-wcstoul-wcstoul-l.md)\ +[`strtoumax`, `_strtoumax_l`, `wcstoumax`, `_wcstoumax_l`](strtoumax-strtoumax-l-wcstoumax-wcstoumax-l.md)\ +[`atof`, `_atof_l`, `_wtof`, `_wtof_l`](atof-atof-l-wtof-wtof-l.md) diff --git a/docs/c-runtime-library/reference/strtok-s-strtok-s-l-wcstok-s-wcstok-s-l-mbstok-s-mbstok-s-l.md b/docs/c-runtime-library/reference/strtok-s-strtok-s-l-wcstok-s-wcstok-s-l-mbstok-s-mbstok-s-l.md index 9f3a902d1a9..e6e01ae5ee5 100644 --- a/docs/c-runtime-library/reference/strtok-s-strtok-s-l-wcstok-s-wcstok-s-l-mbstok-s-mbstok-s-l.md +++ b/docs/c-runtime-library/reference/strtok-s-strtok-s-l-wcstok-s-wcstok-s-l-mbstok-s-mbstok-s-l.md @@ -12,7 +12,7 @@ ms.assetid: 7696c972-f83b-4617-8c82-95973e9fdb46 --- # `strtok_s`, `_strtok_s_l`, `wcstok_s`, `_wcstok_s_l`, `_mbstok_s`, `_mbstok_s_l` -Finds the next token in a string, by using the current locale or a locale that's passed in. These versions of [`strtok`, `_strtok_l`, `wcstok`, `_wcstok_l`, `_mbstok`, `_mbstok_l`](strtok-strtok-l-wcstok-wcstok-l-mbstok-mbstok-l.md) have security enhancements, as described in [Security Features in the CRT](../../c-runtime-library/security-features-in-the-crt.md). +Finds the next token in a string, by using the current locale or a locale that's passed in. These versions of [`strtok`, `_strtok_l`, `wcstok`, `_wcstok_l`, `_mbstok`, `_mbstok_l`](strtok-strtok-l-wcstok-wcstok-l-mbstok-mbstok-l.md) have security enhancements, as described in [Security features in the CRT](../security-features-in-the-crt.md). > [!IMPORTANT] > **`_mbstok_s`** and **`_mbstok_s_l`** cannot be used in applications that execute in the Windows Runtime. For more information, see [CRT functions not supported in Universal Windows Platform apps](../../cppcx/crt-functions-not-supported-in-universal-windows-platform-apps.md). @@ -62,23 +62,23 @@ unsigned char* _mbstok_s_l( ### Parameters -*`str`*
+*`str`*\ A string containing the token or tokens to find. -*`delimiters`*
+*`delimiters`*\ The set of delimiter characters to use. -*`context`*
+*`context`*\ Used to store position information between calls to the function. -*`locale`*
+*`locale`*\ The locale to use. -## Return Value +## Return value Returns a pointer to the next token found in *`str`*. Returns **`NULL`** when no more tokens are found. Each call modifies *`str`* by substituting a null character for the first delimiter that occurs after the returned token. -### Error Conditions +### Error conditions |*`str`*|*`delimiters`*|*`context`*|Return value|**`errno`**| |----------------|------------------|---------------|------------------|-------------| @@ -92,7 +92,7 @@ If *`str`* is **`NULL`** but *`context`* is a pointer to a valid context pointer The **`strtok_s`** family of functions finds the next token in *`str`*. The set of characters in *`delimiters`* specifies possible delimiters of the token to be found in *`str`* on the current call. **`wcstok_s`** and **`_mbstok_s`** are wide-character and multibyte-character versions of **`strtok_s`**. The arguments and return values of **`wcstok_s`** and **`_wcstok_s_l`** are wide-character strings; those of **`_mbstok_s`** and **`_mbstok_s_l`** are multibyte-character strings. These functions behave identically otherwise. -This function validates its parameters. When an error condition occurs, as in the Error Conditions table, the invalid parameter handler is invoked, 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 **`NULL`**. +This function validates its parameters. When an error condition occurs, as in the Error Conditions table, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, these functions set **`errno`** to **`EINVAL`** and return **`NULL`**. On the first call to **`strtok_s`**, the function skips leading delimiters and returns a pointer to the first token in *`str`*, terminating the token with a null character. More tokens can be broken out of the remainder of *`str`* by a series of calls to **`strtok_s`**. Each call to **`strtok_s`** modifies *`str`* by inserting a null character after the token returned by that call. The *`context`* pointer keeps track of which string is being read and where in the string the next token is to be read. To read the next token from *`str`*, call **`strtok_s`** with a **`NULL`** value for the *`str`* argument, and pass the same *`context`* parameter. The **`NULL`** *`str`* argument causes **`strtok_s`** to search for the next token in the modified *`str`*. The *`delimiters`* argument can take any value from one call to the next so that the set of delimiters may vary. @@ -100,7 +100,7 @@ Since the *`context`* parameter supersedes the static buffers used in **`strtok` The output value is affected by the setting of the **`LC_CTYPE`** category setting of the locale. For more information, see [`setlocale`](setlocale-wsetlocale.md). -The versions of these functions without the **`_l`** suffix use the current thread locale for this locale-dependent behavior. The versions with the **`_l`** suffix are identical except they instead use the locale specified by the *`locale`* parameter. For more information, see [Locale](../../c-runtime-library/locale.md). +The versions of these functions without the **`_l`** suffix use the current thread locale for this locale-dependent behavior. The versions with the **`_l`** suffix are identical except they instead use the locale specified by the *`locale`* parameter. For more information, see [Locale](../locale.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). @@ -113,9 +113,9 @@ By default, this function's global state is scoped to the application. To change |**`wcstok_s`**,
**`_wcstok_s_l`**|`` or ``| |**`_mbstok_s`**,
**`_mbstok_s_l`**|``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). -### Generic-Text Routine Mappings +### Generic-text routine mappings |`TCHAR.H` routine|`_UNICODE` & `_MBCS` not defined|`_MBCS` defined|`_UNICODE` defined| |---------------------|------------------------------------|--------------------|-----------------------| @@ -190,8 +190,8 @@ tokens ## See also -[String Manipulation](../../c-runtime-library/string-manipulation-crt.md)
-[Locale](../../c-runtime-library/locale.md)
-[Interpretation of Multibyte-Character Sequences](../../c-runtime-library/interpretation-of-multibyte-character-sequences.md)
-[`strcspn`, `wcscspn`, `_mbscspn`, `_mbscspn_l`](strcspn-wcscspn-mbscspn-mbscspn-l.md)
-[`strspn`, `wcsspn`, `_mbsspn`, `_mbsspn_l`](strspn-wcsspn-mbsspn-mbsspn-l.md)
+[String manipulation](../string-manipulation-crt.md)\ +[Locale](../locale.md)\ +[Interpretation of multibyte-character sequences](../interpretation-of-multibyte-character-sequences.md)\ +[`strcspn`, `wcscspn`, `_mbscspn`, `_mbscspn_l`](strcspn-wcscspn-mbscspn-mbscspn-l.md)\ +[`strspn`, `wcsspn`, `_mbsspn`, `_mbsspn_l`](strspn-wcsspn-mbsspn-mbsspn-l.md) diff --git a/docs/c-runtime-library/reference/strtok-strtok-l-wcstok-wcstok-l-mbstok-mbstok-l.md b/docs/c-runtime-library/reference/strtok-strtok-l-wcstok-wcstok-l-mbstok-mbstok-l.md index e65dd4eb5a4..05ab6b8bbdc 100644 --- a/docs/c-runtime-library/reference/strtok-strtok-l-wcstok-wcstok-l-mbstok-mbstok-l.md +++ b/docs/c-runtime-library/reference/strtok-strtok-l-wcstok-wcstok-l-mbstok-mbstok-l.md @@ -56,19 +56,19 @@ unsigned char *_mbstok_l( ### Parameters -*`strToken`*
+*`strToken`*\ String containing token or tokens. -*`strDelimit`*
+*`strDelimit`*\ Set of delimiter characters. -*`locale`*
+*`locale`*\ Locale to use. -*`context`*
+*`context`*\ Points to memory used to store the internal state of the parser so that the parser can continue from where it left off the next time you call **`wcstok`**. -## Return Value +## Return value Returns a pointer to the next token found in *`strToken`*. The functions return **`NULL`** when no more tokens are found. Each call modifies *`strToken`* by substituting a null character for the first delimiter that occurs after the returned token. @@ -79,20 +79,20 @@ The **`strtok`** function finds the next token in *`strToken`*. The set of chara The two argument version of **`wcstok`** is not standard. If you need to use that version, you'll need to define `_CRT_NON_CONFORMING_WCSTOK` before you `#include ` (or `#include `). > [!IMPORTANT] -> These functions incur a potential threat brought about by a buffer overrun problem. Buffer overrun problems are a frequent method of system attack, resulting in an unwarranted elevation of privilege. For more information, see [Avoiding Buffer Overruns](/windows/win32/SecBP/avoiding-buffer-overruns). +> These functions incur a potential threat brought about by a buffer overrun problem. Buffer overrun problems are a frequent method of system attack, resulting in an unwarranted elevation of privilege. For more information, see [Avoiding buffer overruns](/windows/win32/SecBP/avoiding-buffer-overruns). On the first call to **`strtok`**, the function skips leading delimiters and returns a pointer to the first token in *`strToken`*, terminating the token with a null character. More tokens can be broken out of the remainder of *`strToken`* by a series of calls to **`strtok`**. Each call to **`strtok`** modifies *`strToken`* by inserting a null character after the **`token`** returned by that call. To read the next token from *`strToken`*, call **`strtok`** with a **`NULL`** value for the *`strToken`* argument. The **`NULL`** *`strToken`* argument causes **`strtok`** to search for the next token in the modified *`strToken`*. The *`strDelimit`* argument can take any value from one call to the next so that the set of delimiters may vary. The output value is affected by the setting of the **`LC_CTYPE`** category setting of the locale. For more information, see [`setlocale`](setlocale-wsetlocale.md). -The versions of these functions without the **`_l`** suffix use the current locale for this locale-dependent behavior. The versions with the **`_l`** suffix are identical except that they use the locale parameter passed in instead. For more information, see [Locale](../../c-runtime-library/locale.md). +The versions of these functions without the **`_l`** suffix use the current locale for this locale-dependent behavior. The versions with the **`_l`** suffix are identical except that they use the locale parameter passed in instead. For more information, see [Locale](../locale.md). > [!NOTE] > Each function uses a thread-local static variable for parsing the string into tokens. Therefore, multiple threads can simultaneously call these functions without undesirable effects. However, within a single thread, interleaving calls to one of these functions is highly likely to produce data corruption and inaccurate results. When parsing different strings, finish parsing one string before starting to parse the next. Also, be aware of the potential for danger when calling one of these functions from within a loop where another function is called. If the other function ends up using one of these functions, an interleaved sequence of calls will result, triggering data corruption. 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| |---------------------|------------------------------------|--------------------|-----------------------| @@ -108,7 +108,7 @@ By default, this function's global state is scoped to the application. To change |**`_wcstok_l`**|``| |**`_mbstok`**, **`_mbstok_l`**|``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -158,8 +158,8 @@ tokens ## See also -[String Manipulation](../../c-runtime-library/string-manipulation-crt.md)
-[Locale](../../c-runtime-library/locale.md)
-[Interpretation of Multibyte-Character Sequences](../../c-runtime-library/interpretation-of-multibyte-character-sequences.md)
-[`strcspn`, `wcscspn`, `_mbscspn`, `_mbscspn_l`](strcspn-wcscspn-mbscspn-mbscspn-l.md)
-[`strspn`, `wcsspn`, `_mbsspn`, `_mbsspn_l`](strspn-wcsspn-mbsspn-mbsspn-l.md)
+[String manipulation](../string-manipulation-crt.md)\ +[Locale](../locale.md)\ +[Interpretation of multibyte-character sequences](../interpretation-of-multibyte-character-sequences.md)\ +[`strcspn`, `wcscspn`, `_mbscspn`, `_mbscspn_l`](strcspn-wcscspn-mbscspn-mbscspn-l.md)\ +[`strspn`, `wcsspn`, `_mbsspn`, `_mbsspn_l`](strspn-wcsspn-mbsspn-mbsspn-l.md) diff --git a/docs/c-runtime-library/reference/strtol-wcstol-strtol-l-wcstol-l.md b/docs/c-runtime-library/reference/strtol-wcstol-strtol-l-wcstol-l.md index 63de87b0e2b..6188c32f050 100644 --- a/docs/c-runtime-library/reference/strtol-wcstol-strtol-l-wcstol-l.md +++ b/docs/c-runtime-library/reference/strtol-wcstol-strtol-l-wcstol-l.md @@ -55,29 +55,29 @@ Number base to use. *`locale`*\ Locale to use. -## Return Value +## Return value **`strtol`**, **`wcstol`**, **`_strtol_l`**, and **`_wcstol_l`** return the value represented in *`string`*. They return 0 if no conversion is possible. When the representation would cause an overflow, they return **`LONG_MAX`** or **`LONG_MIN`**. -**`errno`** is set to **`ERANGE`** if overflow or underflow occurs. It's set to **`EINVAL`** if *`string`* is **`NULL`**. Or, if *`base`* is nonzero and less than 2, or greater than 36. For more information on **`ERANGE`**, **`EINVAL`**, and other return codes, see [`_doserrno`, `errno`, `_sys_errlist`, and `_sys_nerr`](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +**`errno`** is set to **`ERANGE`** if overflow or underflow occurs. It's set to **`EINVAL`** if *`string`* is **`NULL`**. Or, if *`base`* is nonzero and less than 2, or greater than 36. For more information on **`ERANGE`**, **`EINVAL`**, and other return codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks The **`strtol`**, **`wcstol`**, **`_strtol_l`**, and **`_wcstol_l`** functions convert *`string`* to a **`long`**. They stop reading *`string`* at the first character not recognized as part of a number. It may be the terminating-null character, or the first alphanumeric character greater than or equal to *`base`*. -**`wcstol`** and **`_wcstol_l`** are wide-character versions of **`strtol`** and **`_strtol_l`**. Their *`string`* argument is a wide-character string. These functions behave identically to **`strtol`** and **`_strtol_l`** otherwise. The locale's **`LC_NUMERIC`** category setting determines recognition of the radix character (the fractional marker or decimal point) in *`string`*. The functions **`strtol`** and **`wcstol`** use the current locale. **`_strtol_l`** and **`_wcstol_l`** use the locale passed in instead. For more information, see [`setlocale`] and [Locale](../../c-runtime-library/locale.md). +**`wcstol`** and **`_wcstol_l`** are wide-character versions of **`strtol`** and **`_strtol_l`**. Their *`string`* argument is a wide-character string. These functions behave identically to **`strtol`** and **`_strtol_l`** otherwise. The locale's **`LC_NUMERIC`** category setting determines recognition of the radix character (the fractional marker or decimal point) in *`string`*. The functions **`strtol`** and **`wcstol`** use the current locale. **`_strtol_l`** and **`_wcstol_l`** use the locale passed in instead. For more information, see [`setlocale`] and [Locale](../locale.md). When *`end_ptr`* is **`NULL`**, it's ignored. Otherwise, a pointer to the character that stopped the scan is stored at the location pointed to by *`end_ptr`*. No conversion is possible if no valid digits are found, or an invalid base is specified. The value of *`string`* is then stored at the location pointed to by *`end_ptr`*. **`strtol`** expects *`string`* to point to a string of the following form: -> [*whitespace*] [{**+** | **-**}] [**0** [{ **x** | **X** }]] [*alphanumerics*] +> [*`whitespace`*] [{**`+`** | **`-`**}] [**`0`** [{ **`x`** | **`X`** }]] [*`alphanumerics`*] -Square brackets (`[ ]`) surround optional elements. Curly braces and a vertical bar (`{ | }`) surround alternatives for a single element. *whitespace* may consist of space and tab characters, which are ignored. *alphanumerics* are decimal digits or the letters `'a'` through `'z'` (or `'A'` through `'Z'`). The first character that doesn't fit this form stops the scan. If *`base`* is between 2 and 36, then it's used as the base of the number. If *`base`* is `0`, the initial characters of the string pointed to by *`string`* are used to determine the base. If the first character is `0`, and the second character isn't `'x'` or `'X'`, the string is interpreted as an octal integer. If the first character is `'0'` and the second character is `'x'` or `'X'`, the string is interpreted as a hexadecimal integer. If the first character is `'1'` through `'9'`, the string is interpreted as a decimal integer. The letters `'a'` through `'z'` (or `'A'` through `'Z'`) are assigned the values 10 through 35. The scan only allows letters whose values are less than *`base`*. The first character outside the range of the base stops the scan. For example, suppose *`string`* starts with `"01"`. If *`base`* is `0`, the scanner assumes it's an octal integer. An `'8'` or `'9'` character stops the scan. +Square brackets (`[ ]`) surround optional elements. Curly braces and a vertical bar (`{ | }`) surround alternatives for a single element. *`whitespace`* may consist of space and tab characters, which are ignored. *`alphanumerics`* are decimal digits or the letters `'a'` through `'z'` (or `'A'` through `'Z'`). The first character that doesn't fit this form stops the scan. If *`base`* is between 2 and 36, then it's used as the base of the number. If *`base`* is `0`, the initial characters of the string pointed to by *`string`* are used to determine the base. If the first character is `0`, and the second character isn't `'x'` or `'X'`, the string is interpreted as an octal integer. If the first character is `'0'` and the second character is `'x'` or `'X'`, the string is interpreted as a hexadecimal integer. If the first character is `'1'` through `'9'`, the string is interpreted as a decimal integer. The letters `'a'` through `'z'` (or `'A'` through `'Z'`) are assigned the values 10 through 35. The scan only allows letters whose values are less than *`base`*. The first character outside the range of the base stops the scan. For example, suppose *`string`* starts with `"01"`. If *`base`* is `0`, the scanner assumes it's an octal integer. An `'8'` or `'9'` character stops the scan. 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| |---------------------|------------------------------------|--------------------|-----------------------| diff --git a/docs/c-runtime-library/reference/strtold-strtold-l-wcstold-wcstold-l.md b/docs/c-runtime-library/reference/strtold-strtold-l-wcstold-wcstold-l.md index c8cd508c0ba..0a2aa61d97c 100644 --- a/docs/c-runtime-library/reference/strtold-strtold-l-wcstold-wcstold-l.md +++ b/docs/c-runtime-library/reference/strtold-strtold-l-wcstold-wcstold-l.md @@ -38,45 +38,45 @@ long double wcstold_l( ### Parameters -*strSource*
+*`strSource`*\ Null-terminated string to convert. -*endptr*
+*`endptr`*\ Pointer to the character that stops the scan. -*locale*
+*`locale`*\ The locale to use. -## Return Value +## Return value **strtold** returns the value of the floating-point number as a **`long double`**, except when the representation would cause an overflow—in that case, the function returns +/-**HUGE_VALL**. The sign of **HUGE_VALL** matches the sign of the value that cannot be represented. **strtold** returns 0 if no conversion can be performed or an underflow occurs. -**wcstold** returns values analogously to **strtold**. For both functions, **errno** is set to **ERANGE** if overflow or underflow occurs and the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). +**wcstold** returns values analogously to **strtold**. For both functions, **errno** is set to **ERANGE** if overflow or underflow occurs and the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). -For more information about return codes, see [errno, _doserrno, _sys_errlist, and _sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +For more information about return codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks -Each function converts the input string *strSource* to a **`long double`**. The **strtold** function stops reading the string *strSource* at the first character it cannot recognize as part of a number. This may be the terminating null character. The wide-character version of **strtold** is **wcstold**; its *strSource* argument is a wide-character string. Otherwise, these functions behave identically. +Each function converts the input string *`strSource`* to a **`long double`**. The **strtold** function stops reading the string *`strSource`* at the first character it cannot recognize as part of a number. This may be the terminating null character. The wide-character version of **strtold** is **wcstold**; its *`strSource`* argument is a wide-character string. Otherwise, these functions behave identically. 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| |---------------------|------------------------------------|--------------------|-----------------------| |**_tcstold**|**strtold**|**strtold**|**wcstold**| |**_tcstold_l**|**_strtold_l**|**_strtold_l**|**_wcstold_l**| -The **LC_NUMERIC** category setting of the current locale determines the recognition of the radix character in *strSource*. For more information, see [setlocale, _wsetlocale](setlocale-wsetlocale.md). The functions without the **_l** suffix use the current locale; **_strtold_l** and **_wcstold_l** are identical to **_strtold** and **_wcstold** except that they instead use the locale that's passed in. For more information, see [Locale](../../c-runtime-library/locale.md). +The **LC_NUMERIC** category setting of the current locale determines the recognition of the radix character in *`strSource`*. For more information, see [`setlocale`, `_wsetlocale`](setlocale-wsetlocale.md). The functions without the **_l** suffix use the current locale; **_strtold_l** and **_wcstold_l** are identical to **_strtold** and **_wcstold** except that they instead use the locale that's passed in. For more information, see [Locale](../locale.md). -If *endptr* is not **NULL**, a pointer to the character that stopped the scan is stored at the location that's pointed to by *endptr*. If no conversion can be performed (no valid digits were found or an invalid base was specified), the value of *strSource* is stored at the location that's pointed to by *endptr*. +If *`endptr`* is not **NULL**, a pointer to the character that stopped the scan is stored at the location that's pointed to by *`endptr`*. If no conversion can be performed (no valid digits were found or an invalid base was specified), the value of *`strSource`* is stored at the location that's pointed to by *`endptr`*. -**strtold** expects *strSource* to point to a string of the following form: +**strtold** expects *`strSource`* to point to a string of the following form: -[*whitespace*] [*sign*] [*digits*] [.*digits*] [ {**d** | **D** | **e** | **E**}[*sign*]*digits*] +[*`whitespace`*] [*`sign`*] [*`digits`*] [.*`digits`*] [ {**`d`** | **`D`** | **`e`** | **`E`**}[*`sign`*]*`digits`*] -A *whitespace* may consist of space and tab characters, which are ignored; *sign* is either plus (**+**) or minus (**-**); and *digits* are one or more decimal digits. If no digits appear before the radix character, at least one must appear after the radix character. The decimal digits can be followed by an exponent, which consists of an introductory letter (**d**, **D**, **e**, or **E**) and an optionally signed integer. If neither an exponent part nor a radix character appears, a radix character is assumed to follow the last digit in the string. The first character that does not fit this form stops the scan. +A *`whitespace`* may consist of space and tab characters, which are ignored; *`sign`* is either plus (**`+`**) or minus (**`-`**); and *`digits`* are one or more decimal digits. If no digits appear before the radix character, at least one must appear after the radix character. The decimal digits can be followed by an exponent, which consists of an introductory letter (**`d`**, **`D`**, **`e`**, or **`E`**) and an optionally signed integer. If neither an exponent part nor a radix character appears, a radix character is assumed to follow the last digit in the string. The first character that does not fit this form stops the scan. ## Requirements @@ -85,7 +85,7 @@ A *whitespace* may consist of space and tab characters, which are ignored; *sign |**strtold**, **_strtold_l**|\| |**wcstold**, **_wcstold_l**|\ or \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -120,15 +120,15 @@ string = 3.1415926535898This stopped it ## See also -[Data Conversion](../../c-runtime-library/data-conversion.md)
-[Floating-Point Support](../../c-runtime-library/floating-point-support.md)
-[Interpretation of Multibyte-Character Sequences](../../c-runtime-library/interpretation-of-multibyte-character-sequences.md)
-[Locale](../../c-runtime-library/locale.md)
-[String to Numeric Value Functions](../../c-runtime-library/string-to-numeric-value-functions.md)
-[strtod, _strtod_l, wcstod, _wcstod_l](strtod-strtod-l-wcstod-wcstod-l.md)
-[strtol, wcstol, _strtol_l, _wcstol_l](strtol-wcstol-strtol-l-wcstol-l.md)
-[strtoul, _strtoul_l, wcstoul, _wcstoul_l](strtoul-strtoul-l-wcstoul-wcstoul-l.md)
-[atof, _atof_l, _wtof, _wtof_l](atof-atof-l-wtof-wtof-l.md)
-[localeconv](localeconv.md)
-[_create_locale, _wcreate_locale](create-locale-wcreate-locale.md)
-[_free_locale](free-locale.md)
+[Data conversion](../data-conversion.md)\ +[Math and floating-point support](../floating-point-support.md)\ +[Interpretation of multibyte-character sequences](../interpretation-of-multibyte-character-sequences.md)\ +[Locale](../locale.md)\ +[String to numeric value functions](../string-to-numeric-value-functions.md)\ +[`strtod`, `_strtod_l`, `wcstod`, `_wcstod_l`](strtod-strtod-l-wcstod-wcstod-l.md)\ +[`strtol`, `wcstol`, `_strtol_l`, `_wcstol_l`](strtol-wcstol-strtol-l-wcstol-l.md)\ +[`strtoul`, `_strtoul_l`, `wcstoul`, `_wcstoul_l`](strtoul-strtoul-l-wcstoul-wcstoul-l.md)\ +[`atof`, `_atof_l`, `_wtof`, `_wtof_l`](atof-atof-l-wtof-wtof-l.md)\ +[`localeconv`](localeconv.md)\ +[`_create_locale`, `_wcreate_locale`](create-locale-wcreate-locale.md)\ +[`_free_locale`](free-locale.md) diff --git a/docs/c-runtime-library/reference/strtoll-strtoll-l-wcstoll-wcstoll-l.md b/docs/c-runtime-library/reference/strtoll-strtoll-l-wcstoll-wcstoll-l.md index 16cf930ece7..ae66010f3b2 100644 --- a/docs/c-runtime-library/reference/strtoll-strtoll-l-wcstoll-wcstoll-l.md +++ b/docs/c-runtime-library/reference/strtoll-strtoll-l-wcstoll-wcstoll-l.md @@ -43,50 +43,50 @@ long long _wcstoll_l( ### Parameters -*strSource*
+*`strSource`*\ Null-terminated string to convert. -*endptr*
+*`endptr`*\ Pointer to the character that stops the scan. -*base*
+*`base`*\ Number base to use. -*locale*
+*`locale`*\ The locale to use. -## Return Value +## Return value -**strtoll** returns the value that's represented in the string *strSource*, except when the representation would cause an overflow—in that case, it returns **LLONG_MAX** or **LLONG_MIN**. The function returns 0 if no conversion can be performed. **wcstoll** returns values analogously to **strtoll**. +**strtoll** returns the value that's represented in the string *`strSource`*, except when the representation would cause an overflow—in that case, it returns **LLONG_MAX** or **LLONG_MIN**. The function returns 0 if no conversion can be performed. **wcstoll** returns values analogously to **strtoll**. **LLONG_MAX** and **LLONG_MIN** are defined in LIMITS.H. -If *strSource* is **NULL** or the *base* is nonzero and either less than 2 or greater than 36, **errno** is set to **EINVAL**. +If *`strSource`* is **NULL** or the *`base`* is nonzero and either less than 2 or greater than 36, **errno** is set to **EINVAL**. -For more information about return codes, see [errno, _doserrno, _sys_errlist, and _sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +For more information about return codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks -The **strtoll** function converts *strSource* to a **`long long`**. Both functions stop reading the string *strSource* at the first character they cannot recognize as part of a number. This may be the terminating null character, or it may be the first numeric character that's greater than or equal to *base*. **wcstoll** is a wide-character version of **strtoll**; its *strSource* argument is a wide-character string. Otherwise, these functions behave identically. +The **strtoll** function converts *`strSource`* to a **`long long`**. Both functions stop reading the string *`strSource`* at the first character they cannot recognize as part of a number. This may be the terminating null character, or it may be the first numeric character that's greater than or equal to *`base`*. **wcstoll** is a wide-character version of **strtoll**; its *`strSource`* argument is a wide-character string. Otherwise, these functions behave identically. 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| |---------------------|------------------------------------|--------------------|-----------------------| |**_tcstoll**|**strtoll**|**strtoll**|**wcstoll**| |**_tcstoll_l**|**_strtoll_l**|**_strtoll_l**|**_wcstoll_l**| -The locale's **LC_NUMERIC** category setting determines recognition of the radix character in *strSource*; for more information, see [setlocale, _wsetlocale](setlocale-wsetlocale.md). The functions that don't have the **_l** suffix use the current locale; **_strtoll_l** and **_wcstoll_l** are identical to the corresponding functions that don't have the suffix, except that they instead use the locale that's passed in. For more information, see [Locale](../../c-runtime-library/locale.md). +The locale's **LC_NUMERIC** category setting determines recognition of the radix character in *`strSource`*; for more information, see [`setlocale`, `_wsetlocale`](setlocale-wsetlocale.md). The functions that don't have the **_l** suffix use the current locale; **_strtoll_l** and **_wcstoll_l** are identical to the corresponding functions that don't have the suffix, except that they instead use the locale that's passed in. For more information, see [Locale](../locale.md). -If *endptr* is not **NULL**, a pointer to the character that stopped the scan is stored at the location that's pointed to by *endptr*. If no conversion can be performed (no valid digits were found or an invalid base was specified), the value of *strSource* is stored at the location that's pointed to by *endptr*. +If *`endptr`* is not **NULL**, a pointer to the character that stopped the scan is stored at the location that's pointed to by *`endptr`*. If no conversion can be performed (no valid digits were found or an invalid base was specified), the value of *`strSource`* is stored at the location that's pointed to by *`endptr`*. -**strtoll** expects *strSource* to point to a string of the following form: +**strtoll** expects *`strSource`* to point to a string of the following form: -> [*whitespace*] [{**+** | **-**}] [**0** [{ **x** | **X** }]] [*digits* | *letters*] +> [*`whitespace`*] [{**`+`** | **`-`**}] [**`0`** [{ **`x`** | **`X`** }]] [*`digits`* | *`letters`*] -A *whitespace* may consist of space and tab characters, which are ignored; *digits* are one or more decimal digits; *letters* are one or more of the letters 'a' through 'z' (or 'A' through 'Z'). The first character that does not fit this form stops the scan. If *base* is between 2 and 36, then it is used as the base of the number. If *base* is 0, the initial characters of the string that's pointed to by *strSource* are used to determine the base. If the first character is '0' and the second character is not 'x' or 'X', the string is interpreted as an octal integer. If the first character is '0' and the second character is 'x' or 'X', the string is interpreted as a hexadecimal integer. If the first character is '1' through '9', the string is interpreted as a decimal integer. The letters 'a' through 'z' (or 'A' through 'Z') are assigned the values 10 through 35; only letters whose assigned values are less than *base* are permitted. The first character outside the range of the base stops the scan. For example, if *base* is 0 and the first character scanned is '0', an octal integer is assumed and an '8' or '9' character stops the scan. +A *`whitespace`* may consist of space and tab characters, which are ignored; *`digits`* are one or more decimal digits; *`letters`* are one or more of the letters 'a' through 'z' (or 'A' through 'Z'). The first character that does not fit this form stops the scan. If *`base`* is between 2 and 36, then it is used as the base of the number. If *`base`* is 0, the initial characters of the string that's pointed to by *`strSource`* are used to determine the base. If the first character is '0' and the second character is not 'x' or 'X', the string is interpreted as an octal integer. If the first character is '0' and the second character is 'x' or 'X', the string is interpreted as a hexadecimal integer. If the first character is '1' through '9', the string is interpreted as a decimal integer. The letters 'a' through 'z' (or 'A' through 'Z') are assigned the values 10 through 35; only letters whose assigned values are less than *`base`* are permitted. The first character outside the range of the base stops the scan. For example, if *`base`* is 0 and the first character scanned is '0', an octal integer is assumed and an '8' or '9' character stops the scan. ## Requirements @@ -95,16 +95,16 @@ A *whitespace* may consist of space and tab characters, which are ignored; *digi |**strtoll**, **_strtoll_l**|\| |**wcstoll**, **_wcstoll_l**|\ or \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Data Conversion](../../c-runtime-library/data-conversion.md)
-[Locale](../../c-runtime-library/locale.md)
-[localeconv](localeconv.md)
-[setlocale, _wsetlocale](setlocale-wsetlocale.md)
-[String to Numeric Value Functions](../../c-runtime-library/string-to-numeric-value-functions.md)
-[strtod, _strtod_l, wcstod, _wcstod_l](strtod-strtod-l-wcstod-wcstod-l.md)
-[strtol, wcstol, _strtol_l, _wcstol_l](strtol-wcstol-strtol-l-wcstol-l.md)
-[strtoul, _strtoul_l, wcstoul, _wcstoul_l](strtoul-strtoul-l-wcstoul-wcstoul-l.md)
-[atof, _atof_l, _wtof, _wtof_l](atof-atof-l-wtof-wtof-l.md)
+[Data conversion](../data-conversion.md)\ +[Locale](../locale.md)\ +[`localeconv`](localeconv.md)\ +[`setlocale`, `_wsetlocale`](setlocale-wsetlocale.md)\ +[String to numeric value functions](../string-to-numeric-value-functions.md)\ +[`strtod`, `_strtod_l`, `wcstod`, `_wcstod_l`](strtod-strtod-l-wcstod-wcstod-l.md)\ +[`strtol`, `wcstol`, `_strtol_l`, `_wcstol_l`](strtol-wcstol-strtol-l-wcstol-l.md)\ +[`strtoul`, `_strtoul_l`, `wcstoul`, `_wcstoul_l`](strtoul-strtoul-l-wcstoul-wcstoul-l.md)\ +[`atof`, `_atof_l`, `_wtof`, `_wtof_l`](atof-atof-l-wtof-wtof-l.md) diff --git a/docs/c-runtime-library/reference/strtoui64-wcstoui64-strtoui64-l-wcstoui64-l.md b/docs/c-runtime-library/reference/strtoui64-wcstoui64-strtoui64-l-wcstoui64-l.md index 3f0cedf5adf..1fd9cc191eb 100644 --- a/docs/c-runtime-library/reference/strtoui64-wcstoui64-strtoui64-l-wcstoui64-l.md +++ b/docs/c-runtime-library/reference/strtoui64-wcstoui64-strtoui64-l-wcstoui64-l.md @@ -63,7 +63,7 @@ Locale to use. If *`strSource`* is **`NULL`** or the *`base`* is nonzero and either less than 2 or greater than 36, **`errno`** is set to **`EINVAL`**. -For more information on return codes, see [`_doserrno`, `errno`, `_sys_errlist`, and `_sys_nerr`](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +For more information on return codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks @@ -80,15 +80,15 @@ By default, this function's global state is scoped to the application. To change |**`_tcstoui64`**|**`_strtoui64`**|**`_strtoui64`**|**`_wcstoui64`**| |**`_tcstoui64_l`**|**`_strtoui64_l`**|**`_strtoui64_l`**|**`_wcstoui64_l`**| -The current locale's **`LC_NUMERIC`** category setting determines recognition of the radix character in *`strSource`*; for more information, see [`setlocale`](setlocale-wsetlocale.md). The functions without the **`_l`** suffix use the current locale; **`_strtoui64_l`** and **`_wcstoui64_l`** are identical to the corresponding functions without the **`_l`** suffix except that they use the locale passed in instead. For more information, see [Locale](../../c-runtime-library/locale.md). +The current locale's **`LC_NUMERIC`** category setting determines recognition of the radix character in *`strSource`*; for more information, see [`setlocale`](setlocale-wsetlocale.md). The functions without the **`_l`** suffix use the current locale; **`_strtoui64_l`** and **`_wcstoui64_l`** are identical to the corresponding functions without the **`_l`** suffix except that they use the locale passed in instead. For more information, see [Locale](../locale.md). If *`endptr`* isn't **`NULL`**, a pointer to the character that stopped the scan is stored at the location pointed to by *`endptr`*. If no conversion can be performed (no valid digits were found or an invalid base was specified), the value of *`strSource`* is stored at the location pointed to by *`endptr`*. **`_strtoui64`** expects *`strSource`* to point to a string of the following form: -> [*whitespace*] [{**`+`** \| **`-`**}] [**`0`** [{ **`x`** \| **`X`** }]] [*digits* \| *letters*] +> [*`whitespace`*] [{**`+`** \| **`-`**}] [**`0`** [{ **`x`** \| **`X`** }]] [*`digits`* \| *`letters`*] -A *whitespace* may consist of space and tab characters, which are ignored. *digits* are one or more decimal digits. *letters* are one or more of the letters 'a' through 'z' (or 'A' through 'Z'). The first character that doesn't fit this form stops the scan. If *`base`* is between 2 and 36, then it's used as the base of the number. If *`base`* is 0, the initial characters of the string pointed to by *`strSource`* are used to determine the base. If the first character is '0' and the second character isn't 'x' or 'X', the string is interpreted as an octal integer. If the first character is '0' and the second character is 'x' or 'X', the string is interpreted as a hexadecimal integer. If the first character is '1' through '9', the string is interpreted as a decimal integer. The letters 'a' through 'z' (or 'A' through 'Z') are assigned the values 10 through 35; only letters whose assigned values are less than *`base`* are permitted. The first character outside the range of the base stops the scan. For example, if *`base`* is 0 and the first character scanned is '0', an octal integer is assumed and an '8' or '9' character will stop the scan. +A *`whitespace`* may consist of space and tab characters, which are ignored. *`digits`* are one or more decimal digits. *`letters`* are one or more of the letters 'a' through 'z' (or 'A' through 'Z'). The first character that doesn't fit this form stops the scan. If *`base`* is between 2 and 36, then it's used as the base of the number. If *`base`* is 0, the initial characters of the string pointed to by *`strSource`* are used to determine the base. If the first character is '0' and the second character isn't 'x' or 'X', the string is interpreted as an octal integer. If the first character is '0' and the second character is 'x' or 'X', the string is interpreted as a hexadecimal integer. If the first character is '1' through '9', the string is interpreted as a decimal integer. The letters 'a' through 'z' (or 'A' through 'Z') are assigned the values 10 through 35; only letters whose assigned values are less than *`base`* are permitted. The first character outside the range of the base stops the scan. For example, if *`base`* is 0 and the first character scanned is '0', an octal integer is assumed and an '8' or '9' character will stop the scan. ## Requirements @@ -99,7 +99,7 @@ A *whitespace* may consist of space and tab characters, which are ignored. *digi | **`_strtoui64_l`** | `` | | **`_wcstoui64_l`** | `` or `` | -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -123,11 +123,11 @@ u = 18446744073709551615 ## See also -[Data conversion](../../c-runtime-library/data-conversion.md)\ -[Locale](../../c-runtime-library/locale.md)\ +[Data conversion](../data-conversion.md)\ +[Locale](../locale.md)\ [`localeconv`](localeconv.md)\ [`setlocale`, `_wsetlocale`](setlocale-wsetlocale.md)\ -[String to numeric value functions](../../c-runtime-library/string-to-numeric-value-functions.md)\ +[String to numeric value functions](../string-to-numeric-value-functions.md)\ [`strtod`, `_strtod_l`, `wcstod`, `_wcstod_l`](strtod-strtod-l-wcstod-wcstod-l.md)\ [`strtoul`, `_strtoul_l`, `wcstoul`, `_wcstoul_l`](strtoul-strtoul-l-wcstoul-wcstoul-l.md)\ [`atof`, `_atof_l`, `_wtof`, `_wtof_l`](atof-atof-l-wtof-wtof-l.md) diff --git a/docs/c-runtime-library/reference/strtoul-strtoul-l-wcstoul-wcstoul-l.md b/docs/c-runtime-library/reference/strtoul-strtoul-l-wcstoul-wcstoul-l.md index 654ce826557..5c04ce7b8bd 100644 --- a/docs/c-runtime-library/reference/strtoul-strtoul-l-wcstoul-wcstoul-l.md +++ b/docs/c-runtime-library/reference/strtoul-strtoul-l-wcstoul-wcstoul-l.md @@ -54,17 +54,17 @@ Number base to use. *`locale`*\ Locale to use. -## Return Value +## Return value **`strtoul`** returns the converted value, if any, or **`ULONG_MAX`** on overflow. **`strtoul`** returns 0 if no conversion can be performed. **`wcstoul`** returns values analogously to **`strtoul`**. For both functions, **`errno`** is set to **`ERANGE`** if overflow or underflow occurs. -For more information about return codes, see [`_doserrno`, `errno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). +For more information about return codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks Each of these functions converts the input string *`strSource`* to an **`unsigned long`**. -**`strtoul`** stops reading the string *`strSource`* at the first character it can't recognize as part of a number. This character may be the terminating `NULL`, or it may be the first numeric character greater than or equal to *`base`*. The **`LC_NUMERIC`** category setting of the locale determines recognition of the radix character in *`strSource`*; for more information, see [`setlocale`](setlocale-wsetlocale.md). **`strtoul`** and **`wcstoul`** use the current locale; **`_strtoul_l`** and **`_wcstoul_l`** are identical except that they use the locale passed in instead. For more information, see [Locale](../../c-runtime-library/locale.md). +**`strtoul`** stops reading the string *`strSource`* at the first character it can't recognize as part of a number. This character may be the terminating `NULL`, or it may be the first numeric character greater than or equal to *`base`*. The **`LC_NUMERIC`** category setting of the locale determines recognition of the radix character in *`strSource`*; for more information, see [`setlocale`](setlocale-wsetlocale.md). **`strtoul`** and **`wcstoul`** use the current locale; **`_strtoul_l`** and **`_wcstoul_l`** are identical except that they use the locale passed in instead. For more information, see [Locale](../locale.md). If *`endptr`* isn't **`NULL`**, a pointer to the character that stopped the scan is stored at the location pointed to by *`endptr`*. If no conversion can be performed (no valid digits were found or an invalid base was specified), the value of *`strSource`* is stored at the location pointed to by *`endptr`*. @@ -72,7 +72,7 @@ If *`endptr`* isn't **`NULL`**, a pointer to the character that stopped the scan 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| |---------------------|------------------------------------|--------------------|-----------------------| @@ -94,7 +94,7 @@ A *`whitespace`* may consist of space and tab characters, which are ignored. *`d |**`_strtoul_l`**|``| |**`_wcstoul_l`**|`` or ``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -102,11 +102,11 @@ See the example for [`strtod`](strtod-strtod-l-wcstod-wcstod-l.md). ## See also -[Data Conversion](../../c-runtime-library/data-conversion.md)\ -[Locale](../../c-runtime-library/locale.md)\ +[Data conversion](../data-conversion.md)\ +[Locale](../locale.md)\ [`localeconv`](localeconv.md)\ [`setlocale`, `_wsetlocale`](setlocale-wsetlocale.md)\ -[String to Numeric Value Functions](../../c-runtime-library/string-to-numeric-value-functions.md)\ +[String to numeric value functions](../string-to-numeric-value-functions.md)\ [`strtod`, `_strtod_l`, `wcstod`, `_wcstod_l`](strtod-strtod-l-wcstod-wcstod-l.md)\ [`strtol`, `wcstol`, `_strtol_l`, `_wcstol_l`](strtol-wcstol-strtol-l-wcstol-l.md)\ [`atof`, `_atof_l`, `_wtof`, `_wtof_l`](atof-atof-l-wtof-wtof-l.md) diff --git a/docs/c-runtime-library/reference/strtoull-strtoull-l-wcstoull-wcstoull-l.md b/docs/c-runtime-library/reference/strtoull-strtoull-l-wcstoull-wcstoull-l.md index 259f762aed9..e5300aee424 100644 --- a/docs/c-runtime-library/reference/strtoull-strtoull-l-wcstoull-wcstoull-l.md +++ b/docs/c-runtime-library/reference/strtoull-strtoull-l-wcstoull-wcstoull-l.md @@ -43,48 +43,48 @@ unsigned long long _wcstoull_l( ### Parameters -*strSource*
+*`strSource`*\ Null-terminated string to convert. -*endptr*
+*`endptr`*\ Pointer to the character that stops the scan. -*base*
+*`base`*\ Number base to use. -*locale*
+*`locale`*\ Locale to use. -## Return Value +## Return value **strtoull** returns the converted value, if any, or **ULLONG_MAX** on overflow. **strtoull** returns 0 if no conversion can be performed. **wcstoull** returns values analogously to **strtoull**. For both functions, **errno** is set to **ERANGE** if overflow or underflow occurs. -For more information about return codes, see [errno, _doserrno, _sys_errlist, and _sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +For more information about return codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks -Each of these functions converts the input string *strSource* to an **`unsigned long long`** integer value. +Each of these functions converts the input string *`strSource`* to an **`unsigned long long`** integer value. -**strtoull** stops reading the string *strSource* at the first character it cannot recognize as part of a number. This may be the terminating null character, or it may be the first numeric character that's greater than or equal to *base*. The setting of the **LC_NUMERIC** category of the locale determines recognition of the radix character in *strSource*; for more information, see [setlocale, _wsetlocale](setlocale-wsetlocale.md). **strtoull** and **wcstoull** use the current locale; **_strtoull_l** and **_wcstoull_l** instead use the locale that's passed in but are identical otherwise. For more information, see [Locale](../../c-runtime-library/locale.md). +**strtoull** stops reading the string *`strSource`* at the first character it cannot recognize as part of a number. This may be the terminating null character, or it may be the first numeric character that's greater than or equal to *`base`*. The setting of the **LC_NUMERIC** category of the locale determines recognition of the radix character in *`strSource`*; for more information, see [`setlocale`, `_wsetlocale`](setlocale-wsetlocale.md). **strtoull** and **wcstoull** use the current locale; **_strtoull_l** and **_wcstoull_l** instead use the locale that's passed in but are identical otherwise. For more information, see [Locale](../locale.md). -If *endptr* is not **NULL**, a pointer to the character that stopped the scan is stored at the location that's pointed to by *endptr*. If no conversion can be performed (no valid digits were found or an invalid base was specified), the value of *strSource* is stored at the location that's pointed to by *endptr*. +If *`endptr`* is not **NULL**, a pointer to the character that stopped the scan is stored at the location that's pointed to by *`endptr`*. If no conversion can be performed (no valid digits were found or an invalid base was specified), the value of *`strSource`* is stored at the location that's pointed to by *`endptr`*. -**wcstoull** is a wide-character version of **strtoull** and its *strSource* argument is a wide-character string. Otherwise, these functions behave identically. +**wcstoull** is a wide-character version of **strtoull** and its *`strSource`* argument is a wide-character string. Otherwise, these functions behave identically. 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| |---------------------|------------------------------------|--------------------|-----------------------| |**_tcstoull**|**strtoull**|**strtoull**|**wcstoull**| |**_tcstoull_l**|**strtoull_l**|**_strtoull_l**|**_wcstoull_l**| -**strtoull** expects *strSource* to point to a string of the following form: +**strtoull** expects *`strSource`* to point to a string of the following form: -> [*whitespace*] [{**+** | **-**}] [**0** [{ **x** | **X** }]] [*digits* | *letters*] +> [*`whitespace`*] [{**`+`** | **`-`**}] [**`0`** [{ **`x`** | **`X`** }]] [*`digits`* | *`letters`*] -A *whitespace* may consist of space and tab characters, which are ignored. *digits* are one or more decimal digits. *letters* are one or more of the letters 'a' through 'z' (or 'A' through 'Z'). The first character that does not fit this form stops the scan. If *base* is between 2 and 36, then it is used as the base of the number. If *base* is 0, the initial characters of the string that's pointed to by *strSource* are used to determine the base. If the first character is '0' and the second character is not 'x' or 'X', the string is interpreted as an octal integer. If the first character is '0' and the second character is 'x' or 'X', the string is interpreted as a hexadecimal integer. If the first character is '1' through '9', the string is interpreted as a decimal integer. The letters 'a' through 'z' (or 'A' through 'Z') are assigned the values 10 through 35; only letters whose assigned values are less than *base* are permitted. The first character outside the range of the base stops the scan. For example, if *base* is 0 and the first character scanned is '0', an octal integer is assumed and an '8' or '9' character stops the scan. **strtoull** allows a plus sign (**+**) or minus sign (**-**) prefix; a leading minus sign indicates that the return value is negated. +A *`whitespace`* may consist of space and tab characters, which are ignored. *`digits`* are one or more decimal digits. *`letters`* are one or more of the letters 'a' through 'z' (or 'A' through 'Z'). The first character that does not fit this form stops the scan. If *`base`* is between 2 and 36, then it is used as the base of the number. If *`base`* is 0, the initial characters of the string that's pointed to by *`strSource`* are used to determine the base. If the first character is '0' and the second character is not 'x' or 'X', the string is interpreted as an octal integer. If the first character is '0' and the second character is 'x' or 'X', the string is interpreted as a hexadecimal integer. If the first character is '1' through '9', the string is interpreted as a decimal integer. The letters 'a' through 'z' (or 'A' through 'Z') are assigned the values 10 through 35; only letters whose assigned values are less than *`base`* are permitted. The first character outside the range of the base stops the scan. For example, if *`base`* is 0 and the first character scanned is '0', an octal integer is assumed and an '8' or '9' character stops the scan. **strtoull** allows a plus sign (**`+`**) or minus sign (**`-`**) prefix; a leading minus sign indicates that the return value is negated. ## Requirements @@ -95,21 +95,21 @@ A *whitespace* may consist of space and tab characters, which are ignored. *digi |**_strtoull_l**|\| |**_wcstoull_l**|\ or \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example -See the example for [strtod](strtod-strtod-l-wcstod-wcstod-l.md). +See the example for [`strtod`](strtod-strtod-l-wcstod-wcstod-l.md). ## See also -[Data Conversion](../../c-runtime-library/data-conversion.md)
-[Locale](../../c-runtime-library/locale.md)
-[localeconv](localeconv.md)
-[setlocale, _wsetlocale](setlocale-wsetlocale.md)
-[String to Numeric Value Functions](../../c-runtime-library/string-to-numeric-value-functions.md)
-[strtod, _strtod_l, wcstod, _wcstod_l](strtod-strtod-l-wcstod-wcstod-l.md)
-[strtol, wcstol, _strtol_l, _wcstol_l](strtol-wcstol-strtol-l-wcstol-l.md)
-[strtoul, _strtoul_l, wcstoul, _wcstoul_l](strtoul-strtoul-l-wcstoul-wcstoul-l.md)
-[strtoll, _strtoll_l, wcstoll, _wcstoll_l](strtoll-strtoll-l-wcstoll-wcstoll-l.md)
-[atof, _atof_l, _wtof, _wtof_l](atof-atof-l-wtof-wtof-l.md)
+[Data conversion](../data-conversion.md)\ +[Locale](../locale.md)\ +[`localeconv`](localeconv.md)\ +[`setlocale`, `_wsetlocale`](setlocale-wsetlocale.md)\ +[String to numeric value functions](../string-to-numeric-value-functions.md)\ +[`strtod`, `_strtod_l`, `wcstod`, `_wcstod_l`](strtod-strtod-l-wcstod-wcstod-l.md)\ +[`strtol`, `wcstol`, `_strtol_l`, `_wcstol_l`](strtol-wcstol-strtol-l-wcstol-l.md)\ +[`strtoul`, `_strtoul_l`, `wcstoul`, `_wcstoul_l`](strtoul-strtoul-l-wcstoul-wcstoul-l.md)\ +[`strtoll`, `_strtoll_l`, `wcstoll`, `_wcstoll_l`](strtoll-strtoll-l-wcstoll-wcstoll-l.md)\ +[`atof`, `_atof_l`, `_wtof`, `_wtof_l`](atof-atof-l-wtof-wtof-l.md) diff --git a/docs/c-runtime-library/reference/strtoumax-strtoumax-l-wcstoumax-wcstoumax-l.md b/docs/c-runtime-library/reference/strtoumax-strtoumax-l-wcstoumax-wcstoumax-l.md index 1ddea3cf0ba..32118469621 100644 --- a/docs/c-runtime-library/reference/strtoumax-strtoumax-l-wcstoumax-wcstoumax-l.md +++ b/docs/c-runtime-library/reference/strtoumax-strtoumax-l-wcstoumax-wcstoumax-l.md @@ -43,46 +43,46 @@ uintmax_t _wcstoumax_l( ### Parameters -*strSource*
+*`strSource`*\ Null-terminated string to convert. -*endptr*
+*`endptr`*\ Pointer to the character that stops the scan. -*base*
+*`base`*\ Number base to use. -*locale*
+*`locale`*\ Locale to use. -## Return Value +## Return value **strtoumax** returns the converted value, if any, or **UINTMAX_MAX** on overflow. **strtoumax** returns 0 if no conversion can be performed. **wcstoumax** returns values analogously to **strtoumax**. For both functions, **errno** is set to **ERANGE** if overflow or underflow occurs. -For more information about return codes, see [errno, _doserrno, _sys_errlist, and _sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +For more information about return codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks -Each of these functions converts the input string *strSource* to a **uintmax_t** integer value. +Each of these functions converts the input string *`strSource`* to a **uintmax_t** integer value. -**strtoumax** stops reading the string *strSource* at the first character it cannot recognize as part of a number. This may be the terminating null character, or it may be the first numeric character that's greater than or equal to *base*. The **LC_NUMERIC** category setting of the locale determines the recognition of the radix character in *strSource*. For more information, see [setlocale, _wsetlocale](setlocale-wsetlocale.md). **strtoumax** and **wcstoumax** use the current locale; **_strtoumax_l** and **_wcstoumax_l** are identical except that they instead use the locale that's passed in. For more information, see [Locale](../../c-runtime-library/locale.md). +**strtoumax** stops reading the string *`strSource`* at the first character it cannot recognize as part of a number. This may be the terminating null character, or it may be the first numeric character that's greater than or equal to *`base`*. The **LC_NUMERIC** category setting of the locale determines the recognition of the radix character in *`strSource`*. For more information, see [`setlocale`, `_wsetlocale`](setlocale-wsetlocale.md). **strtoumax** and **wcstoumax** use the current locale; **_strtoumax_l** and **_wcstoumax_l** are identical except that they instead use the locale that's passed in. For more information, see [Locale](../locale.md). -If *endptr* is not **NULL**, a pointer to the character that stopped the scan is stored at the location that's pointed to by *endptr*. If no conversion can be performed (no valid digits were found or an invalid base was specified), the value of *strSource* is stored at the location that's pointed to by *endptr*. +If *`endptr`* is not **NULL**, a pointer to the character that stopped the scan is stored at the location that's pointed to by *`endptr`*. If no conversion can be performed (no valid digits were found or an invalid base was specified), the value of *`strSource`* is stored at the location that's pointed to by *`endptr`*. -The wide-character version of **strtoumax** is **wcstoumax**; its *strSource* argument is a wide-character string. Otherwise, these functions behave identically. +The wide-character version of **strtoumax** is **wcstoumax**; its *`strSource`* argument is a wide-character string. Otherwise, these functions behave identically. -### Generic-Text Routine Mappings +### Generic-text routine mappings |TCHAR.H routine|_UNICODE & _MBCS not defined|_MBCS defined|_UNICODE defined| |---------------------|------------------------------------|--------------------|-----------------------| |**_tcstoumax**|**strtoumax**|**strtoumax**|**wcstoumax**| |**_tcstoumax_l**|**strtoumax_l**|**_strtoumax_l**|**_wcstoumax_l**| -**strtoumax** expects *strSource* to point to a string of the following form: +**strtoumax** expects *`strSource`* to point to a string of the following form: -> [*whitespace*] [{**+** | **-**}] [**0** [{ **x** | **X** }]] [*digits* | *letters*] +> [*`whitespace`*] [{**`+`** | **`-`**}] [**`0`** [{ **`x`** | **`X`** }]] [*`digits`* | *`letters`*] -A *whitespace* may consist of space and tab characters, which are ignored. *digits* are one or more decimal digits. *letters* are one or more of the letters 'a' through 'z' (or 'A' through 'Z'). The first character that does not fit this form stops the scan. If *base* is between 2 and 36, then it is used as the base of the number. If *base* is 0, the initial characters of the string that's pointed to by *strSource* are used to determine the base. If the first character is '0' and the second character is not 'x' or 'X', the string is interpreted as an octal integer. If the first character is '0' and the second character is 'x' or 'X', the string is interpreted as a hexadecimal integer. If the first character is '1' through '9', the string is interpreted as a decimal integer. The letters 'a' through 'z' (or 'A' through 'Z') are assigned the values 10 through 35; only letters whose assigned values are less than *base* are permitted. The first character outside the range of the base stops the scan. For example, if *base* is 0 and the first character scanned is '0', an octal integer is assumed and an '8' or '9' character would stop the scan. **strtoumax** allows a plus sign (**+**) or minus sign (**-**) prefix; a leading minus sign indicates that the return value is the two's complement of the absolute value of the converted string. +A *`whitespace`* may consist of space and tab characters, which are ignored. *`digits`* are one or more decimal digits. *`letters`* are one or more of the letters 'a' through 'z' (or 'A' through 'Z'). The first character that does not fit this form stops the scan. If *`base`* is between 2 and 36, then it is used as the base of the number. If *`base`* is 0, the initial characters of the string that's pointed to by *`strSource`* are used to determine the base. If the first character is '0' and the second character is not 'x' or 'X', the string is interpreted as an octal integer. If the first character is '0' and the second character is 'x' or 'X', the string is interpreted as a hexadecimal integer. If the first character is '1' through '9', the string is interpreted as a decimal integer. The letters 'a' through 'z' (or 'A' through 'Z') are assigned the values 10 through 35; only letters whose assigned values are less than *`base`* are permitted. The first character outside the range of the base stops the scan. For example, if *`base`* is 0 and the first character scanned is '0', an octal integer is assumed and an '8' or '9' character would stop the scan. **strtoumax** allows a plus sign (**`+`**) or minus sign (**`-`**) prefix; a leading minus sign indicates that the return value is the two's complement of the absolute value of the converted string. ## Requirements @@ -93,22 +93,22 @@ A *whitespace* may consist of space and tab characters, which are ignored. *digi |**_strtoumax_l**|\| |**_wcstoumax_l**|\ or \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example -See the example for [strtod](strtod-strtod-l-wcstod-wcstod-l.md). +See the example for [`strtod`](strtod-strtod-l-wcstod-wcstod-l.md). ## See also -[Data Conversion](../../c-runtime-library/data-conversion.md)
-[Locale](../../c-runtime-library/locale.md)
-[localeconv](localeconv.md)
-[setlocale, _wsetlocale](setlocale-wsetlocale.md)
-[String to Numeric Value Functions](../../c-runtime-library/string-to-numeric-value-functions.md)
-[strtod, _strtod_l, wcstod, _wcstod_l](strtod-strtod-l-wcstod-wcstod-l.md)
-[strtoimax, _strtoimax_l, wcstoimax, _wcstoimax_l](strtoimax-strtoimax-l-wcstoimax-wcstoimax-l.md)
-[strtol, wcstol, _strtol_l, _wcstol_l](strtol-wcstol-strtol-l-wcstol-l.md)
-[strtoul, _strtoul_l, wcstoul, _wcstoul_l](strtoul-strtoul-l-wcstoul-wcstoul-l.md)
-[strtoll, _strtoll_l, wcstoll, _wcstoll_l](strtoll-strtoll-l-wcstoll-wcstoll-l.md)
-[atof, _atof_l, _wtof, _wtof_l](atof-atof-l-wtof-wtof-l.md)
+[Data conversion](../data-conversion.md)\ +[Locale](../locale.md)\ +[`localeconv`](localeconv.md)\ +[`setlocale`, `_wsetlocale`](setlocale-wsetlocale.md)\ +[String to numeric value functions](../string-to-numeric-value-functions.md)\ +[`strtod`, `_strtod_l`, `wcstod`, `_wcstod_l`](strtod-strtod-l-wcstod-wcstod-l.md)\ +[`strtoimax`, `_strtoimax_l`, `wcstoimax`, `_wcstoimax_l`](strtoimax-strtoimax-l-wcstoimax-wcstoimax-l.md)\ +[`strtol`, `wcstol`, `_strtol_l`, `_wcstol_l`](strtol-wcstol-strtol-l-wcstol-l.md)\ +[`strtoul`, `_strtoul_l`, `wcstoul`, `_wcstoul_l`](strtoul-strtoul-l-wcstoul-wcstoul-l.md)\ +[`strtoll`, `_strtoll_l`, `wcstoll`, `_wcstoll_l`](strtoll-strtoll-l-wcstoll-wcstoll-l.md)\ +[`atof`, `_atof_l`, `_wtof`, `_wtof_l`](atof-atof-l-wtof-wtof-l.md) diff --git a/docs/c-runtime-library/reference/strupr-s-strupr-s-l-mbsupr-s-mbsupr-s-l-wcsupr-s-wcsupr-s-l.md b/docs/c-runtime-library/reference/strupr-s-strupr-s-l-mbsupr-s-mbsupr-s-l-wcsupr-s-wcsupr-s-l.md index 4b805aff8a7..5194d2a53c2 100644 --- a/docs/c-runtime-library/reference/strupr-s-strupr-s-l-mbsupr-s-mbsupr-s-l-wcsupr-s-wcsupr-s-l.md +++ b/docs/c-runtime-library/reference/strupr-s-strupr-s-l-mbsupr-s-mbsupr-s-l-wcsupr-s-wcsupr-s-l.md @@ -12,7 +12,7 @@ ms.assetid: 82d3a273-9f6f-4a26-9560-919d891e4581 --- # _strupr_s, _strupr_s_l, _mbsupr_s, _mbsupr_s_l, _wcsupr_s, _wcsupr_s_l -Converts a string to uppercase, by using the current locale or a specified locale that's passed in. These versions of [_strupr, _strupr_l, _mbsupr, _mbsupr_l, _wcsupr_l, _wcsupr](strupr-strupr-l-mbsupr-mbsupr-l-wcsupr-l-wcsupr.md) have security enhancements, as described in [Security Features in the CRT](../../c-runtime-library/security-features-in-the-crt.md). +Converts a string to uppercase, by using the current locale or a specified locale that's passed in. These versions of [`_strupr`, `_strupr_l`, `_mbsupr`, `_mbsupr_l`, `_wcsupr_l`, `_wcsupr`](strupr-strupr-l-mbsupr-mbsupr-l-wcsupr-l-wcsupr.md) have security enhancements, as described in [Security features in the CRT](../security-features-in-the-crt.md). > [!IMPORTANT] > **_mbsupr_s** and **_mbsupr_s_l** cannot be used in applications that execute in the Windows Runtime. For more information, see [CRT functions not supported in Universal Windows Platform apps](../../cppcx/crt-functions-not-supported-in-universal-windows-platform-apps.md). @@ -78,34 +78,34 @@ errno_t _mbsupr_s_l( ### Parameters -*str*
+*`str`*\ String to capitalize. -*numberOfElements*
+*`numberOfElements`*\ Size of the buffer. -*locale*
+*`locale`*\ The locale to use. -## Return Value +## Return value Zero if successful; a non-zero error code on failure. -These functions validate their parameters. If *str* is a **NULL** pointer, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md) . If execution is allowed to continue, the functions return **EINVAL** and set **errno** to **EINVAL**. If *numberOfElements* is less than the length of the string, the functions return **ERANGE** and set **errno** to **ERANGE**. +These functions validate their parameters. If *`str`* is a **NULL** pointer, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md) . If execution is allowed to continue, the functions return **EINVAL** and set **errno** to **EINVAL**. If *`numberOfElements`* is less than the length of the string, the functions return **ERANGE** and set **errno** to **ERANGE**. ## Remarks -The **_strupr_s** function converts, in place, each lowercase letter in *str* to uppercase. **_wcsupr_s** is the wide-character version of **_strupr_s**. **_mbsupr_s** is the multi-byte character version of **_strupr_s**. +The **_strupr_s** function converts, in place, each lowercase letter in *`str`* to uppercase. **_wcsupr_s** is the wide-character version of **_strupr_s**. **_mbsupr_s** is the multi-byte character version of **_strupr_s**. -The conversion is determined by the **LC_CTYPE** category setting of the locale. Other characters are not affected. For more information on **LC_CTYPE**, see [setlocale](setlocale-wsetlocale.md). The versions of these functions without the **_l** suffix use the current locale; the visions with the **_l** suffix are identical except that they use the locale passed in instead. For more information, see [Locale](../../c-runtime-library/locale.md). +The conversion is determined by the **LC_CTYPE** category setting of the locale. Other characters are not affected. For more information on **LC_CTYPE**, see [`setlocale`](setlocale-wsetlocale.md). The versions of these functions without the **_l** suffix use the current locale; the visions with the **_l** suffix are identical except that they use the locale passed in instead. For more information, see [Locale](../locale.md). -In C++, using these functions is simplified by template overloads; the overloads can infer buffer length automatically (eliminating the need to specify a size argument) and they can automatically replace older, non-secure functions with their newer, secure counterparts. For more information, see [Secure Template Overloads](../../c-runtime-library/secure-template-overloads.md). +In C++, using these functions is simplified by template overloads; the overloads can infer buffer length automatically (eliminating the need to specify a size argument) and they can automatically replace older, non-secure functions with their newer, secure counterparts. For more information, see [Secure template overloads](../secure-template-overloads.md). -The debug library versions of these functions first fill the buffer with 0xFE. To disable this behavior, use [_CrtSetDebugFillThreshold](crtsetdebugfillthreshold.md). +The debug library versions of these functions first fill the buffer with 0xFE. To disable this behavior, use [`_CrtSetDebugFillThreshold`](crtsetdebugfillthreshold.md). By default, this function's global state is scoped to the application. To change this behavior, see [Global state in the CRT](../global-state.md). -### Generic-Text Routine Mappings +### Generic-text routine mappings |TCHAR.H routine|_UNICODE & _MBCS not defined|_MBCS defined|_UNICODE defined| |---------------------|------------------------------------|--------------------|-----------------------| @@ -119,15 +119,15 @@ By default, this function's global state is scoped to the application. To change |**_strupr_s**, **_strupr_s_l**|\| |**_wcsupr_s**, **_wcsupr_s_l**, **_mbsupr_s**, **_mbsupr_s_l**|\ or \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example -See the example for [_strlwr_s, _strlwr_s_l, _mbslwr_s, _mbslwr_s_l, _wcslwr_s, _wcslwr_s_l](strlwr-s-strlwr-s-l-mbslwr-s-mbslwr-s-l-wcslwr-s-wcslwr-s-l.md) . +See the example for [`_strlwr_s`, `_strlwr_s_l`, `_mbslwr_s`, `_mbslwr_s_l`, `_wcslwr_s`, `_wcslwr_s_l`](strlwr-s-strlwr-s-l-mbslwr-s-mbslwr-s-l-wcslwr-s-wcslwr-s-l.md) . ## See also -[Locale](../../c-runtime-library/locale.md)
-[Interpretation of Multibyte-Character Sequences](../../c-runtime-library/interpretation-of-multibyte-character-sequences.md)
-[String Manipulation](../../c-runtime-library/string-manipulation-crt.md)
-[_strlwr_s, _strlwr_s_l, _mbslwr_s, _mbslwr_s_l, _wcslwr_s, _wcslwr_s_l](strlwr-s-strlwr-s-l-mbslwr-s-mbslwr-s-l-wcslwr-s-wcslwr-s-l.md)
+[Locale](../locale.md)\ +[Interpretation of multibyte-character sequences](../interpretation-of-multibyte-character-sequences.md)\ +[String manipulation](../string-manipulation-crt.md)\ +[`_strlwr_s`, `_strlwr_s_l`, `_mbslwr_s`, `_mbslwr_s_l`, `_wcslwr_s`, `_wcslwr_s_l`](strlwr-s-strlwr-s-l-mbslwr-s-mbslwr-s-l-wcslwr-s-wcslwr-s-l.md) diff --git a/docs/c-runtime-library/reference/strupr-strupr-l-mbsupr-mbsupr-l-wcsupr-l-wcsupr.md b/docs/c-runtime-library/reference/strupr-strupr-l-mbsupr-mbsupr-l-wcsupr-l-wcsupr.md index 0c0e469c305..8dea3a7109f 100644 --- a/docs/c-runtime-library/reference/strupr-strupr-l-mbsupr-mbsupr-l-wcsupr-l-wcsupr.md +++ b/docs/c-runtime-library/reference/strupr-strupr-l-mbsupr-mbsupr-l-wcsupr-l-wcsupr.md @@ -12,7 +12,7 @@ ms.assetid: caac8f16-c233-41b6-91ce-575ec7061b77 --- # _strupr, _strupr_l, _mbsupr, _mbsupr_l, _wcsupr_l, _wcsupr -Converts a string to uppercase. More secure versions of these functions are available; see [_strupr_s, _strupr_s_l, _mbsupr_s, _mbsupr_s_l, _wcsupr_s, _wcsupr_s_l](strupr-s-strupr-s-l-mbsupr-s-mbsupr-s-l-wcsupr-s-wcsupr-s-l.md). +Converts a string to uppercase. More secure versions of these functions are available; see [`_strupr_s`, `_strupr_s_l`, `_mbsupr_s`, `_mbsupr_s_l`, `_wcsupr_s`, `_wcsupr_s_l`](strupr-s-strupr-s-l-mbsupr-s-mbsupr-s-l-wcsupr-s-wcsupr-s-l.md). > [!IMPORTANT] > **_mbsupr** and **_mbsupr_l** cannot be used in applications that execute in the Windows Runtime. For more information, see [CRT functions not supported in Universal Windows Platform apps](../../cppcx/crt-functions-not-supported-in-universal-windows-platform-apps.md). @@ -72,29 +72,29 @@ unsigned char *_mbsupr_l( ### Parameters -*str*
+*`str`*\ String to capitalize. -*locale*
+*`locale`*\ The locale to use. -## Return Value +## Return value Returns a pointer to the altered string. Because the modification is done in place, the pointer returned is the same as the pointer passed as the input argument. No return value is reserved to indicate an error. ## Remarks -The **_strupr** function converts, in place, each lowercase letter in *str* to uppercase. The conversion is determined by the **LC_CTYPE** category setting of the locale. Other characters are not affected. For more information on **LC_CTYPE**, see [setlocale](setlocale-wsetlocale.md). The versions of these functions without the **_l** suffix use the current locale; the versions with the **_l** suffix are identical except that they use the locale passed in instead. For more information, see [Locale](../../c-runtime-library/locale.md). +The **_strupr** function converts, in place, each lowercase letter in *`str`* to uppercase. The conversion is determined by the **LC_CTYPE** category setting of the locale. Other characters are not affected. For more information on **LC_CTYPE**, see [`setlocale`](setlocale-wsetlocale.md). The versions of these functions without the **_l** suffix use the current locale; the versions with the **_l** suffix are identical except that they use the locale passed in instead. For more information, see [Locale](../locale.md). **_wcsupr** and **_mbsupr** are wide-character and multibyte-character versions of **_strupr**. The argument and return value of **_wcsupr** are wide-character strings; those of **_mbsupr** are multibyte-character strings. These three functions behave identically otherwise. -If *str* is a null pointer, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md) . If execution is allowed to continue, these functions return the original string and set **errno** to **EINVAL**. +If *`str`* is a null pointer, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md) . If execution is allowed to continue, these functions return the original string and set **errno** to **EINVAL**. -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 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| |---------------------|------------------------------------|--------------------|-----------------------| @@ -109,14 +109,14 @@ By default, this function's global state is scoped to the application. To change |**_wcsupr**, **_wcsupr_l**|\ or \| |**_mbsupr**, **_mbsupr_l**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example -See the example for [_strlwr](strlwr-wcslwr-mbslwr-strlwr-l-wcslwr-l-mbslwr-l.md). +See the example for [`_strlwr`](strlwr-wcslwr-mbslwr-strlwr-l-wcslwr-l-mbslwr-l.md). ## See also -[Locale](../../c-runtime-library/locale.md)
-[String Manipulation](../../c-runtime-library/string-manipulation-crt.md)
-[_strlwr, _wcslwr, _mbslwr, _strlwr_l, _wcslwr_l, _mbslwr_l](strlwr-wcslwr-mbslwr-strlwr-l-wcslwr-l-mbslwr-l.md)
+[Locale](../locale.md)\ +[String manipulation](../string-manipulation-crt.md)\ +[`_strlwr`, `_wcslwr`, `_mbslwr`, `_strlwr_l`, `_wcslwr_l`, `_mbslwr_l`](strlwr-wcslwr-mbslwr-strlwr-l-wcslwr-l-mbslwr-l.md) diff --git a/docs/c-runtime-library/reference/strupr-wcsupr.md b/docs/c-runtime-library/reference/strupr-wcsupr.md index a299292679a..b81ca7383d2 100644 --- a/docs/c-runtime-library/reference/strupr-wcsupr.md +++ b/docs/c-runtime-library/reference/strupr-wcsupr.md @@ -12,6 +12,6 @@ ms.assetid: 17dfe1cd-3b09-4702-9f89-2207f44953e6 --- # strupr, wcsupr -The Microsoft-specific function names `strupr` and `wcsupr` are deprecated aliases for the [_strupr and _wcsupr](strupr-strupr-l-mbsupr-mbsupr-l-wcsupr-l-wcsupr.md) functions. By default, they generate [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The names are deprecated because they don't follow the Standard C rules for implementation-specific names. However, the functions are still supported. +The Microsoft-specific function names `strupr` and `wcsupr` are deprecated aliases for the [`_strupr` and `_wcsupr`](strupr-strupr-l-mbsupr-mbsupr-l-wcsupr-l-wcsupr.md) functions. By default, they generate [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The names are deprecated because they don't follow the Standard C rules for implementation-specific names. However, the functions are still supported. -We recommend you use [_strupr and _wcsupr](strupr-strupr-l-mbsupr-mbsupr-l-wcsupr-l-wcsupr.md) or the security-enhanced [_strupr_s and _wcsupr_s](strupr-s-strupr-s-l-mbsupr-s-mbsupr-s-l-wcsupr-s-wcsupr-s-l.md) functions instead. Or, you can continue to use these function names, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). +We recommend you use [`_strupr` and `_wcsupr`](strupr-strupr-l-mbsupr-mbsupr-l-wcsupr-l-wcsupr.md) or the security-enhanced [`_strupr_s` and `_wcsupr_s`](strupr-s-strupr-s-l-mbsupr-s-mbsupr-s-l-wcsupr-s-wcsupr-s-l.md) functions instead. Or, you can continue to use these function names, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). diff --git a/docs/c-runtime-library/reference/strxfrm-wcsxfrm-strxfrm-l-wcsxfrm-l.md b/docs/c-runtime-library/reference/strxfrm-wcsxfrm-strxfrm-l-wcsxfrm-l.md index ddad676aa10..780939d1e74 100644 --- a/docs/c-runtime-library/reference/strxfrm-wcsxfrm-strxfrm-l-wcsxfrm-l.md +++ b/docs/c-runtime-library/reference/strxfrm-wcsxfrm-strxfrm-l-wcsxfrm-l.md @@ -43,35 +43,35 @@ size_t wcsxfrm_l( ### Parameters -*strDest*
+*`strDest`*\ Destination string. -*strSource*
+*`strSource`*\ Source string. -*count*
-Maximum number of characters to place in *strDest*. +*`count`*\ +Maximum number of characters to place in *`strDest`*. -*locale*
+*`locale`*\ The locale to use. -## Return Value +## Return value -Returns the length of the transformed string, not counting the terminating null character. If the return value is greater than or equal to *count*, the content of *strDest* is unpredictable. On an error, each function sets **errno** and returns **INT_MAX**. For an invalid character, **errno** is set to **EILSEQ**. +Returns the length of the transformed string, not counting the terminating null character. If the return value is greater than or equal to *`count`*, the content of *`strDest`* is unpredictable. On an error, each function sets **errno** and returns **INT_MAX**. For an invalid character, **errno** is set to **EILSEQ**. ## Remarks -The **strxfrm** function transforms the string pointed to by *strSource* into a new collated form that is stored in *strDest*. No more than *count* characters, including the null character, are transformed and placed into the resulting string. The transformation is made using the locale's **LC_COLLATE** category setting. For more information on **LC_COLLATE**, see [setlocale](setlocale-wsetlocale.md). **strxfrm** uses the current locale for its locale-dependent behavior; **_strxfrm_l** is identical except that it uses the locale passed in instead of the current locale. For more information, see [Locale](../../c-runtime-library/locale.md). +The **strxfrm** function transforms the string pointed to by *`strSource`* into a new collated form that is stored in *`strDest`*. No more than *`count`* characters, including the null character, are transformed and placed into the resulting string. The transformation is made using the locale's **LC_COLLATE** category setting. For more information on **LC_COLLATE**, see [`setlocale`](setlocale-wsetlocale.md). **strxfrm** uses the current locale for its locale-dependent behavior; **_strxfrm_l** is identical except that it uses the locale passed in instead of the current locale. For more information, see [Locale](../locale.md). After the transformation, a call to **strcmp** with the two transformed strings yields results identical to those of a call to **strcoll** applied to the original two strings. As with **strcoll** and **stricoll**, **strxfrm** automatically handles multibyte-character strings as appropriate. **wcsxfrm** is a wide-character version of **strxfrm**; the string arguments of **wcsxfrm** are wide-character pointers. For **wcsxfrm**, after the string transformation, a call to **wcscmp** with the two transformed strings yields results identical to those of a call to **wcscoll** applied to the original two strings. **wcsxfrm** and **strxfrm** behave identically otherwise. **wcsxfrm** uses the current locale for its locale-dependent behavior; **_wcsxfrm_l** uses the locale passed in instead of the current locale. -These functions validate their parameters. If *strSource* is a null pointer, or *strDest* is a **NULL** pointer (unless count is zero), or if *count* is greater than **INT_MAX**, the invalid parameter handler is invoked, 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 **INT_MAX**. +These functions validate their parameters. If *`strSource`* is a null pointer, or *`strDest`* is a **NULL** pointer (unless count is zero), or if *`count`* is greater than **INT_MAX**, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md) . If execution is allowed to continue, these functions set **errno** to **EINVAL** and return **INT_MAX**. 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| |---------------------|------------------------------------|--------------------|-----------------------| @@ -104,15 +104,15 @@ return( strlen( _string1 ) ); |**_strxfrm_l**|\| |**_wcsxfrm_l**|\ or \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Data Conversion](../../c-runtime-library/data-conversion.md)
-[localeconv](localeconv.md)
-[setlocale, _wsetlocale](setlocale-wsetlocale.md)
-[Locale](../../c-runtime-library/locale.md)
-[String Manipulation](../../c-runtime-library/string-manipulation-crt.md)
-[strcoll Functions](../../c-runtime-library/strcoll-functions.md)
-[strcmp, wcscmp, _mbscmp](strcmp-wcscmp-mbscmp.md)
-[strncmp, wcsncmp, _mbsncmp, _mbsncmp_l](strncmp-wcsncmp-mbsncmp-mbsncmp-l.md)
+[Data conversion](../data-conversion.md)\ +[`localeconv`](localeconv.md)\ +[`setlocale`, `_wsetlocale`](setlocale-wsetlocale.md)\ +[Locale](../locale.md)\ +[String manipulation](../string-manipulation-crt.md)\ +[`strcoll` functions](../strcoll-functions.md)\ +[`strcmp`, `wcscmp`, `_mbscmp`](strcmp-wcscmp-mbscmp.md)\ +[`strncmp`, `wcsncmp`, `_mbsncmp`, `_mbsncmp_l`](strncmp-wcsncmp-mbsncmp-mbsncmp-l.md) diff --git a/docs/c-runtime-library/reference/swab.md b/docs/c-runtime-library/reference/swab.md index 1a52676a78e..69bb21d3e09 100644 --- a/docs/c-runtime-library/reference/swab.md +++ b/docs/c-runtime-library/reference/swab.md @@ -26,24 +26,24 @@ void _swab( ## Parameters -*src*
+*`src`*\ Data to be copied and swapped. -*dest*
+*`dest`*\ Storage location for swapped data. -*n*
+*`n`*\ Number of bytes to be copied and swapped. ## Return value -The **swab** function doesn't return a value. The function sets **errno** to **EINVAL** if either the *src* or *dest* pointer is null or *n* is less than zero, and the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). +The **swab** function doesn't return a value. The function sets **errno** to **EINVAL** if either the *`src`* or *`dest`* pointer is null or *`n`* is less than zero, and the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). -For more information about return codes, see [`_doserrno`, `errno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). +For more information about return codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks -If *n* is even, the **_swab** function copies *n* bytes from *src*, swaps each pair of adjacent bytes, and stores the result at *dest*. If *n* is odd, **_swab** copies and swaps the first *n*-1 bytes of *src*, and the final byte isn't copied. The **_swab** function is typically used to prepare binary data for transfer to a machine that uses a different byte order. +If *`n`* is even, the **_swab** function copies *`n`* bytes from *`src`*, swaps each pair of adjacent bytes, and stores the result at *`dest`*. If *`n`* is odd, **_swab** copies and swaps the first *`n`*-1 bytes of *`src`*, and the final byte isn't copied. The **_swab** function is typically used to prepare binary data for transfer to a machine that uses a different byte order. 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). @@ -53,7 +53,7 @@ By default, this function's global state is scoped to the application. To change |-------------|---------------------| |**_swab**|C: \ C++: \ or \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -84,4 +84,4 @@ After: BADCFEHGJILKNMPORQTSVUXWZY ## See also -[Buffer Manipulation](../../c-runtime-library/buffer-manipulation.md)
+[Buffer manipulation](../buffer-manipulation.md) diff --git a/docs/c-runtime-library/reference/system-wsystem.md b/docs/c-runtime-library/reference/system-wsystem.md index c115ef583e5..62f85ba2d07 100644 --- a/docs/c-runtime-library/reference/system-wsystem.md +++ b/docs/c-runtime-library/reference/system-wsystem.md @@ -30,10 +30,10 @@ int _wsystem( ### Parameters -*`command`*
+*`command`*\ The command to be executed. -## Return Value +## Return value If *`command`* is **`NULL`** and the command interpreter is found, returns a nonzero value. If the command interpreter isn't found, returns 0 and sets **`errno`** to **`ENOENT`**. If *`command`* isn't **`NULL`**, **`system`** returns the value that is returned by the command interpreter. It returns the value 0 only if the command interpreter returns the value 0. A return value of -1 indicates an error, and **`errno`** is set to one of the following values: @@ -44,7 +44,7 @@ If *`command`* is **`NULL`** and the command interpreter is found, returns a non | **`ENOEXEC`** | The command-interpreter file can't be executed because the format isn't valid. | | **`ENOMEM`** | Not enough memory is available to execute command; or available memory has been corrupted; or a non-valid block exists, which indicates that the process that's making the call wasn't allocated correctly. | -For more information about return codes, see [`_doserrno`, `errno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). +For more information about return codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks @@ -56,7 +56,7 @@ You must explicitly flush, by using [`fflush`](fflush.md) or [`_flushall`](flush 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| |---------------------|------------------------------------|--------------------|-----------------------| @@ -69,7 +69,7 @@ By default, this function's global state is scoped to the application. To change |**`system`**|`` or ``| |**`_wsystem`**|`` or `` or ``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -102,8 +102,8 @@ Line two. ## See also -[Process and Environment Control](../../c-runtime-library/process-and-environment-control.md)
-[`_exec`, `_wexec` Functions](../../c-runtime-library/exec-wexec-functions.md)
-[`exit`, `_Exit`, `_exit`](exit-exit-exit.md)
-[`_flushall`](flushall.md)
-[`_spawn`, `_wspawn` Functions](../../c-runtime-library/spawn-wspawn-functions.md)
+[Process and environment control](../process-and-environment-control.md)\ +[`_exec`, `_wexec` functions](../exec-wexec-functions.md)\ +[`exit`, `_Exit`, `_exit`](exit-exit-exit.md)\ +[`_flushall`](flushall.md)\ +[`_spawn`, `_wspawn` functions](../spawn-wspawn-functions.md) diff --git a/docs/c-runtime-library/reference/tan-tanf-tanl.md b/docs/c-runtime-library/reference/tan-tanf-tanl.md index 35e39c14a38..42e6dd15222 100644 --- a/docs/c-runtime-library/reference/tan-tanf-tanl.md +++ b/docs/c-runtime-library/reference/tan-tanf-tanl.md @@ -46,7 +46,7 @@ The **`tan`** functions return the tangent of *`x`*. If *`x`* is greater than or Because C++ allows overloading, you can call overloads of **`tan`** that take and return **`float`** or **`long double`** values. In a C program, unless you're using the `` macro to call this function, **`tan`** always takes and returns **`double`**. -If you use the `` `tan()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../../c-runtime-library/tgmath.md) for details. +If you use the `` `tan()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../tgmath.md) for details. 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). @@ -57,7 +57,7 @@ By default, this function's global state is scoped to the application. To change |**`tan`**, **`tanf`**, **`tanl`**|``|`` or ``| |**`tan()`** macro | `` || -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -85,10 +85,10 @@ tan( 0.785398 ) = 1.000000 ## See also -[Floating-Point Support](../../c-runtime-library/floating-point-support.md)\ +[Math and floating-point support](../floating-point-support.md)\ [`acos`, `acosf`, `acosl`](acos-acosf-acosl.md)\ [`asin`, `asinf`, `asinl`](asin-asinf-asinl.md)\ [`atan`, `atanf`, `atanl`, `atan2`, `atan2f`, `atan2l`](atan-atanf-atanl-atan2-atan2f-atan2l.md)\ [`cos`, `cosf`, `cosl`](cos-cosf-cosl.md)\ [`sin`, `sinf`, `sinl`](sin-sinf-sinl.md)\ -[`_CItan`](../../c-runtime-library/citan.md) +[`_CItan`](../citan.md) diff --git a/docs/c-runtime-library/reference/tanh-tanhf-tanhl.md b/docs/c-runtime-library/reference/tanh-tanhf-tanhl.md index 0f1fb2605e7..fddaec4a733 100644 --- a/docs/c-runtime-library/reference/tanh-tanhf-tanhl.md +++ b/docs/c-runtime-library/reference/tanh-tanhf-tanhl.md @@ -44,7 +44,7 @@ The **`tanh`** functions return the hyperbolic tangent of *`x`*. There's no erro Because C++ allows overloading, you can call overloads of **`tanh`** that take and return **`float`** or **`long double`** values. In a C program, unless you're using the `` macro to call this function, **`tanh`** always takes and returns **`double`**. -If you use the `` `tanh()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../../c-runtime-library/tgmath.md) for details. +If you use the `` `tanh()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../tgmath.md) for details. 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). @@ -55,7 +55,7 @@ By default, this function's global state is scoped to the application. To change |**`tanh`**, **`tanhf`**, **`tanhl`**|``|`` or ``| |**`tanh()`** macro | `` || -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -87,7 +87,7 @@ tanh( 1.000000 ) = 0.761594 ## See also -[Floating-Point Support](../../c-runtime-library/floating-point-support.md)\ +[Math and floating-point support](../floating-point-support.md)\ [`acosh`, `acoshf`, `acoshl`](acosh-acoshf-acoshl.md)\ [`asinh`, `asinhf`, `asinhl`](asinh-asinhf-asinhl.md)\ [`atanh`, `atanhf`, `atanhl`](atanh-atanhf-atanhl.md)\ diff --git a/docs/c-runtime-library/reference/tell-telli64.md b/docs/c-runtime-library/reference/tell-telli64.md index 6fc96634eee..dd04bf9b092 100644 --- a/docs/c-runtime-library/reference/tell-telli64.md +++ b/docs/c-runtime-library/reference/tell-telli64.md @@ -27,20 +27,20 @@ __int64 _telli64( ### Parameters -*handle*
+*`handle`*\ File descriptor referring to open file. -## Return Value +## Return value The current position of the file pointer. On devices incapable of seeking, the return value is undefined. -A return value of -1L indicates an error. If *handle* is an invalid file descriptor, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, these functions set **errno** to **EBADF** and return -1L. +A return value of -1L indicates an error. If *`handle`* is an invalid file descriptor, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, these functions set **errno** to **EBADF** and return -1L. -For more information about return codes, see [`_doserrno`, `errno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). +For more information about return codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks -The **_tell** function gets the current position of the file pointer (if any) associated with the *handle* argument. The position is expressed as the number of bytes from the beginning of the file. For the **_telli64** function, this value is expressed as a 64-bit integer. +The **_tell** function gets the current position of the file pointer (if any) associated with the *`handle`* argument. The position is expressed as the number of bytes from the beginning of the file. For the **_telli64** function, this value is expressed as a 64-bit integer. 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). @@ -50,7 +50,7 @@ By default, this function's global state is scoped to the application. To change |-------------|---------------------| |**_tell**, **_telli64**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -100,6 +100,6 @@ Current file position is: 20 ## See also -[Low-Level I/O](../../c-runtime-library/low-level-i-o.md)
-[ftell, _ftelli64](ftell-ftelli64.md)
-[_lseek, _lseeki64](lseek-lseeki64.md)
+[Low-level I/O](../low-level-i-o.md)\ +[`ftell`, `_ftelli64`](ftell-ftelli64.md)\ +[`_lseek`, `_lseeki64`](lseek-lseeki64.md) diff --git a/docs/c-runtime-library/reference/tell.md b/docs/c-runtime-library/reference/tell.md index 6b7f179c7fd..ebcec1bb449 100644 --- a/docs/c-runtime-library/reference/tell.md +++ b/docs/c-runtime-library/reference/tell.md @@ -12,6 +12,6 @@ ms.assetid: 3a92a40d-f472-4545-a493-f57c340ee798 --- # tell -The Microsoft-specific function name `tell` is a deprecated alias for the [_tell](tell-telli64.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. +The Microsoft-specific function name `tell` is a deprecated alias for the [`_tell`](tell-telli64.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. -We recommend you use [_tell](tell-telli64.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). +We recommend you use [`_tell`](tell-telli64.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). diff --git a/docs/c-runtime-library/reference/tempnam-dbg-wtempnam-dbg.md b/docs/c-runtime-library/reference/tempnam-dbg-wtempnam-dbg.md index 6551a020e46..289f6088d54 100644 --- a/docs/c-runtime-library/reference/tempnam-dbg-wtempnam-dbg.md +++ b/docs/c-runtime-library/reference/tempnam-dbg-wtempnam-dbg.md @@ -12,7 +12,7 @@ ms.assetid: e3760bb4-bb01-4808-b689-2c45af56a170 --- # _tempnam_dbg, _wtempnam_dbg -Function versions of [_tempnam, _wtempnam, tmpnam, _wtmpnam](tempnam-wtempnam-tmpnam-wtmpnam.md) that use the debug version of **malloc**, **_malloc_dbg**. +Function versions of [`_tempnam`, `_wtempnam`, `tmpnam`, `_wtmpnam`](tempnam-wtempnam-tmpnam-wtmpnam.md) that use the debug version of **malloc**, **_malloc_dbg**. ## Syntax @@ -35,35 +35,35 @@ wchar_t *_wtempnam_dbg( ### Parameters -*dir*
+*`dir`*\ The path used in the file name if there is no TMP environment variable, or if TMP is not a valid directory. -*prefix*
+*`prefix`*\ The string that will be pre-pended to names returned by **_tempnam**. -*blockType*
+*`blockType`*\ Requested type of memory block: **_CLIENT_BLOCK** or **_NORMAL_BLOCK**. -*filename*
+*`filename`*\ Pointer to name of source file that requested allocation operation or **NULL**. -*linenumber*
+*`linenumber`*\ Line number in source file where allocation operation was requested or **NULL**. -## Return Value +## Return value -Each function returns a pointer to the name generated or **NULL** if there is a failure. Failure can occur if there is an invalid directory name specified in the TMP environment variable and in the *dir* parameter. +Each function returns a pointer to the name generated or **NULL** if there is a failure. Failure can occur if there is an invalid directory name specified in the TMP environment variable and in the *`dir`* parameter. > [!NOTE] > **free** (or **free_dbg**) does need to be called for pointers allocated by **_tempnam_dbg** and **_wtempnam_dbg**. ## Remarks -The **_tempnam_dbg** and **_wtempnam_dbg** functions are identical to **_tempnam** and **_wtempnam** except that, when **_DEBUG** is defined, these functions use the debug version of **malloc** and **_malloc_dbg**, to allocate memory if **NULL** is passed as the first parameter. For more information, see [_malloc_dbg](malloc-dbg.md). +The **_tempnam_dbg** and **_wtempnam_dbg** functions are identical to **_tempnam** and **_wtempnam** except that, when **_DEBUG** is defined, these functions use the debug version of **malloc** and **_malloc_dbg**, to allocate memory if **NULL** is passed as the first parameter. For more information, see [`_malloc_dbg`](malloc-dbg.md). -You do not need to call these functions explicitly in most cases. Instead, you can define the flag **_CRTDBG_MAP_ALLOC**. When **_CRTDBG_MAP_ALLOC** is defined, calls to **_tempnam** and **_wtempnam** are remapped to **_tempnam_dbg** and **_wtempnam_dbg**, respectively, with the *blockType* set to **_NORMAL_BLOCK**. Thus, you do not need to call these functions explicitly unless you want to mark the heap blocks as **_CLIENT_BLOCK**. For more information, see [Types of blocks on the debug heap](/visualstudio/debugger/crt-debug-heap-details). +You do not need to call these functions explicitly in most cases. Instead, you can define the flag **_CRTDBG_MAP_ALLOC**. When **_CRTDBG_MAP_ALLOC** is defined, calls to **_tempnam** and **_wtempnam** are remapped to **_tempnam_dbg** and **_wtempnam_dbg**, respectively, with the *`blockType`* set to **_NORMAL_BLOCK**. Thus, you do not need to call these functions explicitly unless you want to mark the heap blocks as **_CLIENT_BLOCK**. For more information, see [Types of blocks on the debug heap](/visualstudio/debugger/crt-debug-heap-details). -### Generic-Text Routine Mappings +### Generic-text routine mappings |TCHAR.H routine|_UNICODE & _MBCS not defined|_MBCS defined|_UNICODE defined| |---------------------|------------------------------------|--------------------|-----------------------| @@ -75,10 +75,10 @@ You do not need to call these functions explicitly in most cases. Instead, you c |-------------|---------------------| |**_tempnam_dbg**, **_wtempnam_dbg**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[_tempnam, _wtempnam, tmpnam, _wtmpnam](tempnam-wtempnam-tmpnam-wtmpnam.md)
-[Stream I/O](../../c-runtime-library/stream-i-o.md)
-[Debug Versions of Heap Allocation Functions](/visualstudio/debugger/debug-versions-of-heap-allocation-functions)
+[`_tempnam`, `_wtempnam`, `tmpnam`, `_wtmpnam`](tempnam-wtempnam-tmpnam-wtmpnam.md)\ +[Stream I/O](../stream-i-o.md)\ +[Debug versions of heap allocation functions](/visualstudio/debugger/debug-versions-of-heap-allocation-functions) diff --git a/docs/c-runtime-library/reference/tempnam-wtempnam-tmpnam-wtmpnam.md b/docs/c-runtime-library/reference/tempnam-wtempnam-tmpnam-wtmpnam.md index a4c58167327..7c3aad24527 100644 --- a/docs/c-runtime-library/reference/tempnam-wtempnam-tmpnam-wtmpnam.md +++ b/docs/c-runtime-library/reference/tempnam-wtempnam-tmpnam-wtmpnam.md @@ -12,7 +12,7 @@ ms.assetid: 3ce75f0f-5e30-42a6-9791-8d7cbfe70fca --- # _tempnam, _wtempnam, tmpnam, _wtmpnam -Generate names you can use to create temporary files. More secure versions of some of these functions are available; see [tmpnam_s, _wtmpnam_s](tmpnam-s-wtmpnam-s.md). +Generate names you can use to create temporary files. More secure versions of some of these functions are available; see [`tmpnam_s`, `_wtmpnam_s`](tmpnam-s-wtmpnam-s.md). ## Syntax @@ -35,43 +35,43 @@ wchar_t *_wtmpnam( ### Parameters -*prefix*
+*`prefix`*\ The string that will be pre-pended to names returned by **_tempnam**. -*dir*
+*`dir`*\ The path used in the file name if there is no TMP environment variable, or if TMP is not a valid directory. -*str*
+*`str`*\ Pointer that will hold the generated name and will be identical to the name returned by the function. This is a convenient way to save the generated name. -## Return Value +## Return value -Each of these functions returns a pointer to the name generated or **NULL** if there is a failure. Failure can occur if you attempt more than **TMP_MAX** (see STDIO.H) calls with **tmpnam** or if you use **_tempnam** and there is an invalid directory name specified in the TMP environment variable and in the *dir* parameter. +Each of these functions returns a pointer to the name generated or **NULL** if there is a failure. Failure can occur if you attempt more than **TMP_MAX** (see STDIO.H) calls with **tmpnam** or if you use **_tempnam** and there is an invalid directory name specified in the TMP environment variable and in the *`dir`* parameter. > [!NOTE] -> The pointers returned by **tmpnam** and **_wtmpnam** point to internal static buffers. [free](free.md) should not be called to deallocate those pointers. **free** needs to be called for pointers allocated by **_tempnam** and **_wtempnam**. +> The pointers returned by **tmpnam** and **_wtmpnam** point to internal static buffers. [`free`](free.md) should not be called to deallocate those pointers. **free** needs to be called for pointers allocated by **_tempnam** and **_wtempnam**. ## Remarks Each of these functions returns the name of a file that does not currently exist. **tmpnam** returns a name that's unique in the designated Windows temporary directory returned by [GetTempPathW](/windows/win32/api/fileapi/nf-fileapi-gettemppathw). **\_tempnam** generates a unique name in a directory other than the designated one. Note than when a file name is pre-pended with a backslash and no path information, such as \fname21, this indicates that the name is valid for the current working directory. -For **tmpnam**, you can store this generated file name in *str*. If *str* is **NULL**, then **tmpnam** leaves the result in an internal static buffer. Thus any subsequent calls destroy this value. The name generated by **tmpnam** consists of a program-generated file name and, after the first call to **tmpnam**, a file extension of sequential numbers in base 32 (.1-.vvu, when **TMP_MAX** in STDIO.H is 32,767). +For **tmpnam**, you can store this generated file name in *`str`*. If *`str`* is **NULL**, then **tmpnam** leaves the result in an internal static buffer. Thus any subsequent calls destroy this value. The name generated by **tmpnam** consists of a program-generated file name and, after the first call to **tmpnam**, a file extension of sequential numbers in base 32 (.1-.vvu, when **TMP_MAX** in STDIO.H is 32,767). **_tempnam** will generate a unique file name for a directory chosen by the following rules: - If the TMP environment variable is defined and set to a valid directory name, unique file names will be generated for the directory specified by TMP. -- If the TMP environment variable is not defined or if it is set to the name of a directory that does not exist, **_tempnam** will use the *dir* parameter as the path for which it will generate unique names. +- If the TMP environment variable is not defined or if it is set to the name of a directory that does not exist, **_tempnam** will use the *`dir`* parameter as the path for which it will generate unique names. -- If the TMP environment variable is not defined or if it is set to the name of a directory that does not exist, and if *dir* is either **NULL** or set to the name of a directory that does not exist, **_tempnam** will use the current working directory to generate unique names. Currently, if both TMP and *dir* specify names of directories that do not exist, the **_tempnam** function call will fail. +- If the TMP environment variable is not defined or if it is set to the name of a directory that does not exist, and if *`dir`* is either **NULL** or set to the name of a directory that does not exist, **_tempnam** will use the current working directory to generate unique names. Currently, if both TMP and *`dir`* specify names of directories that do not exist, the **_tempnam** function call will fail. -The name returned by **_tempnam** will be a concatenation of *prefix* and a sequential number, which will combine to create a unique file name for the specified directory. **_tempnam** generates file names that have no extension. **_tempnam** uses [malloc](malloc.md) to allocate space for the filename; the program is responsible for freeing this space when it is no longer needed. +The name returned by **_tempnam** will be a concatenation of *`prefix`* and a sequential number, which will combine to create a unique file name for the specified directory. **_tempnam** generates file names that have no extension. **_tempnam** uses [`malloc`](malloc.md) to allocate space for the filename; the program is responsible for freeing this space when it is no longer needed. **_tempnam** and **tmpnam** automatically handle multibyte-character string arguments as appropriate, recognizing multibyte-character sequences according to the OEM code page obtained from the operating system. **_wtempnam** is a wide-character version of **_tempnam**; the arguments and return value of **_wtempnam** are wide-character strings. **_wtempnam** and **_tempnam** behave identically except that **_wtempnam** does not handle multibyte-character strings. **_wtmpnam** is a wide-character version of **tmpnam**; the argument and return value of **_wtmpnam** are wide-character strings. **_wtmpnam** and **tmpnam** behave identically except that **_wtmpnam** does not handle multibyte-character strings. -If **_DEBUG** and **_CRTDBG_MAP_ALLOC** are defined, **_tempnam** and **_wtempnam** are replaced by calls to [_tempnam_dbg and _wtempnam_dbg](tempnam-dbg-wtempnam-dbg.md). +If **_DEBUG** and **_CRTDBG_MAP_ALLOC** are defined, **_tempnam** and **_wtempnam** are replaced by calls to [`_tempnam_dbg` and `_wtempnam_dbg`](tempnam-dbg-wtempnam-dbg.md). -### Generic-Text Routine Mappings +### Generic-text routine mappings |TCHAR.H routine|_UNICODE & _MBCS not defined|_MBCS defined|_UNICODE defined| |---------------------|------------------------------------|--------------------|-----------------------| @@ -86,7 +86,7 @@ If **_DEBUG** and **_CRTDBG_MAP_ALLOC** are defined, **_tempnam** and **_wtempna |**_wtempnam**, **_wtmpnam**|\ or \| |**tmpnam**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -161,9 +161,9 @@ c:\tmp\stq3 is safe to use as a temporary file. ## See also -[Stream I/O](../../c-runtime-library/stream-i-o.md)
-[_getmbcp](getmbcp.md)
-[malloc](malloc.md)
-[_setmbcp](setmbcp.md)
-[tmpfile](tmpfile.md)
-[tmpfile_s](tmpfile-s.md)
+[Stream I/O](../stream-i-o.md)\ +[`_getmbcp`](getmbcp.md)\ +[`malloc`](malloc.md)\ +[`_setmbcp`](setmbcp.md)\ +[`tmpfile`](tmpfile.md)\ +[`tmpfile_s`](tmpfile-s.md) diff --git a/docs/c-runtime-library/reference/tempnam.md b/docs/c-runtime-library/reference/tempnam.md index 6584eeedf14..a522fdd1a45 100644 --- a/docs/c-runtime-library/reference/tempnam.md +++ b/docs/c-runtime-library/reference/tempnam.md @@ -12,6 +12,6 @@ ms.assetid: 42446733-f131-470f-b4d0-96918becab11 --- # tempnam -The Microsoft-implemented POSIX function name `tempnam` is a deprecated alias for the [_tempnam](tempnam-wtempnam-tmpnam-wtmpnam.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. +The Microsoft-implemented POSIX function name `tempnam` is a deprecated alias for the [`_tempnam`](tempnam-wtempnam-tmpnam-wtmpnam.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. -We recommend you use [_tempnam](tempnam-wtempnam-tmpnam-wtmpnam.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). +We recommend you use [`_tempnam`](tempnam-wtempnam-tmpnam-wtmpnam.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). diff --git a/docs/c-runtime-library/reference/terminate-crt.md b/docs/c-runtime-library/reference/terminate-crt.md index 212ea7daccd..9e462d8ffa5 100644 --- a/docs/c-runtime-library/reference/terminate-crt.md +++ b/docs/c-runtime-library/reference/terminate-crt.md @@ -12,7 +12,7 @@ ms.assetid: 90e67402-08e9-4b2a-962c-66a8afd3ccb4 --- # terminate (CRT) -Calls [abort](abort.md) or a function you specify using **set_terminate**. +Calls [`abort`](abort.md) or a function you specify using **set_terminate**. ## Syntax @@ -30,7 +30,7 @@ The **terminate** function is used with C++ exception handling and is called in - The stack is corrupted after throwing an exception. -**terminate** calls [abort](abort.md) by default. You can change this default by writing your own termination function and calling **set_terminate** with the name of your function as its argument. **terminate** calls the last function given as an argument to **set_terminate**. For more information, see [Unhandled C++ Exceptions](../../cpp/unhandled-cpp-exceptions.md). +**terminate** calls [`abort`](abort.md) by default. You can change this default by writing your own termination function and calling **set_terminate** with the name of your function as its argument. **terminate** calls the last function given as an argument to **set_terminate**. For more information, see [Unhandled C++ Exceptions](../../cpp/unhandled-cpp-exceptions.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). @@ -40,7 +40,7 @@ By default, this function's global state is scoped to the application. To change |-------------|---------------------| |**terminate**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -90,9 +90,9 @@ term_func() was called by terminate(). ## See also -[Exception Handling Routines](../../c-runtime-library/exception-handling-routines.md)
-[abort](abort.md)
-[_set_se_translator](set-se-translator.md)
-[set_terminate](set-terminate-crt.md)
-[set_unexpected](set-unexpected-crt.md)
-[unexpected](unexpected-crt.md)
+[Exception handling routines](../exception-handling-routines.md)\ +[`abort`](abort.md)\ +[`_set_se_translator`](set-se-translator.md)\ +[`set_terminate`](set-terminate-crt.md)\ +[`set_unexpected`](set-unexpected-crt.md)\ +[`unexpected`](unexpected-crt.md) diff --git a/docs/c-runtime-library/reference/tgamma-tgammaf-tgammal.md b/docs/c-runtime-library/reference/tgamma-tgammaf-tgammal.md index 5c7b9cf8227..44976b2b5fe 100644 --- a/docs/c-runtime-library/reference/tgamma-tgammaf-tgammal.md +++ b/docs/c-runtime-library/reference/tgamma-tgammaf-tgammal.md @@ -42,14 +42,14 @@ long double tgamma( ### Parameters -*x*\ +*`x`*\ The value to find the gamma of. -## Return Value +## Return value -If successful, returns the gamma of *x*. +If successful, returns the gamma of *`x`*. -A range error may occur if the magnitude of *x* is too large or too small for the data type. A domain error or range error may occur if *x* <= 0. +A range error may occur if the magnitude of *`x`* is too large or too small for the data type. A domain error or range error may occur if *`x`* <= 0. |Issue|Return| |-----------|------------| @@ -63,13 +63,13 @@ A range error may occur if the magnitude of *x* is too large or too small for th |overflow range error|±HUGE_VAL, ±HUGE_VALF, or ±HUGE_VALL| |underflow range error|the correct value, after rounding.| -Errors are reported as specified in [_matherr](matherr.md). +Errors are reported as specified in [`_matherr`](matherr.md). ## Remarks Because C++ allows overloading, you can call overloads of **tgamma** that take and return **`float`** and **`long double`** types. In a C program, unless you're using the \ macro to call this function, **tgamma** always takes and returns a **`double`**. -If you use the \ `tgamma()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../../c-runtime-library/tgmath.md) for details. +If you use the \ `tgamma()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../tgmath.md) for details. If x is a natural number, this function returns the factorial of (x-1). @@ -82,9 +82,9 @@ By default, this function's global state is scoped to the application. To change |**tgamma**, **tgammaf**, **tgammal**|\|\| |**tgamma** macro | \ || -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Alphabetical Function Reference](crt-alphabetical-function-reference.md)
-[lgamma, lgammaf, lgammal](lgamma-lgammaf-lgammal.md)
+[Alphabetical function reference](crt-alphabetical-function-reference.md)\ +[`lgamma`, `lgammaf`, `lgammal`](lgamma-lgammaf-lgammal.md) diff --git a/docs/c-runtime-library/reference/time-time32-time64.md b/docs/c-runtime-library/reference/time-time32-time64.md index 7810caee11f..782e7c59ec0 100644 --- a/docs/c-runtime-library/reference/time-time32-time64.md +++ b/docs/c-runtime-library/reference/time-time32-time64.md @@ -24,10 +24,10 @@ __time64_t _time64( __time64_t *destTime ); ### Parameters -*`destTime`*
+*`destTime`*\ Pointer to the storage location for time. -## Return Value +## Return value Returns the time as seconds elapsed since midnight, January 1, 1970, or -1 in the case of an error. @@ -43,7 +43,7 @@ The **`time`** function returns the number of seconds elapsed since midnight (00 |-------|------|---------------------| |**`time`**, **`_time32`**, **`_time64`**|``|`` or ``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -199,12 +199,12 @@ Today is Friday, day 25 of April in the year 2003. ## See also -[Time Management](../../c-runtime-library/time-management.md)
-[`asctime`, `_wasctime`](asctime-wasctime.md)
-[`asctime_s`, `_wasctime_s`](asctime-s-wasctime-s.md)
-[`_ftime`, `_ftime32`, `_ftime64`](ftime-ftime32-ftime64.md)
-[`gmtime`, `_gmtime32`, `_gmtime64`](gmtime-gmtime32-gmtime64.md)
-[`gmtime_s`, `_gmtime32_s`, `_gmtime64_s`](gmtime-s-gmtime32-s-gmtime64-s.md)
-[`localtime`, `_localtime32`, `_localtime64`](localtime-localtime32-localtime64.md)
-[`localtime_s`, `_localtime32_s`, `_localtime64_s`](localtime-s-localtime32-s-localtime64-s.md)
-[`_utime`, `_utime32`, `_utime64`, `_wutime`, `_wutime32`, `_wutime64`](utime-utime32-utime64-wutime-wutime32-wutime64.md)
+[Time management](../time-management.md)\ +[`asctime`, `_wasctime`](asctime-wasctime.md)\ +[`asctime_s`, `_wasctime_s`](asctime-s-wasctime-s.md)\ +[`_ftime`, `_ftime32`, `_ftime64`](ftime-ftime32-ftime64.md)\ +[`gmtime`, `_gmtime32`, `_gmtime64`](gmtime-gmtime32-gmtime64.md)\ +[`gmtime_s`, `_gmtime32_s`, `_gmtime64_s`](gmtime-s-gmtime32-s-gmtime64-s.md)\ +[`localtime`, `_localtime32`, `_localtime64`](localtime-localtime32-localtime64.md)\ +[`localtime_s`, `_localtime32_s`, `_localtime64_s`](localtime-s-localtime32-s-localtime64-s.md)\ +[`_utime`, `_utime32`, `_utime64`, `_wutime`, `_wutime32`, `_wutime64`](utime-utime32-utime64-wutime-wutime32-wutime64.md) diff --git a/docs/c-runtime-library/reference/timespec-get-timespec32-get-timespec64-get1.md b/docs/c-runtime-library/reference/timespec-get-timespec32-get-timespec64-get1.md index eaecfb7e924..022ce6dfe48 100644 --- a/docs/c-runtime-library/reference/timespec-get-timespec32-get-timespec64-get1.md +++ b/docs/c-runtime-library/reference/timespec-get-timespec32-get-timespec64-get1.md @@ -33,23 +33,23 @@ int _timespec64_get( ### Parameters -*time_spec*
+*`time_spec`*\ Pointer to a struct that is set to the time in seconds and nanoseconds since the start of the epoch. -*base*
+*`base`*\ A non-zero implementation-specific value that specifies the time base. -## Return Value +## Return value -The value of *base* if successful, otherwise it returns zero. +The value of *`base`* if successful, otherwise it returns zero. ## Remarks -The **timespec_get** functions set the current time in the struct pointed to by the *time_spec* argument. All versions of this struct have two members, **tv_sec** and **tv_nsec**. The **tv_sec** value is set to the whole number of seconds and **tv_nsec** to the integral number of nanoseconds, rounded to the resolution of the system clock, since the start of the epoch specified by *base*. +The **timespec_get** functions set the current time in the struct pointed to by the *`time_spec`* argument. All versions of this struct have two members, **tv_sec** and **tv_nsec**. The **tv_sec** value is set to the whole number of seconds and **tv_nsec** to the integral number of nanoseconds, rounded to the resolution of the system clock, since the start of the epoch specified by *`base`*. **Microsoft Specific** -These functions support only **TIME_UTC** as the *base* value. This sets the *time_spec* value to the number of seconds and nanoseconds since the epoch start, Midnight, January 1, 1970, Coordinated Universal Time (UTC). In a **`struct`** **_timespec32**, **tv_sec** is a **__time32_t** value. In a **`struct`** **_timespec64**, **tv_sec** is a **__time64_t** value. In a **`struct`** **timespec**, **tv_sec** is a **time_t** type, which is 32 bits or 64 bits in length depending on whether the preprocessor macro _USE_32BIT_TIME_T is defined. The **timespec_get** function is an inline function that calls **_timespec32_get** if _USE_32BIT_TIME_T is defined; otherwise it calls **_timespec64_get**. +These functions support only **TIME_UTC** as the *`base`* value. This sets the *`time_spec`* value to the number of seconds and nanoseconds since the epoch start, Midnight, January 1, 1970, Coordinated Universal Time (UTC). In a **`struct`** **_timespec32**, **tv_sec** is a **__time32_t** value. In a **`struct`** **_timespec64**, **tv_sec** is a **__time64_t** value. In a **`struct`** **timespec**, **tv_sec** is a **time_t** type, which is 32 bits or 64 bits in length depending on whether the preprocessor macro _USE_32BIT_TIME_T is defined. The **timespec_get** function is an inline function that calls **_timespec32_get** if _USE_32BIT_TIME_T is defined; otherwise it calls **_timespec64_get**. **End Microsoft Specific** @@ -61,17 +61,17 @@ By default, this function's global state is scoped to the application. To change |-------------|---------------------| |**timespec_get**, **_timespec32_get**, **_timespec64_get**|C: \, C++: \ or \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Time Management](../../c-runtime-library/time-management.md)
-[asctime, _wasctime](asctime-wasctime.md)
-[asctime_s, _wasctime_s](asctime-s-wasctime-s.md)
-[_ftime, _ftime32, _ftime64](ftime-ftime32-ftime64.md)
-[gmtime, _gmtime32, _gmtime64](gmtime-gmtime32-gmtime64.md)
-[gmtime_s, _gmtime32_s, _gmtime64_s](gmtime-s-gmtime32-s-gmtime64-s.md)
-[localtime, _localtime32, _localtime64](localtime-localtime32-localtime64.md)
-[localtime_s, _localtime32_s, _localtime64_s](localtime-s-localtime32-s-localtime64-s.md)
-[time, _time32, _time64](time-time32-time64.md)
-[_utime, _utime32, _utime64, _wutime, _wutime32, _wutime64](utime-utime32-utime64-wutime-wutime32-wutime64.md)
+[Time management](../time-management.md)\ +[`asctime`, `_wasctime`](asctime-wasctime.md)\ +[`asctime_s`, `_wasctime_s`](asctime-s-wasctime-s.md)\ +[`_ftime`, `_ftime32`, `_ftime64`](ftime-ftime32-ftime64.md)\ +[`gmtime`, `_gmtime32`, `_gmtime64`](gmtime-gmtime32-gmtime64.md)\ +[`gmtime_s`, `_gmtime32_s`, `_gmtime64_s`](gmtime-s-gmtime32-s-gmtime64-s.md)\ +[`localtime`, `_localtime32`, `_localtime64`](localtime-localtime32-localtime64.md)\ +[`localtime_s`, `_localtime32_s`, `_localtime64_s`](localtime-s-localtime32-s-localtime64-s.md)\ +[`time`, `_time32`, `_time64`](time-time32-time64.md)\ +[`_utime`, `_utime32`, `_utime64`, `_wutime`, `_wutime32`, `_wutime64`](utime-utime32-utime64-wutime-wutime32-wutime64.md) diff --git a/docs/c-runtime-library/reference/tmpfile-s.md b/docs/c-runtime-library/reference/tmpfile-s.md index 0fa4e5d5589..17fc313bb20 100644 --- a/docs/c-runtime-library/reference/tmpfile-s.md +++ b/docs/c-runtime-library/reference/tmpfile-s.md @@ -12,7 +12,7 @@ ms.assetid: 50879c69-215e-425a-a2a3-8b5467121eae --- # tmpfile_s -Creates a temporary file. It is a version of [tmpfile](tmpfile.md) with security enhancements as described in [Security Features in the CRT](../../c-runtime-library/security-features-in-the-crt.md). +Creates a temporary file. It is a version of [`tmpfile`](tmpfile.md) with security enhancements as described in [Security features in the CRT](../security-features-in-the-crt.md). ## Syntax @@ -24,26 +24,26 @@ errno_t tmpfile_s( ### Parameters -*pFilePtr*
+*`pFilePtr`*\ The address of a pointer to store the address of the generated pointer to a stream. -## Return Value +## Return value Returns 0 if successful, an error code on failure. -### Error Conditions +### Error conditions -|*pFilePtr*|**Return Value**|**Contents of** *pFilePtr*| +|*`pFilePtr`*|Return value|Contents of *`pFilePtr`*| |----------------|----------------------|---------------------------------| |**NULL**|**EINVAL**|not changed| -If the above parameter validation error occurs, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, **errno** is set to **EINVAL** and the return value is **EINVAL**. +If the above parameter validation error occurs, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, **errno** is set to **EINVAL** and the return value is **EINVAL**. ## Remarks -The **tmpfile_s** function creates a temporary file and puts a pointer to that stream in the *pFilePtr* argument. The temporary file is created in the root directory. To create a temporary file in a directory other than the root, use [tmpnam_s](tmpnam-s-wtmpnam-s.md) or [tempnam](tempnam-wtempnam-tmpnam-wtmpnam.md) in conjunction with [fopen](fopen-wfopen.md). +The **tmpfile_s** function creates a temporary file and puts a pointer to that stream in the *`pFilePtr`* argument. The temporary file is created in the root directory. To create a temporary file in a directory other than the root, use [`tmpnam_s`](tmpnam-s-wtmpnam-s.md) or [`tempnam`](tempnam-wtempnam-tmpnam-wtmpnam.md) in conjunction with [`fopen`](fopen-wfopen.md). -If the file cannot be opened, **tmpfile_s** writes **NULL** to the *pFilePtr* parameter. This temporary file is automatically deleted when the file is closed, when the program terminates normally, or when **_rmtmp** is called, assuming that the current working directory does not change. The temporary file is opened in **w+b** (binary read/write) mode. +If the file cannot be opened, **tmpfile_s** writes **NULL** to the *`pFilePtr`* parameter. This temporary file is automatically deleted when the file is closed, when the program terminates normally, or when **_rmtmp** is called, assuming that the current working directory does not change. The temporary file is opened in **w+b** (binary read/write) mode. Failure can occur if you attempt more than **TMP_MAX_S** (see STDIO.H) calls with **tmpfile_s**. @@ -55,7 +55,7 @@ By default, this function's global state is scoped to the application. To change |-------------|---------------------| |**tmpfile_s**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -101,6 +101,6 @@ Temporary file 3 was created ## See also -[Stream I/O](../../c-runtime-library/stream-i-o.md)
-[_rmtmp](rmtmp.md)
-[_tempnam, _wtempnam, tmpnam, _wtmpnam](tempnam-wtempnam-tmpnam-wtmpnam.md)
+[Stream I/O](../stream-i-o.md)\ +[`_rmtmp`](rmtmp.md)\ +[`_tempnam`, `_wtempnam`, `tmpnam`, `_wtmpnam`](tempnam-wtempnam-tmpnam-wtmpnam.md) diff --git a/docs/c-runtime-library/reference/tmpfile.md b/docs/c-runtime-library/reference/tmpfile.md index 1e837e16999..a95e2f2139d 100644 --- a/docs/c-runtime-library/reference/tmpfile.md +++ b/docs/c-runtime-library/reference/tmpfile.md @@ -12,7 +12,7 @@ ms.assetid: c4a4dc24-70da-438d-ae4e-98352d88e375 --- # tmpfile -Creates a temporary file. This function is deprecated because a more secure version is available; see [tmpfile_s](tmpfile-s.md). +Creates a temporary file. This function is deprecated because a more secure version is available; see [`tmpfile_s`](tmpfile-s.md). ## Syntax @@ -20,13 +20,13 @@ Creates a temporary file. This function is deprecated because a more secure vers FILE *tmpfile( void ); ``` -## Return Value +## Return value If successful, **tmpfile** returns a stream pointer. Otherwise, it returns a **NULL** pointer. ## Remarks -The **tmpfile** function creates a temporary file and returns a pointer to that stream. The temporary file is created in the root directory. To create a temporary file in a directory other than the root, use [tmpnam](tempnam-wtempnam-tmpnam-wtmpnam.md) or [tempnam](tempnam-wtempnam-tmpnam-wtmpnam.md) in conjunction with [fopen](fopen-wfopen.md). +The **tmpfile** function creates a temporary file and returns a pointer to that stream. The temporary file is created in the root directory. To create a temporary file in a directory other than the root, use [`tmpnam`](tempnam-wtempnam-tmpnam-wtmpnam.md) or [`tempnam`](tempnam-wtempnam-tmpnam-wtmpnam.md) in conjunction with [`fopen`](fopen-wfopen.md). If the file cannot be opened, **tmpfile** returns a **NULL** pointer. This temporary file is automatically deleted when the file is closed, when the program terminates normally, or when **_rmtmp** is called, assuming that the current working directory does not change. The temporary file is opened in **w+b** (binary read/write) mode. @@ -38,7 +38,7 @@ Failure can occur if you attempt more than TMP_MAX (see STDIO.H) calls with **tm |-------------|---------------------| |**tmpfile**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -81,6 +81,6 @@ Temporary file 3 was created ## See also -[Stream I/O](../../c-runtime-library/stream-i-o.md)
-[_rmtmp](rmtmp.md)
-[_tempnam, _wtempnam, tmpnam, _wtmpnam](tempnam-wtempnam-tmpnam-wtmpnam.md)
+[Stream I/O](../stream-i-o.md)\ +[`_rmtmp`](rmtmp.md)\ +[`_tempnam`, `_wtempnam`, `tmpnam`, `_wtmpnam`](tempnam-wtempnam-tmpnam-wtmpnam.md) diff --git a/docs/c-runtime-library/reference/tmpnam-s-wtmpnam-s.md b/docs/c-runtime-library/reference/tmpnam-s-wtmpnam-s.md index 4a056d10051..1fd1d59940b 100644 --- a/docs/c-runtime-library/reference/tmpnam-s-wtmpnam-s.md +++ b/docs/c-runtime-library/reference/tmpnam-s-wtmpnam-s.md @@ -12,7 +12,7 @@ ms.assetid: e70d76dc-49f5-4aee-bfa2-f1baa2bcd29f --- # tmpnam_s, _wtmpnam_s -Generate names you can use to create temporary files. These are versions of [tmpnam and _wtmpnam](tempnam-wtempnam-tmpnam-wtmpnam.md) with security enhancements as described in [Security Features in the CRT](../../c-runtime-library/security-features-in-the-crt.md). +Generate names you can use to create temporary files. These are versions of [`tmpnam` and `_wtmpnam`](tempnam-wtempnam-tmpnam-wtmpnam.md) with security enhancements as described in [Security features in the CRT](../security-features-in-the-crt.md). ## Syntax @@ -37,38 +37,38 @@ errno_t _wtmpnam_s( ### Parameters -*str*
+*`str`*\ Pointer that will hold the generated name. -*sizeInChars*
+*`sizeInChars`*\ The size of the buffer in characters. -## Return Value +## Return value Both of these functions return 0 if successful or an error number on failure. -### Error Conditions +### Error conditions -| *str* | *sizeInChars* | **Return Value** | **Contents of** *str* | +| *`str`* | *`sizeInChars`* | Return value | Contents of *`str`* | |--|--|--|--| | **NULL** | any | **EINVAL** | not modified | | not **NULL** (points to valid memory) | too short | **ERANGE** | not modified | -If *str* is **NULL**, the invalid parameter handler is invoked, 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 **EINVAL**. +If *`str`* is **NULL**, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, these functions set **errno** to **EINVAL** and return **EINVAL**. ## Remarks Each of these functions returns the name of a file that does not currently exist. **tmpnam_s** returns a name unique in the designated Windows temporary directory returned by [GetTempPathW](/windows/win32/api/fileapi/nf-fileapi-gettemppathw). Note than when a file name is pre-pended with a backslash and no path information, such as \fname21, this indicates that the name is valid for the current working directory. -For **tmpnam_s**, you can store this generated file name in *str*. The maximum length of a string returned by **tmpnam_s** is **L_tmpnam_s**, defined in STDIO.H. If *str* is **NULL**, then **tmpnam_s** leaves the result in an internal static buffer. Thus any subsequent calls destroy this value. The name generated by **tmpnam_s** consists of a program-generated file name and, after the first call to **tmpnam_s**, a file extension of sequential numbers in base 32 (.1-.1vvvvvu, when **TMP_MAX_S** in STDIO.H is **INT_MAX**). +For **tmpnam_s**, you can store this generated file name in *`str`*. The maximum length of a string returned by **tmpnam_s** is **L_tmpnam_s**, defined in STDIO.H. If *`str`* is **NULL**, then **tmpnam_s** leaves the result in an internal static buffer. Thus any subsequent calls destroy this value. The name generated by **tmpnam_s** consists of a program-generated file name and, after the first call to **tmpnam_s**, a file extension of sequential numbers in base 32 (.1-.1vvvvvu, when **TMP_MAX_S** in STDIO.H is **INT_MAX**). **tmpnam_s** automatically handles multibyte-character string arguments as appropriate, recognizing multibyte-character sequences according to the OEM code page obtained from the operating system. **_wtmpnam_s** is a wide-character version of **tmpnam_s**; the argument and return value of **_wtmpnam_s** are wide-character strings. **_wtmpnam_s** and **tmpnam_s** behave identically except that **_wtmpnam_s** does not handle multibyte-character strings. -In C++, using these functions is simplified by template overloads; the overloads can infer buffer length automatically, eliminating the need to specify a size argument. For more information, see [Secure Template Overloads](../../c-runtime-library/secure-template-overloads.md). +In C++, using these functions is simplified by template overloads; the overloads can infer buffer length automatically, eliminating the need to specify a size argument. 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 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| |---------------------|------------------------------------|--------------------|-----------------------| @@ -81,7 +81,7 @@ By default, this function's global state is scoped to the application. To change |**tmpnam_s**|\| |**_wtmpnam_s**|\ or \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -136,8 +136,8 @@ C:\Users\LocalUser\AppData\Local\Temp\u19q8.e is safe to use as a temporary file ## See also -[Stream I/O](../../c-runtime-library/stream-i-o.md)
-[_getmbcp](getmbcp.md)
-[malloc](malloc.md)
-[_setmbcp](setmbcp.md)
-[tmpfile_s](tmpfile-s.md)
+[Stream I/O](../stream-i-o.md)\ +[`_getmbcp`](getmbcp.md)\ +[`malloc`](malloc.md)\ +[`_setmbcp`](setmbcp.md)\ +[`tmpfile_s`](tmpfile-s.md) diff --git a/docs/c-runtime-library/reference/toascii-toascii.md b/docs/c-runtime-library/reference/toascii-toascii.md index 621e8513067..ea5907a9982 100644 --- a/docs/c-runtime-library/reference/toascii-toascii.md +++ b/docs/c-runtime-library/reference/toascii-toascii.md @@ -25,12 +25,12 @@ int __toascii( ### Parameters -*c*
+*`c`*\ Character to convert. -## Return Value +## Return value -**__toascii** converts the value of *c* to the 7-bit ASCII range and returns the result. There is no return value reserved to indicate an error. +**__toascii** converts the value of *`c`* to the 7-bit ASCII range and returns the result. There is no return value reserved to indicate an error. ## Remarks @@ -44,10 +44,10 @@ The **__toascii** routine is defined as a macro unless the preprocessor macro _C |-------------|---------------------| |**toascii**, **__toascii**|C: \

C++: \ or \| -The **toascii** macro is a POSIX extension, and **__toascii** is a Microsoft-specific implementation of the POSIX extension. For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +The **toascii** macro is a POSIX extension, and **__toascii** is a Microsoft-specific implementation of the POSIX extension. For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Data Conversion](../../c-runtime-library/data-conversion.md)
-[is, isw Routines](../../c-runtime-library/is-isw-routines.md)
-[to Functions](../../c-runtime-library/to-functions.md)
+[Data conversion](../data-conversion.md)\ +[`is`, `isw` routines](../is-isw-routines.md)\ +[`to` functions](../to-functions.md) diff --git a/docs/c-runtime-library/reference/tolower-tolower-towlower-tolower-l-towlower-l.md b/docs/c-runtime-library/reference/tolower-tolower-towlower-tolower-l-towlower-l.md index 054f71be346..cce1551e8f9 100644 --- a/docs/c-runtime-library/reference/tolower-tolower-towlower-tolower-l-towlower-l.md +++ b/docs/c-runtime-library/reference/tolower-tolower-towlower-tolower-l-towlower-l.md @@ -38,25 +38,25 @@ int _towlower_l( ### Parameters -*c*
+*`c`*\ Character to convert. -*locale*
+*`locale`*\ Locale to use for locale-specific translation. -## Return Value +## Return value -Each of these routines converts a copy of *c* to lower case if the conversion is possible, and returns the result. There is no return value reserved to indicate an error. +Each of these routines converts a copy of *`c`* to lower case if the conversion is possible, and returns the result. There is no return value reserved to indicate an error. ## Remarks -Each of these routines converts a given uppercase letter to a lowercase letter if it is possible and relevant. The case conversion of **towlower** is locale-specific. Only the characters relevant to the current locale are changed in case. The functions without the **_l** suffix use the currently set locale. The versions of these functions that have the **_l** suffix take the locale as a parameter and use that instead of the currently set locale. For more information, see [Locale](../../c-runtime-library/locale.md). +Each of these routines converts a given uppercase letter to a lowercase letter if it is possible and relevant. The case conversion of **towlower** is locale-specific. Only the characters relevant to the current locale are changed in case. The functions without the **_l** suffix use the currently set locale. The versions of these functions that have the **_l** suffix take the locale as a parameter and use that instead of the currently set locale. For more information, see [Locale](../locale.md). -In order for **_tolower** to give the expected results, [__isascii](isascii-isascii-iswascii.md) and [isupper](isupper-isupper-l-iswupper-iswupper-l.md) must both return nonzero. +In order for **_tolower** to give the expected results, [`__isascii`](isascii-isascii-iswascii.md) and [`isupper`](isupper-isupper-l-iswupper-iswupper-l.md) must both return nonzero. By default, this function's global state is scoped to the application. To change this behavior, see [Global state in the CRT](../global-state.md). -### Generic-Text Routine Mappings +### Generic-text routine mappings |TCHAR.H routine|_UNICODE & _MBCS not defined|_MBCS defined|_UNICODE defined| |---------------------|------------------------------------|--------------------|-----------------------| @@ -74,16 +74,16 @@ By default, this function's global state is scoped to the application. To change |**_tolower**|\| |**towlower**|\ or \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example -See the example in [to Functions](../../c-runtime-library/to-functions.md). +See the example in [`to` functions](../to-functions.md). ## See also -[Data Conversion](../../c-runtime-library/data-conversion.md)
-[is, isw Routines](../../c-runtime-library/is-isw-routines.md)
-[to Functions](../../c-runtime-library/to-functions.md)
-[Locale](../../c-runtime-library/locale.md)
-[Interpretation of Multibyte-Character Sequences](../../c-runtime-library/interpretation-of-multibyte-character-sequences.md)
+[Data conversion](../data-conversion.md)\ +[`is`, `isw` routines](../is-isw-routines.md)\ +[`to` functions](../to-functions.md)\ +[Locale](../locale.md)\ +[Interpretation of multibyte-character sequences](../interpretation-of-multibyte-character-sequences.md) diff --git a/docs/c-runtime-library/reference/toupper-toupper-towupper-toupper-l-towupper-l.md b/docs/c-runtime-library/reference/toupper-toupper-towupper-toupper-l-towupper-l.md index 53c74560ad7..8e01aeafd2e 100644 --- a/docs/c-runtime-library/reference/toupper-toupper-towupper-toupper-l-towupper-l.md +++ b/docs/c-runtime-library/reference/toupper-toupper-towupper-toupper-l-towupper-l.md @@ -38,33 +38,31 @@ int _towupper_l( ### Parameters -*c*
+*`c`*\ Character to convert. -*locale*
+*`locale`*\ Locale to use. -## Return Value +## Return value -Each of these routines converts a copy of *c*, if possible, and returns the result. +Each of these routines converts a copy of *`c`*, if possible, and returns the result. -If *c* is a wide character for which **iswlower** is nonzero and there is a corresponding wide character for which [iswupper](isupper-isupper-l-iswupper-iswupper-l.md) is nonzero, **towupper** returns the corresponding wide character; otherwise, **towupper** returns *c* unchanged. +If *`c`* is a wide character for which **iswlower** is nonzero and there is a corresponding wide character for which [`iswupper`](isupper-isupper-l-iswupper-iswupper-l.md) is nonzero, **towupper** returns the corresponding wide character; otherwise, **towupper** returns *`c`* unchanged. There is no return value reserved to indicate an error. -In order for **toupper** to give the expected results, [__isascii](isascii-isascii-iswascii.md) and [islower](islower-iswlower-islower-l-iswlower-l.md) must both return nonzero. +In order for **toupper** to give the expected results, [`__isascii`](isascii-isascii-iswascii.md) and [`islower`](islower-iswlower-islower-l-iswlower-l.md) must both return nonzero. ## Remarks -Each of these routines converts a given lowercase letter to an uppercase letter if possible and appropriate. The case conversion of **towupper** is locale-specific. Only the characters relevant to the current locale are changed in case. The functions without the **_l** suffix use the currently set locale. The versions of these functions with the **_l** suffix take the locale as a parameter and use that instead of the currently set locale. For more information, see [Locale](../../c-runtime-library/locale.md). +Each of these routines converts a given lowercase letter to an uppercase letter if possible and appropriate. The case conversion of **towupper** is locale-specific. Only the characters relevant to the current locale are changed in case. The functions without the **_l** suffix use the currently set locale. The versions of these functions with the **_l** suffix take the locale as a parameter and use that instead of the currently set locale. For more information, see [Locale](../locale.md). -In order for **toupper** to give the expected results, [__isascii](isascii-isascii-iswascii.md) and [isupper](isupper-isupper-l-iswupper-iswupper-l.md) must both return nonzero. - -[Data Conversion Routines](../../c-runtime-library/data-conversion.md) +In order for **toupper** to give the expected results, [`__isascii`](isascii-isascii-iswascii.md) and [`isupper`](isupper-isupper-l-iswupper-iswupper-l.md) must both return nonzero. 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| |---------------------|------------------------------------|--------------------|-----------------------| @@ -82,15 +80,15 @@ By default, this function's global state is scoped to the application. To change |**_toupper**|\| |**towupper**|\ or \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example -See the example in [to Functions](../../c-runtime-library/to-functions.md). +See the example in [`to` functions](../to-functions.md). ## See also -[is, isw Routines](../../c-runtime-library/is-isw-routines.md)
-[to Functions](../../c-runtime-library/to-functions.md)
-[Locale](../../c-runtime-library/locale.md)
-[Interpretation of Multibyte-Character Sequences](../../c-runtime-library/interpretation-of-multibyte-character-sequences.md)
+[`is`, `isw` routines](../is-isw-routines.md)\ +[`to` functions](../to-functions.md)\ +[Locale](../locale.md)\ +[Interpretation of multibyte-character sequences](../interpretation-of-multibyte-character-sequences.md) diff --git a/docs/c-runtime-library/reference/towctrans.md b/docs/c-runtime-library/reference/towctrans.md index fcc0f39a390..eef9118ad97 100644 --- a/docs/c-runtime-library/reference/towctrans.md +++ b/docs/c-runtime-library/reference/towctrans.md @@ -25,19 +25,19 @@ wint_t towctrans( ### Parameters -*c*
+*`c`*\ The character you want to transform. -*category*
-An identifier that contains the return value of [wctrans](wctrans.md). +*`category`*\ +An identifier that contains the return value of [`wctrans`](wctrans.md). -## Return Value +## Return value -The character *c*, after **towctrans** used the transform rule in *category*. +The character *`c`*, after **towctrans** used the transform rule in *`category`*. ## Remarks -The value of *category* must have been returned by an earlier successful call to [wctrans](wctrans.md). +The value of *`category`* must have been returned by an earlier successful call to [`wctrans`](wctrans.md). ## Requirements @@ -45,7 +45,7 @@ The value of *category* must have been returned by an earlier successful call to |-------------|---------------------| |**towctrans**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -53,4 +53,4 @@ See **wctrans** for a sample that uses **towctrans**. ## See also -[Data Conversion](../../c-runtime-library/data-conversion.md)
+[Data conversion](../data-conversion.md) diff --git a/docs/c-runtime-library/reference/trunc-truncf-truncl.md b/docs/c-runtime-library/reference/trunc-truncf-truncl.md index 6b8335333c7..4a404edbc90 100644 --- a/docs/c-runtime-library/reference/trunc-truncf-truncl.md +++ b/docs/c-runtime-library/reference/trunc-truncf-truncl.md @@ -27,28 +27,28 @@ float trunc( float x ); //C++ only ### Parameters -*x*\ +*`x`*\ The value to truncate. -## Return Value +## Return value -If successful, returns an integer value of *x*, rounded towards zero. +If successful, returns an integer value of *`x`*, rounded towards zero. Otherwise, may return one of the following: |Issue|Return| |-----------|------------| -|*x* = ±INFINITY|x| -|*x* = ±0|x| -|*x* = NaN|NaN| +|*`x`* = ±INFINITY|x| +|*`x`* = ±0|x| +|*`x`* = NaN|NaN| -Errors are reported as specified in [_matherr](matherr.md). +Errors are reported as specified in [`_matherr`](matherr.md). ## Remarks Because C++ allows overloading, you can call overloads of **trunc** that take and return **`float`** and **`long double`** types. In a C program, unless you're using the \ macro to call this function, **trunc** always takes and returns a **`double`**. -If you use the \ `trunc()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../../c-runtime-library/tgmath.md) for details. +If you use the \ `trunc()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../tgmath.md) for details. Because the largest floating-point values are exact integers, this function will not overflow on its own. However, you may cause the function to overflow by returning a value into an integer type. @@ -61,11 +61,11 @@ You can also round down by implicitly converting from floating-point to integral |**trunc**, **truncf**, **truncl**|\|\| |**trunc** macro | \ || -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Alphabetical Function Reference](crt-alphabetical-function-reference.md)
-[floor, floorf, floorl](floor-floorf-floorl.md)
-[ceil, ceilf, ceill](ceil-ceilf-ceill.md)
-[round, roundf, roundl](round-roundf-roundl.md)
+[Alphabetical function reference](crt-alphabetical-function-reference.md)\ +[`floor`, `floorf`, `floorl`](floor-floorf-floorl.md)\ +[`ceil`, `ceilf`, `ceill`](ceil-ceilf-ceill.md)\ +[`round`, `roundf`, `roundl`](round-roundf-roundl.md) diff --git a/docs/c-runtime-library/reference/tzset.md b/docs/c-runtime-library/reference/tzset.md index dc03281752b..abb29e5e660 100644 --- a/docs/c-runtime-library/reference/tzset.md +++ b/docs/c-runtime-library/reference/tzset.md @@ -25,24 +25,24 @@ void _tzset( void ); ## Remarks -The **_tzset** function uses the current setting of the environment variable **TZ** to assign values to three global variables: **_daylight**, **_timezone**, and **_tzname**. These variables are used by the [_ftime](ftime-ftime32-ftime64.md) and [localtime](localtime-localtime32-localtime64.md) functions to make corrections from coordinated universal time (UTC) to local time, and by the [time](time-time32-time64.md) function to compute UTC from system time. Use the following syntax to set the **TZ** environment variable: +The **_tzset** function uses the current setting of the environment variable **TZ** to assign values to three global variables: **_daylight**, **_timezone**, and **_tzname**. These variables are used by the [`_ftime`](ftime-ftime32-ftime64.md) and [`localtime`](localtime-localtime32-localtime64.md) functions to make corrections from coordinated universal time (UTC) to local time, and by the [`time`](time-time32-time64.md) function to compute UTC from system time. Use the following syntax to set the **TZ** environment variable: -> **set TZ=**_tzn_ \[**+**|**-**]*hh*\[**:**_mm_\[**:**_ss_] ][*dzn*] +> **`set TZ=`***`tzn`* \[**`+`**|**`-`**]*`hh`*\[**`:`***`mm`*\[**:***`ss`*] ][*`dzn`*] - *tzn* \ + *`tzn`* \ Three-letter time-zone name, such as PST. You must specify the correct offset from local time to UTC. - *hh* \ + *`hh`* \ Difference in hours between UTC and local time. Sign (+) optional for positive values. - *mm* \ - Minutes. Separated from *hh* by a colon (**:**). + *`mm`* \ + Minutes. Separated from *`hh`* by a colon (**`:`**). - *ss* \ - Seconds. Separated from *mm* by a colon (**:**). + *`ss`* \ + Seconds. Separated from *`mm`* by a colon (**`:`**). - *dzn* \ - Three-letter daylight-saving-time zone such as PDT. If daylight saving time is never in effect in the locality, set **TZ** without a value for *dzn*. The C run-time library assumes the United States' rules for implementing the calculation of daylight saving time (DST). + *`dzn`* \ + Three-letter daylight-saving-time zone such as PDT. If daylight saving time is never in effect in the locality, set **TZ** without a value for *`dzn`*. The C run-time library assumes the United States' rules for implementing the calculation of daylight saving time (DST). > [!NOTE] > Take care in computing the sign of the time difference. Because the time difference is the offset from local time to UTC (rather than the reverse), its sign may be the opposite of what you might intuitively expect. For time zones ahead of UTC, the time difference is negative; for those behind UTC, the difference is positive. @@ -64,7 +64,7 @@ Based on the **TZ** environment variable value, the following values are assigne |**_tzname**[0]|String value of time-zone name from **TZ** environmental variable; empty if **TZ** has not been set.|PST| |**_tzname**[1]|String value of daylight-saving-time zone; empty if daylight-saving-time zone is omitted from **TZ** environmental variable.|PDT| -The default values shown in the preceding table for **_daylight** and the **_tzname** array correspond to "PST8PDT." If the DST zone is omitted from the **TZ** environmental variable, the value of **_daylight** is 0 and the [_ftime](ftime-ftime32-ftime64.md), [gmtime](gmtime-gmtime32-gmtime64.md), and [localtime](localtime-localtime32-localtime64.md) functions return 0 for their DST flags. +The default values shown in the preceding table for **_daylight** and the **_tzname** array correspond to "PST8PDT." If the DST zone is omitted from the **TZ** environmental variable, the value of **_daylight** is 0 and the [`_ftime`](ftime-ftime32-ftime64.md), [`gmtime`](gmtime-gmtime32-gmtime64.md), and [`localtime`](localtime-localtime32-localtime64.md) functions return 0 for their DST flags. 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). @@ -74,7 +74,7 @@ By default, this function's global state is scoped to the application. To change |-------------|---------------------| |**_tzset**|\| -The **_tzset** function is Microsoft-specific. For more information, see [Compatibility](../../c-runtime-library/compatibility.md). +The **_tzset** function is Microsoft-specific. For more information, see [Compatibility](../compatibility.md). ## Example @@ -113,10 +113,10 @@ _tzname[0] = Pacific Standard Time ## See also -[Time Management](../../c-runtime-library/time-management.md)
-[asctime, _wasctime](asctime-wasctime.md)
-[_ftime, _ftime32, _ftime64](ftime-ftime32-ftime64.md)
-[gmtime, _gmtime32, _gmtime64](gmtime-gmtime32-gmtime64.md)
-[localtime, _localtime32, _localtime64](localtime-localtime32-localtime64.md)
-[time, _time32, _time64](time-time32-time64.md)
-[_utime, _utime32, _utime64, _wutime, _wutime32, _wutime64](utime-utime32-utime64-wutime-wutime32-wutime64.md)
+[Time management](../time-management.md)\ +[`asctime`, `_wasctime`](asctime-wasctime.md)\ +[`_ftime`, `_ftime32`, `_ftime64`](ftime-ftime32-ftime64.md)\ +[`gmtime`, `_gmtime32`, `_gmtime64`](gmtime-gmtime32-gmtime64.md)\ +[`localtime`, `_localtime32`, `_localtime64`](localtime-localtime32-localtime64.md)\ +[`time`, `_time32`, `_time64`](time-time32-time64.md)\ +[`_utime`, `_utime32`, `_utime64`, `_wutime`, `_wutime32`, `_wutime64`](utime-utime32-utime64-wutime-wutime32-wutime64.md) diff --git a/docs/c-runtime-library/reference/umask-s.md b/docs/c-runtime-library/reference/umask-s.md index 2460098e1c6..5ccafbc11ed 100644 --- a/docs/c-runtime-library/reference/umask-s.md +++ b/docs/c-runtime-library/reference/umask-s.md @@ -12,7 +12,7 @@ ms.assetid: 70898f61-bf2b-4d8d-8291-0ccaa6d33145 --- # `_umask_s` -Sets the default file-permission mask. A version of [`_umask`](umask.md) with security enhancements as described in [Security features in the CRT](../../c-runtime-library/security-features-in-the-crt.md). +Sets the default file-permission mask. A version of [`_umask`](umask.md) with security enhancements as described in [Security features in the CRT](../security-features-in-the-crt.md). ## Syntax @@ -42,7 +42,7 @@ Returns an error code if *`mode`* doesn't specify a valid mode or the *`pOldMode | any | **`NULL`** | **`EINVAL`** | not modified | | invalid mode | any | **`EINVAL`** | not modified | -If one of the above conditions occurs, the invalid parameter handler is invoked, as described in [Parameter validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, **`_umask_s`** returns **`EINVAL`** and sets **`errno`** to **`EINVAL`**. +If one of the above conditions occurs, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, **`_umask_s`** returns **`EINVAL`** and sets **`errno`** to **`EINVAL`**. ## Remarks @@ -68,7 +68,7 @@ By default, this function's global state is scoped to the application. To change |--|--| | **`_umask_s`** | `` and `` and `` | -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -106,8 +106,8 @@ Oldmask = 0x0000 ## See also -[File handling](../../c-runtime-library/file-handling.md)\ -[Low-level I/O](../../c-runtime-library/low-level-i-o.md)\ +[File handling](../file-handling.md)\ +[Low-level I/O](../low-level-i-o.md)\ [`_chmod`, `_wchmod`](chmod-wchmod.md)\ [`_creat`, `_wcreat`](creat-wcreat.md)\ [`_mkdir`, `_wmkdir`](mkdir-wmkdir.md)\ diff --git a/docs/c-runtime-library/reference/umask.md b/docs/c-runtime-library/reference/umask.md index 630ea527d17..7803ffec187 100644 --- a/docs/c-runtime-library/reference/umask.md +++ b/docs/c-runtime-library/reference/umask.md @@ -53,11 +53,11 @@ By default, this function's global state is scoped to the application. To change |--|--| | **`_umask`** | ``, ``, `` | -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Libraries -All versions of the [C run-time libraries](../../c-runtime-library/crt-library-features.md). +All versions of the [C run-time libraries](../crt-library-features.md). ## Example @@ -90,8 +90,8 @@ Oldmask = 0x0000 ## See also -[File handling](../../c-runtime-library/file-handling.md)\ -[Low-level I/O](../../c-runtime-library/low-level-i-o.md)\ +[File handling](../file-handling.md)\ +[Low-level I/O](../low-level-i-o.md)\ [`_chmod`, `_wchmod`](chmod-wchmod.md)\ [`_creat`, `_wcreat`](creat-wcreat.md)\ [`_mkdir`, `_wmkdir`](mkdir-wmkdir.md)\ diff --git a/docs/c-runtime-library/reference/uncaught-exception.md b/docs/c-runtime-library/reference/uncaught-exception.md index 00c1d2c8da7..64028cf415c 100644 --- a/docs/c-runtime-library/reference/uncaught-exception.md +++ b/docs/c-runtime-library/reference/uncaught-exception.md @@ -21,7 +21,7 @@ bool __uncaught_exception( ); ``` -## Return Value +## Return value **`true`** from the time an exception is thrown in a **`try`** block until the matching **`catch`** block is initialized; otherwise, **`false`**. @@ -35,4 +35,4 @@ bool __uncaught_exception( ## See also -[try, throw, and catch Statements (C++)](../../cpp/try-throw-and-catch-statements-cpp.md)
+[try, throw, and catch Statements (C++)](../../cpp/try-throw-and-catch-statements-cpp.md) diff --git a/docs/c-runtime-library/reference/unexpected-crt.md b/docs/c-runtime-library/reference/unexpected-crt.md index 0127f107599..8e5a8f6b112 100644 --- a/docs/c-runtime-library/reference/unexpected-crt.md +++ b/docs/c-runtime-library/reference/unexpected-crt.md @@ -30,13 +30,13 @@ The **`unexpected`** routine isn't used with the current implementation of C++ e |-------------|---------------------| |**`unexpected`**|``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Exception Handling Routines](../../c-runtime-library/exception-handling-routines.md)
-[abort](abort.md)
-[_set_se_translator](set-se-translator.md)
-[set_terminate](set-terminate-crt.md)
-[set_unexpected](set-unexpected-crt.md)
-[terminate](terminate-crt.md)
+[Exception handling routines](../exception-handling-routines.md)\ +[`abort`](abort.md)\ +[`_set_se_translator`](set-se-translator.md)\ +[`set_terminate`](set-terminate-crt.md)\ +[`set_unexpected`](set-unexpected-crt.md)\ +[`terminate`](terminate-crt.md) diff --git a/docs/c-runtime-library/reference/ungetc-nolock-ungetwc-nolock.md b/docs/c-runtime-library/reference/ungetc-nolock-ungetwc-nolock.md index 8b5f2a0480d..fe2ba929ac6 100644 --- a/docs/c-runtime-library/reference/ungetc-nolock-ungetwc-nolock.md +++ b/docs/c-runtime-library/reference/ungetc-nolock-ungetwc-nolock.md @@ -29,17 +29,17 @@ wint_t _ungetwc_nolock( ### Parameters -*c*
+*`c`*\ Character to be pushed. -*stream*
+*`stream`*\ Pointer to **FILE** structure. -## Return Value +## Return value -If successful, each of these functions returns the character argument *c*. If *c* cannot be pushed back or if no character has been read, the input stream is unchanged and **_ungetc_nolock** returns **EOF**; **_ungetwc_nolock** returns **WEOF**. If *stream* is **NULL**, **EOF** or **WEOF** is returned and **errno** is set to **EINVAL**. +If successful, each of these functions returns the character argument *`c`*. If *`c`* cannot be pushed back or if no character has been read, the input stream is unchanged and **_ungetc_nolock** returns **EOF**; **_ungetwc_nolock** returns **WEOF**. If *`stream`* is **NULL**, **EOF** or **WEOF** is returned and **errno** is set to **EINVAL**. -For information on these and other error codes, see [_doserrno, errno, _sys_errlist, and _sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +For information on these and other error codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks @@ -47,7 +47,7 @@ These functions are non-locking versions of **ungetc** and **ungetwc**. The vers 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| |---------------------|------------------------------------|--------------------|-----------------------| @@ -60,10 +60,10 @@ By default, this function's global state is scoped to the application. To change |**_ungetc_nolock**|\| |**_ungetwc_nolock**|\ or \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Stream I/O](../../c-runtime-library/stream-i-o.md)
-[getc, getwc](getc-getwc.md)
-[putc, putwc](putc-putwc.md)
+[Stream I/O](../stream-i-o.md)\ +[`getc`, `getwc`](getc-getwc.md)\ +[`putc`, `putwc`](putc-putwc.md) diff --git a/docs/c-runtime-library/reference/ungetc-ungetwc.md b/docs/c-runtime-library/reference/ungetc-ungetwc.md index f61ac641eb2..27160fe3f00 100644 --- a/docs/c-runtime-library/reference/ungetc-ungetwc.md +++ b/docs/c-runtime-library/reference/ungetc-ungetwc.md @@ -29,33 +29,33 @@ wint_t ungetwc( ### Parameters -*c*
+*`c`*\ Character to be pushed. -*stream*
+*`stream`*\ Pointer to **FILE** structure. -## Return Value +## Return value -If successful, each of these functions returns the character argument *c*. If *c* cannot be pushed back or if no character has been read, the input stream is unchanged and **ungetc** returns **EOF**; **ungetwc** returns **WEOF**. If *stream* is **NULL**, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, **EOF** or **WEOF** is returned and **errno** is set to **EINVAL**. +If successful, each of these functions returns the character argument *`c`*. If *`c`* cannot be pushed back or if no character has been read, the input stream is unchanged and **ungetc** returns **EOF**; **ungetwc** returns **WEOF**. If *`stream`* is **NULL**, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, **EOF** or **WEOF** is returned and **errno** is set to **EINVAL**. -For information on these and other error codes, see [_doserrno, errno, _sys_errlist, and _sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +For information on these and other error codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks -The **ungetc** function pushes the character *c* back onto *stream* and clears the end-of-file indicator. The stream must be open for reading. A subsequent read operation on *stream* starts with *c*. An attempt to push **EOF** onto the stream using **ungetc** is ignored. +The **ungetc** function pushes the character *`c`* back onto *`stream`* and clears the end-of-file indicator. The stream must be open for reading. A subsequent read operation on *`stream`* starts with *`c`*. An attempt to push **EOF** onto the stream using **ungetc** is ignored. -Characters placed on the stream by **ungetc** may be erased if **fflush**, [fseek](fseek-fseeki64.md), **fsetpos**, or [rewind](rewind.md) is called before the character is read from the stream. The file-position indicator will have the value it had before the characters were pushed back. The external storage corresponding to the stream is unchanged. On a successful **ungetc** call against a text stream, the file-position indicator is unspecified until all the pushed-back characters are read or discarded. On each successful **ungetc** call against a binary stream, the file-position indicator is decremented; if its value was 0 before a call, the value is undefined after the call. +Characters placed on the stream by **ungetc** may be erased if **fflush**, [`fseek`](fseek-fseeki64.md), **fsetpos**, or [`rewind`](rewind.md) is called before the character is read from the stream. The file-position indicator will have the value it had before the characters were pushed back. The external storage corresponding to the stream is unchanged. On a successful **ungetc** call against a text stream, the file-position indicator is unspecified until all the pushed-back characters are read or discarded. On each successful **ungetc** call against a binary stream, the file-position indicator is decremented; if its value was 0 before a call, the value is undefined after the call. Results are unpredictable if **ungetc** is called twice without a read or file-positioning operation between the two calls. After a call to **fscanf**, a call to **ungetc** may fail unless another read operation (such as **getc**) has been performed. This is because **fscanf** itself calls **ungetc**. **ungetwc** is a wide-character version of **ungetc**. However, on each successful **ungetwc** call against a text or binary stream, the value of the file-position indicator is unspecified until all pushed-back characters are read or discarded. -These functions are thread-safe and lock sensitive data during execution. For a non-locking version, see [_ungetc_nolock, _ungetwc_nolock](ungetc-nolock-ungetwc-nolock.md). +These functions are thread-safe and lock sensitive data during execution. For a non-locking version, see [`_ungetc_nolock`, `_ungetwc_nolock`](ungetc-nolock-ungetwc-nolock.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| |---------------------|------------------------------------|--------------------|-----------------------| @@ -68,7 +68,7 @@ By default, this function's global state is scoped to the application. To change |**ungetc**|\| |**ungetwc**|\ or \| -The console is not supported in Universal Windows Platform (UWP) apps. The standard stream handles that are associated with the console, **stdin**, **stdout**, and **stderr**, must be redirected before C run-time functions can use them in UWP apps. For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +The console is not supported in Universal Windows Platform (UWP) apps. The standard stream handles that are associated with the console, **stdin**, **stdout**, and **stderr**, must be redirected before C run-time functions can use them in UWP apps. For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -106,6 +106,6 @@ Next character in stream = 'a' ## See also -[Stream I/O](../../c-runtime-library/stream-i-o.md)
-[getc, getwc](getc-getwc.md)
-[putc, putwc](putc-putwc.md)
+[Stream I/O](../stream-i-o.md)\ +[`getc`, `getwc`](getc-getwc.md)\ +[`putc`, `putwc`](putc-putwc.md) diff --git a/docs/c-runtime-library/reference/ungetch-ungetwch-ungetch-nolock-ungetwch-nolock.md b/docs/c-runtime-library/reference/ungetch-ungetwch-ungetch-nolock-ungetwch-nolock.md index 0e5f55db8c2..0a6d9ecf169 100644 --- a/docs/c-runtime-library/reference/ungetch-ungetwch-ungetch-nolock-ungetwch-nolock.md +++ b/docs/c-runtime-library/reference/ungetch-ungetwch-ungetch-nolock-ungetwch-nolock.md @@ -36,22 +36,22 @@ wint_t _ungetwch_nolock( ### Parameters -*c*
+*`c`*\ Character to be pushed. -## Return Value +## Return value -Both functions return the character *c* if successful. If there is an error, **_ungetch** returns a value of **EOF** and **_ungetwch** returns **WEOF**. +Both functions return the character *`c`* if successful. If there is an error, **_ungetch** returns a value of **EOF** and **_ungetwch** returns **WEOF**. ## Remarks -These functions push the character *c* back to the console, causing *c* to be the next character read by **_getch** or **_getche** (or **_getwch** or **_getwche**). **_ungetch** and **_ungetwch** fail if they are called more than once before the next read. The *c* argument may not be **EOF** (or **WEOF**). +These functions push the character *`c`* back to the console, causing *`c`* to be the next character read by **_getch** or **_getche** (or **_getwch** or **_getwche**). **_ungetch** and **_ungetwch** fail if they are called more than once before the next read. The *`c`* argument may not be **EOF** (or **WEOF**). The versions with the **_nolock** suffix are identical except that they are not protected from interference by other threads. They may be faster since they do not incur the overhead of locking out other threads. Use these functions only in thread-safe contexts such as single-threaded applications or where the calling scope already handles thread isolation. 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| |---------------------|------------------------------------|--------------------|-----------------------| @@ -65,7 +65,7 @@ By default, this function's global state is scoped to the application. To change |**_ungetch**, **_ungetch_nolock**|\| |**_ungetwch**, **_ungetwch_nolock**|\ or \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -111,6 +111,6 @@ Whitetoken = White ## See also -[Console and Port I/O](../../c-runtime-library/console-and-port-i-o.md)
-[_cscanf, _cscanf_l, _cwscanf, _cwscanf_l](cscanf-cscanf-l-cwscanf-cwscanf-l.md)
-[_getch, _getwch](getch-getwch.md)
+[Console and port I/O](../console-and-port-i-o.md)\ +[`_cscanf`, `_cscanf_l`, `_cwscanf`, `_cwscanf_l`](cscanf-cscanf-l-cwscanf-cwscanf-l.md)\ +[`_getch`, `_getwch`](getch-getwch.md) diff --git a/docs/c-runtime-library/reference/ungetch.md b/docs/c-runtime-library/reference/ungetch.md index 7b67fd45ace..b44145b9fa3 100644 --- a/docs/c-runtime-library/reference/ungetch.md +++ b/docs/c-runtime-library/reference/ungetch.md @@ -12,9 +12,9 @@ ms.assetid: 6921232f-6317-41cd-948b-91d56a11bc0e --- # ungetch -The Microsoft-specific function name `ungetch` is a deprecated alias for the [_ungetch](ungetch-ungetwch-ungetch-nolock-ungetwch-nolock.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. +The Microsoft-specific function name `ungetch` is a deprecated alias for the [`_ungetch`](ungetch-ungetwch-ungetch-nolock-ungetwch-nolock.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. -We recommend you use [_ungetch](ungetch-ungetwch-ungetch-nolock-ungetwch-nolock.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). +We recommend you use [`_ungetch`](ungetch-ungetwch-ungetch-nolock-ungetwch-nolock.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). > [!IMPORTANT] > This API cannot be used in applications that execute in the Windows Runtime. For more information, see [CRT functions not supported in Universal Windows Platform apps](../../cppcx/crt-functions-not-supported-in-universal-windows-platform-apps.md). diff --git a/docs/c-runtime-library/reference/unlink-wunlink.md b/docs/c-runtime-library/reference/unlink-wunlink.md index 5a86740eaea..21aca6f452e 100644 --- a/docs/c-runtime-library/reference/unlink-wunlink.md +++ b/docs/c-runtime-library/reference/unlink-wunlink.md @@ -27,22 +27,22 @@ int _wunlink( ### Parameters -*filename*
+*`filename`*\ Name of file to remove. -## Return Value +## Return value Each of these functions returns 0 if successful. Otherwise, the function returns -1 and sets **errno** to **EACCES**, which means the path specifies a read-only file or a directory, or to **ENOENT**, which means the file or path isn't found. -For more information about return codes, see [`_doserrno`, `errno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). +For more information about return codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks -The **_unlink** function deletes the file specified by *filename*. **_wunlink** is a wide-character version of **_unlink**; the *filename* argument to **_wunlink** is a wide-character string. These functions behave identically otherwise. +The **_unlink** function deletes the file specified by *`filename`*. **_wunlink** is a wide-character version of **_unlink**; the *`filename`* argument to **_wunlink** is a wide-character string. These functions behave identically otherwise. 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| |---------------------|------------------------------------|--------------------|-----------------------| @@ -55,9 +55,9 @@ By default, this function's global state is scoped to the application. To change |**_unlink**|\ and \| |**_wunlink**|\ or \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). -## Code Example +## Code example This program uses _unlink to delete CRT_UNLINK.TXT. @@ -81,7 +81,7 @@ int main( void ) This file will be deleted. ``` -### Sample Output +### Sample output ```Output Deleted 'CRT_UNLINK.TXT' @@ -89,6 +89,6 @@ Deleted 'CRT_UNLINK.TXT' ## See also -[File Handling](../../c-runtime-library/file-handling.md)
-[_close](close.md)
-[remove, _wremove](remove-wremove.md)
+[File handling](../file-handling.md)\ +[`_close`](close.md)\ +[`remove`, `_wremove`](remove-wremove.md) diff --git a/docs/c-runtime-library/reference/unlink.md b/docs/c-runtime-library/reference/unlink.md index 98863f4473d..7828873b6fe 100644 --- a/docs/c-runtime-library/reference/unlink.md +++ b/docs/c-runtime-library/reference/unlink.md @@ -12,6 +12,6 @@ ms.assetid: 2cd82055-5770-48be-88ee-4b2c70541c46 --- # unlink -The Microsoft-implemented POSIX function name `unlink` is a deprecated alias for the [_unlink](unlink-wunlink.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. +The Microsoft-implemented POSIX function name `unlink` is a deprecated alias for the [`_unlink`](unlink-wunlink.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. -We recommend you use [_unlink](unlink-wunlink.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). +We recommend you use [`_unlink`](unlink-wunlink.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). diff --git a/docs/c-runtime-library/reference/unlock-file.md b/docs/c-runtime-library/reference/unlock-file.md index 315f5b2d9be..57296cbb3dd 100644 --- a/docs/c-runtime-library/reference/unlock-file.md +++ b/docs/c-runtime-library/reference/unlock-file.md @@ -24,12 +24,12 @@ void _unlock_file( ### Parameters -*file*
+*`file`*\ File handle. ## Remarks -The **_unlock_file** function unlocks the file specified by *file*. Unlocking a file allows access to the file by other processes. This function should not be called unless **_lock_file** was previously called on the *file* pointer. Calling **_unlock_file** on a file that isn't locked may result in a deadlock. For an example, see [_lock_file](lock-file.md). +The **_unlock_file** function unlocks the file specified by *`file`*. Unlocking a file allows access to the file by other processes. This function should not be called unless **_lock_file** was previously called on the *`file`* pointer. Calling **_unlock_file** on a file that isn't locked may result in a deadlock. For an example, see [`_lock_file`](lock-file.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). @@ -39,11 +39,11 @@ By default, this function's global state is scoped to the application. To change |-------------|---------------------| |**_unlock_file**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[File Handling](../../c-runtime-library/file-handling.md)
-[_creat, _wcreat](creat-wcreat.md)
-[_open, _wopen](open-wopen.md)
-[_lock_file](lock-file.md)
+[File handling](../file-handling.md)\ +[`_creat`, `_wcreat`](creat-wcreat.md)\ +[`_open`, `_wopen`](open-wopen.md)\ +[`_lock_file`](lock-file.md) diff --git a/docs/c-runtime-library/reference/utime-utime32-utime64-wutime-wutime32-wutime64.md b/docs/c-runtime-library/reference/utime-utime32-utime64-wutime-wutime32-wutime64.md index 9b1327b8be5..12e87575e49 100644 --- a/docs/c-runtime-library/reference/utime-utime32-utime64-wutime-wutime32-wutime64.md +++ b/docs/c-runtime-library/reference/utime-utime32-utime64-wutime-wutime32-wutime64.md @@ -45,30 +45,30 @@ int _wutime64( ### Parameters -*filename*
+*`filename`*\ Pointer to a string that contains the path or filename. -*times*
+*`times`*\ Pointer to stored time values. -## Return Value +## Return value -Each of these functions returns 0 if the file-modification time was changed. A return value of -1 indicates an error. If an invalid parameter is passed, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, these functions return -1, and **errno** is set to one of the following values: +Each of these functions returns 0 if the file-modification time was changed. A return value of -1 indicates an error. If an invalid parameter is passed, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, these functions return -1, and **errno** is set to one of the following values: |errno value|Condition| |-|-| | **EACCES** | Path specifies directory or read-only file | -| **EINVAL** | Invalid *times* argument | +| **EINVAL** | Invalid *`times`* argument | | **EMFILE** | Too many open files (the file must be opened to change its modification time) | | **ENOENT** | Path or filename not found | -For more information about return codes, see [`_doserrno`, `errno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). +For more information about return codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). The date can be changed for a file if the change date is after midnight, January 1, 1970, and before the end date of the function used. **_utime** and **_wutime** use a 64-bit time value, so the end date is 23:59:59, December 31, 3000, UTC. If **_USE_32BIT_TIME_T** is defined to force the old behavior, the end date is 23:59:59 January 18, 2038, UTC. **_utime32** or **_wutime32** use a 32-bit time type regardless of whether **_USE_32BIT_TIME_T** is defined, and always have the earlier end date. **_utime64** or **_wutime64** always use the 64-bit time type, so these functions always support the later end date. ## Remarks -The **_utime** function sets the modification time for the file specified by *filename*. The process must have write access to the file in order to change the time. In the Windows operating system, you can change the access time and the modification time in the **_utimbuf** structure. If *times* is a **NULL** pointer, the modification time is set to the current local time. Otherwise, *times* must point to a structure of type **_utimbuf**, defined in SYS\UTIME.H. +The **_utime** function sets the modification time for the file specified by *`filename`*. The process must have write access to the file in order to change the time. In the Windows operating system, you can change the access time and the modification time in the **_utimbuf** structure. If *`times`* is a **NULL** pointer, the modification time is set to the current local time. Otherwise, *`times`* must point to a structure of type **_utimbuf**, defined in SYS\UTIME.H. The **_utimbuf** structure stores file access and modification times used by **_utime** to change file-modification dates. The structure has the following fields, which are both of type **time_t**: @@ -79,13 +79,13 @@ The **_utimbuf** structure stores file access and modification times used by **_ Specific versions of the **_utimbuf** structure (**_utimebuf32** and **__utimbuf64**) are defined using the 32-bit and 64-bit versions of the time type. These structures are used in the 32-bit and 64-bit specific versions of this function. **_utimbuf** itself by default uses a 64-bit time type unless **_USE_32BIT_TIME_T** is defined. -**_utime** is identical to **_futime** except that the *filename* argument of **_utime** is a filename or a path to a file, rather than a file descriptor of an open file. +**_utime** is identical to **_futime** except that the *`filename`* argument of **_utime** is a filename or a path to a file, rather than a file descriptor of an open file. -**_wutime** is a wide-character version of **_utime**; the *filename* argument to **_wutime** is a wide-character string. These functions behave identically otherwise. +**_wutime** is a wide-character version of **_utime**; the *`filename`* argument to **_wutime** is a wide-character string. These functions behave identically otherwise. 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| |---------------------|------------------------------------|--------------------|-----------------------| @@ -101,7 +101,7 @@ By default, this function's global state is scoped to the application. To change |**_utime64**|\|\| |**_wutime**|\ or \|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -152,7 +152,7 @@ int main( void ) } ``` -### Sample Output +### Sample output ```Output Volume in drive C has no label. @@ -176,13 +176,13 @@ Directory of C:\test ## See also -[Time Management](../../c-runtime-library/time-management.md)
-[asctime, _wasctime](asctime-wasctime.md)
-[ctime, _ctime32, _ctime64, _wctime, _wctime32, _wctime64](ctime-ctime32-ctime64-wctime-wctime32-wctime64.md)
-[_fstat, _fstat32, _fstat64, _fstati64, _fstat32i64, _fstat64i32](fstat-fstat32-fstat64-fstati64-fstat32i64-fstat64i32.md)
-[_ftime, _ftime32, _ftime64](ftime-ftime32-ftime64.md)
-[_futime, _futime32, _futime64](futime-futime32-futime64.md)
-[gmtime, _gmtime32, _gmtime64](gmtime-gmtime32-gmtime64.md)
-[localtime, _localtime32, _localtime64](localtime-localtime32-localtime64.md)
-[_stat, _wstat Functions](stat-functions.md)
-[time, _time32, _time64](time-time32-time64.md)
+[Time management](../time-management.md)\ +[`asctime`, `_wasctime`](asctime-wasctime.md)\ +[`ctime`, `_ctime32`, `_ctime64`, `_wctime`, `_wctime32`, `_wctime64`](ctime-ctime32-ctime64-wctime-wctime32-wctime64.md)\ +[`_fstat`, `_fstat32`, `_fstat64`, `_fstati64`, `_fstat32i64`, `_fstat64i32`](fstat-fstat32-fstat64-fstati64-fstat32i64-fstat64i32.md)\ +[`_ftime`, `_ftime32`, `_ftime64`](ftime-ftime32-ftime64.md)\ +[`_futime`, `_futime32`, `_futime64`](futime-futime32-futime64.md)\ +[`gmtime`, `_gmtime32`, `_gmtime64`](gmtime-gmtime32-gmtime64.md)\ +[`localtime`, `_localtime32`, `_localtime64`](localtime-localtime32-localtime64.md)\ +[`_stat`, `_wstat` functions](stat-functions.md)\ +[`time`, `_time32`, `_time64`](time-time32-time64.md) diff --git a/docs/c-runtime-library/reference/va-arg-va-copy-va-end-va-start.md b/docs/c-runtime-library/reference/va-arg-va-copy-va-end-va-start.md index 7d420334077..d27d58d6c35 100644 --- a/docs/c-runtime-library/reference/va-arg-va-copy-va-end-va-start.md +++ b/docs/c-runtime-library/reference/va-arg-va-copy-va-end-va-start.md @@ -39,22 +39,22 @@ void va_start( ### Parameters -*`type`*
+*`type`*\ Type of argument to be retrieved. -*`arg_ptr`*
+*`arg_ptr`*\ Pointer to the list of arguments. -*`dest`*
+*`dest`*\ Pointer to the list of arguments to be initialized from *`src`* -*`src`*
+*`src`*\ Pointer to the initialized list of arguments to copy to *`dest`*. -*`prev_param`*
+*`prev_param`*\ Parameter that precedes the first optional argument. -## Return Value +## Return value **`va_arg`** returns the current argument. **`va_copy`**, **`va_start`** and **`va_end`** do not return values. @@ -125,7 +125,7 @@ Notice that **`testit`** expects its second parameter to be either an **`int`** ## Libraries -All versions of the [C run-time libraries](../../c-runtime-library/crt-library-features.md). +All versions of the [C run-time libraries](../crt-library-features.md). ## Example @@ -194,5 +194,5 @@ Deviation is: 0.000000 ## See also -[Argument Access](../../c-runtime-library/argument-access.md)
-[`vfprintf`, `_vfprintf_l`, `vfwprintf`, `_vfwprintf_l`](vfprintf-vfprintf-l-vfwprintf-vfwprintf-l.md)
+[Argument access](../argument-access.md)\ +[`vfprintf`, `_vfprintf_l`, `vfwprintf`, `_vfwprintf_l`](vfprintf-vfprintf-l-vfwprintf-vfwprintf-l.md) diff --git a/docs/c-runtime-library/reference/vcprintf-p-vcprintf-p-l-vcwprintf-p-vcwprintf-p-l.md b/docs/c-runtime-library/reference/vcprintf-p-vcprintf-p-l-vcwprintf-p-vcwprintf-p-l.md index c8cc18d5d19..0046008bccd 100644 --- a/docs/c-runtime-library/reference/vcprintf-p-vcprintf-p-l-vcwprintf-p-vcwprintf-p-l.md +++ b/docs/c-runtime-library/reference/vcprintf-p-vcprintf-p-l-vcwprintf-p-vcwprintf-p-l.md @@ -41,20 +41,20 @@ int _vcwprintf_p_l( ### Parameters -*format*
+*`format`*\ The format specification. -*argptr*
+*`argptr`*\ A pointer to a list of arguments. -*locale*
+*`locale`*\ The locale to use. -For more information, see [Format Specification Syntax: printf and wprintf Functions](../../c-runtime-library/format-specification-syntax-printf-and-wprintf-functions.md). +For more information, see [Format specification syntax: `printf` and `wprintf` functions](../format-specification-syntax-printf-and-wprintf-functions.md). -## Return Value +## Return value -The number of characters that are written, or a negative value if an output error occurs. If *format* is a null pointer, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, **errno** is set to **EINVAL** and -1 is returned. +The number of characters that are written, or a negative value if an output error occurs. If *`format`* is a null pointer, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, **errno** is set to **EINVAL** and -1 is returned. ## Remarks @@ -62,16 +62,16 @@ Each of these functions takes a pointer to an argument list, and then uses the * The versions of these functions that have the **_l** suffix are identical except that they use the locale parameter that's passed in instead of the current locale. -Each *argument* (if any) is converted and is output according to the corresponding format specification in *format*. The format specification supports positional parameters so that you can specify the order in which the arguments are used in the format string. For more information, see [printf_p Positional Parameters](../../c-runtime-library/printf-p-positional-parameters.md). +Each *`argument`* (if any) is converted and is output according to the corresponding format specification in *`format`*. The format specification supports positional parameters so that you can specify the order in which the arguments are used in the format string. For more information, see [printf_p Positional Parameters](../printf-p-positional-parameters.md). These functions do not translate line-feed characters into carriage return-line feed (CR-LF) combinations when they are output. > [!IMPORTANT] -> Ensure that *format* is not a user-defined string. For more information, see [Avoiding Buffer Overruns](/windows/win32/SecBP/avoiding-buffer-overruns). +> Ensure that *`format`* is not a user-defined string. For more information, see [Avoiding buffer overruns](/windows/win32/SecBP/avoiding-buffer-overruns). -These functions validate the input pointer and the format string. If *format* or *argument* is **NULL**, or if the format string contains invalid formatting characters, these 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 return -1 and set **errno** to **EINVAL**. +These functions validate the input pointer and the format string. If *`format`* or *`argument`* is **NULL**, or if the format string contains invalid formatting characters, these functions invoke the invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, these functions return -1 and set **errno** to **EINVAL**. -### Generic-Text Routine Mappings +### Generic-text routine mappings |Tchar.h routine|_UNICODE and _MBCS not defined|_MBCS defined|_UNICODE defined| |---------------------|--------------------------------------|--------------------|-----------------------| @@ -85,7 +85,7 @@ These functions validate the input pointer and the format string. If *format* or |**_vcprintf_p**, **_vcprintf_p_l**|\ and \| |**_vcwprintf_p**, **_vcwprintf_p_l**|\ and \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). > [!IMPORTANT] > Starting in Windows 10 version 2004 (build 19041), the `printf` family of functions prints exactly representable floating point numbers according to the IEEE 754 rules for rounding. In previous versions of Windows, exactly representable floating point numbers ending in '5' would always round up. IEEE 754 states that they must round to the closest even digit (also known as "Banker's Rounding"). For example, both `printf("%1.0f", 1.5)` and `printf("%1.0f", 2.5)` should round to 2. Previously, 1.5 would round to 2 and 2.5 would round to 3. This change only affects exactly representable numbers. For example, 2.35 (which, when represented in memory, is closer to 2.35000000000000008) continues to round up to 2.4. Rounding done by these functions now also respects the floating point rounding mode set by [`fesetround`](fegetround-fesetround2.md). Previously, rounding always chose `FE_TONEAREST` behavior. This change only affects programs built using Visual Studio 2019 version 16.2 and later. To use the legacy floating point rounding behavior, link with [`legacy_stdio_float_rounding.obj`](../link-options.md). @@ -123,7 +123,7 @@ parameter 2 = 222; parameter 1 = one ## See also -[Console and Port I/O](../../c-runtime-library/console-and-port-i-o.md)
-[_cprintf, _cprintf_l, _cwprintf, _cwprintf_l](cprintf-cprintf-l-cwprintf-cwprintf-l.md)
-[va_arg, va_copy, va_end, va_start](va-arg-va-copy-va-end-va-start.md)
-[printf_p Positional Parameters](../../c-runtime-library/printf-p-positional-parameters.md)
+[Console and port I/O](../console-and-port-i-o.md)\ +[`_cprintf`, `_cprintf_l`, `_cwprintf`, `_cwprintf_l`](cprintf-cprintf-l-cwprintf-cwprintf-l.md)\ +[`va_arg`, `va_copy`, `va_end`, `va_start`](va-arg-va-copy-va-end-va-start.md)\ +[printf_p Positional Parameters](../printf-p-positional-parameters.md) diff --git a/docs/c-runtime-library/reference/vcprintf-s-vcprintf-s-l-vcwprintf-s-vcwprintf-s-l.md b/docs/c-runtime-library/reference/vcprintf-s-vcprintf-s-l-vcwprintf-s-vcwprintf-s-l.md index d651591529a..97fd72e52f6 100644 --- a/docs/c-runtime-library/reference/vcprintf-s-vcprintf-s-l-vcwprintf-s-vcwprintf-s-l.md +++ b/docs/c-runtime-library/reference/vcprintf-s-vcprintf-s-l-vcwprintf-s-vcwprintf-s-l.md @@ -11,7 +11,7 @@ helpviewer_keywords: ["_vtcprintf_s_l function", "_vcwprintf_s_l function", "_vt --- # _vcprintf_s, _vcprintf_s_l, _vcwprintf_s, _vcwprintf_s_l -Writes formatted output to the console by using a pointer to a list of arguments. These versions of [_vcprintf, _vcprintf_l, _vcwprintf, _vcwprintf_l](vcprintf-vcprintf-l-vcwprintf-vcwprintf-l.md) have security enhancements, as described in [Security Features in the CRT](../../c-runtime-library/security-features-in-the-crt.md). +Writes formatted output to the console by using a pointer to a list of arguments. These versions of [`_vcprintf`, `_vcprintf_l`, `_vcwprintf`, `_vcwprintf_l`](vcprintf-vcprintf-l-vcwprintf-vcwprintf-l.md) have security enhancements, as described in [Security features in the CRT](../security-features-in-the-crt.md). > [!IMPORTANT] > This API cannot be used in applications that execute in the Windows Runtime. For more information, see [CRT functions not supported in Universal Windows Platform apps](../../cppcx/crt-functions-not-supported-in-universal-windows-platform-apps.md). @@ -41,22 +41,22 @@ int _vcwprintf_s_l( ### Parameters -*format*
+*`format`*\ Format specification. -*argptr*
+*`argptr`*\ Pointer to the list of arguments. -*locale*
+*`locale`*\ The locale to use. -For more information, see [Format Specification Syntax: printf and wprintf Functions](../../c-runtime-library/format-specification-syntax-printf-and-wprintf-functions.md). +For more information, see [Format specification syntax: `printf` and `wprintf` functions](../format-specification-syntax-printf-and-wprintf-functions.md). -## Return Value +## Return value The number of characters written, or a negative value if an output error occurs. -Like the less secure versions of these functions, if *format* is a null pointer, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). Additionally, unlike the less secure versions of these functions, if *format* does not specify a valid format, an invalid parameter exception is generated. If execution is allowed to continue, these functions return an error code and set **errno** to that error code. The default error code is **EINVAL** if a more specific value does not apply. +Like the less secure versions of these functions, if *`format`* is a null pointer, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). Additionally, unlike the less secure versions of these functions, if *`format`* does not specify a valid format, an invalid parameter exception is generated. If execution is allowed to continue, these functions return an error code and set **errno** to that error code. The default error code is **EINVAL** if a more specific value does not apply. ## Remarks @@ -65,9 +65,9 @@ Each of these functions takes a pointer to an argument list, and then formats an The versions of these functions that have the **_l** suffix are identical except that they use the locale parameter that's passed in instead of the current locale. > [!IMPORTANT] -> Ensure that *format* is not a user-defined string. For more information, see [Avoiding Buffer Overruns](/windows/win32/SecBP/avoiding-buffer-overruns). +> Ensure that *`format`* is not a user-defined string. For more information, see [Avoiding buffer overruns](/windows/win32/SecBP/avoiding-buffer-overruns). -### Generic-Text Routine Mappings +### Generic-text routine mappings |TCHAR.H routine|_UNICODE & _MBCS not defined|_MBCS defined|_UNICODE defined| |---------------------|------------------------------------|--------------------|-----------------------| @@ -83,7 +83,7 @@ The versions of these functions that have the **_l** suffix are identical except \* Required for UNIX V compatibility. -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). > [!IMPORTANT] > Starting in Windows 10 version 2004 (build 19041), the `printf` family of functions prints exactly representable floating point numbers according to the IEEE 754 rules for rounding. In previous versions of Windows, exactly representable floating point numbers ending in '5' would always round up. IEEE 754 states that they must round to the closest even digit (also known as "Banker's Rounding"). For example, both `printf("%1.0f", 1.5)` and `printf("%1.0f", 2.5)` should round to 2. Previously, 1.5 would round to 2 and 2.5 would round to 3. This change only affects exactly representable numbers. For example, 2.35 (which, when represented in memory, is closer to 2.35000000000000008) continues to round up to 2.4. Rounding done by these functions now also respects the floating point rounding mode set by [`fesetround`](fegetround-fesetround2.md). Previously, rounding always chose `FE_TONEAREST` behavior. This change only affects programs built using Visual Studio 2019 version 16.2 and later. To use the legacy floating point rounding behavior, link with [`legacy_stdio_float_rounding.obj`](../link-options.md). @@ -121,10 +121,10 @@ int main() ## See also -[Stream I/O](../../c-runtime-library/stream-i-o.md)
-[vprintf Functions](../../c-runtime-library/vprintf-functions.md)
-[_cprintf, _cprintf_l, _cwprintf, _cwprintf_l](cprintf-cprintf-l-cwprintf-cwprintf-l.md)
-[fprintf, _fprintf_l, fwprintf, _fwprintf_l](fprintf-fprintf-l-fwprintf-fwprintf-l.md)
-[printf, _printf_l, wprintf, _wprintf_l](printf-printf-l-wprintf-wprintf-l.md)
-[sprintf, _sprintf_l, swprintf, _swprintf_l, \__swprintf_l](sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md)
-[va_arg, va_copy, va_end, va_start](va-arg-va-copy-va-end-va-start.md)
+[Stream I/O](../stream-i-o.md)\ +[`vprintf` functions](../vprintf-functions.md)\ +[`_cprintf`, `_cprintf_l`, `_cwprintf`, `_cwprintf_l`](cprintf-cprintf-l-cwprintf-cwprintf-l.md)\ +[`fprintf`, `_fprintf_l`, `fwprintf`, `_fwprintf_l`](fprintf-fprintf-l-fwprintf-fwprintf-l.md)\ +[`printf`, `_printf_l`, `wprintf`, `_wprintf_l`](printf-printf-l-wprintf-wprintf-l.md)\ +[`sprintf`, `_sprintf_l`, `swprintf`, `_swprintf_l`, `__swprintf_l`](sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md)\ +[`va_arg`, `va_copy`, `va_end`, `va_start`](va-arg-va-copy-va-end-va-start.md) diff --git a/docs/c-runtime-library/reference/vcprintf-vcprintf-l-vcwprintf-vcwprintf-l.md b/docs/c-runtime-library/reference/vcprintf-vcprintf-l-vcwprintf-vcwprintf-l.md index 4d40e55ec58..ad8ff2e6359 100644 --- a/docs/c-runtime-library/reference/vcprintf-vcprintf-l-vcwprintf-vcwprintf-l.md +++ b/docs/c-runtime-library/reference/vcprintf-vcprintf-l-vcwprintf-vcwprintf-l.md @@ -11,7 +11,7 @@ helpviewer_keywords: ["vcwprintf function", "_vcwprintf_l function", "_vcprintf --- # _vcprintf, _vcprintf_l, _vcwprintf, _vcwprintf_l -Writes formatted output to the console by using a pointer to a list of arguments. More secure versions of these functions are available, see [_vcprintf_s, _vcprintf_s_l, _vcwprintf_s, _vcwprintf_s_l](vcprintf-s-vcprintf-s-l-vcwprintf-s-vcwprintf-s-l.md). +Writes formatted output to the console by using a pointer to a list of arguments. More secure versions of these functions are available, see [`_vcprintf_s`, `_vcprintf_s_l`, `_vcwprintf_s`, `_vcwprintf_s_l`](vcprintf-s-vcprintf-s-l-vcwprintf-s-vcwprintf-s-l.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). @@ -41,20 +41,20 @@ int _vcwprintf_l( ### Parameters -*format*
+*`format`*\ Format specification. -*argptr*
+*`argptr`*\ Pointer to list of arguments. -*locale*
+*`locale`*\ The locale to use. -For more information, see [Format Specifications](../../c-runtime-library/format-specification-syntax-printf-and-wprintf-functions.md). +For more information, see [Format specification syntax](../format-specification-syntax-printf-and-wprintf-functions.md). -## Return Value +## Return value -The number of characters written, or a negative value if an output error occurs. If *format* is a null pointer, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, **errno** is set to **EINVAL** and -1 is returned. +The number of characters written, or a negative value if an output error occurs. If *`format`* is a null pointer, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, **errno** is set to **EINVAL** and -1 is returned. ## Remarks @@ -63,10 +63,11 @@ Each of these functions takes a pointer to an argument list, then formats and wr The versions of these functions with the **_l** suffix are identical except that they use the locale parameter passed in instead of the current locale. > [!IMPORTANT] -> Ensure that *format* is not a user-defined string. For more information, see [Avoiding Buffer Overruns](/windows/win32/SecBP/avoiding-buffer-overruns). +> Ensure that *`format`* is not a user-defined string. For more information, see [Avoiding buffer overruns](/windows/win32/SecBP/avoiding-buffer-overruns). +> > Starting in Windows 10 version 2004 (build 19041), the `printf` family of functions prints exactly representable floating point numbers according to the IEEE 754 rules for rounding. In previous versions of Windows, exactly representable floating point numbers ending in '5' would always round up. IEEE 754 states that they must round to the closest even digit (also known as "Banker's Rounding"). For example, both `printf("%1.0f", 1.5)` and `printf("%1.0f", 2.5)` should round to 2. Previously, 1.5 would round to 2 and 2.5 would round to 3. This change only affects exactly representable numbers. For example, 2.35 (which, when represented in memory, is closer to 2.35000000000000008) continues to round up to 2.4. Rounding done by these functions now also respects the floating point rounding mode set by [`fesetround`](fegetround-fesetround2.md). Previously, rounding always chose `FE_TONEAREST` behavior. This change only affects programs built using Visual Studio 2019 version 16.2 and later. To use the legacy floating point rounding behavior, link with ['legacy_stdio_float_rounding.obj`](../link-options.md). -### Generic-Text Routine Mappings +### Generic-text routine mappings |TCHAR.H routine|_UNICODE & _MBCS not defined|_MBCS defined|_UNICODE defined| |---------------------|------------------------------------|--------------------|-----------------------| @@ -82,7 +83,7 @@ The versions of these functions with the **_l** suffix are identical except that \* Required for UNIX V compatibility. -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -118,10 +119,10 @@ int main() ## See also -[Stream I/O](../../c-runtime-library/stream-i-o.md)
-[vprintf Functions](../../c-runtime-library/vprintf-functions.md)
-[_cprintf, _cprintf_l, _cwprintf, _cwprintf_l](cprintf-cprintf-l-cwprintf-cwprintf-l.md)
-[fprintf, _fprintf_l, fwprintf, _fwprintf_l](fprintf-fprintf-l-fwprintf-fwprintf-l.md)
-[printf, _printf_l, wprintf, _wprintf_l](printf-printf-l-wprintf-wprintf-l.md)
-[sprintf, _sprintf_l, swprintf, _swprintf_l, \__swprintf_l](sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md)
-[va_arg, va_copy, va_end, va_start](va-arg-va-copy-va-end-va-start.md)
+[Stream I/O](../stream-i-o.md)\ +[`vprintf` functions](../vprintf-functions.md)\ +[`_cprintf`, `_cprintf_l`, `_cwprintf`, `_cwprintf_l`](cprintf-cprintf-l-cwprintf-cwprintf-l.md)\ +[`fprintf`, `_fprintf_l`, `fwprintf`, `_fwprintf_l`](fprintf-fprintf-l-fwprintf-fwprintf-l.md)\ +[`printf`, `_printf_l`, `wprintf`, `_wprintf_l`](printf-printf-l-wprintf-wprintf-l.md)\ +[`sprintf`, `_sprintf_l`, `swprintf`, `_swprintf_l`, `__swprintf_l`](sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md)\ +[`va_arg`, `va_copy`, `va_end`, `va_start`](va-arg-va-copy-va-end-va-start.md) diff --git a/docs/c-runtime-library/reference/vfprintf-p-vfprintf-p-l-vfwprintf-p-vfwprintf-p-l.md b/docs/c-runtime-library/reference/vfprintf-p-vfprintf-p-l-vfwprintf-p-vfwprintf-p-l.md index 29e6cb5b6be..aac25e0b693 100644 --- a/docs/c-runtime-library/reference/vfprintf-p-vfprintf-p-l-vfwprintf-p-vfwprintf-p-l.md +++ b/docs/c-runtime-library/reference/vfprintf-p-vfprintf-p-l-vfwprintf-p-vfwprintf-p-l.md @@ -42,39 +42,39 @@ int _vfwprintf_p_l( ### Parameters -*stream*
+*`stream`*\ Pointer to **FILE** structure. -*format*
+*`format`*\ Format specification. -*argptr*
+*`argptr`*\ Pointer to list of arguments. -*locale*
+*`locale`*\ The locale to use. -For more information, see [Format Specifications](../../c-runtime-library/format-specification-syntax-printf-and-wprintf-functions.md). +For more information, see [Format specification syntax](../format-specification-syntax-printf-and-wprintf-functions.md). -## Return Value +## Return value **_vfprintf_p** and **_vfwprintf_p** return the number of characters written, not including the terminating null character, or a negative value if an output error occurs. ## Remarks -Each of these functions takes a pointer to an argument list, then formats and writes the given data to *stream*. These functions differ from the **_vfprint_s** and **_vfwprint_s** versions only in that they support positional parameters. For more information, see [printf_p Positional Parameters](../../c-runtime-library/printf-p-positional-parameters.md). +Each of these functions takes a pointer to an argument list, then formats and writes the given data to *`stream`*. These functions differ from the **_vfprint_s** and **_vfwprint_s** versions only in that they support positional parameters. For more information, see [printf_p Positional Parameters](../printf-p-positional-parameters.md). **_vfwprintf_p** is the wide-character version of **_vprintf_p**; the two functions behave identically if the stream is opened in ANSI mode. **_vprintf_p** doesn't currently support output into a UNICODE stream. The versions of these functions with the **_l** suffix are identical except that they use the locale parameter passed in instead of the current thread locale. > [!IMPORTANT] -> Ensure that *format* is not a user-defined string. For more information, see [Avoiding Buffer Overruns](/windows/win32/SecBP/avoiding-buffer-overruns). +> Ensure that *`format`* is not a user-defined string. For more information, see [Avoiding buffer overruns](/windows/win32/SecBP/avoiding-buffer-overruns). > Starting in Windows 10 version 2004 (build 19041), the `printf` family of functions prints exactly representable floating point numbers according to the IEEE 754 rules for rounding. In previous versions of Windows, exactly representable floating point numbers ending in '5' would always round up. IEEE 754 states that they must round to the closest even digit (also known as "Banker's Rounding"). For example, both `printf("%1.0f", 1.5)` and `printf("%1.0f", 2.5)` should round to 2. Previously, 1.5 would round to 2 and 2.5 would round to 3. This change only affects exactly representable numbers. For example, 2.35 (which, when represented in memory, is closer to 2.35000000000000008) continues to round up to 2.4. Rounding done by these functions now also respects the floating point rounding mode set by [`fesetround`](fegetround-fesetround2.md). Previously, rounding always chose `FE_TONEAREST` behavior. This change only affects programs built using Visual Studio 2019 version 16.2 and later. To use the legacy floating point rounding behavior, link with ['legacy_stdio_float_rounding.obj`](../link-options.md). -If either *stream* or *format* is a null pointer, or if the format string contains invalid formatting characters, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, the functions return -1 and set **errno** to **EINVAL**. +If either *`stream`* or *`format`* is a null pointer, or if the format string contains invalid formatting characters, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, the functions return -1 and set **errno** to **EINVAL**. -### Generic-Text Routine Mappings +### Generic-text routine mappings |TCHAR.H routine|_UNICODE & _MBCS not defined|_MBCS defined|_UNICODE defined| |---------------------|------------------------------------|--------------------|-----------------------| @@ -90,17 +90,17 @@ If either *stream* or *format* is a null pointer, or if the format string contai \* Required for UNIX V compatibility. -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Stream I/O](../../c-runtime-library/stream-i-o.md)
-[vprintf Functions](../../c-runtime-library/vprintf-functions.md)
-[fprintf, _fprintf_l, fwprintf, _fwprintf_l](fprintf-fprintf-l-fwprintf-fwprintf-l.md)
-[printf, _printf_l, wprintf, _wprintf_l](printf-printf-l-wprintf-wprintf-l.md)
-[sprintf, _sprintf_l, swprintf, _swprintf_l, \__swprintf_l](sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md)
-[va_arg, va_copy, va_end, va_start](va-arg-va-copy-va-end-va-start.md)
-[printf_p Positional Parameters](../../c-runtime-library/printf-p-positional-parameters.md)
-[_fprintf_p, _fprintf_p_l, _fwprintf_p, _fwprintf_p_l](fprintf-p-fprintf-p-l-fwprintf-p-fwprintf-p-l.md)
-[_vsprintf_p, _vsprintf_p_l, _vswprintf_p, _vswprintf_p_l](vsprintf-p-vsprintf-p-l-vswprintf-p-vswprintf-p-l.md)
-[_sprintf_p, _sprintf_p_l, _swprintf_p, _swprintf_p_l](sprintf-p-sprintf-p-l-swprintf-p-swprintf-p-l.md)
+[Stream I/O](../stream-i-o.md)\ +[`vprintf` functions](../vprintf-functions.md)\ +[`fprintf`, `_fprintf_l`, `fwprintf`, `_fwprintf_l`](fprintf-fprintf-l-fwprintf-fwprintf-l.md)\ +[`printf`, `_printf_l`, `wprintf`, `_wprintf_l`](printf-printf-l-wprintf-wprintf-l.md)\ +[`sprintf`, `_sprintf_l`, `swprintf`, `_swprintf_l`, `__swprintf_l`](sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md)\ +[`va_arg`, `va_copy`, `va_end`, `va_start`](va-arg-va-copy-va-end-va-start.md)\ +[printf_p Positional Parameters](../printf-p-positional-parameters.md)\ +[`_fprintf_p`, `_fprintf_p_l`, `_fwprintf_p`, `_fwprintf_p_l`](fprintf-p-fprintf-p-l-fwprintf-p-fwprintf-p-l.md)\ +[`_vsprintf_p`, `_vsprintf_p_l`, `_vswprintf_p`, `_vswprintf_p_l`](vsprintf-p-vsprintf-p-l-vswprintf-p-vswprintf-p-l.md)\ +[`_sprintf_p`, `_sprintf_p_l`, `_swprintf_p`, `_swprintf_p_l`](sprintf-p-sprintf-p-l-swprintf-p-swprintf-p-l.md) diff --git a/docs/c-runtime-library/reference/vfprintf-s-vfprintf-s-l-vfwprintf-s-vfwprintf-s-l.md b/docs/c-runtime-library/reference/vfprintf-s-vfprintf-s-l-vfwprintf-s-vfwprintf-s-l.md index 1d64f5fc0fb..5b1bf0e03c3 100644 --- a/docs/c-runtime-library/reference/vfprintf-s-vfprintf-s-l-vfwprintf-s-vfwprintf-s-l.md +++ b/docs/c-runtime-library/reference/vfprintf-s-vfprintf-s-l-vfwprintf-s-vfwprintf-s-l.md @@ -11,7 +11,7 @@ helpviewer_keywords: ["vfprintf_s_l function", "vfwprintf_s_l function", "vfwpri --- # vfprintf_s, _vfprintf_s_l, vfwprintf_s, _vfwprintf_s_l -Write formatted output using a pointer to a list of arguments. These are versions of [vfprintf, _vfprintf_l, vfwprintf, _vfwprintf_l](vfprintf-vfprintf-l-vfwprintf-vfwprintf-l.md) with security enhancements as described in [Security Features in the CRT](../../c-runtime-library/security-features-in-the-crt.md). +Write formatted output using a pointer to a list of arguments. These are versions of [`vfprintf`, `_vfprintf_l`, `vfwprintf`, `_vfwprintf_l`](vfprintf-vfprintf-l-vfwprintf-vfwprintf-l.md) with security enhancements as described in [Security features in the CRT](../security-features-in-the-crt.md). ## Syntax @@ -42,41 +42,41 @@ int _vfwprintf_s_l( ### Parameters -*stream*
+*`stream`*\ Pointer to **FILE** structure. -*format*
+*`format`*\ Format specification. -*argptr*
+*`argptr`*\ Pointer to list of arguments. -*locale*
+*`locale`*\ The locale to use. -For more information, see [Format Specifications](../../c-runtime-library/format-specification-syntax-printf-and-wprintf-functions.md). +For more information, see [Format specification syntax](../format-specification-syntax-printf-and-wprintf-functions.md). -## Return Value +## Return value -**vfprintf_s** and **vfwprintf_s** return the number of characters written, not including the terminating null character, or a negative value if an output error occurs. If either *stream* or *format* is a null pointer, or if the format string contains invalid formatting characters, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, the functions return -1 and set **errno** to **EINVAL**. +**vfprintf_s** and **vfwprintf_s** return the number of characters written, not including the terminating null character, or a negative value if an output error occurs. If either *`stream`* or *`format`* is a null pointer, or if the format string contains invalid formatting characters, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, the functions return -1 and set **errno** to **EINVAL**. -For information on these and other error codes, see [_doserrno, errno, _sys_errlist, and _sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +For information on these and other error codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks -Each of these functions takes a pointer to an argument list, then formats and writes the given data to *stream*. +Each of these functions takes a pointer to an argument list, then formats and writes the given data to *`stream`*. -These functions differ from the non-secure versions only in that the secure versions check that the *format* string contains valid formatting characters. +These functions differ from the non-secure versions only in that the secure versions check that the *`format`* string contains valid formatting characters. **vfwprintf_s** is the wide-character version of **vfprintf_s**; the two functions behave identically if the stream is opened in ANSI mode. **vfprintf_s** doesn't currently support output into a UNICODE stream. The versions of these functions with the **_l** suffix are identical except that they use the locale parameter passed in instead of the current thread locale. > [!IMPORTANT] -> Ensure that *format* is not a user-defined string. For more information, see [Avoiding Buffer Overruns](/windows/win32/SecBP/avoiding-buffer-overruns). +> Ensure that *`format`* is not a user-defined string. For more information, see [Avoiding buffer overruns](/windows/win32/SecBP/avoiding-buffer-overruns). > Starting in Windows 10 version 2004 (build 19041), the `printf` family of functions prints exactly representable floating point numbers according to the IEEE 754 rules for rounding. In previous versions of Windows, exactly representable floating point numbers ending in '5' would always round up. IEEE 754 states that they must round to the closest even digit (also known as "Banker's Rounding"). For example, both `printf("%1.0f", 1.5)` and `printf("%1.0f", 2.5)` should round to 2. Previously, 1.5 would round to 2 and 2.5 would round to 3. This change only affects exactly representable numbers. For example, 2.35 (which, when represented in memory, is closer to 2.35000000000000008) continues to round up to 2.4. Rounding done by these functions now also respects the floating point rounding mode set by [`fesetround`](fegetround-fesetround2.md). Previously, rounding always chose `FE_TONEAREST` behavior. This change only affects programs built using Visual Studio 2019 version 16.2 and later. To use the legacy floating point rounding behavior, link with ['legacy_stdio_float_rounding.obj`](../link-options.md). -### Generic-Text Routine Mappings +### Generic-text routine mappings |TCHAR.H routine|_UNICODE & _MBCS not defined|_MBCS defined|_UNICODE defined| |---------------------|------------------------------------|--------------------|-----------------------| @@ -92,13 +92,13 @@ The versions of these functions with the **_l** suffix are identical except that \* Required for UNIX V compatibility. -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Stream I/O](../../c-runtime-library/stream-i-o.md)
-[vprintf Functions](../../c-runtime-library/vprintf-functions.md)
-[fprintf, _fprintf_l, fwprintf, _fwprintf_l](fprintf-fprintf-l-fwprintf-fwprintf-l.md)
-[printf, _printf_l, wprintf, _wprintf_l](printf-printf-l-wprintf-wprintf-l.md)
-[sprintf, _sprintf_l, swprintf, _swprintf_l, \__swprintf_l](sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md)
-[va_arg, va_copy, va_end, va_start](va-arg-va-copy-va-end-va-start.md)
+[Stream I/O](../stream-i-o.md)\ +[`vprintf` functions](../vprintf-functions.md)\ +[`fprintf`, `_fprintf_l`, `fwprintf`, `_fwprintf_l`](fprintf-fprintf-l-fwprintf-fwprintf-l.md)\ +[`printf`, `_printf_l`, `wprintf`, `_wprintf_l`](printf-printf-l-wprintf-wprintf-l.md)\ +[`sprintf`, `_sprintf_l`, `swprintf`, `_swprintf_l`, `__swprintf_l`](sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md)\ +[`va_arg`, `va_copy`, `va_end`, `va_start`](va-arg-va-copy-va-end-va-start.md) diff --git a/docs/c-runtime-library/reference/vfprintf-vfprintf-l-vfwprintf-vfwprintf-l.md b/docs/c-runtime-library/reference/vfprintf-vfprintf-l-vfwprintf-vfwprintf-l.md index f6c22cc69a0..156b089e746 100644 --- a/docs/c-runtime-library/reference/vfprintf-vfprintf-l-vfwprintf-vfwprintf-l.md +++ b/docs/c-runtime-library/reference/vfprintf-vfprintf-l-vfwprintf-vfwprintf-l.md @@ -11,7 +11,7 @@ helpviewer_keywords: ["_vfwprintf_l function", "_vftprintf function", "vfprintf --- # vfprintf, _vfprintf_l, vfwprintf, _vfwprintf_l -Write formatted output using a pointer to a list of arguments. More secure versions of these functions exist; see [vfprintf_s, _vfprintf_s_l, vfwprintf_s, _vfwprintf_s_l](vfprintf-s-vfprintf-s-l-vfwprintf-s-vfwprintf-s-l.md). +Write formatted output using a pointer to a list of arguments. More secure versions of these functions exist; see [`vfprintf_s`, `_vfprintf_s_l`, `vfwprintf_s`, `_vfwprintf_s_l`](vfprintf-s-vfprintf-s-l-vfwprintf-s-vfwprintf-s-l.md). ## Syntax @@ -42,39 +42,39 @@ int _vfwprintf_l( ### Parameters -*stream*
+*`stream`*\ Pointer to **FILE** structure. -*format*
+*`format`*\ Format specification. -*argptr*
+*`argptr`*\ Pointer to list of arguments. -*locale*
+*`locale`*\ The locale to use. -For more information, see [Format Specifications](../../c-runtime-library/format-specification-syntax-printf-and-wprintf-functions.md). +For more information, see [Format specification syntax](../format-specification-syntax-printf-and-wprintf-functions.md). -## Return Value +## Return value -**vfprintf** and **vfwprintf** return the number of characters written, not including the terminating null character, or a negative value if an output error occurs. If either *stream* or *format* is a null pointer, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, the functions return -1 and set **errno** to **EINVAL**. +**vfprintf** and **vfwprintf** return the number of characters written, not including the terminating null character, or a negative value if an output error occurs. If either *`stream`* or *`format`* is a null pointer, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, the functions return -1 and set **errno** to **EINVAL**. -For information on these and other error codes, see [_doserrno, errno, _sys_errlist, and _sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +For information on these and other error codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks -Each of these functions takes a pointer to an argument list, then formats and writes the given data to *stream*. +Each of these functions takes a pointer to an argument list, then formats and writes the given data to *`stream`*. **vfwprintf** is the wide-character version of **vfprintf**; the two functions behave identically if the stream is opened in ANSI mode. **vfprintf** doesn't currently support output into a UNICODE stream. The versions of these functions with the **_l** suffix are identical except that they use the locale parameter passed in instead of the current thread locale. > [!IMPORTANT] -> Ensure that *format* is not a user-defined string. For more information, see [Avoiding Buffer Overruns](/windows/win32/SecBP/avoiding-buffer-overruns). +> Ensure that *`format`* is not a user-defined string. For more information, see [Avoiding buffer overruns](/windows/win32/SecBP/avoiding-buffer-overruns). > Starting in Windows 10 version 2004 (build 19041), the `printf` family of functions prints exactly representable floating point numbers according to the IEEE 754 rules for rounding. In previous versions of Windows, exactly representable floating point numbers ending in '5' would always round up. IEEE 754 states that they must round to the closest even digit (also known as "Banker's Rounding"). For example, both `printf("%1.0f", 1.5)` and `printf("%1.0f", 2.5)` should round to 2. Previously, 1.5 would round to 2 and 2.5 would round to 3. This change only affects exactly representable numbers. For example, 2.35 (which, when represented in memory, is closer to 2.35000000000000008) continues to round up to 2.4. Rounding done by these functions now also respects the floating point rounding mode set by [`fesetround`](fegetround-fesetround2.md). Previously, rounding always chose `FE_TONEAREST` behavior. This change only affects programs built using Visual Studio 2019 version 16.2 and later. To use the legacy floating point rounding behavior, link with ['legacy_stdio_float_rounding.obj`](../link-options.md). -### Generic-Text Routine Mappings +### Generic-text routine mappings |TCHAR.H routine|_UNICODE & _MBCS not defined|_MBCS defined|_UNICODE defined| |---------------------|------------------------------------|--------------------|-----------------------| @@ -90,13 +90,13 @@ The versions of these functions with the **_l** suffix are identical except that \* Required for UNIX V compatibility. -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Stream I/O](../../c-runtime-library/stream-i-o.md)
-[vprintf Functions](../../c-runtime-library/vprintf-functions.md)
-[fprintf, _fprintf_l, fwprintf, _fwprintf_l](fprintf-fprintf-l-fwprintf-fwprintf-l.md)
-[printf, _printf_l, wprintf, _wprintf_l](printf-printf-l-wprintf-wprintf-l.md)
-[sprintf, _sprintf_l, swprintf, _swprintf_l, \__swprintf_l](sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md)
-[va_arg, va_copy, va_end, va_start](va-arg-va-copy-va-end-va-start.md)
+[Stream I/O](../stream-i-o.md)\ +[`vprintf` functions](../vprintf-functions.md)\ +[`fprintf`, `_fprintf_l`, `fwprintf`, `_fwprintf_l`](fprintf-fprintf-l-fwprintf-fwprintf-l.md)\ +[`printf`, `_printf_l`, `wprintf`, `_wprintf_l`](printf-printf-l-wprintf-wprintf-l.md)\ +[`sprintf`, `_sprintf_l`, `swprintf`, `_swprintf_l`, `__swprintf_l`](sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md)\ +[`va_arg`, `va_copy`, `va_end`, `va_start`](va-arg-va-copy-va-end-va-start.md) diff --git a/docs/c-runtime-library/reference/vfscanf-s-vfwscanf-s.md b/docs/c-runtime-library/reference/vfscanf-s-vfwscanf-s.md index 54034005ab9..09aaaa168a2 100644 --- a/docs/c-runtime-library/reference/vfscanf-s-vfwscanf-s.md +++ b/docs/c-runtime-library/reference/vfscanf-s-vfwscanf-s.md @@ -11,7 +11,7 @@ ms.assetid: 9b0133f0-9a18-4581-b24b-3b72683ad432 --- # vfscanf_s, vfwscanf_s -Reads formatted data from a stream. These versions of vfscanf, vfwscanf have security enhancements, as described in [Security Features in the CRT](../../c-runtime-library/security-features-in-the-crt.md). +Reads formatted data from a stream. These versions of vfscanf, vfwscanf have security enhancements, as described in [Security features in the CRT](../security-features-in-the-crt.md). ## Syntax @@ -30,31 +30,31 @@ int vfwscanf_s( ### Parameters -*stream*
+*`stream`*\ Pointer to **FILE** structure. -*format*
+*`format`*\ Format-control string. -*arglist*
+*`arglist`*\ Variable argument list. -## Return Value +## Return value Each of these functions returns the number of fields that are successfully converted and assigned; the return value does not include fields that were read but not assigned. A return value of 0 indicates that no fields were assigned. If an error occurs, or if the end of the file stream is reached before the first conversion, the return value is **EOF** for **vfscanf_s** and **vfwscanf_s**. -These functions validate their parameters. If *stream* is an invalid file pointer, or *format* is a null pointer, these 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 return **EOF** and set **errno** to **EINVAL**. +These functions validate their parameters. If *`stream`* is an invalid file pointer, or *`format`* is a null pointer, these functions invoke the invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, these functions return **EOF** and set **errno** to **EINVAL**. ## Remarks -The **vfscanf_s** function reads data from the current position of *stream* into the locations that are given by the *arglist* argument list (if any). Each argument in the list must be a pointer to a variable of a type that corresponds to a type specifier in *format*. *format* controls the interpretation of the input fields and has the same form and function as the *format* argument for **scanf_s**; see [Format Specification Fields: scanf and wscanf Functions](../../c-runtime-library/format-specification-fields-scanf-and-wscanf-functions.md) for a description of *format*. **vfwscanf_s** is a wide-character version of **vfscanf_s**; the format argument to **vfwscanf_s** is a wide-character string. These functions behave identically if the stream is opened in ANSI mode. **vfscanf_s** doesn't currently support input from a UNICODE stream. +The **vfscanf_s** function reads data from the current position of *`stream`* into the locations that are given by the *`arglist`* argument list (if any). Each argument in the list must be a pointer to a variable of a type that corresponds to a type specifier in *`format`*. *`format`* controls the interpretation of the input fields and has the same form and function as the *`format`* argument for **scanf_s**; see [Format specification fields: `scanf` and `wscanf` functions](../format-specification-fields-scanf-and-wscanf-functions.md) for a description of *`format`*. **vfwscanf_s** is a wide-character version of **vfscanf_s**; the format argument to **vfwscanf_s** is a wide-character string. These functions behave identically if the stream is opened in ANSI mode. **vfscanf_s** doesn't currently support input from a UNICODE stream. -The main difference between the more secure functions (that have the **_s** suffix) and the other versions is that the more secure functions require the size in characters of each **c**, **C**, **s**, **S**, and **[** type field to be passed as an argument immediately following the variable. For more information, see [scanf_s, _scanf_s_l, wscanf_s, _wscanf_s_l](scanf-s-scanf-s-l-wscanf-s-wscanf-s-l.md) and [scanf Width Specification](../../c-runtime-library/scanf-width-specification.md). +The main difference between the more secure functions (that have the **_s** suffix) and the other versions is that the more secure functions require the size in characters of each **c**, **C**, **s**, **S**, and **[** type field to be passed as an argument immediately following the variable. For more information, see [`scanf_s`, `_scanf_s_l`, `wscanf_s`, `_wscanf_s_l`](scanf-s-scanf-s-l-wscanf-s-wscanf-s-l.md) and [scanf Width Specification](../scanf-width-specification.md). > [!NOTE] > The size parameter is of type **`unsigned`**, not **size_t**. -### Generic-Text Routine Mappings +### Generic-text routine mappings |TCHAR.H routine|_UNICODE & _MBCS not defined|_MBCS defined|_UNICODE defined| |---------------------|------------------------------------|--------------------|-----------------------| @@ -67,7 +67,7 @@ The main difference between the more secure functions (that have the **_s** suff |**vfscanf_s**|\| |**vfwscanf_s**|\ or \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -139,10 +139,10 @@ x ## See also -[Stream I/O](../../c-runtime-library/stream-i-o.md)
-[_cscanf_s, _cscanf_s_l, _cwscanf_s, _cwscanf_s_l](cscanf-s-cscanf-s-l-cwscanf-s-cwscanf-s-l.md)
-[fprintf_s, _fprintf_s_l, fwprintf_s, _fwprintf_s_l](fprintf-s-fprintf-s-l-fwprintf-s-fwprintf-s-l.md)
-[scanf_s, _scanf_s_l, wscanf_s, _wscanf_s_l](scanf-s-scanf-s-l-wscanf-s-wscanf-s-l.md)
-[sscanf_s, _sscanf_s_l, swscanf_s, _swscanf_s_l](sscanf-s-sscanf-s-l-swscanf-s-swscanf-s-l.md)
-[fscanf, _fscanf_l, fwscanf, _fwscanf_l](fscanf-fscanf-l-fwscanf-fwscanf-l.md)
-[vfscanf, vfwscanf](vfscanf-vfwscanf.md)
+[Stream I/O](../stream-i-o.md)\ +[`_cscanf_s`, `_cscanf_s_l`, `_cwscanf_s`, `_cwscanf_s_l`](cscanf-s-cscanf-s-l-cwscanf-s-cwscanf-s-l.md)\ +[`fprintf_s`, `_fprintf_s_l`, `fwprintf_s`, `_fwprintf_s_l`](fprintf-s-fprintf-s-l-fwprintf-s-fwprintf-s-l.md)\ +[`scanf_s`, `_scanf_s_l`, `wscanf_s`, `_wscanf_s_l`](scanf-s-scanf-s-l-wscanf-s-wscanf-s-l.md)\ +[`sscanf_s`, `_sscanf_s_l`, `swscanf_s`, `_swscanf_s_l`](sscanf-s-sscanf-s-l-swscanf-s-swscanf-s-l.md)\ +[`fscanf`, `_fscanf_l`, `fwscanf`, `_fwscanf_l`](fscanf-fscanf-l-fwscanf-fwscanf-l.md)\ +[`vfscanf`, `vfwscanf`](vfscanf-vfwscanf.md) diff --git a/docs/c-runtime-library/reference/vfscanf-vfwscanf.md b/docs/c-runtime-library/reference/vfscanf-vfwscanf.md index cd1abcaa2ac..c85e1b25ab3 100644 --- a/docs/c-runtime-library/reference/vfscanf-vfwscanf.md +++ b/docs/c-runtime-library/reference/vfscanf-vfwscanf.md @@ -11,7 +11,7 @@ ms.assetid: c06450ef-03f1-4d24-a8ac-d2dd98847918 --- # vfscanf, vfwscanf -Reads formatted data from a stream. More secure versions of these functions are available; see [vfscanf_s, vfwscanf_s](vfscanf-s-vfwscanf-s.md). +Reads formatted data from a stream. More secure versions of these functions are available; see [`vfscanf_s`, `vfwscanf_s`](vfscanf-s-vfwscanf-s.md). ## Syntax @@ -30,34 +30,34 @@ int vfwscanf( ### Parameters -*stream*
+*`stream`*\ Pointer to **FILE** structure. -*format*
+*`format`*\ Format-control string. -*arglist*
+*`arglist`*\ Variable argument list. -## Return Value +## Return value Each of these functions returns the number of fields that are successfully converted and assigned; the return value does not include fields that are read but not assigned. A return value of 0 indicates that no fields were assigned. If an error occurs, or if the end of the file stream is reached before the first conversion, the return value is **EOF** for **vfscanf** and **vfwscanf**. -These functions validate their parameters. If *stream* or *format* is a null pointer, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, these functions return **EOF** and set **errno** to **EINVAL**. +These functions validate their parameters. If *`stream`* or *`format`* is a null pointer, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, these functions return **EOF** and set **errno** to **EINVAL**. ## Remarks -The **vfscanf** function reads data from the current position of *stream* into the locations that are given by the *arglist* argument list. Each argument in the list must be a pointer to a variable of a type that corresponds to a type specifier in *format*. *format* controls the interpretation of the input fields and has the same form and function as the *format* argument for **scanf**; see [scanf](scanf-scanf-l-wscanf-wscanf-l.md) for a description of *format*. +The **vfscanf** function reads data from the current position of *`stream`* into the locations that are given by the *`arglist`* argument list. Each argument in the list must be a pointer to a variable of a type that corresponds to a type specifier in *`format`*. *`format`* controls the interpretation of the input fields and has the same form and function as the *`format`* argument for **scanf**; see [`scanf`](scanf-scanf-l-wscanf-wscanf-l.md) for a description of *`format`*. **vfwscanf** is a wide-character version of **vfscanf**; the format argument to **vfwscanf** is a wide-character string. These functions behave identically if the stream is opened in ANSI mode. **vfscanf** doesn't support input from a UNICODE stream. -### Generic-Text Routine Mappings +### Generic-text routine mappings |TCHAR.H routine|_UNICODE & _MBCS not defined|_MBCS defined|_UNICODE defined| |---------------------|------------------------------------|--------------------|-----------------------| |**_vftscanf**|**vfscanf**|**vfscanf**|**vfwscanf**| -For more information, see [Format Specification Fields: scanf and wscanf Functions](../../c-runtime-library/format-specification-fields-scanf-and-wscanf-functions.md). +For more information, see [Format specification fields: `scanf` and `wscanf` functions](../format-specification-fields-scanf-and-wscanf-functions.md). ## Requirements @@ -66,7 +66,7 @@ For more information, see [Format Specification Fields: scanf and wscanf Functio |**vfscanf**|\| |**vfwscanf**|\ or \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -137,10 +137,10 @@ x ## See also -[Stream I/O](../../c-runtime-library/stream-i-o.md)
-[_cscanf, _cscanf_l, _cwscanf, _cwscanf_l](cscanf-cscanf-l-cwscanf-cwscanf-l.md)
-[fprintf, _fprintf_l, fwprintf, _fwprintf_l](fprintf-fprintf-l-fwprintf-fwprintf-l.md)
-[scanf, _scanf_l, wscanf, _wscanf_l](scanf-scanf-l-wscanf-wscanf-l.md)
-[sscanf, _sscanf_l, swscanf, _swscanf_l](sscanf-sscanf-l-swscanf-swscanf-l.md)
-[fscanf_s, _fscanf_s_l, fwscanf_s, _fwscanf_s_l](fscanf-s-fscanf-s-l-fwscanf-s-fwscanf-s-l.md)
-[vfscanf_s, vfwscanf_s](vfscanf-s-vfwscanf-s.md)
+[Stream I/O](../stream-i-o.md)\ +[`_cscanf`, `_cscanf_l`, `_cwscanf`, `_cwscanf_l`](cscanf-cscanf-l-cwscanf-cwscanf-l.md)\ +[`fprintf`, `_fprintf_l`, `fwprintf`, `_fwprintf_l`](fprintf-fprintf-l-fwprintf-fwprintf-l.md)\ +[`scanf`, `_scanf_l`, `wscanf`, `_wscanf_l`](scanf-scanf-l-wscanf-wscanf-l.md)\ +[`sscanf`, `_sscanf_l`, `swscanf`, `_swscanf_l`](sscanf-sscanf-l-swscanf-swscanf-l.md)\ +[`fscanf_s`, `_fscanf_s_l`, `fwscanf_s`, `_fwscanf_s_l`](fscanf-s-fscanf-s-l-fwscanf-s-fwscanf-s-l.md)\ +[`vfscanf_s`, `vfwscanf_s`](vfscanf-s-vfwscanf-s.md) diff --git a/docs/c-runtime-library/reference/vprintf-p-vprintf-p-l-vwprintf-p-vwprintf-p-l.md b/docs/c-runtime-library/reference/vprintf-p-vprintf-p-l-vwprintf-p-vwprintf-p-l.md index 93ccccc1342..b5d84474727 100644 --- a/docs/c-runtime-library/reference/vprintf-p-vprintf-p-l-vwprintf-p-vwprintf-p-l.md +++ b/docs/c-runtime-library/reference/vprintf-p-vprintf-p-l-vwprintf-p-vwprintf-p-l.md @@ -38,36 +38,36 @@ int _vwprintf_p_l( ### Parameters -*format*
+*`format`*\ Format specification. -*argptr*
+*`argptr`*\ Pointer to list of arguments. -*locale*
+*`locale`*\ The locale to use. -For more information, see [Format Specifications](../../c-runtime-library/format-specification-syntax-printf-and-wprintf-functions.md). +For more information, see [Format specification syntax](../format-specification-syntax-printf-and-wprintf-functions.md). -## Return Value +## Return value **_vprintf_p** and **_vwprintf_p** return the number of characters written, not including the terminating null character, or a negative value if an output error occurs. ## Remarks -Each of these functions takes a pointer to an argument list, then formats and writes the given data to **stdout**. These functions differ from **vprintf_s** and **vwprintf_s** only in that they support the ability to specify the order in which the arguments are used. For more information, see [printf_p Positional Parameters](../../c-runtime-library/printf-p-positional-parameters.md). +Each of these functions takes a pointer to an argument list, then formats and writes the given data to **stdout**. These functions differ from **vprintf_s** and **vwprintf_s** only in that they support the ability to specify the order in which the arguments are used. For more information, see [printf_p Positional Parameters](../printf-p-positional-parameters.md). **_vwprintf_p** is the wide-character version of **_vprintf_p**; the two functions behave identically if the stream is opened in ANSI mode. **_vprintf_p** doesn't currently support output into a UNICODE stream. The versions of these functions with the **_l** suffix are identical except that they use the locale parameter passed in instead of the current thread locale. > [!IMPORTANT] -> Ensure that *format* is not a user-defined string. For more information, see [Avoiding Buffer Overruns](/windows/win32/SecBP/avoiding-buffer-overruns). +> Ensure that *`format`* is not a user-defined string. For more information, see [Avoiding buffer overruns](/windows/win32/SecBP/avoiding-buffer-overruns). > Starting in Windows 10 version 2004 (build 19041), the `printf` family of functions prints exactly representable floating point numbers according to the IEEE 754 rules for rounding. In previous versions of Windows, exactly representable floating point numbers ending in '5' would always round up. IEEE 754 states that they must round to the closest even digit (also known as "Banker's Rounding"). For example, both `printf("%1.0f", 1.5)` and `printf("%1.0f", 2.5)` should round to 2. Previously, 1.5 would round to 2 and 2.5 would round to 3. This change only affects exactly representable numbers. For example, 2.35 (which, when represented in memory, is closer to 2.35000000000000008) continues to round up to 2.4. Rounding done by these functions now also respects the floating point rounding mode set by [`fesetround`](fegetround-fesetround2.md). Previously, rounding always chose `FE_TONEAREST` behavior. This change only affects programs built using Visual Studio 2019 version 16.2 and later. To use the legacy floating point rounding behavior, link with ['legacy_stdio_float_rounding.obj`](../link-options.md). -If *format* is a null pointer, or if the format string contains invalid formatting characters, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, the functions return -1 and set **errno** to **EINVAL**. +If *`format`* is a null pointer, or if the format string contains invalid formatting characters, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, the functions return -1 and set **errno** to **EINVAL**. -### Generic-Text Routine Mappings +### Generic-text routine mappings |TCHAR.H routine|_UNICODE & _MBCS not defined|_MBCS defined|_UNICODE defined| |---------------------|------------------------------------|--------------------|-----------------------| @@ -83,17 +83,17 @@ If *format* is a null pointer, or if the format string contains invalid formatti \* Required for UNIX V compatibility. -The console is not supported in Universal Windows Platform (UWP) apps. The standard stream handles that are associated with the console, **stdin**, **stdout**, and **stderr**, must be redirected before C run-time functions can use them in UWP apps. For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +The console is not supported in Universal Windows Platform (UWP) apps. The standard stream handles that are associated with the console, **stdin**, **stdout**, and **stderr**, must be redirected before C run-time functions can use them in UWP apps. For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Stream I/O](../../c-runtime-library/stream-i-o.md)
-[vprintf Functions](../../c-runtime-library/vprintf-functions.md)
-[_fprintf_p, _fprintf_p_l, _fwprintf_p, _fwprintf_p_l](fprintf-p-fprintf-p-l-fwprintf-p-fwprintf-p-l.md)
-[_printf_p, _printf_p_l, _wprintf_p, _wprintf_p_l](printf-p-printf-p-l-wprintf-p-wprintf-p-l.md)
-[_sprintf_p, _sprintf_p_l, _swprintf_p, _swprintf_p_l](sprintf-p-sprintf-p-l-swprintf-p-swprintf-p-l.md)
-[vsprintf_s, _vsprintf_s_l, vswprintf_s, _vswprintf_s_l](vsprintf-s-vsprintf-s-l-vswprintf-s-vswprintf-s-l.md)
-[va_arg, va_copy, va_end, va_start](va-arg-va-copy-va-end-va-start.md)
-[_vfprintf_p, _vfprintf_p_l, _vfwprintf_p, _vfwprintf_p_l](vfprintf-p-vfprintf-p-l-vfwprintf-p-vfwprintf-p-l.md)
-[_printf_p, _printf_p_l, _wprintf_p, _wprintf_p_l](printf-p-printf-p-l-wprintf-p-wprintf-p-l.md)
-[printf_p Positional Parameters](../../c-runtime-library/printf-p-positional-parameters.md)
+[Stream I/O](../stream-i-o.md)\ +[`vprintf` functions](../vprintf-functions.md)\ +[`_fprintf_p`, `_fprintf_p_l`, `_fwprintf_p`, `_fwprintf_p_l`](fprintf-p-fprintf-p-l-fwprintf-p-fwprintf-p-l.md)\ +[`_printf_p`, `_printf_p_l`, `_wprintf_p`, `_wprintf_p_l`](printf-p-printf-p-l-wprintf-p-wprintf-p-l.md)\ +[`_sprintf_p`, `_sprintf_p_l`, `_swprintf_p`, `_swprintf_p_l`](sprintf-p-sprintf-p-l-swprintf-p-swprintf-p-l.md)\ +[`vsprintf_s`, `_vsprintf_s_l`, `vswprintf_s`, `_vswprintf_s_l`](vsprintf-s-vsprintf-s-l-vswprintf-s-vswprintf-s-l.md)\ +[`va_arg`, `va_copy`, `va_end`, `va_start`](va-arg-va-copy-va-end-va-start.md)\ +[`_vfprintf_p`, `_vfprintf_p_l`, `_vfwprintf_p`, `_vfwprintf_p_l`](vfprintf-p-vfprintf-p-l-vfwprintf-p-vfwprintf-p-l.md)\ +[`_printf_p`, `_printf_p_l`, `_wprintf_p`, `_wprintf_p_l`](printf-p-printf-p-l-wprintf-p-wprintf-p-l.md)\ +[printf_p Positional Parameters](../printf-p-positional-parameters.md) diff --git a/docs/c-runtime-library/reference/vprintf-s-vprintf-s-l-vwprintf-s-vwprintf-s-l.md b/docs/c-runtime-library/reference/vprintf-s-vprintf-s-l-vwprintf-s-vwprintf-s-l.md index 9a112a0d549..cbf86dbd440 100644 --- a/docs/c-runtime-library/reference/vprintf-s-vprintf-s-l-vwprintf-s-vwprintf-s-l.md +++ b/docs/c-runtime-library/reference/vprintf-s-vprintf-s-l-vwprintf-s-vwprintf-s-l.md @@ -11,7 +11,7 @@ helpviewer_keywords: ["vwprintf_s_l function", "_vwprintf_s_l function", "vwprin --- # vprintf_s, _vprintf_s_l, vwprintf_s, _vwprintf_s_l -Writes formatted output by using a pointer to a list of arguments. These versions of [vprintf, _vprintf_l, vwprintf, _vwprintf_l](vprintf-vprintf-l-vwprintf-vwprintf-l.md) have security enhancements, as described in [Security Features in the CRT](../../c-runtime-library/security-features-in-the-crt.md). +Writes formatted output by using a pointer to a list of arguments. These versions of [`vprintf`, `_vprintf_l`, `vwprintf`, `_vwprintf_l`](vprintf-vprintf-l-vwprintf-vwprintf-l.md) have security enhancements, as described in [Security features in the CRT](../security-features-in-the-crt.md). ## Syntax @@ -38,22 +38,22 @@ int _vwprintf_s_l( ### Parameters -*format*
+*`format`*\ Format specification. -*argptr*
+*`argptr`*\ Pointer to list of arguments. -*locale*
+*`locale`*\ The locale to use. -For more information, see [Format Specifications](../../c-runtime-library/format-specification-syntax-printf-and-wprintf-functions.md). +For more information, see [Format specification syntax](../format-specification-syntax-printf-and-wprintf-functions.md). -## Return Value +## Return value -**vprintf_s** and **vwprintf_s** return the number of characters written, not including the terminating null character, or a negative value if an output error occurs. If *format* is a null pointer, or if the format string contains invalid formatting characters, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, the functions return -1 and set **errno** to **EINVAL**. +**vprintf_s** and **vwprintf_s** return the number of characters written, not including the terminating null character, or a negative value if an output error occurs. If *`format`* is a null pointer, or if the format string contains invalid formatting characters, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, the functions return -1 and set **errno** to **EINVAL**. -For information on these and other error codes, see [_doserrno, errno, _sys_errlist, and _sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +For information on these and other error codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks @@ -66,10 +66,10 @@ The secure versions of these functions differ from **vprintf** and **vwprintf** The versions of these functions with the **_l** suffix are identical except that they use the locale parameter passed in instead of the current thread locale. > [!IMPORTANT] -> Ensure that *format* is not a user-defined string. For more information, see [Avoiding Buffer Overruns](/windows/win32/SecBP/avoiding-buffer-overruns). +> Ensure that *`format`* is not a user-defined string. For more information, see [Avoiding buffer overruns](/windows/win32/SecBP/avoiding-buffer-overruns). > Starting in Windows 10 version 2004 (build 19041), the `printf` family of functions prints exactly representable floating point numbers according to the IEEE 754 rules for rounding. In previous versions of Windows, exactly representable floating point numbers ending in '5' would always round up. IEEE 754 states that they must round to the closest even digit (also known as "Banker's Rounding"). For example, both `printf("%1.0f", 1.5)` and `printf("%1.0f", 2.5)` should round to 2. Previously, 1.5 would round to 2 and 2.5 would round to 3. This change only affects exactly representable numbers. For example, 2.35 (which, when represented in memory, is closer to 2.35000000000000008) continues to round up to 2.4. Rounding done by these functions now also respects the floating point rounding mode set by [`fesetround`](fegetround-fesetround2.md). Previously, rounding always chose `FE_TONEAREST` behavior. This change only affects programs built using Visual Studio 2019 version 16.2 and later. To use the legacy floating point rounding behavior, link with ['legacy_stdio_float_rounding.obj`](../link-options.md). -### Generic-Text Routine Mappings +### Generic-text routine mappings |TCHAR.H routine|_UNICODE & _MBCS not defined|_MBCS defined|_UNICODE defined| |---------------------|------------------------------------|--------------------|-----------------------| @@ -85,13 +85,13 @@ The versions of these functions with the **_l** suffix are identical except that \* Required for UNIX V compatibility. -The console is not supported in Universal Windows Platform (UWP) apps. The standard stream handles that are associated with the console, **stdin**, **stdout**, and **stderr**, must be redirected before C run-time functions can use them in UWP apps. For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +The console is not supported in Universal Windows Platform (UWP) apps. The standard stream handles that are associated with the console, **stdin**, **stdout**, and **stderr**, must be redirected before C run-time functions can use them in UWP apps. For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Stream I/O](../../c-runtime-library/stream-i-o.md)
-[vprintf Functions](../../c-runtime-library/vprintf-functions.md)
-[fprintf, _fprintf_l, fwprintf, _fwprintf_l](fprintf-fprintf-l-fwprintf-fwprintf-l.md)
-[printf, _printf_l, wprintf, _wprintf_l](printf-printf-l-wprintf-wprintf-l.md)
-[sprintf, _sprintf_l, swprintf, _swprintf_l, \__swprintf_l](sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md)
-[va_arg, va_copy, va_end, va_start](va-arg-va-copy-va-end-va-start.md)
+[Stream I/O](../stream-i-o.md)\ +[`vprintf` functions](../vprintf-functions.md)\ +[`fprintf`, `_fprintf_l`, `fwprintf`, `_fwprintf_l`](fprintf-fprintf-l-fwprintf-fwprintf-l.md)\ +[`printf`, `_printf_l`, `wprintf`, `_wprintf_l`](printf-printf-l-wprintf-wprintf-l.md)\ +[`sprintf`, `_sprintf_l`, `swprintf`, `_swprintf_l`, `__swprintf_l`](sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md)\ +[`va_arg`, `va_copy`, `va_end`, `va_start`](va-arg-va-copy-va-end-va-start.md) diff --git a/docs/c-runtime-library/reference/vprintf-vprintf-l-vwprintf-vwprintf-l.md b/docs/c-runtime-library/reference/vprintf-vprintf-l-vwprintf-vwprintf-l.md index 80ba45868c6..8961c45dd5a 100644 --- a/docs/c-runtime-library/reference/vprintf-vprintf-l-vwprintf-vwprintf-l.md +++ b/docs/c-runtime-library/reference/vprintf-vprintf-l-vwprintf-vwprintf-l.md @@ -11,7 +11,7 @@ helpviewer_keywords: ["vwprintf function", "_vwprintf_l function", "vwprintf_l f --- # vprintf, _vprintf_l, vwprintf, _vwprintf_l -Writes formatted output by using a pointer to a list of arguments. More secure versions of these functions are available, see [vprintf_s, _vprintf_s_l, vwprintf_s, _vwprintf_s_l](vprintf-s-vprintf-s-l-vwprintf-s-vwprintf-s-l.md). +Writes formatted output by using a pointer to a list of arguments. More secure versions of these functions are available, see [`vprintf_s`, `_vprintf_s_l`, `vwprintf_s`, `_vwprintf_s_l`](vprintf-s-vprintf-s-l-vwprintf-s-vwprintf-s-l.md). ## Syntax @@ -38,22 +38,22 @@ int _vwprintf_l( ### Parameters -*format*
+*`format`*\ Format specification. -*argptr*
+*`argptr`*\ Pointer to list of arguments. -*locale*
+*`locale`*\ The locale to use. -For more information, see [Format Specifications](../../c-runtime-library/format-specification-syntax-printf-and-wprintf-functions.md). +For more information, see [Format specification syntax](../format-specification-syntax-printf-and-wprintf-functions.md). -## Return Value +## Return value -**vprintf** and **vwprintf** return the number of characters written, not including the terminating null character, or a negative value if an output error occurs. If *format* is a null pointer, or if the format string contains invalid formatting characters, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, the functions return -1 and set **errno** to **EINVAL**. +**vprintf** and **vwprintf** return the number of characters written, not including the terminating null character, or a negative value if an output error occurs. If *`format`* is a null pointer, or if the format string contains invalid formatting characters, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, the functions return -1 and set **errno** to **EINVAL**. -For information on these and other error codes, see [_doserrno, errno, _sys_errlist, and _sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +For information on these and other error codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks @@ -64,10 +64,10 @@ Each of these functions takes a pointer to an argument list, then formats and wr The versions of these functions with the **_l** suffix are identical except that they use the locale parameter passed in instead of the current thread locale. > [!IMPORTANT] -> Ensure that *format* is not a user-defined string. For more information, see [Avoiding Buffer Overruns](/windows/win32/SecBP/avoiding-buffer-overruns). Invalid format strings are detected and result in an error. +> Ensure that *`format`* is not a user-defined string. For more information, see [Avoiding buffer overruns](/windows/win32/SecBP/avoiding-buffer-overruns). Invalid format strings are detected and result in an error. > Starting in Windows 10 version 2004 (build 19041), the `printf` family of functions prints exactly representable floating point numbers according to the IEEE 754 rules for rounding. In previous versions of Windows, exactly representable floating point numbers ending in '5' would always round up. IEEE 754 states that they must round to the closest even digit (also known as "Banker's Rounding"). For example, both `printf("%1.0f", 1.5)` and `printf("%1.0f", 2.5)` should round to 2. Previously, 1.5 would round to 2 and 2.5 would round to 3. This change only affects exactly representable numbers. For example, 2.35 (which, when represented in memory, is closer to 2.35000000000000008) continues to round up to 2.4. Rounding done by these functions now also respects the floating point rounding mode set by [`fesetround`](fegetround-fesetround2.md). Previously, rounding always chose `FE_TONEAREST` behavior. This change only affects programs built using Visual Studio 2019 version 16.2 and later. To use the legacy floating point rounding behavior, link with ['legacy_stdio_float_rounding.obj`](../link-options.md). -### Generic-Text Routine Mappings +### Generic-text routine mappings |TCHAR.H routine|_UNICODE & _MBCS not defined|_MBCS defined|_UNICODE defined| |---------------------|------------------------------------|--------------------|-----------------------| @@ -83,13 +83,13 @@ The versions of these functions with the **_l** suffix are identical except that \* Required for UNIX V compatibility. -The console is not supported in Universal Windows Platform (UWP) apps. The standard stream handles that are associated with the console, **stdin**, **stdout**, and **stderr**, must be redirected before C run-time functions can use them in UWP apps. For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +The console is not supported in Universal Windows Platform (UWP) apps. The standard stream handles that are associated with the console, **stdin**, **stdout**, and **stderr**, must be redirected before C run-time functions can use them in UWP apps. For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Stream I/O](../../c-runtime-library/stream-i-o.md)
-[vprintf Functions](../../c-runtime-library/vprintf-functions.md)
-[fprintf, _fprintf_l, fwprintf, _fwprintf_l](fprintf-fprintf-l-fwprintf-fwprintf-l.md)
-[printf, _printf_l, wprintf, _wprintf_l](printf-printf-l-wprintf-wprintf-l.md)
-[sprintf, _sprintf_l, swprintf, _swprintf_l, \__swprintf_l](sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md)
-[va_arg, va_copy, va_end, va_start](va-arg-va-copy-va-end-va-start.md)
+[Stream I/O](../stream-i-o.md)\ +[`vprintf` functions](../vprintf-functions.md)\ +[`fprintf`, `_fprintf_l`, `fwprintf`, `_fwprintf_l`](fprintf-fprintf-l-fwprintf-fwprintf-l.md)\ +[`printf`, `_printf_l`, `wprintf`, `_wprintf_l`](printf-printf-l-wprintf-wprintf-l.md)\ +[`sprintf`, `_sprintf_l`, `swprintf`, `_swprintf_l`, `__swprintf_l`](sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md)\ +[`va_arg`, `va_copy`, `va_end`, `va_start`](va-arg-va-copy-va-end-va-start.md) diff --git a/docs/c-runtime-library/reference/vscanf-s-vwscanf-s.md b/docs/c-runtime-library/reference/vscanf-s-vwscanf-s.md index e0421a41c00..4f245a32624 100644 --- a/docs/c-runtime-library/reference/vscanf-s-vwscanf-s.md +++ b/docs/c-runtime-library/reference/vscanf-s-vwscanf-s.md @@ -11,7 +11,7 @@ ms.assetid: 23a1c383-5b01-4887-93ce-534a1e38ed93 --- # vscanf_s, vwscanf_s -Reads formatted data from the standard input stream. These versions of [vscanf, vwscanf](vscanf-vwscanf.md) have security enhancements, as described in [Security Features in the CRT](../../c-runtime-library/security-features-in-the-crt.md). +Reads formatted data from the standard input stream. These versions of [`vscanf`, `vwscanf`](vscanf-vwscanf.md) have security enhancements, as described in [Security features in the CRT](../security-features-in-the-crt.md). ## Syntax @@ -28,40 +28,40 @@ int vwscanf_s( ### Parameters -*format*
+*`format`*\ Format control string. -*arglist*
+*`arglist`*\ Variable argument list. -## Return Value +## Return value -Returns the number of fields successfully converted and assigned; the return value does not include fields that were read but not assigned. A return value of 0 indicates that no fields were assigned. The return value is **EOF** for an error, or if the end-of-file character or the end-of-string character is encountered in the first attempt to read a character. If *format* is a **NULL** pointer, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, **vscanf_s** and **vwscanf_s** return **EOF** and set **errno** to **EINVAL**. +Returns the number of fields successfully converted and assigned; the return value does not include fields that were read but not assigned. A return value of 0 indicates that no fields were assigned. The return value is **EOF** for an error, or if the end-of-file character or the end-of-string character is encountered in the first attempt to read a character. If *`format`* is a **NULL** pointer, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, **vscanf_s** and **vwscanf_s** return **EOF** and set **errno** to **EINVAL**. -For information about these and other error codes, see [errno, _doserrno, _sys_errlist, and _sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +For information about these and other error codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks -The **vscanf_s** function reads data from the standard input stream **stdin** and writes the data into the locations that are given by the *arglist* argument list. Each argument in the list must be a pointer to a variable of a type that corresponds to a type specifier in *format*. If copying occurs between strings that overlap, the behavior is undefined. +The **vscanf_s** function reads data from the standard input stream **stdin** and writes the data into the locations that are given by the *`arglist`* argument list. Each argument in the list must be a pointer to a variable of a type that corresponds to a type specifier in *`format`*. If copying occurs between strings that overlap, the behavior is undefined. -**vwscanf_s** is a wide-character version of **vscanf_s**; the *format* argument to **vwscanf_s** is a wide-character string. **vwscanf_s** and **vscanf_s** behave identically if the stream is opened in ANSI mode. **vscanf_s** doesn't support input from a UNICODE stream. +**vwscanf_s** is a wide-character version of **vscanf_s**; the *`format`* argument to **vwscanf_s** is a wide-character string. **vwscanf_s** and **vscanf_s** behave identically if the stream is opened in ANSI mode. **vscanf_s** doesn't support input from a UNICODE stream. Unlike **vscanf** and **vwscanf**, **vscanf_s** and **vwscanf_s** require the buffer size to be specified for all input parameters of type **c**, **C**, **s**, **S**, or string control sets that are enclosed in **[]**. The buffer size in characters is passed as an additional parameter immediately following the pointer to the buffer or variable. The buffer size in characters for a **`wchar_t`** string is not the same as the size in bytes. The buffer size includes the terminating null. You can use a width-specification field to ensure that the token that's read in will fit into the buffer. If no width specification field is used, and the token read in is too big to fit in the buffer, nothing is written to that buffer. > [!NOTE] -> The *size* parameter is of type **`unsigned`**, not **size_t**. +> The *`size`* parameter is of type **`unsigned`**, not **size_t**. -For more information, see [scanf Width Specification](../../c-runtime-library/scanf-width-specification.md). +For more information, see [scanf Width Specification](../scanf-width-specification.md). -### Generic-Text Routine Mappings +### Generic-text routine mappings |TCHAR.H routine|_UNICODE & _MBCS not defined|_MBCS defined|_UNICODE defined| |---------------------|------------------------------------|--------------------|-----------------------| |**_vtscanf_s**|**vscanf_s**|**vscanf_s**|**vwscanf_s**| -For more information, see [Format Specification Fields: scanf and wscanf Functions](../../c-runtime-library/format-specification-fields-scanf-and-wscanf-functions.md). +For more information, see [Format specification fields: `scanf` and `wscanf` functions](../format-specification-fields-scanf-and-wscanf-functions.md). ## Requirements @@ -70,7 +70,7 @@ For more information, see [Format Specification Fields: scanf and wscanf Functio |**vscanf_s**|\| |**wscanf_s**|\ or \| -The console is not supported in Universal Windows Platform (UWP) apps. The standard stream handles that are associated with the console, **stdin**, **stdout**, and **stderr**, must be redirected before C run-time functions can use them in UWP apps. For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +The console is not supported in Universal Windows Platform (UWP) apps. The standard stream handles that are associated with the console, **stdin**, **stdout**, and **stderr**, must be redirected before C run-time functions can use them in UWP apps. For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -137,10 +137,10 @@ The contents are: 36 92.300003 y n Wide characters ## See also -[Floating-Point Support](../../c-runtime-library/floating-point-support.md)
-[Stream I/O](../../c-runtime-library/stream-i-o.md)
-[Locale](../../c-runtime-library/locale.md)
-[printf, _printf_l, wprintf, _wprintf_l](printf-printf-l-wprintf-wprintf-l.md)
-[scanf, _scanf_l, wscanf, _wscanf_l](scanf-scanf-l-wscanf-wscanf-l.md)
-[scanf_s, _scanf_s_l, wscanf_s, _wscanf_s_l](scanf-s-scanf-s-l-wscanf-s-wscanf-s-l.md)
-[vscanf, vwscanf](vscanf-vwscanf.md)
+[Math and floating-point support](../floating-point-support.md)\ +[Stream I/O](../stream-i-o.md)\ +[Locale](../locale.md)\ +[`printf`, `_printf_l`, `wprintf`, `_wprintf_l`](printf-printf-l-wprintf-wprintf-l.md)\ +[`scanf`, `_scanf_l`, `wscanf`, `_wscanf_l`](scanf-scanf-l-wscanf-wscanf-l.md)\ +[`scanf_s`, `_scanf_s_l`, `wscanf_s`, `_wscanf_s_l`](scanf-s-scanf-s-l-wscanf-s-wscanf-s-l.md)\ +[`vscanf`, `vwscanf`](vscanf-vwscanf.md) diff --git a/docs/c-runtime-library/reference/vscanf-vwscanf.md b/docs/c-runtime-library/reference/vscanf-vwscanf.md index 582a22b72e8..f33af06a030 100644 --- a/docs/c-runtime-library/reference/vscanf-vwscanf.md +++ b/docs/c-runtime-library/reference/vscanf-vwscanf.md @@ -11,7 +11,7 @@ ms.assetid: d1df595b-11bc-4682-9441-a92616301e3b --- # vscanf, vwscanf -Reads formatted data from the standard input stream. More secure versions of these function are available; see [vscanf_s, vwscanf_s](vscanf-s-vwscanf-s.md). +Reads formatted data from the standard input stream. More secure versions of these function are available; see [`vscanf_s`, `vwscanf_s`](vscanf-s-vwscanf-s.md). ## Syntax @@ -28,36 +28,36 @@ int vwscanf( ### Parameters -*format*
+*`format`*\ Format control string. -*arglist*
+*`arglist`*\ Variable argument list. -## Return Value +## Return value Returns the number of fields that are successfully converted and assigned; the return value does not include fields that were read but not assigned. A return value of 0 indicates that no fields were assigned. -If *format* is a **NULL** pointer, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, these functions return **EOF** and set **errno** to **EINVAL**. +If *`format`* is a **NULL** pointer, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, these functions return **EOF** and set **errno** to **EINVAL**. -For information about these and other error codes, see [errno, _doserrno, _sys_errlist, and _sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +For information about these and other error codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks -The **vscanf** function reads data from the standard input stream **stdin** and writes the data into the locations that are given by the *arglist* argument list. Each argument in the list must be a pointer to a variable of a type that corresponds to a type specifier in *format*. If copying occurs between strings that overlap, the behavior is undefined. +The **vscanf** function reads data from the standard input stream **stdin** and writes the data into the locations that are given by the *`arglist`* argument list. Each argument in the list must be a pointer to a variable of a type that corresponds to a type specifier in *`format`*. If copying occurs between strings that overlap, the behavior is undefined. > [!IMPORTANT] -> When you use **vscanf** to read a string, always specify a width for the **%s** format (for example, **"%32s"** instead of **"%s"**); otherwise, incorrectly formatted input can cause a buffer overrun. As an alternative, you can use [vscanf_s, vwscanf_s](vscanf-s-vwscanf-s.md) or [fgets](fgets-fgetws.md). +> When you use **vscanf** to read a string, always specify a width for the **%s** format (for example, **"%32s"** instead of **"%s"**); otherwise, incorrectly formatted input can cause a buffer overrun. As an alternative, you can use [`vscanf_s`, `vwscanf_s`](vscanf-s-vwscanf-s.md) or [`fgets`](fgets-fgetws.md). -**vwscanf** is a wide-character version of **vscanf**; the *format* argument to **vwscanf** is a wide-character string. **vwscanf** and **vscanf** behave identically if the stream is opened in ANSI mode. **vscanf** doesn't support input from a UNICODE stream. +**vwscanf** is a wide-character version of **vscanf**; the *`format`* argument to **vwscanf** is a wide-character string. **vwscanf** and **vscanf** behave identically if the stream is opened in ANSI mode. **vscanf** doesn't support input from a UNICODE stream. -### Generic-Text Routine Mappings +### Generic-text routine mappings |TCHAR.H routine|_UNICODE & _MBCS not defined|_MBCS defined|_UNICODE defined| |---------------------|------------------------------------|--------------------|-----------------------| |**_vtscanf**|**vscanf**|**vscanf**|**vwscanf**| -For more information, see [Format Specification Fields: scanf and wscanf Functions](../../c-runtime-library/format-specification-fields-scanf-and-wscanf-functions.md). +For more information, see [Format specification fields: `scanf` and `wscanf` functions](../format-specification-fields-scanf-and-wscanf-functions.md). ## Requirements @@ -66,7 +66,7 @@ For more information, see [Format Specification Fields: scanf and wscanf Functio |**vscanf**|\| |**vwscanf**|\ or \| -The console is not supported in Universal Windows Platform (UWP) apps. The standard stream handles that are associated with the console, **stdin**, **stdout**, and **stderr**, must be redirected before C run-time functions can use them in UWP apps. For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +The console is not supported in Universal Windows Platform (UWP) apps. The standard stream handles that are associated with the console, **stdin**, **stdout**, and **stderr**, must be redirected before C run-time functions can use them in UWP apps. For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -125,11 +125,11 @@ The contents are: 36 92.300003 y n Wide characters ## See also -[Floating-Point Support](../../c-runtime-library/floating-point-support.md)
-[Stream I/O](../../c-runtime-library/stream-i-o.md)
-[Locale](../../c-runtime-library/locale.md)
-[fscanf, _fscanf_l, fwscanf, _fwscanf_l](fscanf-fscanf-l-fwscanf-fwscanf-l.md)
-[printf, _printf_l, wprintf, _wprintf_l](printf-printf-l-wprintf-wprintf-l.md)
-[sprintf, _sprintf_l, swprintf, _swprintf_l, \__swprintf_l](sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md)
-[sscanf, _sscanf_l, swscanf, _swscanf_l](sscanf-sscanf-l-swscanf-swscanf-l.md)
-[vscanf_s, vwscanf_s](vscanf-s-vwscanf-s.md)
+[Math and floating-point support](../floating-point-support.md)\ +[Stream I/O](../stream-i-o.md)\ +[Locale](../locale.md)\ +[`fscanf`, `_fscanf_l`, `fwscanf`, `_fwscanf_l`](fscanf-fscanf-l-fwscanf-fwscanf-l.md)\ +[`printf`, `_printf_l`, `wprintf`, `_wprintf_l`](printf-printf-l-wprintf-wprintf-l.md)\ +[`sprintf`, `_sprintf_l`, `swprintf`, `_swprintf_l`, `__swprintf_l`](sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md)\ +[`sscanf`, `_sscanf_l`, `swscanf`, `_swscanf_l`](sscanf-sscanf-l-swscanf-swscanf-l.md)\ +[`vscanf_s`, `vwscanf_s`](vscanf-s-vwscanf-s.md) diff --git a/docs/c-runtime-library/reference/vscprintf-p-vscprintf-p-l-vscwprintf-p-vscwprintf-p-l.md b/docs/c-runtime-library/reference/vscprintf-p-vscprintf-p-l-vscwprintf-p-vscwprintf-p-l.md index fb3845fe60e..efb613ff437 100644 --- a/docs/c-runtime-library/reference/vscprintf-p-vscprintf-p-l-vscwprintf-p-vscwprintf-p-l.md +++ b/docs/c-runtime-library/reference/vscprintf-p-vscprintf-p-l-vscwprintf-p-vscwprintf-p-l.md @@ -47,25 +47,25 @@ Pointer to list of arguments. *`locale`*\ The locale to use. -For more information, see [Format Specifications](../../c-runtime-library/format-specification-syntax-printf-and-wprintf-functions.md). +For more information, see [Format specification syntax](../format-specification-syntax-printf-and-wprintf-functions.md). -## Return Value +## Return value **`_vscprintf_p`** returns the number of characters that would be generated if the string pointed to by the list of arguments was printed or sent to a file or buffer using the specified formatting codes. The value returned does not include the terminating null character. **`_vscwprintf_p`** performs the same function for wide characters. ## Remarks -These functions differ from **`_vscprintf`** and **`_vscwprintf`** only in that they support the ability to specify the order in which the arguments are used. For more information, see [`printf_p` Positional Parameters](../../c-runtime-library/printf-p-positional-parameters.md). +These functions differ from **`_vscprintf`** and **`_vscwprintf`** only in that they support the ability to specify the order in which the arguments are used. For more information, see [`printf_p` Positional Parameters](../printf-p-positional-parameters.md). The versions of these functions with the **`_l`** suffix are identical except that they use the locale parameter passed in instead of the current thread locale. -If *`format`* is a null pointer, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, the functions return -1 and set **`errno`** to **`EINVAL`**. +If *`format`* is a null pointer, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, the functions return -1 and set **`errno`** to **`EINVAL`**. > [!IMPORTANT] -> Ensure that if *`format`* is a user-defined string, it is null terminated and has the correct number and type of parameters. For more information, see [Avoiding Buffer Overruns](/windows/win32/SecBP/avoiding-buffer-overruns). +> Ensure that if *`format`* is a user-defined string, it is null terminated and has the correct number and type of parameters. For more information, see [Avoiding buffer overruns](/windows/win32/SecBP/avoiding-buffer-overruns). > Starting in Windows 10 version 2004 (build 19041), the `printf` family of functions prints exactly representable floating point numbers according to the IEEE 754 rules for rounding. In previous versions of Windows, exactly representable floating point numbers ending in '5' would always round up. IEEE 754 states that they must round to the closest even digit (also known as "Banker's Rounding"). For example, both `printf("%1.0f", 1.5)` and `printf("%1.0f", 2.5)` should round to 2. Previously, 1.5 would round to 2 and 2.5 would round to 3. This change only affects exactly representable numbers. For example, 2.35 (which, when represented in memory, is closer to 2.35000000000000008) continues to round up to 2.4. Rounding done by these functions now also respects the floating point rounding mode set by [`fesetround`](fegetround-fesetround2.md). Previously, rounding always chose `FE_TONEAREST` behavior. This change only affects programs built using Visual Studio 2019 version 16.2 and later. To use the legacy floating point rounding behavior, link with ['legacy_stdio_float_rounding.obj`](../link-options.md). -### Generic-Text Routine Mappings +### Generic-text routine mappings |TCHAR.H routine|_UNICODE & _MBCS not defined|_MBCS defined|_UNICODE defined| |---------------------|------------------------------------|--------------------|-----------------------| @@ -79,7 +79,7 @@ If *`format`* is a null pointer, the invalid parameter handler is invoked, as de |**`_vscprintf_p`**, **`_vscprintf_p_l`**|``| |**`_vscwprintf_p`**, **`_vscwprintf_p_l`**|`` or ``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -87,6 +87,6 @@ See the example for [`vsprintf`](vsprintf-vsprintf-l-vswprintf-vswprintf-l-vswpr ## See also -[`vprintf` Functions](../../c-runtime-library/vprintf-functions.md)\ +[`vprintf` functions](../vprintf-functions.md)\ [`_scprintf_p`, `_scprintf_p_l`, `_scwprintf_p`, `_scwprintf_p_l`](scprintf-p-scprintf-p-l-scwprintf-p-scwprintf-p-l.md)\ [`_vscprintf`, `_vscprintf_l`, `_vscwprintf`, `_vscwprintf_l`](vscprintf-vscprintf-l-vscwprintf-vscwprintf-l.md)\ diff --git a/docs/c-runtime-library/reference/vscprintf-vscprintf-l-vscwprintf-vscwprintf-l.md b/docs/c-runtime-library/reference/vscprintf-vscprintf-l-vscwprintf-vscwprintf-l.md index 2daf5ed289b..7443b445f7b 100644 --- a/docs/c-runtime-library/reference/vscprintf-vscprintf-l-vscwprintf-vscwprintf-l.md +++ b/docs/c-runtime-library/reference/vscprintf-vscprintf-l-vscwprintf-vscwprintf-l.md @@ -38,35 +38,35 @@ int _vscwprintf_l( ### Parameters -*format*
+*`format`*\ Format-control string. -*argptr*
+*`argptr`*\ Pointer to list of arguments. -*locale*
+*`locale`*\ The locale to use. -For more information, see [Format Specifications](../../c-runtime-library/format-specification-syntax-printf-and-wprintf-functions.md). +For more information, see [Format specification syntax](../format-specification-syntax-printf-and-wprintf-functions.md). -## Return Value +## Return value **_vscprintf** returns the number of characters that would be generated if the string pointed to by the list of arguments was printed or sent to a file or buffer using the specified formatting codes. The value returned does not include the terminating null character. **_vscwprintf** performs the same function for wide characters. The versions of these functions with the **_l** suffix are identical except that they use the locale parameter passed in instead of the current thread locale. -If *format* is a null pointer, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, the functions return -1 and set **errno** to **EINVAL**. +If *`format`* is a null pointer, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, the functions return -1 and set **errno** to **EINVAL**. ## Remarks -Each *argument* (if any) is converted according to the corresponding format specification in *format*. The format consists of ordinary characters and has the same form and function as the *format* argument for [printf](printf-printf-l-wprintf-wprintf-l.md). +Each *`argument`* (if any) is converted according to the corresponding format specification in *`format`*. The format consists of ordinary characters and has the same form and function as the *`format`* argument for [`printf`](printf-printf-l-wprintf-wprintf-l.md). > [!IMPORTANT] -> Ensure that if *format* is a user-defined string, it is null terminated and has the correct number and type of parameters. For more information, see [Avoiding Buffer Overruns](/windows/win32/SecBP/avoiding-buffer-overruns). +> Ensure that if *`format`* is a user-defined string, it is null terminated and has the correct number and type of parameters. For more information, see [Avoiding buffer overruns](/windows/win32/SecBP/avoiding-buffer-overruns). > > Starting in Windows 10 version 2004 (build 19041), the `printf` family of functions prints exactly representable floating point numbers according to the IEEE 754 rules for rounding. In previous versions of Windows, exactly representable floating point numbers ending in '5' would always round up. IEEE 754 states that they must round to the closest even digit (also known as "Banker's Rounding"). For example, both `printf("%1.0f", 1.5)` and `printf("%1.0f", 2.5)` should round to 2. Previously, 1.5 would round to 2 and 2.5 would round to 3. This change only affects exactly representable numbers. For example, 2.35 (which, when represented in memory, is closer to 2.35000000000000008) continues to round up to 2.4. Rounding done by these functions now also respects the floating point rounding mode set by [`fesetround`](fegetround-fesetround2.md). Previously, rounding always chose `FE_TONEAREST` behavior. This change only affects programs built using Visual Studio 2019 version 16.2 and later. To use the legacy floating point rounding behavior, link with [`legacy_stdio_float_rounding.obj`](../link-options.md). -### Generic-Text Routine Mappings +### Generic-text routine mappings |TCHAR.H routine|_UNICODE & _MBCS not defined|_MBCS defined|_UNICODE defined| |---------------------|------------------------------------|--------------------|-----------------------| @@ -80,17 +80,17 @@ Each *argument* (if any) is converted according to the corresponding format spec |**_vscprintf**, **_vscprintf_l**|\| |**_vscwprintf**, **_vscwprintf_l**|\ or \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example -See the example for [vsprintf](vsprintf-vsprintf-l-vswprintf-vswprintf-l-vswprintf-l.md). +See the example for [`vsprintf`](vsprintf-vsprintf-l-vswprintf-vswprintf-l-vswprintf-l.md). ## See also -[Stream I/O](../../c-runtime-library/stream-i-o.md)
-[fprintf, _fprintf_l, fwprintf, _fwprintf_l](fprintf-fprintf-l-fwprintf-fwprintf-l.md)
-[printf, _printf_l, wprintf, _wprintf_l](printf-printf-l-wprintf-wprintf-l.md)
-[scanf, _scanf_l, wscanf, _wscanf_l](scanf-scanf-l-wscanf-wscanf-l.md)
-[sscanf, _sscanf_l, swscanf, _swscanf_l](sscanf-sscanf-l-swscanf-swscanf-l.md)
-[vprintf Functions](../../c-runtime-library/vprintf-functions.md)
+[Stream I/O](../stream-i-o.md)\ +[`fprintf`, `_fprintf_l`, `fwprintf`, `_fwprintf_l`](fprintf-fprintf-l-fwprintf-fwprintf-l.md)\ +[`printf`, `_printf_l`, `wprintf`, `_wprintf_l`](printf-printf-l-wprintf-wprintf-l.md)\ +[`scanf`, `_scanf_l`, `wscanf`, `_wscanf_l`](scanf-scanf-l-wscanf-wscanf-l.md)\ +[`sscanf`, `_sscanf_l`, `swscanf`, `_swscanf_l`](sscanf-sscanf-l-swscanf-swscanf-l.md)\ +[`vprintf` functions](../vprintf-functions.md) diff --git a/docs/c-runtime-library/reference/vsnprintf-s-vsnprintf-s-vsnprintf-s-l-vsnwprintf-s-vsnwprintf-s-l.md b/docs/c-runtime-library/reference/vsnprintf-s-vsnprintf-s-vsnprintf-s-l-vsnwprintf-s-vsnwprintf-s-l.md index 41ef2a7ecd9..5fd7f47cbb4 100644 --- a/docs/c-runtime-library/reference/vsnprintf-s-vsnprintf-s-vsnprintf-s-l-vsnwprintf-s-vsnwprintf-s-l.md +++ b/docs/c-runtime-library/reference/vsnprintf-s-vsnprintf-s-vsnprintf-s-l-vsnwprintf-s-vsnwprintf-s-l.md @@ -11,7 +11,7 @@ helpviewer_keywords: ["vsnwprintf_s function", "_vsntprintf_s function", "_vsntp --- # `vsnprintf_s`, `_vsnprintf_s`, `_vsnprintf_s_l`, `_vsnwprintf_s`, `_vsnwprintf_s_l` -Write formatted output using a pointer to a list of arguments. These are versions of [`vsnprintf`, `_vsnprintf`, `_vsnprintf_l`, `_vsnwprintf`, `_vsnwprintf_l`](vsnprintf-vsnprintf-vsnprintf-l-vsnwprintf-vsnwprintf-l.md) with security enhancements as described in [Security Features in the CRT](../../c-runtime-library/security-features-in-the-crt.md). +Write formatted output using a pointer to a list of arguments. These are versions of [`vsnprintf`, `_vsnprintf`, `_vsnprintf_l`, `_vsnwprintf`, `_vsnwprintf_l`](vsnprintf-vsnprintf-vsnprintf-l-vsnwprintf-vsnwprintf-l.md) with security enhancements as described in [Security features in the CRT](../security-features-in-the-crt.md). ## Syntax @@ -78,7 +78,7 @@ Storage location for output. The size of the *`buffer`* for output, as the character count. *`count`*\ -Maximum number of characters to write (not including the terminating null), or [`_TRUNCATE`](../../c-runtime-library/truncate.md). +Maximum number of characters to write (not including the terminating null), or [`_TRUNCATE`](../truncate.md). *`format`*\ Format specification. @@ -89,25 +89,25 @@ Pointer to list of arguments. *`locale`*\ The locale to use. -For more information, see [Format specifications](../../c-runtime-library/format-specification-syntax-printf-and-wprintf-functions.md). +For more information, see [Format specifications](../format-specification-syntax-printf-and-wprintf-functions.md). -## Return Value +## Return value **`vsnprintf_s`**, **`_vsnprintf_s`** and **`_vsnwprintf_s`** return the number of characters written, not including the terminating null, or a negative value if either truncation of the data or an output error occurs. -* If *`count`* is less than *`sizeOfBuffer`* and the number of characters of data is less than or equal to *`count`*, or *`count`* is [`_TRUNCATE`](../../c-runtime-library/truncate.md) and the number of characters of data is less than *`sizeOfBuffer`*, then all of the data is written and the number of characters is returned. +* If *`count`* is less than *`sizeOfBuffer`* and the number of characters of data is less than or equal to *`count`*, or *`count`* is [`_TRUNCATE`](../truncate.md) and the number of characters of data is less than *`sizeOfBuffer`*, then all of the data is written and the number of characters is returned. * If *`count`* is less than *`sizeOfBuffer`* but the data exceeds *`count`* characters, then the first *`count`* characters are written. Truncation of the remaining data occurs and -1 is returned without invoking the invalid parameter handler. -* If *`count`* is [`_TRUNCATE`](../../c-runtime-library/truncate.md) and the number of characters of data equals or exceeds *`sizeOfBuffer`*, then as much of the string as will fit in *`buffer`* (with terminating null) is written. Truncation of the remaining data occurs and -1 is returned without invoking the invalid parameter handler. +* If *`count`* is [`_TRUNCATE`](../truncate.md) and the number of characters of data equals or exceeds *`sizeOfBuffer`*, then as much of the string as will fit in *`buffer`* (with terminating null) is written. Truncation of the remaining data occurs and -1 is returned without invoking the invalid parameter handler. * If *`count`* is equal to or exceeds *`sizeOfBuffer`* but the number of characters of data is less than *`sizeOfBuffer`*, then all of the data is written (with terminating null) and the number of characters is returned. -* If *`count`* and the number of characters of data both equal or exceed *`sizeOfBuffer`*, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution continues after the invalid parameter handler, these functions set *buffer* to an empty string, set **`errno`** to **`ERANGE`**, and return -1. +* If *`count`* and the number of characters of data both equal or exceed *`sizeOfBuffer`*, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution continues after the invalid parameter handler, these functions set *`buffer`* to an empty string, set **`errno`** to **`ERANGE`**, and return -1. * If *`buffer`* or *`format`* is a **`NULL`** pointer, or if *`count`* is less than or equal to zero, the invalid parameter handler is invoked. If execution is allowed to continue, these functions set **`errno`** to **`EINVAL`** and return -1. -### Error Conditions +### Error conditions |**Condition**|Return|**`errno`**| |-----------------|------------|-------------| @@ -122,23 +122,23 @@ For more information, see [Format specifications](../../c-runtime-library/format Each of these functions takes a pointer to an argument list, then formats and writes up to *`count`* characters of the given data to the memory pointed to by *`buffer`* and appends a terminating null. -If *`count`* is [`_TRUNCATE`](../../c-runtime-library/truncate.md), then these functions write as much of the string as will fit in *`buffer`* while leaving room for a terminating null. If the entire string (with terminating null) fits in *`buffer`*, then these functions return the number of characters written (not including the terminating null); otherwise, these functions return -1 to indicate that truncation occurred. +If *`count`* is [`_TRUNCATE`](../truncate.md), then these functions write as much of the string as will fit in *`buffer`* while leaving room for a terminating null. If the entire string (with terminating null) fits in *`buffer`*, then these functions return the number of characters written (not including the terminating null); otherwise, these functions return -1 to indicate that truncation occurred. The versions of these functions with the **`_l`** suffix are identical except that they use the locale parameter passed in instead of the current thread locale. > [!IMPORTANT] -> Ensure that *`format`* is not a user-defined string. For more information, see [Avoiding Buffer Overruns](/windows/win32/SecBP/avoiding-buffer-overruns). +> Ensure that *`format`* is not a user-defined string. For more information, see [Avoiding buffer overruns](/windows/win32/SecBP/avoiding-buffer-overruns). > Starting in Windows 10 version 2004 (build 19041), the `printf` family of functions prints exactly representable floating point numbers according to the IEEE 754 rules for rounding. In previous versions of Windows, exactly representable floating point numbers ending in '5' would always round up. IEEE 754 states that they must round to the closest even digit (also known as "Banker's Rounding"). For example, both `printf("%1.0f", 1.5)` and `printf("%1.0f", 2.5)` should round to 2. Previously, 1.5 would round to 2 and 2.5 would round to 3. This change only affects exactly representable numbers. For example, 2.35 (which, when represented in memory, is closer to 2.35000000000000008) continues to round up to 2.4. Rounding done by these functions now also respects the floating point rounding mode set by [`fesetround`](fegetround-fesetround2.md). Previously, rounding always chose `FE_TONEAREST` behavior. This change only affects programs built using Visual Studio 2019 version 16.2 and later. To use the legacy floating point rounding behavior, link with ['legacy_stdio_float_rounding.obj`](../link-options.md). > [!NOTE] > To ensure that there is room for the terminating null, be sure that *`count`* is strictly less than the buffer length, or use **`_TRUNCATE`**. -In C++, using these functions is simplified by template overloads; the overloads can infer buffer length automatically (eliminating the need to specify a size argument) and they can automatically replace older, non-secure functions with their newer, secure counterparts. For more information, see [Secure Template Overloads](../../c-runtime-library/secure-template-overloads.md). +In C++, using these functions is simplified by template overloads; the overloads can infer buffer length automatically (eliminating the need to specify a size argument) and they can automatically replace older, non-secure functions with their newer, secure counterparts. For more information, see [Secure template overloads](../secure-template-overloads.md). > [!TIP] -> If you get an undefined external `_vsnprintf_s` error and are using the Universal C Runtime, add `legacy_stdio_definitions.lib` to the set of libraries to link. The Universal C Runtime doesn't export this function directly and is instead defined inline in ``. For more information, see [Overview of potential upgrade issues](../../porting/overview-of-potential-upgrade-issues-visual-cpp.md#libraries) and [Visual Studio 2015 Conformance Changes](../../porting/visual-cpp-change-history-2003-2015.md#stdio_and_conio). +> If you get an undefined external `_vsnprintf_s` error and are using the Universal C Runtime, add `legacy_stdio_definitions.lib` to the set of libraries to link. The Universal C Runtime doesn't export this function directly and is instead defined inline in ``. For more information, see [Overview of potential upgrade issues](../../porting/overview-of-potential-upgrade-issues-visual-cpp.md#libraries) and [Visual Studio 2015 conformance changes](../../porting/visual-cpp-change-history-2003-2015.md#stdio_and_conio). -### Generic-Text Routine Mappings +### Generic-text routine mappings |`TCHAR.H` routine|`_UNICODE` & `_MBCS` not defined|`_MBCS` defined|`_UNICODE` defined| |---------------------|------------------------------------|--------------------|-----------------------| @@ -155,7 +155,7 @@ In C++, using these functions is simplified by template overloads; the overloads \* Required for UNIX V compatibility. -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -191,8 +191,8 @@ nSize: -1, buff: Hi there! ## See also -[Stream I/O](../../c-runtime-library/stream-i-o.md)\ -[`vprintf` Functions](../../c-runtime-library/vprintf-functions.md)\ +[Stream I/O](../stream-i-o.md)\ +[`vprintf` functions](../vprintf-functions.md)\ [`fprintf`, `_fprintf_l`, `fwprintf`, `_fwprintf_l`](fprintf-fprintf-l-fwprintf-fwprintf-l.md)\ [`printf`, `_printf_l`, `wprintf`, `_wprintf_l`](printf-printf-l-wprintf-wprintf-l.md)\ [`sprintf`, `_sprintf_l`, `swprintf`, `_swprintf_l`, `__swprintf_l`](sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md)\ diff --git a/docs/c-runtime-library/reference/vsnprintf-vsnprintf-vsnprintf-l-vsnwprintf-vsnwprintf-l.md b/docs/c-runtime-library/reference/vsnprintf-vsnprintf-vsnprintf-l-vsnwprintf-vsnwprintf-l.md index a7c382dd427..1efbe9cd7d9 100644 --- a/docs/c-runtime-library/reference/vsnprintf-vsnprintf-vsnprintf-l-vsnwprintf-vsnwprintf-l.md +++ b/docs/c-runtime-library/reference/vsnprintf-vsnprintf-vsnprintf-l-vsnwprintf-vsnwprintf-l.md @@ -89,24 +89,24 @@ int _vsnwprintf_l( ### Parameters -*`buffer`*
+*`buffer`*\ Storage location for output. -*`count`*
+*`count`*\ Maximum number of characters to write. -*`format`*
+*`format`*\ Format specification. -*`argptr`*
+*`argptr`*\ Pointer to list of arguments. -*`locale`*
+*`locale`*\ The locale to use. -For more information, see [Format Specifications](../../c-runtime-library/format-specification-syntax-printf-and-wprintf-functions.md). +For more information, see [Format specification syntax](../format-specification-syntax-printf-and-wprintf-functions.md). -## Return Value +## Return value The **`vsnprintf`** function returns the number of characters that are written, not counting the terminating null character. If the buffer size specified by *`count`* isn't sufficiently large to contain the output specified by *`format`* and *`argptr`*, the return value of **`vsnprintf`** is the number of characters that would be written, not counting the null character, if *`count`* were sufficiently large. If the return value is greater than *`count`* - 1, the output has been truncated. A return value of -1 indicates that an encoding error has occurred. @@ -116,28 +116,28 @@ The value returned by all these functions doesn't include the terminating null, - If *`count`* is zero and *`buffer`* is **`NULL`**, the value returned is the number of characters the functions would write. The value does not take into account a terminating **`NULL`**. You can use this result to allocate sufficient buffer space for the string and its terminating null, and then call the function again to fill the buffer. - If *`count`* is zero but *`buffer`* isn't **`NULL`**, nothing is written and the function returns `-1`. -- If *`format`* is **`NULL`**, or if *`buffer`* is **`NULL`** and *count* isn't equal to zero, these functions invoke the invalid parameter handler, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, these functions return -1 and set **`errno`** to **`EINVAL`**. +- If *`format`* is **`NULL`**, or if *`buffer`* is **`NULL`** and *`count`* isn't equal to zero, these functions invoke the invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, these functions return -1 and set **`errno`** to **`EINVAL`**. ## Remarks Each of these functions takes a pointer to an argument list, then formats the data, and writes up to *`count`* characters to the memory pointed to by *`buffer`*. The **`vsnprintf`** function always writes a null terminator, even if it truncates the output. When using **`_vsnprintf`** and **`_vsnwprintf`**, the buffer will be null-terminated only if there's room at the end (that is, if the number of characters to write is less than *`count`*). > [!IMPORTANT] -> To prevent certain kinds of security risks, ensure that *format* isn't a user-defined string. For more information, see [Avoiding Buffer Overruns](/windows/win32/SecBP/avoiding-buffer-overruns). +> To prevent certain kinds of security risks, ensure that *`format`* isn't a user-defined string. For more information, see [Avoiding buffer overruns](/windows/win32/SecBP/avoiding-buffer-overruns). > Starting in Windows 10 version 2004 (build 19041), the `printf` family of functions prints exactly representable floating point numbers according to the IEEE 754 rules for rounding. In previous versions of Windows, exactly representable floating point numbers ending in '5' would always round up. IEEE 754 states that they must round to the closest even digit (also known as "Banker's Rounding"). For example, both `printf("%1.0f", 1.5)` and `printf("%1.0f", 2.5)` should round to 2. Previously, 1.5 would round to 2 and 2.5 would round to 3. This change only affects exactly representable numbers. For example, 2.35 (which, when represented in memory, is closer to 2.35000000000000008) continues to round up to 2.4. Rounding done by these functions now also respects the floating point rounding mode set by [`fesetround`](fegetround-fesetround2.md). Previously, rounding always chose `FE_TONEAREST` behavior. This change only affects programs built using Visual Studio 2019 version 16.2 and later. To use the legacy floating point rounding behavior, link with ['legacy_stdio_float_rounding.obj`](../link-options.md). > [!NOTE] > To ensure that there's room for the terminating null when calling **`_vsnprintf`**, **`_vsnprintf_l`**, **`_vsnwprintf`** and **`_vsnwprintf_l`**, be sure that *`count`* is strictly less than the buffer length and initialize the buffer to null prior to calling the function. > -> Because **`vsnprintf`** always writes the terminating null, the *count* parameter may be equal to the size of the buffer. +> Because **`vsnprintf`** always writes the terminating null, the *`count`* parameter may be equal to the size of the buffer. Beginning with the UCRT in Visual Studio 2015 and Windows 10, **`vsnprintf`** is no longer identical to **`_vsnprintf`**. The **`vsnprintf`** function conforms to the C99 standard; **`_vnsprintf`** is kept for backward compatibility with older Visual Studio code. The versions of these functions with the **`_l`** suffix are identical except that they use the locale parameter passed in instead of the current thread locale. -In C++, these functions have template overloads that invoke the newer, secure counterparts of these functions. For more information, see [Secure Template Overloads](../../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). -### Generic-Text Routine Mappings +### Generic-text routine mappings |`TCHAR.H` routine|`_UNICODE` & `_MBCS` not defined|`_MBCS` defined|`_UNICODE` defined| |---------------------|------------------------------------|--------------------|-----------------------| @@ -151,7 +151,7 @@ In C++, these functions have template overloads that invoke the newer, secure co |**`vsnprintf`**, **`_vsnprintf`**, **`_vsnprintf_l`**|``|`` or ``| |**`_vsnwprintf`**, **`_vsnwprintf_l`**|`` or ``|``, ``, ``, or ``| -The **`_vsnprintf`**, **`_vsnprintf_l`**, **`_vsnwprintf`** and **`_vsnwprintf_l`** functions are Microsoft-specific. For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +The **`_vsnprintf`**, **`_vsnprintf_l`**, **`_vsnwprintf`** and **`_vsnwprintf_l`** functions are Microsoft-specific. For more compatibility information, see [Compatibility](../compatibility.md). ## Example: Use wide characters with `_vsnwprintf()` @@ -233,10 +233,10 @@ nSize: 10, buff: Hi there! ## See also -[Stream I/O](../../c-runtime-library/stream-i-o.md)
-[`vprintf` Functions](../../c-runtime-library/vprintf-functions.md)
-[Format Specification Syntax: `printf` and `wprintf` Functions](../../c-runtime-library/format-specification-syntax-printf-and-wprintf-functions.md)
-[`fprintf`, `_fprintf_l`, `fwprintf`, `_fwprintf_l`](fprintf-fprintf-l-fwprintf-fwprintf-l.md)
-[`printf`, `_printf_l`, `wprintf`, `_wprintf_l`](printf-printf-l-wprintf-wprintf-l.md)
-[`sprintf`, `_sprintf_l`, `swprintf`, `_swprintf_l`, `__swprintf_l`](sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md)
-[`va_arg`, `va_copy`, `va_end`, `va_start`](va-arg-va-copy-va-end-va-start.md)
+[Stream I/O](../stream-i-o.md)\ +[`vprintf` functions](../vprintf-functions.md)\ +[Format specification syntax: `printf` and `wprintf` functions](../format-specification-syntax-printf-and-wprintf-functions.md)\ +[`fprintf`, `_fprintf_l`, `fwprintf`, `_fwprintf_l`](fprintf-fprintf-l-fwprintf-fwprintf-l.md)\ +[`printf`, `_printf_l`, `wprintf`, `_wprintf_l`](printf-printf-l-wprintf-wprintf-l.md)\ +[`sprintf`, `_sprintf_l`, `swprintf`, `_swprintf_l`, `__swprintf_l`](sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md)\ +[`va_arg`, `va_copy`, `va_end`, `va_start`](va-arg-va-copy-va-end-va-start.md) diff --git a/docs/c-runtime-library/reference/vsprintf-p-vsprintf-p-l-vswprintf-p-vswprintf-p-l.md b/docs/c-runtime-library/reference/vsprintf-p-vsprintf-p-l-vswprintf-p-vswprintf-p-l.md index bccfcf288dd..cb617d89d97 100644 --- a/docs/c-runtime-library/reference/vsprintf-p-vsprintf-p-l-vswprintf-p-vswprintf-p-l.md +++ b/docs/c-runtime-library/reference/vsprintf-p-vsprintf-p-l-vswprintf-p-vswprintf-p-l.md @@ -46,42 +46,42 @@ int _vswprintf_p_l( ### Parameters -*buffer*
+*`buffer`*\ Storage location for output. -*sizeInBytes*
-Size of *buffer* in characters. +*`sizeInBytes`*\ +Size of *`buffer`* in characters. -*count*
+*`count`*\ Maximum number of characters to store, in the UNICODE version of this function. -*format*
+*`format`*\ Format specification. -*argptr*
+*`argptr`*\ Pointer to list of arguments. -*locale*
+*`locale`*\ The locale to use. -## Return Value +## Return value **_vsprintf_p** and **_vswprintf_p** return the number of characters written, not including the terminating null character, or a negative value if an output error occurs. ## Remarks -Each of these functions takes a pointer to an argument list, and then formats and writes the given data to the memory pointed to by *buffer*. +Each of these functions takes a pointer to an argument list, and then formats and writes the given data to the memory pointed to by *`buffer`*. -These functions differ from the **vsprintf_s** and **vswprintf_s** only in that they support positional parameters. For more information, see [printf_p Positional Parameters](../../c-runtime-library/printf-p-positional-parameters.md). +These functions differ from the **vsprintf_s** and **vswprintf_s** only in that they support positional parameters. For more information, see [printf_p Positional Parameters](../printf-p-positional-parameters.md). The versions of these functions with the **_l** suffix are identical except that they use the locale parameter passed in instead of the current thread locale. -If the *buffer* or *format* parameters are **NULL** pointers, if count is zero, or if the format string contains invalid formatting characters, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, the functions return -1 and set **errno** to **EINVAL**. +If the *`buffer`* or *`format`* parameters are **NULL** pointers, if count is zero, or if the format string contains invalid formatting characters, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, the functions return -1 and set **errno** to **EINVAL**. > [!IMPORTANT] > Starting in Windows 10 version 2004 (build 19041), the `printf` family of functions prints exactly representable floating point numbers according to the IEEE 754 rules for rounding. In previous versions of Windows, exactly representable floating point numbers ending in '5' would always round up. IEEE 754 states that they must round to the closest even digit (also known as "Banker's Rounding"). For example, both `printf("%1.0f", 1.5)` and `printf("%1.0f", 2.5)` should round to 2. Previously, 1.5 would round to 2 and 2.5 would round to 3. This change only affects exactly representable numbers. For example, 2.35 (which, when represented in memory, is closer to 2.35000000000000008) continues to round up to 2.4. Rounding done by these functions now also respects the floating point rounding mode set by [`fesetround`](fegetround-fesetround2.md). Previously, rounding always chose `FE_TONEAREST` behavior. This change only affects programs built using Visual Studio 2019 version 16.2 and later. To use the legacy floating point rounding behavior, link with ['legacy_stdio_float_rounding.obj`](../link-options.md). -### Generic-Text Routine Mappings +### Generic-text routine mappings |TCHAR.H routine|_UNICODE & _MBCS not defined|_MBCS defined|_UNICODE defined| |---------------------|------------------------------------|--------------------|-----------------------| @@ -97,7 +97,7 @@ If the *buffer* or *format* parameters are **NULL** pointers, if count is zero, \* Required for UNIX V compatibility. -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -150,10 +150,10 @@ This is a string ## See also -[Stream I/O](../../c-runtime-library/stream-i-o.md)
-[vprintf Functions](../../c-runtime-library/vprintf-functions.md)
-[Format Specification Syntax: printf and wprintf Functions](../../c-runtime-library/format-specification-syntax-printf-and-wprintf-functions.md)
-[fprintf, _fprintf_l, fwprintf, _fwprintf_l](fprintf-fprintf-l-fwprintf-fwprintf-l.md)
-[printf, _printf_l, wprintf, _wprintf_l](printf-printf-l-wprintf-wprintf-l.md)
-[sprintf, _sprintf_l, swprintf, _swprintf_l, \__swprintf_l](sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md)
-[va_arg, va_copy, va_end, va_start](va-arg-va-copy-va-end-va-start.md)
+[Stream I/O](../stream-i-o.md)\ +[`vprintf` functions](../vprintf-functions.md)\ +[Format specification syntax: `printf` and `wprintf` functions](../format-specification-syntax-printf-and-wprintf-functions.md)\ +[`fprintf`, `_fprintf_l`, `fwprintf`, `_fwprintf_l`](fprintf-fprintf-l-fwprintf-fwprintf-l.md)\ +[`printf`, `_printf_l`, `wprintf`, `_wprintf_l`](printf-printf-l-wprintf-wprintf-l.md)\ +[`sprintf`, `_sprintf_l`, `swprintf`, `_swprintf_l`, `__swprintf_l`](sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md)\ +[`va_arg`, `va_copy`, `va_end`, `va_start`](va-arg-va-copy-va-end-va-start.md) diff --git a/docs/c-runtime-library/reference/vsprintf-s-vsprintf-s-l-vswprintf-s-vswprintf-s-l.md b/docs/c-runtime-library/reference/vsprintf-s-vsprintf-s-l-vswprintf-s-vswprintf-s-l.md index 8085e20157f..6bdbd71aa73 100644 --- a/docs/c-runtime-library/reference/vsprintf-s-vsprintf-s-l-vswprintf-s-vswprintf-s-l.md +++ b/docs/c-runtime-library/reference/vsprintf-s-vsprintf-s-l-vswprintf-s-vswprintf-s-l.md @@ -11,7 +11,7 @@ helpviewer_keywords: ["_vstprintf_s_l function", "vsprintf_s_l function", "_vstp --- # `vsprintf_s`, `_vsprintf_s_l`, `vswprintf_s`, `_vswprintf_s_l` -Write formatted output using a pointer to a list of arguments. These functions are versions of [`vsprintf`, `_vsprintf_l`, `vswprintf`, `_vswprintf_l`, \`__vswprintf_l`](vsprintf-vsprintf-l-vswprintf-vswprintf-l-vswprintf-l.md) with security enhancements as described in [Security Features in the CRT](../../c-runtime-library/security-features-in-the-crt.md). +Write formatted output using a pointer to a list of arguments. These functions are versions of [`vsprintf`, `_vsprintf_l`, `vswprintf`, `_vswprintf_l`, \`__vswprintf_l`](vsprintf-vsprintf-l-vswprintf-vswprintf-l-vswprintf-l.md) with security enhancements as described in [Security features in the CRT](../security-features-in-the-crt.md). ## Syntax @@ -73,11 +73,11 @@ Pointer to list of arguments. *`locale`*\ The locale to use. -## Return Value +## Return value -**`vsprintf_s`** and **`vswprintf_s`** return the number of characters written, not including the terminating null character, or a negative value if an output error occurs. If *`buffer`* or *`format`* is a null pointer, if *`numberOfElements`* is zero, or if the format string contains invalid formatting characters, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, the functions return -1 and set **`errno`** to **`EINVAL`**. +**`vsprintf_s`** and **`vswprintf_s`** return the number of characters written, not including the terminating null character, or a negative value if an output error occurs. If *`buffer`* or *`format`* is a null pointer, if *`numberOfElements`* is zero, or if the format string contains invalid formatting characters, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, the functions return -1 and set **`errno`** to **`EINVAL`**. -For information on these and other error codes, see [`_doserrno`, `errno`, `_sys_errlist`, and `_sys_nerr`](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +For information on these and other error codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks @@ -85,16 +85,16 @@ Each of these functions takes a pointer to an argument list, and then formats an **`vswprintf_s`** conforms to the ISO C Standard for **`vswprintf`**, which requires the second parameter, *`count`*, of type **`size_t`**. -These functions differ from the non-secure versions only in that the secure versions support positional parameters. For more information, see [`printf_p` Positional Parameters](../../c-runtime-library/printf-p-positional-parameters.md). +These functions differ from the non-secure versions only in that the secure versions support positional parameters. For more information, see [`printf_p` Positional Parameters](../printf-p-positional-parameters.md). The versions of these functions with the **`_l`** suffix are identical except that they use the locale parameter passed in instead of the current thread locale. -In C++, using these functions is simplified by template overloads. The overloads can infer buffer length automatically, eliminating the need to specify a size argument. And, they can automatically replace non-secure functions with their secure counterparts. For more information, see [Secure Template Overloads](../../c-runtime-library/secure-template-overloads.md). +In C++, using these functions is simplified by template overloads. The overloads can infer buffer length automatically, eliminating the need to specify a size argument. And, they can automatically replace non-secure functions with their secure counterparts. For more information, see [Secure template overloads](../secure-template-overloads.md). > [!IMPORTANT] > Starting in Windows 10 version 2004 (build 19041), the `printf` family of functions prints exactly representable floating point numbers according to the IEEE 754 rules for rounding. In previous versions of Windows, exactly representable floating point numbers ending in '5' would always round up. IEEE 754 states that they must round to the closest even digit (also known as "Banker's Rounding"). For example, both `printf("%1.0f", 1.5)` and `printf("%1.0f", 2.5)` should round to 2. Previously, 1.5 would round to 2 and 2.5 would round to 3. This change only affects exactly representable numbers. For example, 2.35 (which, when represented in memory, is closer to 2.35000000000000008) continues to round up to 2.4. Rounding done by these functions now also respects the floating point rounding mode set by [`fesetround`](fegetround-fesetround2.md). Previously, rounding always chose `FE_TONEAREST` behavior. This change only affects programs built using Visual Studio 2019 version 16.2 and later. To use the legacy floating point rounding behavior, link with ['legacy_stdio_float_rounding.obj`](../link-options.md). -### Generic-Text Routine Mappings +### Generic-text routine mappings |`TCHAR.H` routine|`_UNICODE & _MBCS` not defined|`_MBCS` defined|`_UNICODE` defined| |---------------------|------------------------------------|--------------------|-----------------------| @@ -110,7 +110,7 @@ In C++, using these functions is simplified by template overloads. The overloads \* Required for UNIX V compatibility. -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -157,10 +157,10 @@ This is a string ## See also -[Stream I/O](../../c-runtime-library/stream-i-o.md)\ -[`vprintf` Functions](../../c-runtime-library/vprintf-functions.md)\ -[Format Specification Syntax: `printf` and `wprintf` Functions](../../c-runtime-library/format-specification-syntax-printf-and-wprintf-functions.md)\ +[Stream I/O](../stream-i-o.md)\ +[`vprintf` functions](../vprintf-functions.md)\ +[Format specification syntax: `printf` and `wprintf` functions](../format-specification-syntax-printf-and-wprintf-functions.md)\ [`fprintf`, `_fprintf_l`, `fwprintf`, `_fwprintf_l`](fprintf-fprintf-l-fwprintf-fwprintf-l.md)\ [`printf`, `_printf_l`, `wprintf`, `_wprintf_l`](printf-printf-l-wprintf-wprintf-l.md)\ -[`sprintf`, `_sprintf_l`, `swprintf`, `_swprintf_l`, `\__swprintf_l`](sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md)\ +[`sprintf`, `_sprintf_l`, `swprintf`, `_swprintf_l`, `__swprintf_l`](sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md)\ [`va_arg`, `va_copy`, `va_end`, `va_start`](va-arg-va-copy-va-end-va-start.md) diff --git a/docs/c-runtime-library/reference/vsprintf-vsprintf-l-vswprintf-vswprintf-l-vswprintf-l.md b/docs/c-runtime-library/reference/vsprintf-vsprintf-l-vswprintf-vswprintf-l-vswprintf-l.md index 8c1e4002d2d..080d676873e 100644 --- a/docs/c-runtime-library/reference/vsprintf-vsprintf-l-vswprintf-vswprintf-l-vswprintf-l.md +++ b/docs/c-runtime-library/reference/vsprintf-vsprintf-l-vswprintf-vswprintf-l-vswprintf-l.md @@ -91,11 +91,11 @@ Pointer to list of arguments. *`locale`*\ The locale to use. -## Return Value +## Return value -**`vsprintf`** and **`vswprintf`** return the number of characters written, not including the terminating `NULL` character, or a negative value if an output error occurs. If *`buffer`* or *`format`* is a `NULL` pointer, these functions invoke the invalid parameter handler, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, these functions return -1 and set **`errno`** to **`EINVAL`**. +**`vsprintf`** and **`vswprintf`** return the number of characters written, not including the terminating `NULL` character, or a negative value if an output error occurs. If *`buffer`* or *`format`* is a `NULL` pointer, these functions invoke the invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, these functions return -1 and set **`errno`** to **`EINVAL`**. -For information on these and other error codes, see [`_doserrno`, `errno`, `_sys_errlist`, and `_sys_nerr`](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +For information on these and other error codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks @@ -104,14 +104,14 @@ Each of these functions takes a pointer to an argument list, and then formats an The versions of these functions with the **`_l`** suffix are identical except that they use the locale parameter passed in instead of the current thread locale. > [!IMPORTANT] -> Using **`vsprintf`**, there is no way to limit the number of characters written, which means that code using this function is susceptible to buffer overruns. Use [`_vsnprintf`](vsnprintf-vsnprintf-vsnprintf-l-vsnwprintf-vsnwprintf-l.md) instead, or call [`_vscprintf`](vscprintf-vscprintf-l-vscwprintf-vscwprintf-l.md) to determine how large a buffer is needed. Also, ensure that *`format`* is not a user-defined string. For more information, see [Avoiding Buffer Overruns](/windows/win32/SecBP/avoiding-buffer-overruns). +> Using **`vsprintf`**, there is no way to limit the number of characters written, which means that code using this function is susceptible to buffer overruns. Use [`_vsnprintf`](vsnprintf-vsnprintf-vsnprintf-l-vsnwprintf-vsnwprintf-l.md) instead, or call [`_vscprintf`](vscprintf-vscprintf-l-vscwprintf-vscwprintf-l.md) to determine how large a buffer is needed. Also, ensure that *`format`* is not a user-defined string. For more information, see [Avoiding buffer overruns](/windows/win32/SecBP/avoiding-buffer-overruns). > Starting in Windows 10 version 2004 (build 19041), the `printf` family of functions prints exactly representable floating point numbers according to the IEEE 754 rules for rounding. In previous versions of Windows, exactly representable floating point numbers ending in '5' would always round up. IEEE 754 states that they must round to the closest even digit (also known as "Banker's Rounding"). For example, both `printf("%1.0f", 1.5)` and `printf("%1.0f", 2.5)` should round to 2. Previously, 1.5 would round to 2 and 2.5 would round to 3. This change only affects exactly representable numbers. For example, 2.35 (which, when represented in memory, is closer to 2.35000000000000008) continues to round up to 2.4. Rounding done by these functions now also respects the floating point rounding mode set by [`fesetround`](fegetround-fesetround2.md). Previously, rounding always chose `FE_TONEAREST` behavior. This change only affects programs built using Visual Studio 2019 version 16.2 and later. To use the legacy floating point rounding behavior, link with ['legacy_stdio_float_rounding.obj`](../link-options.md). **`vswprintf`** conforms to the ISO C Standard, which requires the second parameter, *`count`*, of type **`size_t`**. To force the old nonstandard behavior, define **`_CRT_NON_CONFORMING_SWPRINTFS`**. The old behavior may not be in a future version, so code should be changed to use the new conformant behavior. -In C++, these functions have template overloads that invoke the newer, secure counterparts of these functions. For more information, see [Secure Template Overloads](../../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). -### Generic-Text Routine Mappings +### Generic-text routine mappings |`TCHAR.H` routine|`_UNICODE & _MBCS` not defined|`_MBCS` defined|`_UNICODE` defined| |---------------------|------------------------------------|--------------------|-----------------------| @@ -127,7 +127,7 @@ In C++, these functions have template overloads that invoke the newer, secure co \* Required for UNIX V compatibility. -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -180,10 +180,10 @@ This is a string ## See also -[Stream I/O](../../c-runtime-library/stream-i-o.md)\ -[`vprintf` Functions](../../c-runtime-library/vprintf-functions.md)\ -[Format Specification Syntax: `printf` and `wprintf` Functions](../../c-runtime-library/format-specification-syntax-printf-and-wprintf-functions.md)\ +[Stream I/O](../stream-i-o.md)\ +[`vprintf` functions](../vprintf-functions.md)\ +[Format specification syntax: `printf` and `wprintf` functions](../format-specification-syntax-printf-and-wprintf-functions.md)\ [`fprintf`, `_fprintf_l`, `fwprintf`, `_fwprintf_l`](fprintf-fprintf-l-fwprintf-fwprintf-l.md)\ [`printf`, `_printf_l`, `wprintf`, `_wprintf_l`](printf-printf-l-wprintf-wprintf-l.md)\ -[`sprintf`, `_sprintf_l`, `swprintf`, `_swprintf_l`, `\__swprintf_l`](sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md)\ +[`sprintf`, `_sprintf_l`, `swprintf`, `_swprintf_l`, `__swprintf_l`](sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md)\ [`va_arg`, `va_copy`, `va_end`, `va_start`](va-arg-va-copy-va-end-va-start.md) diff --git a/docs/c-runtime-library/reference/vsscanf-s-vswscanf-s.md b/docs/c-runtime-library/reference/vsscanf-s-vswscanf-s.md index 136387c9d2e..b3743717b5c 100644 --- a/docs/c-runtime-library/reference/vsscanf-s-vswscanf-s.md +++ b/docs/c-runtime-library/reference/vsscanf-s-vswscanf-s.md @@ -11,7 +11,7 @@ ms.assetid: 7b732e68-c6f4-4579-8917-122f5a7876e1 --- # vsscanf_s, vswscanf_s -Reads formatted data from a string. These versions of [vsscanf, vswscanf](vsscanf-vswscanf.md) have security enhancements, as described in [Security Features in the CRT](../../c-runtime-library/security-features-in-the-crt.md). +Reads formatted data from a string. These versions of [`vsscanf`, `vswscanf`](vsscanf-vswscanf.md) have security enhancements, as described in [Security features in the CRT](../security-features-in-the-crt.md). ## Syntax @@ -30,39 +30,39 @@ int vswscanf_s( ### Parameters -*buffer*
+*`buffer`*\ Stored data -*format*
-Format-control string. For more information, see [Format Specification Fields: scanf and wscanf Functions](../../c-runtime-library/format-specification-fields-scanf-and-wscanf-functions.md). +*`format`*\ +Format-control string. For more information, see [Format specification fields: `scanf` and `wscanf` functions](../format-specification-fields-scanf-and-wscanf-functions.md). -*arglist*
+*`arglist`*\ Variable argument list. -## Return Value +## Return value Each of these functions returns the number of fields that are successfully converted and assigned; the return value does not include fields that were read but not assigned. A return value of 0 indicates that no fields were assigned. The return value is **EOF** for an error or if the end of the string is reached before the first conversion. -If *buffer* or *format* is a **NULL** pointer, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, these functions return -1 and set **errno** to **EINVAL**. +If *`buffer`* or *`format`* is a **NULL** pointer, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, these functions return -1 and set **errno** to **EINVAL**. -For information about these and other error codes, see [errno, _doserrno, _sys_errlist, and _sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +For information about these and other error codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks -The **vsscanf_s** function reads data from *buffer* into the locations that are given by each argument in the *arglist* argument list. The arguments in the argument list specify pointers to variables that have a type that corresponds to a type specifier in *format*. Unlike the less secure version **vsscanf**, a buffer size parameter is required when you use the type field characters **c**, **C**, **s**, **S**, or string-control sets that are enclosed in **[]**. The buffer size in characters must be supplied as an additional parameter immediately after each buffer parameter that requires it. +The **vsscanf_s** function reads data from *`buffer`* into the locations that are given by each argument in the *`arglist`* argument list. The arguments in the argument list specify pointers to variables that have a type that corresponds to a type specifier in *`format`*. Unlike the less secure version **vsscanf**, a buffer size parameter is required when you use the type field characters **c**, **C**, **s**, **S**, or string-control sets that are enclosed in **[]**. The buffer size in characters must be supplied as an additional parameter immediately after each buffer parameter that requires it. The buffer size includes the terminating null. A width specification field may be used to ensure that the token that's read in will fit into the buffer. If no width specification field is used, and the token read in is too big to fit in the buffer, nothing is written to that buffer. -For more information, see [scanf_s, _scanf_s_l, wscanf_s, _wscanf_s_l](scanf-s-scanf-s-l-wscanf-s-wscanf-s-l.md) and [scanf Type Field Characters](../../c-runtime-library/scanf-type-field-characters.md). +For more information, see [`scanf_s`, `_scanf_s_l`, `wscanf_s`, `_wscanf_s_l`](scanf-s-scanf-s-l-wscanf-s-wscanf-s-l.md) and [scanf Type Field Characters](../scanf-type-field-characters.md). > [!NOTE] > The size parameter is of type **`unsigned`**, not **size_t**. -The *format* argument controls the interpretation of the input fields and has the same form and function as the *format* argument for the **scanf_s** function. If copying occurs between strings that overlap, the behavior is undefined. +The *`format`* argument controls the interpretation of the input fields and has the same form and function as the *`format`* argument for the **scanf_s** function. If copying occurs between strings that overlap, the behavior is undefined. **vswscanf_s** is a wide-character version of **vsscanf_s**; the arguments to **vswscanf_s** are wide-character strings. **vsscanf_s** does not handle multibyte hexadecimal characters. **vswscanf_s** does not handle Unicode full-width hexadecimal or "compatibility zone" characters. Otherwise, **vswscanf_s** and **vsscanf_s** behave identically. -### Generic-Text Routine Mappings +### Generic-text routine mappings |TCHAR.H routine|_UNICODE & _MBCS not defined|_MBCS defined|_UNICODE defined| |---------------------|------------------------------------|--------------------|-----------------------| @@ -75,7 +75,7 @@ The *format* argument controls the interpretation of the input fields and has th |**vsscanf_s**|\| |**vswscanf_s**|\ or \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -131,9 +131,9 @@ Real: = 15.000000 ## See also -[Stream I/O](../../c-runtime-library/stream-i-o.md)
-[scanf, _scanf_l, wscanf, _wscanf_l](scanf-scanf-l-wscanf-wscanf-l.md)
-[sscanf, _sscanf_l, swscanf, _swscanf_l](sscanf-sscanf-l-swscanf-swscanf-l.md)
-[sscanf_s, _sscanf_s_l, swscanf_s, _swscanf_s_l](sscanf-s-sscanf-s-l-swscanf-s-swscanf-s-l.md)
-[sprintf, _sprintf_l, swprintf, _swprintf_l, \__swprintf_l](sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md)
-[vsscanf, vswscanf](vsscanf-vswscanf.md)
+[Stream I/O](../stream-i-o.md)\ +[`scanf`, `_scanf_l`, `wscanf`, `_wscanf_l`](scanf-scanf-l-wscanf-wscanf-l.md)\ +[`sscanf`, `_sscanf_l`, `swscanf`, `_swscanf_l`](sscanf-sscanf-l-swscanf-swscanf-l.md)\ +[`sscanf_s`, `_sscanf_s_l`, `swscanf_s`, `_swscanf_s_l`](sscanf-s-sscanf-s-l-swscanf-s-swscanf-s-l.md)\ +[`sprintf`, `_sprintf_l`, `swprintf`, `_swprintf_l`, `__swprintf_l`](sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md)\ +[`vsscanf`, `vswscanf`](vsscanf-vswscanf.md) diff --git a/docs/c-runtime-library/reference/vsscanf-vswscanf.md b/docs/c-runtime-library/reference/vsscanf-vswscanf.md index ee836f2b47e..34c801db7ca 100644 --- a/docs/c-runtime-library/reference/vsscanf-vswscanf.md +++ b/docs/c-runtime-library/reference/vsscanf-vswscanf.md @@ -12,7 +12,7 @@ ms.assetid: e96180f2-df46-423d-b4eb-0a49ab819bde --- # vsscanf, vswscanf -Reads formatted data from a string. More secure versions of these functions are available; see [vsscanf_s, vswscanf_s](vsscanf-s-vswscanf-s.md). +Reads formatted data from a string. More secure versions of these functions are available; see [`vsscanf_s`, `vswscanf_s`](vsscanf-s-vswscanf-s.md). ## Syntax @@ -31,33 +31,33 @@ int vswscanf( ### Parameters -*buffer*
+*`buffer`*\ Stored data -*format*
-Format-control string. For more information, see [Format Specification Fields: scanf and wscanf Functions](../../c-runtime-library/format-specification-fields-scanf-and-wscanf-functions.md). +*`format`*\ +Format-control string. For more information, see [Format specification fields: `scanf` and `wscanf` functions](../format-specification-fields-scanf-and-wscanf-functions.md). -*arglist*
+*`arglist`*\ Variable argument list. -## Return Value +## Return value Each of these functions returns the number of fields that are successfully converted and assigned; the return value does not include fields that were read but not assigned. A return value of 0 indicates that no fields were assigned. The return value is **EOF** for an error or if the end of the string is reached before the first conversion. -If *buffer* or *format* is a **NULL** pointer, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, these functions return -1 and set **errno** to **EINVAL**. +If *`buffer`* or *`format`* is a **NULL** pointer, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, these functions return -1 and set **errno** to **EINVAL**. -For information about these and other error codes, see [errno, _doserrno, _sys_errlist, and _sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +For information about these and other error codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks -The **vsscanf** function reads data from *buffer* into the locations that are given by each argument in the *arglist* argument list. Every argument in the list must be a pointer to a variable that has a type that corresponds to a type specifier in *format*. The *format* argument controls the interpretation of the input fields and has the same form and function as the *format* argument for the **scanf** function. If copying takes place between strings that overlap, the behavior is undefined. +The **vsscanf** function reads data from *`buffer`* into the locations that are given by each argument in the *`arglist`* argument list. Every argument in the list must be a pointer to a variable that has a type that corresponds to a type specifier in *`format`*. The *`format`* argument controls the interpretation of the input fields and has the same form and function as the *`format`* argument for the **scanf** function. If copying takes place between strings that overlap, the behavior is undefined. > [!IMPORTANT] > When you use **vsscanf** to read a string, always specify a width for the **%s** format (for example, **"%32s"** instead of **"%s"**); otherwise, incorrectly formatted input can cause a buffer overrun. **vswscanf** is a wide-character version of **vsscanf**; the arguments to **vswscanf** are wide-character strings. **vsscanf** does not handle multibyte hexadecimal characters. **vswscanf** does not handle Unicode full-width hexadecimal or "compatibility zone" characters. Otherwise, **vswscanf** and **vsscanf** behave identically. -### Generic-Text Routine Mappings +### Generic-text routine mappings |TCHAR.H routine|_UNICODE & _MBCS not defined|_MBCS defined|_UNICODE defined| |---------------------|------------------------------------|--------------------|-----------------------| @@ -70,7 +70,7 @@ The **vsscanf** function reads data from *buffer* into the locations that are gi |**vsscanf**|\| |**vswscanf**|\ or \| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -125,8 +125,8 @@ Real: = 15.000000 ## See also -[Stream I/O](../../c-runtime-library/stream-i-o.md)
-[scanf, _scanf_l, wscanf, _wscanf_l](scanf-scanf-l-wscanf-wscanf-l.md)
-[sscanf, _sscanf_l, swscanf, _swscanf_l](sscanf-sscanf-l-swscanf-swscanf-l.md)
-[sprintf, _sprintf_l, swprintf, _swprintf_l, \__swprintf_l](sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md)
-[vsscanf_s, vswscanf_s](vsscanf-s-vswscanf-s.md)
+[Stream I/O](../stream-i-o.md)\ +[`scanf`, `_scanf_l`, `wscanf`, `_wscanf_l`](scanf-scanf-l-wscanf-wscanf-l.md)\ +[`sscanf`, `_sscanf_l`, `swscanf`, `_swscanf_l`](sscanf-sscanf-l-swscanf-swscanf-l.md)\ +[`sprintf`, `_sprintf_l`, `swprintf`, `_swprintf_l`, `__swprintf_l`](sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md)\ +[`vsscanf_s`, `vswscanf_s`](vsscanf-s-vswscanf-s.md) diff --git a/docs/c-runtime-library/reference/wcrtomb-s.md b/docs/c-runtime-library/reference/wcrtomb-s.md index 49c9325d92c..8b5637202bd 100644 --- a/docs/c-runtime-library/reference/wcrtomb-s.md +++ b/docs/c-runtime-library/reference/wcrtomb-s.md @@ -12,7 +12,7 @@ ms.assetid: 9a8a1bd0-1d60-463d-a3a2-d83525eaf656 --- # wcrtomb_s -Convert a wide character into its multibyte character representation. A version of [wcrtomb](wcrtomb.md) with security enhancements as described in [Security Features in the CRT](../../c-runtime-library/security-features-in-the-crt.md). +Convert a wide character into its multibyte character representation. A version of [`wcrtomb`](wcrtomb.md) with security enhancements as described in [Security features in the CRT](../security-features-in-the-crt.md). ## Syntax @@ -35,40 +35,40 @@ errno_t wcrtomb_s( ### Parameters -*pReturnValue*
+*`pReturnValue`*\ Returns the number of bytes written or -1 if an error occurred. -*mbchar*
+*`mbchar`*\ The resulting multibyte converted character. -*sizeOfmbchar*
-The size of the *mbchar* variable in bytes. +*`sizeOfmbchar`*\ +The size of the *`mbchar`* variable in bytes. -*wchar*
+*`wchar`*\ A wide character to convert. -*mbstate*
+*`mbstate`*\ A pointer to an **mbstate_t** object. -## Return Value +## Return value Returns zero or an **errno** value if an error occurs. ## Remarks -The **wcrtomb_s** function converts a wide character, beginning in the specified conversion state contained in *mbstate*, from the value contained in *wchar*, into the address represented by *mbchar*. The *pReturnValue* value will be the number of bytes converted, but no more than **MB_CUR_MAX** bytes, or an -1 if an error occurred. +The **wcrtomb_s** function converts a wide character, beginning in the specified conversion state contained in *`mbstate`*, from the value contained in *`wchar`*, into the address represented by *`mbchar`*. The *`pReturnValue`* value will be the number of bytes converted, but no more than **MB_CUR_MAX** bytes, or an -1 if an error occurred. -If *mbstate* is null, the internal **mbstate_t** conversion state is used. If the character contained in *wchar* does not have a corresponding multibyte character, the value of *pReturnValue* will be -1 and the function will return the **errno** value of **EILSEQ**. +If *`mbstate`* is null, the internal **mbstate_t** conversion state is used. If the character contained in *`wchar`* does not have a corresponding multibyte character, the value of *`pReturnValue`* will be -1 and the function will return the **errno** value of **EILSEQ**. -The **wcrtomb_s** function differs from [wctomb_s, _wctomb_s_l](wctomb-s-wctomb-s-l.md) by its restartability. The conversion state is stored in *mbstate* for subsequent calls to the same or other restartable functions. Results are undefined when mixing the use of restartable and nonrestartable functions. For example, an application would use **wcsrlen** rather than **wcslen**, if a subsequent call to **wcsrtombs_s** were used instead of **wcstombs_s**. +The **wcrtomb_s** function differs from [`wctomb_s`, `_wctomb_s_l`](wctomb-s-wctomb-s-l.md) by its restartability. The conversion state is stored in *`mbstate`* for subsequent calls to the same or other restartable functions. Results are undefined when mixing the use of restartable and nonrestartable functions. For example, an application would use **wcsrlen** rather than **wcslen**, if a subsequent call to **wcsrtombs_s** were used instead of **wcstombs_s**. -In C++, using this function is simplified by template overloads; the overloads can infer buffer length automatically (eliminating the need to specify a size argument) and they can automatically replace older, non-secure functions with their newer, secure counterparts. For more information, see [Secure Template Overloads](../../c-runtime-library/secure-template-overloads.md). +In C++, using this function is simplified by template overloads; the overloads can infer buffer length automatically (eliminating the need to specify a size argument) and they can automatically replace older, non-secure functions with their newer, secure counterparts. For more information, see [Secure template overloads](../secure-template-overloads.md). 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). ## Exceptions -The **wcrtomb_s** function is multithread safe as long as no function in the current thread calls **setlocale** while this function is executing and the *mbstate* is null. +The **wcrtomb_s** function is multithread safe as long as no function in the current thread calls **setlocale** while this function is executing and the *`mbstate`* is null. ## Example @@ -122,7 +122,7 @@ The corresponding wide character "Q" was converted to a the "Q" multibyte charac ## See also -[Data Conversion](../../c-runtime-library/data-conversion.md)
-[Locale](../../c-runtime-library/locale.md)
-[Interpretation of Multibyte-Character Sequences](../../c-runtime-library/interpretation-of-multibyte-character-sequences.md)
-[mbsinit](mbsinit.md)
+[Data conversion](../data-conversion.md)\ +[Locale](../locale.md)\ +[Interpretation of multibyte-character sequences](../interpretation-of-multibyte-character-sequences.md)\ +[`mbsinit`](mbsinit.md) diff --git a/docs/c-runtime-library/reference/wcrtomb.md b/docs/c-runtime-library/reference/wcrtomb.md index 0afb2ac8b73..a32db5c38f6 100644 --- a/docs/c-runtime-library/reference/wcrtomb.md +++ b/docs/c-runtime-library/reference/wcrtomb.md @@ -12,7 +12,7 @@ ms.assetid: 717f1b21-2705-4b7f-b6d0-82adc5224340 --- # wcrtomb -Convert a wide character into its multibyte character representation. A more secure version of this function is available; see [wcrtomb_s](wcrtomb-s.md). +Convert a wide character into its multibyte character representation. A more secure version of this function is available; see [`wcrtomb_s`](wcrtomb-s.md). ## Syntax @@ -32,34 +32,34 @@ size_t wcrtomb( ### Parameters -*mbchar*
+*`mbchar`*\ The resulting multibyte converted character. -*wchar*
+*`wchar`*\ A wide character to convert. -*mbstate*
+*`mbstate`*\ A pointer to an **mbstate_t** object. -## Return Value +## Return value Returns the number of bytes required to represent the converted multibyte character, otherwise a -1 if an error occurs. ## Remarks -The **wcrtomb** function converts a wide character, beginning in the specified conversion state contained in *mbstate*, from the value contained in *wchar*, into the address represented by *mbchar*. The return value is the number of bytes required to represent the corresponding multibyte character, but it will not return more than **MB_CUR_MAX** bytes. +The **wcrtomb** function converts a wide character, beginning in the specified conversion state contained in *`mbstate`*, from the value contained in *`wchar`*, into the address represented by *`mbchar`*. The return value is the number of bytes required to represent the corresponding multibyte character, but it will not return more than **MB_CUR_MAX** bytes. -If *mbstate* is null, the internal **mbstate_t** object containing the conversion state of *mbchar* is used. If the character sequence *wchar* does not have a corresponding multibyte character representation, a -1 is returned and the **errno** is set to **EILSEQ**. +If *`mbstate`* is null, the internal **mbstate_t** object containing the conversion state of *`mbchar`* is used. If the character sequence *`wchar`* does not have a corresponding multibyte character representation, a -1 is returned and the **errno** is set to **EILSEQ**. -The **wcrtomb** function differs from [wctomb, _wctomb_l](wctomb-wctomb-l.md) by its restartability. The conversion state is stored in *mbstate* for subsequent calls to the same or other restartable functions. Results are undefined when mixing the use of restartable and nonrestartable functions. For example, an application would use **wcsrlen** rather than **wcsnlen**, if a subsequent call to **wcsrtombs** were used instead of **wcstombs**. +The **wcrtomb** function differs from [`wctomb`, `_wctomb_l`](wctomb-wctomb-l.md) by its restartability. The conversion state is stored in *`mbstate`* for subsequent calls to the same or other restartable functions. Results are undefined when mixing the use of restartable and nonrestartable functions. For example, an application would use **wcsrlen** rather than **wcsnlen**, if a subsequent call to **wcsrtombs** were used instead of **wcstombs**. -In C++, this function has a template overload that invokes the newer, secure counterparts of this function. For more information, see [Secure Template Overloads](../../c-runtime-library/secure-template-overloads.md). +In C++, this function has a template overload that invokes the newer, secure counterparts of this function. 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 behavior, see [Global state in the CRT](../global-state.md). ## Exceptions -The **wcrtomb** function is multithread safe as long as no function in the current thread calls **setlocale** while this function is executing and while the *mbstate* is null. +The **wcrtomb** function is multithread safe as long as no function in the current thread calls **setlocale** while this function is executing and while the *`mbstate`* is null. ## Example @@ -112,7 +112,7 @@ The corresponding wide character "Q" was converted to the "Q" multibyte characte ## See also -[Data Conversion](../../c-runtime-library/data-conversion.md)
-[Locale](../../c-runtime-library/locale.md)
-[Interpretation of Multibyte-Character Sequences](../../c-runtime-library/interpretation-of-multibyte-character-sequences.md)
-[mbsinit](mbsinit.md)
+[Data conversion](../data-conversion.md)\ +[Locale](../locale.md)\ +[Interpretation of multibyte-character sequences](../interpretation-of-multibyte-character-sequences.md)\ +[`mbsinit`](mbsinit.md) diff --git a/docs/c-runtime-library/reference/wcsicoll.md b/docs/c-runtime-library/reference/wcsicoll.md index f235899e390..a6478bfc7c3 100644 --- a/docs/c-runtime-library/reference/wcsicoll.md +++ b/docs/c-runtime-library/reference/wcsicoll.md @@ -12,6 +12,6 @@ ms.assetid: d049022d-cf60-467f-842b-9a508d9aeaff --- # wcsicoll -The Microsoft-specific function name `wcsicoll` is a deprecated alias for the [_wcsicoll](stricoll-wcsicoll-mbsicoll-stricoll-l-wcsicoll-l-mbsicoll-l.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. +The Microsoft-specific function name `wcsicoll` is a deprecated alias for the [`_wcsicoll`](stricoll-wcsicoll-mbsicoll-stricoll-l-wcsicoll-l-mbsicoll-l.md) function. By default, it generates [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The name is deprecated because it doesn't follow the Standard C rules for implementation-specific names. However, the function is still supported. -We recommend you use [_wcsicoll](stricoll-wcsicoll-mbsicoll-stricoll-l-wcsicoll-l-mbsicoll-l.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). +We recommend you use [`_wcsicoll`](stricoll-wcsicoll-mbsicoll-stricoll-l-wcsicoll-l-mbsicoll-l.md) instead. Or, you can continue to use this function name, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). diff --git a/docs/c-runtime-library/reference/wcsrtombs-s.md b/docs/c-runtime-library/reference/wcsrtombs-s.md index f0537134417..a70723a601c 100644 --- a/docs/c-runtime-library/reference/wcsrtombs-s.md +++ b/docs/c-runtime-library/reference/wcsrtombs-s.md @@ -12,7 +12,7 @@ ms.assetid: 9dccb766-113c-44bb-9b04-07a634dddec8 --- # wcsrtombs_s -Convert a wide character string to its multibyte character string representation. A version of [wcsrtombs](wcsrtombs.md) with security enhancements as described in [Security Features in the CRT](../../c-runtime-library/security-features-in-the-crt.md). +Convert a wide character string to its multibyte character string representation. A version of [`wcsrtombs`](wcsrtombs.md) with security enhancements as described in [Security features in the CRT](../security-features-in-the-crt.md). ## Syntax @@ -37,68 +37,68 @@ errno_t wcsrtombs_s( ### Parameters -*pReturnValue*
+*`pReturnValue`*\ The size in bytes of the converted string, including the null terminator. -*mbstr*
+*`mbstr`*\ The address of a buffer for the resulting converted multibyte character string. -*sizeInBytes*
-The size in bytes of the *mbstr* buffer. +*`sizeInBytes`*\ +The size in bytes of the *`mbstr`* buffer. -*wcstr*
+*`wcstr`*\ Points to the wide character string to be converted. -*count*
-The maximum number of bytes to be stored in the *mbstr* buffer, or [_TRUNCATE](../../c-runtime-library/truncate.md). +*`count`*\ +The maximum number of bytes to be stored in the *`mbstr`* buffer, or [`_TRUNCATE`](../truncate.md). -*mbstate*
+*`mbstate`*\ A pointer to an **mbstate_t** conversion state object. -## Return Value +## Return value Zero if successful, an error code on failure. |Error condition|Return value and **errno**| |---------------------|------------------------------| -|*mbstr* is **NULL** and *sizeInBytes* > 0|**EINVAL**| -|*wcstr* is **NULL**|**EINVAL**| -|The destination buffer is too small to contain the converted string (unless *count* is **_TRUNCATE**; see Remarks below)|**ERANGE**| +|*`mbstr`* is **NULL** and *`sizeInBytes`* > 0|**EINVAL**| +|*`wcstr`* is **NULL**|**EINVAL**| +|The destination buffer is too small to contain the converted string (unless *`count`* is **_TRUNCATE**; see Remarks below)|**ERANGE**| -If any of these conditions occurs, the invalid parameter exception is invoked as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md) . If execution is allowed to continue, the function returns an error code and sets **errno** as indicated in the table. +If any of these conditions occurs, the invalid parameter exception is invoked as described in [Parameter validation](../parameter-validation.md) . If execution is allowed to continue, the function returns an error code and sets **errno** as indicated in the table. ## Remarks -The **wcsrtombs_s** function converts a string of wide characters pointed to by *wcstr* into multibyte characters stored in the buffer pointed to by *mbstr*, using the conversion state contained in *mbstate*. The conversion will continue for each character until one of these conditions is met: +The **wcsrtombs_s** function converts a string of wide characters pointed to by *`wcstr`* into multibyte characters stored in the buffer pointed to by *`mbstr`*, using the conversion state contained in *`mbstate`*. The conversion will continue for each character until one of these conditions is met: - A null wide character is encountered - A wide character that cannot be converted is encountered -- The number of bytes stored in the *mbstr* buffer equals *count*. +- The number of bytes stored in the *`mbstr`* buffer equals *`count`*. The destination string is always null-terminated (even in the case of an error). -If *count* is the special value [_TRUNCATE](../../c-runtime-library/truncate.md), then **wcsrtombs_s** converts as much of the string as will fit into the destination buffer, while still leaving room for a null terminator. +If *`count`* is the special value [`_TRUNCATE`](../truncate.md), then **wcsrtombs_s** converts as much of the string as will fit into the destination buffer, while still leaving room for a null terminator. -If **wcsrtombs_s** successfully converts the source string, it puts the size in bytes of the converted string, including the null terminator, into `*pReturnValue` (provided *pReturnValue* is not **NULL**). This occurs even if the *mbstr* argument is **NULL** and provides a way to determine the required buffer size. Note that if *mbstr* is **NULL**, *count* is ignored. +If **wcsrtombs_s** successfully converts the source string, it puts the size in bytes of the converted string, including the null terminator, into `*pReturnValue` (provided *`pReturnValue`* is not **NULL**). This occurs even if the *`mbstr`* argument is **NULL** and provides a way to determine the required buffer size. Note that if *`mbstr`* is **NULL**, *`count`* is ignored. -If **wcsrtombs_s** encounters a wide character it cannot convert to a multibyte character, it puts -1 in *\*pReturnValue*, sets the destination buffer to an empty string, sets **errno** to **EILSEQ**, and returns **EILSEQ**. +If **wcsrtombs_s** encounters a wide character it cannot convert to a multibyte character, it puts -1 in *\*`pReturnValue`*, sets the destination buffer to an empty string, sets **errno** to **EILSEQ**, and returns **EILSEQ**. -If the sequences pointed to by *wcstr* and *mbstr* overlap, the behavior of **wcsrtombs_s** is undefined. **wcsrtombs_s** is affected by the LC_TYPE category of the current locale. +If the sequences pointed to by *`wcstr`* and *`mbstr`* overlap, the behavior of **wcsrtombs_s** is undefined. **wcsrtombs_s** is affected by the LC_TYPE category of the current locale. > [!IMPORTANT] -> Ensure that *wcstr* and *mbstr* do not overlap, and that *count* correctly reflects the number of wide characters to convert. +> Ensure that *`wcstr`* and *`mbstr`* do not overlap, and that *`count`* correctly reflects the number of wide characters to convert. -The **wcsrtombs_s** function differs from [wcstombs_s, _wcstombs_s_l](wcstombs-s-wcstombs-s-l.md) by its restartability. The conversion state is stored in *mbstate* for subsequent calls to the same or other restartable functions. Results are undefined when mixing the use of restartable and nonrestartable functions. For example, an application would use **wcsrlen** rather than **wcslen**, if a subsequent call to **wcsrtombs_s** were used instead of **wcstombs_s**. +The **wcsrtombs_s** function differs from [`wcstombs_s`, `_wcstombs_s_l`](wcstombs-s-wcstombs-s-l.md) by its restartability. The conversion state is stored in *`mbstate`* for subsequent calls to the same or other restartable functions. Results are undefined when mixing the use of restartable and nonrestartable functions. For example, an application would use **wcsrlen** rather than **wcslen**, if a subsequent call to **wcsrtombs_s** were used instead of **wcstombs_s**. -In C++, using these functions is simplified by template overloads; the overloads can infer buffer length automatically (eliminating the need to specify a size argument) and they can automatically replace older, non-secure functions with their newer, secure counterparts. For more information, see [Secure Template Overloads](../../c-runtime-library/secure-template-overloads.md). +In C++, using these functions is simplified by template overloads; the overloads can infer buffer length automatically (eliminating the need to specify a size argument) and they can automatically replace older, non-secure functions with their newer, secure counterparts. For more information, see [Secure template overloads](../secure-template-overloads.md). 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). ## Exceptions -The **wcsrtombs_s** function is multithread safe as long as no function in the current thread calls **setlocale** while this function is executing and the *mbstate* is null. +The **wcsrtombs_s** function is multithread safe as long as no function in the current thread calls **setlocale** while this function is executing and the *`mbstate`* is null. ## Example @@ -155,11 +155,11 @@ The string was successfully converted. ## See also -[Data Conversion](../../c-runtime-library/data-conversion.md)
-[Locale](../../c-runtime-library/locale.md)
-[Interpretation of Multibyte-Character Sequences](../../c-runtime-library/interpretation-of-multibyte-character-sequences.md)
-[wcrtomb](wcrtomb.md)
-[wcrtomb_s](wcrtomb-s.md)
-[wctomb, _wctomb_l](wctomb-wctomb-l.md)
-[wcstombs, _wcstombs_l](wcstombs-wcstombs-l.md)
-[mbsinit](mbsinit.md)
+[Data conversion](../data-conversion.md)\ +[Locale](../locale.md)\ +[Interpretation of multibyte-character sequences](../interpretation-of-multibyte-character-sequences.md)\ +[`wcrtomb`](wcrtomb.md)\ +[`wcrtomb_s`](wcrtomb-s.md)\ +[`wctomb`, `_wctomb_l`](wctomb-wctomb-l.md)\ +[`wcstombs`, `_wcstombs_l`](wcstombs-wcstombs-l.md)\ +[`mbsinit`](mbsinit.md) diff --git a/docs/c-runtime-library/reference/wcsrtombs.md b/docs/c-runtime-library/reference/wcsrtombs.md index e6ff4d1b9bd..8b55942da5f 100644 --- a/docs/c-runtime-library/reference/wcsrtombs.md +++ b/docs/c-runtime-library/reference/wcsrtombs.md @@ -12,7 +12,7 @@ ms.assetid: a8d21fec-0d36-4085-9d81-9b1c61c7259d --- # wcsrtombs -Convert a wide character string to its multibyte character string representation. A more secure version of this function is available; see [wcsrtombs_s](wcsrtombs-s.md). +Convert a wide character string to its multibyte character string representation. A more secure version of this function is available; see [`wcsrtombs_s`](wcsrtombs-s.md). ## Syntax @@ -34,39 +34,39 @@ size_t wcsrtombs( ### Parameters -*mbstr*
+*`mbstr`*\ The resulting converted multibyte character string's address location. -*wcstr*
+*`wcstr`*\ Indirectly points to the location of the wide character string to be converted. -*count*
+*`count`*\ The number of character to be converted. -*mbstate*
+*`mbstate`*\ A pointer to an **mbstate_t** conversion state object. -## Return Value +## Return value Returns the number of bytes successfully converted, not including the null terminating null byte (if any), otherwise a -1 if an error occurred. ## Remarks -The **wcsrtombs** function converts a string of wide characters, beginning in the specified conversion state contained in *mbstate*, from the values indirect pointed to in *wcstr*, into the address of *mbstr*. The conversion will continue for each character until: after a null terminating wide character is encountered, when a non corresponding character is encountered or when the next character would exceed the limit contained in *count*. If **wcsrtombs** encounters the wide-character null character (L'\0') either before or when *count* occurs, it converts it to an 8-bit 0 and stops. +The **wcsrtombs** function converts a string of wide characters, beginning in the specified conversion state contained in *`mbstate`*, from the values indirect pointed to in *`wcstr`*, into the address of *`mbstr`*. The conversion will continue for each character until: after a null terminating wide character is encountered, when a non corresponding character is encountered or when the next character would exceed the limit contained in *`count`*. If **wcsrtombs** encounters the wide-character null character (L'\0') either before or when *`count`* occurs, it converts it to an 8-bit 0 and stops. -Thus, the multibyte character string at *mbstr* is null-terminated only if **wcsrtombs** encounters a wide character null character during conversion. If the sequences pointed to by *wcstr* and *mbstr* overlap, the behavior of **wcsrtombs** is undefined. **wcsrtombs** is affected by the LC_TYPE category of the current locale. +Thus, the multibyte character string at *`mbstr`* is null-terminated only if **wcsrtombs** encounters a wide character null character during conversion. If the sequences pointed to by *`wcstr`* and *`mbstr`* overlap, the behavior of **wcsrtombs** is undefined. **wcsrtombs** is affected by the LC_TYPE category of the current locale. -The **wcsrtombs** function differs from [wcstombs, _wcstombs_l](wcstombs-wcstombs-l.md) by its restartability. The conversion state is stored in *mbstate* for subsequent calls to the same or other restartable functions. Results are undefined when mixing the use of restartable and nonrestartable functions. For example, an application would use **wcsrlen** rather than **wcsnlen**, if a subsequent call to **wcsrtombs** were used instead of **wcstombs**. +The **wcsrtombs** function differs from [`wcstombs`, `_wcstombs_l`](wcstombs-wcstombs-l.md) by its restartability. The conversion state is stored in *`mbstate`* for subsequent calls to the same or other restartable functions. Results are undefined when mixing the use of restartable and nonrestartable functions. For example, an application would use **wcsrlen** rather than **wcsnlen**, if a subsequent call to **wcsrtombs** were used instead of **wcstombs**. -If the *mbstr* argument is **NULL**, **wcsrtombs** returns the required size in bytes of the destination string. If *mbstate* is null, the internal **mbstate_t** conversion state is used. If the character sequence *wchar* does not have a corresponding multibyte character representation, a -1 is returned and the **errno** is set to **EILSEQ**. +If the *`mbstr`* argument is **NULL**, **wcsrtombs** returns the required size in bytes of the destination string. If *`mbstate`* is null, the internal **mbstate_t** conversion state is used. If the character sequence *`wchar`* does not have a corresponding multibyte character representation, a -1 is returned and the **errno** is set to **EILSEQ**. -In C++, this function has a template overload that invokes the newer, secure counterpart of this function. For more information, see [Secure Template Overloads](../../c-runtime-library/secure-template-overloads.md). +In C++, this function has a template overload that invokes the newer, secure counterpart of this function. 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 behavior, see [Global state in the CRT](../global-state.md). ## Exceptions -The **wcsrtombs** function is multithread safe as long as no function in the current thread calls **setlocale** while this function is executing and the *mbstate* is not null. +The **wcsrtombs** function is multithread safe as long as no function in the current thread calls **setlocale** while this function is executing and the *`mbstate`* is not null. ## Example @@ -122,11 +122,11 @@ The string was successfuly converted. ## See also -[Data Conversion](../../c-runtime-library/data-conversion.md)
-[Locale](../../c-runtime-library/locale.md)
-[Interpretation of Multibyte-Character Sequences](../../c-runtime-library/interpretation-of-multibyte-character-sequences.md)
-[wcrtomb](wcrtomb.md)
-[wcrtomb_s](wcrtomb-s.md)
-[wctomb, _wctomb_l](wctomb-wctomb-l.md)
-[wcstombs, _wcstombs_l](wcstombs-wcstombs-l.md)
-[mbsinit](mbsinit.md)
+[Data conversion](../data-conversion.md)\ +[Locale](../locale.md)\ +[Interpretation of multibyte-character sequences](../interpretation-of-multibyte-character-sequences.md)\ +[`wcrtomb`](wcrtomb.md)\ +[`wcrtomb_s`](wcrtomb-s.md)\ +[`wctomb`, `_wctomb_l`](wctomb-wctomb-l.md)\ +[`wcstombs`, `_wcstombs_l`](wcstombs-wcstombs-l.md)\ +[`mbsinit`](mbsinit.md) diff --git a/docs/c-runtime-library/reference/wcstombs-s-wcstombs-s-l.md b/docs/c-runtime-library/reference/wcstombs-s-wcstombs-s-l.md index e169f004b0f..c0dcd6d3747 100644 --- a/docs/c-runtime-library/reference/wcstombs-s-wcstombs-s-l.md +++ b/docs/c-runtime-library/reference/wcstombs-s-wcstombs-s-l.md @@ -11,7 +11,7 @@ helpviewer_keywords: ["wcstombs_s function", "string conversion, wide characters --- # `wcstombs_s`, `_wcstombs_s_l` -Converts a sequence of wide characters to a corresponding sequence of multibyte characters. A version of [`wcstombs`, `_wcstombs_l`](wcstombs-wcstombs-l.md) with security enhancements as described in [Security Features in the CRT](../../c-runtime-library/security-features-in-the-crt.md). +Converts a sequence of wide characters to a corresponding sequence of multibyte characters. A version of [`wcstombs`, `_wcstombs_l`](wcstombs-wcstombs-l.md) with security enhancements as described in [Security features in the CRT](../security-features-in-the-crt.md). ## Syntax @@ -53,25 +53,25 @@ errno_t _wcstombs_s_l( ### Parameters -*`pReturnValue`*
+*`pReturnValue`*\ The size in bytes of the converted string, including the null terminator. -*`mbstr`*
+*`mbstr`*\ The address of a buffer for the resulting converted multibyte character string. -*`sizeInBytes`*
+*`sizeInBytes`*\ The size in bytes of the *`mbstr`* buffer. -*`wcstr`*
+*`wcstr`*\ Points to the wide character string to be converted. -*`count`*
-The maximum number of bytes to store in the *`mbstr`* buffer, not including the terminating null character, or [`_TRUNCATE`](../../c-runtime-library/truncate.md). +*`count`*\ +The maximum number of bytes to store in the *`mbstr`* buffer, not including the terminating null character, or [`_TRUNCATE`](../truncate.md). -*`locale`*
+*`locale`*\ The locale to use. -## Return Value +## Return value Zero if successful, an error code on failure. @@ -81,7 +81,7 @@ Zero if successful, an error code on failure. |*`wcstr`* is **`NULL`**|**`EINVAL`**| |The destination buffer is too small to contain the converted string (unless *`count`* is **`_TRUNCATE`**; see Remarks below)|**`ERANGE`**| -If any of these conditions occurs, the invalid parameter exception is invoked as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, the function returns an error code and sets **`errno`** as indicated in the table. +If any of these conditions occurs, the invalid parameter exception is invoked as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, the function returns an error code and sets **`errno`** as indicated in the table. ## Remarks @@ -95,7 +95,7 @@ The **`wcstombs_s`** function converts a string of wide characters pointed to by The destination string is always null-terminated (even in the case of an error). -If *`count`* is the special value [`_TRUNCATE`](../../c-runtime-library/truncate.md), then **`wcstombs_s`** converts as much of the string as will fit into the destination buffer, while still leaving room for a null terminator. If the string is truncated, the return value is **`STRUNCATE`**, and the conversion is considered successful. +If *`count`* is the special value [`_TRUNCATE`](../truncate.md), then **`wcstombs_s`** converts as much of the string as will fit into the destination buffer, while still leaving room for a null terminator. If the string is truncated, the return value is **`STRUNCATE`**, and the conversion is considered successful. If **`wcstombs_s`** successfully converts the source string, it puts the size in bytes of the converted string, including the null terminator, into *`*pReturnValue`* (provided *`pReturnValue`* is not **`NULL`**). This occurs even if the *`mbstr`* argument is **`NULL`** and provides a way to determine the required buffer size. Note that if *`mbstr`* is **`NULL`**, *`count`* is ignored. @@ -106,9 +106,9 @@ If the sequences pointed to by *`wcstr`* and *`mbstr`* overlap, the behavior of > [!IMPORTANT] > Ensure that *`wcstr`* and *`mbstr`* do not overlap, and that *`count`* correctly reflects the number of wide characters to convert. -**`wcstombs_s`** uses the current locale for any locale-dependent behavior; **`_wcstombs_s_l`** is identical to **`wcstombs`** except that it uses the locale passed in instead. For more information, see [Locale](../../c-runtime-library/locale.md). +**`wcstombs_s`** uses the current locale for any locale-dependent behavior; **`_wcstombs_s_l`** is identical to **`wcstombs`** except that it uses the locale passed in instead. For more information, see [Locale](../locale.md). -In C++, using these functions is simplified by template overloads; the overloads can infer buffer length automatically (eliminating the need to specify a size argument) and they can automatically replace older, non-secure functions with their newer, secure counterparts. For more information, see [Secure Template Overloads](../../c-runtime-library/secure-template-overloads.md). +In C++, using these functions is simplified by template overloads; the overloads can infer buffer length automatically (eliminating the need to specify a size argument) and they can automatically replace older, non-secure functions with their newer, secure counterparts. For more information, see [Secure template overloads](../secure-template-overloads.md). 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). @@ -118,7 +118,7 @@ By default, this function's global state is scoped to the application. To change |-------------|---------------------| |**`wcstombs_s`**|``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -168,10 +168,10 @@ Convert wide-character string: ## See also -[Data Conversion](../../c-runtime-library/data-conversion.md)
-[Locale](../../c-runtime-library/locale.md)
-[`_mbclen`, `mblen`, `_mblen_l`](mbclen-mblen-mblen-l.md)
-[`mbstowcs`, `_mbstowcs_l`](mbstowcs-mbstowcs-l.md)
-[`mbtowc`, `_mbtowc_l`](mbtowc-mbtowc-l.md)
-[`wctomb_s`, `_wctomb_s_l`](wctomb-s-wctomb-s-l.md)
-[`WideCharToMultiByte`](/windows/win32/api/stringapiset/nf-stringapiset-widechartomultibyte)
+[Data conversion](../data-conversion.md)\ +[Locale](../locale.md)\ +[`_mbclen`, `mblen`, `_mblen_l`](mbclen-mblen-mblen-l.md)\ +[`mbstowcs`, `_mbstowcs_l`](mbstowcs-mbstowcs-l.md)\ +[`mbtowc`, `_mbtowc_l`](mbtowc-mbtowc-l.md)\ +[`wctomb_s`, `_wctomb_s_l`](wctomb-s-wctomb-s-l.md)\ +[`WideCharToMultiByte`](/windows/win32/api/stringapiset/nf-stringapiset-widechartomultibyte) diff --git a/docs/c-runtime-library/reference/wcstombs-wcstombs-l.md b/docs/c-runtime-library/reference/wcstombs-wcstombs-l.md index 78a8d8e5abb..ae3b2663659 100644 --- a/docs/c-runtime-library/reference/wcstombs-wcstombs-l.md +++ b/docs/c-runtime-library/reference/wcstombs-wcstombs-l.md @@ -56,7 +56,7 @@ The maximum number of bytes that can be stored in the multibyte output string. *`locale`*\ The locale to use. -## Return Value +## Return value If **`wcstombs`** successfully converts the multibyte string, it returns the number of bytes written into the multibyte output string, excluding the terminating `NULL` (if any). If the *`mbstr`* argument is **`NULL`**, **`wcstombs`** returns the required size in bytes of the destination string. If **`wcstombs`** encounters a wide character it can't convert to a multibyte character, it returns -1 cast to type **`size_t`** and sets **`errno`** to **`EILSEQ`**. @@ -68,11 +68,11 @@ If **`wcstombs`** encounters the wide-character `NULL` character (L'\0') either If the *`mbstr`* argument is **`NULL`**, **`wcstombs`** returns the required size in bytes of the destination string. -**`wcstombs`** validates its parameters. If *`wcstr`* is **`NULL`**, or if *`count`* is greater than **`INT_MAX`**, this function invokes the invalid parameter handler, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, the function sets **`errno`** to **`EINVAL`** and returns -1. +**`wcstombs`** validates its parameters. If *`wcstr`* is **`NULL`**, or if *`count`* is greater than **`INT_MAX`**, this function invokes the invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, the function sets **`errno`** to **`EINVAL`** and returns -1. -**`wcstombs`** uses the current locale for any locale-dependent behavior; **`_wcstombs_l`** is identical except that it uses the locale passed in instead. For more information, see [Locale](../../c-runtime-library/locale.md). +**`wcstombs`** uses the current locale for any locale-dependent behavior; **`_wcstombs_l`** is identical except that it uses the locale passed in instead. For more information, see [Locale](../locale.md). -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 behavior, see [Global state in the CRT](../global-state.md). @@ -83,7 +83,7 @@ By default, this function's global state is scoped to the application. To change |**`wcstombs`**|``| |**`_wcstombs_l`**|``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -129,8 +129,8 @@ Convert wide-character string: ## See also -[Data Conversion](../../c-runtime-library/data-conversion.md)\ -[Locale](../../c-runtime-library/locale.md)\ +[Data conversion](../data-conversion.md)\ +[Locale](../locale.md)\ [`_mbclen`, `mblen`, `_mblen_l`](mbclen-mblen-mblen-l.md)\ [`mbstowcs`, `_mbstowcs_l`](mbstowcs-mbstowcs-l.md)\ [`mbtowc`, `_mbtowc_l`](mbtowc-mbtowc-l.md)\ diff --git a/docs/c-runtime-library/reference/wctob.md b/docs/c-runtime-library/reference/wctob.md index e51107085b1..1fda33c14c9 100644 --- a/docs/c-runtime-library/reference/wctob.md +++ b/docs/c-runtime-library/reference/wctob.md @@ -24,16 +24,16 @@ int wctob( ### Parameters -*wchar*
+*`wchar`*\ Value to translate. -## Return Value +## Return value If **wctob** successfully converts a wide character, it returns its multibyte character representation, only if the multibyte character is exactly one byte long. If **wctob** encounters a wide character it cannot convert to a multibyte character or the multibyte character is not exactly one byte long, it returns a -1. ## Remarks -The **wctob** function converts a wide character contained in *wchar* to the corresponding multibyte character passed by the return **`int`** value, if the multibyte character is exactly one byte long. +The **wctob** function converts a wide character contained in *`wchar`* to the corresponding multibyte character passed by the return **`int`** value, if the multibyte character is exactly one byte long. If **wctob** was unsuccessful and no corresponding multibyte character was found, the function sets **errno** to **EILSEQ** and returns -1. @@ -45,7 +45,7 @@ By default, this function's global state is scoped to the application. To change |-------------|---------------------| |**wctob**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -83,10 +83,10 @@ Determined the corresponding multibyte character to be "A". ## See also -[Data Conversion](../../c-runtime-library/data-conversion.md)
-[Locale](../../c-runtime-library/locale.md)
-[_mbclen, mblen, _mblen_l](mbclen-mblen-mblen-l.md)
-[mbstowcs, _mbstowcs_l](mbstowcs-mbstowcs-l.md)
-[mbtowc, _mbtowc_l](mbtowc-mbtowc-l.md)
-[wctomb, _wctomb_l](wctomb-wctomb-l.md)
-[WideCharToMultiByte](/windows/win32/api/stringapiset/nf-stringapiset-widechartomultibyte)
+[Data conversion](../data-conversion.md)\ +[Locale](../locale.md)\ +[`_mbclen`, `mblen`, `_mblen_l`](mbclen-mblen-mblen-l.md)\ +[`mbstowcs`, `_mbstowcs_l`](mbstowcs-mbstowcs-l.md)\ +[`mbtowc`, `_mbtowc_l`](mbtowc-mbtowc-l.md)\ +[`wctomb`, `_wctomb_l`](wctomb-wctomb-l.md)\ +[WideCharToMultiByte](/windows/win32/api/stringapiset/nf-stringapiset-widechartomultibyte) diff --git a/docs/c-runtime-library/reference/wctomb-s-wctomb-s-l.md b/docs/c-runtime-library/reference/wctomb-s-wctomb-s-l.md index 8a45bc6b27f..3c44686eccd 100644 --- a/docs/c-runtime-library/reference/wctomb-s-wctomb-s-l.md +++ b/docs/c-runtime-library/reference/wctomb-s-wctomb-s-l.md @@ -12,7 +12,7 @@ ms.assetid: 7e94a888-deed-4dbd-b5e9-d4a0455538b8 --- # wctomb_s, _wctomb_s_l -Converts a wide character to the corresponding multibyte character. A version of [wctomb, _wctomb_l](wctomb-wctomb-l.md) with security enhancements as described in [Security Features in the CRT](../../c-runtime-library/security-features-in-the-crt.md). +Converts a wide character to the corresponding multibyte character. A version of [`wctomb`, `_wctomb_l`](wctomb-wctomb-l.md) with security enhancements as described in [Security features in the CRT](../security-features-in-the-crt.md). ## Syntax @@ -34,42 +34,42 @@ errno_t _wctomb_s_l( ### Parameters -*pRetValue*
+*`pRetValue`*\ The number of bytes, or a code indicating the result. -*mbchar*
+*`mbchar`*\ The address of a multibyte character. -*sizeInBytes*
-Size of the buffer *mbchar*. +*`sizeInBytes`*\ +Size of the buffer *`mbchar`*. -*wchar*
+*`wchar`*\ A wide character. -*locale*
+*`locale`*\ The locale to use. -## Return Value +## Return value Zero if successful, an error code on failure. Error Conditions -|*mbchar*|*sizeInBytes*|Return value|*pRetValue*| +|*`mbchar`*|*`sizeInBytes`*|Return value|*`pRetValue`*| |--------------|-------------------|------------------|-----------------| |**NULL**|>0|**EINVAL**|not modified| |any|>**INT_MAX**|**EINVAL**|not modified| |any|too small|**EINVAL**|not modified| -If any of the above error conditions occurs, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, **wctomb** returns **EINVAL** and sets **errno** to **EINVAL**. +If any of the above error conditions occurs, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, **wctomb** returns **EINVAL** and sets **errno** to **EINVAL**. ## Remarks -The **wctomb_s** function converts its *wchar* argument to the corresponding multibyte character and stores the result at *mbchar*. You can call the function from any point in any program. +The **wctomb_s** function converts its *`wchar`* argument to the corresponding multibyte character and stores the result at *`mbchar`*. You can call the function from any point in any program. -If **wctomb_s** converts the wide character to a multibyte character, it puts the number of bytes (which is never greater than **MB_CUR_MAX**) in the wide character into the integer pointed to by *pRetValue*. If *wchar* is the wide-character null character (L'\0'), **wctomb_s** fills *pRetValue* with 1. If the target pointer *mbchar* is **NULL**, **wctomb_s** puts 0 in *pRetValue*. If the conversion is not possible in the current locale, **wctomb_s** puts -1 in *pRetValue*. +If **wctomb_s** converts the wide character to a multibyte character, it puts the number of bytes (which is never greater than **MB_CUR_MAX**) in the wide character into the integer pointed to by *`pRetValue`*. If *`wchar`* is the wide-character null character (L'\0'), **wctomb_s** fills *`pRetValue`* with 1. If the target pointer *`mbchar`* is **NULL**, **wctomb_s** puts 0 in *`pRetValue`*. If the conversion is not possible in the current locale, **wctomb_s** puts -1 in *`pRetValue`*. -**wctomb_s** uses the current locale for locale-dependent information; **_wctomb_s_l** is identical except that it uses the locale passed in instead. For more information, see [Locale](../../c-runtime-library/locale.md). +**wctomb_s** uses the current locale for locale-dependent information; **_wctomb_s_l** is identical except that it uses the locale passed in instead. For more information, see [Locale](../locale.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). @@ -80,7 +80,7 @@ By default, this function's global state is scoped to the application. To change |**wctomb_s**|\| |**_wctomb_s_l**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -112,10 +112,10 @@ Convert a wide character: ## See also -[Data Conversion](../../c-runtime-library/data-conversion.md)
-[Locale](../../c-runtime-library/locale.md)
-[_mbclen, mblen, _mblen_l](mbclen-mblen-mblen-l.md)
-[mbstowcs, _mbstowcs_l](mbstowcs-mbstowcs-l.md)
-[mbtowc, _mbtowc_l](mbtowc-mbtowc-l.md)
-[wcstombs, _wcstombs_l](wcstombs-wcstombs-l.md)
-[WideCharToMultiByte](/windows/win32/api/stringapiset/nf-stringapiset-widechartomultibyte)
+[Data conversion](../data-conversion.md)\ +[Locale](../locale.md)\ +[`_mbclen`, `mblen`, `_mblen_l`](mbclen-mblen-mblen-l.md)\ +[`mbstowcs`, `_mbstowcs_l`](mbstowcs-mbstowcs-l.md)\ +[`mbtowc`, `_mbtowc_l`](mbtowc-mbtowc-l.md)\ +[`wcstombs`, `_wcstombs_l`](wcstombs-wcstombs-l.md)\ +[WideCharToMultiByte](/windows/win32/api/stringapiset/nf-stringapiset-widechartomultibyte) diff --git a/docs/c-runtime-library/reference/wctomb-wctomb-l.md b/docs/c-runtime-library/reference/wctomb-wctomb-l.md index 5a82d366e7d..4ef39505ff3 100644 --- a/docs/c-runtime-library/reference/wctomb-wctomb-l.md +++ b/docs/c-runtime-library/reference/wctomb-wctomb-l.md @@ -12,7 +12,7 @@ ms.assetid: 4a543f0e-5516-4d81-8ff2-3c5206f02ed5 --- # wctomb, _wctomb_l -Convert a wide character to the corresponding multibyte character. More secure versions of these functions are available; see [wctomb_s, _wctomb_s_l](wctomb-s-wctomb-s-l.md). +Convert a wide character to the corresponding multibyte character. More secure versions of these functions are available; see [`wctomb_s`, `_wctomb_s_l`](wctomb-s-wctomb-s-l.md). ## Syntax @@ -30,21 +30,21 @@ int _wctomb_l( ### Parameters -*mbchar*
+*`mbchar`*\ The address of a multibyte character. -*wchar*
+*`wchar`*\ A wide character. -## Return Value +## Return value -If **wctomb** converts the wide character to a multibyte character, it returns the number of bytes (which is never greater than **MB_CUR_MAX**) in the wide character. If *wchar* is the wide-character null character (L'\0'), **wctomb** returns 1. If the target pointer *mbchar* is **NULL**, **wctomb** returns 0. If the conversion is not possible in the current locale, **wctomb** returns -1 and **errno** is set to **EILSEQ**. +If **wctomb** converts the wide character to a multibyte character, it returns the number of bytes (which is never greater than **MB_CUR_MAX**) in the wide character. If *`wchar`* is the wide-character null character (L'\0'), **wctomb** returns 1. If the target pointer *`mbchar`* is **NULL**, **wctomb** returns 0. If the conversion is not possible in the current locale, **wctomb** returns -1 and **errno** is set to **EILSEQ**. ## Remarks -The **wctomb** function converts its *wchar* argument to the corresponding multibyte character and stores the result at *mbchar*. You can call the function from any point in any program. **wctomb** uses the current locale for any locale-dependent behavior; **_wctomb_l** is identical to **wctomb** except that it uses the locale passed in instead. For more information, see [Locale](../../c-runtime-library/locale.md). +The **wctomb** function converts its *`wchar`* argument to the corresponding multibyte character and stores the result at *`mbchar`*. You can call the function from any point in any program. **wctomb** uses the current locale for any locale-dependent behavior; **_wctomb_l** is identical to **wctomb** except that it uses the locale passed in instead. For more information, see [Locale](../locale.md). -**wctomb** validates its parameters. If *mbchar* is **NULL**, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, **errno** is set to **EINVAL** and the function returns -1. +**wctomb** validates its parameters. If *`mbchar`* is **NULL**, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, **errno** is set to **EINVAL** and the function returns -1. By default, this function's global state is scoped to the application. To change this behavior, see [Global state in the CRT](../global-state.md). @@ -54,7 +54,7 @@ By default, this function's global state is scoped to the application. To change |-------------|---------------------| |**wctomb**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -88,10 +88,10 @@ Convert a wide character: ## See also -[Data Conversion](../../c-runtime-library/data-conversion.md)
-[Locale](../../c-runtime-library/locale.md)
-[_mbclen, mblen, _mblen_l](mbclen-mblen-mblen-l.md)
-[mbstowcs, _mbstowcs_l](mbstowcs-mbstowcs-l.md)
-[mbtowc, _mbtowc_l](mbtowc-mbtowc-l.md)
-[wcstombs, _wcstombs_l](wcstombs-wcstombs-l.md)
-[WideCharToMultiByte](/windows/win32/api/stringapiset/nf-stringapiset-widechartomultibyte)
+[Data conversion](../data-conversion.md)\ +[Locale](../locale.md)\ +[`_mbclen`, `mblen`, `_mblen_l`](mbclen-mblen-mblen-l.md)\ +[`mbstowcs`, `_mbstowcs_l`](mbstowcs-mbstowcs-l.md)\ +[`mbtowc`, `_mbtowc_l`](mbtowc-mbtowc-l.md)\ +[`wcstombs`, `_wcstombs_l`](wcstombs-wcstombs-l.md)\ +[WideCharToMultiByte](/windows/win32/api/stringapiset/nf-stringapiset-widechartomultibyte) diff --git a/docs/c-runtime-library/reference/wctrans.md b/docs/c-runtime-library/reference/wctrans.md index 416a10b615b..438840cd0d3 100644 --- a/docs/c-runtime-library/reference/wctrans.md +++ b/docs/c-runtime-library/reference/wctrans.md @@ -24,12 +24,12 @@ wctrans_t wctrans( ### Parameters -*property*
+*`property`*\ A string that specifies one of the valid transformations. -## Return Value +## Return value -If the **LC_CTYPE** category of the current locale does not define a mapping whose name matches the property string *property*, the function returns zero. Otherwise, it returns a nonzero value suitable for use as the second argument to a subsequent call to [towctrans](towctrans.md). +If the **LC_CTYPE** category of the current locale does not define a mapping whose name matches the property string *`property`*, the function returns zero. Otherwise, it returns a nonzero value suitable for use as the second argument to a subsequent call to [`towctrans`](towctrans.md). ## Remarks @@ -48,7 +48,7 @@ The following pairs of calls have the same behavior in all locales, but it is po |-------------|---------------------| |**wctrans**|\| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -88,5 +88,5 @@ int main() ## See also -[Data Conversion](../../c-runtime-library/data-conversion.md)
-[setlocale, _wsetlocale](setlocale-wsetlocale.md)
+[Data conversion](../data-conversion.md)\ +[`setlocale`, `_wsetlocale`](setlocale-wsetlocale.md) diff --git a/docs/c-runtime-library/reference/wctype.md b/docs/c-runtime-library/reference/wctype.md index 43bdf52c273..d3fdbad607a 100644 --- a/docs/c-runtime-library/reference/wctype.md +++ b/docs/c-runtime-library/reference/wctype.md @@ -26,7 +26,7 @@ wctype_t wctype( *`property`*\ Property string. -## Return Value +## Return value If the **`LC_CTYPE`** category of the current locale doesn't define a classification rule whose name matches the property string *`property`*, the function returns zero. Otherwise, it returns a nonzero value suitable for use as the second argument to a subsequent call to [`towctrans`](towctrans.md). @@ -54,9 +54,9 @@ The function determines a classification rule for wide-character codes. The foll |-------------|---------------------| |`wctype`|``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## See also -[Data Conversion](../../c-runtime-library/data-conversion.md)\ +[Data conversion](../data-conversion.md)\ [`setlocale`, `_wsetlocale`](setlocale-wsetlocale.md) diff --git a/docs/c-runtime-library/reference/write.md b/docs/c-runtime-library/reference/write.md index 620d3ea8e81..f057aa4829a 100644 --- a/docs/c-runtime-library/reference/write.md +++ b/docs/c-runtime-library/reference/write.md @@ -34,11 +34,11 @@ Data to be written. *`count`*\ Number of bytes. -## Return Value +## Return value -If successful, **`_write`** returns the number of bytes written. If the actual space remaining on the disk is less than the size of the buffer the function is trying to write to the disk, **`_write`** fails and doesn't flush any of the buffer's contents to the disk. A return value of -1 indicates an error. If invalid parameters are passed, this function invokes the invalid parameter handler, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, the function returns -1 and **`errno`** is set to one of three values: **`EBADF`**, which means the file descriptor is invalid or the file isn't opened for writing; **`ENOSPC`**, which means there isn't enough space left on the device for the operation; or **`EINVAL`**, which means that *`buffer`* was a null pointer or that an odd *`count`* of bytes was passed to be written to a file in Unicode mode. +If successful, **`_write`** returns the number of bytes written. If the actual space remaining on the disk is less than the size of the buffer the function is trying to write to the disk, **`_write`** fails and doesn't flush any of the buffer's contents to the disk. A return value of -1 indicates an error. If invalid parameters are passed, this function invokes the invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, the function returns -1 and **`errno`** is set to one of three values: **`EBADF`**, which means the file descriptor is invalid or the file isn't opened for writing; **`ENOSPC`**, which means there isn't enough space left on the device for the operation; or **`EINVAL`**, which means that *`buffer`* was a null pointer or that an odd *`count`* of bytes was passed to be written to a file in Unicode mode. -For more information about these and other return codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md). +For more information about these and other return codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). If the file is opened in text mode, each line feed character is replaced with a carriage return-line feed pair in the output. The replacement doesn't affect the return value. @@ -58,7 +58,7 @@ By default, this function's global state is scoped to the application. To change |-------------|---------------------| |**`_write`**|``| -For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md). +For more compatibility information, see [Compatibility](../compatibility.md). ## Example @@ -120,7 +120,7 @@ Wrote 36 bytes to file. ## See also -[Low-Level I/O](../../c-runtime-library/low-level-i-o.md)\ +[Low-level I/O](../low-level-i-o.md)\ [`fwrite`](fwrite.md)\ [`_open`, `_wopen`](open-wopen.md)\ [`_read`](read.md)\ diff --git a/docs/c-runtime-library/reference/y0-y1-yn.md b/docs/c-runtime-library/reference/y0-y1-yn.md index 77991781eeb..42267812c2a 100644 --- a/docs/c-runtime-library/reference/y0-y1-yn.md +++ b/docs/c-runtime-library/reference/y0-y1-yn.md @@ -12,6 +12,6 @@ ms.assetid: e14215f3-53d4-4ae8-816e-4c1ec2019316 --- # y0, y1, yn -The Microsoft-implemented POSIX function names `y0`, `y1`, and `yn` are deprecated aliases for the [_y0, _y1, and _yn](bessel-functions-j0-j1-jn-y0-y1-yn.md) functions. By default, they generate [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The names are deprecated because they don't follow the Standard C rules for implementation-specific names. However, the functions are still supported. +The Microsoft-implemented POSIX function names `y0`, `y1`, and `yn` are deprecated aliases for the [`_y0`, `_y1`, and `_yn`](bessel-functions-j0-j1-jn-y0-y1-yn.md) functions. By default, they generate [Compiler warning (level 3) C4996](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). The names are deprecated because they don't follow the Standard C rules for implementation-specific names. However, the functions are still supported. -We recommend you use [_y0, _y1, and _yn](bessel-functions-j0-j1-jn-y0-y1-yn.md) instead. Or, you can continue to use these function names, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). +We recommend you use [`_y0`, `_y1`, and `_yn`](bessel-functions-j0-j1-jn-y0-y1-yn.md) instead. Or, you can continue to use these function names, and disable the warning. For more information, see [Turn off the warning](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#turn-off-the-warning) and [POSIX function names](../../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md#posix-function-names). diff --git a/docs/c-runtime-library/required-and-optional-header-files.md b/docs/c-runtime-library/required-and-optional-header-files.md index bdd5facd8b8..4aabfc96a6d 100644 --- a/docs/c-runtime-library/required-and-optional-header-files.md +++ b/docs/c-runtime-library/required-and-optional-header-files.md @@ -7,7 +7,7 @@ f1_keywords: ["c.headers"] helpviewer_keywords: ["include files, required in run time", "header files, required in run time"] ms.assetid: f64d0bf5-e2c3-4b42-97d0-443b3d901d9f --- -# Required and Optional Header Files +# Required and optional header files The description of each run-time routine includes a list of the required and optional include, or header (.H), files for that routine. Required header files need to be included to obtain the function declaration for the routine or a definition used by another routine called internally. Optional header files are often included to take advantage of predefined constants, type definitions, or inline macros. The following table lists some examples of optional header file contents: @@ -17,8 +17,8 @@ The description of each run-time routine includes a list of the required and opt |Predefined Constant|Many library routines refer to constants that are defined in header files. For instance, the `_open` routine uses constants such as `_O_CREAT`, which is defined in the header file FCNTL.H.| |Type definition|Some library routines return a structure or take a structure as an argument. For example, stream input/output routines use a structure of type `FILE`, which is defined in STDIO.H.| -The run-time library header files provide function declarations in the ANSI/ISO C standard recommended style. The compiler performs type checking on any routine reference that occurs after its associated function declaration. Function declarations are especially important for routines that return a value of some type other than **`int`**, which is the default. Routines that don't specify their appropriate return value in their declaration will be considered by the compiler to return an **`int`**, which can cause unexpected results. For more information, see [Type checking](../c-runtime-library/type-checking-crt.md). +The run-time library header files provide function declarations in the ANSI/ISO C standard recommended style. The compiler performs type checking on any routine reference that occurs after its associated function declaration. Function declarations are especially important for routines that return a value of some type other than **`int`**, which is the default. Routines that don't specify their appropriate return value in their declaration will be considered by the compiler to return an **`int`**, which can cause unexpected results. For more information, see [Type checking](./type-checking-crt.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/robustness.md b/docs/c-runtime-library/robustness.md index b6547f231f2..1ddb0acdbe4 100644 --- a/docs/c-runtime-library/robustness.md +++ b/docs/c-runtime-library/robustness.md @@ -9,16 +9,16 @@ ms.assetid: 7f1a87f8-eff9-4b76-ae9b-d133d3de6adf Use the following C run-time library functions to improve the robustness of your program. -## Run-Time Robustness Functions +## Run-time robustness functions |Function|Use| |--------------|---------| -|[_set_new_handler](../c-runtime-library/reference/set-new-handler.md)|Transfers control to your error-handling mechanism if the **`new`** operator fails to allocate memory.| -|[_set_se_translator](../c-runtime-library/reference/set-se-translator.md)|Handles Win32 exceptions (C structured exceptions) as C++ typed exceptions.| -|[set_terminate](../c-runtime-library/reference/set-terminate-crt.md)|Installs your own termination function to be called by [terminate](../c-runtime-library/reference/terminate-crt.md).| -|[set_unexpected](../c-runtime-library/reference/set-unexpected-crt.md)|Installs your own termination function to be called by [unexpected](../c-runtime-library/reference/unexpected-crt.md).| +|[`_set_new_handler`](./reference/set-new-handler.md)|Transfers control to your error-handling mechanism if the **`new`** operator fails to allocate memory.| +|[`_set_se_translator`](./reference/set-se-translator.md)|Handles Win32 exceptions (C structured exceptions) as C++ typed exceptions.| +|[`set_terminate`](./reference/set-terminate-crt.md)|Installs your own termination function to be called by [`terminate`](./reference/terminate-crt.md).| +|[`set_unexpected`](./reference/set-unexpected-crt.md)|Installs your own termination function to be called by [`unexpected`](./reference/unexpected-crt.md).| ## See also -[Universal C runtime routines by category](../c-runtime-library/run-time-routines-by-category.md)
-[SetUnhandledExceptionFilter](/windows/win32/api/errhandlingapi/nf-errhandlingapi-setunhandledexceptionfilter)
+[Universal C runtime routines by category](./run-time-routines-by-category.md)\ +[SetUnhandledExceptionFilter](/windows/win32/api/errhandlingapi/nf-errhandlingapi-setunhandledexceptionfilter) diff --git a/docs/c-runtime-library/routine-mappings.md b/docs/c-runtime-library/routine-mappings.md index 57afe7c0fa5..46c9164b328 100644 --- a/docs/c-runtime-library/routine-mappings.md +++ b/docs/c-runtime-library/routine-mappings.md @@ -5,15 +5,15 @@ ms.date: "11/04/2016" helpviewer_keywords: ["_tWinMain", "TCHAR.H data types, list of routine mappings", "generic-text mappings"] ms.assetid: 38f33d3b-0f7b-430d-8a4f-75e27c6f1c42 --- -# Routine Mappings +# Routine mappings The generic-text routine mappings are defined in TCHAR.H. `_tccpy` and `_tclen` map to functions in the MBCS model; they're mapped to macros or inline functions in the SBCS and Unicode models for completeness. For information on a generic text routine, see the help article about the corresponding `SBCS`-, `_MBCS`-, or `_UNICODE`-related routine. More specific information about individual routines listed in the left column in the following table isn't available in this documentation. However, you can easily look up the information on a corresponding `SBCS`-, `_MBCS`-, or `_UNICODE`-related routine. Use the **Search** command on the **Help** menu to look up any generic-text routine listed below. -For related information, see [Generic-Text Mappings in TCHAR.H](../text/generic-text-mappings-in-tchar-h.md). +For related information, see [Generic-text mappings in tchar.h](../text/generic-text-mappings-in-tchar-h.md). -### Generic-Text Routine Mappings +### Generic-text routine mappings |Generic-text routine name|SBCS (_UNICODE & MBCS not defined)|_MBCS defined|_UNICODE defined| |--------------------------------|-------------------------------------------|--------------------|-----------------------| @@ -254,8 +254,8 @@ For related information, see [Generic-Text Mappings in TCHAR.H](../text/generic- ## 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)
-[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)\ +[Constant and global variable mappings](./constant-and-global-variable-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/rtdynamiccast.md b/docs/c-runtime-library/rtdynamiccast.md index 556359670c7..fbcc3160477 100644 --- a/docs/c-runtime-library/rtdynamiccast.md +++ b/docs/c-runtime-library/rtdynamiccast.md @@ -12,7 +12,7 @@ ms.assetid: 56aa2d7a-aa47-46ef-830d-e37175611239 --- # __RTDynamicCast -Runtime implementation of the [dynamic_cast](../cpp/dynamic-cast-operator.md) operator. +Runtime implementation of the [`dynamic_cast`](../cpp/dynamic-cast-operator.md) operator. ## Syntax @@ -28,22 +28,22 @@ PVOID __RTDynamicCast ( #### Parameters -*inptr*
+*`inptr`*\ Pointer to a polymorphic object. -*VfDelta*
+*`VfDelta`*\ Offset of virtual function pointer in object. -*SrcType*
+*`SrcType`*\ Static type of object pointed to by the `inptr` parameter. -*TargetType*
+*`TargetType`*\ Intended result of cast. -*isReference*
+*`isReference`*\ **`true`** if input is a reference; **`false`** if input is a pointer. -## Return Value +## Return value Pointer to the appropriate subobject, if successful; otherwise, **NULL**. diff --git a/docs/c-runtime-library/run-time-error-checking.md b/docs/c-runtime-library/run-time-error-checking.md index 90bfd33b54e..4cbb2c4063e 100644 --- a/docs/c-runtime-library/run-time-error-checking.md +++ b/docs/c-runtime-library/run-time-error-checking.md @@ -14,14 +14,14 @@ Use the following functions to customize the way your program does runtime error |Function|Use| |--------------|---------| -|[_RTC_GetErrDesc](../c-runtime-library/reference/rtc-geterrdesc.md)|Returns a brief description of a runtime error check type.| -|[_RTC_NumErrors](../c-runtime-library/reference/rtc-numerrors.md)|Returns the total number of errors that can be detected by runtime error checks.| -|[_RTC_SetErrorFunc](../c-runtime-library/reference/rtc-seterrorfunc.md)|Designates a function as the handler for reporting runtime error checks.| -|[_RTC_SetErrorType](../c-runtime-library/reference/rtc-seterrortype.md)|Associates an error that is detected by runtime error checks with a type.| +|[`_RTC_GetErrDesc`](./reference/rtc-geterrdesc.md)|Returns a brief description of a runtime error check type.| +|[`_RTC_NumErrors`](./reference/rtc-numerrors.md)|Returns the total number of errors that can be detected by runtime error checks.| +|[`_RTC_SetErrorFunc`](./reference/rtc-seterrorfunc.md)|Designates a function as the handler for reporting runtime error checks.| +|[`_RTC_SetErrorType`](./reference/rtc-seterrortype.md)|Associates an error that is detected by runtime error checks with a type.| ## 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)\ [/RTC (Runtime error checks)](../build/reference/rtc-run-time-error-checks.md)\ -[runtime_checks](../preprocessor/runtime-checks.md)\ -[Debug routines](../c-runtime-library/debug-routines.md) +[`runtime_checks`](../preprocessor/runtime-checks.md)\ +[Debug routines](./debug-routines.md) diff --git a/docs/c-runtime-library/run-time-routines-by-category.md b/docs/c-runtime-library/run-time-routines-by-category.md index 449cc2bca69..9fe6744b4aa 100644 --- a/docs/c-runtime-library/run-time-routines-by-category.md +++ b/docs/c-runtime-library/run-time-routines-by-category.md @@ -13,30 +13,30 @@ This section lists Universal C runtime (UCRT) library routines by category. For The main categories of UCRT library routines are: -- [Argument Access](../c-runtime-library/argument-access.md) -- [Buffer Manipulation](../c-runtime-library/buffer-manipulation.md) -- [Byte Classification](../c-runtime-library/byte-classification.md) -- [Character Classification](../c-runtime-library/character-classification.md) -- [Complex math support](../c-runtime-library/complex-math-support.md) -- [Data Alignment](../c-runtime-library/data-alignment.md) -- [Data Conversion](../c-runtime-library/data-conversion.md) -- [Debug Routines](../c-runtime-library/debug-routines.md) -- [Directory Control](../c-runtime-library/directory-control.md) -- [Error Handling](../c-runtime-library/error-handling-crt.md) -- [Exception Handling Routines](../c-runtime-library/exception-handling-routines.md) -- [File Handling](../c-runtime-library/file-handling.md) -- [Floating-Point Support](../c-runtime-library/floating-point-support.md) -- [Input and Output](../c-runtime-library/input-and-output.md) -- [Internationalization](../c-runtime-library/internationalization.md) -- [Memory Allocation](../c-runtime-library/memory-allocation.md) -- [Process and Environment Control](../c-runtime-library/process-and-environment-control.md) -- [Robustness](../c-runtime-library/robustness.md) -- [Run-Time Error Checking](../c-runtime-library/run-time-error-checking.md) -- [Searching and Sorting](../c-runtime-library/searching-and-sorting.md) -- [String Manipulation](../c-runtime-library/string-manipulation-crt.md) -- [System Calls](../c-runtime-library/system-calls.md) -- [Time Management](../c-runtime-library/time-management.md) +- [Argument access](./argument-access.md) +- [Buffer manipulation](./buffer-manipulation.md) +- [Byte classification](./byte-classification.md) +- [Character classification](./character-classification.md) +- [Complex math support](./complex-math-support.md) +- [Data alignment](./data-alignment.md) +- [Data conversion](./data-conversion.md) +- [Debug routines](./debug-routines.md) +- [Directory control](./directory-control.md) +- [Error handling](./error-handling-crt.md) +- [Exception handling routines](./exception-handling-routines.md) +- [File handling](./file-handling.md) +- [Math and floating-point support](./floating-point-support.md) +- [Input and output](./input-and-output.md) +- [Internationalization](./internationalization.md) +- [Memory allocation](./memory-allocation.md) +- [Process and environment control](./process-and-environment-control.md) +- [Robustness](./robustness.md) +- [Runtime error checking](./run-time-error-checking.md) +- [Searching and sorting](./searching-and-sorting.md) +- [String manipulation](./string-manipulation-crt.md) +- [System calls](./system-calls.md) +- [Time management](./time-management.md) ## See also -[C Run-Time Library Reference](../c-runtime-library/c-run-time-library-reference.md)
+[C runtime library reference](./c-run-time-library-reference.md) diff --git a/docs/c-runtime-library/sal-annotations.md b/docs/c-runtime-library/sal-annotations.md index 92265b64f63..511ff4f7dde 100644 --- a/docs/c-runtime-library/sal-annotations.md +++ b/docs/c-runtime-library/sal-annotations.md @@ -10,8 +10,8 @@ ms.assetid: 81893638-010c-41a0-9cb3-666fe360f3e0 If you examine the library header files, you may notice some unusual annotations, for example, `_In_z` and `_Out_z_cap_(_Size)`. These annotations are examples of the Microsoft source-code annotation language (SAL). SAL provides a set of annotations to describe how a function uses its parameters and return type. For example, it indicates the assumptions it makes about them and the guarantees it makes on finishing. The header file \ defines the annotations. -For more information about using SAL annotations in Visual Studio, see [Using SAL Annotations to Reduce C/C++ Code Defects](../code-quality/using-sal-annotations-to-reduce-c-cpp-code-defects.md). +For more information about using SAL annotations in Visual Studio, see [Using SAL annotations to reduce C/C++ code defects](../code-quality/using-sal-annotations-to-reduce-c-cpp-code-defects.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/sbcs-and-mbcs-data-types.md b/docs/c-runtime-library/sbcs-and-mbcs-data-types.md index 1bc213c2df9..ba2e16445f5 100644 --- a/docs/c-runtime-library/sbcs-and-mbcs-data-types.md +++ b/docs/c-runtime-library/sbcs-and-mbcs-data-types.md @@ -26,5 +26,5 @@ Because some SBCS string-handling functions take (signed) **`char`**\* -[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/scanf-type-field-characters.md b/docs/c-runtime-library/scanf-type-field-characters.md index 8e0abd92a19..ad7edc0f231 100644 --- a/docs/c-runtime-library/scanf-type-field-characters.md +++ b/docs/c-runtime-library/scanf-type-field-characters.md @@ -25,8 +25,8 @@ The `type` character is the only required format field; it appears after any opt |`e`, `E`, `f`, `F`, `g`, `G`|Floating-point value consisting of optional sign (+ or -), series of one or more decimal digits containing decimal point, and optional exponent ("e" or "E") followed by an optionally signed integer value.|Pointer to **`float`**.|No.| |`a`, `A`|Floating-point value consisting of a series of one or more hexadecimal digits containing an optional decimal point, and an exponent ("p" or "P") followed by a decimal value.|Pointer to **`float`**.|No.| |`n`|No input read from stream or buffer.|Pointer to **`int`**, into which is stored number of characters successfully read from stream or buffer up to that point in current call to `scanf` functions or `wscanf` functions.|No.| -|`s`|String, up to first white-space character (space, tab or newline). To read strings not delimited by space characters, use set of square brackets (`[ ]`), as discussed in [`scanf` Width Specification](../c-runtime-library/scanf-width-specification.md).|When used with `scanf` functions, signifies single-byte character array; when used with `wscanf` functions, signifies wide-character array. In either case, character array must be large enough for input field plus terminating null character, which is automatically appended.|Required. Size includes space for a null terminator.| -|`S`|Opposite-size character string, up to first white-space character (space, tab or newline). To read strings not delimited by space characters, use set of square brackets (`[ ]`), as discussed in [`scanf` Width Specification](../c-runtime-library/scanf-width-specification.md).|When used with `scanf` functions, signifies wide-character array; when used with `wscanf` functions, signifies single-byte-character array. In either case, character array must be large enough for input field plus terminating null character, which is automatically appended.|Required. Size includes space for a null terminator.| +|`s`|String, up to first white-space character (space, tab or newline). To read strings not delimited by space characters, use set of square brackets (`[ ]`), as discussed in [`scanf` Width Specification](./scanf-width-specification.md).|When used with `scanf` functions, signifies single-byte character array; when used with `wscanf` functions, signifies wide-character array. In either case, character array must be large enough for input field plus terminating null character, which is automatically appended.|Required. Size includes space for a null terminator.| +|`S`|Opposite-size character string, up to first white-space character (space, tab or newline). To read strings not delimited by space characters, use set of square brackets (`[ ]`), as discussed in [`scanf` Width Specification](./scanf-width-specification.md).|When used with `scanf` functions, signifies wide-character array; when used with `wscanf` functions, signifies single-byte-character array. In either case, character array must be large enough for input field plus terminating null character, which is automatically appended.|Required. Size includes space for a null terminator.| The size arguments, if necessary, should be passed in the parameter list immediately following the argument they apply to. For example, the following code: @@ -50,4 +50,4 @@ To scan strings with `scanf` functions, and `wscanf` functions, use the above ta ## See also -[`scanf`, `_scanf_l`, `wscanf`, `_wscanf_l`](../c-runtime-library/reference/scanf-scanf-l-wscanf-wscanf-l.md) +[`scanf`, `_scanf_l`, `wscanf`, `_wscanf_l`](./reference/scanf-scanf-l-wscanf-wscanf-l.md) diff --git a/docs/c-runtime-library/scanf-width-specification.md b/docs/c-runtime-library/scanf-width-specification.md index b92ecd91664..ee9f45dccb0 100644 --- a/docs/c-runtime-library/scanf-width-specification.md +++ b/docs/c-runtime-library/scanf-width-specification.md @@ -26,7 +26,7 @@ If the *`width`* field isn't used, `scanf_s` attempts to read the entire token i ## The size prefix -The optional prefixes **`h`**, **`hh`**, **`l`**, **`ll`**, **`I64`**, and **`L`** indicate the size of the `argument` (long or short, single-byte character or wide character, depending upon the type character that they modify). These format-specification characters are used with type characters in `scanf` or `wscanf` functions to specify interpretation of arguments as shown in the following table. The type prefix **`I64`** is a Microsoft extension and isn't compatible with Standard C. The type characters and their meanings are described in the "Type Characters for scanf functions" table in [`scanf` Type Field Characters](../c-runtime-library/scanf-type-field-characters.md). +The optional prefixes **`h`**, **`hh`**, **`l`**, **`ll`**, **`I64`**, and **`L`** indicate the size of the `argument` (long or short, single-byte character or wide character, depending upon the type character that they modify). These format-specification characters are used with type characters in `scanf` or `wscanf` functions to specify interpretation of arguments as shown in the following table. The type prefix **`I64`** is a Microsoft extension and isn't compatible with Standard C. The type characters and their meanings are described in the "Type Characters for scanf functions" table in [`scanf` type field characters](./scanf-type-field-characters.md). > [!NOTE] > The **`h`**, **`l`**, and **`L`** prefixes are Microsoft extensions when used with data of type **`char`**. @@ -89,7 +89,7 @@ For whatever reason, when the `scanf` function stops reading an input field, the ## See also -[`scanf`, `_scanf_l`, `wscanf`, `_wscanf_l`](../c-runtime-library/reference/scanf-scanf-l-wscanf-wscanf-l.md)
-[`scanf_s`, `_scanf_s_l`, `wscanf_s`, `_wscanf_s_l`](../c-runtime-library/reference/scanf-s-scanf-s-l-wscanf-s-wscanf-s-l.md)
-[Format Specification Fields: `scanf` and `wscanf` Functions](../c-runtime-library/format-specification-fields-scanf-and-wscanf-functions.md)
-[`scanf` Type Field Characters](../c-runtime-library/scanf-type-field-characters.md)
+[`scanf`, `_scanf_l`, `wscanf`, `_wscanf_l`](./reference/scanf-scanf-l-wscanf-wscanf-l.md)\ +[`scanf_s`, `_scanf_s_l`, `wscanf_s`, `_wscanf_s_l`](./reference/scanf-s-scanf-s-l-wscanf-s-wscanf-s-l.md)\ +[Format specification fields: `scanf` and `wscanf` functions](./format-specification-fields-scanf-and-wscanf-functions.md)\ +[`scanf` type field characters](./scanf-type-field-characters.md) diff --git a/docs/c-runtime-library/searching-and-sorting.md b/docs/c-runtime-library/searching-and-sorting.md index 1eb7dbdb238..207654cbb8b 100644 --- a/docs/c-runtime-library/searching-and-sorting.md +++ b/docs/c-runtime-library/searching-and-sorting.md @@ -5,23 +5,23 @@ ms.date: "11/04/2016" helpviewer_keywords: ["sorting data", "data [CRT], searching", "searching [C++], CRT search functions", "searching [C++]"] ms.assetid: 15e984f0-e155-46f5-8542-51c458792f54 --- -# Searching and Sorting +# Searching and sorting Use the following functions for searching and sorting. -## Searching and Sorting Functions +## Searching and sorting functions |Function|Search or Sort| |--------------|--------------------| -|[bsearch](../c-runtime-library/reference/bsearch.md)|Binary search| -|[bsearch_s](../c-runtime-library/reference/bsearch-s.md)|A more secure version of **bsearch**| -|[_lfind](../c-runtime-library/reference/lfind.md)|Linear search for given value| -|[_lfind_s](../c-runtime-library/reference/lfind-s.md)|A more secure version of **_lfind**| -|[_lsearch](../c-runtime-library/reference/lsearch.md)|Linear search for given value, which is added to array if not found| -|[_lsearch_s](../c-runtime-library/reference/lsearch-s.md)|A more secure version of **_lsearch**| -|[qsort](../c-runtime-library/reference/qsort.md)|Quick sort| -|[qsort_s](../c-runtime-library/reference/qsort-s.md)|A more secure version of **qsort**| +|[`bsearch`](./reference/bsearch.md)|Binary search| +|[`bsearch_s`](./reference/bsearch-s.md)|A more secure version of **bsearch**| +|[`_lfind`](./reference/lfind.md)|Linear search for given value| +|[`_lfind_s`](./reference/lfind-s.md)|A more secure version of **_lfind**| +|[`_lsearch`](./reference/lsearch.md)|Linear search for given value, which is added to array if not found| +|[`_lsearch_s`](./reference/lsearch-s.md)|A more secure version of **_lsearch**| +|[`qsort`](./reference/qsort.md)|Quick sort| +|[`qsort_s`](./reference/qsort-s.md)|A more secure version of **qsort**| ## 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/secure-template-overloads.md b/docs/c-runtime-library/secure-template-overloads.md index c72246a2f55..865c43c2abf 100644 --- a/docs/c-runtime-library/secure-template-overloads.md +++ b/docs/c-runtime-library/secure-template-overloads.md @@ -7,7 +7,7 @@ f1_keywords: ["_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES", "_CRT_SECURE_CPP_OVERLO helpviewer_keywords: ["_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES", "_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES", "_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT", "secure template overloads"] ms.assetid: 562741d0-39c0-485e-8529-73d740f29f8f --- -# Secure Template Overloads +# Secure template overloads Microsoft has deprecated many C Runtime library (CRT) functions in favor of security-enhanced versions. For example, `strcpy_s` is the more secure replacement for `strcpy`. The deprecated functions are common sources of security bugs, because they don't prevent operations that can overwrite memory. By default, the compiler produces a deprecation warning when you use one of these functions. The CRT provides C++ template overloads for these functions to help ease the transition to the more secure variants. @@ -36,7 +36,7 @@ char szBuf[10]; strcpy(szBuf, "test"); // ==> strcpy_s(szBuf, 10, "test") ``` -The macro `_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES` doesn't affect the functions that take a count, such as `strncpy`. To enable template overloads for the count functions, define `_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT` to 1. Before doing so, however, make sure that your code passes the count of characters, not the size of the buffer (a common mistake). Also, code that explicitly writes a null terminator at the end of the buffer after the function call is unnecessary if the secure variant is called. If you need truncation behavior, see [_TRUNCATE](../c-runtime-library/truncate.md). +The macro `_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES` doesn't affect the functions that take a count, such as `strncpy`. To enable template overloads for the count functions, define `_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT` to 1. Before doing so, however, make sure that your code passes the count of characters, not the size of the buffer (a common mistake). Also, code that explicitly writes a null terminator at the end of the buffer after the function call is unnecessary if the secure variant is called. If you need truncation behavior, see [`_TRUNCATE`](./truncate.md). > [!NOTE] > The macro `_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT` requires that `_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES` is also defined as 1. If `_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT` is defined as 1 and `_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES` is defined as 0, the application will not perform any template overloads. @@ -82,5 +82,5 @@ strcpy_s(szBuf, "test"); // doesn't compile; change it to ## See also -[Security Features in the CRT](../c-runtime-library/security-features-in-the-crt.md)
-[C runtime (CRT) and C++ Standard Library (STL) `.lib` files](../c-runtime-library/crt-library-features.md) +[Security features in the CRT](./security-features-in-the-crt.md)\ +[C runtime (CRT) and C++ Standard Library (STL) `.lib` files](./crt-library-features.md) diff --git a/docs/c-runtime-library/security-enhanced-versions-of-crt-functions.md b/docs/c-runtime-library/security-enhanced-versions-of-crt-functions.md index 373bb8121c9..989e6bda3b6 100644 --- a/docs/c-runtime-library/security-enhanced-versions-of-crt-functions.md +++ b/docs/c-runtime-library/security-enhanced-versions-of-crt-functions.md @@ -5,92 +5,92 @@ ms.date: "03/21/2018" helpviewer_keywords: ["security [CRT]", "security-enhanced CRT", "CRT, security enhancements"] ms.assetid: f87e5a01-4cb2-4379-9e8f-d4693828c55a --- -# Security-Enhanced Versions of CRT Functions +# Security-enhanced versions of CRT functions -More secure versions of run-time library routines are available. For more information about security enhancements in the CRT, see [Security Features in the CRT](../c-runtime-library/security-features-in-the-crt.md). +More secure versions of run-time library routines are available. For more information about security enhancements in the CRT, see [Security features in the CRT](./security-features-in-the-crt.md). ## Secure functions |CRT Function|Security enhanced function|Use| |------------------|--------------------------------|---------| -|[`_access`, `_waccess`](../c-runtime-library/reference/access-waccess.md)|[`_access_s`, `_waccess_s`](../c-runtime-library/reference/access-s-waccess-s.md)|Determine file-access permission| -|[`_alloca`](../c-runtime-library/reference/alloca.md)|[`_malloca`](../c-runtime-library/reference/malloca.md)|Allocate memory on the stack| -|[`asctime`, `_wasctime`](../c-runtime-library/reference/asctime-wasctime.md)|[`asctime_s`, `_wasctime_s`](../c-runtime-library/reference/asctime-s-wasctime-s.md)|Convert time from type `struct tm` to character string| -|[`bsearch`](../c-runtime-library/reference/bsearch.md)|[`bsearch_s`](../c-runtime-library/reference/bsearch-s.md)|Perform a binary search of a sorted array| -|[`_cgets`, `_cgetws`](../c-runtime-library/cgets-cgetws.md)|[`_cgets_s`, `_cgetws_s`](../c-runtime-library/reference/cgets-s-cgetws-s.md)|Get a character string from the console| -|[`_chsize`](../c-runtime-library/reference/chsize.md)|[`_chsize_s`](../c-runtime-library/reference/chsize-s.md)|Change the size of a file| -|[`clearerr`](../c-runtime-library/reference/clearerr.md)|[`clearerr_s`](../c-runtime-library/reference/clearerr-s.md)|Reset the error indicator for a stream| -|[`_control87`, `_controlfp`, `__control87_2`](../c-runtime-library/reference/control87-controlfp-control87-2.md)|[`_controlfp_s`](../c-runtime-library/reference/controlfp-s.md)|Get and set the floating-point control word| -|[`_cprintf`, `_cprintf_l`, `_cwprintf`, `_cwprintf_l`](../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)|Format and print to the console| -|[`_cscanf`, `_cscanf_l`, `_cwscanf`, `_cwscanf_l`](../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 the console| -|[`ctime`, `_ctime32`, `_ctime64`, `_wctime`, `_wctime32`, `_wctime64`](../c-runtime-library/reference/ctime-ctime32-ctime64-wctime-wctime32-wctime64.md)|[`_ctime_s`, `_ctime32_s`, `_ctime64_s`, `_wctime_s`, `_wctime32_s`, `_wctime64_s`](../c-runtime-library/reference/ctime-s-ctime32-s-ctime64-s-wctime-s-wctime32-s-wctime64-s.md)|Convert time from type `time_t`, `__time32_t` or `__time64_t` to character string| -|[`_ecvt`](../c-runtime-library/reference/ecvt.md)|[`_ecvt_s`](../c-runtime-library/reference/ecvt-s.md)|Convert a **`double`** number to a string| -|[`_fcvt`](../c-runtime-library/reference/fcvt.md)|[`_fcvt_s`](../c-runtime-library/reference/fcvt-s.md)|Converts a floating-point number to a string| -|[`fopen`, `_wfopen`](../c-runtime-library/reference/fopen-wfopen.md)|[`fopen_s`, `_wfopen_s`](../c-runtime-library/reference/fopen-s-wfopen-s.md)|Open a file| -|[`fprintf`, `_fprintf_l`, `fwprintf`, `_fwprintf_l`](../c-runtime-library/reference/fprintf-fprintf-l-fwprintf-fwprintf-l.md)|[`fprintf_s`, `_fprintf_s_l`, `fwprintf_s`, `_fwprintf_s_l`](../c-runtime-library/reference/fprintf-s-fprintf-s-l-fwprintf-s-fwprintf-s-l.md)|Print formatted data to a stream| -|[`fread`](../c-runtime-library/reference/fread.md)|[`fread_s`](../c-runtime-library/reference/fread-s.md)|Read from a file| -|[`_fread_nolock`](../c-runtime-library/reference/fread-nolock.md)|[`_fread_nolock_s`](../c-runtime-library/reference/fread-nolock-s2.md)|Read from a file without using a multi-thread write lock| -|[`freopen`, `_wfreopen`](../c-runtime-library/reference/freopen-wfreopen.md)|[`freopen_s`, `_wfreopen_s`](../c-runtime-library/reference/freopen-s-wfreopen-s.md)|Reopen the file| -|[`fscanf`, `_fscanf_l`, `fwscanf`, `_fwscanf_l`](../c-runtime-library/reference/fscanf-fscanf-l-fwscanf-fwscanf-l.md)|[`fscanf_s`, `_fscanf_s_l`, `fwscanf_s`, `_fwscanf_s_l`](../c-runtime-library/reference/fscanf-s-fscanf-s-l-fwscanf-s-fwscanf-s-l.md)|Read formatted data from a stream| -|[`_ftime`, `_ftime32`, `_ftime64`](../c-runtime-library/reference/ftime-ftime32-ftime64.md)|[`_ftime_s`, `_ftime32_s`, `_ftime64_s`](../c-runtime-library/reference/ftime-s-ftime32-s-ftime64-s.md)|Get the current time| -|[`_gcvt`](../c-runtime-library/reference/gcvt.md)|[`_gcvt_s`](../c-runtime-library/reference/gcvt-s.md)|Convert a floating-point value to a string, and store it in a buffer| -|[`getenv`, `_wgetenv`](../c-runtime-library/reference/getenv-wgetenv.md)|[`getenv_s`, `_wgetenv_s`](../c-runtime-library/reference/getenv-s-wgetenv-s.md)|Get a value from the current environment.| -|[`gets`, `getws`](../c-runtime-library/gets-getws.md)|[`gets_s`, `_getws_s`](../c-runtime-library/reference/gets-s-getws-s.md)|Get a line from the `stdin` stream| -|[`gmtime`, `_gmtime32`, `_gmtime64`](../c-runtime-library/reference/gmtime-gmtime32-gmtime64.md)|[`_gmtime32_s`, `_gmtime64_s`](../c-runtime-library/reference/gmtime-s-gmtime32-s-gmtime64-s.md)|Convert time from type `time_t` to `struct tm` or from type `__time64_t` to `struct tm`| -|[`itoa`, `_itoa`, `ltoa`, `_ltoa`, `ultoa`, `_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 an integral type to a string| -|[`_lfind`](../c-runtime-library/reference/lfind.md)|[`_lfind_s`](../c-runtime-library/reference/lfind-s.md)|Perform a linear search for the specified key| -|[`localtime`, `_localtime32`, `_localtime64`](../c-runtime-library/reference/localtime-localtime32-localtime64.md)|[`localtime_s`, `_localtime32_s`, `_localtime64_s`](../c-runtime-library/reference/localtime-s-localtime32-s-localtime64-s.md)|Convert time from type `time_t` to `struct tm` or from type `__time64_t` to `struct tm` with local correction| -|[`_lsearch`](../c-runtime-library/reference/lsearch.md)|[`_lsearch_s`](../c-runtime-library/reference/lsearch-s.md)|Perform a linear search for a value; adds to end of list if not found| -|[`_makepath`, `_wmakepath`](../c-runtime-library/reference/makepath-wmakepath.md)|[`_makepath_s`, `_wmakepath_s`](../c-runtime-library/reference/makepath-s-wmakepath-s.md)|Create a path name from components| -|[`_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 a multibyte character from one string to another string| -|[`_mbsnbcat`, `_mbsnbcat_l`](../c-runtime-library/reference/mbsnbcat-mbsnbcat-l.md)|[`_mbsnbcat_s`, `_mbsnbcat_s_l`](../c-runtime-library/reference/mbsnbcat-s-mbsnbcat-s-l.md)|Append at most the first *n* bytes of one multibyte character string to another| -|[`_mbsnbcpy`, `_mbsnbcpy_l`](../c-runtime-library/reference/mbsnbcpy-mbsnbcpy-l.md)|[`_mbsnbcpy_s`, `_mbsnbcpy_s_l`](../c-runtime-library/reference/mbsnbcpy-s-mbsnbcpy-s-l.md)|Copy *n* bytes of a string to a destination string| -|[`_mbsnbset`, `_mbsnbset_l`](../c-runtime-library/reference/mbsnbset-mbsnbset-l.md)|[`_mbsnbset_s`, `_mbsnbset_s_l`](../c-runtime-library/reference/mbsnbset-s-mbsnbset-s-l.md)|Set the first *n* bytes of a string to a specified character| -|[`mbsrtowcs`](../c-runtime-library/reference/mbsrtowcs.md)|[`mbsrtowcs_s`](../c-runtime-library/reference/mbsrtowcs-s.md)|Convert a multibyte character string to a corresponding wide character string| -|[`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 a sequence of multibyte characters to a corresponding sequence of wide characters| -|[`memcpy`, `wmemcpy`](../c-runtime-library/reference/memcpy-wmemcpy.md)|[`memcpy_s`, `wmemcpy_s`](../c-runtime-library/reference/memcpy-s-wmemcpy-s.md)|Copy characters between buffers| -|[`memmove`, `wmemmove`](../c-runtime-library/reference/memmove-wmemmove.md)|[`memmove_s`, `wmemmove_s`](../c-runtime-library/reference/memmove-s-wmemmove-s.md)|Move one buffer to another| -|[`_mktemp`, `_wmktemp`](../c-runtime-library/reference/mktemp-wmktemp.md)|[`_mktemp_s`, `_wmktemp_s`](../c-runtime-library/reference/mktemp-s-wmktemp-s.md)|Create a unique filename| -|[`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)|Print formatted output to the standard output stream| -|[`_putenv`, `_wputenv`](../c-runtime-library/reference/putenv-wputenv.md)|[`_putenv_s`, `_wputenv_s`](../c-runtime-library/reference/putenv-s-wputenv-s.md)|Create, modify, or remove environment variables| -|[`qsort`](../c-runtime-library/reference/qsort.md)|[`qsort_s`](../c-runtime-library/reference/qsort-s.md)|Perform a quick sort| -|[`rand`](../c-runtime-library/reference/rand.md)|[`rand_s`](../c-runtime-library/reference/rand-s.md)|Generate a pseudorandom number| -|[`scanf`, `_scanf_l`, `wscanf`, `_wscanf_l`](../c-runtime-library/reference/scanf-scanf-l-wscanf-wscanf-l.md)|[`scanf_s`, `_scanf_s_l`, `wscanf_s`, `_wscanf_s_l`](../c-runtime-library/reference/scanf-s-scanf-s-l-wscanf-s-wscanf-s-l.md)|Read formatted data from the standard input stream| -|[`_searchenv`, `_wsearchenv`](../c-runtime-library/reference/searchenv-wsearchenv.md)|[`_searchenv_s`, `_wsearchenv_s`](../c-runtime-library/reference/searchenv-s-wsearchenv-s.md)|Search for a file using environment paths| -|[`snprintf`, `_snprintf`, `_snprintf_l`, `_snwprintf`, `_snwprintf_l`](../c-runtime-library/reference/snprintf-snprintf-snprintf-l-snwprintf-snwprintf-l.md)|[`_snprintf_s`, `_snprintf_s_l`, `_snwprintf_s`, `_snwprintf_s_l`](../c-runtime-library/reference/snprintf-s-snprintf-s-l-snwprintf-s-snwprintf-s-l.md)|Write formatted data to a string| -|[`_snscanf`, `_snscanf_l`, `_snwscanf`, `_snwscanf_l`](../c-runtime-library/reference/snscanf-snscanf-l-snwscanf-snwscanf-l.md)|[`_snscanf_s`, `_snscanf_s_l`, `_snwscanf_s`, `_snwscanf_s_l`](../c-runtime-library/reference/snscanf-s-snscanf-s-l-snwscanf-s-snwscanf-s-l.md)|Read formatted data of a specified length from a string.| -|[`_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 for sharing| -|[`_splitpath`, `_wsplitpath`](../c-runtime-library/reference/splitpath-wsplitpath.md)|[`_splitpath_s`, `_wsplitpath_s`](../c-runtime-library/reference/splitpath-s-wsplitpath-s.md)|Break a path name into components| -|[`sprintf`, `_sprintf_l`, `swprintf`, `_swprintf_l`, `__swprintf_l`](../c-runtime-library/reference/sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md)|[`sprintf_s`, `_sprintf_s_l`, `swprintf_s`, `_swprintf_s_l`](../c-runtime-library/reference/sprintf-s-sprintf-s-l-swprintf-s-swprintf-s-l.md)|Write formatted data to a string| -|[`sscanf`, `_sscanf_l`, `swscanf`, `_swscanf_l`](../c-runtime-library/reference/sscanf-sscanf-l-swscanf-swscanf-l.md)|[`sscanf_s`, `_sscanf_s_l`, `swscanf_s`, `_swscanf_s_l`](../c-runtime-library/reference/sscanf-s-sscanf-s-l-swscanf-s-swscanf-s-l.md)|Read formatted data from a string| -|[`strcat`, `wcscat`, `_mbscat`](../c-runtime-library/reference/strcat-wcscat-mbscat.md)|[`strcat_s`, `wcscat_s`, `_mbscat_s`](../c-runtime-library/reference/strcat-s-wcscat-s-mbscat-s.md)|Append a string| -|[`strcpy`, `wcscpy`, `_mbscpy`](../c-runtime-library/reference/strcpy-wcscpy-mbscpy.md)|[`strcpy_s`, `wcscpy_s`, `_mbscpy_s`](../c-runtime-library/reference/strcpy-s-wcscpy-s-mbscpy-s.md)|Copy a string| -|[`_strdate`, `_wstrdate`](../c-runtime-library/reference/strdate-wstrdate.md)|[`_strdate_s`, `_wstrdate_s`](../c-runtime-library/reference/strdate-s-wstrdate-s.md)|Return current system date as string| -|[`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 a system error message (`strerror`, `_wcserror`) or print a user-supplied error message (`_strerror`, `__wcserror`)| -|[`_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 a string to lowercase| -|[`strncat`, `_strncat_l`, `wcsncat`, `_wcsncat_l`, `_mbsncat`, `_mbsncat_l`](../c-runtime-library/reference/strncat-strncat-l-wcsncat-wcsncat-l-mbsncat-mbsncat-l.md)|[`strncat_s`, `_strncat_s_l`, `wcsncat_s`, `_wcsncat_s_l`, `_mbsncat_s`, `_mbsncat_s_l`](../c-runtime-library/reference/strncat-s-strncat-s-l-wcsncat-s-wcsncat-s-l-mbsncat-s-mbsncat-s-l.md)|Append characters to a string| -|[`strncpy`, `_strncpy_l`, `wcsncpy`, `_wcsncpy_l`, `_mbsncpy`, `_mbsncpy_l`](../c-runtime-library/reference/strncpy-strncpy-l-wcsncpy-wcsncpy-l-mbsncpy-mbsncpy-l.md)|[`strncpy_s`, `_strncpy_s_l`, `wcsncpy_s`, `_wcsncpy_s_l`, `_mbsncpy_s`, `_mbsncpy_s_l`](../c-runtime-library/reference/strncpy-s-strncpy-s-l-wcsncpy-s-wcsncpy-s-l-mbsncpy-s-mbsncpy-s-l.md)|Copy characters of one string to another| -|[`_strnset`, `_strnset_l`, `_wcsnset`, `_wcsnset_l`, `_mbsnset`, `_mbsnset_l`](../c-runtime-library/reference/strnset-strnset-l-wcsnset-wcsnset-l-mbsnset-mbsnset-l.md)|[`_strnset_s`, `_strnset_s_l`, `_wcsnset_s`, `_wcsnset_s_l`, `_mbsnset_s`, `_mbsnset_s_l`](../c-runtime-library/reference/strnset-s-strnset-s-l-wcsnset-s-wcsnset-s-l-mbsnset-s-mbsnset-s-l.md)|Set the first n characters of a string to the specified character| -|[`_strset`, `_strset_l`, `_wcsset`, `_wcsset_l`, `_mbsset`, `_mbsset_l`](../c-runtime-library/reference/strset-strset-l-wcsset-wcsset-l-mbsset-mbsset-l.md)|[`_strset_s`, `_strset_s_l`, `_wcsset_s`, `_wcsset_s_l`, `_mbsset_s`, `_mbsset_s_l`](../c-runtime-library/reference/strset-s-strset-s-l-wcsset-s-wcsset-s-l-mbsset-s-mbsset-s-l.md)|Set all the characters of a string to the specified character| -|[`_strtime`, `_wstrtime`](../c-runtime-library/reference/strtime-wstrtime.md)|[`_strtime_s`, `_wstrtime_s`](../c-runtime-library/reference/strtime-s-wstrtime-s.md)|Return current system time as string| -|[`strtok`, `_strtok_l`, `wcstok`, `_wcstok_l`, `_mbstok`, `_mbstok_l`](../c-runtime-library/reference/strtok-strtok-l-wcstok-wcstok-l-mbstok-mbstok-l.md)|[`strtok_s`, `_strtok_s_l`, `wcstok_s`, `_wcstok_s_l`, `_mbstok_s`, `_mbstok_s_l`](../c-runtime-library/reference/strtok-s-strtok-s-l-wcstok-s-wcstok-s-l-mbstok-s-mbstok-s-l.md)|Find the next token in a string, using the current locale or a locale passed in| -|[`_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 a string to uppercase| -|[`tmpfile`](../c-runtime-library/reference/tmpfile.md)|[`tmpfile_s`](../c-runtime-library/reference/tmpfile-s.md)|Create a temporary file| -|[`_tempnam`, `_wtempnam`, `tmpnam`, `_wtmpnam`](../c-runtime-library/reference/tempnam-wtempnam-tmpnam-wtmpnam.md)|[`tmpnam_s`, `_wtmpnam_s`](../c-runtime-library/reference/tmpnam-s-wtmpnam-s.md)|Generate names you can use to create temporary files| -|[`_umask`](../c-runtime-library/reference/umask.md)|[`_umask_s`](../c-runtime-library/reference/umask-s.md)|Set the default file-permission mask| -|[`_vcprintf`, `_vcprintf_l`, `_vcwprintf`, `_vcwprintf_l`](../c-runtime-library/reference/vcprintf-vcprintf-l-vcwprintf-vcwprintf-l.md)|[`_vcprintf_s`, `_vcprintf_s_l`, `_vcwprintf_s`, `_vcwprintf_s_l`](../c-runtime-library/reference/vcprintf-s-vcprintf-s-l-vcwprintf-s-vcwprintf-s-l.md)|Write formatted output to the console using a pointer to a list of arguments| -|[`vfprintf`, `_vfprintf_l`, `vfwprintf`, `_vfwprintf_l`](../c-runtime-library/reference/vfprintf-vfprintf-l-vfwprintf-vfwprintf-l.md)|[`vfprintf_s`, `_vfprintf_s_l`, `vfwprintf_s`, `_vfwprintf_s_l`](../c-runtime-library/reference/vfprintf-s-vfprintf-s-l-vfwprintf-s-vfwprintf-s-l.md)|Write formatted output using a pointer to a list of arguments| -|[`vfscanf`, `vfwscanf`](../c-runtime-library/reference/vfscanf-vfwscanf.md)|[`vfscanf_s`, `vfwscanf_s`](../c-runtime-library/reference/vfscanf-s-vfwscanf-s.md)|Read formatted data from a stream| -|[`vprintf`, `_vprintf_l`, `vwprintf`, `_vwprintf_l`](../c-runtime-library/reference/vprintf-vprintf-l-vwprintf-vwprintf-l.md)|[`vprintf_s`, `_vprintf_s_l`, `vwprintf_s`, `_vwprintf_s_l`](../c-runtime-library/reference/vprintf-s-vprintf-s-l-vwprintf-s-vwprintf-s-l.md)|Write formatted output using a pointer to a list of arguments| -|[`vscanf`, `vwscanf`](../c-runtime-library/reference/vscanf-vwscanf.md)|[`vscanf_s`, `vwscanf_s`](../c-runtime-library/reference/vscanf-s-vwscanf-s.md)|Read formatted data from the standard input stream| -|[`vsnprintf`, `_vsnprintf`, `_vsnprintf_l`, `_vsnwprintf`, `_vsnwprintf_l`](../c-runtime-library/reference/vsnprintf-vsnprintf-vsnprintf-l-vsnwprintf-vsnwprintf-l.md)|[`vsnprintf_s`, `_vsnprintf_s`, `_vsnprintf_s_l`, `_vsnwprintf_s`, `_vsnwprintf_s_l`](../c-runtime-library/reference/vsnprintf-s-vsnprintf-s-vsnprintf-s-l-vsnwprintf-s-vsnwprintf-s-l.md)|Write formatted output using a pointer to a list of arguments| -|[`vsprintf`, `_vsprintf_l`, `vswprintf`, `_vswprintf_l`, `__vswprintf_l`](../c-runtime-library/reference/vsprintf-vsprintf-l-vswprintf-vswprintf-l-vswprintf-l.md)|[`vsprintf_s`, `_vsprintf_s_l`, `vswprintf_s`, `_vswprintf_s_l`](../c-runtime-library/reference/vsprintf-s-vsprintf-s-l-vswprintf-s-vswprintf-s-l.md)|Write formatted output using a pointer to a list of arguments| -|[`vsscanf`, `vswscanf`](../c-runtime-library/reference/vsscanf-vswscanf.md)|[`vsscanf_s`, `vswscanf_s`](../c-runtime-library/reference/vsscanf-s-vswscanf-s.md)|Read formatted data from a string| -|[`wcrtomb`](../c-runtime-library/reference/wcrtomb.md)|[`wcrtomb_s`](../c-runtime-library/reference/wcrtomb-s.md)|Convert a wide character into its multibyte character representation| -|[`wcsrtombs`](../c-runtime-library/reference/wcsrtombs.md)|[`wcsrtombs_s`](../c-runtime-library/reference/wcsrtombs-s.md)|Convert a wide character string to its multibyte character string representation| -|[`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 a sequence of wide characters to a 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 a wide character to the corresponding multibyte character| +|[`_access`, `_waccess`](./reference/access-waccess.md)|[`_access_s`, `_waccess_s`](./reference/access-s-waccess-s.md)|Determine file-access permission| +|[`_alloca`](./reference/alloca.md)|[`_malloca`](./reference/malloca.md)|Allocate memory on the stack| +|[`asctime`, `_wasctime`](./reference/asctime-wasctime.md)|[`asctime_s`, `_wasctime_s`](./reference/asctime-s-wasctime-s.md)|Convert time from type `struct tm` to character string| +|[`bsearch`](./reference/bsearch.md)|[`bsearch_s`](./reference/bsearch-s.md)|Perform a binary search of a sorted array| +|[`_cgets`, `_cgetws`](./cgets-cgetws.md)|[`_cgets_s`, `_cgetws_s`](./reference/cgets-s-cgetws-s.md)|Get a character string from the console| +|[`_chsize`](./reference/chsize.md)|[`_chsize_s`](./reference/chsize-s.md)|Change the size of a file| +|[`clearerr`](./reference/clearerr.md)|[`clearerr_s`](./reference/clearerr-s.md)|Reset the error indicator for a stream| +|[`_control87`, `_controlfp`, `__control87_2`](./reference/control87-controlfp-control87-2.md)|[`_controlfp_s`](./reference/controlfp-s.md)|Get and set the floating-point control word| +|[`_cprintf`, `_cprintf_l`, `_cwprintf`, `_cwprintf_l`](./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)|Format and print to the console| +|[`_cscanf`, `_cscanf_l`, `_cwscanf`, `_cwscanf_l`](./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 the console| +|[`ctime`, `_ctime32`, `_ctime64`, `_wctime`, `_wctime32`, `_wctime64`](./reference/ctime-ctime32-ctime64-wctime-wctime32-wctime64.md)|[`_ctime_s`, `_ctime32_s`, `_ctime64_s`, `_wctime_s`, `_wctime32_s`, `_wctime64_s`](./reference/ctime-s-ctime32-s-ctime64-s-wctime-s-wctime32-s-wctime64-s.md)|Convert time from type `time_t`, `__time32_t` or `__time64_t` to character string| +|[`_ecvt`](./reference/ecvt.md)|[`_ecvt_s`](./reference/ecvt-s.md)|Convert a **`double`** number to a string| +|[`_fcvt`](./reference/fcvt.md)|[`_fcvt_s`](./reference/fcvt-s.md)|Converts a floating-point number to a string| +|[`fopen`, `_wfopen`](./reference/fopen-wfopen.md)|[`fopen_s`, `_wfopen_s`](./reference/fopen-s-wfopen-s.md)|Open a file| +|[`fprintf`, `_fprintf_l`, `fwprintf`, `_fwprintf_l`](./reference/fprintf-fprintf-l-fwprintf-fwprintf-l.md)|[`fprintf_s`, `_fprintf_s_l`, `fwprintf_s`, `_fwprintf_s_l`](./reference/fprintf-s-fprintf-s-l-fwprintf-s-fwprintf-s-l.md)|Print formatted data to a stream| +|[`fread`](./reference/fread.md)|[`fread_s`](./reference/fread-s.md)|Read from a file| +|[`_fread_nolock`](./reference/fread-nolock.md)|[`_fread_nolock_s`](./reference/fread-nolock-s2.md)|Read from a file without using a multi-thread write lock| +|[`freopen`, `_wfreopen`](./reference/freopen-wfreopen.md)|[`freopen_s`, `_wfreopen_s`](./reference/freopen-s-wfreopen-s.md)|Reopen the file| +|[`fscanf`, `_fscanf_l`, `fwscanf`, `_fwscanf_l`](./reference/fscanf-fscanf-l-fwscanf-fwscanf-l.md)|[`fscanf_s`, `_fscanf_s_l`, `fwscanf_s`, `_fwscanf_s_l`](./reference/fscanf-s-fscanf-s-l-fwscanf-s-fwscanf-s-l.md)|Read formatted data from a stream| +|[`_ftime`, `_ftime32`, `_ftime64`](./reference/ftime-ftime32-ftime64.md)|[`_ftime_s`, `_ftime32_s`, `_ftime64_s`](./reference/ftime-s-ftime32-s-ftime64-s.md)|Get the current time| +|[`_gcvt`](./reference/gcvt.md)|[`_gcvt_s`](./reference/gcvt-s.md)|Convert a floating-point value to a string, and store it in a buffer| +|[`getenv`, `_wgetenv`](./reference/getenv-wgetenv.md)|[`getenv_s`, `_wgetenv_s`](./reference/getenv-s-wgetenv-s.md)|Get a value from the current environment.| +|[`gets`, `getws`](./gets-getws.md)|[`gets_s`, `_getws_s`](./reference/gets-s-getws-s.md)|Get a line from the `stdin` stream| +|[`gmtime`, `_gmtime32`, `_gmtime64`](./reference/gmtime-gmtime32-gmtime64.md)|[`_gmtime32_s`, `_gmtime64_s`](./reference/gmtime-s-gmtime32-s-gmtime64-s.md)|Convert time from type `time_t` to `struct tm` or from type `__time64_t` to `struct tm`| +|[`itoa`, `_itoa`, `ltoa`, `_ltoa`, `ultoa`, `_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 an integral type to a string| +|[`_lfind`](./reference/lfind.md)|[`_lfind_s`](./reference/lfind-s.md)|Perform a linear search for the specified key| +|[`localtime`, `_localtime32`, `_localtime64`](./reference/localtime-localtime32-localtime64.md)|[`localtime_s`, `_localtime32_s`, `_localtime64_s`](./reference/localtime-s-localtime32-s-localtime64-s.md)|Convert time from type `time_t` to `struct tm` or from type `__time64_t` to `struct tm` with local correction| +|[`_lsearch`](./reference/lsearch.md)|[`_lsearch_s`](./reference/lsearch-s.md)|Perform a linear search for a value; adds to end of list if not found| +|[`_makepath`, `_wmakepath`](./reference/makepath-wmakepath.md)|[`_makepath_s`, `_wmakepath_s`](./reference/makepath-s-wmakepath-s.md)|Create a path name from components| +|[`_mbccpy`, `_mbccpy_l`](./reference/mbccpy-mbccpy-l.md)|[`_mbccpy_s`, `_mbccpy_s_l`](./reference/mbccpy-s-mbccpy-s-l.md)|Copy a multibyte character from one string to another string| +|[`_mbsnbcat`, `_mbsnbcat_l`](./reference/mbsnbcat-mbsnbcat-l.md)|[`_mbsnbcat_s`, `_mbsnbcat_s_l`](./reference/mbsnbcat-s-mbsnbcat-s-l.md)|Append at most the first *n* bytes of one multibyte character string to another| +|[`_mbsnbcpy`, `_mbsnbcpy_l`](./reference/mbsnbcpy-mbsnbcpy-l.md)|[`_mbsnbcpy_s`, `_mbsnbcpy_s_l`](./reference/mbsnbcpy-s-mbsnbcpy-s-l.md)|Copy *n* bytes of a string to a destination string| +|[`_mbsnbset`, `_mbsnbset_l`](./reference/mbsnbset-mbsnbset-l.md)|[`_mbsnbset_s`, `_mbsnbset_s_l`](./reference/mbsnbset-s-mbsnbset-s-l.md)|Set the first *n* bytes of a string to a specified character| +|[`mbsrtowcs`](./reference/mbsrtowcs.md)|[`mbsrtowcs_s`](./reference/mbsrtowcs-s.md)|Convert a multibyte character string to a corresponding wide character string| +|[`mbstowcs`, `_mbstowcs_l`](./reference/mbstowcs-mbstowcs-l.md)|[`mbstowcs_s`, `_mbstowcs_s_l`](./reference/mbstowcs-s-mbstowcs-s-l.md)|Convert a sequence of multibyte characters to a corresponding sequence of wide characters| +|[`memcpy`, `wmemcpy`](./reference/memcpy-wmemcpy.md)|[`memcpy_s`, `wmemcpy_s`](./reference/memcpy-s-wmemcpy-s.md)|Copy characters between buffers| +|[`memmove`, `wmemmove`](./reference/memmove-wmemmove.md)|[`memmove_s`, `wmemmove_s`](./reference/memmove-s-wmemmove-s.md)|Move one buffer to another| +|[`_mktemp`, `_wmktemp`](./reference/mktemp-wmktemp.md)|[`_mktemp_s`, `_wmktemp_s`](./reference/mktemp-s-wmktemp-s.md)|Create a unique filename| +|[`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)|Print formatted output to the standard output stream| +|[`_putenv`, `_wputenv`](./reference/putenv-wputenv.md)|[`_putenv_s`, `_wputenv_s`](./reference/putenv-s-wputenv-s.md)|Create, modify, or remove environment variables| +|[`qsort`](./reference/qsort.md)|[`qsort_s`](./reference/qsort-s.md)|Perform a quick sort| +|[`rand`](./reference/rand.md)|[`rand_s`](./reference/rand-s.md)|Generate a pseudorandom number| +|[`scanf`, `_scanf_l`, `wscanf`, `_wscanf_l`](./reference/scanf-scanf-l-wscanf-wscanf-l.md)|[`scanf_s`, `_scanf_s_l`, `wscanf_s`, `_wscanf_s_l`](./reference/scanf-s-scanf-s-l-wscanf-s-wscanf-s-l.md)|Read formatted data from the standard input stream| +|[`_searchenv`, `_wsearchenv`](./reference/searchenv-wsearchenv.md)|[`_searchenv_s`, `_wsearchenv_s`](./reference/searchenv-s-wsearchenv-s.md)|Search for a file using environment paths| +|[`snprintf`, `_snprintf`, `_snprintf_l`, `_snwprintf`, `_snwprintf_l`](./reference/snprintf-snprintf-snprintf-l-snwprintf-snwprintf-l.md)|[`_snprintf_s`, `_snprintf_s_l`, `_snwprintf_s`, `_snwprintf_s_l`](./reference/snprintf-s-snprintf-s-l-snwprintf-s-snwprintf-s-l.md)|Write formatted data to a string| +|[`_snscanf`, `_snscanf_l`, `_snwscanf`, `_snwscanf_l`](./reference/snscanf-snscanf-l-snwscanf-snwscanf-l.md)|[`_snscanf_s`, `_snscanf_s_l`, `_snwscanf_s`, `_snwscanf_s_l`](./reference/snscanf-s-snscanf-s-l-snwscanf-s-snwscanf-s-l.md)|Read formatted data of a specified length from a string.| +|[`_sopen`, `_wsopen`](./reference/sopen-wsopen.md)|[`_sopen_s`, `_wsopen_s`](./reference/sopen-s-wsopen-s.md)|Open a file for sharing| +|[`_splitpath`, `_wsplitpath`](./reference/splitpath-wsplitpath.md)|[`_splitpath_s`, `_wsplitpath_s`](./reference/splitpath-s-wsplitpath-s.md)|Break a path name into components| +|[`sprintf`, `_sprintf_l`, `swprintf`, `_swprintf_l`, `__swprintf_l`](./reference/sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md)|[`sprintf_s`, `_sprintf_s_l`, `swprintf_s`, `_swprintf_s_l`](./reference/sprintf-s-sprintf-s-l-swprintf-s-swprintf-s-l.md)|Write formatted data to a string| +|[`sscanf`, `_sscanf_l`, `swscanf`, `_swscanf_l`](./reference/sscanf-sscanf-l-swscanf-swscanf-l.md)|[`sscanf_s`, `_sscanf_s_l`, `swscanf_s`, `_swscanf_s_l`](./reference/sscanf-s-sscanf-s-l-swscanf-s-swscanf-s-l.md)|Read formatted data from a string| +|[`strcat`, `wcscat`, `_mbscat`](./reference/strcat-wcscat-mbscat.md)|[`strcat_s`, `wcscat_s`, `_mbscat_s`](./reference/strcat-s-wcscat-s-mbscat-s.md)|Append a string| +|[`strcpy`, `wcscpy`, `_mbscpy`](./reference/strcpy-wcscpy-mbscpy.md)|[`strcpy_s`, `wcscpy_s`, `_mbscpy_s`](./reference/strcpy-s-wcscpy-s-mbscpy-s.md)|Copy a string| +|[`_strdate`, `_wstrdate`](./reference/strdate-wstrdate.md)|[`_strdate_s`, `_wstrdate_s`](./reference/strdate-s-wstrdate-s.md)|Return current system date as string| +|[`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 a system error message (`strerror`, `_wcserror`) or print a user-supplied error message (`_strerror`, `__wcserror`)| +|[`_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 a string to lowercase| +|[`strncat`, `_strncat_l`, `wcsncat`, `_wcsncat_l`, `_mbsncat`, `_mbsncat_l`](./reference/strncat-strncat-l-wcsncat-wcsncat-l-mbsncat-mbsncat-l.md)|[`strncat_s`, `_strncat_s_l`, `wcsncat_s`, `_wcsncat_s_l`, `_mbsncat_s`, `_mbsncat_s_l`](./reference/strncat-s-strncat-s-l-wcsncat-s-wcsncat-s-l-mbsncat-s-mbsncat-s-l.md)|Append characters to a string| +|[`strncpy`, `_strncpy_l`, `wcsncpy`, `_wcsncpy_l`, `_mbsncpy`, `_mbsncpy_l`](./reference/strncpy-strncpy-l-wcsncpy-wcsncpy-l-mbsncpy-mbsncpy-l.md)|[`strncpy_s`, `_strncpy_s_l`, `wcsncpy_s`, `_wcsncpy_s_l`, `_mbsncpy_s`, `_mbsncpy_s_l`](./reference/strncpy-s-strncpy-s-l-wcsncpy-s-wcsncpy-s-l-mbsncpy-s-mbsncpy-s-l.md)|Copy characters of one string to another| +|[`_strnset`, `_strnset_l`, `_wcsnset`, `_wcsnset_l`, `_mbsnset`, `_mbsnset_l`](./reference/strnset-strnset-l-wcsnset-wcsnset-l-mbsnset-mbsnset-l.md)|[`_strnset_s`, `_strnset_s_l`, `_wcsnset_s`, `_wcsnset_s_l`, `_mbsnset_s`, `_mbsnset_s_l`](./reference/strnset-s-strnset-s-l-wcsnset-s-wcsnset-s-l-mbsnset-s-mbsnset-s-l.md)|Set the first n characters of a string to the specified character| +|[`_strset`, `_strset_l`, `_wcsset`, `_wcsset_l`, `_mbsset`, `_mbsset_l`](./reference/strset-strset-l-wcsset-wcsset-l-mbsset-mbsset-l.md)|[`_strset_s`, `_strset_s_l`, `_wcsset_s`, `_wcsset_s_l`, `_mbsset_s`, `_mbsset_s_l`](./reference/strset-s-strset-s-l-wcsset-s-wcsset-s-l-mbsset-s-mbsset-s-l.md)|Set all the characters of a string to the specified character| +|[`_strtime`, `_wstrtime`](./reference/strtime-wstrtime.md)|[`_strtime_s`, `_wstrtime_s`](./reference/strtime-s-wstrtime-s.md)|Return current system time as string| +|[`strtok`, `_strtok_l`, `wcstok`, `_wcstok_l`, `_mbstok`, `_mbstok_l`](./reference/strtok-strtok-l-wcstok-wcstok-l-mbstok-mbstok-l.md)|[`strtok_s`, `_strtok_s_l`, `wcstok_s`, `_wcstok_s_l`, `_mbstok_s`, `_mbstok_s_l`](./reference/strtok-s-strtok-s-l-wcstok-s-wcstok-s-l-mbstok-s-mbstok-s-l.md)|Find the next token in a string, using the current locale or a locale passed in| +|[`_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 a string to uppercase| +|[`tmpfile`](./reference/tmpfile.md)|[`tmpfile_s`](./reference/tmpfile-s.md)|Create a temporary file| +|[`_tempnam`, `_wtempnam`, `tmpnam`, `_wtmpnam`](./reference/tempnam-wtempnam-tmpnam-wtmpnam.md)|[`tmpnam_s`, `_wtmpnam_s`](./reference/tmpnam-s-wtmpnam-s.md)|Generate names you can use to create temporary files| +|[`_umask`](./reference/umask.md)|[`_umask_s`](./reference/umask-s.md)|Set the default file-permission mask| +|[`_vcprintf`, `_vcprintf_l`, `_vcwprintf`, `_vcwprintf_l`](./reference/vcprintf-vcprintf-l-vcwprintf-vcwprintf-l.md)|[`_vcprintf_s`, `_vcprintf_s_l`, `_vcwprintf_s`, `_vcwprintf_s_l`](./reference/vcprintf-s-vcprintf-s-l-vcwprintf-s-vcwprintf-s-l.md)|Write formatted output to the console using a pointer to a list of arguments| +|[`vfprintf`, `_vfprintf_l`, `vfwprintf`, `_vfwprintf_l`](./reference/vfprintf-vfprintf-l-vfwprintf-vfwprintf-l.md)|[`vfprintf_s`, `_vfprintf_s_l`, `vfwprintf_s`, `_vfwprintf_s_l`](./reference/vfprintf-s-vfprintf-s-l-vfwprintf-s-vfwprintf-s-l.md)|Write formatted output using a pointer to a list of arguments| +|[`vfscanf`, `vfwscanf`](./reference/vfscanf-vfwscanf.md)|[`vfscanf_s`, `vfwscanf_s`](./reference/vfscanf-s-vfwscanf-s.md)|Read formatted data from a stream| +|[`vprintf`, `_vprintf_l`, `vwprintf`, `_vwprintf_l`](./reference/vprintf-vprintf-l-vwprintf-vwprintf-l.md)|[`vprintf_s`, `_vprintf_s_l`, `vwprintf_s`, `_vwprintf_s_l`](./reference/vprintf-s-vprintf-s-l-vwprintf-s-vwprintf-s-l.md)|Write formatted output using a pointer to a list of arguments| +|[`vscanf`, `vwscanf`](./reference/vscanf-vwscanf.md)|[`vscanf_s`, `vwscanf_s`](./reference/vscanf-s-vwscanf-s.md)|Read formatted data from the standard input stream| +|[`vsnprintf`, `_vsnprintf`, `_vsnprintf_l`, `_vsnwprintf`, `_vsnwprintf_l`](./reference/vsnprintf-vsnprintf-vsnprintf-l-vsnwprintf-vsnwprintf-l.md)|[`vsnprintf_s`, `_vsnprintf_s`, `_vsnprintf_s_l`, `_vsnwprintf_s`, `_vsnwprintf_s_l`](./reference/vsnprintf-s-vsnprintf-s-vsnprintf-s-l-vsnwprintf-s-vsnwprintf-s-l.md)|Write formatted output using a pointer to a list of arguments| +|[`vsprintf`, `_vsprintf_l`, `vswprintf`, `_vswprintf_l`, `__vswprintf_l`](./reference/vsprintf-vsprintf-l-vswprintf-vswprintf-l-vswprintf-l.md)|[`vsprintf_s`, `_vsprintf_s_l`, `vswprintf_s`, `_vswprintf_s_l`](./reference/vsprintf-s-vsprintf-s-l-vswprintf-s-vswprintf-s-l.md)|Write formatted output using a pointer to a list of arguments| +|[`vsscanf`, `vswscanf`](./reference/vsscanf-vswscanf.md)|[`vsscanf_s`, `vswscanf_s`](./reference/vsscanf-s-vswscanf-s.md)|Read formatted data from a string| +|[`wcrtomb`](./reference/wcrtomb.md)|[`wcrtomb_s`](./reference/wcrtomb-s.md)|Convert a wide character into its multibyte character representation| +|[`wcsrtombs`](./reference/wcsrtombs.md)|[`wcsrtombs_s`](./reference/wcsrtombs-s.md)|Convert a wide character string to its multibyte character string representation| +|[`wcstombs`, `_wcstombs_l`](./reference/wcstombs-wcstombs-l.md)|[`wcstombs_s`, `_wcstombs_s_l`](./reference/wcstombs-s-wcstombs-s-l.md)|Convert a sequence of wide characters to a 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 a wide character to the corresponding multibyte character| ## 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/security-features-in-the-crt.md b/docs/c-runtime-library/security-features-in-the-crt.md index b76eedfc439..403253aeeb5 100644 --- a/docs/c-runtime-library/security-features-in-the-crt.md +++ b/docs/c-runtime-library/security-features-in-the-crt.md @@ -13,28 +13,28 @@ Many old CRT functions have newer, more secure versions. If a secure function ex In this context, "deprecated" means that use of the function isn't recommended. It doesn't mean the function will be removed from the CRT. -The secure functions don't prevent or correct security errors. Instead, they catch errors when they occur. They do extra checks for error conditions. If there's an error, they invoke an error handler (see [Parameter Validation](../c-runtime-library/parameter-validation.md)). +The secure functions don't prevent or correct security errors. Instead, they catch errors when they occur. They do extra checks for error conditions. If there's an error, they invoke an error handler (see [Parameter validation](./parameter-validation.md)). For example, the `strcpy` function can't tell if the string it copies is too large for the destination buffer. Its secure counterpart, `strcpy_s`, takes the size of the buffer as a parameter. So, it can determine if a buffer overrun will occur. If you use `strcpy_s` to copy 11 characters into a 10 character buffer, that's an error on your part; `strcpy_s` can't correct your mistake. But it can detect your error and inform you by invoking the invalid parameter handler. ## Eliminating deprecation warnings -There are several ways to eliminate deprecation warnings for the older, less secure functions. The simplest is simply to define `_CRT_SECURE_NO_WARNINGS` or use the [warning](../preprocessor/warning.md) pragma. Either will disable deprecation warnings, but the security issues that caused the warnings still exist. It's better to leave deprecation warnings enabled and take advantage of the new CRT security features. +There are several ways to eliminate deprecation warnings for the older, less secure functions. The simplest is simply to define `_CRT_SECURE_NO_WARNINGS` or use the [`warning`](../preprocessor/warning.md) pragma. Either will disable deprecation warnings, but the security issues that caused the warnings still exist. It's better to leave deprecation warnings enabled and take advantage of the new CRT security features. -In C++, the easiest way to eliminate the deprecation warnings is to use [Secure Template Overloads](../c-runtime-library/secure-template-overloads.md). The overloads eliminate deprecation warnings in many cases. They replace calls to deprecated functions with calls to secure versions of the functions. For example, consider this deprecated call to `strcpy`: +In C++, the easiest way to eliminate the deprecation warnings is to use [Secure template overloads](./secure-template-overloads.md). The overloads eliminate deprecation warnings in many cases. They replace calls to deprecated functions with calls to secure versions of the functions. For example, consider this deprecated call to `strcpy`: ```cpp char szBuf[10]; strcpy(szBuf, "test"); // warning: deprecated ``` -Defining `_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES` as 1 eliminates the warning by changing the `strcpy` call to `strcpy_s`, which prevents buffer overruns. For more information, see [Secure Template Overloads](../c-runtime-library/secure-template-overloads.md). +Defining `_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES` as 1 eliminates the warning by changing the `strcpy` call to `strcpy_s`, which prevents buffer overruns. For more information, see [Secure template overloads](./secure-template-overloads.md). For those deprecated functions without secure template overloads, you should definitely consider manually updating your code to use the secure versions. -Another source of deprecation warnings, unrelated to security, is the POSIX functions. Replace POSIX function names with their standard equivalents (for example, change [access](../c-runtime-library/reference/access-crt.md) to [_access](../c-runtime-library/reference/access-waccess.md)), or disable POSIX-related deprecation warnings by defining `_CRT_NONSTDC_NO_WARNINGS`. For more information, see [Compatibility](compatibility.md). +Another source of deprecation warnings, unrelated to security, is the POSIX functions. Replace POSIX function names with their standard equivalents (for example, change [`access`](./reference/access-crt.md) to [`_access`](./reference/access-waccess.md)), or disable POSIX-related deprecation warnings by defining `_CRT_NONSTDC_NO_WARNINGS`. For more information, see [Compatibility](compatibility.md). -## More Security Features +## More security features Some of the security features include: @@ -46,9 +46,9 @@ Some of the security features include: - Checking enumerated values for validity. - Checking that integral values are in valid ranges. - For more information, see [Parameter Validation](../c-runtime-library/parameter-validation.md). + For more information, see [Parameter validation](./parameter-validation.md). - A handler for invalid parameters is also accessible to the developer. When a function encounters an invalid parameter, instead of asserting and exiting the application, the CRT allows you to check these problems via [`_set_invalid_parameter_handler` or `_set_thread_local_invalid_parameter_handler`](../c-runtime-library/reference/set-invalid-parameter-handler-set-thread-local-invalid-parameter-handler.md). + A handler for invalid parameters is also accessible to the developer. When a function encounters an invalid parameter, instead of asserting and exiting the application, the CRT allows you to check these problems via [`_set_invalid_parameter_handler` or `_set_thread_local_invalid_parameter_handler`](./reference/set-invalid-parameter-handler-set-thread-local-invalid-parameter-handler.md). - **Sized Buffers** @@ -76,6 +76,6 @@ Some of the security features include: ## See also -[Parameter Validation](../c-runtime-library/parameter-validation.md)
-[Secure Template Overloads](../c-runtime-library/secure-template-overloads.md)
-[C runtime (CRT) and C++ Standard Library (STL) `.lib` files](../c-runtime-library/crt-library-features.md) +[Parameter validation](./parameter-validation.md)\ +[Secure template overloads](./secure-template-overloads.md)\ +[C runtime (CRT) and C++ Standard Library (STL) `.lib` files](./crt-library-features.md) diff --git a/docs/c-runtime-library/set-app-type.md b/docs/c-runtime-library/set-app-type.md index 3f4ecacc8bc..d68641f0f20 100644 --- a/docs/c-runtime-library/set-app-type.md +++ b/docs/c-runtime-library/set-app-type.md @@ -30,7 +30,7 @@ void __cdecl _set_app_type( ## Parameters -*appType*
+*`appType`*\ A value that indicates the application type. The possible values are: |Value|Description| diff --git a/docs/c-runtime-library/set-output-format.md b/docs/c-runtime-library/set-output-format.md index 1004b941c12..b96abbfc174 100644 --- a/docs/c-runtime-library/set-output-format.md +++ b/docs/c-runtime-library/set-output-format.md @@ -27,7 +27,7 @@ unsigned int _set_output_format( #### Parameters -*format*
+*`format`*\ [in] An value representing the format to use. ## Return value @@ -36,7 +36,7 @@ The previous output format. ## Remarks -`_set_output_format` is used to configure the output of formatted I/O functions such as [printf_s](../c-runtime-library/reference/printf-s-printf-s-l-wprintf-s-wprintf-s-l.md). The only formatting convention that can be changed by this function is the number of digits displayed in exponents in the output of floating point numbers. +`_set_output_format` is used to configure the output of formatted I/O functions such as [`printf_s`](./reference/printf-s-printf-s-l-wprintf-s-wprintf-s-l.md). The only formatting convention that can be changed by this function is the number of digits displayed in exponents in the output of floating point numbers. By default, the output of floating point numbers by functions such as `printf_s`, `wprintf_s`, and related functions in the Visual C++ Standard C library prints three digits for the exponent, even if three digits aren't required to represent the value of the exponent. Zeroes are used to pad the value to three digits. `_set_output_format` allows you to change this behavior so that only two digits are printed in the exponent unless a third digit is required by the size of the exponent. @@ -48,7 +48,7 @@ To enable two-digit exponents, call this function with the parameter `_TWO_DIGIT |-------------|---------------------| |`_set_output_format`|\| -For more compatibility information, see [Compatibility](../c-runtime-library/compatibility.md) in the Introduction. +For more compatibility information, see [Compatibility](./compatibility.md) in the Introduction. ## Example @@ -102,5 +102,5 @@ int main() ## See also -[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)
-[_get_output_format](../c-runtime-library/get-output-format.md) +[`printf_s`, `_printf_s_l`, `wprintf_s`, `_wprintf_s_l`](./reference/printf-s-printf-s-l-wprintf-s-wprintf-s-l.md)\ +[`_get_output_format`](./get-output-format.md) diff --git a/docs/c-runtime-library/setjmp3.md b/docs/c-runtime-library/setjmp3.md index c8f949d378c..46352b7e2cb 100644 --- a/docs/c-runtime-library/setjmp3.md +++ b/docs/c-runtime-library/setjmp3.md @@ -35,7 +35,7 @@ int _setjmp3( *`optional parameters`*\ [in] Extra data pushed down by the `setjmp` intrinsic. The first `DWORD` is a function pointer that is used to unwind extra data and return to a nonvolatile register state. The second `DWORD` is the try level to be restored. Any further data is saved in the generic data array in the `jmp_buf`. -## Return Value +## Return value Always returns 0. @@ -47,5 +47,5 @@ Don't use this function in a C++ program. It's an intrinsic function that doesn' ## See also -[Alphabetical Function Reference](../c-runtime-library/reference/crt-alphabetical-function-reference.md)\ -[`setjmp`](../c-runtime-library/reference/setjmp.md) +[Alphabetical function reference](./reference/crt-alphabetical-function-reference.md)\ +[`setjmp`](./reference/setjmp.md) diff --git a/docs/c-runtime-library/setlc-active-func-unguarded-readlc-active-add-func.md b/docs/c-runtime-library/setlc-active-func-unguarded-readlc-active-add-func.md index 3db7b774841..8c03039fbfa 100644 --- a/docs/c-runtime-library/setlc-active-func-unguarded-readlc-active-add-func.md +++ b/docs/c-runtime-library/setlc-active-func-unguarded-readlc-active-add-func.md @@ -21,7 +21,7 @@ int ___setlc_active_func(void); int * ___unguarded_readlc_active_add_func(void); ``` -## Return Value +## Return value The value returned isn't significant. @@ -37,4 +37,4 @@ Although the internal CRT functions `___setlc_active_func` and `___unguarded_rea ## See also -[setlocale, _wsetlocale](../c-runtime-library/reference/setlocale-wsetlocale.md) +[`setlocale`, `_wsetlocale`](./reference/setlocale-wsetlocale.md) diff --git a/docs/c-runtime-library/setusermatherr.md b/docs/c-runtime-library/setusermatherr.md index 754539432d0..ea0fa8533b1 100644 --- a/docs/c-runtime-library/setusermatherr.md +++ b/docs/c-runtime-library/setusermatherr.md @@ -12,7 +12,7 @@ ms.assetid: f306818d-381a-4d68-8739-71b92bacb5ea --- # __setusermatherr -Specifies a user-supplied routine to handle math errors, instead of the [`_matherr`](../c-runtime-library/reference/matherr.md) routine. +Specifies a user-supplied routine to handle math errors, instead of the [`_matherr`](./reference/matherr.md) routine. ## Syntax @@ -24,7 +24,7 @@ void __setusermatherr( #### Parameters -*`pf`*
+*`pf`*\ Pointer to an implementation of `_matherr` that is supplied by the user. The type of the *`pf`* parameter is declared as `typedef int (__cdecl * _HANDLE_MATH_ERROR)(struct _exception *)`. diff --git a/docs/c-runtime-library/setvbuf-constants.md b/docs/c-runtime-library/setvbuf-constants.md index a4a2f00503c..629cb3c4eb4 100644 --- a/docs/c-runtime-library/setvbuf-constants.md +++ b/docs/c-runtime-library/setvbuf-constants.md @@ -6,7 +6,7 @@ f1_keywords: ["_IOFBF", "_IONBF", "_IOLBF"] helpviewer_keywords: ["_IOFBF constant", "IOFBF constant", "IONBF constant", "_IOLBF constant", "IOLBF constant", "_IONBF constant"] ms.assetid: a6ec4dd5-1f24-498c-871a-e874cd28d33c --- -# setvbuf Constants +# setvbuf constants ## Syntax @@ -28,5 +28,5 @@ The possible values are given by the following manifest constants: ## See also -[setbuf](../c-runtime-library/reference/setbuf.md)
-[Global Constants](../c-runtime-library/global-constants.md) +[`setbuf`](./reference/setbuf.md)\ +[Global constants](./global-constants.md) diff --git a/docs/c-runtime-library/sharing-constants.md b/docs/c-runtime-library/sharing-constants.md index 7b6479fb5fc..ff469c6d47e 100644 --- a/docs/c-runtime-library/sharing-constants.md +++ b/docs/c-runtime-library/sharing-constants.md @@ -6,7 +6,7 @@ f1_keywords: ["_SH_DENYNO", "_SH_DENYRD", "_SH_DENYRW", "_SH_DENYWR", "_SH_COMPA helpviewer_keywords: ["_SH_DENYRW constant", "SH_DENYRD constant", "_SH_COMPAT constant", "_SH_DENYRD constant", "SH_DENYRW constant", "sharing constants", "SH_DENYNO constant", "_SH_DENYWR constant", "SH_DENYWR constant", "_SH_DENYNO constant", "SH_COMPAT constant"] ms.assetid: 95fadc3a-55dc-473d-98b5-e8211900465d --- -# Sharing Constants +# Sharing constants Constants for file-sharing modes. @@ -18,7 +18,7 @@ Constants for file-sharing modes. ## Remarks -The *`shflag`* argument determines the sharing mode, which consists of one or more manifest constants. These constants can be combined with the *`oflag`* arguments (see [File Constants](../c-runtime-library/file-constants.md)). +The *`shflag`* argument determines the sharing mode, which consists of one or more manifest constants. These constants can be combined with the *`oflag`* arguments (see [File constants](./file-constants.md)). The following table lists the constants and their meanings: @@ -32,6 +32,6 @@ The following table lists the constants and their meanings: ## See also -[_sopen, _wsopen](../c-runtime-library/reference/sopen-wsopen.md)
-[_fsopen, _wfsopen](../c-runtime-library/reference/fsopen-wfsopen.md)
-[Global Constants](../c-runtime-library/global-constants.md) +[`_sopen`, `_wsopen`](./reference/sopen-wsopen.md)\ +[`_fsopen`, `_wfsopen`](./reference/fsopen-wfsopen.md)\ +[Global constants](./global-constants.md) diff --git a/docs/c-runtime-library/signal-action-constants.md b/docs/c-runtime-library/signal-action-constants.md index f0a9548149b..f9914c661f4 100644 --- a/docs/c-runtime-library/signal-action-constants.md +++ b/docs/c-runtime-library/signal-action-constants.md @@ -6,7 +6,7 @@ f1_keywords: ["SIG_IGN", "SIG_DFL"] helpviewer_keywords: ["signal action constants", "SIG_IGN constant", "SIG_DFL constant"] ms.assetid: c3cb4f15-d39e-4d9d-84f9-0d33e3eb5993 --- -# signal Action Constants +# signal action constants The action taken when the interrupt signal is received depends on the value of `func`. @@ -30,5 +30,5 @@ The `func` argument must be either a function address or one of the manifest con ## See also -[signal](../c-runtime-library/reference/signal.md)
-[Global Constants](../c-runtime-library/global-constants.md) +[`signal`](./reference/signal.md)\ +[Global constants](./global-constants.md) diff --git a/docs/c-runtime-library/signal-constants.md b/docs/c-runtime-library/signal-constants.md index 5982962d583..f6d53b158f4 100644 --- a/docs/c-runtime-library/signal-constants.md +++ b/docs/c-runtime-library/signal-constants.md @@ -6,7 +6,7 @@ f1_keywords: ["SIGTERM", "SIGFPE", "SIGABRT", "SIGILL", "SIGINT", "SIGSEGV"] helpviewer_keywords: ["SIGTERM constant", "SIGABRT constant", "SIGSEGV constant", "SIGFPE constant", "SIGINT constant", "signal constants", "SIGILL constant"] ms.assetid: a3b39281-dae7-4e44-8d68-e6a610c669dd --- -# signal Constants +# signal constants ## Syntax @@ -31,6 +31,6 @@ The `sig` argument must be one of the manifest constants listed below (defined i ## See also -[signal](../c-runtime-library/reference/signal.md)
-[raise](../c-runtime-library/reference/raise.md)
-[Global Constants](../c-runtime-library/global-constants.md) +[`signal`](./reference/signal.md)\ +[`raise`](./reference/raise.md)\ +[Global constants](./global-constants.md) diff --git a/docs/c-runtime-library/single-byte-and-multibyte-character-sets.md b/docs/c-runtime-library/single-byte-and-multibyte-character-sets.md index ac4d75f5c51..7828ab3cc97 100644 --- a/docs/c-runtime-library/single-byte-and-multibyte-character-sets.md +++ b/docs/c-runtime-library/single-byte-and-multibyte-character-sets.md @@ -6,7 +6,7 @@ ms.date: "11/04/2016" helpviewer_keywords: ["SBCS (single byte character set)", "MBCS [C++], about MBCS", "character sets [C++], multibyte", "character sets [C++], single byte"] ms.assetid: 2cbc78ea-33c0-4cfb-b0df-7ce2458431ce --- -# Single-Byte and Multibyte Character Sets +# Single-byte and multibyte character sets The ASCII character set defines characters in the range 0x00 - 0x7F. There are many other character sets, primarily European, that define the characters within the range 0x00 - 0x7F identically to the ASCII character set and also define an extended character set from 0x80 - 0xFF. An 8-bit, single-byte-character set (SBCS) is sufficient to represent the ASCII character set and the character sets for many European languages. However, some non-European character sets, such as Japanese Kanji, include many more characters than can be represented in a single-byte coding scheme, and so require multibyte-character set (MBCS) encoding. @@ -17,5 +17,5 @@ A multibyte character set can consist of both 1-byte and 2-byte characters. A mu ## 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/spawn-constants.md b/docs/c-runtime-library/spawn-constants.md index b107da8d8dd..d52fcfcf00d 100644 --- a/docs/c-runtime-library/spawn-constants.md +++ b/docs/c-runtime-library/spawn-constants.md @@ -6,7 +6,7 @@ f1_keywords: ["_P_NOWAIT", "_P_OVERLAY", "_P_WAIT", "_P_DETACH", "_P_NOWAITO"] helpviewer_keywords: ["_P_OVERLAY constant", "P_DETACH constant", "P_OVERLAY constant", "P_NOWAIT constant", "_P_DETACH constant", "_P_NOWAIT constant", "_P_NOWAITO constant", "P_NOWAITO constant", "spawn constants", "P_WAIT constant", "_P_WAIT constant"] ms.assetid: e0533e88-d362-46fc-b53c-5f193226d879 --- -# spawn Constants +# spawn constants ## Syntax @@ -27,5 +27,5 @@ The `mode` argument determines the action taken by the calling process before an ## See also -[_spawn, _wspawn Functions](../c-runtime-library/spawn-wspawn-functions.md)
-[Global Constants](../c-runtime-library/global-constants.md) +[`_spawn`, `_wspawn` functions](./spawn-wspawn-functions.md)\ +[Global constants](./global-constants.md) diff --git a/docs/c-runtime-library/spawn-wspawn-functions.md b/docs/c-runtime-library/spawn-wspawn-functions.md index 000a0633103..656ba7e3102 100644 --- a/docs/c-runtime-library/spawn-wspawn-functions.md +++ b/docs/c-runtime-library/spawn-wspawn-functions.md @@ -14,16 +14,16 @@ Each of the `_spawn` functions creates and executes a new process: :::row::: :::column span=""::: - [`_spawnl`, `_wspawnl`](../c-runtime-library/reference/spawnl-wspawnl.md)\ - [`_spawnle`, `_wspawnle`](../c-runtime-library/reference/spawnle-wspawnle.md)\ - [`_spawnlp`, `_wspawnlp`](../c-runtime-library/reference/spawnlp-wspawnlp.md)\ - [`_spawnlpe`, `_wspawnlpe`](../c-runtime-library/reference/spawnlpe-wspawnlpe.md) + [`_spawnl`, `_wspawnl`](./reference/spawnl-wspawnl.md)\ + [`_spawnle`, `_wspawnle`](./reference/spawnle-wspawnle.md)\ + [`_spawnlp`, `_wspawnlp`](./reference/spawnlp-wspawnlp.md)\ + [`_spawnlpe`, `_wspawnlpe`](./reference/spawnlpe-wspawnlpe.md) :::column-end::: :::column span=""::: - [`_spawnv`, `_wspawnv`](../c-runtime-library/reference/spawnv-wspawnv.md)\ - [`_spawnve`, `_wspawnve`](../c-runtime-library/reference/spawnve-wspawnve.md)\ - [`_spawnvp`, `_wspawnvp`](../c-runtime-library/reference/spawnvp-wspawnvp.md)\ - [`_spawnvpe`, `_wspawnvpe`](../c-runtime-library/reference/spawnvpe-wspawnvpe.md) + [`_spawnv`, `_wspawnv`](./reference/spawnv-wspawnv.md)\ + [`_spawnve`, `_wspawnve`](./reference/spawnve-wspawnve.md)\ + [`_spawnvp`, `_wspawnvp`](./reference/spawnvp-wspawnvp.md)\ + [`_spawnvpe`, `_wspawnvpe`](./reference/spawnvpe-wspawnvpe.md) :::column-end::: :::row-end::: @@ -40,7 +40,7 @@ The letters at the end of the function name determine the variation. The `_spawn` functions each create and execute a new process. They automatically handle multibyte-character string arguments as appropriate, recognizing multibyte-character sequences according to the multibyte code page currently in use. The `_wspawn` functions are wide-character versions of the `_spawn` functions; they don't handle multibyte-character strings. Otherwise, the `_wspawn` functions behave identically to their `_spawn` counterparts. -### Generic-Text Routine Mappings +### Generic-text routine mappings |`Tchar.h` routine|`_UNICODE` and `_MBCS` not defined|`_MBCS` defined|`_UNICODE` defined| |---------------------|--------------------------------------|--------------------|-----------------------| @@ -73,7 +73,7 @@ In the past, some of these functions set `errno` to zero on success; the current > [!NOTE] > To ensure proper overlay initialization and termination, do not use the `setjmp` or `longjmp` function to enter or leave an overlay routine. -## Arguments for the Spawned Process +## Arguments for the spawned process To pass arguments to the new process, give one or more pointers to character strings as arguments in the `_spawn` call. These character strings form the argument list for the spawned process. The combined length of the strings forming the argument list for the new process must not exceed 1024 bytes. The terminating null character ('\0') for each string isn't included in the count, but space characters (automatically inserted to separate arguments) are included. @@ -105,7 +105,7 @@ If you're calling `_spawn` from a DLL or a GUI application and want to redirect - Use the Win32 API to create a pipe, then call [`AllocConsole`](/windows/console/allocconsole), set the handle values in the startup structure, and call [`CreateProcess`](/windows/win32/api/processthreadsapi/nf-processthreadsapi-createprocessw). -- Call [`_popen` or `_wpopen`](../c-runtime-library/reference/popen-wpopen.md), which will create a pipe and invoke the app using **`cmd.exe /c`** (or **`command.exe /c`**). +- Call [`_popen` or `_wpopen`](./reference/popen-wpopen.md), which will create a pipe and invoke the app using **`cmd.exe /c`** (or **`command.exe /c`**). ## Example @@ -192,13 +192,13 @@ from SPAWN! ## 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)\ -[`_exec`, `_wexec` Functions](../c-runtime-library/exec-wexec-functions.md)\ -[`exit`, `_Exit`, `_exit`](../c-runtime-library/reference/exit-exit-exit.md)\ -[`_flushall`](../c-runtime-library/reference/flushall.md)\ -[`_getmbcp`](../c-runtime-library/reference/getmbcp.md)\ -[`_onexit`, `_onexit_m`](../c-runtime-library/reference/onexit-onexit-m.md)\ -[`_setmbcp`](../c-runtime-library/reference/setmbcp.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)\ +[`_exec`, `_wexec` functions](./exec-wexec-functions.md)\ +[`exit`, `_Exit`, `_exit`](./reference/exit-exit-exit.md)\ +[`_flushall`](./reference/flushall.md)\ +[`_getmbcp`](./reference/getmbcp.md)\ +[`_onexit`, `_onexit_m`](./reference/onexit-onexit-m.md)\ +[`_setmbcp`](./reference/setmbcp.md)\ +[`system`, `_wsystem`](./reference/system-wsystem.md) diff --git a/docs/c-runtime-library/standard-types.md b/docs/c-runtime-library/standard-types.md index 530c4f6ac3e..e707c6e855a 100644 --- a/docs/c-runtime-library/standard-types.md +++ b/docs/c-runtime-library/standard-types.md @@ -6,7 +6,7 @@ f1_keywords: ["__time64_t", "_diskfree_t", "_CRT_DUMP_CLIENT", "_fsize_t", "__ti helpviewer_keywords: ["__timeb64 type", "tm type", "clock_t type", "intptr_t type", "diskfree_t type", "wctype_t type", "CRT_DUMP_CLIENT type", "sig_atomic_t type", "_PNH type", "time_t type", "wfinddata_t type", "timeb64", "CRT, standard types", "wint_t type", "_RTC_ErrorNumber type", "_diskfree_t type", "_dev_t type", "_wfinddata_t type", "HFILE type", "__utimbuf64 type", "div_t type", "_onexit_t type", "_secerr_handler_func type", "FPIEEE_RECORD type", "HEAPINFO type", "PNH type", "_CRT_ALLOC_HOOK type", "_se_translater_function type", "va_list type", "wctrans_t type", "secerr_handler_func type", "_locale_t type", "timeb type", "lconv type", "utimbuf type", "dev_t type", "unexpected_function typedef", "_complex type", "_off_t type", "off_t type", "RTC_ErrorNumber type", "_FPIEEE_RECORD type", "exception type", "_CRT_REPORT_HOOK type", "_HEAPINFO type", "ldiv_t type", "terminate_function type", "uintptr_t type", "_CRT_DUMP_CLIENT type", "_utimbuf type", "wfinddatai64_t type", "fpos_t type", "wchar_t type", "CRT_ALLOC_HOOK type", "_HFILE type", "__time64_t type", "_timeb type", "CrtMemState type", "__finddata64_t type", "_exception type", "stat type", "onexit_t type", "FILE constant", "_stat type", "finddata_t type", "__wfinddata64_t type", "ptrdiff_t type", "complex types", "_wfinddatai64_t type", "_EXCEPTION_POINTERS type", "jmp_buf type", "se_translater_function type", "size_t type", "EXCEPTION_POINTERS type", "__stat64 type", "_fsize_t type", "CRT_REPORT_HOOK type", "_finddata_t type"] ms.assetid: 23312dd2-4a6a-4d70-9b48-2a5d0d8c9f28 --- -# Standard Types +# Standard types The Microsoft run-time library defines the following standard types and typedefs. @@ -30,63 +30,63 @@ The Microsoft run-time library defines the following standard types and typedefs |Type|Description|Declared in| |----------|-----------------|-----------------| -|`clock_t` (long)|Stores time values; used by [`clock`](../c-runtime-library/reference/clock.md).|`TIME.H`| -|`_complex` structure|Stores real and imaginary parts of complex numbers; used by [`_cabs`](../c-runtime-library/reference/cabs.md).|`MATH.H`| -|`_CRT_ALLOC_HOOK`|A type definition for the user-defined hook function. Used in [`_CrtSetAllocHook`](../c-runtime-library/reference/crtsetallochook.md).|`CRTDBG.H`| -|`_CRT_DUMP_CLIENT`,

`_CRT_DUMP_CLIENT_M`|A type definition for a call-back function that will get called in [`_CrtMemDumpAllObjectsSince`](../c-runtime-library/reference/crtmemdumpallobjectssince.md).|`CRTDBG.H`| +|`clock_t` (long)|Stores time values; used by [`clock`](./reference/clock.md).|`TIME.H`| +|`_complex` structure|Stores real and imaginary parts of complex numbers; used by [`_cabs`](./reference/cabs.md).|`MATH.H`| +|`_CRT_ALLOC_HOOK`|A type definition for the user-defined hook function. Used in [`_CrtSetAllocHook`](./reference/crtsetallochook.md).|`CRTDBG.H`| +|`_CRT_DUMP_CLIENT`,

`_CRT_DUMP_CLIENT_M`|A type definition for a call-back function that will get called in [`_CrtMemDumpAllObjectsSince`](./reference/crtmemdumpallobjectssince.md).|`CRTDBG.H`| |`_CrtMemState` structure|Provides information about the current state of the C run-time debug heap.|`CRTDBG.H`| -|`_CRT_REPORT_HOOK`,

`_CRT_REPORT_HOOKW`,

`_CRT_REPORT_HOOKW_M`|A type definition for a call-back function that will get called in [`_CrtDbgReport`](../c-runtime-library/reference/crtdbgreport-crtdbgreportw.md).

The parameters for this function are: report type, output message and the return value from the call-back function.|`CRTDBG.H`| +|`_CRT_REPORT_HOOK`,

`_CRT_REPORT_HOOKW`,

`_CRT_REPORT_HOOKW_M`|A type definition for a call-back function that will get called in [`_CrtDbgReport`](./reference/crtdbgreport-crtdbgreportw.md).

The parameters for this function are: report type, output message and the return value from the call-back function.|`CRTDBG.H`| |`dev_t`, `_dev_t` short or unsigned integer|Represents device handles.|`SYS\TYPES.H`| -|`_diskfree_t` structure|Contains information about a disk drive. Used by [`_getdiskfree`](../c-runtime-library/reference/getdiskfree.md)**.**|`DOS.H` and `DIRECT.H`| +|`_diskfree_t` structure|Contains information about a disk drive. Used by [`_getdiskfree`](./reference/getdiskfree.md)**.**|`DOS.H` and `DIRECT.H`| |`div_t`, `ldiv_t` and `lldiv_t` structures|Store values returned by [`div`](reference/div.md), [`ldiv`](./reference/div.md), and [`lldiv`](./reference/div.md), respectively.|`STDLIB.H`| |`errno_t` integer|Used for a function return type or parameter that deals with the error codes of `errno`.|`STDDEF.H`,

`CRTDEFS.H`| -|`_exception` structure|Stores error information for [`_matherr`](../c-runtime-library/reference/matherr.md).|`MATH.H`| +|`_exception` structure|Stores error information for [`_matherr`](./reference/matherr.md).|`MATH.H`| |`_EXCEPTION_POINTERS`|Contains an exception record. For more information, see [`EXCEPTION_POINTERS`](/windows/win32/api/winnt/ns-winnt-exception_pointers).|`FPIEEE.H`| |`FILE` structure|Stores information about current state of stream; used in all stream I/O operations.|`STDIO.H`| -|`_finddata_t`, `_wfinddata_t`, `_finddata32_t`, `_wfinddata32_t`, `_finddatai64_t`, `_wfinddatai64_t`, `__finddata64_t`, `__wfinddata64_t`, `__finddata32i64_t`, `__wfinddata32i64_t`, `__finddata64i32_t`, `__wfinddata64i32_t` structures|Store file-attribute information returned by [`_findfirst`, `_wfindfirst`, and related functions](../c-runtime-library/reference/findfirst-functions.md) and [`_findnext`, `_wfindnext` and related functions](../c-runtime-library/reference/findnext-functions.md). See [Filename Search Functions](../c-runtime-library/filename-search-functions.md) for information on structure members.|`IO.H`, `WCHAR.H`| -|`_FPIEEE_RECORD` structure|Contains information pertaining to IEEE floating-point exception; passed to user-defined trap handler by [`_fpieee_flt`](../c-runtime-library/reference/fpieee-flt.md).|`FPIEEE.H`| -|`fpos_t` (`long integer`, **`__int64`**, or structure, depending on the target platform)|Used by [`fgetpos`](../c-runtime-library/reference/fgetpos.md) and [`fsetpos`](../c-runtime-library/reference/fsetpos.md) to record information for uniquely specifying every position within a file.|`STDIO.H`| +|`_finddata_t`, `_wfinddata_t`, `_finddata32_t`, `_wfinddata32_t`, `_finddatai64_t`, `_wfinddatai64_t`, `__finddata64_t`, `__wfinddata64_t`, `__finddata32i64_t`, `__wfinddata32i64_t`, `__finddata64i32_t`, `__wfinddata64i32_t` structures|Store file-attribute information returned by [`_findfirst`, `_wfindfirst`, and related functions](./reference/findfirst-functions.md) and [`_findnext`, `_wfindnext` and related functions](./reference/findnext-functions.md). See [Filename search functions](./filename-search-functions.md) for information on structure members.|`IO.H`, `WCHAR.H`| +|`_FPIEEE_RECORD` structure|Contains information pertaining to IEEE floating-point exception; passed to user-defined trap handler by [`_fpieee_flt`](./reference/fpieee-flt.md).|`FPIEEE.H`| +|`fpos_t` (`long integer`, **`__int64`**, or structure, depending on the target platform)|Used by [`fgetpos`](./reference/fgetpos.md) and [`fsetpos`](./reference/fsetpos.md) to record information for uniquely specifying every position within a file.|`STDIO.H`| |`_fsize_t` (`unsigned long integer`)|Used to represent the size of a file.|`IO.H`,

`WCHAR.H`| -|`_HEAPINFO` structure|Contains information about next heap entry for [`_heapwalk`](../c-runtime-library/reference/heapwalk.md).|`MALLOC.H`| +|`_HEAPINFO` structure|Contains information about next heap entry for [`_heapwalk`](./reference/heapwalk.md).|`MALLOC.H`| |`_HFILE` (void \*)|An operating system file handle.|`CRTDBG.H`| -|`imaxdiv_t`|The type of value that's returned by the [`imaxdiv`](../c-runtime-library/reference/imaxdiv.md) function, containing both the quotient and the remainder.|`inttypes.h`| +|`imaxdiv_t`|The type of value that's returned by the [`imaxdiv`](./reference/imaxdiv.md) function, containing both the quotient and the remainder.|`inttypes.h`| |`ino_t`, `_ino_t` (`unsigned short`)|For returning status information.|`WCHAR.H`| |`intmax_t`|A signed integer type capable of representing any value of any signed integer type.|stdint.h| |`intptr_t` (`long integer` or **`__int64`**, depending on the target platform)|Stores a pointer (or `HANDLE`) on both Win32 and Win64 platforms.|`STDDEF.H` and other include files| -|`jmp_buf` array|Used by [`setjmp`](../c-runtime-library/reference/setjmp.md) and [`longjmp`](../c-runtime-library/reference/longjmp.md) to save and restore program environment.|`SETJMP.H`| -|`lconv` structure|Contains formatting rules for numeric values in different countries/regions. Used by [`localeconv`](../c-runtime-library/reference/localeconv.md).|`LOCALE.H`| +|`jmp_buf` array|Used by [`setjmp`](./reference/setjmp.md) and [`longjmp`](./reference/longjmp.md) to save and restore program environment.|`SETJMP.H`| +|`lconv` structure|Contains formatting rules for numeric values in different countries/regions. Used by [`localeconv`](./reference/localeconv.md).|`LOCALE.H`| |`_LDOUBLE`,

`_LONGDOUBLE`,

`_LDBL12` (long double or an unsigned char array)|Use to represent a long double value.|`STDLIB.H`| |`_locale_t` structure|Stores current locale values; used in all locale specific C run-time libraries.|`CRTDEFS.H`| |`mbstate_t`|Tracks the state of a multibyte character conversion.|`WCHAR.H`| |`off_t`, `_off_t` `long integer`|Represents file-offset value.|`WCHAR.H`, `SYS\TYPES.H`| -|`_onexit_t`,

`_onexit_m_t` pointer|Returned by [`_onexit`, `_onexit_m`](../c-runtime-library/reference/onexit-onexit-m.md).|`STDLIB.H`| -|`_PNH` pointer to function|Type of argument to [`_set_new_handler`](../c-runtime-library/reference/set-new-handler.md).|`NEW.H`| +|`_onexit_t`,

`_onexit_m_t` pointer|Returned by [`_onexit`, `_onexit_m`](./reference/onexit-onexit-m.md).|`STDLIB.H`| +|`_PNH` pointer to function|Type of argument to [`_set_new_handler`](./reference/set-new-handler.md).|`NEW.H`| |`ptrdiff_t` (long integer or **`__int64`**, depending on the target platform)|Result of subtraction of two pointers.|`CRTDEFS.H`| -|`_purecall_handler`,

`_purecall_handler_m`|A type definition for a call-back function that is called when a pure virtual function is called. Used by [`_get_purecall_handler`, _set_purecall_handler](../c-runtime-library/reference/get-purecall-handler-set-purecall-handler.md). A `_purecall_handler` function should have a void return type.|`STDLIB.H`| -|`_RTC_error_fn` type definition|A type definition for a function that will handle run-time error checks. Used in [_RTC_SetErrorFunc](../c-runtime-library/reference/rtc-seterrorfunc.md).|`RTCAPI.H`| -|`_RTC_error_fnW` type definition|A type definition for a function that will handle run-time error checks. Used in [`_RTC_SetErrorFuncW`](../c-runtime-library/reference/rtc-seterrorfuncw.md).|`RTCAPI.H`| -|`_RTC_ErrorNumber` enumeration|Defines error conditions for [`_RTC_GetErrDesc`](../c-runtime-library/reference/rtc-geterrdesc.md) and [`_RTC_SetErrorType`](../c-runtime-library/reference/rtc-seterrortype.md).|`RTCAPI.H`| -|`_se_translator_function`|A type definition for a call-back function that translates an exception. The first parameter is the exception code and the second parameter is the exception record. Used by [`_set_se_translator`](../c-runtime-library/reference/set-se-translator.md).|`EH.H`| -|`sig_atomic_t` integer|Type of object that can be modified as atomic entity, even in presence of asynchronous interrupts; used with [`signal`](../c-runtime-library/reference/signal.md).|`SIGNAL.H`| +|`_purecall_handler`,

`_purecall_handler_m`|A type definition for a call-back function that is called when a pure virtual function is called. Used by [`_get_purecall_handler`, _set_purecall_handler](./reference/get-purecall-handler-set-purecall-handler.md). A `_purecall_handler` function should have a void return type.|`STDLIB.H`| +|`_RTC_error_fn` type definition|A type definition for a function that will handle run-time error checks. Used in [`_RTC_SetErrorFunc`](./reference/rtc-seterrorfunc.md).|`RTCAPI.H`| +|`_RTC_error_fnW` type definition|A type definition for a function that will handle run-time error checks. Used in [`_RTC_SetErrorFuncW`](./reference/rtc-seterrorfuncw.md).|`RTCAPI.H`| +|`_RTC_ErrorNumber` enumeration|Defines error conditions for [`_RTC_GetErrDesc`](./reference/rtc-geterrdesc.md) and [`_RTC_SetErrorType`](./reference/rtc-seterrortype.md).|`RTCAPI.H`| +|`_se_translator_function`|A type definition for a call-back function that translates an exception. The first parameter is the exception code and the second parameter is the exception record. Used by [`_set_se_translator`](./reference/set-se-translator.md).|`EH.H`| +|`sig_atomic_t` integer|Type of object that can be modified as atomic entity, even in presence of asynchronous interrupts; used with [`signal`](./reference/signal.md).|`SIGNAL.H`| |`size_t` (`unsigned __int64` or `unsigned integer`, depending on the target platform)|Result of **`sizeof`** operator.|`CRTDEFS.H` and other include files| -|`_stat` structure|Contains file-status information returned by [`_stat`](../c-runtime-library/reference/stat-functions.md) and [`_fstat`](../c-runtime-library/reference/fstat-fstat32-fstat64-fstati64-fstat32i64-fstat64i32.md).|`SYS\STAT.H`| -|`__stat64` structure|Contains file-status information returned by [`_fstat64`](../c-runtime-library/reference/fstat-fstat32-fstat64-fstati64-fstat32i64-fstat64i32.md) and [`_stat64`](../c-runtime-library/reference/stat-functions.md), and [`_wstat64`](../c-runtime-library/reference/stat-functions.md).|`SYS\STAT.H`| -|`_stati64` structure|Contains file-status information returned by [`_fstati64`](../c-runtime-library/reference/fstat-fstat32-fstat64-fstati64-fstat32i64-fstat64i32.md), [`_stati64`](../c-runtime-library/reference/stat-functions.md), and [`_wstati64`](../c-runtime-library/reference/stat-functions.md).|`SYS\STAT.H`| -|`terminate_function` type definition|A type definition for a call-back function that is called when [`terminate`](../c-runtime-library/reference/terminate-crt.md) is called. Used by [`set_terminate`](../c-runtime-library/reference/set-terminate-crt.md).|`EH.H`| -|`time_t` (`__int64` or `long integer`)|Represents time values in [`mktime`](../c-runtime-library/reference/mktime-mktime32-mktime64.md), [`time`](../c-runtime-library/reference/time-time32-time64.md), [`ctime`, `_ctime32`, `_ctime64`, `_wctime`, `_wctime32`, `_wctime64`](../c-runtime-library/reference/ctime-ctime32-ctime64-wctime-wctime32-wctime64.md), [`ctime_s`, `_ctime32_s`, `_ctime64_s`, `_wctime_s`, _wctime32_s, _wctime64_s](../c-runtime-library/reference/ctime-s-ctime32-s-ctime64-s-wctime-s-wctime32-s-wctime64-s.md), [`ctime`, `_ctime32`, `_ctime64`, `_wctime`, `_wctime32`, `_wctime64`](../c-runtime-library/reference/ctime-ctime32-ctime64-wctime-wctime32-wctime64.md) and [`gmtime`, `_gmtime32`, `_gmtime64`](../c-runtime-library/reference/gmtime-gmtime32-gmtime64.md). The number of seconds since January 1, 1970, 0:00 UTC. If `_USE_32BIT_TIME_T` is defined, `time_t` is a long integer. If not defined, it's a 64-bit integer.|`TIME.H`,

`SYS\STAT.H`,

`SYS\TIMEB.H`| -|`__time32_t` (`long integer`)|Represents time values in [`mktime`, `_mktime32`, `_mktime64`](../c-runtime-library/reference/mktime-mktime32-mktime64.md), [`ctime`, `_ctime32`, `_ctime64`, `_wctime`, `_wctime32`, `_wctime64`](../c-runtime-library/reference/ctime-ctime32-ctime64-wctime-wctime32-wctime64.md), [`ctime_s`, `_ctime32_s`, `_ctime64_s`, `_wctime_s`, `_wctime32_s`, `_wctime64_s`](../c-runtime-library/reference/ctime-s-ctime32-s-ctime64-s-wctime-s-wctime32-s-wctime64-s.md), [`gmtime`, `_gmtime32`, `_gmtime64`](../c-runtime-library/reference/gmtime-gmtime32-gmtime64.md) and [`localtime`, `_localtime32`, `_localtime64`](../c-runtime-library/reference/localtime-localtime32-localtime64.md).|`CRTDEFS.H`, `SYS\STAT.H`,

`SYS\TIMEB.H`| -|`__time64_t` (**`__int64`**)|Represents time values in [`mktime`, `_mktime32`, `_mktime64`](../c-runtime-library/reference/mktime-mktime32-mktime64.md), [`_ctime64`, `_wctime64`](../c-runtime-library/reference/ctime-ctime32-ctime64-wctime-wctime32-wctime64.md), [`ctime_s`, `_ctime32_s`, `_ctime64_s`, `_wctime_s`, `_wctime32_s`, `_wctime64_s`](../c-runtime-library/reference/ctime-s-ctime32-s-ctime64-s-wctime-s-wctime32-s-wctime64-s.md), [`_gmtime64`](../c-runtime-library/reference/gmtime-gmtime32-gmtime64.md), [`_localtime64`](../c-runtime-library/reference/localtime-localtime32-localtime64.md) and [`_time64`](../c-runtime-library/reference/time-time32-time64.md).|`TIME.H`,

`SYS\STAT.H`,

`SYS\TIMEB.H`| -|`_timeb` structure|The [`_ftime`](../c-runtime-library/reference/ftime-ftime32-ftime64.md) and [`_ftime_s`, `_ftime32_s`, `_ftime64_s`](../c-runtime-library/reference/ftime-s-ftime32-s-ftime64-s.md) functions use it to store current system time.|`SYS\TIMEB.H`| -|`__timeb32` structure|The [`_ftime`, `_ftime32`, `_ftime64`](../c-runtime-library/reference/ftime-ftime32-ftime64.md) and [`_ftime_s`, `_ftime32_s`, `_ftime64_s`](../c-runtime-library/reference/ftime-s-ftime32-s-ftime64-s.md) functions use it to store current system time.|`SYS\TIMEB.H`| -|`__timeb64` structure|The [`_ftime64`](../c-runtime-library/reference/ftime-ftime32-ftime64.md) and [`_ftime_s`, `_ftime32_s`, `_ftime64_s`](../c-runtime-library/reference/ftime-s-ftime32-s-ftime64-s.md) functions use it to store current system time.|`SYS\TIMEB.H`| -|`tm` structure|The [`asctime`, `_wasctime`](../c-runtime-library/reference/asctime-wasctime.md), [`asctime_s`, `_wasctime_s`](../c-runtime-library/reference/asctime-s-wasctime-s.md), [`gmtime`, `_gmtime32`, `_gmtime64`](../c-runtime-library/reference/gmtime-gmtime32-gmtime64.md), [`gmtime_s`, `_gmtime32_s`, `_gmtime64_s`](../c-runtime-library/reference/gmtime-s-gmtime32-s-gmtime64-s.md), [`localtime`, `_localtime32`, `_localtime64`](../c-runtime-library/reference/localtime-localtime32-localtime64.md), [`localtime_s`, `_localtime32_s`, `_localtime64_s`](../c-runtime-library/reference/localtime-s-localtime32-s-localtime64-s.md), [`mktime`, `_mktime32`, `_mktime64`](../c-runtime-library/reference/mktime-mktime32-mktime64.md) and [`strftime`, `wcsftime`, _strftime_l, _wcsftime_l](../c-runtime-library/reference/strftime-wcsftime-strftime-l-wcsftime-l.md) functions use it to store and retrieve time information.|`TIME.H`| +|`_stat` structure|Contains file-status information returned by [`_stat`](./reference/stat-functions.md) and [`_fstat`](./reference/fstat-fstat32-fstat64-fstati64-fstat32i64-fstat64i32.md).|`SYS\STAT.H`| +|`__stat64` structure|Contains file-status information returned by [`_fstat64`](./reference/fstat-fstat32-fstat64-fstati64-fstat32i64-fstat64i32.md) and [`_stat64`](./reference/stat-functions.md), and [`_wstat64`](./reference/stat-functions.md).|`SYS\STAT.H`| +|`_stati64` structure|Contains file-status information returned by [`_fstati64`](./reference/fstat-fstat32-fstat64-fstati64-fstat32i64-fstat64i32.md), [`_stati64`](./reference/stat-functions.md), and [`_wstati64`](./reference/stat-functions.md).|`SYS\STAT.H`| +|`terminate_function` type definition|A type definition for a call-back function that is called when [`terminate`](./reference/terminate-crt.md) is called. Used by [`set_terminate`](./reference/set-terminate-crt.md).|`EH.H`| +|`time_t` (`__int64` or `long integer`)|Represents time values in [`mktime`](./reference/mktime-mktime32-mktime64.md), [`time`](./reference/time-time32-time64.md), [`ctime`, `_ctime32`, `_ctime64`, `_wctime`, `_wctime32`, `_wctime64`](./reference/ctime-ctime32-ctime64-wctime-wctime32-wctime64.md), [`ctime_s`, `_ctime32_s`, `_ctime64_s`, `_wctime_s`, _wctime32_s, _wctime64_s](./reference/ctime-s-ctime32-s-ctime64-s-wctime-s-wctime32-s-wctime64-s.md), [`ctime`, `_ctime32`, `_ctime64`, `_wctime`, `_wctime32`, `_wctime64`](./reference/ctime-ctime32-ctime64-wctime-wctime32-wctime64.md) and [`gmtime`, `_gmtime32`, `_gmtime64`](./reference/gmtime-gmtime32-gmtime64.md). The number of seconds since January 1, 1970, 0:00 UTC. If `_USE_32BIT_TIME_T` is defined, `time_t` is a long integer. If not defined, it's a 64-bit integer.|`TIME.H`,

`SYS\STAT.H`,

`SYS\TIMEB.H`| +|`__time32_t` (`long integer`)|Represents time values in [`mktime`, `_mktime32`, `_mktime64`](./reference/mktime-mktime32-mktime64.md), [`ctime`, `_ctime32`, `_ctime64`, `_wctime`, `_wctime32`, `_wctime64`](./reference/ctime-ctime32-ctime64-wctime-wctime32-wctime64.md), [`ctime_s`, `_ctime32_s`, `_ctime64_s`, `_wctime_s`, `_wctime32_s`, `_wctime64_s`](./reference/ctime-s-ctime32-s-ctime64-s-wctime-s-wctime32-s-wctime64-s.md), [`gmtime`, `_gmtime32`, `_gmtime64`](./reference/gmtime-gmtime32-gmtime64.md) and [`localtime`, `_localtime32`, `_localtime64`](./reference/localtime-localtime32-localtime64.md).|`CRTDEFS.H`, `SYS\STAT.H`,

`SYS\TIMEB.H`| +|`__time64_t` (**`__int64`**)|Represents time values in [`mktime`, `_mktime32`, `_mktime64`](./reference/mktime-mktime32-mktime64.md), [`_ctime64`, `_wctime64`](./reference/ctime-ctime32-ctime64-wctime-wctime32-wctime64.md), [`ctime_s`, `_ctime32_s`, `_ctime64_s`, `_wctime_s`, `_wctime32_s`, `_wctime64_s`](./reference/ctime-s-ctime32-s-ctime64-s-wctime-s-wctime32-s-wctime64-s.md), [`_gmtime64`](./reference/gmtime-gmtime32-gmtime64.md), [`_localtime64`](./reference/localtime-localtime32-localtime64.md) and [`_time64`](./reference/time-time32-time64.md).|`TIME.H`,

`SYS\STAT.H`,

`SYS\TIMEB.H`| +|`_timeb` structure|The [`_ftime`](./reference/ftime-ftime32-ftime64.md) and [`_ftime_s`, `_ftime32_s`, `_ftime64_s`](./reference/ftime-s-ftime32-s-ftime64-s.md) functions use it to store current system time.|`SYS\TIMEB.H`| +|`__timeb32` structure|The [`_ftime`, `_ftime32`, `_ftime64`](./reference/ftime-ftime32-ftime64.md) and [`_ftime_s`, `_ftime32_s`, `_ftime64_s`](./reference/ftime-s-ftime32-s-ftime64-s.md) functions use it to store current system time.|`SYS\TIMEB.H`| +|`__timeb64` structure|The [`_ftime64`](./reference/ftime-ftime32-ftime64.md) and [`_ftime_s`, `_ftime32_s`, `_ftime64_s`](./reference/ftime-s-ftime32-s-ftime64-s.md) functions use it to store current system time.|`SYS\TIMEB.H`| +|`tm` structure|The [`asctime`, `_wasctime`](./reference/asctime-wasctime.md), [`asctime_s`, `_wasctime_s`](./reference/asctime-s-wasctime-s.md), [`gmtime`, `_gmtime32`, `_gmtime64`](./reference/gmtime-gmtime32-gmtime64.md), [`gmtime_s`, `_gmtime32_s`, `_gmtime64_s`](./reference/gmtime-s-gmtime32-s-gmtime64-s.md), [`localtime`, `_localtime32`, `_localtime64`](./reference/localtime-localtime32-localtime64.md), [`localtime_s`, `_localtime32_s`, `_localtime64_s`](./reference/localtime-s-localtime32-s-localtime64-s.md), [`mktime`, `_mktime32`, `_mktime64`](./reference/mktime-mktime32-mktime64.md) and [`strftime`, `wcsftime`, _strftime_l, _wcsftime_l](./reference/strftime-wcsftime-strftime-l-wcsftime-l.md) functions use it to store and retrieve time information.|`TIME.H`| |`uintmax_t`|An `unsigned integer` type capable of representing any value of any `unsigned integer` type.|`stdint.h`| |`uintptr_t` (`long integer` or **`__int64`**, depending on the target platform)|An `unsigned integer` or `unsigned __int64` version of `intptr_t`.|`STDDEF.H` and other include files| -|`unexpected_function`|A type definition for a call-back function that is called when [`unexpected`](../c-runtime-library/reference/unexpected-crt.md) is called. Used by [`set_unexpected`](../c-runtime-library/reference/set-unexpected-crt.md).|`EH.H`| -|`_utimbuf` structure|Stores file access and modification times used by [`_utime`, `_wutime`](../c-runtime-library/reference/utime-utime32-utime64-wutime-wutime32-wutime64.md) and [`_futime`, `_futime32`, `_futime64`](../c-runtime-library/reference/futime-futime32-futime64.md) to change file-modification dates.|`SYS\UTIME.H`| -|`_utimbuf32` structure|Stores file access and modification times used by [`_utime`, `_utime32`, `_utime64`, `_wutime`, `_wutime32`, `_wutime64`](../c-runtime-library/reference/utime-utime32-utime64-wutime-wutime32-wutime64.md) and [`_futime`, `_futime32`, `_futime64`](../c-runtime-library/reference/futime-futime32-futime64.md) to change file-modification dates.|`SYS\UTIME.H`| -|`__utimbuf64` structure|The [`_utime64`, `_wutime64`](../c-runtime-library/reference/utime-utime32-utime64-wutime-wutime32-wutime64.md) and [_futime64](../c-runtime-library/reference/futime-futime32-futime64.md) functions use it to store the current time.|`SYS\UTIME.H`| -|`va_list` structure|Used to hold information needed by [`va_arg`](../c-runtime-library/reference/va-arg-va-copy-va-end-va-start.md) and [`va_end`](../c-runtime-library/reference/va-arg-va-copy-va-end-va-start.md) macros. Called function declares variable of type `va_list` that can be passed as argument to another function.|`STDARG.H`,

`CRTDEFS.H`| +|`unexpected_function`|A type definition for a call-back function that is called when [`unexpected`](./reference/unexpected-crt.md) is called. Used by [`set_unexpected`](./reference/set-unexpected-crt.md).|`EH.H`| +|`_utimbuf` structure|Stores file access and modification times used by [`_utime`, `_wutime`](./reference/utime-utime32-utime64-wutime-wutime32-wutime64.md) and [`_futime`, `_futime32`, `_futime64`](./reference/futime-futime32-futime64.md) to change file-modification dates.|`SYS\UTIME.H`| +|`_utimbuf32` structure|Stores file access and modification times used by [`_utime`, `_utime32`, `_utime64`, `_wutime`, `_wutime32`, `_wutime64`](./reference/utime-utime32-utime64-wutime-wutime32-wutime64.md) and [`_futime`, `_futime32`, `_futime64`](./reference/futime-futime32-futime64.md) to change file-modification dates.|`SYS\UTIME.H`| +|`__utimbuf64` structure|The [`_utime64`, `_wutime64`](./reference/utime-utime32-utime64-wutime-wutime32-wutime64.md) and [`_futime64`](./reference/futime-futime32-futime64.md) functions use it to store the current time.|`SYS\UTIME.H`| +|`va_list` structure|Used to hold information needed by [`va_arg`](./reference/va-arg-va-copy-va-end-va-start.md) and [`va_end`](./reference/va-arg-va-copy-va-end-va-start.md) macros. Called function declares variable of type `va_list` that can be passed as argument to another function.|`STDARG.H`,

`CRTDEFS.H`| |**`wchar_t`** wide character|Useful for writing portable programs for international markets.|`STDDEF.H`, `STDLIB.H`,

`CRTDEFS.H`,

`SYS\STAT.H`| |`wctrans_t` integer|Represents locale-specific character mappings.|`WCTYPE.H`| |`wctype_t` integer|Can represent all characters of any language character set.|`WCHAR.H`,

`CRTDEFS.H`| @@ -94,4 +94,4 @@ The Microsoft run-time library defines the following standard types and typedefs ## See also -[C Run-Time Library Reference](../c-runtime-library/c-run-time-library-reference.md) +[C runtime library reference](./c-run-time-library-reference.md) diff --git a/docs/c-runtime-library/stat-structure-st-mode-field-constants.md b/docs/c-runtime-library/stat-structure-st-mode-field-constants.md index 974e7bdaf02..b2de049ae2d 100644 --- a/docs/c-runtime-library/stat-structure-st-mode-field-constants.md +++ b/docs/c-runtime-library/stat-structure-st-mode-field-constants.md @@ -6,7 +6,7 @@ f1_keywords: ["S_IFCHR", "S_IFDIR", "_S_IWRITE", "S_IFMT", "_S_IFDIR", "_S_IREAD helpviewer_keywords: ["S_IFDIR constant", "stat structure", "S_IWRITE constant", "S_IEXEC constant", "_S_IFREG constant", "S_IREAD constant", "stat structure, constants", "_S_IFMT constant", "st_mode field constants", "S_IFMT constant", "_S_IEXEC constant", "_S_IWRITE constant", "_S_IFDIR constant", "S_IFREG constant", "S_IFCHR constant", "_S_IREAD constant", "_S_IFCHR constant"] ms.assetid: fd462004-7563-4766-8443-30b0a86174b6 --- -# _stat Structure st_mode Field Constants +# `_stat` structure `st_mode` field constants ## Syntax @@ -16,7 +16,7 @@ ms.assetid: fd462004-7563-4766-8443-30b0a86174b6 ## Remarks -These constants are used to indicate file type in the **st_mode** field of the [_stat structure](../c-runtime-library/standard-types.md). +These constants are used to indicate file type in the **st_mode** field of the [`_stat` structure](./standard-types.md). The bit mask constants are described below: @@ -32,7 +32,7 @@ The bit mask constants are described below: ## See also -[_stat, _wstat Functions](../c-runtime-library/reference/stat-functions.md)
-[_fstat, _fstat32, _fstat64, _fstati64, _fstat32i64, _fstat64i32](../c-runtime-library/reference/fstat-fstat32-fstat64-fstati64-fstat32i64-fstat64i32.md)
-[Standard Types](../c-runtime-library/standard-types.md)
-[Global Constants](../c-runtime-library/global-constants.md) +[`_stat`, `_wstat` functions](./reference/stat-functions.md)\ +[`_fstat`, `_fstat32`, `_fstat64`, `_fstati64`, `_fstat32i64`, `_fstat64i32`](./reference/fstat-fstat32-fstat64-fstati64-fstat32i64-fstat64i32.md)\ +[Standard types](./standard-types.md)\ +[Global constants](./global-constants.md) diff --git a/docs/c-runtime-library/stdin-stdout-stderr.md b/docs/c-runtime-library/stdin-stdout-stderr.md index a4d6cf52dce..c4b684ec0da 100644 --- a/docs/c-runtime-library/stdin-stdout-stderr.md +++ b/docs/c-runtime-library/stdin-stdout-stderr.md @@ -31,11 +31,11 @@ The following stream pointers are available to access the standard streams: |`stdout`|Standard output| |`stderr`|Standard error| -These pointers can be used as arguments to functions. Some functions, such as [`getchar`](../c-runtime-library/reference/getchar-getwchar.md) and [`putchar`](../c-runtime-library/reference/putchar-putwchar.md), use `stdin` and `stdout` automatically. +These pointers can be used as arguments to functions. Some functions, such as [`getchar`](./reference/getchar-getwchar.md) and [`putchar`](./reference/putchar-putwchar.md), use `stdin` and `stdout` automatically. -These pointers are constants, and can't be assigned new values. The [`freopen`](../c-runtime-library/reference/freopen-wfreopen.md) function can be used to redirect the streams to disk files or to other devices. The operating system allows you to redirect a program's standard input and output at the command level. +These pointers are constants, and can't be assigned new values. The [`freopen`](./reference/freopen-wfreopen.md) function can be used to redirect the streams to disk files or to other devices. The operating system allows you to redirect a program's standard input and output at the command level. ## See also -[Stream I/O](../c-runtime-library/stream-i-o.md)
-[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/strcoll-functions.md b/docs/c-runtime-library/strcoll-functions.md index 1f48b60bda0..ceba46963d0 100644 --- a/docs/c-runtime-library/strcoll-functions.md +++ b/docs/c-runtime-library/strcoll-functions.md @@ -17,14 +17,14 @@ Each of the `strcoll` and `wcscoll` functions compares two strings according to |SBCS|Unicode|MBCS|Description| |----------|-------------|----------|-----------------| -|[strcoll](../c-runtime-library/reference/strcoll-wcscoll-mbscoll-strcoll-l-wcscoll-l-mbscoll-l.md)|[wcscoll](../c-runtime-library/reference/strcoll-wcscoll-mbscoll-strcoll-l-wcscoll-l-mbscoll-l.md)|[_mbscoll](../c-runtime-library/reference/strcoll-wcscoll-mbscoll-strcoll-l-wcscoll-l-mbscoll-l.md)|Collate two strings| -|[_stricoll](../c-runtime-library/reference/stricoll-wcsicoll-mbsicoll-stricoll-l-wcsicoll-l-mbsicoll-l.md)|[_wcsicoll](../c-runtime-library/reference/stricoll-wcsicoll-mbsicoll-stricoll-l-wcsicoll-l-mbsicoll-l.md)|[_mbsicoll](../c-runtime-library/reference/stricoll-wcsicoll-mbsicoll-stricoll-l-wcsicoll-l-mbsicoll-l.md)|Collate two strings (case insensitive)| -|[_strncoll](../c-runtime-library/reference/strncoll-wcsncoll-mbsncoll-strncoll-l-wcsncoll-l-mbsncoll-l.md)|[_wcsncoll](../c-runtime-library/reference/strncoll-wcsncoll-mbsncoll-strncoll-l-wcsncoll-l-mbsncoll-l.md)|[_mbsncoll](../c-runtime-library/reference/strncoll-wcsncoll-mbsncoll-strncoll-l-wcsncoll-l-mbsncoll-l.md)|Collate first `count` characters of two strings| -|[_strnicoll](../c-runtime-library/reference/strnicoll-wcsnicoll-mbsnicoll-strnicoll-l-wcsnicoll-l-mbsnicoll-l.md)|[_wcsnicoll](../c-runtime-library/reference/strnicoll-wcsnicoll-mbsnicoll-strnicoll-l-wcsnicoll-l-mbsnicoll-l.md)|[_mbsnicoll](../c-runtime-library/reference/strnicoll-wcsnicoll-mbsnicoll-strnicoll-l-wcsnicoll-l-mbsnicoll-l.md)|Collate first `count` characters of two strings (case-insensitive)| +|[`strcoll`](./reference/strcoll-wcscoll-mbscoll-strcoll-l-wcscoll-l-mbscoll-l.md)|[`wcscoll`](./reference/strcoll-wcscoll-mbscoll-strcoll-l-wcscoll-l-mbscoll-l.md)|[`_mbscoll`](./reference/strcoll-wcscoll-mbscoll-strcoll-l-wcscoll-l-mbscoll-l.md)|Collate two strings| +|[`_stricoll`](./reference/stricoll-wcsicoll-mbsicoll-stricoll-l-wcsicoll-l-mbsicoll-l.md)|[`_wcsicoll`](./reference/stricoll-wcsicoll-mbsicoll-stricoll-l-wcsicoll-l-mbsicoll-l.md)|[`_mbsicoll`](./reference/stricoll-wcsicoll-mbsicoll-stricoll-l-wcsicoll-l-mbsicoll-l.md)|Collate two strings (case insensitive)| +|[`_strncoll`](./reference/strncoll-wcsncoll-mbsncoll-strncoll-l-wcsncoll-l-mbsncoll-l.md)|[`_wcsncoll`](./reference/strncoll-wcsncoll-mbsncoll-strncoll-l-wcsncoll-l-mbsncoll-l.md)|[`_mbsncoll`](./reference/strncoll-wcsncoll-mbsncoll-strncoll-l-wcsncoll-l-mbsncoll-l.md)|Collate first `count` characters of two strings| +|[`_strnicoll`](./reference/strnicoll-wcsnicoll-mbsnicoll-strnicoll-l-wcsnicoll-l-mbsnicoll-l.md)|[`_wcsnicoll`](./reference/strnicoll-wcsnicoll-mbsnicoll-strnicoll-l-wcsnicoll-l-mbsnicoll-l.md)|[`_mbsnicoll`](./reference/strnicoll-wcsnicoll-mbsnicoll-strnicoll-l-wcsnicoll-l-mbsnicoll-l.md)|Collate first `count` characters of two strings (case-insensitive)| ## Remarks -The single-byte character (SBCS) versions of these functions (`strcoll`, `stricoll`, `_strncoll`, and `_strnicoll`) compare `string1` and `string2` according to the `LC_COLLATE` category setting of the current locale. These functions differ from the corresponding `strcmp` functions in that the `strcoll` functions use locale code page information that provides collating sequences. For string comparisons in locales in which the character set order and the lexicographic character order differ, the `strcoll` functions should be used rather than the corresponding `strcmp` functions. For more information on `LC_COLLATE`, see [setlocale](../c-runtime-library/reference/setlocale-wsetlocale.md). +The single-byte character (SBCS) versions of these functions (`strcoll`, `stricoll`, `_strncoll`, and `_strnicoll`) compare `string1` and `string2` according to the `LC_COLLATE` category setting of the current locale. These functions differ from the corresponding `strcmp` functions in that the `strcoll` functions use locale code page information that provides collating sequences. For string comparisons in locales in which the character set order and the lexicographic character order differ, the `strcoll` functions should be used rather than the corresponding `strcmp` functions. For more information on `LC_COLLATE`, see [`setlocale`](./reference/setlocale-wsetlocale.md). For some code pages and corresponding character sets, the order of characters in the character set may differ from the lexicographic character order. In the "C" locale, it isn't the case: the order of characters in the ASCII character set is the same as the lexicographic order of the characters. However, in certain European code pages, for example, the character 'a' (value 0x61) precedes the character 'ä' (value 0xE4) in the character set, but the character 'ä' precedes the character 'a' lexicographically. To perform a lexicographic comparison in such an instance, use `strcoll` rather than `strcmp`. Alternatively, you can use `strxfrm` on the original strings, then use `strcmp` on the resulting strings. @@ -34,12 +34,12 @@ Because the `coll` functions collate strings lexicographically for comparison, w ## See also -[Locale](../c-runtime-library/locale.md)
-[String Manipulation](../c-runtime-library/string-manipulation-crt.md)
-[localeconv](../c-runtime-library/reference/localeconv.md)
-[_mbsnbcoll, _mbsnbcoll_l, _mbsnbicoll, _mbsnbicoll_l](../c-runtime-library/reference/mbsnbcoll-mbsnbcoll-l-mbsnbicoll-mbsnbicoll-l.md)
-[setlocale, _wsetlocale](../c-runtime-library/reference/setlocale-wsetlocale.md)
-[strcmp, wcscmp, _mbscmp](../c-runtime-library/reference/strcmp-wcscmp-mbscmp.md)
-[strncmp, wcsncmp, _mbsncmp, _mbsncmp_l](../c-runtime-library/reference/strncmp-wcsncmp-mbsncmp-mbsncmp-l.md)
-[_strnicmp, _wcsnicmp, _mbsnicmp, _strnicmp_l, _wcsnicmp_l, _mbsnicmp_l](../c-runtime-library/reference/strnicmp-wcsnicmp-mbsnicmp-strnicmp-l-wcsnicmp-l-mbsnicmp-l.md)
-[strxfrm, wcsxfrm, _strxfrm_l, _wcsxfrm_l](../c-runtime-library/reference/strxfrm-wcsxfrm-strxfrm-l-wcsxfrm-l.md) +[Locale](./locale.md)\ +[String manipulation](./string-manipulation-crt.md)\ +[`localeconv`](./reference/localeconv.md)\ +[`_mbsnbcoll`, `_mbsnbcoll_l`, `_mbsnbicoll`, `_mbsnbicoll_l`](./reference/mbsnbcoll-mbsnbcoll-l-mbsnbicoll-mbsnbicoll-l.md)\ +[`setlocale`, `_wsetlocale`](./reference/setlocale-wsetlocale.md)\ +[`strcmp`, `wcscmp`, `_mbscmp`](./reference/strcmp-wcscmp-mbscmp.md)\ +[`strncmp`, `wcsncmp`, `_mbsncmp`, `_mbsncmp_l`](./reference/strncmp-wcsncmp-mbsncmp-mbsncmp-l.md)\ +[`_strnicmp`, `_wcsnicmp`, `_mbsnicmp`, `_strnicmp_l`, `_wcsnicmp_l`, `_mbsnicmp_l`](./reference/strnicmp-wcsnicmp-mbsnicmp-strnicmp-l-wcsnicmp-l-mbsnicmp-l.md)\ +[`strxfrm`, `wcsxfrm`, `_strxfrm_l`, `_wcsxfrm_l`](./reference/strxfrm-wcsxfrm-strxfrm-l-wcsxfrm-l.md) diff --git a/docs/c-runtime-library/stream-i-o.md b/docs/c-runtime-library/stream-i-o.md index a6ab0a7ca6b..3ddd57c1264 100644 --- a/docs/c-runtime-library/stream-i-o.md +++ b/docs/c-runtime-library/stream-i-o.md @@ -9,65 +9,65 @@ ms.assetid: dc7874d3-a91b-456a-9015-4748bb358217 These functions process data in different sizes and formats, from single characters to large data structures. They also provide buffering, which can improve performance. The default size of a stream buffer is 4K. These routines affect only buffers created by the run-time library routines, and have no effect on buffers created by the operating system. -## Stream I/O Routines +## Stream I/O routines |Routine|Use| |-------------|---------| -|[`clearerr`](../c-runtime-library/reference/clearerr.md), [`clearerr_s`](../c-runtime-library/reference/clearerr-s.md)|Clear error indicator for stream| -|[`fclose`](../c-runtime-library/reference/fclose-fcloseall.md)|Close stream| -|[`_fcloseall`](../c-runtime-library/reference/fclose-fcloseall.md)|Close all open streams except **`stdin`**, **`stdout`**, and **`stderr`**| -|[`_fdopen`, `wfdopen`](../c-runtime-library/reference/fdopen-wfdopen.md)|Associate stream with file descriptor of open file| -|[`feof`](../c-runtime-library/reference/feof.md)|Test for end of file on stream| -|[`ferror`](../c-runtime-library/reference/ferror.md)|Test for error on stream| -|[`fflush`](../c-runtime-library/reference/fflush.md)|Flush stream to buffer or storage device| -|[`fgetc`, `fgetwc`](../c-runtime-library/reference/fgetc-fgetwc.md)|Read character from stream (function versions of **`getc`** and **`getwc`**)| -|[`_fgetchar`, `_fgetwchar`](../c-runtime-library/reference/fgetc-fgetwc.md)|Read character from **`stdin`** (function versions of **`getchar`** and **`getwchar`**)| -|[`fgetpos`](../c-runtime-library/reference/fgetpos.md)|Get position indicator of stream| -|[`fgets`, `fgetws`](../c-runtime-library/reference/fgets-fgetws.md)|Read string from stream| -|[`_fileno`](../c-runtime-library/reference/fileno.md)|Get file descriptor associated with stream| -|[`_flushall`](../c-runtime-library/reference/flushall.md)|Flush all streams to buffer or storage device| -|[`fopen`, `_wfopen`](../c-runtime-library/reference/fopen-wfopen.md), [`fopen_s`, `_wfopen_s`](../c-runtime-library/reference/fopen-s-wfopen-s.md)|Open stream| -|[`fprintf`, `_fprintf_l`, `fwprintf`, `_fwprintf_l`](../c-runtime-library/reference/fprintf-fprintf-l-fwprintf-fwprintf-l.md), [`fprintf_s`, `_fprintf_s_l`, `fwprintf_s`, `_fwprintf_s_l`](../c-runtime-library/reference/fprintf-s-fprintf-s-l-fwprintf-s-fwprintf-s-l.md)|Write formatted data to stream| -|[`fputc`, `fputwc`](../c-runtime-library/reference/fputc-fputwc.md)|Write a character to a stream (function versions of **`putc`** and **`putwc`**)| -|[`_fputchar`, `_fputwchar`](../c-runtime-library/reference/fputc-fputwc.md)|Write character to **`stdout`** (function versions of **`putchar`** and **`putwchar`**)| -|[`fputs`, `fputws`](../c-runtime-library/reference/fputs-fputws.md)|Write string to stream| -|[`fread`](../c-runtime-library/reference/fread.md)|Read unformatted data from stream| -|[`freopen`, `_wfreopen`](../c-runtime-library/reference/freopen-wfreopen.md), [`freopen_s`, `_wfreopen_s`](../c-runtime-library/reference/freopen-s-wfreopen-s.md)|Reassign **`FILE`** stream pointer to new file or device| -|[`fscanf`, `fwscanf`](../c-runtime-library/reference/fscanf-fscanf-l-fwscanf-fwscanf-l.md), [`fscanf_s`, `_fscanf_s_l`, `fwscanf_s`, `_fwscanf_s_l`](../c-runtime-library/reference/fscanf-s-fscanf-s-l-fwscanf-s-fwscanf-s-l.md)|Read formatted data from stream| -|[`fseek`, `_fseeki64`](../c-runtime-library/reference/fseek-fseeki64.md)|Move file position to given location| -|[`fsetpos`](../c-runtime-library/reference/fsetpos.md)|Set position indicator of stream| -|[`_fsopen`, `_wfsopen`](../c-runtime-library/reference/fsopen-wfsopen.md)|Open stream with file sharing| -|[`ftell`, `_ftelli64`](../c-runtime-library/reference/ftell-ftelli64.md)|Get current file position| -|[`fwrite`](../c-runtime-library/reference/fwrite.md)|Write unformatted data items to stream| -|[`getc`, `getwc`](../c-runtime-library/reference/getc-getwc.md)|Read character from stream (macro versions of **`fgetc`** and **`fgetwc`**)| -|[`getchar`, `getwchar`](../c-runtime-library/reference/getc-getwc.md)|Read character from **`stdin`** (macro versions of **`fgetchar`** and **`fgetwchar`**)| -|[`_getmaxstdio`](../c-runtime-library/reference/getmaxstdio.md)|Returns the number of simultaneously open files permitted at the stream I/O level.| -|[`gets_s`, `_getws_s`](../c-runtime-library/reference/gets-s-getws-s.md)|Read line from **`stdin`**| -|[`_getw`](../c-runtime-library/reference/getw.md)|Read binary **`int`** from stream| -|[`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)|Write formatted data to **`stdout`**| -|[`putc`, `putwc`](../c-runtime-library/reference/putc-putwc.md)|Write character to a stream (macro versions of **`fputc`** and **`fputwc`**)| -|[`putchar`, `putwchar`](../c-runtime-library/reference/putc-putwc.md)|Write character to **`stdout`** (macro versions of **`fputchar`** and **`fputwchar`**)| -|[`puts`, `_putws`](../c-runtime-library/reference/puts-putws.md)|Write line to stream| -|[`_putw`](../c-runtime-library/reference/putw.md)|Write binary **`int`** to stream| -|[`rewind`](../c-runtime-library/reference/rewind.md)|Move file position to beginning of stream| -|[`_rmtmp`](../c-runtime-library/reference/rmtmp.md)|Remove temporary files created by **`tmpfile`**| -|[`scanf`, `_scanf_l`, `wscanf`, `_wscanf_l`](../c-runtime-library/reference/scanf-scanf-l-wscanf-wscanf-l.md),[`scanf_s`, `_scanf_s_l`, `wscanf_s`, `_wscanf_s_l`](../c-runtime-library/reference/scanf-s-scanf-s-l-wscanf-s-wscanf-s-l.md)|Read formatted data from **`stdin`**| -|[`setbuf`](../c-runtime-library/reference/setbuf.md)|Control stream buffering| -|[`_setmaxstdio`](../c-runtime-library/reference/setmaxstdio.md)|Set a maximum for the number of simultaneously open files at the stream I/O level.| -|[`setvbuf`](../c-runtime-library/reference/setvbuf.md)|Control stream buffering and buffer size| -|[`_snprintf`, `_snwprintf`](../c-runtime-library/reference/snprintf-snprintf-snprintf-l-snwprintf-snwprintf-l.md), [`_snprintf_s`, `_snprintf_s_l`, `_snwprintf_s`, `_snwprintf_s_l`](../c-runtime-library/reference/snprintf-s-snprintf-s-l-snwprintf-s-snwprintf-s-l.md)|Write formatted data of specified length to string| -|[`_snscanf`, `_snwscanf`](../c-runtime-library/reference/snscanf-snscanf-l-snwscanf-snwscanf-l.md), [`_snscanf_s`, `_snscanf_s_l`, `_snwscanf_s`, `_snwscanf_s_l`](../c-runtime-library/reference/snscanf-s-snscanf-s-l-snwscanf-s-snwscanf-s-l.md)|Read formatted data of a specified length from the standard input stream.| -|[`sprintf`, `swprintf`](../c-runtime-library/reference/sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md), [`sprintf_s`, `_sprintf_s_l`, `swprintf_s`, `_swprintf_s_l`](../c-runtime-library/reference/sprintf-s-sprintf-s-l-swprintf-s-swprintf-s-l.md)|Write formatted data to string| -|[`sscanf`, `swscanf`](../c-runtime-library/reference/sscanf-sscanf-l-swscanf-swscanf-l.md), [`sscanf_s`, _sscanf_s_l, `swscanf_s`, `_swscanf_s_l`](../c-runtime-library/reference/sscanf-s-sscanf-s-l-swscanf-s-swscanf-s-l.md)|Read formatted data from string| -|[`_tempnam`, `_wtempnam`](../c-runtime-library/reference/tempnam-wtempnam-tmpnam-wtmpnam.md)|Generate temporary filename in given directory| -|[`tmpfile`](../c-runtime-library/reference/tmpfile.md), [`tmpfile_s`](../c-runtime-library/reference/tmpfile-s.md)|Create temporary file| -|[`tmpnam`, `_wtmpnam`](../c-runtime-library/reference/tempnam-wtempnam-tmpnam-wtmpnam.md), [`tmpnam_s`, `_wtmpnam_s`](../c-runtime-library/reference/tmpnam-s-wtmpnam-s.md)|Generate temporary filename| -|[`ungetc`, `ungetwc`](../c-runtime-library/reference/ungetc-ungetwc.md)|Push character back onto stream| -|[`_vcprintf`, `_vcwprintf`](../c-runtime-library/reference/vcprintf-vcprintf-l-vcwprintf-vcwprintf-l.md), [`_vcprintf_s`, `_vcprintf_s_l`, `_vcwprintf_s`, `_vcwprintf_s_l`](../c-runtime-library/reference/vcprintf-s-vcprintf-s-l-vcwprintf-s-vcwprintf-s-l.md)|Write formatted data to the console.| -|[`vfprintf`, `vfwprintf`](../c-runtime-library/reference/vfprintf-vfprintf-l-vfwprintf-vfwprintf-l.md), [`vfprintf_s`, `_vfprintf_s_l`, `vfwprintf_s`, `_vfwprintf_s_l`](../c-runtime-library/reference/vfprintf-s-vfprintf-s-l-vfwprintf-s-vfwprintf-s-l.md)|Write formatted data to stream| -|[`vprintf`, `vwprintf`](../c-runtime-library/reference/vprintf-vprintf-l-vwprintf-vwprintf-l.md), [`vprintf_s`, `_vprintf_s_l`, `vwprintf_s`, `_vwprintf_s_l`](../c-runtime-library/reference/vprintf-s-vprintf-s-l-vwprintf-s-vwprintf-s-l.md)|Write formatted data to **`stdout`**| -|[`_vsnprintf`, `_vsnwprintf`](../c-runtime-library/reference/vsnprintf-vsnprintf-vsnprintf-l-vsnwprintf-vsnwprintf-l.md), [`vsnprintf_s`, `_vsnprintf_s`, `_vsnprintf_s_l`, `_vsnwprintf_s`, `_vsnwprintf_s_l`](../c-runtime-library/reference/vsnprintf-s-vsnprintf-s-vsnprintf-s-l-vsnwprintf-s-vsnwprintf-s-l.md)|Write formatted data of specified length to buffer| -|[`vsprintf`, `vswprintf`](../c-runtime-library/reference/vsprintf-vsprintf-l-vswprintf-vswprintf-l-vswprintf-l.md), [`vsprintf_s`, `_vsprintf_s_l`, `vswprintf_s`, `_vswprintf_s_l`](../c-runtime-library/reference/vsprintf-s-vsprintf-s-l-vswprintf-s-vswprintf-s-l.md)|Write formatted data to buffer| +|[`clearerr`](./reference/clearerr.md), [`clearerr_s`](./reference/clearerr-s.md)|Clear error indicator for stream| +|[`fclose`](./reference/fclose-fcloseall.md)|Close stream| +|[`_fcloseall`](./reference/fclose-fcloseall.md)|Close all open streams except **`stdin`**, **`stdout`**, and **`stderr`**| +|[`_fdopen`, `wfdopen`](./reference/fdopen-wfdopen.md)|Associate stream with file descriptor of open file| +|[`feof`](./reference/feof.md)|Test for end of file on stream| +|[`ferror`](./reference/ferror.md)|Test for error on stream| +|[`fflush`](./reference/fflush.md)|Flush stream to buffer or storage device| +|[`fgetc`, `fgetwc`](./reference/fgetc-fgetwc.md)|Read character from stream (function versions of **`getc`** and **`getwc`**)| +|[`_fgetchar`, `_fgetwchar`](./reference/fgetc-fgetwc.md)|Read character from **`stdin`** (function versions of **`getchar`** and **`getwchar`**)| +|[`fgetpos`](./reference/fgetpos.md)|Get position indicator of stream| +|[`fgets`, `fgetws`](./reference/fgets-fgetws.md)|Read string from stream| +|[`_fileno`](./reference/fileno.md)|Get file descriptor associated with stream| +|[`_flushall`](./reference/flushall.md)|Flush all streams to buffer or storage device| +|[`fopen`, `_wfopen`](./reference/fopen-wfopen.md), [`fopen_s`, `_wfopen_s`](./reference/fopen-s-wfopen-s.md)|Open stream| +|[`fprintf`, `_fprintf_l`, `fwprintf`, `_fwprintf_l`](./reference/fprintf-fprintf-l-fwprintf-fwprintf-l.md), [`fprintf_s`, `_fprintf_s_l`, `fwprintf_s`, `_fwprintf_s_l`](./reference/fprintf-s-fprintf-s-l-fwprintf-s-fwprintf-s-l.md)|Write formatted data to stream| +|[`fputc`, `fputwc`](./reference/fputc-fputwc.md)|Write a character to a stream (function versions of **`putc`** and **`putwc`**)| +|[`_fputchar`, `_fputwchar`](./reference/fputc-fputwc.md)|Write character to **`stdout`** (function versions of **`putchar`** and **`putwchar`**)| +|[`fputs`, `fputws`](./reference/fputs-fputws.md)|Write string to stream| +|[`fread`](./reference/fread.md)|Read unformatted data from stream| +|[`freopen`, `_wfreopen`](./reference/freopen-wfreopen.md), [`freopen_s`, `_wfreopen_s`](./reference/freopen-s-wfreopen-s.md)|Reassign **`FILE`** stream pointer to new file or device| +|[`fscanf`, `fwscanf`](./reference/fscanf-fscanf-l-fwscanf-fwscanf-l.md), [`fscanf_s`, `_fscanf_s_l`, `fwscanf_s`, `_fwscanf_s_l`](./reference/fscanf-s-fscanf-s-l-fwscanf-s-fwscanf-s-l.md)|Read formatted data from stream| +|[`fseek`, `_fseeki64`](./reference/fseek-fseeki64.md)|Move file position to given location| +|[`fsetpos`](./reference/fsetpos.md)|Set position indicator of stream| +|[`_fsopen`, `_wfsopen`](./reference/fsopen-wfsopen.md)|Open stream with file sharing| +|[`ftell`, `_ftelli64`](./reference/ftell-ftelli64.md)|Get current file position| +|[`fwrite`](./reference/fwrite.md)|Write unformatted data items to stream| +|[`getc`, `getwc`](./reference/getc-getwc.md)|Read character from stream (macro versions of **`fgetc`** and **`fgetwc`**)| +|[`getchar`, `getwchar`](./reference/getc-getwc.md)|Read character from **`stdin`** (macro versions of **`fgetchar`** and **`fgetwchar`**)| +|[`_getmaxstdio`](./reference/getmaxstdio.md)|Returns the number of simultaneously open files permitted at the stream I/O level.| +|[`gets_s`, `_getws_s`](./reference/gets-s-getws-s.md)|Read line from **`stdin`**| +|[`_getw`](./reference/getw.md)|Read binary **`int`** from stream| +|[`printf`, `_printf_l`, `wprintf`, `_wprintf_l`](./reference/printf-printf-l-wprintf-wprintf-l.md),[`printf_s`, `_printf_s_l`, `wprintf_s`, `_wprintf_s_l`](./reference/printf-s-printf-s-l-wprintf-s-wprintf-s-l.md)|Write formatted data to **`stdout`**| +|[`putc`, `putwc`](./reference/putc-putwc.md)|Write character to a stream (macro versions of **`fputc`** and **`fputwc`**)| +|[`putchar`, `putwchar`](./reference/putc-putwc.md)|Write character to **`stdout`** (macro versions of **`fputchar`** and **`fputwchar`**)| +|[`puts`, `_putws`](./reference/puts-putws.md)|Write line to stream| +|[`_putw`](./reference/putw.md)|Write binary **`int`** to stream| +|[`rewind`](./reference/rewind.md)|Move file position to beginning of stream| +|[`_rmtmp`](./reference/rmtmp.md)|Remove temporary files created by **`tmpfile`**| +|[`scanf`, `_scanf_l`, `wscanf`, `_wscanf_l`](./reference/scanf-scanf-l-wscanf-wscanf-l.md),[`scanf_s`, `_scanf_s_l`, `wscanf_s`, `_wscanf_s_l`](./reference/scanf-s-scanf-s-l-wscanf-s-wscanf-s-l.md)|Read formatted data from **`stdin`**| +|[`setbuf`](./reference/setbuf.md)|Control stream buffering| +|[`_setmaxstdio`](./reference/setmaxstdio.md)|Set a maximum for the number of simultaneously open files at the stream I/O level.| +|[`setvbuf`](./reference/setvbuf.md)|Control stream buffering and buffer size| +|[`_snprintf`, `_snwprintf`](./reference/snprintf-snprintf-snprintf-l-snwprintf-snwprintf-l.md), [`_snprintf_s`, `_snprintf_s_l`, `_snwprintf_s`, `_snwprintf_s_l`](./reference/snprintf-s-snprintf-s-l-snwprintf-s-snwprintf-s-l.md)|Write formatted data of specified length to string| +|[`_snscanf`, `_snwscanf`](./reference/snscanf-snscanf-l-snwscanf-snwscanf-l.md), [`_snscanf_s`, `_snscanf_s_l`, `_snwscanf_s`, `_snwscanf_s_l`](./reference/snscanf-s-snscanf-s-l-snwscanf-s-snwscanf-s-l.md)|Read formatted data of a specified length from the standard input stream.| +|[`sprintf`, `swprintf`](./reference/sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md), [`sprintf_s`, `_sprintf_s_l`, `swprintf_s`, `_swprintf_s_l`](./reference/sprintf-s-sprintf-s-l-swprintf-s-swprintf-s-l.md)|Write formatted data to string| +|[`sscanf`, `swscanf`](./reference/sscanf-sscanf-l-swscanf-swscanf-l.md), [`sscanf_s`, _sscanf_s_l, `swscanf_s`, `_swscanf_s_l`](./reference/sscanf-s-sscanf-s-l-swscanf-s-swscanf-s-l.md)|Read formatted data from string| +|[`_tempnam`, `_wtempnam`](./reference/tempnam-wtempnam-tmpnam-wtmpnam.md)|Generate temporary filename in given directory| +|[`tmpfile`](./reference/tmpfile.md), [`tmpfile_s`](./reference/tmpfile-s.md)|Create temporary file| +|[`tmpnam`, `_wtmpnam`](./reference/tempnam-wtempnam-tmpnam-wtmpnam.md), [`tmpnam_s`, `_wtmpnam_s`](./reference/tmpnam-s-wtmpnam-s.md)|Generate temporary filename| +|[`ungetc`, `ungetwc`](./reference/ungetc-ungetwc.md)|Push character back onto stream| +|[`_vcprintf`, `_vcwprintf`](./reference/vcprintf-vcprintf-l-vcwprintf-vcwprintf-l.md), [`_vcprintf_s`, `_vcprintf_s_l`, `_vcwprintf_s`, `_vcwprintf_s_l`](./reference/vcprintf-s-vcprintf-s-l-vcwprintf-s-vcwprintf-s-l.md)|Write formatted data to the console.| +|[`vfprintf`, `vfwprintf`](./reference/vfprintf-vfprintf-l-vfwprintf-vfwprintf-l.md), [`vfprintf_s`, `_vfprintf_s_l`, `vfwprintf_s`, `_vfwprintf_s_l`](./reference/vfprintf-s-vfprintf-s-l-vfwprintf-s-vfwprintf-s-l.md)|Write formatted data to stream| +|[`vprintf`, `vwprintf`](./reference/vprintf-vprintf-l-vwprintf-vwprintf-l.md), [`vprintf_s`, `_vprintf_s_l`, `vwprintf_s`, `_vwprintf_s_l`](./reference/vprintf-s-vprintf-s-l-vwprintf-s-vwprintf-s-l.md)|Write formatted data to **`stdout`**| +|[`_vsnprintf`, `_vsnwprintf`](./reference/vsnprintf-vsnprintf-vsnprintf-l-vsnwprintf-vsnwprintf-l.md), [`vsnprintf_s`, `_vsnprintf_s`, `_vsnprintf_s_l`, `_vsnwprintf_s`, `_vsnwprintf_s_l`](./reference/vsnprintf-s-vsnprintf-s-vsnprintf-s-l-vsnwprintf-s-vsnwprintf-s-l.md)|Write formatted data of specified length to buffer| +|[`vsprintf`, `vswprintf`](./reference/vsprintf-vsprintf-l-vswprintf-vswprintf-l-vswprintf-l.md), [`vsprintf_s`, `_vsprintf_s_l`, `vswprintf_s`, `_vswprintf_s_l`](./reference/vsprintf-s-vsprintf-s-l-vswprintf-s-vswprintf-s-l.md)|Write formatted data to buffer| When a program begins execution, the startup code automatically opens several streams: standard input (pointed to by **`stdin`**), standard output (pointed to by **`stdout`**), and standard error (pointed to by **`stderr`**). These streams are directed to the console (keyboard and screen) by default. Use **`freopen`** to redirect **`stdin`**, **`stdout`**, or **`stderr`** to a disk file or a device. @@ -81,11 +81,11 @@ There are two ways to commit buffer contents to disk: Any file specifically opened with either the **`c`** or the **`n`** flag behaves according to the flag, regardless of the state of the global commit/no-commit flag. -If your program doesn't explicitly close a stream, the stream is automatically closed when the program terminates. However, you should close a stream when your program finishes with it, as the number of streams that can be open at one time is limited. See [`_setmaxstdio`](../c-runtime-library/reference/setmaxstdio.md) for information on this limit. +If your program doesn't explicitly close a stream, the stream is automatically closed when the program terminates. However, you should close a stream when your program finishes with it, as the number of streams that can be open at one time is limited. See [`_setmaxstdio`](./reference/setmaxstdio.md) for information on this limit. Input can follow output directly only with an intervening call to **`fflush`** or to a file-positioning function (**`fseek`**, **`fsetpos`**, or **`rewind`**). Input can be followed by output without an intervening call to a file-positioning function, if the input operation encounters the end of the file. ## See also -[Input and Output](../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/stream-states.md b/docs/c-runtime-library/stream-states.md index 0a9301e9c13..d973da51e1d 100644 --- a/docs/c-runtime-library/stream-states.md +++ b/docs/c-runtime-library/stream-states.md @@ -5,27 +5,27 @@ ms.date: "11/19/2018" helpviewer_keywords: ["streams, states"] ms.assetid: 5f28c968-f132-403f-968c-8417ff315e52 --- -# Stream States +# Stream states The valid states, and state transitions, for a stream are shown in the following figure. -![Stream state diagram.](../c-runtime-library/media/stream.gif "Stream state diagram") +![Stream state diagram.](./media/stream.gif "Stream state diagram") Each of the circles denotes a stable state. Each of the lines denotes a transition that can occur as the result of a function call that operates on the stream. Five groups of functions can cause state transitions. Functions in the first three groups are declared in \: -- The byte read functions: [fgetc](../c-runtime-library/reference/fgetc-fgetwc.md), [fgets](../c-runtime-library/reference/fgets-fgetws.md), [fread](../c-runtime-library/reference/fread.md), [fscanf](../c-runtime-library/reference/fscanf-fscanf-l-fwscanf-fwscanf-l.md), [getc](../c-runtime-library/reference/getc-getwc.md), [getchar](../c-runtime-library/reference/getc-getwc.md), [gets](../c-runtime-library/gets-getws.md), [scanf](../c-runtime-library/reference/scanf-scanf-l-wscanf-wscanf-l.md), and [ungetc](../c-runtime-library/reference/ungetc-ungetwc.md) +- The byte read functions: [`fgetc`](./reference/fgetc-fgetwc.md), [`fgets`](./reference/fgets-fgetws.md), [`fread`](./reference/fread.md), [`fscanf`](./reference/fscanf-fscanf-l-fwscanf-fwscanf-l.md), [`getc`](./reference/getc-getwc.md), [`getchar`](./reference/getc-getwc.md), [`gets`](./gets-getws.md), [`scanf`](./reference/scanf-scanf-l-wscanf-wscanf-l.md), and [`ungetc`](./reference/ungetc-ungetwc.md) -- The byte write functions: [fprintf](../c-runtime-library/reference/fprintf-fprintf-l-fwprintf-fwprintf-l.md), [fputc](../c-runtime-library/reference/fputc-fputwc.md), [fputs](../c-runtime-library/reference/fputs-fputws.md), [fwrite](../c-runtime-library/reference/fwrite.md), [printf](../c-runtime-library/reference/printf-printf-l-wprintf-wprintf-l.md), [putc](../c-runtime-library/reference/putc-putwc.md), [putchar](../c-runtime-library/reference/putc-putwc.md), [puts](../c-runtime-library/reference/puts-putws.md), [vfprintf](../c-runtime-library/reference/vfprintf-vfprintf-l-vfwprintf-vfwprintf-l.md), and [vprintf](../c-runtime-library/reference/vprintf-vprintf-l-vwprintf-vwprintf-l.md) +- The byte write functions: [`fprintf`](./reference/fprintf-fprintf-l-fwprintf-fwprintf-l.md), [`fputc`](./reference/fputc-fputwc.md), [`fputs`](./reference/fputs-fputws.md), [`fwrite`](./reference/fwrite.md), [`printf`](./reference/printf-printf-l-wprintf-wprintf-l.md), [`putc`](./reference/putc-putwc.md), [`putchar`](./reference/putc-putwc.md), [`puts`](./reference/puts-putws.md), [`vfprintf`](./reference/vfprintf-vfprintf-l-vfwprintf-vfwprintf-l.md), and [`vprintf`](./reference/vprintf-vprintf-l-vwprintf-vwprintf-l.md) -- The position functions: [fflush](../c-runtime-library/reference/fflush.md), [fseek](../c-runtime-library/reference/fseek-fseeki64.md), [fsetpos](../c-runtime-library/reference/fsetpos.md), and [rewind](../c-runtime-library/reference/rewind.md) +- The position functions: [`fflush`](./reference/fflush.md), [`fseek`](./reference/fseek-fseeki64.md), [`fsetpos`](./reference/fsetpos.md), and [`rewind`](./reference/rewind.md) Functions in the remaining two groups are declared in \: -- The wide read functions: [fgetwc](../c-runtime-library/reference/fgetc-fgetwc.md), [fgetws](../c-runtime-library/reference/fgets-fgetws.md), [fwscanf](../c-runtime-library/reference/fscanf-fscanf-l-fwscanf-fwscanf-l.md), [getwc](../c-runtime-library/reference/getc-getwc.md), [getwchar](../c-runtime-library/reference/getc-getwc.md), [ungetwc](../c-runtime-library/reference/ungetc-ungetwc.md), and [wscanf](../c-runtime-library/reference/scanf-scanf-l-wscanf-wscanf-l.md), +- The wide read functions: [`fgetwc`](./reference/fgetc-fgetwc.md), [`fgetws`](./reference/fgets-fgetws.md), [`fwscanf`](./reference/fscanf-fscanf-l-fwscanf-fwscanf-l.md), [`getwc`](./reference/getc-getwc.md), [`getwchar`](./reference/getc-getwc.md), [`ungetwc`](./reference/ungetc-ungetwc.md), and [`wscanf`](./reference/scanf-scanf-l-wscanf-wscanf-l.md), -- The wide write functions: [fwprintf](../c-runtime-library/reference/fprintf-fprintf-l-fwprintf-fwprintf-l.md), [fputwc](../c-runtime-library/reference/fputc-fputwc.md), [fputws](../c-runtime-library/reference/fputs-fputws.md), [putwc](../c-runtime-library/reference/putc-putwc.md), [putwchar](../c-runtime-library/reference/fputc-fputwc.md), [vfwprintf](../c-runtime-library/reference/vfprintf-vfprintf-l-vfwprintf-vfwprintf-l.md), [vwprintf](../c-runtime-library/reference/vprintf-vprintf-l-vwprintf-vwprintf-l.md), and [wprintf](../c-runtime-library/reference/printf-printf-l-wprintf-wprintf-l.md), +- The wide write functions: [`fwprintf`](./reference/fprintf-fprintf-l-fwprintf-fwprintf-l.md), [`fputwc`](./reference/fputc-fputwc.md), [`fputws`](./reference/fputs-fputws.md), [`putwc`](./reference/putc-putwc.md), [`putwchar`](./reference/fputc-fputwc.md), [`vfwprintf`](./reference/vfprintf-vfprintf-l-vfwprintf-vfwprintf-l.md), [`vwprintf`](./reference/vprintf-vprintf-l-vwprintf-vwprintf-l.md), and [`wprintf`](./reference/printf-printf-l-wprintf-wprintf-l.md), The state diagram shows that you must call one of the position functions between most write and read operations: @@ -37,4 +37,4 @@ Finally, the state diagram shows that a position operation never decreases the n ## 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/string-manipulation-crt.md b/docs/c-runtime-library/string-manipulation-crt.md index 9fd115b6741..aae81dd68d3 100644 --- a/docs/c-runtime-library/string-manipulation-crt.md +++ b/docs/c-runtime-library/string-manipulation-crt.md @@ -5,60 +5,60 @@ ms.date: "11/04/2016" f1_keywords: ["c.strings"] helpviewer_keywords: ["strings [C++], manipulating", "string manipulation", "manipulating strings"] --- -# String Manipulation (CRT) +# String manipulation (CRT) -These routines operate on null-terminated single-byte character, wide-character, and multibyte-character strings. Use the buffer-manipulation routines, described in [Buffer Manipulation](../c-runtime-library/buffer-manipulation.md), to work with character arrays that don't end with a `NULL` character. +These routines operate on null-terminated single-byte character, wide-character, and multibyte-character strings. Use the buffer-manipulation routines, described in [Buffer manipulation](./buffer-manipulation.md), to work with character arrays that don't end with a `NULL` character. -## String-Manipulation Routines +## String-manipulation routines |Routine|Use| |-------------|---------| -|[`strcoll`, `wcscoll`, `_mbscoll`, `_strcoll_l`, `_wcscoll_l`, `_mbscoll_l`](../c-runtime-library/reference/strcoll-wcscoll-mbscoll-strcoll-l-wcscoll-l-mbscoll-l.md), [`_stricoll`, `_wcsicoll`, `_mbsicoll`, `_stricoll_l`, `_wcsicoll_l`, `_mbsicoll_l`](../c-runtime-library/reference/stricoll-wcsicoll-mbsicoll-stricoll-l-wcsicoll-l-mbsicoll-l.md), [`_strncoll`, `_wcsncoll`, `_mbsncoll`, `_strncoll_l`, `_wcsncoll_l`, `_mbsncoll_l`](../c-runtime-library/reference/strncoll-wcsncoll-mbsncoll-strncoll-l-wcsncoll-l-mbsncoll-l.md), [`_strnicoll`, `_wcsnicoll`, `_mbsnicoll`, `_strnicoll_l`, `_wcsnicoll_l`, `_mbsnicoll_l`](../c-runtime-library/reference/strnicoll-wcsnicoll-mbsnicoll-strnicoll-l-wcsnicoll-l-mbsnicoll-l.md)|Compare two character strings using code page information (**`_mbsicoll`** and **`_mbsnicoll`** are case-insensitive)| -|[`_strdec`, `_wcsdec`, `_mbsdec`, `_mbsdec_l`](../c-runtime-library/reference/strdec-wcsdec-mbsdec-mbsdec-l.md)|Move string pointer back one character| -|[`_strinc`, `_wcsinc`, `_mbsinc`, `_mbsinc_l`](../c-runtime-library/reference/strinc-wcsinc-mbsinc-mbsinc-l.md)|Advance string pointer by one character| -|[`_mbsnbcat`, `_mbsnbcat_l`](../c-runtime-library/reference/mbsnbcat-mbsnbcat-l.md), [`_mbsnbcat_s`, `_mbsnbcat_s_l`](../c-runtime-library/reference/mbsnbcat-s-mbsnbcat-s-l.md)|Append, at most, first *n* bytes of one character string to another| -|[`_mbsnbcmp`, `_mbsnbcmp_l`](../c-runtime-library/reference/mbsnbcmp-mbsnbcmp-l.md)|Compare first *n* bytes of two character strings| -|[`_strncnt`, `_wcsncnt`, `_mbsnbcnt`, `_mbsnbcnt_l`, `_mbsnccnt`, `_mbsnccnt_l`](../c-runtime-library/reference/strncnt-wcsncnt-mbsnbcnt-mbsnbcnt-l-mbsnccnt-mbsnccnt-l.md)|Return number of character bytes within supplied character count| -|[`_mbsnbcpy`, `_mbsnbcpy_l`](../c-runtime-library/reference/mbsnbcpy-mbsnbcpy-l.md), [`_mbsnbcpy_s`, `_mbsnbcpy_s_l`](../c-runtime-library/reference/mbsnbcpy-s-mbsnbcpy-s-l.md)|Copy *n* bytes of string| -|[`_mbsnbicmp`, `_mbsnbicmp_l`](../c-runtime-library/reference/mbsnbicmp-mbsnbicmp-l.md)|Compare *n* bytes of two character strings, ignoring case| -|[`_mbsnbset`, `_mbsnbset_l`](../c-runtime-library/reference/mbsnbset-mbsnbset-l.md)|Set first *n* bytes of character string to specified character| -|[`_strncnt`, `_wcsncnt`, `_mbsnbcnt`, `_mbsnbcnt_l`, `_mbsnccnt`, `_mbsnccnt_l`](../c-runtime-library/reference/strncnt-wcsncnt-mbsnbcnt-mbsnbcnt-l-mbsnccnt-mbsnccnt-l.md)|Return number of characters within supplied byte count| -|[`_strnextc`, `_wcsnextc`, `_mbsnextc`, `_mbsnextc_l`](../c-runtime-library/reference/strnextc-wcsnextc-mbsnextc-mbsnextc-l.md)|Find next character in string| -|[`_strninc`, `_wcsninc`, `_mbsninc`, `_mbsninc_l`](../c-runtime-library/reference/strninc-wcsninc-mbsninc-mbsninc-l.md)|Advance string pointer by *n* characters| -|[`_strspnp`, `_wcsspnp`, `_mbsspnp`, `_mbsspnp_l`](../c-runtime-library/reference/strspnp-wcsspnp-mbsspnp-mbsspnp-l.md)|Return pointer to first character in given string that isn't in another given string| -|[`_scprintf`, `_scprintf_l`, `_scwprintf`, `_scwprintf_l`](../c-runtime-library/reference/scprintf-scprintf-l-scwprintf-scwprintf-l.md)|Return the number of characters in a formatted string| -|[`_snscanf`, `_snscanf_l`, `_snwscanf`, `_snwscanf_l`](../c-runtime-library/reference/snscanf-snscanf-l-snwscanf-snwscanf-l.md), [`_snscanf_s`, `_snscanf_s_l`, `_snwscanf_s`, `_snwscanf_s_l`](../c-runtime-library/reference/snscanf-s-snscanf-s-l-snwscanf-s-snwscanf-s-l.md)|Read formatted data of a specified length from the standard input stream.| -|[`sscanf`, `_sscanf_l`, `swscanf`, `_swscanf_l`](../c-runtime-library/reference/sscanf-sscanf-l-swscanf-swscanf-l.md), [`sscanf_s`, `_sscanf_s_l`, `swscanf_s`, `_swscanf_s_l`](../c-runtime-library/reference/sscanf-s-sscanf-s-l-swscanf-s-swscanf-s-l.md)|Read formatted data of a specified length from the standard input stream.| -|[`sprintf`, `_sprintf_l`, `swprintf`, `_swprintf_l`, `\__swprintf_l`](../c-runtime-library/reference/sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md), [`sprintf_s`, `_sprintf_s_l`, `swprintf_s`, `_swprintf_s_l`](../c-runtime-library/reference/sprintf-s-sprintf-s-l-swprintf-s-swprintf-s-l.md), [`_sprintf_p`, `_sprintf_p_l`, `_swprintf_p`, `_swprintf_p_l`](../c-runtime-library/reference/sprintf-p-sprintf-p-l-swprintf-p-swprintf-p-l.md)|Write formatted data to a string| -|[`strcat`, `wcscat`, `_mbscat`](../c-runtime-library/reference/strcat-wcscat-mbscat.md), [`strcat_s`, `wcscat_s`, `_mbscat_s`](../c-runtime-library/reference/strcat-s-wcscat-s-mbscat-s.md)|Append one string to another| -|[`strchr`, `wcschr`, `_mbschr`, `_mbschr_l`](../c-runtime-library/reference/strchr-wcschr-mbschr-mbschr-l.md)|Find first occurrence of specified character in string| -|[`strcmp`, `wcscmp`, `_mbscmp`](../c-runtime-library/reference/strcmp-wcscmp-mbscmp.md)|Compare two strings| -|[`strcoll`, `wcscoll`, `_mbscoll`, `_strcoll_l`, `_wcscoll_l`, `_mbscoll_l`](../c-runtime-library/reference/strcoll-wcscoll-mbscoll-strcoll-l-wcscoll-l-mbscoll-l.md), [`_stricoll`, `_wcsicoll`, `_mbsicoll`, `_stricoll_l`, `_wcsicoll_l`, `_mbsicoll_l`](../c-runtime-library/reference/stricoll-wcsicoll-mbsicoll-stricoll-l-wcsicoll-l-mbsicoll-l.md), [`_strncoll`, `_wcsncoll`, `_mbsncoll`, `_strncoll_l`, `_wcsncoll_l`, `_mbsncoll_l`](../c-runtime-library/reference/strncoll-wcsncoll-mbsncoll-strncoll-l-wcsncoll-l-mbsncoll-l.md), [`_strnicoll`, `_wcsnicoll`, `_mbsnicoll`, `_strnicoll_l`, `_wcsnicoll_l`, `_mbsnicoll_l`](../c-runtime-library/reference/strnicoll-wcsnicoll-mbsnicoll-strnicoll-l-wcsnicoll-l-mbsnicoll-l.md)|Compare two strings using current locale code page information (**`_stricoll`**, **`_wcsicoll`**, **`_strnicoll`**, and **`_wcsnicoll`** are case-insensitive)| -|[`strcpy`, `wcscpy`, `_mbscpy`](../c-runtime-library/reference/strcpy-wcscpy-mbscpy.md), [`strcpy_s`, `wcscpy_s`, `_mbscpy_s`](../c-runtime-library/reference/strcpy-s-wcscpy-s-mbscpy-s.md)|Copy one string to another| -|[`strcspn`, `wcscspn`, `_mbscspn`, `_mbscspn_l`](../c-runtime-library/reference/strcspn-wcscspn-mbscspn-mbscspn-l.md)|Find first occurrence of character from specified character set in string| -|[`_strdup`, `_wcsdup`, `_mbsdup`](../c-runtime-library/reference/strdup-wcsdup-mbsdup.md), [`_strdup_dbg`, `_wcsdup_dbg`](../c-runtime-library/reference/strdup-dbg-wcsdup-dbg.md)|Duplicate string| -|[`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)|Map error number to message string| -|[`strftime`, `wcsftime`, `_strftime_l`, `_wcsftime_l`](../c-runtime-library/reference/strftime-wcsftime-strftime-l-wcsftime-l.md)|Format date-and-time string| -|[`_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| -|[`strlen`, `wcslen`, `_mbslen`, `_mbslen_l`, `_mbstrlen`, `_mbstrlen_l`](../c-runtime-library/reference/strlen-wcslen-mbslen-mbslen-l-mbstrlen-mbstrlen-l.md), [`strnlen`, `strnlen_s`, `wcsnlen`, `wcsnlen_s`, `_mbsnlen`, `_mbsnlen_l`, `_mbstrnlen`, `_mbstrnlen_l`](../c-runtime-library/reference/strnlen-strnlen-s.md)|Find length of string| -|[`_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 string to lowercase| -|[`strncat`, `_strncat_l`, `wcsncat`, `_wcsncat_l`, `_mbsncat`, `_mbsncat_l`](../c-runtime-library/reference/strncat-strncat-l-wcsncat-wcsncat-l-mbsncat-mbsncat-l.md), [`strncat_s`, `_strncat_s_l`, `wcsncat_s`, `_wcsncat_s_l`, `_mbsncat_s`, `_mbsncat_s_l`](../c-runtime-library/reference/strncat-s-strncat-s-l-wcsncat-s-wcsncat-s-l-mbsncat-s-mbsncat-s-l.md)|Append characters of string| -|[`strncmp`, `wcsncmp`, `_mbsncmp`, `_mbsncmp_l`](../c-runtime-library/reference/strncmp-wcsncmp-mbsncmp-mbsncmp-l.md)|Compare characters of two strings| -|[`strncpy`, `_strncpy_l`, `wcsncpy`, `_wcsncpy_l`, `_mbsncpy`, `_mbsncpy_l`](../c-runtime-library/reference/strncpy-strncpy-l-wcsncpy-wcsncpy-l-mbsncpy-mbsncpy-l.md), [`strncpy_s`, `_strncpy_s_l`, `wcsncpy_s`, `_wcsncpy_s_l`, `_mbsncpy_s`, `_mbsncpy_s_l`](../c-runtime-library/reference/strncpy-s-strncpy-s-l-wcsncpy-s-wcsncpy-s-l-mbsncpy-s-mbsncpy-s-l.md)|Copy characters of one string to another| -|[`_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| -|[`_strnset`, `_strnset_l`, `_wcsnset`, `_wcsnset_l`, `_mbsnset`, `_mbsnset_l`](../c-runtime-library/reference/strnset-strnset-l-wcsnset-wcsnset-l-mbsnset-mbsnset-l.md)|Set first *n* characters of string to specified character| -|[`strpbrk`, `wcspbrk`, `_mbspbrk`, `_mbspbrk_l`](../c-runtime-library/reference/strpbrk-wcspbrk-mbspbrk-mbspbrk-l.md)|Find first occurrence of character from one string in another string| -|[`strrchr`, `wcsrchr`, `_mbsrchr`, `_mbsrchr_l`](../c-runtime-library/reference/strrchr-wcsrchr-mbsrchr-mbsrchr-l.md)|Find last occurrence of given character in string| -|[`_strrev`, `_wcsrev`, `_mbsrev`, `_mbsrev_l`](../c-runtime-library/reference/strrev-wcsrev-mbsrev-mbsrev-l.md)|Reverse string| -|[`_strset`, `_strset_l`, `_wcsset`, `_wcsset_l`, `_mbsset`, `_mbsset_l`](../c-runtime-library/reference/strset-strset-l-wcsset-wcsset-l-mbsset-mbsset-l.md)|Set all characters of string to specified character| -|[`strspn`, `wcsspn`, `_mbsspn`, `_mbsspn_l`](../c-runtime-library/reference/strspn-wcsspn-mbsspn-mbsspn-l.md)|Find first occurrence in a string of a character not found in another string| -|[`strstr`, `wcsstr`, `_mbsstr`, `_mbsstr_l`](../c-runtime-library/reference/strstr-wcsstr-mbsstr-mbsstr-l.md)|Find first occurrence of specified string in another string| -|[`strtok`, `_strtok_l`, `wcstok`, `_wcstok_l`, `_mbstok`, `_mbstok_l`](../c-runtime-library/reference/strtok-strtok-l-wcstok-wcstok-l-mbstok-mbstok-l.md), [`strtok_s`, `_strtok_s_l`, `wcstok_s`, `_wcstok_s_l`, `_mbstok_s`, `_mbstok_s_l`](../c-runtime-library/reference/strtok-s-strtok-s-l-wcstok-s-wcstok-s-l-mbstok-s-mbstok-s-l.md)|Find next token in string| -|[`_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 string to uppercase| -|[`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| -|[`vsprintf`, `_vsprintf_l`, `vswprintf`, `_vswprintf_l`, `\__vswprintf_l`](../c-runtime-library/reference/vsprintf-vsprintf-l-vswprintf-vswprintf-l-vswprintf-l.md), [`vsprintf_s`, `_vsprintf_s_l`, `vswprintf_s`, `_vswprintf_s_l`](../c-runtime-library/reference/vsprintf-s-vsprintf-s-l-vswprintf-s-vswprintf-s-l.md), [`_vsprintf_p`, `_vsprintf_p_l`, `_vswprintf_p`, `_vswprintf_p_l`](../c-runtime-library/reference/vsprintf-p-vsprintf-p-l-vswprintf-p-vswprintf-p-l.md)|Write formatted output using a pointer to a list of arguments| -|[`vsnprintf`, `_vsnprintf`, `_vsnprintf_l`, `_vsnwprintf`, `_vsnwprintf_l`](../c-runtime-library/reference/vsnprintf-vsnprintf-vsnprintf-l-vsnwprintf-vsnwprintf-l.md), [`vsnprintf_s`, `_vsnprintf_s`, `_vsnprintf_s_l`, `_vsnwprintf_s`, `_vsnwprintf_s_l`](../c-runtime-library/reference/vsnprintf-s-vsnprintf-s-vsnprintf-s-l-vsnwprintf-s-vsnwprintf-s-l.md)|Write formatted output using a pointer to a list of arguments| +|[`strcoll`, `wcscoll`, `_mbscoll`, `_strcoll_l`, `_wcscoll_l`, `_mbscoll_l`](./reference/strcoll-wcscoll-mbscoll-strcoll-l-wcscoll-l-mbscoll-l.md), [`_stricoll`, `_wcsicoll`, `_mbsicoll`, `_stricoll_l`, `_wcsicoll_l`, `_mbsicoll_l`](./reference/stricoll-wcsicoll-mbsicoll-stricoll-l-wcsicoll-l-mbsicoll-l.md), [`_strncoll`, `_wcsncoll`, `_mbsncoll`, `_strncoll_l`, `_wcsncoll_l`, `_mbsncoll_l`](./reference/strncoll-wcsncoll-mbsncoll-strncoll-l-wcsncoll-l-mbsncoll-l.md), [`_strnicoll`, `_wcsnicoll`, `_mbsnicoll`, `_strnicoll_l`, `_wcsnicoll_l`, `_mbsnicoll_l`](./reference/strnicoll-wcsnicoll-mbsnicoll-strnicoll-l-wcsnicoll-l-mbsnicoll-l.md)|Compare two character strings using code page information (**`_mbsicoll`** and **`_mbsnicoll`** are case-insensitive)| +|[`_strdec`, `_wcsdec`, `_mbsdec`, `_mbsdec_l`](./reference/strdec-wcsdec-mbsdec-mbsdec-l.md)|Move string pointer back one character| +|[`_strinc`, `_wcsinc`, `_mbsinc`, `_mbsinc_l`](./reference/strinc-wcsinc-mbsinc-mbsinc-l.md)|Advance string pointer by one character| +|[`_mbsnbcat`, `_mbsnbcat_l`](./reference/mbsnbcat-mbsnbcat-l.md), [`_mbsnbcat_s`, `_mbsnbcat_s_l`](./reference/mbsnbcat-s-mbsnbcat-s-l.md)|Append, at most, first *n* bytes of one character string to another| +|[`_mbsnbcmp`, `_mbsnbcmp_l`](./reference/mbsnbcmp-mbsnbcmp-l.md)|Compare first *n* bytes of two character strings| +|[`_strncnt`, `_wcsncnt`, `_mbsnbcnt`, `_mbsnbcnt_l`, `_mbsnccnt`, `_mbsnccnt_l`](./reference/strncnt-wcsncnt-mbsnbcnt-mbsnbcnt-l-mbsnccnt-mbsnccnt-l.md)|Return number of character bytes within supplied character count| +|[`_mbsnbcpy`, `_mbsnbcpy_l`](./reference/mbsnbcpy-mbsnbcpy-l.md), [`_mbsnbcpy_s`, `_mbsnbcpy_s_l`](./reference/mbsnbcpy-s-mbsnbcpy-s-l.md)|Copy *n* bytes of string| +|[`_mbsnbicmp`, `_mbsnbicmp_l`](./reference/mbsnbicmp-mbsnbicmp-l.md)|Compare *n* bytes of two character strings, ignoring case| +|[`_mbsnbset`, `_mbsnbset_l`](./reference/mbsnbset-mbsnbset-l.md)|Set first *n* bytes of character string to specified character| +|[`_strncnt`, `_wcsncnt`, `_mbsnbcnt`, `_mbsnbcnt_l`, `_mbsnccnt`, `_mbsnccnt_l`](./reference/strncnt-wcsncnt-mbsnbcnt-mbsnbcnt-l-mbsnccnt-mbsnccnt-l.md)|Return number of characters within supplied byte count| +|[`_strnextc`, `_wcsnextc`, `_mbsnextc`, `_mbsnextc_l`](./reference/strnextc-wcsnextc-mbsnextc-mbsnextc-l.md)|Find next character in string| +|[`_strninc`, `_wcsninc`, `_mbsninc`, `_mbsninc_l`](./reference/strninc-wcsninc-mbsninc-mbsninc-l.md)|Advance string pointer by *n* characters| +|[`_strspnp`, `_wcsspnp`, `_mbsspnp`, `_mbsspnp_l`](./reference/strspnp-wcsspnp-mbsspnp-mbsspnp-l.md)|Return pointer to first character in given string that isn't in another given string| +|[`_scprintf`, `_scprintf_l`, `_scwprintf`, `_scwprintf_l`](./reference/scprintf-scprintf-l-scwprintf-scwprintf-l.md)|Return the number of characters in a formatted string| +|[`_snscanf`, `_snscanf_l`, `_snwscanf`, `_snwscanf_l`](./reference/snscanf-snscanf-l-snwscanf-snwscanf-l.md), [`_snscanf_s`, `_snscanf_s_l`, `_snwscanf_s`, `_snwscanf_s_l`](./reference/snscanf-s-snscanf-s-l-snwscanf-s-snwscanf-s-l.md)|Read formatted data of a specified length from the standard input stream.| +|[`sscanf`, `_sscanf_l`, `swscanf`, `_swscanf_l`](./reference/sscanf-sscanf-l-swscanf-swscanf-l.md), [`sscanf_s`, `_sscanf_s_l`, `swscanf_s`, `_swscanf_s_l`](./reference/sscanf-s-sscanf-s-l-swscanf-s-swscanf-s-l.md)|Read formatted data of a specified length from the standard input stream.| +|[`sprintf`, `_sprintf_l`, `swprintf`, `_swprintf_l`, `__swprintf_l`](./reference/sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md), [`sprintf_s`, `_sprintf_s_l`, `swprintf_s`, `_swprintf_s_l`](./reference/sprintf-s-sprintf-s-l-swprintf-s-swprintf-s-l.md), [`_sprintf_p`, `_sprintf_p_l`, `_swprintf_p`, `_swprintf_p_l`](./reference/sprintf-p-sprintf-p-l-swprintf-p-swprintf-p-l.md)|Write formatted data to a string| +|[`strcat`, `wcscat`, `_mbscat`](./reference/strcat-wcscat-mbscat.md), [`strcat_s`, `wcscat_s`, `_mbscat_s`](./reference/strcat-s-wcscat-s-mbscat-s.md)|Append one string to another| +|[`strchr`, `wcschr`, `_mbschr`, `_mbschr_l`](./reference/strchr-wcschr-mbschr-mbschr-l.md)|Find first occurrence of specified character in string| +|[`strcmp`, `wcscmp`, `_mbscmp`](./reference/strcmp-wcscmp-mbscmp.md)|Compare two strings| +|[`strcoll`, `wcscoll`, `_mbscoll`, `_strcoll_l`, `_wcscoll_l`, `_mbscoll_l`](./reference/strcoll-wcscoll-mbscoll-strcoll-l-wcscoll-l-mbscoll-l.md), [`_stricoll`, `_wcsicoll`, `_mbsicoll`, `_stricoll_l`, `_wcsicoll_l`, `_mbsicoll_l`](./reference/stricoll-wcsicoll-mbsicoll-stricoll-l-wcsicoll-l-mbsicoll-l.md), [`_strncoll`, `_wcsncoll`, `_mbsncoll`, `_strncoll_l`, `_wcsncoll_l`, `_mbsncoll_l`](./reference/strncoll-wcsncoll-mbsncoll-strncoll-l-wcsncoll-l-mbsncoll-l.md), [`_strnicoll`, `_wcsnicoll`, `_mbsnicoll`, `_strnicoll_l`, `_wcsnicoll_l`, `_mbsnicoll_l`](./reference/strnicoll-wcsnicoll-mbsnicoll-strnicoll-l-wcsnicoll-l-mbsnicoll-l.md)|Compare two strings using current locale code page information (**`_stricoll`**, **`_wcsicoll`**, **`_strnicoll`**, and **`_wcsnicoll`** are case-insensitive)| +|[`strcpy`, `wcscpy`, `_mbscpy`](./reference/strcpy-wcscpy-mbscpy.md), [`strcpy_s`, `wcscpy_s`, `_mbscpy_s`](./reference/strcpy-s-wcscpy-s-mbscpy-s.md)|Copy one string to another| +|[`strcspn`, `wcscspn`, `_mbscspn`, `_mbscspn_l`](./reference/strcspn-wcscspn-mbscspn-mbscspn-l.md)|Find first occurrence of character from specified character set in string| +|[`_strdup`, `_wcsdup`, `_mbsdup`](./reference/strdup-wcsdup-mbsdup.md), [`_strdup_dbg`, `_wcsdup_dbg`](./reference/strdup-dbg-wcsdup-dbg.md)|Duplicate string| +|[`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)|Map error number to message string| +|[`strftime`, `wcsftime`, `_strftime_l`, `_wcsftime_l`](./reference/strftime-wcsftime-strftime-l-wcsftime-l.md)|Format date-and-time string| +|[`_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| +|[`strlen`, `wcslen`, `_mbslen`, `_mbslen_l`, `_mbstrlen`, `_mbstrlen_l`](./reference/strlen-wcslen-mbslen-mbslen-l-mbstrlen-mbstrlen-l.md), [`strnlen`, `strnlen_s`, `wcsnlen`, `wcsnlen_s`, `_mbsnlen`, `_mbsnlen_l`, `_mbstrnlen`, `_mbstrnlen_l`](./reference/strnlen-strnlen-s.md)|Find length of string| +|[`_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 string to lowercase| +|[`strncat`, `_strncat_l`, `wcsncat`, `_wcsncat_l`, `_mbsncat`, `_mbsncat_l`](./reference/strncat-strncat-l-wcsncat-wcsncat-l-mbsncat-mbsncat-l.md), [`strncat_s`, `_strncat_s_l`, `wcsncat_s`, `_wcsncat_s_l`, `_mbsncat_s`, `_mbsncat_s_l`](./reference/strncat-s-strncat-s-l-wcsncat-s-wcsncat-s-l-mbsncat-s-mbsncat-s-l.md)|Append characters of string| +|[`strncmp`, `wcsncmp`, `_mbsncmp`, `_mbsncmp_l`](./reference/strncmp-wcsncmp-mbsncmp-mbsncmp-l.md)|Compare characters of two strings| +|[`strncpy`, `_strncpy_l`, `wcsncpy`, `_wcsncpy_l`, `_mbsncpy`, `_mbsncpy_l`](./reference/strncpy-strncpy-l-wcsncpy-wcsncpy-l-mbsncpy-mbsncpy-l.md), [`strncpy_s`, `_strncpy_s_l`, `wcsncpy_s`, `_wcsncpy_s_l`, `_mbsncpy_s`, `_mbsncpy_s_l`](./reference/strncpy-s-strncpy-s-l-wcsncpy-s-wcsncpy-s-l-mbsncpy-s-mbsncpy-s-l.md)|Copy characters of one string to another| +|[`_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| +|[`_strnset`, `_strnset_l`, `_wcsnset`, `_wcsnset_l`, `_mbsnset`, `_mbsnset_l`](./reference/strnset-strnset-l-wcsnset-wcsnset-l-mbsnset-mbsnset-l.md)|Set first *n* characters of string to specified character| +|[`strpbrk`, `wcspbrk`, `_mbspbrk`, `_mbspbrk_l`](./reference/strpbrk-wcspbrk-mbspbrk-mbspbrk-l.md)|Find first occurrence of character from one string in another string| +|[`strrchr`, `wcsrchr`, `_mbsrchr`, `_mbsrchr_l`](./reference/strrchr-wcsrchr-mbsrchr-mbsrchr-l.md)|Find last occurrence of given character in string| +|[`_strrev`, `_wcsrev`, `_mbsrev`, `_mbsrev_l`](./reference/strrev-wcsrev-mbsrev-mbsrev-l.md)|Reverse string| +|[`_strset`, `_strset_l`, `_wcsset`, `_wcsset_l`, `_mbsset`, `_mbsset_l`](./reference/strset-strset-l-wcsset-wcsset-l-mbsset-mbsset-l.md)|Set all characters of string to specified character| +|[`strspn`, `wcsspn`, `_mbsspn`, `_mbsspn_l`](./reference/strspn-wcsspn-mbsspn-mbsspn-l.md)|Find first occurrence in a string of a character not found in another string| +|[`strstr`, `wcsstr`, `_mbsstr`, `_mbsstr_l`](./reference/strstr-wcsstr-mbsstr-mbsstr-l.md)|Find first occurrence of specified string in another string| +|[`strtok`, `_strtok_l`, `wcstok`, `_wcstok_l`, `_mbstok`, `_mbstok_l`](./reference/strtok-strtok-l-wcstok-wcstok-l-mbstok-mbstok-l.md), [`strtok_s`, `_strtok_s_l`, `wcstok_s`, `_wcstok_s_l`, `_mbstok_s`, `_mbstok_s_l`](./reference/strtok-s-strtok-s-l-wcstok-s-wcstok-s-l-mbstok-s-mbstok-s-l.md)|Find next token in string| +|[`_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 string to uppercase| +|[`strxfrm`, `wcsxfrm`, `_strxfrm_l`, `_wcsxfrm_l`](./reference/strxfrm-wcsxfrm-strxfrm-l-wcsxfrm-l.md)|Transform string into collated form based on locale-specific information| +|[`vsprintf`, `_vsprintf_l`, `vswprintf`, `_vswprintf_l`, `__vswprintf_l`](./reference/vsprintf-vsprintf-l-vswprintf-vswprintf-l-vswprintf-l.md), [`vsprintf_s`, `_vsprintf_s_l`, `vswprintf_s`, `_vswprintf_s_l`](./reference/vsprintf-s-vsprintf-s-l-vswprintf-s-vswprintf-s-l.md), [`_vsprintf_p`, `_vsprintf_p_l`, `_vswprintf_p`, `_vswprintf_p_l`](./reference/vsprintf-p-vsprintf-p-l-vswprintf-p-vswprintf-p-l.md)|Write formatted output using a pointer to a list of arguments| +|[`vsnprintf`, `_vsnprintf`, `_vsnprintf_l`, `_vsnwprintf`, `_vsnwprintf_l`](./reference/vsnprintf-vsnprintf-vsnprintf-l-vsnwprintf-vsnwprintf-l.md), [`vsnprintf_s`, `_vsnprintf_s`, `_vsnprintf_s_l`, `_vsnwprintf_s`, `_vsnwprintf_s_l`](./reference/vsnprintf-s-vsnprintf-s-vsnprintf-s-l-vsnwprintf-s-vsnwprintf-s-l.md)|Write formatted output using a pointer to a list of arguments| ## 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/string-to-numeric-value-functions.md b/docs/c-runtime-library/string-to-numeric-value-functions.md index cd445dc82e4..4696bac91cc 100644 --- a/docs/c-runtime-library/string-to-numeric-value-functions.md +++ b/docs/c-runtime-library/string-to-numeric-value-functions.md @@ -11,15 +11,15 @@ ms.assetid: 11cbd9ce-033b-4914-bf66-029070e7e385 --- # String to numeric value functions -- [`strtod`, `_strtod_l`, `wcstod`, `_wcstod_l`](../c-runtime-library/reference/strtod-strtod-l-wcstod-wcstod-l.md) +- [`strtod`, `_strtod_l`, `wcstod`, `_wcstod_l`](./reference/strtod-strtod-l-wcstod-wcstod-l.md) -- [`strtol`, `wcstol`, `_strtol_l`, `_wcstol_l`](../c-runtime-library/reference/strtol-wcstol-strtol-l-wcstol-l.md) +- [`strtol`, `wcstol`, `_strtol_l`, `_wcstol_l`](./reference/strtol-wcstol-strtol-l-wcstol-l.md) -- [`strtoul`, `_strtoul_l`, `wcstoul`, `_wcstoul_l`](../c-runtime-library/reference/strtoul-strtoul-l-wcstoul-wcstoul-l.md) +- [`strtoul`, `_strtoul_l`, `wcstoul`, `_wcstoul_l`](./reference/strtoul-strtoul-l-wcstoul-wcstoul-l.md) -- [`_strtoi64`, `_wcstoi64`, `_strtoi64_l`, `_wcstoi64_l`](../c-runtime-library/reference/strtoi64-wcstoi64-strtoi64-l-wcstoi64-l.md) +- [`_strtoi64`, `_wcstoi64`, `_strtoi64_l`, `_wcstoi64_l`](./reference/strtoi64-wcstoi64-strtoi64-l-wcstoi64-l.md) -- [`_strtoui64`, `_wcstoui64`, `_strtoui64_l`, `_wcstoui64_l`](../c-runtime-library/reference/strtoui64-wcstoui64-strtoui64-l-wcstoui64-l.md) +- [`_strtoui64`, `_wcstoui64`, `_strtoui64_l`, `_wcstoui64_l`](./reference/strtoui64-wcstoui64-strtoui64-l-wcstoui64-l.md) ## Remarks @@ -51,9 +51,9 @@ The `strtol`, `strtoul`, `_strtoi64`, and `_strtoui64` functions expect a string [*`whitespace`*] [{**`+`** \| **`-`**}] [**`0`** [{ **`x`** \| **`X`** }]] [`digits`] -If the base argument is between 2 and 36, then it's used as the base of the number. If it's 0, the initial characters referenced to by the end-of-conversion pointer are used to determine the base. If the first character is 0 and the second character isn't 'x' or 'X', the string is interpreted as an octal integer; otherwise, it's interpreted as a decimal number. If the first character is '0' and the second character is 'x' or 'X', the string is interpreted as a hexadecimal integer. If the first character is '1' through '9', the string is interpreted as a decimal integer. The letters 'a' through 'z' (or 'A' through 'Z') are assigned the values 10 through 35; only letters whose assigned values are less than *base* are permitted. `strtoul` and `_strtoui64` allow a plus (**`+`**) or minus (**`-`**) sign prefix; a leading minus sign indicates that the return value is negated. +If the base argument is between 2 and 36, then it's used as the base of the number. If it's 0, the initial characters referenced to by the end-of-conversion pointer are used to determine the base. If the first character is 0 and the second character isn't 'x' or 'X', the string is interpreted as an octal integer; otherwise, it's interpreted as a decimal number. If the first character is '0' and the second character is 'x' or 'X', the string is interpreted as a hexadecimal integer. If the first character is '1' through '9', the string is interpreted as a decimal integer. The letters 'a' through 'z' (or 'A' through 'Z') are assigned the values 10 through 35; only letters whose assigned values are less than *`base`* are permitted. `strtoul` and `_strtoui64` allow a plus (**`+`**) or minus (**`-`**) sign prefix; a leading minus sign indicates that the return value is negated. -The output value is affected by the setting of the `LC_NUMERIC` 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. +The output value is affected by the setting of the `LC_NUMERIC` 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. When the value returned by these functions would cause an overflow or underflow, or when conversion isn't possible, special case values are returned as shown: @@ -76,8 +76,8 @@ When the value returned by these functions would cause an overflow or underflow, ## See also -[Data conversion](../c-runtime-library/data-conversion.md)\ -[Locale](../c-runtime-library/locale.md)\ -[Interpretation of multibyte-character sequences](../c-runtime-library/interpretation-of-multibyte-character-sequences.md)\ -[Floating-point support](../c-runtime-library/floating-point-support.md)\ -[`atof`, `_atof_l`, `_wtof`, `_wtof_l`](../c-runtime-library/reference/atof-atof-l-wtof-wtof-l.md) +[Data conversion](./data-conversion.md)\ +[Locale](./locale.md)\ +[Interpretation of multibyte-character sequences](./interpretation-of-multibyte-character-sequences.md)\ +[Math and floating-point support](./floating-point-support.md)\ +[`atof`, `_atof_l`, `_wtof`, `_wtof_l`](./reference/atof-atof-l-wtof-wtof-l.md) diff --git a/docs/c-runtime-library/system-calls.md b/docs/c-runtime-library/system-calls.md index d796ab2b9df..b72b786c7eb 100644 --- a/docs/c-runtime-library/system-calls.md +++ b/docs/c-runtime-library/system-calls.md @@ -6,21 +6,21 @@ f1_keywords: ["c.system"] helpviewer_keywords: ["Windows [C++], system calls", "system calls"] ms.assetid: 0255f2ec-a5a0-487e-8b09-9dad001d81ed --- -# System Calls +# System calls The following functions are Windows operating system calls. -## System Call Functions +## System call functions |Function|Use| |--------------|---------| -|[`_findclose`](../c-runtime-library/reference/findclose.md)|Release resources from previous find operations| -|[`_findfirst`, `_findfirst32`, `_findfirst64`, `_findfirsti64`, `_findfirst32i64`, `_findfirst64i32`, `_wfindfirst`, `_wfindfirst32`, `_wfindfirst64`, `_wfindfirsti64`, `_wfindfirst32i64`, `_wfindfirst64i32`](../c-runtime-library/reference/findfirst-functions.md)|Find file with specified attributes| -|[`_findnext`, `_findnext32`, `_findnext64`, `_findnexti64`, `_findnext32i64`, `_findnext64i32`, `_wfindnext`, `_wfindnext32`, `_wfindnexti64`, `_wfindnext64`, `_wfindnexti64`](../c-runtime-library/reference/findnext-functions.md)|Find next file with specified attributes| +|[`_findclose`](./reference/findclose.md)|Release resources from previous find operations| +|[`_findfirst`, `_findfirst32`, `_findfirst64`, `_findfirsti64`, `_findfirst32i64`, `_findfirst64i32`, `_wfindfirst`, `_wfindfirst32`, `_wfindfirst64`, `_wfindfirsti64`, `_wfindfirst32i64`, `_wfindfirst64i32`](./reference/findfirst-functions.md)|Find file with specified attributes| +|[`_findnext`, `_findnext32`, `_findnext64`, `_findnexti64`, `_findnext32i64`, `_findnext64i32`, `_wfindnext`, `_wfindnext32`, `_wfindnexti64`, `_wfindnext64`, `_wfindnexti64`](./reference/findnext-functions.md)|Find next file with specified attributes| ## 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)
-[Directory Control](../c-runtime-library/directory-control.md)
-[Low-Level I/O](../c-runtime-library/low-level-i-o.md)
+[Universal C runtime routines by category](./run-time-routines-by-category.md)\ +[File handling](./file-handling.md)\ +[Directory control](./directory-control.md)\ +[Low-level I/O](./low-level-i-o.md) diff --git a/docs/c-runtime-library/text-and-binary-mode-file-i-o.md b/docs/c-runtime-library/text-and-binary-mode-file-i-o.md index b758747878c..09ba407c28f 100644 --- a/docs/c-runtime-library/text-and-binary-mode-file-i-o.md +++ b/docs/c-runtime-library/text-and-binary-mode-file-i-o.md @@ -5,19 +5,19 @@ ms.date: "04/11/2018" helpviewer_keywords: ["files [C++], open functions", "I/O [CRT], text files", "functions [CRT], file access", "binary access, binary mode file I/O", "translation, modes", "I/O [CRT], binary", "text files, I/O", "I/O [CRT], translation modes", "translation modes (file I/O)", "binary access"] ms.assetid: 3196e321-8b87-4609-b302-cd6f3c516051 --- -# Text and Binary Mode File I/O +# Text and binary mode file I/O File I/O operations take place in one of two translation modes, *text* or *binary*, depending on the mode in which the file is opened. Data files are often processed in text mode. To control the file translation mode, one can: - Retain the current default setting and specify the alternative mode only when you open selected files. -- Use the function [_set_fmode](../c-runtime-library/reference/set-fmode.md) to change the default mode for newly opened files. Use [_get_fmode](../c-runtime-library/reference/get-fmode.md) to find the current default mode. The initial default setting is text mode (**_O_TEXT**). +- Use the function [`_set_fmode`](./reference/set-fmode.md) to change the default mode for newly opened files. Use [`_get_fmode`](./reference/get-fmode.md) to find the current default mode. The initial default setting is text mode (**_O_TEXT**). -- Change the default translation mode directly by setting the global variable [_fmode](../c-runtime-library/fmode.md) in your program. The function **_set_fmode** sets the value of this variable, but it can also be set directly. +- Change the default translation mode directly by setting the global variable [`_fmode`](./fmode.md) in your program. The function **_set_fmode** sets the value of this variable, but it can also be set directly. -When you call a file-open function such as [_open](../c-runtime-library/reference/open-wopen.md), [fopen](../c-runtime-library/reference/fopen-wfopen.md), [fopen_s](../c-runtime-library/reference/fopen-s-wfopen-s.md), [freopen](../c-runtime-library/reference/freopen-wfreopen.md), [freopen_s](../c-runtime-library/reference/freopen-s-wfreopen-s.md), [_fsopen](../c-runtime-library/reference/fsopen-wfsopen.md) or [_sopen_s](../c-runtime-library/reference/sopen-s-wsopen-s.md), you can override the current default setting of **_fmode** by specifying the appropriate argument to the function [_set_fmode](../c-runtime-library/reference/set-fmode.md). The **stdin**, **stdout**, and **stderr** streams always open in text mode by default; you can also override this default when opening any of these files. Use [_setmode](../c-runtime-library/reference/setmode.md) to change the translation mode using the file descriptor after the file is open. +When you call a file-open function such as [`_open`](./reference/open-wopen.md), [`fopen`](./reference/fopen-wfopen.md), [`fopen_s`](./reference/fopen-s-wfopen-s.md), [`freopen`](./reference/freopen-wfreopen.md), [`freopen_s`](./reference/freopen-s-wfreopen-s.md), [`_fsopen`](./reference/fsopen-wfsopen.md) or [`_sopen_s`](./reference/sopen-s-wsopen-s.md), you can override the current default setting of **_fmode** by specifying the appropriate argument to the function [`_set_fmode`](./reference/set-fmode.md). The **stdin**, **stdout**, and **stderr** streams always open in text mode by default; you can also override this default when opening any of these files. Use [`_setmode`](./reference/setmode.md) to change the translation mode using the file descriptor after the file is open. ## 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/text-and-binary-streams.md b/docs/c-runtime-library/text-and-binary-streams.md index e2267d0b531..5150344ec6a 100644 --- a/docs/c-runtime-library/text-and-binary-streams.md +++ b/docs/c-runtime-library/text-and-binary-streams.md @@ -6,11 +6,11 @@ ms.topic: "conceptual" helpviewer_keywords: ["binary streams", "text streams"] ms.assetid: 57035e4a-955d-4e04-a560-fcf67ce68b4e --- -# Text and Binary Streams +# Text and binary streams A text stream consists of one or more lines of text that can be written to a text-oriented display so that they can be read. When it reads from a text stream, the program reads a newline at the end of each line. When it writes to a text stream, the program writes a newline to signal the end of a line. To match differing conventions among target environments for representing text in files, the library functions can alter the number and representations of characters transmitted between the program and a text stream. -Positioning within a text stream is limited. You can obtain the current file-position indicator by calling [fgetpos](../c-runtime-library/reference/fgetpos.md) or [ftell](../c-runtime-library/reference/ftell-ftelli64.md). You can position a text stream at a position obtained this way, or at the beginning or end of the stream, by calling [fsetpos](../c-runtime-library/reference/fsetpos.md) or [fseek](../c-runtime-library/reference/fseek-fseeki64.md). Any other change of position might well be not supported. +Positioning within a text stream is limited. You can obtain the current file-position indicator by calling [`fgetpos`](./reference/fgetpos.md) or [`ftell`](./reference/ftell-ftelli64.md). You can position a text stream at a position obtained this way, or at the beginning or end of the stream, by calling [`fsetpos`](./reference/fsetpos.md) or [`fseek`](./reference/fseek-fseeki64.md). Any other change of position might well be not supported. For maximum portability, the program shouldn't write: @@ -23,10 +23,10 @@ If you follow these rules, the sequence of characters you read from a text strea A binary stream consists of one or more bytes of arbitrary information. You can write the value stored in an arbitrary object to a (byte-oriented) binary stream and read exactly what was stored in the object when you wrote it. The library functions don't alter the bytes you transmit between the program and a binary stream. They can, however, append an arbitrary number of `NULL` bytes to the file that you write with a binary stream. The program must deal with these extra `NULL` bytes at the end of the binary stream. -Positioning within a binary stream is well-defined, except for positioning relative to the end of the stream. You can obtain and alter the current file-position indicator the same as for a text stream. The offsets used by [ftell](../c-runtime-library/reference/ftell-ftelli64.md) and [fseek](../c-runtime-library/reference/fseek-fseeki64.md) count bytes from the beginning of the stream (which is byte zero), so integer arithmetic on these offsets yields predictable results. +Positioning within a binary stream is well-defined, except for positioning relative to the end of the stream. You can obtain and alter the current file-position indicator the same as for a text stream. The offsets used by [`ftell`](./reference/ftell-ftelli64.md) and [`fseek`](./reference/fseek-fseeki64.md) count bytes from the beginning of the stream (which is byte zero), so integer arithmetic on these offsets yields predictable results. A byte stream treats a file as a sequence of bytes. Within the program, the stream looks like the same sequence of bytes, except for the possible alterations described above. ## 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/time-management.md b/docs/c-runtime-library/time-management.md index 59762aee437..e5def17e58c 100644 --- a/docs/c-runtime-library/time-management.md +++ b/docs/c-runtime-library/time-management.md @@ -4,39 +4,39 @@ title: "Time Management" ms.date: "11/04/2016" helpviewer_keywords: ["dates, run-time library members", "time, time management", "date functions", "time functions"] --- -# Time Management +# Time management Use these functions to get the current time and convert, adjust, and store it as necessary. The current time is the system time. -The **`_ftime`** and **`localtime`** routines use the **`TZ`** environment variable. If **`TZ`** isn't set, the run-time library attempts to use the time-zone information specified by the operating system. If this information is unavailable, these functions use the default value of PST8PDT. For more information on **`TZ`**, see [`_tzset`](../c-runtime-library/reference/tzset.md); also see [`_daylight`, `timezone`, and `_tzname`](../c-runtime-library/daylight-dstbias-timezone-and-tzname.md). +The **`_ftime`** and **`localtime`** routines use the **`TZ`** environment variable. If **`TZ`** isn't set, the run-time library attempts to use the time-zone information specified by the operating system. If this information is unavailable, these functions use the default value of PST8PDT. For more information on **`TZ`**, see [`_tzset`](./reference/tzset.md); also see [`_daylight`, `timezone`, and `_tzname`](./daylight-dstbias-timezone-and-tzname.md). -### Time Routines +### Time routines |Function|Use| |--------------|---------| -|[`asctime`, `_wasctime`](../c-runtime-library/reference/asctime-wasctime.md), [`asctime_s`, `_wasctime_s`](../c-runtime-library/reference/asctime-s-wasctime-s.md)|Convert time from type **`struct tm`** to character string. The versions of these functions with the **`_s`** suffix are more secure.| -|[`clock`](../c-runtime-library/reference/clock.md)|Return elapsed wall-clock time for process.| -|[`ctime`, `_ctime32`, `_ctime64`, `_wctime`, `_wctime32`, `_wctime64`](../c-runtime-library/reference/ctime-ctime32-ctime64-wctime-wctime32-wctime64.md), [`_ctime_s`, `_ctime32_s`, `_ctime64_s`, `_wctime_s`, `_wctime32_s`, `_wctime64_s`](../c-runtime-library/reference/ctime-s-ctime32-s-ctime64-s-wctime-s-wctime32-s-wctime64-s.md)|Convert time from type **`time_t`**, **`__time32_t`** or **`__time64_t`** to character string. The versions of these functions with the **`_s`** suffix are more secure.| -|[`difftime`, `_difftime32`, `_difftime64`](../c-runtime-library/reference/difftime-difftime32-difftime64.md)|Compute difference between two times.| -|[`_ftime`, `_ftime32`, `_ftime64`](../c-runtime-library/reference/ftime-ftime32-ftime64.md),[`_ftime_s`, `_ftime32_s`, _ftime64_s](../c-runtime-library/reference/ftime-s-ftime32-s-ftime64-s.md)|Store current system time in variable of type **`struct _timeb`** or type **`struct __timeb64`** The versions of these functions with the **`_s`** suffix are more secure.| -|[`_futime`, `_futime32`, `_futime64`](../c-runtime-library/reference/futime-futime32-futime64.md)|Set modification time on open file| -|[`gmtime`, `_gmtime32`, `_gmtime64`](../c-runtime-library/reference/gmtime-gmtime32-gmtime64.md), [`gmtime_s`, `_gmtime32_s`, `_gmtime64_s`](../c-runtime-library/reference/gmtime-s-gmtime32-s-gmtime64-s.md)|Convert time from type **`time_t`** to **`struct tm`** or from type **`__time64_t`** to **`struct tm`**. The versions of these functions with the **`_s`** suffix are more secure.| -|[`localtime`, `_localtime32`, `_localtime64`](../c-runtime-library/reference/localtime-localtime32-localtime64.md), [`localtime_s`, `_localtime32_s`, `_localtime64_s`](../c-runtime-library/reference/localtime-s-localtime32-s-localtime64-s.md)|Convert time from type **`time_t`** to **`struct tm`** or from type **`__time64_t`** to **`struct tm`** with local correction. The versions of these functions with the **`_s`** suffix are more secure.| -|[`_mkgmtime`, `_mkgmtime32`, `_mkgmtime64`](../c-runtime-library/reference/mkgmtime-mkgmtime32-mkgmtime64.md)|Convert time to calendar value in Greenwich Mean Time.| -|[`mktime`, `_mktime32`, `_mktime64`](../c-runtime-library/reference/mktime-mktime32-mktime64.md)|Convert time to calendar value.| -|[`_strdate`, `_wstrdate`](../c-runtime-library/reference/strdate-wstrdate.md), [`_strdate_s`, `_wstrdate_s`](../c-runtime-library/reference/strdate-s-wstrdate-s.md)|Return current system date as string. The versions of these functions with the **`_s`** suffix are more secure.| -|[`strftime`, `wcsftime`, `_strftime_l`, `_wcsftime_l`](../c-runtime-library/reference/strftime-wcsftime-strftime-l-wcsftime-l.md)|Format date-and-time string for international use.| -|[`_strtime`, `_wstrtime`](../c-runtime-library/reference/strtime-wstrtime.md), [`_strtime_s`, `_wstrtime_s`](../c-runtime-library/reference/strtime-s-wstrtime-s.md)|Return current system time as string. The versions of these functions with the **`_s`** suffix are more secure.| -|[`time`, `_time32`, `_time64`](../c-runtime-library/reference/time-time32-time64.md)|Get current system time as type **`time_t`**, **`__time32_t`** or as type **`__time64_t`**.| -|[`_tzset`](../c-runtime-library/reference/tzset.md)|Set external time variables from environment time variable **`TZ`**.| -|[`_utime`, `_utime32`, `_utime64`, `_wutime`, `_wutime32`, `_wutime64`](../c-runtime-library/reference/utime-utime32-utime64-wutime-wutime32-wutime64.md)|Set modification time for specified file using either current time or time value stored in structure.| +|[`asctime`, `_wasctime`](./reference/asctime-wasctime.md), [`asctime_s`, `_wasctime_s`](./reference/asctime-s-wasctime-s.md)|Convert time from type **`struct tm`** to character string. The versions of these functions with the **`_s`** suffix are more secure.| +|[`clock`](./reference/clock.md)|Return elapsed wall-clock time for process.| +|[`ctime`, `_ctime32`, `_ctime64`, `_wctime`, `_wctime32`, `_wctime64`](./reference/ctime-ctime32-ctime64-wctime-wctime32-wctime64.md), [`_ctime_s`, `_ctime32_s`, `_ctime64_s`, `_wctime_s`, `_wctime32_s`, `_wctime64_s`](./reference/ctime-s-ctime32-s-ctime64-s-wctime-s-wctime32-s-wctime64-s.md)|Convert time from type **`time_t`**, **`__time32_t`** or **`__time64_t`** to character string. The versions of these functions with the **`_s`** suffix are more secure.| +|[`difftime`, `_difftime32`, `_difftime64`](./reference/difftime-difftime32-difftime64.md)|Compute difference between two times.| +|[`_ftime`, `_ftime32`, `_ftime64`](./reference/ftime-ftime32-ftime64.md),[`_ftime_s`, `_ftime32_s`, _ftime64_s](./reference/ftime-s-ftime32-s-ftime64-s.md)|Store current system time in variable of type **`struct _timeb`** or type **`struct __timeb64`** The versions of these functions with the **`_s`** suffix are more secure.| +|[`_futime`, `_futime32`, `_futime64`](./reference/futime-futime32-futime64.md)|Set modification time on open file| +|[`gmtime`, `_gmtime32`, `_gmtime64`](./reference/gmtime-gmtime32-gmtime64.md), [`gmtime_s`, `_gmtime32_s`, `_gmtime64_s`](./reference/gmtime-s-gmtime32-s-gmtime64-s.md)|Convert time from type **`time_t`** to **`struct tm`** or from type **`__time64_t`** to **`struct tm`**. The versions of these functions with the **`_s`** suffix are more secure.| +|[`localtime`, `_localtime32`, `_localtime64`](./reference/localtime-localtime32-localtime64.md), [`localtime_s`, `_localtime32_s`, `_localtime64_s`](./reference/localtime-s-localtime32-s-localtime64-s.md)|Convert time from type **`time_t`** to **`struct tm`** or from type **`__time64_t`** to **`struct tm`** with local correction. The versions of these functions with the **`_s`** suffix are more secure.| +|[`_mkgmtime`, `_mkgmtime32`, `_mkgmtime64`](./reference/mkgmtime-mkgmtime32-mkgmtime64.md)|Convert time to calendar value in Greenwich Mean Time.| +|[`mktime`, `_mktime32`, `_mktime64`](./reference/mktime-mktime32-mktime64.md)|Convert time to calendar value.| +|[`_strdate`, `_wstrdate`](./reference/strdate-wstrdate.md), [`_strdate_s`, `_wstrdate_s`](./reference/strdate-s-wstrdate-s.md)|Return current system date as string. The versions of these functions with the **`_s`** suffix are more secure.| +|[`strftime`, `wcsftime`, `_strftime_l`, `_wcsftime_l`](./reference/strftime-wcsftime-strftime-l-wcsftime-l.md)|Format date-and-time string for international use.| +|[`_strtime`, `_wstrtime`](./reference/strtime-wstrtime.md), [`_strtime_s`, `_wstrtime_s`](./reference/strtime-s-wstrtime-s.md)|Return current system time as string. The versions of these functions with the **`_s`** suffix are more secure.| +|[`time`, `_time32`, `_time64`](./reference/time-time32-time64.md)|Get current system time as type **`time_t`**, **`__time32_t`** or as type **`__time64_t`**.| +|[`_tzset`](./reference/tzset.md)|Set external time variables from environment time variable **`TZ`**.| +|[`_utime`, `_utime32`, `_utime64`, `_wutime`, `_wutime32`, `_wutime64`](./reference/utime-utime32-utime64-wutime-wutime32-wutime64.md)|Set modification time for specified file using either current time or time value stored in structure.| > [!NOTE] > In all versions of Microsoft C/C++ except Microsoft C/C++ version 7.0, and in all versions of Visual C++, the time function returns the current time as the number of seconds elapsed since midnight on January 1, 1970. In Microsoft C/C++ version 7.0, **`time`** returned the current time as the number of seconds elapsed since midnight on December 31, 1899. > [!NOTE] -> In versions of Visual C++ and Microsoft C/C++ before Visual Studio 2005, **`time_t`** was a **`long int`** (32 bits) and hence could not be used for dates past 3:14:07 January 19, 2038, UTC. **`time_t`** is now equivalent to **`__time64_t`** by default, but defining **`_USE_32BIT_TIME_T`** changes **`time_t`** to **`__time32_t`** and forces many time functions to call versions that take the 32-bit **`time_t`**. For more information, see [Standard Types](../c-runtime-library/standard-types.md) and comments in the documentation for the individual time functions. +> In versions of Visual C++ and Microsoft C/C++ before Visual Studio 2005, **`time_t`** was a **`long int`** (32 bits) and hence could not be used for dates past 3:14:07 January 19, 2038, UTC. **`time_t`** is now equivalent to **`__time64_t`** by default, but defining **`_USE_32BIT_TIME_T`** changes **`time_t`** to **`__time32_t`** and forces many time functions to call versions that take the 32-bit **`time_t`**. For more information, see [Standard types](./standard-types.md) and comments in the documentation for the individual time functions. ## See also -[Universal C runtime routines by category](../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/tmp-max-l-tmpnam.md b/docs/c-runtime-library/tmp-max-l-tmpnam.md index ffdb4b615b4..7d6d12a43df 100644 --- a/docs/c-runtime-library/tmp-max-l-tmpnam.md +++ b/docs/c-runtime-library/tmp-max-l-tmpnam.md @@ -20,4 +20,4 @@ ms.assetid: ab19fd0c-b5b7-49f7-b23d-da9dfbcf0c1f ## See also -[Global Constants](../c-runtime-library/global-constants.md) +[Global constants](./global-constants.md) diff --git a/docs/c-runtime-library/to-functions.md b/docs/c-runtime-library/to-functions.md index 33997be0f6e..d5de3d49681 100644 --- a/docs/c-runtime-library/to-functions.md +++ b/docs/c-runtime-library/to-functions.md @@ -13,9 +13,9 @@ ms.assetid: f636a4c6-8c9f-4be2-baac-064f9dbae300 Each of the **`to`** functions and its associated macro, if any, converts a single character to another character. -[__toascii](../c-runtime-library/reference/toascii-toascii.md)\ -[tolower, _tolower, towlower](../c-runtime-library/reference/tolower-tolower-towlower-tolower-l-towlower-l.md)\ -[toupper, _toupper, towupper](../c-runtime-library/reference/toupper-toupper-towupper-toupper-l-towupper-l.md) +[`__toascii`](./reference/toascii-toascii.md)\ +[`tolower`, `_tolower`, `towlower`](./reference/tolower-tolower-towlower-tolower-l-towlower-l.md)\ +[`toupper`, `_toupper`, `towupper`](./reference/toupper-toupper-towupper-toupper-l-towupper-l.md) ## Remarks @@ -95,6 +95,6 @@ sOME OF these LETTERS ARE cAPITALS. ## See also -[Data Conversion](../c-runtime-library/data-conversion.md)
-[Locale](../c-runtime-library/locale.md)
-[is, isw Routines](../c-runtime-library/is-isw-routines.md) +[Data conversion](./data-conversion.md)\ +[Locale](./locale.md)\ +[`is`, `isw` routines](./is-isw-routines.md) diff --git a/docs/c-runtime-library/translation-mode-constants.md b/docs/c-runtime-library/translation-mode-constants.md index 1906bba5aa1..8c1b0fb80c8 100644 --- a/docs/c-runtime-library/translation-mode-constants.md +++ b/docs/c-runtime-library/translation-mode-constants.md @@ -6,7 +6,7 @@ f1_keywords: ["_O_BINARY", "_O_TEXT", "_O_RAW"] helpviewer_keywords: ["O_BINARY constant", "O_TEXT constant", "O_RAW constant", "_O_TEXT constant", "_O_RAW constant", "translation constants", "_O_BINARY constant", "translation, constants", "translation, modes", "translation modes (file I/O)"] ms.assetid: a5993bf4-7e7a-47f9-83c3-e46332b85579 --- -# Translation Mode Constants +# Translation mode constants ## Syntax @@ -26,12 +26,12 @@ The allowed values are: `_O_BINARY` | Opens file in binary (untranslated) mode. The above translations are suppressed. `_O_RAW` | Same as `_O_BINARY`. Supported for C 2.0 compatibility. -For more information, see [Text and Binary Mode File I/O](../c-runtime-library/text-and-binary-mode-file-i-o.md) and [File Translation](../c-runtime-library/file-translation-constants.md). +For more information, see [Text and binary mode file I/O](./text-and-binary-mode-file-i-o.md) and [File translation constants](./file-translation-constants.md). ## See also -[_open, _wopen](../c-runtime-library/reference/open-wopen.md)
-[_pipe](../c-runtime-library/reference/pipe.md)
-[_sopen, _wsopen](../c-runtime-library/reference/sopen-wsopen.md)
-[_setmode](../c-runtime-library/reference/setmode.md)
-[Global Constants](../c-runtime-library/global-constants.md) +[`_open`, `_wopen`](./reference/open-wopen.md)\ +[`_pipe`](./reference/pipe.md)\ +[`_sopen`, `_wsopen`](./reference/sopen-wsopen.md)\ +[`_setmode`](./reference/setmode.md)\ +[Global constants](./global-constants.md) diff --git a/docs/c-runtime-library/truncate.md b/docs/c-runtime-library/truncate.md index 8a5c664598c..7f1e0d211d8 100644 --- a/docs/c-runtime-library/truncate.md +++ b/docs/c-runtime-library/truncate.md @@ -19,39 +19,39 @@ Specifies string truncation behavior. `_TRUNCATE` enables truncation behavior when passed as the `count` parameter to these functions: -[`strncpy_s`, `_strncpy_s_l`, `wcsncpy_s`, `_wcsncpy_s_l`, `_mbsncpy_s`, `_mbsncpy_s_l`](../c-runtime-library/reference/strncpy-s-strncpy-s-l-wcsncpy-s-wcsncpy-s-l-mbsncpy-s-mbsncpy-s-l.md) +[`strncpy_s`, `_strncpy_s_l`, `wcsncpy_s`, `_wcsncpy_s_l`, `_mbsncpy_s`, `_mbsncpy_s_l`](./reference/strncpy-s-strncpy-s-l-wcsncpy-s-wcsncpy-s-l-mbsncpy-s-mbsncpy-s-l.md) -[`strncat_s`, `_strncat_s_l`, `wcsncat_s`, `_wcsncat_s_l`, `_mbsncat_s`, `_mbsncat_s_l`](../c-runtime-library/reference/strncat-s-strncat-s-l-wcsncat-s-wcsncat-s-l-mbsncat-s-mbsncat-s-l.md) +[`strncat_s`, `_strncat_s_l`, `wcsncat_s`, `_wcsncat_s_l`, `_mbsncat_s`, `_mbsncat_s_l`](./reference/strncat-s-strncat-s-l-wcsncat-s-wcsncat-s-l-mbsncat-s-mbsncat-s-l.md) -[`mbstowcs_s`, `_mbstowcs_s_l`](../c-runtime-library/reference/mbstowcs-s-mbstowcs-s-l.md) +[`mbstowcs_s`, `_mbstowcs_s_l`](./reference/mbstowcs-s-mbstowcs-s-l.md) -[`mbsrtowcs_s`](../c-runtime-library/reference/mbsrtowcs-s.md) +[`mbsrtowcs_s`](./reference/mbsrtowcs-s.md) -[`wcstombs_s`, `_wcstombs_s_l`](../c-runtime-library/reference/wcstombs-s-wcstombs-s-l.md) +[`wcstombs_s`, `_wcstombs_s_l`](./reference/wcstombs-s-wcstombs-s-l.md) -[`wcsrtombs_s`](../c-runtime-library/reference/wcsrtombs-s.md) +[`wcsrtombs_s`](./reference/wcsrtombs-s.md) -[`_snprintf_s`, `_snprintf_s_l`, `_snwprintf_s`, `_snwprintf_s_l`](../c-runtime-library/reference/snprintf-s-snprintf-s-l-snwprintf-s-snwprintf-s-l.md) +[`_snprintf_s`, `_snprintf_s_l`, `_snwprintf_s`, `_snwprintf_s_l`](./reference/snprintf-s-snprintf-s-l-snwprintf-s-snwprintf-s-l.md) -[`vsnprintf_s`, `_vsnprintf_s`, `_vsnprintf_s_l`, `_vsnwprintf_s`, `_vsnwprintf_s_l`](../c-runtime-library/reference/vsnprintf-s-vsnprintf-s-vsnprintf-s-l-vsnwprintf-s-vsnwprintf-s-l.md) +[`vsnprintf_s`, `_vsnprintf_s`, `_vsnprintf_s_l`, `_vsnwprintf_s`, `_vsnwprintf_s_l`](./reference/vsnprintf-s-vsnprintf-s-vsnprintf-s-l-vsnwprintf-s-vsnwprintf-s-l.md) -If the destination buffer is too small to hold the entire string, the normal behavior of these functions is to treat it as an error situation (see [Parameter Validation](../c-runtime-library/parameter-validation.md)). However, if string truncation is enabled by passing `_TRUNCATE`, these functions will copy only as much of the string as will fit, leaving the destination buffer null-terminated, and return successfully. +If the destination buffer is too small to hold the entire string, the normal behavior of these functions is to treat it as an error situation (see [Parameter validation](./parameter-validation.md)). However, if string truncation is enabled by passing `_TRUNCATE`, these functions will copy only as much of the string as will fit, leaving the destination buffer null-terminated, and return successfully. String truncation changes the return values of the affected functions. The following functions return 0 if no truncation occurs, or `STRUNCATE` if truncation does occur: -[`strncpy_s`, `_strncpy_s_l`, `wcsncpy_s`, `_wcsncpy_s_l`, `_mbsncpy_s`, `_mbsncpy_s_l`](../c-runtime-library/reference/strncpy-s-strncpy-s-l-wcsncpy-s-wcsncpy-s-l-mbsncpy-s-mbsncpy-s-l.md) +[`strncpy_s`, `_strncpy_s_l`, `wcsncpy_s`, `_wcsncpy_s_l`, `_mbsncpy_s`, `_mbsncpy_s_l`](./reference/strncpy-s-strncpy-s-l-wcsncpy-s-wcsncpy-s-l-mbsncpy-s-mbsncpy-s-l.md) -[`strncat_s`, `_strncat_s_l`, `wcsncat_s`, `_wcsncat_s_l`, `_mbsncat_s`, `_mbsncat_s_l`](../c-runtime-library/reference/strncat-s-strncat-s-l-wcsncat-s-wcsncat-s-l-mbsncat-s-mbsncat-s-l.md) +[`strncat_s`, `_strncat_s_l`, `wcsncat_s`, `_wcsncat_s_l`, `_mbsncat_s`, `_mbsncat_s_l`](./reference/strncat-s-strncat-s-l-wcsncat-s-wcsncat-s-l-mbsncat-s-mbsncat-s-l.md) -[`wcstombs_s`, `_wcstombs_s_l`](../c-runtime-library/reference/wcstombs-s-wcstombs-s-l.md) +[`wcstombs_s`, `_wcstombs_s_l`](./reference/wcstombs-s-wcstombs-s-l.md) -[`mbstowcs_s`, `_mbstowcs_s_l`](../c-runtime-library/reference/mbstowcs-s-mbstowcs-s-l.md) +[`mbstowcs_s`, `_mbstowcs_s_l`](./reference/mbstowcs-s-mbstowcs-s-l.md) The following functions return the number of characters copied if no truncation occurs, or -1 if truncation does occur (matching the behavior of the original `snprintf` functions): -[`_snprintf_s`, `_snprintf_s_l`, `_snwprintf_s`, `_snwprintf_s_l`](../c-runtime-library/reference/snprintf-s-snprintf-s-l-snwprintf-s-snwprintf-s-l.md) +[`_snprintf_s`, `_snprintf_s_l`, `_snwprintf_s`, `_snwprintf_s_l`](./reference/snprintf-s-snprintf-s-l-snwprintf-s-snwprintf-s-l.md) -[`vsnprintf_s`, `_vsnprintf_s`, `_vsnprintf_s_l`, `_vsnwprintf_s`, `_vsnwprintf_s_l`](../c-runtime-library/reference/vsnprintf-s-vsnprintf-s-vsnprintf-s-l-vsnwprintf-s-vsnwprintf-s-l.md) +[`vsnprintf_s`, `_vsnprintf_s`, `_vsnprintf_s_l`, `_vsnwprintf_s`, `_vsnwprintf_s_l`](./reference/vsnprintf-s-vsnprintf-s-vsnprintf-s-l-vsnwprintf-s-vsnwprintf-s-l.md) ## Example @@ -78,4 +78,4 @@ truncation occurred! ## See also -[Global Constants](../c-runtime-library/global-constants.md) +[Global constants](./global-constants.md) diff --git a/docs/c-runtime-library/type-checking-crt.md b/docs/c-runtime-library/type-checking-crt.md index 7837ce8daf8..79014037914 100644 --- a/docs/c-runtime-library/type-checking-crt.md +++ b/docs/c-runtime-library/type-checking-crt.md @@ -6,7 +6,7 @@ f1_keywords: ["c.types"] helpviewer_keywords: ["checking type", "variable argument functions", "type checking"] ms.assetid: 1ba7590b-d1c0-4636-b6a0-e231395abdad --- -# Type Checking (CRT) +# Type checking (CRT) The compiler performs limited type checking on functions that can take a variable number of arguments, as follows: @@ -24,4 +24,4 @@ The compiler performs the same limited type checking on the wide-character count ## 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/tzname-max.md b/docs/c-runtime-library/tzname-max.md index 9cc4bf37ca9..f63e65c1f16 100644 --- a/docs/c-runtime-library/tzname-max.md +++ b/docs/c-runtime-library/tzname-max.md @@ -8,7 +8,7 @@ ms.assetid: e2286cb8-751d-4557-9650-5c4b98a8f7be --- # TZNAME_MAX -**Obsolete**. The maximum permissible string length for a time zone name variable. This macro was defined in \ in Visual Studio 2012 and earlier versions. It isn't defined in Visual Studio 2013 and later versions. To get the length required to hold the current time zone name, use [_get_tzname](../c-runtime-library/reference/get-tzname.md). +**Obsolete**. The maximum permissible string length for a time zone name variable. This macro was defined in \ in Visual Studio 2012 and earlier versions. It isn't defined in Visual Studio 2013 and later versions. To get the length required to hold the current time zone name, use [`_get_tzname`](./reference/get-tzname.md). ## Syntax @@ -18,6 +18,6 @@ ms.assetid: e2286cb8-751d-4557-9650-5c4b98a8f7be ## See also -[Environmental Constants](../c-runtime-library/environmental-constants.md)
-[Global Constants](../c-runtime-library/global-constants.md)
-[_get_tzname](../c-runtime-library/reference/get-tzname.md) +[Environmental constants](./environmental-constants.md)\ +[Global constants](./global-constants.md)\ +[`_get_tzname`](./reference/get-tzname.md) diff --git a/docs/c-runtime-library/unicode-stream-i-o-in-text-and-binary-modes.md b/docs/c-runtime-library/unicode-stream-i-o-in-text-and-binary-modes.md index bfddf80ae3c..3b46f04bdd5 100644 --- a/docs/c-runtime-library/unicode-stream-i-o-in-text-and-binary-modes.md +++ b/docs/c-runtime-library/unicode-stream-i-o-in-text-and-binary-modes.md @@ -6,7 +6,7 @@ ms.date: "11/04/2016" helpviewer_keywords: ["stream I/O routines", "I/O [CRT], unicode stream", "Unicode, stream I/O routines", "Unicode stream I/O"] ms.assetid: 68be0c3e-a9e6-4fd5-b34a-1b5207f0e7d6 --- -# Unicode Stream I/O in Text and Binary Modes +# Unicode stream I/O in text and binary modes When a Unicode stream I/O routine (such as **fwprintf**, **fwscanf**, **fgetwc**, **fputwc**, **fgetws**, or **fputws**) operates on a file that is open in text mode (the default), two kinds of character conversions take place: @@ -18,5 +18,5 @@ However, when a Unicode stream-I/O function operates in binary mode, the file is ## See also -[Universal C runtime routines by category](../c-runtime-library/run-time-routines-by-category.md)
-[Input and Output](../c-runtime-library/input-and-output.md)
+[Universal C runtime routines by category](./run-time-routines-by-category.md)\ +[Input and output](./input-and-output.md) diff --git a/docs/c-runtime-library/unicode-the-wide-character-set.md b/docs/c-runtime-library/unicode-the-wide-character-set.md index d575d5ff120..36327233bec 100644 --- a/docs/c-runtime-library/unicode-the-wide-character-set.md +++ b/docs/c-runtime-library/unicode-the-wide-character-set.md @@ -20,5 +20,5 @@ Generally, wide characters use more space in memory than multibyte characters. B ## 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/unix.md b/docs/c-runtime-library/unix.md index a063d6356bf..5d63b80fd2b 100644 --- a/docs/c-runtime-library/unix.md +++ b/docs/c-runtime-library/unix.md @@ -22,4 +22,4 @@ If you plan to port your programs to UNIX, follow these guidelines: ## See also -[Compatibility](../c-runtime-library/compatibility.md) +[Compatibility](./compatibility.md) diff --git a/docs/c-runtime-library/unlock.md b/docs/c-runtime-library/unlock.md index 8dfec7d11d7..05d5fe51c0c 100644 --- a/docs/c-runtime-library/unlock.md +++ b/docs/c-runtime-library/unlock.md @@ -27,7 +27,7 @@ void __cdecl _unlock( #### Parameters -*`locknum`*
+*`locknum`*\ [in] The identifier of the lock to release. ## Requirements @@ -36,5 +36,5 @@ void __cdecl _unlock( ## See also -[Alphabetical Function Reference](../c-runtime-library/reference/crt-alphabetical-function-reference.md)
-[`_lock`](../c-runtime-library/lock.md) +[Alphabetical function reference](./reference/crt-alphabetical-function-reference.md)\ +[`_lock`](./lock.md) diff --git a/docs/c-runtime-library/using-generic-text-mappings.md b/docs/c-runtime-library/using-generic-text-mappings.md index e71bb9d0081..7a23dd30f25 100644 --- a/docs/c-runtime-library/using-generic-text-mappings.md +++ b/docs/c-runtime-library/using-generic-text-mappings.md @@ -7,13 +7,13 @@ f1_keywords: ["_UNICODE"] helpviewer_keywords: ["_TXCHAR type", "TINT type", "_TCHAR type", "TSCHAR type", "TEXT type", "TCHAR type", "TCHAR.H data types, mappings defined in", "generic-text data types", "_TINT type", "TUCHAR type", "_UNICODE constant", "TXCHAR type", "generic-text mappings", "_TSCHAR type", "T type", "mappings, generic-text", "_TUCHAR type", "MBCS data type", "_MBCS data type", "_TEXT type", "UNICODE constant", "_T type"] ms.assetid: 2848121c-e51f-4b9b-a2e6-833ece4b0cb3 --- -# Using Generic-Text Mappings +# Using generic-text mappings **Microsoft Specific** To simplify code development for various international markets, the Microsoft run-time library provides Microsoft-specific "generic-text" mappings for many data types, routines, and other objects. These mappings are defined in TCHAR.H. You can use these name mappings to write generic code that can be compiled for any of the three kinds of character sets: ASCII (SBCS), MBCS, or Unicode, depending on a manifest constant you define using a `#define` statement. Generic-text mappings are Microsoft extensions that aren't ANSI compatible. -### Preprocessor Directives for Generic-Text Mappings +### Preprocessor directives for generic-text mappings |#define|Compiled version|Example| |--------------|----------------------|-------------| @@ -36,7 +36,7 @@ The generic-text data type `_TCHAR`, also defined in TCHAR.H, maps to type **`ch |`_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)| -For a complete list of generic-text mappings of routines, variables, and other objects, see [Generic-Text Mappings](../c-runtime-library/generic-text-mappings.md). +For a complete list of generic-text mappings of routines, variables, and other objects, see [Generic-text mappings](./generic-text-mappings.md). The following code fragments illustrate the use of `_TCHAR` and `_tcsrev` for mapping to the MBCS, Unicode, and SBCS models. @@ -72,8 +72,8 @@ These macros let you write, maintain, and compile a single source code file usin ## 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)
-[A Sample Generic-Text Program](../c-runtime-library/a-sample-generic-text-program.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)\ +[A sample generic-text program](./a-sample-generic-text-program.md) diff --git a/docs/c-runtime-library/using-tchar-h-data-types-with-mbcs.md b/docs/c-runtime-library/using-tchar-h-data-types-with-mbcs.md index c2b34b6c3fe..a14ea22fcff 100644 --- a/docs/c-runtime-library/using-tchar-h-data-types-with-mbcs.md +++ b/docs/c-runtime-library/using-tchar-h-data-types-with-mbcs.md @@ -6,11 +6,11 @@ ms.date: "11/04/2016" helpviewer_keywords: ["TCHAR.H data types", "MBCS data type", "_MBCS data type"] ms.assetid: 48f471e7-9d2b-4a39-b841-16a0e15c0a18 --- -# Using TCHAR.H Data Types with _MBCS +# Using tchar.h data types with _MBCS **Microsoft Specific** -As the table of generic-text routine mappings indicates (see [Generic-Text Mappings](../c-runtime-library/generic-text-mappings.md)), when the manifest constant **_MBCS** is defined, a given generic-text routine will map to one of the following kinds of routines: +As the table of generic-text routine mappings indicates (see [Generic-text mappings](./generic-text-mappings.md)), when the manifest constant **_MBCS** is defined, a given generic-text routine will map to one of the following kinds of routines: - An SBCS routine that handles multibyte bytes, characters, and strings appropriately. In this case, the string arguments are expected to be of type `char*`. For example, **_tprintf** maps to **printf**; the string arguments to **printf** are of type `char*`. If you use the **_TCHAR** generic-text data type for your string types, the formal and actual parameter types for **printf** match because `_TCHAR*` maps to `char*`. @@ -53,11 +53,11 @@ Following are three solutions for preventing this type conflict (and the C compi #define _tcschr _mbschr ``` -When you take this approach, be careful to ensure that appropriate data types are used for string arguments and string return values. You can use type casting to ensure proper type matching or you can use the **_TXCHAR** generic-text data type. **_TXCHAR** maps to type **`char`** in SBCS code but maps to type **`unsigned char`** in MBCS code. For more information about generic-text macros, see [Generic-Text Mappings](../c-runtime-library/generic-text-mappings.md). +When you take this approach, be careful to ensure that appropriate data types are used for string arguments and string return values. You can use type casting to ensure proper type matching or you can use the **_TXCHAR** generic-text data type. **_TXCHAR** maps to type **`char`** in SBCS code but maps to type **`unsigned char`** in MBCS code. For more information about generic-text macros, see [Generic-text mappings](./generic-text-mappings.md). **END Microsoft Specific** ## 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/vprintf-functions.md b/docs/c-runtime-library/vprintf-functions.md index fd0d5ed2a02..8c98cd20f3a 100644 --- a/docs/c-runtime-library/vprintf-functions.md +++ b/docs/c-runtime-library/vprintf-functions.md @@ -13,18 +13,18 @@ ms.assetid: 02ac7c51-eab1-4bf0-bf4c-77065e3fa744 Each of the `vprintf` functions takes a pointer to an argument list, then formats and writes the given data to a particular destination. The functions differ in several ways: in the parameter validation, whether the functions take single-byte or wide character strings, the output destination, and the support for specifying the order parameters are used in the format string. -[_vcprintf, _vcwprintf](../c-runtime-library/reference/vcprintf-vcprintf-l-vcwprintf-vcwprintf-l.md)\ -[vfprintf, vfwprintf](../c-runtime-library/reference/vfprintf-vfprintf-l-vfwprintf-vfwprintf-l.md)\ -[_vfprintf_p, _vfprintf_p_l, _vfwprintf_p, _vfwprintf_p_l](../c-runtime-library/reference/vfprintf-p-vfprintf-p-l-vfwprintf-p-vfwprintf-p-l.md)\ -[vfprintf_s, _vfprintf_s_l, vfwprintf_s, _vfwprintf_s_l](../c-runtime-library/reference/vfprintf-s-vfprintf-s-l-vfwprintf-s-vfwprintf-s-l.md)\ -[vprintf, vwprintf](../c-runtime-library/reference/vprintf-vprintf-l-vwprintf-vwprintf-l.md)\ -[_vprintf_p, _vprintf_p_l, _vwprintf_p, _vwprintf_p_l](../c-runtime-library/reference/vprintf-p-vprintf-p-l-vwprintf-p-vwprintf-p-l.md)\ -[vprintf_s, _vprintf_s_l, vwprintf_s, _vwprintf_s_l](../c-runtime-library/reference/vprintf-s-vprintf-s-l-vwprintf-s-vwprintf-s-l.md)\ -[_vscprintf, _vscprintf_l, _vscwprintf, _vscwprintf_l](../c-runtime-library/reference/vscprintf-vscprintf-l-vscwprintf-vscwprintf-l.md)\ -[_vsnprintf, _vsnwprintf](../c-runtime-library/reference/vsnprintf-vsnprintf-vsnprintf-l-vsnwprintf-vsnwprintf-l.md) -[vsprintf, vswprintf](../c-runtime-library/reference/vsprintf-vsprintf-l-vswprintf-vswprintf-l-vswprintf-l.md)\ -[_vsprintf_p, _vsprintf_p_l, _vswprintf_p, _vswprintf_p_l](../c-runtime-library/reference/vsprintf-p-vsprintf-p-l-vswprintf-p-vswprintf-p-l.md)\ -[vsprintf_s, _vsprintf_s_l, vswprintf_s, _vswprintf_s_l](../c-runtime-library/reference/vsprintf-s-vsprintf-s-l-vswprintf-s-vswprintf-s-l.md) +[`_vcprintf`, `_vcwprintf`](./reference/vcprintf-vcprintf-l-vcwprintf-vcwprintf-l.md)\ +[`vfprintf`, `vfwprintf`](./reference/vfprintf-vfprintf-l-vfwprintf-vfwprintf-l.md)\ +[`_vfprintf_p`, `_vfprintf_p_l`, `_vfwprintf_p`, `_vfwprintf_p_l`](./reference/vfprintf-p-vfprintf-p-l-vfwprintf-p-vfwprintf-p-l.md)\ +[`vfprintf_s`, `_vfprintf_s_l`, `vfwprintf_s`, `_vfwprintf_s_l`](./reference/vfprintf-s-vfprintf-s-l-vfwprintf-s-vfwprintf-s-l.md)\ +[`vprintf`, `vwprintf`](./reference/vprintf-vprintf-l-vwprintf-vwprintf-l.md)\ +[`_vprintf_p`, `_vprintf_p_l`, `_vwprintf_p`, `_vwprintf_p_l`](./reference/vprintf-p-vprintf-p-l-vwprintf-p-vwprintf-p-l.md)\ +[`vprintf_s`, `_vprintf_s_l`, `vwprintf_s`, `_vwprintf_s_l`](./reference/vprintf-s-vprintf-s-l-vwprintf-s-vwprintf-s-l.md)\ +[`_vscprintf`, `_vscprintf_l`, `_vscwprintf`, `_vscwprintf_l`](./reference/vscprintf-vscprintf-l-vscwprintf-vscwprintf-l.md)\ +[`_vsnprintf`, `_vsnwprintf`](./reference/vsnprintf-vsnprintf-vsnprintf-l-vsnwprintf-vsnwprintf-l.md) +[`vsprintf`, `vswprintf`](./reference/vsprintf-vsprintf-l-vswprintf-vswprintf-l-vswprintf-l.md)\ +[`_vsprintf_p`, `_vsprintf_p_l`, `_vswprintf_p`, `_vswprintf_p_l`](./reference/vsprintf-p-vsprintf-p-l-vswprintf-p-vswprintf-p-l.md)\ +[`vsprintf_s`, `_vsprintf_s_l`, `vswprintf_s`, `_vswprintf_s_l`](./reference/vsprintf-s-vsprintf-s-l-vswprintf-s-vswprintf-s-l.md) ## Remarks @@ -34,50 +34,50 @@ These functions format data for output to destinations as follows. |Function|Counterpart function|Output destination|Parameter Validation|Positional Parameter Support| |--------------|--------------------------|------------------------|--------------------------|----------------------------------| -|`_vcprintf`|[_cprintf](../c-runtime-library/reference/cprintf-cprintf-l-cwprintf-cwprintf-l.md)|console|Check for null.|no| -|`_vcwprintf`|[_cwprintf](../c-runtime-library/reference/cprintf-cprintf-l-cwprintf-cwprintf-l.md)|console|Check for null.|no| -|`vfprintf`|[fprintf](../c-runtime-library/reference/fprintf-fprintf-l-fwprintf-fwprintf-l.md)|*Stream*|Check for null.|no| -|**vfprintf_p**|[fprintf_p](../c-runtime-library/reference/fprintf-p-fprintf-p-l-fwprintf-p-fwprintf-p-l.md)|*Stream*|Check for null and valid format.|yes| -|`vfprintf_s`|[fprintf_s](../c-runtime-library/reference/fprintf-s-fprintf-s-l-fwprintf-s-fwprintf-s-l.md)|*Stream*|Check for null and valid format.|no| -|`vfwprintf`|[fwprintf](../c-runtime-library/reference/fprintf-fprintf-l-fwprintf-fwprintf-l.md)|*Stream*|Check for null.|no| -|**vfwprintf_p**|[fwprintf_p](../c-runtime-library/reference/fprintf-p-fprintf-p-l-fwprintf-p-fwprintf-p-l.md)|*Stream*|Check for null and valid format.|yes| -|`vfwprintf_s`|[fwprintf_s](../c-runtime-library/reference/fprintf-s-fprintf-s-l-fwprintf-s-fwprintf-s-l.md)|*Stream*|Check for null and valid format.|no| -|`vprintf`|[printf](../c-runtime-library/reference/printf-printf-l-wprintf-wprintf-l.md)|`Stdout`|Check for null.|no| -|**vprintf_p**|[printf_p](../c-runtime-library/reference/printf-p-printf-p-l-wprintf-p-wprintf-p-l.md)|`Stdout`|Check for null and valid format.|yes| -|`vprintf_s`|[printf_s](../c-runtime-library/reference/printf-s-printf-s-l-wprintf-s-wprintf-s-l.md)|`Stdout`|Check for null and valid format.|no| -|`vwprintf`|[wprintf](../c-runtime-library/reference/printf-printf-l-wprintf-wprintf-l.md)|`Stdout`|Check for null.|no| -|**vwprintf_p**|[wprintf_p](../c-runtime-library/reference/printf-p-printf-p-l-wprintf-p-wprintf-p-l.md)|`Stdout`|Check for null and valid format.|yes| -|`vwprintf_s`|[wprintf_s](../c-runtime-library/reference/printf-s-printf-s-l-wprintf-s-wprintf-s-l.md)|`Stdout`|Check for null and valid format.|no| -|**vsprintf**|[sprintf](../c-runtime-library/reference/sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md)|memory pointed to by *buffer*|Check for null.|no| -|**vsprintf_p**|[sprintf_p](../c-runtime-library/reference/sprintf-p-sprintf-p-l-swprintf-p-swprintf-p-l.md)|memory pointed to by *buffer*|Check for null and valid format.|yes| -|`vsprintf_s`|[sprintf_s](../c-runtime-library/reference/sprintf-s-sprintf-s-l-swprintf-s-swprintf-s-l.md)|memory pointed to by *buffer*|Check for null and valid format.|no| -|`vswprintf`|[swprintf](../c-runtime-library/reference/sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md)|memory pointed to by *buffer*|Check for null.|no| -|**vswprintf_p**|[swprintf_p](../c-runtime-library/reference/sprintf-p-sprintf-p-l-swprintf-p-swprintf-p-l.md)|memory pointed to by *buffer*|Check for null and valid format.|yes| -|`vswprintf_s`|[swprintf_s](../c-runtime-library/reference/sprintf-s-sprintf-s-l-swprintf-s-swprintf-s-l.md)|memory pointed to by *buffer*|Check for null and valid format.|no| -|`_vscprintf`|[_vscprintf](../c-runtime-library/reference/vscprintf-vscprintf-l-vscwprintf-vscwprintf-l.md)|memory pointed to by *buffer*|Check for null.|no| -|`_vscwprintf`|[_vscwprintf](../c-runtime-library/reference/vscprintf-vscprintf-l-vscwprintf-vscwprintf-l.md)|memory pointed to by *buffer*|Check for null.|no| -|`_vsnprintf`|[_snprintf](../c-runtime-library/reference/snprintf-snprintf-snprintf-l-snwprintf-snwprintf-l.md)|memory pointed to by *buffer*|Check for null.|no| -|`_vsnwprintf`|[_snwprintf](../c-runtime-library/reference/snprintf-snprintf-snprintf-l-snwprintf-snwprintf-l.md)|memory pointed to by *buffer*|Check for null.|no| +|`_vcprintf`|[`_cprintf`](./reference/cprintf-cprintf-l-cwprintf-cwprintf-l.md)|console|Check for null.|no| +|`_vcwprintf`|[`_cwprintf`](./reference/cprintf-cprintf-l-cwprintf-cwprintf-l.md)|console|Check for null.|no| +|`vfprintf`|[`fprintf`](./reference/fprintf-fprintf-l-fwprintf-fwprintf-l.md)|*`stream`*|Check for null.|no| +|`vfprintf_p`|[`fprintf_p`](./reference/fprintf-p-fprintf-p-l-fwprintf-p-fwprintf-p-l.md)|*`stream`*|Check for null and valid format.|yes| +|`vfprintf_s`|[`fprintf_s`](./reference/fprintf-s-fprintf-s-l-fwprintf-s-fwprintf-s-l.md)|*`stream`*|Check for null and valid format.|no| +|`vfwprintf`|[`fwprintf`](./reference/fprintf-fprintf-l-fwprintf-fwprintf-l.md)|*`stream`*|Check for null.|no| +|`vfwprintf_p`|[`fwprintf_p`](./reference/fprintf-p-fprintf-p-l-fwprintf-p-fwprintf-p-l.md)|*`stream`*|Check for null and valid format.|yes| +|`vfwprintf_s`|[`fwprintf_s`](./reference/fprintf-s-fprintf-s-l-fwprintf-s-fwprintf-s-l.md)|*`stream`*|Check for null and valid format.|no| +|`vprintf`|[`printf`](./reference/printf-printf-l-wprintf-wprintf-l.md)|`stdout`|Check for null.|no| +|`vprintf_p`|[`printf_p`](./reference/printf-p-printf-p-l-wprintf-p-wprintf-p-l.md)|`stdout`|Check for null and valid format.|yes| +|`vprintf_s`|[`printf_s`](./reference/printf-s-printf-s-l-wprintf-s-wprintf-s-l.md)|`stdout`|Check for null and valid format.|no| +|`vwprintf`|[`wprintf`](./reference/printf-printf-l-wprintf-wprintf-l.md)|`stdout`|Check for null.|no| +|`vwprintf_p`|[`wprintf_p`](./reference/printf-p-printf-p-l-wprintf-p-wprintf-p-l.md)|`stdout`|Check for null and valid format.|yes| +|`vwprintf_s`|[`wprintf_s`](./reference/printf-s-printf-s-l-wprintf-s-wprintf-s-l.md)|`stdout`|Check for null and valid format.|no| +|`vsprintf`|[`sprintf`](./reference/sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md)|memory pointed to by *`buffer`*|Check for null.|no| +|`vsprintf_p`|[`sprintf_p`](./reference/sprintf-p-sprintf-p-l-swprintf-p-swprintf-p-l.md)|memory pointed to by *`buffer`*|Check for null and valid format.|yes| +|`vsprintf_s`|[`sprintf_s`](./reference/sprintf-s-sprintf-s-l-swprintf-s-swprintf-s-l.md)|memory pointed to by *`buffer`*|Check for null and valid format.|no| +|`vswprintf`|[`swprintf`](./reference/sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md)|memory pointed to by *`buffer`*|Check for null.|no| +|`vswprintf_p`|[`swprintf_p`](./reference/sprintf-p-sprintf-p-l-swprintf-p-swprintf-p-l.md)|memory pointed to by *`buffer`*|Check for null and valid format.|yes| +|`vswprintf_s`|[`swprintf_s`](./reference/sprintf-s-sprintf-s-l-swprintf-s-swprintf-s-l.md)|memory pointed to by *`buffer`*|Check for null and valid format.|no| +|`_vscprintf`|[`_vscprintf`](./reference/vscprintf-vscprintf-l-vscwprintf-vscwprintf-l.md)|memory pointed to by *`buffer`*|Check for null.|no| +|`_vscwprintf`|[`_vscwprintf`](./reference/vscprintf-vscprintf-l-vscwprintf-vscwprintf-l.md)|memory pointed to by *`buffer`*|Check for null.|no| +|`_vsnprintf`|[`_snprintf`](./reference/snprintf-snprintf-snprintf-l-snwprintf-snwprintf-l.md)|memory pointed to by *`buffer`*|Check for null.|no| +|`_vsnwprintf`|[`_snwprintf`](./reference/snprintf-snprintf-snprintf-l-snwprintf-snwprintf-l.md)|memory pointed to by *`buffer`*|Check for null.|no| -The `argptr` argument has type `va_list`, which is defined in VARARGS.H and STDARG.H. The `argptr` variable must be initialized by **va_start,** and may be reinitialized by subsequent `va_arg` calls; `argptr` then points to the beginning of a list of arguments that are converted and transmitted for output according to the corresponding specifications in the *format* argument. *format* has the same form and function as the *format* argument for [printf](../c-runtime-library/reference/printf-printf-l-wprintf-wprintf-l.md). None of these functions invoke `va_end`. For a more complete description of each `vprintf` function, see the description of its counterpart function as listed in the preceding table. +The `argptr` argument has type `va_list`, which is defined in VARARGS.H and STDARG.H. The `argptr` variable must be initialized by **va_start,** and may be reinitialized by subsequent `va_arg` calls; `argptr` then points to the beginning of a list of arguments that are converted and transmitted for output according to the corresponding specifications in the *`format`* argument. *`format`* has the same form and function as the *`format`* argument for [`printf`](./reference/printf-printf-l-wprintf-wprintf-l.md). None of these functions invoke `va_end`. For a more complete description of each `vprintf` function, see the description of its counterpart function as listed in the preceding table. -`_vsnprintf` differs from **vsprintf** in that it writes no more than *count* bytes to *buffer*. +`_vsnprintf` differs from **vsprintf** in that it writes no more than *`count`* bytes to *`buffer`*. -The versions of these functions with the **w** infix in the name are wide-character versions of the corresponding functions without the **w** infix; in each of these wide-character functions, *buffer* and *format* are wide-character strings. Otherwise, each wide-character function behaves identically to its SBCS counterpart function. +The versions of these functions with the **w** infix in the name are wide-character versions of the corresponding functions without the **w** infix; in each of these wide-character functions, *`buffer`* and *`format`* are wide-character strings. Otherwise, each wide-character function behaves identically to its SBCS counterpart function. The versions of these functions with **_s** and **_p** suffixes are the more secure versions. These versions validate the format strings. They'll generate an exception if the format string isn't well formed (for example, if invalid formatting characters are used). -The versions of these functions with the **_p** suffix let you specify the order in which the supplied arguments are substituted in the format string. For more information, see [printf_p Positional Parameters](../c-runtime-library/printf-p-positional-parameters.md). +The versions of these functions with the **_p** suffix let you specify the order in which the supplied arguments are substituted in the format string. For more information, see [printf_p Positional Parameters](./printf-p-positional-parameters.md). For **vsprintf**, `vswprintf`, `_vsnprintf` and `_vsnwprintf`, if copying occurs between strings that overlap, the behavior is undefined. > [!IMPORTANT] -> Ensure that *format* is not a user-defined string. For more information, see [Avoiding Buffer Overruns](/windows/win32/SecBP/avoiding-buffer-overruns). If using the secure versions of these functions (either the **_s** or **_p** suffixes), a user-supplied format string could trigger an invalid parameter exception if the user-supplied string contains invalid formatting characters. +> Ensure that *`format`* is not a user-defined string. For more information, see [Avoiding buffer overruns](/windows/win32/SecBP/avoiding-buffer-overruns). If using the secure versions of these functions (either the **_s** or **_p** suffixes), a user-supplied format string could trigger an invalid parameter exception if the user-supplied string contains invalid formatting characters. ## See also -[Stream I/O](../c-runtime-library/stream-i-o.md)
-[fprintf, _fprintf_l, fwprintf, _fwprintf_l](../c-runtime-library/reference/fprintf-fprintf-l-fwprintf-fwprintf-l.md)
-[printf, _printf_l, wprintf, _wprintf_l](../c-runtime-library/reference/printf-printf-l-wprintf-wprintf-l.md)
-[sprintf, _sprintf_l, swprintf, _swprintf_l, \__swprintf_l](../c-runtime-library/reference/sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md)
-[va_arg, va_copy, va_end, va_start](../c-runtime-library/reference/va-arg-va-copy-va-end-va-start.md) +[Stream I/O](./stream-i-o.md)\ +[`fprintf`, `_fprintf_l`, `fwprintf`, `_fwprintf_l`](./reference/fprintf-fprintf-l-fwprintf-fwprintf-l.md)\ +[`printf`, `_printf_l`, `wprintf`, `_wprintf_l`](./reference/printf-printf-l-wprintf-wprintf-l.md)\ +[`sprintf`, `_sprintf_l`, `swprintf`, `_swprintf_l`, `__swprintf_l`](./reference/sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md)\ +[`va_arg`, `va_copy`, `va_end`, `va_start`](./reference/va-arg-va-copy-va-end-va-start.md) diff --git a/docs/c-runtime-library/wait-child-wait-grandchild.md b/docs/c-runtime-library/wait-child-wait-grandchild.md index fe072136356..3ab89d096c5 100644 --- a/docs/c-runtime-library/wait-child-wait-grandchild.md +++ b/docs/c-runtime-library/wait-child-wait-grandchild.md @@ -25,5 +25,5 @@ The `_cwait` function can be used by any process to wait for any other process ( ## See also -[_cwait](../c-runtime-library/reference/cwait.md)
-[Global Constants](../c-runtime-library/global-constants.md) +[`_cwait`](./reference/cwait.md)\ +[Global constants](./global-constants.md) diff --git a/docs/c-runtime-library/wchar-max.md b/docs/c-runtime-library/wchar-max.md index 165fea22328..147cd086d4a 100644 --- a/docs/c-runtime-library/wchar-max.md +++ b/docs/c-runtime-library/wchar-max.md @@ -18,4 +18,4 @@ Maximum value for type **`wchar_t`**. ## See also -[Global Constants](../c-runtime-library/global-constants.md) +[Global constants](./global-constants.md) diff --git a/docs/c-runtime-library/wchar-min.md b/docs/c-runtime-library/wchar-min.md index 062fcc478c1..d01b224beac 100644 --- a/docs/c-runtime-library/wchar-min.md +++ b/docs/c-runtime-library/wchar-min.md @@ -18,4 +18,4 @@ Minimum value for type **`wchar_t`**. ## See also -[Global Constants](../c-runtime-library/global-constants.md) +[Global constants](./global-constants.md) diff --git a/docs/c-runtime-library/windows-platforms-crt.md b/docs/c-runtime-library/windows-platforms-crt.md index 106cdbdeca9..a0dc7658665 100644 --- a/docs/c-runtime-library/windows-platforms-crt.md +++ b/docs/c-runtime-library/windows-platforms-crt.md @@ -5,7 +5,7 @@ ms.date: "02/02/2018" helpviewer_keywords: ["CRT, compatibility", "backward compatibility [C++], C run-time libraries", "compatibility [C++], C run-time libraries", "MBCS [C++], Win32 platforms", "operating systems [C++]", "Unicode [C++], Win32 platforms"] ms.assetid: 0aacaf45-6dc4-4908-bd52-57abac7b39f6 --- -# Windows Platforms (CRT) +# Windows platforms (CRT) :::moniker range="msvc-140" @@ -28,4 +28,4 @@ The C run-time libraries for Visual Studio support all versions of Windows and W ## See also -[Compatibility](../c-runtime-library/compatibility.md) +[Compatibility](./compatibility.md) diff --git a/docs/c-runtime-library/windows-runtime-unsupported-crt-functions.md b/docs/c-runtime-library/windows-runtime-unsupported-crt-functions.md index 3a73051dd3c..53d51eb826b 100644 --- a/docs/c-runtime-library/windows-runtime-unsupported-crt-functions.md +++ b/docs/c-runtime-library/windows-runtime-unsupported-crt-functions.md @@ -5,13 +5,13 @@ ms.date: "11/04/2016" helpviewer_keywords: ["unsupported CRT functions, Windows Runtime", "Windows Runtime, unsupported CRT functions"] ms.assetid: bb8386d6-0ef8-460c-88d8-addff009b6f1 --- -# Windows Runtime Unsupported CRT Functions +# Windows Runtime unsupported CRT functions Many C run-time (CRT) APIs can't be used in Universal Windows Platform (UWP) apps that execute in the Windows Runtime. These apps are built by using the /ZW compiler flag. For a list of unsupported CRT functions, see [CRT functions not supported in Universal Windows Platform apps](../cppcx/crt-functions-not-supported-in-universal-windows-platform-apps.md). -All CRT APIs are described in the [Alphabetical Function Reference](../c-runtime-library/reference/crt-alphabetical-function-reference.md) section of the documentation. +All CRT APIs are described in the [Alphabetical function reference](./reference/crt-alphabetical-function-reference.md) section of the documentation. ## See also -[Universal C runtime routines by category](../c-runtime-library/run-time-routines-by-category.md)
-[Alphabetical Function Reference](../c-runtime-library/reference/crt-alphabetical-function-reference.md)
+[Universal C runtime routines by category](./run-time-routines-by-category.md)\ +[Alphabetical function reference](./reference/crt-alphabetical-function-reference.md) diff --git a/docs/c-runtime-library/windows-store-apps-the-windows-runtime-and-the-c-run-time.md b/docs/c-runtime-library/windows-store-apps-the-windows-runtime-and-the-c-run-time.md index fdfedec8627..e286321d8e7 100644 --- a/docs/c-runtime-library/windows-store-apps-the-windows-runtime-and-the-c-run-time.md +++ b/docs/c-runtime-library/windows-store-apps-the-windows-runtime-and-the-c-run-time.md @@ -36,7 +36,7 @@ For a complete list of CRT functions that aren't available in a UWP app and sugg ## See also -[Compatibility](../c-runtime-library/compatibility.md)
-[Windows Runtime Unsupported CRT Functions](../c-runtime-library/windows-runtime-unsupported-crt-functions.md)
-[Universal C runtime routines by category](../c-runtime-library/run-time-routines-by-category.md)
+[Compatibility](./compatibility.md)\ +[Windows Runtime unsupported CRT functions](./windows-runtime-unsupported-crt-functions.md)\ +[Universal C runtime routines by category](./run-time-routines-by-category.md)\ [Create a Universal Windows Platform console app](/windows/uwp/launch-resume/console-uwp)