2012-08-18 23:17:12 +02:00
|
|
|
/*******************************************************************************
|
2012-01-22 16:48:57 +01:00
|
|
|
|
2012-08-18 23:17:12 +02:00
|
|
|
Copyright(C) Jonas 'Sortie' Termansen 2012.
|
2012-01-22 16:48:57 +01:00
|
|
|
|
|
|
|
This file is part of LibMaxsi.
|
|
|
|
|
|
|
|
LibMaxsi is free software: you can redistribute it and/or modify it under
|
|
|
|
the terms of the GNU Lesser General Public License as published by the Free
|
|
|
|
Software Foundation, either version 3 of the License, or (at your option)
|
|
|
|
any later version.
|
|
|
|
|
|
|
|
LibMaxsi is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
|
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
2012-08-18 23:17:12 +02:00
|
|
|
FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
|
|
|
|
details.
|
2012-01-22 16:48:57 +01:00
|
|
|
|
|
|
|
You should have received a copy of the GNU Lesser General Public License
|
|
|
|
along with LibMaxsi. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
2012-08-18 23:17:12 +02:00
|
|
|
isatty.cpp
|
|
|
|
Queries whether a file descriptor is associated with a terminal.
|
2012-01-22 16:48:57 +01:00
|
|
|
|
2012-08-18 23:17:12 +02:00
|
|
|
*******************************************************************************/
|
2012-01-22 16:48:57 +01:00
|
|
|
|
2012-02-12 02:03:34 +01:00
|
|
|
#include <libmaxsi/platform.h>
|
|
|
|
#include <libmaxsi/syscall.h>
|
2012-01-22 16:48:57 +01:00
|
|
|
#include <unistd.h>
|
|
|
|
|
2012-08-18 23:17:12 +02:00
|
|
|
namespace Maxsi {
|
|
|
|
|
|
|
|
DEFN_SYSCALL1(int, sys_isatty, SYSCALL_ISATTY, int);
|
|
|
|
|
|
|
|
extern "C" int isatty(int fd)
|
2012-01-22 16:48:57 +01:00
|
|
|
{
|
2012-08-18 23:17:12 +02:00
|
|
|
return sys_isatty(fd);
|
2012-01-22 16:48:57 +01:00
|
|
|
}
|
2012-08-18 23:17:12 +02:00
|
|
|
|
|
|
|
} // namespace Maxsi
|