Skip to content

Commit d63c025

Browse files
authored
Merge pull request MicrosoftDocs#2165 from corob-msft/cr-1354-lf-3
Fix 1354: Change linefeed to line feed part 3
2 parents a0ad6e3 + 8133581 commit d63c025

File tree

8 files changed

+26
-38
lines changed

8 files changed

+26
-38
lines changed

docs/error-messages/tool-errors/resource-compiler-fatal-error-rw1004.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ ms.assetid: 89cfcb02-a5d3-4271-be4f-df2ec3f94f3e
99

1010
Unexpected end of file
1111

12-
This error can be caused by missing linefeed and carriage-return characters on the last line of a text file.
12+
This error can be caused by missing line feed and carriage-return characters on the last line of a text file.

docs/mfc/reference/carchive-class.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -610,9 +610,9 @@ In the version that returns an `LPTSTR`, a pointer to the buffer containing the
610610

611611
### Remarks
612612

613-
In the version of the member function with the *nMax* parameter, the buffer will hold up to a limit of *nMax* - 1 characters. Reading is stopped by a carriage return-linefeed pair. Trailing newline characters are always removed. A null character ('\0') is appended in either case.
613+
In the version of the member function with the *nMax* parameter, the buffer will hold up to a limit of *nMax* - 1 characters. Reading is stopped by a carriage return-line feed pair. Trailing newline characters are always removed. A null character ('\0') is appended in either case.
614614

615-
[CArchive::Read](#read) is also available for text-mode input, but it does not terminate on a carriage return-linefeed pair.
615+
[CArchive::Read](#read) is also available for text-mode input, but it does not terminate on a carriage return-line feed pair.
616616

617617
### Example
618618

docs/mfc/reference/cedit-class.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ Nonzero if any formatting occurs; otherwise 0.
348348

349349
### Remarks
350350

351-
A soft line break consists of two carriage returns and a linefeed inserted at the end of a line that is broken because of word wrapping. A hard line break consists of one carriage return and a linefeed. Lines that end with a hard line break are not affected by `FmtLines`.
351+
A soft line break consists of two carriage returns and a line feed inserted at the end of a line that is broken because of word wrapping. A hard line break consists of one carriage return and a line feed. Lines that end with a hard line break are not affected by `FmtLines`.
352352

353353
Windows will only respond if the `CEdit` object is a multiple-line edit control.
354354

docs/mfc/reference/cfile-class.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ Choose one of the following character mode options.
162162
|Value|Description|
163163
|-----------|-----------------|
164164
|`CFile::typeBinary`|Sets binary mode (used in derived classes only).|
165-
|`CFile::typeText`|Sets text mode with special processing for carriage return-linefeed pairs (used in derived classes only).|
165+
|`CFile::typeText`|Sets text mode with special processing for carriage return-line feed pairs (used in derived classes only).|
166166
|`CFile::typeUnicode`|Sets Unicode mode (used in derived classes only). Text is written to the file in Unicode format when the application is built in a Unicode configuration. No BOM is written to the file.|
167167

168168
Choose only one of the following file share mode options. The default file share mode is `CFile::shareExclusive`, which is exclusive.
@@ -573,7 +573,7 @@ virtual UINT Read(
573573
Pointer to the user-supplied buffer that is to receive the data read from the file.
574574

575575
*nCount*<br/>
576-
The maximum number of bytes to be read from the file. For text-mode files, carriage return-linefeed pairs are counted as single characters.
576+
The maximum number of bytes to be read from the file. For text-mode files, carriage return-line feed pairs are counted as single characters.
577577

578578
### Return Value
579579

@@ -842,7 +842,7 @@ virtual void Write(
842842
A pointer to the user-supplied buffer that contains the data to be written to the file.
843843

844844
*nCount*<br/>
845-
The number of bytes to be transferred from the buffer. For text-mode files, carriage return-linefeed pairs are counted as single characters.
845+
The number of bytes to be transferred from the buffer. For text-mode files, carriage return-line feed pairs are counted as single characters.
846846

847847
### Remarks
848848

docs/mfc/reference/cstdiofile-class.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class CStdioFile : public CFile
4242

4343
Stream files are buffered and can be opened in either text mode (the default) or binary mode.
4444

45-
Text mode provides special processing for carriage return-linefeed pairs. When you write a newline character (0x0A) to a text-mode `CStdioFile` object, the byte pair (0x0D, 0x0A) is sent to the file. When you read, the byte pair (0x0D, 0x0A) is translated to a single 0x0A byte.
45+
Text mode provides special processing for carriage return-line feed pairs. When you write a line feed (newline) character (0x0A) to a text-mode `CStdioFile` object, the byte pair (0x0D, 0x0A) is sent to the file. When you read, the byte pair (0x0D, 0x0A) is translated to a single 0x0A byte.
4646

4747
The [CFile](../../mfc/reference/cfile-class.md) functions [Duplicate](../../mfc/reference/cfile-class.md#duplicate), [LockRange](../../mfc/reference/cfile-class.md#lockrange), and [UnlockRange](../../mfc/reference/cfile-class.md#unlockrange) are not supported for `CStdioFile`.
4848

@@ -193,7 +193,7 @@ A pointer to the buffer containing the text data. NULL if end-of-file was reache
193193

194194
Reading is stopped by the first newline character. If, in that case, fewer than *nMax*-1 characters have been read, a newline character is stored in the buffer. A null character ('\0') is appended in either case.
195195

196-
[CFile::Read](../../mfc/reference/cfile-class.md#read) is also available for text-mode input, but it does not terminate on a carriage return-linefeed pair.
196+
[CFile::Read](../../mfc/reference/cfile-class.md#read) is also available for text-mode input, but it does not terminate on a carriage return-line feed pair.
197197

198198
> [!NOTE]
199199
> The `CString` version of this function removes the `'\n'` if present; the LPTSTR version does not.
@@ -259,7 +259,7 @@ Specifies a pointer to a buffer that contains a null-terminated string.
259259

260260
### Remarks
261261

262-
The terminating null character ( `\0`) is not written to the file. This method writes newline characters in *lpsz* to the file as a carriage return/linefeed pair.
262+
The terminating null character ( `\0`) is not written to the file. This method writes newline characters in *lpsz* to the file as a carriage return-line feed pair.
263263

264264
If you want to write data that is not null-terminated to a file, use `CStdioFile::Write` or [CFile::Write](../../mfc/reference/cfile-class.md#write).
265265

docs/standard-library/binary-output-files.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ms.assetid: 180954af-8cd6-444b-9a76-2f630a3389d8
66
---
77
# Binary Output Files
88

9-
Streams were originally designed for text, so the default output mode is text. In text mode, the newline character (hexadecimal 10) expands to a carriage return-linefeed (16-bit only). The expansion can cause problems, as shown here:
9+
Streams were originally designed for text, so the default output mode is text. In text mode, the line feed (newline) character expands to a carriage return-line feed pair. The expansion can cause problems, as shown here:
1010

1111
```cpp
1212
// binary_output_files.cpp
@@ -21,7 +21,7 @@ int main( )
2121
}
2222
```
2323
24-
You might expect this program to output the byte sequence { 99, 0, 10, 0 }; instead, it outputs { 99, 0, 13, 10, 0 }, which causes problems for a program expecting binary input. If you need true binary output, in which characters are written untranslated, you could specify binary output by using the [ofstream](../standard-library/basic-ofstream-class.md#basic_ofstream) constructor openmode argument:
24+
You might expect this program to output the byte sequence { 99, 0, 10, 0 }; instead, it outputs { 99, 0, 13, 10, 0 }, which causes problems for a program expecting binary input. If you need true binary output, in which characters are written untranslated, you could specify binary output by using the [ofstream](../standard-library/basic-ofstream-class.md#basic_ofstream) constructor `openmode` argument:
2525
2626
```cpp
2727
// binary_output_files2.cpp
@@ -41,4 +41,4 @@ int main()
4141

4242
## See also
4343

44-
[Output Streams](../standard-library/output-streams.md)<br/>
44+
[Output Streams](../standard-library/output-streams.md)

docs/standard-library/effects-of-buffering.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ To make the program work logically, the `cout` object must empty itself when the
3131
cout <<"Please wait..." <<flush;
3232
```
3333

34-
This step flushes the buffer, ensuring the message prints before the wait. You can also use the `endl` manipulator, which flushes the buffer and outputs a carriage return-linefeed, or you can use the `cin` object. This object (with the `cerr` or `clog` objects) is usually tied to the `cout` object. Thus, any use of `cin` (or of the `cerr` or `clog` objects) flushes the `cout` object.
34+
This step flushes the buffer, ensuring the message prints before the wait. You can also use the `endl` manipulator, which flushes the buffer and outputs a carriage return-line feed, or you can use the `cin` object. This object (with the `cerr` or `clog` objects) is usually tied to the `cout` object. Thus, any use of `cin` (or of the `cerr` or `clog` objects) flushes the `cout` object.
3535

3636
## See also
3737

docs/standard-library/input-stream-member-functions.md

Lines changed: 12 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,18 @@
11
---
22
title: "Input Stream Member Functions"
3-
ms.date: "11/04/2016"
3+
ms.date: "07/19/2019"
44
helpviewer_keywords: ["input stream objects", "input streams, member functions"]
55
ms.assetid: b4b9465d-0da9-4ccf-859d-72a68418982e
66
---
77
# Input Stream Member Functions
88

9-
Input stream member functions are used for disk input. The member functions include:
9+
Input stream member functions are used for disk input.
1010

11-
- [The open Function for Input Streams](#vclrftheopenfunctionforinputstreamsanchor11)
11+
## <a name="vclrftheopenfunctionforinputstreamsanchor11"></a> open
1212

13-
- [The get](#vclrfthegetfunctionanchor12)
13+
If you are using an input file stream (`ifstream`), you must associate that stream with a specific disk file. You can do this in the constructor, or you can use the `open` function. In either case, the arguments are the same.
1414

15-
- [The getline](#vclrfthegetlinefunctionanchor13)
16-
17-
- [The read](#vclrfthereadfunctionanchor14)
18-
19-
- [The seekg and tellg Functions](#vclrftheseekgandtellgfunctionsanchor7)
20-
21-
- [The close Function for Input Streams](#vclrftheclosefunctionforinputstreamsanchor15)
22-
23-
## <a name="vclrftheopenfunctionforinputstreamsanchor11"></a> The open Function for Input Streams
24-
25-
If you are using an input file stream (ifstream), you must associate that stream with a specific disk file. You can do this in the constructor, or you can use the `open` function. In either case, the arguments are the same.
26-
27-
You generally specify an [ios_base::openmode](../standard-library/ios-base-class.md#openmode) flag when you open the file associated with an input stream (the default mode is `ios::in`). For a list of the `open_mode` flags, see [The open](#vclrftheopenfunctionforinputstreamsanchor11). The flags can be combined with the bitwise OR ( &#124; ) operator.
15+
You generally specify an [ios_base::openmode](../standard-library/ios-base-class.md#openmode) flag when you open the file associated with an input stream (the default mode is `ios::in`). For a list of the `openmode` flags, see [ios_base::openmode](../standard-library/ios-base-class.md#openmode). The flags can be combined with the bitwise OR ( &#124; ) operator.
2816

2917
To read a file, first use the `fail` member function to determine whether it exists:
3018

@@ -35,7 +23,7 @@ if (ifile.fail())
3523
// The file does not exist ...
3624
```
3725
38-
## <a name="vclrfthegetfunctionanchor12"></a> The get
26+
## <a name="vclrfthegetfunctionanchor12"></a> get
3927
4028
The unformatted `get` member function works like the `>>` operator with two exceptions. First, the `get` function includes white-space characters, whereas the extractor excludes white space when the `skipws` flag is set (the default). Second, the `get` function is less likely to cause a tied output stream (`cout`, for example) to be flushed.
4129
@@ -70,7 +58,7 @@ int main()
7058
1234
7159
```
7260

73-
## <a name="vclrfthegetlinefunctionanchor13"></a> The getline
61+
## <a name="vclrfthegetlinefunctionanchor13"></a> getline
7462

7563
The `getline` member function is similar to the `get` function. Both functions allow a third argument that specifies the terminating character for input. The default value is the newline character. Both functions reserve one character for the required terminating character. However, `get` leaves the terminating character in the stream and `getline` removes the terminating character.
7664

@@ -97,7 +85,7 @@ int main( )
9785
test
9886
```
9987

100-
## <a name="vclrfthereadfunctionanchor14"></a> The read
88+
## <a name="vclrfthereadfunctionanchor14"></a> read
10189

10290
The `read` member function reads bytes from a file to a specified area of memory. The length argument determines the number of bytes read. If you do not include that argument, reading stops when the physical end of file is reached or, in the case of a text-mode file, when an embedded `EOF` character is read.
10391

@@ -127,9 +115,9 @@ int main()
127115
}
128116
```
129117

130-
The program assumes that the data records are formatted exactly as specified by the structure with no terminating carriage-return or linefeed characters.
118+
The program assumes that the data records are formatted exactly as specified by the structure with no terminating carriage return or line feed characters.
131119

132-
## <a name="vclrftheseekgandtellgfunctionsanchor7"></a> The seekg and tellg Functions
120+
## <a name="vclrftheseekgandtellgfunctionsanchor7"></a> seekg and tellg
133121

134122
Input file streams keep an internal pointer to the position in the file where data is to be read next. You set this pointer with the `seekg` function, as shown here:
135123

@@ -184,9 +172,9 @@ int main( )
184172
}
185173
```
186174

187-
## <a name="vclrftheclosefunctionforinputstreamsanchor15"></a> The close Function for Input Streams
175+
## <a name="vclrftheclosefunctionforinputstreamsanchor15"></a> close
188176

189-
The `close` member function closes the disk file associated with an input file stream and frees the operating system file handle. The [ifstream](../standard-library/basic-ifstream-class.md) destructor closes the file for you, but you can use the `close` function if you need to open another file for the same stream object.
177+
The `close` member function closes the disk file associated with an input file stream and frees the operating system file handle. The [`ifstream`](../standard-library/basic-ifstream-class.md) destructor closes the file for you, but you can use the `close` function if you need to open another file for the same stream object.
190178

191179
## See also
192180

0 commit comments

Comments
 (0)