From 3a14751b343c4b60f0ce58932ec0b1fdd0bac3ba Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Tue, 19 Dec 2017 10:16:24 +0900 Subject: [PATCH] tytools - remove eina.h include from ty tools where really not needed --- src/bin/tyalpha.c | 1 - src/bin/tybg.c | 1 - src/bin/tycommon.c | 15 +++++---------- src/bin/tycommon.h | 2 +- src/bin/typop.c | 1 - src/bin/tyq.c | 1 - src/bin/tysend.c | 1 - 7 files changed, 6 insertions(+), 16 deletions(-) diff --git a/src/bin/tyalpha.c b/src/bin/tyalpha.c index e3c4c83d..7facf721 100644 --- a/src/bin/tyalpha.c +++ b/src/bin/tyalpha.c @@ -5,7 +5,6 @@ #include #include -#include #include "tycommon.h" static void diff --git a/src/bin/tybg.c b/src/bin/tybg.c index d2b7aaa4..0067149b 100644 --- a/src/bin/tybg.c +++ b/src/bin/tybg.c @@ -5,7 +5,6 @@ #include #include -#include #include "tycommon.h" static void diff --git a/src/bin/tycommon.c b/src/bin/tycommon.c index df6c486e..6b39fd51 100644 --- a/src/bin/tycommon.c +++ b/src/bin/tycommon.c @@ -4,19 +4,14 @@ #include "tycommon.h" -Eina_Bool +int is_running_in_terminology(void) { - if (!getenv("TERMINOLOGY")) - return EINA_FALSE; - + if (!getenv("TERMINOLOGY")) return 0; // Terminology's escape codes do not got through tmux - if (getenv("TMUX")) - return EINA_FALSE; - + if (getenv("TMUX")) return 0; // Terminology's escape codes do not got through screen - if (getenv("STY")) - return EINA_FALSE; + if (getenv("STY")) return 0; - return EINA_TRUE; + return 1; } diff --git a/src/bin/tycommon.h b/src/bin/tycommon.h index 86f57a99..2d7cabdd 100644 --- a/src/bin/tycommon.h +++ b/src/bin/tycommon.h @@ -1,7 +1,7 @@ #ifndef _TY_COMMON_H__ #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() \ do \ diff --git a/src/bin/typop.c b/src/bin/typop.c index f314c91c..5588c312 100644 --- a/src/bin/typop.c +++ b/src/bin/typop.c @@ -5,7 +5,6 @@ #include #include -#include #include "tycommon.h" static void diff --git a/src/bin/tyq.c b/src/bin/tyq.c index aeae097f..6dd2979c 100644 --- a/src/bin/tyq.c +++ b/src/bin/tyq.c @@ -5,7 +5,6 @@ #include #include -#include #include "tycommon.h" static void diff --git a/src/bin/tysend.c b/src/bin/tysend.c index 122a2206..33ff5f06 100644 --- a/src/bin/tysend.c +++ b/src/bin/tysend.c @@ -9,7 +9,6 @@ #include #include -#include #include "tycommon.h" static void