URL_FIELD(3) Library Functions Manual URL_FIELD(3) NAME url_field - change the specified field of the url_t* object SYNOPSIS #include void url_field(url_t *url, const char *txt, int field); #define url_scheme(url, scheme) url_field((url), (scheme), URL_SCHEME) #define url_query(url, query) url_field((url), (query), URL_QUERY) #define url_path(url, path) url_field((url), (path), URL_PATH) #define url_host(url, host) url_field((url), (host), URL_AUTHORITY_HOST) #define url_port(url, port) url_field((url), (port), URL_AUTHORITY_PORT) #define url_userinfo(url, userinfo) url_field((url), (userinfo), URL_AUTHORITY_USERINFO) #define url_fragment(url, fragment) url_field((url), (fragment), URL_FRAGMENT) DESCRIPTION url_field() changes the specified field of the url_t* object to txt, the numbers used as the field are the same as the following macros, #define URL_SCHEME 1 #define URL_PATH 2 #define URL_AUTHORITY_HOST 3 #define URL_AUTHORITY_PORT 4 #define URL_AUTHORITY_USERINFO 5 #define URL_QUERY 6 #define URL_FRAGMENT 7 NOTE: also, if the specified field is not filled in, it will create it instead of replacing it. url_() all other macro functions are a simplified version of the previous function, these simply specify the field at once 13 June 2024 URL_FIELD(3)