Un-boolify sbase
It actually makes the binaries smaller, the code easier to read (gems like "val == true", "val == false" are gone) and actually predictable in the sense of that we actually know what we're working with (one bitwise operator was quite adventurous and should now be fixed). This is also more consistent with the other suckless projects around which don't use boolean types.
This commit is contained in:
9
cut.c
9
cut.c
@@ -1,5 +1,4 @@
|
||||
/* See LICENSE file for copyright and license details. */
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@@ -23,8 +22,8 @@ typedef struct Range {
|
||||
static Range *list = NULL;
|
||||
static char mode = 0;
|
||||
static char delim = '\t';
|
||||
static bool nflag = false;
|
||||
static bool sflag = false;
|
||||
static int nflag = 0;
|
||||
static int sflag = 0;
|
||||
|
||||
static void
|
||||
insert(Range *r)
|
||||
@@ -164,10 +163,10 @@ main(int argc, char *argv[])
|
||||
delim = *ARGF();
|
||||
break;
|
||||
case 'n':
|
||||
nflag = true;
|
||||
nflag = 1;
|
||||
break;
|
||||
case 's':
|
||||
sflag = true;
|
||||
sflag = 1;
|
||||
break;
|
||||
default:
|
||||
usage();
|
||||
|
Reference in New Issue
Block a user