a fork of https://st.suckless.org with some patches and zig build
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21d5550dd4
the array is not accessed outside of base64dec() so it makes sense to limit it's scope to the related function. the static-storage duration of the array is kept intact. this also removes unnecessary explicit zeroing from the start and end of the array. anything that wasn't explicitly zero-ed will now be implicitly zero-ed instead. the validity of the new array can be easily confirmed via running this trivial loop: for (int i = 0; i < 255; ++i) assert(base64_digits[i] == base64_digits_old[i]); lastly, as pointed out by Roberto, the array needs to have 256 elements in order to able access it as any unsigned char as an index; the previous array had 255. however, this array will only be accessed at indexes which are isprint() || '=' (see `base64dec_getc()`), so reducing the size of the array to the highest printable ascii char (127 AFAIK) + 1 might also be a valid strategy. (cherry picked from commit ef0551932fb162f907b40185d2f48c3b497708ee) |
2 years ago | |
---|---|---|
src | 2 years ago | |
FAQ | 2 years ago | |
LEGACY | 12 years ago | |
LICENSE | 2 years ago | |
Makefile | 6 years ago | |
README | 8 years ago | |
TODO | 10 years ago | |
arg.h | 7 years ago | |
build.zig | 2 years ago | |
config.def.h | 2 years ago | |
config.mk | 2 years ago | |
st.1 | 5 years ago | |
st.c | 2 years ago | |
st.h | 2 years ago | |
st.info | 5 years ago | |
win.h | 2 years ago | |
x.c | 2 years ago |
README
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.