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
Copy file name to clipboardExpand all lines: docs/c-runtime-library/reference/clearerr-s.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -43,7 +43,7 @@ Zero if successful; `EINVAL` if *stream* is NULL.
43
43
44
44
## Remarks
45
45
46
-
The `clearerr_s` function resets the error indicator and end-of-file indicator for *stream*. Error indicators are not automatically cleared; once the error indicator for a specified stream is set, operations on that stream continue to return an error value until `clearerr_s`, `clearerr`, [fseek](fseek-fseeki64.md), `fsetpos`, or `rewind` is called.
46
+
The `clearerr_s` function resets the error indicator and end-of-file indicator for *stream*. Error indicators are not automatically cleared; once the error indicator for a specified stream is set, operations on that stream continue to return an error value until `clearerr_s`, `clearerr`, [fseek](fseek-fseeki64.md), `fsetpos`, or [rewind](rewind.md) is called.
47
47
48
48
If *stream* is NULL, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, this function sets `errno` to `EINVAL` and returns `EINVAL`.
Copy file name to clipboardExpand all lines: docs/c-runtime-library/reference/clearerr.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,7 +39,7 @@ Pointer to `FILE` structure.
39
39
40
40
## Remarks
41
41
42
-
The `clearerr` function resets the error indicator and end-of-file indicator for *stream*. Error indicators are not automatically cleared; once the error indicator for a specified stream is set, operations on that stream continue to return an error value until `clearerr`, [fseek](fseek-fseeki64.md), `fsetpos`, or `rewind` is called.
42
+
The `clearerr` function resets the error indicator and end-of-file indicator for *stream*. Error indicators are not automatically cleared; once the error indicator for a specified stream is set, operations on that stream continue to return an error value until `clearerr`, [fseek](fseek-fseeki64.md), `fsetpos`, or [rewind](rewind.md) is called.
43
43
44
44
If *stream* is `NULL`, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, this function sets `errno` to `EINVAL` and returns. For more information on `errno` and error codes, see [errno Constants](../../c-runtime-library/errno-constants.md).
Copy file name to clipboardExpand all lines: docs/c-runtime-library/reference/crtsetreportfile.md
+12-12Lines changed: 12 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,7 @@ ms.workload: ["cplusplus"]
22
22
---
23
23
# _CrtSetReportFile
24
24
25
-
After you use [_CrtSetReportMode](crtsetreportmode.md) to specify `_CRTDBG_MODE_FILE`, you can specify the file handle to receive the message text. `_CrtSetReportFile` is also used by [_CrtDbgReport, _CrtDbgReportW](crtdbgreport-crtdbgreportw.md) to specify the destination of text (debug version only).
25
+
After you use [_CrtSetReportMode](crtsetreportmode.md) to specify **_CRTDBG_MODE_FILE**, you can specify the file handle to receive the message text. **_CrtSetReportFile** is also used by [_CrtDbgReport, _CrtDbgReportW](crtdbgreport-crtdbgreportw.md) to specify the destination of text (debug version only).
26
26
27
27
## Syntax
28
28
@@ -36,18 +36,18 @@ _HFILE _CrtSetReportFile(
36
36
### Parameters
37
37
38
38
*reportType*
39
-
Report type: `_CRT_WARN`, `_CRT_ERROR`, and `_CRT_ASSERT`.
39
+
Report type: **_CRT_WARN**, **_CRT_ERROR**, and **_CRT_ASSERT**.
40
40
41
41
*reportFile*
42
42
New report file for *reportType*.
43
43
44
44
## Return Value
45
45
46
-
On successful completion, `_CrtSetReportFile` returns the previous report file defined for the report type specified in *reportType*. If an invalid value is passed in for *reportType*, this function invokes the invalid parameter handler, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, `errno` is set to `EINVAL` and the function returns `_CRTDBG_HFILE_ERROR`. For more information, see [errno, _doserrno, _sys_errlist, and _sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md).
46
+
On successful completion, **_CrtSetReportFile** returns the previous report file defined for the report type specified in *reportType*. If an invalid value is passed in for *reportType*, this function invokes the invalid parameter handler, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, **errno** is set to **EINVAL** and the function returns **_CRTDBG_HFILE_ERROR**. For more information, see [errno, _doserrno, _sys_errlist, and _sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md).
47
47
48
48
## Remarks
49
49
50
-
`_CrtSetReportFile` is used with the [_CrtSetReportMode](crtsetreportmode.md) function to define the destination or destinations for a specific report type generated by `_CrtDbgReport`. When `_CrtSetReportMode` has been called to assign the `_CRTDBG_MODE_FILE` reporting mode for a specific report type, `_CrtSetReportFile` should then be called to define the specific file or stream to use as the destination. When [_DEBUG](../../c-runtime-library/debug.md) is not defined, calls to `_CrtSetReportFile` are removed during preprocessing.
50
+
**_CrtSetReportFile** is used with the [_CrtSetReportMode](crtsetreportmode.md) function to define the destination or destinations for a specific report type generated by `_CrtDbgReport`. When `_CrtSetReportMode` has been called to assign the **_CRTDBG_MODE_FILE** reporting mode for a specific report type, **_CrtSetReportFile** should then be called to define the specific file or stream to use as the destination. When [_DEBUG](../../c-runtime-library/debug.md) is not defined, calls to **_CrtSetReportFile** are removed during preprocessing.
51
51
52
52
The following list shows the available choices for *reportFile* and the resulting behavior of `_CrtDbgReport`. These options are defined as bit flags in Crtdbg.h.
53
53
@@ -67,9 +67,9 @@ The following list shows the available choices for *reportFile* and the resultin
67
67
CloseHandle(hLogFile);
68
68
```
69
69
70
-
- `_CRTDBG_FILE_STDERR`
70
+
- **_CRTDBG_FILE_STDERR**
71
71
72
-
Writes message to `stderr`, which can be redirected as follows:
72
+
Writes message to **stderr**, which can be redirected as follows:
73
73
74
74
```C
75
75
freopen( "c:\\log2.txt", "w", stderr);
@@ -79,23 +79,23 @@ The following list shows the available choices for *reportFile* and the resultin
79
79
_RPT0(_CRT_ERROR,"1st message\n");
80
80
```
81
81
82
-
-`_CRTDBG_FILE_STDOUT`
82
+
-**_CRTDBG_FILE_STDOUT**
83
83
84
-
Writes message to `stdout`, which you can redirect.
84
+
Writes message to **stdout**, which you can redirect.
85
85
86
-
-`_CRTDBG_REPORT_FILE`
86
+
-**_CRTDBG_REPORT_FILE**
87
87
88
88
Returns the current report mode.
89
89
90
-
The report file used by each report type can be separately controlled. For example, it is possible to specify that a *reportType* of `_CRT_ERROR` be reported to `stderr`, while a *reportType* of `_CRT_ASSERT` be reported to a user-defined file handle or stream.
90
+
The report file used by each report type can be separately controlled. For example, it is possible to specify that a *reportType* of **_CRT_ERROR** be reported to **stderr**, while a *reportType* of **_CRT_ASSERT** be reported to a user-defined file handle or stream.
The console is not supported in Universal Windows Platform (UWP) apps. The standard stream handles that are associated with the console—`stdin`, `stdout`, and `stderr`—must be redirected before C run-time functions can use them in UWP apps. For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md).
98
+
The console is not supported in Universal Windows Platform (UWP) apps. The standard stream handles that are associated with the console, **stdin**, **stdout**, and **stderr**, must be redirected before C run-time functions can use them in UWP apps. For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md).
99
99
100
100
**Libraries:** Debug versions of [CRT Library Features](../../c-runtime-library/crt-library-features.md) only.
Copy file name to clipboardExpand all lines: docs/c-runtime-library/reference/fdopen-wfdopen.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -74,7 +74,7 @@ The *mode* character string specifies the type of file access requested for the
74
74
**"w+"**|Opens an empty file for both reading and writing. If the file exists, its contents are destroyed.
75
75
**"a+"**|Opens for reading and appending. Creates the file if it does not exist.
76
76
77
-
When a file is opened with the **"a"** or **"a+"** access type, all write operations occur at the end of the file. The file pointer can be repositioned by using [fseek](fseek-fseeki64.md) or `rewind`, but it is always moved back to the end of the file before any write operation is carried out. Thus, existing data cannot be overwritten. When the **"r+"**, **"w+"**, or **"a+"** access type is specified, both reading and writing are allowed (the file is said to be open for "update"). However, when you switch between reading and writing, there must be an intervening `fflush`, `fsetpos`, [fseek](fseek-fseeki64.md), or `rewind` operation. You can specify the current position for the `fsetpos` or [fseek](fseek-fseeki64.md) operation, if you want to.
77
+
When a file is opened with the **"a"** or **"a+"** access type, all write operations occur at the end of the file. The file pointer can be repositioned by using [fseek](fseek-fseeki64.md) or [rewind](rewind.md), but it is always moved back to the end of the file before any write operation is carried out. Thus, existing data cannot be overwritten. When the **"r+"**, **"w+"**, or **"a+"** access type is specified, both reading and writing are allowed (the file is said to be open for "update"). However, when you switch between reading and writing, there must be an intervening `fflush`, `fsetpos`, [fseek](fseek-fseeki64.md), or [rewind](rewind.md) operation. You can specify the current position for the `fsetpos` or [fseek](fseek-fseeki64.md) operation, if you want to.
78
78
79
79
In addition to the above values, the following characters can also be included in *mode* to specify the translation mode for newline characters:
Copy file name to clipboardExpand all lines: docs/c-runtime-library/reference/feof.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,7 +45,7 @@ See [_doserrno, errno, _sys_errlist, and _sys_nerr](../../c-runtime-library/errn
45
45
46
46
## Remarks
47
47
48
-
The `feof` routine (implemented both as a function and as a macro) determines whether the end of *stream* has been passed. When the end of file is passed, read operations return an end-of-file indicator until the stream is closed or until `rewind`, `fsetpos`, [fseek](fseek-fseeki64.md), or `clearerr` is called against it.
48
+
The `feof` routine (implemented both as a function and as a macro) determines whether the end of *stream* has been passed. When the end of file is passed, read operations return an end-of-file indicator until the stream is closed or until [rewind](rewind.md), `fsetpos`, [fseek](fseek-fseeki64.md), or `clearerr` is called against it.
49
49
50
50
For example, if a file contains 10 bytes and you read 10 bytes from the file, `feof` will return 0 because, even though the file pointer is at the end of the file, you have not attempted to read beyond the end. Only after you try to read an 11th byte will `feof` return a nonzero value.
Copy file name to clipboardExpand all lines: docs/c-runtime-library/reference/findfirst-functions.md
+39-44Lines changed: 39 additions & 44 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -87,78 +87,73 @@ File information buffer.
87
87
88
88
## Return Value
89
89
90
-
If successful, `_findfirst` returns a unique search handle identifying the file or group of files that match the *filespec* specification, which can be used in a subsequent call to [_findnext](findnext-functions.md) or to `_findclose`. Otherwise, `_findfirst` returns -1 and sets `errno` to one of the following values.
90
+
If successful, **_findfirst** returns a unique search handle identifying the file or group of files that match the *filespec* specification, which can be used in a subsequent call to [_findnext](findnext-functions.md) or to [_findclose](findclose.md). Otherwise, **_findfirst** returns -1 and sets **errno** to one of the following values.
91
91
92
-
`EINVAL`
93
-
Invalid parameter: *filespec* or *fileinfo* was `NULL`. Or, the operating system returned an unexpected error.
94
-
95
-
`ENOENT`
96
-
File specification that could not be matched.
97
-
98
-
`ENOMEM`
99
-
Insufficient memory.
100
-
101
-
`EINVAL`
102
-
Invalid file name specification or the file name given was larger than `MAX_PATH`.
92
+
|errno value|Condition|
93
+
|-|-|
94
+
**EINVAL**|Invalid parameter: *filespec* or *fileinfo* was **NULL**. Or, the operating system returned an unexpected error.
95
+
**ENOENT**|File specification that could not be matched.
96
+
**ENOMEM**|Insufficient memory.
97
+
**EINVAL**|Invalid file name specification or the file name given was larger than **MAX_PATH**.
103
98
104
99
For more information about these and other return codes, see [_doserrno, errno, _sys_errlist, and _sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md).
105
100
106
101
If an invalid parameter is passed in, these functions invoke the invalid parameter handler, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md).
107
102
108
103
## Remarks
109
104
110
-
You must call [_findclose](findclose.md) after you are finished with either the `_findfirst` or `_findnext` function (or any variants). This frees resources used by these functions in your application.
105
+
You must call [_findclose](findclose.md) after you are finished with either the **_findfirst** or [_findnext](findnext-functions.md) function (or any variants). This frees resources used by these functions in your application.
111
106
112
-
The variations of these functions that have the `w` prefix are wide-character versions; otherwise, they are identical to the corresponding single-byte functions.
107
+
The variations of these functions that have the **w** prefix are wide-character versions; otherwise, they are identical to the corresponding single-byte functions.
113
108
114
-
Variations of these functions support 32-bit or 64-bit time types and 32-bit or 64-bit file sizes. The first numeric suffix (`32` or `64`) indicates the size of the time type; the second suffix is either `i32` or `i64`, and indicates whether the file size is represented as a 32-bit or 64-bit integer. For information about which versions support 32-bit and 64-bit time types and file sizes, see the following table. The `i32` or `i64` suffix is omitted if it is the same as the size of the time type, so `_findfirst64` also supports 64-bit file lengths and `_findfirst32` supports only 32-bit file lengths.
109
+
Variations of these functions support 32-bit or 64-bit time types and 32-bit or 64-bit file sizes. The first numeric suffix (**32** or **64**) indicates the size of the time type; the second suffix is either **i32** or **i64**, and indicates whether the file size is represented as a 32-bit or 64-bit integer. For information about which versions support 32-bit and 64-bit time types and file sizes, see the following table. The **i32** or **i64** suffix is omitted if it is the same as the size of the time type, so **_findfirst64** also supports 64-bit file lengths and **_findfirst32** supports only 32-bit file lengths.
115
110
116
-
These functions use various forms of the `_finddata_t` structure for the *fileinfo* parameter. For more information about the structure, see [Filename Search Functions](../../c-runtime-library/filename-search-functions.md).
111
+
These functions use various forms of the **_finddata_t** structure for the *fileinfo* parameter. For more information about the structure, see [Filename Search Functions](../../c-runtime-library/filename-search-functions.md).
117
112
118
113
The variations that use a 64-bit time type enable file-creation dates to be expressed up through 23:59:59, December 31, 3000, UTC. Those that use 32-bit time types represent dates only through 23:59:59 January 18, 2038, UTC. Midnight, January 1, 1970, is the lower bound of the date range for all these functions.
119
114
120
-
Unless you have a specific reason to use the versions that specify the time size explicitly, use `_findfirst` or `_wfindfirst` or, if you need to support file sizes larger than 3 GB, use `_findfirsti64` or `_wfindfirsti64`. All these functions use the 64-bit time type. In earlier versions, these functions used a 32-bit time type. If this is a breaking change for an application, you might define `_USE_32BIT_TIME_T` to revert to the old behavior. If `_USE_32BIT_TIME_T` is defined, `_findfirst`, `_finfirsti64`, and their corresponding Unicode versions use a 32-bit time.
115
+
Unless you have a specific reason to use the versions that specify the time size explicitly, use **_findfirst** or **_wfindfirst** or, if you need to support file sizes larger than 3 GB, use **_findfirsti64** or **_wfindfirsti64**. All these functions use the 64-bit time type. In earlier versions, these functions used a 32-bit time type. If this is a breaking change for an application, you might define **_USE_32BIT_TIME_T** to revert to the old behavior. If **_USE_32BIT_TIME_T** is defined, **_findfirst**, **_finfirsti64**, and their corresponding Unicode versions use a 32-bit time.
121
116
122
117
### Time Type and File Length Type Variations of _findfirst
0 commit comments