]> git.pld-linux.org Git - packages/less.git/blob - less-shell.patch
- add rcsid
[packages/less.git] / less-shell.patch
1 --- less-394/filename.c~        2006-02-23 01:49:12.000000000 +0200
2 +++ less-394/filename.c 2006-02-23 01:50:36.000000000 +0200
3 @@ -557,37 +557,7 @@
4  {
5         FILE *fd;
6  
7 -#if HAVE_SHELL
8 -       char *shell;
9 -
10 -       shell = lgetenv("SHELL");
11 -       if (shell != NULL && *shell != '\0')
12 -       {
13 -               char *scmd;
14 -               char *esccmd;
15 -
16 -               /*
17 -                * Read the output of <$SHELL -c cmd>.  
18 -                * Escape any metacharacters in the command.
19 -                */
20 -               esccmd = shell_quote(cmd);
21 -               if (esccmd == NULL)
22 -               {
23 -                       fd = popen(cmd, "r");
24 -               } else
25 -               {
26 -                       int len = strlen(shell) + strlen(esccmd) + 5;
27 -                       scmd = (char *) ecalloc(len, sizeof(char));
28 -                       SNPRINTF3(scmd, len, "%s %s %s", shell, shell_coption(), esccmd);
29 -                       free(esccmd);
30 -                       fd = popen(scmd, "r");
31 -                       free(scmd);
32 -               }
33 -       } else
34 -#endif
35 -       {
36 -               fd = popen(cmd, "r");
37 -       }
38 +       fd = popen(cmd, "r");
39         /*
40          * Redirection in `popen' might have messed with the
41          * standard devices.  Restore binary input mode.
This page took 0.075311 seconds and 3 git commands to generate.