NetSurf
|
Go to the source code of this file.
Macros | |
#define | basic(cp) ((punycode_uint)(cp) < 0x80) |
#define | delim(cp) ((cp) == delimiter) |
#define | flagged(bcp) ((punycode_uint)(bcp) - 65 < 26) |
Enumerations | |
enum | { base = 36 , tmin = 1 , tmax = 26 , skew = 38 , damp = 700 , initial_bias = 72 , initial_n = 0x80 , delimiter = 0x2D } |
Functions | |
static punycode_uint | decode_digit (punycode_uint cp) |
static char | encode_digit (punycode_uint d, int flag) |
static char | encode_basic (punycode_uint bcp, int flag) |
static punycode_uint | adapt (punycode_uint delta, punycode_uint numpoints, int firsttime) |
enum punycode_status | punycode_encode (size_t input_length_orig, const punycode_uint input[], const unsigned char case_flags[], size_t *output_length, char output[]) |
enum punycode_status | punycode_decode (size_t input_length, const char input[], size_t *output_length, punycode_uint output[], unsigned char case_flags[]) |
Variables | |
static const punycode_uint | maxint = -1 |
#define basic | ( | cp | ) | ((punycode_uint)(cp) < 0x80) |
Definition at line 23 of file punycode.c.
#define delim | ( | cp | ) | ((cp) == delimiter) |
Definition at line 26 of file punycode.c.
#define flagged | ( | bcp | ) | ((punycode_uint)(bcp) - 65 < 26) |
Definition at line 55 of file punycode.c.
anonymous enum |
Enumerator | |
---|---|
base | |
tmin | |
tmax | |
skew | |
damp | |
initial_bias | |
initial_n | |
delimiter |
Definition at line 19 of file punycode.c.
|
static |
Definition at line 77 of file punycode.c.
References base, damp, skew, tmax, and tmin.
Referenced by punycode_decode(), and punycode_encode().
|
static |
Definition at line 32 of file punycode.c.
References base.
Referenced by punycode_decode().
|
static |
Definition at line 63 of file punycode.c.
Referenced by punycode_encode().
|
static |
Definition at line 44 of file punycode.c.
Referenced by punycode_encode().
enum punycode_status punycode_decode | ( | size_t | input_length, |
const char | input[], | ||
size_t * | output_length, | ||
punycode_uint | output[], | ||
unsigned char | case_flags[] | ||
) |
Definition at line 194 of file punycode.c.
References adapt(), base, basic, decode_digit(), delim, flagged, initial_bias, initial_n, maxint, punycode_bad_input, punycode_big_output, punycode_overflow, punycode_success, tmax, and tmin.
Referenced by idna__ace_to_ucs4().
enum punycode_status punycode_encode | ( | size_t | input_length_orig, |
const punycode_uint | input[], | ||
const unsigned char | case_flags[], | ||
size_t * | output_length, | ||
char | output[] | ||
) |
Definition at line 95 of file punycode.c.
References adapt(), base, basic, delimiter, encode_basic(), encode_digit(), initial_bias, initial_n, maxint, punycode_big_output, punycode_overflow, punycode_success, tmax, and tmin.
Referenced by idna__ucs4_to_ace().
|
static |
Definition at line 72 of file punycode.c.
Referenced by punycode_decode(), and punycode_encode().