]>
Commit | Line | Data |
---|---|---|
b9f9d159 | 1 | --- less-374/filename.c~ Wed Mar 6 14:54:12 2002 |
2 | +++ less-374/filename.c Wed Mar 6 14:56:58 2002 | |
3 | @@ -550,37 +550,7 @@ | |
f6bb244d | 4 | { |
5 | FILE *fd; | |
6 | ||
7 | -#if HAVE_SHELL | |
8 | - char *shell; | |
b9f9d159 | 9 | - |
f6bb244d | 10 | - shell = lgetenv("SHELL"); |
11 | - if (shell != NULL && *shell != '\0') | |
12 | - { | |
13 | - char *scmd; | |
14 | - char *esccmd; | |
15 | - | |
16 | - /* | |
b9f9d159 | 17 | - * Read the output of <$SHELL -c cmd>. |
18 | - * Escape any metacharacters in the command. | |
f6bb244d | 19 | - */ |
b9f9d159 | 20 | - esccmd = shell_quote(cmd); |
21 | - if (esccmd == NULL) | |
f6bb244d | 22 | - { |
b9f9d159 | 23 | - fd = popen(cmd, "r"); |
f6bb244d | 24 | - } else |
25 | - { | |
f6bb244d | 26 | - scmd = (char *) ecalloc(strlen(shell) + strlen(esccmd) + 5, |
27 | - sizeof(char)); | |
b9f9d159 | 28 | - sprintf(scmd, "%s %s %s", shell, shell_coption(), esccmd); |
f6bb244d | 29 | - free(esccmd); |
b9f9d159 | 30 | - fd = popen(scmd, "r"); |
31 | - free(scmd); | |
f6bb244d | 32 | - } |
f6bb244d | 33 | - } else |
34 | -#endif | |
35 | - { | |
36 | - fd = popen(cmd, "r"); | |
f6bb244d | 37 | - } |
b9f9d159 | 38 | + fd = popen(cmd, "r"); |
39 | /* | |
40 | * Redirection in `popen' might have messed with the | |
41 | * standard devices. Restore binary input mode. |