Skip to content

Commit 33ca95d

Browse files
authored
Merge pull request #2162 from corob-msft/cr-1354-lf-1
Fix 1354: Convert linefeed to line feed pt. 1
2 parents 23bfdda + f6e7183 commit 33ca95d

File tree

9 files changed

+13
-13
lines changed

9 files changed

+13
-13
lines changed

docs/atl/atl-encoding-reference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Encoding in a range of common Internet standards such as uuencode, hexadecimal,
2222
|[BEncodeGetRequiredLength](reference/atl-text-encoding-functions.md#bencodegetrequiredlength)|Call this function to get the size in characters of a buffer that could contain a string encoded from data of the specified size.|
2323
|[EscapeXML](reference/atl-text-encoding-functions.md#escapexml)|Call this function to convert characters that are unsafe for use in XML to their safe equivalents.|
2424
|[GetExtendedChars](reference/atl-text-encoding-functions.md#getextendedchars)|Call this function to get the number of extended characters in a string.|
25-
|[IsExtendedChar](reference/atl-text-encoding-functions.md#isextendedchar)|Call this function to find out if a given character is an extended character (less than 32, greater than 126, and not a tab, linefeed or carriage return)|
25+
|[IsExtendedChar](reference/atl-text-encoding-functions.md#isextendedchar)|Call this function to find out if a given character is an extended character (less than 32, greater than 126, and not a tab, line feed or carriage return)|
2626
|[QEncode](reference/atl-text-encoding-functions.md#qencode)|Call this function to convert some data using the "Q" encoding.|
2727
|[QEncodeGetRequiredLength](reference/atl-text-encoding-functions.md#qencodegetrequiredlength)|Call this function to get the size in characters of a buffer that could contain a string encoded from data of the specified size.|
2828
|[QPDecode](reference/atl-text-encoding-functions.md#qpdecode)|Decodes a string of data that has been encoded in quoted-printable format such as by a previous call to [QPEncode](reference/atl-text-encoding-functions.md#qpencode).|

docs/atl/reference/atl-text-encoding-functions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ These functions support text encoding and decoding.
2222
|[BEncodeGetRequiredLength](#bencodegetrequiredlength)|Call this function to get the size in characters of a buffer that could contain a string encoded from data of the specified size.|
2323
|[EscapeXML](#escapexml)|Call this function to convert characters that are unsafe for use in XML to their safe equivalents.|
2424
|[GetExtendedChars](#getextendedchars)|Call this function to get the number of extended characters in a string.|
25-
|[IsExtendedChar](#isextendedchar)|Call this function to find out if a given character is an extended character (less than 32, greater than 126, and not a tab, linefeed or carriage return)|
25+
|[IsExtendedChar](#isextendedchar)|Call this function to find out if a given character is an extended character (less than 32, greater than 126, and not a tab, line feed or carriage return)|
2626
|[QEncode](#qencode)|Call this function to convert some data using the "Q" encoding. |
2727
|[QEncodeGetRequiredLength](#qencodegetrequiredlength)|Call this function to get the size in characters of a buffer that could contain a string encoded from data of the specified size.|
2828
|[QPDecode](#qpdecode)|Decodes a string of data that has been encoded in quoted-printable format such as by a previous call to [QPEncode](#qpencode).|
@@ -364,7 +364,7 @@ Returns the number of extended characters found within the string as determined
364364

365365
## <a name="isextendedchar"></a> IsExtendedChar
366366

367-
Call this function to find out if a given character is an extended character (less than 32, greater than 126, and not a tab, linefeed or carriage return)
367+
Call this function to find out if a given character is an extended character (less than 32, greater than 126, and not a tab, line feed or carriage return)
368368

369369
```
370370
inline int IsExtendedChar(char ch) throw();

docs/c-language/white-space-characters.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ms.assetid: 030ccbdc-2db3-4dd0-88c8-f5c2669ddebf
66
---
77
# White-Space Characters
88

9-
Space, tab, linefeed, carriage return, form feed, vertical tab, and newline characters are called "white-space characters" because they serve the same purpose as the spaces between words and lines on a printed page — they make reading easier. Tokens are delimited (bounded) by white-space characters and by other tokens, such as operators and punctuation. When parsing code, the C compiler ignores white-space characters unless you use them as separators or as components of character constants or string literals. Use white-space characters to make a program more readable. Note that the compiler also treats comments as white space.
9+
Space, tab, line feed, carriage return, form feed, vertical tab, and newline characters are called "white-space characters" because they serve the same purpose as the spaces between words and lines on a printed page — they make reading easier. Tokens are delimited (bounded) by white-space characters and by other tokens, such as operators and punctuation. When parsing code, the C compiler ignores white-space characters unless you use them as separators or as components of character constants or string literals. Use white-space characters to make a program more readable. Note that the compiler also treats comments as white space.
1010

1111
## See also
1212

docs/c-runtime-library/file-translation-constants.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ The translation modes are as follows:
2121

2222
- **t**
2323

24-
Opens in text (translated) mode. In this mode, carriage-return/linefeed (CR-LF) combinations are translated into single linefeeds (LF) on input, and LF characters are translated into CR-LF combinations on output. Also, CTRL+Z is interpreted as an end-of-file character on input. In files opened for reading or reading/writing, `fopen` checks for CTRL+Z at the end of the file and removes it, if possible. This is done because using the `fseek` and `ftell` functions to move within a file ending with CTRL+Z may cause `fseek` to behave improperly near the end of the file.
24+
Opens in text (translated) mode. In this mode, carriage return-line feed (CR-LF) combinations are translated into single line feeds (LF) on input, and LF characters are translated into CR-LF combinations on output. Also, CTRL+Z is interpreted as an end-of-file character on input. In files opened for reading or reading and writing, `fopen` checks for CTRL+Z at the end of the file and removes it, if possible. This is done because using the `fseek` and `ftell` functions to move within a file ending with CTRL+Z may cause `fseek` to behave improperly near the end of the file.
2525

2626
> [!NOTE]
2727
> The **t** option is not part of the ANSI standard for `fopen` and `freopen`. It is a Microsoft extension and should not be used where ANSI portability is desired.

docs/c-runtime-library/reference/fopen-s-wfopen-s.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,11 @@ In addition to the above values, the following characters can be included in *mo
117117
|*mode* modifier|Translation mode|
118118
|-|-|
119119
| **t** | Open in text (translated) mode. |
120-
| **b** | Open in binary (untranslated) mode; translations involving carriage-return and linefeed characters are suppressed. |
120+
| **b** | Open in binary (untranslated) mode; translations involving carriage-return and line feed characters are suppressed. |
121121

122122
In text (translated) mode, CTRL+Z is interpreted as an end-of-file character on input. In files opened for reading/writing with **"a+"**, **fopen_s** checks for a CTRL+Z at the end of the file and removes it, if possible. This is done because using [fseek](fseek-fseeki64.md) and **ftell** to move within a file that ends with a CTRL+Z, may cause [fseek](fseek-fseeki64.md) to behave improperly near the end of the file.
123123

124-
Also, in text mode, carriage return-linefeed combinations are translated into single linefeeds on input, and linefeed characters are translated to carriage return-linefeed combinations on output. When a Unicode stream-I/O function operates in text mode (the default), the source or destination stream is assumed to be a sequence of multibyte characters. Therefore, the Unicode stream-input functions convert multibyte characters to wide characters (as if by a call to the **mbtowc** function). For the same reason, the Unicode stream-output functions convert wide characters to multibyte characters (as if by a call to the **wctomb** function).
124+
Also, in text mode, carriage return-line feed combinations are translated into single line feeds on input, and line feed characters are translated to carriage return-line feed combinations on output. When a Unicode stream-I/O function operates in text mode (the default), the source or destination stream is assumed to be a sequence of multibyte characters. Therefore, the Unicode stream-input functions convert multibyte characters to wide characters (as if by a call to the **mbtowc** function). For the same reason, the Unicode stream-output functions convert wide characters to multibyte characters (as if by a call to the **wctomb** function).
125125

126126
If **t** or **b** is not given in *mode*, the default translation mode is defined by the global variable [_fmode](../../c-runtime-library/fmode.md). If **t** or **b** is prefixed to the argument, the function fails and returns **NULL**.
127127

docs/c-runtime-library/reference/fopen-wfopen.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,11 @@ In addition to the earlier values, the following characters can be appended to *
104104
|*mode* modifier|Translation mode|
105105
|-|-|
106106
| **t** | Open in text (translated) mode. |
107-
| **b** | Open in binary (untranslated) mode; translations involving carriage-return and linefeed characters are suppressed. |
107+
| **b** | Open in binary (untranslated) mode; translations involving carriage-return and line feed characters are suppressed. |
108108

109109
In text mode, CTRL+Z is interpreted as an EOF character on input. In files that are opened for reading/writing by using **"a+"**, **fopen** checks for a CTRL+Z at the end of the file and removes it, if it is possible. This is done because using [fseek](fseek-fseeki64.md) and **ftell** to move within a file that ends with CTRL+Z may cause [fseek](fseek-fseeki64.md) to behave incorrectly near the end of the file.
110110

111-
In text mode, carriage return-linefeed combinations are translated into single linefeeds on input, and linefeed characters are translated to carriage return-linefeed combinations on output. When a Unicode stream-I/O function operates in text mode (the default), the source or destination stream is assumed to be a sequence of multibyte characters. Therefore, the Unicode stream-input functions convert multibyte characters to wide characters (as if by a call to the **mbtowc** function). For the same reason, the Unicode stream-output functions convert wide characters to multibyte characters (as if by a call to the **wctomb** function).
111+
In text mode, carriage return-line feed combinations are translated into single line feeds on input, and line feed characters are translated to carriage return-line feed combinations on output. When a Unicode stream-I/O function operates in text mode (the default), the source or destination stream is assumed to be a sequence of multibyte characters. Therefore, the Unicode stream-input functions convert multibyte characters to wide characters (as if by a call to the **mbtowc** function). For the same reason, the Unicode stream-output functions convert wide characters to multibyte characters (as if by a call to the **wctomb** function).
112112

113113
If **t** or **b** is not given in *mode*, the default translation mode is defined by the global variable [_fmode](../../c-runtime-library/fmode.md). If **t** or **b** is prefixed to the argument, the function fails and returns **NULL**.
114114

docs/c-runtime-library/reference/fread-s.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ For more information about error codes, see [_doserrno, errno, _sys_errlist, and
4848

4949
## Remarks
5050

51-
The **fread_s** function reads up to *count* items of *elementSize* bytes from the input *stream* and stores them in *buffer*. The file pointer that is associated with *stream* (if there is one) is increased by the number of bytes actually read. If the given stream is opened in text mode, carriage return-linefeed pairs are replaced with single linefeed characters. The replacement has no effect on the file pointer or the return value. The file-pointer position is indeterminate if an error occurs. The value of a partially read item cannot be determined.
51+
The **fread_s** function reads up to *count* items of *elementSize* bytes from the input *stream* and stores them in *buffer*. The file pointer that is associated with *stream* (if there is one) is increased by the number of bytes actually read. If the given stream is opened in text mode, carriage return-line feed pairs are replaced with single line feed characters. The replacement has no effect on the file pointer or the return value. The file-pointer position is indeterminate if an error occurs. The value of a partially read item cannot be determined.
5252

5353
This function locks out other threads. If you require a non-locking version, use **_fread_nolock**.
5454

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ See [\_doserrno, errno, \_sys\_errlist, and \_sys\_nerr](../../c-runtime-library
4545

4646
## Remarks
4747

48-
The **fread** function reads up to *count* items of *size* bytes from the input *stream* and stores them in *buffer*. The file pointer associated with *stream* (if there is one) is increased by the number of bytes actually read. If the given stream is opened in [text mode](../../c-runtime-library/text-and-binary-mode-file-i-o.md), Windows-style newlines are converted into Unix-style newlines. That is, carriage return-linefeed (CRLF) pairs are replaced by single linefeed (LF) characters. The replacement has no effect on the file pointer or the return value. The file-pointer position is indeterminate if an error occurs. The value of a partially read item cannot be determined.
48+
The **fread** function reads up to *count* items of *size* bytes from the input *stream* and stores them in *buffer*. The file pointer associated with *stream* (if there is one) is increased by the number of bytes actually read. If the given stream is opened in [text mode](../../c-runtime-library/text-and-binary-mode-file-i-o.md), Windows-style newlines are converted into Unix-style newlines. That is, carriage return-line feed (CRLF) pairs are replaced by single line feed (LF) characters. The replacement has no effect on the file pointer or the return value. The file-pointer position is indeterminate if an error occurs. The value of a partially read item cannot be determined.
4949

5050
When used on a text mode stream, if the amount of data requested (that is, *size* \* *count*) is greater than or equal to the internal **FILE** \* buffer size (by default this is 4096 bytes, configurable by using [setvbuf](../../c-runtime-library/reference/setvbuf.md)), stream data is copied directly into the user-provided buffer, and newline conversion is done in that buffer. Since the converted data may be shorter than the stream data copied into the buffer, data past *buffer*\[*return_value* \* *size*] (where *return_value* is the return value from **fread**) may contain unconverted data from the file. For this reason, we recommend you null-terminate character data at *buffer*\[*return_value* \* *size*] if the intent of the buffer is to act as a C-style string. See [fopen](fopen-wfopen.md) for details on the effects of text mode and binary mode.
5151

docs/c-runtime-library/reference/freopen-s-wfreopen-s.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,9 @@ When the **"r+"**, **"w+"**, or **"a+"** access type is specified, both reading
8181
|*mode* modifier|Translation mode|
8282
|-|-|
8383
| **t** | Open in text (translated) mode. |
84-
| **b** | Open in binary (untranslated) mode; translations involving carriage-return and linefeed characters are suppressed. |
84+
| **b** | Open in binary (untranslated) mode; translations involving carriage-return and line feed characters are suppressed. |
8585

86-
In text (translated) mode, carriage return-linefeed (CR-LF) combinations are translated into single linefeed (LF) characters on input; LF characters are translated to CR-LF combinations on output. Also, CTRL+Z is interpreted as an end-of-file character on input. In files opened for reading or for writing and reading with **"a+"**, the run-time library checks for a CTRL+Z at the end of the file and removes it, if possible. This is done because using [fseek](fseek-fseeki64.md) and [ftell](ftell-ftelli64.md) to move within a file may cause [fseek](fseek-fseeki64.md) to behave improperly near the end of the file. The **t** option is a Microsoft extension that should not be used where ANSI portability is desired.
86+
In text (translated) mode, carriage return-line feed (CR-LF) combinations are translated into single line feed (LF) characters on input; LF characters are translated to CR-LF combinations on output. Also, CTRL+Z is interpreted as an end-of-file character on input. In files opened for reading or for writing and reading with **"a+"**, the run-time library checks for a CTRL+Z at the end of the file and removes it, if possible. This is done because using [fseek](fseek-fseeki64.md) and [ftell](ftell-ftelli64.md) to move within a file may cause [fseek](fseek-fseeki64.md) to behave improperly near the end of the file. The **t** option is a Microsoft extension that should not be used where ANSI portability is desired.
8787

8888
If **t** or **b** is not given in *mode*, the default translation mode is defined by the global variable [_fmode](../../c-runtime-library/fmode.md). If **t** or **b** is prefixed to the argument, the function fails and returns **NULL**.
8989

0 commit comments

Comments
 (0)