sites

public wiki contents of suckless.org
git clone git://git.suckless.org/sites
Log | Files | Refs

commit 57c39260c6f785c28a08adc4b6b06ed917656408
parent e4f42616e953ded8adddf4c06297f913f3ece69c
Author: FRIGN <dev@frign.de>
Date:   Thu, 16 Jun 2016 21:20:17 +0200

Remove old 'boldcolor' and 'wordbreak' st-patches

They were either merged into mainline or not really maintained.
The boldcolor patch is more like a hack and really asked to be
removed.
If someone really wants to have it, he might think about reimplementing
it in a saner way.

Diffstat:
Dst.suckless.org/patches/boldcolor.md | 47-----------------------------------------------
Dst.suckless.org/patches/st-boldcolor-0.3.diff | 52----------------------------------------------------
Dst.suckless.org/patches/st-wordbreak-0.3.diff | 58----------------------------------------------------------
Dst.suckless.org/patches/st-wordbreak-0.4.1.diff | 57---------------------------------------------------------
Dst.suckless.org/patches/st-wordbreak-0.4.diff | 58----------------------------------------------------------
Dst.suckless.org/patches/st-wordbreak-0.5.diff | 52----------------------------------------------------
Dst.suckless.org/patches/wordbreak.md | 29-----------------------------
7 files changed, 0 insertions(+), 353 deletions(-)

diff --git a/st.suckless.org/patches/boldcolor.md b/st.suckless.org/patches/boldcolor.md @@ -1,47 +0,0 @@ -boldcolor -========= - -Description ------------ - -This is a hack allowing to use different colors for bold, italic -and underlined text when the text would be in defaultfg color otherwise. - -This makes the special attributes more visible when no bold or italic -font is available or defaultfg is a special color (> 255). - -Usage ------ - -config.h example: - - static const char *colorname[] = { - // ... - [255]=0, - // extra - "#00cc00", - "#333333", - "#cdba96", - "#99ff00", - "#ffff00", - }; - - static unsigned int defaultfg = 7; - static unsigned int defaultbg = 0; - static unsigned int defaultcs = 256; - static unsigned int defaultucs = 257; - // we don't want bold font (dc.bfont == dc.font) - #define NOBOLDFONT 1 - // we have extra colors to mark bold, italic and underline - #define DEFAULTBOLD 258 - #define DEFAULTITALIC 259 - #define DEFAULTUNDERLINE 260 - -Download --------- -* [st-boldcolor-0.3.diff](st-boldcolor-0.3.diff) - -Author ------- - - * Szabolcs Nagy - nsz@port70.net diff --git a/st.suckless.org/patches/st-boldcolor-0.3.diff b/st.suckless.org/patches/st-boldcolor-0.3.diff @@ -1,52 +0,0 @@ -diff -r db4f3f0ef420 st.c ---- a/st.c Fri Nov 02 20:08:51 2012 +0100 -+++ b/st.c Sat Nov 03 00:19:19 2012 +0100 -@@ -2260,8 +2260,10 @@ - xw.cw = dc.font.width; - xw.ch = dc.font.height; - -+#ifndef NOBOLDFONT - FcPatternDel(pattern, FC_WEIGHT); - FcPatternAddInteger(pattern, FC_WEIGHT, FC_WEIGHT_BOLD); -+#endif - if(xloadfont(&dc.bfont, pattern)) - die("st: can't open font %s\n", fontstr); - -@@ -2397,6 +2399,10 @@ - /* greyscale */ - fg = &dc.xft_col[base.fg + 4]; - } -+#ifdef DEFAULTBOLD -+ if(base.fg == defaultfg) -+ fg = &dc.xft_col[DEFAULTBOLD]; -+#endif - /* - * Those ranges will not be brightened: - * 8 - 15 – bright system colors -@@ -2406,10 +2412,22 @@ - font = &dc.bfont; - } - -- if(base.mode & ATTR_ITALIC) -- font = &dc.ifont; -- if(base.mode & (ATTR_ITALIC|ATTR_ITALIC)) -- font = &dc.ibfont; -+ if(base.mode & ATTR_ITALIC) { -+ if(base.mode & ATTR_BOLD) { -+ font = &dc.ibfont; -+ } else { -+ font = &dc.ifont; -+#ifdef DEFAULTITALIC -+ if(base.fg == defaultfg) -+ fg = &dc.xft_col[DEFAULTITALIC]; -+#endif -+ } -+ } -+ -+#ifdef DEFAULTUNDERLINE -+ if((base.mode & ATTR_UNDERLINE) && base.fg == defaultfg) -+ fg = &dc.xft_col[DEFAULTUNDERLINE]; -+#endif - - if(IS_SET(MODE_REVERSE)) { - if(fg == &dc.xft_col[defaultfg]) { diff --git a/st.suckless.org/patches/st-wordbreak-0.3.diff b/st.suckless.org/patches/st-wordbreak-0.3.diff @@ -1,58 +0,0 @@ -diff --git a/config.def.h b/config.def.h -index 1ba6d8e..3ddbe10 100644 ---- a/config.def.h -+++ b/config.def.h -@@ -13,7 +13,7 @@ static unsigned int tripleclicktimeout = 600; - static char termname[] = "st-256color"; - - static unsigned int tabspaces = 8; -- -+#define WORD_BREAK " " - - /* Terminal colors (16 first used in escape sequence) */ - static const char *colorname[] = { -diff --git a/st.c b/st.c -index 8e0df08..2998468 100644 ---- a/st.c -+++ b/st.c -@@ -279,6 +279,7 @@ typedef struct { - } DC; - - static void die(const char *, ...); -+static bool is_word_break(char); - static void draw(void); - static void redraw(void); - static void drawregion(int, int, int, int); -@@ -813,12 +814,12 @@ brelease(XEvent *e) { - /* double click to select word */ - sel.bx = sel.ex; - while(sel.bx > 0 && term.line[sel.ey][sel.bx-1].state & GLYPH_SET && -- term.line[sel.ey][sel.bx-1].c[0] != ' ') { -+ !is_word_break(term.line[sel.ey][sel.bx-1].c[0])) { - sel.bx--; - } - sel.b.x = sel.bx; - while(sel.ex < term.col-1 && term.line[sel.ey][sel.ex+1].state & GLYPH_SET && -- term.line[sel.ey][sel.ex+1].c[0] != ' ') { -+ !is_word_break(term.line[sel.ey][sel.ex+1].c[0])) { - sel.ex++; - } - sel.e.x = sel.ex; -@@ -866,6 +867,17 @@ die(const char *errstr, ...) { - exit(EXIT_FAILURE); - } - -+bool -+is_word_break(char c) { -+ static char *word_break = WORD_BREAK; -+ char *s = word_break; -+ while(*s) { -+ if(*s == c) return true; -+ s++; -+ } -+ return false; -+} -+ - void - execsh(void) { - char **args; diff --git a/st.suckless.org/patches/st-wordbreak-0.4.1.diff b/st.suckless.org/patches/st-wordbreak-0.4.1.diff @@ -1,57 +0,0 @@ -diff --git a/config.def.h b/config.def.h -index d1c20bd..d8db06d 100644 ---- a/config.def.h -+++ b/config.def.h -@@ -24,7 +24,7 @@ static unsigned int actionfps = 30; - static char termname[] = "st-256color"; - - static unsigned int tabspaces = 8; -- -+#define WORD_BREAK " " - - /* Terminal colors (16 first used in escape sequence) */ - static const char *colorname[] = { -diff --git a/st.c b/st.c -index 686ed5d..4f5bb05 100644 ---- a/st.c -+++ b/st.c -@@ -288,6 +288,7 @@ typedef struct { - } DC; - - static void die(const char *, ...); -+static bool is_word_break(char); - static void draw(void); - static void redraw(int); - static void drawregion(int, int, int, int); -@@ -933,11 +934,11 @@ brelease(XEvent *e) { - } else if(TIMEDIFF(now, sel.tclick1) <= doubleclicktimeout) { - /* double click to select word */ - sel.bx = sel.ex; -- while(sel.bx > 0 && term.line[sel.ey][sel.bx-1].c[0] != ' ') { -+ while(sel.bx > 0 && !is_word_break(term.line[sel.ey][sel.bx-1].c[0])) { - sel.bx--; - } - sel.b.x = sel.bx; -- while(sel.ex < term.col-1 && term.line[sel.ey][sel.ex+1].c[0] != ' ') { -+ while(sel.ex < term.col-1 && !is_word_break(term.line[sel.ey][sel.ex+1].c[0])) { - sel.ex++; - } - sel.e.x = sel.ex; -@@ -986,6 +987,17 @@ die(const char *errstr, ...) { - exit(EXIT_FAILURE); - } - -+bool -+is_word_break(char c) { -+ static char *word_break = WORD_BREAK; -+ char *s = word_break; -+ while(*s) { -+ if(*s == c) return true; -+ s++; -+ } -+ return false; -+} -+ - void - execsh(void) { - char **args; diff --git a/st.suckless.org/patches/st-wordbreak-0.4.diff b/st.suckless.org/patches/st-wordbreak-0.4.diff @@ -1,58 +0,0 @@ -diff --git a/config.def.h b/config.def.h -index 693bdbd..cba3754 100644 ---- a/config.def.h -+++ b/config.def.h -@@ -21,7 +21,7 @@ static unsigned int actionfps = 30; - static char termname[] = "st-256color"; - - static unsigned int tabspaces = 8; -- -+#define WORD_BREAK " " - - /* Terminal colors (16 first used in escape sequence) */ - static const char *colorname[] = { -diff --git a/st.c b/st.c -index 8b1fc56..8ed395c 100644 ---- a/st.c -+++ b/st.c -@@ -294,6 +294,7 @@ typedef struct { - } DC; - - static void die(const char *, ...); -+static bool is_word_break(char); - static void draw(void); - static void redraw(int); - static void drawregion(int, int, int, int); -@@ -920,12 +921,12 @@ brelease(XEvent *e) { - /* double click to select word */ - sel.bx = sel.ex; - while(sel.bx > 0 && term.line[sel.ey][sel.bx-1].state & GLYPH_SET && -- term.line[sel.ey][sel.bx-1].c[0] != ' ') { -+ !is_word_break(term.line[sel.ey][sel.bx-1].c[0])) { - sel.bx--; - } - sel.b.x = sel.bx; - while(sel.ex < term.col-1 && term.line[sel.ey][sel.ex+1].state & GLYPH_SET && -- term.line[sel.ey][sel.ex+1].c[0] != ' ') { -+ !is_word_break(term.line[sel.ey][sel.ex+1].c[0])) { - sel.ex++; - } - sel.e.x = sel.ex; -@@ -974,6 +975,17 @@ die(const char *errstr, ...) { - exit(EXIT_FAILURE); - } - -+bool -+is_word_break(char c) { -+ static char *word_break = WORD_BREAK; -+ char *s = word_break; -+ while(*s) { -+ if(*s == c) return true; -+ s++; -+ } -+ return false; -+} -+ - void - execsh(void) { - char **args; diff --git a/st.suckless.org/patches/st-wordbreak-0.5.diff b/st.suckless.org/patches/st-wordbreak-0.5.diff @@ -1,52 +0,0 @@ -diff --git a/config.def.h b/config.def.h -index 58b470e..8a8d968 100644 ---- a/config.def.h -+++ b/config.def.h -@@ -47,7 +47,7 @@ static int bellvolume = 0; - static char termname[] = "st-256color"; - - static unsigned int tabspaces = 8; -- -+#define WORD_BREAK " " - - /* Terminal colors (16 first used in escape sequence) */ - static const char *colorname[] = { -diff --git a/st.c b/st.c -index 392f12d..6a32d03 100644 ---- a/st.c -+++ b/st.c -@@ -343,6 +343,7 @@ typedef struct { - } DC; - - static void die(const char *, ...); -+static bool is_word_break(char); - static void draw(void); - static void redraw(int); - static void drawregion(int, int, int, int); -@@ -751,7 +752,7 @@ selsnap(int mode, int *x, int *y, int direction) { - */ - if(direction > 0) { - i = term.col; -- while(--i > 0 && term.line[*y][i].c[0] == ' ') -+ while(--i > 0 && is_word_break(term.line[*y][i].c[0])) - /* nothing */; - if(i > 0 && i < *x) - *x = term.col - 1; -@@ -1141,6 +1142,17 @@ die(const char *errstr, ...) { - exit(EXIT_FAILURE); - } - -+bool -+is_word_break(char c) { -+ static char *word_break = WORD_BREAK; -+ char *s = word_break; -+ while(*s) { -+ if(*s == c) return true; -+ s++; -+ } -+ return false; -+} -+ - void - execsh(void) { - char **args; diff --git a/st.suckless.org/patches/wordbreak.md b/st.suckless.org/patches/wordbreak.md @@ -1,29 +0,0 @@ -wordbreak -========= - -Description ------------ - -This patch allows you to configure which characters are used as -word boundaries for double click selections (instead of just ' '). -This feature is already implemented in all versions later than 0.5. - -Usage ------ - -config.h example: - - #define WORD_BREAK " ()<>[]\"" - -Download --------- -* [st-wordbreak-0.3.diff](st-wordbreak-0.3.diff) -* [st-wordbreak-0.4.diff](st-wordbreak-0.4.diff) -* [st-wordbreak-0.4.1.diff](st-wordbreak-0.4.1.diff) -* [st-wordbreak-0.5.diff](st-wordbreak-0.5.diff) - -Authors -------- - - * Stephen Paul Weber - singpolyma@singpolyma.net - * Laslo Hunhold - dev@frign.de (0.4, 0.4.1, 0.5 ports)