aboutsummaryrefslogtreecommitdiffstats
path: root/Str.c
diff options
context:
space:
mode:
authorTatsuya Kinoshita <tats@debian.org>2015-08-06 14:09:58 +0000
committerTatsuya Kinoshita <tats@debian.org>2015-08-06 14:09:58 +0000
commit7834d34636db11b518444dd9ef005f42f6f1cb14 (patch)
tree457f676d4af7b0657f232f205ad62c54f39b20d2 /Str.c
parentUpdate ChangeLog (diff)
parentStrnew_charp and co do not modify the char* input (diff)
downloadw3m-7834d34636db11b518444dd9ef005f42f6f1cb14.tar.gz
w3m-7834d34636db11b518444dd9ef005f42f6f1cb14.zip
Merge pull request #6 from richq/static-checks
Static checks
Diffstat (limited to 'Str.c')
-rw-r--r--Str.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/Str.c b/Str.c
index eff82a4..f819dbf 100644
--- a/Str.c
+++ b/Str.c
@@ -56,7 +56,7 @@ Strnew_size(int n)
}
Str
-Strnew_charp(char *p)
+Strnew_charp(const char *p)
{
Str x;
int n;
@@ -73,7 +73,7 @@ Strnew_charp(char *p)
}
Str
-Strnew_m_charp(char *p, ...)
+Strnew_m_charp(const char *p, ...)
{
va_list ap;
Str r = Strnew();
@@ -87,7 +87,7 @@ Strnew_m_charp(char *p, ...)
}
Str
-Strnew_charp_n(char *p, int n)
+Strnew_charp_n(const char *p, int n)
{
Str x;
@@ -140,7 +140,7 @@ Strcopy(Str x, Str y)
}
void
-Strcopy_charp(Str x, char *y)
+Strcopy_charp(Str x, const char *y)
{
int len;
@@ -160,7 +160,7 @@ Strcopy_charp(Str x, char *y)
}
void
-Strcopy_charp_n(Str x, char *y, int n)
+Strcopy_charp_n(Str x, const char *y, int n)
{
int len = n;
@@ -180,7 +180,7 @@ Strcopy_charp_n(Str x, char *y, int n)
}
void
-Strcat_charp_n(Str x, char *y, int n)
+Strcat_charp_n(Str x, const char *y, int n)
{
int newlen;
@@ -209,7 +209,7 @@ Strcat(Str x, Str y)
}
void
-Strcat_charp(Str x, char *y)
+Strcat_charp(Str x, const char *y)
{
if (y == NULL)
return;
@@ -301,7 +301,7 @@ Strinsert_char(Str s, int pos, char c)
}
void
-Strinsert_charp(Str s, int pos, char *p)
+Strinsert_charp(Str s, int pos, const char *p)
{
STR_LENGTH_CHECK(s);
while (*p)