Knowing the domain of the variable is Boolean aids comprehension of the
variable's name and purpose.
int debugsw = 0;
-int listsw = 0;
-int rfc934sw = 0;
-int contentidsw = 1;
+bool listsw;
+bool rfc934sw;
+bool contentidsw = true;
/*
* Temporary files
if (compfile)
die("cannot specify both standard input and a file");
compfile = cp;
- listsw = 0; /* turn off -list if using standard in/out */
+ listsw = false; /* turn off -list if using standard in/out */
verbosw = 0; /* turn off -verbose listings */
break;
}
continue;
case LISTSW:
- listsw++;
+ listsw = true;
continue;
case NLISTSW:
- listsw = 0;
+ listsw = false;
continue;
case RFC934SW:
- rfc934sw++;
+ rfc934sw = true;
continue;
case NRFC934SW:
- rfc934sw = 0;
+ rfc934sw = false;
continue;
case SIZESW:
continue;
case CONTENTIDSW:
- contentidsw = 1;
+ contentidsw = true;
continue;
case NCONTENTIDSW:
- contentidsw = 0;
+ contentidsw = false;
continue;
case HEADERENCSW: {
extern int debugsw;
-extern int listsw;
-extern int rfc934sw;
-extern int contentidsw;
+extern bool listsw;
+extern bool rfc934sw;
+extern bool contentidsw;
static char prefix[] = "----- =_aaaaaaaaaa";