Re: [dev] slock segfault on rhel7

2014-11-06 Thread Johan Guldmyr
Okay, let's see. sudo ./slock write password + ENTER change tty gdb -q --pid thepid There is no --attach in my gdb version but there was --pid so I used that. Output: https://pastee.org/35jas slock-1.2, © 2006-2012 Anselm R Garbe (from master, did a git pull before compiling) // Johan

Re: [dev] fsbm

2014-11-06 Thread k0ga
> * Use strtonum() or estrtol() from sbase instead of atoi(). I agree here if the string comes from the user. If the string is an internal string then there is no problem with atoi.

Re: [dev] fsbm

2014-11-06 Thread k0ga
> - Rename volatile bool q = false; to "isrunning". is.* is a reserved name space, it have not to be used in external scope. > - Use the safer strlcpy or snprintf instead of strcpy(). I disagree, check the size before of calling strcpy. If you want to avoid security risk you also have to check

Re: [dev] slock segfault on rhel7

2014-11-06 Thread Anselm R Garbe
Hi, On 7 November 2014 07:41, Johan Guldmyr wrote: > I'm trying to use dwm on rhel7+gnome but I need a screenlocker. > > Does slock require the password to be in /etc/passwd? I get mine from some > ldap. > Anybody got some suggestions? Please provide a stacktrace following the instructions give

[dev] slock segfault on rhel7

2014-11-06 Thread Johan Guldmyr
Hi, I'm trying to use dwm on rhel7+gnome but I need a screenlocker. Does slock require the password to be in /etc/passwd? I get mine from some ldap. Anybody got some suggestions? // Johan

[dev] [sbase] expr

2014-11-06 Thread Evan Gates
I saw in sbase's TODO that expr had been imported from OpenBSD and needed "replacing or cleaning up." I decided to give it a try with yacc. It turned out very different from what I expected due to the need to convert between strings and numbers. It's about 3.5x smaller than the existing implementat

Re: [dev] fsbm

2014-11-06 Thread Calvin Morrison
many of these issues have been fixed. some I did not fix, yet, some will not be fixed. Thank you for your input, may someone find this useful On 6 November 2014 12:05, Dimitris Papastamos wrote: > Some more feedback: > > * Use a more sensible formatting style (look at the suckless.org > projects

Re: [dev] c++-style comments [was fsbm]

2014-11-06 Thread Sylvain BERTRAND
On Thu, Nov 06, 2014 at 08:34:40PM -0500, random...@fastmail.us wrote: >None of this has been examined by a court. It's because Linus T. and many core kernel devs decided not to go to court against closed source modules. The linux GNU GPLv2 has only the syscall exception and does not contain the "

Re: [dev] c++-style comments [was fsbm]

2014-11-06 Thread random832
On Thu, Nov 6, 2014, at 16:47, Sylvain BERTRAND wrote: > Linus T. does let closed source modules live (even so the GNU GPLv2 gives > legal > power to open the code, or block binary blob distribution, like what > happens > with mpeg video or 3D texture compression), There's a significant amount of

Re: [dev] c++-style comments [was fsbm]

2014-11-06 Thread Hiltjo Posthuma
On Thu, Nov 6, 2014 at 11:44 PM, Sylvain BERTRAND wrote: > On Thu, Nov 06, 2014 at 10:17:44PM +, Dimitris Papastamos wrote: >> On Thu, Nov 06, 2014 at 10:47:28PM +0100, Sylvain BERTRAND wrote: >> > The thing is *I* want *my* code ready to be easier to get into linux and to >> > follow Document

Re: [dev] c++-style comments [was fsbm]

2014-11-06 Thread Alexander Huemer
On Thu, Nov 06, 2014 at 05:56:55PM +0100, Sylvain BERTRAND wrote: > I wonder how much of the linux kernel tinycc is able to compile. I don't know about tcc, but there are leftovers[1] of a very unorganized project that tried to compile the Linux kernel with intel icc and IBM XE. There was a slid

Re: [dev] c++-style comments [was fsbm]

2014-11-06 Thread Sylvain BERTRAND
On Thu, Nov 06, 2014 at 10:17:44PM +, Dimitris Papastamos wrote: > On Thu, Nov 06, 2014 at 10:47:28PM +0100, Sylvain BERTRAND wrote: > > The thing is *I* want *my* code ready to be easier to get into linux and to > > follow Documentation/HOWTO and Documentation/codingstyle. > > I will leave yo

Re: [dev] c++-style comments [was fsbm]

2014-11-06 Thread Dimitris Papastamos
On Thu, Nov 06, 2014 at 10:47:28PM +0100, Sylvain BERTRAND wrote: > The thing is *I* want *my* code ready to be easier to get into linux and to > follow Documentation/HOWTO and Documentation/codingstyle. I will leave you bathe in your fantasies now.

Re: [dev] Questions about sta.li

2014-11-06 Thread Dimitris Papastamos
On Thu, Nov 06, 2014 at 07:42:05PM -0200, Henrique Lengler wrote: > Hi, > > I read in the suckless site and I'm interested about statically linked > executables and replace glibc. > > My questions are: > > - Why clibc? Most of distros that don't use glibc, use musl. This is outdated. It shoul

Re: [dev] c++-style comments [was fsbm]

2014-11-06 Thread Sylvain BERTRAND
On Thu, Nov 06, 2014 at 06:15:36PM +, Dimitris Papastamos wrote: > On Thu, Nov 06, 2014 at 06:40:15PM +0100, Sylvain BERTRAND wrote: > > On Thu, Nov 06, 2014 at 05:09:44PM +, Dimitris Papastamos wrote: > > > On Thu, Nov 06, 2014 at 05:56:55PM +0100, Sylvain BERTRAND wrote: > > > > On Thu, N

[dev] Questions about sta.li

2014-11-06 Thread Henrique Lengler
Hi, I read in the suckless site and I'm interested about statically linked executables and replace glibc. My questions are: - Why clibc? Most of distros that don't use glibc, use musl. - Why mksh as shell? -- Henrique Lengler

Re: [dev] c++-style comments [was fsbm]

2014-11-06 Thread Bobby Powers
Hello, FRIGN wrote: > De gustibus non est disputandum. I personally prefer {/*, */}. Agreed - taste is taste. > There are many ways to show why {/*, */} sucks less than {//}. Here is > one: > If you take a look at C, everything is block-oriented. The smallest > linguistic entity is "...;", follo

Re: [dev] [st] delele behaves as backspace... again

2014-11-06 Thread Nils R
Am 03.11.2014 11:06 schrieb k...@shike2.com: > > > Hi folks, > > > >  my delete-key behaves as backspace since commit > >  9d9e049eac3dacb2725f9d792f7cdd2230062313 on all my linux machines > >  (debian, fedora, ubuntu) and openbsd. > > > >  i had this problem in the past (and wrote to this li

Re: [dev] c++-style comments [was fsbm]

2014-11-06 Thread random832
On Thu, Nov 6, 2014, at 12:34, Louis Santillan wrote: > In a color syntax highlighting editor, doSomething(); takes on normal > highlighting when enabled, and takes on comment colored highlighting > when > disabled. Visually, that's slightly improved over something like > >#ifdef DEBUG >

Re: [dev] c++-style comments [was fsbm]

2014-11-06 Thread Dimitris Papastamos
On Thu, Nov 06, 2014 at 06:40:15PM +0100, Sylvain BERTRAND wrote: > On Thu, Nov 06, 2014 at 05:09:44PM +, Dimitris Papastamos wrote: > > On Thu, Nov 06, 2014 at 05:56:55PM +0100, Sylvain BERTRAND wrote: > > > On Thu, Nov 06, 2014 at 03:40:56PM +, Dimitris Papastamos wrote: > > > > On Thu, N

Re: [dev] c++-style comments [was fsbm]

2014-11-06 Thread Louis Santillan
It's a joke only if you're laughing. Hey, it's no worse than stringifying/blobbing a C file [0] (which works well in gcc/clang). All people have done is game cpp and the standard. #define STRINGIFY(src) #src inline const char* Kernels() { static const char* kernels = STRINGIFY( #in

Re: [dev] c++-style comments [was fsbm]

2014-11-06 Thread Calvin Morrison
On 6 November 2014 10:28, Bobby Powers wrote: > Hello, > > Hiltjo Posthuma wrote: >> - Don't use C++ style comments (//). > > I personally find C++ style comments more pleasant on the eyes for > single-line comments, and they are part of the C99 spec. > > Can someone explain why they think /* */ s

Re: [dev] c++-style comments [was fsbm]

2014-11-06 Thread FRIGN
On Thu, 6 Nov 2014 09:34:17 -0800 Louis Santillan wrote: > There is one case where C++ style comment create a useful feature that I > don't believe C style comments are able to replicate. Some might disagree. > In a color syntax highlighting editor in a C99 codebase, you can prefix C > style

Re: [dev] c++-style comments [was fsbm]

2014-11-06 Thread Sylvain BERTRAND
On Thu, Nov 06, 2014 at 05:09:44PM +, Dimitris Papastamos wrote: > On Thu, Nov 06, 2014 at 05:56:55PM +0100, Sylvain BERTRAND wrote: > > On Thu, Nov 06, 2014 at 03:40:56PM +, Dimitris Papastamos wrote: > > > On Thu, Nov 06, 2014 at 04:38:20PM +0100, Sylvain BERTRAND wrote: > > > > On a pers

Re: [dev] c++-style comments [was fsbm]

2014-11-06 Thread Louis Santillan
There is one case where C++ style comment create a useful feature that I don't believe C style comments are able to replicate. Some might disagree. In a color syntax highlighting editor in a C99 codebase, you can prefix C style comments with C++ style comments and get single character feature

Re: [dev] c++-style comments [was fsbm]

2014-11-06 Thread Dimitris Papastamos
On Thu, Nov 06, 2014 at 05:56:55PM +0100, Sylvain BERTRAND wrote: > On Thu, Nov 06, 2014 at 03:40:56PM +, Dimitris Papastamos wrote: > > On Thu, Nov 06, 2014 at 04:38:20PM +0100, Sylvain BERTRAND wrote: > > > On a personnal level, I port some of my C99 projects back to C89, since it > > > seems

Re: [dev] fsbm

2014-11-06 Thread Dimitris Papastamos
Some more feedback: * Use a more sensible formatting style (look at the suckless.org projects or style(9) in OpenBSD.) * If a function is not intended to accept any arguments use void. Instead of: void foo(); Use: void foo(void); * Use BUFSIZ wherever possible instead of hardcoded

Re: [dev] c++-style comments [was fsbm]

2014-11-06 Thread Sylvain BERTRAND
On Thu, Nov 06, 2014 at 05:27:06PM +0100, FRIGN wrote: > If you take a look at C, everything is block-oriented. The smallest > linguistic entity is "...;", followed by "(...)" and "{...}". The > traditional comments "/*...*/" are part of this axiomatic system. > This approach is not line-oriented.

Re: [dev] c++-style comments [was fsbm]

2014-11-06 Thread Sylvain BERTRAND
On Thu, Nov 06, 2014 at 03:40:56PM +, Dimitris Papastamos wrote: > On Thu, Nov 06, 2014 at 04:38:20PM +0100, Sylvain BERTRAND wrote: > > On a personnal level, I port some of my C99 projects back to C89, since it > > seems a C89 compiler is easier to write than a C99 compiler, and some part > >

Re: [dev] fsbm

2014-11-06 Thread Hiltjo Posthuma
On Thu, Nov 6, 2014 at 4:33 AM, Calvin Morrison wrote: > On 31 October 2014 17:23, Calvin Morrison wrote: > > A rewrite to C has been done [0] Please check it out the code is > pretty reeky and I want some advice on how to make it suck less. I was > avoiding doing extra mallocs so there's a lot o

Re: [dev] c++-style comments [was fsbm]

2014-11-06 Thread Dimitris Papastamos
On Thu, Nov 06, 2014 at 10:28:51AM -0500, Bobby Powers wrote: > Can someone explain why they think /* */ sucks less than // ? It > doesn't seem like it is for compatibility when st and dwm require C99 > anyway. An internet search did not turn up much, apologies if I've > missed an obvious link or

Re: [dev] c++-style comments [was fsbm]

2014-11-06 Thread FRIGN
On Thu, 6 Nov 2014 10:28:51 -0500 Bobby Powers wrote: > I personally find C++ style comments more pleasant on the eyes for > single-line comments, and they are part of the C99 spec. De gustibus non est disputandum. I personally prefer {/*, */}. > Can someone explain why they think /* */ sucks l

Re: [dev] c++-style comments [was fsbm]

2014-11-06 Thread Dimitris Papastamos
On Thu, Nov 06, 2014 at 04:38:20PM +0100, Sylvain BERTRAND wrote: > On a personnal level, I port some of my C99 projects back to C89, since it > seems a C89 compiler is easier to write than a C99 compiler, and some part of > my code could go in C89 only project (i.e. the linux kernel). the linux k

Re: [dev] c++-style comments [was fsbm]

2014-11-06 Thread Sylvain BERTRAND
On Thu, Nov 06, 2014 at 10:28:51AM -0500, Bobby Powers wrote: > Hello, > > Hiltjo Posthuma wrote: > > - Don't use C++ style comments (//). > > I personally find C++ style comments more pleasant on the eyes for > single-line comments, and they are part of the C99 spec. > > Can someone explain why

[dev] c++-style comments [was fsbm]

2014-11-06 Thread Bobby Powers
Hello, Hiltjo Posthuma wrote: > - Don't use C++ style comments (//). I personally find C++ style comments more pleasant on the eyes for single-line comments, and they are part of the C99 spec. Can someone explain why they think /* */ sucks less than // ? It doesn't seem like it is for compatibi

Re: [dev] [st] delele behaves as backspace... again

2014-11-06 Thread Henrique Lengler
On Thu, Nov 06, 2014 at 09:30:55AM +0100, k...@shike2.com wrote: > I asked you about your shell, not about your terminal emulator. > > Regards, Sorry, it is zsh. -- Henrique Lengler https://gitorious.org/~henriqueleng Skype: No way! That's nonfree (freedom-denying) software. Wanna ta

Re: [dev] fsbm

2014-11-06 Thread Hiltjo Posthuma
Cool! Some observations from a glance: - Use the great arg.h from 20h: http://git.suckless.org/sbase/tree/arg.h instead of getopt. - Use sigaction(), not signal(), it's behaviour is more clear. - Use tabs for indenting, align with spaces (it seems to have mixed tabs / whitespace). - Don't use C++

Re: [dev] [st] delele behaves as backspace... again

2014-11-06 Thread k0ga
>> So, it should be recognized as Delete key. What shell are you using? >> >> Regards, > > st - simple terminal > I asked you about your shell, not about your terminal emulator. Regards,