diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-11-04 12:12:31 +0100 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-11-04 12:12:31 +0100 |
commit | b42c975dea7df9be883ff9c55bfe767b88ae945c (patch) | |
tree | 9e9e5b13c1574be1c632519779d52d82aa9d9c76 | |
parent | First commit (diff) | |
download | st-b42c975dea7df9be883ff9c55bfe767b88ae945c.tar.gz st-b42c975dea7df9be883ff9c55bfe767b88ae945c.tar.bz2 st-b42c975dea7df9be883ff9c55bfe767b88ae945c.tar.xz st-b42c975dea7df9be883ff9c55bfe767b88ae945c.tar.zst st-b42c975dea7df9be883ff9c55bfe767b88ae945c.zip |
Fix
-rw-r--r-- | README | 34 | ||||
-rw-r--r-- | README.org | 11 | ||||
-rw-r--r-- | config.mk | 2 | ||||
-rw-r--r-- | st.c | 10 |
4 files changed, 21 insertions, 36 deletions
@@ -1,34 +0,0 @@ -st - simple terminal --------------------- -st is a simple terminal emulator for X which sucks less. - - -Requirements ------------- -In order to build st you need the Xlib header files. - - -Installation ------------- -Edit config.mk to match your local setup (st is installed into -the /usr/local namespace by default). - -Afterwards enter the following command to build and install st (if -necessary as root): - - make clean install - - -Running st ----------- -If you did not install st with make clean install, you must compile -the st terminfo entry with the following command: - - tic -sx st.info - -See the man page for additional details. - -Credits -------- -Based on Aurélien APTEL <aurelien dot aptel at gmail dot com> bt source code. - diff --git a/README.org b/README.org new file mode 100644 index 0000000..a957a9b --- /dev/null +++ b/README.org @@ -0,0 +1,11 @@ +#+TITLE: st - simple terminal + +* Introduction +This is my personnal build of [[st][https://st.suckless.org/]], +a simple terminal emulator for X which sucks less. I've applied some +patches, added some compile flags and changed the code accordingly. + +* Installation +To in +#+BEGIN_SRC shell + @@ -21,7 +21,7 @@ LIBS = -L$(X11LIB) -lm -lrt -lX11 -lutil -lXft \ `$(PKG_CONFIG) --libs freetype2` # flags -CFLAGS = -std=c99 -Wall -Wextra -Werror -pedantic -march=ivybridge -O3 -pipe +CFLAGS = -std=c99 -Wall -Wextra -Werror -Wno-type-limits -pedantic -march=ivybridge -O3 -pipe STCPPFLAGS = -DVERSION=\"$(VERSION)\" -D_XOPEN_SOURCE=600 STCFLAGS = $(INCS) $(STCPPFLAGS) $(CPPFLAGS) $(CFLAGS) STLDFLAGS = $(LIBS) $(LDFLAGS) @@ -841,8 +841,10 @@ ttyread(void) switch (ret) { case 0: exit(0); + break; case -1: die("couldn't read from shell: %s\n", strerror(errno)); + break; default: buflen += ret; written = twrite(buf, buflen, 0); @@ -851,7 +853,9 @@ ttyread(void) if (buflen > 0) memmove(buf, buf + written, buflen); return ret; + break; } + return ret; } void @@ -2380,7 +2384,7 @@ tputc(Rune u) { char c[UTF_SIZ]; int control; - int width, len; + int width = 0, len; Glyph *gp; control = ISCONTROL(u); @@ -2838,13 +2842,16 @@ trt_kbdselect(KeySym ksym, char *buf, int len) case XK_Escape : if ( !in_use ) break; selclear(); + break; case XK_Return : set_notifmode(4, ksym); term.c.x = cu.x, term.c.y = cu.y; select_or_drawcursor(selectsearch_mode = 0, type); in_use = quant = 0; return MODE_KBDSELECT; + break; case XK_n : + break; case XK_N : if ( ptarget ) search(selectsearch_mode, &target[0], ptarget, (ksym == XK_n) ? -1 : 1, type, &cu); @@ -2877,6 +2884,7 @@ trt_kbdselect(KeySym ksym, char *buf, int len) case XK_asterisk : case XK_KP_Multiply : term.c.x = term.col >> 1; + break; case XK_underscore : term.c.y = cu.y >> 1; select_or_drawcursor(selectsearch_mode, type); |