Re: [dev] dmenu segfaults when pressing control+enter without a selection

From: Louis Santillan <lpsantil_AT_gmail.com>
Date: Mon, 9 Nov 2015 20:37:14 -0800

On Mon, Nov 9, 2015 at 8:08 PM, Pickfire <pickfire_AT_riseup.net> wrote:
[SNIP]
> I am not very sure why people use int instead of booleans in C.
>
> I think stylistic code changes can make it easier to maintain on the
> early stages.

It used to be, before C99 (and newer) became as prevalent as they are
today, to portably use bools, you might include code like

#ifndef __bool_true_false_are_defined
   #ifdef _Bool
      #define bool _Bool
   #else
      #define bool char
   #endif
   #define true 1
   #define false 0
   #define __bool_true_false_are_defined 1
#endif

Nowadays, including stdbool is the way to go.
Received on Tue Nov 10 2015 - 05:37:14 CET

This archive was generated by hypermail 2.3.0 : Tue Nov 10 2015 - 05:48:09 CET