mirror of
https://github.com/rkd77/elinks.git
synced 2024-06-26 01:15:37 +00:00
[style] perl-like {}
This commit is contained in:
parent
14c10000da
commit
e183bc7bab
|
@ -815,8 +815,9 @@ main(int argc, char *argv[])
|
||||||
for (i = 1; i < argc; i++) {
|
for (i = 1; i < argc; i++) {
|
||||||
char *arg = argv[i];
|
char *arg = argv[i];
|
||||||
|
|
||||||
if (strncmp(arg, "--", 2))
|
if (strncmp(arg, "--", 2)) {
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
arg += 2;
|
arg += 2;
|
||||||
|
|
||||||
|
@ -828,30 +829,39 @@ main(int argc, char *argv[])
|
||||||
format = arg;
|
format = arg;
|
||||||
|
|
||||||
} else if (get_test_opt(&arg, "display", &i, argc, argv, "a string")) {
|
} 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;
|
setenv_display = 1;
|
||||||
|
}
|
||||||
|
|
||||||
} else if (get_test_opt(&arg, "get", &i, argc, argv, "a string")) {
|
} else if (get_test_opt(&arg, "get", &i, argc, argv, "a string")) {
|
||||||
struct mime_handler *handler;
|
struct mime_handler *handler;
|
||||||
|
|
||||||
if (has_gotten)
|
if (has_gotten) {
|
||||||
printf("\n");
|
printf("\n");
|
||||||
|
}
|
||||||
has_gotten = 1;
|
has_gotten = 1;
|
||||||
printf("type: %s\n", arg);
|
printf("type: %s\n", arg);
|
||||||
handler = get_mime_handler_mailcap(arg, setenv_display);
|
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);
|
printf("description: %s\n", handler->description);
|
||||||
|
}
|
||||||
|
|
||||||
if (strstr(format, "ask"))
|
if (strstr(format, "ask")) {
|
||||||
printf("ask: %d\n", handler->ask);
|
printf("ask: %d\n", handler->ask);
|
||||||
|
}
|
||||||
|
|
||||||
if (strstr(format, "block"))
|
if (strstr(format, "block")) {
|
||||||
printf("block: %d\n", handler->block);
|
printf("block: %d\n", handler->block);
|
||||||
|
}
|
||||||
|
|
||||||
if (strstr(format, "program"))
|
if (strstr(format, "program")) {
|
||||||
printf("program: %s\n", handler->program);
|
printf("program: %s\n", handler->program);
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
die("Unknown argument '%s'", arg - 2);
|
die("Unknown argument '%s'", arg - 2);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user