aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/include/uhdlib/utils/isatty.hpp
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2020-03-02 15:25:13 -0800
committeratrnati <54334261+atrnati@users.noreply.github.com>2020-03-03 08:51:32 -0600
commit876d4150aa3da531ddd687b48afada6e43f79146 (patch)
treefd72a71419f4cd800d4e500cfcaded4dfc8dc367 /host/lib/include/uhdlib/utils/isatty.hpp
parent1393553d623bdf4ba40d5435c9719b6ce990d9ac (diff)
downloaduhd-876d4150aa3da531ddd687b48afada6e43f79146.tar.gz
uhd-876d4150aa3da531ddd687b48afada6e43f79146.tar.bz2
uhd-876d4150aa3da531ddd687b48afada6e43f79146.zip
uhd: Apply clang-format against all .cpp and .hpp files in host/
Note: template_lvbitx.{cpp,hpp} need to be excluded from the list of files that clang-format gets applied against.
Diffstat (limited to 'host/lib/include/uhdlib/utils/isatty.hpp')
-rw-r--r--host/lib/include/uhdlib/utils/isatty.hpp52
1 files changed, 26 insertions, 26 deletions
diff --git a/host/lib/include/uhdlib/utils/isatty.hpp b/host/lib/include/uhdlib/utils/isatty.hpp
index cb8d07afb..03ca23893 100644
--- a/host/lib/include/uhdlib/utils/isatty.hpp
+++ b/host/lib/include/uhdlib/utils/isatty.hpp
@@ -14,40 +14,40 @@ namespace uhd {
#ifdef UHD_PLATFORM_WIN32
-# include <io.h>
-
- /*! Portable version of isatty()
- *
- * We call it is_a_tty() to distinguish from the from the POSIX version.
- * Also, we simply return a Boolean since the Windows version doesn't set
- * errno.
- */
- bool is_a_tty(const int fd)
- {
- return uhd::narrow_cast<bool>(_isatty(fd));
- }
+# include <io.h>
+
+/*! Portable version of isatty()
+ *
+ * We call it is_a_tty() to distinguish from the from the POSIX version.
+ * Also, we simply return a Boolean since the Windows version doesn't set
+ * errno.
+ */
+bool is_a_tty(const int fd)
+{
+ return uhd::narrow_cast<bool>(_isatty(fd));
+}
#elif _POSIX_C_SOURCE >= _200112L
# include <unistd.h>
- /*! Portable version of isatty()
- *
- * We call it is_a_tty() to distinguish from the from the POSIX version.
- * Also, we simply return a Boolean since the Windows version doesn't set
- * errno.
- */
- bool is_a_tty(const int fd)
- {
- return isatty(fd);
- }
+/*! Portable version of isatty()
+ *
+ * We call it is_a_tty() to distinguish from the from the POSIX version.
+ * Also, we simply return a Boolean since the Windows version doesn't set
+ * errno.
+ */
+bool is_a_tty(const int fd)
+{
+ return isatty(fd);
+}
#else
- bool is_a_tty(const int fd)
- {
- return false;
- }
+bool is_a_tty(const int fd)
+{
+ return false;
+}
#endif