Skip to content

Commit 6e3cf8d

Browse files
authored
Merge pull request MicrosoftDocs#831 from MicrosoftDocs/master
5/22 AM Publish
2 parents 4b2c3b0 + f0ea024 commit 6e3cf8d

File tree

69 files changed

+105
-104
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+105
-104
lines changed

docs/c-runtime-library/cgets-cgetws.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ wchar_t *_cgetws(
4848
Storage location for data.
4949

5050
## Return Value
51-
`_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`.
51+
`_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`.
5252

5353
## Remarks
5454
These functions read a string of characters from the console and store the string and its length in the location pointed to by `buffer`. The `buffer` parameter must be a pointer to a character array. The first element of the array, `buffer[0]`, must contain the maximum length (in characters) of the string to be read. The array must contain enough elements to hold the string, a terminating null character ('\0'), and 2 additional bytes. The function reads characters until a carriage return-line feed (CR-LF) combination or the specified number of characters is read. The string is stored starting at `buffer[2]`. If the function reads a CR-LF, it stores the null character ('\0'). The function then stores the actual length of the string in the second array element, `buffer[1]`.

docs/c-runtime-library/crtlcmapstringw.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ int __crtLCMapStringW(
4141
Pointer to a source string that the function maps or uses for sort key generation. This parameter is assumed to be a Unicode string.
4242
4343
`cchSrc`
44-
Size, in characters, of the string pointed to by the `lpSrcStr` parameter. This count can include the NULL terminator, or not include it.
44+
Size, in characters, of the string pointed to by the `lpSrcStr` parameter. This count can include the null terminator, or not include it.
4545
4646
A `cchSrc` value of -1 specifies that the string pointed to by `lpSrcStr` is null-terminated. If this is the case, and this function is being used in its string-mapping mode, the function calculates the string's length itself, and null-terminates the mapped string stored into `*lpDestStr`.
4747
@@ -52,9 +52,9 @@ int __crtLCMapStringW(
5252
Size, in characters, of the buffer pointed to by `lpDestStr`.
5353
5454
## Return Value
55-
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.
55+
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.
5656
57-
If the value of `cchDest` is zero, the size of the buffer in characters, or bytes if `LCMAP_SORTKEY` is specified, required to receive the translated string or sort key indicates success. This size includes room for a NULL terminator.
57+
If the value of `cchDest` is zero, the size of the buffer in characters, or bytes if `LCMAP_SORTKEY` is specified, required to receive the translated string or sort key indicates success. This size includes room for a null terminator.
5858
5959
Zero indicates failure. To get extended error information, call the `GetLastError` function.
6060

docs/c-runtime-library/dllonexit.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ _onexit_t __dllonexit( _onexit_t func,
3838
Pointer to variable that points to the end of a list of functions to execute on detach.
3939

4040
## Return Value
41-
If successful, a pointer to the user’s function. Otherwise, a NULL pointer.
41+
If successful, a pointer to the user’s function. Otherwise, a **NULL** pointer.
4242

4343
## Remarks
4444
The `__dllonexit` function is analogous to the [_onexit](../c-runtime-library/reference/onexit-onexit-m.md) function except that the global variables used by that function are not visible to this routine. Instead of global variables, this function uses the `pbegin` and `pend` parameters.

docs/c-runtime-library/environ-wenviron.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ extern wchar_t **_wenviron;
3939

4040
is a wide-character version of `_environ`. In a program that uses the `wmain` function, `_wenviron` is initialized at program startup according to settings taken from the operating-system environment.
4141

42-
In a program that uses `main`, `_wenviron` is initially `NULL` because the environment is composed of multibyte-character strings. On the first call to `_wgetenv` or `_wputenv`, a corresponding wide-character string environment is created and is pointed to by `_wenviron`.
42+
In a program that uses `main`, `_wenviron` is initially **NULL** because the environment is composed of multibyte-character strings. On the first call to `_wgetenv` or `_wputenv`, a corresponding wide-character string environment is created and is pointed to by `_wenviron`.
4343

44-
Similarly, in a program that uses `wmain`, `_environ` is initially `NULL` because the environment is composed of wide-character strings. On the first call to `_getenv` or `_putenv`, a corresponding multibyte-character string environment is created and is pointed to by `_environ`.
44+
Similarly, in a program that uses `wmain`, `_environ` is initially **NULL** because the environment is composed of wide-character strings. On the first call to `_getenv` or `_putenv`, a corresponding multibyte-character string environment is created and is pointed to by `_environ`.
4545

4646
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.
4747

docs/c-runtime-library/exec-wexec-functions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,9 @@ Each function in this family loads and executes a new process:
6565

6666
The `_execl`, `_execle`, `_execlp`, and `_execlpe` calls are typically used when the number of parameters is known in advance. The parameter `arg0` is usually a pointer to `cmdname`. The parameters `arg1` through `argn` point to the character strings forming the new parameter list. A null pointer must follow `argn` to mark the end of the parameter list.
6767

68-
The `_execv`, `_execve`, `_execvp`, and `_execvpe` calls are useful when the number of parameters to the new process is variable. Pointers to the parameters are passed as an array, `argv`. The parameter `argv`[0] is usually a pointer to `cmdname`. The parameters `argv`[1] through `argv`[`n`] point to the character strings forming the new parameter list. The parameter `argv`[`n`+1] must be a `NULL` pointer to mark the end of the parameter list.
68+
The `_execv`, `_execve`, `_execvp`, and `_execvpe` calls are useful when the number of parameters to the new process is variable. Pointers to the parameters are passed as an array, `argv`. The parameter `argv`[0] is usually a pointer to `cmdname`. The parameters `argv`[1] through `argv`[`n`] point to the character strings forming the new parameter list. The parameter `argv`[`n`+1] must be a **NULL** pointer to mark the end of the parameter list.
6969

70-
Files that are open when an `_exec` call is made remain open in the new process. In `_execl`, `_execlp`, `_execv`, and `_execvp` calls, the new process inherits the environment of the calling process. `_execle`, `_execlpe`, `_execve`, and `_execvpe` calls alter the environment for the new process by passing a list of environment settings through the `envp` parameter. `envp` is an array of character pointers, each element of which (except for the final element) points to a null-terminated string defining an environment variable. Such a string usually has the form `NAME`=`value` where `NAME` is the name of an environment variable and `value` is the string value to which that variable is set. (Note that `value` is not enclosed in double quotation marks.) The final element of the `envp` array should be `NULL`. When `envp` itself is `NULL`, the new process inherits the environment settings of the calling process.
70+
Files that are open when an `_exec` call is made remain open in the new process. In `_execl`, `_execlp`, `_execv`, and `_execvp` calls, the new process inherits the environment of the calling process. `_execle`, `_execlpe`, `_execve`, and `_execvpe` calls alter the environment for the new process by passing a list of environment settings through the `envp` parameter. `envp` is an array of character pointers, each element of which (except for the final element) points to a null-terminated string defining an environment variable. Such a string usually has the form `NAME`=`value` where `NAME` is the name of an environment variable and `value` is the string value to which that variable is set. (Note that `value` is not enclosed in double quotation marks.) The final element of the `envp` array should be **NULL**. When `envp` itself is **NULL**, the new process inherits the environment settings of the calling process.
7171

7272
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.
7373

docs/c-runtime-library/getmainargs-wgetmainargs.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ _startupinfo * _StartInfo);
4242
An integer that contains the number of arguments that follow in `argv`. The `argc` parameter is always greater than or equal to 1.
4343
4444
`_Argv`
45-
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]`.
45+
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]`.
4646
4747
`_Env`
48-
An array of strings that represent the variables set in the user's environment. This array is terminated by a NULL entry.
48+
An array of strings that represent the variables set in the user's environment. This array is terminated by a **NULL** entry.
4949
5050
`_DoWildCard`
5151
An integer that if set to 1 expands the wildcards in the command line arguments, or if set to 0 does nothing.

docs/c-runtime-library/gets-getws.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ wchar_t *_getws(
4848
Storage location for input string.
4949

5050
## Return Value
51-
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`.
51+
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`.
5252

5353
## Remarks
5454
The `gets` function reads a line from the standard input stream `stdin` and stores it in `buffer`. The line consists of all characters up to and including the first newline character ('\n'). `gets` then replaces the newline character with a null character ('\0') before returning the line. In contrast, the `fgets` function retains the newline character. `_getws` is a wide-character version of `gets`; its argument and return value are wide-character strings.

docs/c-runtime-library/parameter-validation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ ms.author: "corob"
1212
ms.workload: ["cplusplus"]
1313
---
1414
# Parameter Validation
15-
Most of the security-enhanced CRT functions and many of the preexisting functions validate their parameters. This could include checking pointers for NULL, checking that integers fall into a valid range, or checking that enumeration values are valid. When an invalid parameter is found, the invalid parameter handler is executed.
15+
Most of the security-enhanced CRT functions and many of the preexisting functions validate their parameters. This could include checking pointers for **NULL**, checking that integers fall into a valid range, or checking that enumeration values are valid. When an invalid parameter is found, the invalid parameter handler is executed.
1616

1717
## Invalid Parameter Handler Routine
1818
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, 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). The dispatch function called depends on whether your code is, respectively, a debug build, a retail build, or the error is not considered recoverable.

docs/c-runtime-library/reference/aligned-malloc-dbg.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ Size of the requested memory allocation.
3939
The alignment value, which must be an integer power of 2.
4040

4141
*filename*<br/>
42-
Pointer to the name of the source file that requested the allocation operation or NULL.
42+
Pointer to the name of the source file that requested the allocation operation or **NULL**.
4343

4444
*linenumber*<br/>
45-
Line number in the source file where the allocation operation was requested or NULL.
45+
Line number in the source file where the allocation operation was requested or **NULL**.
4646

4747
## Return Value
4848

docs/c-runtime-library/reference/aligned-offset-malloc-dbg.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@ The alignment value, which must be an integer power of 2.
4343
The offset into the memory allocation to force the alignment.
4444

4545
*filename*<br/>
46-
Pointer to the name of the source file that requested the allocation operation or NULL.
46+
Pointer to the name of the source file that requested the allocation operation or **NULL**.
4747

4848
*linenumber*<br/>
49-
Line number in the source file where the allocation operation was requested or NULL.
49+
Line number in the source file where the allocation operation was requested or **NULL**.
5050

5151
## Return Value
5252

docs/c-runtime-library/reference/aligned-offset-realloc-dbg.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ The alignment value, which must be an integer power of 2.
4747
The offset into the memory allocation to force the alignment.
4848

4949
*filename*<br/>
50-
Pointer to the name of the source file that requested the **aligned_offset_realloc** operation or NULL.
50+
Pointer to the name of the source file that requested the **aligned_offset_realloc** operation or **NULL**.
5151

5252
*linenumber*<br/>
53-
Line number in the source file where the **aligned_offset_realloc** operation was requested or NULL.
53+
Line number in the source file where the **aligned_offset_realloc** operation was requested or **NULL**.
5454

5555
## Return Value
5656

docs/c-runtime-library/reference/aligned-offset-recalloc-dbg.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,10 @@ The alignment value, which must be an integer power of 2.
5151
The offset into the memory allocation to force the alignment.
5252

5353
*filename*<br/>
54-
Pointer to the name of the source file that requested the realloc operation or NULL.
54+
Pointer to the name of the source file that requested the realloc operation or **NULL**.
5555

5656
*linenumber*<br/>
57-
Line number in the source file where the realloc operation was requested or NULL.
57+
Line number in the source file where the realloc operation was requested or **NULL**.
5858

5959
## Return Value
6060

docs/c-runtime-library/reference/aligned-realloc-dbg.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@ The size of the requested memory allocation.
4343
The alignment value, which must be an integer power of 2.
4444

4545
*filename*<br/>
46-
Pointer to the name of the source file that requested the **realloc** operation or NULL.
46+
Pointer to the name of the source file that requested the **realloc** operation or **NULL**.
4747

4848
*linenumber*<br/>
49-
Line number in the source file where the **realloc** operation was requested or NULL.
49+
Line number in the source file where the **realloc** operation was requested or **NULL**.
5050

5151
## Return Value
5252

docs/c-runtime-library/reference/atol-atol-l-wtol-wtol-l.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ In the case of overflow with large positive integral values, **atol** returns **
5656

5757
These functions convert a character string to a long integer value (**atol**).
5858

59-
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 cannot recognize as part of a number. This character may be the **NULL** character ('\0' or L'\0') terminating the string.
59+
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 cannot recognize as part of a number. This character may be the null character ('\0' or L'\0') terminating the string.
6060

6161
The *str* argument to **atol** has the following form:
6262

0 commit comments

Comments
 (0)