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

[qs_parse] Changed const char * to char *

This commit is contained in:
Witold Filipczyk 2022-01-18 20:42:01 +01:00
parent 53a860a3d6
commit 7b77d84626
2 changed files with 6 additions and 6 deletions

View File

@ -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;

View File

@ -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