1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-09-28 03:06:20 -04:00

encode_uri_string: Let name point to const.

This commit is contained in:
Kalle Olavi Niemitalo 2007-03-05 19:59:17 +02:00 committed by Kalle Olavi Niemitalo
parent ab92c38ca2
commit d17005e23f
2 changed files with 3 additions and 3 deletions

View File

@ -1319,11 +1319,11 @@ safe_char(unsigned char c)
}
void
encode_uri_string(struct string *string, unsigned char *name, int namelen,
encode_uri_string(struct string *string, const unsigned char *name, int namelen,
int convert_slashes)
{
unsigned char n[4];
unsigned char *end;
const unsigned char *end;
n[0] = '%';
n[3] = '\0';

View File

@ -278,7 +278,7 @@ int get_uri_port(struct uri *uri);
/* Encode and add @namelen bytes from @name to @string. If @namelen is -1 it is
* set to strlen(@name). If the boolean convert_slashes is zero '/'-chars will
* not be encoded. */
void encode_uri_string(struct string *string, unsigned char *name, int namelen,
void encode_uri_string(struct string *string, const unsigned char *name, int namelen,
int convert_slashes);
/* special version for Windows directory listing */