version 1.1.1.3, 2011/09/16 17:47:06 |
version 1.1.1.4, 2014/04/25 13:33:49 |
|
|
/* |
/* |
* Copyright (C) 1984-2011 Mark Nudelman |
* Copyright (C) 1984-2012 Mark Nudelman |
* |
* |
* You may distribute under the terms of either the GNU General Public |
* You may distribute under the terms of either the GNU General Public |
* License or the Less License, as specified in the README file. |
* License or the Less License, as specified in the README file. |
* |
* |
* For more information about less, or for information on how to |
* For more information, see the README file. |
* contact the author, see the README file. |
|
*/ |
*/ |
|
|
|
|
|
|
char *esccmd = shell_quote(cmd); |
char *esccmd = shell_quote(cmd); |
if (esccmd != NULL) |
if (esccmd != NULL) |
{ |
{ |
int len = strlen(shell) + strlen(esccmd) + 5; |
size_t len = strlen(shell) + strlen(esccmd) + 5; |
p = (char *) ecalloc(len, sizeof(char)); |
p = (char *) ecalloc(len, sizeof(char)); |
SNPRINTF3(p, len, "%s %s %s", shell, shell_coption(), esccmd); |
SNPRINTF3(p, len, "%s %s %s", shell, shell_coption(), esccmd); |
free(esccmd); |
free(esccmd); |