tytools - remove eina.h include from ty tools where really not needed

This commit is contained in:
Carsten Haitzler 2017-12-19 10:16:24 +09:00
parent 16f3870fb5
commit 3a14751b34
7 changed files with 6 additions and 16 deletions

View File

@ -5,7 +5,6 @@
#include <unistd.h> #include <unistd.h>
#include <string.h> #include <string.h>
#include <Eina.h>
#include "tycommon.h" #include "tycommon.h"
static void static void

View File

@ -5,7 +5,6 @@
#include <unistd.h> #include <unistd.h>
#include <string.h> #include <string.h>
#include <Eina.h>
#include "tycommon.h" #include "tycommon.h"
static void static void

View File

@ -4,19 +4,14 @@
#include "tycommon.h" #include "tycommon.h"
Eina_Bool int
is_running_in_terminology(void) is_running_in_terminology(void)
{ {
if (!getenv("TERMINOLOGY")) if (!getenv("TERMINOLOGY")) return 0;
return EINA_FALSE;
// Terminology's escape codes do not got through tmux // Terminology's escape codes do not got through tmux
if (getenv("TMUX")) if (getenv("TMUX")) return 0;
return EINA_FALSE;
// Terminology's escape codes do not got through screen // Terminology's escape codes do not got through screen
if (getenv("STY")) if (getenv("STY")) return 0;
return EINA_FALSE;
return EINA_TRUE; return 1;
} }

View File

@ -1,7 +1,7 @@
#ifndef _TY_COMMON_H__ #ifndef _TY_COMMON_H__
#define _TY_COMMON_H__ 1 #define _TY_COMMON_H__ 1
Eina_Bool is_running_in_terminology(void); int is_running_in_terminology(void);
#define ON_NOT_RUNNING_IN_TERMINOLOGY_EXIT_1() \ #define ON_NOT_RUNNING_IN_TERMINOLOGY_EXIT_1() \
do \ do \

View File

@ -5,7 +5,6 @@
#include <unistd.h> #include <unistd.h>
#include <string.h> #include <string.h>
#include <Eina.h>
#include "tycommon.h" #include "tycommon.h"
static void static void

View File

@ -5,7 +5,6 @@
#include <unistd.h> #include <unistd.h>
#include <string.h> #include <string.h>
#include <Eina.h>
#include "tycommon.h" #include "tycommon.h"
static void static void

View File

@ -9,7 +9,6 @@
#include <fcntl.h> #include <fcntl.h>
#include <termios.h> #include <termios.h>
#include <Eina.h>
#include "tycommon.h" #include "tycommon.h"
static void static void