Skip to content

Repo sync for protected CLA branch #4244

New issue

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

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

Already on GitHub? Sign in to your account

Merged
merged 22 commits into from
Oct 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
e383c4c
Merge pull request #4628 from MicrosoftDocs/FromPublicMasterBranch
prmerger-automator[bot] Oct 25, 2022
4849d15
fix misleading sentence about view elements
Oct 25, 2022
ba29eec
Merge pull request #4629 from TylerMSFT/ranges
prmerger-automator[bot] Oct 25, 2022
58265b4
Merge pull request #4630 from MicrosoftDocs/FromPublicMasterBranch
prmerger-automator[bot] Oct 26, 2022
924772a
Fix function link text in CRT articles
colin-home Oct 26, 2022
204ccb7
Merge pull request #4631 from corob-msft/bulk-fix-crt-links-3
prmerger-automator[bot] Oct 26, 2022
abed037
Bulk fix CRT Acrolinx issues 27 of N
colin-home Oct 26, 2022
c445b97
Bulk fix of CRT Acrolinx issues, 28 of N
colin-home Oct 26, 2022
ef7677d
Merge pull request #4632 from corob-msft/bulk-fix-crt-acrolinx-27
prmerger-automator[bot] Oct 26, 2022
754d749
Bulk fix CRT Acrolinx issues, 29 of N
colin-home Oct 26, 2022
b27aad5
Merge pull request #4633 from corob-msft/bulk-fix-crt-acrolinx-28
prmerger-automator[bot] Oct 26, 2022
88bc703
Merge pull request #4634 from corob-msft/bulk-fix-crt-acrolinx-29
prmerger-automator[bot] Oct 26, 2022
a1f60a1
Bulk fix CRT Acrolinx issues, 30 of N
colin-home Oct 26, 2022
f288058
Merge pull request #4635 from corob-msft/bulk-fix-crt-acrolinx-30
prmerger-automator[bot] Oct 26, 2022
38005e4
Bulk fix CRT Acrolinx issues, 31 of 31
colin-home Oct 26, 2022
c3e369b
Merge pull request #4636 from corob-msft/bulk-fix-crt-acrolinx-31
prmerger-automator[bot] Oct 26, 2022
75d9918
Bulk fix table and code block issues
colin-home Oct 26, 2022
adbd83b
Fix pipe escapes in consolidated tables
colin-home Oct 26, 2022
40f5283
Remove extraneous spaces
colin-home Oct 26, 2022
374ebe9
Merge pull request #4637 from corob-msft/bulk-fix-crt-tables-1
colin-home Oct 26, 2022
8445fa7
BULK FIX: CRT F1 updates, part 1 of many (#4584)
colin-home Oct 26, 2022
602a23f
Merge pull request #4638 from MicrosoftDocs/main
huypub Oct 26, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
22 changes: 11 additions & 11 deletions docs/c-runtime-library/32-bit-windows-time-date-formats.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,20 @@ The file time and the date are stored individually, using unsigned integers as b

### Time

|Bit position:|0 1 2 3 4|5 6 7 8 9 A|B C D E F|
|-------------------|-----------------------|---------------------------|-----------------------|
|Length:|5|6|5|
|Contents:|hours|minutes|2-second increments|
|Value Range:|0-23|0-59|0-29 in 2-second intervals|
| Bit position: | 0 1 2 3 4 | 5 6 7 8 9 A | B C D E F |
|---|---|---|---|
| Length: | 5 | 6 | 5 |
| Contents: | hours | minutes | 2-second increments |
| Value Range: | 0-23 | 0-59 | 0-29 in 2-second intervals |

### Date

|Bit position:|0 1 2 3 4 5 6|7 8 9 A|B C D E F|
|-------------------|-------------------------------|-------------------|-----------------------|
|Length:|7|4|5|
|Contents:|year|month|day|
|Value Range:|0-119|1-12|1-31|
||(relative to 1980)|||
| Bit position: | 0 1 2 3 4 5 6 | 7 8 9 A | B C D E F |
|---|---|---|---|
| Length: | 7 | 4 | 5 |
| Contents: | year | month | day |
| Value Range: | 0-119 | 1-12 | 1-31 |
| | (relative to 1980) | | |

## See also

Expand Down
10 changes: 5 additions & 5 deletions docs/c-runtime-library/abnormal-termination.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ api_name: ["_abnormal_termination"]
api_location: ["msvcr110.dll", "msvcr110_clr0400.dll", "msvcr90.dll", "msvcr120.dll", "msvcrt.dll", "msvcr80.dll", "msvcr100.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
f1_keywords: ["_abnormal_termination"]
f1_keywords: ["_abnormal_termination", "EXCPT/_abnormal_termination"]
helpviewer_keywords: ["_abnormal_termination"]
ms.assetid: 952970a4-9586-4c3d-807a-db729448c91c
---
Expand All @@ -27,13 +27,13 @@ int _abnormal_termination(

## Remarks

`_abnormal_termination` is an internal function used to manage unwinding exceptions, and isn't intended to be called from user code.
**`_abnormal_termination`** is an internal function used to manage unwinding exceptions, and isn't intended to be called from user code.

## Requirements

|Routine|Required header|
|-------------|---------------------|
|_abnormal_termination|excpt.h|
| Routine | Required header |
|---|---|
| **`_abnormal_termination`** | `<excpt.h>` |

## See also

Expand Down
4 changes: 2 additions & 2 deletions docs/c-runtime-library/acmdln-tcmdln-wcmdln.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ api_name: ["_wcmdln", "_acmdln"]
api_location: ["msvcrt.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
f1_keywords: ["_acmdln", "acmdln", "_wcmdln", "wcmdln", "_tcmdln", "tcmdln"]
f1_keywords: ["_acmdln", "_wcmdln", "_tcmdln"]
helpviewer_keywords: ["_wcmdln global variable", "wcmdln global variable", "_acmdln global variable", "_tcmdln global variable", "tcmdln global variable", "acmdln global variable"]
ms.assetid: 4fc0a6a0-3f93-420a-a19f-5276061ba539
---
Expand All @@ -16,7 +16,7 @@ Internal CRT global variable. The command line.

## Syntax

```
```C
char * _acmdln;
wchar_t * _wcmdln;

Expand Down
1 change: 0 additions & 1 deletion docs/c-runtime-library/ansi-c-compliance.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ title: "ANSI C Conformance"
description: "An overview of Microsoft C runtime naming conventions for ANSI C conformance."
ms.date: "11/04/2016"
ms.topic: "conceptual"
f1_keywords: ["Ansi"]
helpviewer_keywords: ["underscores, leading", "compatibility [C++], ANSI C", "conformance with ANSI C", "conventions [C++], Microsoft extensions", "underscores", "naming conventions [C++], Microsoft library", "ANSI [C++], C standard", "Microsoft extensions naming conventions"]
ms.assetid: 6be271bf-eecf-491a-a928-0ee2dd60e3b9
---
Expand Down
20 changes: 10 additions & 10 deletions docs/c-runtime-library/argc-argv-wargv.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ api_name: ["__wargv", "__argv", "__argc"]
api_location: ["msvcrt120.dll"]
api_type: ["DLLExport"]
topic_type: ["apiref"]
f1_keywords: ["__argv", "__argc", "__wargv"]
f1_keywords: ["__argc", "STDLIB/__argc", "__argv", "STDLIB/__argv", "__wargv", "STDLIB/__wargv"]
helpviewer_keywords: ["__argv", "__wargv", "__argc"]
ms.assetid: 17001b0a-04ad-4762-b3a6-c54847f02d7c
no-loc: [__argc, __argv, __wargv, main, wmain]
---
# `__argc`, `__argv`, `__wargv`

The `__argc` global variable is a count of the number of command-line arguments passed to the program. `__argv` is a pointer to an array of single-byte-character or multi-byte-character strings that contain the program arguments, and `__wargv` is a pointer to an array of wide-character strings that contain the program arguments. These global variables provide the arguments to `main` or `wmain`.
The **`__argc`** global variable is a count of the number of command-line arguments passed to the program. **`__argv`** is a pointer to an array of single-byte-character or multi-byte-character strings that contain the program arguments, and **`__wargv`** is a pointer to an array of wide-character strings that contain the program arguments. These global variables provide the arguments to `main` or `wmain`.

## Syntax

Expand All @@ -25,23 +25,23 @@ extern wchar_t ** __wargv;

## Remarks

In a program that uses the `main` function, `__argc` and `__argv` are initialized at program startup by using the command line that's used to start the program. The command line is parsed into individual arguments, and wildcards are expanded. The count of arguments is assigned to `__argc` and the argument strings are allocated on the heap, and a pointer to the array of arguments is assigned to `__argv`. In a program compiled to use wide characters and a `wmain` function, the arguments are parsed and wildcards are expanded as wide-character strings, and a pointer to the array of argument strings is assigned to `__wargv`.
In a program that uses the `main` function, **`__argc`** and **`__argv`** are initialized at program startup by using the command line that's used to start the program. The command line is parsed into individual arguments, and wildcards are expanded. The count of arguments is assigned to **`__argc`** and the argument strings are allocated on the heap, and a pointer to the array of arguments is assigned to **`__argv`**. In a program compiled to use wide characters and a `wmain` function, the arguments are parsed and wildcards are expanded as wide-character strings, and a pointer to the array of argument strings is assigned to **`__wargv`**.

For portable code, we recommend you use the arguments passed to `main` to get the command-line arguments in your program.

### Generic-text routine mappings

|Tchar.h routine|_UNICODE not defined|_UNICODE defined|
|---------------------|---------------------------|-----------------------|
|`__targv`|`__argv`|`__wargv`|
| Tchar.h routine | `_UNICODE` not defined | `_UNICODE` defined |
|---|---|---|
| `__targv` | **`__argv`** | **`__wargv`** |

## Requirements

|Global variable|Required header|
|---------------------|---------------------|
|`__argc`, `__argv`, `__wargv`|\<stdlib.h>, \<cstdlib> (C++)|
| Global variable | Required header |
|---|---|
| **`__argc`**, **`__argv`**, **`__wargv`** | \<stdlib.h>, \<cstdlib> (C++) |

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

## See also

Expand Down
10 changes: 5 additions & 5 deletions docs/c-runtime-library/argument-access.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ The `va_arg`, `va_end`, and `va_start` macros provide access to function argumen

## Argument-access macros

|Macro|Use|
|-----------|-------------------------------|
|[`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|
| Macro | Use |
|---|---|
| [`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

Expand Down
20 changes: 10 additions & 10 deletions docs/c-runtime-library/buffer-manipulation.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@ Use these routines to work with areas of memory on a byte-by-byte basis.

## Buffer-manipulation routines

|Routine|Use|
|-------------|---------|
|[`_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|
| Routine | Use |
|---|---|
| [`_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.

Expand Down
4 changes: 2 additions & 2 deletions docs/c-runtime-library/bufsiz.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
description: "Learn more about: BUFSIZ"
title: "BUFSIZ"
ms.date: "11/04/2016"
f1_keywords: ["BUFSIZ"]
f1_keywords: ["BUFSIZ", "STDIO/BUFSIZ"]
helpviewer_keywords: ["BUFSIZ constant"]
ms.assetid: 94ac04a3-d154-476b-bd89-eefbc7b949ae
---
# `BUFSIZ`

## Syntax

```
```C
#include <stdio.h>
```

Expand Down
1 change: 0 additions & 1 deletion docs/c-runtime-library/byte-and-wide-streams.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ title: "Byte and Wide Streams"
description: "An overview of byte streams in the Microsoft C runtime library."
ms.date: "11/04/2016"
ms.topic: "conceptual"
f1_keywords: ["Byte and Wide Streams"]
helpviewer_keywords: ["byte streams", "wide streams"]
ms.assetid: 61ef0587-4cbc-4eb8-aae5-4c298dbbc6f9
---
Expand Down
22 changes: 11 additions & 11 deletions docs/c-runtime-library/cgets-cgetws.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Gets a character string from the console. More secure versions of these function

## Syntax

```
```C
char *_cgets(
char *buffer
);
Expand All @@ -46,30 +46,30 @@ Storage location for data.

## 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](./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

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 extra 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]`.
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 extra 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]`.

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.
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](./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

|Tchar.h routine|`_UNICODE` and `_MBCS` not defined|`_MBCS` defined|`_UNICODE` defined|
|---------------------|--------------------------------------|--------------------|-----------------------|
|`_cgetts`|`_cgets`|`_cgets`|`_cgetws`|
| Tchar.h routine | `_UNICODE` and `_MBCS` not defined | `_MBCS` defined | `_UNICODE` defined |
|---|---|---|---|
| `_cgetts` | **`_cgets`** | **`_cgets`** | **`_cgetws`** |

## Requirements

|Routine|Required header|
|-------------|---------------------|
|`_cgets`|\<conio.h>|
|`_cgetws`|\<conio.h> or \<wchar.h>|
| Routine | Required header |
|---|---|
| **`_cgets`** | \<conio.h> |
| **`_cgetws`** | \<conio.h> or \<wchar.h> |

For more compatibility information, see [Compatibility](./compatibility.md).

Expand Down
Loading