32#ifndef NETSURF_UA_FORMAT_STRING
33#define NETSURF_UA_FORMAT_STRING "Mozilla/5.0 (%s) NetSurf/%d.%d"
44 const char *
sysname =
"Unknown";
48 if (
uname(&un) >= 0) {
50 if (strcmp(
sysname,
"Linux") == 0) {
60 ua_string = malloc(len + 1);
65 snprintf(ua_string, len + 1,
73 NSLOG(netsurf, INFO,
"Built user agent \"%s\"",
const int netsurf_version_minor
NetSuf browser minor version number.
const int netsurf_version_major
NetSuf browser major version number.
#define NSLOG(catname, level, logmsg, args...)
Interface to utility string handling.
system information filled in by uname derived from posix spec.
char sysname[65]
Operating system name (e.g., "Linux")
void free_user_agent_string(void)
Free any memory allocated for the user_agent_string.
const char * user_agent_string(void)
Retrieve the core user agent for this release.
#define NETSURF_UA_FORMAT_STRING
static void user_agent_build_string(void)
Prepare core_user_agent_string with a string suitable for use as a user agent in HTTP requests.
static const char * core_user_agent_string
int uname(struct utsname *buf)
Get the system information.
Interface to uts API to get name and information about current kernel.
Version information interface.