Skip to content

Commit dc221ab

Browse files
authored
Merge pull request MicrosoftDocs#4049 from craigcaseyMSFT/vcraigcasey0114
US1907300 - add md code escapes to code elements - PR2
2 parents acf65d1 + fad8f90 commit dc221ab

5 files changed

Lines changed: 259 additions & 263 deletions

File tree

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

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,13 @@ api_type: ["DLLExport"]
88
topic_type: ["apiref"]
99
f1_keywords: ["_getts", "gets", "_getws"]
1010
helpviewer_keywords: ["getws function", "getts function", "_getws function", "lines, getting", "streams, getting lines", "_getts function", "gets function", "standard input, reading from"]
11-
ms.assetid: 1ec2dd4b-f801-48ea-97c2-892590f16024
1211
---
13-
# gets, _getws
12+
# `gets`, `_getws`
1413

15-
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).
14+
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).
1615

1716
> [!IMPORTANT]
18-
> 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).
17+
> 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).
1918
2019
> [!IMPORTANT]
2120
> 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,19 +40,19 @@ wchar_t *_getws(
4140

4241
#### Parameters
4342

44-
*buffer*<br/>
43+
*`buffer`*\
4544
Storage location for input string.
4645

4746
## Return Value
4847

49-
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`.
48+
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`.
5049

5150
## Remarks
5251

5352
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.
5453

5554
> [!IMPORTANT]
56-
> Because there is no way to limit the number of characters read by gets, untrusted input can easily cause buffer overruns. Use `fgets` instead.
55+
> Because there is no way to limit the number of characters read by `gets`, untrusted input can easily cause buffer overruns. Use `fgets` instead.
5756
5857
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).
5958

@@ -69,8 +68,8 @@ By default, this function's global state is scoped to the application. To change
6968

7069
|Routine|Required header|
7170
|-------------|---------------------|
72-
|`gets`|\<stdio.h>|
73-
|`_getws`|\<stdio.h> or \<wchar.h>|
71+
|`gets`|`<stdio.h>`|
72+
|`_getws`|`<stdio.h>` or `<wchar.h>`|
7473

7574
For additional compatibility information, see [Compatibility](../c-runtime-library/compatibility.md).
7675

@@ -101,7 +100,7 @@ Hello there!The line entered was: Hello there!
101100

102101
## See also
103102

104-
[Stream I/O](../c-runtime-library/stream-i-o.md)<br/>
105-
[fgets, fgetws](../c-runtime-library/reference/fgets-fgetws.md)<br/>
106-
[fputs, fputws](../c-runtime-library/reference/fputs-fputws.md)<br/>
107-
[puts, _putws](../c-runtime-library/reference/puts-putws.md)
103+
[Stream I/O](../c-runtime-library/stream-i-o.md)\
104+
[`fgets`, `fgetws`](../c-runtime-library/reference/fgets-fgetws.md)\
105+
[`fputs`, `fputws`](../c-runtime-library/reference/fputs-fputws.md)\
106+
[`puts`, `_putws`](../c-runtime-library/reference/puts-putws.md)

docs/c-runtime-library/reference/execl.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,12 @@ api_type: ["DLLExport"]
88
topic_type: ["apiref"]
99
f1_keywords: ["execl"]
1010
helpviewer_keywords: ["execl function"]
11-
ms.assetid: 10f24c52-7ff5-4a61-abcb-fce6d9553f23
1211
---
13-
# execl
12+
# `execl`
1413

15-
The Microsoft-implemented POSIX function name `execl` is a deprecated alias for the [_execl](execl-wexecl.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.
14+
The Microsoft-implemented POSIX function name `execl` is a deprecated alias for the [`_execl`](execl-wexecl.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.
1615

17-
We recommend you use [_execl](execl-wexecl.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).
16+
We recommend you use [`_execl`](execl-wexecl.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).
1817

1918
> [!IMPORTANT]
2019
> 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).

0 commit comments

Comments
 (0)