aboutsummaryrefslogtreecommitdiffstats
path: root/src/bin/termptyops.h
diff options
context:
space:
mode:
authorBoris Faure <billiob@gmail.com>2016-12-18 18:48:03 +0100
committerBoris Faure <billiob@gmail.com>2016-12-18 18:48:03 +0100
commitf3dd6f62fb21e777ce640d7d8433f4a7be7c695f (patch)
tree4d8a9382aa644cdcb6f0b6acbf935cab2105f551 /src/bin/termptyops.h
parentprivate: add macros ROUND_UP and DIV_ROUND_UP (diff)
downloadterminology-f3dd6f62fb21e777ce640d7d8433f4a7be7c695f.tar.gz
termpty: Tab markers are the same for each line. Ref 4992
Diffstat (limited to 'src/bin/termptyops.h')
-rw-r--r--src/bin/termptyops.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/bin/termptyops.h b/src/bin/termptyops.h
index 08de5ab..deaf204 100644
--- a/src/bin/termptyops.h
+++ b/src/bin/termptyops.h
@@ -22,7 +22,26 @@ void termpty_clear_all(Termpty *ty);
void termpty_reset_att(Termatt *att);
void termpty_reset_state(Termpty *ty);
void termpty_cursor_copy(Termpty *ty, Eina_Bool save);
+void termpty_clear_tabs_on_screen(Termpty *ty);
#define _term_txt_write(ty, txt) termpty_write(ty, txt, sizeof(txt) - 1)
+#define TAB_WIDTH 8u
+
+#define TAB_SET(ty, col) \
+ do { \
+ ty->tabs[col / sizeof(unsigned int) / 8] |= \
+ 1u << (col % (sizeof(unsigned int) * 8)); \
+ } while (0)
+
+#define TAB_UNSET(ty, col) \
+ do { \
+ ty->tabs[col / sizeof(unsigned int) / 8] &= \
+ ~(1u << (col % (sizeof(unsigned int) * 8))); \
+ } while (0)
+
+#define TAB_TEST(ty, col) \
+ (ty->tabs[col / sizeof(unsigned int) / 8] & \
+ (1u << (col % (sizeof(unsigned int) * 8))))
+
#endif