aboutsummaryrefslogtreecommitdiffstats
path: root/sway/main.c
diff options
context:
space:
mode:
authorLibravatar Simon Ser <contact@emersion.fr>2022-01-31 10:39:12 +0100
committerLibravatar Kenny Levinsen <kl@kl.wtf>2022-01-31 11:04:26 +0100
commit518e18a54b9fc07682b46f6bb3bb848ff8760a7f (patch)
treede360c3b9b0f0a56f821df0b06589bc2eb03eb7a /sway/main.c
parentswaynag: remove buffer destruction condition (diff)
downloadsway-518e18a54b9fc07682b46f6bb3bb848ff8760a7f.tar.gz
sway-518e18a54b9fc07682b46f6bb3bb848ff8760a7f.tar.zst
sway-518e18a54b9fc07682b46f6bb3bb848ff8760a7f.zip
Use bools for CLI flags
Diffstat (limited to 'sway/main.c')
-rw-r--r--sway/main.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sway/main.c b/sway/main.c
index b6f8a8bf..cbe6e603 100644
--- a/sway/main.c
+++ b/sway/main.c
@@ -241,7 +241,7 @@ static void handle_wlr_log(enum wlr_log_importance importance,
241} 241}
242 242
243int main(int argc, char **argv) { 243int main(int argc, char **argv) {
244 static int verbose = 0, debug = 0, validate = 0, allow_unsupported_gpu = 0; 244 static bool verbose = false, debug = false, validate = false, allow_unsupported_gpu = false;
245 245
246 static const struct option long_options[] = { 246 static const struct option long_options[] = {
247 {"help", no_argument, NULL, 'h'}, 247 {"help", no_argument, NULL, 'h'},
@@ -286,23 +286,23 @@ int main(int argc, char **argv) {
286 config_path = strdup(optarg); 286 config_path = strdup(optarg);
287 break; 287 break;
288 case 'C': // validate 288 case 'C': // validate
289 validate = 1; 289 validate = true;
290 break; 290 break;
291 case 'd': // debug 291 case 'd': // debug
292 debug = 1; 292 debug = true;
293 break; 293 break;
294 case 'D': // extended debug options 294 case 'D': // extended debug options
295 enable_debug_flag(optarg); 295 enable_debug_flag(optarg);
296 break; 296 break;
297 case 'u': 297 case 'u':
298 allow_unsupported_gpu = 1; 298 allow_unsupported_gpu = true;
299 break; 299 break;
300 case 'v': // version 300 case 'v': // version
301 printf("sway version " SWAY_VERSION "\n"); 301 printf("sway version " SWAY_VERSION "\n");
302 exit(EXIT_SUCCESS); 302 exit(EXIT_SUCCESS);
303 break; 303 break;
304 case 'V': // verbose 304 case 'V': // verbose
305 verbose = 1; 305 verbose = true;
306 break; 306 break;
307 case 'p': ; // --get-socketpath 307 case 'p': ; // --get-socketpath
308 if (getenv("SWAYSOCK")) { 308 if (getenv("SWAYSOCK")) {