tmp/tmp7e54k6v8/{from.md → to.md}
RENAMED
|
@@ -14,11 +14,11 @@ basic_filebuf<charT,traits>* open(const char* s,
|
|
| 14 |
|
| 15 |
*Effects:* If `is_open() != false`, returns a null pointer. Otherwise,
|
| 16 |
initializes the `filebuf` as required. It then opens a file, if
|
| 17 |
possible, whose name is the NTBS`s` (as if by calling
|
| 18 |
`std::fopen(s,modstr)`). The NTBS`modstr` is determined from
|
| 19 |
-
`mode &
|
| 20 |
Table [[tab:iostreams.file.open.modes]]. If `mode` is not some
|
| 21 |
combination of flags shown in the table then the open fails.
|
| 22 |
|
| 23 |
**Table: File open modes** <a id="tab:iostreams.file.open.modes">[tab:iostreams.file.open.modes]</a>
|
| 24 |
|
|
@@ -43,11 +43,11 @@ combination of flags shown in the table then the open fails.
|
|
| 43 |
| + | + | | | + | `"a+b"` |
|
| 44 |
|
| 45 |
|
| 46 |
If the open operation succeeds and `(mode & ios_base::ate) != 0`,
|
| 47 |
positions the file to the end (as if by calling
|
| 48 |
-
`std::fseek(file,0,SEEK_END)`).[^
|
| 49 |
|
| 50 |
If the repositioning operation fails, calls `close()` and returns a null
|
| 51 |
pointer to indicate failure.
|
| 52 |
|
| 53 |
*Returns:* `this` if successful, a null pointer otherwise.
|
|
@@ -69,11 +69,11 @@ last virtual member function called on `*this` (between `underflow`,
|
|
| 69 |
`overflow`, `seekoff`, and `seekpos`) was `overflow` then calls
|
| 70 |
`a_codecvt.unshift` (possibly several times) to determine a termination
|
| 71 |
sequence, inserts those characters and calls `overflow(traits::eof())`
|
| 72 |
again. Finally, regardless of whether any of the preceding calls fails
|
| 73 |
or throws an exception, the function closes the file (as if by calling
|
| 74 |
-
`std::fclose(file)`).[^
|
| 75 |
including `std::fclose`, fails, `close` fails by returning a null
|
| 76 |
pointer. If one of these calls throws an exception, the exception is
|
| 77 |
caught and rethrown after closing the file.
|
| 78 |
|
| 79 |
*Returns:* `this` on success, a null pointer otherwise.
|
|
|
|
| 14 |
|
| 15 |
*Effects:* If `is_open() != false`, returns a null pointer. Otherwise,
|
| 16 |
initializes the `filebuf` as required. It then opens a file, if
|
| 17 |
possible, whose name is the NTBS`s` (as if by calling
|
| 18 |
`std::fopen(s,modstr)`). The NTBS`modstr` is determined from
|
| 19 |
+
`mode & ~ios_base::ate` as indicated in
|
| 20 |
Table [[tab:iostreams.file.open.modes]]. If `mode` is not some
|
| 21 |
combination of flags shown in the table then the open fails.
|
| 22 |
|
| 23 |
**Table: File open modes** <a id="tab:iostreams.file.open.modes">[tab:iostreams.file.open.modes]</a>
|
| 24 |
|
|
|
|
| 43 |
| + | + | | | + | `"a+b"` |
|
| 44 |
|
| 45 |
|
| 46 |
If the open operation succeeds and `(mode & ios_base::ate) != 0`,
|
| 47 |
positions the file to the end (as if by calling
|
| 48 |
+
`std::fseek(file,0,SEEK_END)`).[^39]
|
| 49 |
|
| 50 |
If the repositioning operation fails, calls `close()` and returns a null
|
| 51 |
pointer to indicate failure.
|
| 52 |
|
| 53 |
*Returns:* `this` if successful, a null pointer otherwise.
|
|
|
|
| 69 |
`overflow`, `seekoff`, and `seekpos`) was `overflow` then calls
|
| 70 |
`a_codecvt.unshift` (possibly several times) to determine a termination
|
| 71 |
sequence, inserts those characters and calls `overflow(traits::eof())`
|
| 72 |
again. Finally, regardless of whether any of the preceding calls fails
|
| 73 |
or throws an exception, the function closes the file (as if by calling
|
| 74 |
+
`std::fclose(file)`).[^40] If any of the calls made by the function,
|
| 75 |
including `std::fclose`, fails, `close` fails by returning a null
|
| 76 |
pointer. If one of these calls throws an exception, the exception is
|
| 77 |
caught and rethrown after closing the file.
|
| 78 |
|
| 79 |
*Returns:* `this` on success, a null pointer otherwise.
|