1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

add_quoted_to_string: Make the src parameter point to const.

This commit is contained in:
Kalle Olavi Niemitalo 2007-01-28 00:20:59 +02:00 committed by Kalle Olavi Niemitalo
parent 4adcae682f
commit add2a5d1b5
2 changed files with 2 additions and 2 deletions

View File

@ -295,7 +295,7 @@ add_html_to_string(struct string *string, unsigned char *src, int len)
/* TODO Optimize later --pasky */ /* TODO Optimize later --pasky */
struct string * struct string *
add_quoted_to_string(struct string *string, unsigned char *src, int len) add_quoted_to_string(struct string *string, const unsigned char *src, int len)
{ {
for (; len; len--, src++) { for (; len; len--, src++) {
if (isquote(*src) || *src == '\\') if (isquote(*src) || *src == '\\')

View File

@ -80,7 +80,7 @@ add_string_replace(struct string *string, unsigned char *src, int len,
struct string *add_html_to_string(struct string *string, unsigned char *html, int htmllen); struct string *add_html_to_string(struct string *string, unsigned char *html, int htmllen);
/* Escapes \ and " with a \ */ /* Escapes \ and " with a \ */
struct string *add_quoted_to_string(struct string *string, unsigned char *q, int qlen); struct string *add_quoted_to_string(struct string *string, const unsigned char *q, int qlen);
/* Adds ', |len| bytes of |src| with all single-quotes converted to '\'', /* Adds ', |len| bytes of |src| with all single-quotes converted to '\'',
* and ' to |string|. */ * and ' to |string|. */