mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
[qs_parse] const
This commit is contained in:
parent
bd6a1d1d23
commit
ae32e08ee4
@ -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 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)
|
#define ISQSCHR(x) ((((x)=='=')||((x)=='#')||((x)=='&')||((x)=='\0')) ? 0 : 1)
|
||||||
|
|
||||||
int qs_strncmp(char * s, char * qs, size_t n)
|
int qs_strncmp(const char * s, char * qs, size_t n)
|
||||||
{
|
{
|
||||||
int i=0;
|
int i=0;
|
||||||
unsigned char u1, u2, unyb, lnyb;
|
unsigned char u1, u2, unyb, lnyb;
|
||||||
@ -129,7 +129,7 @@ int qs_decode(char * qs)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
char * qs_k2v(char * key, char * qs_kv[], int qs_kv_size)
|
char * qs_k2v(const char *key, char * qs_kv[], int qs_kv_size)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
size_t key_len, skip;
|
size_t key_len, skip;
|
||||||
|
@ -11,7 +11,7 @@ extern "C" {
|
|||||||
|
|
||||||
|
|
||||||
/* Similar to strncmp, but handles URL-encoding for either string */
|
/* Similar to strncmp, but handles URL-encoding for either string */
|
||||||
int qs_strncmp(char * s, char * qs, size_t n);
|
int qs_strncmp(const char * s, char * qs, size_t n);
|
||||||
|
|
||||||
|
|
||||||
/* Finds the beginning of each key/value pair and stores a pointer in qs_kv.
|
/* Finds the beginning of each key/value pair and stores a pointer in qs_kv.
|
||||||
@ -28,7 +28,7 @@ int qs_decode(char * qs);
|
|||||||
/* Looks up the value according to the key on a pre-processed query string
|
/* 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
|
* 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. */
|
* in a pre-sorted qs_kv array via a binary search. */
|
||||||
char * qs_k2v(char * key, char * qs_kv[], int qs_kv_size);
|
char * qs_k2v(const char * key, char * qs_kv[], int qs_kv_size);
|
||||||
|
|
||||||
|
|
||||||
/* Non-destructive lookup of value, based on key. User provides the
|
/* Non-destructive lookup of value, based on key. User provides the
|
||||||
|
Loading…
Reference in New Issue
Block a user