aboutsummaryrefslogtreecommitdiffstats
path: root/lib/sh/shquote.c
diff options
context:
space:
mode:
authorChet Ramey <chet.ramey@case.edu>2011-11-22 19:11:26 -0500
committerChet Ramey <chet.ramey@case.edu>2011-11-22 19:11:26 -0500
commit495aee441b75276e38c75694ccb455bb6463fdb9 (patch)
treef12907dbf62388e6c65dfa1c5e1199509936707e /lib/sh/shquote.c
parent30d188c2932d6ef609d894fefeb7e7b03ccff463 (diff)
downloadandroid_external_bash-495aee441b75276e38c75694ccb455bb6463fdb9.tar.gz
android_external_bash-495aee441b75276e38c75694ccb455bb6463fdb9.tar.bz2
android_external_bash-495aee441b75276e38c75694ccb455bb6463fdb9.zip
Bash-4.2 distribution sources and documentation
Diffstat (limited to 'lib/sh/shquote.c')
-rw-r--r--lib/sh/shquote.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/sh/shquote.c b/lib/sh/shquote.c
index a267d38..a1e9146 100644
--- a/lib/sh/shquote.c
+++ b/lib/sh/shquote.c
@@ -42,10 +42,11 @@
Used by alias and trap, among others. */
char *
sh_single_quote (string)
- char *string;
+ const char *string;
{
register int c;
- char *result, *r, *s;
+ char *result, *r;
+ const char *s;
result = (char *)xmalloc (3 + (4 * strlen (string)));
r = result;
@@ -72,10 +73,11 @@ sh_single_quote (string)
/* Quote STRING using double quotes. Return a new string. */
char *
sh_double_quote (string)
- char *string;
+ const char *string;
{
register unsigned char c;
- char *result, *r, *s;
+ char *result, *r;
+ const char *s;
result = (char *)xmalloc (3 + (2 * strlen (string)));
r = result;