MIRROR: javascript for 馃悳's, a tiny runtime with big ambitions
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

at type-hints-typescript 40 lines 897 B view raw
1#ifndef URL_H 2#define URL_H 3 4#include <stddef.h> 5#include "types.h" 6 7typedef struct { 8 char *protocol; 9 char *username; 10 char *password; 11 char *hostname; 12 char *port; 13 char *pathname; 14 char *search; 15 char *hash; 16} url_state_t; 17 18 19void init_url_module(void); 20void url_state_clear(url_state_t *s); 21void url_free_state(url_state_t *s); 22bool usp_is_urlsearchparams(ant_t *js, ant_value_t obj); 23 24ant_value_t url_library(ant_t *js); 25url_state_t *url_get_state(ant_value_t obj); 26ant_value_t make_url_obj(ant_t *js, url_state_t *s); 27 28char *build_href(const url_state_t *s); 29char *usp_serialize(ant_t *js, ant_value_t usp); 30char *form_urlencode(const char *str); 31char *form_urlencode_n(const char *str, size_t len); 32char *form_urldecode(const char *str); 33char *url_decode_component(const char *str); 34 35int parse_url_to_state( 36 const char *url_str, 37 const char *base_str, url_state_t *s 38); 39 40#endif