aboutsummaryrefslogtreecommitdiff
path: root/st.c
diff options
context:
space:
mode:
authorQuentin Rameau <quinq@fifth.space>2018-09-11 13:11:28 +0200
committerHiltjo Posthuma <hiltjo@codemadness.org>2018-09-11 19:05:55 +0200
commit67d0cb65d0794e2d91e72e5fa1e3612172e5812e (patch)
treed8275afb0f98a5171bc459b5e45c4bc2a67a92f5 /st.c
parent4f4bccd1627c845330235721f593d2e93418723d (diff)
downloadst-67d0cb65d0794e2d91e72e5fa1e3612172e5812e.tar.gz
st-67d0cb65d0794e2d91e72e5fa1e3612172e5812e.tar.bz2
Remove the ISO 14755 feature
And move it to the patches section. Keeping it would force to add an exec pledge on OpenBSD, and some people think it's bloated, so bye!
Diffstat (limited to 'st.c')
-rw-r--r--st.c26
1 files changed, 0 insertions, 26 deletions
diff --git a/st.c b/st.c
index 76bb3ea..574dbee 100644
--- a/st.c
+++ b/st.c
@@ -38,15 +38,11 @@
/* macros */
#define IS_SET(flag) ((term.mode & (flag)) != 0)
-#define NUMMAXLEN(x) ((int)(sizeof(x) * 2.56 + 0.5) + 1)
#define ISCONTROLC0(c) (BETWEEN(c, 0, 0x1f) || (c) == '\177')
#define ISCONTROLC1(c) (BETWEEN(c, 0x80, 0x9f))
#define ISCONTROL(c) (ISCONTROLC0(c) || ISCONTROLC1(c))
#define ISDELIM(u) (utf8strchr(worddelimiters, u) != NULL)
-/* constants */
-#define ISO14755CMD "dmenu -w \"$WINDOWID\" -p codepoint: </dev/null"
-
enum term_mode {
MODE_WRAP = 1 << 0,
MODE_INSERT = 1 << 1,
@@ -1982,28 +1978,6 @@ tprinter(char *s, size_t len)
}
void
-iso14755(const Arg *arg)
-{
- FILE *p;
- char *us, *e, codepoint[9], uc[UTF_SIZ];
- unsigned long utf32;
-
- if (!(p = popen(ISO14755CMD, "r")))
- return;
-
- us = fgets(codepoint, sizeof(codepoint), p);
- pclose(p);
-
- if (!us || *us == '\0' || *us == '-' || strlen(us) > 7)
- return;
- if ((utf32 = strtoul(us, &e, 16)) == ULONG_MAX ||
- (*e != '\n' && *e != '\0'))
- return;
-
- ttywrite(uc, utf8encode(utf32, uc), 1);
-}
-
-void
toggleprinter(const Arg *arg)
{
term.mode ^= MODE_PRINT;