Another update from ingydotnet^djgoku

This commit is contained in:
Ingy döt Net 2015-11-18 06:14:39 +00:00
parent 91df62d461
commit 948b86eafa
7604 changed files with 108452 additions and 22726 deletions

View file

@ -5,7 +5,7 @@ char rfc3986[256] = {0};
char html5[256] = {0};
/* caller responsible for memory */
void encode(unsigned char *s, char *enc, char *tb)
void encode(const char *s, char *enc, char *tb)
{
for (; *s; s++) {
if (tb[*s]) sprintf(enc, "%c", tb[*s]);
@ -16,8 +16,8 @@ void encode(unsigned char *s, char *enc, char *tb)
int main()
{
unsigned char url[] = "http://foo bar/";
char enc[sizeof(url) * 3];
const char url[] = "http://foo bar/";
char enc[(strlen(url) * 3) + 1];
int i;
for (i = 0; i < 256; i++) {