Skip to content

Repo sync for protected CLA branch #2520

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 12 commits into from
Oct 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .openpublishing.redirection.json
Original file line number Diff line number Diff line change
Expand Up @@ -13419,6 +13419,16 @@
"source_path": "docs/parallel/openmp/a-31-thread-safe-lock-functions.md",
"redirect_url": "/cpp/parallel/openmp/a-examples#a31-thread-safe-lock-functions",
"redirect_document_id": false
},
{
"source_path": "docs/c-runtime-library/operator-delete-crt.md",
"redirect_url": "docs/c-runtime-library/delete-operator-crt",
"redirect_document_id": false
},
{
"source_path": "docs/c-runtime-library/operator-new-crt.md",
"redirect_url": "docs/c-runtime-library/new-operator-crt",
"redirect_document_id": false
}
]
}
51 changes: 27 additions & 24 deletions docs/c-runtime-library/c-run-time-library-reference.md
Original file line number Diff line number Diff line change
@@ -1,52 +1,55 @@
---
title: "C Run-Time Library Reference"
title: "C runtime library reference"
description: "Links to information and reference for the Microsoft C runtime library functions."
ms.date: "11/04/2016"
ms.date: "10/05/2020"
f1_keywords: ["c.runtime"]
helpviewer_keywords: ["CRT", "run-time libraries", "CRT, reference"]
helpviewer_keywords: ["CRT", "runtime libraries", "CRT, reference"]
ms.assetid: a503e11c-8dca-4846-84fb-025a826c32b8
---
# C Run-Time Library Reference
# C runtime Library Reference

The Microsoft run-time library provides routines for programming for the Microsoft Windows operating system. These routines automate many common programming tasks that are not provided by the C and C++ languages.
The Microsoft runtime library provides routines for programming for the Microsoft Windows operating system. These routines automate many common programming tasks that are not provided by the C and C++ languages.

Sample programs are included in the individual reference topics for most routines in the library.

## In This Section

[C Run-Time Libraries](crt-library-features.md)\
Discusses the .lib files that comprise the C run-time libraries.
[C Runtime libraries](crt-library-features.md)\
Discusses the .lib files that comprise the C runtime libraries.

[Universal C runtime routines by category](run-time-routines-by-category.md)\
Provides links to the run-time library by category.
Provides links to the runtime library by category.

[Global Variables and Standard Types](global-variables-and-standard-types.md)\
Provides links to the global variables and standard types provided by the run-time library.
[Global variables and standard types](global-variables-and-standard-types.md)\
Provides links to the global variables and standard types provided by the runtime library.

[Global Constants](global-constants.md)\
Provides links to the global constants defined by the run-time library.
[Global constants](global-constants.md)\
Provides links to the global constants defined by the runtime library.

[Global State](global-state.md)\
Describes the scope of global state in the C run-time library.
[Global state](global-state.md)\
Describes the scope of global state in the C runtime library.

[Alphabetical Function Reference](reference/crt-alphabetical-function-reference.md)\
Provides a table of contents entry point into an alphabetical listing of all C run-time library functions.

[Generic-Text Mappings](generic-text-mappings.md)\
[Generic-text mappings](generic-text-mappings.md)\
Provides links to the generic-text mappings defined in Tchar.h.

[Language and Country/Region Strings](locale-names-languages-and-country-region-strings.md)\
[Alphabetical function reference](reference/crt-alphabetical-function-reference.md)\
Provides links to the C runtime library functions, organized alphabetically.

[Function family overviews](function-family-overviews.md)\
Provides links to the C runtime library functions, organized by function family.

[Language and country/region strings](locale-names-languages-and-country-region-strings.md)\
Describes how to use the `setlocale` function to set the language and Country/Region strings.

## Related Sections

[Debug Routines](debug-routines.md)\
Provides links to the debug versions of the run-time library routines.
[Debug routines](debug-routines.md)\
Provides links to the debug versions of the runtime library routines.

[Run-Time Error Checking](run-time-error-checking.md)\
Provides links to functions that support run-time error checks.
[Runtime error checking](run-time-error-checking.md)\
Provides links to functions that support runtime error checks.

[DLLs and Visual C++ run-time library behavior](../build/run-time-library-behavior.md)\
[DLLs and Visual C++ runtime library behavior](../build/run-time-library-behavior.md)\
Discusses the entry point and startup code used for a DLL.

[Debugging](/visualstudio/debugger/debugging-in-visual-studio)\
Expand Down
63 changes: 55 additions & 8 deletions docs/c-runtime-library/function-family-overviews.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,63 @@
---
title: "Function Family Overviews"
ms.date: "11/04/2016"
title: "Function family overview"
description: "An overview of Microsoft C runtime functions by family."
ms.date: "10/05/2020"
ms.assetid: b05a2755-9d11-4ea9-ab97-d00a4e872e16
---
# Function Family Overviews
# Function family overview

Insert introduction here.
This section lists C runtime library routines by function family.

## Section Heading
## CRT library routine families

Insert section body here.
[_exec, _wexec](exec-wexec-functions.md)\
Functions to load and execute a new process.

### Subsection Heading
[Filename search functions](filename-search-functions.md)\
Functions to search for specified file names, and to close searches.

Insert subsection body here.
[Format specification syntax for `printf` and `wprintf`](format-specification-syntax-printf-and-wprintf-functions.md)\
Describes the format string and arguments for `printf` and `wprintf`.

[Format specification field characters: `scanf` and `wscanf`](format-specification-fields-scanf-and-wscanf-functions.md)\
Describes the format specification fields for parsing an input stream for the entire `scanf` family of functions.

[`is`, `isw` functions](is-isw-routines.md)\
Functions for testing characters for things like whether they are uppercase, ASCII, numeric, punctuation, and so on.

[`_ismbb` functions](ismbb-routines.md)\
Functions for testing an integer value for whether it represents an alpha character, blank character, a print character, and so on.

[`_ismbc` functions](ismbc-routines.md)\
Functions for testing a multibyte character for whether it represents an alpha character, blank character, a print character, and so on.

[operator `delete` (CRT)](delete-operator-crt.md)\
Beginning in Visual Studio 2013, the Universal C Runtime (UCRT) no longer supports the C++-specific operator delete function. It is now part of the C++ Standard Library.

[operator `new` (CRT)](new-operator-crt.md)\
Beginning in Visual Studio 2013, the Universal C Runtime (UCRT) no longer supports the C++-specific operator new function. It is now part of the C++ Standard Library.

[`printf` positional parameter functions](printf-p-positional-parameters.md)\
Positional parameters specify by number which of the arguments is to be substituted into a field in a format string.

[`scanf` type field characters](scanf-type-field-characters.md)\
The type character determines whether the associated argument is interpreted as a character, string, or number for any of the `scanf` family of functions, including the secure versions, such as `scanf_s`.

[`scanf` width specification](scanf-width-specification.md)\
The width field is a positive decimal integer that controls the maximum number of characters to be read for that field. Applies to any of the `scanf` family of functions, including the secure versions, such as `scanf_s`.

[_spawn, _wspawn functions](spawn-wspawn-functions.md)\
Functions to create and execute a new process.

[`strcoll` functions](strcoll-functions.md)\
The `strcoll` and `wcscoll` functions compare two strings according to the `LC_COLLATE` category setting of the locale code page.

[String to numeric value functions](string-to-numeric-value-functions.md)\
The `strtod` family of functions convert a null-terminated string to a numeric value.

[`vprintf` functions](vprintf-functions.md)\
The `vprintf` functions take a pointer to an argument list, formats it, and writes the result to the specified destination. The functions differ in the parameter validation performed, whether they take wide or single-byte character strings, the output destination, and support for specifying the order in which parameters are used in the format string.

## See also

[C Runtime library reference](c-run-time-library-reference.md)
15 changes: 7 additions & 8 deletions docs/c-runtime-library/memory-allocation.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
---
title: "Memory Allocation"
ms.date: "11/04/2016"
description: "Lists the Microsoft C runtime functions used to allocated, free, and reallocate memory."
f1_keywords: ["c.memory"]
helpviewer_keywords: ["memory allocation, routines", "memory, managing", "memory, allocation"]
ms.assetid: b4470556-a128-4782-9943-2ccf7a7d9979
---
# Memory Allocation
# Memory allocation

Use these routines to allocate, free, and reallocate memory.

## Memory-Allocation Routines
## Memory-allocation routines

|Routine|Use|
|-------------|---------|
|[_alloca](../c-runtime-library/reference/alloca.md), [_malloca](../c-runtime-library/reference/malloca.md)|Allocate memory from stack|
|[_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 storage for array, initializing every byte in allocated block to 0|
|[_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](../c-runtime-library/operator-delete-crt.md)|Free allocated block|
|[operator delete[]](../c-runtime-library/delete-operator-crt.md)|Free allocated block|
|[operator delete, operator delete[]](../c-runtime-library/delete-operator-crt.md)|Free allocated block|
|[_expand](../c-runtime-library/reference/expand.md)|Expand or shrink 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 allocated block|
|[_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 allocated block from stack|
|[_freea](../c-runtime-library/reference/freea.md)|Free allocated block from the stack|
|[_get_heap_handle](../c-runtime-library/reference/get-heap-handle.md)|Get Win32 HANDLE of the CRT heap.|
|[_heapadd](../c-runtime-library/heapadd.md)|Add memory to heap|
|[_heapchk](../c-runtime-library/reference/heapchk.md)|Check heap for consistency|
Expand All @@ -33,8 +33,7 @@ Use these routines to allocate, free, and reallocate memory.
|[_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 size of allocated block|
|[_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](../c-runtime-library/operator-new-crt.md)|Allocate block of memory from heap|
|[new[]](../c-runtime-library/new-operator-crt.md)|Allocate block of memory from heap|
|[new, new[]](../c-runtime-library/new-operator-crt.md)|Allocate block of memory from heap|
|[_query_new_handler](../c-runtime-library/reference/query-new-handler.md)|Return address of current new handler routine as set by **_set_new_handler**|
|[_query_new_mode](../c-runtime-library/reference/query-new-mode.md)|Return integer indicating new handler mode set by **_set_new_mode** for **malloc**|
|[realloc](../c-runtime-library/reference/realloc.md)|Reallocate block to new size|
Expand Down
13 changes: 0 additions & 13 deletions docs/c-runtime-library/operator-delete-crt.md

This file was deleted.

12 changes: 0 additions & 12 deletions docs/c-runtime-library/operator-new-crt.md

This file was deleted.

3 changes: 2 additions & 1 deletion docs/c-runtime-library/run-time-routines-by-category.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
---
title: "Universal C runtime routines by category"
description: "List of Microsoft Universal C runtime (UCRT) library routines by category."
ms.date: "04/06/2018"
helpviewer_keywords: ["routines, run-time", "functions [CRT], run-time", "categories, run-time functions", "functions [CRT]"]
ms.assetid: de6f5ac4-2226-4dad-be9f-deeb31138c9d
---
# Universal C runtime routines by category

This section lists and describes Universal C runtime (UCRT) library routines by category. For reference convenience, some routines are listed in more than one category. Multibyte-character routines and wide-character routines are grouped with single-byte character counterparts, where they exist.
This section lists Universal C runtime (UCRT) library routines by category. For reference convenience, some routines are listed in more than one category. Multibyte-character routines and wide-character routines are grouped with single-byte character counterparts, where they exist.

## UCRT library routine categories

Expand Down
4 changes: 0 additions & 4 deletions docs/c-runtime-library/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -405,12 +405,8 @@
href: ../c-runtime-library/ismbc-routines.md
- name: operator new(CRT)
href: ../c-runtime-library/new-operator-crt.md
- name: operator new (CRT)
href: ../c-runtime-library/operator-new-crt.md
- name: operator delete(CRT)
href: ../c-runtime-library/delete-operator-crt.md
- name: operator delete (CRT)
href: ../c-runtime-library/operator-delete-crt.md
- name: printf_p positional parameters
href: ../c-runtime-library/printf-p-positional-parameters.md
- name: scanf type field characters
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: "Compiler Warning (level 3) C4316"
description: "Description of C++ compiler warning C4316"
ms.date: "11/04/2016"
f1_keywords: ["C4316"]
helpviewer_keywords: ["C4316"]
Expand All @@ -9,7 +10,7 @@ ms.assetid: 10371f01-aeb8-40ac-a290-59e63efa5ad4

Object allocated on the heap may not be aligned for this type.

An over-aligned object allocated by using `operator new` may not have the specified alignment. Override [operator new](../../c-runtime-library/operator-new-crt.md) and [operator delete](../../c-runtime-library/operator-delete-crt.md) for over-aligned types so that they use the aligned allocation routines—for example, [_aligned_malloc](../../c-runtime-library/reference/aligned-malloc.md) and [_aligned_free](../../c-runtime-library/reference/aligned-free.md). The following sample generates C4316:
An over-aligned object allocated by using `operator new` may not have the specified alignment. Override [operator new](../../c-runtime-library/new-operator-crt.md) and [operator delete](../../c-runtime-library/delete-operator-crt.md) for over-aligned types so that they use the aligned allocation routines—for example, [_aligned_malloc](../../c-runtime-library/reference/aligned-malloc.md) and [_aligned_free](../../c-runtime-library/reference/aligned-free.md). The following sample generates C4316:

```cpp
// C4316.cpp
Expand Down