| William A. Kennington III | 0475b6d | 2023-07-21 14:28:54 -0700 | [diff] [blame] | 1 | #include <stdplus/print.hpp> |
| William A. Kennington III | 6420785 | 2023-07-26 14:03:13 -0700 | [diff] [blame] | 2 | |
| 3 | #include <cstdio> | ||||
| 4 | #include <system_error> | ||||
| 5 | |||||
| 6 | namespace stdplus | ||||
| 7 | { | ||||
| 8 | void prints(std::FILE* stream, std::string_view data) | ||||
| 9 | { | ||||
| 10 | int r = std::fwrite(data.data(), sizeof(char), data.size(), stream); | ||||
| 11 | if (r < 0) | ||||
| 12 | { | ||||
| 13 | throw std::system_error(errno, std::generic_category()); | ||||
| 14 | } | ||||
| 15 | } | ||||
| 16 | } // namespace stdplus | ||||