1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-06-15 23:35:34 +00:00

[style] perl-like {}

This commit is contained in:
Witold Filipczyk 2024-04-08 15:01:58 +02:00
parent 14c10000da
commit e183bc7bab

View File

@ -815,8 +815,9 @@ main(int argc, char *argv[])
for (i = 1; i < argc; i++) {
char *arg = argv[i];
if (strncmp(arg, "--", 2))
if (strncmp(arg, "--", 2)) {
break;
}
arg += 2;
@ -828,30 +829,39 @@ main(int argc, char *argv[])
format = arg;
} else if (get_test_opt(&arg, "display", &i, argc, argv, "a string")) {
if (strcmp(arg, "1") == 0 || strcmp(arg, "yes") == 0)
if (strcmp(arg, "1") == 0 || strcmp(arg, "yes") == 0) {
setenv_display = 1;
}
} else if (get_test_opt(&arg, "get", &i, argc, argv, "a string")) {
struct mime_handler *handler;
if (has_gotten)
if (has_gotten) {
printf("\n");
}
has_gotten = 1;
printf("type: %s\n", arg);
handler = get_mime_handler_mailcap(arg, setenv_display);
if (!handler) continue;
if (strstr(format, "description"))
if (!handler) {
continue;
}
if (strstr(format, "description")) {
printf("description: %s\n", handler->description);
}
if (strstr(format, "ask"))
if (strstr(format, "ask")) {
printf("ask: %d\n", handler->ask);
}
if (strstr(format, "block"))
if (strstr(format, "block")) {
printf("block: %d\n", handler->block);
}
if (strstr(format, "program"))
if (strstr(format, "program")) {
printf("program: %s\n", handler->program);
}
} else {
die("Unknown argument '%s'", arg - 2);