diff --git a/src/util/qs_parse/qs_parse.c b/src/util/qs_parse/qs_parse.c index 3f216827..d8fd2c18 100644 --- a/src/util/qs_parse/qs_parse.c +++ b/src/util/qs_parse/qs_parse.c @@ -9,7 +9,7 @@ #define HEX2DEC(x) (((x)>='0'&&(x)<='9') ? (x)-48 : ((x)>='A'&&(x)<='F') ? (x)-55 : ((x)>='a'&&(x)<='f') ? (x)-87 : 0) #define ISQSCHR(x) ((((x)=='=')||((x)=='#')||((x)=='&')||((x)=='\0')) ? 0 : 1) -int qs_strncmp(const char * s, const char * qs, size_t n) +int qs_strncmp(char * s, char * qs, size_t n) { int i=0; unsigned char u1, u2, unyb, lnyb; @@ -129,7 +129,7 @@ int qs_decode(char * qs) } -char * qs_k2v(const char * key, char * qs_kv[], int qs_kv_size) +char * qs_k2v(char * key, char * qs_kv[], int qs_kv_size) { int i; size_t key_len, skip; @@ -157,7 +157,7 @@ char * qs_k2v(const char * key, char * qs_kv[], int qs_kv_size) } -char * qs_scanvalue(const char * key, const char * qs, char * val, size_t val_len) +char * qs_scanvalue(char * key, char * qs, char * val, size_t val_len) { int i, key_len; char * tmp; diff --git a/src/util/qs_parse/qs_parse.h b/src/util/qs_parse/qs_parse.h index 71048a44..a3413299 100644 --- a/src/util/qs_parse/qs_parse.h +++ b/src/util/qs_parse/qs_parse.h @@ -11,7 +11,7 @@ extern "C" { /* Similar to strncmp, but handles URL-encoding for either string */ -int qs_strncmp(const char * s, const char * qs, size_t n); +int qs_strncmp(char * s, char * qs, size_t n); /* Finds the beginning of each key/value pair and stores a pointer in qs_kv. @@ -28,12 +28,12 @@ int qs_decode(char * qs); /* Looks up the value according to the key on a pre-processed query string * A future enhancement will be a compile-time option to look up the key * in a pre-sorted qs_kv array via a binary search. */ -char * qs_k2v(const char * key, char * qs_kv[], int qs_kv_size); +char * qs_k2v(char * key, char * qs_kv[], int qs_kv_size); /* Non-destructive lookup of value, based on key. User provides the * destinaton string and length. */ -char * qs_scanvalue(const char * key, const char * qs, char * val, size_t val_len); +char * qs_scanvalue(char * key, char * qs, char * val, size_t val_len); /* Converts the 3 or 6 (RGB), or 4 or 8 (RGBA) hex chars in the color string