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:
7
tar.c
7
tar.c
@@ -2,7 +2,6 @@
|
||||
#include <grp.h>
|
||||
#include <limits.h>
|
||||
#include <pwd.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@@ -53,7 +52,7 @@ static FILE *tarfile;
|
||||
static ino_t tarinode;
|
||||
static dev_t tardev;
|
||||
|
||||
static bool mflag = false;
|
||||
static int mflag = 0;
|
||||
|
||||
static void
|
||||
usage(void)
|
||||
@@ -86,7 +85,7 @@ main(int argc, char *argv[])
|
||||
file = EARGF(usage());
|
||||
break;
|
||||
case 'm':
|
||||
mflag = true;
|
||||
mflag = 1;
|
||||
break;
|
||||
default:
|
||||
usage();
|
||||
@@ -118,7 +117,7 @@ main(int argc, char *argv[])
|
||||
dir = argv[0];
|
||||
break;
|
||||
case 'm':
|
||||
mflag = true;
|
||||
mflag = 1;
|
||||
break;
|
||||
default:
|
||||
usage();
|
||||
|
Reference in New Issue
Block a user