You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Update random.md
Fix broken fwlink to presentation on rand
* Update arm-assembler-reference.md
Point to search engine to pick up latest results for ARM references on the ARM Developer Center.
* Update desktop-applications-visual-cpp.md
Fix space issue
* 📦 Enable PDF generation.
* zc-conformance.md: rvalueCast is off by default
rvalueCast is off by default according to the https://docs.microsoft.com/en-us/cpp/build/reference/zc-rvaluecast-enforce-type-conversion-rules
* Fix bad merge in storage-classes-cpp
Had merge conflict markers
* Update .openpublishing.publish.config.json
* Fix typographical error
The fix is for the file docs/windows/desktop-applications-visual-cpp.md
and adds the missing word "that" to a sentence.
* Correct .ERRDIF[[I]] title
* Fixed indentation
* Replace nonsense with correct statement
Replace nonsense with correct statement
* Update read.md
Fix some more formatting while we're at it.
* Correct build working directory
* Order link option alphabetically
Orders link option CLRUNMANAGEDCODECHECK alphabetically
in the table of contents for consistency.
* Updating timestamp
Worth getting this right, since otherwise it doesn't look like this page covers 15.3 (and it does!)
* Update cl-environment-variables.md
Line 65, fixed spelling of "setting".
* Update CONTRIBUTING.md
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,7 @@ The content inside the **docs** folder is organized into sections that are organ
19
19
20
20
You can skip this first step for small changes.
21
21
22
-
**Step 2:** Fork the `Microsoft/cpp-docs` repo.
22
+
**Step 2:** Fork the `MicrosoftDocs/cpp-docs` repo.
23
23
24
24
**Step 3:** Create a `branch` for your article.
25
25
@@ -42,7 +42,7 @@ Be sure to follow the proper Markdown syntax. See the [style guide](./styleguide
42
42
/media
43
43
wstring-conversion.png
44
44
45
-
**Step 5:** Submit a Pull Request (PR) from your branch to `Microsoft/cpp-docs/master`.
45
+
**Step 5:** Submit a Pull Request (PR) from your branch to `MicrosoftDocs/cpp-docs/master`.
46
46
47
47
If your PR is addressing an existing issue, add the `Fixes #Issue_Number` keyword to the commit message or PR description, so the issue can be automatically closed when the PR is merged. For more information, see [Closing issues via commit messages](https://help.github.com/articles/closing-issues-via-commit-messages/).
48
48
@@ -52,7 +52,7 @@ The Visual Studio team will review your PR and let you know if the change looks
52
52
53
53
The maintainers will merge your PR into the master branch once feedback has been applied and your change looks good.
54
54
55
-
On a certain cadence, we push all commits from master branch into the live branch and then you'll be able to see your contribution live at https://docs.microsoft.com/cpp-docs/.
55
+
On a certain cadence, we push all commits from master branch into the live branch and then you'll be able to see your contribution live at https://docs.microsoft.com/en-us/cpp/.
56
56
57
57
## DOs and DON'Ts
58
58
@@ -70,7 +70,7 @@ Below is a short list of guiding rules that you should keep in mind when you are
70
70
71
71
## Building the docs
72
72
73
-
The documentation is written in [GitHub Flavored Markdown](https://help.github.com/categories/writing-on-github/) and built using [DocFX](http://dotnet.github.io/docfx/) and other internal publishing/building tools. It is hosted at [docs.microsoft.com](https://docs.microsoft.com/dotnet).
73
+
The documentation is written in [GitHub Flavored Markdown](https://help.github.com/categories/writing-on-github/) and built using [DocFX](http://dotnet.github.io/docfx/) and other internal publishing/building tools. It is hosted at [docs.microsoft.com](https://docs.microsoft.com/).
74
74
75
75
If you want to build the docs locally, you need to install [DocFX](https://dotnet.github.io/docfx/); latest versions are the best.
76
76
@@ -80,16 +80,16 @@ If you are comfortable with other ways listed on the link above, feel free to us
80
80
81
81
**Note:** Currently DocFX requires the .NET Framework on Windows or Mono (for Linux or macOS). We hope to port it to .NET Core in the future.
82
82
83
-
You can build and preview the resulting site locally using a built-in web server. Navigate to the core-docs folder on your machine and type the following command:
83
+
You can build and preview the resulting site locally using a built-in web server. Navigate to the `cpp-docs\docs` folder on your machine and type the following command:
84
84
85
85
```
86
86
docfx -t default --serve
87
87
```
88
88
89
-
This starts the local preview on [localhost:8080](http://localhost:8080). You can then view the changes by going to `http://localhost:8080/[path]`, such as http://localhost:8080/articles/welcome.html.
89
+
This starts the local preview on [localhost:8080](http://localhost:8080). You can then view the changes by going to `http://localhost:8080/[path]`, such as http://localhost:8080/cpp/visual-cpp-in-visual-studio.html.
90
90
91
91
**Note:** the local preview currently doesn't contain any themes at the moment so the look and feel won't be the same as in the documentation site. We're working towards fixing that experience.
92
92
93
93
# Contributing to samples
94
94
95
-
For now, include required sample code as inline code blocks in your article. The repo has a codesnippets folder, but this is not ready for public contributions.
95
+
For now, include required sample code as inline code blocks in your article. The repo has a codesnippets folder, but this is not ready for public contributions.
Copy file name to clipboardExpand all lines: docs/build/reference/zc-conformance.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -57,7 +57,7 @@ These are the `/Zc` compiler options:
57
57
|[implicitNoexcept\[-\]](zc-implicitnoexcept-implicit-exception-specifiers.md)|Enable implicit `noexcept` on required functions (on by default).|
58
58
|[inline\[-\]](zc-inline-remove-unreferenced-comdat.md)|Remove unreferenced function or data if it is COMDAT or has internal linkage only (off by default).|
59
59
|[referenceBinding\[-\]](zc-referencebinding-enforce-reference-binding-rules.md)|A UDT temporary will not bind to an non-const lvalue reference (off by default).|
60
-
|[rvalueCast\[-\]](zc-rvaluecast-enforce-type-conversion-rules.md)|Enforce Standard C++ explicit type conversion rules (on by default).|
60
+
|[rvalueCast\[-\]](zc-rvaluecast-enforce-type-conversion-rules.md)|Enforce Standard C++ explicit type conversion rules (off by default).|
61
61
|[sizedDealloc\[-\]](zc-sizeddealloc-enable-global-sized-dealloc-functions.md)|Enable C++14 global sized deallocation functions (on by default).|
62
62
|[strictStrings\[-\]](zc-strictstrings-disable-string-literal-type-conversion.md)|Disable string-literal to `char*` or `wchar_t*` conversion (off by default).|
63
63
|[threadSafeInit\[-\]](zc-threadsafeinit-thread-safe-local-static-initialization.md)|Enable thread-safe local static initialization (on by default).|
@@ -69,4 +69,4 @@ For more information about conformance issues in Visual C++, see [Nonstandard Be
Copy file name to clipboardExpand all lines: docs/c-runtime-library/reference/read.md
+30-25Lines changed: 30 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -55,57 +55,61 @@ translation.priority.ht:
55
55
- "zh-tw"
56
56
---
57
57
# _read
58
+
58
59
Reads data from a file.
59
60
60
61
## Syntax
61
62
62
63
```
63
-
64
-
int _read(
64
+
int _read(
65
65
int fd,
66
66
void *buffer,
67
67
unsigned int count
68
68
);
69
69
```
70
70
71
-
#### Parameters
72
-
`fd`
73
-
File descriptor referring to the open file.
71
+
### Parameters
72
+
73
+
*fd*
74
+
File descriptor referring to the open file.
74
75
75
-
*buffer*
76
-
Storage location for data.
76
+
*buffer*
77
+
Storage location for data.
77
78
78
-
*count*
79
-
Maximum number of bytes.
79
+
*count*
80
+
Maximum number of bytes.
80
81
81
82
## Return Value
82
-
_**read** returns the number of bytes read, which might be less than *count* if there are fewer than *count* bytes left in the file or if the file was opened in text mode, in which case each carriage return-line feed (CR-LF) pair is replaced with a single linefeed character. Only the single linefeed character is counted in the return value. The replacement does not affect the file pointer.
83
+
84
+
`_read` returns the number of bytes read, which might be less than *count* if there are fewer than *count* bytes left in the file or if the file was opened in text mode, in which case each carriage return-line feed pair `\r\n` is replaced with a single linefeed character `\n`. Only the single linefeed character is counted in the return value. The replacement does not affect the file pointer.
83
85
84
-
If the function tries to read at end of file, it returns 0. If `fd` is invalid, the file is not 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`.
86
+
If the function tries to read at end of file, it returns 0. If *fd* is not valid, the file is not 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`.
85
87
86
-
If *buffer* is **NULL**, the invalid parameter handler is invoked. If execution is allowed to continue, the function returns -1 and `errno` is set to `EINVAL`.
88
+
If *buffer* is **NULL**, the invalid parameter handler is invoked. If execution is allowed to continue, the function returns -1 and `errno` is set to `EINVAL`.
87
89
88
-
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).
90
+
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).
89
91
90
92
## Remarks
91
-
The `_read` function reads a maximum of *count* bytes into *buffer* from the file associated with `fd`. The read operation begins at the current position of the file pointer associated with the given file. After the read operation, the file pointer points to the next unread character.
93
+
94
+
The `_read` function reads a maximum of *count* bytes into *buffer* from the file associated with *fd*. The read operation begins at the current position of the file pointer associated with the given file. After the read operation, the file pointer points to the next unread character.
92
95
93
-
If the file was opened in text mode, the read terminates when `_read` encounters a CTRL+Z character, which is treated as an end-of-file indicator. Use [_lseek](../../c-runtime-library/reference/lseek-lseeki64.md) to clear the end-of-file indicator.
96
+
If the file was opened in text mode, the read terminates when `_read` encounters a CTRL+Z character, which is treated as an end-of-file indicator. Use [_lseek](../../c-runtime-library/reference/lseek-lseeki64.md) to clear the end-of-file indicator.
94
97
95
98
## Requirements
96
99
97
100
|Routine|Required header|
98
101
|-------------|---------------------|
99
102
|`_read`|\<io.h>|
100
103
101
-
For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md) in the Introduction.
104
+
For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md).
102
105
103
106
## Libraries
104
-
All versions of the [C run-time libraries](../../c-runtime-library/crt-library-features.md).
107
+
108
+
All versions of the [C run-time libraries](../../c-runtime-library/crt-library-features.md).
0 commit comments