Re: [dev] [dwm] Fullscreen clients not resized on X display resolution change

2015-11-15 Thread noname
On Tue, Oct 13, 2015 at 10:12:36AM +0200, Bert Münnich wrote: > On 12.10.15, Chris Down wrote: > > I took a quick look at the code, but I didn't see any obvious reason > > for this. I will look a bit further and supply a patch if I work it > > out, but if anyone else has any ideas I'd be glad to

Re: [dev] [quol...@conus.info: Re: [hackers] [st] set font]

2015-08-09 Thread noname
On Sun, Aug 09, 2015 at 09:48:53PM +0200, Quolick wrote: > On Sun, Aug 09, 2015 at 10:19:56PM +0300, Ilya S wrote: > > :/ > > > > config.h > > > > static char font[] = "Liberation > > Mono:pixelsize=12:antialias=false:autohint=false"; > > Exactly! This is what I wrote: > > static char font[] =

Re: [dev] MIT/BSD licensed ELF linker?

2015-08-09 Thread noname
On Thu, Aug 06, 2015 at 07:50:30AM +0200, Anselm R Garbe wrote: > I need to investigate further. But probably I will rather go with a > static gold linked against glibc to produce smaller binaries and to be > GPL compliant I do not understand what the problem is. It is ok to compile GPL progr

Re: [dev] simple terminal : about fonts

2015-05-13 Thread noname
On Wed, May 13, 2015 at 09:37:43PM +0200, Romain GIACALONE wrote: > Hello, > > sorry for this "user level" question but I'm using simple terminal and I'm > looking for a readable and comfortable font. > It look like that I cannot find a decent one by myself ... > > So could some users give m

Re: [dev] [vis] [PATCH] Add '--' as end of options.

2015-05-09 Thread noname
Maybe just copy and use arg.h from st or dwm?

Re: [dev] [PATCH 09/10] Remove unnecessary tsetdirt.

2015-05-04 Thread noname
On Mon, May 04, 2015 at 12:09:06PM +0200, Roberto E. Vargas Caballero wrote: > > - tsetdirt(sel.nb.y, sel.ne.y); > > > Can you explain why is not needed? It handles the case when Button1 is released. In this case either selcopy is called and there is no need to set dirty flag as select

Re: [dev] [PATCH 10/10] Fix empty selection highlighting bug.

2015-05-03 Thread noname
I have sent a better version of the patch, ignore this one.

[dev] [PATCH 10/10] Fix empty selection highlighting bug.

2015-05-03 Thread noname
When user clicks LMB, one character is selected, but will not be copied to selection until the user moves cursor a bit. Therefore, the character should not be highlighted as selected yet. Before the patch, the trick was not to mark line as dirty to avoid highlighting it. However, if user has alrea

[dev] [PATCH] Fix indentation.

2015-05-02 Thread noname
--- st.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/st.c b/st.c index d954288..bf1c94f 100644 --- a/st.c +++ b/st.c @@ -1078,8 +1078,8 @@ selrequest(XEvent *e) { xev.selection = xsre->selection; xev.target = xsre->target; xev.time = xsre->ti

[dev] [PATCH 09/10] Remove unnecessary tsetdirt.

2015-05-02 Thread noname
--- st.c | 1 - 1 file changed, 1 deletion(-) diff --git a/st.c b/st.c index 9b1771d..e30f111 100644 --- a/st.c +++ b/st.c @@ -1131,7 +1131,6 @@ brelease(XEvent *e) { } else selclear(NULL); sel.mode = SEL_IDLE; - tsetdirt(sel.n

[dev] [PATCH 10/10] Fix empty selection highlighting bug.

2015-05-02 Thread noname
When user clicks LMB, one character is selected, but will not be copied to selection until the user moves cursor a bit. Therefore, the character should not be highlighted as selected yet. Before the patch, the trick was not to mark line as dirty to avoid highlighting it. However, if user has alrea

[dev] [PATCH 8/8] Add enumeration for sel.mode

2015-05-01 Thread noname
This patch also prevents sel.mode from increasing beyond 2. It is almost impossible, but sel.mode may overflow if mouse is moved around for too long while selecting. --- st.c | 23 ++- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/st.c b/st.c index 43fdbb3..9b1

[dev] [PATCH 6/7] selsnap: simplify SNAP_LINE case

2015-04-30 Thread noname
Also make sure y never exceeds term.row-1 even if ATTR_WRAP is set for some reason. --- st.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/st.c b/st.c index 4d383be..ac3c9f1 100644 --- a/st.c +++ b/st.c @@ -765,15 +765,15 @@ selsnap(int *x, int *y, int direction) {

[dev] [PATCH 7/7] Simplify selsnap and selnormalize.

2015-04-30 Thread noname
Use selsnap only for SNAP_WORD case. --- st.c | 96 1 file changed, 40 insertions(+), 56 deletions(-) diff --git a/st.c b/st.c index ac3c9f1..43fdbb3 100644 --- a/st.c +++ b/st.c @@ -693,8 +693,19 @@ selnormalize(void) {

[dev] [PATCH 4/5] selsnap: remove prevdelim variable

2015-04-30 Thread noname
--- st.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/st.c b/st.c index 62b0889..695233b 100644 --- a/st.c +++ b/st.c @@ -720,7 +720,7 @@ selected(int x, int y) { void selsnap(int *x, int *y, int direction) { int newx, newy, xt, yt; - bool delim, prevde

[dev] [PATCH 5/5] selsnap: remove xt variable

2015-04-30 Thread noname
It is equal to term.col-1 in any case. --- st.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/st.c b/st.c index 695233b..4d383be 100644 --- a/st.c +++ b/st.c @@ -719,7 +719,7 @@ selected(int x, int y) { void selsnap(int *x, int *y, int direction) { - int ne

[dev] [PATCH 3/3] selnormalize: check for SEL_REGULAR explicitly

2015-04-30 Thread noname
--- st.c | 16 +++- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/st.c b/st.c index 8a28df0..62b0889 100644 --- a/st.c +++ b/st.c @@ -683,8 +683,6 @@ tlinelen(int y) { void selnormalize(void) { - int i; - if(sel.type == SEL_REGULAR && sel.ob.y != sel.o

[dev] [PATCH 2/3] Remove first argument of selsnap.

2015-04-30 Thread noname
--- st.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/st.c b/st.c index 601a40e..8a28df0 100644 --- a/st.c +++ b/st.c @@ -453,7 +453,7 @@ static inline bool selected(int, int); static char *getsel(void); static void selcopy(Time); static void selscroll(int, int

[dev] [PATCH 1/3] selnormalize: make special case explicit

2015-04-30 Thread noname
Special case is when regular selection spans multiple lines. Otherwise, just sort sel.ob.x and sel.ob.y. --- st.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/st.c b/st.c index d954288..601a40e 100644 --- a/st.c +++ b/st.c @@ -685,12 +685,12 @@ void selnormalize(voi

Re: [dev] books that rock

2015-04-25 Thread noname
http://doc.cat-v.org/

Re: [dev] [st utf8 1/4] Use utf8len instead of utf8decode.

2015-04-21 Thread noname
First two patches can be applied. The second patch is not mine, I just cherry-picked it from wchar branch. Third patch changes internal representation in Glyph and makes it work. Fourth patch changes some functions mostly in the way already done in wchar branch. The general idea is to decode UTF-

[dev] [st utf8 4/4] Make tputc, tsetchar and techo accept unicode

2015-04-21 Thread noname
--- st.c | 107 --- 1 file changed, 45 insertions(+), 62 deletions(-) diff --git a/st.c b/st.c index fa21c4e..3a37994 100644 --- a/st.c +++ b/st.c @@ -383,20 +383,20 @@ static void tmoveato(int, int); static void tnew(int, int); st

[dev] [st utf8 3/4] Change internal character representation.

2015-04-21 Thread noname
--- st.c | 79 +--- 1 file changed, 38 insertions(+), 41 deletions(-) diff --git a/st.c b/st.c index 0c31fc5..fa21c4e 100644 --- a/st.c +++ b/st.c @@ -72,6 +72,7 @@ char *argv0; #define ISCONTROLC0(c) (BETWEEN(c, 0, 0x1f) || (c) ==

[dev] [st utf8 2/4] Remove last parameter of utf8encode

2015-04-21 Thread noname
This parameter was always UTF_SIZ, so it is better remove it and use directly UTF_SIZ in in. --- st.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/st.c b/st.c index b756a40..0c31fc5 100644 --- a/st.c +++ b/st.c @@ -459,7 +459,7 @@ static void mousereport(XEvent *)

[dev] [st utf8 1/4] Use utf8len instead of utf8decode.

2015-04-21 Thread noname
--- st.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/st.c b/st.c index 0204b2e..b756a40 100644 --- a/st.c +++ b/st.c @@ -3672,7 +3672,6 @@ drawregion(int x1, int y1, int x2, int y2) { Glyph base, new; char buf[DRAW_BUF_SIZ]; bool ena_sel = sel.ob.x

[dev] [st] [PATCH] Do not set terminal title based on stty arguments.

2015-04-21 Thread noname
--- st.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/st.c b/st.c index 0204b2e..3e706f7 100644 --- a/st.c +++ b/st.c @@ -4066,7 +4066,7 @@ run: if(argc > 0) { /* eat all remaining arguments */ opt_cmd = argv; - if(!opt_t

[dev] [st] [PATCH] Replace close and dup with dup2.

2015-04-21 Thread noname
--- st.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/st.c b/st.c index 0204b2e..adf0b62 100644 --- a/st.c +++ b/st.c @@ -1298,8 +1298,7 @@ ttynew(void) { if (opt_line) { if((cmdfd = open(opt_line, O_RDWR)) < 0) die("open lin

Re: [dev] [st] [PATCH] Optimize memory footprint of line buffers

2015-04-21 Thread noname
At least we can safely reduce to uint16_t now.

Re: [dev] [st] [PATCH] Optimize memory footprint of line buffers

2015-04-21 Thread noname
On Tue, Apr 21, 2015 at 10:32:26AM -0700, Eric Pruitt wrote: > On Tue, Apr 21, 2015 at 07:03:57PM +0200, Roberto E. Vargas Caballero wrote: > > The problem here is that st was designed in this way, and to change it > > is going to generate segfault in all the users that update the st > > version wi

Re: [dev] [st PATCH 1/3] xloadcols: remove cp variable

2015-04-21 Thread noname
On Tue, Apr 21, 2015 at 07:54:27AM +0200, Roberto E. Vargas Caballero wrote: > > Hi, > > > - Color *cp; > > > > if(loaded) { > > - for (cp = dc.col; cp < dc.col + LEN(dc.col); ++cp) > > - XftColorFree(xw.dpy, xw.vis, xw.cmap, cp); > > + for (i = 0; i

Re: [dev] [st] [PATCH 2/5] Replace for with while.

2015-04-20 Thread noname
On Mon, Apr 20, 2015 at 09:53:38AM +0200, Martti Kühne wrote: > Are we discussing something for which #include does not > leave any questions open? int32_t, int_fast32_t or int_least32_t would > probably be the solution here? We probably want to replace long with uint_least32_t for character repr

Re: [dev] [st] [PATCH 2/5] Replace for with while.

2015-04-19 Thread noname
On Sun, Apr 19, 2015 at 10:40:18AM +0200, Roberto E. Vargas Caballero wrote: > > As per "The C Programming Language 2nd Edition" and the BSD style guide, > > the "proper" way to loop infinitely in C is "for(;;)". > > I agree about moving the assignment out of the loop initialization > > though. It

Re: [dev] [st] Flow control support

2015-04-19 Thread noname
On Sun, Apr 19, 2015 at 02:52:18PM -0400, Alex Pilon wrote: > On Sun, Apr 19, 2015 at 02:36:35PM -0300, Amadeus Folego wrote: > > Alex, you just posted the diffstat, not the patch itself. > > I know. I was only proving a point about it being small and trying to > reduce the noise, though moot now.

[dev] [st PATCH 2/3] Use LEN(dc.col) instead of LEN(colorname).

2015-04-19 Thread noname
LEN(colorname) may be below 256 for some configurations. --- st.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/st.c b/st.c index 759a3b1..0b2997e 100644 --- a/st.c +++ b/st.c @@ -2906,7 +2906,7 @@ xsetcolorname(int x, const char *name) { XRenderColor color = { .alpha

[dev] [st PATCH 1/3] xloadcols: remove cp variable

2015-04-19 Thread noname
--- st.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/st.c b/st.c index bb8c365..759a3b1 100644 --- a/st.c +++ b/st.c @@ -2868,11 +2868,10 @@ xloadcols(void) { int i; XRenderColor color = { .alpha = 0x }; static bool loaded; - Color *cp

[dev] [st PATCH 3/3] Move common code to xloadcolor.

2015-04-19 Thread noname
--- st.c | 84 1 file changed, 30 insertions(+), 54 deletions(-) diff --git a/st.c b/st.c index 0b2997e..8c88e47 100644 --- a/st.c +++ b/st.c @@ -414,6 +414,7 @@ static void xhints(void); static void xclear(int, int, int, int);

Re: [dev] [st] Flow control support

2015-04-19 Thread noname
On Sun, Apr 19, 2015 at 01:05:50PM -0400, Alex Pilon wrote: > Is there much appetite for flow control support in > what-shall-we-call-it—‘mainline’? > > I occasionally have a use for it, but would rather not further feature > creep into what everybody else uses without darn good reason. How do yo

[dev] [st] [PATCH 3/3] Place memset arguments in the correct order.

2015-04-18 Thread noname
--- st.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/st.c b/st.c index 3a803f3..949cdb7 100644 --- a/st.c +++ b/st.c @@ -1421,7 +1421,7 @@ treset(void) { term.top = 0; term.bot = term.row - 1; term.mode = MODE_WRAP; - memset(term.trantbl, sizeo

[dev] [st] [PATCH 2/3] Remove explicit 'return' from 'void' functions.

2015-04-18 Thread noname
--- st.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/st.c b/st.c index 8e502b0..3a803f3 100644 --- a/st.c +++ b/st.c @@ -2466,7 +2466,6 @@ tstrsequence(uchar c) { strreset(); strescseq.type = c; term.esc |= ESC_STR; - return; } void @@ -2548,7 +2547,6 @@

[dev] [st] [PATCH 1/3] Use true and false with bools.

2015-04-18 Thread noname
--- st.c | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/st.c b/st.c index 0d73d6e..8e502b0 100644 --- a/st.c +++ b/st.c @@ -1370,7 +1370,7 @@ tsetdirt(int top, int bot) { LIMIT(bot, 0, term.row-1); for(i = top; i <= bot; i++) -

[dev] [st] [PATCH] Remove WIN_REDRAW flag.

2015-04-18 Thread noname
WIN_REDRAW flag was not used since introduction of Xdbe in commit 94771d05886fbdd2422e66b7c0256ab27fa375cb --- st.c | 16 ++-- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/st.c b/st.c index bb8c365..12a28e8 100644 --- a/st.c +++ b/st.c @@ -158,8 +158,7 @@ enum escape_

[dev] [st] [PATCH 6/6] Remove deltatime variable.

2015-04-18 Thread noname
--- st.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/st.c b/st.c index e10815f..41b932d 100644 --- a/st.c +++ b/st.c @@ -3915,7 +3915,6 @@ run(void) { int xfd = XConnectionNumber(xw.dpy), xev, blinkset = 0; bool dodraw; struct timespec drawtimeout

[dev] [st] [PATCH 5/5] Monotonic clock cannot jump backwards.

2015-04-18 Thread noname
The check was introduced back when st used gettimeofday. --- st.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/st.c b/st.c index cacb7f6..e10815f 100644 --- a/st.c +++ b/st.c @@ -3968,8 +3968,7 @@ run(void) { dodraw = true; }

[dev] [st] [PATCH 3/5] Do not use floating point to calculate timeout

2015-04-18 Thread noname
This way is a bit more accurate. --- st.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/st.c b/st.c index 30f296d..1bcdb7f 100644 --- a/st.c +++ b/st.c @@ -3956,7 +3956,7 @@ run(void) { clock_gettime(CLOCK_MONOTONIC, &now); drawtimeout.tv_sec

[dev] [st] [PATCH 4/5] Make dodraw bool and remove initialization.

2015-04-18 Thread noname
--- st.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/st.c b/st.c index 1bcdb7f..cacb7f6 100644 --- a/st.c +++ b/st.c @@ -3912,7 +3912,8 @@ run(void) { XEvent ev; int w = xw.w, h = xw.h; fd_set rfd; - int xfd = XConnectionNumber(xw.dpy)

[dev] [st] [PATCH 2/5] Replace for with while.

2015-04-18 Thread noname
--- st.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/st.c b/st.c index 3fa58da..30f296d 100644 --- a/st.c +++ b/st.c @@ -3930,8 +3930,9 @@ run(void) { clock_gettime(CLOCK_MONOTONIC, &last); lastblink = last; + xev = actionfps; - for(xev = a

[dev] [st] [PATCH 1/5] Place tlinelen type on separate line.

2015-04-18 Thread noname
--- st.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/st.c b/st.c index bb8c365..3fa58da 100644 --- a/st.c +++ b/st.c @@ -671,7 +671,8 @@ y2row(int y) { return LIMIT(y, 0, term.row-1); } -int tlinelen(int y) { +int +tlinelen(int y) { int i = term.col;

Re: [dev] [st] [PATCH 2/2] Make -e behave as -- for compatibility.

2015-04-13 Thread noname
On Mon, Apr 13, 2015 at 09:58:16PM +0200, Roberto E. Vargas Caballero wrote: > > > + case 'e': > > + /* xterm/rxvt compatibility */ > > + *argv[0] = '-'; > > + argc++, argv--; > > + break; > > case 'f': > > opt_font = EARGF(usage()); > >

[dev] [vis] [PATCH] Highlight null directive.

2015-04-13 Thread noname
--- config.def.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.def.h b/config.def.h index ff1a63c..bcacc8d 100644 --- a/config.def.h +++ b/config.def.h @@ -883,7 +883,7 @@ static Color colors[] = { } #define SYNTAX_C_PREPROCESSOR { \ - "(^#[\\t ]*(define|inc

[dev] [st] [PATCH 2/2] Make -e behave as -- for compatibility.

2015-04-13 Thread noname
--- st.c | 5 + 1 file changed, 5 insertions(+) diff --git a/st.c b/st.c index 6c9ba5c..5469a2c 100644 --- a/st.c +++ b/st.c @@ -4034,6 +4034,11 @@ main(int argc, char *argv[]) { case 'c': opt_class = EARGF(usage()); break; + case 'e': +

[dev] [st] [PATCH 1/2] Remove -e option. Use -- instead.

2015-04-13 Thread noname
--- FAQ | 4 ++-- st.1 | 13 + st.c | 19 ++- 3 files changed, 13 insertions(+), 23 deletions(-) diff --git a/FAQ b/FAQ index 3502c60..275fc4e 100644 --- a/FAQ +++ b/FAQ @@ -26,8 +26,8 @@ st or st-256color. The default value for TERM can be changed in config.h Us

[dev] [st] [PATCH 1/3] Remove 'titles' variable.

2015-04-13 Thread noname
We do not free it until exit anyway. --- st.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/st.c b/st.c index b2bcfe9..867744a 100644 --- a/st.c +++ b/st.c @@ -4021,7 +4021,6 @@ usage(void) { int main(int argc, char *argv[]) { - char *titles; uint col

Re: [dev] [st] [PATCH 2/3] Remove -e option. Use -- instead.

2015-04-13 Thread noname
Please report if there are known compatibility problems that require -e option to be present. Maybe something related to Debian "alternatives" mechanism etc. Otherwise this patch removes ugly goto and makes 'st mutt' work just like 'xterm mutt' instead of simply ignoring remaining arguments.

[dev] [st] [PATCH 3/3] Remove old TODO entry.

2015-04-13 Thread noname
It probably refers to http://lists.suckless.org/dev/1211/13427.html and does not seem like a bug in st. --- TODO | 1 - 1 file changed, 1 deletion(-) diff --git a/TODO b/TODO index 90e3d56..5f74cd5 100644 --- a/TODO +++ b/TODO @@ -19,7 +19,6 @@ bugs * fix shift up/down (shift selection i

[dev] [st] [PATCH 2/3] Remove -e option. Use -- instead.

2015-04-13 Thread noname
--- FAQ | 4 ++-- st.1 | 13 + st.c | 16 ++-- 3 files changed, 13 insertions(+), 20 deletions(-) diff --git a/FAQ b/FAQ index 3502c60..275fc4e 100644 --- a/FAQ +++ b/FAQ @@ -26,8 +26,8 @@ st or st-256color. The default value for TERM can be changed in config.h Using

[dev] [st] [PATCH] Remove useless if in tstrsequence.

2015-04-13 Thread noname
--- st.c | 28 +--- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/st.c b/st.c index b2bcfe9..154dd52 100644 --- a/st.c +++ b/st.c @@ -2446,21 +2446,19 @@ tdectest(char c) { void tstrsequence(uchar c) { - if (c & 0x80) { - switch (c)

[dev] [st] [PATCH 3/3] Simplify tmoveto.

2015-04-13 Thread noname
LIMIT returns value. This fact is already used in x2col and y2row. --- st.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/st.c b/st.c index e01df66..33fd4de 100644 --- a/st.c +++ b/st.c @@ -1572,11 +1572,9 @@ tmoveto(int x, int y) { miny = 0;

[dev] [st] [PATCH 2/3] Do not use tmoveto in tputtab.

2015-04-13 Thread noname
tmoveto resets CURSOR_WRAPNEXT. Simple testcase: for i in $(seq 1 200); do printf '\t.'; usleep 10; printf '\t@'; usleep 10; done In st executing this script causes @ and . to overwrite each other in the last column. --- st.c | 2 +- 1 file changed, 1 ins

[dev] [st] [PATCH 1/3] Fix typo.

2015-04-13 Thread noname
It seems that LICENSE files are more common than LICENCE files. At least this patch makes spelling consistent. --- st.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/st.c b/st.c index f183803..db35e71 100644 --- a/st.c +++ b/st.c @@ -1,4 +1,4 @@ -/* See LICENSE for licence de

Re: [dev] [st] [PATCH 1/2] Do not use switch for fork() call.

2015-04-13 Thread noname
On Mon, Apr 13, 2015 at 09:20:34AM +0200, Roberto E. Vargas Caballero wrote: > I don't understand this patch. The switch-fork is a common idiom > and I don't know why you think it should be changed. It separates the case when fork fails and when fork succeeds. You can even move error-processing c

Re: [dev] Re: [dmenu] [PATCH] Make Ctrl+Enter print current selection

2015-04-12 Thread noname
Try to clone a clean git repo from git.suckless.org. For me everything works as expected without any patches.

Re: [dev] [dmenu] Potential bug in dmenu Ctrl+Enter handling

2015-04-12 Thread noname
On Sun, Apr 12, 2015 at 11:18:02AM -0700, Eric Pruitt wrote: > While looking at the dmenu source code to make a patch for it, I noticed > this conditional on line 371: "if(!(ev->state & ControlMask))". It looks > as though pressing Ctrl+(Shift)+Enter is supposed to print the current > selection to

Re: [dev] [st] [PATCH 4/3] tresize: remove unnecessary if

2015-04-12 Thread noname
On Sun, Apr 12, 2015 at 11:35:42AM +0200, Silvan Jegen wrote: > I just wonder if it really will be copying the data around into a > temporary array for no reason when i == 0 (either in glibc or in another > libc). Well, it does not really move data to temporary array, memmove just chooses the righ

Re: [dev] [st] [PATCH 4/3] tresize: remove unnecessary if

2015-04-12 Thread noname
On Sun, Apr 12, 2015 at 10:41:36AM +0200, Silvan Jegen wrote: > I was thinking about this option too but in that case you would be > calling memmove with an identical src and dst when i == 0. The man page > for glibc memmove(3) does not mention anything about this being a noop > so I am not sure th

[dev] [st] [PATCH 4/3] tresize: remove unnecessary if

2015-04-12 Thread noname
--- st.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/st.c b/st.c index 109122e..f183803 100644 --- a/st.c +++ b/st.c @@ -2788,10 +2788,8 @@ tresize(int col, int row) { free(term.line[i]); free(term.alt[i]); } - if(i > 0) {

Re: [dev] [st] [PATCH 3/3] Remove 'slide' variable in tresize.

2015-04-11 Thread noname
The commiter can squash 3 commits into 1 using rebase -i if he wants. I tried to separate moving loop outside if and removing local variable. I think these changes are independent.

[dev] [st] [PATCH 3/3] Remove 'slide' variable in tresize.

2015-04-11 Thread noname
--- st.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/st.c b/st.c index 51bd40c..ce2646e 100644 --- a/st.c +++ b/st.c @@ -2770,7 +2770,6 @@ tresize(int col, int row) { int i; int minrow = MIN(row, term.row); int mincol = MIN(col, term.col); -

[dev] [st] [PATCH 2/3] Move tresize comments around.

2015-04-11 Thread noname
--- st.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/st.c b/st.c index 3b45c42..51bd40c 100644 --- a/st.c +++ b/st.c @@ -2780,17 +2780,16 @@ tresize(int col, int row) { return; } - /* free unneeded rows */ + /* +* sl

[dev] [st] [PATCH 1/3] tresize: move for loop outside if

2015-04-11 Thread noname
There is no need to check that slide > 0 before executing loop. If slide <= 0, loop stops immediately. --- st.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/st.c b/st.c index b4e17e4..3b45c42 100644 --- a/st.c +++ b/st.c @@ -2781,17 +2781,16 @@ tresize(int col, int

[dev] [st] [PATCH 1/2] Do not use switch for fork() call.

2015-04-11 Thread noname
--- st.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/st.c b/st.c index c48132a..df79e93 100644 --- a/st.c +++ b/st.c @@ -1257,11 +1257,10 @@ ttynew(void) { if(openpty(&m, &s, NULL, NULL, &w) < 0) die("openpty failed: %s\n", strerror(errno

[dev] [st] [PATCH 2/2] Simplify loop condition.

2015-04-11 Thread noname
--- st.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/st.c b/st.c index df79e93..28beca2 100644 --- a/st.c +++ b/st.c @@ -944,7 +944,7 @@ getsel(void) { ptr = str = xmalloc(bufsize); /* append every set & selected glyph to the selection */ - for(y = s

[dev] [st] [PATCH 1/2] Use do..while in window mapping loop.

2015-04-11 Thread noname
--- st.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/st.c b/st.c index b2bcfe9..83acd56 100644 --- a/st.c +++ b/st.c @@ -3917,17 +3917,15 @@ run(void) { long deltatime; /* Waiting for window mapping */ - while(1) { + do {

[dev] [st] [PATCH 2/2] Remove unnecessary XFilterEvent call.

2015-04-11 Thread noname
XFilterEvent usually filters KeyPress events according to input method. At this point the window is not mapped. The only events that we process are ConfigureNotify and MapNotify. They should not be filtered by input method. --- st.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/st.c b/st.c

[dev] [st] [PATCH 1/2] Use do..while in window mapping loop.

2015-04-11 Thread noname
--- st.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/st.c b/st.c index b2bcfe9..83acd56 100644 --- a/st.c +++ b/st.c @@ -3917,17 +3917,15 @@ run(void) { long deltatime; /* Waiting for window mapping */ - while(1) { + do {

Re: [dev] [st] [PATCH 2/2] Simplify window mapping loop.

2015-04-10 Thread noname
On Fri, Apr 10, 2015 at 05:41:16PM +0200, Roberto E. Vargas Caballero wrote: > > - if(XFilterEvent(&ev, None)) > > - continue; > > Why are you removing the call to XFilterEvent here? XFilterEvent usually filters KeyPress events that are hooked by input method, but at t

[dev] [st] [PATCH 2/2] Simplify window mapping loop.

2015-04-09 Thread noname
--- st.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/st.c b/st.c index a7064b1..c311164 100644 --- a/st.c +++ b/st.c @@ -3917,17 +3917,13 @@ run(void) { long deltatime; /* Waiting for window mapping */ - while(1) { + do {

[dev] [st] [PATCH 1/2] Use MAX macro where possible.

2015-04-09 Thread noname
--- st.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/st.c b/st.c index 0065240..a7064b1 100644 --- a/st.c +++ b/st.c @@ -4072,7 +4072,7 @@ main(int argc, char *argv[]) { run: setlocale(LC_CTYPE, ""); XSetLocaleModifiers(""); - tnew(cols? cols : 1, row

[dev] [st] [PATCH 3/3] Remove 'xloadfontset' function.

2015-04-08 Thread noname
It was used only once and its return value was ignored. --- st.c | 13 ++--- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/st.c b/st.c index 7dbd87a..0065240 100644 --- a/st.c +++ b/st.c @@ -419,7 +419,6 @@ static int xsetcolorname(int, const char *); static int xgeommask

[dev] [st] [PATCH 2/2] Remove keywords from function definitions.

2015-04-08 Thread noname
--- st.c | 19 +++ 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/st.c b/st.c index 6522c9d..7dbd87a 100644 --- a/st.c +++ b/st.c @@ -408,6 +408,7 @@ static void ttysend(char *, size_t); static void ttywrite(const char *, size_t); static void tstrsequence(uchar);

[dev] [PATCH 1/2] Remove variable names from function declarations.

2015-04-08 Thread noname
--- st.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/st.c b/st.c index 6d20977..6522c9d 100644 --- a/st.c +++ b/st.c @@ -359,7 +359,7 @@ static void csidump(void); static void csihandle(void); static void csiparse(void); static void csireset(void); -static int eschan

Re: [dev] [st] [PATCH] Fixed STR sequence termination condition

2015-04-06 Thread noname
On Mon, Apr 06, 2015 at 10:50:07AM +0200, Roberto E. Vargas Caballero wrote: > > ascii code may only be checked for characters that have length equal to > > 1, not width equal to 1 > > I think they are equivalent, but I like more the 'len' versin, so > I will apply it. They are not equivalent at

[dev] [st] [PATCH] Fixed STR sequence termination condition

2015-04-05 Thread noname
ascii code may only be checked for characters that have length equal to 1, not width equal to 1 --- st.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/st.c b/st.c index 39d3fee..827ed08 100644 --- a/st.c +++ b/st.c @@ -2663,7 +2663,7 @@ tputc(char *c, int len) { * ch

Re: [dev] [vis] ui separation and mainloop considerations

2015-04-05 Thread noname
On Sat, Apr 04, 2015 at 12:48:14AM +0200, Marc André Tanner wrote: > What is your opinion on libuv? Is there a better alternative I > should look into? What would you use for communication purposes? > Sending raw structs around or using something like msgpack? http://suckless.org/rocks links libev

Re: [dev] [vis] [PATCH] Fixed multiline comment regexp.

2015-04-03 Thread noname
On Fri, Apr 03, 2015 at 07:21:49PM +0200, Marc André Tanner wrote: > On Thu, Apr 02, 2015 at 02:27:31AM +0300, noname wrote: > > Support for comments without opening "/*" at the beginning of the file > > is removed because people do not normally write comments backward

[dev] [vis] [PATCH] Fixed multiline comment regexp.

2015-04-03 Thread noname
Comments like "/***/" with odd number of asterisks are handled like normal comments now. Previously they were handled like unfinished comments. --- config.def.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/config.def.h b/config.def.h index ee6d4ae..2a9e258 100644 ---

Re: [dev] [vis] [PATCH] Fixed multiline comment regexp.

2015-04-03 Thread noname
On Fri, Apr 03, 2015 at 07:21:49PM +0200, Marc André Tanner wrote: > On Thu, Apr 02, 2015 at 02:27:31AM +0300, noname wrote: > > Comments like "/***/" with odd number of asterisks are handled like > > normal comments now. Previously they were handled like unfinished >

Re: [dev] [vis] [PATCH] Fixed multiline comment regexp.

2015-04-02 Thread noname
On Thu, Apr 02, 2015 at 01:42:35AM +0200, koneu wrote: > noname wrote: > > Support for comments without opening "/*" at the beginning of the file > > is removed because people do not normally write comments backwards. > Oh look, I never knew it was possible to write

[dev] [vis] [PATCH] Fixed multiline comment regexp.

2015-04-01 Thread noname
Comments like "/***/" with odd number of asterisks are handled like normal comments now. Previously they were handled like unfinished comments. Support for comments without opening "/*" at the beginning of the file is removed because people do not normally write comments backwards. --- config.def

Re: [dev] [surf] [patch] 13 patches from my Universal Same-Origin Policy branch

2015-03-29 Thread noname
On Sun, Mar 29, 2015 at 09:58:42PM +0200, Markus Teich wrote: > even then you are still in the anonymity set of „Hey look, that guy want's to > be > anonymous, let's focus our effort on him!“. Think again. Advertisers focus on people who would click on advertisements, not the guys pretending to b

Re: [dev] [surf] [patch] 13 patches from my Universal Same-Origin Policy branch

2015-03-29 Thread noname
On Sun, Mar 29, 2015 at 09:03:49PM +0200, Antenore Gatta wrote: > On 29/03/15 17:03:25, non...@inventati.org wrote: > > How about sending no UA at all? > > > > Not sending a UA at all, makes your browser fingerprint uniq and not the other > way around. > > Probably a safer solution is to have an

Re: [dev] [surf] [patch] 13 patches from my Universal Same-Origin Policy branch

2015-03-29 Thread noname
How about sending no UA at all? If all privacy-aware browsers drop UA, that would be optimal. Drop UA in Dillo, TorBrowser, drop UA in other browsers with add-ons etc. Otherwise all privacy-aware browsers try to adjust their UA to maximize "anonymity set", they all look different and this story n

Re: [dev] [vis] buffer_alloc issues

2015-03-29 Thread noname
On Sun, Mar 29, 2015 at 03:45:50PM +0200, Silvan Jegen wrote: > Heyho! > > On Wed, Mar 25, 2015 at 07:15:08PM +, non...@inventati.org wrote: > > There are two issues with buffer_alloc function(s). > > > > First function is located in buffer.c: > > http://repo.or.cz/w/vis.git/blob/HEAD:/buffer

[dev] [vis] buffer_alloc issues

2015-03-25 Thread noname
I'm not sure if vis is supported in suckless mailing list, but as it was discussed here previously, i'm writing here. There are two issues with buffer_alloc function(s). First function is located in buffer.c: http://repo.or.cz/w/vis.git/blob/HEAD:/buffer.c The problem is on line 15: http://repo.

[dev] [sbase] [PATCH] Replace strlen with unary_n to test zero length.

2015-02-22 Thread noname
--- test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test.c b/test.c index 660048a..957b205 100644 --- a/test.c +++ b/test.c @@ -100,7 +100,7 @@ noarg(char **argv) static int onearg(char **argv) { - return strlen(argv[0]); + return unary_n(argv[0]); } s

[dev] [tabbed PATCH] Replace emallocz with ecalloc.

2014-05-24 Thread noname
--- tabbed.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tabbed.c b/tabbed.c index 2341998..ba22f9a 100644 --- a/tabbed.c +++ b/tabbed.c @@ -97,7 +97,7 @@ static void destroynotify(const XEvent *e); static void die(const char *errstr, ...); static void drawba

[dev] [st PATCH] Simplify tdeftran.

2014-04-30 Thread noname
--- st.c | 22 ++ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/st.c b/st.c index d0c4595..3f248f3 100644 --- a/st.c +++ b/st.c @@ -2305,19 +2305,17 @@ techo(char *buf, int len) { void tdeftran(char ascii) { - char c, (*bp)[2]; - static char tb

Re: [dev] [st patch queue 05/12] Consistent FALLTHROUGH comments.

2014-04-30 Thread noname
On Fri, Apr 25, 2014 at 06:21:10PM +0200, Roberto E. Vargas Caballero wrote: > It is true that it is ugly to have different styles in fall through, > but it is also true that we have a lot of fall through where we don't > put any comment. Put a comment in all these places is a very bad idea, > but

[dev] [st PATCH] Do not save cursor in tresize.

2014-04-28 Thread noname
This patch fixes the bug introduced in 8f11e1cd034ff28ca47bb4955505db7fa8016ba8 To reproduce the bug: 1. Save cursor: printf '\e[s' 2. Load cursor: printf '\e[u' 3. Resize st window. 4. Load cursor again: printf '\e[u' --- st.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git

Re: [dev] [st] Feature to replace st window by spawned x window

2014-04-28 Thread noname
On Mon, Apr 28, 2014 at 05:17:56PM -0400, Nick wrote: > Does someone with more knowledge of X11 know whether this is likely > to be readily do-able? Can you launch an arbitrary X program and say > "use this window"? I'm guessing not, but don't really know. It is impossible as each application ca

Re: [dev] [st PATCH] Simplify tputtab.

2014-04-28 Thread noname
On Mon, Apr 28, 2014 at 10:54:21AM +0200, Roberto E. Vargas Caballero wrote: > > - for(++x; x < term.col && !term.tabs[x]; ++x) > > + while(++x < term.col && !term.tabs[x]) > ... > > - for(--x; x > 0 && !term.tabs[x]; --x) > > +

  1   2   >