Fwd: [hackers] [st-orig][PATCH] Add MS Office 365 account requirement.

2022-04-01 Thread Silvan Jegen
Hi Christoph Finally I can make use my Office 365 account! Thank you for this!! One comment below. On Fri, Apr 1, 2022 at 6:46 AM Christoph Lohmann <2...@r-36.net> wrote: > > --- > [...] > > @@ -0,0 +1,27 @@ > +#!/usr/bin/env python > +# coding=utf.8 > +# > +# See st LICENSE for license details.

Re: [hackers] [dmenu|libsl][PATCH] optimize drw_text() for large strings

2022-03-19 Thread Silvan Jegen
Hi On Sat, Mar 19, 2022 at 12:59 PM Stein Gunnar Bakkeby wrote: > > Hi NRK, > > I was tinkering with this for a few hours earlier this week and there are > several issues with this area of code and not specifically related to this > modification of the patch. > > The handling of adding the elli

Re: [hackers] [libgrapheme] Mark likely branches || Laslo Hunhold

2022-01-04 Thread Silvan Jegen
NRK wrote: > On Wed, Jan 05, 2022 at 01:56:26AM +0600, NRK wrote: > > Just curious, why not use: > > > > #if defined(__has_builtin) && __has_builtin(__builtin_expect) > > #define likely(expr) __builtin_expect(!!(expr), 1) > > #define unlikely(expr) __builtin_expect(!!(expr), 0) > > #else

Re: [hackers] [libgrapheme] Refactor libgrapheme.7 || Laslo Hunhold

2020-10-13 Thread Silvan Jegen
Dear Laslo Laslo Hunhold wrote: > On Sat, 10 Oct 2020 22:47:01 +0200 > "Silvan Jegen" wrote: > > Dear Silvan, > > > I think libgrapheme is a very good idea! I have just one comment > > below. > > thanks for taking your time to review this commit

Re: [hackers] [libgrapheme] Refactor libgrapheme.7 || Laslo Hunhold

2020-10-10 Thread Silvan Jegen
Hi Laslo I think libgrapheme is a very good idea! I have just one comment below. g...@suckless.org wrote: > commit 51eca9eff65def13d1370e32dad2988731d38e7d > Author: Laslo Hunhold > AuthorDate: Sat Oct 10 18:56:47 2020 +0200 > Commit: Laslo Hunhold > CommitDate: Sat Oct 10 18:56:47 2020

Re: [hackers] sfakeroot (announce?)

2020-10-01 Thread Silvan Jegen
Hi Richard Richard Ipsum wrote: > For a while I've been writing some tests which cover basic POSIX util > functionality, these tests have been quite useful in helping me find > bugs in sbase and other implementations. Recently though I wrote some Those tests sound interesting! Are they publicly

Re: [hackers] Announcing libschrift (a TrueType font rendering library)

2020-04-25 Thread Silvan Jegen
Michael Forney wrote: > On 2020-04-24, Silvan Jegen wrote: > > Yeah, that's where my missing understanding of graphics programming > > becomes apparent. I assumed a font rendering library will just take a > > pointer to some memory as an argument to its rendering fun

Re: [hackers] Announcing libschrift (a TrueType font rendering library)

2020-04-24 Thread Silvan Jegen
Hi Michael Thanks for your input! Michael Forney wrote: > On 2020-04-23, Silvan Jegen wrote: > > I had a quick look and currently it looks like it's mostly useful for > > rendering of fonts in X. I wonder how an interface would look like that > > could also be use

Re: [hackers] Announcing libschrift (a TrueType font rendering library)

2020-04-23 Thread Silvan Jegen
Hi Thomas Thomas Oltmann wrote: > Last year at slcon6, I demo'd a toy TrueType font renderer (*) to a > couple people. > Someone there suggested it'd be really useful to have this as a proper > library for suckless projects to use, > and so after a complete rework to make it actually usable, I'm

Re: [hackers] [st] [PATCH] Work around BadLength error by disallowing color fonts

2019-04-23 Thread Silvan Jegen
Hi Laslo Thanks for giving this a shot! A comment below. Laslo Hunhold wrote: > Dear fellow hackers, > > this patch will hopefully resolve the many mails we get on dev@ and > hackers@ regarding crashes of st due to emoji-fonts triggering some > voodoo-condition in Xft. > > I hope my port of A

Re: [hackers] [dmenu] fix crash when XOpenIM returns NULL || Hiltjo Posthuma

2019-02-12 Thread Silvan Jegen
Hi Anselm [2019-02-12 11:32] Anselm Garbe > This is so ugly. People should learn English instead of using > antiquated text input methods ;) I also think this code is very ugly and should be simplified like in the patches that have been sent before for this issue. Something like (untested): + /

Re: [hackers] [dmenu][PATCH] Replace dmenu_run shell with executed application

2019-02-10 Thread Silvan Jegen
On February 9, 2019 7:48:34 PM GMT+00:00, Nick wrote: >Quoth Hiltjo Posthuma: >> On Sat, Feb 09, 2019 at 01:48:34PM +0100, Jan Bessai wrote: >> > On Sun, Dec 30, 2018 at 02:59:13PM +0100, Jan Bessai wrote: >> > > Thanks! I've attached the updated patch below. >> > >> > Sorry if I'm breaching

Re: [hackers] [libsl][PATCH] Workaround Xft BadLength X error

2019-01-18 Thread Silvan Jegen
Hi Thanks for the patch! [2019-01-16 21:51] Thomas Spurden > Modify the fontconfig pattern to prefer non-color fonts, and discard any > selected font which has the color flag set. Using these fonts with Xft is just > going to generate a BadLength X error. > > --- > drw.c | 14 ++ >

Re: [hackers] [st][PATCH] separate blinking timer from drawing in run()

2019-01-02 Thread Silvan Jegen
Hi [2019-01-02 02:50] kais euchi > This article [?] made me wonder how to improve latency in st, and i > thought i would share this small modification for a non-blinking setup. > When blinktimeout is set to 0, it reduces latency by ca. 5ms [?] by avoiding > useless delay calculation making it al

Re: [hackers] [dmenu][PATCH] Replace dmenu_run shell with executed application

2018-12-30 Thread Silvan Jegen
Hi [2018-12-30 13:41] Jan Bessai > > Currently dmenu_run spawns a subshell and keeps running for each process > it executes. Over time this litters up the process list with useless > instances of dmenu_run, which do nothing but wait for their child to > exit. The patch below replaces the dmenu_ru

[hackers][sbase][PATCH] readme: add mention of a seperate testing repo

2018-12-16 Thread Silvan Jegen
--- The original subject was "[hackers][sbase][PATCH v3] testing: add first shell-based tests" I put the testing code into a seperate repo and just added a blurp about it to the README. Let me know if this works for you. Currently the code is hosted on my own server but we could also change that

[hackers][sbase][PATCH v3] testing: add first shell-based tests

2018-10-15 Thread Silvan Jegen
We add some shell helper functions to test the expected output of sbase tools. In addition to the helper functions themselves we add some tests for 'dirname'. --- Changes compared to v2: * use a glob instead of a subshell Changes compared to v1: * use "ls" instead of "find" in subshell * return n

Re: [hackers][sbase][PATCH v2] testing: add first shell-based tests

2018-10-07 Thread Silvan Jegen
[2018-10-07 09:47] Evan Gates > On Sun, Oct 7, 2018 at 6:38 AM Silvan Jegen wrote: > > * use "ls" instead of "find" in subshell > > Don't do that. Use globs. > https://mywiki.wooledge.org/ParsingLs Looks like my version has issues with spaces in filenames then. I will fix it. Cheers, Silvan

[hackers][sbase][PATCH v2] testing: add first shell-based tests

2018-10-07 Thread Silvan Jegen
We add some shell helper functions to test the expected output of sbase tools. In addition to the helper functions themselves we add some tests for 'dirname'. --- Changes compared to v1: * use "ls" instead of "find" in subshell * return number of failed tests in "runalltests" script * use lowerca

Re: [hackers][sbase][PATCH] testing: add first shell-based tests

2018-09-26 Thread Silvan Jegen
Hi Michael Thanks for having a look! [2018-09-24 12:41] Michael Forney > > Hi Silvan, > > On 2018-09-09, Silvan Jegen wrote: > > We add some shell helper functions to test the expected output of sbase > > tools. In addition to the helper functions themselves we add som

Re: [hackers] [st][patch] Increase the buffer size for escape sequences

2018-09-25 Thread Silvan Jegen
On Tue, Sep 25, 2018 at 10:05 AM Roberto E. Vargas Caballero wrote: > On Mon, Sep 24, 2018 at 05:45:29PM -0700, Eric Pruitt wrote: > > I agree that the current buffer is too small. I'm pretty sure I've run > > into this problem myself with Vim and Bash, but I hadn't gotten around > > to digging in

Re: [hackers] [PATCH][sbase] find: fix flag setting

2018-09-24 Thread Silvan Jegen
On Mon, Sep 24, 2018 at 10:03 PM Michael Forney wrote: > On 7/8/18, Silvan Jegen wrote: > > Heyho > > > > Found this when running smatch on sbase. > > The current code is correct. -H should turn on gflags.h, and turn off > gflags.l. POSIX says each flag should ov

[hackers][sbase][PATCH] testing: add first shell-based tests

2018-09-09 Thread Silvan Jegen
We add some shell helper functions to test the expected output of sbase tools. In addition to the helper functions themselves we add some tests for 'dirname'. --- Hi I fixed some of the issues pointed out by Mattias and made the tests runnable from the Makefile. Let me know if there is a chance t

Re: [hackers] [sbase][PATCH v2] Add tests for some utilities

2018-08-03 Thread Silvan Jegen
Hi Roberto On Fri, Aug 3, 2018 at 8:32 AM, Roberto E. Vargas Caballero wrote: > On Wed, Aug 01, 2018 at 04:36:35PM +0200, Silvan Jegen wrote: >> I definitely think we should have unit tests for sbase (and other >> projects?) as soon as possible. What concerns me with your approac

Re: [hackers] [sbase][PATCH v2] Add tests for some utilities

2018-08-03 Thread Silvan Jegen
Hi Roberto On Fri, Aug 3, 2018 at 8:37 AM, Roberto E. Vargas Caballero wrote: > Hi, > > On Wed, Aug 01, 2018 at 09:16:26PM +0200, Silvan Jegen wrote: >> > * `echo` is unportable and `printf` should be used instead. >> >> Didn't know that echo was not port

Re: [hackers] [sbase][PATCH v2] Add tests for some utilities

2018-08-01 Thread Silvan Jegen
On Wed, Aug 01, 2018 at 10:12:54PM +0200, Mattias Andrée wrote: > On Wed, 1 Aug 2018 22:07:33 +0200 > Mattias Andrée wrote: > > [...] > > > On Wed, 1 Aug 2018 21:16:26 +0200 > > Silvan Jegen wrote: > > > > > On Wed, Aug 01, 2018 at 07:53:18PM +0200,

Re: [hackers] [sbase][PATCH v2] Add tests for some utilities

2018-08-01 Thread Silvan Jegen
On Wed, Aug 01, 2018 at 10:07:33PM +0200, Mattias Andrée wrote: > On Wed, 1 Aug 2018 21:16:26 +0200 > Silvan Jegen wrote: > > [...] > > > On Wed, Aug 01, 2018 at 07:53:18PM +0200, Mattias Andrée wrote: > > > Thank you for your time! > > > * uname: &g

Re: [hackers] [sbase][PATCH v2] Add tests for some utilities

2018-08-01 Thread Silvan Jegen
On Wed, Aug 01, 2018 at 07:53:18PM +0200, Mattias Andrée wrote: > Thank you for your time! Thank you for all your work! :P > The common code is 590 lines of code, including: > > * 102 lines of code related to identifying the error when the > test fails. > > * 14 lines of code for properly ki

Re: [hackers] [sbase][PATCH v2] Add tests for some utilities

2018-08-01 Thread Silvan Jegen
Hi Mattias! On Wed, Jul 11, 2018 at 09:39:23PM +0200, Mattias Andrée wrote: > The following utilities are tested: > - basename(1) > - dirname(1) > - echo(1) > - false(1) > - link(1) > - printenv(1) > - sleep(1) > - test(1) > - time(1) > - true(1) > - tty(1) > - uname(1) > - unexpand(1) > - unlink(

[hackers] [PATCH][sbase] find: fix flag setting

2018-07-08 Thread Silvan Jegen
Heyho Found this when running smatch on sbase. Cheers, Silvan From: Silvan Jegen Date: Sun, 8 Jul 2018 14:42:55 +0200 Subject: [PATCH][sbase] find: fix flag setting Most likely, this is what was intended. --- find.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a

Re: [hackers] [sbase][PATCH] Add test framework with a test for tty(1)

2018-07-08 Thread Silvan Jegen
Hi Mattias Just some comments below (please ignore the mangled formatting.) On Sat, Jul 7, 2018 at 11:26 PM, Mattias Andrée wrote: > Signed-off-by: Mattias Andrée > --- > Makefile | 20 +- > test-common.c | 823 > ++ > test-common.

Re: [hackers] [sbase][PATCH] basename: support --

2018-07-07 Thread Silvan Jegen
On Fri, Jul 6, 2018 at 11:19 PM, Mattias Andrée wrote: > POSIX-2017 clarifies that -- and normal option parsing must be supported. > See EXAMPLES in basename(1p). > > Signed-off-by: Mattias Andrée > --- > basename.c | 5 - > 1 file changed, 4 insertions(+), 1 deletion(-) Looks good! I also

Re: [hackers] [sbase][PATCH] dirname: support --

2018-07-07 Thread Silvan Jegen
On Fri, Jul 6, 2018 at 11:19 PM, Mattias Andrée wrote: > POSIX-2017 clarifies that -- and normal option parsing must be supported. > See EXAMPLES in basename(1p) > > Signed-off-by: Mattias Andrée > --- > dirname.c | 5 - > 1 file changed, 4 insertions(+), 1 deletion(-) Looks good! I also t

Re: [hackers] [st][PATCH] Set minimum window size to avoid crash when resizing out of bounds

2018-05-17 Thread Silvan Jegen
Hi Thanks for the patch! Some comments below. On Wed, May 16, 2018 at 10:36 PM wrote: > From: Michael Buch > The termianl window is created without lower/upper bounds for window width/height. On resizing the terminal to a size of 1x1 or below we crash. This patch sets the minimum window heig

Re: [hackers] Re: [st][PATCH] Port the copyurl patch to the 0.8.1 st release. Mainly fix usage of depracted selcopy

2018-04-18 Thread Silvan Jegen
Hi On Wed, Apr 18, 2018 at 3:04 AM, Michael Buch wrote: > Apologies, just realized I should've added it to the Wiki patches section > instead of sending it here. Sending it here for review at the same time as you add it to the patches section seems like the right thing to do. Cheers, Silvan

Re: [hackers] [PATCH] [dwm] Make unset property fallback strings configurable

2018-04-04 Thread Silvan Jegen
On Tue, Apr 3, 2018 at 11:07 PM, Eric Pruitt wrote: > On Tue, Apr 03, 2018 at 07:55:53PM +0200, Silvan Jegen wrote: >> I tried the attached patch and it didn't work either. After creating >> a patch in this repo myself (and googling the error) I realized that >> you

Re: [hackers] [PATCH] [dwm] Make unset property fallback strings configurable

2018-04-03 Thread Silvan Jegen
Hi Eric On Mon, Apr 02, 2018 at 08:59:57PM -0700, Eric Pruitt wrote: > On Mon, Apr 02, 2018 at 11:10:42AM +0200, Silvan Jegen wrote: > > error: git diff header lacks filename information when removing 1 > > leading pathname component (line 5) > > Please try the attache

Re: [hackers] [PATCH] [dwm] Make unset property fallback strings configurable

2018-04-02 Thread Silvan Jegen
Hi On Sun, Apr 01, 2018 at 02:45:23PM -0700, Eric Pruitt wrote: > > Since the default rule matching does substring comparisons, using the > fixed string "broken" as a fallback value can complicate or make > unambiguous matching impossible, so this change makes various fallback > strings for unset

Re: [hackers] [dwm][PATCH] ColBorder has been moved to the enum with ColFg and ColBg.

2018-03-16 Thread Silvan Jegen
Dear Laslo On Thu, Mar 15, 2018 at 10:39 PM, Laslo Hunhold wrote: > On Thu, 15 Mar 2018 22:17:25 +0100 > Silvan Jegen wrote: > > Dear Silvan, > >> I see, thanks! >> >> Still sounds to me like having patches as attachments just causes me >> to have to

Re: [hackers] [dwm][PATCH] ColBorder has been moved to the enum with ColFg and ColBg.

2018-03-16 Thread Silvan Jegen
On Thu, Mar 15, 2018 at 10:38 PM, Eric Pruitt wrote: > On Thu, Mar 15, 2018 at 10:17:25PM +0100, Silvan Jegen wrote: >> Still sounds to me like having patches as attachments just causes me to >> have to change my default configuration though. > > Change the world or change yo

Re: [hackers] [dwm][PATCH] ColBorder has been moved to the enum with ColFg and ColBg.

2018-03-15 Thread Silvan Jegen
On Thu, Mar 15, 2018 at 12:51:38PM -0700, Eric Pruitt wrote: > On Thu, Mar 15, 2018 at 08:44:02PM +0100, Silvan Jegen wrote: > > Ah, I wasn't aware that the tags also work on attachments, neat. Thanks > > for the tip! > > > > That means both are equally conveni

Re: [hackers] [dwm][PATCH] ColBorder has been moved to the enum with ColFg and ColBg.

2018-03-15 Thread Silvan Jegen
On Thu, Mar 15, 2018 at 12:35:07PM -0700, Eric Pruitt wrote: > On Thu, Mar 15, 2018 at 08:28:26PM +0100, Silvan Jegen wrote: > > > That depends on what email client you use. Mutt makes piping both whole > > > messages and individual attachments to arbitrary commands pret

Re: [hackers] [dwm][PATCH] ColBorder has been moved to the enum with ColFg and ColBg.

2018-03-15 Thread Silvan Jegen
On Thu, Mar 15, 2018 at 09:53:41AM -0700, Eric Pruitt wrote: > On Thu, Mar 15, 2018 at 05:11:10PM +0100, Silvan Jegen wrote: > > The disadvantage of this is that you will have to save those > > attachments somewhere and then apply them. When using "git send-email" > &g

Re: [hackers] [dwm][PATCH] ColBorder has been moved to the enum with ColFg and ColBg.

2018-03-15 Thread Silvan Jegen
On Thu, Mar 15, 2018 at 4:28 PM, Laslo Hunhold wrote: > On Wed, 14 Mar 2018 13:24:53 -0400 > Christopher Drelich wrote: > > Hey Christopher, > >> Ok, so that is an absolute requirement then, and the only issue? Was >> doing the patching in a very unconfigured chroot environment on a >> temporary

Re: [hackers] [dwm][PATCH] ColBorder has been moved to the enum with ColFg and ColBg.

2018-03-15 Thread Silvan Jegen
t > functionality is available as a patch already (I'm guessing though something > about it doesn't conform to mainstream dwm?) > Chris > > On Wed, Mar 14, 2018 at 1:19 PM, Silvan Jegen wrote: >> >> Hi >> >> On Wed, Mar 14, 2018 at 5:58 PM, Christophe

Re: [hackers] [dwm][PATCH] ColBorder has been moved to the enum with ColFg and ColBg.

2018-03-14 Thread Silvan Jegen
Hi On Wed, Mar 14, 2018 at 5:58 PM, Christopher Drelich wrote: > Any idea what I might have done wrong in creating the patch? I figure > learning now will save us all time in the future. > > I followed the instructions on the website and used a fresh pull of dwm. > Looking at what's in git, it se

Re: [hackers] issues with 6.1 and single_taglist

2018-02-09 Thread Silvan Jegen
Hi Since there is no patch attached this should probably go to the dev@ mailing list. On Fri, Feb 9, 2018 at 12:22 AM, Allan Lindsay wrote: > downloaded stock 6.1. same rejection problem - in each case, the last chunk. > looked at the two diffs offered by the 'clean_patches' github, same problem

Re: [hackers] [lsw][patch] Better handling of window title with non-ascii chars

2017-11-24 Thread Silvan Jegen
On Fri, Nov 24, 2017 at 12:35 PM, Hiltjo Posthuma wrote: > On Wed, Nov 22, 2017 at 10:47:39PM +0100, Julien Steinhauser wrote: >> Hello >> >> I've seen window title with non-ascii chars incorrectly displayed, >> using Xutf8TextPropertyToTextList instead of XmbTextPropertyToTextList >> as in the di

Re: [hackers] [lsw][patch] Better handling of window title with non-ascii chars

2017-11-24 Thread Silvan Jegen
Hi On Wed, Nov 22, 2017 at 10:47 PM, Julien Steinhauser wrote: > I've seen window title with non-ascii chars incorrectly displayed, > using Xutf8TextPropertyToTextList instead of XmbTextPropertyToTextList > as in the diff below fixed it. We do not seem to be using locale.h and its setlocale func

Re: [hackers] [sbase][PATCH] patch: improvments suggested by Silvan

2017-09-24 Thread Silvan Jegen
Hi Mattias On Sun, Sep 24, 2017 at 8:20 PM, Mattias Andrée wrote: > On Sun, 24 Sep 2017 11:12:35 -0700 > Michael Forney wrote: > >> Hi Mattias, >> >> Instead of sending these patches on top of your original patch, can >> you send amended versions (v2, v3, etc)? You can use `git format-patch >> -

Re: [hackers] [PATCH][sbase] Add patch(1)

2017-09-24 Thread Silvan Jegen
On Sun, Sep 24, 2017 at 8:57 PM, Mattias Andrée wrote: > On Sun, 24 Sep 2017 19:24:10 +0200 > Silvan Jegen wrote: > >> Heyho >> >> On Sun, Sep 24, 2017 at 06:28:57PM +0200, Mattias Andrée wrote: >> > On Sun, 24 Sep 2017 14:08:41 +0200 >> > Silvan Jege

Re: [hackers] [PATCH][sbase] Add patch(1)

2017-09-24 Thread Silvan Jegen
Heyho On Sun, Sep 24, 2017 at 06:28:57PM +0200, Mattias Andrée wrote: > On Sun, 24 Sep 2017 14:08:41 +0200 > Silvan Jegen wrote: > > > Heyho Mattias! > > > > I had a look at the patch. It's a lot of code (still only about 1/3 of > > GNU's patch si

Re: [hackers] [PATCH][sbase] Add patch(1)

2017-09-24 Thread Silvan Jegen
Heyho Mattias! I had a look at the patch. It's a lot of code (still only about 1/3 of GNU's patch size though) and it was rather hard for me to follow so more review should be done. Find my comments below. On Sun, Sep 03, 2017 at 07:13:20PM +0200, Mattias Andrée wrote: > Signed-off-by: Mattias An

Re: [hackers] [PATCH][sbase] Add patch(1)

2017-09-11 Thread Silvan Jegen
On Mon, Sep 11, 2017 at 08:57:02PM +0200, Mattias Andrée wrote: > On Mon, 11 Sep 2017 20:09:33 +0200 > Silvan Jegen wrote: > > >> +when comparing directories. If however, the > > > > There should probably be an additional comma like this: > > > &g

Re: [hackers] [PATCH][sbase] Add patch(1)

2017-09-11 Thread Silvan Jegen
Hi Mattias! Thanks for (the) patch! :P Some comments below. For now I only managed to look at whitespace issues in the patch and suggest some corrections for spelling/grammar issues in the man page text. I hope to get around looking at the code in the near future. On Sun, Sep 03, 2017 at 07:13:2

Re: [hackers] [PATCH][sbase] tar: use bigger buffer size to increase performance

2017-09-10 Thread Silvan Jegen
Hi On Sat, Sep 09, 2017 at 10:29:21AM -0700, Michael Forney wrote: > On Sat, Sep 9, 2017 at 2:08 AM, Silvan Jegen wrote: > > From: Jim Beveridge > > > > The original code is by Jim Beveridge working on Fuchsia. I merged it > > with slight changes. > &

Re: [hackers] [PATCH][sbase] tar: use bigger buffer size to increase performance

2017-09-10 Thread Silvan Jegen
Hi Hiltjo Thanks for the review! On Sat, Sep 09, 2017 at 01:06:21PM +0200, Hiltjo Posthuma wrote: > On Sat, Sep 09, 2017 at 11:08:42AM +0200, Silvan Jegen wrote: > > From: Jim Beveridge > > > > The original code is by Jim Beveridge working on Fuchsia. I merged it &g

[hackers] [PATCH][sbase] tar: use bigger buffer size to increase performance

2017-09-09 Thread Silvan Jegen
From: Jim Beveridge The original code is by Jim Beveridge working on Fuchsia. I merged it with slight changes. Time to tar two 1GB files: Before patch: real0m6.428s user0m0.245s sys 0m4.881s real0m6.454s user0m0.239s sys 0m4.883s real0m6.515s user0m0.259s sys

Re: [hackers] [sbase] libutil/cp.c leaks

2017-05-07 Thread Silvan Jegen
Heyho On Sun, May 07, 2017 at 01:54:42PM +0200, Hiltjo Posthuma wrote: > I think there are some cases where libutil/cp.c can leak file descriptors. > It is a warning case, but the descriptors are not closed. > > I think only `mv` is affected. > > Patch below: > > > From af392d1a764d7420c7b05bb

Re: [hackers] [dwm] [PATCH 2/3] Button passthrough when client is not focused

2017-01-10 Thread Silvan Jegen
Hi Markus >From what I understand, in case that the client does not have focus already, with this patch we call XGrabButton twice compared to before the patch. I assume that corresponds to the advertised functionality. One more comment below. On Sat, Jan 07, 2017 at 05:21:29PM +0100, Markus Teic

Re: [hackers] [dwm] [PATCH 1/3] cleanup

2017-01-10 Thread Silvan Jegen
Hi Markus On Sat, Jan 07, 2017 at 05:21:28PM +0100, Markus Teich wrote: > - unify multi-line expression alignment style. > - unify multi-line function call alignment style. > - simplify client moving on monitor count decrease. > - clarify comment for focusin(). > - remove old confusing comment abo

Re: [hackers] [PATCH] simplify client moving on monitor count decrease

2017-01-10 Thread Silvan Jegen
Hi Markus On Wed, Jan 04, 2017 at 06:05:33PM +0100, Markus Teich wrote: > --- > dwm.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) Looks good to me. I have tested this patch yesterday and today in daily use and haven't found any issues on my 2-monitor setup (yet). Cheers, Silvan

Re: [hackers] [sbase] [PATCH 1/5] Remove st != NULL checks from recursor functions

2017-01-10 Thread Silvan Jegen
Hi Laslo On Tue, Dec 27, 2016 at 02:59:56PM +0100, Laslo Hunhold wrote: > On Wed, 14 Dec 2016 19:40:02 -0800 > Michael Forney wrote: > > Hey Michael, > > > In the description of 3111908b034c73673a2f079b2b13a88c18379baa, it > > says that the functions must be able to handle st being NULL, but >

Re: [hackers] [sbase] [PATCH 5/5] mkdir: Fix created directory permissions

2016-12-15 Thread Silvan Jegen
Hi On Thu, Dec 15, 2016 at 4:40 AM, Michael Forney wrote: > Previously, with -p, the specified directory and all of its parents > would be 0777&~filemask (regardless of the -m flag). POSIX says parent > directories must created as (0300|~filemask)&0777, and of course if -m > is set, the specified

Re: [hackers] [sbase] [PATCH 04/10] Don't use buffered IO (fread) when not appropriate

2016-12-06 Thread Silvan Jegen
Hi Laslo On Tue, Dec 6, 2016 at 12:51 PM, Laslo Hunhold wrote: > On Tue, 6 Dec 2016 10:26:22 +0100 > Silvan Jegen wrote: >> It only compiled for me because "util.h" includes stdio.h so the >> definitions are included already. We can still remove this include

Re: [hackers] [sbase] [PATCH 04/10] Don't use buffered IO (fread) when not appropriate

2016-12-06 Thread Silvan Jegen
On Tue, Dec 6, 2016 at 9:17 AM, Michael Forney wrote: > On Mon, Dec 5, 2016 at 12:15 PM, Silvan Jegen wrote: >> Hi >> >> Some comments below. >> >> On Sun, Dec 04, 2016 at 09:55:06PM -0800, Michael Forney wrote: >>> diff --git a/cksum.c b/cksum.c &

Re: [hackers] [sbase] [PATCH 02/10] od: Fix buffer overflow if -N flag is larger than BUFSIZ

2016-12-06 Thread Silvan Jegen
On Tue, Dec 6, 2016 at 9:08 AM, Michael Forney wrote: > On Mon, Dec 5, 2016 at 4:47 AM, Silvan Jegen wrote: >> From what I understand, max is an off_t which is signed and set to -1 >> (if not changed by a command line flag). If we cast this to the >> unsigned size_t we get

Re: [hackers] [sbase] [PATCH 07/10] concat: Use plain read/write instead of buffered stdio

2016-12-05 Thread Silvan Jegen
On Sun, Dec 04, 2016 at 09:55:09PM -0800, Michael Forney wrote: > If we are just copying data from one file to another, we don't need to > fill a complete buffer, just read a chunk at a time, and write it to the > output. > --- > cat.c| 34 ++ > libutil/

Re: [hackers] [sbase] [PATCH 04/10] Don't use buffered IO (fread) when not appropriate

2016-12-05 Thread Silvan Jegen
Hi Some comments below. On Sun, Dec 04, 2016 at 09:55:06PM -0800, Michael Forney wrote: > fread reads the entire requested size (BUFSIZ), which causes tools to > block if only small amounts of data are available at a time. At best, > this causes unnecessary copies and inefficiency, at worst, tool

Re: [hackers] [sbase] [PATCH 10/10] cp: Check result of utimensat

2016-12-05 Thread Silvan Jegen
On Mon, Dec 5, 2016 at 6:55 AM, Michael Forney wrote: > POSIX says that if duplicating the modification/access times fails, then > an error should be written to stderr. > --- > libutil/cp.c | 6 -- > 1 file changed, 4 insertions(+), 2 deletions(-) LGTM > diff --git a/libutil/cp.c b/libutil/

Re: [hackers] [sbase] [PATCH 06/10] xinstall: Check result of fchmod

2016-12-05 Thread Silvan Jegen
On Mon, Dec 5, 2016 at 6:55 AM, Michael Forney wrote: > --- > xinstall.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) LGTM > diff --git a/xinstall.c b/xinstall.c > index bf921fb..5a0e390 100644 > --- a/xinstall.c > +++ b/xinstall.c > @@ -119,7 +119,8 @@ install(const char *s1, cons

Re: [hackers] [sbase] [PATCH 03/10] libutil: Add writeall utility function

2016-12-05 Thread Silvan Jegen
On Mon, Dec 5, 2016 at 6:55 AM, Michael Forney wrote: > writeall makes successive write calls to write an entire buffer to the > output file descriptor. It returns the number of bytes written, or -1 on > the first error. > --- > Makefile | 3 ++- > libutil/writeall.c | 21 +

Re: [hackers] [dwm] applied Ivan Delalande's NET_SUPPORTING_WM_CHECK patch for gtk3 compatibility || Anselm R Garbe

2016-12-05 Thread Silvan Jegen
On Mon, Dec 5, 2016 at 1:45 PM, Markus Teich wrote: > Anselm R Garbe wrote: >> I agree, but my MUA couldn't detect a proper attachment. > > Heyho Anselm, > > `git am` also works with the whole source-text of a mail. For example with > mutt > you can create a local patches.mbox maildir on your fil

Re: [hackers] [sbase] [PATCH 02/10] od: Fix buffer overflow if -N flag is larger than BUFSIZ

2016-12-05 Thread Silvan Jegen
Hi On Mon, Dec 5, 2016 at 6:55 AM, Michael Forney wrote: > Previously, if max was specified, od will call read with that size, > potentially overflowing buf with data read from the file. > --- > od.c | 11 +-- > 1 file changed, 5 insertions(+), 6 deletions(-) > > diff --git a/od.c b/od.c

Re: [hackers] [sbase] [PATCH 01/10] crypt: Add some missing error checks for cryptsum

2016-12-05 Thread Silvan Jegen
Hi And thanks for the patches! Comments below. On Mon, Dec 5, 2016 at 6:55 AM, Michael Forney wrote: > Previously, if a file failed to read in a checksum list, it would be > reported as not matched rather than a read failure. > > Also, if reading from stdin failed, previously a bogus checksum w

Re: [hackers] [sinit] [PATCH] Use switch for fork()

2016-09-23 Thread Silvan Jegen
On Fri, Sep 23, 2016 at 9:48 AM, FRIGN wrote: > To be precise, I think this can be considered the first patch of this > year's slcon3 hacking sessions. ;) Haha, so early... I will be arriving around 21h tonight. I assume that there will be more time for coding on Sunday as well! Cheers, Silva

Re: [hackers] [dmenu] [PATCH] Fix prefix match is treated as exact match

2016-08-21 Thread Silvan Jegen
Hi On Sun, Aug 21, 2016 at 01:35:34PM +0200, Hiltjo Posthuma wrote: > On Sat, Aug 20, 2016 at 11:26:50PM +0200, David Dufberg Tøttrup wrote: > > > > From 10e65f4f8c1016ce90d6e0d159c78ca642d4bba3 Mon Sep 17 00:00:00 2001 > > From: =?UTF-8?q?David=20Dufberg=20T=C3=B8ttrup?= > > Date: Sat, 20 Aug 2

Re: [hackers][vis][RFC][PATCH 0/2] Suggestion for basic autocomplete functionality

2016-05-18 Thread Silvan Jegen
Hi Marc On Wed, May 18, 2016 at 08:10:44PM +0200, Marc André Tanner wrote: > After some refactoring the functionality of your patches should now be > merged, thanks! It should now also work with slmenu, I guess you only Nice! > used it with dmenu? I only tested it with dmenu because I assumed

[hackers][vis][RFC][PATCH 2/2 v2] Add autocompletion for file names

2016-05-17 Thread Silvan Jegen
We use the new infrastructure for autocompletion to implement autocompletion of file names within the working directory of vis. --- v2 changes: - pass empty Filerange config.def.h | 1 + main.c | 19 +++ 2 files changed, 20 insertions(+) diff --git a/config.def.h b

[hackers][vis][RFC][PATCH 1/2 v2] Add autocompletion for current file contents

2016-05-17 Thread Silvan Jegen
We add some infrastructure in order to run a shell command and get its output which we then can insert into vis. This infrastructure we use to execute a shell command which sends all unique words of the current file to dmenu. The word selected in dmenu is then inserted into vis at all cursor posit

[hackers][vis][RFC][PATCH 1/2] Add autocompletion for current file contents

2016-05-16 Thread Silvan Jegen
We add some infrastructure in order to run a shell command and get its output which we then can insert into vis. This infrastructure we use to execute a shell command which sends all unique words of the current file to dmenu. The word selected in dmenu is then inserted into vis at all cursor posit

[hackers][vis][RFC][PATCH 2/2] Add autocompletion for file names

2016-05-16 Thread Silvan Jegen
We use the new infrastructure for autocompletion to implement autocompletion of file names within the working directory of vis. --- config.def.h | 1 + main.c | 20 2 files changed, 21 insertions(+) diff --git a/config.def.h b/config.def.h index 9e52102..5219d00 100644

[hackers][vis][RFC][PATCH 0/2] Suggestion for basic autocomplete functionality

2016-05-16 Thread Silvan Jegen
d for inclusion or not. Let me know what you think. Cheers, Silvan [0] https://github.com/nsf/gocode Silvan Jegen (2): Add autocompletion for current file contents Add autocompletion for file names config.def.h | 2 + main.c

Re: [hackers] [scc] Implement proper #pragma support || sin

2016-05-12 Thread Silvan Jegen
On Thu, May 12, 2016 at 11:45:45AM -0700, Menche wrote: > wat Haha, I compiled and ran it and it's thing of beauty!

Re: [hackers][vis][PATCH] Handle quote matching in its own function

2016-02-15 Thread Silvan Jegen
On Mon, Feb 15, 2016 at 05:50:12PM +0100, Marc André Tanner wrote: > On Mon, Feb 15, 2016 at 04:01:48PM +0100, Silvan Jegen wrote: > > [...] > > What would be more interesting is to add a way to define motions and > text objects in Lua. Integration with the LPeg based lexer

[hackers][vis][PATCH] Handle quote matching in its own function

2016-02-15 Thread Silvan Jegen
Unlike other paired characters neither of the quote types allow for the search for the closing occurrence to be optimised because there is no directionality implied. This means theoretically we always have to start from the beginning of a file to check whether all the quotes until the occurrence of

Re: [hackers][vis][PATCH] Implement a first version of the 'gf' family of commands

2016-02-14 Thread Silvan Jegen
Heyho! On Sat, Feb 13, 2016 at 02:16:37PM +0100, Marc André Tanner wrote: > On Mon, Feb 08, 2016 at 11:02:03AM +0100, Silvan Jegen wrote: > > I assume you mean that you're not sure if this functionality should go > > in at all? > > Yes vis is becoming bloated ;-) Anyway

Re: [hackers][vis][PATCH] Implement a first version of the 'gf' family of commands

2016-02-08 Thread Silvan Jegen
not mention it. > From b02aff69f90ffb5fe214d10e11386cadab2df55c Mon Sep 17 00:00:00 2001 > From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= > Date: Sun, 7 Feb 2016 16:07:44 +0100 > Subject: [PATCH 2/2] vis: implement gf and gf to open filename under > cursor > > Based on a pa

Re: [hackers][vis][PATCH] Implement a first version of the 'gf' family of commands

2016-02-03 Thread Silvan Jegen
On Tue, Feb 2, 2016 at 11:18 PM, Marc André Tanner wrote: > On Mon, Feb 01, 2016 at 09:55:32PM +0100, Silvan Jegen wrote: >> There are still a lot of rough edges. We don't change the jumplist for >> example, which means that we won't be able to jump back to the old >

[hackers][vis][PATCH] Implement a first version of the 'gf' family of commands

2016-02-01 Thread Silvan Jegen
There are still a lot of rough edges. We don't change the jumplist for example, which means that we won't be able to jump back to the old file. We also don't check the file paths we want to open. If a path element of a file we open with one of the implemented commands does not exist before using th

[hackers][vis][PATCH] Don't use an offset of 1 for the 'L' command by default

2016-01-17 Thread Silvan Jegen
--- This was the easiest way to fix this that I could think of (without duplicating most of the 'return' line). vis-motions.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vis-motions.c b/vis-motions.c index 9bd95b9..f00d525 100644 --- a/vis-motions.c +++ b/vis-motions.

[hackers][vis][PATCH] Don't use an offset of 1 for the 'L' command by default

2016-01-17 Thread Silvan Jegen
--- This was the easiest way to fix this that I could think of (without duplicating most of the 'return' line). vis-motions.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vis-motions.c b/vis-motions.c index 9bd95b9..f00d525 100644 --- a/vis-motions.c +++ b/vis-motions.

Re: [hackers] [dmenu][RFC][PATCH] History functionality

2016-01-10 Thread Silvan Jegen
ssary. > > In addition to the above, dmenu_run_history will launch each entry > immediately on `Ctrl-Return` (multiselect). > > The script can be used with the 4.6 version of dmenu. > > Download > > > [dmenu_run_history](dmenu_run_history) (20151217) > &g

[hackers][vis][PATCH] Initialize enum values to the public API ones

2015-12-20 Thread Silvan Jegen
--- The goal of the original patch was to get rid of an enum that was defined twice with similar values. Since one of them seems to be the public API we use this one to initialize the internal enum. Adding the enum values from vis-core.h to the public API in vis.h would unify the enums but expose

Re: [hackers][sbase][PATCH] Activate the "else if" branch

2015-12-16 Thread Silvan Jegen
Heyho On Wed, Dec 16, 2015 at 9:28 AM, Roberto E. Vargas Caballero wrote: > On Tue, Dec 15, 2015 at 07:54:28PM +0100, Silvan Jegen wrote: >> We checked the same condition in the "if" branch so it was never true >> in the "else if" one. Removing this cond

[hackers][sbase][PATCH] Activate the "else if" branch

2015-12-15 Thread Silvan Jegen
We checked the same condition in the "if" branch so it was never true in the "else if" one. Removing this condition makes the "else if" branch viable. --- ed.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ed.c b/ed.c index 3f878eb..12411ee 100644 --- a/ed.c +++ b/ed.c @@ -1

[hackers][vis][PATCH] Use VisMotionType enum consistently

2015-12-15 Thread Silvan Jegen
--- main.c | 4 ++-- vis-core.h | 8 +--- vis.h | 7 +-- 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/main.c b/main.c index a3b4023..9c99a94 100644 --- a/main.c +++ b/main.c @@ -1051,12 +1051,12 @@ static KeyAction vis_action[] = { [VIS_ACTION_MOTION_CHA

[hackers][vis][PATCH] Make normal mode 'S' behave like in Vim

2015-12-15 Thread Silvan Jegen
--- config.def.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.def.h b/config.def.h index a2a4b04..b8b9dd5 100644 --- a/config.def.h +++ b/config.def.h @@ -247,7 +247,7 @@ static KeyBinding vis_mode_normal[] = { { "v", ACTION(MODE_VISUAL)

Re: [hackers] [dmenu][RFC][PATCH] History functionality

2015-12-15 Thread Silvan Jegen
On Tue, Dec 15, 2015 at 06:41:21AM -0800, Xarchus wrote: > On Mon, Dec 14, 2015 at 06:57:34PM +0100, Silvan Jegen wrote: > > Heyolo > > I think it can go on the site like that. I would vote for it superseding > > the old history patch which integrated the history functiona

Re: [hackers] [dmenu][RFC][PATCH] History functionality

2015-12-14 Thread Silvan Jegen
Heyolo On Sat, Dec 12, 2015 at 06:36:05AM -0800, Xarchus wrote: > Yes, I feel strongly that if dmenu_path used to keep its file in a standard > place (XDG_CACHE_HOME or as a dot in HOME), then the history should be > placed in the same location. It's just clean, uniform design. > > I also realize

  1   2   >