Skip to content

Commit 5bc45a8

Browse files
author
Colin Robertson
committed
Fix many inline code bogusnesses
1 parent 571882a commit 5bc45a8

51 files changed

Lines changed: 635 additions & 753 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Zero if successful; `EINVAL` if *stream* is NULL.
4343

4444
## Remarks
4545

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.
4747

4848
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`.
4949

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Pointer to `FILE` structure.
3939

4040
## Remarks
4141

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.
4343

4444
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).
4545

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

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ ms.workload: ["cplusplus"]
2222
---
2323
# _CrtSetReportFile
2424

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).
2626

2727
## Syntax
2828

@@ -36,18 +36,18 @@ _HFILE _CrtSetReportFile(
3636
### Parameters
3737

3838
*reportType*
39-
Report type: `_CRT_WARN`, `_CRT_ERROR`, and `_CRT_ASSERT`.
39+
Report type: **_CRT_WARN**, **_CRT_ERROR**, and **_CRT_ASSERT**.
4040

4141
*reportFile*
4242
New report file for *reportType*.
4343

4444
## Return Value
4545

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).
4747

4848
## Remarks
4949

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.
5151

5252
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.
5353

@@ -67,9 +67,9 @@ The following list shows the available choices for *reportFile* and the resultin
6767
CloseHandle(hLogFile);
6868
```
6969
70-
- `_CRTDBG_FILE_STDERR`
70+
- **_CRTDBG_FILE_STDERR**
7171
72-
Writes message to `stderr`, which can be redirected as follows:
72+
Writes message to **stderr**, which can be redirected as follows:
7373
7474
```C
7575
freopen( "c:\\log2.txt", "w", stderr);
@@ -79,23 +79,23 @@ The following list shows the available choices for *reportFile* and the resultin
7979
_RPT0(_CRT_ERROR,"1st message\n");
8080
```
8181

82-
- `_CRTDBG_FILE_STDOUT`
82+
- **_CRTDBG_FILE_STDOUT**
8383

84-
Writes message to `stdout`, which you can redirect.
84+
Writes message to **stdout**, which you can redirect.
8585

86-
- `_CRTDBG_REPORT_FILE`
86+
- **_CRTDBG_REPORT_FILE**
8787

8888
Returns the current report mode.
8989

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.
9191

9292
## Requirements
9393

9494
|Routine|Required header|Optional header|
9595
|-------------|---------------------|---------------------|
96-
|`_CrtSetReportFile`|\<crtdbg.h>|\<errno.h>|
96+
|**_CrtSetReportFile**|\<crtdbg.h>|\<errno.h>|
9797

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).
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).
9999

100100
**Libraries:** Debug versions of [CRT Library Features](../../c-runtime-library/crt-library-features.md) only.
101101

docs/c-runtime-library/reference/fdopen-wfdopen.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ The *mode* character string specifies the type of file access requested for the
7474
**"w+"**|Opens an empty file for both reading and writing. If the file exists, its contents are destroyed.
7575
**"a+"**|Opens for reading and appending. Creates the file if it does not exist.
7676

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.
7878

7979
In addition to the above values, the following characters can also be included in *mode* to specify the translation mode for newline characters:
8080

docs/c-runtime-library/reference/feof.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/errn
4545

4646
## Remarks
4747

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.
4949

5050
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.
5151

docs/c-runtime-library/reference/findfirst-functions.md

Lines changed: 39 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -87,78 +87,73 @@ File information buffer.
8787

8888
## Return Value
8989

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.
9191

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**.
10398

10499
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).
105100

106101
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).
107102

108103
## Remarks
109104

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.
111106

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.
113108

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.
115110

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).
117112

118113
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.
119114

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.
121116

122117
### Time Type and File Length Type Variations of _findfirst
123118

124-
|Functions|`_USE_32BIT_TIME_T` defined?|Time type|File length type|
119+
|Functions|**_USE_32BIT_TIME_T** defined?|Time type|File length type|
125120
|---------------|----------------------------------|---------------|----------------------|
126-
|`_findfirst`, `_wfindfirst`|Not defined|64-bit|32-bit|
127-
|`_findfirst`, `_wfindfirst`|Defined|32-bit|32-bit|
128-
|`_findfirst32`, `_wfindfirst32`|Not affected by the macro definition|32-bit|32-bit|
129-
|`_findfirst64`, `_wfindfirst64`|Not affected by the macro definition|64-bit|64-bit|
130-
|`_findfirsti64`, `_wfindfirsti64`|Not defined|64-bit|64-bit|
131-
|`_findfirsti64`, `_wfindfirsti64`|Defined|32-bit|64-bit|
132-
|`_findfirst32i64`, `_wfindfirst32i64`|Not affected by the macro definition|32-bit|64-bit|
133-
|`_findfirst64i32`, `_wfindfirst64i32`|Not affected by the macro definition|64-bit|32-bit|
121+
|**_findfirst**, **_wfindfirst**|Not defined|64-bit|32-bit|
122+
|**_findfirst**, **_wfindfirst**|Defined|32-bit|32-bit|
123+
|**_findfirst32**, **_wfindfirst32**|Not affected by the macro definition|32-bit|32-bit|
124+
|**_findfirst64**, **_wfindfirst64**|Not affected by the macro definition|64-bit|64-bit|
125+
|**_findfirsti64**, **_wfindfirsti64**|Not defined|64-bit|64-bit|
126+
|**_findfirsti64**, **_wfindfirsti64**|Defined|32-bit|64-bit|
127+
|**_findfirst32i64**, **_wfindfirst32i64**|Not affected by the macro definition|32-bit|64-bit|
128+
|**_findfirst64i32**, **_wfindfirst64i32**|Not affected by the macro definition|64-bit|32-bit|
134129

135130
### Generic-Text Routine Mappings
136131

137132
|Tchar.h routine|_UNICODE and _MBCS not defined|_MBCS defined|_UNICODE defined|
138133
|---------------------|--------------------------------------|--------------------|-----------------------|
139-
|`_tfindfirst`|`_findfirst`|`_findfirst`|`_wfindfirst`|
140-
|`_tfindfirst32`|`_findfirst32`|`_findfirst32`|`_wfindfirst32`|
141-
|`_tfindfirst64`|`_findfirst64`|`_findfirst64`|`_wfindfirst64`|
142-
|`_tfindfirsti64`|`_findfirsti64`|`_findfirsti64`|`_wfindfirsti64`|
143-
|`_tfindfirst32i64`|`_findfirst32i64`|`_findfirst32i64`|`_wfindfirst32i64`|
144-
|`_tfindfirst64i32`|`_findfirst64i32`|`_findfirst64i32`|`_wfindfirst64i32`|
134+
|**_tfindfirst**|**_findfirst**|**_findfirst**|**_wfindfirst**|
135+
|**_tfindfirst32**|**_findfirst32**|**_findfirst32**|**_wfindfirst32**|
136+
|**_tfindfirst64**|**_findfirst64**|**_findfirst64**|**_wfindfirst64**|
137+
|**_tfindfirsti64**|**_findfirsti64**|**_findfirsti64**|**_wfindfirsti64**|
138+
|**_tfindfirst32i64**|**_findfirst32i64**|**_findfirst32i64**|**_wfindfirst32i64**|
139+
|**_tfindfirst64i32**|**_findfirst64i32**|**_findfirst64i32**|**_wfindfirst64i32**|
145140

146141
## Requirements
147142

148143
|Function|Required header|
149144
|--------------|---------------------|
150-
|`_findfirst`|\<io.h>|
151-
|`_findfirst32`|\<io.h>|
152-
|`_findfirst64`|\<io.h>|
153-
|`_findfirsti64`|\<io.h>|
154-
|`_findfirst32i64`|\<io.h>|
155-
|`_findfirst64i32`|\<io.h>|
156-
|`_wfindfirst`|\<io.h> or \<wchar.h>|
157-
|`_wfindfirst32`|\<io.h> or \<wchar.h>|
158-
|`_wfindfirst64`|\<io.h> or \<wchar.h>|
159-
|`_wfindfirsti64`|\<io.h> or \<wchar.h>|
160-
|`_wfindfirst32i64`|\<io.h> or \<wchar.h>|
161-
|`_wfindfirst64i32`|\<io.h> or \<wchar.h>|
145+
|**_findfirst**|\<io.h>|
146+
|**_findfirst32**|\<io.h>|
147+
|**_findfirst64**|\<io.h>|
148+
|**_findfirsti64**|\<io.h>|
149+
|**_findfirst32i64**|\<io.h>|
150+
|**_findfirst64i32**|\<io.h>|
151+
|**_wfindfirst**|\<io.h> or \<wchar.h>|
152+
|**_wfindfirst32**|\<io.h> or \<wchar.h>|
153+
|**_wfindfirst64**|\<io.h> or \<wchar.h>|
154+
|**_wfindfirsti64**|\<io.h> or \<wchar.h>|
155+
|**_wfindfirst32i64**|\<io.h> or \<wchar.h>|
156+
|**_wfindfirst64i32**|\<io.h> or \<wchar.h>|
162157

163158
For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md) in the Introduction.
164159

0 commit comments

Comments
 (0)