aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar SpizzyCoder <spizzycoder@protonmail.com>2021-01-16 19:49:44 +0100
committerLibravatar Simon Ser <contact@emersion.fr>2021-01-16 20:24:41 +0100
commit7cf25d3b987ff00a644bf5b6910a366f93029bbe (patch)
treeb203b9dd55481dc641e5e7a9c79211146d58e3a8
parentconfig/output: correct refresh rate rounding error (diff)
downloadsway-7cf25d3b987ff00a644bf5b6910a366f93029bbe.tar.gz
sway-7cf25d3b987ff00a644bf5b6910a366f93029bbe.tar.zst
sway-7cf25d3b987ff00a644bf5b6910a366f93029bbe.zip
Changed fprintf(stdout,...) to printf(...) for more readable code
-rw-r--r--sway/main.c6
-rw-r--r--swaybar/main.c2
-rw-r--r--swaymsg/main.c2
-rw-r--r--swaynag/config.c2
4 files changed, 6 insertions, 6 deletions
diff --git a/sway/main.c b/sway/main.c
index 62a88835..0c219fb3 100644
--- a/sway/main.c
+++ b/sway/main.c
@@ -281,7 +281,7 @@ int main(int argc, char **argv) {
281 } 281 }
282 switch (c) { 282 switch (c) {
283 case 'h': // help 283 case 'h': // help
284 fprintf(stdout, "%s", usage); 284 printf("%s", usage);
285 exit(EXIT_SUCCESS); 285 exit(EXIT_SUCCESS);
286 break; 286 break;
287 case 'c': // config 287 case 'c': // config
@@ -301,7 +301,7 @@ int main(int argc, char **argv) {
301 allow_unsupported_gpu = 1; 301 allow_unsupported_gpu = 1;
302 break; 302 break;
303 case 'v': // version 303 case 'v': // version
304 fprintf(stdout, "sway version " SWAY_VERSION "\n"); 304 printf("sway version " SWAY_VERSION "\n");
305 exit(EXIT_SUCCESS); 305 exit(EXIT_SUCCESS);
306 break; 306 break;
307 case 'V': // verbose 307 case 'V': // verbose
@@ -309,7 +309,7 @@ int main(int argc, char **argv) {
309 break; 309 break;
310 case 'p': ; // --get-socketpath 310 case 'p': ; // --get-socketpath
311 if (getenv("SWAYSOCK")) { 311 if (getenv("SWAYSOCK")) {
312 fprintf(stdout, "%s\n", getenv("SWAYSOCK")); 312 printf("%s\n", getenv("SWAYSOCK"));
313 exit(EXIT_SUCCESS); 313 exit(EXIT_SUCCESS);
314 } else { 314 } else {
315 fprintf(stderr, "sway socket not detected.\n"); 315 fprintf(stderr, "sway socket not detected.\n");
diff --git a/swaybar/main.c b/swaybar/main.c
index 108b16e9..5c36d66b 100644
--- a/swaybar/main.c
+++ b/swaybar/main.c
@@ -55,7 +55,7 @@ int main(int argc, char **argv) {
55 swaybar.id = strdup(optarg); 55 swaybar.id = strdup(optarg);
56 break; 56 break;
57 case 'v': 57 case 'v':
58 fprintf(stdout, "swaybar version " SWAY_VERSION "\n"); 58 printf("swaybar version " SWAY_VERSION "\n");
59 exit(EXIT_SUCCESS); 59 exit(EXIT_SUCCESS);
60 break; 60 break;
61 case 'd': // Debug 61 case 'd': // Debug
diff --git a/swaymsg/main.c b/swaymsg/main.c
index eb13f0d8..60536e48 100644
--- a/swaymsg/main.c
+++ b/swaymsg/main.c
@@ -396,7 +396,7 @@ int main(int argc, char **argv) {
396 cmdtype = strdup(optarg); 396 cmdtype = strdup(optarg);
397 break; 397 break;
398 case 'v': 398 case 'v':
399 fprintf(stdout, "swaymsg version " SWAY_VERSION "\n"); 399 printf("swaymsg version " SWAY_VERSION "\n");
400 exit(EXIT_SUCCESS); 400 exit(EXIT_SUCCESS);
401 break; 401 break;
402 default: 402 default:
diff --git a/swaynag/config.c b/swaynag/config.c
index a57597ef..ca7f4eb2 100644
--- a/swaynag/config.c
+++ b/swaynag/config.c
@@ -234,7 +234,7 @@ int swaynag_parse_options(int argc, char **argv, struct swaynag *swaynag,
234 } 234 }
235 break; 235 break;
236 case 'v': // Version 236 case 'v': // Version
237 fprintf(stdout, "swaynag version " SWAY_VERSION "\n"); 237 printf("swaynag version " SWAY_VERSION "\n");
238 return -1; 238 return -1;
239 case TO_COLOR_BACKGROUND: // Background color 239 case TO_COLOR_BACKGROUND: // Background color
240 if (type && !parse_color(optarg, &type->background)) { 240 if (type && !parse_color(optarg, &type->background)) {