X-Git-Url: https://git.danieliu.xyz/?a=blobdiff_plain;f=st.c;h=633851015846bfea41df9e69cc0fca9fc0126c46;hb=3518dba2a5fb57f601b74528ddeb67f173e4024b;hp=7c7ddffd7b7c53cb976f1e2521d453e415ef471a;hpb=ee5cc8e903574bf629e5159334ae6b0fad6af402;p=st.git diff --git a/st.c b/st.c index 7c7ddff..6338510 100644 --- a/st.c +++ b/st.c @@ -28,8 +28,6 @@ #include #include -char *argv0; - #define Glyph Glyph_ #define Font Font_ @@ -60,7 +58,7 @@ char *argv0; #define ISDELIM(u) (utf8strchr(worddelimiters, u) != NULL) /* constants */ -#define ISO14755CMD "dmenu -w %lu -p codepoint: pw_dir, 1); setenv("TERM", termname, 1); - xsetenv(); signal(SIGCHLD, SIG_DFL); signal(SIGHUP, SIG_DFL); @@ -1993,14 +1990,11 @@ tprinter(char *s, size_t len) void iso14755(const Arg *arg) { - unsigned long id = xwinid(); - char cmd[sizeof(ISO14755CMD) + NUMMAXLEN(id)]; FILE *p; char *us, *e, codepoint[9], uc[UTF_SIZ]; unsigned long utf32; - snprintf(cmd, sizeof(cmd), ISO14755CMD, id); - if (!(p = popen(cmd, "r"))) + if (!(p = popen(ISO14755CMD, "r"))) return; us = fgets(codepoint, sizeof(codepoint), p); @@ -2691,16 +2685,3 @@ cresize(int width, int height) tresize(col, row); xresize(col, row); } - -void -usage(void) -{ - die("usage: %s [-aiv] [-c class] [-f font] [-g geometry]" - " [-n name] [-o file]\n" - " [-T title] [-t title] [-w windowid]" - " [[-e] command [args ...]]\n" - " %s [-aiv] [-c class] [-f font] [-g geometry]" - " [-n name] [-o file]\n" - " [-T title] [-t title] [-w windowid] -l line" - " [stty_args ...]\n", argv0, argv0); -}