summaryrefslogtreecommitdiff
path: root/src/unctrl
diff options
context:
space:
mode:
authorJakob Kaivo <jkk@ung.org>2022-04-13 19:52:12 -0400
committerJakob Kaivo <jkk@ung.org>2022-04-13 19:52:12 -0400
commitc93dd9bc67485586f3fad4958e70a1fd3c83c2d4 (patch)
tree70dccb9034eceaa3d8df4330207c3d7756e0334e /src/unctrl
parentefeeb5db9e8178a5f0ade3f99832782ab0cb4442 (diff)
split out curses
Diffstat (limited to 'src/unctrl')
-rw-r--r--src/unctrl/chtype.ref3
-rw-r--r--src/unctrl/unctrl.c29
2 files changed, 0 insertions, 32 deletions
diff --git a/src/unctrl/chtype.ref b/src/unctrl/chtype.ref
deleted file mode 100644
index b21d3775..00000000
--- a/src/unctrl/chtype.ref
+++ /dev/null
@@ -1,3 +0,0 @@
-#include <unctrl.h>
-REFERENCE(curses/chtype.c)
-XOPEN(4)
diff --git a/src/unctrl/unctrl.c b/src/unctrl/unctrl.c
deleted file mode 100644
index fc77e6bf..00000000
--- a/src/unctrl/unctrl.c
+++ /dev/null
@@ -1,29 +0,0 @@
-#include <unctrl.h>
-#include <curses.h>
-#include <ctype.h>
-#include <stddef.h>
-
-char * unctrl(chtype c)
-{
- static char buf[3];
- char * ret = NULL;
- int ch = c & A_CHARTEXT;
-
- if (iscntrl(ch)) {
- buf[0] = '^';
- buf[1] = ch + 'A';
- buf[2] = '\0';
- ret = buf;
- } else if (isprint(ch)) {
- buf[0] = ch;
- buf[1] = '\0';
- ret = buf;
- }
-
- return ret;
-}
-
-/*
-XOPEN(4)
-LINK(curses)
-*/