diff options
Diffstat (limited to 'src/io/write.hpp')
-rw-r--r-- | src/io/write.hpp | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/src/io/write.hpp b/src/io/write.hpp index 870ebb5..1ab05f3 100644 --- a/src/io/write.hpp +++ b/src/io/write.hpp @@ -1,5 +1,4 @@ -#ifndef TMWA_IO_WRITE_HPP -#define TMWA_IO_WRITE_HPP +#pragma once // io/write.hpp - Output to files. // // Copyright © 2013 Ben Longbons <b.r.longbons@gmail.com> @@ -19,14 +18,18 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. -# include "../sanity.hpp" +#include "fwd.hpp" -# include <cstdarg> +#include <cstdarg> -# include "../strings/fwd.hpp" +#include "../strings/fwd.hpp" -# include "fd.hpp" +#include "dir.hpp" +#include "fd.hpp" + +namespace tmwa +{ namespace io { class WriteFile @@ -34,7 +37,6 @@ namespace io private: FD fd; bool lb; - struct {} _unused; unsigned short buflen; char buf[4096]; public: @@ -42,6 +44,8 @@ namespace io WriteFile(FD fd, bool linebuffered=false); explicit WriteFile(ZString name, bool linebuffered=false); + WriteFile(const DirFd& dir, ZString name, bool linebuffered=false); + WriteFile(WriteFile&&) = delete; WriteFile& operator = (WriteFile&&) = delete; ~WriteFile(); @@ -65,5 +69,4 @@ namespace io __attribute__((format(printf, 2, 0))) int do_vprint(WriteFile& out, const char *fmt, va_list ap); } // namespace io - -#endif // TMWA_IO_WRITE_HPP +} // namespace tmwa |