From 21acf9701d5f26ccc8c76775b0a3e1616e3b4ddd Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 24 Jul 2017 14:07:40 +0200 Subject: Add std*_fd() functions --- libbutl/fdstream.ixx | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'libbutl/fdstream.ixx') diff --git a/libbutl/fdstream.ixx b/libbutl/fdstream.ixx index 5181903..212ec98 100644 --- a/libbutl/fdstream.ixx +++ b/libbutl/fdstream.ixx @@ -286,4 +286,24 @@ namespace butl static_cast (x) | static_cast (y)); } + + // std*_fdmode() + // + inline fdstream_mode + stdin_fdmode (fdstream_mode m) + { + return fdmode (stdin_fd (), m); + } + + inline fdstream_mode + stdout_fdmode (fdstream_mode m) + { + return fdmode (stdout_fd (), m); + } + + inline fdstream_mode + stderr_fdmode (fdstream_mode m) + { + return fdmode (stderr_fd (), m); + } } -- cgit v1.1