取消isatty函数在本文件中的实现,转移到其他文件中
This commit is contained in:
parent
82ac7d1eea
commit
9b470d448d
@ -5,7 +5,7 @@
|
|||||||
*
|
*
|
||||||
* Change Logs:
|
* Change Logs:
|
||||||
* Date Author Notes
|
* Date Author Notes
|
||||||
* 2017/08/30 Bernard The first version
|
* 2017/08/30 Bernard The first version
|
||||||
*/
|
*/
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@ -111,13 +111,6 @@ int tcdrain(int fd)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int isatty (int fd)
|
|
||||||
{
|
|
||||||
struct termios term;
|
|
||||||
|
|
||||||
return tcgetattr (fd, &term) == 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
|
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
|
||||||
void cfmakeraw(struct termios *t)
|
void cfmakeraw(struct termios *t)
|
||||||
{
|
{
|
||||||
|
@ -5,13 +5,13 @@
|
|||||||
*
|
*
|
||||||
* Change Logs:
|
* Change Logs:
|
||||||
* Date Author Notes
|
* Date Author Notes
|
||||||
* 2017/08/30 Bernard The first version
|
* 2017/08/30 Bernard The first version
|
||||||
*/
|
*/
|
||||||
#ifndef TERMIOS_H__
|
#ifndef TERMIOS_H__
|
||||||
#define TERMIOS_H__
|
#define TERMIOS_H__
|
||||||
|
|
||||||
#include <rtthread.h>
|
#include <rtthread.h>
|
||||||
#include <termios.h>
|
#include <sys/types.h>
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user