Re: [hackers] [st][PATCH 00/24] odg patches - fix warnings/errors, plug leaks, tidying up

2019-01-22 Thread David Phillips
On Wed, Jan 23, 2019 at 03:54:35AM +0100, kais euchi wrote: > Greetings ! > What's the point of all this if you are treating others who try to > participate this way ? > I have never seen such lack of tact. > This sucks. Hi, You must be new to the list. Best regards, David

Re: [hackers] [st][PATCH 03/24] Reduce variable scope where possible, fix cppcheck style warnings

2019-01-21 Thread David Phillips
Reducing variale scope goes against the "Do not mix declarations and code" guideline [1]. While it's possible to reduce scope in some cases, it's not always good form. All subjective though. [1] https://suckless.org/coding_style/

Re: [hackers] [st][PATCH 24/24] link with librt on non-openbsd systems, I forgot to uncomment

2019-01-21 Thread David Phillips
On Mon, Jan 21, 2019 at 11:56:39PM +, Oliver Galvin wrote: > --- > config.mk | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/config.mk b/config.mk > index 7c0018a..3de245b 100644 > --- a/config.mk > +++ b/config.mk > @@ -27,8 +27,8 @@ STCPPFLAGS =

Re: [hackers] [PATCH] [sbase] ls: allow listing contents of directories with +r-x

2018-10-01 Thread David Phillips
Thanks, David >From 856b408a098415d98e6c673c7d1df7a9dde0 Mon Sep 17 00:00:00 2001 From: David Phillips Date: Tue, 2 Oct 2018 15:11:36 +1300 Subject: [PATCH] ls: allow fstatat failure, don't output filenames on fstatat failure This patch allows fstatat failure without stopping the ls operation entirely. Instead,

Re: [hackers] [PATCH] [sbase] ls: allow listing contents of directories with +r-x

2018-09-26 Thread David Phillips
On Tue, Sep 25, 2018 at 06:48:08PM -0700, Michael Forney wrote: > > Hi David, > Hi there > Rather than keeping track of the full prefix for `mkent` and `output`, > what do you think about just tracking the directory fd, and using the > *at family of functions to work relative to that

Re: [hackers][sbase][PATCH] Fix build errors on some ARM64 Linux systems

2018-08-27 Thread David Phillips
On Mon, Aug 27, 2018 at 09:21:33PM +0200, Hiltjo Posthuma wrote: > On Mon, Aug 27, 2018 at 09:37:24PM +0300, Platon Ryzhikov wrote: > > These changes are required on Arch Linux ARM to build sbase. This does not > > affect x86 build. > > --- > > ls.c | 1 + > > tar.c | 1 + > > 2 files changed,

Re: [hackers] [PATCH] [sbase] ls: allow listing contents of directories with +r-x

2018-07-08 Thread David Phillips
As a side note to this patch: it's been sitting in my queue for the better part of a year while I internally debated the untidiness of not being allowed to chdir. It's an unfortunate result of implementing this behaviour, but it's behaviour that other implementations (namely GNU, but not Solaris)

Re: [hackers] [PATCH] [sbase] Include sysmacros.h directly rather than types.h

2018-07-08 Thread David Phillips
On Mon, Jul 02, 2018 at 11:58:54PM +1200, David Phillips wrote: > On Mon, Jul 02, 2018 at 01:20:42PM +0200, Quentin Rameau wrote: > > Ok, the makedev(3) manpage from the man-pages states this indeed: > > > > The BSDs expose the definitions for these macros via . > &g

[hackers] [PATCH] [sbase] ls: allow listing contents of directories with +r-x

2018-07-08 Thread David Phillips
chdir()ing into a directory with +r-x fails, so we should manually use the directory name as a prefix rather than chdir()ing into it. Also adds new parameters to mkent for the prefix, and for dictating whether or not a permission denied error when stat()ing shall be fatal or not. This allows

Re: [hackers] [PATCH] [sbase] Include sysmacros.h directly rather than types.h

2018-07-02 Thread David Phillips
On Mon, Jul 02, 2018 at 01:20:42PM +0200, Quentin Rameau wrote: > Ok, the makedev(3) manpage from the man-pages states this indeed: > > The BSDs expose the definitions for these macros via . > Depending on the version, glibc also exposes definitions for these > macros from that header file if

Re: [hackers] [PATCH] [sbase] Include sysmacros.h directly rather than types.h

2018-07-02 Thread David Phillips
On Mon, Jul 02, 2018 at 10:16:50AM +0200, Quentin Rameau wrote: > > On glibc, major, minor, and makedev are all defined in > > sys/sysmacros.h with types.h only including this for historical > > reasons. A future release of glibc will remove this behaviour, > > meaning that major, minor, and

Re: [hackers] [PATCH] [sbase] Include sysmacros.h directly rather than types.h

2018-07-02 Thread David Phillips
On Mon, Jul 02, 2018 at 10:02:09AM +0200, Hiltjo Posthuma wrote: > > Did you test it with musl too and preferably other platforms? Unfortunately not; I don't currently have access to non-glibc Linux installations at the moment, nor BSDs. Perhaps users of those systems might be able to chime in at

[hackers] [PATCH] [sbase] Include sysmacros.h directly rather than types.h

2018-07-02 Thread David Phillips
On glibc, major, minor, and makedev are all defined in sys/sysmacros.h with types.h only including this for historical reasons. A future release of glibc will remove this behaviour, meaning that major, minor, and makedev will no longer be defined for us without including sysmacros.h. --- ls.c |

Re: [hackers] [PATCH] Remove .hgtags

2018-05-10 Thread David Phillips
On Thu, May 10, 2018 at 01:05:12PM +0200, David Demelier wrote: > class="gmail_quote">Le10 mai 2018 11:23, Hiltjo Posthuma > hil...@codemadness.org a écrit: type="attribution">On Wed, May > 09, 2018 at 08:50:09PM +0200, David Demelier wrote: > > --- > > .hgtags | 10 -- > > 1 file

Re: [hackers] [sent] [PATCH] Draw a progress bar on non-image slides

2018-01-06 Thread David Phillips
On Sun, Jan 07, 2018 at 12:23:50AM +0100, Markus Teich wrote: > David Phillips wrote: > > Similar to the slide numbers patch, it may be useful for an audience to know > > how much more of a presentation they have to endure. A naïve approach to > > this > > is

[hackers] [sent] [PATCH] Draw a progress bar on non-image slides

2018-01-04 Thread David Phillips
Similar to the slide numbers patch, it may be useful for an audience to know how much more of a presentation they have to endure. A naïve approach to this is to introduce a progress bar to the bottom of the slides which indicate the presenter's progress based on slide count. This progress bar is

Re: [hackers] [sbase] [PATCH] ls: allow listing contents of directories with +r-x

2017-10-21 Thread David Phillips
On Fri, Oct 20, 2017 at 01:28:30PM -0700, Michael Forney wrote: > Hi David, Hi Michael > > Can you explain the reasoning behind this? Is this behavior > standardized, or consistent with other ls(1) implementations? > The purpose for this behaviour was to allow stat to fail when it is used to

[hackers] [sbase] [PATCH] ls: allow listing contents of directories with +r-x

2017-10-17 Thread David Phillips
chdir()ing into a directory with +r-x fails, so we should manually use the directory name as a prefix rather than chdir()ing into it. Also adds new parameters to mkent for the prefix, and for dictating whether or not a permission denied error when stat()ing shall be fatal or not. This allows

Re: [hackers] [sbase] [PATCH 2/2] [chmod] Use DIRFIRST

2017-10-01 Thread David Phillips
On Sun, Oct 01, 2017 at 12:03:45PM -0700, Michael Forney wrote: > Here's what POSIX has to say on the matter: > > "Some implementations of the chmod utility change the mode of a > directory before the files in the directory when performing a > recursive (-R option) change; others change the

[hackers] [sbase] [PATCH 1/2] [libutil/recurse] only opendir if recursing

2017-10-01 Thread David Phillips
Previous behaviour was to call opendir regardless of if we are actually going to be recursing into the directory. Additionally, some utilities that use DIRFIRST benefit from running the function pointed to by fn before the call to opendir. One such example is `chmod [-R] 777 dir` on a directory

Re: [hackers] [sbase] [PATCH 1/2] [libutil/recurse] only opendir if recursing

2017-10-01 Thread David Phillips
On Sun, Oct 01, 2017 at 12:35:23AM -0700, Michael Forney wrote: > Hi David, > > Thanks for the patch. The general idea seems good to me. > Thanks! > > I don't understand the `!r->maxdepth` check here. If `r->depth + 1 < > r->maxdepth` is used to enter the outer branch, won't an uninitialized

[hackers] [sbase] [PATCH 2/2] [chmod] Use DIRFIRST

2017-09-30 Thread David Phillips
Previosuly, running `chmod 777` on a directory that had no read or execute access (e.g. 111 or 000) would cause chmod to throw its toys since it was trying to opendir before having added read permission to the directory. --- chmod.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[hackers] [sbase] [PATCH 1/2] [libutil/recurse] only opendir if recursing

2017-09-30 Thread David Phillips
Previous behaviour was to call opendir regardless of if we are actually going to be recursing into the direectory. Additionally, some utilities require like chmod that DIRFIRST causes the fn to execute before the opendir is called. --- libutil/recurse.c | 15 +++ 1 file changed, 7

Re: [hackers] [sbase][PATCH] ls: abort a directory if we cannot opendir it

2017-08-22 Thread David Phillips
Sorry, I should have made the commit message clearer. It is not the entire operation that is being aborted, but only the current node, if it cannot be opened. Before this patch, ls will segfault since it tries to perform operations on a (null) DIR*. After this patch, it prints the message, sets

[hackers] [sbase][PATCH] ls: abort a directory if we cannot opendir it

2017-08-21 Thread David Phillips
We should not try and perform operations on an invalid DIR* stream. Instead, we shall let the error message be printed, and the return code set (existing behaviour) and abort afterwards. --- ls.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ls.c b/ls.c index 5080c8f..b716aba 100644 ---

Re: [hackers] Desktop icons in dwm

2017-04-05 Thread David Phillips
On Wed, Apr 05, 2017 at 07:09:50AM +, Cág wrote: > [...] > Maybe a late April 1st submission?

Re: [hackers] [st] Enable login shell?

2016-11-09 Thread David Phillips
On Tue, Nov 08, 2016 at 04:41:27PM -0500, lo...@lorentrogers.com wrote: > > This should be documented somewhere--I'll see if the RVM folks can > include a note on st in their docs. > Hello, The `-e foocmd` behaviour is fairly common amongst many different terminal emulators; it is not something

Re: [hackers] [dwm][PATCH] Do not call die() upon '-v' invocation

2016-10-28 Thread David Phillips
On Fri, Oct 28, 2016 at 03:58:14PM +0200, Martin Kühne wrote: > IMHO, when failing to parse command line arguments, usage() should be > called before exiting with EXIT_FAILURE. > on invocation with -h|--help, it should exit with EXIT_SUCCESS. > > cheers! > mar77i This sounds sane and solves the

Re: [hackers] [dwm][PATCH] Corrected typo.

2016-04-24 Thread David Phillips
What typo is this fixing? The only change I can see is the capitalisation is being changed against the grain of the rest of the codebase. Please corect me if I am wrong. signature.asc Description: PGP signature

Re: [hackers] [patch] st crash inside getsel

2016-04-18 Thread David Phillips
On Tue, Apr 19, 2016 at 02:48:14AM +0100, ra...@openmailbox.org wrote: > Hello > > I had been noticing st 0.6 terminals sometimes disappearing on openbsd. I > managed to reproduce the crash quite consistently by trying to select and > copy the output of: man ls | head -10. > > Debugged the

Re: [hackers] [slock][PATCH] Reset color to INIT on Escape key press

2016-04-04 Thread David Phillips
On Mon, Apr 04, 2016 at 02:46:18AM -0300, Thomas wrote: > Also makes sense because pushing Esc isn't really a failure, but a > purposefully aborted unlock attempt, so the background shouldn't be set > to FAILURE. The main reason for the inclusion of the 'fail on clear' behaviour was so that you

Re: [hackers] [sent] [PATCH 2/2] replace farbfeld with libnetpbm

2015-12-13 Thread David Phillips
On Sun, Dec 13, 2015 at 06:40:27AM +0100, FRIGN wrote: > On Sun, 13 Dec 2015 11:26:34 +1300 > dbphillip...@gmail.com wrote: > > > Valid observation, although this patch is about changing the intermediate > > format, not the input format. > > I know, but what argument can you give? I mean, this

Re: [hackers] Compiling stali

2015-12-10 Thread David Phillips
Did you read the error yourself? Software does not output errors without reason.

[hackers] [sent] [PATCH] Change an eprintf to a die to stop child from running its own slideshow

2015-12-10 Thread David Phillips
The child thread was created because execlp will not return if successful. The eprintf was placed after the call to execlp to catch any error, but the child continued to return a (closed) fds[0], resulting in a second slideshow being run by the child. This commit fixes the issue by killing the

Re: [hackers] [st] startup options

2015-11-24 Thread David Phillips
Me, I use dvtm(1) instead of tmux, and I only have my dwm config set to run st with a dvtm session inside. This way, I can manually start st without dvtm by asking for `st` from dmenu or another terminal. I suppose it's a matter of personal taste, but when I run 'st' I don't want dvtm or tmux. If

Re: [hackers] [PATCH] [sent] Quick patch to replace png with farbfeld

2015-11-17 Thread David Phillips
> Can sent just use .ff.bz2 to display images? Going by the current proposal, you would just tell sent to use bzcat to get farbfeld data from a .ff.bz2, just like telling it to use png2ff to get farbfeld data from a PNG.

[hackers] Patch naming on the wiki

2015-11-09 Thread David Phillips
Just wondering what the rest of the community reckons about an issue that popped up briefly on IRC. I'll start with an example: some patches, for a long time, have been named `dwm-6.1-fibwibble.diff`—long before dwm-6.1 was released. When I was more of a newbie, this was confusing. Now, though, I

[hackers] Re: Patch naming on the wiki

2015-11-09 Thread David Phillips
Ah bollocks, wrong list, should be dev@

Re: [hackers] [surf] [PATCH 2/2] style fixes: space after keywords, () with sizeof

2015-10-19 Thread David Phillips
Looking back at it [1] now, I see it doesn't put brackets with sizeof. I feel that this would require full-on parsing to do correctly. Nevertheless, it does a lot of the heavy-lifting and I'll speculate that sizeof without brackets is a lot less common than keywords without spaces (ones which

[hackers] [slock] [PATCH] Don't change to failure colour on success

2015-08-26 Thread David Phillips
As it stands, the success behaviour for slock is to change to the failure colour and exit, since the string length of the password field is set to zero. This flash of failure colour isn't normally noticed, but it becomes an issue when a composite manager is used and window fading is used. This

Re: [hackers] [abduco] [PATCH] Allow squashing of command line flags together

2015-08-07 Thread David Phillips
Yeah you'd be right about having issues with -e, I must've missed that. I'll submit the getopt-based one soon once it's polished off.

Re: [hackers] [abduco] [PATCH] Allow squashing of command line flags together

2015-08-07 Thread David Phillips
Here is the getopt patch as requested. Much tidier, and I haven't found any issues yet with some decent testing. diff --git a/abduco.c b/abduco.c index 5c4d174..17a1896 100644 --- a/abduco.c +++ b/abduco.c @@ -545,34 +545,25 @@ static int list_session(void) { int main(int argc, char *argv[]) {

[hackers] [abduco] [PATCH] Allow squashing of command line flags together

2015-07-30 Thread David Phillips
Currently, abduco only supports command line flags kept separate, eg `abduco -c -f foo bar`. This patch changes the parser to treat `-abc` as being equal to `-a -b -c`, effectively allowing options to be 'squashed' together. This would mean `abduco -c -f foo bar` could equally be expressed as

[hackers] Re: [slock] [PATCH] Slightly safer OOM killer disablement

2015-06-19 Thread David Phillips
Resubmitting after talking with the guys in IRC, and after noticing that whitespace got messed with in my original patch. -- Four word witty remark diff --git a/slock.c b/slock.c index d6053af..b3bee92 100644 --- a/slock.c +++ b/slock.c @@ -60,16 +60,27 @@ die(const char *errstr, ...) #ifdef